From 25fa9d08396314f4735dd7f7ca3a1a4f806def36 Mon Sep 17 00:00:00 2001 From: mxd <838425805@qq.com> Date: Sun, 10 Apr 2022 20:14:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=89=8D=E7=AB=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../magic-editor/assets/app.028aeefd.js | 69 -- .../magic-editor/assets/app.c638e5c5.js | 291 ++++++ .../magic-editor/assets/axios.23e7b955.js | 4 +- .../assets/editor.worker.011634f6.js | 3 - .../assets/editor.worker.7ef0e0c2.js | 3 + .../assets/html.worker.ca00066f.js | 446 ++++++++++ .../{index.c85bc970.js => index.6b6c80cf.js} | 2 +- .../assets/json.worker.5e438d37.js | 29 + .../assets/json.worker.b78cae82.js | 29 - ...{style.4d6341ff.css => style.f5d6f29c.css} | 2 +- .../magic-editor/assets/vendor.08c4cc4b.js | 828 +++++++++++++++++ .../magic-editor/assets/vendor.95bdc8f2.js | 829 ------------------ .../magic-editor/assets/vue.d1ea1415.js | 4 + .../magic-editor/assets/vue.e2ed9d9e.js | 4 - .../main/resources/magic-editor/index.html | 31 +- 15 files changed, 1612 insertions(+), 962 deletions(-) delete mode 100644 magic-editor/src/main/resources/magic-editor/assets/app.028aeefd.js create mode 100644 magic-editor/src/main/resources/magic-editor/assets/app.c638e5c5.js delete mode 100644 magic-editor/src/main/resources/magic-editor/assets/editor.worker.011634f6.js create mode 100644 magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js create mode 100644 magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js rename magic-editor/src/main/resources/magic-editor/assets/{index.c85bc970.js => index.6b6c80cf.js} (77%) create mode 100644 magic-editor/src/main/resources/magic-editor/assets/json.worker.5e438d37.js delete mode 100644 magic-editor/src/main/resources/magic-editor/assets/json.worker.b78cae82.js rename magic-editor/src/main/resources/magic-editor/assets/{style.4d6341ff.css => style.f5d6f29c.css} (55%) create mode 100644 magic-editor/src/main/resources/magic-editor/assets/vendor.08c4cc4b.js delete mode 100644 magic-editor/src/main/resources/magic-editor/assets/vendor.95bdc8f2.js create mode 100644 magic-editor/src/main/resources/magic-editor/assets/vue.d1ea1415.js delete mode 100644 magic-editor/src/main/resources/magic-editor/assets/vue.e2ed9d9e.js diff --git a/magic-editor/src/main/resources/magic-editor/assets/app.028aeefd.js b/magic-editor/src/main/resources/magic-editor/assets/app.028aeefd.js deleted file mode 100644 index 1ae25b5d..00000000 --- a/magic-editor/src/main/resources/magic-editor/assets/app.028aeefd.js +++ /dev/null @@ -1,69 +0,0 @@ -var zn=Object.defineProperty,Yn=Object.defineProperties;var qn=Object.getOwnPropertyDescriptors;var Ya=Object.getOwnPropertySymbols;var Kn=Object.prototype.hasOwnProperty,Wn=Object.prototype.propertyIsEnumerable;var oa=(e,t,a)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a,fe=(e,t)=>{for(var a in t||(t={}))Kn.call(t,a)&&oa(e,a,t[a]);if(Ya)for(var a of Ya(t))Wn.call(t,a)&&oa(e,a,t[a]);return e},qe=(e,t)=>Yn(e,qn(t));var mt=(e,t,a)=>(oa(e,typeof t!="symbol"?t+"":t,a),a);import{r as b,o as v,c as H,u as h,a as P,w,b as R,t as $,d as _,e as la,p as Ke,g as gt,f as pt,h as Xn,i as We,n as be,j as C,k as vt,v as It,l as W,m as Fe,q as Se,F as ee,s as ue,x as Ee,y as he,z as Et,A as Ze,B as pe,C as re,T as qa,D as He,E as Jn,G as Qn,H as se,I as Zn,J as Ka,K as te,L as dt,M as es,N as Ue,O as ra,P as ca,Q as ts,R as as,V as ns}from"./vue.e2ed9d9e.js";import{a as ss}from"./axios.23e7b955.js";import{l as Wa,e as je,a as X,R as it,W as is,b as os,m as ls,C as Xa,K as _t,c as bt,d as rs,f as ua,T as cs,t as us}from"./vendor.95bdc8f2.js";const ps={setup(e){let t={};try{parent&&parent.MAGIC_EDITOR_CONFIG&&(t=fe({},parent.MAGIC_EDITOR_CONFIG))}catch{}window.MAGIC_EDITOR_CONFIG&&(t=fe(fe({},t),window.MAGIC_EDITOR_CONFIG)),t.baseURL="./",t.serverURL="./",t.inJar=!0;const a=i=>{var o=window.location.search.substr(1).match(new RegExp("(^|&)"+i+"=([^&]*)(&|$)","i"));return o&&unescape(o[2])},n=a("headerName"),s=a("headerValue");return n&&s&&(t.request=t.request||{},t.request.beforeSend=i=>(i.headers[n]=s,i)),(i,o)=>{const l=b("magic-editor");return v(),H(l,{config:h(t)},null,8,["config"])}}};const ds="magic-editor",_s="2.0.0",hs={dev:"vite",build:"vite build"},fs={axios:"^0.24.0","monaco-editor":"0.29.1",qs:"^6.10.1",vue:"^3.2.26"},ms={"@vitejs/plugin-vue":"^2.0.1",vite:"^2.7.10","vite-plugin-svg-icons":"^1.1.0"};var gs={name:ds,version:_s,scripts:hs,dependencies:fs,devDependencies:ms};const pa="magic-";class vs{constructor(){}set(t,a){(Array.isArray(a)||typeof a=="object")&&(a=JSON.stringify(a)),localStorage.setItem(`${pa}${t}`,a)}remove(t){localStorage.removeItem(`${pa}${t}`)}get(t){return localStorage.getItem(`${pa}${t}`)}}var $e=new vs,da={name:"English",message:{run:"Run",save:"Save",search:"Search",upload:"Upload",export:"Export",push:"Push",skin:"Skin",reload:"reload all resources",copy:"Copy",searchText:"Enter keywords to search",required:"Required",defaultValue:"Default Value",description:"Description",parameterType:"Parameter Type",view:"View",addRow:"Add Row",removeRow:"Remove Row",all:"All",clear:"Clear",empty:"{0} is empty.",type:"Type",date:"Date",name:"Name",group:"{0} Group",i18n:"Language",tips:"Tips",ok:"OK",refresh:"Refresh",loading:"Loading...",nodata:"no data.",cancel:"Cancel",update:"Update",create:"Create",username:"Username",password:"Password",createDataSource:"Create {0}",chooseFile:"Please Choose File",expand:"Expand",collapse:"Collapse",selectAll:"Select All",deselectAll:"Deselect All",hide:"Hide",login:"Login",ignore:"Ignore",document:"Document",joinGroup:"Join QQ Group",untitled:"Untitled",log:"Log",enable:"Enable",variable:"Variable Info",switchLocale:"Switch Language To {0}, It work at after refreshing the page, Do you want to Refresh the page ?",loadClass:"Load Classes...",loadClassError:"Failed Load Classes",switchSkin:"Switch Skin To\u300C{0}\u300D",loadClassFinish:"Class Loaded",tryAutoLogin:"Try Auto Login",autoLoginSuccess:"Auto Login Success",getCurrentLoginUser:"Load Current Logined User",getResource:"Load {0} Resources",getResourceFinish:"{0} Resources Loaded",connectDebugServer:"Debug Server Connecting...",debugServerClose:"Debug Server Disconnected",connectDebugServerSuccess:"Connect Debug Server Success",reloadResourceSuccess:"Resource Reload Success",getDetail:"Load {0} Detail",getDetailSuccess:"Load {0} Detail Success",lockSuccess:"Lock {0} Success",lockFailed:"Failed to Lock {0}",unlockSuccess:"UnLock {0} Success",unlockFailed:"Failed to UnLock {0}",updateTips:"Update {0}",saveSuccess:"Save {0} Success",saveFailed:"Failed to Save {0}",newVersionRelease:"New Version {0} available",versionLastest:"Current Version is Lastese",versionUpdate:"New Version {0} available
Do you want Upgrade?",changelog:"CHANGELOG",versionConflict:"Version does not matched frontend: {0}, backend: {1}, Please Check!",versionCheck:"Version Check",loadConfigError:"Failed to load configuration",logout:"Logout",logoutSuccess:"Logout Success",logoutConfirm:"Are you sure Logout {0} ?",deleteConfirm:"Do you want Delete {0}",deleteSuccess:"Delete {0} Success",deleteFailed:"Failed to Delete {0}",deleteTips:"Delete {0}",remote:"Remote",secret:"Secret",exported:"The selected resource has been exported",exportNoneSelect:"Please select and then export",pushNoneSelect:"Please select and then push",responseBody:"Body",responseHeader:"Header",responseStructure:"Structure",root:"Root",pushWarning:"When the full mode is pushed, the local data shall prevail and the full coverage update will be carried out. Do you want to continue?",uploadWarning:"When uploading in full mode, the overwrite update operation is performed based on the uploaded data, and other interfaces may be deleted.
In the case of partial export, it is recommended to use incremental update. Do you want to continue?",noValidate:"No Validate",validatePattern:"Regex attern",validateExpression:"Expression"},plugin:{loading:"Load plugin \u300C{0}\u300D",loaded:"Plugin\u300C{0}\u300D Loaded",loadFailed:"Failed to load plugin\u300C{0}\u300D"},resource:{createGroup:"Create Group",updateGroup:"Update Group",copyGroup:"Copy Group",deleteGroupConfirm:"Do you want Delete {0} Group\u300C{1}\u300D?",deleteGroupSuccess:"Delete {0} Group\u300C{1}\u300DSuccess",deleteGroupFailed:"Failed to Delete {0} Group \u300C{1}\u300D",groupExport:"Group\u300C{0}\u300D's {1} Exported",moveGroup:"Move Group",moveRootGroupConfirm:"Do you want move Group \u300C{0}\u300Dinto root?",moveRootSuccess:"Move {0} Group \u300C{1}\u300Dinto root Success",moveRootFailed:"Failed to Move {0} Group\u300C{1}\u300D into root",moveGroupSuccess:"Move {0} Group \u300C{1}\u300D Success",moveGroupFailed:"Failed to Move {0} Group \u300C{1}\u300D",moveFileSuccess:"Move {0} Success",moveResourceFailed:"Failed to Move {0}",saveGroupSuccess:"Save {0} Group {1}\u300D Success",saveGroupFailed:"Failed to Save {0} Group \u300C{1}\u300D",copyPathSuccess:"Copy {0} Path {1}\u300D Success",copyPathFailed:"Failed to Copy {0} Path \u300C{1}\u300D",copyRelativePathSuccess:"Copy {0} Relative Path \u300C{1}\u300D Success",copyRelativePathFailed:"Failed to Copy {0} Relative Path \u300C{1}\u300D",contextmenu:{copy:"Copy {0}",copyWithPath:"Copy Absolute Path",copyRelativePath:"Copy Relative Path",lock:"Lock",unlock:"UnLock",delete:"Delete",newFile:"New {0}",deleteGroup:"Delete Group",exportGroup:"Export Group",moveToRoot:"Move To Root"},header:{expand:"Expand All",collapse:"Collapse All",asc:"Ascending",desc:"Descending",position:"Select Opened File"},form:{groupName:"Group Name",groupPath:"Group Path",placeholder:{name:"Please Enter {0} Group Name",path:"Please Enter {0} Group Path"}}},editor:{tab:{close:"Close",closeOther:"Close Other Tabs",closeLeft:"Close Tabs to the Left",closeRight:"Close Tabs to the Right",closeAll:"Close All Tabs"},tooltip:{complection:"Trigger Suggest",resume:"Resume Breakpoint",stepInto:"Step Into",format:"Reformat Code",recent:"Recent Opened Files"},triggerSuggest:"Trigger Suggest"},api:{title:"Api Info",name:"Api",form:{method:"Method",name:"Name",path:"Path",placeholder:{name:"Please Enter Api Name",path:"Please Enter Api Path"}},navbars:{parameter:"Parameters",header:"Headers",path:"PathVariables",body:"Body",option:"Options",description:"Descriptions",groupOption:"Group Options"},validateType:"Validate Type",expression:"Expression or Regex Pattern",validate:"Validate Description",field:"Field",test:{requestBodyError:"RequestBody Has Error, please check!",missPath:"Please enter PathVariable",requestError:"Failed to send Request\u300C{0}\u300D",success:"\u300C{0}\u300DRequest finish, Status:{1} Size:{2} Time\uFF1A{3} ms",begin:"Start Request For\u300C{0}\u300D"}},datasource:{title:"DataSource",name:"DataSource",copySuccess:"Copy {0} Success",copyFailed:"Failed to Copy {0}",test:"Test",connected:"Connected",connectFailed:`Failed to Connect, Reason:\r -{0}`,primary:"Primary",form:{placeholder:{name:"DataSource Name, Only Display Use",key:"DataSource Key, Required",url:"Please Enter jdbcURL\uFF0Ceg: jdbc:mysql://localhost/dbname",username:"Please Enter Database username, Optional",password:"Please Enter Database password, Optional",driver:"DriverClass, Optional",type:"Pool Type, Optional",maxRows:"Max Return Rows"},driver:"Driver",type:"Type",other:"Others"}},fn:{title:"Function Info",name:"Function",number:"Nunmber",string:"String",collection:"Collection",returnValue:"Return Types",parameter:"Function Parameters",description:"Function Description",form:{name:"Name",path:"Path",placeholder:{name:"Please Enter Function Name",path:"Please Enter Function Path"}}},toolbars:{debug:"Debug",log:"Run Log",history:"History",event:"Event",global:"Global Parameters",response:"Response",viewHistory:"History:{0}"},event:{message:"Message"},history:{name:"History",operator:"Operators"},upload:{full:"Full Upload",increment:"Increment Upload",success:"{0} Success",failed:"Failed to {0}"},push:{full:"Full Push",increment:"Increment Push",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"Full Backup",backupSuccess:"Full Backup Success",rollback:"Rollback",current:"Current",difference:"Difference",rollbackSuccess:"Rollback {0} Success",rollbackFailed:"Failed to Rollback {0}",rollbackConfirm:"this mode is read from backup and overview current resources, Do you want to continue?"},online:{login:"User Login",loginTips:"User {0} Login, IP: {1}",logout:"User Logout",logoutTips:"User {0} Logout, IP: {1}",onlines:"Online: {0}"},log:{hide:"Click to hide multiline log",show:"{0} lines of log are hidden, Click to show",scrollEnd:"Scroll to End"},code:{error:"Error({0})",invalid:"Error,HttpStatus({0})",httpError:"Error","-2":"Current is Readonly, Cannot be Operated","-10":"Unauthorized Operation","1001":"Group Not Found","1002":"Not Support the Group Type","1003":"Remote Cannot be empty","1004":"secretKey Cannot be empty","1005":"The name will repeat after moving. Please modify the name and try again.","1006":"Source object and grouping cannot be consistent","1007":"Resoirce Not Found","1008":"The current resource has been locked. Please operate after unlocking","1009":"This path has been used. Please try another path","1010":"There are conflicts in resource [{0}], please check","1011":"The path will conflict after moving. Please try another path","1012":"Request Method Cannot be empty","1013":"Reqeust Path Cannot be empty","1014":"Function Path Cannot be empty","1015":"The configured file path does not exist, please check","1016":"The Api [{0} ({1})] conflicts with the application and cannot be registered","1017":"Script Cannot be empty","1018":"Name Cannot be empty","1019":"Path Cannot be empty","1020":"jdbcURL Cannot be empty","1021":"key Cannot be empty","1022":"The data source key has been used. Please replace it and try again","1023":"Please Choose Group","1024":"Cron Expression Cannot be empty","1025":"The name cannot contain special characters. Only Chinese, numbers, letters and +-.() and . cannot be start","1026":"The data source key cannot contain special characters, only Chinese, numbers, letters, _","1027":"Failed to save. The group name under the same group cannot be duplicate and cannot contain special characters.","1028":"Parameter validation failed","1029":"Header validation failed","1030":"PathVariable validation failed","1031":"RequestBody validation failed","1032":"Please Upload File","1033":"Failed to validate Signature. Please check whether the secret key is correct","1034":"Backup is not enabled and cannot be operated","1035":"Api Not Found"}},Es=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:da}),Ct={name:"\u7B80\u4F53\u4E2D\u6587",message:{run:"\u8FD0\u884C",save:"\u4FDD\u5B58",search:"\u641C\u7D22",upload:"\u4E0A\u4F20",export:"\u5BFC\u51FA",push:"\u63A8\u9001",skin:"\u76AE\u80A4",reload:"\u91CD\u65B0\u52A0\u8F7D\u6240\u6709\u6570\u636E",copy:"\u590D\u5236",searchText:"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",required:"\u5FC5\u586B",defaultValue:"\u9ED8\u8BA4\u503C",description:"\u63CF\u8FF0",parameterType:"\u53C2\u6570\u7C7B\u578B",view:"\u89C6\u56FE",addRow:"\u589E\u52A0\u4E00\u884C",removeRow:"\u5220\u9664\u4E00\u884C",all:"\u5168\u90E8",clear:"\u6E05\u7A7A",empty:"\u6682\u65E0{0}",type:"\u7C7B\u578B",date:"\u65F6\u95F4",name:"\u540D\u79F0",group:"{0}\u5206\u7EC4",i18n:"\u8BED\u8A00",tips:"\u63D0\u793A",ok:"\u786E\u5B9A",refresh:"\u5237\u65B0",loading:"\u52A0\u8F7D\u4E2D",nodata:"\u65E0\u6570\u636E",cancel:"\u53D6\u6D88",update:"\u4FEE\u6539",create:"\u521B\u5EFA",username:"\u7528\u6237\u540D",password:"\u5BC6\u7801",createDataSource:"\u521B\u5EFA{0}",chooseFile:"\u8BF7\u9009\u62E9\u6587\u4EF6",expand:"\u5C55\u5F00",collapse:"\u6536\u7F29",selectAll:"\u5168\u9009",deselectAll:"\u53D6\u6D88\u5168\u9009",hide:"\u9690\u85CF",login:"\u767B\u5F55",ignore:"\u4E0D\u518D\u63D0\u9192",document:"\u5E2E\u52A9\u6587\u6863",joinGroup:"\u52A0\u5165QQ\u7FA4",untitled:"\u672A\u5B9A\u4E49\u540D\u79F0",log:"\u65E5\u5FD7",enable:"\u542F\u7528",variable:"\u53D8\u91CF\u4FE1\u606F",switchLocale:"\u5DF2\u5207\u6362\u81F3{0}\uFF0C\u5237\u65B0\u9875\u9762\u540E\u751F\u6548\uFF0C\u662F\u5426\u5237\u65B0\uFF1F",loadClass:"\u52A0\u8F7Dclasses\u4FE1\u606F...",loadClassError:"\u52A0\u8F7Dclasses\u4FE1\u606F\u5931\u8D25",switchSkin:"\u5207\u6362\u76AE\u80A4\u81F3\u300C{0}\u300D",loadClassFinish:"classes\u4FE1\u606F\u52A0\u8F7D\u5B8C\u6BD5",tryAutoLogin:"\u5C1D\u8BD5\u81EA\u52A8\u767B\u5F55",autoLoginSuccess:"\u81EA\u52A8\u767B\u5F55\u6210\u529F",getCurrentLoginUser:"\u83B7\u53D6\u5F53\u524D\u767B\u5F55\u7528\u6237\u4FE1\u606F",getResource:"\u83B7\u53D6{0}\u8D44\u6E90",getResourceFinish:"\u83B7\u53D6{0}\u8D44\u6E90\u5B8C\u6BD5",connectDebugServer:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668...",debugServerClose:"\u8C03\u8BD5\u670D\u52A1\u5668\u5DF2\u65AD\u5F00",connectDebugServerSuccess:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668\u6210\u529F",reloadResourceSuccess:"\u91CD\u65B0\u52A0\u8F7D\u8D44\u6E90\u6210\u529F",getDetail:"\u83B7\u53D6{0}",getDetailSuccess:"\u83B7\u53D6{0}\u8BE6\u60C5\u6210\u529F",lockSuccess:"\u6210\u529F\u9501\u5B9A{0}",lockFailed:"\u9501\u5B9A{0}\u5931\u8D25",unlockSuccess:"\u6210\u529F\u89E3\u9501{0}",unlockFailed:"\u89E3\u9501{0}\u5931\u8D25",updateTips:"\u4FEE\u6539{0}",saveSuccess:"\u4FDD\u5B58{0}\u6210\u529F",saveFailed:"\u4FDD\u5B58{0}\u5931\u8D25",newVersionRelease:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u6700\u65B0\u7248\u672C\u4E3A\uFF1A{0},\u5EFA\u8BAE\u66F4\u65B0\uFF01\uFF01",versionLastest:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248",versionUpdate:"\u68C0\u6D4B\u5230\u5DF2\u6709\u65B0\u7248\u672C{0}\uFF0C\u662F\u5426\u66F4\u65B0\uFF1F",changelog:"\u66F4\u65B0\u65E5\u5FD7",versionConflict:"\u68C0\u6D4B\u5230\u524D\u540E\u7AEF\u7248\u672C\u4E0D\u4E00\u81F4\uFF08\u524D\u7AEF\uFF1A{0} \u540E\u7AEF\uFF1A{1}\uFF09\uFF0C\u8BF7\u68C0\u67E5",versionCheck:"\u7248\u672C\u68C0\u6D4B",loadConfigError:"\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25",logout:"\u6CE8\u9500\u767B\u5F55",logoutSuccess:"\u6CE8\u9500\u767B\u5F55\u6210\u529F",logoutConfirm:"\u662F\u5426\u8981\u6CE8\u9500\u767B\u5F55\u300C{0}\u300D",deleteConfirm:"\u662F\u5426\u8981\u5220\u9664{0}",deleteSuccess:"\u5220\u9664{0}\u6210\u529F",deleteFailed:"\u5220\u9664{0}\u5931\u8D25",deleteTips:"\u5220\u9664{0}",remote:"\u8FDC\u7A0B\u5730\u5740",secret:"\u79D8\u94A5",exported:"\u6570\u636E\u5DF2\u5BFC\u51FA\u5B8C\u6BD5",exportNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u518D\u5728\u8FDB\u884C\u5BFC\u51FA\uFF01",pushNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u540E\u518D\u8FDB\u884C\u63A8\u9001\uFF01",responseBody:"Body",responseHeader:"\u54CD\u5E94Header",responseStructure:"\u54CD\u5E94\u7ED3\u6784",root:"\u6839\u8282\u70B9",pushWarning:"\u5168\u91CF\u6A21\u5F0F\u63A8\u9001\u65F6\uFF0C\u4EE5\u672C\u5730\u6570\u636E\u4E3A\u51C6\u5168\u91CF\u8986\u76D6\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",uploadWarning:"\u5168\u91CF\u6A21\u5F0F\u4E0A\u4F20\u65F6\uFF0C\u4EE5\u4E0A\u4F20\u7684\u6570\u636E\u4E3A\u51C6\u8FDB\u884C\u8986\u76D6\u66F4\u65B0\u64CD\u4F5C\uFF0C\u53EF\u80FD\u4F1A\u5220\u9664\u5176\u4ED6\u63A5\u53E3
\u5728\u975E\u5168\u91CF\u5BFC\u51FA\u65F6\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u589E\u91CF\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",noValidate:"\u4E0D\u9A8C\u8BC1",validatePattern:"\u6B63\u5219\u9A8C\u8BC1",validateExpression:"\u8868\u8FBE\u5F0F\u9A8C\u8BC1"},plugin:{loading:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loaded:"\u5DF2\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loadFailed:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D\u5931\u8D25"},resource:{createGroup:"\u521B\u5EFA\u5206\u7EC4",updateGroup:"\u4FEE\u6539\u5206\u7EC4",copyGroup:"\u590D\u5236\u5206\u7EC4",deleteGroupConfirm:"\u662F\u5426\u8981\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\uFF1F",deleteGroupSuccess:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",deleteGroupFailed:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",groupExport:"\u5206\u7EC4\u300C{0}\u300D\u76F8\u5173{1}\u5DF2\u5BFC\u51FA",moveGroup:"\u79FB\u52A8\u5206\u7EC4",moveRootGroupConfirm:"\u662F\u5426\u8981\u5C06\u5206\u7EC4\u300C{0}\u300D\u79FB\u52A8\u81F3\u6839\u8282\u70B9",moveRootSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u6210\u529F",moveRootFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u5931\u8D25",moveGroupSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",moveGroupFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",moveFileSuccess:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u6210\u529F",moveResourceFailed:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u5931\u8D25",saveGroupSuccess:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",saveGroupFailed:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",copyPathSuccess:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyPathFailed:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",copyRelativePathSuccess:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyRelativePathFailed:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",contextmenu:{copy:"\u590D\u5236{0}",copyWithPath:"\u590D\u5236\u8DEF\u5F84",copyRelativePath:"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84",lock:"\u9501\u5B9A",unlock:"\u89E3\u9501",delete:"\u5220\u9664",newFile:"\u65B0\u5EFA{0}",deleteGroup:"\u5220\u9664\u5206\u7EC4",exportGroup:"\u5BFC\u51FA\u5206\u7EC4",moveToRoot:"\u79FB\u52A8\u81F3\u6839\u8282\u70B9"},header:{expand:"\u5168\u90E8\u5C55\u5F00",collapse:"\u5168\u90E8\u6298\u53E0",asc:"\u6309\u5B57\u6BCD\u5347\u5E8F",desc:"\u6309\u5B57\u6BCD\u964D\u5E8F",position:"\u5B9A\u4F4D\u5F53\u524D\u6587\u4EF6"},form:{groupName:"\u5206\u7EC4\u540D\u79F0",groupPath:"\u5206\u7EC4\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u540D\u79F0",path:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u8DEF\u5F84"}}},editor:{tab:{close:"\u5173\u95ED",closeOther:"\u5173\u95ED\u5176\u5B83",closeLeft:"\u5173\u95ED\u5DE6\u4FA7",closeRight:"\u5173\u95ED\u53F3\u4FA7",closeAll:"\u5168\u90E8\u5173\u95ED"},tooltip:{complection:"\u4EE3\u7801\u63D0\u793A",resume:"\u6062\u590D\u65AD\u70B9",stepInto:"\u6B65\u8FDB",format:"\u4EE3\u7801\u683C\u5F0F\u5316",recent:"\u6700\u8FD1\u6253\u5F00"},triggerSuggest:"\u89E6\u53D1\u4EE3\u7801\u63D0\u793A"},api:{title:"\u63A5\u53E3\u4FE1\u606F",name:"\u63A5\u53E3",form:{method:"\u8BF7\u6C42\u65B9\u6CD5",name:"\u63A5\u53E3\u540D\u79F0",path:"\u63A5\u53E3\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u63A5\u53E3\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u63A5\u53E3\u8DEF\u5F84"}},navbars:{parameter:"\u8BF7\u6C42\u53C2\u6570",header:"\u8BF7\u6C42Header",path:"\u8DEF\u5F84\u53D8\u91CF",body:"\u8BF7\u6C42Body",option:"\u63A5\u53E3\u9009\u9879",description:"\u63A5\u53E3\u63CF\u8FF0",groupOption:"\u5206\u7EC4\u9009\u9879"},validateType:"\u9A8C\u8BC1\u65B9\u5F0F",expression:"\u8868\u8FBE\u5F0F\u6216\u6B63\u5219\u8868\u8FBE\u5F0F",validate:"\u9A8C\u8BC1\u8BF4\u660E",field:"\u5B57\u6BB5",test:{requestBodyError:"RequestBody \u53C2\u6570\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\uFF01",missPath:"\u8BF7\u586B\u5199\u8DEF\u5F84\u53D8\u91CF\u540E\u5728\u6D4B\u8BD5\uFF01",requestError:"\u8BF7\u6C42\u300C{0}\u300D\u51FA\u9519",success:"\u300C{0}\u300D\u6D4B\u8BD5\u5B8C\u6BD5\uFF0C\u72B6\u6001\uFF1A{1} \u5927\u5C0F\uFF1A{2} \u8017\u65F6\uFF1A{3} ms",begin:"\u5F00\u59CB\u6D4B\u8BD5\u300C{0}\u300D"}},datasource:{title:"DataSource",name:"\u6570\u636E\u6E90",copySuccess:"\u590D\u5236{0}\u6210\u529F",copyFailed:"\u590D\u5236{0}\u5931\u8D25",test:"\u6D4B\u8BD5\u8FDE\u63A5",connected:"\u8FDE\u63A5\u6210\u529F",connectFailed:`\u8FDE\u63A5\u5931\u8D25\uFF0C\u9519\u8BEF\u539F\u56E0\uFF1A\r -{0}`,primary:"\u4E3B\u6570\u636E\u6E90",form:{placeholder:{name:"\u6570\u636E\u6E90\u540D\u79F0\uFF0C\u4EC5\u505A\u663E\u793A\u4F7F\u7528",key:"\u6570\u636E\u6E90Key\uFF0C\u540E\u7EED\u4EE3\u7801\u4E2D\u4F7F\u7528",url:"\u8BF7\u8F93\u5165jdbcURL\uFF0C\u5982\uFF1Ajdbc:mysql://localhost/dbname",username:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u7528\u6237\u540D",password:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u5BC6\u7801",driver:"\u9A71\u52A8\u7C7B\uFF0C\u53EF\u9009\uFF0C\u5185\u90E8\u81EA\u52A8\u8BC6\u522B\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",type:"\u8FDE\u63A5\u6C60\u7C7B\u578B\uFF0C\u53EF\u9009\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",maxRows:"\u6700\u591A\u8FD4\u56DE\u6761\u6570\uFF0C-1\u4E3A\u4E0D\u9650\u5236"},driver:"\u9A71\u52A8\u7C7B",type:"\u7C7B\u578B",other:"\u5176\u5B83\u914D\u7F6E"}},task:{title:"\u5B9A\u65F6\u4EFB\u52A1\u4FE1\u606F",name:"\u5B9A\u65F6\u4EFB\u52A1",form:{name:"\u4EFB\u52A1\u540D\u79F0",path:"\u4EFB\u52A1\u8DEF\u5F84",placeholder:{cron:"\u8BF7\u8F93\u5165Cron\u8868\u8FBE\u5F0F",name:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u8DEF\u5F84",description:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0"}}},fn:{title:"\u51FD\u6570\u4FE1\u606F",name:"\u51FD\u6570",number:"\u6570\u503C",string:"\u5B57\u7B26\u4E32",collection:"\u96C6\u5408",fnName:"\u51FD\u6570\u540D\u79F0",returnValue:"\u8FD4\u56DE\u503C",parameter:"\u51FD\u6570\u53C2\u6570",description:"\u51FD\u6570\u63CF\u8FF0",form:{name:"\u51FD\u6570\u540D\u79F0",path:"\u51FD\u6570\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u51FD\u6570\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u51FD\u6570\u8DEF\u5F84"}}},toolbars:{debug:"\u8C03\u8BD5\u4FE1\u606F",log:"\u8FD0\u884C\u65E5\u5FD7",history:"\u5386\u53F2\u8BB0\u5F55",event:"\u4E8B\u4EF6",global:"\u5168\u5C40\u53C2\u6570",response:"\u6267\u884C\u7ED3\u679C",viewHistory:"\u5386\u53F2\u8BB0\u5F55\uFF1A{0}"},event:{message:"\u4E8B\u4EF6\u5185\u5BB9"},history:{name:"\u5386\u53F2\u8BB0\u5F55",operator:"\u64CD\u4F5C\u4EBA"},upload:{full:"\u5168\u91CF\u4E0A\u4F20",increment:"\u589E\u91CF\u4E0A\u4F20",success:"{0}\u6210\u529F",failed:"{0}\u5931\u8D25"},push:{full:"\u5168\u91CF\u63A8\u9001",increment:"\u589E\u91CF\u63A8\u9001",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"\u5168\u91CF\u5907\u4EFD",backupSuccess:"\u5168\u91CF\u5907\u4EFD\u5B8C\u6BD5",rollback:"\u8FD8\u539F",current:"\u5F53\u524D\u7248\u672C",difference:"\u5BF9\u6BD4\u4E0D\u540C",rollbackSuccess:"\u6062\u590D{0}\u6210\u529F",rollbackFailed:"\u6062\u590D{0}\u5931\u8D25",rollbackConfirm:"\u8BE5\u6A21\u5F0F\u662F\u5168\u91CF\u4ECE\u5907\u4EFD\u6587\u4EF6\u4E2D\u8BFB\u53D6\uFF0C\u5E76\u8986\u76D6\u66F4\u65B0\u5F53\u524D\u8D44\u6E90\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F"},online:{login:"\u7528\u6237\u4E0A\u7EBF",loginTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0A\u7EBF\uFF0CIP\uFF1A{1}",logout:"\u7528\u6237\u4E0B\u7EBF",logoutTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0B\u7EBF\uFF0CIP\uFF1A{1}",onlines:"\u5F53\u524D\u5728\u7EBF\uFF1A{0}\u4EBA"},log:{hide:"\u70B9\u51FB\u9690\u85CF\u591A\u884C\u65E5\u5FD7",show:"\u6709 {0} \u884C\u65E5\u5FD7\u88AB\u9690\u85CF\uFF0C\u70B9\u51FB\u663E\u793A",scrollEnd:"\u6EDA\u52A8\u81F3\u7ED3\u5C3E"},code:{error:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u5F02\u5E38\u4EE3\u7801({0})",invalid:"\u8BF7\u6C42\u51FA\u9519\uFF0CHttpStatus({0})",httpError:"\u8BF7\u6C42\u51FA\u9519","-2":"\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u65E0\u6CD5\u64CD\u4F5C","-10":"\u65E0\u6743\u9650\u64CD\u4F5C\u3002","1001":"\u627E\u4E0D\u5230\u5206\u7EC4\u4FE1\u606F","1002":"\u4E0D\u652F\u6301\u8BE5\u5206\u7EC4\u7C7B\u578B","1003":"\u76EE\u6807\u7F51\u5740\u4E0D\u80FD\u4E3A\u7A7A","1004":"secretKey\u4E0D\u80FD\u4E3A\u7A7A","1005":"\u79FB\u52A8\u540E\u540D\u79F0\u4F1A\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540D\u79F0\u540E\u5728\u8BD5\u3002","1006":"\u6E90\u5BF9\u8C61\u548C\u5206\u7EC4\u4E0D\u80FD\u4E00\u81F4","1007":"\u627E\u4E0D\u5230\u5BF9\u5E94\u6587\u4EF6\u6216\u5206\u7EC4","1008":"\u5F53\u524D\u8D44\u6E90\u5DF2\u88AB\u9501\u5B9A\uFF0C\u8BF7\u89E3\u9501\u540E\u5728\u64CD\u4F5C\u3002","1009":"\u8BE5\u8DEF\u5F84\u5DF2\u88AB\u4F7F\u7528,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5","1010":"\u8D44\u6E90\u4E2D[{0}]\u6709\u51B2\u7A81\uFF0C\u8BF7\u68C0\u67E5","1011":"\u79FB\u52A8\u540E\u8DEF\u5F84\u4F1A\u51B2\u7A81,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5","1012":"\u8BF7\u6C42\u65B9\u6CD5\u4E0D\u80FD\u4E3A\u7A7A","1013":"\u8BF7\u6C42\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1014":"\u51FD\u6570\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1015":"\u914D\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5","1016":"\u63A5\u53E3[{0}({1})]\u4E0E\u5E94\u7528\u51B2\u7A81\uFF0C\u65E0\u6CD5\u6CE8\u518C","1017":"\u811A\u672C\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A","1018":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","1019":"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1020":"jdbcURL\u4E0D\u80FD\u4E3A\u7A7A","1021":"key\u4E0D\u80FD\u4E3A\u7A7A","1022":"\u6570\u636E\u6E90key\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u66F4\u6362\u540E\u5728\u8BD5","1023":"\u8BF7\u9009\u62E9\u5206\u7EC4","1024":"cron\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A","1025":"\u540D\u79F0\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA+_-.()\u7684\u7EC4\u5408\u4E14\u4E0D\u80FD.\u5F00\u5934","1026":"\u6570\u636E\u6E90Key\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA_\u7EC4\u5408","1027":"\u4FDD\u5B58\u5931\u8D25,\u540C\u4E00\u7EC4\u4E0B\u5206\u7EC4\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u4E14\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\u3002","1028":"\u53C2\u6570\u9A8C\u8BC1\u5931\u8D25","1029":"header\u9A8C\u8BC1\u5931\u8D25","1030":"\u8DEF\u5F84\u53D8\u91CF\u9A8C\u8BC1\u5931\u8D25","1031":"body\u9A8C\u8BC1\u5931\u8D25","1032":"\u8BF7\u4E0A\u4F20\u6587\u4EF6","1033":"\u7B7E\u540D\u9A8C\u8BC1\u5931\u8D25,\u8BF7\u68C0\u67E5\u79D8\u94A5\u662F\u5426\u6B63\u786E","1034":"\u672A\u542F\u7528\u5907\u4EFD\uFF0C\u65E0\u6CD5\u64CD\u4F5C","1035":"\u627E\u4E0D\u5230\u63A5\u53E3"}},bs=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ct});const ys=$e.get("locale");let Yt=Ct;ys==="en"&&(Yt=da);function c(e,...t){try{const a=e.split(".").reduce((n,s)=>n[s],Yt);return a&&t.length>0?a.replace(/\{(\d+)\}/g,(n,s)=>t[s]):a||e}catch{return e}}function Ts(e,t){let a=Ct;e==="en"&&(a=da);const n=(s,i)=>{Object.entries(i).forEach(([o,l])=>{typeof l=="string"?s[o]=l:(s[o]||(s[o]={}),n(s[o],l))})};n(a,t)}function Ss(e,t){if(Ct===Yt)return t;const a=Ct.code[`${e}`],n=Yt.code[`${e}`];if(a&&n){const s=a.replace(/([()\[\]\.])/g,"\\$1").replace(/{\d+}/g,"(.*?)");if(s){const i=[],o=new RegExp(s,"g");let l;for(;(l=o.exec(t))!=null;)i.push(l);return c(`code.${e}`,i.splice(0,1))}}return t}let Ja=gs.version,Os="V"+Ja.replace(/\./g,"_");const M={BASE_URL:"",WEBSOCKET_SERVER:"",SERVER_URL:"",AUTO_SAVE:!0,user:null,DECORATION_TIMEOUT:1e4,CHECK_UPDATE:!0,BLOCK_CLOSE:!0,MAGIC_API_VERSION_TEXT:Ja,MAGIC_API_VERSION:Os,API_DEFAULT_METHOD:"GET",CLIENT_ID:"none",HEADER_REQUEST_CLIENT_ID:"Magic-Request-Client-Id",HEADER_REQUEST_SCRIPT_ID:"Magic-Request-Script-Id",HEADER_REQUEST_BREAKPOINTS:"Magic-Request-Breakpoints",HEADER_RESPONSE_MAGIC_CONTENT_TYPE:"ma-content-type",HEADER_APPLICATION_STREAM:"application/octet-stream",HEADER_CONTENT_DISPOSITION:"ma-content-disposition",HEADER_MAGIC_TOKEN:"magic-token",HEADER_MAGIC_TOKEN_VALUE:"unauthorization",IGNORE_VERSION:"ignore-version",RECENT_OPENED_TAB:"recent_opened_tab",RECENT_OPENED:"recent_opened",RESPONSE_CODE_DEBUG:1e3,RESPONSE_CODE_SCRIPT_ERROR:-1e3,RESPONSE_NO_PERMISSION:-10,DEFAULT_EXPAND:!0,LOGINED:!1,LOG_MAX_ROWS:1/0,LOCKED:"1",UNLOCK:"0",STORE:{theme:"theme",token:"token"},PLUGINS:[],GLOBAL:{parameters:[],headers:[]},THEME:"default",JDBC_DRIVERS:["com.mysql.jdbc.Driver","com.mysql.cj.jdbc.Driver","oracle.jdbc.driver.OracleDriver","org.postgresql.Driver","com.microsoft.sqlserver.jdbc.SQLServerDriver","com.ibm.db2.jcc.DB2Driver"],DATASOURCE_TYPES:["com.zaxxer.hikari.HikariDataSource","com.alibaba.druid.pool.DruidDataSource","org.apache.tomcat.jdbc.pool.DataSource","org.apache.commons.dbcp2.BasicDataSource"],OPTIONS:[],EDITOR_FONT_FAMILY:'JetBrainsMono, Consolas, "Courier New",monospace, \u5FAE\u8F6F\u96C5\u9ED1',EDITOR_FONT_SIZE:14,FONT_LIGATURES:!0,VALIDATE_TYPES:[{value:"pass",text:c("message.noValidate")},{value:"expression",text:c("message.validateExpression")},{value:"pattern",text:c("message.validatePattern")}],DEFAULT_VALIDATE_TYPE:"pass",REQUEST_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"MultipartFile",text:"MultipartFile"},{value:"MultipartFiles",text:"MultipartFiles"}],GLOBAL_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_PARAMETER_TYPE:"String",REQUEST_SIMPLE_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_SIMPLE_TYPE:"String",REQUEST_METHODS:[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"},{value:"HEAD",text:"HEAD"},{value:"PATCH",text:"PATCH"}],DEFAULT_REQUEST_METHOD:"GET",FUNCTION_RETURN_TYPES:[{value:"java.lang.Number",text:c("fn.number")},{value:"java.lang.String",text:c("fn.string")},{value:"java.util.Collection",text:c("fn.collection")},{value:"java.util.Map",text:"Map"},{value:"java.lang.Object",text:"Object"}],BODY_DATA_TYPES:[{value:"String",text:"String"},{value:"Integer",text:"Integer"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"Boolean",text:"Boolean"},{value:"Date",text:"Date"},{value:"Object",text:"Object"},{value:"Array",text:"Array"},{value:"Any",text:"Any"}],DEFAULT_FUNCTION_RETURN_TYPE:"java.lang.Object",config:{}},xs={style:{"white-space":"pre-wrap"}},Qa={props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},message:{type:String,required:!0},onClose:{type:Function,default:()=>{}}},setup(e){const t=P(!0);return(a,n)=>{const s=b("magic-button"),i=b("magic-button-group"),o=b("magic-dialog");return v(),H(o,{value:t.value,"onUpdate:value":n[1]||(n[1]=l=>t.value=l),title:e.title,ref:"dialog",onClose:n[2]||(n[2]=l=>e.onClose())},{default:w(()=>[R("pre",xs,$(e.message),1),_(i,{align:"center",style:{padding:"5px 0"}},{default:w(()=>[_(s,{value:e.ok,type:"active",onOnClick:n[0]||(n[0]=l=>a.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var Rs=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Qa});const As=["innerHTML"],Za={props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},cancel:{type:String,default:c("message.cancel")},message:{type:String,required:!0},success:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}}},setup(e){const t=P(!0);return(a,n)=>{const s=b("magic-button"),i=b("magic-button-group"),o=b("magic-dialog");return v(),H(o,{value:t.value,"onUpdate:value":n[2]||(n[2]=l=>t.value=l),title:e.title,ref:"dialog",onClose:n[3]||(n[3]=l=>e.onClose())},{default:w(()=>[R("pre",{innerHTML:e.message,style:{"white-space":"pre-wrap"}},null,8,As),_(i,{align:"right",style:{padding:"5px 0"}},{default:w(()=>[_(s,{value:e.ok,type:"active",onOnClick:n[0]||(n[0]=()=>{e.success(),a.$refs.dialog.close()})},null,8,["value"]),_(s,{value:e.cancel,onOnClick:n[1]||(n[1]=l=>a.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var Is=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Za});let en=null;const tn=(e,t)=>{const a=document.createElement("div");document.querySelector(".magic-editor .magic-mounts").appendChild(a);const n=la(e,qe(fe({},t),{onClose:()=>a.remove()}));en(n),n.mount(a)},me={alert:(e,t,a)=>tn(Qa,{message:e,title:t,ok:a}),confirm:(e,t,a)=>tn(Za,{title:e,message:t,success:a})},an=(e,t)=>{en=t,Object.keys(me).forEach(a=>e.config.globalProperties[`$${a}`]=me[a])};var Cs=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",install:an,default:me});const Lt={baseURL:"",method:"post",timeout:0,withCredentials:!0,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return e instanceof FormData?e:Wa.stringify(e,{arrayFormat:"repeat",allowDots:!0})}],paramsSerializer(e){return Wa.stringify(e,{arrayFormat:"repeat",allowDots:!0})}};class Ls{constructor(){mt(this,"successHandle",null);mt(this,"errorHandle",null);mt(this,"endHandle",null);mt(this,"exceptionHandle",(t,a)=>{me.alert(Ss(t,a),c("code.error",t))})}success(t){return this.successHandle=t,this}exception(t){return this.exceptionHandle=t,this}error(t){return this.errorHandle=t,this}end(t){this.endHandle=t}}class Ns{constructor(){mt(this,"_axios",null);this._axios=ss.create(Lt)}getAxios(){return this._axios}setBaseURL(t){Lt.baseURL=t}execute(t){let a=fe({baseURL:Lt.baseURL},t);return a.headers=a.headers||{},a.headers[M.HEADER_MAGIC_TOKEN]=M.HEADER_MAGIC_TOKEN_VALUE,this._axios.request(a)}processError(t){var a,n,s;t.response?me.alert(JSON.stringify(((a=t.response)==null?void 0:a.data)||"")||c("code.invalid",(n=t.response)==null?void 0:n.status),c("code.invalid",(s=t.response)==null?void 0:s.status)):me.alert(t.message,c("code.httpError")),console.error(t)}sendJson(t,a,n){return this.send(t,JSON.stringify(a),n||{method:"post",headers:{"Content-Type":"application/json"},transformRequest:[]})}sendGet(t,a,n){return n=n||{},n.method="get",this.send(t,a,n)}sendPost(t,a,n){return n=n||{},n.method="post",this.send(t,a,n)}send(t,a,n){let s=n||Lt||{};s.url=t,(s.method||"").toLowerCase()==="post"?s.data=a:s.params=a,s.baseURL=Lt.baseURL;let i=new Ls,o=!1,l=(r,u)=>{r instanceof Blob?(o=!0,i.successHandle&&i.successHandle(r,u)):r.code===1?(o=!0,i.successHandle&&i.successHandle(r.data,u)):(r.code===401&&console.log("\u672A\u767B\u5F55"),i.exceptionHandle&&i.exceptionHandle(r.code,r.message,u))};return this.execute(s).then(r=>{let u=r.data,p=r.headers["content-type"]&&r.headers["content-type"].startsWith("application/json");if(u instanceof Blob&&p){let g=new FileReader;g.readAsText(u),g.onload=function(){try{u=JSON.parse(this.result),l(u,r)}catch(f){console.error(f),l(u,r)}};return}l(u,r)}).catch(r=>{var u;typeof i.errorHandle=="function"?i.errorHandle((u=r.response)==null?void 0:u.data,r.response,r):this.processError(r)}).finally(()=>{typeof i.endHandle=="function"&&i.endHandle(o)}),i}}var j=new Ns;const ce={Alt:512,Ctrl:1024,Shift:2048};new Array(26).fill(0).forEach((e,t)=>ce[String.fromCharCode(65+t)]=65+t);new Array(12).fill(0).forEach((e,t)=>ce[`F${t+1}`]=112+t);const qt=[],nn=e=>{if(e.keyCode){let t=e.keyCode;t|=e.ctrlKey&&ce.Ctrl||0,t|=e.shiftKey&&ce.Shift||0,t|=e.altKey&&ce.Alt||0,t|=e.metaKey&&ce.Ctrl||0;for(let a=0,n=qt.length;adocument.addEventListener("keydown",nn);ce.bind=(e,t,a)=>{_a||(_a=!0,ce.init()),typeof a=="function"&&qt.push({target:e,code:t,callback:a})};ce.unbind=()=>{qt.length=0,document.removeEventListener("keydown",nn),_a=!1};var ws={editor:{base:"vs",rules:[{background:"#ffffff"},{token:"keywords",foreground:"000080",fontStyle:"bold"},{token:"number",foreground:"0000FF"},{token:"keyword",foreground:"000080",fontStyle:"bold"},{token:"string.sql",foreground:"008000"},{token:"tag.sql",foreground:"0033B3"},{token:"attribute.name.sql",foreground:"174AD4"},{token:"attribute.value.sql",foreground:"067D17"},{token:"predefined",foreground:"000000",fontStyle:"italic"},{token:"operator.sql",foreground:"000080",fontStyle:"bold"},{token:"key",foreground:"660E7A"},{token:"string.key.json",foreground:"660E7A"},{token:"string.value.json",foreground:"008000"},{token:"keyword.json",foreground:"0000FF"},{token:"string",foreground:"008000",fontStyle:"bold"},{token:"string.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape",foreground:"000080",fontStyle:"bold"},{token:"comment",foreground:"808080",fontStyle:"italic"},{token:"comment.doc",foreground:"808080",fontStyle:"italic"},{token:"comment.todo",foreground:"008DDE",fontStyle:"italic"},{token:"string.escape",foreground:"000080"}],colors:{"editor.foreground":"#000000","editor.background":"#ffffff","editorLineNumber.foreground":"#999999","editorGutter.background":"#f0f0f0","editor.lineHighlightBackground":"#FFFAE3","dropdown.background":"#F2F2F2","dropdown.foreground":"#000000","list.activeSelectionBackground":"#1A7DC4","list.activeSelectionForeground":"#ffffff"}}},ks={editor:{base:"vs-dark",rules:[{foreground:"A9B7C6"},{token:"keywords",foreground:"CC7832",fontStyle:"bold"},{token:"keyword",foreground:"CC7832",fontStyle:"bold"},{token:"number",foreground:"6897BB"},{token:"string",foreground:"6A8759",fontStyle:"bold"},{token:"string.sql",foreground:"6A8759"},{token:"tag.sql",foreground:"E8BF6A"},{token:"attribute.name.sql",foreground:"BABABA"},{token:"attribute.value.sql",foreground:"6A8759"},{token:"predefined.sql",foreground:"A9B7C6",fontStyle:"italic"},{token:"predefined.magicscript",foreground:"A9B7C6",fontStyle:"italic"},{token:"key",foreground:"9876AA"},{token:"string.key.json",foreground:"9876AA"},{token:"string.value.json",foreground:"6A8759"},{token:"keyword.json",foreground:"6897BB"},{token:"operator.sql",foreground:"CC7832",fontStyle:"bold"},{token:"string.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape",foreground:"000080",fontStyle:"bold"},{token:"comment",foreground:"808080",fontStyle:"italic"},{token:"comment.doc",foreground:"629755",fontStyle:"italic"},{token:"comment.todo",foreground:"A8C023",fontStyle:"italic"},{token:"string.escape",foreground:"CC7832"}],colors:{"editor.background":"#2B2B2B","editorLineNumber.foreground":"#999999","editorGutter.background":"#313335","editor.lineHighlightBackground":"#323232","dropdown.background":"#3C3F41","dropdown.foreground":"#BBBBBB","list.activeSelectionBackground":"#4B6EAF","list.activeSelectionForeground":"#FFFFFF","editorSuggestWidget.selectedBackground":"#113A5C"}},styles:{"main-background-color":"#3C3F41","main-border-color":"#323232","main-color":"#bbb","main-selected-background-color":"#323232","main-hover-background-color":"#353739","main-hover-icon-background-color":"#4C5052","main-selected-color":"#fff","main-icon-color":"#AFB1B3","header-title-color":"#bbb","header-version-color":"#999","header-default-color":"#AFB1B3","empty-background-color":"#282828","empty-key-color":"#489DF6","empty-color":"#A0A0A0","button-hover-background-color":"#365880","button-hover-border-color":"#43688C","button-background-color":"#4C5052","button-border-color":"#5E6060","button-disabled-color":"#5a5a5a","navbar-body-background-color":"#3C3F41","navbar-body-border-color":"#555555","resource-label-color":"#bbb","resource-span-color":"#787878","tree-hover-background-color":"#0d293e","tree-icon-color":"#aeb9c0","table-border-color":"#646464","input-border-color":"#646464","input-foucs-color":"#3D6185","input-background-color":"#45494A","select-background-color":"#3C3F41","select-hover-background-color":"#3C3F41","select-option-background-color":"#3C3F41","select-option-hover-background-color":"#4B6EAF","select-option-border-color":"#808080","data-type-default-color":"#a9b7c6","data-type-string-color":"#6a8759","data-type-integer-color":"#6897bb","data-type-byte-color":"#6897bb","data-type-long-color":"#6897bb","data-type-float-color":"#6897bb","data-type-double-color":"#6897bb","data-type-short-color":"#6897bb","data-type-number-color":"#6897bb","data-type-boolean-color":"#cc7832","data-type-class-color":"#9876aa","data-type-key-color":"#FF8E8E","run-log-background-color":"#2b2b2b","log-level-info":"#ABC023","log-level-error":"#CC666E","log-level-debug":"#299999","log-level-warn":"unset","log-level-trace":"#5394EC","log-color-cyan":"#009191","log-color-link":"#287BDE","todo-color":"#A8C023","debug-line-background-color":"#2D6099","breakpoints-background-color":"#C75450","breakpoint-line-background-color":"#3a2323","select-inputable-background-color":"#45494a","select-inputable-border":"transparent","tab-selected-background-color":"#4E5254","message-em-color":"#68dd9a","checkbox-background-color":"#43494A","checkbox-border-color":"#6B6B6B","checkbox-text-color":"#bbb","checkbox-selected-background-color":"#43494A","checkbox-selected-border-color":"#6B6B6B","toolbox-list-label-color":"#bbb","toolbox-list-span-color":"#787878","toolbox-border-color":"#323232","toolbox-list-hover-background":"#0D293E","toolbox-border-right-color":"#555555","footer-border-color":"#323232","tab-bar-border-color":"#323232","dialog-border-color":"#282828","dialog-shadow-color":"#151515","table-col-border-color":"#333638","table-row-border-color":"#333638","table-hover-background":"#4B6EAF","debug-line-background":"#2D6099","breakpoints-background":"#C75450","breakpoint-line-background":"#3a2323","table-even-background":"#414547","button-disabled-background":"#5A5A5A","toolbox-list-header-icon-color":"#AFB1B3","log-error-color":"#CC666E","text-string-color":"#6A8759","text-number-color":"#6897BB","text-boolean-color":"#CC7832","text-property-color":"#9876aa","text-key-color":"#9876aa","suggest-hover-background":"#113A5C","suggest-hover-color":"#fff","statusbar-em-color":"#68dd9a"}};const Kt={},ha=(e,t)=>{t=t||{};let a=t.editor||{};a.base=a.base||"vs",a.inherit=a.inherit===void 0?!0:a.inherit,a.rules=a.rules||[],a.colors=a.colors||[],je.defineTheme(e,a),Kt[e]=t.styles||{}};function Oe(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}Oe.prototype.clone_empty=function(){var e=new Oe(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e};Oe.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]};Oe.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1};Oe.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};Oe.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};Oe.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};Oe.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1};Oe.prototype.is_empty=function(){return this.__items.length===0};Oe.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};Oe.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf(` -`);t!==-1?this.__character_count=e.length-t:this.__character_count+=e.length};Oe.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e};Oe.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};Oe.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};Oe.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};Oe.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e};function Nt(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}Nt.prototype.get_indent_size=function(e,t){var a=this.__base_string_length;return t=t||0,e<0&&(a=0),a+=e*this.__indent_size,a+=t,a};Nt.prototype.get_indent_string=function(e,t){var a=this.__base_string;return t=t||0,e<0&&(e=0,a=""),t+=e*this.__indent_size,this.__ensure_cache(t),a+=this.__cache[t],a};Nt.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()};Nt.prototype.__add_column=function(){var e=this.__cache.length,t=0,a="";this.__indent_size&&e>=this.__indent_size&&(t=Math.floor(e/this.__indent_size),e-=t*this.__indent_size,a=new Array(t+1).join(this.__indent_string)),e&&(a+=new Array(e+1).join(" ")),this.__cache.push(a)};function xe(e,t){this.__indent_cache=new Nt(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new Oe(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}xe.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};xe.prototype.get_line_number=function(){return this.__lines.length};xe.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)};xe.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)};xe.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};xe.prototype.add_new_line=function(e){return this.is_empty()||!e&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};xe.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&(t[t.length-1]===` -`&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var a=this.__lines.join(` -`);return e===`\r -`?a=a.replace(/([^\r])\n/g,`$1${e}`):e!==` -`&&(a=a.replace(/[\n]/g,e)),a};xe.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};xe.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)};xe.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};xe.prototype.just_added_newline=function(){return this.current_line.is_empty()};xe.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};xe.prototype.ensure_empty_line_above=function(e,t){for(var a=this.__lines.length-2;a>=0;){var n=this.__lines[a];if(n.is_empty())break;if(n.item(0).indexOf(e)!==0&&n.item(-1)!==t){this.__lines.splice(a+1,0,new Oe(this)),this.previous_line=this.__lines[this.__lines.length-2];break}a--}};function fa(e,t,a,n){this.type=e,this.text=t,this.comments_before=null,this.newlines=a||0,this.whitespace_before=n||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}var Ds="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",sn="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",ma="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\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\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\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\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\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-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\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\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",on="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",Ms="(?:\\\\u[0-9a-fA-F]{4}|["+Ds+ma+"])",Ps="(?:\\\\u[0-9a-fA-F]{4}|["+sn+ma+on+"])*";const ln=new RegExp(Ms+Ps,"g"),Us=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+sn+ma+on+"])+"),wt=/[\n\r\u2028\u2029]/,kt=new RegExp(`\r -|`+wt.source),Dt=new RegExp(kt.source,"g");function et(e,t){this.raw_options=$s(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}et.prototype._get_array=function(e,t){var a=this.raw_options[e],n=t||[];return typeof a=="object"?a!==null&&typeof a.concat=="function"&&(n=a.concat()):typeof a=="string"&&(n=a.split(/[^a-zA-Z0-9_/-]+/)),n};et.prototype._get_boolean=function(e,t){var a=this.raw_options[e],n=a===void 0?!!t:!!a;return n};et.prototype._get_characters=function(e,t){var a=this.raw_options[e],n=t||"";return typeof a=="string"&&(n=a.replace(/\\r/,"\r").replace(/\\n/,` -`).replace(/\\t/," ")),n};et.prototype._get_number=function(e,t){var a=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var n=parseInt(a,10);return isNaN(n)&&(n=t),n};et.prototype._get_selection=function(e,t,a){var n=this._get_selection_list(e,t,a);if(n.length!==1)throw new Error("Invalid Option Value: The option '"+e+`' can only be one of the following values: -`+t+` -You passed in: '`+this.raw_options[e]+"'");return n[0]};et.prototype._get_selection_list=function(e,t,a){if(!t||t.length===0)throw new Error("Selection list cannot be empty.");if(a=a||[t[0]],!this._is_valid_selection(a,t))throw new Error("Invalid Default Value!");var n=this._get_array(e,a);if(!this._is_valid_selection(n,t))throw new Error("Invalid Option Value: The option '"+e+`' can contain only the following values: -`+t+` -You passed in: '`+this.raw_options[e]+"'");return n};et.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(a){return t.indexOf(a)===-1})};function $s(e,t){var a={};e=Bs(e);var n;for(n in e)n!==t&&(a[n]=e[n]);if(t&&e[t])for(n in e[t])a[n]=e[t][n];return a}function Bs(e){var t={},a;for(a in e){var n=a.replace(/-/g,"_");t[n]=e[a]}return t}var Fs=["before-newline","after-newline","preserve-newline"];function rn(e){et.call(this,e,"js");var t=this.raw_options.brace_style||null;t==="expand-strict"?this.raw_options.brace_style="expand":t==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var a=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var n=0;n0&&(this.__position-=1)};Re.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e};function tt(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}tt.prototype.restart=function(){this.__position=0};tt.prototype.isEmpty=function(){return this.__tokens_length===0};tt.prototype.hasNext=function(){return this.__position=0&&e/),erb:a.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:a.starting_with(/{%/).until_after(/%}/),django_value:a.starting_with(/{{/).until_after(/}}/),django_comment:a.starting_with(/{#/).until_after(/#}/),smarty:a.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:a.starting_with(/{\*/).until_after(/\*}/),smarty_literal:a.starting_with(/{literal}/).until_after(/{\/literal}/)}}Ye.prototype=new we;Ye.prototype._create=function(){return new Ye(this._input,this)};Ye.prototype._update=function(){this.__set_templated_pattern()};Ye.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t};Ye.prototype.read_options=function(e){var t=this._create();for(var a in va)t._disabled[a]=e.templating.indexOf(a)===-1;return t._update(),t};Ye.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t};Ye.prototype.read=function(){var e="";this._match_pattern?e=this._input.read(this._starting_pattern):e=this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e};Ye.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")};Ye.prototype._read_template=function(){var e="",t=this._input.peek();if(t==="<"){var a=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&a==="?"&&(e=e||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&a==="%"&&(e=e||this.__patterns.erb.read())}else t==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(e=e||this.__patterns.handlebars_comment.read(),e=e||this.__patterns.handlebars_unescaped.read(),e=e||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=e||this.__patterns.django_comment.read(),e=e||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=e||this.__patterns.smarty_comment.read(),e=e||this.__patterns.smarty_literal.read(),e=e||this.__patterns.smarty.read()));return e};function Ea(e,t){return t.indexOf(e)!==-1}const x={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:ht.START,RAW:ht.RAW,EOF:ht.EOF};var un=new ga(/\/\*/,/\*\//),Hs=/0[xX][0123456789abcdefABCDEF_]*[mMdDlLfFsSbB]?|0[oO][01234567_]*[mMdDlLfFsSbB]?|0[bB][01_]*[mMdDlLfFsSbB]?|\d[\d_]*[mMdDlLfFsSbB]|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,Vs=/[0-9]/,Gs=/[^\d.]/;const Mt=">>> === !== << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" ");var ft=">>>= ... >>= <<= === >>> !== **= => -> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ft=ft.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");ft="\\?\\.(?!\\d) "+ft;ft=ft.replace(/ /g,"|");var js=new RegExp(ft);const yt="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var zs=yt.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),Ys=new RegExp("^(?:"+zs.join("|")+")$"),Wt;const Ae=function(e,t){ze.call(this,e,t),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var a=new we(this._input),n=new Ye(this._input).read_options(this._options);this.__patterns={template:n,identifier:n.starting_with(ln).matching(Us),number:a.matching(Hs),punct:a.matching(js),comment:a.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:a.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:a.matching(//),include:a.starting_with(/#include/).until_after(kt),shebang:a.starting_with(/#!/).until_after(kt),xml:a.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),single_quote:n.until(/['\\\n\r\u2028\u2029]/),double_quote:n.until(/["\\\n\r\u2028\u2029]/),template_text:n.until(/[`\\$]/),template_expression:n.until(/[`}\\]/)}};Ae.prototype=new ze;Ae.prototype._is_comment=function(e){return e.type===x.COMMENT||e.type===x.BLOCK_COMMENT||e.type===x.UNKNOWN};Ae.prototype._is_opening=function(e){return e.type===x.START_BLOCK||e.type===x.START_EXPR};Ae.prototype._is_closing=function(e,t){return(e.type===x.END_BLOCK||e.type===x.END_EXPR)&&t&&(e.text==="]"&&t.text==="["||e.text===")"&&t.text==="("||e.text==="}"&&t.text==="{")};Ae.prototype._reset=function(){Wt=!1};Ae.prototype._get_next_token=function(e){var t=null;this._readWhitespace();var a=this._input.peek();return a===null?this._create_token(x.EOF,""):(t=t||this._read_non_javascript(a),t=t||this._read_multi_string(a),t=t||this._read_string(a),t=t||this._read_word(e),t=t||this._read_singles(a),t=t||this._read_comment(a),t=t||this._read_regexp(a,e),t=t||this._read_xml(a,e),t=t||this._read_punctuation(),t=t||this._create_token(x.UNKNOWN,this._input.next()),t)};Ae.prototype._read_word=function(e){var t;if(t=this.__patterns.identifier.read(),t!=="")return t=t.replace(Dt,` -`),!(e.type===x.DOT||e.type===x.RESERVED&&(e.text==="set"||e.text==="get"))&&Ys.test(t)?t==="in"||t==="of"?this._create_token(x.OPERATOR,t):this._create_token(x.RESERVED,t):this._create_token(x.WORD,t);if(t=this.__patterns.number.read(),t!=="")return this._create_token(x.WORD,t)};Ae.prototype._read_singles=function(e){var t=null;return e==="("||e==="["?t=this._create_token(x.START_EXPR,e):e===")"||e==="]"?t=this._create_token(x.END_EXPR,e):e==="{"?t=this._create_token(x.START_BLOCK,e):e==="}"?t=this._create_token(x.END_BLOCK,e):e===";"?t=this._create_token(x.SEMICOLON,e):e==="."&&Gs.test(this._input.peek(1))?t=this._create_token(x.DOT,e):e===","&&(t=this._create_token(x.COMMA,e)),t&&this._input.next(),t};Ae.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(e!=="")return e==="="?this._create_token(x.EQUALS,e):e==="?."?this._create_token(x.DOT,e):this._create_token(x.OPERATOR,e)};Ae.prototype._read_non_javascript=function(e){var t="";if(e==="#"){if(this._is_first_token()&&(t=this.__patterns.shebang.read(),t))return this._create_token(x.UNKNOWN,t.trim()+` -`);if(t=this.__patterns.include.read(),t)return this._create_token(x.UNKNOWN,t.trim()+` -`);e=this._input.next();var a="#";if(this._input.hasNext()&&this._input.testChar(Vs)){do e=this._input.next(),a+=e;while(this._input.hasNext()&&e!=="#"&&e!=="=");return e==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(a+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(a+="{}",this._input.next(),this._input.next())),this._create_token(x.WORD,a)}this._input.back()}else if(e==="<"&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read(),t){for(;this._input.hasNext()&&!this._input.testChar(wt);)t+=this._input.next();return Wt=!0,this._create_token(x.COMMENT,t)}}else if(Wt&&e==="-"&&(t=this.__patterns.html_comment_end.read(),t))return Wt=!1,this._create_token(x.COMMENT,t);return null};Ae.prototype._read_comment=function(e){var t=null;if(e==="/"){var a="";if(this._input.peek(1)==="*"){a=this.__patterns.block_comment.read();var n=un.get_directives(a);n&&n.ignore==="start"&&(a+=un.readIgnored(this._input)),a=a.replace(Dt,` -`),t=this._create_token(x.BLOCK_COMMENT,a),t.directives=n}else this._input.peek(1)==="/"&&(a=this.__patterns.comment.read(),t=this._create_token(x.COMMENT,a))}return t};Ae.prototype._read_multi_string=function(){if(this._input.match(/"""/g)){let e=this._input.readUntilAfter(/"""/g);return this._create_token(x.STRING,'"""'+e)}return null};Ae.prototype._read_string=function(e){if(e==="`"||e==="'"||e==='"'){var t=this._input.next();return this.has_char_escapes=!1,e==="`"?t+=this._read_string_recursive("`",!0,"${"):t+=this._read_string_recursive(e),this.has_char_escapes&&this._options.unescape_strings&&(t=qs(t)),this._input.peek()===e&&(t+=this._input.next()),t=t.replace(Dt,` -`),this._create_token(x.STRING,t)}return null};Ae.prototype._allow_regexp_or_xml=function(e){return e.type===x.RESERVED&&Ea(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===x.END_EXPR&&e.text===")"&&e.opened.previous.type===x.RESERVED&&Ea(e.opened.previous.text,["if","while","for"])||Ea(e.type,[x.COMMENT,x.START_EXPR,x.START_BLOCK,x.START,x.END_BLOCK,x.OPERATOR,x.EQUALS,x.EOF,x.SEMICOLON,x.COMMA])};Ae.prototype._read_regexp=function(e,t){if(e==="/"&&this._allow_regexp_or_xml(t)){for(var a=this._input.next(),n=!1,s=!1;this._input.hasNext()&&(n||s||this._input.peek()!==e)&&!this._input.testChar(wt);)a+=this._input.peek(),n?n=!1:(n=this._input.peek()==="\\",this._input.peek()==="["?s=!0:this._input.peek()==="]"&&(s=!1)),this._input.next();return this._input.peek()===e&&(a+=this._input.next(),a+=this._input.read(ln)),this._create_token(x.STRING,a)}return null};Ae.prototype._read_xml=function(e,t){if(this._options.e4x&&e==="<"&&this._allow_regexp_or_xml(t)){var a="",n=this.__patterns.xml.read_match();if(n){for(var s=n[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),i=s.indexOf("{")===0,o=0;n;){var l=!!n[1],r=n[2],u=!!n[n.length-1]||r.slice(0,8)==="![CDATA[";if(!u&&(r===s||i&&r.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(l?--o:++o),a+=n[0],o<=0)break;n=this.__patterns.xml.read_match()}return n||(a+=this._input.match(/[\s\S]*/g)[0]),a=a.replace(Dt,` -`),this._create_token(x.STRING,a)}}return null};function qs(e){for(var t="",a=0,n=new Re(e),s=null;n.hasNext();)if(s=n.match(/([\s]|[^\\]|\\\\)+/g),s&&(t+=s[0]),n.peek()==="\\"){if(n.next(),n.peek()==="x")s=n.match(/x([0-9A-Fa-f]{2})/g);else if(n.peek()==="u")s=n.match(/u([0-9A-Fa-f]{4})/g);else{t+="\\",n.hasNext()&&(t+=n.next());continue}if(!s||(a=parseInt(s[1],16),a>126&&a<=255&&s[0].indexOf("x")===0))return e;if(a>=0&&a<32){t+="\\"+s[0];continue}else a===34||a===39||a===92?t+="\\"+String.fromCharCode(a):t+=String.fromCharCode(a)}return t}Ae.prototype._read_string_recursive=function(e,t,a){var n,s;e==="'"?s=this.__patterns.single_quote:e==='"'?s=this.__patterns.double_quote:e==="`"?s=this.__patterns.template_text:e==="}"&&(s=this.__patterns.template_expression);for(var i=s.read(),o="";this._input.hasNext();){if(o=this._input.next(),o===e||!t&&wt.test(o)){this._input.back();break}else o==="\\"&&this._input.hasNext()?(n=this._input.peek(),n==="x"||n==="u"?this.has_char_escapes=!0:n==="\r"&&this._input.peek(1)===` -`&&this._input.next(),o+=this._input.next()):a&&(a==="${"&&o==="$"&&this._input.peek()==="{"&&(o+=this._input.next()),a===o&&(e==="`"?o+=this._read_string_recursive("}",t,"`"):o+=this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(o+=this._input.next())));o+=s.read(),i+=o}return i};function ne(e,t){return t.indexOf(e)!==-1}function Ks(e){return e.replace(/^\s+/g,"")}function Ws(e){for(var t={},a=0;aa&&(a=e.line_indent_level));var n={mode:t,parent:e,last_token:e?e.last_token:new fa(x.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:a,alignment:0,line_indent_level:e?e.line_indent_level:a,start_line_index:this._output.get_line_number(),ternary_depth:0};return n};ie.prototype._reset=function(e){var t=e.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new xe(this._options,t),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(K.BlockStatement);var a=new Ae(e,this._options);return this._tokens=a.tokenize(),e};ie.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e,t=this._reset(this._source_text),a=this._options.eol;this._options.eol==="auto"&&(a=` -`,t&&kt.test(t||"")&&(a=t.match(kt)[0]));for(var n=this._tokens.next();n;)this.handle_token(n),this._last_last_text=this._flags.last_token.text,this._flags.last_token=n,n=this._tokens.next();return e=this._output.get_code(a),e};ie.prototype.handle_token=function(e,t){e.type===x.START_EXPR?this.handle_start_expr(e):e.type===x.END_EXPR?this.handle_end_expr(e):e.type===x.START_BLOCK?this.handle_start_block(e):e.type===x.END_BLOCK?this.handle_end_block(e):e.type===x.WORD?this.handle_word(e):e.type===x.RESERVED?this.handle_word(e):e.type===x.SEMICOLON?this.handle_semicolon(e):e.type===x.STRING?this.handle_string(e):e.type===x.EQUALS?this.handle_equals(e):e.type===x.OPERATOR?this.handle_operator(e):e.type===x.COMMA?this.handle_comma(e):e.type===x.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===x.COMMENT?this.handle_comment(e,t):e.type===x.DOT?this.handle_dot(e):e.type===x.EOF?this.handle_eof(e):e.type===x.UNKNOWN?this.handle_unknown(e,t):this.handle_unknown(e,t)};ie.prototype.handle_whitespace_and_comments=function(e,t){var a=e.newlines,n=this._options.keep_array_indentation&<(this._flags.mode);if(e.comments_before)for(var s=e.comments_before.next();s;)this.handle_whitespace_and_comments(s,t),this.handle_token(s,t),s=e.comments_before.next();if(n)for(var i=0;i0,t);else if(this._options.max_preserve_newlines&&a>this._options.max_preserve_newlines&&(a=this._options.max_preserve_newlines),this._options.preserve_newlines&&a>1){this.print_newline(!1,t);for(var o=1;o0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};ie.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};ie.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===K.Statement&&dn(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};ie.prototype.start_of_object_property=function(){return this._flags.parent.mode===K.ObjectLiteral&&this._flags.mode===K.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"]))};ie.prototype.start_of_statement=function(e){var t=!1;return t=t||de(this._flags.last_token,["var","let","const"])&&e.type===x.WORD,t=t||Ve(this._flags.last_token,"do"),t=t||!(this._flags.parent.mode===K.ObjectLiteral&&this._flags.mode===K.Statement)&&de(this._flags.last_token,ba)&&!e.newlines,t=t||Ve(this._flags.last_token,"else")&&!(Ve(e,"if")&&!e.comments_before),t=t||this._flags.last_token.type===x.END_EXPR&&(this._previous_flags.mode===K.ForInitializer||this._previous_flags.mode===K.Conditional),t=t||this._flags.last_token.type===x.WORD&&this._flags.mode===K.BlockStatement&&!this._flags.in_case&&!(e.text==="--"||e.text==="++")&&this._last_last_text!=="function"&&e.type!==x.WORD&&e.type!==x.RESERVED,t=t||this._flags.mode===K.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"])),t?(this.set_mode(K.Statement),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,de(e,["do","for","if","while"])),!0):!1};ie.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=K.Expression;if(e.text==="["){if(this._flags.last_token.type===x.WORD||this._flags.last_token.text===")"){de(this._flags.last_token,yt)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}t=K.ArrayLiteral,lt(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),ne(this._flags.last_token.type,[x.START_EXPR,x.END_EXPR,x.WORD,x.OPERATOR,x.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===x.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,t=K.ForInitializer):ne(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=K.Conditional):ne(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&e.whitespace_before===""?this._output.space_before_token=!1:(ne(this._flags.last_token.text,yt)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===x.WORD){this._output.space_before_token=!1;var a=this._tokens.peek(-3);if(this._options.space_after_named_function&&a){var n=this._tokens.peek(-4);de(a,["async","function"])||a.text==="*"&&de(n,["async","function"])?this._output.space_before_token=!0:this._flags.mode===K.ObjectLiteral&&(a.text==="{"||a.text===","||a.text==="*"&&(n.text==="{"||n.text===","))&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===x.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(ne(this._last_last_text,["function","yield"])||this._flags.mode===K.ObjectLiteral&&ne(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===x.START_BLOCK?this.print_newline():(this._flags.last_token.type===x.END_EXPR||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===x.COMMA)&&this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};ie.prototype.handle_end_expr=function(e){for(;this._flags.mode===K.Statement;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,e.text==="]"&<(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===x.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(e),this.restore_mode(),dn(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===K.Conditional&&(this._previous_flags.mode=K.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};ie.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),a=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===x.END_EXPR?(this.set_mode(K.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(K.BlockStatement):a&&(ne(a.text,[":",","])&&ne(t.type,[x.STRING,x.WORD,x.RESERVED])||ne(t.text,["get","set","..."])&&ne(a.type,[x.WORD,x.RESERVED]))?ne(this._last_last_text,["class","interface"])?this.set_mode(K.BlockStatement):this.set_mode(K.ObjectLiteral):this._flags.last_token.type===x.OPERATOR&&(this._flags.last_token.text==="=>"||this._flags.last_token.text==="->")?this.set_mode(K.BlockStatement):ne(this._flags.last_token.type,[x.EQUALS,x.START_EXPR,x.COMMA,x.OPERATOR])||de(this._flags.last_token,["return","throw","import","default"])?this.set_mode(K.ObjectLiteral):this.set_mode(K.BlockStatement);var n=!t.comments_before&&t.text==="}",s=n&&this._flags.last_word==="function"&&this._flags.last_token.type===x.END_EXPR;if(this._options.brace_preserve_inline){var i=0,o=null;this._flags.inline_frame=!0;do if(i+=1,o=this._tokens.peek(i-1),o.newlines){this._flags.inline_frame=!1;break}while(o.type!==x.EOF&&!(o.type===x.END_BLOCK&&o.opened===e))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==x.OPERATOR&&(s||this._flags.last_token.type===x.EQUALS||de(this._flags.last_token,Xt)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(lt(this._previous_flags.mode)&&(this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.COMMA)&&((this._flags.last_token.type===x.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==x.OPERATOR&&this._flags.last_token.type!==x.START_EXPR&&(this._flags.last_token.type===x.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),!n&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};ie.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===K.Statement;)this.restore_mode();var t=this._flags.last_token.type===x.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:this._options.brace_style==="expand"?t||this.print_newline():t||(lt(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)};ie.prototype.handle_word=function(e){if(e.type===x.RESERVED){if(ne(e.text,["set","get"])&&this._flags.mode!==K.ObjectLiteral)e.type=x.WORD;else if(e.text==="import"&&this._tokens.peek().text==="(")e.type=x.WORD;else if(ne(e.text,["as","from"])&&!this._flags.import_block)e.type=x.WORD;else if(this._flags.mode===K.ObjectLiteral){var t=this._tokens.peek();t.text===":"&&(e.type=x.WORD)}}if(this.start_of_statement(e)?de(this._flags.last_token,["var","let","const"])&&e.type===x.WORD&&(this._flags.declaration_statement=!0):e.newlines&&!Ut(this._flags.mode)&&(this._flags.last_token.type!==x.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==x.EQUALS&&(this._options.preserve_newlines||!de(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(e),this.print_newline()):this.handle_whitespace_and_comments(e),this._flags.do_block&&!this._flags.do_while)if(Ve(e,"while")){this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&Ve(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===K.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&de(e,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(e),this._flags.in_case=!0;return}if((this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e)),Ve(e,"function")){(ne(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(ne(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===x.OPERATOR))&&!this._output.just_added_blankline()&&!e.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD?de(this._flags.last_token,["get","set","new","export"])||de(this._flags.last_token,ba)?this._output.space_before_token=!0:Ve(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===x.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Ut(this._flags.mode)||lt(this._flags.mode))||this.print_newline(),this.print_token(e),this._flags.last_word=e.text;return}var a="NONE";if(this._flags.last_token.type===x.END_BLOCK?this._previous_flags.inline_frame?a="SPACE":de(e,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&e.newlines?a="NEWLINE":(a="SPACE",this._output.space_before_token=!0):a="NEWLINE":this._flags.last_token.type===x.SEMICOLON&&this._flags.mode===K.BlockStatement?a="NEWLINE":this._flags.last_token.type===x.SEMICOLON&&Ut(this._flags.mode)||this._flags.last_token.type===x.STRING||this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD||this._flags.last_token.text==="*"&&(ne(this._last_last_text,["function","yield"])||this._flags.mode===K.ObjectLiteral&&ne(this._last_last_text,["{",","]))?a="SPACE":this._flags.last_token.type===x.START_BLOCK?this._flags.inline_frame?a="SPACE":a="NEWLINE":this._flags.last_token.type===x.END_EXPR&&(this._output.space_before_token=!0,a="NEWLINE"),de(e,yt)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?a="SPACE":a="NEWLINE"),de(e,["else","catch","finally"]))if((!(this._flags.last_token.type===x.END_BLOCK&&this._previous_flags.mode===K.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&e.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var n=this._output.current_line;n.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else a==="NEWLINE"?de(this._flags.last_token,Xt)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&de(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==x.END_EXPR?(this._flags.last_token.type!==x.START_EXPR||!de(e,["var","let","const"]))&&this._flags.last_token.text!==":"&&(Ve(e,"if")&&Ve(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):de(e,yt)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&<(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():a==="SPACE"&&(this._output.space_before_token=!0);e.previous&&(e.previous.type===x.WORD||e.previous.type===x.RESERVED)&&(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===x.RESERVED&&(e.text==="do"?this._flags.do_block=!0:e.text==="if"?this._flags.if_block=!0:e.text==="import"?this._flags.import_block=!0:this._flags.import_block&&Ve(e,"from")&&(this._flags.import_block=!1))};ie.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();this._flags.mode===K.Statement&&!(this._flags.if_block&&Ve(t,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)};ie.prototype.handle_string=function(e){e.text.startsWith("`")&&e.newlines===0&&e.whitespace_before===""&&(e.previous.text===")"||this._flags.last_token.type===x.WORD)||(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):e.text.startsWith("`")&&this._flags.last_token.type===x.END_EXPR&&(e.previous.text==="]"||e.previous.text===")")&&e.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(e)};ie.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0};ie.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(Ut(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===K.ObjectLiteral||this._flags.mode===K.Statement&&this._flags.parent.mode===K.ObjectLiteral?(this._flags.mode===K.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)};ie.prototype.handle_operator=function(e){var t=e.text==="*"&&(de(this._flags.last_token,["function","yield"])||ne(this._flags.last_token.type,[x.START_BLOCK,x.COMMA,x.END_BLOCK,x.SEMICOLON])),a=ne(e.text,["-","+"])&&(ne(this._flags.last_token.type,[x.START_BLOCK,x.START_EXPR,x.EQUALS,x.OPERATOR])||ne(this._flags.last_token.text,yt)||this._flags.last_token.text===",");if(!this.start_of_statement(e)){var n=!t;this.handle_whitespace_and_comments(e,n)}if(de(this._flags.last_token,Xt)){this._output.space_before_token=!0,this.print_token(e);return}if(e.text==="*"&&this._flags.last_token.type===x.DOT){this.print_token(e);return}if(e.text==="::"){this.print_token(e);return}if(this._flags.last_token.type===x.OPERATOR&&ne(this._options.operator_position,pn)&&this.allow_wrap_or_preserved_newline(e),e.text===":"&&this._flags.in_case){this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==x.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var s=!0,i=!0,o=!1;if(e.text===":"?this._flags.ternary_depth===0?s=!1:(this._flags.ternary_depth-=1,o=!0):e.text==="?"&&(this._flags.ternary_depth+=1),!a&&!t&&this._options.preserve_newlines&&ne(e.text,Mt)){var l=e.text===":",r=l&&o,u=l&&!o;switch(this._options.operator_position){case Pt.before_newline:this._output.space_before_token=!u,this.print_token(e),(!l||r)&&this.allow_wrap_or_preserved_newline(e),this._output.space_before_token=!0;return;case Pt.after_newline:this._output.space_before_token=!0,!l||r?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),this._output.space_before_token=!0;return;case Pt.preserve_newline:u||this.allow_wrap_or_preserved_newline(e),s=!(this._output.just_added_newline()||u),this._output.space_before_token=s,this.print_token(e),this._output.space_before_token=!0;return}}if(t){this.allow_wrap_or_preserved_newline(e),s=!1;var p=this._tokens.peek();i=p&&ne(p.type,[x.WORD,x.RESERVED])}else e.text==="..."?(this.allow_wrap_or_preserved_newline(e),s=this._flags.last_token.type===x.START_BLOCK,i=!1):(ne(e.text,["--","++","!","~"])||a)&&((this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR)&&this.allow_wrap_or_preserved_newline(e),s=!1,i=!1,e.newlines&&(e.text==="--"||e.text==="++"||e.text==="~")&&this.print_newline(!1,!0),this._flags.last_token.text===";"&&Ut(this._flags.mode)&&(s=!0),this._flags.last_token.type===x.RESERVED?s=!0:this._flags.last_token.type===x.END_EXPR?s=!(this._flags.last_token.text==="]"&&(e.text==="--"||e.text==="++")):this._flags.last_token.type===x.OPERATOR&&(s=ne(e.text,["--","-","++","+"])&&ne(this._flags.last_token.text,["--","-","++","+"]),ne(e.text,["+","-"])&&ne(this._flags.last_token.text,["--","++"])&&(i=!0)),(this._flags.mode===K.BlockStatement&&!this._flags.inline_frame||this._flags.mode===K.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline());this._output.space_before_token=this._output.space_before_token||s,this.print_token(e),this._output.space_before_token=i};ie.prototype.handle_block_comment=function(e,t){if(this._output.raw){this._output.add_raw_token(e),e.directives&&e.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(e.directives){this.print_newline(!1,t),this.print_token(e),e.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!wt.test(e.text)&&!e.newlines){this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0;return}else this.print_block_commment(e,t)};ie.prototype.print_block_commment=function(e,t){var a=Js(e.text),n,s=!1,i=!1,o=e.whitespace_before,l=o.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(a[0]),this.print_newline(!1,t),a.length>1){for(a=a.slice(1),s=Qs(a,"*"),i=Zs(a,o),s&&(this._flags.alignment=1),n=0;n0&&a){let s=function(l,r){return l[a].localeCompare(r[a],"zh-CN")},i=[],o=[];e.forEach(l=>{l.folder===!0?(n&&(l[n]=$t(l[n],t,a,n)),i.push(l)):o.push(l)}),i.sort(s),o.sort(s),t===!1&&(i.reverse(),o.reverse()),e.splice(0,e.length,...i.concat(o))}return e}function ei(e){return Array(e).fill(0).map(()=>(Math.random()*16|0).toString(16)).join("")}function Tt(e,t){return t=t||2,(Array(t).join(0)+e).slice(-t)}function Xe(e){if(typeof e=="number"&&(e.toString().length===13?e=new Date(e):e=new Date(e*1e3)),e instanceof Date){var t=e.getMonth()+1,a=e.getDate(),n=e.getHours(),s=e.getMinutes(),i=e.getSeconds();return e.getFullYear()+"-"+Tt(t)+"-"+Tt(a)+" "+Tt(n)+":"+Tt(s)+":"+Tt(i)}return""}function rt(e){return e.replace(/:?\/+/g,t=>t.indexOf(":")>-1?t:"/")}function ti(e){const t=s=>{if(Array.isArray(s)){let i=s.length,o=100;if(i>o){let l=[];for(let r=0;rn(""+(r+p),void 0,JSON.stringify(u),u))});return l}return s.map((l,r)=>n(""+r,void 0,JSON.stringify(l),l))}else return Object.keys(s).map(i=>{const o=s[i];return n(i,void 0,JSON.stringify(o),o)})},a=s=>{try{return JSON.parse(s)}catch{return s}},n=(s,i,o,l)=>{var y;let r=(i||"").startsWith("java.lang"),u,p,g;r?(u=((y=i==null?void 0:i.substring(10))==null?void 0:y.toLowerCase())||typeof l,["integer","double","float","byte","short","long"].indexOf(u)>-1&&(u="number"),u==="class"&&(o=o.substring(1,o.length-1))):(l=l||o&&a(o),!Array.isArray(l)&&typeof l!="object"?(r=!0,u=typeof l):(Array.isArray(l)?(g=`size = ${l.length}`,u="array"):(g=`members = ${l&&Object.keys(l).length}`,u="object"),i=i||(Array.isArray(l)?"Array":typeof l),p=l&&t(l)||[]));let f=l==null&&!r;return f&&(i="null",r=!0,o="null"),{name:s,value:o,data:l,dataType:u,type:i,size:g,isNull:f,folder:!r,opened:!1,children:p}};return e&&e.map(s=>n(s.name,s.type,s.value))||[]}function ai(e){const t=["B","KB","MB"];let a=0;for(;a=1024;)e=e/1024,a++;return e=e.toFixed(2),`${e} ${t[a]}`}function at(e,t){const a=n=>n.filter(s=>s.folder).forEach(s=>{a(s.children||[]),t(s)});a(e||[])}function ya(e,t){let a=document.createElement("a"),n=window.URL.createObjectURL(e);a.href=n,a.download=t,document.body.appendChild(a),a.click(),document.body.removeChild(a),window.URL.revokeObjectURL(n)}function _n(e){try{var t=document.createElement("textarea");return t.style="position:absolute;left:-99999999px",document.body.appendChild(t),t.innerHTML=e,t.readOnly=!1,t.select(),document.execCommand("copy"),!0}catch{return!1}}function ni(e){let t=0;for(let a=0,n=0,s=e.length;a{const o={level:i,node:s,name:i===0?c("message.root"):s.name,folder:(s==null?void 0:s.dataType)==="Object"||(s==null?void 0:s.dataType)==="Array",display:!0};o.folder&&(o.expand=!0),t.push(o)},n=(s,i)=>{(s||[]).forEach(o=>{a(o,i),n(o.children,i+1)})};return a(e||{},0),n((e==null?void 0:e.children)||[],1),t}function si(e){return new Promise((t,a)=>{const n=document.getElementsByTagName("head")[0],s=document.createElement("script");s.setAttribute("type","text/javascript"),s.src=e,n.appendChild(s),s.readyState?s.onreadystatechange=()=>{(s.readyState==="loaded"||s.readyState==="complete")&&(s.onreadystatechange=null,t())}:(s.onload=function(){t()},s.onerror=function(){a()})})}function hn(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function ii(e,t){if(e){if(typeof e=="string")return new ie(e).beautify();if(e)return JSON.stringify(e,null,4)}return t||""}class oi{constructor(){this.listeners={},this.statusLog=P([])}$on(t,a){this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(a)}$event(t,a){this.$on(`ws_${t}`,a)}$emit(t){const a=this.listeners[t];if(a){const i=[];for(var n=1,s=arguments.length;no.apply(this,i))}}loading(t){const a=hn(1,9),n=new Image;return n.src=`https://console.ssssssss.org.cn/images/loading.gif?t=${Math.floor(new Date().getTime()/1e3)*1e3+a*100+(t+a)+hn(0,5)*17}`,n}send(t,a){this.$emit("message",t,a)}status(t,a,...n){const s=new Date;t=c(t,...n)||t,a===!1&&(t=`${t}`),this.statusLog.value.push({content:t,timestamp:Xe(s)+"."+Tt(s.getMilliseconds(),3)}),this.$emit("status",t)}clearStatusLog(){this.statusLog.value=[]}getStatusLog(){return this.statusLog}}var T=new oi;const Ta={escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,builtinFunctions:[],digits:/[0-9_]+/,binarydigits:/[0-1_]+/,hexdigits:/[[0-9a-fA-F_]+/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/\s+/,"white"],[/```$/,{token:"string",next:"@codeblock"}],[/[a-zA-Z_$][\w$]*[\s]?/,{cases:{"@builtinFunctions":"predefined","~(new|var|if|else|for|in|return|import|break|continue|as|null|true|false|try|catch|finally|async|while|exit|asc|desc|ASC|DESC|assert|let|const|throw|instanceof)[\\s]?":{token:"keywords"},"~(select|from|left|join|on|and|or|order|by|where|group|having|limit|offset|SELECT|FROM|LEFT|JOIN|ON|AND|OR|ORDER|BY|WHERE|GROUP|HAVING|LIMIT|OFFSET)[\\s]{1}":{token:"keywords"},"@default":"identifier"}}],[/::[a-zA-Z]+/,"keywords"],[/[{}()[\]]/,"@brackets"],[/(@digits)\.(@digits)/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)[lLbBsSdDfFmM]?/,"number"],[/\/\*\**/,"comment","@comment"],[/\/\//,"comment","@commentTodo"],[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@string_multi_embedded",nextEmbedded:"mybatis"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],comment:[[/\*\//,"comment","@popall"],[/\S((TODO)|(todo)|(fixme)|(FIXME))\s+/,"comment"],[/((TODO)|(todo)|(fixme)|(FIXME))\s+[^(*/)]+/,"comment.todo"],[/\S/,"comment"]],commentTodo:[[/^/,"","@popall"],[/\S((TODO)|(todo)|(fixme)|(FIXME))\s+/,"comment"],[/((TODO)|(todo)|(fixme)|(FIXME))[ \t]+[^\n]+/,"comment.todo","@popall"],[/\S/,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],codeblock:[[/^```$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_multi_embedded:[[/[^"]+/,""],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"root"}]}};let nt={},Sa={},Bt=[],Oa=[],Qt,xa;const li=e=>e==="int"||e==="java.lang.Integer"?"java.lang.Integer":e==="string"||e==="java.lang.String"?"java.lang.String":e==="double"||e==="java.lang.Double"?"java.lang.Double":e==="float"||e==="java.lang.Float"?"java.lang.Float":e==="byte"||e==="java.lang.Byte"?"java.lang.Byte":e==="short"||e==="java.lang.Short"?"java.lang.Short":e==="long"||e==="java.lang.Long"?"java.lang.Long":e.indexOf("[]")>-1?"[Ljava.lang.Object;":e||"java.lang.Object",Ra=e=>{let t=e.lastIndexOf(".");return t>-1?e.substring(t+1):e},ri=(e,t,a)=>e.length>0&&e[e.length-1].varArgs?a?e.length-1<=t.length:e.length<=t.length:a?e.length-1===t.length:e.length===t.length,ci=function(){return new Promise((e,t)=>{j.sendPost("/classes").success(a=>{nt=a.classes||{},Sa=a.extensions||{},Oa=a.functions||[],Ta.builtinFunctions=Oa.map(n=>n.name),X.setMonarchTokensProvider("magicscript",Ta),e()}).exception(a=>{t()}).error(a=>{t()})})},ui=()=>new Promise((e,t)=>{j.execute({url:"classes.txt",responseType:"text",method:"get"}).then(a=>{const n=[];a.data.split(` -`).forEach(s=>{const i=s.split(":");i.length===1?n.push(i[0].trim()):n.push(...i[1].split(",").map(o=>i[0]+"."+o.trim()))}),Bt=n,e()}).catch(a=>{t()})}),fn=(e,t)=>Array(t>(e+"").length?t-(""+e).length-1:0).join(0)+e,mn=e=>{let t=[];return e&&(t=e.enums||[],e.superClass&&(t=t.concat(mn(e.superClass)))),t},gn=(e,t,a)=>{if(e.insertText=e.name,e.parameters.length>t){let n=[],s=[];for(let i=t;i{Ft[e]=t},Aa=e=>{let t=[];if(e){if(t=e.attributes||[],e.superClass&&(t=t.concat(Aa(e.superClass))),e.interfaces&&e.interfaces.length>0)for(let a=0,n=e.interfaces.length;a{t=t||0;let a=[],n=(s,i,o)=>{if(s&&s.methods)for(let l=0,r=s.methods.length;l0)for(let s=0,i=e.interfaces.length;sSa[e],_i=e=>{if(!e)throw new Error("className is required");let t=nt[e];if(!t){let a=Bt.findIndex(n=>n===e);t=Bt[a]}return t};async function hi(e){let t=nt[e];if(t)t=nt[t.className]||t;else try{(await j.execute({url:"/class",data:{className:e}})).data.data.forEach(s=>{nt[s.className]=s}),t=nt[e]}catch{}return t}const fi=()=>Oa.map(e=>gn(e,0,1)),vn=()=>{if(!Qt&&M.config){let e=M.config;e.autoImportModuleList&&(Qt={},e.autoImportModuleList.forEach(a=>{Qt[a]=a}));let t=["java.util.","java.lang."].concat((e.autoImportPackage||"").replace(/\\s/g,"").replace(/\*/g,"").split(","));xa={},Bt.forEach(a=>{t.forEach(n=>{a.indexOf(n)===0&&a.indexOf(".",n.length)===-1&&(xa[a.substring(a.lastIndexOf(".")+1)]=a)})})}},mi=()=>(vn(),Qt||{}),gi=()=>(vn(),xa||{}),vi=()=>Bt;let Ca;const Ei=e=>{Ca=e},bi=e=>Ca&&Ca(e),yi=()=>Object.keys(nt).filter(e=>nt[e].module);let En;const Ti=e=>{En=e};let bn;const Si=e=>{bn=e},Oi=()=>En,xi=()=>bn,ae={findEnums:mn,findAttributes:Aa,findMethods:Ia,findFunction:fi,loadClass:hi,findClass:_i,initClasses:ci,initImportClass:ui,getWrapperClass:li,matchTypes:ri,getAutoImportModule:mi,getAutoImportClass:gi,getExtension:di,getImportClass:vi,getOnlineFunction:bi,setupOnlineFunction:Ei,setExtensionAttribute:pi,getSimpleClass:Ra,getDefineModules:yi,setApiFinder:Ti,setFunctionFinder:Si,getApiFinder:Oi,getFunctionFinder:xi};class ge extends Error{constructor(t,a){super(t);this.name="ParseException",this.span=a}}class Ri{constructor(t,a,n,s,i,o,l){this.source=t,this.start=a,this.end=n,this.lineNumber=s,this.endLineNumber=i,this.startCol=o,this.endCol=l}}class J{constructor(t,a,n){t instanceof J&&a instanceof J?(this.source=t.source,this.start=t.start,this.end=a.end,this.cachedText=this.source.substring(this.start,this.end)):(this.source=t,this.start=a||0,this.end=n||t.length,this.cachedText=t.substring(this.start,this.end))}getText(){return this.cachedText}getSource(){return this.source}getStart(){return this.start}getEnd(){return this.end}toString(){return"Span [text="+this.getText()+", start="+this.start+", end="+this.end+"]"}inPosition(t){return this.start<=t&&this.end>=t}getLine(){if(this.line!=null)return this.line;let t=this.start;for(;tthis.source.length-1||this.source.charAt(a)===` -`);)a++;let n=0,s=t;for(;s>0&&s",error:">"},LessEqual:{literal:"<=",error:"<="},GreaterEqual:{literal:">=",error:">="},Equal:{literal:"==",error:"=="},NotEqual:{literal:"!=",error:"!="},Assignment:{literal:"=",error:"="},PlusPlus:{literal:"++",error:"++"},MinusMinus:{literal:"--",error:"--"},PlusEqual:{literal:"+=",error:"+="},MinusEqual:{literal:"-=",error:"-="},AsteriskEqual:{literal:"*=",error:"*="},ForwardSlashEqual:{literal:"/=",error:"/="},PercentEqual:{literal:"%=",error:"%="},ColonColon:{literal:"::",error:"::"},EqualEqualEqual:{literal:"===",error:"==="},NotEqualEqual:{literal:"!==",error:"!=="},And:{literal:"&&",error:"&&"},Or:{literal:"||",error:"||"},Xor:{literal:"^",error:"^"},Not:{literal:"!",error:"!"},BitAnd:{literal:"&",error:"&"},BitOr:{literal:"|",error:"|"},BitNot:{literal:"~",error:"~"},LShift:{literal:"<<",error:"<<"},RShift:{literal:">>",error:">>"},RShift2:{literal:">>>",error:">>>"},XorEqual:{literal:"^=",error:"^=",modifiable:!0},BitAndEqual:{literal:"&=",error:"&=",modifiable:!0},BitOrEqual:{literal:"|=",error:"|=",modifiable:!0},LShiftEqual:{literal:"<<=",error:"<<=",modifiable:!0},RShiftEqual:{literal:">>=",error:">>=",modifiable:!0},RShift2Equal:{literal:">>>=",error:">>>=",modifiable:!0},SqlAnd:{literal:"and",error:"and"},SqlOr:{literal:"or",error:"or"},SqlNotEqual:{literal:"<>",error:"<>",inLinq:!0},InstanceOf:{literal:"instanceof",error:"instanceof"},Questionmark:{literal:"?",error:"?"},DoubleQuote:{literal:'"',error:'"'},TripleQuote:{literal:'"""',error:'"""'},SingleQuote:{literal:"'",error:"'"},Lambda:{error:"=> \u6216 ->"},BooleanLiteral:{error:"true \u6216 false"},DoubleLiteral:{error:"\u4E00\u4E2A double \u7C7B\u578B\u6570\u503C"},DecimalLiteral:{error:"\u4E00\u4E2A BigDecimal \u7C7B\u578B\u6570\u503C"},FloatLiteral:{error:"\u4E00\u4E2A float \u7C7B\u578B\u6570\u503C"},LongLiteral:{error:"\u4E00\u4E2A long \u7C7B\u578B\u6570\u503C"},IntegerLiteral:{error:"\u4E00\u4E2A int \u7C7B\u578B\u6570\u503C"},ShortLiteral:{error:"\u4E00\u4E2A short \u7C7B\u578B\u6570\u503C"},ByteLiteral:{error:"\u4E00\u4E2A byte \u7C7B\u578B\u6570\u636E"},CharacterLiteral:{error:"\u4E00\u4E2A char \u7C7B\u578B\u6570\u636E"},RegexpLiteral:{error:"\u4E00\u4E2A \u6B63\u5219\u8868\u8FBE\u5F0F"},StringLiteral:{error:"\u4E00\u4E2A \u5B57\u7B26\u4E32"},NullLiteral:{error:"null"},Language:{error:"language"},Identifier:{error:"\u6807\u8BC6\u7B26"},Unknown:{error:"unknown"}};let Ai=Object.getOwnPropertyNames(d).map(e=>d[e]);d.getSortedValues=function(){return this.values?this.values:(this.values=Ai.sort(function(e,t){return!e.literal&&!t.literal?0:!e.literal&&!!t.literal?1:!!e.literal&&!t.literal?-1:t.literal.length-e.literal.length}),this.values)};class Ge{constructor(t,a,n){this.type=t,this.span=a,n instanceof St?this.tokenStream=n:n&&(this.value=n)}getTokenType(){return this.type}getTokenStream(){return this.tokenStream}getSpan(){return this.span}getText(){return this.span.getText()}}class De extends Ge{constructor(t,a,n){super(t,a,n)}getJavaType(){return this.type===d.StringLiteral?"java.lang.String":this.type===d.DoubleLiteral?"java.lang.Double":this.type===d.ByteLiteral?"java.lang.Byte":this.type===d.FloatLiteral?"java.lang.Float":this.type===d.DecimalLiteral?"java.math.BigDecimal":this.type===d.IntegerLiteral?"java.lang.Integer":this.type===d.LongLiteral?"java.lang.Long":this.type===d.BooleanLiteral?"java.lang.Boolean":this.type===d.RegexpLiteral?"java.util.regex.Pattern":"java.lang.Object"}}class Ii{constructor(t,a,n){this.index=a===void 0?0:a,this.end=n===void 0?t.length:n,this.source=t,this.spanStart=0}hasMore(){return this.indexthis.end)return!1;for(let s=0,i=this.index;s=this.end||t.charAt(s)!==this.source.charAt(i))return!1;return a&&(this.index+=n),!0}matchAny(t,a){for(let n=0,s=t.length;n=this.end)return!1;let a=this.source.charAt(this.index);return a.match(/[a-zA-Z0-9_\u4e00-\u9fa5]/)||a==="$"||a==="_"||a==="@"?(t&&this.index++,!0):!1}matchIdentifierPart(t){if(this.index>=this.end)return!1;let a=this.source.charAt(this.index);return a.match(/[a-zA-Z0-9_\u4e00-\u9fa5]/)||a==="@"?(t&&this.index++,!0):!1}skipWhiteSpace(){for(;this.index0&&this.tokens[this.end-1]}hasMore(){return this.index=this.end)return!1;let s=!1;if(Array.isArray(t)){for(let i=0,o=t.length;ia.push(this.textToString(n))),a.join(",")}else return t.error}expect(t,a){if(this.match(t,!0,a))return this.tokens[this.index-1];if(this.hasMore()){let n=this.tokens[this.index];throw t instanceof Ge&&(t=t.type.error),new ge("Expected '"+this.textToString(t)+"', but got '"+n.getText()+"'",n.getSpan())}else{let n=this.tokens[this.index-1].getSpan();return new Ge(d.Unknown,n)}}hasPrev(){return this.index>0}getSource(){return this.tokens.length===0?null:this.tokens[0].getSpan().getSource()}}const Ci=(e,t)=>{if(t.length>0){let a=t[t.length-1];if(a instanceof De)return!1;switch(a.getTokenType()){case d.Comma:case d.Semicolon:case d.Colon:case d.RightCurly:case d.LeftBracket:case d.LeftParantheses:case d.Assignment:case d.NotEqual:case d.EqualEqualEqual:case d.NotEqualEqual:case d.Equal:case d.And:case d.Or:case d.SqlAnd:case d.SqlOr:case d.SqlNotEqual:case d.Questionmark:case d.InstanceOf:case d.Lambda:case d.Not:break;default:return!1}}if(e.match("/",!1)){let a=e.getPosition();e.consume(),e.startSpan();let n=!1,s=0,i=0,o=0;for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match("[",!1))s++,i=e.getPosition();else if(s>0&&e.match("]",!1))s--;else if(e.match(d.ForwardSlash.literal,!0))if(s===0){e.match("g",!0),e.match("i",!0),e.match("m",!0),e.match("s",!0),e.match("u",!0),e.match("y",!0),n=!0;break}else o=e.getPosition();let r=e.consume();if(r==="\r"||r===` -`)return e.reset(a),!1}if(s!==0)throw new ge("Missing ']'",e.getSpan(i,o-1));if(!n)return e.reset(a),!1;let l=e.endSpan();return l=e.getSpan(l.getStart()-1,l.getEnd()),t.push(new De(d.RegexpLiteral,l)),!0}return!1},La=(e,t,a)=>{if(e.match(t,!0)){e.startSpan();let n=!1;for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match(t.literal,!0)){n=!0;break}let i=e.consume();if(t!==d.TripleQuote&&(i==="\r"||i===` -`))throw new ge(t.error+t.error+"\u5B9A\u4E49\u7684\u5B57\u7B26\u4E32\u4E0D\u80FD\u6362\u884C",e.endSpan())}if(!n)throw new ge("\u5B57\u7B26\u4E32\u6CA1\u6709\u7ED3\u675F\u7B26"+t.error,e.endSpan());let s=e.endSpan();return s=e.getSpan(s.getStart(),s.getEnd()-t.literal.length),a.push(new De(d.StringLiteral,s)),!0}return!1},yn=(e,t)=>{let a=Number.parseInt(e.getText().substring(2).replace(/\_/g,""),t);return a>2147483647||a<-2147483648?new De(d.LongLiteral,e,a):a>127||a<-128?new De(d.LongLiteral,e,a):new De(d.ByteLiteral,e,a)},Li=(e,t)=>{if(e.match("0",!1)){let a=e.getPosition();if(e.startSpan(),e.consume(),e.matchAny(["x","X"],!0)){for(;e.matchDigit(!0)||e.matchAny(["A","B","C","D","E","F","a","b","c","d","e","f","_"],!0););if(e.matchAny(["L","l"],!0)){let n=e.endSpan(),s=n.getText();return t.push(new De(d.LongLiteral,n,parseInt(s.substring(2,s.length-1).replace(/\_/g,""),16))),!0}return t.push(yn(e.endSpan(),16)),!0}else if(e.matchAny(["b","B"],!0)){for(;e.matchAny(["0","1","_"],!0););if(e.matchAny(["L","l"],!0)){let n=e.endSpan(),s=n.getText();return t.push(new De(d.LongLiteral,n,parseInt(s.substring(2,s.length-1).replace(/\_/g,""),2))),!0}return t.push(yn(e.endSpan(),2)),!0}e.reset(a)}if(e.matchDigit(!1)){let a=d.IntegerLiteral;for(e.startSpan();e.matchDigit(!0)||e.match("_",!0););if(e.match(d.Period.literal,!0))if(e.hasMore())for(a=d.DoubleLiteral;e.matchDigit(!0)||e.match("_",!0););else e.reset(e.getPosition()-1);if(e.matchAny(["b","B"],!0)){if(a===d.DoubleLiteral)throw new ge("Byte literal can not have a decimal point.",e.endSpan());a=d.ByteLiteral}else if(e.matchAny(["s","S"],!0)){if(a===d.DoubleLiteral)throw new ge("Short literal can not have a decimal point.",e.endSpan());a=d.ShortLiteral}else if(e.matchAny(["l","L"],!0)){if(a===d.DoubleLiteral)throw new ge("Long literal can not have a decimal point.",e.endSpan());a=d.LongLiteral}else e.matchAny(["f","F"],!0)?a=d.FloatLiteral:e.matchAny(["d","D"],!0)?a=d.DoubleLiteral:e.matchAny(["m","M"],!0)&&(a=d.DecimalLiteral);return t.push(new De(a,e.endSpan())),!0}return!1},Ni=(e,t)=>{if(e.match("```",!0))if(e.startSpan(),e.matchIdentifierStart(!0)){for(;e.matchIdentifierPart(!0););let a=e.endSpan();if(t.push(new Ge(d.Language,a)),e.startSpan(),!e.skipUntil("```"))throw new ge("```\u9700\u8981\u4EE5```\u7ED3\u5C3E",e.endSpan());return t.push(new Ge(d.Language,e.endSpan(-3))),!0}else throw new ge("```\u540E\u9700\u8981\u6807\u8BC6\u8BED\u8A00\u7C7B\u578B",e.endSpan());return!1},wi=(e,t)=>{if(e.matchIdentifierStart(!0)){for(e.startSpan();e.matchIdentifierPart(!0););let a=e.endSpan();return a=e.getSpan(a.getStart()-1,a.getEnd()),a.getText()==="true"||a.getText()==="false"?t.push(new De(d.BooleanLiteral,a)):a.getText()==="null"?t.push(new De(d.NullLiteral,a)):d.SqlAnd.literal.toUpperCase()===a.getText().toUpperCase()?t.push(new Ge(d.SqlAnd,a)):d.SqlOr.literal.toUpperCase()===a.getText().toUpperCase()?t.push(new Ge(d.SqlOr,a)):t.push(new Ge(d.Identifier,a)),!0}return!1},ki=(e,t)=>{if(e.match("`",!0)){let a=e.getPosition(),n=a,s=[];for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match("`",!0))break;if(e.match("${",!0)){let l=e.getPosition();n0&&s.push(new De(d.StringLiteral,e.endSpan(n,o))),i=e.getSpan(i.getStart()-1,i.getEnd()),t.push(new De(d.StringLiteral,i,new St(s))),!0}return!1},Tn=(e,t,a)=>{let n=0,s=0;for(;e.hasMore();){if(e.skipWhiteSpace(),a&&e.match(a,!0))return t;if(e.match("//",!0)){e.skipLine();continue}if(e.match("/*",!0)){e.skipUntil("*/");continue}if(Li(e,t)||La(e,d.SingleQuote,t)||La(e,d.TripleQuote,t)||La(e,d.DoubleQuote,t)||Ci(e,t)||Ni(e,t)||ki(e,t)||wi(e,t))continue;if(e.matchAny(["=>","->"],!0)){t.push(new Ge(d.Lambda,e.getSpan(e.getPosition()-2,e.getPosition())));continue}let i=!1,o=d.getSortedValues();for(let l=0,r=o.length;lTn(new Ii(e,0,e.length),[]);class _e{constructor(t){this.span=t}getSpan(){return this.span}async getJavaType(t){return await this.getExpressionsJavaType(t),"java.lang.Object"}async getExpressionsJavaType(t){for(const a of this.expressions().filter(n=>n))await a.getJavaType(t)}expressions(){return[]}toString(){return this.span.getText()}}class Ot extends _e{constructor(t){super(t)}}class Ne extends Ot{constructor(t,a,n){super(t);this.javaType=a,this.expressionList=n||[]}expressions(){return this.expressionList}async getJavaType(){return this.javaType}getValue(){return this.getSpan().getText().replace(/\\\\/g,"\\").replace(/\\n/g,` -`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\'/g,"'")}}class ea extends _e{constructor(t,a,n){super(t);this.target=a,this.args=n}expressions(){return[this.target,...this.args]}getMethod(){return this.target}getArguments(){return this.args}async getJavaType(t){let a=this.target.member.getText(),n=await this.target.getJavaType(t),s=ae.findMethods(n);if(s)for(let i=0,o=s.length;in.name===this.target.variable);if(a)return a.returnType}return await this.target.getJavaType(t)}}class ct extends _e{constructor(t,a,n,s,i){super(t);this.target=a,this.optional=n,this.member=s,this.whole=i}isWhole(){return this.whole===!0}expressions(){return[this.target]}getTarget(){return this.target}async getJavaType(t){let a=await this.target.getJavaType(t),n=await ae.loadClass(a),s=n==null?void 0:n.attributes;const i=this.member.getText();if(s){const r=s.find(u=>u.name===i);if(r)return ae.getWrapperClass(r.type)}let o=n==null?void 0:n.enums;if(o){const r=o.find(u=>u.name===i);if(r)return ae.getWrapperClass(r.type)}let l=n==null?void 0:n.methods;if(l)for(let r=0,u=l.length;r=0&&!a;s--)a=ae.findClass(n[s]+this.variable)}return a||"java.lang.Object"}}class ta extends _e{constructor(t,a,n){super(t);this.target=a,this.keyOrIndex=n}async getJavaType(t){return await this.target.getJavaType(t)==="db"?"db":super.getJavaType(t)}}class Sn extends _e{constructor(t,a,n,s,i){super(t);this.condition=a,this.trueBlock=n||[],this.elseIfs=s||[],this.falseBlock=i||[]}expressions(){return[this.condition,...this.trueBlock,...this.elseIfs,...this.falseBlock]}}class On extends Ne{constructor(t){super(t)}}class wa extends _e{constructor(t,a,n){super(t);this.parameters=a,this.childNodes=n}expressions(){return[...this.childNodes]}async getJavaType(t){if(Array.isArray(this.childNodes)&&this.childNodes.length>0){for(let a=0,n=this.childNodes.length;a=0&&!a;s--)a=ae.findClass(n[s]+this.identifier)}return a||"java.lang.Object"}}class Bi extends _e{constructor(t,a){super(t);this.expression=a}expressions(){return[this.expression]}async getJavaType(t){return"java.util.concurrent.Future"}}class ka extends _e{constructor(t,a,n){super(new J(t.getSpan(),a.getSpan()));this.operand=a,this.operator=t,this.atAfter=n}async getJavaType(t){return await this.operand.getJavaType(t)}}class Fi extends _e{constructor(t,a,n,s,i,o){super(t);this.exceptionVarNode=a,this.tryBlock=n,this.tryResources=s,this.catchBlock=i,this.finallyBlock=o}expressions(){return[...this.tryBlock,...this.tryResources,...this.catchBlock,...this.finallyBlock]}}class Hi extends _e{constructor(t,a,n,s,i){super(t);this.indexOrKey=a,this.value=n,this.mapOrArray=s,this.body=i}expressions(){return[this.mapOrArray,...this.body]}}class Vi extends _e{constructor(t,a,n){super(t);this.condition=a,this.trueBlock=n}expressions(){return[this.condition,...this.trueBlock]}}class Gi extends _e{constructor(t,a,n,s){super(t);this.packageName=a,this.varName=n,this.module=s}async getJavaType(t){if(this.packageName.endsWith(".*"))t["@import"].push(this.packageName.substring(0,this.packageName.length-1));else if(this.module)t[this.packageName]=this.packageName;else if(this.varName)t[this.varName]=this.packageName;else{let a=this.packageName.lastIndexOf(".");a>-1&&(t[this.packageName.substring(a+1)]=this.packageName)}}}class aa extends _e{constructor(t,a,n,s){super(t);this.varName=a,this.expression=n,this.defineType=s!=="var"&&s!=="const"&&s!=="let"&&s}getVarName(){return this.varName}expressions(){return this.expression==null?[]:[this.expression]}async getJavaType(t){let a="java.lang.Object";return this.defineType?a=t[this.defineType]||a:this.expression&&(a=await this.expression.getJavaType(t)),t[this.varName]=a,a}}class ji extends aa{constructor(t,a,n,s,i){super(t,null,n,s);this.expression=n,this.tokens=a,this.defineType=s!=="var"&&s!=="const"&&s!=="let"&&s,this.isMapAccess=i}expressions(){return this.expression==null?[]:[this.expression]}async getJavaType(t){let a="java.lang.Object";if(this.defineType)a=t[this.defineType]||a;else if(!this.isMapAccess)return a;for(const n of this.tokens)t[n.getText()]=await new ct(this.span,this.expression,!0,n,!1).getJavaType(t);return a}}class xn extends _e{constructor(t,a,n){super(new J(t.getSpan(),n.getSpan()));this.condition=t,this.trueExpression=a,this.falseExpression=n}expressions(){return[this.condition,this.trueExpression,this.falseExpression]}}class zi extends _e{constructor(t,a){super(t);this.target=a}expressions(){return[this.target]}}class xt extends Ne{constructor(t,a,n){super(t,"java.util.LinkedHashMap");this.keys=a,this.values=n}expressions(){return this.values}}class Rt extends Ne{constructor(t,a){super(t,"java.util.ArrayList");this.values=a}expressions(){return this.values}}class Yi extends _e{constructor(t){super(t)}async getJavaType(){return"java.util.function.Function"}expressions(){return[]}}class Rn extends _e{constructor(t,a,n,s){super(new J(t.getSpan(),n.getSpan()));this.left=t,this.right=n,this.operator=a,this.linqLevel=s}getOperator(){return this.operator}setRightOperand(t){this.right=t}getRightOperand(){return this.right}expressions(){return[this.left,this.right]}async getJavaType(t){let a=await this.left.getJavaType(t),n=await this.right.getJavaType(t);return a=a.toLowerCase().substring(a.lastIndexOf(".")+1),n=n.toLowerCase().substring(n.lastIndexOf(".")+1),(this.operator.type===d.Plus||this.operator.type===d.PlusEqual)&&(a==="string"||n==="string")?"java.lang.String":this.operator.type===d.Equal||this.operator.type===d.Assignment&&this.linqLevel>0?"java.lang.Boolean":a==="bigdecimal"||n==="bigdecimal"?"java.math.BigDecimal":a==="double"||n==="double"?"java.lang.Double":a==="float"||n==="float"?"java.lang.Float":a==="long"||n==="long"?"java.lang.Long":a==="integer"||n==="integer"?"java.lang.Integer":a==="short"||n==="short"?"java.lang.Short":a==="byte"||n==="byte"?"java.lang.Byte":"java.lang.Object"}}class Gt extends Ot{constructor(t,a,n){super(t);this.expression=a,this.alias=n}expressions(){return[this.expression]}}class qi extends Ot{constructor(t,a,n,s){super(t);this.leftJoin=a,this.target=n,this.condition=s}expressions(){return[this.target,this.condition]}}class Ki extends Ot{constructor(t,a,n,s){super(t);this.expression=a,this.alias=n,this.order=s}expressions(){return[this.expression]}}class An extends Ot{constructor(t,a,n,s){super(t);this.convert=a,this.target=n,this.args=s}expressions(){return[this.target,...this.args]}async getJavaType(){return this.convert=="double"?"java.lang.Double":this.convert=="float"?"java.lang.Float":this.convert=="long"?"java.lang.Long":this.convert=="int"?"java.lang.Integer":this.convert=="short"?"java.lang.Short":this.convert=="byte"?"java.lang.Byte":this.convert=="date"?"java.util.Date":"java.lang.Object"}}class In extends Ot{constructor(t,a,n,s,i,o,l,r,u,p){super(t);this.fields=a,this.from=n,this.joins=s,this.where=i,this.groups=o,this.having=l,this.orders=r,this.limit=u,this.offset=p}expressions(){let t=[];return this.where&&t.push(this.where),this.having&&t.push(this.having),[...this.fields,this.from,...this.joins,...this.groups,...t,...this.orders,this.limit,this.offset]}async getJavaType(){return"java.util.List"}}const na={environmentFunction:()=>{},setEnvironment:e=>na.environmentFunction=e},Cn=["import","as","var","let","const","return","break","continue","if","for","in","new","true","false","null","else","try","catch","finally","async","while","exit","and","or","throw"],Ln=["from","join","left","group","by","as","having","and","or","in","where","on","limit","offset"],Wi=[[d.Assignment],[d.RShift2Equal,d.RShiftEqual,d.LShiftEqual,d.XorEqual,d.BitOrEqual,d.BitAndEqual,d.PercentEqual,d.ForwardSlashEqual,d.AsteriskEqual,d.MinusEqual,d.PlusEqual],[d.Or,d.SqlOr],[d.And,d.SqlAnd],[d.BitOr],[d.Xor],[d.BitAnd],[d.EqualEqualEqual,d.Equal,d.NotEqualEqual,d.NotEqual,d.SqlNotEqual],[d.Less,d.LessEqual,d.Greater,d.GreaterEqual,d.InstanceOf],[d.Plus,d.Minus],[d.LShift,d.RShift,d.RShift2],[d.Asterisk,d.ForwardSlash,d.Percentage]],Xi=[[d.RShift2Equal,d.RShiftEqual,d.LShiftEqual,d.XorEqual,d.BitOrEqual,d.BitAndEqual,d.PercentEqual,d.ForwardSlashEqual,d.AsteriskEqual,d.MinusEqual,d.PlusEqual],[d.Or,d.SqlOr],[d.And,d.SqlAnd],[d.BitOr],[d.Xor],[d.BitAnd],[d.Assignment,d.EqualEqualEqual,d.Equal,d.NotEqualEqual,d.Equal,d.NotEqual,d.SqlNotEqual],[d.Less,d.LessEqual,d.Greater,d.GreaterEqual,d.InstanceOf],[d.Plus,d.Minus],[d.LShift,d.RShift,d.RShift2],[d.Asterisk,d.ForwardSlash,d.Percentage]],Ji=[d.MinusMinus,d.PlusPlus,d.BitNot,d.Minus,d.Plus,d.Not];class sa{constructor(t){this.stream=t,this.linqLevel=0}parse(t){let a=[];try{for(;this.stream.hasMore();){let n=this.parseStatement();n!=null&&(this.validateNode(n),a.push(n))}}catch(n){if(t!==!0)throw n}return a}async parseBest(t){let a=this.parse(),n=await this.processEnv(a);return{best:this.findBestMatch(a[a.length-1],t),env:n}}async processEnv(t){let a=t.length,n=qe(fe(fe(fe({},na.environmentFunction()),ae.getAutoImportClass()),ae.getAutoImportModule()),{"@import":[]});for(let s=0;s-1)throw new ge("\u53D8\u91CF\u540D\u4E0D\u80FD\u5B9A\u4E49\u4E3A\u5173\u952E\u5B57",t)}parseThrow(){let t=this.stream.consume().getSpan(),a=this.parseExpression();return new Ui(new J(t,this.stream.getPrev().getSpan()),a)}parseExit(){let t=this.stream.expect("exit").getSpan(),a=[];do a.push(this.parseExpression());while(this.stream.match(d.Comma,!0));return new Pi(new J(t,this.stream.getPrev().getSpan()),a)}parseAssert(){let t=this.stream.makeIndex();try{let a=this.stream.expect("assert").getSpan(),n=this.parseExpression();this.stream.expect(d.Colon);let s=[];do s.push(this.parseExpression());while(this.stream.match(d.Comma,!0));return new $i(new J(a,this.stream.getPrev().getSpan()),n,s)}catch{return this.stream.resetIndex(t),this.parseExpression()}}parseImport(){let t=this.stream.expect("import").getSpan();if(this.stream.hasMore()){let a=this.stream.consume(),n=null,s=a.getTokenType()===d.StringLiteral;if(s)n=this.createStringLiteral(a).getValue();else if(a.type===d.Identifier){let o=a.getSpan(),l=null;for(n=o.getText();this.stream.match(d.Period,!0);){if(s=!0,this.stream.match(d.Asterisk,!1)){a=this.stream.consume();break}a=this.stream.expect(d.Identifier)}s&&(l=a.getSpan(),n=new J(o,l).getText())}else throw new ge("Expected identifier or string, but got stream is "+a.getTokenType().error,this.stream.getPrev().getSpan());let i=n;if(s)if(this.stream.match("as",!0))a=this.stream.expect(d.Identifier),this.checkKeyword(a.getSpan()),i=a.getSpan().getText();else{let o=n;if(o.startsWith("@"))throw new ge("Expected as",this.stream.getPrev().getSpan());{let l=o.lastIndexOf(".");l!=-1&&(o=o.substring(l+1))}i=o}return new Gi(new J(t,a.getSpan()),n,i,!s)}throw new ge("Expected identifier or string, but got stream is EOF",this.stream.getPrev().getSpan())}parseReturn(){let t=this.stream.expect("return").getSpan();if(this.stream.match([";","}"],!1))return new Ht(t,null);let a=this.parseExpression();return new Ht(new J(t,a.getSpan()),a)}parseAsync(){let t=this.stream.expect("async").getSpan(),a=this.parseExpression();return new Bi(new J(t,this.stream.getPrev().getSpan()),a)}parseIfStatement(){let t=this.stream.expect("if").getSpan(),a=this.parseExpression(),n=this.parseFunctionBody(),s=[],i=[];for(;this.stream.hasMore()&&this.stream.match("else",!0);)if(this.stream.hasMore()&&this.stream.match("if",!1)){let l=this.stream.expect("if").getSpan(),r=this.parseExpression(),u=this.parseFunctionBody(),p=new J(l,u.length>0?u[u.length-1].getSpan():l);s.push(new Sn(p,r,u,[]))}else{i=i.concat(this.parseFunctionBody());break}let o=this.stream.getPrev().getSpan();return new Sn(new J(t,o),a,n,s,i)}parseNewExpression(t){let a=this.parseAccessOrCall(d.Identifier,!0),n=new J(t.getSource(),t.getStart(),this.stream.getPrev().getSpan().getEnd());return a instanceof ea?this.parseAccessOrCall(new Vt(n,a.getMethod(),a.getArguments())):a instanceof Na?this.parseAccessOrCall(new Vt(n,a.getFunction(),a.getArguments())):this.parseAccessOrCall(new Vt(n,a,[]))}parseArguments(){this.stream.expect(d.LeftParantheses);let t=[];for(;this.stream.hasMore()&&!this.stream.match(d.RightParantheses,!1);)t.push(this.parseExpression()),this.stream.match(d.RightParantheses,!1)||this.stream.expect(d.Comma);return t}parseForStatement(){let t=this.stream.expect("for").getSpan();this.stream.expect("(");let a=null,n=this.stream.expect(d.Identifier).getSpan();this.checkKeyword(n),this.stream.match(d.Comma,!0)&&(a=n,n=this.stream.expect(d.Identifier).getSpan(),this.checkKeyword(n)),this.stream.expect("in");let s=this.parseExpression();this.stream.expect(")");let i=this.parseFunctionBody();return new Hi(new J(t,this.stream.getPrev().getSpan()),a&&a.getText(),n&&n.getText(),s,i)}parseVarDefine(){let t=this.stream.consume().getSpan(),a;if((a=this.stream.match(d.LeftCurly,!1))||this.stream.match(d.LeftBracket,!1)){this.stream.expect([d.LeftCurly,d.LeftBracket]);let i=[];do{let o=this.stream.expect(d.Identifier);i.push(o)}while(this.stream.match(d.Comma,!0));return a?this.stream.match(d.RightCurly,!0):this.stream.match(d.RightBracket,!0),this.stream.match(d.Assignment,!0),new ji(new J(t,this.stream.getPrev().getSpan()),i,this.parseExpression(),t.getText(),a)}let n=this.stream.expect(d.Identifier);this.checkKeyword(n.getSpan());let s;return this.stream.match(d.Assignment,!0)?s=new aa(new J(t,this.stream.getPrev().getSpan()),n.getText(),this.parseExpression(),t.getText()):s=new aa(new J(t,this.stream.getPrev().getSpan()),n.getText(),null,t.getText()),s}parseTryStatement(){let t=this.stream.expect("try"),a=[];if(this.stream.match("(",!0)){if(!this.stream.match(")",!1))for(;!this.stream.match(")",!1);){if(this.stream.match(";",!0))continue;let l=null;if(this.matchVarDefine())l=this.parseVarDefine();else{if(this.stream.matchAny(Cn,!1))throw new ge("try \u62EC\u53F7\u4E2D\u53EA\u5141\u8BB8\u5199\u8D4B\u503C\u8BED\u53E5",this.stream.consume().getSpan());let r=this.stream.makeIndex();if(this.matchTypeDefine()&&(this.stream.resetIndex(r),l=this.parseVarDefine()),l==null)throw this.stream.resetIndex(r),new ge("try \u62EC\u53F7\u4E2D\u53EA\u5141\u8BB8\u5199\u8D4B\u503C\u8BED\u53E5",this.stream.consume().getSpan())}a.push(l)}this.stream.expect(")")}let n=this.parseFunctionBody(),s=[],i=[],o=null;return this.stream.match("catch",!0)&&(this.stream.match("(",!0)&&(o=this.stream.expect(d.Identifier).getText(),this.stream.expect(")")),s=s.concat(this.parseFunctionBody())),this.stream.match("finally",!0)&&(i=i.concat(this.parseFunctionBody())),new Fi(new J(t.getSpan(),this.stream.getPrev().getSpan()),o,n,a,s,i)}parseWhileStatement(){let t=this.stream.expect("while").getSpan(),a=this.parseExpression(),n=this.parseFunctionBody(),s=this.stream.getPrev().getSpan();return new Vi(new J(t,s),a,n)}parseFunctionBody(){this.stream.expect("{");let t=[];for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let a=this.parseStatement(!0);a!=null&&(this.validateNode(a),t.push(a))}return this.expectCloseing(),t}expectCloseing(){return!this.stream.hasMore(),this.stream.expect("}").getSpan()}parseExpression(t){return this.parseTernaryOperator(t)}parseTernaryOperator(t){let a=this.parseBinaryOperator(0,t);if(this.stream.match(d.Questionmark,!0)){let n=this.parseTernaryOperator(t);this.stream.expect(d.Colon);let s=this.parseTernaryOperator(t);return a instanceof Rn&&a.getOperator()===d.Assignment?(a.setRightOperand(new xn(a.getRightOperand(),n,s)),a):new xn(a,n,s)}else return a}parseBinaryOperator(t,a){let n=t+1,s=this.linqLevel>0?Xi:Wi,i=n===s.length?this.parseUnaryOperator(a):this.parseBinaryOperator(n,a),o=s[t];for(;this.stream.hasMore()&&this.stream.match(o,!1);){let l=this.stream.consume();if(l.type.inLinq&&this.linqLevel===0)throw new ge(l.getText()+" \u53EA\u80FD\u5728Linq\u4E2D\u4F7F\u7528",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());let r=n===s.length?this.parseUnaryOperator(a):this.parseBinaryOperator(n,a);i=new Rn(i,l,r,this.linqLevel)}return i}parseUnaryOperator(t){if(this.stream.match(Ji,!1))return new ka(this.stream.consume(),this.parseUnaryOperator(t));if(this.stream.match(d.LeftParantheses,!1)){let a=this.stream.expect(d.LeftParantheses).getSpan(),n=this.stream.makeIndex(),s=[];for(;this.stream.match(d.Identifier,!1);){let o=this.stream.expect(d.Identifier);if(s.push(o.getSpan().getText()),!this.stream.match(d.Comma,!0)&&this.stream.match(d.RightParantheses,!0)){if(this.stream.match(d.Lambda,!0))return this.parseLambdaBody(a,s);break}}if(this.stream.match(d.RightParantheses,!0)&&this.stream.match(d.Lambda,!0))return this.parseLambdaBody(a,s);this.stream.resetIndex(n);let i=this.parseExpression();return this.stream.expect(d.RightParantheses),this.parseAccessOrCall(i)}else{let a=this.parseAccessOrCallOrLiteral(t);return(a instanceof ct||a instanceof Je||a instanceof ta)&&this.stream.match([d.PlusPlus,d.MinusMinus],!1)?new ka(this.stream.consume(),a):a}}parseLambdaBody(t,a){let n=this.stream.makeIndex(),s=[];try{let i=this.parseExpression();return s.push(new Ht(new J("return",0,6),i)),new wa(new J(t,i.getSpan()),a,s)}catch{if(this.stream.resetIndex(n),this.stream.match(d.LeftCurly,!0)){for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let l=this.parseStatement(!0);this.validateNode(l),s.push(l)}let o=this.expectCloseing();return new wa(new J(t,o),a,s)}else{let o=this.parseStatement();return s.push(new Ht(new J("return",0,6),o)),new wa(new J(t,o.getSpan()),a,s)}}}parseSpreadAccess(t){t||(t=this.stream.expect(d.Spread));let a=this.parseExpression();return new zi(new J(t.getSpan(),a.getSpan()),a)}parseAccessOrCall(t,a){if(t===d.StringLiteral||t===d.Identifier){let n=this.stream.expect(t),s=n.getSpan();if(t===d.Identifier&&s.getText()==="new")return this.parseNewExpression(s);if(t===d.Identifier&&this.stream.match(d.Lambda,!0))return this.parseLambdaBody(s,[s.getText()]);let i=t===d.StringLiteral?this.createStringLiteral(n):new Je(s,s.getText());return this.parseAccessOrCall(i,a)}else{for(;this.stream.hasMore()&&this.stream.match([d.LeftParantheses,d.LeftBracket,d.Period,d.QuestionPeriod,d.ColonColon],!1);)if(this.stream.match(d.ColonColon,!1)){let n=this.stream.consume().getSpan(),s=[],i=this.stream.expect(d.Identifier),o=i.getSpan();this.stream.match(d.LeftParantheses,!1)&&(s=this.parseArguments(),o=this.stream.expect(d.RightParantheses).getSpan()),t=new An(new J(n,o),i.getText(),t,s)}else if(this.stream.match(d.LeftParantheses,!1)){let n=this.parseArguments(),s=this.stream.expect(d.RightParantheses).getSpan();if(t instanceof Je||t instanceof ta)t=new Na(new J(t.getSpan(),s),t,n,this.linqLevel>0);else if(t instanceof ct)t=new ea(new J(t.getSpan(),s),t,n,this.linqLevel>0);else throw new ge("Expected a variable, field or method.",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());if(a)break}else if(this.stream.match(d.LeftBracket,!0)){let n=this.parseExpression(),s=this.stream.expect(d.RightBracket).getSpan();t=new ta(new J(t.getSpan(),s),t,n)}else if(this.stream.match([d.Period,d.QuestionPeriod],!1)){let n=this.stream.consume().getTokenType()===d.QuestionPeriod;if(this.linqLevel>0&&this.stream.match(d.Asterisk,!1))t=new ct(t.getSpan(),n,this.stream.expect(d.Asterisk).getSpan(),!0);else{let s=this.stream.expect([d.Identifier,d.SqlAnd,d.SqlOr]).getSpan();t=new ct(new J(t.getSpan(),s),t,n,s,!1)}}return t}}parseMapLiteral(){let t=this.stream.expect(d.LeftCurly).getSpan(),a=[],n=[];for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let i;if(this.stream.hasPrev()){let o=this.stream.getPrev();if(this.stream.match(d.Spread,!1)&&(o.getTokenType()===d.LeftCurly||o.getTokenType()===d.Comma)){let l=this.stream.expect(d.Spread);a.push(l),n.push(this.parseSpreadAccess(l)),this.stream.match([d.Comma,d.RightCurly],!1)&&this.stream.match(d.Comma,!0);continue}}this.stream.match(d.StringLiteral,!1)?i=this.stream.expect(d.StringLiteral):this.stream.match(d.LeftBracket,!0)?(i=this.parseExpression(),this.stream.expect(d.RightBracket)):i=this.stream.expect(d.Identifier),a.push(i),this.stream.match([d.Comma,d.RightCurly],!1)?(this.stream.match(d.Comma,!0),i instanceof Je?n.push(i):i.getTokenType()===d.Identifier?n.push(new Je(i.getSpan(),i.getText())):n.push(new Ne(i.getSpan(),"java.lang.String"))):(this.stream.expect(":"),n.push(this.parseExpression()),this.stream.match("}",!1)||this.stream.expect(d.Comma))}let s=this.stream.expect("}").getSpan();return new xt(new J(t,s),a,n)}parseListLiteral(){let t=this.stream.expect(d.LeftBracket).getSpan(),a=[];for(;this.stream.hasMore()&&!this.stream.match(d.RightBracket,!1);)a.push(this.parseExpression()),this.stream.match(d.RightBracket,!1)||this.stream.expect(d.Comma);let n=this.stream.expect(d.RightBracket).getSpan();return new Rt(new J(t,n),a)}parseSelect(){let t=this.stream.expect("select",!0).getSpan();this.linqLevel++;let a=this.parseLinqFields();this.stream.expect("from",!0);let n=this.parseLinqField(),s=this.parseLinqJoins(),i;this.stream.match("where",!0,!0)&&(i=this.parseExpression());let o=this.parseGroup(),l;this.stream.match("having",!0,!0)&&(l=this.parseExpression());let r=this.parseLinqOrders();this.linqLevel--;let u,p;this.stream.match("limit",!0,!0)&&(u=this.parseExpression(),this.stream.match("offset",!0,!0)&&(p=this.parseExpression()));let g=this.stream.getPrev().getSpan();return new In(new J(t,g),a,n,s,i,o,l,r,u,p)}parseGroup(){let t=[];if(this.stream.match("group",!0,!0)){this.stream.expect("by",!0);do{let a=this.parseExpression();t.push(new Gt(a.getSpan(),a,null))}while(this.stream.match(d.Comma,!0))}return t}parseLinqOrders(){let t=[];if(this.stream.match("order",!0,!0)){this.stream.expect("by",!0);do{let a=this.parseExpression(),n=1;this.stream.match(["desc","asc"],!1,!0)&&this.stream.consume().getText()==="desc"&&(n=-1),t.push(new Ki(new J(a.getSpan(),this.stream.getPrev().getSpan()),a,null,n))}while(this.stream.match(d.Comma,!0))}return t}parseLinqField(){let t=this.parseExpression();if(this.stream.match(d.Identifier,!1)&&!this.stream.match(Ln,!1,!0)){let a=this.stream.expect(d.Identifier).getSpan();return new Gt(new J(t.getSpan(),a),t,a.getText())}return new Gt(t.getSpan(),t,null)}parseLinqFields(){let t=[];do{let a=this.parseExpression();if(this.stream.match(d.Identifier,!1)&&!this.stream.match(Ln,!1,!0)){if(a instanceof On)throw new ge("* \u540E\u8FB9\u4E0D\u80FD\u8DDF\u522B\u540D",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());if(a instanceof ct&&a.isWhole())throw new ge(a.getSpan().getText()+" \u540E\u8FB9\u4E0D\u80FD\u8DDF\u522B\u540D",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());let n=this.stream.consume().getSpan();t.push(new Gt(new J(a.getSpan(),n),a,n.getText()))}else t.push(new Gt(a.getSpan(),a,null))}while(this.stream.match(d.Comma,!0));if(t.length===0)throw new ge("\u81F3\u5C11\u8981\u67E5\u8BE2\u4E00\u4E2A\u5B57\u6BB5",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());return t}parseLinqJoins(){let t=[];do{let a=this.stream.match("left",!1),n=a?this.stream.consume().getSpan():null;if(this.stream.match("join",!0)){n=a?n:this.stream.getPrev().getSpan();let s=this.parseLinqField();this.stream.expect("on");let i=this.parseExpression();t.push(new qi(new J(n,this.stream.getPrev().getSpan()),a,s,i))}}while(this.stream.match(["left","join"],!1));return t}parseAccessOrCallOrLiteral(t){let a;if(t&&this.stream.match("}",!1))return null;if(this.stream.match(d.Spread,!1))a=this.parseSpreadAccess();else if(this.stream.match(d.Identifier,!1))this.stream.match("async",!1)?a=this.parseAsync():this.stream.match("select",!1,!0)?a=this.parseSelect():a=this.parseAccessOrCall(d.Identifier);else if(this.stream.match(d.LeftCurly,!1))a=this.parseMapLiteral();else if(this.stream.match(d.LeftBracket,!1))a=this.parseListLiteral();else if(this.stream.match(d.StringLiteral,!1))a=this.createStringLiteral(this.stream.expect(d.StringLiteral));else if(this.stream.match(d.BooleanLiteral,!1))a=new Ne(this.stream.expect(d.BooleanLiteral).getSpan(),"java.lang.Boolean");else if(this.stream.match(d.DoubleLiteral,!1))a=new Ne(this.stream.expect(d.DoubleLiteral).getSpan(),"java.lang.Double");else if(this.stream.match(d.FloatLiteral,!1))a=new Ne(this.stream.expect(d.FloatLiteral).getSpan(),"java.lang.Float");else if(this.stream.match(d.ByteLiteral,!1))a=new Ne(this.stream.expect(d.ByteLiteral).getSpan(),"java.lang.Byte");else if(this.stream.match(d.ShortLiteral,!1))a=new Ne(this.stream.expect(d.ShortLiteral).getSpan(),"java.lang.Short");else if(this.stream.match(d.IntegerLiteral,!1))a=new Ne(this.stream.expect(d.IntegerLiteral).getSpan(),"java.lang.Integer");else if(this.stream.match(d.LongLiteral,!1))a=new Ne(this.stream.expect(d.LongLiteral).getSpan(),"java.lang.Long");else if(this.stream.match(d.DecimalLiteral,!1))a=new Ne(this.stream.expect(d.DecimalLiteral).getSpan(),"java.math.BigDecimal");else if(this.stream.match(d.RegexpLiteral,!1)){let n=this.stream.expect(d.RegexpLiteral);a=new Ne(n.getSpan(),"java.util.regex.Pattern")}else this.stream.match(d.NullLiteral,!1)?a=new Ne(this.stream.expect(d.NullLiteral).getSpan(),"null"):this.linqLevel>0&&this.stream.match(d.Asterisk,!1)?a=new On(this.stream.expect(d.Asterisk).getSpan()):this.stream.match(d.Language,!1)&&(a=new Yi(this.stream.consume().getSpan(),this.stream.consume().getSpan()));if(a==null)throw new ge("Expected a variable, field, map, array, function or method call, or literal.",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());return this.parseAccessOrCall(a)}createStringLiteral(t){if(t.getTokenStream()==null)return new Ne(t.getSpan(),"java.lang.String");let a=this.stream;this.stream=t.getTokenStream();let n=[];for(;this.stream.hasMore();)n.push(this.parseExpression());return this.stream=a,new Ne(t.getSpan(),"java.lang.String",n)}findBestMatch(t,a){let n=t.expressions().filter(s=>s);for(let s in n){let i=this.findBestMatch(n[s],a);if(i)return i}return t.getSpan().inPosition(a)?t:null}}const Da=e=>{var a;const t={};return(a=e==null?void 0:e.children)==null||a.forEach(n=>t[n.name]=n),t};function Ma(e,t){var s;let a=[],n={name:"",value:"",dataType:"",required:!1,validateType:"",expression:"",error:"",description:"",defaultValue:null,children:[]};if(e instanceof xt)e.keys.forEach((i,o)=>{var p,g,f,y,E,L,I;const l=i.span.getText().replace(/['"]/g,"");let r=e.values[o],u=qe(fe({},n),{description:((p=t[l])==null?void 0:p.description)||"",required:((g=t[l])==null?void 0:g.required)===!0,validateType:((f=t[l])==null?void 0:f.validateType)||"",expression:((y=t[l])==null?void 0:y.expression)||"",error:((E=t[l])==null?void 0:E.error)||"",name:l,defaultValue:(L=t[l])==null?void 0:L.defaultValue,value:Nn(r)?r.span.getText().trim():"",dataType:((I=t[l])==null?void 0:I.dataType)||Pa(r)});(r instanceof xt||r instanceof Rt)&&(u.children=Ma(r,Da(t[l]))),a.push(u)});else if(e instanceof Rt&&e.values[0]){let i=e.values[0],o=qe(fe({},n),{value:Nn(i)?i.span.getText().trim():"",dataType:((s=t[""])==null?void 0:s.dataType)||Pa(i)});(i instanceof xt||i instanceof Rt)&&(o.children=Ma(i,Da(t[""]))),a.push(o)}return a}function Nn(e){return!(e instanceof xt||e instanceof Rt)}function Pa(e){if(e instanceof xt)return"Object";if(e instanceof Rt)return"Array";e instanceof ka&&(e=e.operand);let t=e.javaType.substring(e.javaType.lastIndexOf(".")+1);return t==="Integer"&&Number(e.span.getText())>2147483647||Number(e.span.getText())<-2147483648?"Long":t==="null"?"Object":t}function wn(e,t){t=t||{};try{JSON.parse(e);let n=new sa(new St(Zt(e))).parseExpression();return{name:"",value:"",dataType:t.dataType||Pa(n),required:t.required,validateType:t.validateType||"",expression:t.expression||"",error:t.error||"",description:t.description||"",defaultValue:t.defaultValue,children:Ma(n,Da(t))}}catch{}}const kn=(e,t,a,n)=>{let s=-1,i=ae.getImportClass();if(a!==0&&t&&(s=i.length)>0){t=t.toLowerCase(),ae.getDefineModules().filter(l=>l.toLowerCase().indexOf(t)>-1).forEach(l=>e.push({label:l,filterText:l,kind:X.CompletionItemKind.Module,detail:l,insertText:l,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet}));let o=new Set;for(let l=0;l-1){let p=r.substring(r.lastIndexOf(".")+1);if(u===0){let g=r.substring(t.length),f=g;if(g.startsWith("."))f=t+".",g=t.substring(t.lastIndexOf(".")+1)+".";else{if(g.indexOf(".")===-1){e.push({sortText:`2${p}`,label:p,kind:X.CompletionItemKind.Class,filterText:r,detail:r,insertText:p,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet});continue}let y=g.substring(0,g.indexOf(".")+1);f=t+y,g=t.substring(t.lastIndexOf(".")+1)+y}if(o.has(g))continue;o.add(g),e.push({sortText:`1${g}`,label:g,kind:X.CompletionItemKind.Folder,filterText:r,detail:f.replace(/\.$/,""),insertText:g,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet,command:{id:"editor.action.triggerSuggest"}})}else p.toLowerCase().indexOf(t)>-1&&e.push({sortText:`2${p}`,label:p,kind:X.CompletionItemKind.Class,filterText:p,detail:r,insertText:r,range:new it(n.lineNumber,a+1,n.lineNumber,n.column)})}}}else ae.getDefineModules().forEach(o=>e.push({label:o,filterText:o,kind:X.CompletionItemKind.Module,detail:o,insertText:o,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet}))},Qi=(e,t,a,n)=>{let s=a.indexOf('"')+1;if(s===0&&(s=a.indexOf("'")+1),s===0){a=a.trim().replace("import","").trim(),kn(e,a,n+1,t);return}let i=a.substring(n).trim().replace(/['|"]/g,"");if(i.startsWith("@")){if(i.indexOf(" ")>-1)return;let o=ae.getApiFinder();(o&&o()||[]).forEach(l=>{let r="@"+l.method+":"+l.path;e.push({sortText:r,label:r,kind:X.CompletionItemKind.Reference,filterText:r,detail:l.name,insertText:r,range:new it(t.lineNumber,s+1,t.lineNumber,t.column)})}),o=ae.getFunctionFinder(),(o&&o()||[]).forEach(l=>{let r="@"+l.path;e.push({sortText:r,label:r,kind:X.CompletionItemKind.Reference,filterText:r,detail:l.name,insertText:r,range:new it(t.lineNumber,s+1,t.lineNumber,t.column)})});return}kn(e,i,s,t)},jt=async(e,t,a,n,s)=>{if(a=a||{},n&&n instanceof Je&&await n.getJavaType(a)==="java.lang.Object"){let u=ae.getImportClass();const p=n.variable;u.forEach(g=>{let f=g.substring(g.lastIndexOf(".")+1);f.indexOf(p)>-1&&e.push({sortText:`${f}`,label:f,kind:X.CompletionItemKind.Class,filterText:f,detail:g,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet,command:{id:"editor.action.scrollUp1Line"},insertText:f+(s?"()":""),additionalTextEdits:[{forceMoveMarkers:!0,text:`import ${g}\r -`,range:new it(1,0,1,0)}]})})}ae.findFunction().forEach(u=>{e.push({sortText:u.sortText||u.fullName,label:u.fullName,filterText:u.name,kind:X.CompletionItemKind.Method,detail:u.comment,insertText:u.insertText,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet})});let i=e.map(u=>u.detail),o=t.match(/[a-zA-Z_$]+/ig)||[],l=o.length,r=Object.keys(a);r.forEach(u=>{e.push({label:u,filterText:u,kind:X.CompletionItemKind.Variable,detail:a[u],insertText:u,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet})}),l>2&&Array.from(new Set(o)).filter((u,p)=>p+2{e.push({label:u,filterText:u,kind:X.CompletionItemKind.Text,detail:u,insertText:u,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet})})},Dn=async(e,t)=>{let a=await ae.loadClass(e),n=e.lastIndexOf("."),s=n>0?e.substring(n+1):e,i=ae.findEnums(a);if(i)for(let r=0;r({label:r[0],kind:X.CompletionItemKind.Struct,detail:r[2]||r[1],insertText:r[1],filterText:r[0],insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet,range:i}));return n.length>1&&n.trim().indexOf("import")===0?(Qi(l,t,n,n.indexOf("import")+6),o=!0):n.endsWith("::")?l=["int","long","date","string","short","byte","float","double","json","stringify","sql"].map(r=>({label:r,detail:`\u8F6C\u6362\u4E3A${r==="stringify"?"json\u5B57\u7B26\u4E32":r==="sql"?"sql\u53C2\u6570\u7C7B\u578B":r}`,insertText:r,kind:X.CompletionItemKind.TypeParameter,insertTextRules:X.CompletionItemInsertTextRule.InsertAsSnippet})):a.length>1?await Zi(l,a):await jt(l,a,fe(fe(fe({},na.environmentFunction()),ae.getAutoImportClass()),ae.getAutoImportModule())),{suggestions:l,incomplete:o}},triggerCharacters:[".",":"]};let Mn=function(e,t){for(var a=0,n=0,s=e.length;n16777215||a>16777215)){var s=this._length;this._startIndexes[s]=t,this._endIndexes[s]=a,this._length++,n<1e3&&(this._indentOccurrences[n]=(this._indentOccurrences[n]||0)+1)}}toIndentRanges(t){var a=[];if(this._length<=this._foldingRangesLimit){new Uint32Array(this._length),new Uint32Array(this._length);for(var n=this._length-1,s=0;n>=0;n--,s++)a.push({start:this._startIndexes[n],end:this._endIndexes[n]})}else{for(var i=0,o=this._indentOccurrences.length,n=0;nthis._foldingRangesLimit){o=n;break}i+=l}}var r=t.getOptions().tabSize;new Uint32Array(this._foldingRangesLimit),new Uint32Array(this._foldingRangesLimit);for(var n=this._length-1,s=0;n>=0;n--){var u=this._startIndexes[n],p=t.getLineContent(u),g=Mn(p,r);(g{let a=e.getOptions().tabSize,n=new ao(5e3),s=[],i=e.getLineCount()+1,o=-1,l=-1,r=[];s.push({indent:-1,endAbove:i,line:i});for(let p=e.getLineCount();p>0;p--){let g=e.getLineContent(p);g.startsWith("import")||g.trim().startsWith("import")?o==-1?o=p:l=p:(l>-1&&o>-1&&r.push({start:l,end:o,kind:X.FoldingRangeKind.Imports}),l=-1,o=-1);let f=Mn(g,a),y=s[s.length-1];if(f!==-1){if(y.indent>f){do s.pop(),y=s[s.length-1];while(y.indent>f);var u=y.endAbove-1;u-p>=1&&n.insertFirst(p,u,f)}y.indent===f?y.endAbove=p:s.push({indent:f,endAbove:p,line:p})}}return l>-1&&o>-1&&r.push({start:l,end:o,kind:X.FoldingRangeKind.Imports}),r.concat(n.toIndentRanges(e))}},so={signatureHelpRetriggerCharacters:["(",","],signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:async(e,t,a,n)=>{if(n.activeSignatureHelp){let i=n.activeSignatureHelp;return i.activeSignature+=1,i.activeSignature===i.signatures.length&&(i.activeSignature=0),{dispose:function(){},value:i}}let s=e.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:t.lineNumber,endColumn:t.column});try{let i=Zt(s),o=new sa(new St(i));const{best:l,env:r}=await o.parseBest(s.length-1);if(l&&l instanceof ea){let u=l.target,p=await u.getTarget().getJavaType(r),g=u.member.getText(),f=ae.findMethods(await ae.loadClass(p)),y=[];if(f.filter(E=>E.name===g).forEach(E=>{let L=[];for(let I=E.extension?1:0;I0)return{dispose:function(){},value:{activeParameter:0,activeSignature:0,signatures:y}}}}catch{}}},Ua=(e,t,a)=>{a.push({value:`${e}${t.fullName}`}),t.comment&&a.push({value:`${t.comment}`}),t.parameters.forEach((n,s)=>{(s>0||!t.extension)&&a.push({value:`${n.name}\uFF1A${n.comment||n.type}`})}),a.push({value:`\u8FD4\u56DE\u7C7B\u578B\uFF1A\`${t.returnType}\``})},$a=(e,t,a,n)=>{let s=ae.findFunction().filter(i=>i.name===e);if(s.length>0)Ua("",s[0],a);else{let i=t[e];if(i&&i.indexOf("@")===0){let o=i.substring(1),l=ae.getOnlineFunction(o);if(l){let r=Array.isArray(l.parameter)?l.parameter:JSON.parse(l.parameter||"[]");r.forEach(u=>u.comment=u.description),Ua("",{fullName:e+" "+l.name,comment:l.description||"",parameters:r,returnType:l.returnType},a)}}else a.push({value:`${n?"\u521B\u5EFA\u5BF9\u8C61":"\u8BBF\u95EE\u53D8\u91CF"}\uFF1A${e}`}),a.push({value:`\u7C7B\u578B\uFF1A${i||"unknow"}`})}},io={provideHover:async(e,t)=>{var u,p,g;let a=e.getValue(),n=Zt(a),s=new St(n),i=new sa(s),o=i.parse(!0),r=e.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:t.lineNumber,endColumn:t.column}).length;for(let f=0,y=o.length;fU.name===A).forEach(U=>Ua(`${ae.getSimpleClass(S)}.`,U,I)),ae.findEnums(O).filter(U=>U===A).forEach(U=>{I.push({value:`\u8BBF\u95EE\u679A\u4E3E\uFF1A\`${S}.${A}\``})}),ae.findAttributes(O).filter(U=>U.name===A).forEach(U=>{I.push({value:`\u8BBF\u95EE\u5C5E\u6027\uFF1A\`${S}.${A}\``}),U.comment&&I.push({value:`${U.comment}`}),I.push({value:`\u5C5E\u6027\u7C7B\u578B\uFF1A\`${U.type}\``})}),m=E.member.getLine()}else if(E instanceof Na){let S=E.target;$a(S.variable,L,I)}else if(E instanceof Vt){let S=E.identifier;S instanceof Je&&$a(S,L,I,!0)}else if(E instanceof ta)I.push({value:"\u8BBF\u95EEMap\u6216\u6570\u7EC4"});else if(E instanceof In)I.push({value:"linq\u67E5\u8BE2"});else return;return{range:new it(m.lineNumber,m.startCol,m.endLineNumber,m.endCol+1),contents:I}}}}},oo=()=>{const e="mybatis";X.register({id:e}),X.setLanguageConfiguration(e,{comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),X.setMonarchTokensProvider(e,{defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/(<)(where|set|foreach|if|trim|elseif|else)/,["delimiter",{token:"tag",next:"@xml"}]],[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]],xml:[[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@xmlEmbedded",nextEmbedded:"mybatis"}],[/[ \t\r\n]+/],[/(<\/)(where|if|set|foreach|trim|elseif|else)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],xmlEmbedded:[[/<\/(where|if|set|foreach|trim|elseif|else)/,{token:"tag",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}})},lo=()=>{oo();const e="magicscript";X.register({id:e}),X.setLanguageConfiguration(e,{wordPattern:/(-?\d*\.\d\w*)|([^`~!#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g,brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:X.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:X.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:X.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:X.IndentAction.None,removeText:1}}],comments:{lineComment:"//",blockComment:["/*","*/"]},operators:["<=",">=","==","!=","+","-","*","/","%","&","|","!","&&","||","?",":","++","--","+=","-=","*=","/="],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string.multi"]},{open:"",close:""},{open:"'},{open:"'},{open:""},{open:"",close:""},{open:"",close:""},{open:"'},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]},{open:"/**",close:" */",notIn:["string"]}]}),X.setMonarchTokensProvider(e,Ta),X.registerCompletionItemProvider(e,to),X.registerFoldingRangeProvider(e,no),X.registerSignatureHelpProvider(e,so),X.registerHoverProvider(e,io),X.registerDocumentFormattingEditProvider(e,{provideDocumentFormattingEdits(t,a,n){return[{text:new ie(t.getValue()).beautify(),range:t.getFullModelRange()}]}})};function Ie(e,t,a){var n={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null,binaryType:"blob"};a||(a={});for(var s in n)typeof a[s]!="undefined"?this[s]=a[s]:this[s]=n[s];this.url=e,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var i=this,o,l=!1,r=!1,u=document.createElement("div");u.addEventListener("open",function(g){i.onopen(g)}),u.addEventListener("close",function(g){i.onclose(g)}),u.addEventListener("connecting",function(g){i.onconnecting(g)}),u.addEventListener("message",function(g){i.onmessage(g)}),u.addEventListener("error",function(g){i.onerror(g)}),this.addEventListener=u.addEventListener.bind(u),this.removeEventListener=u.removeEventListener.bind(u),this.dispatchEvent=u.dispatchEvent.bind(u);function p(g,f){var y=document.createEvent("CustomEvent");return y.initCustomEvent(g,!1,!1,f),y}this.open=function(g){if(o=new WebSocket(i.url,t||[]),o.binaryType=this.binaryType,g){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else u.dispatchEvent(p("connecting")),this.reconnectAttempts=0;(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",i.url);var f=o,y=setTimeout(function(){(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",i.url),r=!0,f.close(),r=!1},i.timeoutInterval);o.onopen=function(E){clearTimeout(y),(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","onopen",i.url),i.protocol=o.protocol,i.readyState=WebSocket.OPEN,i.reconnectAttempts=0;var L=p("open");L.isReconnect=g,g=!1,u.dispatchEvent(L)},o.onclose=function(E){if(clearTimeout(I),o=null,l)i.readyState=WebSocket.CLOSED,u.dispatchEvent(p("close"));else{i.readyState=WebSocket.CONNECTING;var L=p("connecting");L.code=E.code,L.reason=E.reason,L.wasClean=E.wasClean,u.dispatchEvent(L),!g&&!r&&((i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","onclose",i.url),u.dispatchEvent(p("close")));var I=i.reconnectInterval*Math.pow(i.reconnectDecay,i.reconnectAttempts);setTimeout(function(){i.reconnectAttempts++,i.open(!0)},I>i.maxReconnectInterval?i.maxReconnectInterval:I)}},o.onmessage=function(E){(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",i.url,E.data);var L=p("message");L.data=E.data,u.dispatchEvent(L)},o.onerror=function(E){(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","onerror",i.url,E),u.dispatchEvent(p("error"))}},this.automaticOpen==!0&&this.open(!1),this.send=function(g){if(o)return(i.debug||Ie.debugAll)&&console.debug("ReconnectingWebSocket","send",i.url,g),o.send(g);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(g,f){typeof g=="undefined"&&(g=1e3),l=!0,o&&o.close(g,f)},this.refresh=function(){o&&o.close()}}Ie.prototype.onopen=function(e){};Ie.prototype.onclose=function(e){};Ie.prototype.onconnecting=function(e){};Ie.prototype.onmessage=function(e){};Ie.prototype.onerror=function(e){};Ie.debugAll=!1;Ie.CONNECTING=WebSocket.CONNECTING;Ie.OPEN=WebSocket.OPEN;Ie.CLOSING=WebSocket.CLOSING;Ie.CLOSED=WebSocket.CLOSED;let Ba={};function zt(e){if(Ba[e])try{Ba[e].close()}catch{}this.listeners={},this.future=new Promise(t=>{this.resolve=t,this.socket=new Ie(e,null,{timeoutInterval:1e4}),Ba[e]=this,this.socket.onmessage=this.messageReceived,this.socket.onconnecting=()=>{this.future=new Promise(a=>this.resolve=a),T.status("message.connectDebugServer")},this.socket.onopen=()=>{T.status("message.connectDebugServerSuccess"),T.$emit("ws_open"),this.resolve()},this.socket.onclose=()=>{T.status("message.debugServerClose"),T.$emit("ws_close")}})}zt.prototype.on=function(e,t){this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t)};zt.prototype.messageReceived=function(e){let t=e.data,a=t.indexOf(","),n=a===-1?t:t.substring(0,a),s=[];for(;a>-1;){if(t=t.substring(a+1),t.startsWith("[")||t.startsWith("{")){s.push(JSON.parse(t));break}a=t.indexOf(","),s.push(a===-1?t:t.substring(0,a))}T.$emit("ws_"+n,s)};zt.prototype.send=function(e){this.future.then(()=>{this.socket.send(e)})};zt.prototype.close=function(){this.socket.close()};var Ce={OPEN:"open",BREAKPOINT:"breakpoint",LOGIN:"login",RESUME_BREAKPOINT:"resume_breakpoint",LOGIN_RESPONSE:"login_response",LOG:"log",LOGS:"logs",EXCEPTION:"exception",USER_LOGIN:"user_login",USER_LOGOUT:"user_logout",ONLINE_USERS:"online_users",SET_FILE_ID:"set_file_id",INTO_FILE_ID:"into_file_id",PING:"ping",PONG:"pong"},F={DO_SAVE:"doSave",DO_TEST:"doTest",LOGINED:"logined",LOGOUT:"logout",DO_DOWNLOAD:"do-download",DO_UPLOAD:"do-upload",DO_PUSH:"do-push",DO_RECENT:"do-recent",OPEN:"open",SELECT_NAVBAR_BY_ITEM:"select-navbar-by-item",OPEN_WITH_ID:"open-with-id",OPEN_ITEM:"open-item",DELETE_FILE:"delete-file",DEBUG_CONTINUE:"debug-continue",DEBUG_SETPINTO:"debug-setpinto",SWITCH_THEME:"switch-theme",OPEN_GROUP:"open-group",SWITCH_TOOLBAR:"switch-toolbar",STATUS:"status",MESSAGE:"message",CLOSE:"close",OPEN_EMPTY:"open-empty",LOAD_RESOURCES:"load-resources",DO_SEARCH:"doSearch",NOTIFY:"notify",RELOAD_RESOURCES:"reload-resources",RELOAD_RESOURCES_FINISH:"reload-resources-finish",LOAD_RESOURCES_FINISH:"load-resources-finish",ADD_FOOTER_TOOLBAR:"add-footer-toolbar"};const ro=R("div",{class:"magic-mounts"},null,-1),co={props:{config:{type:Object,required:!0}},setup(e){const t=e;lo(),Ke("bus",T),self.MonacoEnvironment={getWorker:function(k,B){return B==="json"?new is:new os}},t.config.header=t.config.header||{};const a=P(!1),n=P(null),s=P(null),i=P(!1),o=P(null);Ke("ELEMENT_ROOT",s),Ke("activateUserFiles",P({}));let l=null;const r=t.config;M.BASE_URL=r.baseURL||"",M.SERVER_URL=r.serverURL||"";let u=`${location.protocol}//${location.host}${location.pathname}`.replace("/index.html","");M.BASE_URL.startsWith("http")?u=M.BASE_URL:M.BASE_URL.startsWith("/")?u=`${location.protocol}/${location.host}${M.BASE_URL}`:u=u+"/"+M.BASE_URL,r.blockClose!==!1&&(window.onbeforeunload=()=>"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002");const p=r.request||{beforeSend:k=>k,onError:k=>Promise.reject(k)};j.getAxios().interceptors.request.use(k=>p.beforeSend&&p.beforeSend(k)||k,k=>p.onError&&p.onError(k)||Promise.reject(k));const g=r.response||{onSuccess:k=>k,onError:k=>Promise.reject(k)};j.getAxios().interceptors.response.use(k=>g.onSuccess&&g.onSuccess(k)||k,k=>g.onError&&g.onError(k)||Promise.reject(k)),j.setBaseURL(M.BASE_URL),M.AUTO_SAVE=r.autoSave!==!1,T.status("message.loadClass"),Ke("i18n.format",c);const f=()=>new Promise(k=>{j.sendGet("/plugins").success(B=>Promise.all((B||[]).filter(z=>z.javascriptFilename).map(z=>new Promise(Q=>{T.status("plugin.loading",!0,z.name),si(rt(u+"/plugins/"+z.javascriptFilename)).then(()=>{M.PLUGINS.push(window[z.globalName]({i18n:{add:Ts,format:c},request:j,constants:M,Message:F,bus:T,modal:me,JavaClass:ae,monaco:ls})),T.status("plugin.loaded",!0,z.name),Q()}).catch(le=>{T.status("plugin.loadFailed",!1,z.name),Q()})}))).then(()=>k())).error(()=>k())}),y=gt().appContext.app;Promise.all([ae.initClasses(),ae.initImportClass(),f()]).then(()=>T.status("message.loadClassFinish")).catch(k=>{T.status("message.loadClassError")}).finally(()=>{M.PLUGINS.forEach(k=>{k.datasources&&k.datasources.filter(B=>B.component).forEach(B=>{y.component(`magic-datasource-${B.type}`,B.component)})}),i.value=!0});const E=t.config.options||[];Ke("options",E),j.sendGet("/options").success(k=>{k.forEach(B=>E.push(B))});const L=()=>{M.LOGINED=!0,l=new zt(rt(u.replace(/^http/,"ws")+"/console")),be(()=>n.value.loadResources())};T.$on(F.LOGINED,L);const I=()=>{fetch("https://console.ssssssss.org.cn/latest?group=org.ssssssss&artifactId=magic-api&from="+M.MAGIC_API_VERSION_TEXT).then(k=>{t.config.checkUpdate!==!1&&k.status===200&&k.json().then(B=>{B.version&&B.version!=="unknown"&&M.config.version!==B.version?(T.status("message.newVersionRelease",!0,B.version),B.version!==$e.get(M.IGNORE_VERSION)&&T.$emit(F.NOTIFY,{title:c("message.tips"),icon:"warning",content:c("message.versionUpdate",B.version),buttons:[{title:c("message.changelog"),onClick:()=>{window.open("http://www.ssssssss.org/magic-api/changelog.html")}},{title:c("message.ignore"),onClick:()=>{$e.set(M.IGNORE_VERSION,B.version)}}]})):T.status("message.versionLastest")})})},m=()=>r.getMagicTokenValue&&r.getMagicTokenValue()||$e.get(M.STORE.token)||M.HEADER_MAGIC_TOKEN_VALUE,S=()=>new Promise(k=>{M.HEADER_MAGIC_TOKEN_VALUE=m(),T.status("message.tryAutoLogin"),j.sendPost("/login").success(B=>{a.value=!B,B&&be(()=>{T.status("message.autoLoginSuccess"),T.$emit(F.LOGINED)})}).end(k)}),O=()=>{typeof hideMaLoading=="function"&&hideMaLoading()},A=()=>{j.execute({url:"/config.json",method:"get"}).then(k=>{if(M.config=k.data,t.config.inJar&&location.href.indexOf(k.data.web)>-1){let B=location.href.substring(0,location.href.indexOf(k.data.web));M.SERVER_URL=rt(B+"/"+(k.data.prefix||""))}M.config.version&&M.config.version!==M.MAGIC_API_VERSION_TEXT&&(T.status("message.versionConflict",!1,M.MAGIC_API_VERSION_TEXT,M.config.version),T.$emit(F.NOTIFY,{icon:"error",title:c("message.versionCheck"),content:c("message.versionConflict",M.MAGIC_API_VERSION_TEXT,M.config.version)})),S().then(()=>{O(),I()})}).catch(k=>{console.error(k),O(),o.value=c("message.loadConfigError")})},U=()=>{const k=document.body;ce.bind(k,ce.Ctrl|ce.S,()=>T.$emit(F.DO_SAVE,!0)),ce.bind(k,ce.Ctrl|ce.Q,()=>T.$emit(F.DO_TEST)),ce.bind(k,ce.Ctrl|ce.E,()=>T.$emit(F.DO_RECENT)),ce.bind(k,ce.F8,()=>T.$emit(F.DEBUG_CONTINUE)),ce.bind(k,ce.F6,()=>T.$emit(F.DEBUG_SETPINTO)),ce.bind(k,ce.Ctrl|ce.Shift|ce.F,()=>T.$emit(F.DO_SEARCH))};pt(()=>{U()}),Xn(()=>ce.unbind());const N=We({});return ha("default",ws),ha("dark",ks),Object.keys(r.themes||{}).forEach(k=>{ha(k,r.themes[k])}),M.THEME=r.theme||"default",M.DEFAULT_EXPAND=r.defaultExpand!==!1,M.JDBC_DRIVERS=r.jdbcDrivers||M.JDBC_DRIVERS,M.DATASOURCE_TYPES=r.datasourceTypes||M.DATASOURCE_TYPES,r.editorFontFamily!==void 0&&(M.EDITOR_FONT_FAMILY=r.editorFontFamily),r.editorFontSize!==void 0&&(M.EDITOR_FONT_SIZE=r.editorFontSize),M.FONT_LIGATURES=r.fontLigatures!==!1,r.logMaxRows!==void 0&&(M.LOG_MAX_ROWS=Math.max(r.logMaxRows,10)),r.decorationTimeout!==void 0&&(M.DECORATION_TIMEOUT=r.decorationTimeout),T.$on(F.MESSAGE,(k,B)=>{l&&(B?l.send(`${k},${B}`):l.send(k))}),T.$event(Ce.OPEN,()=>{M.CLIENT_ID=ei(16),be(()=>T.send(Ce.LOGIN,[m(),M.CLIENT_ID].join(",")))}),T.$event(Ce.LOGIN_RESPONSE,([k,B])=>{k==="1"&&(M.user=B)}),T.$on(F.LOGOUT,()=>{a.value=!0,l&&l.close(),l=null}),(k,B)=>{const z=b("magic-login"),Q=b("magic-header"),le=b("magic-main"),oe=b("magic-status-bar"),ye=b("magic-notify");return v(),C("div",{class:"magic-editor",style:Fe(h(N)),onContextmenu:B[2]||(B[2]=Se(()=>{},["prevent"])),ref_key:"root",ref:s},[vt(_(z,{value:a.value,"onUpdate:value":B[0]||(B[0]=Te=>a.value=Te),error:o.value,"onUpdate:error":B[1]||(B[1]=Te=>o.value=Te)},null,8,["value","error"]),[[It,a.value]]),i.value?(v(),H(Q,{key:0,themeStyle:h(N),header:h(r).header,title:h(r).title},null,8,["themeStyle","header","title"])):W("",!0),i.value?(v(),H(le,{key:1,ref_key:"componentMain",ref:n,onOnLoad:A},null,512)):W("",!0),i.value?(v(),H(oe,{key:2,config:h(r)},null,8,["config"])):W("",!0),i.value?(v(),H(ye,{key:3})):W("",!0),ro],36)}}};var uo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:co});var q=(e,t)=>{const a=e.__vccOpts||e;for(const[n,s]of t)a[n]=s;return a};const po={props:{menus:Array,onDestory:Function,position:Object},data(){return{style:{left:this.position.x+"px",top:this.position.y+"px",element:P(null)}}},mounted(){document.addEventListener("click",this.onMouseup);const e=document.querySelector(".magic-editor").getBoundingClientRect(),t=e.x+e.width,a=e.y+e.height,n=this.$el.getBoundingClientRect();n.x+n.width>t&&(this.style.left=`${t-n.width}px`),n.y+n.height>a&&(this.style.top=`${a-n.height}px`)},unmounted(){document.removeEventListener("click",this.onMouseup)},methods:{onMouseup(){this.onDestory&&this.onDestory()}}},_o=["onClick"],ho={key:0,class:"magic-context-menu-icon"},fo={class:"magic-context-menu-icon right"},mo={class:"magic-context-menu none-select"},go=["onClick"],vo={key:0,class:"magic-context-menu-icon"};function Eo(e,t,a,n,s,i){const o=b("magic-icon");return v(),C("ul",{class:"magic-context-menu none-select",style:Fe(s.style),ref:"element"},[(v(!0),C(ee,null,ue(a.menus,(l,r)=>(v(),C("li",{key:r,class:Ee({divided:l.divided}),onClick:Se(()=>{i.onMouseup(),l.onClick&&l.onClick()},["stop"])},[a.menus.some(u=>u.icon)?(v(),C("span",ho,[l.icon?(v(),H(o,{key:0,icon:l.icon,size:"12px"},null,8,["icon"])):W("",!0)])):W("",!0),R("label",null,$(l.label),1),l.children?(v(),C(ee,{key:1},[R("span",fo,[_(o,{icon:"right",size:"12px"})]),R("ul",mo,[(v(!0),C(ee,null,ue(l.children,(u,p)=>(v(),C("li",{key:p,class:Ee({divided:u.divided}),onClick:Se(()=>{i.onMouseup(),u.onClick&&u.onClick()},["stop"])},[l.children.some(g=>g.icon)?(v(),C("span",vo,[u.icon?(v(),H(o,{key:0,icon:u.icon,size:"12px"},null,8,["icon"])):W("",!0)])):W("",!0),R("label",null,$(u.label),1)],10,go))),128))])],64)):W("",!0)],10,_o))),128))],4)}var Pn=q(po,[["render",Eo],["__scopeId","data-v-50740138"]]),bo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Pn});const yo={class:"magic-empty"},To={props:{text:{type:String,default:c("message.nodata")}},setup(e){return(t,a)=>(v(),C("div",yo,[R("p",null,$(e.text),1)]))}};var So=q(To,[["__scopeId","data-v-70308d5a"]]),Oo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:So});const xo={class:"icon"},Ro={props:{loading:Boolean,loadingText:{type:String,default:c("message.loading")},style:Object},setup(e){return(t,a)=>{const n=b("magic-icon");return e.loading?(v(),C("div",{key:0,class:"magic-loading",style:Fe(e.style)},[R("p",null,[R("span",xo,[_(n,{icon:"refresh",size:"20px"})]),he(" "+$(e.loadingText),1)])],4)):Et(t.$slots,"default",{key:1},void 0,!0)}}};var Ao=q(Ro,[["__scopeId","data-v-19c11c56"]]),Io=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ao});const Co={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:Array},setup(){return{instance:null,instancePromise:null}},mounted(){this.instance=je.createDiffEditor(this.$refs.editor,qe(fe({},this.editorConfig),{enableSplitViewResizing:!1,language:this.language,minimap:{enabled:!1},folding:!1,lineDecorationsWidth:20,wordWrap:"on",fixedOverflowWidgets:!1,fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),this.instance.setModel({original:je.createModel(this.value[0],this.language),modified:je.createModel(this.value[1],this.language)}),Ze(()=>this.language,()=>{nextTick(()=>this.instance.setModel({original:je.createModel(this.value[0],this.language),modified:je.createModel(this.value[1],this.language)}))})},methods:{getEditorDom(){return this.$refs.editor},getInstance(){return this.instance}},watch:{value(e){this.instance.setModel({original:je.createModel(e[0],this.language),modified:je.createModel(e[1],this.language)})}}},Lo={class:"magic-monaco-editor",ref:"editor"};function No(e,t,a,n,s,i){return v(),C("div",Lo,null,512)}var wo=q(Co,[["render",No],["__scopeId","data-v-59a04eab"]]),ko=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:wo});const Do={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:String,decorations:Array,readonly:{type:Boolean,default:!1},supportBreakpoint:{type:Boolean,default:!1},matches:String},setup(){return{instance:null,instancePromise:null}},emits:["update:value","change","update:decorations"],mounted(){this.instance=je.create(this.$refs.editor,qe(fe({},this.editorConfig),{language:this.language,minimap:{enabled:!1},folding:!0,lineDecorationsWidth:this.supportBreakpoint?35:void 0,wordWrap:"on",fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),Ze(()=>this.language,()=>{be(()=>this.instance.setModel(je.createModel(this.instance.getModel().getValue(),this.language)))}),this.instance.onDidChangeModelContent(e=>{this.$emit("update:value",this.instance.getValue()),this.$emit("change")}),this.instance.addAction({id:"editor.action.triggerSuggest.extension",label:c("editor.triggerSuggest"),precondition:"!suggestWidgetVisible && !markersNavigationVisible && !parameterHintsVisible && !findWidgetVisible",run:()=>{this.instance.trigger(null,"editor.action.triggerSuggest",{})}}),Xa.registerCommand("editor.action.scrollUp1Line",()=>{this.instance.setScrollTop(this.instance.getScrollTop()-22)}),this.instance.addCommand(_t.Alt|bt.US_SLASH,()=>{let e=this.instance.getAction("editor.action.triggerParameterHints"),t=this.instance.getAction("editor.action.triggerSuggest.extension");e.run().then(()=>{setTimeout(()=>{t.isSupported()&&t.run()},0)})},"!findWidgetVisible && !inreferenceSearchEditor && !editorHasSelection"),this.initKeys(),this.initDecorations()},methods:{getEditorDom(){return this.$refs.editor},getScrollTop(){return this.instance&&this.instance.getScrollTop()},setScrollTop(e){this.instance&&this.instance.setScrollTop(e)},match(){this.matches&&be(()=>{let e=this.instance.getModel().findMatches(this.matches);e&&e.length>0&&this.instance.setSelections(e.map(({range:t})=>({positionColumn:t.endColumn,positionLineNumber:t.endLineNumber,selectionStartColumn:t.startColumn,selectionStartLineNumber:t.startLineNumber})))})},initKeys(){[["editor.action.triggerParameterHints",_t.Alt|bt.US_SLASH],["editor.action.triggerSuggest",_t.Alt|bt.US_SLASH],["toggleSuggestionDetails",_t.Alt|bt.US_SLASH,rs.deserialize("suggestWidgetVisible && textInputFocus")],["editor.action.formatDocument",_t.CtrlCmd|_t.Alt|bt.KEY_L],["editor.action.marker.nextInFiles",_t.CtrlCmd|bt.F8]].forEach(t=>{var i;let a=t[0];const{handler:n,when:s}=(i=Xa.getCommand(a))!=null?i:{};if(n){let o=ua._coreKeybindings.findIndex(l=>l.command===a);o>0&&ua._coreKeybindings.splice(o,1),this.instance._standaloneKeybindingService.addDynamicKeybinding(a,t[1],n,s||t[2])}}),ua._cachedMergedKeybindings=null},getInstance(){return this.instance},initDecorations(){this.instance.onMouseDown(e=>{if(!e.target.element.classList.contains("codicon")&&e.target.detail&&e.target.detail.offsetX&&e.target.detail.offsetX>=0&&e.target.detail.offsetX<=65){var t=e.target.position.lineNumber;if(this.instance.getModel().getLineContent(t).trim()==="")return;let n=this.instance.getLineDecorations(t).filter(s=>s.options.linesDecorationsClassName==="breakpoints");n&&n.length>0?this.instance.getModel().deltaDecorations([n[0].id],[]):this.instance.getModel().deltaDecorations([],[{range:new it(t,1,t,1),options:{isWholeLine:!0,linesDecorationsClassName:"breakpoints",className:"breakpoint-line"}}]),this.updateDecoration()}})},appendDecoration(e){const t=this.instance.deltaDecorations([],e);return this.updateDecoration(),t},removedDecorations(e){this.instance.deltaDecorations(e,[]),this.updateDecoration()},updateDecoration(){this.$emit("update:decorations",this.instance.getModel().getAllDecorations())}},watch:{value(e){e!==this.instance.getValue()&&(this.instance.setValue(e||""),this.match(),this.$emit("change"))},matches(){this.match()}}},Mo={class:"magic-monaco-editor",ref:"editor"};function Po(e,t,a,n,s,i){return v(),C("div",Mo,null,512)}var Uo=q(Do,[["render",Po],["__scopeId","data-v-001a684a"]]),$o=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Uo});const Bo={props:{max:Number,min:Number,value:Number,direction:String,reverse:{type:Boolean,default:!1}},setup(e){return{style:P({[e.direction==="x"?"width":"height"]:(e.value||e.min)+"px"})}},mounted(){new ResizeObserver(this.updateCss).observe(this.$refs.resizer)},methods:{updateCss(){try{const e=this.$refs.resizer.parentElement;this.$refs.resizer.style.setProperty("--width",e.offsetWidth+"px"),this.$refs.resizer.style.setProperty("--height",e.offsetHeight+"px")}catch{}},mousedown(e){const t=this.direction==="x",a=t?e.clientX:e.clientY,n=e.target.parentElement.getBoundingClientRect();document.onmousemove=s=>{let i=t?n.width:n.height;t?this.reverse?i=a-s.clientX+n.width:i=s.clientX-a+n.width:this.reverse?i=s.clientY-a+n.height:i=a-s.clientY+n.height,i>=this.min&&i<=this.max&&(this.style[t?"width":"height"]=`${i}px`)},document.onmouseup=()=>{document.onmousemove=document.onmouseup=null},e.stopPropagation(),e.preventDefault()}}};function Fo(e,t,a,n,s,i){return v(),C("div",{class:Ee(`magic-resizer-${this.direction}`),style:Fe(n.style)},[Et(e.$slots,"default",{},void 0,!0),R("div",{class:Ee(["magic-resizer-event",{reverse:a.reverse}]),onMousedown:t[0]||(t[0]=(...o)=>i.mousedown&&i.mousedown(...o)),ref:"resizer"},null,34)],6)}var Ho=q(Bo,[["render",Fo],["__scopeId","data-v-032bc45e"]]),Vo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ho});const Go={class:"magic-navbar-item"},jo={props:{title:String,style:Object,show:{type:Boolean,default:!0},to:HTMLElement},setup(e){return(t,a)=>(v(),C("div",Go,[Et(t.$slots,"default",{},void 0,!0)]))}};var zo=q(jo,[["__scopeId","data-v-30388e35"]]),Yo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:zo}),qo="",Ko=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:qo});const Wo={"aria-hidden":"true",class:"magic-icon"},Xo=["xlink:href"],Jo={props:{prefix:{type:String,default:"magic-icon"},icon:String,size:String},setup(e){const t=e,a=pe(()=>t.icon&&t.icon.startsWith("#")?t.icon:`#${t.prefix}-${t.icon}`),n=pe(()=>t.icon&&t.icon.startsWith("#")?t.icon.substring(1):`${t.prefix}-${t.icon}`);return(s,i)=>(v(),C("svg",Wo,[R("use",{"xlink:href":h(a),class:Ee(h(n))},null,10,Xo)]))}};var Fa=q(Jo,[["__scopeId","data-v-15383e92"]]),Qo=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Fa}),Zo={props:{direction:{type:String,default:""},reverse:{type:Boolean,default:!1},defaultSelect:{type:Number,default:0},allowClose:{type:Boolean,default:!0},spliter:Boolean,value:Array,to:HTMLElement},setup(e,t){const a=P(e.defaultSelect);return{slots:pe(()=>t.slots.default()[0].children),navbars:pe(()=>t.slots.default()[0].children.flatMap(n=>n.props)),selectIndex:a}},methods:{select(e){this.selectIndex=e}},render(){const e=n=>{const s=parseInt(Math.random()*1e8),i=n.length*6;return re("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:22,height:i},[re("defs",re("path",{id:`path-text-${s}`,d:this.reverse?`M6,0 L6,${i}`:`M14,${i} L14,0`})),re("text",{fill:"var(--main-color)"},re("textPath",{"xlink:href":`#path-text-${s}`},n))])},t=n=>{if(this.spliter&&this.direction==="vertical"&&n.match(/\w/g)){const s=[];let i="",o=1,l;const r=n.split("");for(let u=0,p=r.length;u{const i=[re("div",{class:"magic-navbar-title"},[...t(n.title)])];n.icon&&i.push(re(Fa,{icon:n.icon}));const o=n.style||{};return n.show===!1&&(o.display="none"),re("li",{class:this.selectIndex===s?"selected":"",style:o,onClick:()=>{this.selectIndex===s&&this.allowClose?this.selectIndex=-1:this.selectIndex=s}},i)}))];return this.slots.forEach((n,s)=>{const i=s!==this.selectIndex||n.props.show===!1?{display:"none"}:{};this.to?a.push(re(qa,{to:this.to},re("div",{class:"magic-navbar-body",style:i},n))):a.push(re("div",{class:"magic-navbar-body",style:i},n))}),re("div",{class:`magic-navbar magic-navbar__${this.direction}`+(this.reverse?" reverse":"")},a)}},el=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zo}),tl="",al=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:tl}),nl={props:{tabs:Array,className:String,value:Object,allowClose:{type:Boolean}},emits:["update:value","change","close","item-contextmenu","before-change"],setup(e){const t=P({}),a=P({});function n(o,l,r){switch(r){case"dragstart":t.value=o,l.stopPropagation();break;case"dragenter":a.value=o,l.stopPropagation();break;case"dragend":if(t.value!==a.value){const u=e.tabs.indexOf(t.value),p=e.tabs.indexOf(a.value);e.tabs.splice(u,1),e.tabs.splice(p,0,t.value)}a.value={},l.stopPropagation();break;case"dragover":t.value!==a.value&&l.preventDefault();break}}const s=P({});function i(o){let l=o.wheelDelta||o.detail;s.value.value.el.scrollLeft+=l>0?-100:100}return{selectIndex:P(0),draggableItem:t,draggableTargetItem:a,tabDraggable:n,scrollbar:s,scrollbarHandler:i,scrollId:"",scrollItem:P(null)}},mounted(){be(()=>{this.scrollbar.value.el.addEventListener("DOMMouseScroll",this.scrollbarHandler,!1),this.scrollbar.value.el.addEventListener("mousewheel",this.scrollbarHandler,!1)})},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+""+parseInt(Math.random()*1e7),this.scrollItem=e,be(()=>{const t=document.querySelector("#"+this.scrollId);t&&t.scrollIntoView(!0)})}},destroyed(){be(()=>{this.scrollbar.value.el.removeEventListener("DOMMouseScroll",this.scrollbarHandler),this.scrollbar.value.el.removeEventListener("mousewheel",this.scrollbarHandler)})},render(){const e=this.tabs&&re("ul",this.tabs.map((t,a)=>{const n=[this.$slots.default({tab:t})];return this.allowClose&&n.push(re(Fa,{icon:"close",size:"12px",style:{marginLeft:"5px"},onClick:s=>{this.$emit("close",t),s.stopPropagation(),s.preventDefault()}})),re("li",{class:[this.value===t?"selected":"",t===this.draggableTargetItem?"draggable-target-item":""],id:this.scrollItem===t||this.scrollItem===t.id?this.scrollId:void 0,onClick:s=>{this.value!==t&&(this.$emit("before-change",this.value),this.$emit("update:value",t),this.$emit("change",t)),s.stopPropagation(),s.preventDefault()},onMousedown:s=>{s.which===2&&this.allowClose&&this.$emit("close",t)},onContextmenu:s=>{this.$emit("item-contextmenu",s,t,a),s.preventDefault()},draggable:!0,onDragenter:s=>this.tabDraggable(t,s,"dragenter"),onDragstart:s=>this.tabDraggable(t,s,"dragstart"),onDragend:s=>this.tabDraggable(t,s,"dragend"),onDragover:s=>this.tabDraggable(t,s,"dragover")},n)}));return this.scrollbar.value=e,re("div",{class:"magic-tab none-select"+(this.className?" "+this.className:"")},e)}},sl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:nl});const il={class:"magic-table-row"},Un={props:{title:String,row:Object,flex:String,width:String,align:String},setup(e){return(t,a)=>(v(),C("div",il,[Et(t.$slots,"default",{row:e.row})]))}};var ol=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Un}),ll="",rl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ll}),cl={props:{data:{type:Array,default:[]},width:String,border:{type:Boolean,default:!1},align:{type:String,default:"center"}},emits:["clickRow","contextmenu","loadNext"],render(){const e=this.$slots.default(),t=a=>{a=a||{};let n=[];if(a.width){let s=`width: ${a.width}`;!a.width.endsWith("%")&&!isNaN(a.width)&&(s+="px"),n.push(s),n.push("flex:none")}else a.flex&&n.push(`flex: ${a.flex}`);return(a.align||this.align)&&n.push(`justify-content: ${a.align||this.align};text-align: ${a.align||this.align}`),n.join(";")};return re("div",{class:"magic-table"+(this.border?" magic-table__border":"")},[re("div",{class:"magic-table-header none-select"},e.map(a=>re("div",{class:"magic-table-column",title:a.props.title,style:t(a.props)},re("span",a.props.title)))),re("div",{class:"magic-table-body",onScroll:a=>{a.target.scrollTop+a.target.offsetHeight+40>=a.target.scrollHeight&&this.$emit("loadNext")}},this.data.map((a,n)=>re(Un,{row:a,onClick:()=>{this.$emit("clickRow",n)}},{default:()=>e.map(s=>re("div",{class:"magic-table-column",onContextmenu:i=>{this.$emit("contextmenu",i,a),i.stopPropagation(),i.preventDefault()},style:t(s.props)},s.children.default({row:a})))})))])}},ul=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:cl}),pl="",dl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:pl}),_l={props:{data:Array,sort:Boolean,descending:Boolean,filter:String,filterText:Function,selected:Object,draggable:{type:Boolean,default:!1},onMove:{type:Function,defeault:()=>new Promise(e=>e(!0))}},emits:["drag","contextmenu","onMove","itemClick"],setup(e,t){const a=t.emit,n=We({item:{},itemParent:{},target:{},targetParent:{}});function s(i,o,l,r){function u(){return!(n.item===n.target||n.itemParent===n.target||!n.target.folder&&n.itemParent===n.targetParent)}switch(r){case"dragstart":n.item=o,n.itemParent=i,l.stopPropagation();break;case"dragenter":n.target=o,n.targetParent=i,l.stopPropagation();break;case"dragover":u()&&l.preventDefault();break;case"dragend":if(!u())break;e.onMove(o,n.target||n.targetParent).then(p=>{if(p){const g=n.itemParent||{children:e.data};g.children.splice(g.children.indexOf(o),1),n.target.folder?(n.target.children=n.target.children||[],n.target.children.push(n.item)):(n.targetParent.children=n.targetParent.children||[],n.targetParent.children.push(n.item)),e.sort&&$t(n.target.folder?n.target.children:n.targetParent.children,e.descending,"name"),n.target={},n.targetParent={}}}),l.stopPropagation();break}a("drag",r,n,l)}return e.sort&&($t(e.data,e.descending,"name","children"),Ze(()=>e.data,i=>{$t(e.data,e.descending,"name","children")}),Ze(()=>e.descending,i=>{$t(e.data,e.descending,"name","children")})),{draggableItem:n,itemDraggable:s}},data(){return{scrollId:"",scrollItem:P(null)}},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+""+parseInt(Math.random()*1e7),this.scrollItem=e;const t=a=>{let n=!1;for(const s in a){const i=a[s];if(n=i===e){i.opened!==void 0&&(i.opened=!0);break}else if(i.children&&i.children.length>0&&(n=t(i.children))){i.opened=!0;break}}return n};t(this.data)&&be(()=>{const a=document.querySelector("#"+this.scrollId);a&&a.scrollIntoView(!0)})}},render(){const e=a=>this.filter?this.filterText(He(a)).indexOf(this.filter)>-1||a.children&&a.children.some(n=>e(n)):!0,t=(a,n,s)=>{const i=s>0?{paddingLeft:`${s*17}px`}:{};return e(n)&&re("li",{onDblclick:o=>{n.folder&&(n.opened=!n.opened),o.stopPropagation(),o.preventDefault()},onClick:o=>{this.$emit("itemClick",n),o.stopPropagation(),o.preventDefault()},onContextmenu:o=>{this.$emit("contextmenu",n,o),o.stopPropagation(),o.preventDefault()},draggable:this.draggable,onDragenter:o=>this.itemDraggable(a,n,o,"dragenter"),onDragstart:o=>this.itemDraggable(a,n,o,"dragstart"),onDragend:o=>this.itemDraggable(a,n,o,"dragend"),onDragover:o=>this.itemDraggable(a,n,o,"dragover")},[re("div",{class:["magic-tree-item",n===this.draggableItem.target?"draggable-target-item":"",n===this.selected?"selected":""],style:i,id:this.scrollItem===n||this.scrollItem===n.id?this.scrollId:void 0},n.folder?this.$slots.folder({item:n}):this.$slots.file({item:n})),n.folder&&n.opened&&re("ul",{class:n.opened&&"opened"||"hide"},n.children&&n.children.map(o=>t(n,o,s+1)))])};return re("div",{class:"magic-tree none-select"},re("ul",{},this.data&&this.data.map(a=>t(null,a,0))))}},hl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:_l});const fl=["onMousedown"],ml={props:{value:{type:Boolean,default:!0},className:String,showClose:{type:Boolean,default:!0},shade:{type:Boolean,default:!0},padding:{type:String,default:"5px 10px"},height:{type:String,default:"auto"},width:{type:String,default:"auto"},moveable:{type:Boolean,default:!0},overflow:{type:String,default:"auto"},top:String,maxHeight:String,maxWidth:String,contentHeight:String,title:String,content:String,onClose:Function},emits:["update:value","onClose"],setup(e,{expose:t,emit:a}){const n=e,s=P(n.top||"auto"),i=P("auto"),o=P("relative"),l=P(null);function r(){a("update:value",!1)}const u=()=>{a("close"),typeof n.onClose=="function"&&n.onClose(),r()};let p,g=!1,f,y;function E(A){n.moveable&&(p=A,f=A.target.parentNode.getBoundingClientRect(),y=document.getElementsByClassName("magic-editor")[0].getBoundingClientRect(),g=!0)}function L(A){if(n.moveable&&g){let U=Math.min(Math.max(f.top+(A.pageY-p.pageY),y.y),y.y+y.height-f.height),N=Math.min(Math.max(f.left+(A.pageX-p.pageX),y.x),y.x+y.width-f.width);s.value=U+"px",i.value=N+"px",o.value="absolute"}}let I=!1;const m=()=>{!I&&l.value&&(o.value="absolute",i.value=l.value.getBoundingClientRect().x+"px"),I=!0};n.top&&Jn(m);const S=A=>{n.showClose&&A.keyCode===27&&u()};function O(A){g=!1}return t({close:u}),(A,U)=>{const N=b("magic-icon");return e.value?(v(),H(qa,{key:0,to:".magic-editor"},[R("div",{class:Ee(["magic-dialog",(e.shade?"magic-dialog__shade":"")+(e.className?" "+e.className:"")]),tabindex:"1",onMousemove:L,onMouseup:O,onKeydown:S},[R("div",{class:"magic-dialog-main",style:Fe({position:o.value,top:s.value,left:i.value,width:e.width,height:e.height,"max-width":e.maxWidth}),ref_key:"dialog",ref:l},[R("div",{class:Ee(["magic-dialog-header none-select",{moveable:e.moveable}]),onMousedown:E},[he($(e.title)+" ",1),e.showClose?(v(),C("span",{key:0,onMousedown:Se(u,["stop"])},[_(N,{icon:"close"})],40,fl)):W("",!0)],34),R("div",{class:"magic-dialog-body",style:Fe({padding:e.padding,"max-height":e.maxHeight,height:e.contentHeight,overflow:e.overflow})},[e.content?(v(),C(ee,{key:0},[he($(e.content),1)],64)):Et(A.$slots,"default",{key:1},void 0,!0)],4)],4)],34)])):W("",!0)}}};var gl=q(ml,[["__scopeId","data-v-3e8f0d71"]]),vl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:gl});const El={class:"magic-notify"},bl=["onClick"],yl=["innerHTML"],Tl=["innerHTML"],Sl={setup(e){const t={error:'',warning:'',info:''},a=We([]),n=i=>{const o=a.findIndex(l=>i.id===l.id);return o>-1&&a.splice(o,1),!0},s=i=>{i.icon=t[i.icon]||t.info,i.id=parseInt(Math.random()*1e7),a.push(i),i.duration&&setTimeout(()=>n(i),parseInt(i.duration))};return T.$on(F.NOTIFY,s),(i,o)=>{const l=b("magic-icon"),r=b("magic-button"),u=b("magic-button-group");return v(),C("div",El,[(v(!0),C(ee,null,ue(h(a),(p,g)=>(v(),C("div",{class:"magic-notify-item",key:g},[R("div",{class:"close",onClick:f=>n(p)},[_(l,{icon:"close"})],8,bl),R("h3",null,[(v(),C("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",innerHTML:p.icon},null,8,yl)),he($(p.title),1)]),R("p",{innerHTML:p.content},null,8,Tl),p.buttons?(v(),H(u,{key:0},{default:w(()=>[(v(!0),C(ee,null,ue(p.buttons,(f,y)=>(v(),H(r,{key:y,value:f.title,type:"link",onClick:()=>n(p)&&f.onClick()},null,8,["value","onClick"]))),128))]),_:2},1024)):W("",!0)]))),128))])}}};var Ol=q(Sl,[["__scopeId","data-v-11ebc230"]]),xl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ol});const Rl={props:{align:{type:String,default:"left"}},setup(e){return(t,a)=>(v(),C("div",{class:Ee(["magic-button-group",e.align])},[Et(t.$slots,"default",{},void 0,!0)],2))}};var Al=q(Rl,[["__scopeId","data-v-70c60ab6"]]),Il=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Al});const Cl={props:{value:String,type:String},setup(e){return(t,a)=>(v(),C("button",{onClick:a[0]||(a[0]=Se(n=>t.$emit("onClick"),["stop"])),class:Ee(["magic-button",e.type]),type:"button"},$(e.value),3))}};var Ll=q(Cl,[["__scopeId","data-v-2e4c463a"]]),Nl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ll});const wl=["checked"],kl={props:{value:{type:[Number,Boolean],default:()=>!1},checkedHalf:{type:Boolean,default:!1}},setup(e){const t=new Date().getTime()+""+Math.floor(Math.random()*1e3);return(a,n)=>(v(),C("div",{class:"magic-checkbox",onClick:n[1]||(n[1]=Se(s=>a.$emit("click",s),["stop"]))},[R("input",{id:t,ref:"checkbox",type:"checkbox",onChange:n[0]||(n[0]=()=>{a.$emit("update:value",a.$refs.checkbox.checked),a.$emit("change",a.$refs.checkbox.checked)}),checked:e.value},null,40,wl),R("label",{for:t,class:Ee({checkedHalf:e.checkedHalf&&e.value})},null,2)]))}};var Dl=q(kl,[["__scopeId","data-v-22b807f1"]]),Ml=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Dl});const Pl={class:"magic-file"},Ul=["accept","multiple"],$l={props:{value:[Object,String],placeholder:{type:String,default:c("message.chooseFile")},accept:String,multiple:{type:Boolean,default:!1},border:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:t}){const a=e,n=P(null),s=P(null),i=()=>{n.value.files[0]&&(s.value=Array.from(n.value.files).map(o=>o.name).join(",")),t("update:value",a.multiple?n.value.files:n.value.files[0])};return(o,l)=>{const r=b("magic-input"),u=b("magic-icon");return v(),C("div",Pl,[R("input",{type:"file",style:{display:"none"},ref_key:"file",ref:n,onChange:i,accept:e.accept,multiple:e.multiple},null,40,Ul),_(r,{readonly:!0,style:{width:"100%"},placeholder:e.placeholder,onClick:()=>o.$refs.file.click(),value:s.value,border:e.border},null,8,["placeholder","onClick","value","border"]),_(u,{icon:"upload"})])}}};var Bl=q($l,[["__scopeId","data-v-62524fc2"]]),Fl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Bl});const Hl=["value","placeholder","readonly","type","autocomplete"],Vl={props:{value:[String,Number,Object],placeholder:String,defaultValue:[String,Number,Object],readonly:{type:Boolean,default:!1},type:{type:String,default:"text"},width:{type:String,default:"100%"},border:{type:Boolean,default:!0},onEnter:{type:Function,default:()=>{}}},emits:["update:value"],setup(e,{emit:t}){const a=e,n=pe(()=>a.type==="password"?"new-password":null);!a.value&&a.defaultValue&&t("update:value",a.defaultValue);const s={width:a.width};return(i,o)=>(v(),C("input",{class:Ee(["magic-input",{"magic-input__border":e.border}]),value:e.value,placeholder:e.placeholder,readonly:e.readonly,style:s,type:e.type,onInput:o[0]||(o[0]=l=>i.$emit("update:value",l.target.value)),autocomplete:h(n),onKeypress:o[1]||(o[1]=Qn(Se((...l)=>e.onEnter&&e.onEnter(...l),["stop"]),["enter"]))},null,42,Hl))}};var Gl=q(Vl,[["__scopeId","data-v-f43ad66a"]]),jl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Gl});const zl={key:0},Yl=["placeholder"],ql=["onClick"],Kl={props:{value:[Object,String,Number],options:Array,defaultSelect:[Object,String,Number],width:String,border:{type:Boolean,default:!0},placeholder:String,inputable:{type:Boolean,default:!1}},emits:["update:value","select"],setup(e,{emit:t}){const a=e;document.body.addEventListener("click",()=>s.value=!1);const n=P("-2px"),s=P(!1),i=P("auto"),o=P("0px"),l=pe(()=>{const f=a.options.find(y=>y.value===a.value)||a.options.find(y=>y.value===a.defaultSelect);return f&&f.text||""}),r=f=>{t("update:value",f),t("select",f),s.value=!1},u=se("ELEMENT_ROOT"),p=(f,y)=>y+f.scrollTop>0?f.scrollTop:f.parentElement?p(f.parentElement,y+f.scrollTop):f.scrollTop,g=(f,y)=>{n.value=-p(f,0)-1+"px",s.value=!0,be(()=>{o.value=-(window.pageXOffset+1)+"px",i.value=f.clientWidth+"px";let E=y.offsetHeight;y.offsetTop+E+20>u.value.offsetTop+u.value.offsetHeight&&(n.value=-(E+f.offsetHeight)+"px")})};return(f,y)=>{const E=b("magic-icon");return v(),C("div",{class:Ee([{inputable:e.inputable,border:e.border},"magic-select not-select"]),style:Fe({width:e.width}),onClick:y[2]||(y[2]=Se(L=>g(f.$refs.container,f.$refs.selectList),["stop"])),ref:"container"},[e.inputable?W("",!0):(v(),C("span",zl,$(h(l)),1)),e.inputable?vt((v(),C("input",{key:1,ref:"input","onUpdate:modelValue":y[0]||(y[0]=L=>Ka(value)?value.value=L:null),autocomplete:"off",type:"text",onInput:y[1]||(y[1]=L=>r(L.target.value)),placeholder:e.placeholder},null,40,Yl)),[[Zn,e.value]]):W("",!0),vt(R("ul",{style:Fe({width:i.value,marginTop:n.value,marginLeft:o.value}),ref:"selectList"},[(v(!0),C(ee,null,ue(e.options,L=>(v(),C("li",{key:L.value,onClick:Se(I=>r(L.value),["stop"])},$(L.text),9,ql))),128))],4),[[It,s.value]]),_(E,{icon:"arrow-bottom"})],6)}}};var Wl=q(Kl,[["__scopeId","data-v-249fb96c"]]),Xl=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Wl});const Jl=["placeholder","value"],Ql={props:{value:String,placeholder:String},setup(e){return(t,a)=>(v(),C("textarea",{class:"magic-textarea",placeholder:e.placeholder,value:e.value,onInput:a[0]||(a[0]=n=>t.$emit("update:value",n.target.value))},null,40,Jl))}};var Zl=q(Ql,[["__scopeId","data-v-ca6693f6"]]),er=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Zl});const tr={props:{users:Array,max:Number,size:{type:Number,default:22}},setup(e){const t=e,a=pe(()=>({height:t.size+"px",lineHeight:t.size+"px"})),n=pe(()=>t.users.slice(0,t.max||t.users.length));return(s,i)=>{const o=b("magic-avatar");return t.users&&t.users.length>0?(v(),C("div",{key:0,class:"magic-avatar-group",style:Fe(h(a))},[(v(!0),C(ee,null,ue(h(n),(l,r)=>(v(),H(o,{key:r,user:l,size:e.size},null,8,["user","size"]))),128)),t.users.length>h(n).length?(v(),H(o,{key:0,text:`${e.max}+`,size:e.size},null,8,["text","size"])):W("",!0)],4)):W("",!0)}}};var ar=q(tr,[["__scopeId","data-v-511f7f80"]]),nr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ar});const sr=["title"],ir={props:{user:Object,text:String,size:{type:Number,default:22}},setup(e){const t=e,a=["#1abc9c","#2ecc71","#3498db","#9b59b6","#16a085","#27ae60","#2980b9","#8e44ad","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],n=pe(()=>({width:t.size+"px",height:t.size+"px",lineHeight:t.size+"px",borderRadius:t.size/2+"px",backgroundColor:t.text&&"#bdc3c7"||a[ni(`${t.user.cid}`)%a.length]})),s=pe(()=>t.text||t.user.username.substring(0,1)),i=pe(()=>t.user?`${c("message.username")}\uFF1A${t.user.username} -IP\uFF1A${t.user.ip||"unknown"}`:void 0);return(o,l)=>(v(),C("div",{class:"magic-avatar",style:Fe(h(n)),title:h(i)},$(h(s)),13,sr))}};var or=q(ir,[["__scopeId","data-v-73f02f44"]]),lr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:or});const rr=["width"],cr=["x","fill"],ur={props:{icon:String|Array},setup(e){const t=e,a={GET:"#0cbb52",POST:"#FFB400",DELETE:["DEL","#EB2013"],PUT:"#097BED",function:["Fn","#9012FE"]},n=pe(()=>{let s=t.icon,i=Array.isArray(s);i||(s=a[t.icon],i=s!==void 0&&Array.isArray(s));const o=i?s[0]:t.icon,l=o.length*9,r=i?s[1]:s||"var(--main-icon-color)";return{width:l,color:r,text:o}});return(s,i)=>(v(),C("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:h(n).width,height:"12","font-size":"10","font-weight":"bolder","font-family":"inherit"},[R("text",{x:h(n).width/2,y:"8",fill:h(n).color,style:{"dominant-baseline":"middle","text-anchor":"middle"}},$(h(n).text),9,cr)],8,rr))}};var pr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ur});const dr={props:{opened:Object},setup(e){const t=[{title:"Json",icon:"json",component:te("magic-api-request-body")},{title:c("message.view"),icon:"structure",component:te("magic-api-request-structure")}];return(a,n)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return v(),H(i,{spliter:!0,direction:"vertical","allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(t,(o,l)=>_(s,dt({key:l},o),{default:w(()=>[(v(),H(te(o.component)))]),_:2},1040)),64))]),_:1})}}};var _r=q(dr,[["__scopeId","data-v-41b9c04c"]]),hr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:_r});const fr={setup(e){const t=se("info");return(a,n)=>{const s=b("magic-textarea");return v(),H(s,{value:h(t).description,"onUpdate:value":n[0]||(n[0]=i=>h(t).description=i)},null,8,["value"])}}};var mr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:fr});const gr={class:"magic-api-group"},vr={setup(e){const t=se("info"),a=[{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.groupOption"),component:te("magic-api-option")}],n=()=>{const s=t.value;j.sendJson("/resource/folder/save",{id:s.id,name:s.name,parentId:s.parentId,type:s.type,path:s.path,paths:s.paths,options:s.options})};return(s,i)=>{const o=b("magic-input"),l=b("magic-button"),r=b("magic-navbar-item"),u=b("magic-navbar");return v(),C(ee,null,[R("div",gr,[R("form",null,[R("label",null,$(h(c)("resource.form.groupName")),1),_(o,{value:h(t).name,"onUpdate:value":i[0]||(i[0]=p=>h(t).name=p),placeholder:h(c)("resource.form.placeholder.name",h(c)("api.name")),width:"250px"},null,8,["value","placeholder"]),R("label",null,$(h(c)("resource.form.groupPath")),1),_(o,{value:h(t).path,"onUpdate:value":i[1]||(i[1]=p=>h(t).path=p),placeholder:h(c)("resource.form.placeholder.path",h(c)("api.name")),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"]),_(l,{value:h(c)("message.save"),onOnClick:n},null,8,["value"])])]),_(u,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(a,(p,g)=>_(r,dt({key:g},p),{default:w(()=>[(v(),H(te(p.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Er=q(vr,[["__scopeId","data-v-07a9bc9f"]]),br=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Er});const yr={class:"magic-panel-api"},Tr={setup(e){const t=se("info"),a=P(-1);return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),l=b("magic-table-column"),r=b("magic-input"),u=b("magic-select"),p=b("magic-table");return v(),C("div",yr,[_(i,{index:a.value,"onUpdate:index":s[0]||(s[0]=g=>a.value=g),value:h(t).headers},null,8,["index","value"]),_(p,{data:h(t).headers,border:"",onClickRow:s[1]||(s[1]=g=>a.value=g),align:"center"},{default:w(()=>[_(l,{title:h(c)("message.required"),width:"65"},{default:w(({row:g})=>[_(o,{value:g.required,"onUpdate:value":f=>g.required=f},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:"Key"},{default:w(({row:g})=>[_(r,{value:g.name,"onUpdate:value":f=>g.name=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:"Value"},{default:w(({row:g})=>[_(r,{value:g.value,"onUpdate:value":f=>g.value=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:h(c)("message.parameterType"),width:"135"},{default:w(({row:g})=>[_(u,{options:n.$REQUEST_SIMPLE_TYPES,value:g.dataType,"onUpdate:value":f=>g.dataType=f,"default-select":n.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("message.defaultValue")},{default:w(({row:g})=>[_(r,{value:g.defaultValue,"onUpdate:value":f=>g.defaultValue=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validateType"),width:"115"},{default:w(({row:g})=>[_(u,{options:n.$VALIDATE_TYPES,value:g.validateType,"onUpdate:value":f=>g.validateType=f,"default-select":n.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("api.expression"),width:"220"},{default:w(({row:g})=>[_(r,{value:g.expression,"onUpdate:value":f=>g.expression=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validate"),width:"165"},{default:w(({row:g})=>[_(r,{value:g.error,"onUpdate:value":f=>g.error=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.description"),flex:"2"},{default:w(({row:g})=>[_(r,{value:g.description,"onUpdate:value":f=>g.description=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Sr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Tr});const Or={class:"magic-api-info"},xr={setup(e){const t=se("info"),a=[{title:c("api.navbars.parameter"),component:te("magic-api-parameter")},{title:c("api.navbars.header"),component:te("magic-api-header")},{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.body"),component:te("magic-api-body")},{title:c("api.navbars.option"),component:te("magic-api-option")},{title:c("api.navbars.description"),component:te("magic-api-description")}];return(n,s)=>{const i=b("magic-select"),o=b("magic-input"),l=b("magic-navbar-item"),r=b("magic-navbar");return v(),C(ee,null,[R("div",Or,[R("form",null,[R("label",null,$(h(c)("api.form.method")),1),_(i,{width:"100px",options:n.$REQUEST_METHODS,"default-select":n.$DEFAULT_REQUEST_METHOD,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),R("label",null,$(h(c)("api.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("api.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),R("label",null,$(h(c)("api.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("api.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(r,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(a,(u,p)=>_(l,dt({key:p},u),{default:w(()=>[(v(),H(te(u.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Rr=q(xr,[["__scopeId","data-v-8ed3340e"]]),Ar=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Rr});const Ir={class:"magic-panel-api"},Cr={setup(e){const t=se("info"),a=se("options")||[],n=pe(()=>a.map(o=>({text:o[0],value:o[0],description:o[1],defaultValue:o[2]}))),s=P(-1),i=(o,l)=>{const r=a.find(u=>u[0]===o);r&&(l.description=r[1]||"",l.value=r[2]||"")};return(o,l)=>{const r=b("magic-panel-common-toolbar"),u=b("magic-select"),p=b("magic-table-column"),g=b("magic-input"),f=b("magic-table");return v(),C("div",Ir,[_(r,{index:s.value,"onUpdate:index":l[0]||(l[0]=y=>s.value=y),value:h(t).options},null,8,["index","value"]),_(f,{data:h(t).options,border:"",onClickRow:l[1]||(l[1]=y=>s.value=y)},{default:w(()=>[_(p,{title:"Key",width:"20%"},{default:w(({row:y})=>[_(u,{options:h(n),value:y.name,"onUpdate:value":E=>y.name=E,"default-select":o.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1,inputable:"",onSelect:E=>i(E,y)},null,8,["options","value","onUpdate:value","default-select","onSelect"])]),_:1}),_(p,{title:"Value",width:"60%"},{default:w(({row:y})=>[_(g,{value:y.value,"onUpdate:value":E=>y.value=E,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(p,{title:h(c)("message.description"),width:"20%"},{default:w(({row:y})=>[_(g,{value:y.description,"onUpdate:value":E=>y.description=E,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Lr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Cr});const Nr={class:"magic-panel-api"},wr={setup(e){const t=P(-1),a=se("info");return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),l=b("magic-table-column"),r=b("magic-input"),u=b("magic-file"),p=b("magic-select"),g=b("magic-table");return v(),C("div",Nr,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=f=>t.value=f),value:h(a).parameters},null,8,["index","value"]),_(g,{data:h(a).parameters,border:"",onClickRow:s[1]||(s[1]=f=>t.value=f),align:"center"},{default:w(()=>[_(l,{title:h(c)("message.required"),width:"65"},{default:w(({row:f})=>[_(o,{value:f.required,"onUpdate:value":y=>f.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:"Key"},{default:w(({row:f})=>[_(r,{value:f.name,"onUpdate:value":y=>f.name=y,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:"Value"},{default:w(({row:f})=>[f.dataType==="MultipartFile"?(v(),H(u,{key:0,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"])):f.dataType==="MultipartFiles"?(v(),H(u,{key:1,value:f.value,"onUpdate:value":y=>f.value=y,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(v(),H(r,{key:2,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"]))]),_:1}),_(l,{title:h(c)("message.parameterType"),width:"135"},{default:w(({row:f})=>[_(p,{options:n.$REQUEST_PARAMETER_TYPES,value:f.dataType,"onUpdate:value":y=>f.dataType=y,"default-select":n.$DEFAULT_REQUEST_PARAMETER_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("message.defaultValue")},{default:w(({row:f})=>[_(r,{value:f.defaultValue,"onUpdate:value":y=>f.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validateType"),width:"115"},{default:w(({row:f})=>[_(p,{options:n.$VALIDATE_TYPES,value:f.validateType,"onUpdate:value":y=>f.validateType=y,"default-select":n.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("api.expression"),width:"220"},{default:w(({row:f})=>[_(r,{value:f.expression,"onUpdate:value":y=>f.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validate"),width:"165"},{default:w(({row:f})=>[_(r,{value:f.error,"onUpdate:value":y=>f.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.description"),flex:"2"},{default:w(({row:f})=>[_(r,{value:f.description,"onUpdate:value":y=>f.description=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var kr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:wr});const Dr={class:"magic-panel-api"},Mr={setup(e){const t=P(-1),a=se("info");return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),l=b("magic-table-column"),r=b("magic-select"),u=b("magic-table");return v(),C("div",Dr,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:h(a).paths},null,8,["index","value"]),_(u,{data:h(a).paths,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p),align:"center"},{default:w(()=>[_(l,{title:"Key"},{default:w(({row:p})=>[_(o,{value:p.name,"onUpdate:value":g=>p.name=g,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:"Value"},{default:w(({row:p})=>[_(o,{value:p.value,"onUpdate:value":g=>p.value=g,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:h(c)("message.parameterType"),width:"135"},{default:w(({row:p})=>[_(r,{options:n.$REQUEST_SIMPLE_TYPES,value:p.dataType,"onUpdate:value":g=>p.dataType=g,"default-select":n.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validateType"),width:"115"},{default:w(({row:p})=>[_(r,{options:n.$VALIDATE_TYPES,value:p.validateType,"onUpdate:value":g=>p.validateType=g,"default-select":n.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("api.expression"),width:"220"},{default:w(({row:p})=>[_(o,{value:p.expression,"onUpdate:value":g=>p.expression=g,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validate"),width:"165"},{default:w(({row:p})=>[_(o,{value:p.error,"onUpdate:value":g=>p.error=g,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.description"),flex:"2"},{default:w(({row:p})=>[_(o,{value:p.description,"onUpdate:value":g=>p.description=g,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Pr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Mr});const Ur={setup(e){const t=se("info"),a=se("opened"),n=()=>{const s=wn(t.value.requestBody,t.value.requestBodyDefinition);s&&(t.value.requestBodyDefinition=s,a.value.requestBodyTree=Jt(s))};return(s,i)=>{const o=b("magic-monaco-editor");return v(),H(o,{value:h(t).requestBody,"onUpdate:value":i[0]||(i[0]=l=>h(t).requestBody=l),language:"json",onChange:n},null,8,["value"])}}};var $r=q(Ur,[["__scopeId","data-v-5ab7df51"]]),Br=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:$r});const Fr=["onClick"],Hr=["title"],Vr={key:0,align:"center",style:{flex:"1"}},Gr={key:1,align:"center",style:{flex:"1"}},jr={setup(e){const t=se("opened"),a=pe(()=>{var s,i;return!t.value.requestBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.requestBodyDefinition)&&(t.value.requestBodyTree=Jt(t.value.item.requestBodyDefinition)),(t.value.requestBodyTree||[]).filter(o=>o.display)}),n=s=>{const i=t.value.requestBodyTree.findIndex(l=>l===s),o=s.level;s.expand=!s.expand;for(let l=i+1,r=t.value.requestBodyTree.length;lo)u.display=s.expand;else break}};return(s,i)=>{const o=b("magic-icon"),l=b("magic-table-column"),r=b("magic-checkbox"),u=b("magic-select"),p=b("magic-input"),g=b("magic-table");return v(),H(g,{data:h(a),border:""},{default:w(()=>[_(l,{title:h(c)("api.field")},{default:w(({row:f})=>[R("span",{style:Fe({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>n(f)},[f.folder?(v(),H(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):W("",!0)],12,Fr),R("span",{title:f.name||"-"},$(f.name||"-"),9,Hr)]),_:1},8,["title"]),_(l,{title:h(c)("message.required"),width:"65"},{default:w(({row:f})=>[_(r,{value:f.node.required,"onUpdate:value":y=>f.node.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.type"),width:"80"},{default:w(({row:f})=>[_(u,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:"Value",flex:"2"},{default:w(({row:f})=>{var y;return[f.folder?(v(),C("p",Vr,"-")):(v(),C("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},$(f.node.value),3))]}),_:1}),_(l,{title:h(c)("message.defaultValue")},{default:w(({row:f})=>[_(p,{value:f.node.defaultValue,"onUpdate:value":y=>f.node.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validateType"),width:"115"},{default:w(({row:f})=>[_(u,{options:s.$VALIDATE_TYPES,value:f.node.validateType,"onUpdate:value":y=>f.node.validateType=y,"default-select":s.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("api.expression")},{default:w(({row:f})=>[_(p,{value:f.node.expression,"onUpdate:value":y=>f.node.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("api.validate")},{default:w(({row:f})=>[_(p,{value:f.node.error,"onUpdate:value":y=>f.node.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.description")},{default:w(({row:f})=>[f.name?(v(),H(p,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(v(),C("p",Gr,"-"))]),_:1},8,["title"])]),_:1},8,["data"])}}};var zr=q(jr,[["__scopeId","data-v-bda6618c"]]),Yr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:zr});const qr=["src"],Kr={setup(e){const t=se("info"),a=se("opened"),n=P(null),s=se("ELEMENT_ROOT"),i=pe(()=>new ie(t.value.responseBody||"").beautify()),o=pe(()=>{if(a.value.responseBlob){const r=a.value.responseHeaders["content-disposition"];if(r){const u=r.replace(/.*filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,"$1");ya(a.value.responseBlobValue,u);return}return URL.createObjectURL(a.value.responseBlobValue)}}),l=r=>{const u=getComputedStyle(s.value),p=n.value.contentWindow.document.body.style;p.color=u.getPropertyValue("--main-color"),p.backgroundColor=u.getPropertyValue("--main-background-color")};return(r,u)=>{const p=b("magic-monaco-editor"),g=b("magic-empty");return h(a).responseBlob?h(o)?(v(),C("iframe",{key:1,src:h(o),onLoad:l,ref_key:"iframe",ref:n},null,40,qr)):(v(),H(g,{key:2,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"])):(v(),H(p,{key:0,value:h(i),"onUpdate:value":u[0]||(u[0]=f=>Ka(i)?i.value=f:null),language:"json",readonly:!0},null,8,["value"]))}}};var Wr=q(Kr,[["__scopeId","data-v-bbc94624"]]),Xr=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Wr});const Jr=["title"],Qr=["title"],Zr={setup(e){const t=se("opened"),a=pe(()=>Object.keys(t.value.responseHeaders||{}).map(n=>({key:n,value:t.value.responseHeaders[n]})));return(n,s)=>{const i=b("magic-table-column"),o=b("magic-table");return v(),H(o,{data:h(a),border:""},{default:w(()=>[_(i,{title:"Key"},{default:w(({row:l})=>[R("span",{title:l.key},$(l.key),9,Jr)]),_:1}),_(i,{title:"Value"},{default:w(({row:l})=>[R("span",{title:l.value},$(l.value),9,Qr)]),_:1})]),_:1},8,["data"])}}};var ec=q(Zr,[["__scopeId","data-v-76813707"]]),tc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ec});const ac=["onClick"],nc={key:0,align:"center",style:{flex:"1"}},sc={key:1,align:"center",style:{flex:"1"}},ic={setup(e){const t=se("opened"),a=s=>{const i=t.value.responseBodyTree.findIndex(l=>l===s),o=s.level;s.expand=!s.expand;for(let l=i+1,r=t.value.responseBodyTree.length;lo)u.display=s.expand;else break}},n=pe(()=>{var s,i;return!t.value.responseBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.responseBodyDefinition)&&(t.value.responseBodyTree=Jt(t.value.item.responseBodyDefinition)),(t.value.responseBodyTree||[]).filter(o=>o.display)});return(s,i)=>{const o=b("magic-icon"),l=b("magic-table-column"),r=b("magic-select"),u=b("magic-input"),p=b("magic-table"),g=b("magic-empty");return h(n).length?(v(),H(p,{key:0,data:h(n),border:""},{default:w(()=>[_(l,{title:h(c)("api.field")},{default:w(({row:f})=>[R("span",{style:Fe({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>a(f)},[f.folder?(v(),H(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):W("",!0)],12,ac),R("span",null,$(f.name||"-"),1)]),_:1},8,["title"]),_(l,{title:h(c)("message.type"),width:"80"},{default:w(({row:f})=>[_(r,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:"Value",flex:"3"},{default:w(({row:f})=>{var y;return[f.folder?(v(),C("p",nc,"-")):(v(),C("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},$(f.node.value),3))]}),_:1}),_(l,{title:h(c)("message.description")},{default:w(({row:f})=>[f.name?(v(),H(u,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(v(),C("p",sc,"-"))]),_:1},8,["title"])]),_:1},8,["data"])):(v(),H(g,{key:1,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"]))}}};var oc=q(ic,[["__scopeId","data-v-051e4f5a"]]),lc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:oc});const rc={class:"magic-panel-api-response"},cc={props:{opened:Object},setup(e){const t=[{title:c("message.responseBody"),component:te("magic-api-response-body")},{title:c("message.responseHeader"),component:te("magic-api-response-header")},{title:c("message.responseStructure"),component:te("magic-api-response-structure")}];return(a,n)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return v(),C("div",rc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(t,(o,l)=>_(s,{key:l,title:o.title},{default:w(()=>[(v(),H(es,null,[(v(),H(te(o.component),{opened:e.opened},null,8,["opened"]))],1024))]),_:2},1032,["title"])),64))]),_:1},512)])}}};var uc=q(cc,[["__scopeId","data-v-a23b6466"]]),pc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:uc});const dc={class:"magic-panel-global"},_c={setup(e){const t=P(M.GLOBAL),a=P(-1);return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),l=b("magic-table-column"),r=b("magic-table");return v(),C("div",dc,[_(i,{index:a.value,"onUpdate:index":s[0]||(s[0]=u=>a.value=u),value:t.value.headers},null,8,["index","value"]),_(r,{data:t.value.headers,border:"",onClickRow:s[1]||(s[1]=u=>a.value=u)},{default:w(()=>[_(l,{title:"Key"},{default:w(({row:u})=>[_(o,{value:u.name,"onUpdate:value":p=>u.name=p,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:"Value"},{default:w(({row:u})=>[_(o,{value:u.value,"onUpdate:value":p=>u.value=p,border:!1},null,8,["value","onUpdate:value"])]),_:1})]),_:1},8,["data"])])}}};var hc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:_c});const fc={class:"magic-panel-global"},mc={setup(e){const t=P(-1),a=P(M.GLOBAL);return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),l=b("magic-table-column"),r=b("magic-file"),u=b("magic-table");return v(),C("div",fc,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:a.value.parameters},null,8,["index","value"]),_(u,{data:a.value.parameters,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p)},{default:w(()=>[_(l,{title:"Key"},{default:w(({row:p})=>[_(o,{value:p.name,"onUpdate:value":g=>p.name=g,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(l,{title:"Value"},{default:w(({row:p})=>[p.dataType==="MultipartFile"?(v(),H(r,{key:0,value:p.value,"onUpdate:value":g=>p.value=g,border:!1},null,8,["value","onUpdate:value"])):p.dataType==="MultipartFiles"?(v(),H(r,{key:1,value:p.value,"onUpdate:value":g=>p.value=g,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(v(),H(o,{key:2,value:p.value,"onUpdate:value":g=>p.value=g,border:!1},null,8,["value","onUpdate:value"]))]),_:1})]),_:1},8,["data"])])}}};var gc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:mc});const vc={class:"magic-global"},Ec={setup(e){const t=[{title:"\u5168\u5C40\u8BF7\u6C42\u53C2\u6570",component:te("magic-global-parameter")},{title:"\u5168\u5C40\u8BF7\u6C42Header",component:te("magic-global-header")}];return(a,n)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return v(),C("div",vc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(t,(o,l)=>_(s,dt({key:l},o),{default:w(()=>[(v(),H(te(o.component)))]),_:2},1040)),64))]),_:1},512)])}}};var bc=q(Ec,[["__scopeId","data-v-03e7bbcc"]]),yc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:bc});const Tc={props:{value:Array,index:Number},emits:["update:index"],setup(e,{emit:t}){const a=e,n=[{title:c("message.addRow"),icon:"plus",onClick(){a.value.push({}),t("update:index",a.value.length-1)}},{title:c("message.removeRow"),icon:"minus",onClick(){a.value.length>0&&(a.value.splice(a.index==-1?a.value.length-1:a.index,1),t("update:index",-1))}}];return(s,i)=>{const o=b("magic-panel-toolbar");return v(),H(o,{toolbars:n})}}};var Sc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Tc});const Oc={class:"magic-panel-toolbar"},xc=["title","onClick"],Rc={props:{toolbars:Array},setup(e){const t=a=>{a.selectable?a.disabled!==!0&&(a.selected=a.selected!==!0,a.onSelect&&a.onSelect(a.selected)):a.disabled!==!0&&a.onClick()};return(a,n)=>{const s=b("magic-icon");return v(),C("ul",Oc,[(v(!0),C(ee,null,ue(e.toolbars,(i,o)=>(v(),C("li",{key:o,title:i.title,onClick:Se(l=>t(i),["stop"]),class:Ee({disabled:i.disabled,selected:i.selected})},[_(s,{icon:i.icon},null,8,["icon"])],10,xc))),128))])}}};var Ac=q(Rc,[["__scopeId","data-v-56150b69"]]),Ic=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Ac});const Cc={class:"magic-resource-choose"},Lc={key:0},Nc={key:2},wc={props:{value:[Array,Object],type:String,single:{type:Boolean,default:()=>!1},file:{type:Boolean,default:()=>!0}},emits:["update:value"],setup(e,{expose:t,emit:a}){const n=e,s=se("resources"),i=se("service"),o=P([]),l=()=>{let E=[],L=I=>{I.id.endsWith("-root")?E.push({type:"root",id:I.type}):E.push({type:I.folder?"group":I.type,id:I.id}),I.children&&I.children.filter(m=>m.selected).forEach(m=>L(m))};o.value.filter(I=>I.selected).forEach(I=>L(I)),a("update:value",n.single?E[0]:E)},r=(E,L)=>{let I=[];return E&&E.filter(m=>m.id).forEach(m=>{var S;if(m.folder||n.file){if(m.folder)m.icon="list";else{const O=(S=i[L.type])==null?void 0:S.getIcon;m.icon=O&&O(m)||L.icon,m.textIcon=O!==void 0,m.type=L.type}I.push(m)}m.folder&&m.children&&(m.children=r(m.children,L))}),I},u=E=>{let L=E,I=[],m=S=>{S.forEach(O=>{O.id===L?(I.push(O),L=O.parentId||O.groupId,m(o.value)):O.children&&O.children.length>0&&m(O.children)})};return m(o.value),I},p=(E,L)=>{L!==void 0&&(E.selected=L);let I=m=>{m.selected=n.single?!1:E.selected,m.checkedHalf=n.single?!1:!E.selected,m.children&&m.children.forEach(S=>I(S))};E.children&&E.children.forEach(m=>I(m)),E.folder&&(E.checkedHalf=!1),u(E.folder?E.parentId:E.groupId).forEach(m=>{m.selected=n.single?!1:m.children.some(S=>S.selected),m.checkedHalf=n.single?!1:m.children.some(S=>!S.selected||S.checkedHalf)}),n.single?a("update:value",E.selected?E:void 0):l()},g=E=>p(E,!E.selected);return s().filter(E=>!n.type||n.type===E.navbar.type).forEach(E=>{const L=E.navbar.type,I=r(E.tree,E.navbar);I.forEach(m=>{m.folder?m.parentId=L+"-root":m.groupId=L+"-root"}),o.value.push({icon:E.navbar.icon,name:E.navbar.title,iconClass:"root",folder:!0,opened:!0,type:E.navbar.type,id:L+"-root",children:I})}),t({selectAll:E=>at(o.value,L=>{L.checkedHalf=!1,L.selected=E,L.children&&L.children.forEach(I=>I.selected=E),l()}),expand:E=>at(o.value,L=>{L.folder&&(L.opened=E)})}),(E,L)=>{const I=b("magic-checkbox"),m=b("magic-icon"),S=b("magic-text-icon"),O=b("magic-tree");return v(),C("div",Cc,[_(O,{data:o.value,sort:!1,onItemClick:g},{folder:w(({item:A})=>[_(I,{value:A.selected,"onUpdate:value":U=>A.selected=U,"checked-half":A.checkedHalf,onChange:U=>p(A)},null,8,["value","onUpdate:value","checked-half","onChange"]),_(m,{icon:A.opened?"arrow-bottom":"arrow-right",onClick:Se(U=>A.opened=!A.opened,["stop"])},null,8,["icon","onClick"]),_(m,{icon:A.icon,class:Ee(A.iconClass)},null,8,["icon","class"]),R("label",null,$(A.name),1),A.path?(v(),C("span",Lc,"("+$(A.path)+")",1)):W("",!0)]),file:w(({item:A})=>[_(I,{value:A.selected,"onUpdate:value":U=>A.selected=U,"checked-half":A.checkedHalf,onChange:U=>p(A)},null,8,["value","onUpdate:value","checked-half","onChange"]),A.textIcon?(v(),H(S,{key:0,icon:A.icon},null,8,["icon"])):(v(),H(m,{key:1,icon:A.icon},null,8,["icon"])),R("label",null,$(A.name),1),A.path?(v(),C("span",Nc,"("+$(A.path)+")",1)):W("",!0)]),_:1},8,["data"])])}}};var kc=q(wc,[["__scopeId","data-v-4852fc0e"]]),Dc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:kc});const Mc={class:"magic-form-row"},Pc={class:"magic-form-row"},Uc=R("label",null,"Key",-1),$c={class:"magic-form-row"},Bc=R("label",null,"URL",-1),Fc={class:"magic-form-row"},Hc={class:"magic-form-row"},Vc={class:"magic-form-row"},Gc={class:"magic-form-row"},jc={class:"magic-form-row"},zc=R("label",null,"maxRows",-1),Yc={class:"magic-form-row"},qc={props:{info:Object},setup(e){const{info:t}=e,a=P(JSON.stringify(t.properties||{}));return Ze(a,n=>{try{t.properties=JSON.parse(n)}catch{t.properties={}}}),(n,s)=>{const i=b("magic-input"),o=b("magic-select"),l=b("magic-monaco-editor");return v(),C(ee,null,[R("div",Mc,[R("label",null,$(h(c)("message.name")),1),_(i,{value:e.info.name,"onUpdate:value":s[0]||(s[0]=r=>e.info.name=r),placeholder:h(c)("datasource.form.placeholder.name")},null,8,["value","placeholder"])]),R("div",Pc,[Uc,_(i,{value:e.info.key,"onUpdate:value":s[1]||(s[1]=r=>e.info.key=r),placeholder:h(c)("datasource.form.placeholder.key")},null,8,["value","placeholder"])]),R("div",$c,[Bc,_(i,{value:e.info.url,"onUpdate:value":s[2]||(s[2]=r=>e.info.url=r),placeholder:h(c)("datasource.form.placeholder.url")},null,8,["value","placeholder"])]),R("div",Fc,[R("label",null,$(h(c)("message.username")),1),_(i,{value:e.info.username,"onUpdate:value":s[3]||(s[3]=r=>e.info.username=r),placeholder:h(c)("datasource.form.placeholder.username")},null,8,["value","placeholder"])]),R("div",Hc,[R("label",null,$(h(c)("message.password")),1),_(i,{value:e.info.password,"onUpdate:value":s[4]||(s[4]=r=>e.info.password=r),type:"password",placeholder:h(c)("datasource.form.placeholder.password")},null,8,["value","placeholder"])]),R("div",Vc,[R("label",null,$(h(c)("datasource.form.driver")),1),_(o,{inputable:"",value:e.info.driverClassName,"onUpdate:value":s[5]||(s[5]=r=>e.info.driverClassName=r),width:"100%",options:h(M).JDBC_DRIVERS.map(r=>({text:r,value:r})),placeholder:h(c)("datasource.form.placeholder.driver")},null,8,["value","options","placeholder"])]),R("div",Gc,[R("label",null,$(h(c)("datasource.form.type")),1),_(o,{inputable:"",value:e.info.type,"onUpdate:value":s[6]||(s[6]=r=>e.info.type=r),width:"100%",options:h(M).DATASOURCE_TYPES.map(r=>({text:r,value:r})),placeholder:h(c)("datasource.form.placeholder.type")},null,8,["value","options","placeholder"])]),R("div",jc,[zc,_(i,{value:e.info.maxRows,"onUpdate:value":s[7]||(s[7]=r=>e.info.maxRows=r),placeholder:h(c)("datasource.form.placeholder.maxRows"),"default-value":-1,type:"number"},null,8,["value","placeholder"])]),R("div",Yc,[R("label",null,$(h(c)("datasource.form.other")),1),_(l,{language:"json",value:a.value,"onUpdate:value":s[8]||(s[8]=r=>a.value=r),style:{height:"150px"}},null,8,["value"])])],64)}}};var Kc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:qc});const Wc={class:"magic-backup-file"},Xc={class:"magic-backup-file-diff-container"},Jc={props:{id:String},setup(e){const t=e,a=se("service"),n=P(""),s=P(!0),i=P(!0),o=We([]),l=P({}),r=P([]),u=P(""),p=()=>{u.value=a[l.value.type].language||"magicscript";const E=[];i.value=!0,n.value||E.push(new Promise(L=>j.sendGet("/resource/file/"+t.id).success(I=>(n.value=I)&&L()))),E.push(new Promise(L=>j.sendGet("/backup",{id:t.id,timestamp:l.value.createDate}).success(I=>(l.value.script=I)&&L()))),Promise.all(E).then(()=>{i.value=!1,r.value=[l.value.script,n.value.script]}).catch(L=>{console.error(L),i.value=!1})},g=()=>{s.value=!0,j.sendGet("/backup/"+t.id).success(E=>{E&&E.length>0&&(o.push(...E),l.value=o[0]||{},l.value&&p()),s.value=!1})};g(),Ze(()=>t.id,g);const f=()=>{const E=`${l.value.name}(${Xe(l.value.createDate)})`;j.sendPost("/backup/rollback",{id:t.id,timestamp:l.value.createDate}).success(L=>{L?(me.alert(c("backup.rollbackSuccess",E)),bus.status("backup.rollbackSuccess",!0,E),bus.$emit(Message.LOAD_RESOURCES,l.value.type)):(me.alert(c("backup.rollbackFailed",E)),bus.status("backup.rollbackFailed",!1,E))})},y=E=>{l.value=o[E],p()};return(E,L)=>{const I=b("magic-table-column"),m=b("magic-table"),S=b("magic-button"),O=b("magic-monaco-diff-editor"),A=b("magic-loading"),U=b("magic-empty");return v(),H(A,{loading:s.value},{default:w(()=>[R("div",Wc,[h(o).length>0?(v(),C(ee,{key:0},[_(m,{data:h(o),border:!0,onClickRow:y},{default:w(()=>[_(I,{title:h(c)("message.date"),width:"160",class:"selected"},{default:w(({row:N})=>[he($(h(Xe)(N.createDate)),1)]),_:1},8,["title"]),_(I,{title:h(c)("history.operator"),width:"100"},{default:w(({row:N})=>[he($(N.createBy||"guest"),1)]),_:1},8,["title"])]),_:1},8,["data"]),R("div",Xc,[R("ul",null,[R("li",null,[he($(h(Xe)(l.value.createDate))+" by "+$(l.value.createBy||"guest")+" ",1),_(S,{value:h(c)("backup.rollback"),type:"active",onClick:f},null,8,["value"])]),R("li",null,$(h(c)("backup.current"))+"("+$(h(Xe)(n.value.updateTime||n.value.createTime))+" by "+$(n.value.updateBy||n.value.createBy||"guest")+")",1)]),i.value?(v(),H(A,{key:1,loading:i.value},null,8,["loading"])):(v(),H(O,{key:0,value:r.value,"onUpdate:value":L[0]||(L[0]=N=>r.value=N),language:u.value},null,8,["value","language"]))])],64)):(v(),H(U,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_:1},8,["loading"])}}};var Qc=q(Jc,[["__scopeId","data-v-5ad176c0"]]),Zc=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Qc});const eu={class:"magic-backup"},tu={class:"magic-backup-diff-container"},au={class:"magic-backup-diff-header"},nu={setup(e){const t=te("magic-backup-file"),a=P(!0),n=[{icon:"refresh",title:c("message.refresh"),onClick(){E()}},{icon:"copy",title:c("backup.full"),onClick(){j.sendPost("/backup/full").success(()=>{T.status("backup.backupSuccess"),E()})}}],s=P([]),i=P([]),o=P(!1),l=P(!0),r=P(""),u=P({}),p=P("magicscript");let g=!1,f=!1,y;const E=k=>{a.value=!0,j.sendGet("/backups",{timestamp:k}).success(B=>{k?i.value.push(...B):i.value=B,(f=B.length>=100)&&(y=B[B.length-1].createDate),a.value=!1})},L=se("service"),I=P({}),m=k=>{var B,z;return k.endsWith("-group")?c("message.group",((B=L[k.replace("-group","")])==null?void 0:B.name)||"Unknown"):k==="full"?c("backup.full"):((z=L[k])==null?void 0:z.name)||k};let S=!1;T.$on(F.LOAD_RESOURCES_FINISH,k=>k||E());const O=()=>{f&&!g&&E(y)};pt(()=>{!S&&M.LOGINED&&E(),S=!0});const{proxy:A}=gt(),U=(k,B)=>{const z=[];B.id!=="full"&&!B.id.endsWith("-group")&&(z.push({icon:"difference",label:c("backup.difference"),onClick(){r.value=Xe(B.createDate),o.value=!0,l.value=!0,p.value=L[B.type].language||"magicscript",Promise.all([new Promise(Q=>j.sendGet("/backup",{id:B.id,timestamp:B.createDate}).success(le=>Q(le))),new Promise(Q=>j.sendGet("/resource/file/"+B.id).success(le=>Q(le)))]).then(Q=>{var le;I.value=Q[1],u.value=B,l.value=!1,s.value=[Q[0],(le=Q[1])==null?void 0:le.script]}).catch(Q=>{console.error(Q),o.value=!1})}}),z.push({label:c("toolbars.history"),icon:"history",onClick:()=>{T.$emit(F.ADD_FOOTER_TOOLBAR,{component:Ue(t),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",B.name),allowClose:!0,data:{id:B.id}})}})),(B.id==="full"||!B.id.endsWith("-group"))&&z.push({icon:"rollback",label:c("backup.rollback"),onClick(){const Q=`${B.name}(${Xe(B.createDate)})`;me.confirm(c("backup.rollback"),c("backup.rollbackConfirm"),()=>{j.sendPost("/backup/rollback",{id:B.id,timestamp:B.createDate}).success(le=>{le?(T.status("backup.rollbackSuccess",!0,Q),T.$emit(F.LOAD_RESOURCES)):(me.alert(c("backup.rollbackFailed",Q)),T.status("backup.rollbackFailed",!1,Q))})})}}),z.length>0&&A.$contextmenu({event:k,menus:z})},N=()=>{o.value=!1;const k=`${u.value.name}(${Xe(u.value.createDate)})`;j.sendPost("/backup/rollback",{id:u.value.id,timestamp:u.value.createDate}).success(B=>{B?(me.alert(c("backup.rollbackSuccess",k)),T.status("backup.rollbackSuccess",!0,k),T.$emit(F.LOAD_RESOURCES,u.value.type)):(me.alert(c("backup.rollbackFailed",k)),T.status("backup.rollbackFailed",!1,k))})};return(k,B)=>{const z=b("magic-panel-toolbar"),Q=b("magic-loading"),le=b("magic-table-column"),oe=b("magic-table"),ye=b("magic-empty"),Te=b("magic-monaco-diff-editor"),At=b("magic-button"),Me=b("magic-button-group"),Qe=b("magic-dialog");return v(),C(ee,null,[R("div",eu,[_(z,{toolbars:n}),R("div",null,[_(Q,{loading:a.value},null,8,["loading"]),i.value.length>0?(v(),H(oe,{key:0,data:i.value,border:!0,onContextmenu:U,onLoadNext:O},{default:w(()=>[_(le,{title:h(c)("message.date"),width:"160"},{default:w(({row:ke})=>[he($(h(Xe)(ke.createDate)),1)]),_:1},8,["title"]),_(le,{title:h(c)("message.type"),width:"90"},{default:w(({row:ke})=>[R("span",null,$(m(ke.type)),1)]),_:1},8,["title"]),_(le,{title:h(c)("history.operator"),width:"100"},{default:w(({row:ke})=>[he($(ke.createBy||"guest"),1)]),_:1},8,["title"]),_(le,{title:h(c)("message.name"),align:"left"},{default:w(({row:ke})=>[he($(ke.name),1)]),_:1},8,["title"])]),_:1},8,["data"])):(v(),H(ye,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_(Qe,{value:o.value,"onUpdate:value":B[1]||(B[1]=ke=>o.value=ke),title:h(c)("history.name"),width:"80%",maxWidth:"100%",top:"60px",height:"80%",className:"magic-dialog-diff"},{default:w(()=>[R("div",tu,[R("div",au,[R("div",null,$(r.value)+" by "+$(u.value.createBy||"guest"),1),R("div",null,$(h(c)("backup.current"))+"("+$(h(Xe)(I.value.updateTime||I.value.createTime))+" by "+$(I.value.updateBy||I.value.createBy||"guest")+")",1)]),l.value?(v(),H(Q,{key:1,loading:l.value},null,8,["loading"])):(v(),H(Te,{key:0,value:s.value,"onUpdate:value":B[0]||(B[0]=ke=>s.value=ke),language:p.value},null,8,["value","language"]))]),_(Me,{align:"right"},{default:w(()=>[_(At,{value:h(c)("backup.rollback"),type:"active",onClick:N},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],64)}}};var su=q(nu,[["__scopeId","data-v-56b7f954"]]),iu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:su});const ut=e=>(ra("data-v-71b796dc"),e=e(),ca(),e),ou={class:"magic-debug"},lu={class:"magic-debug-variables"},ru={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},cu=ut(()=>R("path",{d:"M201.472 320h-49.6V129.408l-59.2 18.368v-40.32L196.16 70.4h5.312V320z m50.816 320.128H81.024v-33.92l80.832-86.208c6.016-6.656 11.136-12.672 15.36-18.176a133.76 133.76 0 0 0 10.112-15.104 57.728 57.728 0 0 0 5.504-12.8 42.88 42.88 0 0 0 1.6-11.392c0-11.136-2.816-19.84-8.384-26.24-5.632-6.272-13.632-9.472-24.064-9.472a36.224 36.224 0 0 0-15.488 3.2 31.808 31.808 0 0 0-11.328 8.704 39.232 39.232 0 0 0-6.976 13.312 56.32 56.32 0 0 0-2.368 16.832h-49.792c0-11.2 1.984-21.76 6.016-31.744 3.968-9.984 9.792-18.624 17.28-26.112 7.616-7.424 16.704-13.312 27.392-17.664 10.688-4.352 22.784-6.528 36.16-6.528 13.12 0 24.768 1.664 34.88 4.928 10.176 3.2 18.624 7.872 25.536 13.952 6.848 6.08 12.032 13.504 15.616 22.336 3.52 8.768 5.312 18.688 5.312 29.696 0 8.32-1.28 16.384-3.968 24.192-2.56 7.744-6.336 15.552-11.136 23.296a190.08 190.08 0 0 1-17.408 23.68 528.64 528.64 0 0 1-22.784 24.768l-44.096 46.464h107.456v40zM131.456 812.8h26.432c12.608 0 21.888-3.136 27.968-9.408a34.56 34.56 0 0 0 9.088-25.088 38.656 38.656 0 0 0-2.048-12.8 26.304 26.304 0 0 0-16.832-16.704 42.112 42.112 0 0 0-14.912-2.432 41.792 41.792 0 0 0-12.928 1.984 33.664 33.664 0 0 0-10.688 5.568 25.6 25.6 0 0 0-9.856 20.608H78.08a60.8 60.8 0 0 1 6.4-28.032c4.352-8.448 10.176-15.552 17.536-21.44 7.424-5.888 16-10.496 25.984-13.76 9.984-3.2 20.608-4.864 32-4.864 12.544 0 24 1.472 34.368 4.48 10.368 3.072 19.2 7.616 26.688 13.632 7.424 5.952 13.184 13.44 17.28 22.272 4.16 8.896 6.208 19.2 6.208 30.848a52.8 52.8 0 0 1-9.856 30.72 67.968 67.968 0 0 1-28.032 22.976 62.08 62.08 0 0 1 31.488 22.656 61.44 61.44 0 0 1 10.368 35.712 66.56 66.56 0 0 1-25.408 54.336c-7.872 6.208-17.28 10.88-28.032 14.208a121.024 121.024 0 0 1-66.368 0.64 81.92 81.92 0 0 1-27.2-13.248 68.032 68.032 0 0 1-19.2-22.4 66.304 66.304 0 0 1-7.296-32h49.6a29.824 29.824 0 0 0 10.368 22.912 36.48 36.48 0 0 0 11.584 6.592 48.64 48.64 0 0 0 30.4 0 30.336 30.336 0 0 0 19.392-17.792 46.208 46.208 0 0 0-0.256-31.04 28.544 28.544 0 0 0-8.192-11.584 34.304 34.304 0 0 0-12.928-6.592 63.104 63.104 0 0 0-17.088-2.176h-26.432V812.8z",fill:"#9AA7B0"},null,-1)),uu=ut(()=>R("path",{d:"M384 128h512v192H384zM384 768h512v192H384zM384 448h512v192H384z",fill:"#40B6E0","fill-opacity":".7"},null,-1)),pu=[cu,uu],du={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},_u=ut(()=>R("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),hu=[_u],fu={class:"key"},mu=ut(()=>R("label",{class:"separator"},"=",-1)),gu={key:2,class:"object-type"},vu={key:3,class:"object-type"},Eu={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},bu=ut(()=>R("path",{d:"M128 128h768v768H128z",fill:"#40B6E0","fill-opacity":".6","p-id":"8251"},null,-1)),yu=ut(()=>R("path",{d:"M691.968 704V422.912l-62.464 15.36L613.12 373.76l102.912-30.72h53.76V704h-77.824z m-284.288 6.144c-95.744 0-158.72-80.384-158.72-184.32V524.8c0-103.936 64.512-185.344 159.744-185.344 94.72 0 158.72 80.384 158.72 184.32V524.8c0 103.936-64 185.344-159.744 185.344z m1.408-71.168c47.616 0 77.824-48.128 77.824-113.152V524.8c0-65.024-31.744-114.176-78.848-114.176S330.24 458.24 330.24 523.776V524.8c0 65.536 31.232 114.176 78.848 114.176z",fill:"#231F20","fill-opacity":".7","p-id":"8252"},null,-1)),Tu=[bu,yu],Su={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Ou=ut(()=>R("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),xu=[Ou],Ru={class:"key"},Au=ut(()=>R("label",{class:"separator"},"=",-1)),Iu={key:2,class:"object-type"},Cu={setup(e){const t=se("opened"),a=pe(()=>!t.value.variables),n=P([{title:c("editor.tooltip.resume")+"(F8)",icon:"continue",disabled:a,onClick(){T.$emit(F.DEBUG_CONTINUE)}},{title:c("editor.tooltip.stepInto")+"(F6)",icon:"step-over",disabled:a,onClick(){T.$emit(F.DEBUG_SETPINTO)}},{title:c("resource.header.expand"),icon:"expand-all",disabled:a,onClick:()=>at(t.value.variables,s=>s.opened=!0)},{title:c("resource.header.collapse"),icon:"collapse-all",disabled:a,onClick:()=>at(t.value.variables,s=>s.opened=!1)}]);return(s,i)=>{const o=b("magic-panel-toolbar"),l=b("magic-icon"),r=b("magic-tree"),u=b("magic-empty");return v(),C("div",ou,[_(o,{toolbars:n.value},null,8,["toolbars"]),R("div",lu,[h(t).variables?(v(),H(r,{key:0,data:h(t).variables},{folder:w(({item:p})=>[_(l,{icon:p.opened?"arrow-bottom":"arrow-right",onClick:Se(g=>p.opened=!p.opened,["stop"])},null,8,["icon","onClick"]),p.dataType==="array"?(v(),C("svg",ru,pu)):(v(),C("svg",du,hu)),R("label",fu,$(p.name),1),mu,p.size?(v(),C("span",gu,"("+$(p.size)+")",1)):W("",!0),p.type?(v(),C("span",vu,$(`{${p.type}}`),1)):W("",!0)]),file:w(({item:p})=>[_(l,{icon:"empty"}),p.dataType==="number"?(v(),C("svg",Eu,Tu)):(v(),C("svg",Su,xu)),R("label",Ru,$(p.name),1),Au,R("span",{class:Ee(["magic-data-type",p.dataType])},$(p.value),3),p.type&&!p.isNull?(v(),C("span",Iu," ("+$(p.type)+")",1)):W("",!0)]),_:1},8,["data"])):(v(),H(u,{key:1,text:h(c)("message.empty",h(c)("message.variable"))},null,8,["text"]))])])}}};var Lu=q(Cu,[["__scopeId","data-v-71b796dc"]]),Nu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Lu});const wu={class:"magic-event"},ku=["innerHTML"],Du={setup(e){const t=T.getStatusLog(),a=[{title:c("message.clear"),icon:"clear",onClick:()=>{T.clearStatusLog()}}];return(n,s)=>{const i=b("magic-panel-toolbar"),o=b("magic-table-column"),l=b("magic-table");return v(),C("div",wu,[_(i,{toolbars:a}),R("div",null,[_(l,{data:h(t),border:"",align:"left"},{default:w(()=>[_(o,{title:h(c)("message.date"),width:"180"},{default:w(({row:r})=>[he($(r.timestamp),1)]),_:1},8,["title"]),_(o,{title:h(c)("event.message")},{default:w(({row:r})=>[R("div",{innerHTML:r.content},null,8,ku)]),_:1},8,["title"])]),_:1},8,["data"])])])}}};var Mu=q(Du,[["__scopeId","data-v-06d5ba36"]]),Pu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Mu});const Uu={class:"magic-log-wrapper"},$u=["innerHTML"],Bu=["onClick"],Fu={setup(e){const t=P([]),a=P(!1),n=P([{icon:"expand-all",title:c("resource.header.expand"),onClick:()=>t.value.forEach(p=>p.showMore=!0)},{icon:"collapse-all",title:c("resource.header.collapse"),onClick:()=>t.value.forEach(p=>p.showMore=!1)},{icon:"delete",title:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"scroll-down",title:c("log.scrollEnd"),selectable:!0,onSelect:p=>{a.value=p,o()}}]),s=P(null),{proxy:i}=gt(),o=()=>{a.value&&be(()=>{s.value&&(s.value.scrollTop=s.value.scrollHeight)})},l=p=>{i.$contextmenu({event:p,menus:[{icon:"delete",label:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"expand-all",label:c("resource.header.expand"),onClick:()=>t.value.forEach(g=>g.showMore=!0)},{icon:"collapse-all",label:c("resource.header.collapse"),onClick:()=>t.value.forEach(g=>g.showMore=!1)}]})},r=p=>{const g=p.map(f=>{let y=f.replace(/[&<>]/gm,function(L){return L==="&"?"&":L==="<"?"<":L===">"?">":""});y=y.replace(/(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}.\d{3}\s+)([^\s]+)( --- \[)(.{15})(] )(.{40})/gm,'$1 $2$3$4$5$6'),y=y.replace(/(https?:\/\/[^\s]+)/gm,'$1'),y=y.replace(/(\tat .*\()(.*?:\d+)(\).*?[\r\n])/g,'$1$2$3');let E=f.split(` -`).length;return{html:y,multiple:E>3,lines:E-4,showMore:!1}});g&&(t.value.push(...g),M.LOG_MAX_ROWS!==1/0&&t.value.length>M.LOG_MAX_ROWS&&t.value.splice(0,t.value.length-M.LOG_MAX_ROWS),o())};T.$event(Ce.LOGS,([p])=>r(p)),T.$event(Ce.LOG,([p])=>r(p));const u=new IntersectionObserver(()=>{o()});return pt(()=>{u.observe(s.value)}),(p,g)=>{const f=b("magic-panel-toolbar"),y=b("magic-empty");return v(),C("div",Uu,[_(f,{toolbars:n.value},null,8,["toolbars"]),!t.value||t.value.length===0?(v(),H(y,{key:0,text:h(c)("message.empty",h(c)("message.log"))},null,8,["text"])):W("",!0),vt(R("div",{class:"magic-log",ref_key:"element",ref:s,onContextmenu:g[0]||(g[0]=Se(E=>l(E),["prevent"]))},[(v(!0),C(ee,null,ue(t.value,(E,L)=>(v(),C("div",{class:Ee({multiple:E.multiple,more:E.showMore}),key:"run_log_"+L},[R("pre",{innerHTML:E.html},null,8,$u),E.multiple?(v(),C("span",{key:0,class:"multiple",onClick:I=>E.showMore=!E.showMore},$(E.showMore?h(c)("log.hide"):h(c)("log.show",E.lines)),9,Bu)):W("",!0)],2))),128))],544),[[It,t.value&&t.value.length>0]])])}}};var Hu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Fu});const Vu={class:"magic-online"},Gu={setup(e){const t=We([]),a=se("activateUserFiles"),n=(i,o)=>{const l=t.find(r=>r.cid===i);l&&(Object.values(a.value).forEach(r=>{const u=r.findIndex(p=>p.cid===i);u>-1&&r.splice(u,1)}),a.value[o]=a.value[o]||[],a.value[o].push(l))},s=i=>{t.some(o=>o.cid===i.cid)||t.push(i)};return T.$event(Ce.LOGIN_RESPONSE,([i,o])=>{a.value={},t.splice(0,t.length),i==="1"&&s(o)}),T.$event(Ce.PING,()=>{T.send(Ce.PONG)}),T.$event(Ce.USER_LOGIN,([i])=>{M.CLIENT_ID!==i.cid&&(T.$emit(F.NOTIFY,{title:c("online.login"),content:c("online.loginTips",i.username,i.ip),duration:3e3}),T.status("online.loginTips",!0,i.username,i.ip)),s(i)}),T.$event(Ce.USER_LOGOUT,([i])=>{M.CLIENT_ID!==i.cid&&(T.$emit(F.NOTIFY,{title:c("online.logout"),content:c("online.logoutTips",i.username,i.ip),duration:3e3}),T.status("online.logoutTips",!0,i.username,i.ip));const o=t.findIndex(l=>l.cid===i.cid);n(i.cid,"0"),o>-1&&t.splice(o,1)}),T.$event(Ce.ONLINE_USERS,([i])=>{i.forEach(o=>{M.CLIENT_ID!==o.cid&&(s(o),o.fileId&&n(o.cid,o.fileId))})}),T.$event(Ce.INTO_FILE_ID,([i,o])=>n(i,o)),(i,o)=>{const l=b("magic-avatar-group");return v(),C("div",Vu,[_(l,{users:h(t),max:9},null,8,["users"]),R("span",null,$(h(c)("online.onlines",h(t).length)),1)])}}};var ju=q(Gu,[["__scopeId","data-v-0c296fa2"]]),zu=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ju});const Yu={class:"magic-status-bar"},qu=["innerHTML"],Ku=["title","onClick"],Wu={props:{config:Object},setup(e){const t=e,a=P(null),n=[{icon:"gitee",title:"Gitee",displayKey:"repo",onClick:()=>window.open("https://gitee.com/ssssssss-team/magic-api")},{icon:"git",title:"Github",displayKey:"repo",onClick:()=>window.open("https://github.com/ssssssss-team/magic-api")},{icon:"qq",title:c("message.joinGroup"),displayKey:"qqGroup",onClick:()=>window.open("https://qm.qq.com/cgi-bin/qm/qr?k=Q6dLmVS8cHwoaaP18A3tteK_o0244e6B&jump_from=webapi")},{icon:"help",title:c("message.document"),displayKey:"document",onClick:()=>window.open("https://ssssssss.org/magic-api")}],s=pe(()=>{const o=n.filter(l=>t.config.header[l.displayKey]!==!1);return a.value&&a.value.id&&a.value.username&&o.push({icon:"logout",title:a.value.username,onClick:()=>me.confirm(c("message.logout"),c("message.logoutConfirm",a.value.username),()=>j.sendPost("/logout").success(()=>{a.value=null,M.HEADER_MAGIC_TOKEN_VALUE="unauthorization",M.LOGINED=!1,$e.remove(M.STORE.token),T.$emit(F.LOGOUT),T.status("message.logoutSuccess")}))}),o}),i=P("");return T.$on(F.LOGINED,()=>{T.status("message.getCurrentLoginUser"),j.send("/user").success(o=>a.value=o)}),T.$on(F.STATUS,o=>i.value=o),(o,l)=>{const r=b("magic-online"),u=b("magic-icon");return v(),C("div",Yu,[R("div",{class:"message",innerHTML:i.value},null,8,qu),_(r),R("ul",null,[(v(!0),C(ee,null,ue(h(s),(p,g)=>(v(),C("li",{title:p.title,key:g,onClick:Se(p.onClick,["stop"])},[_(u,{icon:p.icon},null,8,["icon"])],8,Ku))),128))])])}}};var Xu=q(Wu,[["__scopeId","data-v-49bc4fc3"]]),Ju=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Xu});const Qu={class:"magic-todo"},Zu={key:3},e1={class:"todo"},t1={setup(e){const t=P(!0),a=[{icon:"refresh",title:c("message.refresh"),onClick(){p()}},{icon:"expand-all",title:c("message.expand"),onClick:()=>at(n.value,f=>f.opened=!0)},{icon:"collapse-all",title:c("message.collapse"),onClick:()=>at(n.value,f=>f.opened=!1)}],n=P([]),s=se("resources"),i={},o=f=>{(f.groupId||f.line)&&T.$emit(F.OPEN_WITH_ID,f.id)},l=(f,y)=>{let E=f.find(L=>L.id===y);if(!E)for(let L=0;L{let y=[];return f.forEach(E=>{E.line>0?y.push(E):E.folder&&E.children&&(E.children=r(E.children),E.children.length&&y.push(E))}),y},u=se("service"),p=()=>{n.value=[],t.value=!0,j.sendGet("/todo").success(f=>{const y=s();y.forEach(L=>i[L.navbar.type]=L.navbar);let E=!1;f.forEach(L=>{for(let I=0;IL.display).map(L=>({folder:!0,icon:L.navbar.icon,name:L.navbar.title,children:L.tree,root:!0}))),at(n.value,L=>L.opened=!0)),t.value=!1})};let g=!1;return T.$on(F.LOAD_RESOURCES_FINISH,p),pt(()=>{!g&&M.LOGINED&&p(),g=!0}),(f,y)=>{const E=b("magic-panel-toolbar"),L=b("magic-loading"),I=b("magic-icon"),m=b("magic-text-icon"),S=b("magic-tree"),O=b("magic-empty");return v(),C("div",Qu,[_(E,{toolbars:a}),R("div",null,[_(L,{loading:t.value},null,8,["loading"]),n.value.length>0?(v(),H(S,{key:0,data:n.value,onItemClick:o},{folder:w(({item:A})=>[_(I,{icon:A.opened?"arrow-bottom":"arrow-right",onClick:Se(U=>A.opened=!A.opened,["stop"])},null,8,["icon","onClick"]),A.root?(v(),H(I,{key:0,icon:A.icon},null,8,["icon"])):A.icon?(v(),H(m,{key:1,icon:A.icon},null,8,["icon"])):(v(),H(I,{key:2,icon:"list"})),R("label",null,$(A.name),1),A.path?(v(),C("span",Zu,"("+$(A.path)+")",1)):W("",!0)]),file:w(({item:A})=>[_(I),_(I,{icon:"todo"}),R("label",e1,$(A.text),1)]),_:1},8,["data"])):(v(),H(O,{key:1,text:h(c)("message.empty","TODO")},null,8,["text"]))])])}}};var a1=q(t1,[["__scopeId","data-v-29308d9b"]]),n1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:a1});const s1={class:"magic-toolbar"},i1={class:"magic-toolbar-header"},o1={class:"magic-toolbar-header-buttons"},l1={setup(e){const t=P(null),a=We([{type:"api",title:c("api.title"),icon:"parameter",component:Ue(te("magic-api-info"))},{id:"response",type:"api",title:c("toolbars.response"),icon:"run",component:Ue(te("magic-api-response"))},{type:"function",title:c("fn.title"),icon:"parameter",component:Ue(te("magic-function-info"))},{type:"group-api",title:c("message.group",c("api.name")),icon:"parameter",component:Ue(te("magic-api-group"))},{id:"debug",type:["api","task"],title:c("toolbars.debug"),icon:"debug-info",component:Ue(te("magic-debug"))},{id:"log",title:c("toolbars.log"),icon:"log",component:Ue(te("magic-log"))},{type:"api",title:c("toolbars.global"),icon:"settings",component:Ue(te("magic-global"))},{id:"todo",title:"TODO",icon:"todo",component:Ue(te("magic-todo"))},{id:"history",title:c("toolbars.history"),icon:"history",component:Ue(te("magic-backup"))},{id:"event",title:c("toolbars.event"),icon:"event",component:Ue(te("magic-event")),style:{float:"right"}}]);M.PLUGINS.filter(l=>l.toolbars&&l.toolbars.length>0).map(l=>l.toolbars).forEach(l=>l.forEach(r=>{a.unshift({id:r.id,type:r.type,icon:r.icon,title:c(r.title),component:Ue(r.component)})}));const n=P({}),s=P({});Ke("opened",n),Ke("info",s);const i=(l,r)=>{a.forEach(u=>u.show=u.type===void 0||(Array.isArray(u.type)?u.type.find(p=>p.type===l):u.type===l)),t.value&&r&&t.value.select(a.findIndex(u=>u.show))};i("");const o=l=>{const r=a.findIndex(u=>u.id===l.id);r>-1&&a.splice(r,1),t.value.select(-1)};return T.$on(F.ADD_FOOTER_TOOLBAR,l=>{l.id&&o(l),t.value.select(a.push(l)-1)}),T.$on(F.OPEN_EMPTY,()=>i("")),T.$on(F.OPEN,(l,r)=>{l.responseBlobValue=null,n.value=l,s.value=l.item,i(l.type,r)}),T.$on(F.OPEN_GROUP,l=>{i("group-"+l.type,!0),s.value=l}),T.$on(F.SWITCH_TOOLBAR,l=>{const r=a.findIndex(u=>u.id===l);r>-1&&t.value.select(r)}),(l,r)=>{const u=b("magic-icon"),p=b("magic-resizer"),g=b("magic-navbar-item"),f=b("magic-navbar");return v(),C("div",s1,[_(f,{direction:"horizontal",ref_key:"navbar",ref:t},{default:w(()=>[(v(!0),C(ee,null,ue(h(a),(y,E)=>(v(),H(g,dt({key:E},y),{default:w(()=>[_(p,{direction:"y",max:700,min:150,value:250},{default:w(()=>[R("div",i1,[R("label",null,$(y.title),1),R("div",o1,[_(u,{icon:"minimize",size:"14px",title:h(c)("message.hide"),onClick:r[0]||(r[0]=L=>t.value.select(-1))},null,8,["title"]),y.allowClose?(v(),H(u,{key:0,icon:"close",title:h(c)("editor.tab.close"),onClick:L=>o(y)},null,8,["title","onClick"])):W("",!0)])]),(v(),H(te(y.component),ts(as(y.data)),null,16))]),_:2},1024)]),_:2},1040))),128))]),_:1},512)])}}};var r1=q(l1,[["__scopeId","data-v-200d8d00"]]),c1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:r1});const u1={class:"magic-function-info"},p1={setup(e){const t=se("info"),a=[{title:c("fn.parameter"),component:te("magic-function-parameter")},{title:c("fn.description"),component:te("magic-api-description")}];return(n,s)=>{const i=b("magic-select"),o=b("magic-input"),l=b("magic-navbar-item"),r=b("magic-navbar");return v(),C(ee,null,[R("div",u1,[R("form",null,[R("label",null,$(h(c)("fn.returnValue")),1),_(i,{width:"100px",options:n.$FUNCTION_RETURN_TYPES,"default-select":n.$DEFAULT_FUNCTION_RETURN_TYPE,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),R("label",null,$(h(c)("fn.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("fn.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),R("label",null,$(h(c)("fn.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("fn.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(r,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:w(()=>[(v(),C(ee,null,ue(a,(u,p)=>_(l,{key:p,title:u.title},{default:w(()=>[(v(),H(te(u.component),{info:h(t)},null,8,["info"]))]),_:2},1032,["title"])),64))]),_:1},512)],64)}}};var d1=q(p1,[["__scopeId","data-v-bc8654ec"]]),_1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:d1});const h1={class:"magic-panel-function"},f1={setup(e){const t=se("info"),a=P(-1);return(n,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),l=b("magic-table-column"),r=b("magic-select"),u=b("magic-table");return v(),C("div",h1,[_(i,{index:a.value,"onUpdate:index":s[0]||(s[0]=p=>a.value=p),value:h(t).parameters},null,8,["index","value"]),_(u,{data:h(t).parameters,border:"",onClickRow:s[1]||(s[1]=p=>a.value=p)},{default:w(()=>[_(l,{title:h(c)("message.name"),width:"20%"},{default:w(({row:p})=>[_(o,{value:p.name,"onUpdate:value":g=>p.name=g,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(l,{title:h(c)("message.parameterType"),width:"20%"},{default:w(({row:p})=>[_(r,{options:n.$FUNCTION_RETURN_TYPES,value:p.type,"onUpdate:value":g=>p.type=g,"default-select":n.$DEFAULT_FUNCTION_RETURN_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(l,{title:h(c)("message.description"),flex:"1"},{default:w(({row:p})=>[_(o,{value:p.description,"onUpdate:value":g=>p.description=g,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var m1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:f1});const g1={setup(e){const t=P(!1),a=P([]);T.$on(F.DO_DOWNLOAD,()=>t.value=!0);const n=()=>{a.value.length?j.sendJson("/download",a.value,{method:"post",headers:{"Content-Type":"application/json"},transformRequest:[],responseType:"blob"}).success(s=>{ya(s,"magic-api.zip"),T.status("message.exported"),t.value=!1}):me.alert(c("message.exportNoneSelect"))};return(s,i)=>{const o=b("magic-resource-choose"),l=b("magic-button"),r=b("magic-button-group"),u=b("magic-dialog");return v(),H(u,{title:h(c)("message.export"),value:t.value,"onUpdate:value":i[5]||(i[5]=p=>t.value=p),shade:!1,padding:"0",width:"480px",top:"60px",overflow:"hidden"},{default:w(()=>[_(o,{ref:"resource",value:a.value,"onUpdate:value":i[0]||(i[0]=p=>a.value=p)},null,8,["value"]),_(r,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:w(()=>[_(l,{value:h(c)("message.expand"),onOnClick:i[1]||(i[1]=p=>s.$refs.resource.expand(!0))},null,8,["value"]),_(l,{value:h(c)("message.collapse"),onOnClick:i[2]||(i[2]=p=>s.$refs.resource.expand(!1))},null,8,["value"]),_(l,{value:h(c)("message.selectAll"),onOnClick:i[3]||(i[3]=p=>s.$refs.resource.selectAll(!0))},null,8,["value"]),_(l,{value:h(c)("message.deselectAll"),onOnClick:i[4]||(i[4]=p=>s.$refs.resource.selectAll(!1))},null,8,["value"]),_(l,{type:"active",value:h(c)("message.export"),onOnClick:n},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var v1=q(g1,[["__scopeId","data-v-097eba83"]]),E1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:v1});const b1="modulepreload",$n={},y1="./",Bn=function(t,a){return!a||a.length===0?t():Promise.all(a.map(n=>{if(n=`${y1}${n}`,n in $n)return;$n[n]=!0;const s=n.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${n}"]${i}`))return;const o=document.createElement("link");if(o.rel=s?"stylesheet":b1,s||(o.as="script",o.crossOrigin=""),o.href=n,document.head.appendChild(o),s)return new Promise((l,r)=>{o.addEventListener("load",l),o.addEventListener("error",r)})})).then(()=>t())};const T1={class:"magic-header"},S1={class:"magic-logo"},O1=["title"],x1=["title"],R1={class:"magic-header-title"},A1=["title","onClick"],I1={class:"magic-skin-selector"},C1=["onClick"],L1={class:"magic-locale-selector"},N1=["onClick"],w1={props:{title:{type:String,default:"magic-api"},themeStyle:Object,header:Object},setup(e){const t=e,a={"../../../scripts/i18n/en.js":()=>Bn(()=>Promise.resolve().then(function(){return Es}),void 0),"../../../scripts/i18n/zh-cn.js":()=>Bn(()=>Promise.resolve().then(function(){return bs}),void 0)},n=We([]);for(let y in a)a[y]().then(E=>{n.push({id:y.replace(/(.*?i18n\/)(.*)(\.js)/g,"$2"),name:E.default.name})});const s=M.MAGIC_API_VERSION_TEXT,i=P(!1),o=P(!1),l=P({}),r=P("");T.$on(F.OPEN_EMPTY,()=>{r.value="",l.value={}}),T.$on(F.OPEN,y=>{l.value=y,r.value=y.path(),Ze(y,()=>{l.value===y&&(r.value=y.path())})});const u=pe(()=>[{name:`${c("message.run")}(Ctrl + Q)`,icon:"run",disabled:()=>l.value.runnable!==!0||l.value.running===!0,onClick:()=>T.$emit(F.DO_TEST)},{name:`${c("message.save")}(Ctrl + S)`,icon:"save",onClick:()=>T.$emit(F.DO_SAVE,!0)},{name:`${c("message.search")}(Ctrl + Shift + F)`,icon:"search",onClick:()=>T.$emit(F.DO_SEARCH)},{name:c("message.upload"),icon:"upload",onClick:()=>T.$emit(F.DO_UPLOAD)},{name:c("message.export"),icon:"download",onClick:()=>T.$emit(F.DO_DOWNLOAD)},{name:c("message.push"),icon:"push",onClick:()=>T.$emit(F.DO_PUSH)},{name:c("message.skin"),displayKey:"skin",icon:"skin",onClick:()=>{i.value=!i.value,o.value=!1}},{name:c("message.i18n"),icon:"i18n",onClick:()=>{o.value=!o.value,i.value=!1}},{name:c("message.reload"),icon:"refresh",onClick:()=>T.$emit(F.RELOAD_RESOURCES)}].filter(y=>t.header[y.displayKey]!==!1)),p=y=>{M.THEME=y,T.$emit(F.SWITCH_THEME,y),T.status("message.switchSkin",!0,y),je.setTheme(y),Object.keys(t.themeStyle).forEach(L=>t.themeStyle[L]=void 0);let E=Kt[y];$e.set(M.STORE.theme,y),Object.keys(E).forEach(L=>t.themeStyle[`--${L}`]=E[L]),i.value=!1},g=$e.get(M.STORE.theme);Kt[g]?p(g):p(M.THEME);const f=({id:y,name:E})=>{o.value=!1,$e.set("locale",y),me.confirm(c("message.tips"),c("message.switchLocale",E),()=>{location.reload()})};return(y,E)=>{const L=b("magic-icon");return v(),C(ee,null,[R("div",T1,[R("div",S1,[R("label",{title:e.title},$(e.title),9,O1),R("label",{title:h(s)},$(h(s)),9,x1)]),R("div",R1,$(r.value),1),R("ul",null,[(v(!0),C(ee,null,ue(h(u),(I,m)=>(v(),C("li",{key:m,title:I.name,onClick:Se(S=>I.disabled!==!0&&I.onClick(),["stop"]),class:Ee({disabled:I.disabled&&I.disabled()===!0})},[_(L,{icon:I.icon},null,8,["icon"])],10,A1))),128))])]),vt(R("div",I1,[R("ul",null,[(v(!0),C(ee,null,ue(Object.keys(h(Kt)),I=>(v(),C("li",{key:"theme_"+I,onClick:m=>p(I)},$(I),9,C1))),128))])],512),[[It,i.value]]),vt(R("div",L1,[R("ul",null,[(v(!0),C(ee,null,ue(h(n),I=>(v(),C("li",{key:"locale_"+I.id,onClick:m=>f(I)},$(I.name),9,N1))),128))])],512),[[It,o.value]])],64)}}};var k1=q(w1,[["__scopeId","data-v-4e11654b"]]),D1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:k1});const M1={class:"magic-push-form"},P1={setup(e){const t=P(!1),a=P([]),n=P("http://host:port/_magic-api-sync"),s=P("123456789");T.$on(F.DO_PUSH,()=>t.value=!0);const i=l=>{j.sendJson("/push",a.value,{method:"post",headers:{"magic-push-target":n.value,"magic-push-secret-key":s.value,"magic-push-mode":l,"Content-Type":"application/json"},transformRequest:[]}).success(()=>{const r=c(l==="full"?"push.full":"push.increment");T.status("push.success",!0,r),t.value=!1,T.$emit(F.LOAD_RESOURCES)})},o=l=>{a.value.length?l==="full"?me.confirm(c("message.push"),c("message.pushWarning"),()=>i(l)):i(l):me.alert(c("message.pushNoneSelect"))};return(l,r)=>{const u=b("magic-resource-choose"),p=b("magic-input"),g=b("magic-button"),f=b("magic-button-group"),y=b("magic-dialog");return v(),H(y,{title:h(c)("message.push"),value:t.value,"onUpdate:value":r[7]||(r[7]=E=>t.value=E),shade:!1,padding:"0",width:"450px",top:"60px",overflow:"hidden"},{default:w(()=>[_(u,{ref:"resource",value:a.value,"onUpdate:value":r[0]||(r[0]=E=>a.value=E)},null,8,["value"]),R("div",M1,[R("div",null,[R("label",null,$(h(c)("message.remote"))+"\uFF1A",1),_(p,{value:n.value,"onUpdate:value":r[1]||(r[1]=E=>n.value=E)},null,8,["value"])]),R("div",null,[R("label",null,$(h(c)("message.secret"))+"\uFF1A",1),_(p,{value:s.value,"onUpdate:value":r[2]||(r[2]=E=>s.value=E),type:"password"},null,8,["value"])])]),_(f,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:w(()=>[_(g,{value:h(c)("message.selectAll"),onOnClick:r[3]||(r[3]=E=>l.$refs.resource.selectAll(!0))},null,8,["value"]),_(g,{value:h(c)("message.deselectAll"),onOnClick:r[4]||(r[4]=E=>l.$refs.resource.selectAll(!1))},null,8,["value"]),_(g,{value:h(c)("push.increment"),onOnClick:r[5]||(r[5]=E=>o("increment")),type:"active"},null,8,["value"]),_(g,{value:h(c)("push.full"),onOnClick:r[6]||(r[6]=E=>o("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var U1=q(P1,[["__scopeId","data-v-e421c192"]]),$1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:U1});const B1={class:"magic-search-result"},F1=["onClick","onDblclick"],H1=["innerHTML"],V1={class:"name"},G1=["textContent"],j1={class:"display-text"},z1={setup(e){const t=P(""),a=P(!1),n=se("findResource"),s=se("service"),i=P([]),o=P({}),l=pe(()=>o.value.name+(o.value.path?`(${o.value.path})`:"")),r=I=>{I.script||j.sendGet(`/resource/file/${I.id}`).success(m=>{I.script=m.script})},u=(I,m)=>{o.value=I,r(I),m&&(T.$emit(F.OPEN_WITH_ID,I.id),a.value=!1,i.value=[],t.value="")};T.$on(F.DO_SEARCH,()=>{i.value=[],t.value="",a.value=!a.value});let p=null;const g=I=>{const m=[...I.childNodes],S=[];for(;m.length;){const O=m.shift();O.nodeType===O.TEXT_NODE?S.push(O):m.unshift(...O.childNodes)}return S},f=I=>{let m=0;return I.map(S=>{let O=m,A=m+S.wholeText.length;return m=A,{text:S.wholeText,startIdx:O,endIdx:A}})},y=(I,m)=>{const S=[..."[]()?.+*^${}:"].reduce((A,U)=>(A[U]=!0,A),{});m=m.split("").map(A=>S[A]?`\\${A}`:A).join("[\\s\\n]*");const O=new RegExp(m,"gmi");return[...I.matchAll(O)]},E=(I,m,S)=>{for(let O=S.length-1;O>=0;O--){const A=S[O],U=A.index,N=U+A[0].length;for(let k=0;k=N)break;let le=I[k];const oe=Math.max(0,U-z),ye=Math.min(Q,N)-z-oe;oe>0&&(le=le.splitText(oe)),ye{if(!m)return I;const S=document.createElement("div");S.innerHTML=I;const O=g(S),A=f(O),U=A.map(({text:k})=>k).join(""),N=y(U,m);return E(O,A,N),S.innerHTML};return Ze(t,I=>{const m=I.trim();clearTimeout(p),m&&(p=setTimeout(()=>{j.send("/search",{keyword:m},{method:"POST"}).success(async S=>{const O=[];for(let A=0;A0&&(o.value=O[0],r(o.value)),i.value=O})},600))}),(I,m)=>{const S=b("magic-input"),O=b("magic-text-icon"),A=b("magic-monaco-editor"),U=b("magic-dialog");return v(),H(U,{title:h(c)("message.search"),value:a.value,"onUpdate:value":m[1]||(m[1]=N=>a.value=N),shade:!1,padding:"0",width:"700px",top:"60px"},{default:w(()=>[_(S,{value:t.value,"onUpdate:value":m[0]||(m[0]=N=>t.value=N),placeholder:h(c)("message.searchText")},null,8,["value","placeholder"]),i.value.length>0?(v(),C(ee,{key:0},[R("div",B1,[(v(!0),C(ee,null,ue(i.value,(N,k)=>(v(),C("div",{key:k,class:Ee(["magic-search-result-item",{selected:o.value===N}]),onClick:B=>u(N),onDblclick:B=>u(N,!0)},[R("div",{class:"label",innerHTML:N.text},null,8,H1),R("div",V1,[_(O,{icon:N.icon},null,8,["icon"]),he($(N.name),1)]),R("div",{class:"line",textContent:$(N.line)},null,8,G1)],42,F1))),128))]),R("div",j1,[_(O,{icon:o.value.icon},null,8,["icon"]),he($(h(l)),1)]),_(A,{readonly:"",value:o.value.script,language:o.value.language,style:{width:"100%",height:"300px"},matches:t.value},null,8,["value","language","matches"])],64)):W("",!0)]),_:1},8,["title","value"])}}};var Y1=q(z1,[["__scopeId","data-v-4bbc2d10"]]),q1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Y1});const K1={setup(e){const t=P(!1),a=P(null),n=s=>{if(a.value){const i=new FormData;i.append("file",a.value,a.value.name),i.append("mode",s);const o=()=>{j.send("/upload",i,{method:"post",headers:{"Content-Type":"multipart/form-data"}}).success(l=>{const r=c(s==="full"?"upload.full":"upload.increment");l?(T.status("upload.success",!0,r),t.value=!1,T.$emit(F.LOAD_RESOURCES)):T.status("upload.failed",!1,r)})};s==="full"?me.confirm(c("message.upload"),c("message.uploadWarning"),o):o()}};return T.$on(F.DO_UPLOAD,()=>t.value=!0),(s,i)=>{const o=b("magic-file"),l=b("magic-button"),r=b("magic-button-group"),u=b("magic-dialog");return v(),H(u,{title:h(c)("message.upload"),value:t.value,"onUpdate:value":i[3]||(i[3]=p=>t.value=p)},{default:w(()=>[_(o,{value:a.value,"onUpdate:value":i[0]||(i[0]=p=>a.value=p),accept:"application/x-zip-compressed"},null,8,["value"]),_(r,{align:"right",style:{"margin-top":"5px"}},{default:w(()=>[_(l,{value:h(c)("upload.increment"),type:"active",onClick:i[1]||(i[1]=p=>n("increment"))},null,8,["value"]),_(l,{value:h(c)("upload.full"),onClick:i[2]||(i[2]=p=>n("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var W1=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:K1});const X1={class:"magic-data-resource"},J1={class:"magic-data-resource-header"},Q1=["title","onClick"],Z1={key:1},ep=["onContextmenu"],tp={props:{type:String,title:String,data:Array},setup(e){const t=e,a=te(`magic-datasource-${t.type}`),n=P(!1),s=P(""),i=P({}),o=P(""),l=P(""),r=P(!0),u=pe(()=>t.data&&t.data.length>0&&t.data[0].children&&t.data[0].children.filter(O=>O.name.indexOf(o.value)>-1||O.key.indexOf(o.value)>-1)||[]),p=se("service")[t.type],g=[{name:c("message.createDataSource",t.title),icon:"plus",onClick:()=>{s.value=c("message.createDataSource",t.title),l.value=c("message.create"),i.value={},n.value=!0,r.value=!1}}],f=()=>{p.doTest(i.value)},{proxy:y}=gt(),E=(O,A,U)=>{O.groupId=`${t.type}:0`,j.sendJson(`/resource/file/${t.type}/save`,O).success(N=>{if(N){O.id!==N&&T.loading(3),O.id=N,T.status(A+"Success",!0,U),t.data[0].children=t.data[0].children||[];const k=t.data[0].children.find(B=>B.id===O.id);k?Object.keys(O).forEach(B=>k[B]=O[B]):t.data[0].children.push(O),n.value=!1}else T.status(A+"Failed",!1,U),y.$alert(c(A+"Failed",U))})},L=()=>{const O=fe({},i.value);E(O,"message.save",`${t.title}\u300C${I(O)}\u300D`)},I=O=>`${O.name}(${O.key})`,m=O=>{const A=t.data[0].children.findIndex(U=>U===O);A>-1&&t.data[0].children.splice(A,1)},S=(O,A)=>{if(!O.id)return;const U=[{label:c("message.update"),icon:"update",divided:!0,onClick:()=>{r.value=!0,s.value=c("message.updateTips",t.title),l.value=c("message.update"),n.value=!0,T.status("message.getDetail",`${t.title}\u300C${I(O)}\u300D`),j.sendGet(`/resource/file/${O.id}`).success(N=>i.value=N).end(()=>{r.value=!1})}},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const N=`${t.title}\u300C${I(O)}\u300D`;y.$confirm(c("message.deleteTips",t.title),c("message.deleteConfirm",N),()=>{j.send("/resource/delete",{id:O.id}).success(k=>{T.status(k?"message.deleteSuccess":"message.deleteFailed",k,N),k?m(O):y.$alert(k?"message.deleteSuccess":"message.deleteFailed",N)})})}},{label:c("message.copy"),icon:"copy",divided:!0,onClick:()=>{j.send(`/resource/file/${O.id}`).success(N=>{N.id=void 0,N.name=N.name+`(${c("message.copy")})`,N.key=N.key+"_copy",E(N,"datasource.copy",`${t.title}\u300C${I(N)}\u300D`)})}}];O.lock===M.LOCKED?U.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>j.sendPost("/resource/unlock",{id:O.id}).success(N=>{T.status(N?"message.unlockSuccess":"message.unlockFailed",N,`${t.title}\u300C${I(O)}\u300D`),N&&(O.lock=M.UNLOCK)})}):U.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>j.sendPost("/resource/lock",{id:O.id}).success(N=>{T.status(N?"message.lockSuccess":"message.lockFailed",N,`${t.title}\u300C${I(O)}\u300D`),N&&(O.lock=M.LOCKED)})}),y.$contextmenu({menus:U,event:A})};return(O,A)=>{const U=b("magic-icon"),N=b("magic-input"),k=b("magic-empty"),B=b("magic-button"),z=b("magic-button-group"),Q=b("magic-loading"),le=b("magic-dialog");return v(),C(ee,null,[R("div",X1,[R("div",J1,[R("ul",null,[(v(),C(ee,null,ue(g,(oe,ye)=>(v(),C(ee,{key:ye},[!oe.show||oe.show()?(v(),C("li",{key:0,title:oe.name||"",onClick:Te=>oe.onClick&&oe.onClick(),class:Ee({separator:oe.separator})},[oe.separator?W("",!0):(v(),H(U,{key:0,icon:oe.icon},null,8,["icon"]))],10,Q1)):W("",!0)],64))),64))]),_(N,{value:o.value,"onUpdate:value":A[0]||(A[0]=oe=>o.value=oe),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),_(U,{icon:"search",size:"14px"})]),h(u).length===0?(v(),H(k,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(v(),C("ul",Z1,[(v(!0),C(ee,null,ue(h(u),(oe,ye)=>(v(),C("li",{key:ye,onContextmenu:Se(Te=>S(oe,Te),["prevent"])},[_(U,{icon:"datasource"}),R("label",null,$(oe.name||h(c)("datasource.primary")),1),R("span",null,"("+$(oe.key||"default")+")",1),oe.lock==="1"?(v(),H(U,{key:0,icon:"lock"})):W("",!0)],40,ep))),128))]))]),_(le,{value:n.value,"onUpdate:value":A[4]||(A[4]=oe=>n.value=oe),title:s.value,width:"550px"},{default:w(()=>[_(Q,{loading:r.value,style:{"min-height":"200px"}},{default:w(()=>[(v(),H(te(h(a)),{info:i.value},null,8,["info"])),_(z,{align:"right",style:{padding:"5px 0"}},{default:w(()=>[_(B,{value:l.value,type:"active",onOnClick:A[1]||(A[1]=oe=>L())},null,8,["value"]),_(B,{value:h(c)("datasource.test"),onOnClick:A[2]||(A[2]=oe=>f())},null,8,["value"]),_(B,{value:h(c)("message.cancel"),onOnClick:A[3]||(A[3]=oe=>n.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["loading"])]),_:1},8,["value","title"])],64)}}};var ap=q(tp,[["__scopeId","data-v-18e97171"]]),np=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:ap});const Fn=e=>(ra("data-v-f15aae88"),e=e(),ca(),e),sp={class:"magic-login"},ip={class:"magic-login-box"},op=Fn(()=>R("div",{class:"magic-login-logo"},null,-1)),lp={class:"magic-login-text"},rp=he("Magic-API "),cp={key:0},up={key:0,class:"magic-login-row error"},pp={class:"magic-login-row"},dp={class:"magic-login-row"},_p={class:"magic-login-row"},hp={class:"magic-login-copyright"},fp=Fn(()=>R("a",{href:"https://ssssssss.org.cn",target:"_blank"},"ssssssss.org.cn",-1)),mp=he(" All rights reserved."),gp={props:{value:Boolean,error:String},emits:["update:value","update:error"],setup(e,{emit:t}){const a=P(""),n=P("");T.$on();const s=()=>{a.value&&n.value&&(t("update:error",null),j.sendPost("/login",{username:a.value,password:n.value}).success((i,o)=>{i&&(t("update:value",!1),M.HEADER_MAGIC_TOKEN_VALUE=o.headers[M.HEADER_MAGIC_TOKEN],$e.set(M.STORE.token,M.HEADER_MAGIC_TOKEN_VALUE),T.$emit(F.LOGINED),a.value="",n.value="")}).exception((i,o)=>{i!=401&&(o=translateCode(i,o)),t("update:error",o)}).error((i,o,l)=>{if(l){let r="";l.response?r=JSON.stringify(l.response.data||"")||c("code.invalid",l.response.status):r=l.message,t("update:error",r)}}))};return(i,o)=>{const l=b("magic-icon"),r=b("magic-input"),u=b("magic-button");return v(),C("div",sp,[R("div",ip,[op,R("div",lp,[rp,h(M).MAGIC_API_VERSION_TEXT?(v(),C("span",cp,"v"+$(h(M).MAGIC_API_VERSION_TEXT),1)):W("",!0)]),e.error?(v(),C("div",up,[_(l,{icon:"error"}),R("span",null,$(e.error),1)])):W("",!0),R("div",pp,[_(l,{icon:"user"}),_(r,{onEnter:s,value:a.value,"onUpdate:value":o[0]||(o[0]=p=>a.value=p),placeholder:h(c)("message.username")},null,8,["value","placeholder"])]),R("div",dp,[_(l,{icon:"password"}),_(r,{onEnter:s,value:n.value,"onUpdate:value":o[1]||(o[1]=p=>n.value=p),type:"password",placeholder:h(c)("message.password")},null,8,["value","placeholder"])]),R("div",_p,[_(u,{value:h(c)("message.login"),onOnClick:s},null,8,["value"])])]),R("div",hp,[he("Copyright \xA9 2020-"+$(new Date().getYear()+1900)+" ",1),fp,mp])])}}};var vp=q(gp,[["__scopeId","data-v-f15aae88"]]),Ep=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:vp});function bp(e,t){T.$emit(F.SWITCH_TOOLBAR,"log"),t.headers[M.HEADER_REQUEST_CLIENT_ID]=M.CLIENT_ID,t.headers[M.HEADER_REQUEST_SCRIPT_ID]=e.item.id,t.headers[M.HEADER_MAGIC_TOKEN]=M.HEADER_MAGIC_TOKEN_VALUE,t.headers[M.HEADER_REQUEST_BREAKPOINTS]=(e.decorations||[]).filter(i=>i.options.linesDecorationsClassName==="breakpoints").map(i=>i.range.startLineNumber).join(","),t.responseType="blob",t.validateStatus=()=>!0;let a=0;t.transformResponse=[function(i,o){return a=i.size,o["content-disposition"]?new Promise(l=>l(i)):new Promise(l=>{const r=new FileReader;r.readAsText(i),r.onload=function(){try{JSON.parse(this.result),l(this.result)}catch{l(i)}}})}];const n=e.path();T.status("api.test.begin",!0,n);const s=new Date().getTime();j.execute(t).then(i=>i.data.then(o=>{if(T.status("api.test.success",!0,n,i.status,ai(a),new Date().getTime()-s),e.running=!1,e.responseBlob=o instanceof Blob)e.responseBlobValue=o,e.item.responseBody=null,e.item.responseBodyDefinition=null,e.responseBodyTree=null;else{e.item.responseBody=ii(o);let l=wn(e.item.responseBody,e.item.responseBodyDefinition);e.item.responseBodyDefinition=l,e.responseBodyTree=Jt(l)}e.responseHeaders=i.headers,be(()=>T.$emit(F.SWITCH_TOOLBAR,"response"))})).catch(i=>{T.status("api.test.requestError",!1,n),e.running=!1,j.processError(i)})}function yp(e){e.running=!0;const t=e.item,a={baseURL:M.SERVER_URL,url:e.requestPath(),method:t.method,headers:{},responseType:"json",withCredentials:!0},n=i=>i.filter(o=>o.value&&o.value.trim()).forEach(o=>a.url=a.url.replace(new RegExp(`\\{${o.name}}`,"g"),o.value.trim()));if(e.getGroups().filter(i=>i.paths&&i.paths.length>0).map(i=>i.paths).forEach(i=>n(i)),n(t.paths||[]),a.url.indexOf("{")>-1){me.alert(c("api.test.missPath")),e.running=!1;return}M.GLOBAL.headers.filter(i=>i.name).forEach(i=>a.headers[i.name]=i.value),t.headers.filter(i=>i.name).forEach(i=>a.headers[i.name]=i.value);const s={};if(M.GLOBAL.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),t.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),Object.values(s).some(i=>i instanceof FileList||i instanceof File)){a.headers["Content-Type"]="multipart/form-data";const i=new FormData;Object.keys(s).forEach(o=>{let l=s[o];l instanceof FileList?Array.from(l).forEach(r=>i.append(o,r,r.name)):l instanceof File?i.append(o,l,l.name):i.append(o,l)}),a.data=i}else{a.headers["Content-Type"]="application/x-www-form-urlencoded",a.method!=="POST"||t.requestBody?a.params=s:a.data=s;try{if(t.requestBody){const i=JSON.parse(t.requestBody);(Array.isArray(i)&&i.length>0||typeof i=="object"&&Object.keys(i).length>0)&&(a.params=s,a.data=t.requestBody,a.headers["Content-Type"]="application/json",a.transformRequest=[])}}catch{e.running=!1,me.alert(c("api.test.requestBodyError"))}}bp(e,a)}var Tp={doTest:yp,getIcon:e=>e.method||"GET",runnable:!0,requirePath:!0,name:c("api.name"),merge:e=>(e.method=e.method||M.DEFAULT_REQUEST_METHOD,e.parameters=e.parameters||[],e.headers=e.headers||[],e.paths=e.paths||[],e.options=e.options||[],e),processSave:e=>{const t=M.config.persistenceResponseBody!==!1;return{id:e.id,name:e.name,path:e.path,groupId:e.groupId,lock:e.lock,method:e.method,description:e.description,createBy:e.createBy,createDate:e.createDate,properties:e.properties,script:e.script,responseBody:t&&e.responseBody||void 0,responseBodyDefinition:t&&e.responseBodyDefinition||void 0,requestBody:e.requestBody,requestBodyDefinition:e.requestBodyDefinition,parameters:e.parameters.filter(a=>a.name),headers:e.headers.filter(a=>a.name),paths:e.paths.filter(a=>a.name),options:e.options.filter(a=>a.name)}}},Sp={getIcon:e=>"function",name:c("fn.name"),runnable:!1,requirePath:!0,merge:e=>(e.parameters=e.parameters||[],e)};let Ha;ae.setExtensionAttribute("org.ssssssss.magicapi.modules.db.SQLModule",()=>{var e;return Ha&&(((e=Ha("datasource")[0])==null?void 0:e.children)||[]).filter(t=>t.key).map(t=>({name:t.key,type:"org.ssssssss.magicapi.modules.db.SQLModule",comment:t.name}))||[]});var Op={injectResources:e=>Ha=e,doTest:e=>{j.sendJson("/datasource/jdbc/test",e).success(t=>{t==="ok"?me.alert(c("datasource.connected"),c("datasource.test")):me.alert(c("datasource.connectFailed",t),c("datasource.test"))})}};const xp={class:"magic-main"},Rp={class:"magic-main-body-wrapper"},Ap={class:"magic-main-body"},Ip={ref:"mrl",class:"magic-navbar magic-navbar__vertical"},Cp={ref:"mrr",class:"magic-navbar magic-navbar__vertical reverse"},Lp={emits:["onLoad"],setup(e,{expose:t,emit:a}){const n=P(!1),s=P({}),i=P(!0),o=P(null),l=(m,S,O)=>{for(let A=0,U=m.length;A{const S=Object.entries(s.value);for(let O=0,A=S.length;O0)return{item:U[0],type:N[0],name:rt("/"+U.reverse().map(k=>k.name).join("/")),path:rt("/"+U.reverse().map(k=>k.path||"").join("/"))}}});const r=[{type:"api",title:c("api.name"),icon:"api"},{type:"function",title:c("fn.name"),icon:"function"}],u={api:Tp,function:Sp,datasource:Op};M.PLUGINS.filter(m=>m.resource&&m.resource.length>0).map(m=>m.resource).forEach(m=>m.forEach(S=>{r.push({type:S.type,icon:S.icon,title:c(S.title)}),S.service&&(u[S.type]=S.service)})),Ke("service",u),r.map(m=>m.type).forEach(m=>s.value[m]=[]);const p=[{type:"datasource",title:c("datasource.title"),icon:"datasource",name:c("datasource.name")}];M.PLUGINS.filter(m=>m.datasources&&m.datasources.length>0).map(m=>m.datasources).forEach(m=>m.forEach(S=>{p.push({type:S.type,icon:S.icon,title:S.title,name:S.name})})),p.map(m=>m.type).forEach(m=>s.value[m]=[]),Ke("resources",()=>{const m=[...r,...p],S=O=>O.length===1&&O[0].id.endsWith(":0")?O[0].children:O;return m.map(O=>({key:O.type,navbar:O,tree:S(JSON.parse(JSON.stringify(s.value[O.type]||[])))}))}),Object.values(u).forEach(m=>m.injectResources&&m.injectResources(S=>s.value[S])),be(()=>n.value=!0);const g=m=>qe(fe({},m.node),{folder:m.node.parentId!==void 0,opened:m.node.parentId!==void 0&&M.DEFAULT_EXPAND===!0,children:m.children&&m.children.length?m.children.map(S=>g(S)):void 0}),f=(m,S)=>{var A;i.value=!0,s.value={};const O=m?((A=r.find(U=>U.type===m)||p.find(U=>U.type===m))==null?void 0:A.title)||"":c("message.all");T.status("message.getResource",!0,O),j.send("/resource").success(U=>{[...r,...p].filter(N=>!m||N.type===m).forEach(N=>{var k,B;s.value[N.type]=((B=(k=U[N.type])==null?void 0:k.children)==null?void 0:B.map(z=>g(z)))||[]}),i.value=!1,T.status("message.getResourceFinish",!0,O),be(()=>S())})};T.$on(F.RELOAD_RESOURCES,()=>{i.value=!0,j.sendGet("/reload").success(()=>{T.status("message.reloadResourceSuccess"),f(null,()=>T.$emit(F.RELOAD_RESOURCES_FINISH))}).end(()=>i.value=!1)});const y=m=>f(m,()=>T.$emit(F.LOAD_RESOURCES_FINISH,m));T.$on(F.LOAD_RESOURCES,y),T.$on(F.RELOAD_RESOURCES_FINISH,y);const E=m=>{let S;return Object.values(s.value).some(O=>{const A=[];if(l(O,m,A)){S=A[0];const U=r.findIndex(N=>N.type===A[A.length-1].type);return o.value&&o.value.select(U),!0}return!1}),S};T.$on(F.SELECT_NAVBAR_BY_ITEM,E),T.$on(F.OPEN_WITH_ID,m=>{const S=E(m);S&&T.$emit(F.OPEN_ITEM,S)}),T.$on(F.LOGOUT,()=>s.value={}),t({loadResources:y}),pt(()=>a("onLoad"));let L=0;const I=()=>{if(++L%r.length==0)try{JSON.parse($e.get(M.RECENT_OPENED_TAB)||"[]").forEach(m=>{T.$emit(F.OPEN_WITH_ID,m)})}catch(m){console.error(m)}};return(m,S)=>{const O=b("magic-resource"),A=b("magic-loading"),U=b("magic-resizer"),N=b("magic-navbar-item"),k=b("magic-navbar"),B=b("magic-script-editor"),z=b("magic-toolbar"),Q=b("magic-data-resource"),le=b("magic-search"),oe=b("magic-export"),ye=b("magic-upload"),Te=b("magic-push"),At=b("magic-recent-opened");return v(),C("div",xp,[n.value?(v(),H(k,{key:0,direction:"vertical",to:m.$refs.mrl,ref_key:"mnl",ref:o,spliter:!0},{default:w(()=>[(v(),C(ee,null,ue(r,(Me,Qe)=>_(N,dt({key:Qe},Me),{default:w(()=>[_(U,{max:750,min:270,direction:"x"},{default:w(()=>[_(A,{loading:i.value},{default:w(()=>[_(O,dt(Me,{data:s.value[Me.type],onClose:S[0]||(S[0]=ke=>m.$refs.mnl.select(-1)),onOnLoad:I}),null,16,["data"])]),_:2},1032,["loading"])]),_:2},1024)]),_:2},1040)),64))]),_:1},8,["to"])):W("",!0),R("div",Rp,[R("div",Ap,[R("div",Ip,null,512),_(B),R("div",Cp,null,512)]),_(z)]),_(k,{reverse:!0,"default-select":-1,direction:"vertical",to:m.$refs.mrr,spliter:!0},{default:w(()=>[(v(),C(ee,null,ue(p,(Me,Qe)=>_(N,{key:Qe,title:Me.title,icon:Me.icon},{default:w(()=>[n.value?(v(),H(U,{key:0,max:420,min:140,value:200,direction:"x",reverse:!0},{default:w(()=>[_(A,{loading:i.value},{default:w(()=>[_(Q,{type:Me.type,title:Me.name,data:s.value[Me.type]},null,8,["type","title","data"])]),_:2},1032,["loading"])]),_:2},1024)):W("",!0)]),_:2},1032,["title","icon"])),64))]),_:1},8,["to"]),_(le),_(oe),_(ye),_(Te),_(At)])}}};var Np=q(Lp,[["__scopeId","data-v-32b75b61"]]),wp=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:Np});const kp={class:"magic-recent-opened"},Dp=["onClick"],Mp={key:1},Pp={key:0,style:{width:"100%",height:"100px"}},Up={setup(e){const t=We([]),a=P(!1),n=se("findResource"),s=se("service");try{JSON.parse($e.get(M.RECENT_OPENED)||"[]").forEach(l=>t.push(l))}catch{}const i=pe(()=>t.map(l=>n(l)).filter(l=>l&&s[l.type])),o=l=>{T.$emit(F.OPEN_WITH_ID,l),a.value=!1};return T.$on(F.DO_RECENT,()=>a.value=!a.value),T.$on(F.CLOSE,l=>{if(l.id){const r=t.findIndex(u=>u===l.id);r>-1&&t.splice(r,1),t.unshift(l.id),t.length>20&&t.splice(t.length-1,1),$e.set(M.RECENT_OPENED,He(t))}}),(l,r)=>{const u=b("magic-text-icon"),p=b("magic-empty"),g=b("magic-dialog");return v(),H(g,{value:a.value,"onUpdate:value":r[0]||(r[0]=f=>a.value=f),title:h(c)("editor.tooltip.recent"),padding:"0",shade:!1},{default:w(()=>[R("ul",kp,[(v(!0),C(ee,null,ue(h(i),(f,y)=>(v(),C("li",{key:y,onClick:Se(E=>o(f.item.id),["stop"])},[h(s)[f.type]&&h(s)[f.type].getIcon?(v(),H(u,{key:0,icon:h(s)[f.type].getIcon(f.item)},null,8,["icon"])):W("",!0),R("label",null,$(f.name),1),h(s)[f.type].requirePath&&f.path?(v(),C("span",Mp,"("+$(f.path)+")",1)):W("",!0)],8,Dp))),128))]),h(i).length===0?(v(),C("div",Pp,[_(p,{text:"empty."})])):W("",!0)]),_:1},8,["value","title"])}}};var $p=q(Up,[["__scopeId","data-v-44903aa6"]]),Bp=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:$p});const Fp={class:"magic-resource-header"},Hp=["title","onClick"],Vp={key:0},Gp={key:0},jp={class:"magic-create-group"},zp={key:0},Yp={props:{type:String,title:String,data:Array},emits:["close","onLoad"],setup(e,{emit:t}){const a=e,n=te("magic-backup-file"),s=se("service")[a.type],i=s.requirePath,o=s.getIcon,l=P(""),r=P(!0),u=P(!1),p=P(""),g=P(null),f=se("activateUserFiles"),y=pe(()=>r.value?c("resource.createGroup"):c("resource.updateGroup")),E=P(!0),L=P({}),I=P({}),m=P(!1),S=P({type:a.type}),O=pe(()=>a.data),A=P([{name:c("resource.createGroup"),icon:"group-add",onClick:()=>{S.value={type:a.type,parentId:"0"},r.value=!0,m.value=!0}},{name:c("resource.header.expand"),icon:"expand-all",onClick:()=>at(O.value,D=>D.opened=!0)},{name:c("resource.header.collapse"),icon:"collapse-all",onClick:()=>at(O.value,D=>D.opened=!1)},{name:c("resource.header.desc"),icon:"descending",show:()=>E.value,onClick:()=>E.value=!1},{name:c("resource.header.asc"),icon:"ascending",show:()=>!E.value,onClick:()=>E.value=!0},{separator:!0},{name:c("resource.header.position"),icon:"position",onClick:()=>{I.value&&L.value&&(T.$emit(F.SELECT_NAVBAR_BY_ITEM,L.value),I.value.scrollIntoView(L.value))}},{name:c("message.hide"),icon:"minimize",onClick:()=>t("close")}]),U=(D,G,Y,V,ve)=>{ve=ve||[],G=G||[];let Le=G.find(st=>st===D||st.id===D);if(Le)return Y.push(Le.name),ve.push(Le),s.requirePath&&Le.path&&V.push(Le.path),Le;for(let st=0,ia=G.length;st{const Y=[],V=[];U(He(D),He(O.value),Y,V);const ve=V.length>0?rt(`/${V.join("/")}`):"";return G?ve:`/${Y.join("/")}${s.requirePath?`(${ve})`:""}`},k=D=>N(D),B=[],z=(D,G)=>{if(D)if(D.folder)T.$emit(F.OPEN_GROUP,D);else{let Y=B.find(V=>V.item==D);Y||(Y=We({type:a.type,title:a.title,language:s.language||"magicscript",item:s.merge(D),path:()=>N(D),requestPath:()=>{const V=[];return U(He(D),He(O.value),[],V),rt(`/${V.join("/")}`)},getGroups:()=>{const V=[];return U(He(D),He(O.value),[],[],V),V},getIcon:s.getIcon,runnable:s.runnable,doTest:s.doTest,processSave:s.processSave||(V=>V)}),B.push(Y)),T.$emit(F.OPEN,Y,G)}};T.$on(F.OPEN,D=>L.value=D.item),T.$on(F.OPEN_EMPTY,()=>L.value=null);const{proxy:Q}=gt(),le=()=>{const D=fe({},S.value);delete D.children,delete D.opened,delete D.folder,j.sendJson("/resource/folder/save",D).success(G=>{if(G){const Y=qe(fe({},He(S.value)),{folder:!0,id:G});Te(Y),T.status("resource.saveGroupSuccess",!0,a.title,N(G)),m.value=!1,T.loading(2)}else{const Y=N(S.value);T.status("resource.saveGroupFailed",!1,a.title,Y),Q.$alert(c("resource.saveGroupFailed",a.title,Y))}})},oe=(D,G)=>new Promise(Y=>j.send("/resource/move",{src:D.id,groupId:G.groupId||G.id}).success(V=>{const ve=D.folder?"resource.moveGroup":"resource.moveResource",Le=N(D);V?(D.folder?T.status(ve+"Success",!0,a.title,Le):T.status(ve+"Success",!0,Le),D[D.folder?"parentId":"groupId"]=G.groupId||G.id):D.folder?(T.status(ve+"Failed",!1,a.title,Le),Q.$alert(c(ve+"Failed",a.title,Le))):(T.status(ve+"Failed",!1,Le),Q.$alert(c(ve+"Failed",Le))),Y(V)})),ye=(D,G)=>{G=G||O.value;const Y=G.findIndex(V=>V===D||V.id===D.id);Y>-1?G.splice(Y,1):G.forEach(V=>ye(D,V.children||[]))},Te=(D,G)=>{G=G||O.value||[];const Y=G.find(V=>V.id===D.id||D.groupId===V.id);if(Y)return Y.children=Y.children||[],Y.opened=!0,Y.id===D.id?(Y.name=D.name,Y.path=D.path,Y.parentId=D.parentId):Y.children.push(D),!0;if(D.parentId==="0")return G.push(D),!0;{if(G.some(ve=>Te(D,ve.children||[])))return!0;const V=D.parentId!==void 0&&G.find(ve=>ve.id===D.parentId);if(V)return V.children.push(D),!0}return!1};T.$on(F.OPEN_ITEM,D=>{const G=He(O.value);G&&z(U(He(D),G,[],[]),!0)});const At=(D,G)=>{if(D&&G){const Y=[];D.folder?(Y.push.apply(Y,[{label:c("resource.contextmenu.newFile",a.title),icon:"plus",onClick(){const V={groupId:D.id,name:c("message.untitled"),script:s.defaultScript||"return 'Hello magic-api'",path:s.requirePath?"":void 0};Te(V),z(V,!0)}},{label:c("resource.createGroup"),icon:"group-add",onClick(){r.value=!0,S.value={parentId:D.id,type:a.type},m.value=!0}},{label:c("resource.updateGroup"),icon:"update",onClick(){r.value=!1,S.value=fe({},D),m.value=!0}},{label:c("resource.copyGroup"),icon:"copy",onClick(){p.value=D.id,u.value=!0}},{label:c("resource.contextmenu.deleteGroup"),icon:"delete",onClick(){Q.$confirm(c("resource.contextmenu.deleteGroup"),c("resource.deleteGroupConfirm",a.title,N(D)),()=>{D.id?j.send("/resource/delete",{id:D.id}).success(V=>{V?(T.status("resource.deleteGroupSuccess",!0,a.title,N(D)),ye(D)):(Q.$alert("resource.deleteGroupFailed",a.title,N(D)),T.status("resource.deleteGroupFailed",!1,a.title,N(D)))}):ye(D)})}},{label:c("resource.contextmenu.exportGroup"),icon:"download",onClick(){j.send(`/download?groupId=${D.id}`,null,{headers:{"Content-Type":"application/json"},responseType:"blob"}).success(V=>{ya(V,`${D.name}.zip`),T.status("resource.groupExport",!0,D.name,a.title)})}}]),D.parentId!=="0"&&Y.push({label:c("resource.contextmenu.moveToRoot"),icon:"move",onClick(){Q.$confirm(c("resource.moveGroup"),c("resource.moveRootGroupConfirm",N(D)),()=>{j.send("/resource/move",{src:D.id,groupId:"0"}).success(V=>{V?(T.status("resource.moveRootSuccess",!0,a.title,N(D)),D.parentId="0",ye(D),Te(D)):(Q.$alert(c("resource.moveRootFailed",a.title,N(D))),T.status("resource.moveRootFailed",!1,a.title,N(D)))})})}})):(Y.push.apply(Y,[{label:c("resource.contextmenu.copy",a.title),icon:"copy",divided:!0,onClick:()=>{j.send(`/resource/file/${D.id}`).success(V=>{V.id=`copy${new Date().getTime()}d${parseInt(Math.random()*1e5)}`,Te(V),z(V,!0),V.name=V.name+`(${c("message.copy")})`,s.requirePath&&(V.path=V.path+"_copy")})}}]),s.requirePath&&(a.type==="api"&&Y.push({label:c("resource.contextmenu.copyWithPath"),icon:"copy",onClick:()=>{let V=N(D,!0);V&&(V=rt(M.SERVER_URL+"/"+V),_n(V)?T.status("resource.copyPathSuccess",!0,a.title,V):T.status("resource.copyPathFailed",!1,a.title,V))}}),Y.push.apply(Y,[{label:c("resource.contextmenu.copyRelativePath"),icon:"copy",divided:!0,onClick:()=>{const V=N(D,!0);V&&(_n(V)?T.status("resource.copyRelativePathSuccess",!0,a.title,V):T.status("resource.copyRelativePathFailed",!1,a.title,V))}}]),D.lock===M.LOCKED?Y.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>j.sendPost("/resource/unlock",{id:D.id}).success(V=>{T.status(V?"message.unlockSuccess":"message.unlockFailed",V,N(D)),V&&(D.lock=M.UNLOCK)})}):Y.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>j.sendPost("/resource/lock",{id:D.id}).success(V=>{T.status(V?"message.lockSuccess":"message.lockFailed",V,N(D)),V&&(D.lock=M.LOCKED)})})),D.id&&Y.push({label:c("toolbars.history"),icon:"history",onClick:()=>{T.$emit(F.ADD_FOOTER_TOOLBAR,{component:Ue(n),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",N(D)),allowClose:!0,data:{id:D.id}})}}),Y.push.apply(Y,[{label:c("message.refresh"),icon:"refresh"},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const V=`${a.title}\u300C${N(D)}\u300D`;Q.$confirm(c("message.deleteTips",a.title),c("message.deleteConfirm",V),()=>{D.id?j.send("/resource/delete",{id:D.id}).success(ve=>{ve?(T.status("message.deleteSuccess",!0,V),ye(D),T.$emit(F.DELETE_FILE,D)):(T.status("message.deleteFailed",!1,V),Q.$alert(c("message.deleteFailed",V)))}):(T.status("message.deleteSuccess",!0,V),ye(D),T.$emit(F.DELETE_FILE,D))})}}])),Q.$contextmenu({menus:Y,event:G})}},Me=D=>{Q.$contextmenu({event:D,menus:A.value.slice(0,5).filter(G=>!G.show||G.show()).map(G=>({icon:G.icon,label:G.name,onClick:G.onClick}))})};let Qe=null;const ke=()=>{g.value&&j.sendPost("/resource/folder/copy",{src:p.value,target:g.value.id.endsWith("-root")?"0":g.value.id}).success(D=>{Qe=D,u.value=!1,T.$emit(F.LOAD_RESOURCES)})},Gn=se("findResource");return T.$on(F.LOAD_RESOURCES_FINISH,()=>{Qe&&be(()=>{const D=Gn(Qe);T.$emit(F.SELECT_NAVBAR_BY_ITEM,D.item),T.$emit(F.OPEN_GROUP,D.item)})}),pt(()=>t("onLoad")),(D,G)=>{const Y=b("magic-icon"),V=b("magic-input"),ve=b("magic-empty"),Le=b("magic-text-icon"),st=b("magic-avatar-group"),ia=b("magic-tree"),Pe=b("magic-button"),Ga=b("magic-button-group"),ja=b("magic-dialog"),jn=b("magic-resource-choose");return v(),C("div",{class:"magic-resource",onContextmenu:G[10]||(G[10]=Se(Z=>Me(Z),["prevent"]))},[R("div",Fp,[_(Y,{icon:"search",size:"14px"}),_(V,{value:l.value,"onUpdate:value":G[0]||(G[0]=Z=>l.value=Z),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),R("ul",null,[(v(!0),C(ee,null,ue(A.value,(Z,za)=>(v(),C(ee,{key:za},[!Z.show||Z.show()?(v(),C("li",{key:0,title:Z.name||"",onClick:md=>Z.onClick&&Z.onClick(),class:Ee({separator:Z.separator})},[Z.separator?W("",!0):(v(),H(Y,{key:0,icon:Z.icon},null,8,["icon"]))],10,Hp)):W("",!0)],64))),128))])]),!e.data||e.data.length===0?(v(),H(ve,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(v(),H(ia,{key:1,ref_key:"treeObj",ref:I,data:h(O),onItemClick:z,onContextmenu:At,draggable:!0,sort:!0,descending:E.value,onMove:oe,filter:l.value,"filter-text":k,selected:L.value},{folder:w(({item:Z})=>[_(Y,{icon:Z.opened?"arrow-bottom":"arrow-right",onClick:Se(za=>Z.opened=!Z.opened,["stop"])},null,8,["icon","onClick"]),_(Y,{icon:"list"}),R("label",null,$(Z.name),1),h(i)&&Z.path?(v(),C("span",Vp,"("+$(Z.path)+")",1)):W("",!0)]),file:w(({item:Z})=>[_(Le,{icon:h(o)(Z)},null,8,["icon"]),R("label",null,$(Z.name),1),h(i)&&Z.path?(v(),C("span",Gp,"("+$(Z.path)+")",1)):W("",!0),Z.lock==="1"?(v(),H(Y,{key:1,icon:"lock"})):W("",!0),_(st,{users:h(f)[Z.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["data","descending","filter","selected"])),_(ja,{title:h(y),value:m.value,"onUpdate:value":G[5]||(G[5]=Z=>m.value=Z),width:"350px"},{default:w(()=>[R("ul",jp,[R("li",null,[R("label",null,$(h(c)("resource.form.groupName"))+"\uFF1A",1),_(V,{value:S.value.name,"onUpdate:value":G[1]||(G[1]=Z=>S.value.name=Z),placeholder:h(c)("resource.form.placeholder.name",e.title)},null,8,["value","placeholder"])]),h(i)?(v(),C("li",zp,[R("label",null,$(h(c)("resource.form.groupPath"))+"\uFF1A",1),_(V,{value:S.value.path,"onUpdate:value":G[2]||(G[2]=Z=>S.value.path=Z),placeholder:h(c)("resource.form.placeholder.path",e.title)},null,8,["value","placeholder"])])):W("",!0)]),_(Ga,{align:"right",style:{padding:"5px 0"}},{default:w(()=>[_(Pe,{value:h(y),type:"active",onOnClick:G[3]||(G[3]=Z=>le())},null,8,["value"]),_(Pe,{value:h(c)("message.cancel"),onOnClick:G[4]||(G[4]=Z=>m.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["title","value"]),_(ja,{value:u.value,"onUpdate:value":G[9]||(G[9]=Z=>u.value=Z),title:h(c)("resource.copyGroup"),shade:!1,padding:"0",width:"400px",overflow:"hidden"},{default:w(()=>[_(jn,{ref:"chooseGroup",value:g.value,"onUpdate:value":G[6]||(G[6]=Z=>g.value=Z),file:!1,type:e.type,single:!0},null,8,["value","type"]),_(Ga,{align:"right",style:{"margin-right":"5px","margin-bottom":"5px"}},{default:w(()=>[_(Pe,{value:h(c)("message.expand"),onOnClick:G[7]||(G[7]=Z=>D.$refs.chooseGroup.expand(!0))},null,8,["value"]),_(Pe,{value:h(c)("message.collapse"),onOnClick:G[8]||(G[8]=Z=>D.$refs.chooseGroup.expand(!1))},null,8,["value"]),_(Pe,{type:"active",value:h(c)("message.copy"),onOnClick:ke},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],32)}}};var qp=q(Yp,[["__scopeId","data-v-3ed2708c"]]),Kp=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:qp});const Be=e=>(ra("data-v-4cec8173"),e=e(),ca(),e),Wp={class:"magic-script-editor"},Xp={key:0,class:"magic-empty-container"},Jp={class:"magic-hot-key"},Qp=Be(()=>R("em",null,"Ctrl + S",-1)),Zp=Be(()=>R("br",null,null,-1)),ed=Be(()=>R("em",null,"Ctrl + Q",-1)),td=Be(()=>R("br",null,null,-1)),ad=Be(()=>R("em",null,"Alt + /",-1)),nd=Be(()=>R("br",null,null,-1)),sd=Be(()=>R("em",null,"F8",-1)),id=Be(()=>R("br",null,null,-1)),od=Be(()=>R("em",null,"F6",-1)),ld=Be(()=>R("br",null,null,-1)),rd=Be(()=>R("em",null,"Ctrl + Alt + L",-1)),cd=Be(()=>R("br",null,null,-1)),ud=Be(()=>R("em",null,"Ctrl + E",-1)),pd={key:0},dd={class:"magic-monaco-editor-wrapper"},_d={emits:["onLoad"],setup(e,{emit:t}){const{proxy:a}=gt(),n=We([]),s=P({}),i=P(!0),o=P(null),l=P(null),r=se("activateUserFiles"),u={String:"java.lang.String",Integer:"java.lang.Integer",Double:"java.lang.Double",Long:"java.lang.Long",Byte:"java.lang.Byte",Short:"java.lang.Short",Float:"java.lang.Float",MultipartFile:"org.springframework.web.multipart.MultipartFile",MultipartFiles:"java.util.List"};na.setEnvironment(()=>{var A;const m={},S=(A=s.value)==null?void 0:A.item,O=U=>U&&Array.isArray(U)&&U.forEach(N=>{N&&typeof N.name=="string"&&N.dataType&&(m[N.name]=u[N.dataType]||"java.lang.Object")});return S&&(O(S==null?void 0:S.parameters),O(S==null?void 0:S.paths)),m});const p=m=>{let S=n.findIndex(O=>O===m);if(n.splice(S,1),m===s.value){let O=n.length;S0&&T.$emit(F.OPEN,n[S-1])}T.$emit(F.CLOSE,m.item),n.length===0&&(T.$emit(F.OPEN_EMPTY),s.value={})};Ze(n,m=>{$e.set(M.RECENT_OPENED_TAB,m.filter(S=>{var O;return(O=S.item)==null?void 0:O.id}).map(S=>S.item.id))});const g=m=>{const S=s.value;if(S&&S.item){const O=s.value.processSave(S.item);return Object.keys(O).forEach(A=>S.item[A]=O[A]),j.sendJson(`/resource/file/${s.value.type}/save?auto=${m?0:1}`,O).success(A=>{const U=`${S.title}\u300C${S.path()}\u300D`;A?(T.status("message.saveSuccess",!0,U),S.tmpObject=JSON.parse(JSON.stringify(O)),S.item.id!==A&&T.loading(1),S.item.id=A):(T.status("message.saveFailed",!1,U),a.$alert(c("message.saveFailed",U)))})}},f=()=>s.value.doTest(s.value),y=m=>{if(s.value.debuging){o.value.removedDecorations(s.value.debugDecorations),s.value.debuging=!1,s.value.variables=null;const S=(s.value.decorations||[]).filter(O=>O.options.linesDecorationsClassName==="breakpoints").map(O=>O.range.startLineNumber).join("|");T.send(Ce.RESUME_BREAKPOINT,[s.value.item.id,m===!0?"1":"0",S].join(","))}},E=(m,S,O)=>{const A=[{label:c("editor.tab.close"),divided:!0,onClick(){p(S)}},{label:c("editor.tab.closeOther"),divided:!0,onClick(){[...n].forEach((U,N)=>N!=O&&p(U))}},{label:c("editor.tab.closeLeft"),onClick(){[...n].forEach((U,N)=>NN>O&&p(U))}},{label:c("editor.tab.closeAll"),onClick(){[...n].forEach(U=>p(U))}}];a.$contextmenu({menus:A,event:m})},L=m=>Object.keys(m.tmpObject||{}).some(S=>{const O=m.tmpObject[S],A=m.item[S];return O===A||S==="properties"||S==="responseBody"||S==="responseBodyDefinition"?!1:typeof O=="object"||typeof A=="object"?JSON.stringify(O)!==JSON.stringify(A):O!==A});T.$on(F.LOGOUT,()=>[...n].forEach(m=>p(m))),T.$on(F.DELETE_FILE,m=>{const S=n.findIndex(O=>O.item===m);S>-1&&p(n[S])}),T.$on(F.RELOAD_RESOURCES_FINISH,()=>{n.filter(m=>m.item&&m.item.id).forEach(m=>j.sendGet(`/resource/file/${m.item.id}`).success(S=>{T.status("message.getDetailSuccess",!0,`${m.title}\u300C${m.path()}\u300D`),Object.keys(S).forEach(O=>m.item[O]=S[O])}))}),T.$event(Ce.LOGIN_RESPONSE,()=>{var m;s.value&&T.send(Ce.SET_FILE_ID,((m=s.value.item)==null?void 0:m.id)||"0")});const I=m=>{m&&o.value&&(m.scrollTop=o.value.getScrollTop())};return T.$on(F.OPEN,m=>{let S=n.find(O=>O.item===m.item||O.item.id&&O.item.id===m.item.id);T.send(Ce.SET_FILE_ID,m.item.id||"0"),S?(s.value=S,i.value=!1,be(()=>o.value.setScrollTop(S.scrollTop||0))):(n.push(m),s.value=m,m.item.id&&!m.item.script?(i.value=!0,j.sendGet(`/resource/file/${m.item.id}`).success(O=>{T.status("message.getDetail",!0,`${m.title}\u300C${m.path()}\u300D`),Object.keys(O).forEach(A=>m.item[A]=O[A]),m.tmpObject=JSON.parse(JSON.stringify(m.processSave(O))),i.value=!1,be(()=>o.value.setScrollTop(0))})):(m.tmpObject=JSON.parse(JSON.stringify(m.processSave(m.item))),i.value=!1,be(()=>o.value.setScrollTop(0)))),s.value.decorations&&s.value.decorations.length>0&&be(()=>{const O=He(s.value.decorations);s.value.debugDecorations=o.value.appendDecoration(O).map((A,U)=>{var N;return((N=O[U].options)==null?void 0:N.className)==="debug-line"?A:null}).filter(A=>A!==null)||[]}),be(()=>l.value&&l.value.scrollIntoView(m))}),T.$on(F.DO_SAVE,g),T.$on(F.DO_TEST,()=>{const m=s.value;m&&m.item&&m.runnable&&m.doTest&&m.running!==!0&&(M.AUTO_SAVE&&m.item.lock!=="1"?g().end(S=>S&&f()):f())}),T.$event(Ce.BREAKPOINT,([m,{range:S,variables:O}])=>{var A,U;if(((U=(A=s.value)==null?void 0:A.item)==null?void 0:U.id)!==m){const N=n.find(k=>k.item.id===m);N&&T.$emit(F.OPEN,N)}be(()=>{s.value.variables=ti(O),s.value.debuging=!0,s.value.debugDecorations=[o.value.appendDecoration([{range:new it(S[0],1,S[0],1),options:{isWholeLine:!0,inlineClassName:"debug-line",className:"debug-line"}}])],T.$emit(F.SWITCH_TOOLBAR,"debug")})}),T.$on(F.DEBUG_CONTINUE,y),T.$on(F.DEBUG_SETPINTO,()=>y(!0)),T.$event(Ce.EXCEPTION,([[m,S,O]])=>{var A,U;if(((U=(A=s.value)==null?void 0:A.item)==null?void 0:U.id)===m){const N=new it(O[0],O[2],O[1],O[3]+1),k=o.value.getInstance(),B=k.deltaDecorations([],[{range:N,options:{hoverMessage:{value:S},inlineClassName:"squiggly-error"}}]);k.revealRangeInCenter(N),k.focus(),M.DECORATION_TIMEOUT>=0&&setTimeout(()=>k.deltaDecorations(B,[]),M.DECORATION_TIMEOUT)}}),pt(()=>t("onLoad")),(m,S)=>{const O=b("magic-text-icon"),A=b("magic-icon"),U=b("magic-avatar-group"),N=b("magic-tab"),k=b("magic-monaco-editor"),B=b("magic-loading");return v(),C("div",Wp,[h(n).length===0?(v(),C("div",Xp,[R("div",Jp,[R("p",null,[he($(h(c)("message.save")),1),Qp,Zp,he(" "+$(h(c)("message.run")),1),ed,td,he(" "+$(h(c)("editor.tooltip.complection")),1),ad,nd,he(" "+$(h(c)("editor.tooltip.resume")),1),sd,id,he(" "+$(h(c)("editor.tooltip.stepInto")),1),od,ld,he(" "+$(h(c)("editor.tooltip.format")),1),rd,cd,he(" "+$(h(c)("editor.tooltip.recent")),1),ud])])])):(v(),C(ee,{key:1},[_(N,{value:s.value,"onUpdate:value":S[0]||(S[0]=z=>s.value=z),tabs:h(n),className:"magic-script-tab",ref_key:"tab",ref:l,"allow-close":!0,onClose:p,onChange:S[1]||(S[1]=z=>h(T).$emit("open",z)),onBeforeChange:I,onItemContextmenu:E},{default:w(({tab:z})=>[_(O,{icon:z.getIcon(z.item)},null,8,["icon"]),he($(z.item.name),1),L(z)?(v(),C("span",pd,"*")):W("",!0),z.item.lock===m.$LOCKED?(v(),H(A,{key:1,icon:"lock"})):W("",!0),_(U,{users:h(r)[z.item.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["value","tabs"]),_(B,{loading:i.value},{default:w(()=>[R("div",dd,[_(k,{ref_key:"editor",ref:o,value:s.value.item.script,"onUpdate:value":S[2]||(S[2]=z=>s.value.item.script=z),decorations:s.value.decorations,"onUpdate:decorations":S[3]||(S[3]=z=>s.value.decorations=z),language:s.value.language,"support-breakpoint":!0},null,8,["value","decorations","language"])])]),_:1},8,["loading"])],64))])}}};var hd=q(_d,[["__scopeId","data-v-4cec8173"]]),fd=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:hd});const Hn={};Object.entries({"./components/magic-editor.vue":uo,"./components/common/magic-context-menu.vue":bo,"./components/common/magic-empty.vue":Oo,"./components/common/magic-loading.vue":Io,"./components/common/magic-monaco-diff-editor.vue":ko,"./components/common/magic-monaco-editor.vue":$o,"./components/common/magic-resizer.vue":Vo,"./components/common/data/magic-navbar-item.vue":Yo,"./components/common/data/magic-navbar.css":Ko,"./components/common/data/magic-navbar.js":el,"./components/common/data/magic-tab.css":al,"./components/common/data/magic-tab.js":sl,"./components/common/data/magic-table-column.vue":ol,"./components/common/data/magic-table.css":rl,"./components/common/data/magic-table.js":ul,"./components/common/data/magic-tree.css":dl,"./components/common/data/magic-tree.js":hl,"./components/common/dialog/magic-alert.vue":Rs,"./components/common/dialog/magic-confirm.vue":Is,"./components/common/dialog/magic-dialog.vue":vl,"./components/common/dialog/magic-modal.js":Cs,"./components/common/dialog/magic-notify.vue":xl,"./components/common/form/magic-button-group.vue":Il,"./components/common/form/magic-button.vue":Nl,"./components/common/form/magic-checkbox.vue":Ml,"./components/common/form/magic-file.vue":Fl,"./components/common/form/magic-input.vue":jl,"./components/common/form/magic-select.vue":Xl,"./components/common/form/magic-textarea.vue":er,"./components/common/icon/magic-avatar-group.vue":nr,"./components/common/icon/magic-avatar.vue":lr,"./components/common/icon/magic-icon.vue":Qo,"./components/common/icon/magic-text-icon.vue":pr,"./components/panel/api/magic-api-body.vue":hr,"./components/panel/api/magic-api-description.vue":mr,"./components/panel/api/magic-api-group.vue":br,"./components/panel/api/magic-api-header.vue":Sr,"./components/panel/api/magic-api-info.vue":Ar,"./components/panel/api/magic-api-option.vue":Lr,"./components/panel/api/magic-api-parameter.vue":kr,"./components/panel/api/magic-api-path.vue":Pr,"./components/panel/api/magic-api-request-body.vue":Br,"./components/panel/api/magic-api-request-structure.vue":Yr,"./components/panel/api/magic-api-response-body.vue":Xr,"./components/panel/api/magic-api-response-header.vue":tc,"./components/panel/api/magic-api-response-structure.vue":lc,"./components/panel/api/magic-api-response.vue":pc,"./components/panel/api/magic-global-header.vue":hc,"./components/panel/api/magic-global-parameter.vue":gc,"./components/panel/api/magic-global.vue":yc,"./components/panel/common/magic-panel-common-toolbar.vue":Sc,"./components/panel/common/magic-panel-toolbar.vue":Ic,"./components/panel/common/magic-resource-choose.vue":Dc,"./components/panel/datasource/magic-datasource-datasource.vue":Kc,"./components/panel/footer/magic-backup-file.vue":Zc,"./components/panel/footer/magic-backup.vue":iu,"./components/panel/footer/magic-debug.vue":Nu,"./components/panel/footer/magic-event.vue":Pu,"./components/panel/footer/magic-log.vue":Hu,"./components/panel/footer/magic-online.vue":zu,"./components/panel/footer/magic-status-bar.vue":Ju,"./components/panel/footer/magic-todo.vue":n1,"./components/panel/footer/magic-toolbar.vue":c1,"./components/panel/function/magic-function-info.vue":_1,"./components/panel/function/magic-function-parameter.vue":m1,"./components/panel/header/magic-export.vue":E1,"./components/panel/header/magic-header.vue":D1,"./components/panel/header/magic-push.vue":$1,"./components/panel/header/magic-search.vue":q1,"./components/panel/header/magic-upload.vue":W1,"./components/panel/main/magic-data-resource.vue":np,"./components/panel/main/magic-login.vue":Ep,"./components/panel/main/magic-main.vue":wp,"./components/panel/main/magic-recent-opened.vue":Bp,"./components/panel/main/magic-resource.vue":Kp,"./components/panel/main/magic-script-editor.vue":fd}).forEach(([e,t])=>Hn[e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))]=t.default);const Va=e=>{let t;Object.entries(Hn).forEach(([a,n])=>{e.component(a,n)}),e.config.globalProperties.$contextmenu=a=>{t!=null&&t.unmount(),t=la(Pn,{menus:a.menus,position:{x:a.event.clientX,y:a.event.clientY},onDestory:()=>{t&&t.unmount(),t=null}}),Va(t),t.mount(".magic-editor .magic-mounts")},Object.keys(M).forEach(a=>e.config.globalProperties[`$${a}`]=M[a]),an(e,Va)};if(typeof window!="undefined"){let e=function(){var t=document.body,a=document.getElementById("__svg__icons__dom__1647163644200__");a||(a=document.createElementNS("http://www.w3.org/2000/svg","svg"),a.style.position="absolute",a.style.width="0",a.style.height="0",a.id="__svg__icons__dom__1647163644200__",a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),a.innerHTML='',t.insertBefore(a,t.firstChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}window.Vue=ns;const Vn=la(ps);Vn.use(Va);Vn.mount("#app"); diff --git a/magic-editor/src/main/resources/magic-editor/assets/app.c638e5c5.js b/magic-editor/src/main/resources/magic-editor/assets/app.c638e5c5.js new file mode 100644 index 00000000..3af6206d --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/app.c638e5c5.js @@ -0,0 +1,291 @@ +var za=Object.defineProperty,Ya=Object.defineProperties;var qa=Object.getOwnPropertyDescriptors;var Kn=Object.getOwnPropertySymbols;var Ka=Object.prototype.hasOwnProperty,Wa=Object.prototype.propertyIsEnumerable;var rn=(e,t,n)=>t in e?za(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,pe=(e,t)=>{for(var n in t||(t={}))Ka.call(t,n)&&rn(e,n,t[n]);if(Kn)for(var n of Kn(t))Wa.call(t,n)&&rn(e,n,t[n]);return e},Ue=(e,t)=>Ya(e,qa(t));var mt=(e,t,n)=>(rn(e,typeof t!="symbol"?t+"":t,n),n);import{r as b,o as g,c as j,u as h,a as U,w as k,b as A,t as B,d as _,e as kn,p as Ke,g as St,f as ht,h as Xa,i as Je,n as be,j as w,k as yt,v as $t,l as X,m as ze,q as Se,F as Z,s as he,x as Ee,y as _e,z as Ot,A as tt,B as me,C as le,T as ha,D as je,E as Ja,G as Qa,H as Za,I as se,J as es,K as fa,L as te,M as dt,N as ts,O as $e,P as Dn,Q as Mn,R as ns,S as as,V as ss}from"./vue.d1ea1415.js";import{a as is}from"./axios.23e7b955.js";import{l as Wn,e as Be,a as W,R as ot,W as os,b as rs,c as ls,m as cs,C as Xn,K as ut,d as gt,M as us,f as ps,g as ln,T as ds,t as _s}from"./vendor.08c4cc4b.js";const hs={setup(e){let t={};try{parent&&parent.MAGIC_EDITOR_CONFIG&&(t=pe({},parent.MAGIC_EDITOR_CONFIG))}catch{}window.MAGIC_EDITOR_CONFIG&&(t=pe(pe({},t),window.MAGIC_EDITOR_CONFIG)),t.baseURL="./",t.serverURL="./",t.inJar=!0;const n=i=>{var o=window.location.search.substr(1).match(new RegExp("(^|&)"+i+"=([^&]*)(&|$)","i"));return o&&unescape(o[2])},a=n("headerName"),s=n("headerValue");return a&&s&&(t.request=t.request||{},t.request.beforeSend=i=>(i.headers[a]=s,i)),(i,o)=>{const r=b("magic-editor");return g(),j(r,{config:h(t)},null,8,["config"])}}};const fs="magic-editor",ms="2.0.1",gs={dev:"vite",build:"vite build"},vs={axios:"^0.24.0","monaco-editor":"0.29.1",qs:"^6.10.1",vue:"^3.2.31"},Es={"@vitejs/plugin-vue":"^2.2.4",vite:"^2.8.6","vite-plugin-svg-icons":"^1.1.0"};var bs={name:fs,version:ms,scripts:gs,dependencies:vs,devDependencies:Es};const cn="magic-";class ys{constructor(){}set(t,n){(Array.isArray(n)||typeof n=="object")&&(n=JSON.stringify(n)),localStorage.setItem(`${cn}${t}`,n)}remove(t){localStorage.removeItem(`${cn}${t}`)}get(t){return localStorage.getItem(`${cn}${t}`)}}var Fe=new ys,Pn={name:"English",message:{run:"Run",save:"Save",search:"Search",upload:"Upload",export:"Export",push:"Push",skin:"Skin",reload:"reload all resources",copy:"Copy",searchText:"Enter keywords to search",required:"Required",defaultValue:"Default Value",description:"Description",parameterType:"Parameter Type",view:"View",addRow:"Add Row",removeRow:"Remove Row",all:"All",clear:"Clear",empty:"{0} is empty.",type:"Type",date:"Date",name:"Name",group:"{0} Group",i18n:"Language",tips:"Tips",ok:"OK",refresh:"Refresh",loading:"Loading...",nodata:"no data.",cancel:"Cancel",update:"Update",create:"Create",username:"Username",password:"Password",createDataSource:"Create {0}",chooseFile:"Please Choose File",expand:"Expand",collapse:"Collapse",selectAll:"Select All",deselectAll:"Deselect All",hide:"Hide",login:"Login",ignore:"Ignore",document:"Document",joinGroup:"Join QQ Group",untitled:"Untitled",log:"Log",enable:"Enable",variable:"Variable Info",switchLocale:"Switch Language To {0}, It work at after refreshing the page, Do you want to Refresh the page ?",loadClass:"Load Classes...",loadClassError:"Failed Load Classes",switchSkin:"Switch Skin To\u300C{0}\u300D",loadClassFinish:"Class Loaded",tryAutoLogin:"Try Auto Login",autoLoginSuccess:"Auto Login Success",getCurrentLoginUser:"Load Current Logined User",getResource:"Load {0} Resources",getResourceFinish:"{0} Resources Loaded",connectDebugServer:"Debug Server Connecting...",debugServerClose:"Debug Server Disconnected",connectDebugServerSuccess:"Connect Debug Server Success",reloadResourceSuccess:"Resource Reload Success",getDetail:"Load {0} Detail",getDetailSuccess:"Load {0} Detail Success",lockSuccess:"Lock {0} Success",lockFailed:"Failed to Lock {0}",unlockSuccess:"UnLock {0} Success",unlockFailed:"Failed to UnLock {0}",updateTips:"Update {0}",saveSuccess:"Save {0} Success",saveFailed:"Failed to Save {0}",newVersionRelease:"New Version {0} available",versionLastest:"Current Version is Lastese",versionUpdate:"New Version {0} available
Do you want Upgrade?",changelog:"CHANGELOG",versionConflict:"Version does not matched frontend: {0}, backend: {1}, Please Check!",versionCheck:"Version Check",loadConfigError:"Failed to load configuration",logout:"Logout",logoutSuccess:"Logout Success",logoutConfirm:"Are you sure Logout {0} ?",deleteConfirm:"Do you want Delete {0}",deleteSuccess:"Delete {0} Success",deleteFailed:"Failed to Delete {0}",deleteTips:"Delete {0}",remote:"Remote",secret:"Secret",exported:"The selected resource has been exported",exportNoneSelect:"Please select and then export",pushNoneSelect:"Please select and then push",responseBody:"Body",responseHeader:"Header",responseStructure:"Structure",root:"Root",pushWarning:"When the full mode is pushed, the local data shall prevail and the full coverage update will be carried out. Do you want to continue?",uploadWarning:"When uploading in full mode, the overwrite update operation is performed based on the uploaded data, and other interfaces may be deleted.
In the case of partial export, it is recommended to use incremental update. Do you want to continue?",noValidate:"No Validate",validatePattern:"Regex attern",validateExpression:"Expression"},plugin:{loading:"Load plugin \u300C{0}\u300D",loaded:"Plugin\u300C{0}\u300D Loaded",loadFailed:"Failed to load plugin\u300C{0}\u300D"},resource:{createGroup:"Create Group",updateGroup:"Update Group",copyGroup:"Copy Group",deleteGroupConfirm:"Do you want Delete {0} Group\u300C{1}\u300D?",deleteGroupSuccess:"Delete {0} Group\u300C{1}\u300DSuccess",deleteGroupFailed:"Failed to Delete {0} Group \u300C{1}\u300D",groupExport:"Group\u300C{0}\u300D's {1} Exported",moveGroup:"Move Group",moveRootGroupConfirm:"Do you want move Group \u300C{0}\u300Dinto root?",moveRootSuccess:"Move {0} Group \u300C{1}\u300Dinto root Success",moveRootFailed:"Failed to Move {0} Group\u300C{1}\u300D into root",moveGroupSuccess:"Move {0} Group \u300C{1}\u300D Success",moveGroupFailed:"Failed to Move {0} Group \u300C{1}\u300D",moveFileSuccess:"Move {0} Success",moveResourceFailed:"Failed to Move {0}",saveGroupSuccess:"Save {0} Group {1}\u300D Success",saveGroupFailed:"Failed to Save {0} Group \u300C{1}\u300D",copyPathSuccess:"Copy {0} Path {1}\u300D Success",copyPathFailed:"Failed to Copy {0} Path \u300C{1}\u300D",copyRelativePathSuccess:"Copy {0} Relative Path \u300C{1}\u300D Success",copyRelativePathFailed:"Failed to Copy {0} Relative Path \u300C{1}\u300D",contextmenu:{copy:"Copy {0}",copyWithPath:"Copy Absolute Path",copyRelativePath:"Copy Relative Path",lock:"Lock",unlock:"UnLock",delete:"Delete",newFile:"New {0}",deleteGroup:"Delete Group",exportGroup:"Export Group",moveToRoot:"Move To Root"},header:{expand:"Expand All",collapse:"Collapse All",asc:"Ascending",desc:"Descending",position:"Select Opened File"},form:{groupName:"Group Name",groupPath:"Group Path",placeholder:{name:"Please Enter {0} Group Name",path:"Please Enter {0} Group Path"}}},editor:{tab:{close:"Close",closeOther:"Close Other Tabs",closeLeft:"Close Tabs to the Left",closeRight:"Close Tabs to the Right",closeAll:"Close All Tabs"},tooltip:{complection:"Trigger Suggest",resume:"Resume Breakpoint",stepInto:"Step Into",format:"Reformat Code",recent:"Recent Opened Files"},triggerSuggest:"Trigger Suggest"},api:{title:"Api Info",name:"Api",form:{method:"Method",name:"Name",path:"Path",placeholder:{name:"Please Enter Api Name",path:"Please Enter Api Path"}},navbars:{parameter:"Parameters",header:"Headers",path:"PathVariables",body:"Body",option:"Options",description:"Descriptions",groupOption:"Group Options"},validateType:"Validate Type",expression:"Expression or Regex Pattern",validate:"Validate Description",field:"Field",test:{requestBodyError:"RequestBody Has Error, please check!",missPath:"Please enter PathVariable",requestError:"Failed to send Request\u300C{0}\u300D",success:"\u300C{0}\u300DRequest finish, Status:{1} Size:{2} Time\uFF1A{3} ms",begin:"Start Request For\u300C{0}\u300D"}},datasource:{title:"DataSource",name:"DataSource",copySuccess:"Copy {0} Success",copyFailed:"Failed to Copy {0}",test:"Test",connected:"Connected",connectFailed:`Failed to Connect, Reason:\r +{0}`,primary:"Primary",form:{placeholder:{name:"DataSource Name, Only Display Use",key:"DataSource Key, Required",url:"Please Enter jdbcURL\uFF0Ceg: jdbc:mysql://localhost/dbname",username:"Please Enter Database username, Optional",password:"Please Enter Database password, Optional",driver:"DriverClass, Optional",type:"Pool Type, Optional",maxRows:"Max Return Rows"},driver:"Driver",type:"Type",other:"Others"}},fn:{title:"Function Info",name:"Function",number:"Nunmber",string:"String",collection:"Collection",returnValue:"Return Types",parameter:"Function Parameters",description:"Function Description",form:{name:"Name",path:"Path",placeholder:{name:"Please Enter Function Name",path:"Please Enter Function Path"}}},toolbars:{debug:"Debug",log:"Run Log",history:"History",event:"Event",global:"Global Parameters",response:"Response",viewHistory:"History:{0}"},event:{message:"Message"},history:{name:"History",operator:"Operators"},upload:{full:"Full Upload",increment:"Increment Upload",success:"{0} Success",failed:"Failed to {0}"},push:{full:"Full Push",increment:"Increment Push",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"Full Backup",backupSuccess:"Full Backup Success",rollback:"Rollback",current:"Current",difference:"Difference",rollbackSuccess:"Rollback {0} Success",rollbackFailed:"Failed to Rollback {0}",rollbackConfirm:"this operation will overview current resources, Do you want to continue?"},online:{login:"User Login",loginTips:"User {0} Login, IP: {1}",logout:"User Logout",logoutTips:"User {0} Logout, IP: {1}",onlines:"Online: {0}"},log:{hide:"Click to hide multiline log",show:"{0} lines of log are hidden, Click to show",scrollEnd:"Scroll to End"},code:{error:"Error({0})",invalid:"Error,HttpStatus({0})",httpError:"Error","-2":"Current is Readonly, Cannot be Operated","-10":"Unauthorized Operation","1001":"Group Not Found","1002":"Not Support the Group Type","1003":"Remote Cannot be empty","1004":"secretKey Cannot be empty","1005":"The name will repeat after moving. Please modify the name and try again.","1006":"Source object and grouping cannot be consistent","1007":"Resoirce Not Found","1008":"The current resource has been locked. Please operate after unlocking","1009":"This path has been used. Please try another path","1010":"There are conflicts in resource [{0}], please check","1011":"The path will conflict after moving. Please try another path","1012":"Request Method Cannot be empty","1013":"Reqeust Path Cannot be empty","1014":"Function Path Cannot be empty","1015":"The configured file path does not exist, please check","1016":"The Api [{0} ({1})] conflicts with the application and cannot be registered","1017":"Script Cannot be empty","1018":"Name Cannot be empty","1019":"Path Cannot be empty","1020":"jdbcURL Cannot be empty","1021":"key Cannot be empty","1022":"The data source key has been used. Please replace it and try again","1023":"Please Choose Group","1024":"Cron Expression Cannot be empty","1025":"The name cannot contain special characters. Only Chinese, numbers, letters and +-.() and . cannot be start","1026":"The data source key cannot contain special characters, only Chinese, numbers, letters, _","1027":"Failed to save. The group name under the same group cannot be duplicate and cannot contain special characters.","1028":"Parameter validation failed","1029":"Header validation failed","1030":"PathVariable validation failed","1031":"RequestBody validation failed","1032":"Please Upload File","1033":"Failed to validate Signature. Please check whether the secret key is correct","1034":"Backup is not enabled and cannot be operated","1035":"Api Not Found"}},Ts=Object.freeze(Object.defineProperty({__proto__:null,default:Pn},Symbol.toStringTag,{value:"Module"})),Bt={name:"\u7B80\u4F53\u4E2D\u6587",message:{run:"\u8FD0\u884C",save:"\u4FDD\u5B58",search:"\u641C\u7D22",upload:"\u4E0A\u4F20",export:"\u5BFC\u51FA",push:"\u63A8\u9001",skin:"\u76AE\u80A4",reload:"\u91CD\u65B0\u52A0\u8F7D\u6240\u6709\u6570\u636E",copy:"\u590D\u5236",searchText:"\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",required:"\u5FC5\u586B",defaultValue:"\u9ED8\u8BA4\u503C",description:"\u63CF\u8FF0",parameterType:"\u53C2\u6570\u7C7B\u578B",view:"\u89C6\u56FE",addRow:"\u589E\u52A0\u4E00\u884C",removeRow:"\u5220\u9664\u4E00\u884C",all:"\u5168\u90E8",clear:"\u6E05\u7A7A",empty:"\u6682\u65E0{0}",type:"\u7C7B\u578B",date:"\u65F6\u95F4",name:"\u540D\u79F0",group:"{0}\u5206\u7EC4",i18n:"\u8BED\u8A00",tips:"\u63D0\u793A",ok:"\u786E\u5B9A",refresh:"\u5237\u65B0",loading:"\u52A0\u8F7D\u4E2D",nodata:"\u65E0\u6570\u636E",cancel:"\u53D6\u6D88",update:"\u4FEE\u6539",create:"\u521B\u5EFA",username:"\u7528\u6237\u540D",password:"\u5BC6\u7801",createDataSource:"\u521B\u5EFA{0}",chooseFile:"\u8BF7\u9009\u62E9\u6587\u4EF6",expand:"\u5C55\u5F00",collapse:"\u6536\u7F29",selectAll:"\u5168\u9009",deselectAll:"\u53D6\u6D88\u5168\u9009",hide:"\u9690\u85CF",login:"\u767B\u5F55",ignore:"\u4E0D\u518D\u63D0\u9192",document:"\u5E2E\u52A9\u6587\u6863",joinGroup:"\u52A0\u5165QQ\u7FA4",untitled:"\u672A\u5B9A\u4E49\u540D\u79F0",log:"\u65E5\u5FD7",enable:"\u542F\u7528",variable:"\u53D8\u91CF\u4FE1\u606F",switchLocale:"\u5DF2\u5207\u6362\u81F3{0}\uFF0C\u5237\u65B0\u9875\u9762\u540E\u751F\u6548\uFF0C\u662F\u5426\u5237\u65B0\uFF1F",loadClass:"\u52A0\u8F7Dclasses\u4FE1\u606F...",loadClassError:"\u52A0\u8F7Dclasses\u4FE1\u606F\u5931\u8D25",switchSkin:"\u5207\u6362\u76AE\u80A4\u81F3\u300C{0}\u300D",loadClassFinish:"classes\u4FE1\u606F\u52A0\u8F7D\u5B8C\u6BD5",tryAutoLogin:"\u5C1D\u8BD5\u81EA\u52A8\u767B\u5F55",autoLoginSuccess:"\u81EA\u52A8\u767B\u5F55\u6210\u529F",getCurrentLoginUser:"\u83B7\u53D6\u5F53\u524D\u767B\u5F55\u7528\u6237\u4FE1\u606F",getResource:"\u83B7\u53D6{0}\u8D44\u6E90",getResourceFinish:"\u83B7\u53D6{0}\u8D44\u6E90\u5B8C\u6BD5",connectDebugServer:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668...",debugServerClose:"\u8C03\u8BD5\u670D\u52A1\u5668\u5DF2\u65AD\u5F00",connectDebugServerSuccess:"\u8FDE\u63A5\u8C03\u8BD5\u670D\u52A1\u5668\u6210\u529F",reloadResourceSuccess:"\u91CD\u65B0\u52A0\u8F7D\u8D44\u6E90\u6210\u529F",getDetail:"\u83B7\u53D6{0}",getDetailSuccess:"\u83B7\u53D6{0}\u8BE6\u60C5\u6210\u529F",lockSuccess:"\u6210\u529F\u9501\u5B9A{0}",lockFailed:"\u9501\u5B9A{0}\u5931\u8D25",unlockSuccess:"\u6210\u529F\u89E3\u9501{0}",unlockFailed:"\u89E3\u9501{0}\u5931\u8D25",updateTips:"\u4FEE\u6539{0}",saveSuccess:"\u4FDD\u5B58{0}\u6210\u529F",saveFailed:"\u4FDD\u5B58{0}\u5931\u8D25",newVersionRelease:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u6700\u65B0\u7248\u672C\u4E3A\uFF1A{0},\u5EFA\u8BAE\u66F4\u65B0\uFF01\uFF01",versionLastest:"\u7248\u672C\u68C0\u6D4B\u5B8C\u6BD5\uFF0C\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248",versionUpdate:"\u68C0\u6D4B\u5230\u5DF2\u6709\u65B0\u7248\u672C{0}\uFF0C\u662F\u5426\u66F4\u65B0\uFF1F",changelog:"\u66F4\u65B0\u65E5\u5FD7",versionConflict:"\u68C0\u6D4B\u5230\u524D\u540E\u7AEF\u7248\u672C\u4E0D\u4E00\u81F4\uFF08\u524D\u7AEF\uFF1A{0} \u540E\u7AEF\uFF1A{1}\uFF09\uFF0C\u8BF7\u68C0\u67E5",versionCheck:"\u7248\u672C\u68C0\u6D4B",loadConfigError:"\u52A0\u8F7D\u914D\u7F6E\u5931\u8D25",logout:"\u6CE8\u9500\u767B\u5F55",logoutSuccess:"\u6CE8\u9500\u767B\u5F55\u6210\u529F",logoutConfirm:"\u662F\u5426\u8981\u6CE8\u9500\u767B\u5F55\u300C{0}\u300D",deleteConfirm:"\u662F\u5426\u8981\u5220\u9664{0}",deleteSuccess:"\u5220\u9664{0}\u6210\u529F",deleteFailed:"\u5220\u9664{0}\u5931\u8D25",deleteTips:"\u5220\u9664{0}",remote:"\u8FDC\u7A0B\u5730\u5740",secret:"\u79D8\u94A5",exported:"\u6570\u636E\u5DF2\u5BFC\u51FA\u5B8C\u6BD5",exportNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u518D\u5728\u8FDB\u884C\u5BFC\u51FA\uFF01",pushNoneSelect:"\u8BF7\u9009\u62E9\u4E4B\u540E\u518D\u8FDB\u884C\u63A8\u9001\uFF01",responseBody:"Body",responseHeader:"\u54CD\u5E94Header",responseStructure:"\u54CD\u5E94\u7ED3\u6784",root:"\u6839\u8282\u70B9",pushWarning:"\u5168\u91CF\u6A21\u5F0F\u63A8\u9001\u65F6\uFF0C\u4EE5\u672C\u5730\u6570\u636E\u4E3A\u51C6\u5168\u91CF\u8986\u76D6\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",uploadWarning:"\u5168\u91CF\u6A21\u5F0F\u4E0A\u4F20\u65F6\uFF0C\u4EE5\u4E0A\u4F20\u7684\u6570\u636E\u4E3A\u51C6\u8FDB\u884C\u8986\u76D6\u66F4\u65B0\u64CD\u4F5C\uFF0C\u53EF\u80FD\u4F1A\u5220\u9664\u5176\u4ED6\u63A5\u53E3
\u5728\u975E\u5168\u91CF\u5BFC\u51FA\u65F6\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u589E\u91CF\u66F4\u65B0\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F",noValidate:"\u4E0D\u9A8C\u8BC1",validatePattern:"\u6B63\u5219\u9A8C\u8BC1",validateExpression:"\u8868\u8FBE\u5F0F\u9A8C\u8BC1"},plugin:{loading:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loaded:"\u5DF2\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D",loadFailed:"\u52A0\u8F7D\u63D2\u4EF6\u300C{0}\u300D\u5931\u8D25"},resource:{createGroup:"\u521B\u5EFA\u5206\u7EC4",updateGroup:"\u4FEE\u6539\u5206\u7EC4",copyGroup:"\u590D\u5236\u5206\u7EC4",deleteGroupConfirm:"\u662F\u5426\u8981\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\uFF1F",deleteGroupSuccess:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",deleteGroupFailed:"\u5220\u9664{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",groupExport:"\u5206\u7EC4\u300C{0}\u300D\u76F8\u5173{1}\u5DF2\u5BFC\u51FA",moveGroup:"\u79FB\u52A8\u5206\u7EC4",moveRootGroupConfirm:"\u662F\u5426\u8981\u5C06\u5206\u7EC4\u300C{0}\u300D\u79FB\u52A8\u81F3\u6839\u8282\u70B9",moveRootSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u6210\u529F",moveRootFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u81F3\u6839\u8282\u70B9\u5931\u8D25",moveGroupSuccess:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",moveGroupFailed:"\u79FB\u52A8{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",moveFileSuccess:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u6210\u529F",moveResourceFailed:"\u79FB\u52A8\u8D44\u6E90\u300C{0}\u300D\u5931\u8D25",saveGroupSuccess:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u6210\u529F",saveGroupFailed:"\u4FDD\u5B58{0}\u5206\u7EC4\u300C{1}\u300D\u5931\u8D25",copyPathSuccess:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyPathFailed:"{0}\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",copyRelativePathSuccess:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u6210\u529F",copyRelativePathFailed:"{0}\u76F8\u5BF9\u8DEF\u5F84\u300C{1}\u300D\u590D\u5236\u5931\u8D25\uFF0C\u8BF7\u624B\u52A8\u590D\u5236",contextmenu:{copy:"\u590D\u5236{0}",copyWithPath:"\u590D\u5236\u8DEF\u5F84",copyRelativePath:"\u590D\u5236\u76F8\u5BF9\u8DEF\u5F84",lock:"\u9501\u5B9A",unlock:"\u89E3\u9501",delete:"\u5220\u9664",newFile:"\u65B0\u5EFA{0}",deleteGroup:"\u5220\u9664\u5206\u7EC4",exportGroup:"\u5BFC\u51FA\u5206\u7EC4",moveToRoot:"\u79FB\u52A8\u81F3\u6839\u8282\u70B9"},header:{expand:"\u5168\u90E8\u5C55\u5F00",collapse:"\u5168\u90E8\u6298\u53E0",asc:"\u6309\u5B57\u6BCD\u5347\u5E8F",desc:"\u6309\u5B57\u6BCD\u964D\u5E8F",position:"\u5B9A\u4F4D\u5F53\u524D\u6587\u4EF6"},form:{groupName:"\u5206\u7EC4\u540D\u79F0",groupPath:"\u5206\u7EC4\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u540D\u79F0",path:"\u8BF7\u8F93\u5165{0}\u5206\u7EC4\u8DEF\u5F84"}}},editor:{tab:{close:"\u5173\u95ED",closeOther:"\u5173\u95ED\u5176\u5B83",closeLeft:"\u5173\u95ED\u5DE6\u4FA7",closeRight:"\u5173\u95ED\u53F3\u4FA7",closeAll:"\u5168\u90E8\u5173\u95ED"},tooltip:{complection:"\u4EE3\u7801\u63D0\u793A",resume:"\u6062\u590D\u65AD\u70B9",stepInto:"\u6B65\u8FDB",format:"\u4EE3\u7801\u683C\u5F0F\u5316",recent:"\u6700\u8FD1\u6253\u5F00"},triggerSuggest:"\u89E6\u53D1\u4EE3\u7801\u63D0\u793A"},api:{title:"\u63A5\u53E3\u4FE1\u606F",name:"\u63A5\u53E3",form:{method:"\u8BF7\u6C42\u65B9\u6CD5",name:"\u63A5\u53E3\u540D\u79F0",path:"\u63A5\u53E3\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u63A5\u53E3\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u63A5\u53E3\u8DEF\u5F84"}},navbars:{parameter:"\u8BF7\u6C42\u53C2\u6570",header:"\u8BF7\u6C42Header",path:"\u8DEF\u5F84\u53D8\u91CF",body:"\u8BF7\u6C42Body",option:"\u63A5\u53E3\u9009\u9879",description:"\u63A5\u53E3\u63CF\u8FF0",groupOption:"\u5206\u7EC4\u9009\u9879"},validateType:"\u9A8C\u8BC1\u65B9\u5F0F",expression:"\u8868\u8FBE\u5F0F\u6216\u6B63\u5219\u8868\u8FBE\u5F0F",validate:"\u9A8C\u8BC1\u8BF4\u660E",field:"\u5B57\u6BB5",test:{requestBodyError:"RequestBody \u53C2\u6570\u6709\u8BEF\uFF0C\u8BF7\u68C0\u67E5\uFF01",missPath:"\u8BF7\u586B\u5199\u8DEF\u5F84\u53D8\u91CF\u540E\u5728\u6D4B\u8BD5\uFF01",requestError:"\u8BF7\u6C42\u300C{0}\u300D\u51FA\u9519",success:"\u300C{0}\u300D\u6D4B\u8BD5\u5B8C\u6BD5\uFF0C\u72B6\u6001\uFF1A{1} \u5927\u5C0F\uFF1A{2} \u8017\u65F6\uFF1A{3} ms",begin:"\u5F00\u59CB\u6D4B\u8BD5\u300C{0}\u300D"}},datasource:{title:"DataSource",name:"\u6570\u636E\u6E90",copySuccess:"\u590D\u5236{0}\u6210\u529F",copyFailed:"\u590D\u5236{0}\u5931\u8D25",test:"\u6D4B\u8BD5\u8FDE\u63A5",connected:"\u8FDE\u63A5\u6210\u529F",connectFailed:`\u8FDE\u63A5\u5931\u8D25\uFF0C\u9519\u8BEF\u539F\u56E0\uFF1A\r +{0}`,primary:"\u4E3B\u6570\u636E\u6E90",form:{placeholder:{name:"\u6570\u636E\u6E90\u540D\u79F0\uFF0C\u4EC5\u505A\u663E\u793A\u4F7F\u7528",key:"\u6570\u636E\u6E90Key\uFF0C\u540E\u7EED\u4EE3\u7801\u4E2D\u4F7F\u7528",url:"\u8BF7\u8F93\u5165jdbcURL\uFF0C\u5982\uFF1Ajdbc:mysql://localhost/dbname",username:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u7528\u6237\u540D",password:"\u8BF7\u8F93\u5165\u6570\u636E\u5E93\u5BC6\u7801",driver:"\u9A71\u52A8\u7C7B\uFF0C\u53EF\u9009\uFF0C\u5185\u90E8\u81EA\u52A8\u8BC6\u522B\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",type:"\u8FDE\u63A5\u6C60\u7C7B\u578B\uFF0C\u53EF\u9009\uFF0C\u4E5F\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6307\u5B9A",maxRows:"\u6700\u591A\u8FD4\u56DE\u6761\u6570\uFF0C-1\u4E3A\u4E0D\u9650\u5236"},driver:"\u9A71\u52A8\u7C7B",type:"\u7C7B\u578B",other:"\u5176\u5B83\u914D\u7F6E"}},task:{title:"\u5B9A\u65F6\u4EFB\u52A1\u4FE1\u606F",name:"\u5B9A\u65F6\u4EFB\u52A1",form:{name:"\u4EFB\u52A1\u540D\u79F0",path:"\u4EFB\u52A1\u8DEF\u5F84",placeholder:{cron:"\u8BF7\u8F93\u5165Cron\u8868\u8FBE\u5F0F",name:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u8DEF\u5F84",description:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u63CF\u8FF0"}}},fn:{title:"\u51FD\u6570\u4FE1\u606F",name:"\u51FD\u6570",number:"\u6570\u503C",string:"\u5B57\u7B26\u4E32",collection:"\u96C6\u5408",fnName:"\u51FD\u6570\u540D\u79F0",returnValue:"\u8FD4\u56DE\u503C",parameter:"\u51FD\u6570\u53C2\u6570",description:"\u51FD\u6570\u63CF\u8FF0",form:{name:"\u51FD\u6570\u540D\u79F0",path:"\u51FD\u6570\u8DEF\u5F84",placeholder:{name:"\u8BF7\u8F93\u5165\u51FD\u6570\u540D\u79F0",path:"\u8BF7\u8F93\u5165\u51FD\u6570\u8DEF\u5F84"}}},toolbars:{debug:"\u8C03\u8BD5\u4FE1\u606F",log:"\u8FD0\u884C\u65E5\u5FD7",history:"\u5386\u53F2\u8BB0\u5F55",event:"\u4E8B\u4EF6",global:"\u5168\u5C40\u53C2\u6570",response:"\u6267\u884C\u7ED3\u679C",viewHistory:"\u5386\u53F2\u8BB0\u5F55\uFF1A{0}"},event:{message:"\u4E8B\u4EF6\u5185\u5BB9"},history:{name:"\u5386\u53F2\u8BB0\u5F55",operator:"\u64CD\u4F5C\u4EBA"},upload:{full:"\u5168\u91CF\u4E0A\u4F20",increment:"\u589E\u91CF\u4E0A\u4F20",success:"{0}\u6210\u529F",failed:"{0}\u5931\u8D25"},push:{full:"\u5168\u91CF\u63A8\u9001",increment:"\u589E\u91CF\u63A8\u9001",success:"{0} Success",failed:"Failed to {0}"},backup:{full:"\u5168\u91CF\u5907\u4EFD",backupSuccess:"\u5168\u91CF\u5907\u4EFD\u5B8C\u6BD5",rollback:"\u8FD8\u539F",current:"\u5F53\u524D\u7248\u672C",difference:"\u5BF9\u6BD4\u4E0D\u540C",rollbackSuccess:"\u6062\u590D{0}\u6210\u529F",rollbackFailed:"\u6062\u590D{0}\u5931\u8D25",rollbackConfirm:"\u8BE5\u64CD\u4F5C\u4F1A\u8986\u76D6\u66F4\u65B0\u5F53\u524D\u8D44\u6E90\uFF0C\u662F\u5426\u7EE7\u7EED\uFF1F"},online:{login:"\u7528\u6237\u4E0A\u7EBF",loginTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0A\u7EBF\uFF0CIP\uFF1A{1}",logout:"\u7528\u6237\u4E0B\u7EBF",logoutTips:"\u7528\u6237\u300C{0}\u300D\u5DF2\u4E0B\u7EBF\uFF0CIP\uFF1A{1}",onlines:"\u5F53\u524D\u5728\u7EBF\uFF1A{0}\u4EBA"},log:{hide:"\u70B9\u51FB\u9690\u85CF\u591A\u884C\u65E5\u5FD7",show:"\u6709 {0} \u884C\u65E5\u5FD7\u88AB\u9690\u85CF\uFF0C\u70B9\u51FB\u663E\u793A",scrollEnd:"\u6EDA\u52A8\u81F3\u7ED3\u5C3E"},code:{error:"\u8BF7\u6C42\u51FA\u9519\uFF0C\u5F02\u5E38\u4EE3\u7801({0})",invalid:"\u8BF7\u6C42\u51FA\u9519\uFF0CHttpStatus({0})",httpError:"\u8BF7\u6C42\u51FA\u9519","-2":"\u5F53\u524D\u4E3A\u53EA\u8BFB\u6A21\u5F0F\uFF0C\u65E0\u6CD5\u64CD\u4F5C","-10":"\u65E0\u6743\u9650\u64CD\u4F5C\u3002","1001":"\u627E\u4E0D\u5230\u5206\u7EC4\u4FE1\u606F","1002":"\u4E0D\u652F\u6301\u8BE5\u5206\u7EC4\u7C7B\u578B","1003":"\u76EE\u6807\u7F51\u5740\u4E0D\u80FD\u4E3A\u7A7A","1004":"secretKey\u4E0D\u80FD\u4E3A\u7A7A","1005":"\u79FB\u52A8\u540E\u540D\u79F0\u4F1A\u91CD\u590D\uFF0C\u8BF7\u4FEE\u6539\u540D\u79F0\u540E\u5728\u8BD5\u3002","1006":"\u6E90\u5BF9\u8C61\u548C\u5206\u7EC4\u4E0D\u80FD\u4E00\u81F4","1007":"\u627E\u4E0D\u5230\u5BF9\u5E94\u6587\u4EF6\u6216\u5206\u7EC4","1008":"\u5F53\u524D\u8D44\u6E90\u5DF2\u88AB\u9501\u5B9A\uFF0C\u8BF7\u89E3\u9501\u540E\u5728\u64CD\u4F5C\u3002","1009":"\u8BE5\u8DEF\u5F84\u5DF2\u88AB\u4F7F\u7528,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5","1010":"\u8D44\u6E90\u4E2D[{0}]\u6709\u51B2\u7A81\uFF0C\u8BF7\u68C0\u67E5","1011":"\u79FB\u52A8\u540E\u8DEF\u5F84\u4F1A\u51B2\u7A81,\u8BF7\u6362\u4E00\u4E2A\u8DEF\u5F84\u5728\u8BD5","1012":"\u8BF7\u6C42\u65B9\u6CD5\u4E0D\u80FD\u4E3A\u7A7A","1013":"\u8BF7\u6C42\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1014":"\u51FD\u6570\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1015":"\u914D\u7F6E\u7684\u6587\u4EF6\u8DEF\u5F84\u4E0D\u5B58\u5728\uFF0C\u8BF7\u68C0\u67E5","1016":"\u63A5\u53E3[{0}({1})]\u4E0E\u5E94\u7528\u51B2\u7A81\uFF0C\u65E0\u6CD5\u6CE8\u518C","1017":"\u811A\u672C\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A","1018":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A","1019":"\u8DEF\u5F84\u4E0D\u80FD\u4E3A\u7A7A","1020":"jdbcURL\u4E0D\u80FD\u4E3A\u7A7A","1021":"key\u4E0D\u80FD\u4E3A\u7A7A","1022":"\u6570\u636E\u6E90key\u5DF2\u88AB\u4F7F\u7528\uFF0C\u8BF7\u66F4\u6362\u540E\u5728\u8BD5","1023":"\u8BF7\u9009\u62E9\u5206\u7EC4","1024":"cron\u8868\u8FBE\u5F0F\u4E0D\u80FD\u4E3A\u7A7A","1025":"\u540D\u79F0\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA+_-.()\u7684\u7EC4\u5408\u4E14\u4E0D\u80FD.\u5F00\u5934","1026":"\u6570\u636E\u6E90Key\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\uFF0C\u53EA\u5141\u8BB8\u4E2D\u6587\u3001\u6570\u5B57\u3001\u5B57\u6BCD\u4EE5\u53CA_\u7EC4\u5408","1027":"\u4FDD\u5B58\u5931\u8D25,\u540C\u4E00\u7EC4\u4E0B\u5206\u7EC4\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u4E14\u4E0D\u80FD\u5305\u542B\u7279\u6B8A\u5B57\u7B26\u3002","1028":"\u53C2\u6570\u9A8C\u8BC1\u5931\u8D25","1029":"header\u9A8C\u8BC1\u5931\u8D25","1030":"\u8DEF\u5F84\u53D8\u91CF\u9A8C\u8BC1\u5931\u8D25","1031":"body\u9A8C\u8BC1\u5931\u8D25","1032":"\u8BF7\u4E0A\u4F20\u6587\u4EF6","1033":"\u7B7E\u540D\u9A8C\u8BC1\u5931\u8D25,\u8BF7\u68C0\u67E5\u79D8\u94A5\u662F\u5426\u6B63\u786E","1034":"\u672A\u542F\u7528\u5907\u4EFD\uFF0C\u65E0\u6CD5\u64CD\u4F5C","1035":"\u627E\u4E0D\u5230\u63A5\u53E3"}},Ss=Object.freeze(Object.defineProperty({__proto__:null,default:Bt},Symbol.toStringTag,{value:"Module"}));const Os=Fe.get("locale");let Qt=Bt;Os==="en"&&(Qt=Pn);function c(e,...t){try{const n=e.split(".").reduce((a,s)=>a[s],Qt);return n&&t.length>0?n.replace(/\{(\d+)\}/g,(a,s)=>t[s]):n||e}catch{return e}}function xs(e,t){let n=Bt;e==="en"&&(n=Pn);const a=(s,i)=>{Object.entries(i).forEach(([o,r])=>{typeof r=="string"?s[o]=r:(s[o]||(s[o]={}),a(s[o],r))})};a(n,t)}function Rs(e,t){if(Bt===Qt)return t;const n=Bt.code[`${e}`],a=Qt.code[`${e}`];if(n&&a){const s=n.replace(/([()\[\]\.])/g,"\\$1").replace(/{\d+}/g,"(.*?)");if(s){const i=[],o=new RegExp(s,"g");let r;for(;(r=o.exec(t))!=null;)i.push(r);return c(`code.${e}`,i.splice(0,1))}}return t}let ma=bs.version,As="V"+ma.replace(/\./g,"_");const M={BASE_URL:"",WEBSOCKET_SERVER:"",SERVER_URL:"",AUTO_SAVE:!0,user:null,DECORATION_TIMEOUT:1e4,CHECK_UPDATE:!0,BLOCK_CLOSE:!0,MAGIC_API_VERSION_TEXT:ma,MAGIC_API_VERSION:As,API_DEFAULT_METHOD:"GET",CLIENT_ID:"none",HEADER_REQUEST_CLIENT_ID:"Magic-Request-Client-Id",HEADER_REQUEST_SCRIPT_ID:"Magic-Request-Script-Id",HEADER_REQUEST_BREAKPOINTS:"Magic-Request-Breakpoints",HEADER_RESPONSE_MAGIC_CONTENT_TYPE:"ma-content-type",HEADER_APPLICATION_STREAM:"application/octet-stream",HEADER_CONTENT_DISPOSITION:"ma-content-disposition",HEADER_MAGIC_TOKEN:"magic-token",HEADER_MAGIC_TOKEN_VALUE:"unauthorization",IGNORE_VERSION:"ignore-version",RECENT_OPENED_TAB:"recent_opened_tab",RECENT_OPENED:"recent_opened",RESPONSE_CODE_DEBUG:1e3,RESPONSE_CODE_SCRIPT_ERROR:-1e3,RESPONSE_NO_PERMISSION:-10,DEFAULT_EXPAND:!0,LOGINED:!1,LOG_MAX_ROWS:1/0,LOCKED:"1",UNLOCK:"0",STORE:{theme:"theme",token:"token"},PLUGINS:[],GLOBAL:{parameters:[],headers:[]},THEME:"default",JDBC_DRIVERS:["com.mysql.jdbc.Driver","com.mysql.cj.jdbc.Driver","oracle.jdbc.driver.OracleDriver","org.postgresql.Driver","com.microsoft.sqlserver.jdbc.SQLServerDriver","com.ibm.db2.jcc.DB2Driver"],DATASOURCE_TYPES:["com.zaxxer.hikari.HikariDataSource","com.alibaba.druid.pool.DruidDataSource","org.apache.tomcat.jdbc.pool.DataSource","org.apache.commons.dbcp2.BasicDataSource"],OPTIONS:[],EDITOR_FONT_FAMILY:'JetBrainsMono, Consolas, "Courier New",monospace, \u5FAE\u8F6F\u96C5\u9ED1',EDITOR_FONT_SIZE:14,FONT_LIGATURES:!0,VALIDATE_TYPES:[{value:"pass",text:c("message.noValidate")},{value:"expression",text:c("message.validateExpression")},{value:"pattern",text:c("message.validatePattern")}],DEFAULT_VALIDATE_TYPE:"pass",REQUEST_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"MultipartFile",text:"MultipartFile"},{value:"MultipartFiles",text:"MultipartFiles"}],GLOBAL_PARAMETER_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_PARAMETER_TYPE:"String",REQUEST_SIMPLE_TYPES:[{value:"String",text:"String"},{value:"Boolean",text:"Boolean"},{value:"Integer",text:"Integer"},{value:"Date",text:"Date"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"}],DEFAULT_REQUEST_SIMPLE_TYPE:"String",REQUEST_METHODS:[{value:"GET",text:"GET"},{value:"POST",text:"POST"},{value:"PUT",text:"PUT"},{value:"DELETE",text:"DELETE"},{value:"HEAD",text:"HEAD"},{value:"PATCH",text:"PATCH"}],DEFAULT_REQUEST_METHOD:"GET",FUNCTION_RETURN_TYPES:[{value:"java.lang.Number",text:c("fn.number")},{value:"java.lang.String",text:c("fn.string")},{value:"java.util.Collection",text:c("fn.collection")},{value:"java.util.Map",text:"Map"},{value:"java.lang.Object",text:"Object"}],BODY_DATA_TYPES:[{value:"String",text:"String"},{value:"Integer",text:"Integer"},{value:"Double",text:"Double"},{value:"Long",text:"Long"},{value:"Short",text:"Short"},{value:"Float",text:"Float"},{value:"Byte",text:"Byte"},{value:"Boolean",text:"Boolean"},{value:"Date",text:"Date"},{value:"Object",text:"Object"},{value:"Array",text:"Array"},{value:"Any",text:"Any"}],DEFAULT_FUNCTION_RETURN_TYPE:"java.lang.Object",config:{}},Is={style:{"white-space":"pre-wrap"}},ga={props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},message:{type:String,required:!0},onClose:{type:Function,default:()=>{}}},setup(e){const t=U(!0);return(n,a)=>{const s=b("magic-button"),i=b("magic-button-group"),o=b("magic-dialog");return g(),j(o,{value:t.value,"onUpdate:value":a[1]||(a[1]=r=>t.value=r),title:e.title,ref:"dialog",onClose:a[2]||(a[2]=r=>e.onClose())},{default:k(()=>[A("pre",Is,B(e.message),1),_(i,{align:"center",style:{padding:"5px 0"}},{default:k(()=>[_(s,{value:e.ok,type:"active",onOnClick:a[0]||(a[0]=r=>n.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var Cs=Object.freeze(Object.defineProperty({__proto__:null,default:ga},Symbol.toStringTag,{value:"Module"}));const Ls=["innerHTML"],va={props:{title:{type:String,default:c("message.tips")},ok:{type:String,default:c("message.ok")},cancel:{type:String,default:c("message.cancel")},message:{type:String,required:!0},success:{type:Function,default:()=>{}},onClose:{type:Function,default:()=>{}}},setup(e){const t=U(!0);return(n,a)=>{const s=b("magic-button"),i=b("magic-button-group"),o=b("magic-dialog");return g(),j(o,{value:t.value,"onUpdate:value":a[2]||(a[2]=r=>t.value=r),title:e.title,ref:"dialog",onClose:a[3]||(a[3]=r=>e.onClose())},{default:k(()=>[A("pre",{innerHTML:e.message,style:{"white-space":"pre-wrap"}},null,8,Ls),_(i,{align:"right",style:{padding:"5px 0"}},{default:k(()=>[_(s,{value:e.ok,type:"active",onOnClick:a[0]||(a[0]=()=>{e.success(),n.$refs.dialog.close()})},null,8,["value"]),_(s,{value:e.cancel,onOnClick:a[1]||(a[1]=r=>n.$refs.dialog.close())},null,8,["value"])]),_:1})]),_:1},8,["value","title"])}}};var Ns=Object.freeze(Object.defineProperty({__proto__:null,default:va},Symbol.toStringTag,{value:"Module"}));let Ea=null;const Jn=(e,t)=>{const n=document.createElement("div");document.querySelector(".magic-editor .magic-mounts").appendChild(n);const a=kn(e,Ue(pe({},t),{onClose:()=>n.remove()}));Ea(a),a.mount(n)},ve={alert:(e,t,n)=>Jn(ga,{message:e,title:t,ok:n}),confirm:(e,t,n)=>Jn(va,{title:e,message:t,success:n})},ba=(e,t)=>{Ea=t,Object.keys(ve).forEach(n=>e.config.globalProperties[`$${n}`]=ve[n])};var ws=Object.freeze(Object.defineProperty({__proto__:null,install:ba,default:ve},Symbol.toStringTag,{value:"Module"}));const It={baseURL:"",method:"post",timeout:0,withCredentials:!0,responseType:"json",headers:{"Content-Type":"application/x-www-form-urlencoded"},transformRequest:[function(e){return e instanceof FormData?e:Wn.stringify(e,{arrayFormat:"repeat",allowDots:!0})}],paramsSerializer(e){return Wn.stringify(e,{arrayFormat:"repeat",allowDots:!0})}};class ks{constructor(){mt(this,"successHandle",null);mt(this,"errorHandle",null);mt(this,"endHandle",null);mt(this,"exceptionHandle",(t,n)=>{ve.alert(Rs(t,n),c("code.error",t))})}success(t){return this.successHandle=t,this}exception(t){return this.exceptionHandle=t,this}error(t){return this.errorHandle=t,this}end(t){this.endHandle=t}}class Ds{constructor(){mt(this,"_axios",null);this._axios=is.create(It)}getAxios(){return this._axios}setBaseURL(t){It.baseURL=t}execute(t){let n=pe({baseURL:It.baseURL},t);return n.headers=n.headers||{},n.headers[M.HEADER_MAGIC_TOKEN]=M.HEADER_MAGIC_TOKEN_VALUE,this._axios.request(n)}processError(t){var n,a,s;t.response?ve.alert(JSON.stringify(((n=t.response)==null?void 0:n.data)||"")||c("code.invalid",(a=t.response)==null?void 0:a.status),c("code.invalid",(s=t.response)==null?void 0:s.status)):ve.alert(t.message,c("code.httpError")),console.error(t)}sendJson(t,n,a){return this.send(t,JSON.stringify(n),a||{method:"post",headers:{"Content-Type":"application/json"},transformRequest:[]})}sendGet(t,n,a){return a=a||{},a.method="get",this.send(t,n,a)}sendPost(t,n,a){return a=a||{},a.method="post",this.send(t,n,a)}send(t,n,a){let s=a||It||{};s.url=t,(s.method||"").toLowerCase()==="post"?s.data=n:s.params=n,s.baseURL=It.baseURL;let i=new ks,o=!1,r=(l,u)=>{l instanceof Blob?(o=!0,i.successHandle&&i.successHandle(l,u)):l.code===1?(o=!0,i.successHandle&&i.successHandle(l.data,u)):(l.code===401&&console.log("\u672A\u767B\u5F55"),i.exceptionHandle&&i.exceptionHandle(l.code,l.message,u))};return this.execute(s).then(l=>{let u=l.data,p=l.headers["content-type"]&&l.headers["content-type"].startsWith("application/json");if(u instanceof Blob&&p){let m=new FileReader;m.readAsText(u),m.onload=function(){try{u=JSON.parse(this.result),r(u,l)}catch(f){console.error(f),r(u,l)}};return}r(u,l)}).catch(l=>{var u;typeof i.errorHandle=="function"?i.errorHandle((u=l.response)==null?void 0:u.data,l.response,l):this.processError(l)}).finally(()=>{typeof i.endHandle=="function"&&i.endHandle(o)}),i}}var z=new Ds;const ce={Alt:512,Ctrl:1024,Shift:2048};new Array(26).fill(0).forEach((e,t)=>ce[String.fromCharCode(65+t)]=65+t);new Array(12).fill(0).forEach((e,t)=>ce[`F${t+1}`]=112+t);const Zt=[],ya=e=>{if(e.keyCode){let t=e.keyCode;t|=e.ctrlKey&&ce.Ctrl||0,t|=e.shiftKey&&ce.Shift||0,t|=e.altKey&&ce.Alt||0,t|=e.metaKey&&ce.Ctrl||0;for(let n=0,a=Zt.length;ndocument.addEventListener("keydown",ya);ce.bind=(e,t,n)=>{mn||(mn=!0,ce.init()),typeof n=="function"&&Zt.push({target:e,code:t,callback:n})};ce.unbind=()=>{Zt.length=0,document.removeEventListener("keydown",ya),mn=!1};var Ms={editor:{base:"vs",rules:[{background:"#ffffff"},{token:"keywords",foreground:"000080",fontStyle:"bold"},{token:"number",foreground:"0000FF"},{token:"keyword",foreground:"000080",fontStyle:"bold"},{token:"string.sql",foreground:"008000"},{token:"tag.sql",foreground:"0033B3"},{token:"attribute.name.sql",foreground:"174AD4"},{token:"attribute.value.sql",foreground:"067D17"},{token:"predefined",foreground:"000000",fontStyle:"italic"},{token:"operator.sql",foreground:"000080",fontStyle:"bold"},{token:"key",foreground:"660E7A"},{token:"string.key.json",foreground:"660E7A"},{token:"string.value.json",foreground:"008000"},{token:"keyword.json",foreground:"0000FF"},{token:"string",foreground:"008000",fontStyle:"bold"},{token:"string.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape",foreground:"000080",fontStyle:"bold"},{token:"comment",foreground:"808080",fontStyle:"italic"},{token:"comment.doc",foreground:"808080",fontStyle:"italic"},{token:"comment.todo",foreground:"008DDE",fontStyle:"italic"},{token:"string.escape",foreground:"000080"}],colors:{"editor.foreground":"#000000","editor.background":"#ffffff","editorLineNumber.foreground":"#999999","editorGutter.background":"#f0f0f0","editor.lineHighlightBackground":"#FFFAE3","dropdown.background":"#F2F2F2","dropdown.foreground":"#000000","list.activeSelectionBackground":"#1A7DC4","list.activeSelectionForeground":"#ffffff"}}},Ps={editor:{base:"vs-dark",rules:[{foreground:"A9B7C6"},{token:"keywords",foreground:"CC7832",fontStyle:"bold"},{token:"keyword",foreground:"CC7832",fontStyle:"bold"},{token:"number",foreground:"6897BB"},{token:"string",foreground:"6A8759",fontStyle:"bold"},{token:"string.sql",foreground:"6A8759"},{token:"tag.sql",foreground:"E8BF6A"},{token:"attribute.name.sql",foreground:"BABABA"},{token:"attribute.value.sql",foreground:"6A8759"},{token:"predefined.sql",foreground:"A9B7C6",fontStyle:"italic"},{token:"predefined.magicscript",foreground:"A9B7C6",fontStyle:"italic"},{token:"key",foreground:"9876AA"},{token:"string.key.json",foreground:"9876AA"},{token:"string.value.json",foreground:"6A8759"},{token:"keyword.json",foreground:"6897BB"},{token:"operator.sql",foreground:"CC7832",fontStyle:"bold"},{token:"string.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape.invalid",foreground:"008000",background:"FFCCCC"},{token:"string.escape",foreground:"000080",fontStyle:"bold"},{token:"comment",foreground:"808080",fontStyle:"italic"},{token:"comment.doc",foreground:"629755",fontStyle:"italic"},{token:"comment.todo",foreground:"A8C023",fontStyle:"italic"},{token:"string.escape",foreground:"CC7832"}],colors:{"editor.background":"#2B2B2B","editorLineNumber.foreground":"#999999","editorGutter.background":"#313335","editor.lineHighlightBackground":"#323232","dropdown.background":"#3C3F41","dropdown.foreground":"#BBBBBB","list.activeSelectionBackground":"#4B6EAF","list.activeSelectionForeground":"#FFFFFF","editorSuggestWidget.selectedBackground":"#113A5C"}},styles:{"main-background-color":"#3C3F41","main-border-color":"#323232","main-color":"#bbb","main-selected-background-color":"#323232","main-hover-background-color":"#353739","main-hover-icon-background-color":"#4C5052","main-selected-color":"#fff","main-icon-color":"#AFB1B3","header-title-color":"#bbb","header-version-color":"#999","header-default-color":"#AFB1B3","empty-background-color":"#282828","empty-key-color":"#489DF6","empty-color":"#A0A0A0","button-hover-background-color":"#365880","button-hover-border-color":"#43688C","button-background-color":"#4C5052","button-border-color":"#5E6060","button-disabled-color":"#5a5a5a","navbar-body-background-color":"#3C3F41","navbar-body-border-color":"#555555","resource-label-color":"#bbb","resource-span-color":"#787878","tree-hover-background-color":"#0d293e","tree-icon-color":"#aeb9c0","table-border-color":"#646464","input-border-color":"#646464","input-foucs-color":"#3D6185","input-background-color":"#45494A","select-background-color":"#3C3F41","select-hover-background-color":"#3C3F41","select-option-background-color":"#3C3F41","select-option-hover-background-color":"#4B6EAF","select-option-border-color":"#808080","data-type-default-color":"#a9b7c6","data-type-string-color":"#6a8759","data-type-integer-color":"#6897bb","data-type-byte-color":"#6897bb","data-type-long-color":"#6897bb","data-type-float-color":"#6897bb","data-type-double-color":"#6897bb","data-type-short-color":"#6897bb","data-type-number-color":"#6897bb","data-type-boolean-color":"#cc7832","data-type-class-color":"#9876aa","data-type-key-color":"#FF8E8E","run-log-background-color":"#2b2b2b","log-level-info":"#ABC023","log-level-error":"#CC666E","log-level-debug":"#299999","log-level-warn":"unset","log-level-trace":"#5394EC","log-color-cyan":"#009191","log-color-link":"#287BDE","todo-color":"#A8C023","debug-line-background-color":"#2D6099","breakpoints-background-color":"#C75450","breakpoint-line-background-color":"#3a2323","select-inputable-background-color":"#45494a","select-inputable-border":"transparent","tab-selected-background-color":"#4E5254","message-em-color":"#68dd9a","checkbox-background-color":"#43494A","checkbox-border-color":"#6B6B6B","checkbox-text-color":"#bbb","checkbox-selected-background-color":"#43494A","checkbox-selected-border-color":"#6B6B6B","toolbox-list-label-color":"#bbb","toolbox-list-span-color":"#787878","toolbox-border-color":"#323232","toolbox-list-hover-background":"#0D293E","toolbox-border-right-color":"#555555","footer-border-color":"#323232","tab-bar-border-color":"#323232","dialog-border-color":"#282828","dialog-shadow-color":"#151515","table-col-border-color":"#333638","table-row-border-color":"#333638","table-hover-background":"#4B6EAF","debug-line-background":"#2D6099","breakpoints-background":"#C75450","breakpoint-line-background":"#3a2323","table-even-background":"#414547","button-disabled-background":"#5A5A5A","toolbox-list-header-icon-color":"#AFB1B3","log-error-color":"#CC666E","text-string-color":"#6A8759","text-number-color":"#6897BB","text-boolean-color":"#CC7832","text-property-color":"#9876aa","text-key-color":"#9876aa","suggest-hover-background":"#113A5C","suggest-hover-color":"#fff","statusbar-em-color":"#68dd9a"}};const Kt={},un=(e,t)=>{t=t||{};let n=t.editor||{};n.base=n.base||"vs",n.inherit=n.inherit===void 0?!0:n.inherit,n.rules=n.rules||[],n.colors=n.colors||[],Be.defineTheme(e,n),Kt[e]=t.styles||{}};function Ae(e){this.__parent=e,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}Ae.prototype.clone_empty=function(){var e=new Ae(this.__parent);return e.set_indent(this.__indent_count,this.__alignment_count),e};Ae.prototype.item=function(e){return e<0?this.__items[this.__items.length+e]:this.__items[e]};Ae.prototype.has_match=function(e){for(var t=this.__items.length-1;t>=0;t--)if(this.__items[t].match(e))return!0;return!1};Ae.prototype.set_indent=function(e,t){this.is_empty()&&(this.__indent_count=e||0,this.__alignment_count=t||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))};Ae.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)};Ae.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count};Ae.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var e=this.__parent.current_line;return e.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),e.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),e.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,e.__items[0]===" "&&(e.__items.splice(0,1),e.__character_count-=1),!0}return!1};Ae.prototype.is_empty=function(){return this.__items.length===0};Ae.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]};Ae.prototype.push=function(e){this.__items.push(e);var t=e.lastIndexOf(` +`);t!==-1?this.__character_count=e.length-t:this.__character_count+=e.length};Ae.prototype.pop=function(){var e=null;return this.is_empty()||(e=this.__items.pop(),this.__character_count-=e.length),e};Ae.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)};Ae.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)};Ae.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1};Ae.prototype.toString=function(){var e="";return this.is_empty()?this.__parent.indent_empty_lines&&(e=this.__parent.get_indent_string(this.__indent_count)):(e=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),e+=this.__items.join("")),e};function jt(e,t){this.__cache=[""],this.__indent_size=e.indent_size,this.__indent_string=e.indent_char,e.indent_with_tabs||(this.__indent_string=new Array(e.indent_size+1).join(e.indent_char)),t=t||"",e.indent_level>0&&(t=new Array(e.indent_level+1).join(this.__indent_string)),this.__base_string=t,this.__base_string_length=t.length}jt.prototype.get_indent_size=function(e,t){var n=this.__base_string_length;return t=t||0,e<0&&(n=0),n+=e*this.__indent_size,n+=t,n};jt.prototype.get_indent_string=function(e,t){var n=this.__base_string;return t=t||0,e<0&&(e=0,n=""),t+=e*this.__indent_size,this.__ensure_cache(t),n+=this.__cache[t],n};jt.prototype.__ensure_cache=function(e){for(;e>=this.__cache.length;)this.__add_column()};jt.prototype.__add_column=function(){var e=this.__cache.length,t=0,n="";this.__indent_size&&e>=this.__indent_size&&(t=Math.floor(e/this.__indent_size),e-=t*this.__indent_size,n=new Array(t+1).join(this.__indent_string)),e&&(n+=new Array(e+1).join(" ")),this.__cache.push(n)};function Ie(e,t){this.__indent_cache=new jt(e,t),this.raw=!1,this._end_with_newline=e.end_with_newline,this.indent_size=e.indent_size,this.wrap_line_length=e.wrap_line_length,this.indent_empty_lines=e.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new Ae(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}Ie.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)};Ie.prototype.get_line_number=function(){return this.__lines.length};Ie.prototype.get_indent_string=function(e,t){return this.__indent_cache.get_indent_string(e,t)};Ie.prototype.get_indent_size=function(e,t){return this.__indent_cache.get_indent_size(e,t)};Ie.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()};Ie.prototype.add_new_line=function(e){return this.is_empty()||!e&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)};Ie.prototype.get_code=function(e){this.trim(!0);var t=this.current_line.pop();t&&(t[t.length-1]===` +`&&(t=t.replace(/\n+$/g,"")),this.current_line.push(t)),this._end_with_newline&&this.__add_outputline();var n=this.__lines.join(` +`);return e===`\r +`?n=n.replace(/([^\r])\n/g,`$1${e}`):e!==` +`&&(n=n.replace(/[\n]/g,e)),n};Ie.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()};Ie.prototype.set_indent=function(e,t){return e=e||0,t=t||0,this.next_line.set_indent(e,t),this.__lines.length>1?(this.current_line.set_indent(e,t),!0):(this.current_line.set_indent(),!1)};Ie.prototype.add_raw_token=function(e){for(var t=0;t1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null};Ie.prototype.just_added_newline=function(){return this.current_line.is_empty()};Ie.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()};Ie.prototype.ensure_empty_line_above=function(e,t){for(var n=this.__lines.length-2;n>=0;){var a=this.__lines[n];if(a.is_empty())break;if(a.item(0).indexOf(e)!==0&&a.item(-1)!==t){this.__lines.splice(n+1,0,new Ae(this)),this.previous_line=this.__lines[this.__lines.length-2];break}n--}};function Un(e,t,n,a){this.type=e,this.text=t,this.comments_before=null,this.newlines=n||0,this.whitespace_before=a||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}var Us="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",Ta="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",$n="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\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\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\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\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\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-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\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\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",Sa="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",$s="(?:\\\\u[0-9a-fA-F]{4}|["+Us+$n+"])",Bs="(?:\\\\u[0-9a-fA-F]{4}|["+Ta+$n+Sa+"])*";const Oa=new RegExp($s+Bs,"g"),Fs=new RegExp("(?:\\\\u[0-9a-fA-F]{4}|["+Ta+$n+Sa+"])+"),Vt=/[\n\r\u2028\u2029]/,Ft=new RegExp(`\r +|`+Vt.source),Gt=new RegExp(Ft.source,"g");function nt(e,t){this.raw_options=Hs(e,t),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}nt.prototype._get_array=function(e,t){var n=this.raw_options[e],a=t||[];return typeof n=="object"?n!==null&&typeof n.concat=="function"&&(a=n.concat()):typeof n=="string"&&(a=n.split(/[^a-zA-Z0-9_/-]+/)),a};nt.prototype._get_boolean=function(e,t){var n=this.raw_options[e],a=n===void 0?!!t:!!n;return a};nt.prototype._get_characters=function(e,t){var n=this.raw_options[e],a=t||"";return typeof n=="string"&&(a=n.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),a};nt.prototype._get_number=function(e,t){var n=this.raw_options[e];t=parseInt(t,10),isNaN(t)&&(t=0);var a=parseInt(n,10);return isNaN(a)&&(a=t),a};nt.prototype._get_selection=function(e,t,n){var a=this._get_selection_list(e,t,n);if(a.length!==1)throw new Error("Invalid Option Value: The option '"+e+`' can only be one of the following values: +`+t+` +You passed in: '`+this.raw_options[e]+"'");return a[0]};nt.prototype._get_selection_list=function(e,t,n){if(!t||t.length===0)throw new Error("Selection list cannot be empty.");if(n=n||[t[0]],!this._is_valid_selection(n,t))throw new Error("Invalid Default Value!");var a=this._get_array(e,n);if(!this._is_valid_selection(a,t))throw new Error("Invalid Option Value: The option '"+e+`' can contain only the following values: +`+t+` +You passed in: '`+this.raw_options[e]+"'");return a};nt.prototype._is_valid_selection=function(e,t){return e.length&&t.length&&!e.some(function(n){return t.indexOf(n)===-1})};function Hs(e,t){var n={};e=js(e);var a;for(a in e)a!==t&&(n[a]=e[a]);if(t&&e[t])for(a in e[t])n[a]=e[t][a];return n}function js(e){var t={},n;for(n in e){var a=n.replace(/-/g,"_");t[a]=e[n]}return t}var Vs=["before-newline","after-newline","preserve-newline"];function xa(e){nt.call(this,e,"js");var t=this.raw_options.brace_style||null;t==="expand-strict"?this.raw_options.brace_style="expand":t==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var n=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var a=0;a0&&(this.__position-=1)};Ce.prototype.hasNext=function(){return this.__position=0&&e=0&&t=e.length&&this.__input.substring(t-e.length,t).toLowerCase()===e};function Ze(e){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=e}Ze.prototype.restart=function(){this.__position=0};Ze.prototype.isEmpty=function(){return this.__tokens_length===0};Ze.prototype.hasNext=function(){return this.__position=0&&e/),erb:n.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:n.starting_with(/{%/).until_after(/%}/),django_value:n.starting_with(/{{/).until_after(/}}/),django_comment:n.starting_with(/{#/).until_after(/#}/),smarty:n.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:n.starting_with(/{\*/).until_after(/\*}/),smarty_literal:n.starting_with(/{literal}/).until_after(/{\/literal}/)}}Ye.prototype=new De;Ye.prototype._create=function(){return new Ye(this._input,this)};Ye.prototype._update=function(){this.__set_templated_pattern()};Ye.prototype.disable=function(e){var t=this._create();return t._disabled[e]=!0,t._update(),t};Ye.prototype.read_options=function(e){var t=this._create();for(var n in gn)t._disabled[n]=e.templating.indexOf(n)===-1;return t._update(),t};Ye.prototype.exclude=function(e){var t=this._create();return t._excluded[e]=!0,t._update(),t};Ye.prototype.read=function(){var e="";this._match_pattern?e=this._input.read(this._starting_pattern):e=this._input.read(this._starting_pattern,this.__template_pattern);for(var t=this._read_template();t;)this._match_pattern?t+=this._input.read(this._match_pattern):t+=this._input.readUntil(this.__template_pattern),e+=t,t=this._read_template();return this._until_after&&(e+=this._input.readUntilAfter(this._until_pattern)),e};Ye.prototype.__set_templated_pattern=function(){var e=[];this._disabled.php||e.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||e.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||e.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(e.push(this.__patterns.django._starting_pattern.source),e.push(this.__patterns.django_value._starting_pattern.source),e.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||e.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&e.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+e.join("|")+")")};Ye.prototype._read_template=function(){var e="",t=this._input.peek();if(t==="<"){var n=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&n==="?"&&(e=e||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&n==="%"&&(e=e||this.__patterns.erb.read())}else t==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(e=e||this.__patterns.handlebars_comment.read(),e=e||this.__patterns.handlebars_unescaped.read(),e=e||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(e=e||this.__patterns.django_value.read()),this._excluded.django||(e=e||this.__patterns.django_comment.read(),e=e||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(e=e||this.__patterns.smarty_comment.read(),e=e||this.__patterns.smarty_literal.read(),e=e||this.__patterns.smarty.read()));return e};function pn(e,t){return t.indexOf(e)!==-1}const x={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:pt.START,RAW:pt.RAW,EOF:pt.EOF};var Qn=new Bn(/\/\*/,/\*\//),Gs=/0[xX][0123456789abcdefABCDEF_]*[mMdDlLfFsSbB]?|0[oO][01234567_]*[mMdDlLfFsSbB]?|0[bB][01_]*[mMdDlLfFsSbB]?|\d[\d_]*[mMdDlLfFsSbB]|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,zs=/[0-9]/,Ys=/[^\d.]/;const Lt=">>> === !== << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" ");var _t=">>>= ... >>= <<= === >>> !== **= => -> ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";_t=_t.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&");_t="\\?\\.(?!\\d) "+_t;_t=_t.replace(/ /g,"|");var qs=new RegExp(_t);const Tt="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var Ks=Tt.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as"]),Ws=new RegExp("^(?:"+Ks.join("|")+")$"),Wt;const Le=function(e,t){qe.call(this,e,t),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var n=new De(this._input),a=new Ye(this._input).read_options(this._options);this.__patterns={template:a,identifier:a.starting_with(Oa).matching(Fs),number:n.matching(Gs),punct:n.matching(qs),comment:n.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:n.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:n.matching(//),include:n.starting_with(/#include/).until_after(Ft),shebang:n.starting_with(/#!/).until_after(Ft),xml:n.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[\s\S]+?}|!\[CDATA\[[\s\S]*?\]\]|)(\s+{[\s\S]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{[\s\S]+?}))*\s*(\/?)\s*>/),single_quote:a.until(/['\\\n\r\u2028\u2029]/),double_quote:a.until(/["\\\n\r\u2028\u2029]/),template_text:a.until(/[`\\$]/),template_expression:a.until(/[`}\\]/)}};Le.prototype=new qe;Le.prototype._is_comment=function(e){return e.type===x.COMMENT||e.type===x.BLOCK_COMMENT||e.type===x.UNKNOWN};Le.prototype._is_opening=function(e){return e.type===x.START_BLOCK||e.type===x.START_EXPR};Le.prototype._is_closing=function(e,t){return(e.type===x.END_BLOCK||e.type===x.END_EXPR)&&t&&(e.text==="]"&&t.text==="["||e.text===")"&&t.text==="("||e.text==="}"&&t.text==="{")};Le.prototype._reset=function(){Wt=!1};Le.prototype._get_next_token=function(e){var t=null;this._readWhitespace();var n=this._input.peek();return n===null?this._create_token(x.EOF,""):(t=t||this._read_non_javascript(n),t=t||this._read_multi_string(n),t=t||this._read_string(n),t=t||this._read_word(e),t=t||this._read_singles(n),t=t||this._read_comment(n),t=t||this._read_regexp(n,e),t=t||this._read_xml(n,e),t=t||this._read_punctuation(),t=t||this._create_token(x.UNKNOWN,this._input.next()),t)};Le.prototype._read_word=function(e){var t;if(t=this.__patterns.identifier.read(),t!=="")return t=t.replace(Gt,` +`),!(e.type===x.DOT||e.type===x.RESERVED&&(e.text==="set"||e.text==="get"))&&Ws.test(t)?t==="in"||t==="of"?this._create_token(x.OPERATOR,t):this._create_token(x.RESERVED,t):this._create_token(x.WORD,t);if(t=this.__patterns.number.read(),t!=="")return this._create_token(x.WORD,t)};Le.prototype._read_singles=function(e){var t=null;return e==="("||e==="["?t=this._create_token(x.START_EXPR,e):e===")"||e==="]"?t=this._create_token(x.END_EXPR,e):e==="{"?t=this._create_token(x.START_BLOCK,e):e==="}"?t=this._create_token(x.END_BLOCK,e):e===";"?t=this._create_token(x.SEMICOLON,e):e==="."&&Ys.test(this._input.peek(1))?t=this._create_token(x.DOT,e):e===","&&(t=this._create_token(x.COMMA,e)),t&&this._input.next(),t};Le.prototype._read_punctuation=function(){var e=this.__patterns.punct.read();if(e!=="")return e==="="?this._create_token(x.EQUALS,e):e==="?."?this._create_token(x.DOT,e):this._create_token(x.OPERATOR,e)};Le.prototype._read_non_javascript=function(e){var t="";if(e==="#"){if(this._is_first_token()&&(t=this.__patterns.shebang.read(),t))return this._create_token(x.UNKNOWN,t.trim()+` +`);if(t=this.__patterns.include.read(),t)return this._create_token(x.UNKNOWN,t.trim()+` +`);e=this._input.next();var n="#";if(this._input.hasNext()&&this._input.testChar(zs)){do e=this._input.next(),n+=e;while(this._input.hasNext()&&e!=="#"&&e!=="=");return e==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(n+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(n+="{}",this._input.next(),this._input.next())),this._create_token(x.WORD,n)}this._input.back()}else if(e==="<"&&this._is_first_token()){if(t=this.__patterns.html_comment_start.read(),t){for(;this._input.hasNext()&&!this._input.testChar(Vt);)t+=this._input.next();return Wt=!0,this._create_token(x.COMMENT,t)}}else if(Wt&&e==="-"&&(t=this.__patterns.html_comment_end.read(),t))return Wt=!1,this._create_token(x.COMMENT,t);return null};Le.prototype._read_comment=function(e){var t=null;if(e==="/"){var n="";if(this._input.peek(1)==="*"){n=this.__patterns.block_comment.read();var a=Qn.get_directives(n);a&&a.ignore==="start"&&(n+=Qn.readIgnored(this._input)),n=n.replace(Gt,` +`),t=this._create_token(x.BLOCK_COMMENT,n),t.directives=a}else this._input.peek(1)==="/"&&(n=this.__patterns.comment.read(),t=this._create_token(x.COMMENT,n))}return t};Le.prototype._read_multi_string=function(){if(this._input.match(/"""/g)){let e=this._input.readUntilAfter(/"""/g);return this._create_token(x.STRING,'"""'+e)}return null};Le.prototype._read_string=function(e){if(e==="`"||e==="'"||e==='"'){var t=this._input.next();return this.has_char_escapes=!1,e==="`"?t+=this._read_string_recursive("`",!0,"${"):t+=this._read_string_recursive(e),this.has_char_escapes&&this._options.unescape_strings&&(t=Xs(t)),this._input.peek()===e&&(t+=this._input.next()),t=t.replace(Gt,` +`),this._create_token(x.STRING,t)}return null};Le.prototype._allow_regexp_or_xml=function(e){return e.type===x.RESERVED&&pn(e.text,["return","case","throw","else","do","typeof","yield"])||e.type===x.END_EXPR&&e.text===")"&&e.opened.previous.type===x.RESERVED&&pn(e.opened.previous.text,["if","while","for"])||pn(e.type,[x.COMMENT,x.START_EXPR,x.START_BLOCK,x.START,x.END_BLOCK,x.OPERATOR,x.EQUALS,x.EOF,x.SEMICOLON,x.COMMA])};Le.prototype._read_regexp=function(e,t){if(e==="/"&&this._allow_regexp_or_xml(t)){for(var n=this._input.next(),a=!1,s=!1;this._input.hasNext()&&(a||s||this._input.peek()!==e)&&!this._input.testChar(Vt);)n+=this._input.peek(),a?a=!1:(a=this._input.peek()==="\\",this._input.peek()==="["?s=!0:this._input.peek()==="]"&&(s=!1)),this._input.next();return this._input.peek()===e&&(n+=this._input.next(),n+=this._input.read(Oa)),this._create_token(x.STRING,n)}return null};Le.prototype._read_xml=function(e,t){if(this._options.e4x&&e==="<"&&this._allow_regexp_or_xml(t)){var n="",a=this.__patterns.xml.read_match();if(a){for(var s=a[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),i=s.indexOf("{")===0,o=0;a;){var r=!!a[1],l=a[2],u=!!a[a.length-1]||l.slice(0,8)==="![CDATA[";if(!u&&(l===s||i&&l.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(r?--o:++o),n+=a[0],o<=0)break;a=this.__patterns.xml.read_match()}return a||(n+=this._input.match(/[\s\S]*/g)[0]),n=n.replace(Gt,` +`),this._create_token(x.STRING,n)}}return null};function Xs(e){for(var t="",n=0,a=new Ce(e),s=null;a.hasNext();)if(s=a.match(/([\s]|[^\\]|\\\\)+/g),s&&(t+=s[0]),a.peek()==="\\"){if(a.next(),a.peek()==="x")s=a.match(/x([0-9A-Fa-f]{2})/g);else if(a.peek()==="u")s=a.match(/u([0-9A-Fa-f]{4})/g);else{t+="\\",a.hasNext()&&(t+=a.next());continue}if(!s||(n=parseInt(s[1],16),n>126&&n<=255&&s[0].indexOf("x")===0))return e;if(n>=0&&n<32){t+="\\"+s[0];continue}else n===34||n===39||n===92?t+="\\"+String.fromCharCode(n):t+=String.fromCharCode(n)}return t}Le.prototype._read_string_recursive=function(e,t,n){var a,s;e==="'"?s=this.__patterns.single_quote:e==='"'?s=this.__patterns.double_quote:e==="`"?s=this.__patterns.template_text:e==="}"&&(s=this.__patterns.template_expression);for(var i=s.read(),o="";this._input.hasNext();){if(o=this._input.next(),o===e||!t&&Vt.test(o)){this._input.back();break}else o==="\\"&&this._input.hasNext()?(a=this._input.peek(),a==="x"||a==="u"?this.has_char_escapes=!0:a==="\r"&&this._input.peek(1)===` +`&&this._input.next(),o+=this._input.next()):n&&(n==="${"&&o==="$"&&this._input.peek()==="{"&&(o+=this._input.next()),n===o&&(e==="`"?o+=this._read_string_recursive("}",t,"`"):o+=this._read_string_recursive("`",t,"${"),this._input.hasNext()&&(o+=this._input.next())));o+=s.read(),i+=o}return i};function ae(e,t){return t.indexOf(e)!==-1}function Js(e){return e.replace(/^\s+/g,"")}function Qs(e){for(var t={},n=0;nn&&(n=e.line_indent_level));var a={mode:t,parent:e,last_token:e?e.last_token:new Un(x.START_BLOCK,""),last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:n,alignment:0,line_indent_level:e?e.line_indent_level:n,start_line_index:this._output.get_line_number(),ternary_depth:0};return a};oe.prototype._reset=function(e){var t=e.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new Ie(this._options,t),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(K.BlockStatement);var n=new Le(e,this._options);return this._tokens=n.tokenize(),e};oe.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var e,t=this._reset(this._source_text),n=this._options.eol;this._options.eol==="auto"&&(n=` +`,t&&Ft.test(t||"")&&(n=t.match(Ft)[0]));for(var a=this._tokens.next();a;)this.handle_token(a),this._last_last_text=this._flags.last_token.text,this._flags.last_token=a,a=this._tokens.next();return e=this._output.get_code(n),e};oe.prototype.handle_token=function(e,t){e.type===x.START_EXPR?this.handle_start_expr(e):e.type===x.END_EXPR?this.handle_end_expr(e):e.type===x.START_BLOCK?this.handle_start_block(e):e.type===x.END_BLOCK?this.handle_end_block(e):e.type===x.WORD?this.handle_word(e):e.type===x.RESERVED?this.handle_word(e):e.type===x.SEMICOLON?this.handle_semicolon(e):e.type===x.STRING?this.handle_string(e):e.type===x.EQUALS?this.handle_equals(e):e.type===x.OPERATOR?this.handle_operator(e):e.type===x.COMMA?this.handle_comma(e):e.type===x.BLOCK_COMMENT?this.handle_block_comment(e,t):e.type===x.COMMENT?this.handle_comment(e,t):e.type===x.DOT?this.handle_dot(e):e.type===x.EOF?this.handle_eof(e):e.type===x.UNKNOWN?this.handle_unknown(e,t):this.handle_unknown(e,t)};oe.prototype.handle_whitespace_and_comments=function(e,t){var n=e.newlines,a=this._options.keep_array_indentation&<(this._flags.mode);if(e.comments_before)for(var s=e.comments_before.next();s;)this.handle_whitespace_and_comments(s,t),this.handle_token(s,t),s=e.comments_before.next();if(a)for(var i=0;i0,t);else if(this._options.max_preserve_newlines&&n>this._options.max_preserve_newlines&&(n=this._options.max_preserve_newlines),this._options.preserve_newlines&&n>1){this.print_newline(!1,t);for(var o=1;o0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};oe.prototype.set_mode=function(e){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,e),this._flags=this.create_flags(this._previous_flags,e),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)};oe.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===K.Statement&&Ia(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))};oe.prototype.start_of_object_property=function(){return this._flags.parent.mode===K.ObjectLiteral&&this._flags.mode===K.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"]))};oe.prototype.start_of_statement=function(e){var t=!1;return t=t||de(this._flags.last_token,["var","let","const"])&&e.type===x.WORD,t=t||Ve(this._flags.last_token,"do"),t=t||!(this._flags.parent.mode===K.ObjectLiteral&&this._flags.mode===K.Statement)&&de(this._flags.last_token,Fn)&&!e.newlines,t=t||Ve(this._flags.last_token,"else")&&!(Ve(e,"if")&&!e.comments_before),t=t||this._flags.last_token.type===x.END_EXPR&&(this._previous_flags.mode===K.ForInitializer||this._previous_flags.mode===K.Conditional),t=t||this._flags.last_token.type===x.WORD&&this._flags.mode===K.BlockStatement&&!this._flags.in_case&&!(e.text==="--"||e.text==="++")&&this._last_last_text!=="function"&&e.type!==x.WORD&&e.type!==x.RESERVED,t=t||this._flags.mode===K.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||de(this._flags.last_token,["get","set"])),t?(this.set_mode(K.Statement),this.indent(),this.handle_whitespace_and_comments(e,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e,de(e,["do","for","if","while"])),!0):!1};oe.prototype.handle_start_expr=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e);var t=K.Expression;if(e.text==="["){if(this._flags.last_token.type===x.WORD||this._flags.last_token.text===")"){de(this._flags.last_token,Tt)&&(this._output.space_before_token=!0),this.print_token(e),this.set_mode(t),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}t=K.ArrayLiteral,lt(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),ae(this._flags.last_token.type,[x.START_EXPR,x.END_EXPR,x.WORD,x.OPERATOR,x.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===x.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,t=K.ForInitializer):ae(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,t=K.Conditional):ae(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&e.whitespace_before===""?this._output.space_before_token=!1:(ae(this._flags.last_token.text,Tt)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e);else if(this._flags.last_token.type===x.WORD){this._output.space_before_token=!1;var n=this._tokens.peek(-3);if(this._options.space_after_named_function&&n){var a=this._tokens.peek(-4);de(n,["async","function"])||n.text==="*"&&de(a,["async","function"])?this._output.space_before_token=!0:this._flags.mode===K.ObjectLiteral&&(n.text==="{"||n.text===","||n.text==="*"&&(a.text==="{"||a.text===","))&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(e);(this._flags.last_token.type===x.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(ae(this._last_last_text,["function","yield"])||this._flags.mode===K.ObjectLiteral&&ae(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===x.START_BLOCK?this.print_newline():(this._flags.last_token.type===x.END_EXPR||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===x.COMMA)&&this.allow_wrap_or_preserved_newline(e,e.newlines),this.print_token(e),this.set_mode(t),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()};oe.prototype.handle_end_expr=function(e){for(;this._flags.mode===K.Statement;)this.restore_mode();this.handle_whitespace_and_comments(e),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(e,e.text==="]"&<(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===x.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(e),this.restore_mode(),Ia(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===K.Conditional&&(this._previous_flags.mode=K.Expression,this._flags.do_block=!1,this._flags.do_while=!1)};oe.prototype.handle_start_block=function(e){this.handle_whitespace_and_comments(e);var t=this._tokens.peek(),n=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===x.END_EXPR?(this.set_mode(K.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(K.BlockStatement):n&&(ae(n.text,[":",","])&&ae(t.type,[x.STRING,x.WORD,x.RESERVED])||ae(t.text,["get","set","..."])&&ae(n.type,[x.WORD,x.RESERVED]))?ae(this._last_last_text,["class","interface"])?this.set_mode(K.BlockStatement):this.set_mode(K.ObjectLiteral):this._flags.last_token.type===x.OPERATOR&&(this._flags.last_token.text==="=>"||this._flags.last_token.text==="->")?this.set_mode(K.BlockStatement):ae(this._flags.last_token.type,[x.EQUALS,x.START_EXPR,x.COMMA,x.OPERATOR])||de(this._flags.last_token,["return","throw","import","default"])?this.set_mode(K.ObjectLiteral):this.set_mode(K.BlockStatement);var a=!t.comments_before&&t.text==="}",s=a&&this._flags.last_word==="function"&&this._flags.last_token.type===x.END_EXPR;if(this._options.brace_preserve_inline){var i=0,o=null;this._flags.inline_frame=!0;do if(i+=1,o=this._tokens.peek(i-1),o.newlines){this._flags.inline_frame=!1;break}while(o.type!==x.EOF&&!(o.type===x.END_BLOCK&&o.opened===e))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&e.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==x.OPERATOR&&(s||this._flags.last_token.type===x.EQUALS||de(this._flags.last_token,nn)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(lt(this._previous_flags.mode)&&(this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.COMMA)&&((this._flags.last_token.type===x.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(e),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==x.OPERATOR&&this._flags.last_token.type!==x.START_EXPR&&(this._flags.last_token.type===x.START_BLOCK&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(e),this.indent(),!a&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()};oe.prototype.handle_end_block=function(e){for(this.handle_whitespace_and_comments(e);this._flags.mode===K.Statement;)this.restore_mode();var t=this._flags.last_token.type===x.START_BLOCK;this._flags.inline_frame&&!t?this._output.space_before_token=!0:this._options.brace_style==="expand"?t||this.print_newline():t||(lt(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(e)};oe.prototype.handle_word=function(e){if(e.type===x.RESERVED){if(ae(e.text,["set","get"])&&this._flags.mode!==K.ObjectLiteral)e.type=x.WORD;else if(e.text==="import"&&this._tokens.peek().text==="(")e.type=x.WORD;else if(ae(e.text,["as","from"])&&!this._flags.import_block)e.type=x.WORD;else if(this._flags.mode===K.ObjectLiteral){var t=this._tokens.peek();t.text===":"&&(e.type=x.WORD)}}if(this.start_of_statement(e)?de(this._flags.last_token,["var","let","const"])&&e.type===x.WORD&&(this._flags.declaration_statement=!0):e.newlines&&!Pt(this._flags.mode)&&(this._flags.last_token.type!==x.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==x.EQUALS&&(this._options.preserve_newlines||!de(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(e),this.print_newline()):this.handle_whitespace_and_comments(e),this._flags.do_block&&!this._flags.do_while)if(Ve(e,"while")){this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&Ve(e,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===K.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&de(e,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(e),this._flags.in_case=!0;return}if((this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR)&&(this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e)),Ve(e,"function")){(ae(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(ae(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===x.OPERATOR))&&!this._output.just_added_blankline()&&!e.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD?de(this._flags.last_token,["get","set","new","export"])||de(this._flags.last_token,Fn)?this._output.space_before_token=!0:Ve(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===x.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Pt(this._flags.mode)||lt(this._flags.mode))||this.print_newline(),this.print_token(e),this._flags.last_word=e.text;return}var n="NONE";if(this._flags.last_token.type===x.END_BLOCK?this._previous_flags.inline_frame?n="SPACE":de(e,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&e.newlines?n="NEWLINE":(n="SPACE",this._output.space_before_token=!0):n="NEWLINE":this._flags.last_token.type===x.SEMICOLON&&this._flags.mode===K.BlockStatement?n="NEWLINE":this._flags.last_token.type===x.SEMICOLON&&Pt(this._flags.mode)||this._flags.last_token.type===x.STRING||this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD||this._flags.last_token.text==="*"&&(ae(this._last_last_text,["function","yield"])||this._flags.mode===K.ObjectLiteral&&ae(this._last_last_text,["{",","]))?n="SPACE":this._flags.last_token.type===x.START_BLOCK?this._flags.inline_frame?n="SPACE":n="NEWLINE":this._flags.last_token.type===x.END_EXPR&&(this._output.space_before_token=!0,n="NEWLINE"),de(e,Tt)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?n="SPACE":n="NEWLINE"),de(e,["else","catch","finally"]))if((!(this._flags.last_token.type===x.END_BLOCK&&this._previous_flags.mode===K.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&e.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var a=this._output.current_line;a.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else n==="NEWLINE"?de(this._flags.last_token,nn)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&de(e,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==x.END_EXPR?(this._flags.last_token.type!==x.START_EXPR||!de(e,["var","let","const"]))&&this._flags.last_token.text!==":"&&(Ve(e,"if")&&Ve(e.previous,"else")?this._output.space_before_token=!0:this.print_newline()):de(e,Tt)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&<(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():n==="SPACE"&&(this._output.space_before_token=!0);e.previous&&(e.previous.type===x.WORD||e.previous.type===x.RESERVED)&&(this._output.space_before_token=!0),this.print_token(e),this._flags.last_word=e.text,e.type===x.RESERVED&&(e.text==="do"?this._flags.do_block=!0:e.text==="if"?this._flags.if_block=!0:e.text==="import"?this._flags.import_block=!0:this._flags.import_block&&Ve(e,"from")&&(this._flags.import_block=!1))};oe.prototype.handle_semicolon=function(e){this.start_of_statement(e)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(e);for(var t=this._tokens.peek();this._flags.mode===K.Statement&&!(this._flags.if_block&&Ve(t,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(e)};oe.prototype.handle_string=function(e){e.text.startsWith("`")&&e.newlines===0&&e.whitespace_before===""&&(e.previous.text===")"||this._flags.last_token.type===x.WORD)||(this.start_of_statement(e)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(e),this._flags.last_token.type===x.RESERVED||this._flags.last_token.type===x.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR||this._flags.last_token.type===x.EQUALS||this._flags.last_token.type===x.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(e):e.text.startsWith("`")&&this._flags.last_token.type===x.END_EXPR&&(e.previous.text==="]"||e.previous.text===")")&&e.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(e)};oe.prototype.handle_equals=function(e){this.start_of_statement(e)||this.handle_whitespace_and_comments(e),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0};oe.prototype.handle_comma=function(e){this.handle_whitespace_and_comments(e,!0),this.print_token(e),this._output.space_before_token=!0,this._flags.declaration_statement?(Pt(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)):this._flags.mode===K.ObjectLiteral||this._flags.mode===K.Statement&&this._flags.parent.mode===K.ObjectLiteral?(this._flags.mode===K.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(e)};oe.prototype.handle_operator=function(e){var t=e.text==="*"&&(de(this._flags.last_token,["function","yield"])||ae(this._flags.last_token.type,[x.START_BLOCK,x.COMMA,x.END_BLOCK,x.SEMICOLON])),n=ae(e.text,["-","+"])&&(ae(this._flags.last_token.type,[x.START_BLOCK,x.START_EXPR,x.EQUALS,x.OPERATOR])||ae(this._flags.last_token.text,Tt)||this._flags.last_token.text===",");if(!this.start_of_statement(e)){var a=!t;this.handle_whitespace_and_comments(e,a)}if(de(this._flags.last_token,nn)){this._output.space_before_token=!0,this.print_token(e);return}if(e.text==="*"&&this._flags.last_token.type===x.DOT){this.print_token(e);return}if(e.text==="::"){this.print_token(e);return}if(this._flags.last_token.type===x.OPERATOR&&ae(this._options.operator_position,Aa)&&this.allow_wrap_or_preserved_newline(e),e.text===":"&&this._flags.in_case){this.print_token(e),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==x.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var s=!0,i=!0,o=!1;if(e.text===":"?this._flags.ternary_depth===0?s=!1:(this._flags.ternary_depth-=1,o=!0):e.text==="?"&&(this._flags.ternary_depth+=1),!n&&!t&&this._options.preserve_newlines&&ae(e.text,Lt)){var r=e.text===":",l=r&&o,u=r&&!o;switch(this._options.operator_position){case Mt.before_newline:this._output.space_before_token=!u,this.print_token(e),(!r||l)&&this.allow_wrap_or_preserved_newline(e),this._output.space_before_token=!0;return;case Mt.after_newline:this._output.space_before_token=!0,!r||l?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(e):this._output.space_before_token=!1,this.print_token(e),this._output.space_before_token=!0;return;case Mt.preserve_newline:u||this.allow_wrap_or_preserved_newline(e),s=!(this._output.just_added_newline()||u),this._output.space_before_token=s,this.print_token(e),this._output.space_before_token=!0;return}}if(t){this.allow_wrap_or_preserved_newline(e),s=!1;var p=this._tokens.peek();i=p&&ae(p.type,[x.WORD,x.RESERVED])}else e.text==="..."?(this.allow_wrap_or_preserved_newline(e),s=this._flags.last_token.type===x.START_BLOCK,i=!1):(ae(e.text,["--","++","!","~"])||n)&&((this._flags.last_token.type===x.COMMA||this._flags.last_token.type===x.START_EXPR)&&this.allow_wrap_or_preserved_newline(e),s=!1,i=!1,e.newlines&&(e.text==="--"||e.text==="++"||e.text==="~")&&this.print_newline(!1,!0),this._flags.last_token.text===";"&&Pt(this._flags.mode)&&(s=!0),this._flags.last_token.type===x.RESERVED?s=!0:this._flags.last_token.type===x.END_EXPR?s=!(this._flags.last_token.text==="]"&&(e.text==="--"||e.text==="++")):this._flags.last_token.type===x.OPERATOR&&(s=ae(e.text,["--","-","++","+"])&&ae(this._flags.last_token.text,["--","-","++","+"]),ae(e.text,["+","-"])&&ae(this._flags.last_token.text,["--","++"])&&(i=!0)),(this._flags.mode===K.BlockStatement&&!this._flags.inline_frame||this._flags.mode===K.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline());this._output.space_before_token=this._output.space_before_token||s,this.print_token(e),this._output.space_before_token=i};oe.prototype.handle_block_comment=function(e,t){if(this._output.raw){this._output.add_raw_token(e),e.directives&&e.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(e.directives){this.print_newline(!1,t),this.print_token(e),e.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!Vt.test(e.text)&&!e.newlines){this._output.space_before_token=!0,this.print_token(e),this._output.space_before_token=!0;return}else this.print_block_commment(e,t)};oe.prototype.print_block_commment=function(e,t){var n=ei(e.text),a,s=!1,i=!1,o=e.whitespace_before,r=o.length;if(this.print_newline(!1,t),this.print_token_line_indentation(e),this._output.add_token(n[0]),this.print_newline(!1,t),n.length>1){for(n=n.slice(1),s=ti(n,"*"),i=ni(n,o),s&&(this._flags.alignment=1),a=0;a0&&n){let s=function(r,l){return r[n].localeCompare(l[n],"zh-CN")},i=[],o=[];e.forEach(r=>{r.folder===!0?(a&&(r[a]=Nt(r[a],t,n,a)),i.push(r)):o.push(r)}),i.sort(s),o.sort(s),t===!1&&(i.reverse(),o.reverse()),e.splice(0,e.length,...i.concat(o))}return e}function ai(e){return Array(e).fill(0).map(()=>(Math.random()*16|0).toString(16)).join("")}function vt(e,t){return t=t||2,(Array(t).join(0)+e).slice(-t)}function We(e){if(typeof e=="number"&&(e.toString().length===13?e=new Date(e):e=new Date(e*1e3)),e instanceof Date){var t=e.getMonth()+1,n=e.getDate(),a=e.getHours(),s=e.getMinutes(),i=e.getSeconds();return e.getFullYear()+"-"+vt(t)+"-"+vt(n)+" "+vt(a)+":"+vt(s)+":"+vt(i)}return""}function it(e){return e.replace(/:?\/+/g,t=>t.indexOf(":")>-1?t:"/")}function si(e){const t=s=>{if(Array.isArray(s)){let i=s.length,o=100;if(i>o){let r=[];for(let l=0;la(""+(l+p),void 0,JSON.stringify(u),u))});return r}return s.map((r,l)=>a(""+l,void 0,JSON.stringify(r),r))}else return Object.keys(s).map(i=>{const o=s[i];return a(i,void 0,JSON.stringify(o),o)})},n=s=>{try{return JSON.parse(s)}catch{return s}},a=(s,i,o,r)=>{var y;let l=(i||"").startsWith("java.lang"),u,p,m;l?(u=((y=i==null?void 0:i.substring(10))==null?void 0:y.toLowerCase())||typeof r,["integer","double","float","byte","short","long"].indexOf(u)>-1&&(u="number"),u==="class"&&(o=o.substring(1,o.length-1))):(r=r||o&&n(o),!Array.isArray(r)&&typeof r!="object"?(l=!0,u=typeof r):(Array.isArray(r)?(m=`size = ${r.length}`,u="array"):(m=`members = ${r&&Object.keys(r).length}`,u="object"),i=i||(Array.isArray(r)?"Array":typeof r),p=r&&t(r)||[]));let f=r==null&&!l;return f&&(i="null",l=!0,o="null"),{name:s,value:o,data:r,dataType:u,type:i,size:m,isNull:f,folder:!l,opened:!1,children:p}};return e&&e.map(s=>a(s.name,s.type,s.value))||[]}function ii(e){const t=["B","KB","MB"];let n=0;for(;n=1024;)e=e/1024,n++;return e=e.toFixed(2),`${e} ${t[n]}`}function et(e,t){const n=a=>a.filter(s=>s.folder).forEach(s=>{n(s.children||[]),t(s)});n(e||[])}function Hn(e,t){let n=document.createElement("a"),a=window.URL.createObjectURL(e);n.href=a,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),window.URL.revokeObjectURL(a)}function Zn(e){try{var t=document.createElement("textarea");return t.style="position:absolute;left:-99999999px",document.body.appendChild(t),t.innerHTML=e,t.readOnly=!1,t.select(),document.execCommand("copy"),!0}catch{return!1}}function oi(e){let t=0;for(let n=0,a=0,s=e.length;n{const o={level:i,node:s,name:i===0?c("message.root"):s.name,folder:(s==null?void 0:s.dataType)==="Object"||(s==null?void 0:s.dataType)==="Array",display:!0};o.folder&&(o.expand=!0),t.push(o)},a=(s,i)=>{(s||[]).forEach(o=>{n(o,i),a(o.children,i+1)})};return n(e||{},0),a((e==null?void 0:e.children)||[],1),t}function ri(e){return new Promise((t,n)=>{const a=document.getElementsByTagName("head")[0],s=document.createElement("script");s.setAttribute("type","text/javascript"),s.src=e,a.appendChild(s),s.readyState?s.onreadystatechange=()=>{(s.readyState==="loaded"||s.readyState==="complete")&&(s.onreadystatechange=null,t())}:(s.onload=function(){t()},s.onerror=function(){n()})})}function ea(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function li(e,t){if(e){if(typeof e=="string")return new oe(e).beautify();if(e)return JSON.stringify(e,null,4)}return t||""}class ci{constructor(){this.listeners={},this.statusLog=U([])}$on(t,n){this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(n)}$event(t,n){this.$on(`ws_${t}`,n)}$emit(t){const n=this.listeners[t];if(n){const i=[];for(var a=1,s=arguments.length;ao.apply(this,i))}}loading(t){const n=ea(1,9),a=new Image;return a.src=`https://console.ssssssss.org.cn/images/loading.gif?t=${Math.floor(new Date().getTime()/1e3)*1e3+n*100+(t+n)+ea(0,5)*17}`,a}send(t,n){this.$emit("message",t,n)}status(t,n,...a){const s=new Date;t=c(t,...a)||t,n===!1&&(t=`${t}`),this.statusLog.value.push({content:t,timestamp:We(s)+"."+vt(s.getMilliseconds(),3)}),this.$emit("status",t)}clearStatusLog(){this.statusLog.value=[]}getStatusLog(){return this.statusLog}}var S=new ci;const vn={escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,builtinFunctions:[],digits:/[0-9_]+/,binarydigits:/[0-1_]+/,hexdigits:/[[0-9a-fA-F_]+/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/\s+/,"white"],[/```$/,{token:"string",next:"@codeblock"}],[/[a-zA-Z_$][\w$]*[\s]?/,{cases:{"@builtinFunctions":"predefined","~(new|var|if|else|for|in|return|import|break|continue|as|null|true|false|try|catch|finally|async|while|exit|asc|desc|ASC|DESC|assert|let|const|throw|instanceof)[\\s]?":{token:"keywords"},"~(select|from|left|join|on|and|or|order|by|where|group|having|limit|offset|SELECT|FROM|LEFT|JOIN|ON|AND|OR|ORDER|BY|WHERE|GROUP|HAVING|LIMIT|OFFSET)[\\s]{1}":{token:"keywords"},"@default":"identifier"}}],[/::[a-zA-Z]+/,"keywords"],[/[{}()[\]]/,"@brackets"],[/(@digits)\.(@digits)/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)[lLbBsSdDfFmM]?/,"number"],[/\/\*\**/,"comment","@comment"],[/\/\//,"comment","@commentTodo"],[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@string_multi_embedded",nextEmbedded:"mybatis"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],comment:[[/\*\//,"comment","@popall"],[/\S((TODO)|(todo)|(fixme)|(FIXME))\s+/,"comment"],[/((TODO)|(todo)|(fixme)|(FIXME))\s+[^(*/)]+/,"comment.todo"],[/\S/,"comment"]],commentTodo:[[/^/,"","@popall"],[/\S((TODO)|(todo)|(fixme)|(FIXME))\s+/,"comment"],[/((TODO)|(todo)|(fixme)|(FIXME))[ \t]+[^\n]+/,"comment.todo","@popall"],[/\S/,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],codeblock:[[/^```$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_multi_embedded:[[/[^"]+/,""],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"root"}]}};let Qe={},jn={},Ht=[],En=[],Xt,bn;const ui=e=>e==="int"||e==="java.lang.Integer"?"java.lang.Integer":e==="string"||e==="java.lang.String"?"java.lang.String":e==="double"||e==="java.lang.Double"?"java.lang.Double":e==="float"||e==="java.lang.Float"?"java.lang.Float":e==="byte"||e==="java.lang.Byte"?"java.lang.Byte":e==="short"||e==="java.lang.Short"?"java.lang.Short":e==="long"||e==="java.lang.Long"?"java.lang.Long":e.indexOf("[]")>-1?"[Ljava.lang.Object;":e||"java.lang.Object",yn=e=>{let t=e.lastIndexOf(".");return t>-1?e.substring(t+1):e},pi=(e,t,n)=>e.length>0&&e[e.length-1].varArgs?n?e.length-1<=t.length:e.length<=t.length:n?e.length-1===t.length:e.length===t.length,di=function(){return new Promise((e,t)=>{z.sendPost("/classes").success(n=>{Qe=n.classes||{},jn=n.extensions||{},En=n.functions||[],vn.builtinFunctions=En.map(a=>a.name),W.setMonarchTokensProvider("magicscript",vn),e()}).exception(n=>{t()}).error(n=>{t()})})},_i=()=>new Promise((e,t)=>{z.execute({url:"classes.txt",responseType:"text",method:"get"}).then(n=>{const a=[];n.data.split(` +`).forEach(s=>{const i=s.split(":");i.length===1?a.push(i[0].trim()):a.push(...i[1].split(",").map(o=>i[0]+"."+o.trim()))}),Ht=a,e()}).catch(n=>{t()})}),ta=(e,t)=>Array(t>(e+"").length?t-(""+e).length-1:0).join(0)+e,Ca=e=>{let t=[];return e&&(t=e.enums||[],e.superClass&&(t=t.concat(Ca(e.superClass)))),t},La=(e,t,n)=>{if(e.insertText=e.name,e.parameters.length>t){let a=[],s=[];for(let i=t;i{wt[e]=t},Tn=e=>{let t=[];if(e){if(t=e.attributes||[],e.superClass&&(t=t.concat(Tn(e.superClass))),e.interfaces&&e.interfaces.length>0)for(let n=0,a=e.interfaces.length;n{t=t||0;let n=[],a=(s,i,o)=>{if(s&&s.methods)for(let r=0,l=s.methods.length;r0)for(let s=0,i=e.interfaces.length;sjn[e],mi=e=>{if(!e)throw new Error("className is required");let t=Qe[e];if(!t){let n=Ht.findIndex(a=>a===e);t=Ht[n]}return t};async function gi(e){let t=Qe[e];if(t)t=Qe[t.className]||t;else try{(await z.execute({url:"/class",data:{className:e}})).data.data.forEach(s=>{Qe[s.className]=s}),t=Qe[e]}catch{}return t}const vi=()=>En.map(e=>La(e,0,1)),Na=()=>{if(!Xt&&M.config){let e=M.config;e.autoImportModuleList&&(Xt={},e.autoImportModuleList.forEach(n=>{Xt[n]=n}));let t=["java.util.","java.lang."].concat((e.autoImportPackage||"").replace(/\\s/g,"").replace(/\*/g,"").split(","));bn={},Ht.forEach(n=>{t.forEach(a=>{n.indexOf(a)===0&&n.indexOf(".",a.length)===-1&&(bn[n.substring(n.lastIndexOf(".")+1)]=n)})})}},Ei=()=>(Na(),Xt||{}),bi=()=>(Na(),bn||{}),yi=()=>Ht;let On;const Ti=e=>{On=e},Si=e=>On&&On(e),Oi=()=>Object.keys(Qe).filter(e=>Qe[e].module);let wa;const xi=e=>{wa=e};let ka;const Ri=e=>{ka=e},Ai=()=>wa,Ii=()=>ka,ne={findEnums:Ca,findAttributes:Tn,findMethods:Sn,findFunction:vi,loadClass:gi,findClass:mi,initClasses:di,initImportClass:_i,getWrapperClass:ui,matchTypes:pi,getAutoImportModule:Ei,getAutoImportClass:bi,getExtension:fi,getImportClass:yi,getOnlineFunction:Si,setupOnlineFunction:Ti,setExtensionAttribute:hi,getSimpleClass:yn,getDefineModules:Oi,setApiFinder:xi,setFunctionFinder:Ri,getApiFinder:Ai,getFunctionFinder:Ii};class ge extends Error{constructor(t,n){super(t);this.name="ParseException",this.span=n}}class Ci{constructor(t,n,a,s,i,o,r){this.source=t,this.start=n,this.end=a,this.lineNumber=s,this.endLineNumber=i,this.startCol=o,this.endCol=r}}class J{constructor(t,n,a){t instanceof J&&n instanceof J?(this.source=t.source,this.start=t.start,this.end=n.end,this.cachedText=this.source.substring(this.start,this.end)):(this.source=t,this.start=n||0,this.end=a||t.length,this.cachedText=t.substring(this.start,this.end))}getText(){return this.cachedText}getSource(){return this.source}getStart(){return this.start}getEnd(){return this.end}toString(){return"Span [text="+this.getText()+", start="+this.start+", end="+this.end+"]"}inPosition(t){return this.start<=t&&this.end>=t}getLine(){if(this.line!=null)return this.line;let t=this.start;for(;tthis.source.length-1||this.source.charAt(n)===` +`);)n++;let a=0,s=t;for(;s>0&&s",error:">"},LessEqual:{literal:"<=",error:"<="},GreaterEqual:{literal:">=",error:">="},Equal:{literal:"==",error:"=="},NotEqual:{literal:"!=",error:"!="},Assignment:{literal:"=",error:"="},PlusPlus:{literal:"++",error:"++"},MinusMinus:{literal:"--",error:"--"},PlusEqual:{literal:"+=",error:"+="},MinusEqual:{literal:"-=",error:"-="},AsteriskEqual:{literal:"*=",error:"*="},ForwardSlashEqual:{literal:"/=",error:"/="},PercentEqual:{literal:"%=",error:"%="},ColonColon:{literal:"::",error:"::"},EqualEqualEqual:{literal:"===",error:"==="},NotEqualEqual:{literal:"!==",error:"!=="},And:{literal:"&&",error:"&&"},Or:{literal:"||",error:"||"},Xor:{literal:"^",error:"^"},Not:{literal:"!",error:"!"},BitAnd:{literal:"&",error:"&"},BitOr:{literal:"|",error:"|"},BitNot:{literal:"~",error:"~"},LShift:{literal:"<<",error:"<<"},RShift:{literal:">>",error:">>"},RShift2:{literal:">>>",error:">>>"},XorEqual:{literal:"^=",error:"^=",modifiable:!0},BitAndEqual:{literal:"&=",error:"&=",modifiable:!0},BitOrEqual:{literal:"|=",error:"|=",modifiable:!0},LShiftEqual:{literal:"<<=",error:"<<=",modifiable:!0},RShiftEqual:{literal:">>=",error:">>=",modifiable:!0},RShift2Equal:{literal:">>>=",error:">>>=",modifiable:!0},SqlAnd:{literal:"and",error:"and"},SqlOr:{literal:"or",error:"or"},SqlNotEqual:{literal:"<>",error:"<>",inLinq:!0},InstanceOf:{literal:"instanceof",error:"instanceof"},Questionmark:{literal:"?",error:"?"},DoubleQuote:{literal:'"',error:'"'},TripleQuote:{literal:'"""',error:'"""'},SingleQuote:{literal:"'",error:"'"},Lambda:{error:"=> \u6216 ->"},BooleanLiteral:{error:"true \u6216 false"},DoubleLiteral:{error:"\u4E00\u4E2A double \u7C7B\u578B\u6570\u503C"},DecimalLiteral:{error:"\u4E00\u4E2A BigDecimal \u7C7B\u578B\u6570\u503C"},FloatLiteral:{error:"\u4E00\u4E2A float \u7C7B\u578B\u6570\u503C"},LongLiteral:{error:"\u4E00\u4E2A long \u7C7B\u578B\u6570\u503C"},IntegerLiteral:{error:"\u4E00\u4E2A int \u7C7B\u578B\u6570\u503C"},ShortLiteral:{error:"\u4E00\u4E2A short \u7C7B\u578B\u6570\u503C"},ByteLiteral:{error:"\u4E00\u4E2A byte \u7C7B\u578B\u6570\u636E"},CharacterLiteral:{error:"\u4E00\u4E2A char \u7C7B\u578B\u6570\u636E"},RegexpLiteral:{error:"\u4E00\u4E2A \u6B63\u5219\u8868\u8FBE\u5F0F"},StringLiteral:{error:"\u4E00\u4E2A \u5B57\u7B26\u4E32"},NullLiteral:{error:"null"},Language:{error:"language"},Identifier:{error:"\u6807\u8BC6\u7B26"},Unknown:{error:"unknown"}};let Li=Object.getOwnPropertyNames(d).map(e=>d[e]);d.getSortedValues=function(){return this.values?this.values:(this.values=Li.sort(function(e,t){return!e.literal&&!t.literal?0:!e.literal&&!!t.literal?1:!!e.literal&&!t.literal?-1:t.literal.length-e.literal.length}),this.values)};class Ge{constructor(t,n,a){this.type=t,this.span=n,a instanceof ft?this.tokenStream=a:a&&(this.value=a)}getTokenType(){return this.type}getTokenStream(){return this.tokenStream}getSpan(){return this.span}getText(){return this.span.getText()}}class Me extends Ge{constructor(t,n,a){super(t,n,a)}getJavaType(){return this.type===d.StringLiteral?"java.lang.String":this.type===d.DoubleLiteral?"java.lang.Double":this.type===d.ByteLiteral?"java.lang.Byte":this.type===d.FloatLiteral?"java.lang.Float":this.type===d.DecimalLiteral?"java.math.BigDecimal":this.type===d.IntegerLiteral?"java.lang.Integer":this.type===d.LongLiteral?"java.lang.Long":this.type===d.BooleanLiteral?"java.lang.Boolean":this.type===d.RegexpLiteral?"java.util.regex.Pattern":"java.lang.Object"}}class Ni{constructor(t,n,a){this.index=n===void 0?0:n,this.end=a===void 0?t.length:a,this.source=t,this.spanStart=0}hasMore(){return this.indexthis.end)return!1;for(let s=0,i=this.index;s=this.end||t.charAt(s)!==this.source.charAt(i))return!1;return n&&(this.index+=a),!0}matchAny(t,n){for(let a=0,s=t.length;a=this.end)return!1;let n=this.source.charAt(this.index);return n.match(/[a-zA-Z0-9_\u4e00-\u9fa5]/)||n==="$"||n==="_"||n==="@"?(t&&this.index++,!0):!1}matchIdentifierPart(t){if(this.index>=this.end)return!1;let n=this.source.charAt(this.index);return n.match(/[a-zA-Z0-9_\u4e00-\u9fa5]/)||n==="@"?(t&&this.index++,!0):!1}skipWhiteSpace(){for(;this.index0&&this.tokens[this.end-1]}hasMore(){return this.index=this.end)return!1;let s=!1;if(Array.isArray(t)){for(let i=0,o=t.length;in.push(this.textToString(a))),n.join(",")}else return t.error}expect(t,n){if(this.match(t,!0,n))return this.tokens[this.index-1];if(this.hasMore()){let a=this.tokens[this.index];throw t instanceof Ge&&(t=t.type.error),new ge("Expected '"+this.textToString(t)+"', but got '"+a.getText()+"'",a.getSpan())}else{let a=this.tokens[this.index-1].getSpan();return new Ge(d.Unknown,a)}}hasPrev(){return this.index>0}getSource(){return this.tokens.length===0?null:this.tokens[0].getSpan().getSource()}}const wi=(e,t)=>{if(t.length>0){let n=t[t.length-1];if(n instanceof Me)return!1;switch(n.getTokenType()){case d.Comma:case d.Semicolon:case d.Colon:case d.RightCurly:case d.LeftBracket:case d.LeftParantheses:case d.Assignment:case d.NotEqual:case d.EqualEqualEqual:case d.NotEqualEqual:case d.Equal:case d.And:case d.Or:case d.SqlAnd:case d.SqlOr:case d.SqlNotEqual:case d.Questionmark:case d.InstanceOf:case d.Lambda:case d.Not:break;default:return!1}}if(e.match("/",!1)){let n=e.getPosition();e.consume(),e.startSpan();let a=!1,s=0,i=0,o=0;for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match("[",!1))s++,i=e.getPosition();else if(s>0&&e.match("]",!1))s--;else if(e.match(d.ForwardSlash.literal,!0))if(s===0){e.match("g",!0),e.match("i",!0),e.match("m",!0),e.match("s",!0),e.match("u",!0),e.match("y",!0),a=!0;break}else o=e.getPosition();let l=e.consume();if(l==="\r"||l===` +`)return e.reset(n),!1}if(s!==0)throw new ge("Missing ']'",e.getSpan(i,o-1));if(!a)return e.reset(n),!1;let r=e.endSpan();return r=e.getSpan(r.getStart()-1,r.getEnd()),t.push(new Me(d.RegexpLiteral,r)),!0}return!1},dn=(e,t,n)=>{if(e.match(t,!0)){e.startSpan();let a=!1;for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match(t.literal,!0)){a=!0;break}let i=e.consume();if(t!==d.TripleQuote&&(i==="\r"||i===` +`))throw new ge(t.error+t.error+"\u5B9A\u4E49\u7684\u5B57\u7B26\u4E32\u4E0D\u80FD\u6362\u884C",e.endSpan())}if(!a)throw new ge("\u5B57\u7B26\u4E32\u6CA1\u6709\u7ED3\u675F\u7B26"+t.error,e.endSpan());let s=e.endSpan();return s=e.getSpan(s.getStart(),s.getEnd()-t.literal.length),n.push(new Me(d.StringLiteral,s)),!0}return!1},na=(e,t)=>{let n=Number.parseInt(e.getText().substring(2).replace(/\_/g,""),t);return n>2147483647||n<-2147483648?new Me(d.LongLiteral,e,n):n>127||n<-128?new Me(d.LongLiteral,e,n):new Me(d.ByteLiteral,e,n)},ki=(e,t)=>{if(e.match("0",!1)){let n=e.getPosition();if(e.startSpan(),e.consume(),e.matchAny(["x","X"],!0)){for(;e.matchDigit(!0)||e.matchAny(["A","B","C","D","E","F","a","b","c","d","e","f","_"],!0););if(e.matchAny(["L","l"],!0)){let a=e.endSpan(),s=a.getText();return t.push(new Me(d.LongLiteral,a,parseInt(s.substring(2,s.length-1).replace(/\_/g,""),16))),!0}return t.push(na(e.endSpan(),16)),!0}else if(e.matchAny(["b","B"],!0)){for(;e.matchAny(["0","1","_"],!0););if(e.matchAny(["L","l"],!0)){let a=e.endSpan(),s=a.getText();return t.push(new Me(d.LongLiteral,a,parseInt(s.substring(2,s.length-1).replace(/\_/g,""),2))),!0}return t.push(na(e.endSpan(),2)),!0}e.reset(n)}if(e.matchDigit(!1)){let n=d.IntegerLiteral;for(e.startSpan();e.matchDigit(!0)||e.match("_",!0););if(e.match(d.Period.literal,!0))if(e.hasMore())for(n=d.DoubleLiteral;e.matchDigit(!0)||e.match("_",!0););else e.reset(e.getPosition()-1);if(e.matchAny(["b","B"],!0)){if(n===d.DoubleLiteral)throw new ge("Byte literal can not have a decimal point.",e.endSpan());n=d.ByteLiteral}else if(e.matchAny(["s","S"],!0)){if(n===d.DoubleLiteral)throw new ge("Short literal can not have a decimal point.",e.endSpan());n=d.ShortLiteral}else if(e.matchAny(["l","L"],!0)){if(n===d.DoubleLiteral)throw new ge("Long literal can not have a decimal point.",e.endSpan());n=d.LongLiteral}else e.matchAny(["f","F"],!0)?n=d.FloatLiteral:e.matchAny(["d","D"],!0)?n=d.DoubleLiteral:e.matchAny(["m","M"],!0)&&(n=d.DecimalLiteral);return t.push(new Me(n,e.endSpan())),!0}return!1},Di=(e,t)=>{if(e.match("```",!0))if(e.startSpan(),e.matchIdentifierStart(!0)){for(;e.matchIdentifierPart(!0););let n=e.endSpan();if(t.push(new Ge(d.Language,n)),e.startSpan(),!e.skipUntil("```"))throw new ge("```\u9700\u8981\u4EE5```\u7ED3\u5C3E",e.endSpan());return t.push(new Ge(d.Language,e.endSpan(-3))),!0}else throw new ge("```\u540E\u9700\u8981\u6807\u8BC6\u8BED\u8A00\u7C7B\u578B",e.endSpan());return!1},Mi=(e,t)=>{if(e.matchIdentifierStart(!0)){for(e.startSpan();e.matchIdentifierPart(!0););let n=e.endSpan();return n=e.getSpan(n.getStart()-1,n.getEnd()),n.getText()==="true"||n.getText()==="false"?t.push(new Me(d.BooleanLiteral,n)):n.getText()==="null"?t.push(new Me(d.NullLiteral,n)):d.SqlAnd.literal.toUpperCase()===n.getText().toUpperCase()?t.push(new Ge(d.SqlAnd,n)):d.SqlOr.literal.toUpperCase()===n.getText().toUpperCase()?t.push(new Ge(d.SqlOr,n)):t.push(new Ge(d.Identifier,n)),!0}return!1},Pi=(e,t)=>{if(e.match("`",!0)){let n=e.getPosition(),a=n,s=[];for(;e.hasMore();){if(e.match("\\",!0)){e.consume();continue}if(e.match("`",!0))break;if(e.match("${",!0)){let r=e.getPosition();a0&&s.push(new Me(d.StringLiteral,e.endSpan(a,o))),i=e.getSpan(i.getStart()-1,i.getEnd()),t.push(new Me(d.StringLiteral,i,new ft(s))),!0}return!1},Da=(e,t,n)=>{let a=0,s=0;for(;e.hasMore();){if(e.skipWhiteSpace(),n&&e.match(n,!0))return t;if(e.match("//",!0)){e.skipLine();continue}if(e.match("/*",!0)){e.skipUntil("*/");continue}if(ki(e,t)||dn(e,d.SingleQuote,t)||dn(e,d.TripleQuote,t)||dn(e,d.DoubleQuote,t)||wi(e,t)||Di(e,t)||Pi(e,t)||Mi(e,t))continue;if(e.matchAny(["=>","->"],!0)){t.push(new Ge(d.Lambda,e.getSpan(e.getPosition()-2,e.getPosition())));continue}let i=!1,o=d.getSortedValues();for(let r=0,l=o.length;rDa(new Ni(e,0,e.length),[]);class fe{constructor(t){this.span=t}getSpan(){return this.span}async getJavaType(t){return await this.getExpressionsJavaType(t),"java.lang.Object"}async getExpressionsJavaType(t){for(const n of this.expressions().filter(a=>a))await n.getJavaType(t)}expressions(){return[]}toString(){return this.span.getText()}}class xt extends fe{constructor(t){super(t)}}class we extends xt{constructor(t,n,a){super(t);this.javaType=n,this.expressionList=a||[]}expressions(){return this.expressionList}async getJavaType(){return this.javaType}getValue(){return this.getSpan().getText().replace(/\\\\/g,"\\").replace(/\\n/g,` +`).replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\"/g,'"').replace(/\\'/g,"'")}}class en extends fe{constructor(t,n,a){super(t);this.target=n,this.args=a}expressions(){return[this.target,...this.args]}getMethod(){return this.target}getArguments(){return this.args}async getJavaType(t){let n=this.target.member.getText(),a=await this.target.getJavaType(t),s=ne.findMethods(a);if(s)for(let i=0,o=s.length;ia.name===this.target.variable);if(n)return n.returnType}return await this.target.getJavaType(t)}}class st extends fe{constructor(t,n,a,s,i){super(t);this.target=n,this.optional=a,this.member=s,this.whole=i}isWhole(){return this.whole===!0}expressions(){return[this.target]}getTarget(){return this.target}async getJavaType(t){let n=await this.target.getJavaType(t),a=await ne.loadClass(n),s=a==null?void 0:a.attributes;const i=this.member.getText();if(s){const l=s.find(u=>u.name===i);if(l)return ne.getWrapperClass(l.type)}let o=a==null?void 0:a.enums;if(o){const l=o.find(u=>u.name===i);if(l)return ne.getWrapperClass(l.type)}let r=a==null?void 0:a.methods;if(r)for(let l=0,u=r.length;l=0&&!n;s--)n=ne.findClass(a[s]+this.variable)}return n||"java.lang.Object"}}class Jt extends fe{constructor(t,n,a){super(t);this.target=n,this.keyOrIndex=a}async getJavaType(t){return await this.target.getJavaType(t)==="db"?"db":super.getJavaType(t)}}class aa extends fe{constructor(t,n,a,s,i){super(t);this.condition=n,this.trueBlock=a||[],this.elseIfs=s||[],this.falseBlock=i||[]}expressions(){return[this.condition,...this.trueBlock,...this.elseIfs,...this.falseBlock]}}class sa extends we{constructor(t){super(t)}}class _n extends fe{constructor(t,n,a){super(t);this.parameters=n,this.childNodes=a}expressions(){return[...this.childNodes]}async getJavaType(t){if(Array.isArray(this.childNodes)&&this.childNodes.length>0){for(let n=0,a=this.childNodes.length;n=0&&!n;s--)n=ne.findClass(a[s]+this.identifier)}return n||"java.lang.Object"}}class ji extends fe{constructor(t,n){super(t);this.expression=n}expressions(){return[this.expression]}async getJavaType(t){return"java.util.concurrent.Future"}}class Rn extends fe{constructor(t,n,a){super(new J(t.getSpan(),n.getSpan()));this.operand=n,this.operator=t,this.atAfter=a}async getJavaType(t){return await this.operand.getJavaType(t)}}class Vi extends fe{constructor(t,n,a,s,i,o){super(t);this.exceptionVarNode=n,this.tryBlock=a,this.tryResources=s,this.catchBlock=i,this.finallyBlock=o}expressions(){return[...this.tryBlock,...this.tryResources,...this.catchBlock,...this.finallyBlock]}}class Gi extends fe{constructor(t,n,a,s,i){super(t);this.indexOrKey=n,this.value=a,this.mapOrArray=s,this.body=i}expressions(){return[this.mapOrArray,...this.body]}}class zi extends fe{constructor(t,n,a){super(t);this.condition=n,this.trueBlock=a}expressions(){return[this.condition,...this.trueBlock]}}class Yi extends fe{constructor(t,n,a,s){super(t);this.packageName=n,this.varName=a,this.module=s}async getJavaType(t){if(this.packageName.endsWith(".*"))t["@import"].push(this.packageName.substring(0,this.packageName.length-1));else if(this.module)t[this.packageName]=this.packageName;else if(this.varName)t[this.varName]=this.packageName;else{let n=this.packageName.lastIndexOf(".");n>-1&&(t[this.packageName.substring(n+1)]=this.packageName)}}}class tn extends fe{constructor(t,n,a,s){super(t);this.varName=n,this.expression=a,this.defineType=s!=="var"&&s!=="const"&&s!=="let"&&s}getVarName(){return this.varName}expressions(){return this.expression==null?[]:[this.expression]}async getJavaType(t){let n="java.lang.Object";return this.defineType?n=t[this.defineType]||n:this.expression&&(n=await this.expression.getJavaType(t)),t[this.varName]=n,n}}class qi extends tn{constructor(t,n,a,s,i){super(t,null,a,s);this.expression=a,this.tokens=n,this.defineType=s!=="var"&&s!=="const"&&s!=="let"&&s,this.isMapAccess=i}expressions(){return this.expression==null?[]:[this.expression]}async getJavaType(t){let n="java.lang.Object";if(this.defineType)n=t[this.defineType]||n;else if(!this.isMapAccess)return n;for(const a of this.tokens)t[a.getText()]=await new st(this.span,this.expression,!0,a,!1).getJavaType(t);return n}}class ia extends fe{constructor(t,n,a){super(new J(t.getSpan(),a.getSpan()));this.condition=t,this.trueExpression=n,this.falseExpression=a}expressions(){return[this.condition,this.trueExpression,this.falseExpression]}}class Ki extends fe{constructor(t,n){super(t);this.target=n}expressions(){return[this.target]}}class Et extends we{constructor(t,n,a){super(t,"java.util.LinkedHashMap");this.keys=n,this.values=a}expressions(){return this.values}}class bt extends we{constructor(t,n){super(t,"java.util.ArrayList");this.values=n}expressions(){return this.values}}class Wi extends fe{constructor(t){super(t)}async getJavaType(){return"java.util.function.Function"}expressions(){return[]}}class oa extends fe{constructor(t,n,a,s){super(new J(t.getSpan(),a.getSpan()));this.left=t,this.right=a,this.operator=n,this.linqLevel=s}getOperator(){return this.operator}setRightOperand(t){this.right=t}getRightOperand(){return this.right}expressions(){return[this.left,this.right]}async getJavaType(t){let n=await this.left.getJavaType(t),a=await this.right.getJavaType(t);return n=n.toLowerCase().substring(n.lastIndexOf(".")+1),a=a.toLowerCase().substring(a.lastIndexOf(".")+1),(this.operator.type===d.Plus||this.operator.type===d.PlusEqual)&&(n==="string"||a==="string")?"java.lang.String":this.operator.type===d.Equal||this.operator.type===d.Assignment&&this.linqLevel>0?"java.lang.Boolean":n==="bigdecimal"||a==="bigdecimal"?"java.math.BigDecimal":n==="double"||a==="double"?"java.lang.Double":n==="float"||a==="float"?"java.lang.Float":n==="long"||a==="long"?"java.lang.Long":n==="integer"||a==="integer"?"java.lang.Integer":n==="short"||a==="short"?"java.lang.Short":n==="byte"||a==="byte"?"java.lang.Byte":"java.lang.Object"}}class Ct extends xt{constructor(t,n,a){super(t);this.expression=n,this.alias=a}expressions(){return[this.expression]}}class Xi extends xt{constructor(t,n,a,s){super(t);this.leftJoin=n,this.target=a,this.condition=s}expressions(){return[this.target,this.condition]}}class Ji extends xt{constructor(t,n,a,s){super(t);this.expression=n,this.alias=a,this.order=s}expressions(){return[this.expression]}}class Ma extends xt{constructor(t,n,a,s){super(t);this.convert=n,this.target=a,this.args=s}expressions(){return[this.target,...this.args]}async getJavaType(){return this.convert=="double"?"java.lang.Double":this.convert=="float"?"java.lang.Float":this.convert=="long"?"java.lang.Long":this.convert=="int"?"java.lang.Integer":this.convert=="short"?"java.lang.Short":this.convert=="byte"?"java.lang.Byte":this.convert=="date"?"java.util.Date":"java.lang.Object"}}class Pa extends xt{constructor(t,n,a,s,i,o,r,l,u,p){super(t);this.fields=n,this.from=a,this.joins=s,this.where=i,this.groups=o,this.having=r,this.orders=l,this.limit=u,this.offset=p}expressions(){let t=[];return this.where&&t.push(this.where),this.having&&t.push(this.having),[...this.fields,this.from,...this.joins,...this.groups,...t,...this.orders,this.limit,this.offset]}async getJavaType(){return"java.util.List"}}const sn={environmentFunction:()=>{},setEnvironment:e=>sn.environmentFunction=e},ra=["import","as","var","let","const","return","break","continue","if","for","in","new","true","false","null","else","try","catch","finally","async","while","exit","and","or","throw"],la=["from","join","left","group","by","as","having","and","or","in","where","on","limit","offset"],Qi=[[d.Assignment],[d.RShift2Equal,d.RShiftEqual,d.LShiftEqual,d.XorEqual,d.BitOrEqual,d.BitAndEqual,d.PercentEqual,d.ForwardSlashEqual,d.AsteriskEqual,d.MinusEqual,d.PlusEqual],[d.Or,d.SqlOr],[d.And,d.SqlAnd],[d.BitOr],[d.Xor],[d.BitAnd],[d.EqualEqualEqual,d.Equal,d.NotEqualEqual,d.NotEqual,d.SqlNotEqual],[d.Less,d.LessEqual,d.Greater,d.GreaterEqual,d.InstanceOf],[d.Plus,d.Minus],[d.LShift,d.RShift,d.RShift2],[d.Asterisk,d.ForwardSlash,d.Percentage]],Zi=[[d.RShift2Equal,d.RShiftEqual,d.LShiftEqual,d.XorEqual,d.BitOrEqual,d.BitAndEqual,d.PercentEqual,d.ForwardSlashEqual,d.AsteriskEqual,d.MinusEqual,d.PlusEqual],[d.Or,d.SqlOr],[d.And,d.SqlAnd],[d.BitOr],[d.Xor],[d.BitAnd],[d.Assignment,d.EqualEqualEqual,d.Equal,d.NotEqualEqual,d.Equal,d.NotEqual,d.SqlNotEqual],[d.Less,d.LessEqual,d.Greater,d.GreaterEqual,d.InstanceOf],[d.Plus,d.Minus],[d.LShift,d.RShift,d.RShift2],[d.Asterisk,d.ForwardSlash,d.Percentage]],eo=[d.MinusMinus,d.PlusPlus,d.BitNot,d.Minus,d.Plus,d.Not];class Yt{constructor(t){this.stream=t,this.linqLevel=0}parse(t){let n=[];try{for(;this.stream.hasMore();){let a=this.parseStatement();a!=null&&(this.validateNode(a),n.push(a))}}catch(a){if(t!==!0)throw a}return n}async parseBest(t){let n=this.parse(),a=await this.processEnv(n);return{best:this.findBestMatch(n[n.length-1],t),env:a}}async processEnv(t){let n=t.length,a=Ue(pe(pe(pe({},sn.environmentFunction()),ne.getAutoImportClass()),ne.getAutoImportModule()),{"@import":[]});for(let s=0;s-1)throw new ge("\u53D8\u91CF\u540D\u4E0D\u80FD\u5B9A\u4E49\u4E3A\u5173\u952E\u5B57",t)}parseThrow(){let t=this.stream.consume().getSpan(),n=this.parseExpression();return new Fi(new J(t,this.stream.getPrev().getSpan()),n)}parseExit(){let t=this.stream.expect("exit").getSpan(),n=[];do n.push(this.parseExpression());while(this.stream.match(d.Comma,!0));return new Bi(new J(t,this.stream.getPrev().getSpan()),n)}parseAssert(){let t=this.stream.makeIndex();try{let n=this.stream.expect("assert").getSpan(),a=this.parseExpression();this.stream.expect(d.Colon);let s=[];do s.push(this.parseExpression());while(this.stream.match(d.Comma,!0));return new Hi(new J(n,this.stream.getPrev().getSpan()),a,s)}catch{return this.stream.resetIndex(t),this.parseExpression()}}parseImport(){let t=this.stream.expect("import").getSpan();if(this.stream.hasMore()){let n=this.stream.consume(),a=null,s=n.getTokenType()===d.StringLiteral;if(s)a=this.createStringLiteral(n).getValue();else if(n.type===d.Identifier){let o=n.getSpan(),r=null;for(a=o.getText();this.stream.match(d.Period,!0);){if(s=!0,this.stream.match(d.Asterisk,!1)){n=this.stream.consume();break}n=this.stream.expect(d.Identifier)}s&&(r=n.getSpan(),a=new J(o,r).getText())}else throw new ge("Expected identifier or string, but got stream is "+n.getTokenType().error,this.stream.getPrev().getSpan());let i=a;if(s)if(this.stream.match("as",!0))n=this.stream.expect(d.Identifier),this.checkKeyword(n.getSpan()),i=n.getSpan().getText();else{let o=a;if(o.startsWith("@"))throw new ge("Expected as",this.stream.getPrev().getSpan());{let r=o.lastIndexOf(".");r!=-1&&(o=o.substring(r+1))}i=o}return new Yi(new J(t,n.getSpan()),a,i,!s)}throw new ge("Expected identifier or string, but got stream is EOF",this.stream.getPrev().getSpan())}parseReturn(){let t=this.stream.expect("return").getSpan();if(this.stream.match([";","}"],!1))return new kt(t,null);let n=this.parseExpression();return new kt(new J(t,n.getSpan()),n)}parseAsync(){let t=this.stream.expect("async").getSpan(),n=this.parseExpression();return new ji(new J(t,this.stream.getPrev().getSpan()),n)}parseIfStatement(){let t=this.stream.expect("if").getSpan(),n=this.parseExpression(),a=this.parseFunctionBody(),s=[],i=[];for(;this.stream.hasMore()&&this.stream.match("else",!0);)if(this.stream.hasMore()&&this.stream.match("if",!1)){let r=this.stream.expect("if").getSpan(),l=this.parseExpression(),u=this.parseFunctionBody(),p=new J(r,u.length>0?u[u.length-1].getSpan():r);s.push(new aa(p,l,u,[]))}else{i=i.concat(this.parseFunctionBody());break}let o=this.stream.getPrev().getSpan();return new aa(new J(t,o),n,a,s,i)}parseNewExpression(t){let n=this.parseAccessOrCall(d.Identifier,!0),a=new J(t.getSource(),t.getStart(),this.stream.getPrev().getSpan().getEnd());return n instanceof en?this.parseAccessOrCall(new Ut(a,n.getMethod(),n.getArguments())):n instanceof xn?this.parseAccessOrCall(new Ut(a,n.getFunction(),n.getArguments())):this.parseAccessOrCall(new Ut(a,n,[]))}parseArguments(){this.stream.expect(d.LeftParantheses);let t=[];for(;this.stream.hasMore()&&!this.stream.match(d.RightParantheses,!1);)t.push(this.parseExpression()),this.stream.match(d.RightParantheses,!1)||this.stream.expect(d.Comma);return t}parseForStatement(){let t=this.stream.expect("for").getSpan();this.stream.expect("(");let n=null,a=this.stream.expect(d.Identifier).getSpan();this.checkKeyword(a),this.stream.match(d.Comma,!0)&&(n=a,a=this.stream.expect(d.Identifier).getSpan(),this.checkKeyword(a)),this.stream.expect("in");let s=this.parseExpression();this.stream.expect(")");let i=this.parseFunctionBody();return new Gi(new J(t,this.stream.getPrev().getSpan()),n&&n.getText(),a&&a.getText(),s,i)}parseVarDefine(){let t=this.stream.consume().getSpan(),n;if((n=this.stream.match(d.LeftCurly,!1))||this.stream.match(d.LeftBracket,!1)){this.stream.expect([d.LeftCurly,d.LeftBracket]);let i=[];do{let o=this.stream.expect(d.Identifier);i.push(o)}while(this.stream.match(d.Comma,!0));return n?this.stream.match(d.RightCurly,!0):this.stream.match(d.RightBracket,!0),this.stream.match(d.Assignment,!0),new qi(new J(t,this.stream.getPrev().getSpan()),i,this.parseExpression(),t.getText(),n)}let a=this.stream.expect(d.Identifier);this.checkKeyword(a.getSpan());let s;return this.stream.match(d.Assignment,!0)?s=new tn(new J(t,this.stream.getPrev().getSpan()),a.getText(),this.parseExpression(),t.getText()):s=new tn(new J(t,this.stream.getPrev().getSpan()),a.getText(),null,t.getText()),s}parseTryStatement(){let t=this.stream.expect("try"),n=[];if(this.stream.match("(",!0)){if(!this.stream.match(")",!1))for(;!this.stream.match(")",!1);){if(this.stream.match(";",!0))continue;let r=null;if(this.matchVarDefine())r=this.parseVarDefine();else{if(this.stream.matchAny(ra,!1))throw new ge("try \u62EC\u53F7\u4E2D\u53EA\u5141\u8BB8\u5199\u8D4B\u503C\u8BED\u53E5",this.stream.consume().getSpan());let l=this.stream.makeIndex();if(this.matchTypeDefine()&&(this.stream.resetIndex(l),r=this.parseVarDefine()),r==null)throw this.stream.resetIndex(l),new ge("try \u62EC\u53F7\u4E2D\u53EA\u5141\u8BB8\u5199\u8D4B\u503C\u8BED\u53E5",this.stream.consume().getSpan())}n.push(r)}this.stream.expect(")")}let a=this.parseFunctionBody(),s=[],i=[],o=null;return this.stream.match("catch",!0)&&(this.stream.match("(",!0)&&(o=this.stream.expect(d.Identifier).getText(),this.stream.expect(")")),s=s.concat(this.parseFunctionBody())),this.stream.match("finally",!0)&&(i=i.concat(this.parseFunctionBody())),new Vi(new J(t.getSpan(),this.stream.getPrev().getSpan()),o,a,n,s,i)}parseWhileStatement(){let t=this.stream.expect("while").getSpan(),n=this.parseExpression(),a=this.parseFunctionBody(),s=this.stream.getPrev().getSpan();return new zi(new J(t,s),n,a)}parseFunctionBody(){this.stream.expect("{");let t=[];for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let n=this.parseStatement(!0);n!=null&&(this.validateNode(n),t.push(n))}return this.expectCloseing(),t}expectCloseing(){return this.stream.hasMore(),this.stream.expect("}").getSpan()}parseExpression(t){return this.parseTernaryOperator(t)}parseTernaryOperator(t){let n=this.parseBinaryOperator(0,t);if(this.stream.match(d.Questionmark,!0)){let a=this.parseTernaryOperator(t);this.stream.expect(d.Colon);let s=this.parseTernaryOperator(t);return n instanceof oa&&n.getOperator()===d.Assignment?(n.setRightOperand(new ia(n.getRightOperand(),a,s)),n):new ia(n,a,s)}else return n}parseBinaryOperator(t,n){let a=t+1,s=this.linqLevel>0?Zi:Qi,i=a===s.length?this.parseUnaryOperator(n):this.parseBinaryOperator(a,n),o=s[t];for(;this.stream.hasMore()&&this.stream.match(o,!1);){let r=this.stream.consume();if(r.type.inLinq&&this.linqLevel===0)throw new ge(r.getText()+" \u53EA\u80FD\u5728Linq\u4E2D\u4F7F\u7528",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());let l=a===s.length?this.parseUnaryOperator(n):this.parseBinaryOperator(a,n);i=new oa(i,r,l,this.linqLevel)}return i}parseUnaryOperator(t){if(this.stream.match(eo,!1))return new Rn(this.stream.consume(),this.parseUnaryOperator(t));if(this.stream.match(d.LeftParantheses,!1)){let n=this.stream.expect(d.LeftParantheses).getSpan(),a=this.stream.makeIndex(),s=[];for(;this.stream.match(d.Identifier,!1);){let o=this.stream.expect(d.Identifier);if(s.push(o.getSpan().getText()),!this.stream.match(d.Comma,!0)&&this.stream.match(d.RightParantheses,!0)){if(this.stream.match(d.Lambda,!0))return this.parseLambdaBody(n,s);break}}if(this.stream.match(d.RightParantheses,!0)&&this.stream.match(d.Lambda,!0))return this.parseLambdaBody(n,s);this.stream.resetIndex(a);let i=this.parseExpression();return this.stream.expect(d.RightParantheses),this.parseAccessOrCall(i)}else{let n=this.parseAccessOrCallOrLiteral(t);return(n instanceof st||n instanceof Xe||n instanceof Jt)&&this.stream.match([d.PlusPlus,d.MinusMinus],!1)?new Rn(this.stream.consume(),n):n}}parseLambdaBody(t,n){let a=this.stream.makeIndex(),s=[];try{let i=this.parseExpression();return s.push(new kt(new J("return",0,6),i)),new _n(new J(t,i.getSpan()),n,s)}catch{if(this.stream.resetIndex(a),this.stream.match(d.LeftCurly,!0)){for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let r=this.parseStatement(!0);this.validateNode(r),s.push(r)}let o=this.expectCloseing();return new _n(new J(t,o),n,s)}else{let o=this.parseStatement();return s.push(new kt(new J("return",0,6),o)),new _n(new J(t,o.getSpan()),n,s)}}}parseSpreadAccess(t){t||(t=this.stream.expect(d.Spread));let n=this.parseExpression();return new Ki(new J(t.getSpan(),n.getSpan()),n)}parseAccessOrCall(t,n){if(t===d.StringLiteral||t===d.Identifier){let a=this.stream.expect(t),s=a.getSpan();if(t===d.Identifier&&s.getText()==="new")return this.parseNewExpression(s);if(t===d.Identifier&&this.stream.match(d.Lambda,!0))return this.parseLambdaBody(s,[s.getText()]);let i=t===d.StringLiteral?this.createStringLiteral(a):new Xe(s,s.getText());return this.parseAccessOrCall(i,n)}else{for(;this.stream.hasMore()&&this.stream.match([d.LeftParantheses,d.LeftBracket,d.Period,d.QuestionPeriod,d.ColonColon],!1);)if(this.stream.match(d.ColonColon,!1)){let a=this.stream.consume().getSpan(),s=[],i=this.stream.expect(d.Identifier),o=i.getSpan();this.stream.match(d.LeftParantheses,!1)&&(s=this.parseArguments(),o=this.stream.expect(d.RightParantheses).getSpan()),t=new Ma(new J(a,o),i.getText(),t,s)}else if(this.stream.match(d.LeftParantheses,!1)){let a=this.parseArguments(),s=this.stream.expect(d.RightParantheses).getSpan();if(t instanceof Xe||t instanceof Jt)t=new xn(new J(t.getSpan(),s),t,a,this.linqLevel>0);else if(t instanceof st)t=new en(new J(t.getSpan(),s),t,a,this.linqLevel>0);else throw new ge("Expected a variable, field or method.",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());if(n)break}else if(this.stream.match(d.LeftBracket,!0)){let a=this.parseExpression(),s=this.stream.expect(d.RightBracket).getSpan();t=new Jt(new J(t.getSpan(),s),t,a)}else if(this.stream.match([d.Period,d.QuestionPeriod],!1)){let a=this.stream.consume().getTokenType()===d.QuestionPeriod;if(this.linqLevel>0&&this.stream.match(d.Asterisk,!1))t=new st(t.getSpan(),a,this.stream.expect(d.Asterisk).getSpan(),!0);else{let s=this.stream.expect([d.Identifier,d.SqlAnd,d.SqlOr]).getSpan();t=new st(new J(t.getSpan(),s),t,a,s,!1)}}return t}}parseMapLiteral(){let t=this.stream.expect(d.LeftCurly).getSpan(),n=[],a=[];for(;this.stream.hasMore()&&!this.stream.match("}",!1);){let i;if(this.stream.hasPrev()){let o=this.stream.getPrev();if(this.stream.match(d.Spread,!1)&&(o.getTokenType()===d.LeftCurly||o.getTokenType()===d.Comma)){let r=this.stream.expect(d.Spread);n.push(r),a.push(this.parseSpreadAccess(r)),this.stream.match([d.Comma,d.RightCurly],!1)&&this.stream.match(d.Comma,!0);continue}}this.stream.match(d.StringLiteral,!1)?i=this.stream.expect(d.StringLiteral):this.stream.match(d.LeftBracket,!0)?(i=this.parseExpression(),this.stream.expect(d.RightBracket)):i=this.stream.expect(d.Identifier),n.push(i),this.stream.match([d.Comma,d.RightCurly],!1)?(this.stream.match(d.Comma,!0),i instanceof Xe?a.push(i):i.getTokenType()===d.Identifier?a.push(new Xe(i.getSpan(),i.getText())):a.push(new we(i.getSpan(),"java.lang.String"))):(this.stream.expect(":"),a.push(this.parseExpression()),this.stream.match("}",!1)||this.stream.expect(d.Comma))}let s=this.stream.expect("}").getSpan();return new Et(new J(t,s),n,a)}parseListLiteral(){let t=this.stream.expect(d.LeftBracket).getSpan(),n=[];for(;this.stream.hasMore()&&!this.stream.match(d.RightBracket,!1);)n.push(this.parseExpression()),this.stream.match(d.RightBracket,!1)||this.stream.expect(d.Comma);let a=this.stream.expect(d.RightBracket).getSpan();return new bt(new J(t,a),n)}parseSelect(){let t=this.stream.expect("select",!0).getSpan();this.linqLevel++;let n=this.parseLinqFields();this.stream.expect("from",!0);let a=this.parseLinqField(),s=this.parseLinqJoins(),i;this.stream.match("where",!0,!0)&&(i=this.parseExpression());let o=this.parseGroup(),r;this.stream.match("having",!0,!0)&&(r=this.parseExpression());let l=this.parseLinqOrders();this.linqLevel--;let u,p;this.stream.match("limit",!0,!0)&&(u=this.parseExpression(),this.stream.match("offset",!0,!0)&&(p=this.parseExpression()));let m=this.stream.getPrev().getSpan();return new Pa(new J(t,m),n,a,s,i,o,r,l,u,p)}parseGroup(){let t=[];if(this.stream.match("group",!0,!0)){this.stream.expect("by",!0);do{let n=this.parseExpression();t.push(new Ct(n.getSpan(),n,null))}while(this.stream.match(d.Comma,!0))}return t}parseLinqOrders(){let t=[];if(this.stream.match("order",!0,!0)){this.stream.expect("by",!0);do{let n=this.parseExpression(),a=1;this.stream.match(["desc","asc"],!1,!0)&&this.stream.consume().getText()==="desc"&&(a=-1),t.push(new Ji(new J(n.getSpan(),this.stream.getPrev().getSpan()),n,null,a))}while(this.stream.match(d.Comma,!0))}return t}parseLinqField(){let t=this.parseExpression();if(this.stream.match(d.Identifier,!1)&&!this.stream.match(la,!1,!0)){let n=this.stream.expect(d.Identifier).getSpan();return new Ct(new J(t.getSpan(),n),t,n.getText())}return new Ct(t.getSpan(),t,null)}parseLinqFields(){let t=[];do{let n=this.parseExpression();if(this.stream.match(d.Identifier,!1)&&!this.stream.match(la,!1,!0)){if(n instanceof sa)throw new ge("* \u540E\u8FB9\u4E0D\u80FD\u8DDF\u522B\u540D",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());if(n instanceof st&&n.isWhole())throw new ge(n.getSpan().getText()+" \u540E\u8FB9\u4E0D\u80FD\u8DDF\u522B\u540D",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());let a=this.stream.consume().getSpan();t.push(new Ct(new J(n.getSpan(),a),n,a.getText()))}else t.push(new Ct(n.getSpan(),n,null))}while(this.stream.match(d.Comma,!0));if(t.length===0)throw new ge("\u81F3\u5C11\u8981\u67E5\u8BE2\u4E00\u4E2A\u5B57\u6BB5",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());return t}parseLinqJoins(){let t=[];do{let n=this.stream.match("left",!1),a=n?this.stream.consume().getSpan():null;if(this.stream.match("join",!0)){a=n?a:this.stream.getPrev().getSpan();let s=this.parseLinqField();this.stream.expect("on");let i=this.parseExpression();t.push(new Xi(new J(a,this.stream.getPrev().getSpan()),n,s,i))}}while(this.stream.match(["left","join"],!1));return t}parseAccessOrCallOrLiteral(t){let n;if(t&&this.stream.match("}",!1))return null;if(this.stream.match(d.Spread,!1))n=this.parseSpreadAccess();else if(this.stream.match(d.Identifier,!1))this.stream.match("async",!1)?n=this.parseAsync():this.stream.match("select",!1,!0)?n=this.parseSelect():n=this.parseAccessOrCall(d.Identifier);else if(this.stream.match(d.LeftCurly,!1))n=this.parseMapLiteral();else if(this.stream.match(d.LeftBracket,!1))n=this.parseListLiteral();else if(this.stream.match(d.StringLiteral,!1))n=this.createStringLiteral(this.stream.expect(d.StringLiteral));else if(this.stream.match(d.BooleanLiteral,!1))n=new we(this.stream.expect(d.BooleanLiteral).getSpan(),"java.lang.Boolean");else if(this.stream.match(d.DoubleLiteral,!1))n=new we(this.stream.expect(d.DoubleLiteral).getSpan(),"java.lang.Double");else if(this.stream.match(d.FloatLiteral,!1))n=new we(this.stream.expect(d.FloatLiteral).getSpan(),"java.lang.Float");else if(this.stream.match(d.ByteLiteral,!1))n=new we(this.stream.expect(d.ByteLiteral).getSpan(),"java.lang.Byte");else if(this.stream.match(d.ShortLiteral,!1))n=new we(this.stream.expect(d.ShortLiteral).getSpan(),"java.lang.Short");else if(this.stream.match(d.IntegerLiteral,!1))n=new we(this.stream.expect(d.IntegerLiteral).getSpan(),"java.lang.Integer");else if(this.stream.match(d.LongLiteral,!1))n=new we(this.stream.expect(d.LongLiteral).getSpan(),"java.lang.Long");else if(this.stream.match(d.DecimalLiteral,!1))n=new we(this.stream.expect(d.DecimalLiteral).getSpan(),"java.math.BigDecimal");else if(this.stream.match(d.RegexpLiteral,!1)){let a=this.stream.expect(d.RegexpLiteral);n=new we(a.getSpan(),"java.util.regex.Pattern")}else this.stream.match(d.NullLiteral,!1)?n=new we(this.stream.expect(d.NullLiteral).getSpan(),"null"):this.linqLevel>0&&this.stream.match(d.Asterisk,!1)?n=new sa(this.stream.expect(d.Asterisk).getSpan()):this.stream.match(d.Language,!1)&&(n=new Wi(this.stream.consume().getSpan(),this.stream.consume().getSpan()));if(n==null)throw new ge("Expected a variable, field, map, array, function or method call, or literal.",this.stream.hasMore()?this.stream.consume().getSpan():this.stream.getPrev().getSpan());return this.parseAccessOrCall(n)}createStringLiteral(t){if(t.getTokenStream()==null)return new we(t.getSpan(),"java.lang.String");let n=this.stream;this.stream=t.getTokenStream();let a=[];for(;this.stream.hasMore();)a.push(this.parseExpression());return this.stream=n,new we(t.getSpan(),"java.lang.String",a)}findBestMatch(t,n){let a=t.expressions().filter(s=>s);for(let s in a){let i=this.findBestMatch(a[s],n);if(i)return i}return t.getSpan().inPosition(n)?t:null}}const An=e=>{var n;const t={};return(n=e==null?void 0:e.children)==null||n.forEach(a=>t[a.name]=a),t};function In(e,t){var s;let n=[],a={name:"",value:"",dataType:"",required:!1,validateType:"",expression:"",error:"",description:"",defaultValue:null,children:[]};if(e instanceof Et)e.keys.forEach((i,o)=>{var p,m,f,y,E,C,I;const r=i.span.getText().replace(/['"]/g,"");let l=e.values[o],u=Ue(pe({},a),{description:((p=t[r])==null?void 0:p.description)||"",required:((m=t[r])==null?void 0:m.required)===!0,validateType:((f=t[r])==null?void 0:f.validateType)||"",expression:((y=t[r])==null?void 0:y.expression)||"",error:((E=t[r])==null?void 0:E.error)||"",name:r,defaultValue:(C=t[r])==null?void 0:C.defaultValue,value:ca(l)?l.span.getText().trim():"",dataType:((I=t[r])==null?void 0:I.dataType)||Cn(l)});(l instanceof Et||l instanceof bt)&&(u.children=In(l,An(t[r]))),n.push(u)});else if(e instanceof bt&&e.values[0]){let i=e.values[0],o=Ue(pe({},a),{value:ca(i)?i.span.getText().trim():"",dataType:((s=t[""])==null?void 0:s.dataType)||Cn(i)});(i instanceof Et||i instanceof bt)&&(o.children=In(i,An(t[""]))),n.push(o)}return n}function ca(e){return!(e instanceof Et||e instanceof bt)}function Cn(e){if(e instanceof Et)return"Object";if(e instanceof bt)return"Array";e instanceof Rn&&(e=e.operand);let t=e.javaType.substring(e.javaType.lastIndexOf(".")+1);return t==="Integer"&&Number(e.span.getText())>2147483647||Number(e.span.getText())<-2147483648?"Long":t==="null"?"Object":t}function Ua(e,t){t=t||{};try{JSON.parse(e);let a=new Yt(new ft(zt(e))).parseExpression();return{name:"",value:"",dataType:t.dataType||Cn(a),required:t.required,validateType:t.validateType||"",expression:t.expression||"",error:t.error||"",description:t.description||"",defaultValue:t.defaultValue,children:In(a,An(t))}}catch{}}const ua=(e,t,n,a)=>{let s=-1,i=ne.getImportClass();if(n!==0&&t&&(s=i.length)>0){t=t.toLowerCase(),ne.getDefineModules().filter(r=>r.toLowerCase().indexOf(t)>-1).forEach(r=>e.push({label:r,filterText:r,kind:W.CompletionItemKind.Module,detail:r,insertText:r,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet}));let o=new Set;for(let r=0;r-1){let p=l.substring(l.lastIndexOf(".")+1);if(u===0){let m=l.substring(t.length),f=m;if(m.startsWith("."))f=t+".",m=t.substring(t.lastIndexOf(".")+1)+".";else{if(m.indexOf(".")===-1){e.push({sortText:`2${p}`,label:p,kind:W.CompletionItemKind.Class,filterText:l,detail:l,insertText:p,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet});continue}let y=m.substring(0,m.indexOf(".")+1);f=t+y,m=t.substring(t.lastIndexOf(".")+1)+y}if(o.has(m))continue;o.add(m),e.push({sortText:`1${m}`,label:m,kind:W.CompletionItemKind.Folder,filterText:l,detail:f.replace(/\.$/,""),insertText:m,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet,command:{id:"editor.action.triggerSuggest"}})}else p.toLowerCase().indexOf(t)>-1&&e.push({sortText:`2${p}`,label:p,kind:W.CompletionItemKind.Class,filterText:p,detail:l,insertText:l,range:new ot(a.lineNumber,n+1,a.lineNumber,a.column)})}}}else ne.getDefineModules().forEach(o=>e.push({label:o,filterText:o,kind:W.CompletionItemKind.Module,detail:o,insertText:o,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet}))},to=(e,t,n,a)=>{let s=n.indexOf('"')+1;if(s===0&&(s=n.indexOf("'")+1),s===0){n=n.trim().replace("import","").trim(),ua(e,n,a+1,t);return}let i=n.substring(a).trim().replace(/['|"]/g,"");if(i.startsWith("@")){if(i.indexOf(" ")>-1)return;let o=ne.getApiFinder();(o&&o()||[]).forEach(r=>{let l="@"+r.method+":"+r.path;e.push({sortText:l,label:l,kind:W.CompletionItemKind.Reference,filterText:l,detail:r.name,insertText:l,range:new ot(t.lineNumber,s+1,t.lineNumber,t.column)})}),o=ne.getFunctionFinder(),(o&&o()||[]).forEach(r=>{let l="@"+r.path;e.push({sortText:l,label:l,kind:W.CompletionItemKind.Reference,filterText:l,detail:r.name,insertText:l,range:new ot(t.lineNumber,s+1,t.lineNumber,t.column)})});return}ua(e,i,s,t)},Dt=async(e,t,n,a,s)=>{if(n=n||{},a&&a instanceof Xe&&await a.getJavaType(n)==="java.lang.Object"){let u=ne.getImportClass();const p=a.variable;u.forEach(m=>{let f=m.substring(m.lastIndexOf(".")+1);f.indexOf(p)>-1&&e.push({sortText:`${f}`,label:f,kind:W.CompletionItemKind.Class,filterText:f,detail:m,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet,command:{id:"editor.action.appendHead",arguments:[`import ${m}\r +`]},insertText:f+(s?"()":"")})})}ne.findFunction().forEach(u=>{e.push({sortText:u.sortText||u.fullName,label:u.fullName,filterText:u.name,kind:W.CompletionItemKind.Method,detail:u.comment,insertText:u.insertText,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet})});let i=e.map(u=>u.detail),o=t.match(/[a-zA-Z_$]+/ig)||[],r=o.length,l=Object.keys(n);l.forEach(u=>{e.push({label:u,filterText:u,kind:W.CompletionItemKind.Variable,detail:n[u],insertText:u,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet})}),r>2&&Array.from(new Set(o)).filter((u,p)=>p+2{e.push({label:u,filterText:u,kind:W.CompletionItemKind.Text,detail:u,insertText:u,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet})})},pa=async(e,t)=>{let n=await ne.loadClass(e),a=e.lastIndexOf("."),s=a>0?e.substring(a+1):e,i=ne.findEnums(n);if(i)for(let l=0;l({label:l[0],kind:W.CompletionItemKind.Struct,detail:l[2]||l[1],insertText:l[1],filterText:l[0],insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet,range:i}));return a.length>1&&a.trim().indexOf("import")===0?(to(r,t,a,a.indexOf("import")+6),o=!0):a.endsWith("::")?r=["int","long","date","string","short","byte","float","double","json","stringify","sql"].map(l=>({label:l,detail:`\u8F6C\u6362\u4E3A${l==="stringify"?"json\u5B57\u7B26\u4E32":l==="sql"?"sql\u53C2\u6570\u7C7B\u578B":l}`,insertText:l,kind:W.CompletionItemKind.TypeParameter,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet})):n.length>1?await no(r,n):await Dt(r,n,pe(pe(pe({},sn.environmentFunction()),ne.getAutoImportClass()),ne.getAutoImportModule())),{suggestions:r,incomplete:o}},triggerCharacters:[".",":"]};let $a=function(e,t){for(var n=0,a=0,s=e.length;a16777215||n>16777215)){var s=this._length;this._startIndexes[s]=t,this._endIndexes[s]=n,this._length++,a<1e3&&(this._indentOccurrences[a]=(this._indentOccurrences[a]||0)+1)}}toIndentRanges(t){var n=[];if(this._length<=this._foldingRangesLimit){new Uint32Array(this._length),new Uint32Array(this._length);for(var a=this._length-1,s=0;a>=0;a--,s++)n.push({start:this._startIndexes[a],end:this._endIndexes[a]})}else{for(var i=0,o=this._indentOccurrences.length,a=0;athis._foldingRangesLimit){o=a;break}i+=r}}var l=t.getOptions().tabSize;new Uint32Array(this._foldingRangesLimit),new Uint32Array(this._foldingRangesLimit);for(var a=this._length-1,s=0;a>=0;a--){var u=this._startIndexes[a],p=t.getLineContent(u),m=$a(p,l);(m{let n=e.getOptions().tabSize,a=new io(5e3),s=[],i=e.getLineCount()+1,o=-1,r=-1,l=[];s.push({indent:-1,endAbove:i,line:i});for(let p=e.getLineCount();p>0;p--){let m=e.getLineContent(p);m.startsWith("import")||m.trim().startsWith("import")?o==-1?o=p:r=p:(r>-1&&o>-1&&l.push({start:r,end:o,kind:W.FoldingRangeKind.Imports}),r=-1,o=-1);let f=$a(m,n),y=s[s.length-1];if(f!==-1){if(y.indent>f){do s.pop(),y=s[s.length-1];while(y.indent>f);var u=y.endAbove-1;u-p>=1&&a.insertFirst(p,u,f)}y.indent===f?y.endAbove=p:s.push({indent:f,endAbove:p,line:p})}}return r>-1&&o>-1&&l.push({start:r,end:o,kind:W.FoldingRangeKind.Imports}),l.concat(a.toIndentRanges(e))}},ro={signatureHelpRetriggerCharacters:["(",","],signatureHelpTriggerCharacters:["(",","],provideSignatureHelp:async(e,t,n,a)=>{if(a.activeSignatureHelp){let i=a.activeSignatureHelp;return i.activeSignature+=1,i.activeSignature===i.signatures.length&&(i.activeSignature=0),{dispose:function(){},value:i}}let s=e.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:t.lineNumber,endColumn:t.column});try{let i=zt(s),o=new Yt(new ft(i));const{best:r,env:l}=await o.parseBest(s.length-1);if(r&&r instanceof en){let u=r.target,p=await u.getTarget().getJavaType(l),m=u.member.getText(),f=ne.findMethods(await ne.loadClass(p)),y=[];if(f.filter(E=>E.name===m).forEach(E=>{let C=[];for(let I=E.extension?1:0;I0)return{dispose:function(){},value:{activeParameter:0,activeSignature:0,signatures:y}}}}catch{}}},Ln=(e,t,n)=>{n.push({value:`${e}${t.fullName}`}),t.comment&&n.push({value:`${t.comment}`}),t.parameters.forEach((a,s)=>{(s>0||!t.extension)&&n.push({value:`${a.name}\uFF1A${a.comment||a.type}`})}),n.push({value:`\u8FD4\u56DE\u7C7B\u578B\uFF1A\`${t.returnType}\``})},hn=(e,t,n,a)=>{let s=ne.findFunction().filter(i=>i.name===e);if(s.length>0)Ln("",s[0],n);else{let i=t[e];if(i&&i.indexOf("@")===0){let o=i.substring(1),r=ne.getOnlineFunction(o);if(r){let l=Array.isArray(r.parameter)?r.parameter:JSON.parse(r.parameter||"[]");l.forEach(u=>u.comment=u.description),Ln("",{fullName:e+" "+r.name,comment:r.description||"",parameters:l,returnType:r.returnType},n)}}else n.push({value:`${a?"\u521B\u5EFA\u5BF9\u8C61":"\u8BBF\u95EE\u53D8\u91CF"}\uFF1A${e}`}),n.push({value:`\u7C7B\u578B\uFF1A${i||"unknow"}`})}},lo={provideHover:async(e,t)=>{var u,p,m;let n=e.getValue(),a=zt(n),s=new ft(a),i=new Yt(s),o=i.parse(!0),l=e.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:t.lineNumber,endColumn:t.column}).length;for(let f=0,y=o.length;fD.name===R).forEach(D=>Ln(`${ne.getSimpleClass(v)}.`,D,I)),ne.findEnums(T).filter(D=>D===R).forEach(D=>{I.push({value:`\u8BBF\u95EE\u679A\u4E3E\uFF1A\`${v}.${R}\``})}),ne.findAttributes(T).filter(D=>D.name===R).forEach(D=>{I.push({value:`\u8BBF\u95EE\u5C5E\u6027\uFF1A\`${v}.${R}\``}),D.comment&&I.push({value:`${D.comment}`}),I.push({value:`\u5C5E\u6027\u7C7B\u578B\uFF1A\`${D.type}\``})}),O=E.member.getLine()}else if(E instanceof xn){let v=E.target;hn(v.variable,C,I)}else if(E instanceof Ut){let v=E.identifier;v instanceof Xe&&hn(v,C,I,!0)}else if(E instanceof Jt)I.push({value:"\u8BBF\u95EEMap\u6216\u6570\u7EC4"});else if(E instanceof Pa)I.push({value:"linq\u67E5\u8BE2"});else return;return{range:new ot(O.lineNumber,O.startCol,O.endLineNumber,O.endCol+1),contents:I}}}}},co=()=>{const e="mybatis";W.register({id:e}),W.setLanguageConfiguration(e,{comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]}),W.setMonarchTokensProvider(e,{defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/(<)(where|set|foreach|if|trim|elseif|else)/,["delimiter",{token:"tag",next:"@xml"}]],[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]],xml:[[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@xmlEmbedded",nextEmbedded:"mybatis"}],[/[ \t\r\n]+/],[/(<\/)(where|if|set|foreach|trim|elseif|else)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],xmlEmbedded:[[/<\/(where|if|set|foreach|trim|elseif|else)/,{token:"tag",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}})},uo=()=>{co();const e="magicscript";W.register({id:e}),W.setLanguageConfiguration(e,{wordPattern:/(-?\d*\.\d\w*)|([^`~!#%^&*()\-=+[{\]}\\|;:'",.<>/?\s]+)/g,brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:W.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:W.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:W.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:W.IndentAction.None,removeText:1}}],comments:{lineComment:"//",blockComment:["/*","*/"]},operators:["<=",">=","==","!=","+","-","*","/","%","&","|","!","&&","||","?",":","++","--","+=","-=","*=","/="],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string.multi"]},{open:"",close:""},{open:"'},{open:"'},{open:""},{open:"",close:""},{open:"",close:""},{open:"'},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]},{open:"/**",close:" */",notIn:["string"]}]}),W.setMonarchTokensProvider(e,vn),W.registerCompletionItemProvider(e,so),W.registerFoldingRangeProvider(e,oo),W.registerSignatureHelpProvider(e,ro),W.registerHoverProvider(e,lo),W.registerDocumentFormattingEditProvider(e,{provideDocumentFormattingEdits(t,n,a){return[{text:new oe(t.getValue()).beautify(),range:t.getFullModelRange()}]}}),W.registerCompletionItemProvider("html",{triggerCharacters:[">"],provideCompletionItems:(t,n)=>{var o;const s=(o=t.getValueInRange({startLineNumber:n.lineNumber,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column}).match(/.*<(\w+)>$/))==null?void 0:o[1];if(!s)return;const i=t.getWordUntilPosition(n);return{suggestions:[{label:``,kind:W.CompletionItemKind.EnumMember,insertText:`$1`,insertTextRules:W.CompletionItemInsertTextRule.InsertAsSnippet,range:{startLineNumber:n.lineNumber,endLineNumber:n.lineNumber,startColumn:i.startColumn,endColumn:i.endColumn}}]}}})};function xe(e,t,n){var a={debug:!1,automaticOpen:!0,reconnectInterval:1e3,maxReconnectInterval:3e4,reconnectDecay:1.5,timeoutInterval:2e3,maxReconnectAttempts:null,binaryType:"blob"};n||(n={});for(var s in a)typeof n[s]!="undefined"?this[s]=n[s]:this[s]=a[s];this.url=e,this.reconnectAttempts=0,this.readyState=WebSocket.CONNECTING,this.protocol=null;var i=this,o,r=!1,l=!1,u=document.createElement("div");u.addEventListener("open",function(m){i.onopen(m)}),u.addEventListener("close",function(m){i.onclose(m)}),u.addEventListener("connecting",function(m){i.onconnecting(m)}),u.addEventListener("message",function(m){i.onmessage(m)}),u.addEventListener("error",function(m){i.onerror(m)}),this.addEventListener=u.addEventListener.bind(u),this.removeEventListener=u.removeEventListener.bind(u),this.dispatchEvent=u.dispatchEvent.bind(u);function p(m,f){var y=document.createEvent("CustomEvent");return y.initCustomEvent(m,!1,!1,f),y}this.open=function(m){if(o=new WebSocket(i.url,t||[]),o.binaryType=this.binaryType,m){if(this.maxReconnectAttempts&&this.reconnectAttempts>this.maxReconnectAttempts)return}else u.dispatchEvent(p("connecting")),this.reconnectAttempts=0;(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","attempt-connect",i.url);var f=o,y=setTimeout(function(){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","connection-timeout",i.url),l=!0,f.close(),l=!1},i.timeoutInterval);o.onopen=function(E){clearTimeout(y),(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onopen",i.url),i.protocol=o.protocol,i.readyState=WebSocket.OPEN,i.reconnectAttempts=0;var C=p("open");C.isReconnect=m,m=!1,u.dispatchEvent(C)},o.onclose=function(E){if(clearTimeout(I),o=null,r)i.readyState=WebSocket.CLOSED,u.dispatchEvent(p("close"));else{i.readyState=WebSocket.CONNECTING;var C=p("connecting");C.code=E.code,C.reason=E.reason,C.wasClean=E.wasClean,u.dispatchEvent(C),!m&&!l&&((i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onclose",i.url),u.dispatchEvent(p("close")));var I=i.reconnectInterval*Math.pow(i.reconnectDecay,i.reconnectAttempts);setTimeout(function(){i.reconnectAttempts++,i.open(!0)},I>i.maxReconnectInterval?i.maxReconnectInterval:I)}},o.onmessage=function(E){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onmessage",i.url,E.data);var C=p("message");C.data=E.data,u.dispatchEvent(C)},o.onerror=function(E){(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","onerror",i.url,E),u.dispatchEvent(p("error"))}},this.automaticOpen==!0&&this.open(!1),this.send=function(m){if(o)return(i.debug||xe.debugAll)&&console.debug("ReconnectingWebSocket","send",i.url,m),o.send(m);throw"INVALID_STATE_ERR : Pausing to reconnect websocket"},this.close=function(m,f){typeof m=="undefined"&&(m=1e3),r=!0,o&&o.close(m,f)},this.refresh=function(){o&&o.close()}}xe.prototype.onopen=function(e){};xe.prototype.onclose=function(e){};xe.prototype.onconnecting=function(e){};xe.prototype.onmessage=function(e){};xe.prototype.onerror=function(e){};xe.debugAll=!1;xe.CONNECTING=WebSocket.CONNECTING;xe.OPEN=WebSocket.OPEN;xe.CLOSING=WebSocket.CLOSING;xe.CLOSED=WebSocket.CLOSED;let fn={};function qt(e){if(fn[e])try{fn[e].close()}catch{}this.listeners={},this.future=new Promise(t=>{this.resolve=t,this.socket=new xe(e,null,{timeoutInterval:1e4}),fn[e]=this,this.socket.onmessage=this.messageReceived,this.socket.onconnecting=()=>{this.future=new Promise(n=>this.resolve=n),S.status("message.connectDebugServer")},this.socket.onopen=()=>{S.status("message.connectDebugServerSuccess"),S.$emit("ws_open"),this.resolve()},this.socket.onclose=()=>{S.status("message.debugServerClose"),S.$emit("ws_close")}})}qt.prototype.on=function(e,t){this.listeners[e]=this.listeners[e]||[],this.listeners[e].push(t)};qt.prototype.messageReceived=function(e){let t=e.data,n=t.indexOf(","),a=n===-1?t:t.substring(0,n),s=[];for(;n>-1;){if(t=t.substring(n+1),t.startsWith("[")||t.startsWith("{")){s.push(JSON.parse(t));break}n=t.indexOf(","),s.push(n===-1?t:t.substring(0,n))}S.$emit("ws_"+a,s)};qt.prototype.send=function(e){this.future.then(()=>{this.socket.send(e)})};qt.prototype.close=function(){this.socket.close()};var Re={OPEN:"open",BREAKPOINT:"breakpoint",LOGIN:"login",RESUME_BREAKPOINT:"resume_breakpoint",LOGIN_RESPONSE:"login_response",LOG:"log",LOGS:"logs",EXCEPTION:"exception",USER_LOGIN:"user_login",USER_LOGOUT:"user_logout",ONLINE_USERS:"online_users",SET_FILE_ID:"set_file_id",INTO_FILE_ID:"into_file_id",PING:"ping",PONG:"pong"},F={DO_SAVE:"doSave",DO_TEST:"doTest",LOGINED:"logined",LOGOUT:"logout",DO_DOWNLOAD:"do-download",DO_UPLOAD:"do-upload",DO_PUSH:"do-push",DO_RECENT:"do-recent",OPEN:"open",SELECT_NAVBAR_BY_ITEM:"select-navbar-by-item",OPEN_WITH_ID:"open-with-id",OPEN_ITEM:"open-item",DELETE_FILE:"delete-file",DEBUG_CONTINUE:"debug-continue",DEBUG_SETPINTO:"debug-setpinto",SWITCH_THEME:"switch-theme",OPEN_GROUP:"open-group",SWITCH_TOOLBAR:"switch-toolbar",STATUS:"status",MESSAGE:"message",CLOSE:"close",OPEN_EMPTY:"open-empty",LOAD_RESOURCES:"load-resources",REFRESH_RESOURCE:"refresh-resource",DO_SEARCH:"doSearch",NOTIFY:"notify",RELOAD_RESOURCES:"reload-resources",RELOAD_RESOURCES_FINISH:"reload-resources-finish",LOAD_RESOURCES_FINISH:"load-resources-finish",ADD_FOOTER_TOOLBAR:"add-footer-toolbar"};const po=A("div",{class:"magic-mounts"},null,-1),_o={props:{config:{type:Object,required:!0}},setup(e){const t=e;uo(),Ke("bus",S),self.MonacoEnvironment={getWorker:function(N,$){return $==="json"?new os:$==="html"?new rs:new ls}},t.config.header=t.config.header||{};const n=U(!1),a=U(null),s=U(null),i=U(!1),o=U(null);Ke("ELEMENT_ROOT",s),Ke("activateUserFiles",U({}));let r=null;const l=t.config;M.BASE_URL=l.baseURL||"",M.SERVER_URL=l.serverURL||"";let u=`${location.protocol}//${location.host}${location.pathname}`.replace("/index.html","");M.BASE_URL.startsWith("http")?u=M.BASE_URL:M.BASE_URL.startsWith("/")?u=`${location.protocol}/${location.host}${M.BASE_URL}`:u=u+"/"+M.BASE_URL,l.blockClose!==!1&&(window.onbeforeunload=()=>"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002");const p=l.request||{beforeSend:N=>N,onError:N=>Promise.reject(N)};z.getAxios().interceptors.request.use(N=>p.beforeSend&&p.beforeSend(N)||N,N=>p.onError&&p.onError(N)||Promise.reject(N));const m=l.response||{onSuccess:N=>N,onError:N=>Promise.reject(N)};z.getAxios().interceptors.response.use(N=>m.onSuccess&&m.onSuccess(N)||N,N=>m.onError&&m.onError(N)||Promise.reject(N)),z.setBaseURL(M.BASE_URL),M.AUTO_SAVE=l.autoSave!==!1,S.status("message.loadClass"),Ke("i18n.format",c);const f=()=>new Promise(N=>{z.sendGet("/plugins").success($=>Promise.all(($||[]).filter(Y=>Y.javascriptFilename).map(Y=>new Promise(re=>{S.status("plugin.loading",!0,Y.name),ri(it(u+"/plugins/"+Y.javascriptFilename)).then(()=>{M.PLUGINS.push(window[Y.globalName]({i18n:{add:xs,format:c},request:z,constants:M,Message:F,bus:S,modal:ve,JavaClass:ne,monaco:cs})),S.status("plugin.loaded",!0,Y.name),re()}).catch(ie=>{S.status("plugin.loadFailed",!1,Y.name),re()})}))).then(()=>N())).error(()=>N())}),y=St().appContext.app;Promise.all([ne.initClasses(),ne.initImportClass(),f()]).then(()=>S.status("message.loadClassFinish")).catch(N=>{S.status("message.loadClassError")}).finally(()=>{M.PLUGINS.forEach(N=>{N.datasources&&N.datasources.filter($=>$.component).forEach($=>{y.component(`magic-datasource-${$.type}`,$.component)})}),i.value=!0});const E=t.config.options||[];Ke("options",E),z.sendGet("/options").success(N=>{N.forEach($=>E.push($))});const C=()=>{M.LOGINED=!0,r=new qt(it(u.replace(/^http/,"ws")+"/console")),be(()=>a.value.loadResources())};S.$on(F.LOGINED,C);const I=()=>{fetch("https://console.ssssssss.org.cn/latest?group=org.ssssssss&artifactId=magic-api&from="+M.MAGIC_API_VERSION_TEXT).then(N=>{t.config.checkUpdate!==!1&&N.status===200&&N.json().then($=>{$.version&&$.version!=="unknown"&&M.config.version!==$.version?(S.status("message.newVersionRelease",!0,$.version),$.version!==Fe.get(M.IGNORE_VERSION)&&S.$emit(F.NOTIFY,{title:c("message.tips"),icon:"warning",content:c("message.versionUpdate",$.version),buttons:[{title:c("message.changelog"),onClick:()=>{window.open("http://www.ssssssss.org/magic-api/changelog.html")}},{title:c("message.ignore"),onClick:()=>{Fe.set(M.IGNORE_VERSION,$.version)}}]})):S.status("message.versionLastest")})})},O=()=>l.getMagicTokenValue&&l.getMagicTokenValue()||Fe.get(M.STORE.token)||M.HEADER_MAGIC_TOKEN_VALUE,v=()=>new Promise(N=>{M.HEADER_MAGIC_TOKEN_VALUE=O(),S.status("message.tryAutoLogin"),z.sendPost("/login").success($=>{n.value=!$,$&&be(()=>{S.status("message.autoLoginSuccess"),S.$emit(F.LOGINED)})}).end(N)}),T=()=>{typeof hideMaLoading=="function"&&hideMaLoading()},R=()=>{z.execute({url:"/config.json",method:"get"}).then(N=>{if(M.config=N.data,t.config.inJar&&location.href.indexOf(N.data.web)>-1){let $=location.href.substring(0,location.href.indexOf(N.data.web));M.SERVER_URL=it($+"/"+(N.data.prefix||""))}M.config.version&&M.config.version!==M.MAGIC_API_VERSION_TEXT&&(S.status("message.versionConflict",!1,M.MAGIC_API_VERSION_TEXT,M.config.version),S.$emit(F.NOTIFY,{icon:"error",title:c("message.versionCheck"),content:c("message.versionConflict",M.MAGIC_API_VERSION_TEXT,M.config.version)})),v().then(()=>{T(),I()})}).catch(N=>{console.error(N),T(),o.value=c("message.loadConfigError")})},D=()=>{const N=document.body;ce.bind(N,ce.Ctrl|ce.S,()=>S.$emit(F.DO_SAVE,!0)),ce.bind(N,ce.Ctrl|ce.Q,()=>S.$emit(F.DO_TEST)),ce.bind(N,ce.Ctrl|ce.E,()=>S.$emit(F.DO_RECENT)),ce.bind(N,ce.F8,()=>S.$emit(F.DEBUG_CONTINUE)),ce.bind(N,ce.F6,()=>S.$emit(F.DEBUG_SETPINTO)),ce.bind(N,ce.Ctrl|ce.Shift|ce.F,()=>S.$emit(F.DO_SEARCH))};ht(()=>{D()}),Xa(()=>ce.unbind());const L=Je({});return un("default",Ms),un("dark",Ps),Object.keys(l.themes||{}).forEach(N=>{un(N,l.themes[N])}),M.THEME=l.theme||"default",M.DEFAULT_EXPAND=l.defaultExpand!==!1,M.JDBC_DRIVERS=l.jdbcDrivers||M.JDBC_DRIVERS,M.DATASOURCE_TYPES=l.datasourceTypes||M.DATASOURCE_TYPES,l.editorFontFamily!==void 0&&(M.EDITOR_FONT_FAMILY=l.editorFontFamily),l.editorFontSize!==void 0&&(M.EDITOR_FONT_SIZE=l.editorFontSize),M.FONT_LIGATURES=l.fontLigatures!==!1,l.logMaxRows!==void 0&&(M.LOG_MAX_ROWS=Math.max(l.logMaxRows,10)),l.decorationTimeout!==void 0&&(M.DECORATION_TIMEOUT=l.decorationTimeout),S.$on(F.MESSAGE,(N,$)=>{r&&($?r.send(`${N},${$}`):r.send(N))}),S.$event(Re.OPEN,()=>{M.CLIENT_ID=ai(16),be(()=>S.send(Re.LOGIN,[O(),M.CLIENT_ID].join(",")))}),S.$event(Re.LOGIN_RESPONSE,([N,$])=>{N==="1"&&(M.user=$)}),S.$on(F.LOGOUT,()=>{n.value=!0,r&&r.close(),r=null}),(N,$)=>{const Y=b("magic-login"),re=b("magic-header"),ie=b("magic-main"),Q=b("magic-status-bar"),ye=b("magic-notify");return g(),w("div",{class:"magic-editor",style:ze(h(L)),onContextmenu:$[2]||($[2]=Se(()=>{},["prevent"])),ref_key:"root",ref:s},[yt(_(Y,{value:n.value,"onUpdate:value":$[0]||($[0]=Te=>n.value=Te),error:o.value,"onUpdate:error":$[1]||($[1]=Te=>o.value=Te)},null,8,["value","error"]),[[$t,n.value]]),i.value?(g(),j(re,{key:0,themeStyle:h(L),header:h(l).header,title:h(l).title},null,8,["themeStyle","header","title"])):X("",!0),i.value?(g(),j(ie,{key:1,ref_key:"componentMain",ref:a,onOnLoad:R},null,512)):X("",!0),i.value?(g(),j(Q,{key:2,config:h(l)},null,8,["config"])):X("",!0),i.value?(g(),j(ye,{key:3})):X("",!0),po],36)}}};var ho=Object.freeze(Object.defineProperty({__proto__:null,default:_o},Symbol.toStringTag,{value:"Module"}));var q=(e,t)=>{const n=e.__vccOpts||e;for(const[a,s]of t)n[a]=s;return n};const fo={props:{menus:Array,onDestory:Function,position:Object},data(){return{style:{left:this.position.x+"px",top:this.position.y+"px",element:U(null)}}},mounted(){document.addEventListener("click",this.onMouseup);const e=document.querySelector(".magic-editor").getBoundingClientRect(),t=e.x+e.width,n=e.y+e.height,a=this.$el.getBoundingClientRect();a.x+a.width>t&&(this.style.left=`${t-a.width}px`),a.y+a.height>n&&(this.style.top=`${n-a.height}px`)},unmounted(){document.removeEventListener("click",this.onMouseup)},methods:{onMouseup(){this.onDestory&&this.onDestory()}}},mo=["onClick"],go={key:0,class:"magic-context-menu-icon"},vo={class:"magic-context-menu-icon right"},Eo={class:"magic-context-menu none-select"},bo=["onClick"],yo={key:0,class:"magic-context-menu-icon"};function To(e,t,n,a,s,i){const o=b("magic-icon");return g(),w("ul",{class:"magic-context-menu none-select",style:ze(s.style),ref:"element"},[(g(!0),w(Z,null,he(n.menus,(r,l)=>(g(),w("li",{key:l,class:Ee({divided:r.divided}),onClick:Se(()=>{i.onMouseup(),r.onClick&&r.onClick()},["stop"])},[n.menus.some(u=>u.icon)?(g(),w("span",go,[r.icon?(g(),j(o,{key:0,icon:r.icon,size:"12px"},null,8,["icon"])):X("",!0)])):X("",!0),A("label",null,B(r.label),1),r.children?(g(),w(Z,{key:1},[A("span",vo,[_(o,{icon:"right",size:"12px"})]),A("ul",Eo,[(g(!0),w(Z,null,he(r.children,(u,p)=>(g(),w("li",{key:p,class:Ee({divided:u.divided}),onClick:Se(()=>{i.onMouseup(),u.onClick&&u.onClick()},["stop"])},[r.children.some(m=>m.icon)?(g(),w("span",yo,[u.icon?(g(),j(o,{key:0,icon:u.icon,size:"12px"},null,8,["icon"])):X("",!0)])):X("",!0),A("label",null,B(u.label),1)],10,bo))),128))])],64)):X("",!0)],10,mo))),128))],4)}var Ba=q(fo,[["render",To],["__scopeId","data-v-50740138"]]),So=Object.freeze(Object.defineProperty({__proto__:null,default:Ba},Symbol.toStringTag,{value:"Module"}));const Oo={class:"magic-empty"},xo={props:{text:{type:String,default:c("message.nodata")}},setup(e){return(t,n)=>(g(),w("div",Oo,[A("p",null,B(e.text),1)]))}};var Ro=q(xo,[["__scopeId","data-v-70308d5a"]]),Ao=Object.freeze(Object.defineProperty({__proto__:null,default:Ro},Symbol.toStringTag,{value:"Module"}));const Io={class:"icon"},Co={props:{loading:Boolean,loadingText:{type:String,default:c("message.loading")},style:Object},setup(e){return(t,n)=>{const a=b("magic-icon");return e.loading?(g(),w("div",{key:0,class:"magic-loading",style:ze(e.style)},[A("p",null,[A("span",Io,[_(a,{icon:"refresh",size:"20px"})]),_e(" "+B(e.loadingText),1)])],4)):Ot(t.$slots,"default",{key:1},void 0,!0)}}};var Lo=q(Co,[["__scopeId","data-v-19c11c56"]]),No=Object.freeze(Object.defineProperty({__proto__:null,default:Lo},Symbol.toStringTag,{value:"Module"}));const wo={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:Array},setup(){return{instance:null,instancePromise:null}},mounted(){this.instance=Be.createDiffEditor(this.$refs.editor,Ue(pe({},this.editorConfig),{enableSplitViewResizing:!1,language:this.language,minimap:{enabled:!1},folding:!1,lineDecorationsWidth:20,wordWrap:"on",fixedOverflowWidgets:!1,fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),this.instance.setModel({original:Be.createModel(this.value[0],this.language),modified:Be.createModel(this.value[1],this.language)}),tt(()=>this.language,()=>{nextTick(()=>this.instance.setModel({original:Be.createModel(this.value[0],this.language),modified:Be.createModel(this.value[1],this.language)}))})},methods:{getEditorDom(){return this.$refs.editor},getInstance(){return this.instance}},watch:{value(e){this.instance.setModel({original:Be.createModel(e[0],this.language),modified:Be.createModel(e[1],this.language)})}}},ko={class:"magic-monaco-editor",ref:"editor"};function Do(e,t,n,a,s,i){return g(),w("div",ko,null,512)}var Mo=q(wo,[["render",Do],["__scopeId","data-v-59a04eab"]]),Po=Object.freeze(Object.defineProperty({__proto__:null,default:Mo},Symbol.toStringTag,{value:"Module"}));const Uo={props:{language:{type:String,required:!0},editorConfig:{type:Object,default:{}},value:String,decorations:Array,readonly:{type:Boolean,default:!1},supportBreakpoint:{type:Boolean,default:!1},matches:String},setup(){return{instance:null,instancePromise:null}},emits:["update:value","change","update:decorations"],mounted(){this.instance=Be.create(this.$refs.editor,Ue(pe({},this.editorConfig),{language:this.language,minimap:{enabled:!1},folding:!0,lineDecorationsWidth:this.supportBreakpoint?35:void 0,wordWrap:"on",fontFamily:M.EDITOR_FONT_FAMILY,fontSize:M.EDITOR_FONT_SIZE,fontLigatures:M.FONT_LIGATURES,renderWhitespace:"none",theme:M.THEME,readOnly:this.readonly===!0,value:this.value||"",automaticLayout:!0})),tt(()=>this.language,()=>{be(()=>this.instance.setModel(Be.createModel(this.instance.getModel().getValue(),this.language)))}),this.instance.onDidChangeModelContent(e=>{this.$emit("update:value",this.instance.getValue()),this.$emit("change",e),this.doValidate()}),this.instance.addAction({id:"editor.action.triggerSuggest.extension",label:c("editor.triggerSuggest"),precondition:"!suggestWidgetVisible && !markersNavigationVisible && !parameterHintsVisible && !findWidgetVisible",run:()=>{this.instance.trigger(null,"editor.action.triggerSuggest",{})}}),Xn.registerCommand("editor.action.appendHead",(e,t)=>{var n;((n=this.value)==null?void 0:n.indexOf(t))>-1||(this.instance.executeEdits("command",[{forceMoveMarkers:!0,text:t,range:new ot(1,0,1,0)}]),this.instance.setScrollTop(this.instance.getScrollTop()-22))}),this.instance.addCommand(ut.Alt|gt.US_SLASH,()=>{let e=this.instance.getAction("editor.action.triggerParameterHints"),t=this.instance.getAction("editor.action.triggerSuggest.extension");e.run().then(()=>{setTimeout(()=>{t.isSupported()&&t.run()},0)})},"!findWidgetVisible && !inreferenceSearchEditor && !editorHasSelection"),this.initKeys(),this.initDecorations()},methods:{doValidate(){if(this.instance&&Be.setModelMarkers(this.instance.getModel(),"validate",[{}]),this.language==="magicscript")try{new Yt(new ft(zt(this.instance.getValue()))).parse()}catch(e){if(e.span){let t=e.span.getLine();Be.setModelMarkers(this.instance.getModel(),"validate",[{startLineNumber:t.lineNumber,endLineNumber:t.endLineNumber,startColumn:t.startCol,endColumn:t.endCol,message:e.message,severity:us.Error}])}}},getEditorDom(){return this.$refs.editor},getScrollTop(){return this.instance&&this.instance.getScrollTop()},setScrollTop(e){this.instance&&this.instance.setScrollTop(e)},match(){this.matches&&be(()=>{let e=this.instance.getModel().findMatches(this.matches);e&&e.length>0&&this.instance.setSelections(e.map(({range:t})=>({positionColumn:t.endColumn,positionLineNumber:t.endLineNumber,selectionStartColumn:t.startColumn,selectionStartLineNumber:t.startLineNumber})))})},initKeys(){[["editor.action.triggerParameterHints",ut.Alt|gt.US_SLASH],["editor.action.triggerSuggest",ut.Alt|gt.US_SLASH],["toggleSuggestionDetails",ut.Alt|gt.US_SLASH,ps.deserialize("suggestWidgetVisible && textInputFocus")],["editor.action.formatDocument",ut.CtrlCmd|ut.Alt|gt.KEY_L],["editor.action.marker.nextInFiles",ut.CtrlCmd|gt.F8]].forEach(t=>{var i;let n=t[0];const{handler:a,when:s}=(i=Xn.getCommand(n))!=null?i:{};if(a){let o=ln._coreKeybindings.findIndex(r=>r.command===n);o>0&&ln._coreKeybindings.splice(o,1),this.instance._standaloneKeybindingService.addDynamicKeybinding(n,t[1],a,s||t[2])}}),ln._cachedMergedKeybindings=null},getInstance(){return this.instance},initDecorations(){this.instance.onMouseDown(e=>{if(!e.target.element.classList.contains("codicon")&&e.target.detail&&e.target.detail.offsetX&&e.target.detail.offsetX>=0&&e.target.detail.offsetX<=65){var t=e.target.position.lineNumber;if(this.instance.getModel().getLineContent(t).trim()==="")return;let a=this.instance.getLineDecorations(t).filter(s=>s.options.linesDecorationsClassName==="breakpoints");a&&a.length>0?this.instance.getModel().deltaDecorations([a[0].id],[]):this.instance.getModel().deltaDecorations([],[{range:new ot(t,1,t,1),options:{isWholeLine:!0,linesDecorationsClassName:"breakpoints",className:"breakpoint-line"}}]),this.updateDecoration()}})},appendDecoration(e){const t=this.instance.deltaDecorations([],e);return this.updateDecoration(),t},removedDecorations(e){this.instance.deltaDecorations(e,[]),this.updateDecoration()},updateDecoration(){this.$emit("update:decorations",this.instance.getModel().getAllDecorations())}},watch:{value(e){e!==this.instance.getValue()&&(this.instance.setValue(e||""),this.match())},matches(){this.match()}}},$o={class:"magic-monaco-editor",ref:"editor"};function Bo(e,t,n,a,s,i){return g(),w("div",$o,null,512)}var Fo=q(Uo,[["render",Bo],["__scopeId","data-v-9b3f02a8"]]),Ho=Object.freeze(Object.defineProperty({__proto__:null,default:Fo},Symbol.toStringTag,{value:"Module"}));const jo={props:{max:Number,min:Number,value:Number,direction:String,reverse:{type:Boolean,default:!1}},setup(e){return{style:U({[e.direction==="x"?"width":"height"]:(e.value||e.min)+"px"})}},mounted(){new ResizeObserver(this.updateCss).observe(this.$refs.resizer)},methods:{updateCss(){try{const e=this.$refs.resizer.parentElement;this.$refs.resizer.style.setProperty("--width",e.offsetWidth+"px"),this.$refs.resizer.style.setProperty("--height",e.offsetHeight+"px")}catch{}},mousedown(e){const t=this.direction==="x",n=t?e.clientX:e.clientY,a=e.target.parentElement.getBoundingClientRect();document.onmousemove=s=>{let i=t?a.width:a.height;t?this.reverse?i=n-s.clientX+a.width:i=s.clientX-n+a.width:this.reverse?i=s.clientY-n+a.height:i=n-s.clientY+a.height,i>=this.min&&i<=this.max&&(this.style[t?"width":"height"]=`${i}px`)},document.onmouseup=()=>{document.onmousemove=document.onmouseup=null},e.stopPropagation(),e.preventDefault()}}};function Vo(e,t,n,a,s,i){return g(),w("div",{class:Ee(`magic-resizer-${this.direction}`),style:ze(a.style)},[Ot(e.$slots,"default",{},void 0,!0),A("div",{class:Ee(["magic-resizer-event",{reverse:n.reverse}]),onMousedown:t[0]||(t[0]=(...o)=>i.mousedown&&i.mousedown(...o)),ref:"resizer"},null,34)],6)}var Go=q(jo,[["render",Vo],["__scopeId","data-v-032bc45e"]]),zo=Object.freeze(Object.defineProperty({__proto__:null,default:Go},Symbol.toStringTag,{value:"Module"}));const Yo={class:"magic-navbar-item"},qo={props:{title:String,style:Object,show:{type:Boolean,default:!0},to:HTMLElement},setup(e){return(t,n)=>(g(),w("div",Yo,[Ot(t.$slots,"default",{},void 0,!0)]))}};var Ko=q(qo,[["__scopeId","data-v-30388e35"]]),Wo=Object.freeze(Object.defineProperty({__proto__:null,default:Ko},Symbol.toStringTag,{value:"Module"})),Xo=`/* \u5BFC\u822A\u6761 */\r +.magic-navbar {\r + display: flex;\r + background-color: var(--main-background-color);\r + transition: 0.3s;\r +}\r +\r +.magic-navbar .magic-navbar-body {\r + background-color: var(--navbar-body-background-color);\r + overflow: auto;\r +}\r +.magic-navbar .magic-navbar-header li:hover {\r + background-color: var(--main-hover-background-color);\r +}\r +.magic-navbar .magic-navbar-header li.selected {\r + background-color: var(--main-selected-background-color);\r + color: var(--main-selected-color);\r +}\r +.magic-navbar .magic-navbar-header li.selected svg text{\r + fill: var(--main-selected-color);\r +}\r +.magic-navbar .magic-navbar-header li svg text{\r + letter-spacing: 0px;\r + font-size: 10px;\r +}\r +/* \u5782\u76F4\u5BFC\u822A\u6761 */\r +.magic-navbar__vertical.reverse {\r + flex-direction: row-reverse;\r +}\r +.magic-navbar__vertical .magic-navbar-header li {\r + display: flex;\r + flex-direction: column;\r + align-items: center;\r + overflow: hidden;\r + padding: 8px 3px;\r + cursor: pointer;\r + border-bottom: 1px solid var(--main-border-color);\r +}\r +.magic-navbar__vertical .magic-navbar-header {\r + width: 22px;\r + height: 100%;\r + letter-spacing: 2px;\r + text-align: center;\r + padding: 0;\r + border-right: 1px solid var(--main-border-color);\r +}\r +.magic-navbar__vertical.reverse .magic-navbar-header {\r + border-left: 1px solid var(--main-border-color);\r + border-right: none;\r +}\r +.magic-navbar__vertical.reverse .magic-navbar-header li {\r + display: flex;\r + flex-direction: column-reverse;\r +}\r +\r +.magic-navbar__vertical .magic-navbar-header li {\r + line-height: 14px;\r + word-break: break-all;\r +}\r +\r +.magic-navbar__vertical .magic-navbar-body {\r + flex: 1;\r +}\r +.magic-navbar__vertical .magic-navbar-body {\r + border-right: 1px solid var(--navbar-body-border-color);\r +}\r +.magic-navbar__vertical.reverse .magic-navbar-body {\r + border-left: 1px solid var(--navbar-body-border-color);\r + border-right: none;\r +}\r +\r +/* \u6C34\u5E73\u5BFC\u822A\u6761 */\r +.magic-navbar__horizontal > ul {\r + width: 100%;\r +}\r +.magic-navbar__horizontal > ul li {\r + display: inline-flex;\r + flex-direction: row-reverse;\r + padding: 0 8px;\r + height: 24px;\r + line-height: 24px;\r + cursor: pointer;\r + color: var(--main-color);\r +}\r +.magic-navbar__horizontal > ul li svg.magic-icon {\r + height: 100%;\r + margin-right: 4px;\r +}\r +.magic-navbar__horizontal > ul {\r + border-top: 1px solid var(--main-border-color);\r +}\r +.magic-navbar.magic-navbar__vertical .magic-navbar-title{\r + padding-bottom: 4px;\r +}\r +.magic-navbar.magic-navbar__vertical.reverse .magic-navbar-title{\r + padding-top: 4px;\r + padding-bottom: 0px;\r +}\r +`,Jo=Object.freeze(Object.defineProperty({__proto__:null,default:Xo},Symbol.toStringTag,{value:"Module"}));const Qo={"aria-hidden":"true",class:"magic-icon"},Zo=["xlink:href"],er={props:{prefix:{type:String,default:"magic-icon"},icon:String,size:String},setup(e){const t=e,n=me(()=>t.icon&&t.icon.startsWith("#")?t.icon:`#${t.prefix}-${t.icon}`),a=me(()=>t.icon&&t.icon.startsWith("#")?t.icon.substring(1):`${t.prefix}-${t.icon}`);return(s,i)=>(g(),w("svg",Qo,[A("use",{"xlink:href":h(n),class:Ee(h(a))},null,10,Zo)]))}};var Vn=q(er,[["__scopeId","data-v-15383e92"]]),tr=Object.freeze(Object.defineProperty({__proto__:null,default:Vn},Symbol.toStringTag,{value:"Module"}));var nr={props:{direction:{type:String,default:""},reverse:{type:Boolean,default:!1},defaultSelect:{type:Number,default:0},allowClose:{type:Boolean,default:!0},spliter:Boolean,value:Array,to:HTMLElement},setup(e,t){const n=U(e.defaultSelect);return{slots:me(()=>t.slots.default()[0].children),navbars:me(()=>t.slots.default()[0].children.flatMap(a=>a.props)),selectIndex:n}},methods:{select(e){this.selectIndex=e}},render(){const e=a=>{const s=parseInt(Math.random()*1e8),i=a.length*6;return le("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:22,height:i},[le("defs",le("path",{id:`path-text-${s}`,d:this.reverse?`M6,0 L6,${i}`:`M14,${i} L14,0`})),le("text",{fill:"var(--main-color)"},le("textPath",{"xlink:href":`#path-text-${s}`},a))])},t=a=>{if(this.spliter&&this.direction==="vertical"&&a.match(/\w/g)){const s=[];let i="",o=1,r;const l=a.split("");for(let u=0,p=l.length;u{const i=[le("div",{class:"magic-navbar-title"},[...t(a.title)])];a.icon&&i.push(le(Vn,{icon:a.icon}));const o=a.style||{};return a.show===!1&&(o.display="none"),le("li",{class:this.selectIndex===s?"selected":"",style:o,onClick:()=>{this.selectIndex===s&&this.allowClose?this.selectIndex=-1:this.selectIndex=s}},i)}))];return this.slots.forEach((a,s)=>{const i=s!==this.selectIndex||a.props.show===!1?{display:"none"}:{};this.to?n.push(le(ha,{to:this.to},le("div",{class:"magic-navbar-body",style:i},a))):n.push(le("div",{class:"magic-navbar-body",style:i},a))}),le("div",{class:`magic-navbar magic-navbar__${this.direction}`+(this.reverse?" reverse":"")},n)}},ar=Object.freeze(Object.defineProperty({__proto__:null,default:nr},Symbol.toStringTag,{value:"Module"})),sr=`.magic-tab {\r + width: 100%;\r + overflow: hidden;\r + flex-wrap: nowrap;\r + white-space: nowrap;\r + transition: 0.3s;\r +}\r +.magic-tab ul {\r + overflow-x: auto;\r +}\r +.magic-tab ul li {\r + display: inline-block;\r + cursor: pointer;\r + padding: 0 10px;\r + height: 24px;\r + line-height: 24px;\r +}\r +.magic-tab ul li.selected,\r +.magic-tab ul li:hover,\r +.magic-tab.magic-script-tab ul li.selected:hover,\r +.magic-tab ul li.draggable-target-item {\r + background-color: var(--main-hover-background-color);\r +}\r +.magic-tab.magic-script-tab {\r + border-bottom: 1px solid var(--main-border-color);\r + height: 30px;\r + position: absolute;\r +}\r +.magic-tab.magic-script-tab ul li {\r + height: 30px;\r + line-height: 30px;\r + border-bottom: 3px solid transparent;\r +}\r +.magic-tab.magic-script-tab ul li.selected {\r + border-bottom-color: #4083c9;\r + background-color: var(--tab-selected-background-color);\r +}\r +`,ir=Object.freeze(Object.defineProperty({__proto__:null,default:sr},Symbol.toStringTag,{value:"Module"}));var or={props:{tabs:Array,className:String,value:Object,allowClose:{type:Boolean}},emits:["update:value","change","close","item-contextmenu","before-change"],setup(e){const t=U({}),n=U({});function a(o,r,l){switch(l){case"dragstart":t.value=o,r.stopPropagation();break;case"dragenter":n.value=o,r.stopPropagation();break;case"dragend":if(t.value!==n.value){const u=e.tabs.indexOf(t.value),p=e.tabs.indexOf(n.value);e.tabs.splice(u,1),e.tabs.splice(p,0,t.value)}n.value={},r.stopPropagation();break;case"dragover":t.value!==n.value&&r.preventDefault();break}}const s=U({});function i(o){let r=o.wheelDelta||o.detail;s.value.value.el.scrollLeft+=r>0?-100:100}return{selectIndex:U(0),draggableItem:t,draggableTargetItem:n,tabDraggable:a,scrollbar:s,scrollbarHandler:i,scrollId:"",scrollItem:U(null)}},mounted(){be(()=>{this.scrollbar.value.el.addEventListener("DOMMouseScroll",this.scrollbarHandler,!1),this.scrollbar.value.el.addEventListener("mousewheel",this.scrollbarHandler,!1)})},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+parseInt(Math.random()*1e7),this.scrollItem=e,be(()=>{const t=document.querySelector("#"+this.scrollId);t&&t.scrollIntoView(!0)})}},destroyed(){be(()=>{this.scrollbar.value.el.removeEventListener("DOMMouseScroll",this.scrollbarHandler),this.scrollbar.value.el.removeEventListener("mousewheel",this.scrollbarHandler)})},render(){const e=this.tabs&&le("ul",this.tabs.map((t,n)=>{const a=[this.$slots.default({tab:t})];return this.allowClose&&a.push(le(Vn,{icon:"close",size:"12px",style:{marginLeft:"5px"},onClick:s=>{this.$emit("close",t),s.stopPropagation(),s.preventDefault()}})),le("li",{class:[this.value===t?"selected":"",t===this.draggableTargetItem?"draggable-target-item":""],id:this.scrollItem===t||this.scrollItem===t.id?this.scrollId:void 0,onClick:s=>{this.value!==t&&(this.$emit("before-change",this.value),this.$emit("update:value",t),this.$emit("change",t)),s.stopPropagation(),s.preventDefault()},onMousedown:s=>{s.which===2&&this.allowClose&&this.$emit("close",t)},onContextmenu:s=>{this.$emit("item-contextmenu",s,t,n),s.preventDefault()},draggable:!0,onDragenter:s=>this.tabDraggable(t,s,"dragenter"),onDragstart:s=>this.tabDraggable(t,s,"dragstart"),onDragend:s=>this.tabDraggable(t,s,"dragend"),onDragover:s=>this.tabDraggable(t,s,"dragover")},a)}));return this.scrollbar.value=e,le("div",{class:"magic-tab none-select"+(this.className?" "+this.className:"")},e)}},rr=Object.freeze(Object.defineProperty({__proto__:null,default:or},Symbol.toStringTag,{value:"Module"}));const lr={class:"magic-table-row"},Fa={props:{title:String,row:Object,flex:String,width:String,align:String},setup(e){return(t,n)=>(g(),w("div",lr,[Ot(t.$slots,"default",{row:e.row})]))}};var cr=Object.freeze(Object.defineProperty({__proto__:null,default:Fa},Symbol.toStringTag,{value:"Module"})),ur=`/* \u8868\u683C */\r +.magic-table{\r + display: flex;\r + flex-direction: column;\r + box-sizing: border-box;\r +}\r +.magic-table .magic-table-body{\r + flex: 1;\r + overflow: auto;\r +}\r +.magic-table .magic-table-header,\r +.magic-table .magic-table-body .magic-table-row {\r + display: flex;\r + height: 24px;\r + line-height: 24px;\r + border-bottom: 1px solid var(--main-border-color);\r +}\r +.magic-table .magic-table-body .magic-table-row:hover{\r + background-color: var(--main-hover-background-color);\r +}\r +.magic-table .magic-table-column {\r + flex: 1;\r + display: inline-flex;\r +}\r +\r +.magic-table .magic-table-column span:last-child{\r + flex: 1;\r + overflow: hidden;\r + text-overflow: ellipsis;\r + width: 0px;\r + white-space: pre;\r +}\r +\r +.magic-table .magic-table-column .magic-select{\r + width: 100%;\r +}\r +.magic-table__border .magic-table-body .magic-table-row{\r + border-bottom: 1px solid var(--table-border-color);\r +}\r +.magic-table__border .magic-table-column:not(:last-child){\r + border-right: 1px solid var(--table-border-color);\r +}`,pr=Object.freeze(Object.defineProperty({__proto__:null,default:ur},Symbol.toStringTag,{value:"Module"}));var dr={props:{data:{type:Array,default:[]},width:String,border:{type:Boolean,default:!1},align:{type:String,default:"center"}},emits:["clickRow","contextmenu","loadNext"],render(){const e=this.$slots.default(),t=n=>{n=n||{};let a=[];if(n.width){let s=`width: ${n.width}`;!n.width.endsWith("%")&&!isNaN(n.width)&&(s+="px"),a.push(s),a.push("flex:none")}else n.flex&&a.push(`flex: ${n.flex}`);return(n.align||this.align)&&a.push(`justify-content: ${n.align||this.align};text-align: ${n.align||this.align}`),a.join(";")};return le("div",{class:"magic-table"+(this.border?" magic-table__border":"")},[le("div",{class:"magic-table-header none-select"},e.map(n=>le("div",{class:"magic-table-column",title:n.props.title,style:t(n.props)},le("span",n.props.title)))),le("div",{class:"magic-table-body",onScroll:n=>{n.target.scrollTop+n.target.offsetHeight+40>=n.target.scrollHeight&&this.$emit("loadNext")}},this.data.map((n,a)=>le(Fa,{row:n,onClick:()=>{this.$emit("clickRow",a)}},{default:()=>e.map(s=>le("div",{class:"magic-table-column",onContextmenu:i=>{this.$emit("contextmenu",i,n),i.stopPropagation(),i.preventDefault()},style:t(s.props)},s.children.default({row:n})))})))])}},_r=Object.freeze(Object.defineProperty({__proto__:null,default:dr},Symbol.toStringTag,{value:"Module"})),hr=`/* \u6811\u5F62\u83DC\u5355 */\r +.magic-tree{\r + position: relative;\r + overflow: auto;\r +}\r +.magic-tree > ul {\r + position: absolute;\r + top: 0;\r + left: 0;\r +}\r +.magic-tree .magic-tree-item {\r + height: 20px;\r + line-height: 20px;\r + transition: 0.3s;\r + word-break: break-all;\r + white-space: nowrap;\r + /* display: inline-flex;\r + min-width: 100%; */\r +}\r +.magic-tree .magic-tree-item:hover,\r +.magic-tree .magic-tree-item.selected,\r +.magic-tree .magic-tree-item.draggable-target-item {\r + background-color: var(--tree-hover-background-color);\r +}\r +.magic-tree .magic-tree-item .magic-icon {\r + fill: var(--tree-icon-color);\r + margin-right: 2px\r +}\r +.magic-tree ul {\r + max-height: 99999px;\r + min-width: 100%;\r +}\r +.magic-tree li{\r + /* min-width: 100%; */\r + white-space: nowrap;\r + word-break: break-all;\r +}\r +.magic-tree .hide {\r + opacity: 0;\r + max-height: 0;\r + position: relative;\r + /* transition: 0.2s display ease1s; */\r +}\r +.magic-tree svg:not(.root) .magic-icon-datasource{\r + fill: #089910;\r +}\r +`,fr=Object.freeze(Object.defineProperty({__proto__:null,default:hr},Symbol.toStringTag,{value:"Module"}));var mr={props:{data:Array,sort:Boolean,descending:Boolean,filter:String,filterText:Function,selected:Object,draggable:{type:Boolean,default:!1},onMove:{type:Function,defeault:()=>new Promise(e=>e(!0))}},emits:["drag","contextmenu","onMove","itemClick"],setup(e,t){const n=t.emit,a=Je({item:{},itemParent:{},target:{},targetParent:{}});function s(i,o,r,l){function u(){return!(a.item===a.target||a.itemParent===a.target||!a.target.folder&&a.itemParent===a.targetParent)}switch(l){case"dragstart":a.item=o,a.itemParent=i,r.stopPropagation();break;case"dragenter":a.target=o,a.targetParent=i,r.stopPropagation();break;case"dragover":u()&&r.preventDefault();break;case"dragend":if(!u())break;e.onMove(o,a.target||a.targetParent).then(p=>{if(p){const m=a.itemParent||{children:e.data};m.children.splice(m.children.indexOf(o),1),a.target.folder?(a.target.children=a.target.children||[],a.target.children.push(a.item)):(a.targetParent.children=a.targetParent.children||[],a.targetParent.children.push(a.item)),e.sort&&Nt(a.target.folder?a.target.children:a.targetParent.children,e.descending,"name"),a.target={},a.targetParent={}}}),r.stopPropagation();break}n("drag",l,a,r)}return e.sort&&(Nt(e.data,e.descending,"name","children"),tt(()=>e.data,i=>{Nt(e.data,e.descending,"name","children")}),tt(()=>e.descending,i=>{Nt(e.data,e.descending,"name","children")})),{draggableItem:a,itemDraggable:s}},data(){return{scrollId:"",scrollItem:U(null)}},methods:{scrollIntoView(e){this.scrollId="s"+new Date().getTime()+parseInt(Math.random()*1e7),this.scrollItem=e;const t=n=>{let a=!1;for(const s in n){const i=n[s];if(a=i===e){i.opened!==void 0&&(i.opened=!0);break}else if(i.children&&i.children.length>0&&(a=t(i.children))){i.opened=!0;break}}return a};t(this.data)&&be(()=>{const n=document.querySelector("#"+this.scrollId);n&&n.scrollIntoView(!0)})}},render(){const e=n=>this.filter?this.filterText(je(n)).indexOf(this.filter)>-1||n.children&&n.children.some(a=>e(a)):!0,t=(n,a,s)=>{const i=s>0?{paddingLeft:`${s*17}px`}:{};return e(a)&&le("li",{onDblclick:o=>{a.folder&&(a.opened=!a.opened),o.stopPropagation(),o.preventDefault()},onClick:o=>{this.$emit("itemClick",a),o.stopPropagation(),o.preventDefault()},onContextmenu:o=>{this.$emit("contextmenu",a,o),o.stopPropagation(),o.preventDefault()},draggable:this.draggable,onDragenter:o=>this.itemDraggable(n,a,o,"dragenter"),onDragstart:o=>this.itemDraggable(n,a,o,"dragstart"),onDragend:o=>this.itemDraggable(n,a,o,"dragend"),onDragover:o=>this.itemDraggable(n,a,o,"dragover")},[le("div",{class:["magic-tree-item",a===this.draggableItem.target?"draggable-target-item":"",a===this.selected?"selected":""],style:i,id:this.scrollItem===a||this.scrollItem===a.id?this.scrollId:void 0},a.folder?this.$slots.folder({item:a}):this.$slots.file({item:a})),a.folder&&a.opened&&le("ul",{class:a.opened&&"opened"||"hide"},a.children&&a.children.map(o=>t(a,o,s+1)))])};return le("div",{class:"magic-tree none-select"},le("ul",{},this.data&&this.data.map(n=>t(null,n,0))))}},gr=Object.freeze(Object.defineProperty({__proto__:null,default:mr},Symbol.toStringTag,{value:"Module"}));const vr=["onMousedown"],Er={props:{value:{type:Boolean,default:!0},className:String,showClose:{type:Boolean,default:!0},shade:{type:Boolean,default:!0},padding:{type:String,default:"5px 10px"},height:{type:String,default:"auto"},width:{type:String,default:"auto"},moveable:{type:Boolean,default:!0},overflow:{type:String,default:"auto"},top:String,maxHeight:String,maxWidth:String,contentHeight:String,title:String,content:String,onClose:Function},emits:["update:value","onClose"],setup(e,{expose:t,emit:n}){const a=e,s=U(a.top||"auto"),i=U("auto"),o=U("relative"),r=U(null);function l(){n("update:value",!1)}const u=()=>{n("close"),typeof a.onClose=="function"&&a.onClose(),l()};let p,m=!1,f,y;function E(R){a.moveable&&(p=R,f=R.target.parentNode.getBoundingClientRect(),y=document.getElementsByClassName("magic-editor")[0].getBoundingClientRect(),m=!0)}function C(R){if(a.moveable&&m){let D=Math.min(Math.max(f.top+(R.pageY-p.pageY),y.y),y.y+y.height-f.height),L=Math.min(Math.max(f.left+(R.pageX-p.pageX),y.x),y.x+y.width-f.width);s.value=D+"px",i.value=L+"px",o.value="absolute"}}let I=!1;const O=()=>{!I&&r.value&&(o.value="absolute",i.value=r.value.getBoundingClientRect().x+"px"),I=!0};a.top&&Ja(O);const v=R=>{a.showClose&&R.keyCode===27&&u()};function T(R){m=!1}return t({close:u}),(R,D)=>{const L=b("magic-icon");return e.value?(g(),j(ha,{key:0,to:".magic-editor"},[A("div",{class:Ee(["magic-dialog",(e.shade?"magic-dialog__shade":"")+(e.className?" "+e.className:"")]),tabindex:"1",onMousemove:C,onMouseup:T,onKeydown:v},[A("div",{class:"magic-dialog-main",style:ze({position:o.value,top:s.value,left:i.value,width:e.width,height:e.height,"max-width":e.maxWidth}),ref_key:"dialog",ref:r},[A("div",{class:Ee(["magic-dialog-header none-select",{moveable:e.moveable}]),onMousedown:E},[_e(B(e.title)+" ",1),e.showClose?(g(),w("span",{key:0,onMousedown:Se(u,["stop"])},[_(L,{icon:"close"})],40,vr)):X("",!0)],34),A("div",{class:"magic-dialog-body",style:ze({padding:e.padding,"max-height":e.maxHeight,height:e.contentHeight,overflow:e.overflow})},[e.content?(g(),w(Z,{key:0},[_e(B(e.content),1)],64)):Ot(R.$slots,"default",{key:1},void 0,!0)],4)],4)],34)])):X("",!0)}}};var br=q(Er,[["__scopeId","data-v-3e8f0d71"]]),yr=Object.freeze(Object.defineProperty({__proto__:null,default:br},Symbol.toStringTag,{value:"Module"}));const Tr={class:"magic-notify"},Sr=["onClick"],Or=["innerHTML"],xr=["innerHTML"],Rr={setup(e){const t={error:'',warning:'',info:''},n=Je([]),a=i=>{const o=n.findIndex(r=>i.id===r.id);return o>-1&&n.splice(o,1),!0},s=i=>{i.icon=t[i.icon]||t.info,i.id=parseInt(Math.random()*1e7),n.push(i),i.duration&&setTimeout(()=>a(i),parseInt(i.duration))};return S.$on(F.NOTIFY,s),(i,o)=>{const r=b("magic-icon"),l=b("magic-button"),u=b("magic-button-group");return g(),w("div",Tr,[(g(!0),w(Z,null,he(h(n),(p,m)=>(g(),w("div",{class:"magic-notify-item",key:m},[A("div",{class:"close",onClick:f=>a(p)},[_(r,{icon:"close"})],8,Sr),A("h3",null,[(g(),w("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",innerHTML:p.icon},null,8,Or)),_e(B(p.title),1)]),A("p",{innerHTML:p.content},null,8,xr),p.buttons?(g(),j(u,{key:0},{default:k(()=>[(g(!0),w(Z,null,he(p.buttons,(f,y)=>(g(),j(l,{key:y,value:f.title,type:"link",onClick:()=>a(p)&&f.onClick()},null,8,["value","onClick"]))),128))]),_:2},1024)):X("",!0)]))),128))])}}};var Ar=q(Rr,[["__scopeId","data-v-11ebc230"]]),Ir=Object.freeze(Object.defineProperty({__proto__:null,default:Ar},Symbol.toStringTag,{value:"Module"}));const Cr={props:{align:{type:String,default:"left"}},setup(e){return(t,n)=>(g(),w("div",{class:Ee(["magic-button-group",e.align])},[Ot(t.$slots,"default",{},void 0,!0)],2))}};var Lr=q(Cr,[["__scopeId","data-v-70c60ab6"]]),Nr=Object.freeze(Object.defineProperty({__proto__:null,default:Lr},Symbol.toStringTag,{value:"Module"}));const wr={props:{value:String,type:String},setup(e){return(t,n)=>(g(),w("button",{onClick:n[0]||(n[0]=Se(a=>t.$emit("onClick"),["stop"])),class:Ee(["magic-button",e.type]),type:"button"},B(e.value),3))}};var kr=q(wr,[["__scopeId","data-v-2e4c463a"]]),Dr=Object.freeze(Object.defineProperty({__proto__:null,default:kr},Symbol.toStringTag,{value:"Module"}));const Mr=["checked"],Pr={props:{value:{type:[Number,Boolean],default:()=>!1},checkedHalf:{type:Boolean,default:!1}},setup(e){const t=new Date().getTime()+""+Math.floor(Math.random()*1e3);return(n,a)=>(g(),w("div",{class:"magic-checkbox",onClick:a[1]||(a[1]=Se(s=>n.$emit("click",s),["stop"]))},[A("input",{id:t,ref:"checkbox",type:"checkbox",onChange:a[0]||(a[0]=()=>{n.$emit("update:value",n.$refs.checkbox.checked),n.$emit("change",n.$refs.checkbox.checked)}),checked:e.value},null,40,Mr),A("label",{for:t,class:Ee({checkedHalf:e.checkedHalf&&e.value})},null,2)]))}};var Ur=q(Pr,[["__scopeId","data-v-22b807f1"]]),$r=Object.freeze(Object.defineProperty({__proto__:null,default:Ur},Symbol.toStringTag,{value:"Module"}));const Br={class:"magic-file"},Fr=["accept","multiple"],Hr={props:{value:[Object,String],placeholder:{type:String,default:c("message.chooseFile")},accept:String,multiple:{type:Boolean,default:!1},border:{type:Boolean,default:!0}},emits:["update:value"],setup(e,{emit:t}){const n=e,a=U(null),s=U(null),i=()=>{a.value.files[0]&&(s.value=Array.from(a.value.files).map(o=>o.name).join(",")),t("update:value",n.multiple?a.value.files:a.value.files[0])};return(o,r)=>{const l=b("magic-input"),u=b("magic-icon");return g(),w("div",Br,[A("input",{type:"file",style:{display:"none"},ref_key:"file",ref:a,onChange:i,accept:e.accept,multiple:e.multiple},null,40,Fr),_(l,{readonly:!0,style:{width:"100%"},placeholder:e.placeholder,onClick:()=>o.$refs.file.click(),value:s.value,border:e.border},null,8,["placeholder","onClick","value","border"]),_(u,{icon:"upload"})])}}};var jr=q(Hr,[["__scopeId","data-v-62524fc2"]]),Vr=Object.freeze(Object.defineProperty({__proto__:null,default:jr},Symbol.toStringTag,{value:"Module"}));const Gr=["value","placeholder","readonly","type","autocomplete"],zr={props:{value:[String,Number,Object],placeholder:String,defaultValue:[String,Number,Object],readonly:{type:Boolean,default:!1},type:{type:String,default:"text"},width:{type:String,default:"100%"},border:{type:Boolean,default:!0},onEnter:{type:Function,default:()=>{}}},emits:["update:value"],setup(e,{emit:t}){const n=e,a=Qa(()=>n.type==="password"?"new-password":null);!n.value&&n.defaultValue&&t("update:value",n.defaultValue);const s={width:n.width};return(i,o)=>(g(),w("input",{class:Ee(["magic-input",{"magic-input__border":e.border}]),value:e.value,placeholder:e.placeholder,readonly:e.readonly,style:s,type:e.type,onInput:o[0]||(o[0]=r=>i.$emit("update:value",r.target.value)),autocomplete:h(a),onKeypress:o[1]||(o[1]=Za(Se((...r)=>e.onEnter&&e.onEnter(...r),["stop"]),["enter"]))},null,42,Gr))}};var Yr=q(zr,[["__scopeId","data-v-f43ad66a"]]),qr=Object.freeze(Object.defineProperty({__proto__:null,default:Yr},Symbol.toStringTag,{value:"Module"}));const Kr={key:0},Wr=["placeholder"],Xr=["onClick"],Jr={props:{value:[Object,String,Number],options:Array,defaultSelect:[Object,String,Number],width:String,border:{type:Boolean,default:!0},placeholder:String,inputable:{type:Boolean,default:!1}},emits:["update:value","select"],setup(e,{emit:t}){const n=e;document.body.addEventListener("click",()=>s.value=!1);const a=U("-2px"),s=U(!1),i=U("auto"),o=U("0px"),r=me(()=>{const f=n.options.find(y=>y.value===n.value)||n.options.find(y=>y.value===n.defaultSelect);return f&&f.text||""}),l=f=>{t("update:value",f),t("select",f),s.value=!1},u=se("ELEMENT_ROOT"),p=(f,y)=>y+f.scrollTop>0?f.scrollTop:f.parentElement?p(f.parentElement,y+f.scrollTop):f.scrollTop,m=(f,y)=>{a.value=-p(f,0)-1+"px",s.value=!0,be(()=>{o.value=-(window.pageXOffset+1)+"px",i.value=f.clientWidth+"px";let E=y.offsetHeight;y.offsetTop+E+20>u.value.offsetTop+u.value.offsetHeight&&(a.value=-(E+f.offsetHeight)+"px")})};return(f,y)=>{const E=b("magic-icon");return g(),w("div",{class:Ee([{inputable:e.inputable,border:e.border},"magic-select not-select"]),style:ze({width:e.width}),onClick:y[2]||(y[2]=Se(C=>m(f.$refs.container,f.$refs.selectList),["stop"])),ref:"container"},[e.inputable?X("",!0):(g(),w("span",Kr,B(h(r)),1)),e.inputable?yt((g(),w("input",{key:1,ref:"input","onUpdate:modelValue":y[0]||(y[0]=C=>fa(value)?value.value=C:null),autocomplete:"off",type:"text",onInput:y[1]||(y[1]=C=>l(C.target.value)),placeholder:e.placeholder},null,40,Wr)),[[es,e.value]]):X("",!0),yt(A("ul",{style:ze({width:i.value,marginTop:a.value,marginLeft:o.value}),ref:"selectList"},[(g(!0),w(Z,null,he(e.options,C=>(g(),w("li",{key:C.value,onClick:Se(I=>l(C.value),["stop"])},B(C.text),9,Xr))),128))],4),[[$t,s.value]]),_(E,{icon:"arrow-bottom"})],6)}}};var Qr=q(Jr,[["__scopeId","data-v-249fb96c"]]),Zr=Object.freeze(Object.defineProperty({__proto__:null,default:Qr},Symbol.toStringTag,{value:"Module"}));const el=["placeholder","value"],tl={props:{value:String,placeholder:String},setup(e){return(t,n)=>(g(),w("textarea",{class:"magic-textarea",placeholder:e.placeholder,value:e.value,onInput:n[0]||(n[0]=a=>t.$emit("update:value",a.target.value))},null,40,el))}};var nl=q(tl,[["__scopeId","data-v-ca6693f6"]]),al=Object.freeze(Object.defineProperty({__proto__:null,default:nl},Symbol.toStringTag,{value:"Module"}));const sl={props:{users:Array,max:Number,size:{type:Number,default:22}},setup(e){const t=e,n=me(()=>({height:t.size+"px",lineHeight:t.size+"px"})),a=me(()=>t.users.slice(0,t.max||t.users.length));return(s,i)=>{const o=b("magic-avatar");return t.users&&t.users.length>0?(g(),w("div",{key:0,class:"magic-avatar-group",style:ze(h(n))},[(g(!0),w(Z,null,he(h(a),(r,l)=>(g(),j(o,{key:l,user:r,size:e.size},null,8,["user","size"]))),128)),t.users.length>h(a).length?(g(),j(o,{key:0,text:`${e.max}+`,size:e.size},null,8,["text","size"])):X("",!0)],4)):X("",!0)}}};var il=q(sl,[["__scopeId","data-v-511f7f80"]]),ol=Object.freeze(Object.defineProperty({__proto__:null,default:il},Symbol.toStringTag,{value:"Module"}));const rl=["title"],ll={props:{user:Object,text:String,size:{type:Number,default:22}},setup(e){const t=e,n=["#1abc9c","#2ecc71","#3498db","#9b59b6","#16a085","#27ae60","#2980b9","#8e44ad","#f1c40f","#e67e22","#e74c3c","#eca0f1","#95a5a6","#f39c12","#d35400","#c0392b","#bdc3c7","#7f8c8d"],a=me(()=>({width:t.size+"px",height:t.size+"px",lineHeight:t.size+"px",borderRadius:t.size/2+"px",backgroundColor:t.text&&"#bdc3c7"||n[oi(`${t.user.cid}`)%n.length]})),s=me(()=>t.text||t.user.username.substring(0,1)),i=me(()=>t.user?`${c("message.username")}\uFF1A${t.user.username} +IP\uFF1A${t.user.ip||"unknown"}`:void 0);return(o,r)=>(g(),w("div",{class:"magic-avatar",style:ze(h(a)),title:h(i)},B(h(s)),13,rl))}};var cl=q(ll,[["__scopeId","data-v-73f02f44"]]),ul=Object.freeze(Object.defineProperty({__proto__:null,default:cl},Symbol.toStringTag,{value:"Module"}));const pl=["width"],dl=["x","fill"],_l={props:{icon:String|Array},setup(e){const t=e,n={GET:"#0cbb52",POST:"#FFB400",DELETE:["DEL","#EB2013"],PUT:"#097BED",function:["Fn","#9012FE"]},a=me(()=>{let s=t.icon,i=Array.isArray(s);i||(s=n[t.icon],i=s!==void 0&&Array.isArray(s));const o=i?s[0]:t.icon,r=o.length*9,l=i?s[1]:s||"var(--main-icon-color)";return{width:r,color:l,text:o}});return(s,i)=>(g(),w("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",width:h(a).width,height:"12","font-size":"10","font-weight":"bolder","font-family":"inherit"},[A("text",{x:h(a).width/2,y:"8",fill:h(a).color,style:{"dominant-baseline":"middle","text-anchor":"middle"}},B(h(a).text),9,dl)],8,pl))}};var hl=Object.freeze(Object.defineProperty({__proto__:null,default:_l},Symbol.toStringTag,{value:"Module"}));const fl={props:{opened:Object},setup(e){const t=[{title:"Json",icon:"json",component:te("magic-api-request-body")},{title:c("message.view"),icon:"structure",component:te("magic-api-request-structure")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),j(i,{spliter:!0,direction:"vertical","allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,dt({key:r},o),{default:k(()=>[(g(),j(te(o.component)))]),_:2},1040)),64))]),_:1})}}};var ml=q(fl,[["__scopeId","data-v-41b9c04c"]]),gl=Object.freeze(Object.defineProperty({__proto__:null,default:ml},Symbol.toStringTag,{value:"Module"}));const vl={setup(e){const t=se("info");return(n,a)=>{const s=b("magic-textarea");return g(),j(s,{value:h(t).description,"onUpdate:value":a[0]||(a[0]=i=>h(t).description=i)},null,8,["value"])}}};var El=Object.freeze(Object.defineProperty({__proto__:null,default:vl},Symbol.toStringTag,{value:"Module"}));const bl={class:"magic-api-group"},yl={setup(e){const t=se("info"),n=[{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.groupOption"),component:te("magic-api-option")}],a=()=>{const s=t.value;z.sendJson("/resource/folder/save",{id:s.id,name:s.name,parentId:s.parentId,type:s.type,path:s.path,paths:s.paths,options:s.options})};return(s,i)=>{const o=b("magic-input"),r=b("magic-button"),l=b("magic-navbar-item"),u=b("magic-navbar");return g(),w(Z,null,[A("div",bl,[A("form",null,[A("label",null,B(h(c)("resource.form.groupName")),1),_(o,{value:h(t).name,"onUpdate:value":i[0]||(i[0]=p=>h(t).name=p),placeholder:h(c)("resource.form.placeholder.name",h(c)("api.name")),width:"250px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("resource.form.groupPath")),1),_(o,{value:h(t).path,"onUpdate:value":i[1]||(i[1]=p=>h(t).path=p),placeholder:h(c)("resource.form.placeholder.path",h(c)("api.name")),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"]),_(r,{value:h(c)("message.save"),onOnClick:a},null,8,["value"])])]),_(u,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(p,m)=>_(l,dt({key:m},p),{default:k(()=>[(g(),j(te(p.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Tl=q(yl,[["__scopeId","data-v-07a9bc9f"]]),Sl=Object.freeze(Object.defineProperty({__proto__:null,default:Tl},Symbol.toStringTag,{value:"Module"}));const Ol={class:"magic-panel-api"},xl={setup(e){const t=se("info"),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),r=b("magic-table-column"),l=b("magic-input"),u=b("magic-select"),p=b("magic-table");return g(),w("div",Ol,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=m=>n.value=m),value:h(t).headers},null,8,["index","value"]),_(p,{data:h(t).headers,border:"",onClickRow:s[1]||(s[1]=m=>n.value=m),align:"center"},{default:k(()=>[_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:m})=>[_(o,{value:m.required,"onUpdate:value":f=>m.required=f},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Key"},{default:k(({row:m})=>[_(l,{value:m.name,"onUpdate:value":f=>m.name=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:m})=>[_(l,{value:m.value,"onUpdate:value":f=>m.value=f,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:m})=>[_(u,{options:a.$REQUEST_SIMPLE_TYPES,value:m.dataType,"onUpdate:value":f=>m.dataType=f,"default-select":a.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:m})=>[_(l,{value:m.defaultValue,"onUpdate:value":f=>m.defaultValue=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:m})=>[_(u,{options:a.$VALIDATE_TYPES,value:m.validateType,"onUpdate:value":f=>m.validateType=f,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:m})=>[_(l,{value:m.expression,"onUpdate:value":f=>m.expression=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:m})=>[_(l,{value:m.error,"onUpdate:value":f=>m.error=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:m})=>[_(l,{value:m.description,"onUpdate:value":f=>m.description=f,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Rl=Object.freeze(Object.defineProperty({__proto__:null,default:xl},Symbol.toStringTag,{value:"Module"}));const Al={class:"magic-api-info"},Il={setup(e){const t=se("info"),n=[{title:c("api.navbars.parameter"),component:te("magic-api-parameter")},{title:c("api.navbars.header"),component:te("magic-api-header")},{title:c("api.navbars.path"),component:te("magic-api-path")},{title:c("api.navbars.body"),component:te("magic-api-body")},{title:c("api.navbars.option"),component:te("magic-api-option")},{title:c("api.navbars.description"),component:te("magic-api-description")}];return(a,s)=>{const i=b("magic-select"),o=b("magic-input"),r=b("magic-navbar-item"),l=b("magic-navbar");return g(),w(Z,null,[A("div",Al,[A("form",null,[A("label",null,B(h(c)("api.form.method")),1),_(i,{width:"100px",options:a.$REQUEST_METHODS,"default-select":a.$DEFAULT_REQUEST_METHOD,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),A("label",null,B(h(c)("api.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("api.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("api.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("api.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(l,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(u,p)=>_(r,dt({key:p},u),{default:k(()=>[(g(),j(te(u.component)))]),_:2},1040)),64))]),_:1},512)],64)}}};var Cl=q(Il,[["__scopeId","data-v-8ed3340e"]]),Ll=Object.freeze(Object.defineProperty({__proto__:null,default:Cl},Symbol.toStringTag,{value:"Module"}));const Nl={class:"magic-panel-api"},wl={setup(e){const t=se("info"),n=se("options")||[],a=me(()=>n.map(o=>({text:o[0],value:o[0],description:o[1],defaultValue:o[2]}))),s=U(-1),i=(o,r)=>{const l=n.find(u=>u[0]===o);l&&(r.description=l[1]||"",r.value=l[2]||"")};return(o,r)=>{const l=b("magic-panel-common-toolbar"),u=b("magic-select"),p=b("magic-table-column"),m=b("magic-input"),f=b("magic-table");return g(),w("div",Nl,[_(l,{index:s.value,"onUpdate:index":r[0]||(r[0]=y=>s.value=y),value:h(t).options},null,8,["index","value"]),_(f,{data:h(t).options,border:"",onClickRow:r[1]||(r[1]=y=>s.value=y)},{default:k(()=>[_(p,{title:"Key",width:"20%"},{default:k(({row:y})=>[_(u,{options:h(a),value:y.name,"onUpdate:value":E=>y.name=E,"default-select":o.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1,inputable:"",onSelect:E=>i(E,y)},null,8,["options","value","onUpdate:value","default-select","onSelect"])]),_:1}),_(p,{title:"Value",width:"60%"},{default:k(({row:y})=>[_(m,{value:y.value,"onUpdate:value":E=>y.value=E,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(p,{title:h(c)("message.description"),width:"20%"},{default:k(({row:y})=>[_(m,{value:y.description,"onUpdate:value":E=>y.description=E,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var kl=Object.freeze(Object.defineProperty({__proto__:null,default:wl},Symbol.toStringTag,{value:"Module"}));const Dl={class:"magic-panel-api"},Ml={setup(e){const t=U(-1),n=se("info");return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-checkbox"),r=b("magic-table-column"),l=b("magic-input"),u=b("magic-file"),p=b("magic-select"),m=b("magic-table");return g(),w("div",Dl,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=f=>t.value=f),value:h(n).parameters},null,8,["index","value"]),_(m,{data:h(n).parameters,border:"",onClickRow:s[1]||(s[1]=f=>t.value=f),align:"center"},{default:k(()=>[_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:f})=>[_(o,{value:f.required,"onUpdate:value":y=>f.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Key"},{default:k(({row:f})=>[_(l,{value:f.name,"onUpdate:value":y=>f.name=y,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:f})=>[f.dataType==="MultipartFile"?(g(),j(u,{key:0,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"])):f.dataType==="MultipartFiles"?(g(),j(u,{key:1,value:f.value,"onUpdate:value":y=>f.value=y,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(g(),j(l,{key:2,value:f.value,"onUpdate:value":y=>f.value=y,border:!1},null,8,["value","onUpdate:value"]))]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:f})=>[_(p,{options:a.$REQUEST_PARAMETER_TYPES,value:f.dataType,"onUpdate:value":y=>f.dataType=y,"default-select":a.$DEFAULT_REQUEST_PARAMETER_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:f})=>[_(l,{value:f.defaultValue,"onUpdate:value":y=>f.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:f})=>[_(p,{options:a.$VALIDATE_TYPES,value:f.validateType,"onUpdate:value":y=>f.validateType=y,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:f})=>[_(l,{value:f.expression,"onUpdate:value":y=>f.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:f})=>[_(l,{value:f.error,"onUpdate:value":y=>f.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:f})=>[_(l,{value:f.description,"onUpdate:value":y=>f.description=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Pl=Object.freeze(Object.defineProperty({__proto__:null,default:Ml},Symbol.toStringTag,{value:"Module"}));const Ul={class:"magic-panel-api"},$l={setup(e){const t=U(-1),n=se("info");return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-table");return g(),w("div",Ul,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:h(n).paths},null,8,["index","value"]),_(u,{data:h(n).paths,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p),align:"center"},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:p})=>[_(o,{value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:h(c)("message.parameterType"),width:"135"},{default:k(({row:p})=>[_(l,{options:a.$REQUEST_SIMPLE_TYPES,value:p.dataType,"onUpdate:value":m=>p.dataType=m,"default-select":a.$DEFAULT_REQUEST_SIMPLE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:p})=>[_(l,{options:a.$VALIDATE_TYPES,value:p.validateType,"onUpdate:value":m=>p.validateType=m,"default-select":a.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression"),width:"220"},{default:k(({row:p})=>[_(o,{value:p.expression,"onUpdate:value":m=>p.expression=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate"),width:"165"},{default:k(({row:p})=>[_(o,{value:p.error,"onUpdate:value":m=>p.error=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"2"},{default:k(({row:p})=>[_(o,{value:p.description,"onUpdate:value":m=>p.description=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var Bl=Object.freeze(Object.defineProperty({__proto__:null,default:$l},Symbol.toStringTag,{value:"Module"}));const Fl={setup(e){const t=se("info"),n=se("opened"),a=s=>{if(s.isFlush)return;const i=Ua(t.value.requestBody,t.value.requestBodyDefinition);i&&(t.value.requestBodyDefinition=i,n.value.requestBodyTree=an(i))};return(s,i)=>{const o=b("magic-monaco-editor");return g(),j(o,{value:h(t).requestBody,"onUpdate:value":i[0]||(i[0]=r=>h(t).requestBody=r),language:"json",onChange:a},null,8,["value"])}}};var Hl=q(Fl,[["__scopeId","data-v-0fba1ea3"]]),jl=Object.freeze(Object.defineProperty({__proto__:null,default:Hl},Symbol.toStringTag,{value:"Module"}));const Vl=["onClick"],Gl=["title"],zl={key:0,align:"center",style:{flex:"1"}},Yl={key:1,align:"center",style:{flex:"1"}},ql={setup(e){const t=se("opened"),n=me(()=>{var s,i;return!t.value.requestBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.requestBodyDefinition)&&(t.value.requestBodyTree=an(t.value.item.requestBodyDefinition)),(t.value.requestBodyTree||[]).filter(o=>o.display)}),a=s=>{const i=t.value.requestBodyTree.findIndex(r=>r===s),o=s.level;s.expand=!s.expand;for(let r=i+1,l=t.value.requestBodyTree.length;ro)u.display=s.expand;else break}};return(s,i)=>{const o=b("magic-icon"),r=b("magic-table-column"),l=b("magic-checkbox"),u=b("magic-select"),p=b("magic-input"),m=b("magic-table");return g(),j(m,{data:h(n),border:""},{default:k(()=>[_(r,{title:h(c)("api.field")},{default:k(({row:f})=>[A("span",{style:ze({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>a(f)},[f.folder?(g(),j(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):X("",!0)],12,Vl),A("span",{title:f.name||"-"},B(f.name||"-"),9,Gl)]),_:1},8,["title"]),_(r,{title:h(c)("message.required"),width:"65"},{default:k(({row:f})=>[_(l,{value:f.node.required,"onUpdate:value":y=>f.node.required=y},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.type"),width:"80"},{default:k(({row:f})=>[_(u,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Value",flex:"2"},{default:k(({row:f})=>{var y;return[f.folder?(g(),w("p",zl,"-")):(g(),w("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},B(f.node.value),3))]}),_:1}),_(r,{title:h(c)("message.defaultValue")},{default:k(({row:f})=>[_(p,{value:f.node.defaultValue,"onUpdate:value":y=>f.node.defaultValue=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validateType"),width:"115"},{default:k(({row:f})=>[_(u,{options:s.$VALIDATE_TYPES,value:f.node.validateType,"onUpdate:value":y=>f.node.validateType=y,"default-select":s.$DEFAULT_VALIDATE_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("api.expression")},{default:k(({row:f})=>[_(p,{value:f.node.expression,"onUpdate:value":y=>f.node.expression=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("api.validate")},{default:k(({row:f})=>[_(p,{value:f.node.error,"onUpdate:value":y=>f.node.error=y,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description")},{default:k(({row:f})=>[f.name?(g(),j(p,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(g(),w("p",Yl,"-"))]),_:1},8,["title"])]),_:1},8,["data"])}}};var Kl=q(ql,[["__scopeId","data-v-bda6618c"]]),Wl=Object.freeze(Object.defineProperty({__proto__:null,default:Kl},Symbol.toStringTag,{value:"Module"}));const Xl=["src"],Jl={setup(e){const t=se("info"),n=se("opened"),a=U(null),s=se("ELEMENT_ROOT"),i=me(()=>t.value.responseBody||""),o=me(()=>{if(n.value.responseBlob){const l=n.value.responseHeaders["content-disposition"];if(l){const u=l.replace(/.*filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/,"$1");Hn(n.value.responseBlobValue,u);return}return URL.createObjectURL(n.value.responseBlobValue)}}),r=l=>{const u=getComputedStyle(s.value),p=a.value.contentWindow.document.body.style;p.color=u.getPropertyValue("--main-color"),p.backgroundColor=u.getPropertyValue("--main-background-color")};return(l,u)=>{const p=b("magic-monaco-editor"),m=b("magic-empty");return h(n).responseBlob?h(o)?(g(),w("iframe",{key:1,src:h(o),onLoad:r,ref_key:"iframe",ref:a},null,40,Xl)):(g(),j(m,{key:2,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"])):(g(),j(p,{key:0,value:h(i),"onUpdate:value":u[0]||(u[0]=f=>fa(i)?i.value=f:null),language:"json",readonly:!0},null,8,["value"]))}}};var Ql=q(Jl,[["__scopeId","data-v-27b4e47a"]]),Zl=Object.freeze(Object.defineProperty({__proto__:null,default:Ql},Symbol.toStringTag,{value:"Module"}));const ec=["title"],tc=["title"],nc={setup(e){const t=se("opened"),n=me(()=>Object.keys(t.value.responseHeaders||{}).map(a=>({key:a,value:t.value.responseHeaders[a]})));return(a,s)=>{const i=b("magic-table-column"),o=b("magic-table");return g(),j(o,{data:h(n),border:""},{default:k(()=>[_(i,{title:"Key"},{default:k(({row:r})=>[A("span",{title:r.key},B(r.key),9,ec)]),_:1}),_(i,{title:"Value"},{default:k(({row:r})=>[A("span",{title:r.value},B(r.value),9,tc)]),_:1})]),_:1},8,["data"])}}};var ac=q(nc,[["__scopeId","data-v-76813707"]]),sc=Object.freeze(Object.defineProperty({__proto__:null,default:ac},Symbol.toStringTag,{value:"Module"}));const ic=["onClick"],oc={key:0,align:"center",style:{flex:"1"}},rc={key:1,align:"center",style:{flex:"1"}},lc={setup(e){const t=se("opened"),n=s=>{const i=t.value.responseBodyTree.findIndex(r=>r===s),o=s.level;s.expand=!s.expand;for(let r=i+1,l=t.value.responseBodyTree.length;ro)u.display=s.expand;else break}},a=me(()=>{var s,i;return!t.value.responseBodyTree&&((i=(s=t.value)==null?void 0:s.item)==null?void 0:i.responseBodyDefinition)&&(t.value.responseBodyTree=an(t.value.item.responseBodyDefinition)),(t.value.responseBodyTree||[]).filter(o=>o.display)});return(s,i)=>{const o=b("magic-icon"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-input"),p=b("magic-table"),m=b("magic-empty");return h(a).length?(g(),j(p,{key:0,data:h(a),border:""},{default:k(()=>[_(r,{title:h(c)("api.field")},{default:k(({row:f})=>[A("span",{style:ze({paddingLeft:`${(f.level+(f.folder?0:1))*16}px`}),onClick:y=>n(f)},[f.folder?(g(),j(o,{key:0,icon:f.expand?"arrow-bottom":"arrow-right"},null,8,["icon"])):X("",!0)],12,ic),A("span",null,B(f.name||"-"),1)]),_:1},8,["title"]),_(r,{title:h(c)("message.type"),width:"80"},{default:k(({row:f})=>[_(l,{options:s.$BODY_DATA_TYPES,value:f.node.dataType,"onUpdate:value":y=>f.node.dataType=y,border:!1},null,8,["options","value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:"Value",flex:"3"},{default:k(({row:f})=>{var y;return[f.folder?(g(),w("p",oc,"-")):(g(),w("span",{key:1,class:Ee(["magic-data-type",(y=f.node.dataType)==null?void 0:y.toLowerCase()])},B(f.node.value),3))]}),_:1}),_(r,{title:h(c)("message.description")},{default:k(({row:f})=>[f.name?(g(),j(u,{key:0,value:f.node.description,"onUpdate:value":y=>f.node.description=y,border:!1},null,8,["value","onUpdate:value"])):(g(),w("p",rc,"-"))]),_:1},8,["title"])]),_:1},8,["data"])):(g(),j(m,{key:1,text:h(c)("message.empty",h(c)("message.responseBody"))},null,8,["text"]))}}};var cc=q(lc,[["__scopeId","data-v-051e4f5a"]]),uc=Object.freeze(Object.defineProperty({__proto__:null,default:cc},Symbol.toStringTag,{value:"Module"}));const pc={class:"magic-panel-api-response"},dc={props:{opened:Object},setup(e){const t=[{title:c("message.responseBody"),component:te("magic-api-response-body")},{title:c("message.responseHeader"),component:te("magic-api-response-header")},{title:c("message.responseStructure"),component:te("magic-api-response-structure")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),w("div",pc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,{key:r,title:o.title},{default:k(()=>[(g(),j(ts,null,[(g(),j(te(o.component),{opened:e.opened},null,8,["opened"]))],1024))]),_:2},1032,["title"])),64))]),_:1},512)])}}};var _c=q(dc,[["__scopeId","data-v-a23b6466"]]),hc=Object.freeze(Object.defineProperty({__proto__:null,default:_c},Symbol.toStringTag,{value:"Module"}));const fc={class:"magic-panel-global"},mc={setup(e){const t=U(M.GLOBAL),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-table");return g(),w("div",fc,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=u=>n.value=u),value:t.value.headers},null,8,["index","value"]),_(l,{data:t.value.headers,border:"",onClickRow:s[1]||(s[1]=u=>n.value=u)},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:u})=>[_(o,{value:u.name,"onUpdate:value":p=>u.name=p,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:u})=>[_(o,{value:u.value,"onUpdate:value":p=>u.value=p,border:!1},null,8,["value","onUpdate:value"])]),_:1})]),_:1},8,["data"])])}}};var gc=Object.freeze(Object.defineProperty({__proto__:null,default:mc},Symbol.toStringTag,{value:"Module"}));const vc={class:"magic-panel-global"},Ec={setup(e){const t=U(-1),n=U(M.GLOBAL);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-file"),u=b("magic-table");return g(),w("div",vc,[_(i,{index:t.value,"onUpdate:index":s[0]||(s[0]=p=>t.value=p),value:n.value.parameters},null,8,["index","value"]),_(u,{data:n.value.parameters,border:"",onClickRow:s[1]||(s[1]=p=>t.value=p)},{default:k(()=>[_(r,{title:"Key"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1}),_(r,{title:"Value"},{default:k(({row:p})=>[p.dataType==="MultipartFile"?(g(),j(l,{key:0,value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"])):p.dataType==="MultipartFiles"?(g(),j(l,{key:1,value:p.value,"onUpdate:value":m=>p.value=m,border:!1,multiple:""},null,8,["value","onUpdate:value"])):(g(),j(o,{key:2,value:p.value,"onUpdate:value":m=>p.value=m,border:!1},null,8,["value","onUpdate:value"]))]),_:1})]),_:1},8,["data"])])}}};var bc=Object.freeze(Object.defineProperty({__proto__:null,default:Ec},Symbol.toStringTag,{value:"Module"}));const yc={class:"magic-global"},Tc={setup(e){const t=[{title:"\u5168\u5C40\u8BF7\u6C42\u53C2\u6570",component:te("magic-global-parameter")},{title:"\u5168\u5C40\u8BF7\u6C42Header",component:te("magic-global-header")}];return(n,a)=>{const s=b("magic-navbar-item"),i=b("magic-navbar");return g(),w("div",yc,[_(i,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(t,(o,r)=>_(s,dt({key:r},o),{default:k(()=>[(g(),j(te(o.component)))]),_:2},1040)),64))]),_:1},512)])}}};var Sc=q(Tc,[["__scopeId","data-v-03e7bbcc"]]),Oc=Object.freeze(Object.defineProperty({__proto__:null,default:Sc},Symbol.toStringTag,{value:"Module"}));const xc={props:{value:Array,index:Number},emits:["update:index"],setup(e,{emit:t}){const n=e,a=[{title:c("message.addRow"),icon:"plus",onClick(){n.value.push({}),t("update:index",n.value.length-1)}},{title:c("message.removeRow"),icon:"minus",onClick(){n.value.length>0&&(n.value.splice(n.index==-1?n.value.length-1:n.index,1),t("update:index",-1))}}];return(s,i)=>{const o=b("magic-panel-toolbar");return g(),j(o,{toolbars:a})}}};var Rc=Object.freeze(Object.defineProperty({__proto__:null,default:xc},Symbol.toStringTag,{value:"Module"}));const Ac={class:"magic-panel-toolbar"},Ic=["title","onClick"],Cc={props:{toolbars:Array},setup(e){const t=n=>{n.selectable?n.disabled!==!0&&(n.selected=n.selected!==!0,n.onSelect&&n.onSelect(n.selected)):n.disabled!==!0&&n.onClick()};return(n,a)=>{const s=b("magic-icon");return g(),w("ul",Ac,[(g(!0),w(Z,null,he(e.toolbars,(i,o)=>(g(),w("li",{key:o,title:i.title,onClick:Se(r=>t(i),["stop"]),class:Ee({disabled:i.disabled,selected:i.selected})},[_(s,{icon:i.icon},null,8,["icon"])],10,Ic))),128))])}}};var Lc=q(Cc,[["__scopeId","data-v-56150b69"]]),Nc=Object.freeze(Object.defineProperty({__proto__:null,default:Lc},Symbol.toStringTag,{value:"Module"}));const wc={class:"magic-resource-choose"},kc={key:0},Dc={key:2},Mc={props:{value:[Array,Object],type:String,single:{type:Boolean,default:()=>!1},file:{type:Boolean,default:()=>!0}},emits:["update:value"],setup(e,{expose:t,emit:n}){const a=e,s=se("resources"),i=se("service"),o=U([]),r=()=>{let E=[],C=I=>{I.id.endsWith("-root")?E.push({type:"root",id:I.type}):E.push({type:I.folder?"group":I.type,id:I.id}),I.children&&I.children.filter(O=>O.selected).forEach(O=>C(O))};o.value.filter(I=>I.selected).forEach(I=>C(I)),n("update:value",a.single?E[0]:E)},l=(E,C)=>{let I=[];return E&&E.filter(O=>O.id).forEach(O=>{var v;if(O.folder||a.file){if(O.folder)O.icon="list";else{const T=(v=i[C.type])==null?void 0:v.getIcon;O.icon=T&&T(O)||C.icon,O.textIcon=T!==void 0,O.type=C.type}I.push(O)}O.folder&&O.children&&(O.children=l(O.children,C))}),I},u=E=>{let C=E,I=[],O=v=>{v.forEach(T=>{T.id===C?(I.push(T),C=T.parentId||T.groupId,O(o.value)):T.children&&T.children.length>0&&O(T.children)})};return O(o.value),I},p=(E,C)=>{C!==void 0&&(E.selected=C);let I=O=>{O.selected=a.single?!1:E.selected,O.checkedHalf=a.single?!1:!E.selected,O.children&&O.children.forEach(v=>I(v))};E.children&&E.children.forEach(O=>I(O)),E.folder&&(E.checkedHalf=!1),u(E.folder?E.parentId:E.groupId).forEach(O=>{O.selected=a.single?!1:O.children.some(v=>v.selected),O.checkedHalf=a.single?!1:O.children.some(v=>!v.selected||v.checkedHalf)}),a.single?n("update:value",E.selected?E:void 0):r()},m=E=>p(E,!E.selected);return s().filter(E=>!a.type||a.type===E.navbar.type).forEach(E=>{const C=E.navbar.type,I=l(E.tree,E.navbar);I.forEach(O=>{O.folder?O.parentId=C+"-root":O.groupId=C+"-root"}),o.value.push({icon:E.navbar.icon,name:E.navbar.title,iconClass:"root",folder:!0,opened:!0,type:E.navbar.type,id:C+"-root",children:I})}),t({selectAll:E=>et(o.value,C=>{C.checkedHalf=!1,C.selected=E,C.children&&C.children.forEach(I=>I.selected=E),r()}),expand:E=>et(o.value,C=>{C.folder&&(C.opened=E)})}),(E,C)=>{const I=b("magic-checkbox"),O=b("magic-icon"),v=b("magic-text-icon"),T=b("magic-tree");return g(),w("div",wc,[_(T,{data:o.value,sort:!1,onItemClick:m},{folder:k(({item:R})=>[_(I,{value:R.selected,"onUpdate:value":D=>R.selected=D,"checked-half":R.checkedHalf,onChange:D=>p(R)},null,8,["value","onUpdate:value","checked-half","onChange"]),_(O,{icon:R.opened?"arrow-bottom":"arrow-right",onClick:Se(D=>R.opened=!R.opened,["stop"])},null,8,["icon","onClick"]),_(O,{icon:R.icon,class:Ee(R.iconClass)},null,8,["icon","class"]),A("label",null,B(R.name),1),R.path?(g(),w("span",kc,"("+B(R.path)+")",1)):X("",!0)]),file:k(({item:R})=>[_(I,{value:R.selected,"onUpdate:value":D=>R.selected=D,"checked-half":R.checkedHalf,onChange:D=>p(R)},null,8,["value","onUpdate:value","checked-half","onChange"]),R.textIcon?(g(),j(v,{key:0,icon:R.icon},null,8,["icon"])):(g(),j(O,{key:1,icon:R.icon},null,8,["icon"])),A("label",null,B(R.name),1),R.path?(g(),w("span",Dc,"("+B(R.path)+")",1)):X("",!0)]),_:1},8,["data"])])}}};var Pc=q(Mc,[["__scopeId","data-v-4852fc0e"]]),Uc=Object.freeze(Object.defineProperty({__proto__:null,default:Pc},Symbol.toStringTag,{value:"Module"}));const $c={class:"magic-form-row"},Bc={class:"magic-form-row"},Fc=A("label",null,"Key",-1),Hc={class:"magic-form-row"},jc=A("label",null,"URL",-1),Vc={class:"magic-form-row"},Gc={class:"magic-form-row"},zc={class:"magic-form-row"},Yc={class:"magic-form-row"},qc={class:"magic-form-row"},Kc=A("label",null,"maxRows",-1),Wc={class:"magic-form-row"},Xc={props:{info:Object},setup(e){const{info:t}=e,n=U(JSON.stringify(t.properties||{}));return tt(n,a=>{try{t.properties=JSON.parse(a)}catch{t.properties={}}}),(a,s)=>{const i=b("magic-input"),o=b("magic-select"),r=b("magic-monaco-editor");return g(),w(Z,null,[A("div",$c,[A("label",null,B(h(c)("message.name")),1),_(i,{value:e.info.name,"onUpdate:value":s[0]||(s[0]=l=>e.info.name=l),placeholder:h(c)("datasource.form.placeholder.name")},null,8,["value","placeholder"])]),A("div",Bc,[Fc,_(i,{value:e.info.key,"onUpdate:value":s[1]||(s[1]=l=>e.info.key=l),placeholder:h(c)("datasource.form.placeholder.key")},null,8,["value","placeholder"])]),A("div",Hc,[jc,_(i,{value:e.info.url,"onUpdate:value":s[2]||(s[2]=l=>e.info.url=l),placeholder:h(c)("datasource.form.placeholder.url")},null,8,["value","placeholder"])]),A("div",Vc,[A("label",null,B(h(c)("message.username")),1),_(i,{value:e.info.username,"onUpdate:value":s[3]||(s[3]=l=>e.info.username=l),placeholder:h(c)("datasource.form.placeholder.username")},null,8,["value","placeholder"])]),A("div",Gc,[A("label",null,B(h(c)("message.password")),1),_(i,{value:e.info.password,"onUpdate:value":s[4]||(s[4]=l=>e.info.password=l),type:"password",placeholder:h(c)("datasource.form.placeholder.password")},null,8,["value","placeholder"])]),A("div",zc,[A("label",null,B(h(c)("datasource.form.driver")),1),_(o,{inputable:"",value:e.info.driverClassName,"onUpdate:value":s[5]||(s[5]=l=>e.info.driverClassName=l),width:"100%",options:h(M).JDBC_DRIVERS.map(l=>({text:l,value:l})),placeholder:h(c)("datasource.form.placeholder.driver")},null,8,["value","options","placeholder"])]),A("div",Yc,[A("label",null,B(h(c)("datasource.form.type")),1),_(o,{inputable:"",value:e.info.type,"onUpdate:value":s[6]||(s[6]=l=>e.info.type=l),width:"100%",options:h(M).DATASOURCE_TYPES.map(l=>({text:l,value:l})),placeholder:h(c)("datasource.form.placeholder.type")},null,8,["value","options","placeholder"])]),A("div",qc,[Kc,_(i,{value:e.info.maxRows,"onUpdate:value":s[7]||(s[7]=l=>e.info.maxRows=l),placeholder:h(c)("datasource.form.placeholder.maxRows"),"default-value":-1,type:"number"},null,8,["value","placeholder"])]),A("div",Wc,[A("label",null,B(h(c)("datasource.form.other")),1),_(r,{language:"json",value:n.value,"onUpdate:value":s[8]||(s[8]=l=>n.value=l),style:{height:"150px"}},null,8,["value"])])],64)}}};var Jc=Object.freeze(Object.defineProperty({__proto__:null,default:Xc},Symbol.toStringTag,{value:"Module"}));const Qc={class:"magic-backup-file"},Zc={class:"magic-backup-file-diff-container"},eu={props:{id:String},setup(e){const t=e,n=se("service"),a=U(""),s=U(!0),i=U(!0),o=Je([]),r=U({}),l=U([]),u=U(""),p=()=>{u.value=n[r.value.type].language||"magicscript";const E=[];i.value=!0,a.value||E.push(new Promise(C=>z.sendGet("/resource/file/"+t.id).success(I=>a.value=I).end(()=>C()))),E.push(new Promise(C=>z.sendGet("/backup",{id:t.id,timestamp:r.value.createDate}).success(I=>r.value.script=I).end(()=>C()))),Promise.all(E).then(()=>{var C;i.value=!1,l.value=[r.value.script,(C=a.value)==null?void 0:C.script]}).catch(C=>{console.error(C),i.value=!1})},m=()=>{s.value=!0,z.sendGet("/backup/"+t.id).success(E=>{E&&E.length>0&&(o.length=0,o.push(...E),r.value=o[0]||{},r.value&&p()),s.value=!1})};m(),tt(()=>t.id,m);const f=()=>{const E=`${r.value.name}(${We(r.value.createDate)})`;z.sendPost("/backup/rollback",{id:t.id,timestamp:r.value.createDate}).success(C=>{C?(ve.alert(c("backup.rollbackSuccess",E)),S.status("backup.rollbackSuccess",!0,E),S.$emit(F.REFRESH_RESOURCE,t.id)):(ve.alert(c("backup.rollbackFailed",E)),S.status("backup.rollbackFailed",!1,E))})},y=E=>{r.value=o[E],p()};return(E,C)=>{const I=b("magic-table-column"),O=b("magic-table"),v=b("magic-button"),T=b("magic-monaco-diff-editor"),R=b("magic-loading"),D=b("magic-empty");return g(),j(R,{loading:s.value},{default:k(()=>[A("div",Qc,[h(o).length>0?(g(),w(Z,{key:0},[_(O,{data:h(o),border:!0,onClickRow:y},{default:k(()=>[_(I,{title:h(c)("message.date"),width:"160",class:"selected"},{default:k(({row:L})=>[_e(B(h(We)(L.createDate)),1)]),_:1},8,["title"]),_(I,{title:h(c)("history.operator"),width:"100"},{default:k(({row:L})=>[_e(B(L.createBy||"guest"),1)]),_:1},8,["title"])]),_:1},8,["data"]),A("div",Zc,[A("ul",null,[A("li",null,[_e(B(h(We)(r.value.createDate))+" by "+B(r.value.createBy||"guest")+" ",1),_(v,{value:h(c)("backup.rollback"),type:"active",onClick:f},null,8,["value"])]),A("li",null,[_e(B(h(c)("backup.current")),1),a.value?(g(),w(Z,{key:0},[_e("("+B(h(We)(a.value.updateTime||a.value.createTime))+" by "+B(a.value.updateBy||a.value.createBy||"guest")+")",1)],64)):X("",!0)])]),i.value?(g(),j(R,{key:1,loading:i.value},null,8,["loading"])):(g(),j(T,{key:0,value:l.value,"onUpdate:value":C[0]||(C[0]=L=>l.value=L),language:u.value},null,8,["value","language"]))])],64)):(g(),j(D,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_:1},8,["loading"])}}};var tu=q(eu,[["__scopeId","data-v-ef606938"]]),nu=Object.freeze(Object.defineProperty({__proto__:null,default:tu},Symbol.toStringTag,{value:"Module"}));const au={class:"magic-backup"},su={class:"magic-backup-diff-container"},iu={class:"magic-backup-diff-header"},ou={setup(e){const t=te("magic-backup-file"),n=U(!0),a=[{icon:"refresh",title:c("message.refresh"),onClick(){E()}},{icon:"copy",title:c("backup.full"),onClick(){z.sendPost("/backup/full").success(()=>{S.status("backup.backupSuccess"),E()})}}],s=U([]),i=U([]),o=U(!1),r=U(!0),l=U(""),u=U({}),p=U("magicscript");let m=!1,f=!1,y;const E=N=>{n.value=!0,z.sendGet("/backups",{timestamp:N}).success($=>{N?i.value.push(...$):i.value=$,(f=$.length>=100)&&(y=$[$.length-1].createDate),n.value=!1})},C=se("service"),I=U({}),O=N=>{var $,Y;return N.endsWith("-group")?c("message.group",(($=C[N.replace("-group","")])==null?void 0:$.name)||"Unknown"):N==="full"?c("backup.full"):((Y=C[N])==null?void 0:Y.name)||N};let v=!1;S.$on(F.LOAD_RESOURCES_FINISH,N=>N||E());const T=()=>{f&&!m&&E(y)};ht(()=>{!v&&M.LOGINED&&E(),v=!0});const{proxy:R}=St(),D=(N,$)=>{const Y=[],re=C[$.type];$.id!=="full"&&!($.type&&$.type.endsWith("-group"))&&!(re&&re.requireScript===!1)&&(Y.push({icon:"difference",label:c("backup.difference"),onClick(){l.value=We($.createDate),o.value=!0,r.value=!0,p.value=C[$.type].language||"magicscript",Promise.all([new Promise(ie=>z.sendGet("/backup",{id:$.id,timestamp:$.createDate}).success(Q=>ie(Q))),new Promise(ie=>z.sendGet("/resource/file/"+$.id).success(Q=>ie(Q)))]).then(ie=>{var Q;I.value=ie[1],u.value=$,r.value=!1,s.value=[ie[0],(Q=ie[1])==null?void 0:Q.script]}).catch(ie=>{console.error(ie),o.value=!1})}}),Y.push({label:c("toolbars.history"),icon:"history",onClick:()=>{S.$emit(F.ADD_FOOTER_TOOLBAR,{component:$e(t),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",$.name),allowClose:!0,data:{id:$.id}})}})),($.id==="full"||!$.type.endsWith("-group"))&&Y.push({icon:"rollback",label:c("backup.rollback"),onClick(){const ie=`${$.name}(${We($.createDate)})`;ve.confirm(c("backup.rollback"),c("backup.rollbackConfirm"),()=>{z.sendPost("/backup/rollback",{id:$.id,timestamp:$.createDate}).success(Q=>{Q?(S.status("backup.rollbackSuccess",!0,ie),S.$emit(F.LOAD_RESOURCES)):(ve.alert(c("backup.rollbackFailed",ie)),S.status("backup.rollbackFailed",!1,ie))})})}}),Y.length>0&&R.$contextmenu({event:N,menus:Y})},L=()=>{o.value=!1;const N=`${u.value.name}(${We(u.value.createDate)})`;z.sendPost("/backup/rollback",{id:u.value.id,timestamp:u.value.createDate}).success($=>{$?(ve.alert(c("backup.rollbackSuccess",N)),S.status("backup.rollbackSuccess",!0,N),S.$emit(F.REFRESH_RESOURCE,u.value.id)):(ve.alert(c("backup.rollbackFailed",N)),S.status("backup.rollbackFailed",!1,N))})};return(N,$)=>{const Y=b("magic-panel-toolbar"),re=b("magic-loading"),ie=b("magic-table-column"),Q=b("magic-table"),ye=b("magic-empty"),Te=b("magic-monaco-diff-editor"),Rt=b("magic-button"),At=b("magic-button-group"),ke=b("magic-dialog");return g(),w(Z,null,[A("div",au,[_(Y,{toolbars:a}),A("div",null,[_(re,{loading:n.value},null,8,["loading"]),i.value.length>0?(g(),j(Q,{key:0,data:i.value,border:!0,onContextmenu:D,onLoadNext:T},{default:k(()=>[_(ie,{title:h(c)("message.date"),width:"160"},{default:k(({row:Ne})=>[_e(B(h(We)(Ne.createDate)),1)]),_:1},8,["title"]),_(ie,{title:h(c)("message.type"),width:"90"},{default:k(({row:Ne})=>[A("span",null,B(O(Ne.type)),1)]),_:1},8,["title"]),_(ie,{title:h(c)("history.operator"),width:"100"},{default:k(({row:Ne})=>[_e(B(Ne.createBy||"guest"),1)]),_:1},8,["title"]),_(ie,{title:h(c)("message.name"),align:"left"},{default:k(({row:Ne})=>[_e(B(Ne.name),1)]),_:1},8,["title"])]),_:1},8,["data"])):(g(),j(ye,{key:1,text:h(c)("message.empty",h(c)("history.name"))},null,8,["text"]))])]),_(ke,{value:o.value,"onUpdate:value":$[1]||($[1]=Ne=>o.value=Ne),title:h(c)("history.name"),width:"80%",maxWidth:"100%",top:"60px",height:"80%",className:"magic-dialog-diff"},{default:k(()=>[A("div",su,[A("div",iu,[A("div",null,B(l.value)+" by "+B(u.value.createBy||"guest"),1),A("div",null,B(h(c)("backup.current"))+"("+B(h(We)(I.value.updateTime||I.value.createTime))+" by "+B(I.value.updateBy||I.value.createBy||"guest")+")",1)]),r.value?(g(),j(re,{key:1,loading:r.value},null,8,["loading"])):(g(),j(Te,{key:0,value:s.value,"onUpdate:value":$[0]||($[0]=Ne=>s.value=Ne),language:p.value},null,8,["value","language"]))]),_(At,{align:"right"},{default:k(()=>[_(Rt,{value:h(c)("backup.rollback"),type:"active",onClick:L},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],64)}}};var ru=q(ou,[["__scopeId","data-v-b15945c0"]]),lu=Object.freeze(Object.defineProperty({__proto__:null,default:ru},Symbol.toStringTag,{value:"Module"}));const ct=e=>(Dn("data-v-71b796dc"),e=e(),Mn(),e),cu={class:"magic-debug"},uu={class:"magic-debug-variables"},pu={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},du=ct(()=>A("path",{d:"M201.472 320h-49.6V129.408l-59.2 18.368v-40.32L196.16 70.4h5.312V320z m50.816 320.128H81.024v-33.92l80.832-86.208c6.016-6.656 11.136-12.672 15.36-18.176a133.76 133.76 0 0 0 10.112-15.104 57.728 57.728 0 0 0 5.504-12.8 42.88 42.88 0 0 0 1.6-11.392c0-11.136-2.816-19.84-8.384-26.24-5.632-6.272-13.632-9.472-24.064-9.472a36.224 36.224 0 0 0-15.488 3.2 31.808 31.808 0 0 0-11.328 8.704 39.232 39.232 0 0 0-6.976 13.312 56.32 56.32 0 0 0-2.368 16.832h-49.792c0-11.2 1.984-21.76 6.016-31.744 3.968-9.984 9.792-18.624 17.28-26.112 7.616-7.424 16.704-13.312 27.392-17.664 10.688-4.352 22.784-6.528 36.16-6.528 13.12 0 24.768 1.664 34.88 4.928 10.176 3.2 18.624 7.872 25.536 13.952 6.848 6.08 12.032 13.504 15.616 22.336 3.52 8.768 5.312 18.688 5.312 29.696 0 8.32-1.28 16.384-3.968 24.192-2.56 7.744-6.336 15.552-11.136 23.296a190.08 190.08 0 0 1-17.408 23.68 528.64 528.64 0 0 1-22.784 24.768l-44.096 46.464h107.456v40zM131.456 812.8h26.432c12.608 0 21.888-3.136 27.968-9.408a34.56 34.56 0 0 0 9.088-25.088 38.656 38.656 0 0 0-2.048-12.8 26.304 26.304 0 0 0-16.832-16.704 42.112 42.112 0 0 0-14.912-2.432 41.792 41.792 0 0 0-12.928 1.984 33.664 33.664 0 0 0-10.688 5.568 25.6 25.6 0 0 0-9.856 20.608H78.08a60.8 60.8 0 0 1 6.4-28.032c4.352-8.448 10.176-15.552 17.536-21.44 7.424-5.888 16-10.496 25.984-13.76 9.984-3.2 20.608-4.864 32-4.864 12.544 0 24 1.472 34.368 4.48 10.368 3.072 19.2 7.616 26.688 13.632 7.424 5.952 13.184 13.44 17.28 22.272 4.16 8.896 6.208 19.2 6.208 30.848a52.8 52.8 0 0 1-9.856 30.72 67.968 67.968 0 0 1-28.032 22.976 62.08 62.08 0 0 1 31.488 22.656 61.44 61.44 0 0 1 10.368 35.712 66.56 66.56 0 0 1-25.408 54.336c-7.872 6.208-17.28 10.88-28.032 14.208a121.024 121.024 0 0 1-66.368 0.64 81.92 81.92 0 0 1-27.2-13.248 68.032 68.032 0 0 1-19.2-22.4 66.304 66.304 0 0 1-7.296-32h49.6a29.824 29.824 0 0 0 10.368 22.912 36.48 36.48 0 0 0 11.584 6.592 48.64 48.64 0 0 0 30.4 0 30.336 30.336 0 0 0 19.392-17.792 46.208 46.208 0 0 0-0.256-31.04 28.544 28.544 0 0 0-8.192-11.584 34.304 34.304 0 0 0-12.928-6.592 63.104 63.104 0 0 0-17.088-2.176h-26.432V812.8z",fill:"#9AA7B0"},null,-1)),_u=ct(()=>A("path",{d:"M384 128h512v192H384zM384 768h512v192H384zM384 448h512v192H384z",fill:"#40B6E0","fill-opacity":".7"},null,-1)),hu=[du,_u],fu={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},mu=ct(()=>A("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),gu=[mu],vu={class:"key"},Eu=ct(()=>A("label",{class:"separator"},"=",-1)),bu={key:2,class:"object-type"},yu={key:3,class:"object-type"},Tu={key:0,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Su=ct(()=>A("path",{d:"M128 128h768v768H128z",fill:"#40B6E0","fill-opacity":".6","p-id":"8251"},null,-1)),Ou=ct(()=>A("path",{d:"M691.968 704V422.912l-62.464 15.36L613.12 373.76l102.912-30.72h53.76V704h-77.824z m-284.288 6.144c-95.744 0-158.72-80.384-158.72-184.32V524.8c0-103.936 64.512-185.344 159.744-185.344 94.72 0 158.72 80.384 158.72 184.32V524.8c0 103.936-64 185.344-159.744 185.344z m1.408-71.168c47.616 0 77.824-48.128 77.824-113.152V524.8c0-65.024-31.744-114.176-78.848-114.176S330.24 458.24 330.24 523.776V524.8c0 65.536 31.232 114.176 78.848 114.176z",fill:"#231F20","fill-opacity":".7","p-id":"8252"},null,-1)),xu=[Su,Ou],Ru={key:1,viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},Au=ct(()=>A("path",{d:"M192 128h640v192H192zM192 384h640v192H192zM192 640h640v192H192z",fill:"#F4AF3D","fill-opacity":".6"},null,-1)),Iu=[Au],Cu={class:"key"},Lu=ct(()=>A("label",{class:"separator"},"=",-1)),Nu={key:2,class:"object-type"},wu={setup(e){const t=se("opened"),n=me(()=>!t.value.variables),a=U([{title:c("editor.tooltip.resume")+"(F8)",icon:"continue",disabled:n,onClick(){S.$emit(F.DEBUG_CONTINUE)}},{title:c("editor.tooltip.stepInto")+"(F6)",icon:"step-over",disabled:n,onClick(){S.$emit(F.DEBUG_SETPINTO)}},{title:c("resource.header.expand"),icon:"expand-all",disabled:n,onClick:()=>et(t.value.variables,s=>s.opened=!0)},{title:c("resource.header.collapse"),icon:"collapse-all",disabled:n,onClick:()=>et(t.value.variables,s=>s.opened=!1)}]);return(s,i)=>{const o=b("magic-panel-toolbar"),r=b("magic-icon"),l=b("magic-tree"),u=b("magic-empty");return g(),w("div",cu,[_(o,{toolbars:a.value},null,8,["toolbars"]),A("div",uu,[h(t).variables?(g(),j(l,{key:0,data:h(t).variables},{folder:k(({item:p})=>[_(r,{icon:p.opened?"arrow-bottom":"arrow-right",onClick:Se(m=>p.opened=!p.opened,["stop"])},null,8,["icon","onClick"]),p.dataType==="array"?(g(),w("svg",pu,hu)):(g(),w("svg",fu,gu)),A("label",vu,B(p.name),1),Eu,p.size?(g(),w("span",bu,"("+B(p.size)+")",1)):X("",!0),p.type?(g(),w("span",yu,B(`{${p.type}}`),1)):X("",!0)]),file:k(({item:p})=>[_(r,{icon:"empty"}),p.dataType==="number"?(g(),w("svg",Tu,xu)):(g(),w("svg",Ru,Iu)),A("label",Cu,B(p.name),1),Lu,A("span",{class:Ee(["magic-data-type",p.dataType])},B(p.value),3),p.type&&!p.isNull?(g(),w("span",Nu," ("+B(p.type)+")",1)):X("",!0)]),_:1},8,["data"])):(g(),j(u,{key:1,text:h(c)("message.empty",h(c)("message.variable"))},null,8,["text"]))])])}}};var ku=q(wu,[["__scopeId","data-v-71b796dc"]]),Du=Object.freeze(Object.defineProperty({__proto__:null,default:ku},Symbol.toStringTag,{value:"Module"}));const Mu={class:"magic-event"},Pu=["innerHTML"],Uu={setup(e){const t=S.getStatusLog(),n=[{title:c("message.clear"),icon:"clear",onClick:()=>{S.clearStatusLog()}}];return(a,s)=>{const i=b("magic-panel-toolbar"),o=b("magic-table-column"),r=b("magic-table");return g(),w("div",Mu,[_(i,{toolbars:n}),A("div",null,[_(r,{data:h(t),border:"",align:"left"},{default:k(()=>[_(o,{title:h(c)("message.date"),width:"180"},{default:k(({row:l})=>[_e(B(l.timestamp),1)]),_:1},8,["title"]),_(o,{title:h(c)("event.message")},{default:k(({row:l})=>[A("div",{innerHTML:l.content},null,8,Pu)]),_:1},8,["title"])]),_:1},8,["data"])])])}}};var $u=q(Uu,[["__scopeId","data-v-06d5ba36"]]),Bu=Object.freeze(Object.defineProperty({__proto__:null,default:$u},Symbol.toStringTag,{value:"Module"}));const Fu={class:"magic-log-wrapper"},Hu=["innerHTML"],ju=["onClick"],Vu={setup(e){const t=U([]),n=U(!1),a=U([{icon:"expand-all",title:c("resource.header.expand"),onClick:()=>t.value.forEach(p=>p.showMore=!0)},{icon:"collapse-all",title:c("resource.header.collapse"),onClick:()=>t.value.forEach(p=>p.showMore=!1)},{icon:"delete",title:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"scroll-down",title:c("log.scrollEnd"),selectable:!0,onSelect:p=>{n.value=p,o()}}]),s=U(null),{proxy:i}=St(),o=()=>{n.value&&be(()=>{s.value&&(s.value.scrollTop=s.value.scrollHeight)})},r=p=>{i.$contextmenu({event:p,menus:[{icon:"delete",label:c("message.clear"),onClick:()=>t.value.splice(0)},{icon:"expand-all",label:c("resource.header.expand"),onClick:()=>t.value.forEach(m=>m.showMore=!0)},{icon:"collapse-all",label:c("resource.header.collapse"),onClick:()=>t.value.forEach(m=>m.showMore=!1)}]})},l=p=>{const m=p.map(f=>{let y=f.replace(/[&<>]/gm,function(C){return C==="&"?"&":C==="<"?"<":C===">"?">":""});y=y.replace(/(\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}.\d{3}\s+)([^\s]+)( --- \[)(.{15})(] )(.{40})/gm,'$1 $2$3$4$5$6'),y=y.replace(/(https?:\/\/[^\s]+)/gm,'$1'),y=y.replace(/(\tat .*\()(.*?:\d+)(\).*?[\r\n])/g,'$1$2$3');let E=f.split(` +`).length;return{html:y,multiple:E>3,lines:E-3,showMore:!1}});m&&(t.value.push(...m),M.LOG_MAX_ROWS!==1/0&&t.value.length>M.LOG_MAX_ROWS&&t.value.splice(0,t.value.length-M.LOG_MAX_ROWS),o())};S.$event(Re.LOGS,([p])=>l(p)),S.$event(Re.LOG,([p])=>l(p));const u=new IntersectionObserver(()=>{o()});return ht(()=>{u.observe(s.value)}),(p,m)=>{const f=b("magic-panel-toolbar"),y=b("magic-empty");return g(),w("div",Fu,[_(f,{toolbars:a.value},null,8,["toolbars"]),!t.value||t.value.length===0?(g(),j(y,{key:0,text:h(c)("message.empty",h(c)("message.log"))},null,8,["text"])):X("",!0),yt(A("div",{class:"magic-log",ref_key:"element",ref:s,onContextmenu:m[0]||(m[0]=Se(E=>r(E),["prevent"]))},[(g(!0),w(Z,null,he(t.value,(E,C)=>(g(),w("div",{class:Ee({multiple:E.multiple,more:E.showMore}),key:"run_log_"+C},[A("pre",{innerHTML:E.html},null,8,Hu),E.multiple?(g(),w("span",{key:0,class:"multiple",onClick:I=>E.showMore=!E.showMore},B(E.showMore?h(c)("log.hide"):h(c)("log.show",E.lines)),9,ju)):X("",!0)],2))),128))],544),[[$t,t.value&&t.value.length>0]])])}}};var Gu=Object.freeze(Object.defineProperty({__proto__:null,default:Vu},Symbol.toStringTag,{value:"Module"}));const zu={class:"magic-online"},Yu={setup(e){const t=Je([]),n=se("activateUserFiles"),a=(i,o)=>{const r=t.find(l=>l.cid===i);r&&(Object.values(n.value).forEach(l=>{const u=l.findIndex(p=>p.cid===i);u>-1&&l.splice(u,1)}),n.value[o]=n.value[o]||[],n.value[o].push(r))},s=i=>{t.some(o=>o.cid===i.cid)||t.push(i)};return S.$event(Re.LOGIN_RESPONSE,([i,o])=>{n.value={},t.splice(0,t.length),i==="1"&&s(o)}),S.$event(Re.PING,()=>{S.send(Re.PONG)}),S.$event(Re.USER_LOGIN,([i])=>{M.CLIENT_ID!==i.cid&&(S.$emit(F.NOTIFY,{title:c("online.login"),content:c("online.loginTips",i.username,i.ip),duration:3e3}),S.status("online.loginTips",!0,i.username,i.ip)),s(i)}),S.$event(Re.USER_LOGOUT,([i])=>{M.CLIENT_ID!==i.cid&&(S.$emit(F.NOTIFY,{title:c("online.logout"),content:c("online.logoutTips",i.username,i.ip),duration:3e3}),S.status("online.logoutTips",!0,i.username,i.ip));const o=t.findIndex(r=>r.cid===i.cid);a(i.cid,"0"),o>-1&&t.splice(o,1)}),S.$event(Re.ONLINE_USERS,([i])=>{i.forEach(o=>{M.CLIENT_ID!==o.cid&&(s(o),o.fileId&&a(o.cid,o.fileId))})}),S.$event(Re.INTO_FILE_ID,([i,o])=>a(i,o)),(i,o)=>{const r=b("magic-avatar-group");return g(),w("div",zu,[_(r,{users:h(t),max:9},null,8,["users"]),A("span",null,B(h(c)("online.onlines",h(t).length)),1)])}}};var qu=q(Yu,[["__scopeId","data-v-0c296fa2"]]),Ku=Object.freeze(Object.defineProperty({__proto__:null,default:qu},Symbol.toStringTag,{value:"Module"}));const Wu={class:"magic-status-bar"},Xu=["innerHTML"],Ju=["title","onClick"],Qu={props:{config:Object},setup(e){const t=e,n=U(null),a=[{icon:"gitee",title:"Gitee",displayKey:"repo",onClick:()=>window.open("https://gitee.com/ssssssss-team/magic-api")},{icon:"git",title:"Github",displayKey:"repo",onClick:()=>window.open("https://github.com/ssssssss-team/magic-api")},{icon:"qq",title:c("message.joinGroup"),displayKey:"qqGroup",onClick:()=>window.open("https://qm.qq.com/cgi-bin/qm/qr?k=Q6dLmVS8cHwoaaP18A3tteK_o0244e6B&jump_from=webapi")},{icon:"help",title:c("message.document"),displayKey:"document",onClick:()=>window.open("https://ssssssss.org/magic-api")}],s=me(()=>{const o=a.filter(r=>t.config.header[r.displayKey]!==!1);return n.value&&n.value.id&&n.value.username&&o.push({icon:"logout",title:n.value.username,onClick:()=>ve.confirm(c("message.logout"),c("message.logoutConfirm",n.value.username),()=>z.sendPost("/logout").success(()=>{n.value=null,M.HEADER_MAGIC_TOKEN_VALUE="unauthorization",M.LOGINED=!1,Fe.remove(M.STORE.token),S.$emit(F.LOGOUT),S.status("message.logoutSuccess")}))}),o}),i=U("");return S.$on(F.LOGINED,()=>{S.status("message.getCurrentLoginUser"),z.send("/user").success(o=>n.value=o)}),S.$on(F.STATUS,o=>i.value=o),(o,r)=>{const l=b("magic-online"),u=b("magic-icon");return g(),w("div",Wu,[A("div",{class:"message",innerHTML:i.value},null,8,Xu),_(l),A("ul",null,[(g(!0),w(Z,null,he(h(s),(p,m)=>(g(),w("li",{title:p.title,key:m,onClick:Se(p.onClick,["stop"])},[_(u,{icon:p.icon},null,8,["icon"])],8,Ju))),128))])])}}};var Zu=q(Qu,[["__scopeId","data-v-49bc4fc3"]]),e1=Object.freeze(Object.defineProperty({__proto__:null,default:Zu},Symbol.toStringTag,{value:"Module"}));const t1={class:"magic-todo"},n1={key:3},a1={class:"todo"},s1={setup(e){const t=U(!0),n=[{icon:"refresh",title:c("message.refresh"),onClick(){p()}},{icon:"expand-all",title:c("message.expand"),onClick:()=>et(a.value,f=>f.opened=!0)},{icon:"collapse-all",title:c("message.collapse"),onClick:()=>et(a.value,f=>f.opened=!1)}],a=U([]),s=se("resources"),i={},o=f=>{(f.groupId||f.line)&&S.$emit(F.OPEN_WITH_ID,f.id)},r=(f,y)=>{let E=f.find(C=>C.id===y);if(!E)for(let C=0;C{let y=[];return f.forEach(E=>{E.line>0?y.push(E):E.folder&&E.children&&(E.children=l(E.children),E.children.length&&y.push(E))}),y},u=se("service"),p=()=>{a.value=[],t.value=!0,z.sendGet("/todo").success(f=>{const y=s();y.forEach(C=>i[C.navbar.type]=C.navbar);let E=!1;f.forEach(C=>{for(let I=0;IC.display).map(C=>({folder:!0,icon:C.navbar.icon,name:C.navbar.title,children:C.tree,root:!0}))),et(a.value,C=>C.opened=!0)),t.value=!1})};let m=!1;return S.$on(F.LOAD_RESOURCES_FINISH,p),ht(()=>{!m&&M.LOGINED&&p(),m=!0}),(f,y)=>{const E=b("magic-panel-toolbar"),C=b("magic-loading"),I=b("magic-icon"),O=b("magic-text-icon"),v=b("magic-tree"),T=b("magic-empty");return g(),w("div",t1,[_(E,{toolbars:n}),A("div",null,[_(C,{loading:t.value},null,8,["loading"]),a.value.length>0?(g(),j(v,{key:0,data:a.value,onItemClick:o},{folder:k(({item:R})=>[_(I,{icon:R.opened?"arrow-bottom":"arrow-right",onClick:Se(D=>R.opened=!R.opened,["stop"])},null,8,["icon","onClick"]),R.root?(g(),j(I,{key:0,icon:R.icon},null,8,["icon"])):R.icon?(g(),j(O,{key:1,icon:R.icon},null,8,["icon"])):(g(),j(I,{key:2,icon:"list"})),A("label",null,B(R.name),1),R.path?(g(),w("span",n1,"("+B(R.path)+")",1)):X("",!0)]),file:k(({item:R})=>[_(I),_(I,{icon:"todo"}),A("label",a1,B(R.text),1)]),_:1},8,["data"])):(g(),j(T,{key:1,text:h(c)("message.empty","TODO")},null,8,["text"]))])])}}};var i1=q(s1,[["__scopeId","data-v-29308d9b"]]),o1=Object.freeze(Object.defineProperty({__proto__:null,default:i1},Symbol.toStringTag,{value:"Module"}));const r1={class:"magic-toolbar"},l1={class:"magic-toolbar-header"},c1={class:"magic-toolbar-header-buttons"},u1={setup(e){const t=U(null),n=Je([{type:"api",title:c("api.title"),icon:"parameter",component:$e(te("magic-api-info"))},{id:"response",type:"api",title:c("toolbars.response"),icon:"run",component:$e(te("magic-api-response"))},{type:"function",title:c("fn.title"),icon:"parameter",component:$e(te("magic-function-info"))},{type:"group-api",title:c("message.group",c("api.name")),icon:"parameter",component:$e(te("magic-api-group"))},{id:"debug",type:["api","task"],title:c("toolbars.debug"),icon:"debug-info",component:$e(te("magic-debug"))},{id:"log",title:c("toolbars.log"),icon:"log",component:$e(te("magic-log"))},{type:"api",title:c("toolbars.global"),icon:"settings",component:$e(te("magic-global"))},{id:"todo",title:"TODO",icon:"todo",component:$e(te("magic-todo"))},{id:"history",title:c("toolbars.history"),icon:"history",component:$e(te("magic-backup"))},{id:"event",title:c("toolbars.event"),icon:"event",component:$e(te("magic-event")),style:{float:"right"}}]);M.PLUGINS.filter(r=>r.toolbars&&r.toolbars.length>0).map(r=>r.toolbars).forEach(r=>r.forEach(l=>{n.unshift({id:l.id,type:l.type,icon:l.icon,title:c(l.title),component:$e(l.component)})}));const a=U({}),s=U({});Ke("opened",a),Ke("info",s);const i=(r,l)=>{n.forEach(u=>u.show=u.type===void 0||(Array.isArray(u.type)?u.type.find(p=>p.type===r):u.type===r)),t.value&&l&&t.value.select(n.findIndex(u=>u.show))};i("");const o=r=>{const l=n.findIndex(u=>u.id===r.id);l>-1&&n.splice(l,1),t.value.select(-1)};return S.$on(F.ADD_FOOTER_TOOLBAR,r=>{r.id&&o(r),t.value.select(n.push(r)-1)}),S.$on(F.OPEN_EMPTY,()=>i("")),S.$on(F.OPEN,(r,l)=>{r.responseBlobValue=null,a.value=r,s.value=r.item,i(r.type,l)}),S.$on(F.OPEN_GROUP,r=>{i("group-"+r.type,!0),s.value=r}),S.$on(F.SWITCH_TOOLBAR,r=>{const l=n.findIndex(u=>u.id===r);l>-1&&t.value.select(l)}),(r,l)=>{const u=b("magic-icon"),p=b("magic-resizer"),m=b("magic-navbar-item"),f=b("magic-navbar");return g(),w("div",r1,[_(f,{direction:"horizontal",ref_key:"navbar",ref:t},{default:k(()=>[(g(!0),w(Z,null,he(h(n),(y,E)=>(g(),j(m,dt({key:E},y),{default:k(()=>[_(p,{direction:"y",max:700,min:150,value:250},{default:k(()=>[A("div",l1,[A("label",null,B(y.title),1),A("div",c1,[_(u,{icon:"minimize",size:"14px",title:h(c)("message.hide"),onClick:l[0]||(l[0]=C=>t.value.select(-1))},null,8,["title"]),y.allowClose?(g(),j(u,{key:0,icon:"close",title:h(c)("editor.tab.close"),onClick:C=>o(y)},null,8,["title","onClick"])):X("",!0)])]),(g(),j(te(y.component),ns(as(y.data)),null,16))]),_:2},1024)]),_:2},1040))),128))]),_:1},512)])}}};var p1=q(u1,[["__scopeId","data-v-200d8d00"]]),d1=Object.freeze(Object.defineProperty({__proto__:null,default:p1},Symbol.toStringTag,{value:"Module"}));const _1={class:"magic-function-info"},h1={setup(e){const t=se("info"),n=[{title:c("fn.parameter"),component:te("magic-function-parameter")},{title:c("fn.description"),component:te("magic-api-description")}];return(a,s)=>{const i=b("magic-select"),o=b("magic-input"),r=b("magic-navbar-item"),l=b("magic-navbar");return g(),w(Z,null,[A("div",_1,[A("form",null,[A("label",null,B(h(c)("fn.returnValue")),1),_(i,{width:"100px",options:a.$FUNCTION_RETURN_TYPES,"default-select":a.$DEFAULT_FUNCTION_RETURN_TYPE,value:h(t).method,"onUpdate:value":s[0]||(s[0]=u=>h(t).method=u)},null,8,["options","default-select","value"]),A("label",null,B(h(c)("fn.form.name")),1),_(o,{value:h(t).name,"onUpdate:value":s[1]||(s[1]=u=>h(t).name=u),placeholder:h(c)("fn.form.placeholder.name"),width:"200px"},null,8,["value","placeholder"]),A("label",null,B(h(c)("fn.form.path")),1),_(o,{value:h(t).path,"onUpdate:value":s[2]||(s[2]=u=>h(t).path=u),placeholder:h(c)("fn.form.placeholder.path"),width:"auto",style:{flex:"1"}},null,8,["value","placeholder"])])]),_(l,{direction:"horizontal",ref:"navbar",style:{flex:"1"},"allow-close":!1},{default:k(()=>[(g(),w(Z,null,he(n,(u,p)=>_(r,{key:p,title:u.title},{default:k(()=>[(g(),j(te(u.component),{info:h(t)},null,8,["info"]))]),_:2},1032,["title"])),64))]),_:1},512)],64)}}};var f1=q(h1,[["__scopeId","data-v-bc8654ec"]]),m1=Object.freeze(Object.defineProperty({__proto__:null,default:f1},Symbol.toStringTag,{value:"Module"}));const g1={class:"magic-panel-function"},v1={setup(e){const t=se("info"),n=U(-1);return(a,s)=>{const i=b("magic-panel-common-toolbar"),o=b("magic-input"),r=b("magic-table-column"),l=b("magic-select"),u=b("magic-table");return g(),w("div",g1,[_(i,{index:n.value,"onUpdate:index":s[0]||(s[0]=p=>n.value=p),value:h(t).parameters},null,8,["index","value"]),_(u,{data:h(t).parameters,border:"",onClickRow:s[1]||(s[1]=p=>n.value=p)},{default:k(()=>[_(r,{title:h(c)("message.name"),width:"20%"},{default:k(({row:p})=>[_(o,{value:p.name,"onUpdate:value":m=>p.name=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"]),_(r,{title:h(c)("message.parameterType"),width:"20%"},{default:k(({row:p})=>[_(l,{options:a.$FUNCTION_RETURN_TYPES,value:p.type,"onUpdate:value":m=>p.type=m,"default-select":a.$DEFAULT_FUNCTION_RETURN_TYPE,border:!1},null,8,["options","value","onUpdate:value","default-select"])]),_:1},8,["title"]),_(r,{title:h(c)("message.description"),flex:"1"},{default:k(({row:p})=>[_(o,{value:p.description,"onUpdate:value":m=>p.description=m,border:!1},null,8,["value","onUpdate:value"])]),_:1},8,["title"])]),_:1},8,["data"])])}}};var E1=Object.freeze(Object.defineProperty({__proto__:null,default:v1},Symbol.toStringTag,{value:"Module"}));const b1={setup(e){const t=U(!1),n=U([]);S.$on(F.DO_DOWNLOAD,()=>t.value=!0);const a=()=>{n.value.length?z.sendJson("/download",n.value,{method:"post",headers:{"Content-Type":"application/json"},transformRequest:[],responseType:"blob"}).success(s=>{Hn(s,"magic-api.zip"),S.status("message.exported"),t.value=!1}):ve.alert(c("message.exportNoneSelect"))};return(s,i)=>{const o=b("magic-resource-choose"),r=b("magic-button"),l=b("magic-button-group"),u=b("magic-dialog");return g(),j(u,{title:h(c)("message.export"),value:t.value,"onUpdate:value":i[5]||(i[5]=p=>t.value=p),shade:!1,padding:"0",width:"480px",top:"60px",overflow:"hidden"},{default:k(()=>[_(o,{ref:"resource",value:n.value,"onUpdate:value":i[0]||(i[0]=p=>n.value=p)},null,8,["value"]),_(l,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:k(()=>[_(r,{value:h(c)("message.expand"),onOnClick:i[1]||(i[1]=p=>s.$refs.resource.expand(!0))},null,8,["value"]),_(r,{value:h(c)("message.collapse"),onOnClick:i[2]||(i[2]=p=>s.$refs.resource.expand(!1))},null,8,["value"]),_(r,{value:h(c)("message.selectAll"),onOnClick:i[3]||(i[3]=p=>s.$refs.resource.selectAll(!0))},null,8,["value"]),_(r,{value:h(c)("message.deselectAll"),onOnClick:i[4]||(i[4]=p=>s.$refs.resource.selectAll(!1))},null,8,["value"]),_(r,{type:"active",value:h(c)("message.export"),onOnClick:a},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var y1=q(b1,[["__scopeId","data-v-097eba83"]]),T1=Object.freeze(Object.defineProperty({__proto__:null,default:y1},Symbol.toStringTag,{value:"Module"}));const S1="modulepreload",da={},O1="./",_a=function(t,n){return!n||n.length===0?t():Promise.all(n.map(a=>{if(a=`${O1}${a}`,a in da)return;da[a]=!0;const s=a.endsWith(".css"),i=s?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${a}"]${i}`))return;const o=document.createElement("link");if(o.rel=s?"stylesheet":S1,s||(o.as="script",o.crossOrigin=""),o.href=a,document.head.appendChild(o),s)return new Promise((r,l)=>{o.addEventListener("load",r),o.addEventListener("error",()=>l(new Error(`Unable to preload CSS for ${a}`)))})})).then(()=>t())};const x1={class:"magic-header"},R1={class:"magic-logo"},A1=["title"],I1=["title"],C1={class:"magic-header-title"},L1=["title","onClick"],N1={class:"magic-skin-selector"},w1=["onClick"],k1={class:"magic-locale-selector"},D1=["onClick"],M1={props:{title:{type:String,default:"magic-api"},themeStyle:Object,header:Object},setup(e){const t=e,n={"../../../scripts/i18n/en.js":()=>_a(()=>Promise.resolve().then(function(){return Ts}),void 0),"../../../scripts/i18n/zh-cn.js":()=>_a(()=>Promise.resolve().then(function(){return Ss}),void 0)},a=Je([]);for(let y in n)n[y]().then(E=>{a.push({id:y.replace(/(.*?i18n\/)(.*)(\.js)/g,"$2"),name:E.default.name})});const s=M.MAGIC_API_VERSION_TEXT,i=U(!1),o=U(!1),r=U({}),l=U("");S.$on(F.OPEN_EMPTY,()=>{l.value="",r.value={}}),S.$on(F.OPEN,y=>{r.value=y,l.value=y.path(),tt(y,()=>{r.value===y&&(l.value=y.path())})});const u=me(()=>[{name:`${c("message.run")}(Ctrl + Q)`,icon:"run",disabled:()=>r.value.runnable!==!0||r.value.running===!0,onClick:()=>S.$emit(F.DO_TEST)},{name:`${c("message.save")}(Ctrl + S)`,icon:"save",onClick:()=>S.$emit(F.DO_SAVE,!0)},{name:`${c("message.search")}(Ctrl + Shift + F)`,icon:"search",onClick:()=>S.$emit(F.DO_SEARCH)},{name:c("message.upload"),icon:"upload",onClick:()=>S.$emit(F.DO_UPLOAD)},{name:c("message.export"),icon:"download",onClick:()=>S.$emit(F.DO_DOWNLOAD)},{name:c("message.push"),icon:"push",onClick:()=>S.$emit(F.DO_PUSH)},{name:c("message.skin"),displayKey:"skin",icon:"skin",onClick:()=>{i.value=!i.value,o.value=!1}},{name:c("message.i18n"),icon:"i18n",onClick:()=>{o.value=!o.value,i.value=!1}},{name:c("message.reload"),icon:"refresh",onClick:()=>S.$emit(F.RELOAD_RESOURCES)}].filter(y=>t.header[y.displayKey]!==!1)),p=y=>{M.THEME=y,S.$emit(F.SWITCH_THEME,y),S.status("message.switchSkin",!0,y),Be.setTheme(y),Object.keys(t.themeStyle).forEach(C=>t.themeStyle[C]=void 0);let E=Kt[y];Fe.set(M.STORE.theme,y),Object.keys(E).forEach(C=>t.themeStyle[`--${C}`]=E[C]),i.value=!1},m=Fe.get(M.STORE.theme);Kt[m]?p(m):p(M.THEME);const f=({id:y,name:E})=>{o.value=!1,Fe.set("locale",y),ve.confirm(c("message.tips"),c("message.switchLocale",E),()=>{location.reload()})};return(y,E)=>{const C=b("magic-icon");return g(),w(Z,null,[A("div",x1,[A("div",R1,[A("label",{title:e.title},B(e.title),9,A1),A("label",{title:h(s)},B(h(s)),9,I1)]),A("div",C1,B(l.value),1),A("ul",null,[(g(!0),w(Z,null,he(h(u),(I,O)=>(g(),w("li",{key:O,title:I.name,onClick:Se(v=>I.disabled!==!0&&I.onClick(),["stop"]),class:Ee({disabled:I.disabled&&I.disabled()===!0})},[_(C,{icon:I.icon},null,8,["icon"])],10,L1))),128))])]),yt(A("div",N1,[A("ul",null,[(g(!0),w(Z,null,he(Object.keys(h(Kt)),I=>(g(),w("li",{key:"theme_"+I,onClick:O=>p(I)},B(I),9,w1))),128))])],512),[[$t,i.value]]),yt(A("div",k1,[A("ul",null,[(g(!0),w(Z,null,he(h(a),I=>(g(),w("li",{key:"locale_"+I.id,onClick:O=>f(I)},B(I.name),9,D1))),128))])],512),[[$t,o.value]])],64)}}};var P1=q(M1,[["__scopeId","data-v-4e11654b"]]),U1=Object.freeze(Object.defineProperty({__proto__:null,default:P1},Symbol.toStringTag,{value:"Module"}));const $1={class:"magic-push-form"},B1={setup(e){const t=U(!1),n=U([]),a=U("http://host:port/_magic-api-sync"),s=U("123456789");S.$on(F.DO_PUSH,()=>t.value=!0);const i=r=>{z.sendJson("/push",n.value,{method:"post",headers:{"magic-push-target":a.value,"magic-push-secret-key":s.value,"magic-push-mode":r,"Content-Type":"application/json"},transformRequest:[]}).success(()=>{const l=c(r==="full"?"push.full":"push.increment");S.status("push.success",!0,l),t.value=!1,S.$emit(F.LOAD_RESOURCES)})},o=r=>{n.value.length?r==="full"?ve.confirm(c("message.push"),c("message.pushWarning"),()=>i(r)):i(r):ve.alert(c("message.pushNoneSelect"))};return(r,l)=>{const u=b("magic-resource-choose"),p=b("magic-input"),m=b("magic-button"),f=b("magic-button-group"),y=b("magic-dialog");return g(),j(y,{title:h(c)("message.push"),value:t.value,"onUpdate:value":l[7]||(l[7]=E=>t.value=E),shade:!1,padding:"0",width:"450px",top:"60px",overflow:"hidden"},{default:k(()=>[_(u,{ref:"resource",value:n.value,"onUpdate:value":l[0]||(l[0]=E=>n.value=E)},null,8,["value"]),A("div",$1,[A("div",null,[A("label",null,B(h(c)("message.remote"))+"\uFF1A",1),_(p,{value:a.value,"onUpdate:value":l[1]||(l[1]=E=>a.value=E)},null,8,["value"])]),A("div",null,[A("label",null,B(h(c)("message.secret"))+"\uFF1A",1),_(p,{value:s.value,"onUpdate:value":l[2]||(l[2]=E=>s.value=E),type:"password"},null,8,["value"])])]),_(f,{align:"right",style:{margin:"5px 0","margin-right":"5px"}},{default:k(()=>[_(m,{value:h(c)("message.selectAll"),onOnClick:l[3]||(l[3]=E=>r.$refs.resource.selectAll(!0))},null,8,["value"]),_(m,{value:h(c)("message.deselectAll"),onOnClick:l[4]||(l[4]=E=>r.$refs.resource.selectAll(!1))},null,8,["value"]),_(m,{value:h(c)("push.increment"),onOnClick:l[5]||(l[5]=E=>o("increment")),type:"active"},null,8,["value"]),_(m,{value:h(c)("push.full"),onOnClick:l[6]||(l[6]=E=>o("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var F1=q(B1,[["__scopeId","data-v-e421c192"]]),H1=Object.freeze(Object.defineProperty({__proto__:null,default:F1},Symbol.toStringTag,{value:"Module"}));const j1={class:"magic-search-result"},V1=["onClick","onDblclick"],G1=["innerHTML"],z1={class:"name"},Y1=["textContent"],q1={class:"display-text"},K1={setup(e){const t=U(""),n=U(!1),a=se("findResource"),s=se("service"),i=U([]),o=U({}),r=me(()=>o.value.name+(o.value.path?`(${o.value.path})`:"")),l=I=>{I.script||z.sendGet(`/resource/file/${I.id}`).success(O=>{I.script=O.script})},u=(I,O)=>{o.value=I,l(I),O&&(S.$emit(F.OPEN_WITH_ID,I.id),n.value=!1,i.value=[],t.value="")};S.$on(F.DO_SEARCH,()=>{i.value=[],t.value="",n.value=!n.value});let p=null;const m=I=>{const O=[...I.childNodes],v=[];for(;O.length;){const T=O.shift();T.nodeType===T.TEXT_NODE?v.push(T):O.unshift(...T.childNodes)}return v},f=I=>{let O=0;return I.map(v=>{let T=O,R=O+v.wholeText.length;return O=R,{text:v.wholeText,startIdx:T,endIdx:R}})},y=(I,O)=>{const v=[..."[]()?.+*^${}:"].reduce((R,D)=>(R[D]=!0,R),{});O=O.split("").map(R=>v[R]?`\\${R}`:R).join("[\\s\\n]*");const T=new RegExp(O,"gmi");return[...I.matchAll(T)]},E=(I,O,v)=>{for(let T=v.length-1;T>=0;T--){const R=v[T],D=R.index,L=D+R[0].length;for(let N=0;N=L)break;let ie=I[N];const Q=Math.max(0,D-Y),ye=Math.min(re,L)-Y-Q;Q>0&&(ie=ie.splitText(Q)),ye{if(!O)return I;const v=document.createElement("div");v.innerHTML=I;const T=m(v),R=f(T),D=R.map(({text:N})=>N).join(""),L=y(D,O);return E(T,R,L),v.innerHTML};return tt(t,I=>{const O=I.trim();clearTimeout(p),O&&(p=setTimeout(()=>{z.send("/search",{keyword:O},{method:"POST"}).success(async v=>{const T=[];for(let R=0;R0&&(o.value=T[0],l(o.value)),i.value=T})},600))}),(I,O)=>{const v=b("magic-input"),T=b("magic-text-icon"),R=b("magic-monaco-editor"),D=b("magic-dialog");return g(),j(D,{title:h(c)("message.search"),value:n.value,"onUpdate:value":O[1]||(O[1]=L=>n.value=L),shade:!1,padding:"0",width:"700px",top:"60px"},{default:k(()=>[_(v,{value:t.value,"onUpdate:value":O[0]||(O[0]=L=>t.value=L),placeholder:h(c)("message.searchText")},null,8,["value","placeholder"]),i.value.length>0?(g(),w(Z,{key:0},[A("div",j1,[(g(!0),w(Z,null,he(i.value,(L,N)=>(g(),w("div",{key:N,class:Ee(["magic-search-result-item",{selected:o.value===L}]),onClick:$=>u(L),onDblclick:$=>u(L,!0)},[A("div",{class:"label",innerHTML:L.text},null,8,G1),A("div",z1,[_(T,{icon:L.icon},null,8,["icon"]),_e(B(L.name),1)]),A("div",{class:"line",textContent:B(L.line)},null,8,Y1)],42,V1))),128))]),A("div",q1,[_(T,{icon:o.value.icon},null,8,["icon"]),_e(B(h(r)),1)]),_(R,{readonly:"",value:o.value.script,language:o.value.language,style:{width:"100%",height:"300px"},matches:t.value},null,8,["value","language","matches"])],64)):X("",!0)]),_:1},8,["title","value"])}}};var W1=q(K1,[["__scopeId","data-v-4bbc2d10"]]),X1=Object.freeze(Object.defineProperty({__proto__:null,default:W1},Symbol.toStringTag,{value:"Module"}));const J1={setup(e){const t=U(!1),n=U(null),a=s=>{if(n.value){const i=new FormData;i.append("file",n.value,n.value.name),i.append("mode",s);const o=()=>{z.send("/upload",i,{method:"post",headers:{"Content-Type":"multipart/form-data"}}).success(r=>{const l=c(s==="full"?"upload.full":"upload.increment");r?(S.status("upload.success",!0,l),t.value=!1,S.$emit(F.LOAD_RESOURCES)):S.status("upload.failed",!1,l)})};s==="full"?ve.confirm(c("message.upload"),c("message.uploadWarning"),o):o()}};return S.$on(F.DO_UPLOAD,()=>t.value=!0),(s,i)=>{const o=b("magic-file"),r=b("magic-button"),l=b("magic-button-group"),u=b("magic-dialog");return g(),j(u,{title:h(c)("message.upload"),value:t.value,"onUpdate:value":i[3]||(i[3]=p=>t.value=p)},{default:k(()=>[_(o,{value:n.value,"onUpdate:value":i[0]||(i[0]=p=>n.value=p),accept:"application/x-zip-compressed"},null,8,["value"]),_(l,{align:"right",style:{"margin-top":"5px"}},{default:k(()=>[_(r,{value:h(c)("upload.increment"),type:"active",onClick:i[1]||(i[1]=p=>a("increment"))},null,8,["value"]),_(r,{value:h(c)("upload.full"),onClick:i[2]||(i[2]=p=>a("full"))},null,8,["value"])]),_:1})]),_:1},8,["title","value"])}}};var Q1=Object.freeze(Object.defineProperty({__proto__:null,default:J1},Symbol.toStringTag,{value:"Module"}));const Z1={class:"magic-data-resource"},ep={class:"magic-data-resource-header"},tp=["title","onClick"],np={key:1},ap=["onContextmenu"],sp={props:{type:String,title:String,data:Array},setup(e){const t=e,n=te(`magic-datasource-${t.type}`),a=U(!1),s=U(""),i=U({}),o=U(""),r=U(""),l=U(!0),u=me(()=>t.data&&t.data.length>0&&t.data[0].children&&t.data[0].children.filter(T=>T.name.indexOf(o.value)>-1||T.key.indexOf(o.value)>-1)||[]),p=se("service")[t.type],m=[{name:c("message.createDataSource",t.title),icon:"plus",onClick:()=>{s.value=c("message.createDataSource",t.title),r.value=c("message.create"),i.value={},a.value=!0,l.value=!1}}],f=()=>{p.doTest(i.value)},{proxy:y}=St(),E=(T,R,D)=>{T.groupId=`${t.type}:0`,z.sendJson(`/resource/file/${t.type}/save`,T).success(L=>{if(L){T.id!==L&&S.loading(3),T.id=L,S.status(R+"Success",!0,D),t.data[0].children=t.data[0].children||[];const N=t.data[0].children.find($=>$.id===T.id);N?Object.keys(T).forEach($=>N[$]=T[$]):t.data[0].children.push(T),a.value=!1}else S.status(R+"Failed",!1,D),y.$alert(c(R+"Failed",D))})},C=()=>{const T=pe({},i.value);E(T,"message.save",`${t.title}\u300C${I(T)}\u300D`)},I=T=>`${T.name}(${T.key})`,O=T=>{const R=t.data[0].children.findIndex(D=>D===T);R>-1&&t.data[0].children.splice(R,1)},v=(T,R)=>{const D=[];T.id&&([{label:c("message.update"),icon:"update",divided:!0,onClick:()=>{l.value=!0,s.value=c("message.updateTips",t.title),r.value=c("message.update"),a.value=!0,S.status("message.getDetail",`${t.title}\u300C${I(T)}\u300D`),z.sendGet(`/resource/file/${T.id}`).success(L=>i.value=L).end(()=>{l.value=!1})}},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const L=`${t.title}\u300C${I(T)}\u300D`;y.$confirm(c("message.deleteTips",t.title),c("message.deleteConfirm",L),()=>{z.send("/resource/delete",{id:T.id}).success(N=>{S.status(N?"message.deleteSuccess":"message.deleteFailed",N,L),N?O(T):y.$alert(N?"message.deleteSuccess":"message.deleteFailed",L)})})}},{label:c("message.copy"),icon:"copy",divided:!0,onClick:()=>{z.send(`/resource/file/${T.id}`).success(L=>{L.id=void 0,L.name=L.name+`(${c("message.copy")})`,L.key=L.key+"_copy",E(L,"datasource.copy",`${t.title}\u300C${I(L)}\u300D`)})}}].forEach(L=>D.push(L)),T.lock===M.LOCKED?D.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>z.sendPost("/resource/unlock",{id:T.id}).success(L=>{S.status(L?"message.unlockSuccess":"message.unlockFailed",L,`${t.title}\u300C${I(T)}\u300D`),L&&(T.lock=M.UNLOCK)})}):D.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>z.sendPost("/resource/lock",{id:T.id}).success(L=>{S.status(L?"message.lockSuccess":"message.lockFailed",L,`${t.title}\u300C${I(T)}\u300D`),L&&(T.lock=M.LOCKED)})})),M.PLUGINS.forEach(L=>{if(L.contextmenu&&typeof L.contextmenu=="function"){const N=L.contextmenu(Ue(pe({},T),{menuType:"datasource"}));N&&N.length&&N.forEach($=>D.push($))}}),D.length&&y.$contextmenu({menus:D,event:R})};return(T,R)=>{const D=b("magic-icon"),L=b("magic-input"),N=b("magic-empty"),$=b("magic-button"),Y=b("magic-button-group"),re=b("magic-loading"),ie=b("magic-dialog");return g(),w(Z,null,[A("div",Z1,[A("div",ep,[A("ul",null,[(g(),w(Z,null,he(m,(Q,ye)=>(g(),w(Z,{key:ye},[!Q.show||Q.show()?(g(),w("li",{key:0,title:Q.name||"",onClick:Te=>Q.onClick&&Q.onClick(),class:Ee({separator:Q.separator})},[Q.separator?X("",!0):(g(),j(D,{key:0,icon:Q.icon},null,8,["icon"]))],10,tp)):X("",!0)],64))),64))]),_(L,{value:o.value,"onUpdate:value":R[0]||(R[0]=Q=>o.value=Q),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),_(D,{icon:"search",size:"14px"})]),h(u).length===0?(g(),j(N,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(g(),w("ul",np,[(g(!0),w(Z,null,he(h(u),(Q,ye)=>(g(),w("li",{key:ye,onContextmenu:Se(Te=>v(Q,Te),["prevent"])},[_(D,{icon:"datasource"}),A("label",null,B(Q.name||h(c)("datasource.primary")),1),A("span",null,"("+B(Q.key||"default")+")",1),Q.lock==="1"?(g(),j(D,{key:0,icon:"lock"})):X("",!0)],40,ap))),128))]))]),_(ie,{value:a.value,"onUpdate:value":R[4]||(R[4]=Q=>a.value=Q),title:s.value,width:"550px"},{default:k(()=>[_(re,{loading:l.value,style:{"min-height":"200px"}},{default:k(()=>[(g(),j(te(h(n)),{info:i.value},null,8,["info"])),_(Y,{align:"right",style:{padding:"5px 0"}},{default:k(()=>[_($,{value:r.value,type:"active",onOnClick:R[1]||(R[1]=Q=>C())},null,8,["value"]),_($,{value:h(c)("datasource.test"),onOnClick:R[2]||(R[2]=Q=>f())},null,8,["value"]),_($,{value:h(c)("message.cancel"),onOnClick:R[3]||(R[3]=Q=>a.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["loading"])]),_:1},8,["value","title"])],64)}}};var ip=q(sp,[["__scopeId","data-v-2ca47240"]]),op=Object.freeze(Object.defineProperty({__proto__:null,default:ip},Symbol.toStringTag,{value:"Module"}));const Ha=e=>(Dn("data-v-f15aae88"),e=e(),Mn(),e),rp={class:"magic-login"},lp={class:"magic-login-box"},cp=Ha(()=>A("div",{class:"magic-login-logo"},null,-1)),up={class:"magic-login-text"},pp=_e("Magic-API "),dp={key:0},_p={key:0,class:"magic-login-row error"},hp={class:"magic-login-row"},fp={class:"magic-login-row"},mp={class:"magic-login-row"},gp={class:"magic-login-copyright"},vp=Ha(()=>A("a",{href:"https://ssssssss.org.cn",target:"_blank"},"ssssssss.org.cn",-1)),Ep=_e(" All rights reserved."),bp={props:{value:Boolean,error:String},emits:["update:value","update:error"],setup(e,{emit:t}){const n=U(""),a=U("");S.$on();const s=()=>{n.value&&a.value&&(t("update:error",null),z.sendPost("/login",{username:n.value,password:a.value}).success((i,o)=>{i&&(t("update:value",!1),M.HEADER_MAGIC_TOKEN_VALUE=o.headers[M.HEADER_MAGIC_TOKEN],Fe.set(M.STORE.token,M.HEADER_MAGIC_TOKEN_VALUE),S.$emit(F.LOGINED),n.value="",a.value="")}).exception((i,o)=>{i!=401&&(o=translateCode(i,o)),t("update:error",o)}).error((i,o,r)=>{if(r){let l="";r.response?l=JSON.stringify(r.response.data||"")||c("code.invalid",r.response.status):l=r.message,t("update:error",l)}}))};return(i,o)=>{const r=b("magic-icon"),l=b("magic-input"),u=b("magic-button");return g(),w("div",rp,[A("div",lp,[cp,A("div",up,[pp,h(M).MAGIC_API_VERSION_TEXT?(g(),w("span",dp,"v"+B(h(M).MAGIC_API_VERSION_TEXT),1)):X("",!0)]),e.error?(g(),w("div",_p,[_(r,{icon:"error"}),A("span",null,B(e.error),1)])):X("",!0),A("div",hp,[_(r,{icon:"user"}),_(l,{onEnter:s,value:n.value,"onUpdate:value":o[0]||(o[0]=p=>n.value=p),placeholder:h(c)("message.username")},null,8,["value","placeholder"])]),A("div",fp,[_(r,{icon:"password"}),_(l,{onEnter:s,value:a.value,"onUpdate:value":o[1]||(o[1]=p=>a.value=p),type:"password",placeholder:h(c)("message.password")},null,8,["value","placeholder"])]),A("div",mp,[_(u,{value:h(c)("message.login"),onOnClick:s},null,8,["value"])])]),A("div",gp,[_e("Copyright \xA9 2020-"+B(new Date().getYear()+1900)+" ",1),vp,Ep])])}}};var yp=q(bp,[["__scopeId","data-v-f15aae88"]]),Tp=Object.freeze(Object.defineProperty({__proto__:null,default:yp},Symbol.toStringTag,{value:"Module"}));function Sp(e,t){S.$emit(F.SWITCH_TOOLBAR,"log"),t.headers[M.HEADER_REQUEST_CLIENT_ID]=M.CLIENT_ID,t.headers[M.HEADER_REQUEST_SCRIPT_ID]=e.item.id,t.headers[M.HEADER_MAGIC_TOKEN]=M.HEADER_MAGIC_TOKEN_VALUE,t.headers[M.HEADER_REQUEST_BREAKPOINTS]=(e.decorations||[]).filter(i=>i.options.linesDecorationsClassName==="breakpoints").map(i=>i.range.startLineNumber).join(","),t.responseType="blob",t.validateStatus=()=>!0;let n=0;t.transformResponse=[function(i,o){return n=i.size,o["content-disposition"]?new Promise(r=>r(i)):new Promise(r=>{const l=new FileReader;l.readAsText(i),l.onload=function(){try{JSON.parse(this.result),r(this.result)}catch{r(i)}}})}];const a=e.path();S.status("api.test.begin",!0,a);const s=new Date().getTime();z.execute(t).then(i=>i.data.then(o=>{if(S.status("api.test.success",!0,a,i.status,ii(n),new Date().getTime()-s),e.running=!1,e.responseBlob=o instanceof Blob)e.responseBlobValue=o,e.item.responseBody=null,e.item.responseBodyDefinition=null,e.responseBodyTree=null;else{e.item.responseBody=li(o);let r=Ua(e.item.responseBody,e.item.responseBodyDefinition);e.item.responseBodyDefinition=r,e.responseBodyTree=an(r)}e.responseHeaders=i.headers,be(()=>S.$emit(F.SWITCH_TOOLBAR,"response"))})).catch(i=>{S.status("api.test.requestError",!1,a),e.running=!1,z.processError(i)})}function Op(e){e.running=!0;const t=e.item,n={baseURL:M.SERVER_URL,url:e.requestPath(),method:t.method,headers:{},responseType:"json",withCredentials:!0},a=i=>i.filter(o=>o.value&&o.value.trim()).forEach(o=>n.url=n.url.replace(new RegExp(`\\{${o.name}}`,"g"),o.value.trim()));if(e.getGroups().filter(i=>i.paths&&i.paths.length>0).map(i=>i.paths).forEach(i=>a(i)),a(t.paths||[]),n.url.indexOf("{")>-1){ve.alert(c("api.test.missPath")),e.running=!1;return}M.GLOBAL.headers.filter(i=>i.name).forEach(i=>n.headers[i.name]=i.value),t.headers.filter(i=>i.name).forEach(i=>n.headers[i.name]=i.value);const s={};if(M.GLOBAL.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),t.parameters.filter(i=>i.name).forEach(i=>s[i.name]=i.value),Object.values(s).some(i=>i instanceof FileList||i instanceof File)){n.headers["Content-Type"]="multipart/form-data";const i=new FormData;Object.keys(s).forEach(o=>{let r=s[o];r instanceof FileList?Array.from(r).forEach(l=>i.append(o,l,l.name)):r instanceof File?i.append(o,r,r.name):i.append(o,r)}),n.data=i}else{n.headers["Content-Type"]="application/x-www-form-urlencoded",n.method!=="POST"||t.requestBody?n.params=s:n.data=s;try{if(t.requestBody){const i=JSON.parse(t.requestBody);(Array.isArray(i)&&i.length>0||typeof i=="object"&&Object.keys(i).length>0)&&(n.params=s,n.data=t.requestBody,n.headers["Content-Type"]="application/json",n.transformRequest=[])}}catch{e.running=!1,ve.alert(c("api.test.requestBodyError"))}}Sp(e,n)}var xp={doTest:Op,getIcon:e=>e.method||"GET",runnable:!0,requirePath:!0,name:c("api.name"),merge:e=>(e.method=e.method||M.DEFAULT_REQUEST_METHOD,e.parameters=e.parameters||[],e.headers=e.headers||[],e.paths=e.paths||[],e.options=e.options||[],e),processSave:e=>{const t=M.config.persistenceResponseBody!==!1;return{id:e.id,name:e.name,path:e.path,groupId:e.groupId,lock:e.lock,method:e.method,description:e.description,createBy:e.createBy,createDate:e.createDate,properties:e.properties,script:e.script,responseBody:t&&e.responseBody||void 0,responseBodyDefinition:t&&e.responseBodyDefinition||void 0,requestBody:e.requestBody,requestBodyDefinition:e.requestBodyDefinition,parameters:e.parameters.filter(n=>n.name),headers:e.headers.filter(n=>n.name),paths:e.paths.filter(n=>n.name),options:e.options.filter(n=>n.name)}}},Rp={getIcon:e=>"function",name:c("fn.name"),runnable:!1,requirePath:!0,merge:e=>(e.parameters=e.parameters||[],e)};let Nn;ne.setExtensionAttribute("org.ssssssss.magicapi.modules.db.SQLModule",()=>{var e;return Nn&&(((e=Nn("datasource")[0])==null?void 0:e.children)||[]).filter(t=>t.key).map(t=>({name:t.key,type:"org.ssssssss.magicapi.modules.db.SQLModule",comment:t.name}))||[]});var Ap={injectResources:e=>Nn=e,requireScript:!1,doTest:e=>{z.sendJson("/datasource/jdbc/test",e).success(t=>{t==="ok"?ve.alert(c("datasource.connected"),c("datasource.test")):ve.alert(c("datasource.connectFailed",t),c("datasource.test"))})}};const Ip={class:"magic-main"},Cp={class:"magic-main-body-wrapper"},Lp={class:"magic-main-body"},Np={ref:"mrl",class:"magic-navbar magic-navbar__vertical"},wp={ref:"mrr",class:"magic-navbar magic-navbar__vertical reverse"},kp={emits:["onLoad"],setup(e,{expose:t,emit:n}){const a=U(!1),s=U({}),i=U(!0),o=U(null),r=(v,T,R)=>{for(let D=0,L=v.length;D{const T=Object.entries(s.value);for(let R=0,D=T.length;R0)return{item:L[0],type:N[0],name:it("/"+L.reverse().map($=>$.name).join("/")),path:it("/"+L.reverse().map($=>$.path||"").join("/"))}}};Ke("findResource",l);const u=[{type:"api",title:c("api.name"),icon:"api"},{type:"function",title:c("fn.name"),icon:"function"}],p={api:xp,function:Rp,datasource:Ap};M.PLUGINS.filter(v=>v.resource&&v.resource.length>0).map(v=>v.resource).forEach(v=>v.forEach(T=>{u.push({type:T.type,icon:T.icon,title:c(T.title)}),T.service&&(p[T.type]=T.service)})),Ke("service",p),u.map(v=>v.type).forEach(v=>s.value[v]=[]);const m=[{type:"datasource",title:c("datasource.title"),icon:"datasource",name:c("datasource.name")}];M.PLUGINS.filter(v=>v.datasources&&v.datasources.length>0).map(v=>v.datasources).forEach(v=>v.forEach(T=>{m.push({type:T.type,icon:T.icon,title:T.title,name:T.name})})),m.map(v=>v.type).forEach(v=>s.value[v]=[]),Ke("resources",()=>{const v=[...u,...m],T=R=>R.length===1&&R[0].id.endsWith(":0")?R[0].children:R;return v.map(R=>({key:R.type,navbar:R,tree:T(JSON.parse(JSON.stringify(s.value[R.type]||[])))}))}),Object.values(p).forEach(v=>v.injectResources&&v.injectResources(T=>s.value[T])),be(()=>a.value=!0);const f=v=>Ue(pe({},v.node),{folder:v.node.parentId!==void 0,opened:v.node.parentId!==void 0&&M.DEFAULT_EXPAND===!0,children:v.children&&v.children.length?v.children.map(T=>f(T)):void 0}),y=(v,T)=>{var D;i.value=!0,s.value={};const R=v?((D=u.find(L=>L.type===v)||m.find(L=>L.type===v))==null?void 0:D.title)||"":c("message.all");S.status("message.getResource",!0,R),z.send("/resource").success(L=>{[...u,...m].filter(N=>!v||N.type===v).forEach(N=>{var $,Y;s.value[N.type]=((Y=($=L[N.type])==null?void 0:$.children)==null?void 0:Y.map(re=>f(re)))||[]}),i.value=!1,S.status("message.getResourceFinish",!0,R),be(()=>T())})};S.$on(F.RELOAD_RESOURCES,()=>{i.value=!0,z.sendGet("/reload").success(()=>{S.status("message.reloadResourceSuccess"),y(null,()=>S.$emit(F.RELOAD_RESOURCES_FINISH))}).end(()=>i.value=!1)});const E=v=>y(v,()=>S.$emit(F.LOAD_RESOURCES_FINISH,v));S.$on(F.LOAD_RESOURCES,E),S.$on(F.RELOAD_RESOURCES_FINISH,E);const C=v=>{let T;return Object.values(s.value).some(R=>{const D=[];if(r(R,v,D)){T=D[0];const L=u.findIndex(N=>N.type===D[D.length-1].type);return o.value&&o.value.select(L),!0}return!1}),T};S.$on(F.SELECT_NAVBAR_BY_ITEM,C),S.$on(F.OPEN_WITH_ID,v=>{const T=C(v);T&&S.$emit(F.OPEN_ITEM,T)}),S.$on(F.LOGOUT,()=>s.value={}),t({loadResources:E}),ht(()=>n("onLoad"));let I=0;const O=()=>{if(++I%u.length===0)try{JSON.parse(Fe.get(M.RECENT_OPENED_TAB)||"[]").forEach(v=>{S.$emit(F.OPEN_WITH_ID,v)})}catch(v){console.error(v)}};return S.$on(F.REFRESH_RESOURCE,v=>{const T=l(v);T&&z.sendGet(`/resource/file/${v}`).success(R=>{Object.keys(R).forEach(D=>T.item[D]=R[D])})}),(v,T)=>{const R=b("magic-resource"),D=b("magic-loading"),L=b("magic-resizer"),N=b("magic-navbar-item"),$=b("magic-navbar"),Y=b("magic-script-editor"),re=b("magic-toolbar"),ie=b("magic-data-resource"),Q=b("magic-search"),ye=b("magic-export"),Te=b("magic-upload"),Rt=b("magic-push"),At=b("magic-recent-opened");return g(),w("div",Ip,[a.value?(g(),j($,{key:0,direction:"vertical",to:v.$refs.mrl,ref_key:"mnl",ref:o,spliter:!0},{default:k(()=>[(g(),w(Z,null,he(u,(ke,Ne)=>_(N,dt({key:Ne},ke),{default:k(()=>[_(L,{max:750,min:270,direction:"x"},{default:k(()=>[_(D,{loading:i.value},{default:k(()=>[_(R,dt(ke,{data:s.value[ke.type],onClose:T[0]||(T[0]=Gn=>v.$refs.mnl.select(-1)),onOnLoad:O}),null,16,["data"])]),_:2},1032,["loading"])]),_:2},1024)]),_:2},1040)),64))]),_:1},8,["to"])):X("",!0),A("div",Cp,[A("div",Lp,[A("div",Np,null,512),_(Y),A("div",wp,null,512)]),_(re)]),_($,{reverse:!0,"default-select":-1,direction:"vertical",to:v.$refs.mrr,spliter:!0},{default:k(()=>[(g(),w(Z,null,he(m,(ke,Ne)=>_(N,{key:Ne,title:ke.title,icon:ke.icon},{default:k(()=>[a.value?(g(),j(L,{key:0,max:420,min:140,value:200,direction:"x",reverse:!0},{default:k(()=>[_(D,{loading:i.value},{default:k(()=>[_(ie,{type:ke.type,title:ke.name,data:s.value[ke.type]},null,8,["type","title","data"])]),_:2},1032,["loading"])]),_:2},1024)):X("",!0)]),_:2},1032,["title","icon"])),64))]),_:1},8,["to"]),_(Q),_(ye),_(Te),_(Rt),_(At)])}}};var Dp=q(kp,[["__scopeId","data-v-718a97af"]]),Mp=Object.freeze(Object.defineProperty({__proto__:null,default:Dp},Symbol.toStringTag,{value:"Module"}));const Pp={class:"magic-recent-opened"},Up=["onClick"],$p={key:1},Bp={key:0,style:{width:"100%",height:"100px"}},Fp={setup(e){const t=Je([]),n=U(!1),a=se("findResource"),s=se("service");try{JSON.parse(Fe.get(M.RECENT_OPENED)||"[]").forEach(r=>t.push(r))}catch{}const i=me(()=>t.map(r=>a(r)).filter(r=>r&&s[r.type])),o=r=>{S.$emit(F.OPEN_WITH_ID,r),n.value=!1};return S.$on(F.DO_RECENT,()=>n.value=!n.value),S.$on(F.CLOSE,r=>{if(r.id){const l=t.findIndex(u=>u===r.id);l>-1&&t.splice(l,1),t.unshift(r.id),t.length>20&&t.splice(t.length-1,1),Fe.set(M.RECENT_OPENED,je(t))}}),(r,l)=>{const u=b("magic-text-icon"),p=b("magic-empty"),m=b("magic-dialog");return g(),j(m,{value:n.value,"onUpdate:value":l[0]||(l[0]=f=>n.value=f),title:h(c)("editor.tooltip.recent"),padding:"0",shade:!1},{default:k(()=>[A("ul",Pp,[(g(!0),w(Z,null,he(h(i),(f,y)=>(g(),w("li",{key:y,onClick:Se(E=>o(f.item.id),["stop"])},[h(s)[f.type]&&h(s)[f.type].getIcon?(g(),j(u,{key:0,icon:h(s)[f.type].getIcon(f.item)},null,8,["icon"])):X("",!0),A("label",null,B(f.name),1),h(s)[f.type].requirePath&&f.path?(g(),w("span",$p,"("+B(f.path)+")",1)):X("",!0)],8,Up))),128))]),h(i).length===0?(g(),w("div",Bp,[_(p,{text:"empty."})])):X("",!0)]),_:1},8,["value","title"])}}};var Hp=q(Fp,[["__scopeId","data-v-44903aa6"]]),jp=Object.freeze(Object.defineProperty({__proto__:null,default:Hp},Symbol.toStringTag,{value:"Module"}));const Vp={class:"magic-resource-header"},Gp=["title","onClick"],zp={key:0},Yp={key:0},qp={class:"magic-create-group"},Kp={key:0},Wp={props:{type:String,title:String,data:Array},emits:["close","onLoad"],setup(e,{emit:t}){const n=e,a=te("magic-backup-file"),s=se("service")[n.type],i=s.requirePath,o=s.getIcon,r=U(""),l=U(!0),u=U(!1),p=U(""),m=U(null),f=se("activateUserFiles"),y=me(()=>l.value?c("resource.createGroup"):c("resource.updateGroup")),E=U(!0),C=U({}),I=U({}),O=U(!1),v=U({type:n.type}),T=me(()=>n.data),R=U([{name:c("resource.createGroup"),icon:"group-add",onClick:()=>{v.value={type:n.type,parentId:"0"},l.value=!0,O.value=!0}},{name:c("resource.header.expand"),icon:"expand-all",onClick:()=>et(T.value,P=>P.opened=!0)},{name:c("resource.header.collapse"),icon:"collapse-all",onClick:()=>et(T.value,P=>P.opened=!1)},{name:c("resource.header.desc"),icon:"descending",show:()=>E.value,onClick:()=>E.value=!1},{name:c("resource.header.asc"),icon:"ascending",show:()=>!E.value,onClick:()=>E.value=!0},{separator:!0},{name:c("resource.header.position"),icon:"position",onClick:()=>{I.value&&C.value&&(S.$emit(F.SELECT_NAVBAR_BY_ITEM,C.value),I.value.scrollIntoView(C.value))}},{name:c("message.hide"),icon:"minimize",onClick:()=>t("close")}]),D=(P,V,G,H,ue)=>{ue=ue||[],V=V||[];let Oe=V.find(at=>at===P||at.id===P);if(Oe)return G.push(Oe.name),ue.push(Oe),s.requirePath&&Oe.path&&H.push(Oe.path),Oe;for(let at=0,on=V.length;at{const G=[],H=[];D(je(P),je(T.value),G,H);const ue=H.length>0?it(`/${H.join("/")}`):"";return V?ue:`/${G.join("/")}${s.requirePath?`(${ue})`:""}`},N=P=>L(P),$=[],Y=(P,V)=>{if(P)if(P.folder)S.$emit(F.OPEN_GROUP,P);else{let G=$.find(H=>H.item==P);G||(G=Je({type:n.type,title:n.title,language:s.language||"magicscript",item:s.merge(P),path:()=>L(P),requestPath:()=>{const H=[];return D(je(P),je(T.value),[],H),it(`/${H.join("/")}`)},getGroups:()=>{const H=[];return D(je(P),je(T.value),[],[],H),H},getIcon:s.getIcon,runnable:s.runnable,doTest:s.doTest,processSave:s.processSave||(H=>H)}),$.push(G)),S.$emit(F.OPEN,G,V)}};S.$on(F.OPEN,P=>C.value=P.item),S.$on(F.OPEN_EMPTY,()=>C.value=null);const{proxy:re}=St(),ie=()=>{const P=pe({},v.value);delete P.children,delete P.opened,delete P.folder,z.sendJson("/resource/folder/save",P).success(V=>{if(V){const G=Ue(pe({},je(v.value)),{folder:!0,id:V});G.options=G.options||[],G.paths=G.paths||[],Te(G),S.status("resource.saveGroupSuccess",!0,n.title,L(V)),O.value=!1,S.loading(2)}else{const G=L(v.value);S.status("resource.saveGroupFailed",!1,n.title,G),re.$alert(c("resource.saveGroupFailed",n.title,G))}})},Q=(P,V)=>new Promise(G=>z.send("/resource/move",{src:P.id,groupId:V.groupId||V.id}).success(H=>{const ue=P.folder?"resource.moveGroup":"resource.moveResource",Oe=L(P);H?(P.folder?S.status(ue+"Success",!0,n.title,Oe):S.status(ue+"Success",!0,Oe),P[P.folder?"parentId":"groupId"]=V.groupId||V.id):P.folder?(S.status(ue+"Failed",!1,n.title,Oe),re.$alert(c(ue+"Failed",n.title,Oe))):(S.status(ue+"Failed",!1,Oe),re.$alert(c(ue+"Failed",Oe))),G(H)})),ye=(P,V)=>{V=V||T.value;const G=V.findIndex(H=>H===P||H.id===P.id);G>-1?V.splice(G,1):V.forEach(H=>ye(P,H.children||[]))},Te=(P,V)=>{V=V||T.value||[];const G=V.find(H=>H.id===P.id||P.groupId===H.id);if(G)return G.children=G.children||[],G.opened=!0,G.id===P.id?(G.name=P.name,G.path=P.path,G.parentId=P.parentId):G.children.push(P),!0;if(P.parentId==="0")return V.push(P),!0;{if(V.some(ue=>Te(P,ue.children||[])))return!0;const H=P.parentId!==void 0&&V.find(ue=>ue.id===P.parentId);if(H)return H.children.push(P),!0}return!1};S.$on(F.OPEN_ITEM,P=>{const V=je(T.value);V&&Y(D(je(P),V,[],[]),!0)});const Rt=(P,V)=>{if(P&&V){const G=[];P.folder?(G.push.apply(G,[{label:c("resource.contextmenu.newFile",n.title),icon:"plus",onClick(){const H={groupId:P.id,name:c("message.untitled"),script:s.defaultScript||"return 'Hello magic-api'",path:s.requirePath?"":void 0};Te(H),Y(H,!0)}},{label:c("resource.createGroup"),icon:"group-add",onClick(){l.value=!0,v.value={parentId:P.id,type:n.type},O.value=!0}},{label:c("resource.updateGroup"),icon:"update",onClick(){l.value=!1,v.value=pe({},P),O.value=!0}},{label:c("resource.copyGroup"),icon:"copy",onClick(){p.value=P.id,u.value=!0}},{label:c("resource.contextmenu.deleteGroup"),icon:"delete",onClick(){re.$confirm(c("resource.contextmenu.deleteGroup"),c("resource.deleteGroupConfirm",n.title,L(P)),()=>{P.id?z.send("/resource/delete",{id:P.id}).success(H=>{H?(S.status("resource.deleteGroupSuccess",!0,n.title,L(P)),ye(P)):(re.$alert("resource.deleteGroupFailed",n.title,L(P)),S.status("resource.deleteGroupFailed",!1,n.title,L(P)))}):ye(P)})}},{label:c("resource.contextmenu.exportGroup"),icon:"download",onClick(){z.send(`/download?groupId=${P.id}`,null,{headers:{"Content-Type":"application/json"},responseType:"blob"}).success(H=>{Hn(H,`${P.name}.zip`),S.status("resource.groupExport",!0,P.name,n.title)})}}]),P.parentId!=="0"&&G.push({label:c("resource.contextmenu.moveToRoot"),icon:"move",onClick(){re.$confirm(c("resource.moveGroup"),c("resource.moveRootGroupConfirm",L(P)),()=>{z.send("/resource/move",{src:P.id,groupId:"0"}).success(H=>{H?(S.status("resource.moveRootSuccess",!0,n.title,L(P)),P.parentId="0",ye(P),Te(P)):(re.$alert(c("resource.moveRootFailed",n.title,L(P))),S.status("resource.moveRootFailed",!1,n.title,L(P)))})})}})):(G.push.apply(G,[{label:c("resource.contextmenu.copy",n.title),icon:"copy",divided:!0,onClick:()=>{z.send(`/resource/file/${P.id}`).success(H=>{H.id=`copy${new Date().getTime()}d${parseInt(Math.random()*1e5)}`,Te(H),Y(H,!0),H.name=H.name+`(${c("message.copy")})`,s.requirePath&&(H.path=H.path+"_copy")})}}]),s.requirePath&&(n.type==="api"&&G.push({label:c("resource.contextmenu.copyWithPath"),icon:"copy",onClick:()=>{let H=L(P,!0);H&&(H=it(M.SERVER_URL+"/"+H),Zn(H)?S.status("resource.copyPathSuccess",!0,n.title,H):S.status("resource.copyPathFailed",!1,n.title,H))}}),G.push.apply(G,[{label:c("resource.contextmenu.copyRelativePath"),icon:"copy",divided:!0,onClick:()=>{const H=L(P,!0);H&&(Zn(H)?S.status("resource.copyRelativePathSuccess",!0,n.title,H):S.status("resource.copyRelativePathFailed",!1,n.title,H))}}]),P.lock===M.LOCKED?G.push({label:c("resource.contextmenu.unlock"),icon:"unlock",onClick:()=>z.sendPost("/resource/unlock",{id:P.id}).success(H=>{S.status(H?"message.unlockSuccess":"message.unlockFailed",H,L(P)),H&&(P.lock=M.UNLOCK)})}):G.push({label:c("resource.contextmenu.lock"),icon:"lock",onClick:()=>z.sendPost("/resource/lock",{id:P.id}).success(H=>{S.status(H?"message.lockSuccess":"message.lockFailed",H,L(P)),H&&(P.lock=M.LOCKED)})})),P.id&&G.push({label:c("toolbars.history"),icon:"history",onClick:()=>{S.$emit(F.ADD_FOOTER_TOOLBAR,{component:$e(a),id:"backup-file",icon:"history",title:c("toolbars.viewHistory",L(P)),allowClose:!0,data:{id:P.id}})}}),G.push.apply(G,[{label:c("message.refresh"),icon:"refresh",onClick:()=>{S.$emit(F.REFRESH_RESOURCE,P.id)}},{label:c("resource.contextmenu.delete"),icon:"delete",onClick:()=>{const H=`${n.title}\u300C${L(P)}\u300D`;re.$confirm(c("message.deleteTips",n.title),c("message.deleteConfirm",H),()=>{P.id?z.send("/resource/delete",{id:P.id}).success(ue=>{ue?(S.status("message.deleteSuccess",!0,H),ye(P),S.$emit(F.DELETE_FILE,P)):(S.status("message.deleteFailed",!1,H),re.$alert(c("message.deleteFailed",H)))}):(S.status("message.deleteSuccess",!0,H),ye(P),S.$emit(F.DELETE_FILE,P))})}}])),M.PLUGINS.forEach(H=>{if(H.contextmenu&&typeof H.contextmenu=="function"){const ue=H.contextmenu(Ue(pe({},P),{menuType:"resource"}));ue&&ue.length&&ue.forEach(Oe=>G.push(Oe))}}),re.$contextmenu({menus:G,event:V})}},At=P=>{re.$contextmenu({event:P,menus:R.value.slice(0,5).filter(V=>!V.show||V.show()).map(V=>({icon:V.icon,label:V.name,onClick:V.onClick}))})};let ke=null;const Ne=()=>{m.value&&z.sendPost("/resource/folder/copy",{src:p.value,target:m.value.id.endsWith("-root")?"0":m.value.id}).success(P=>{ke=P,u.value=!1,S.$emit(F.LOAD_RESOURCES)})},Gn=se("findResource");return S.$on(F.LOAD_RESOURCES_FINISH,()=>{ke&&be(()=>{const P=Gn(ke);S.$emit(F.SELECT_NAVBAR_BY_ITEM,P.item),S.$emit(F.OPEN_GROUP,P.item)})}),ht(()=>t("onLoad")),(P,V)=>{const G=b("magic-icon"),H=b("magic-input"),ue=b("magic-empty"),Oe=b("magic-text-icon"),at=b("magic-avatar-group"),on=b("magic-tree"),Pe=b("magic-button"),zn=b("magic-button-group"),Yn=b("magic-dialog"),Ga=b("magic-resource-choose");return g(),w("div",{class:"magic-resource",onContextmenu:V[10]||(V[10]=Se(ee=>At(ee),["prevent"]))},[A("div",Vp,[_(G,{icon:"search",size:"14px"}),_(H,{value:r.value,"onUpdate:value":V[0]||(V[0]=ee=>r.value=ee),placeholder:h(c)("message.searchText"),width:"100%"},null,8,["value","placeholder"]),A("ul",null,[(g(!0),w(Z,null,he(R.value,(ee,qn)=>(g(),w(Z,{key:qn},[!ee.show||ee.show()?(g(),w("li",{key:0,title:ee.name||"",onClick:Ed=>ee.onClick&&ee.onClick(),class:Ee({separator:ee.separator})},[ee.separator?X("",!0):(g(),j(G,{key:0,icon:ee.icon},null,8,["icon"]))],10,Gp)):X("",!0)],64))),128))])]),!e.data||e.data.length===0?(g(),j(ue,{key:0,text:h(c)("message.empty",e.title)},null,8,["text"])):(g(),j(on,{key:1,ref_key:"treeObj",ref:I,data:h(T),onItemClick:Y,onContextmenu:Rt,draggable:!0,sort:!0,descending:E.value,onMove:Q,filter:r.value,"filter-text":N,selected:C.value},{folder:k(({item:ee})=>[_(G,{icon:ee.opened?"arrow-bottom":"arrow-right",onClick:Se(qn=>ee.opened=!ee.opened,["stop"])},null,8,["icon","onClick"]),_(G,{icon:"list"}),A("label",null,B(ee.name),1),h(i)&&ee.path?(g(),w("span",zp,"("+B(ee.path)+")",1)):X("",!0)]),file:k(({item:ee})=>[_(Oe,{icon:h(o)(ee)},null,8,["icon"]),A("label",null,B(ee.name),1),h(i)&&ee.path?(g(),w("span",Yp,"("+B(ee.path)+")",1)):X("",!0),ee.lock==="1"?(g(),j(G,{key:1,icon:"lock"})):X("",!0),_(at,{users:h(f)[ee.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["data","descending","filter","selected"])),_(Yn,{title:h(y),value:O.value,"onUpdate:value":V[5]||(V[5]=ee=>O.value=ee),width:"350px"},{default:k(()=>[A("ul",qp,[A("li",null,[A("label",null,B(h(c)("resource.form.groupName"))+"\uFF1A",1),_(H,{value:v.value.name,"onUpdate:value":V[1]||(V[1]=ee=>v.value.name=ee),placeholder:h(c)("resource.form.placeholder.name",e.title)},null,8,["value","placeholder"])]),h(i)?(g(),w("li",Kp,[A("label",null,B(h(c)("resource.form.groupPath"))+"\uFF1A",1),_(H,{value:v.value.path,"onUpdate:value":V[2]||(V[2]=ee=>v.value.path=ee),placeholder:h(c)("resource.form.placeholder.path",e.title)},null,8,["value","placeholder"])])):X("",!0)]),_(zn,{align:"right",style:{padding:"5px 0"}},{default:k(()=>[_(Pe,{value:h(y),type:"active",onOnClick:V[3]||(V[3]=ee=>ie())},null,8,["value"]),_(Pe,{value:h(c)("message.cancel"),onOnClick:V[4]||(V[4]=ee=>O.value=!1)},null,8,["value"])]),_:1})]),_:1},8,["title","value"]),_(Yn,{value:u.value,"onUpdate:value":V[9]||(V[9]=ee=>u.value=ee),title:h(c)("resource.copyGroup"),shade:!1,padding:"0",width:"400px",overflow:"hidden"},{default:k(()=>[_(Ga,{ref:"chooseGroup",value:m.value,"onUpdate:value":V[6]||(V[6]=ee=>m.value=ee),file:!1,type:e.type,single:!0},null,8,["value","type"]),_(zn,{align:"right",style:{"margin-right":"5px","margin-bottom":"5px"}},{default:k(()=>[_(Pe,{value:h(c)("message.expand"),onOnClick:V[7]||(V[7]=ee=>P.$refs.chooseGroup.expand(!0))},null,8,["value"]),_(Pe,{value:h(c)("message.collapse"),onOnClick:V[8]||(V[8]=ee=>P.$refs.chooseGroup.expand(!1))},null,8,["value"]),_(Pe,{type:"active",value:h(c)("message.copy"),onOnClick:Ne},null,8,["value"])]),_:1})]),_:1},8,["value","title"])],32)}}};var Xp=q(Wp,[["__scopeId","data-v-1db99e04"]]),Jp=Object.freeze(Object.defineProperty({__proto__:null,default:Xp},Symbol.toStringTag,{value:"Module"}));const He=e=>(Dn("data-v-1401171b"),e=e(),Mn(),e),Qp={class:"magic-script-editor"},Zp={key:0,class:"magic-empty-container"},ed={class:"magic-hot-key"},td=He(()=>A("em",null,"Ctrl + S",-1)),nd=He(()=>A("br",null,null,-1)),ad=He(()=>A("em",null,"Ctrl + Q",-1)),sd=He(()=>A("br",null,null,-1)),id=He(()=>A("em",null,"Alt + /",-1)),od=He(()=>A("br",null,null,-1)),rd=He(()=>A("em",null,"F8",-1)),ld=He(()=>A("br",null,null,-1)),cd=He(()=>A("em",null,"F6",-1)),ud=He(()=>A("br",null,null,-1)),pd=He(()=>A("em",null,"Ctrl + Alt + L",-1)),dd=He(()=>A("br",null,null,-1)),_d=He(()=>A("em",null,"Ctrl + E",-1)),hd={key:0},fd={class:"magic-monaco-editor-wrapper"},md={emits:["onLoad"],setup(e,{emit:t}){const{proxy:n}=St(),a=Je([]),s=U({}),i=U(!0),o=U(null),r=U(null),l=se("activateUserFiles"),u={String:"java.lang.String",Integer:"java.lang.Integer",Double:"java.lang.Double",Long:"java.lang.Long",Byte:"java.lang.Byte",Short:"java.lang.Short",Float:"java.lang.Float",MultipartFile:"org.springframework.web.multipart.MultipartFile",MultipartFiles:"java.util.List"};sn.setEnvironment(()=>{var R;const O={},v=(R=s.value)==null?void 0:R.item,T=D=>D&&Array.isArray(D)&&D.forEach(L=>{L&&typeof L.name=="string"&&L.dataType&&(O[L.name]=u[L.dataType]||"java.lang.Object")});return v&&(T(v==null?void 0:v.parameters),T(v==null?void 0:v.paths)),O});const p=O=>{let v=a.findIndex(T=>T===O);if(a.splice(v,1),O===s.value){let T=a.length;v0&&S.$emit(F.OPEN,a[v-1])}S.$emit(F.CLOSE,O.item),a.length===0&&(S.$emit(F.OPEN_EMPTY),s.value={})};tt(a,O=>{Fe.set(M.RECENT_OPENED_TAB,O.filter(v=>{var T;return(T=v.item)==null?void 0:T.id}).map(v=>v.item.id))});const m=O=>{const v=s.value;if(v&&v.item){const T=s.value.processSave(v.item);return Object.keys(T).forEach(R=>v.item[R]=T[R]),z.sendJson(`/resource/file/${s.value.type}/save?auto=${O?0:1}`,T).success(R=>{const D=`${v.title}\u300C${v.path()}\u300D`;R?(S.status("message.saveSuccess",!0,D),v.tmpObject=JSON.parse(JSON.stringify(T)),v.item.id!==R&&S.loading(1),v.item.id=R):(S.status("message.saveFailed",!1,D),n.$alert(c("message.saveFailed",D)))})}},f=()=>s.value.doTest(s.value),y=O=>{if(s.value.debuging){o.value.removedDecorations(s.value.debugDecorations),s.value.debuging=!1,s.value.variables=null;const v=(s.value.decorations||[]).filter(T=>T.options.linesDecorationsClassName==="breakpoints").map(T=>T.range.startLineNumber).join("|");S.send(Re.RESUME_BREAKPOINT,[s.value.item.id,O===!0?"1":"0",v].join(","))}},E=(O,v,T)=>{const R=[{label:c("editor.tab.close"),divided:!0,onClick(){p(v)}},{label:c("editor.tab.closeOther"),divided:!0,onClick(){[...a].forEach((D,L)=>L!=T&&p(D))}},{label:c("editor.tab.closeLeft"),onClick(){[...a].forEach((D,L)=>LL>T&&p(D))}},{label:c("editor.tab.closeAll"),onClick(){[...a].forEach(D=>p(D))}}];M.PLUGINS.forEach(D=>{if(D.contextmenu&&typeof D.contextmenu=="function"){const L=D.contextmenu(Ue(pe({},v),{menuType:"editorTab"}));L&&L.length&&L.forEach(N=>R.push(N))}}),n.$contextmenu({menus:R,event:O})},C=O=>Object.keys(O.tmpObject||{}).some(v=>{const T=O.tmpObject[v],R=O.item[v];return T===R||v==="properties"||v==="responseBody"||v==="responseBodyDefinition"?!1:typeof T=="object"||typeof R=="object"?JSON.stringify(T)!==JSON.stringify(R):T!==R});S.$on(F.LOGOUT,()=>[...a].forEach(O=>p(O))),S.$on(F.DELETE_FILE,O=>{const v=a.findIndex(T=>T.item===O);v>-1&&p(a[v])}),S.$on(F.RELOAD_RESOURCES_FINISH,()=>[...a].forEach(O=>p(O))),S.$event(Re.LOGIN_RESPONSE,()=>{var O;s.value&&S.send(Re.SET_FILE_ID,((O=s.value.item)==null?void 0:O.id)||"0")});const I=O=>{O&&o.value&&(O.scrollTop=o.value.getScrollTop())};return S.$on(F.OPEN,O=>{let v=a.find(T=>T.item===O.item||T.item.id&&T.item.id===O.item.id);S.send(Re.SET_FILE_ID,O.item.id||"0"),v?(s.value=v,i.value=!1,be(()=>o.value.setScrollTop(v.scrollTop||0))):(a.push(O),s.value=O,O.item.id&&!O.item.script?(i.value=!0,z.sendGet(`/resource/file/${O.item.id}`).success(T=>{S.status("message.getDetail",!0,`${O.title}\u300C${O.path()}\u300D`),Object.keys(T).forEach(R=>O.item[R]=T[R]),O.tmpObject=JSON.parse(JSON.stringify(O.processSave(T))),i.value=!1,be(()=>o.value.setScrollTop(0))})):(O.tmpObject=JSON.parse(JSON.stringify(O.processSave(O.item))),i.value=!1,be(()=>o.value.setScrollTop(0)))),s.value.decorations&&s.value.decorations.length>0&&be(()=>{const T=je(s.value.decorations);s.value.debugDecorations=o.value.appendDecoration(T).map((R,D)=>{var L;return((L=T[D].options)==null?void 0:L.className)==="debug-line"?R:null}).filter(R=>R!==null)||[]}),be(()=>r.value&&r.value.scrollIntoView(O))}),S.$on(F.DO_SAVE,m),S.$on(F.DO_TEST,()=>{const O=s.value;O&&O.item&&O.runnable&&O.doTest&&O.running!==!0&&(M.AUTO_SAVE&&O.item.lock!=="1"?m().end(v=>v&&f()):f())}),S.$event(Re.BREAKPOINT,([O,{range:v,variables:T}])=>{var R,D;if(((D=(R=s.value)==null?void 0:R.item)==null?void 0:D.id)!==O){const L=a.find(N=>N.item.id===O);L&&S.$emit(F.OPEN,L)}be(()=>{s.value.variables=si(T),s.value.debuging=!0,s.value.debugDecorations=[o.value.appendDecoration([{range:new ot(v[0],1,v[0],1),options:{isWholeLine:!0,inlineClassName:"debug-line",className:"debug-line"}}])],S.$emit(F.SWITCH_TOOLBAR,"debug")})}),S.$on(F.DEBUG_CONTINUE,y),S.$on(F.DEBUG_SETPINTO,()=>y(!0)),S.$event(Re.EXCEPTION,([[O,v,T]])=>{var R,D;if(((D=(R=s.value)==null?void 0:R.item)==null?void 0:D.id)===O){const L=new ot(T[0],T[2],T[1],T[3]+1),N=o.value.getInstance(),$=N.deltaDecorations([],[{range:L,options:{hoverMessage:{value:v},inlineClassName:"squiggly-error"}}]);N.revealRangeInCenter(L),N.focus(),M.DECORATION_TIMEOUT>=0&&setTimeout(()=>N.deltaDecorations($,[]),M.DECORATION_TIMEOUT)}}),ht(()=>t("onLoad")),(O,v)=>{const T=b("magic-text-icon"),R=b("magic-icon"),D=b("magic-avatar-group"),L=b("magic-tab"),N=b("magic-monaco-editor"),$=b("magic-loading");return g(),w("div",Qp,[h(a).length===0?(g(),w("div",Zp,[A("div",ed,[A("p",null,[_e(B(h(c)("message.save")),1),td,nd,_e(" "+B(h(c)("message.run")),1),ad,sd,_e(" "+B(h(c)("editor.tooltip.complection")),1),id,od,_e(" "+B(h(c)("editor.tooltip.resume")),1),rd,ld,_e(" "+B(h(c)("editor.tooltip.stepInto")),1),cd,ud,_e(" "+B(h(c)("editor.tooltip.format")),1),pd,dd,_e(" "+B(h(c)("editor.tooltip.recent")),1),_d])])])):(g(),w(Z,{key:1},[_(L,{value:s.value,"onUpdate:value":v[0]||(v[0]=Y=>s.value=Y),tabs:h(a),className:"magic-script-tab",ref_key:"tab",ref:r,"allow-close":!0,onClose:p,onChange:v[1]||(v[1]=Y=>h(S).$emit(h(F).OPEN,Y)),onBeforeChange:I,onItemContextmenu:E},{default:k(({tab:Y})=>[_(T,{icon:Y.getIcon(Y.item)},null,8,["icon"]),_e(B(Y.item.name),1),C(Y)?(g(),w("span",hd,"*")):X("",!0),Y.item.lock===O.$LOCKED?(g(),j(R,{key:1,icon:"lock"})):X("",!0),_(D,{users:h(l)[Y.item.id]||[],max:3,size:20},null,8,["users"])]),_:1},8,["value","tabs"]),_($,{loading:i.value},{default:k(()=>[A("div",fd,[_(N,{ref_key:"editor",ref:o,value:s.value.item.script,"onUpdate:value":v[2]||(v[2]=Y=>s.value.item.script=Y),decorations:s.value.decorations,"onUpdate:decorations":v[3]||(v[3]=Y=>s.value.decorations=Y),language:s.value.language,"support-breakpoint":!0},null,8,["value","decorations","language"])])]),_:1},8,["loading"])],64))])}}};var gd=q(md,[["__scopeId","data-v-1401171b"]]),vd=Object.freeze(Object.defineProperty({__proto__:null,default:gd},Symbol.toStringTag,{value:"Module"}));const ja={};Object.entries({"./components/magic-editor.vue":ho,"./components/common/magic-context-menu.vue":So,"./components/common/magic-empty.vue":Ao,"./components/common/magic-loading.vue":No,"./components/common/magic-monaco-diff-editor.vue":Po,"./components/common/magic-monaco-editor.vue":Ho,"./components/common/magic-resizer.vue":zo,"./components/common/data/magic-navbar-item.vue":Wo,"./components/common/data/magic-navbar.css":Jo,"./components/common/data/magic-navbar.js":ar,"./components/common/data/magic-tab.css":ir,"./components/common/data/magic-tab.js":rr,"./components/common/data/magic-table-column.vue":cr,"./components/common/data/magic-table.css":pr,"./components/common/data/magic-table.js":_r,"./components/common/data/magic-tree.css":fr,"./components/common/data/magic-tree.js":gr,"./components/common/dialog/magic-alert.vue":Cs,"./components/common/dialog/magic-confirm.vue":Ns,"./components/common/dialog/magic-dialog.vue":yr,"./components/common/dialog/magic-modal.js":ws,"./components/common/dialog/magic-notify.vue":Ir,"./components/common/form/magic-button-group.vue":Nr,"./components/common/form/magic-button.vue":Dr,"./components/common/form/magic-checkbox.vue":$r,"./components/common/form/magic-file.vue":Vr,"./components/common/form/magic-input.vue":qr,"./components/common/form/magic-select.vue":Zr,"./components/common/form/magic-textarea.vue":al,"./components/common/icon/magic-avatar-group.vue":ol,"./components/common/icon/magic-avatar.vue":ul,"./components/common/icon/magic-icon.vue":tr,"./components/common/icon/magic-text-icon.vue":hl,"./components/panel/api/magic-api-body.vue":gl,"./components/panel/api/magic-api-description.vue":El,"./components/panel/api/magic-api-group.vue":Sl,"./components/panel/api/magic-api-header.vue":Rl,"./components/panel/api/magic-api-info.vue":Ll,"./components/panel/api/magic-api-option.vue":kl,"./components/panel/api/magic-api-parameter.vue":Pl,"./components/panel/api/magic-api-path.vue":Bl,"./components/panel/api/magic-api-request-body.vue":jl,"./components/panel/api/magic-api-request-structure.vue":Wl,"./components/panel/api/magic-api-response-body.vue":Zl,"./components/panel/api/magic-api-response-header.vue":sc,"./components/panel/api/magic-api-response-structure.vue":uc,"./components/panel/api/magic-api-response.vue":hc,"./components/panel/api/magic-global-header.vue":gc,"./components/panel/api/magic-global-parameter.vue":bc,"./components/panel/api/magic-global.vue":Oc,"./components/panel/common/magic-panel-common-toolbar.vue":Rc,"./components/panel/common/magic-panel-toolbar.vue":Nc,"./components/panel/common/magic-resource-choose.vue":Uc,"./components/panel/datasource/magic-datasource-datasource.vue":Jc,"./components/panel/footer/magic-backup-file.vue":nu,"./components/panel/footer/magic-backup.vue":lu,"./components/panel/footer/magic-debug.vue":Du,"./components/panel/footer/magic-event.vue":Bu,"./components/panel/footer/magic-log.vue":Gu,"./components/panel/footer/magic-online.vue":Ku,"./components/panel/footer/magic-status-bar.vue":e1,"./components/panel/footer/magic-todo.vue":o1,"./components/panel/footer/magic-toolbar.vue":d1,"./components/panel/function/magic-function-info.vue":m1,"./components/panel/function/magic-function-parameter.vue":E1,"./components/panel/header/magic-export.vue":T1,"./components/panel/header/magic-header.vue":U1,"./components/panel/header/magic-push.vue":H1,"./components/panel/header/magic-search.vue":X1,"./components/panel/header/magic-upload.vue":Q1,"./components/panel/main/magic-data-resource.vue":op,"./components/panel/main/magic-login.vue":Tp,"./components/panel/main/magic-main.vue":Mp,"./components/panel/main/magic-recent-opened.vue":jp,"./components/panel/main/magic-resource.vue":Jp,"./components/panel/main/magic-script-editor.vue":vd}).forEach(([e,t])=>ja[e.substring(e.lastIndexOf("/")+1,e.lastIndexOf("."))]=t.default);const wn=e=>{let t;Object.entries(ja).forEach(([n,a])=>{e.component(n,a)}),e.config.globalProperties.$contextmenu=n=>{t!=null&&t.unmount(),t=kn(Ba,{menus:n.menus,position:{x:n.event.clientX,y:n.event.clientY},onDestory:()=>{t&&t.unmount(),t=null}}),wn(t),t.mount(".magic-editor .magic-mounts")},Object.keys(M).forEach(n=>e.config.globalProperties[`$${n}`]=M[n]),ba(e,wn)};if(typeof window!="undefined"){let e=function(){var t=document.body,n=document.getElementById("__svg__icons__dom__1649592439117__");n||(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.style.position="absolute",n.style.width="0",n.style.height="0",n.id="__svg__icons__dom__1649592439117__",n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("xmlns:link","http://www.w3.org/1999/xlink")),n.innerHTML='',t.insertBefore(n,t.firstChild)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e):e()}window.Vue=ss;const Va=kn(hs);Va.use(wn);Va.mount("#app"); diff --git a/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js b/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js index 9c68baf3..2b449338 100644 --- a/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js +++ b/magic-editor/src/main/resources/magic-editor/assets/axios.23e7b955.js @@ -1,2 +1,2 @@ -function gr(r){if(r.__esModule)return r;var e=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(r).forEach(function(t){var a=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,a.get?a:{enumerable:!0,get:function(){return r[t]}})}),e}var D={exports:{}},K=function(e,t){return function(){for(var n=new Array(arguments.length),s=0;s=0)return;a==="set-cookie"?t[a]=(t[a]?t[a]:[]).concat([n]):t[a]=t[a]?t[a]+", "+n:n}}),t},te=h,Ke=te.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),a;function n(s){var o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=n(window.location.href),function(o){var u=te.isString(o)?n(o):o;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}();function H(r){this.message=r}H.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};H.prototype.__CANCEL__=!0;var $=H,P=h,Ge=Me,Ye=ke,Qe=Z,Ze=Ve,er=Xe,rr=Ke,I=re,tr=U,nr=$,ne=function(e){return new Promise(function(a,n){var s=e.data,o=e.headers,u=e.responseType,f;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}P.isFormData(s)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+d)}var R=Ze(e.baseURL,e.url);i.open(e.method.toUpperCase(),Qe(R,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function W(){if(!!i){var m="getAllResponseHeaders"in i?er(i.getAllResponseHeaders()):null,w=!u||u==="text"||u==="json"?i.responseText:i.response,b={data:w,status:i.status,statusText:i.statusText,headers:m,config:e,request:i};Ge(function(L){a(L),v()},function(L){n(L),v()},b),i=null}}if("onloadend"in i?i.onloadend=W:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(W)},i.onabort=function(){!i||(n(I("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(I("Network Error",e,null,i)),i=null},i.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||tr.transitional;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(I(w,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},P.isStandardBrowserEnv()){var X=(e.withCredentials||rr(R))&&e.xsrfCookieName?Ye.read(e.xsrfCookieName):void 0;X&&(o[e.xsrfHeaderName]=X)}"setRequestHeader"in i&&P.forEach(o,function(w,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete o[b]:i.setRequestHeader(b,w)}),P.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(m){!i||(n(!m||m&&m.type?new nr("canceled"):m),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),s||(s=null),i.send(s)})},c=h,ae=_e,ar=ee,sr={"Content-Type":"application/x-www-form-urlencoded"};function se(r,e){!c.isUndefined(r)&&c.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function ir(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=ne),r}function or(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(t||JSON.stringify)(r)}var T={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ir(),transformRequest:[function(e,t){return ae(t,"Accept"),ae(t,"Content-Type"),c.isFormData(e)||c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)?e:c.isArrayBufferView(e)?e.buffer:c.isURLSearchParams(e)?(se(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):c.isObject(e)||t&&t["Content-Type"]==="application/json"?(se(t,"application/json"),or(e)):e}],transformResponse:[function(e){var t=this.transitional||T.transitional,a=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!a&&this.responseType==="json";if(s||n&&c.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ar(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};c.forEach(["delete","get","head"],function(e){T.headers[e]={}});c.forEach(["post","put","patch"],function(e){T.headers[e]=c.merge(sr)});var U=T,ur=h,fr=U,lr=function(e,t,a){var n=this||fr;return ur.forEach(a,function(o){e=o.call(n,e,t)}),e},ie=function(e){return!!(e&&e.__CANCEL__)},oe=h,J=lr,cr=ie,dr=U,hr=$;function z(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hr("canceled")}var pr=function(e){z(e),e.headers=e.headers||{},e.data=J.call(e,e.data,e.headers,e.transformRequest),e.headers=oe.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),oe.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||dr.adapter;return t(e).then(function(n){return z(e),n.data=J.call(e,n.data,n.headers,e.transformResponse),n},function(n){return cr(n)||(z(e),n&&n.response&&(n.response.data=J.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},p=h,ue=function(e,t){t=t||{};var a={};function n(i,l){return p.isPlainObject(i)&&p.isPlainObject(l)?p.merge(i,l):p.isPlainObject(l)?p.merge({},l):p.isArray(l)?l.slice():l}function s(i){if(p.isUndefined(t[i])){if(!p.isUndefined(e[i]))return n(void 0,e[i])}else return n(e[i],t[i])}function o(i){if(!p.isUndefined(t[i]))return n(void 0,t[i])}function u(i){if(p.isUndefined(t[i])){if(!p.isUndefined(e[i]))return n(void 0,e[i])}else return n(void 0,t[i])}function f(i){if(i in t)return n(e[i],t[i]);if(i in e)return n(void 0,e[i])}var v={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return p.forEach(Object.keys(e).concat(Object.keys(t)),function(l){var d=v[l]||s,R=d(l);p.isUndefined(R)&&d!==f||(a[l]=R)}),a},fe={version:"0.24.0"},mr=fe.version,V={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){V[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});var le={};V.transitional=function(e,t,a){function n(s,o){return"[Axios v"+mr+"] Transitional option '"+s+"'"+o+(a?". "+a:"")}return function(s,o,u){if(e===!1)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!le[o]&&(le[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,u):!0}};function vr(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var a=Object.keys(r),n=a.length;n-- >0;){var s=a[n],o=e[s];if(o){var u=r[s],f=u===void 0||o(u,s,r);if(f!==!0)throw new TypeError("option "+s+" must be "+f);continue}if(t!==!0)throw Error("Unknown option "+s)}}var yr={assertOptions:vr,validators:V},ce=h,br=Z,de=Le,he=pr,j=ue,pe=yr,O=pe.validators;function x(r){this.defaults=r,this.interceptors={request:new de,response:new de}}x.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=j(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;t!==void 0&&pe.assertOptions(t,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(n=n&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});var s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});var o;if(!n){var u=[he,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var f=e;a.length;){var v=a.shift(),i=a.shift();try{f=v(f)}catch(l){i(l);break}}try{o=he(f)}catch(l){return Promise.reject(l)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};x.prototype.getUri=function(e){return e=j(this.defaults,e),br(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};ce.forEach(["delete","get","head","options"],function(e){x.prototype[e]=function(t,a){return this.request(j(a||{},{method:e,url:t,data:(a||{}).data}))}});ce.forEach(["post","put","patch"],function(e){x.prototype[e]=function(t,a,n){return this.request(j(n||{},{method:e,url:t,data:a}))}});var Er=x,wr=$;function C(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(a){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n=0)return;a==="set-cookie"?t[a]=(t[a]?t[a]:[]).concat([n]):t[a]=t[a]?t[a]+", "+n:n}}),t},G=p,Ke=G.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),a;function n(s){var o=s;return e&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return a=n(window.location.href),function(o){var u=G.isString(o)?n(o):o;return u.protocol===a.protocol&&u.host===a.host}}():function(){return function(){return!0}}();function z(r){this.message=r}z.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};z.prototype.__CANCEL__=!0;var T=z,g=p,Ge=Me,Ye=ke,Qe=ue,Ze=Ve,er=Xe,rr=Ke,_=le,tr=j,nr=T,Y=function(e){return new Promise(function(a,n){var s=e.data,o=e.headers,u=e.responseType,f;function v(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}g.isFormData(s)&&delete o["Content-Type"];var i=new XMLHttpRequest;if(e.auth){var l=e.auth.username||"",d=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.Authorization="Basic "+btoa(l+":"+d)}var R=Ze(e.baseURL,e.url);i.open(e.method.toUpperCase(),Qe(R,e.params,e.paramsSerializer),!0),i.timeout=e.timeout;function W(){if(!!i){var m="getAllResponseHeaders"in i?er(i.getAllResponseHeaders()):null,w=!u||u==="text"||u==="json"?i.responseText:i.response,b={data:w,status:i.status,statusText:i.statusText,headers:m,config:e,request:i};Ge(function(L){a(L),v()},function(L){n(L),v()},b),i=null}}if("onloadend"in i?i.onloadend=W:i.onreadystatechange=function(){!i||i.readyState!==4||i.status===0&&!(i.responseURL&&i.responseURL.indexOf("file:")===0)||setTimeout(W)},i.onabort=function(){!i||(n(_("Request aborted",e,"ECONNABORTED",i)),i=null)},i.onerror=function(){n(_("Network Error",e,null,i)),i=null},i.ontimeout=function(){var w=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",b=e.transitional||tr.transitional;e.timeoutErrorMessage&&(w=e.timeoutErrorMessage),n(_(w,e,b.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",i)),i=null},g.isStandardBrowserEnv()){var X=(e.withCredentials||rr(R))&&e.xsrfCookieName?Ye.read(e.xsrfCookieName):void 0;X&&(o[e.xsrfHeaderName]=X)}"setRequestHeader"in i&&g.forEach(o,function(w,b){typeof s=="undefined"&&b.toLowerCase()==="content-type"?delete o[b]:i.setRequestHeader(b,w)}),g.isUndefined(e.withCredentials)||(i.withCredentials=!!e.withCredentials),u&&u!=="json"&&(i.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&i.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&i.upload&&i.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(m){!i||(n(!m||m&&m.type?new nr("canceled"):m),i.abort(),i=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),s||(s=null),i.send(s)})},c=p,Q=_e,ar=fe,sr={"Content-Type":"application/x-www-form-urlencoded"};function Z(r,e){!c.isUndefined(r)&&c.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function ir(){var r;return(typeof XMLHttpRequest!="undefined"||typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]")&&(r=Y),r}function or(r,e,t){if(c.isString(r))try{return(e||JSON.parse)(r),c.trim(r)}catch(a){if(a.name!=="SyntaxError")throw a}return(t||JSON.stringify)(r)}var U={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:ir(),transformRequest:[function(e,t){return Q(t,"Accept"),Q(t,"Content-Type"),c.isFormData(e)||c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)?e:c.isArrayBufferView(e)?e.buffer:c.isURLSearchParams(e)?(Z(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):c.isObject(e)||t&&t["Content-Type"]==="application/json"?(Z(t,"application/json"),or(e)):e}],transformResponse:[function(e){var t=this.transitional||U.transitional,a=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,s=!a&&this.responseType==="json";if(s||n&&c.isString(e)&&e.length)try{return JSON.parse(e)}catch(o){if(s)throw o.name==="SyntaxError"?ar(o,this,"E_JSON_PARSE"):o}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};c.forEach(["delete","get","head"],function(e){U.headers[e]={}});c.forEach(["post","put","patch"],function(e){U.headers[e]=c.merge(sr)});var j=U,ur=p,fr=j,lr=function(e,t,a){var n=this||fr;return ur.forEach(a,function(o){e=o.call(n,e,t)}),e},ce=function(e){return!!(e&&e.__CANCEL__)},ee=p,q=lr,cr=ce,dr=j,hr=T;function F(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new hr("canceled")}var pr=function(e){F(e),e.headers=e.headers||{},e.data=q.call(e,e.data,e.headers,e.transformRequest),e.headers=ee.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ee.forEach(["delete","get","head","post","put","patch","common"],function(n){delete e.headers[n]});var t=e.adapter||dr.adapter;return t(e).then(function(n){return F(e),n.data=q.call(e,n.data,n.headers,e.transformResponse),n},function(n){return cr(n)||(F(e),n&&n.response&&(n.response.data=q.call(e,n.response.data,n.response.headers,e.transformResponse))),Promise.reject(n)})},h=p,de=function(e,t){t=t||{};var a={};function n(i,l){return h.isPlainObject(i)&&h.isPlainObject(l)?h.merge(i,l):h.isPlainObject(l)?h.merge({},l):h.isArray(l)?l.slice():l}function s(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(e[i],t[i])}function o(i){if(!h.isUndefined(t[i]))return n(void 0,t[i])}function u(i){if(h.isUndefined(t[i])){if(!h.isUndefined(e[i]))return n(void 0,e[i])}else return n(void 0,t[i])}function f(i){if(i in t)return n(e[i],t[i]);if(i in e)return n(void 0,e[i])}var v={url:o,method:o,data:o,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:f};return h.forEach(Object.keys(e).concat(Object.keys(t)),function(l){var d=v[l]||s,R=d(l);h.isUndefined(R)&&d!==f||(a[l]=R)}),a},he={version:"0.24.0"},mr=he.version,V={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){V[r]=function(a){return typeof a===r||"a"+(e<1?"n ":" ")+r}});var re={};V.transitional=function(e,t,a){function n(s,o){return"[Axios v"+mr+"] Transitional option '"+s+"'"+o+(a?". "+a:"")}return function(s,o,u){if(e===!1)throw new Error(n(o," has been removed"+(t?" in "+t:"")));return t&&!re[o]&&(re[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,o,u):!0}};function vr(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var a=Object.keys(r),n=a.length;n-- >0;){var s=a[n],o=e[s];if(o){var u=r[s],f=u===void 0||o(u,s,r);if(f!==!0)throw new TypeError("option "+s+" must be "+f);continue}if(t!==!0)throw Error("Unknown option "+s)}}var yr={assertOptions:vr,validators:V},pe=p,br=ue,te=Le,ne=pr,B=de,me=yr,O=me.validators;function x(r){this.defaults=r,this.interceptors={request:new te,response:new te}}x.prototype.request=function(e){typeof e=="string"?(e=arguments[1]||{},e.url=arguments[0]):e=e||{},e=B(this.defaults,e),e.method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;t!==void 0&&me.assertOptions(t,{silentJSONParsing:O.transitional(O.boolean),forcedJSONParsing:O.transitional(O.boolean),clarifyTimeoutError:O.transitional(O.boolean)},!1);var a=[],n=!0;this.interceptors.request.forEach(function(d){typeof d.runWhen=="function"&&d.runWhen(e)===!1||(n=n&&d.synchronous,a.unshift(d.fulfilled,d.rejected))});var s=[];this.interceptors.response.forEach(function(d){s.push(d.fulfilled,d.rejected)});var o;if(!n){var u=[ne,void 0];for(Array.prototype.unshift.apply(u,a),u=u.concat(s),o=Promise.resolve(e);u.length;)o=o.then(u.shift(),u.shift());return o}for(var f=e;a.length;){var v=a.shift(),i=a.shift();try{f=v(f)}catch(l){i(l);break}}try{o=ne(f)}catch(l){return Promise.reject(l)}for(;s.length;)o=o.then(s.shift(),s.shift());return o};x.prototype.getUri=function(e){return e=B(this.defaults,e),br(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};pe.forEach(["delete","get","head","options"],function(e){x.prototype[e]=function(t,a){return this.request(B(a||{},{method:e,url:t,data:(a||{}).data}))}});pe.forEach(["post","put","patch"],function(e){x.prototype[e]=function(t,a,n){return this.request(B(n||{},{method:e,url:t,data:a}))}});var Er=x,wr=T;function C(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(n){e=n});var t=this;this.promise.then(function(a){if(!!t._listeners){var n,s=t._listeners.length;for(n=0;n{throw t.stack?new Error(t.message+` - -`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Kt=new Ot;function en(e){tn(e)||Kt.onUnexpectedError(e)}function Qe(e){if(e instanceof Error){let{name:t,message:n}=e;const s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s}}return e}const Ze="Canceled";function tn(e){return e instanceof Error&&e.name===Ze&&e.message===Ze}function nn(e){const t=this;let n=!1,s;return function(){return n||(n=!0,s=e.apply(t,arguments)),s}}var we;(function(e){function t(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function s(){return n}e.empty=s;function*r(d){yield d}e.single=r;function i(d){return d||n}e.from=i;function l(d){return!d||d[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(d){return d[Symbol.iterator]().next().value}e.first=u;function a(d,h){for(const g of d)if(h(g))return!0;return!1}e.some=a;function o(d,h){for(const g of d)if(h(g))return g}e.find=o;function*f(d,h){for(const g of d)h(g)&&(yield g)}e.filter=f;function*c(d,h){let g=0;for(const _ of d)yield h(_,g++)}e.map=c;function*m(...d){for(const h of d)for(const g of h)yield g}e.concat=m;function*L(d){for(const h of d)for(const g of h)yield g}e.concatNested=L;function b(d,h,g){let _=g;for(const A of d)_=h(_,A);return _}e.reduce=b;function*w(d,h,g=d.length){for(h<0&&(h+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);h_===A){const _=d[Symbol.iterator](),A=h[Symbol.iterator]();for(;;){const S=_.next(),N=A.next();if(S.done!==N.done)return!1;if(S.done)return!0;if(!g(S.value,N.value))return!1}}e.equals=P})(we||(we={}));function sn(e){return e}function rn(e,t){}class ln extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Xe(e){if(we.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new ln(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function un(...e){return Je(()=>Xe(e))}function Je(e){return sn({dispose:nn(()=>{e()})})}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Xe(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.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(t),t}}le.DISABLE_DISPOSED_WARNING=!1;class Oe{constructor(){this._store=new le,rn(this._store)}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Oe.None=Object.freeze({dispose(){}});var Ce;const he="en";let ve=!1,Me=!1,Pe=!1,me,pe=he,an,Z;const T=typeof self=="object"?self:typeof global=="object"?global:{};let k;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?k=T.vscode.process:typeof process!="undefined"&&(k=process);const on=typeof((Ce=k==null?void 0:k.versions)===null||Ce===void 0?void 0:Ce.electron)=="string"&&k.type==="renderer";if(typeof navigator=="object"&&!on)Z=navigator.userAgent,ve=Z.indexOf("Windows")>=0,Me=Z.indexOf("Macintosh")>=0,(Z.indexOf("Macintosh")>=0||Z.indexOf("iPad")>=0||Z.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Pe=Z.indexOf("Linux")>=0,me=navigator.language,pe=me;else if(typeof k=="object"){ve=k.platform==="win32",Me=k.platform==="darwin",Pe=k.platform==="linux",Pe&&!!k.env.SNAP&&k.env.SNAP_REVISION,me=he,pe=he;const e=k.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];me=t.locale,pe=n||he,an=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const ue=ve,cn=Me,Ke=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let n=[];T.addEventListener("message",r=>{if(r.data&&r.data.vscodeSetImmediateId)for(let i=0,l=n.length;i{const i=++s;n.push({id:i,callback:r}),T.postMessage({vscodeSetImmediateId:i},"*")}}if(typeof(k==null?void 0:k.nextTick)=="function")return k.nextTick.bind(k);const t=Promise.resolve();return n=>t.then(n)}();function fn(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function Re(e){const t=[];for(const n of fn(e))typeof e[n]=="function"&&t.push(n);return t}function et(e,t){const n=r=>function(){const i=Array.prototype.slice.call(arguments,0);return t(r,i)};let s={};for(const r of e)s[r]=n(r);return s}const hn="$initialize";class mn{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let s=String(++this._lastSentReq);return new Promise((r,i)=>{this._pendingReplies[s]={resolve:r,reject:i},this._send({vsWorker:this._workerId,req:s,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let i=t;if(!this._pendingReplies[i.seq]){console.warn("Got reply to unknown seq");return}let l=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){let u=i.err;i.err.$isError&&(u=new Error,u.name=i.err.name,u.message=i.err.message,u.stack=i.err.stack),l.reject(u);return}l.resolve(i.res);return}let n=t,s=n.req;this._handler.handleMessage(n.method,n.args).then(i=>{this._send({vsWorker:this._workerId,seq:s,res:i,err:void 0})},i=>{i.detail instanceof Error&&(i.detail=Qe(i.detail)),this._send({vsWorker:this._workerId,seq:s,res:void 0,err:Qe(i)})})}_send(t){let n=[];if(t.req){const s=t;for(let r=0;r{t(s,r)},handleMessage:(s,r)=>this._handleMessage(s,r)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===hn)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(s){return Promise.reject(s)}}initialize(t,n,s,r){this._protocol.setWorkerId(t);const l=et(r,(u,a)=>this._protocol.sendMessage(u,a));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(Re(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,a)=>{self.require([s],o=>{if(this._requestHandler=o.create(l),!this._requestHandler){a(new Error("No RequestHandler!"));return}u(Re(this._requestHandler))},a)}))}}class ${constructor(t,n,s,r){this.originalStart=t,this.originalLength=n,this.modifiedStart=s,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function gn(e){return e.split(/\r\n|\r|\n/)}function _n(e){for(let t=0,n=e.length;t=0;n--){const s=e.charCodeAt(n);if(s!==32&&s!==9)return n}return-1}function tt(e,t){return(t<<5)-t+e|0}function Nn(e,t){t=tt(149417,t);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $(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(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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 z{constructor(t,n,s=null){this.ContinueProcessingPredicate=s,this._originalSequence=t,this._modifiedSequence=n;const[r,i,l]=z._getElements(t),[u,a,o]=z._getElements(n);this._hasStrings=l&&o,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=u,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(z._isStringArray(n)){const s=new Int32Array(n.length);for(let r=0,i=n.length;r=t&&r>=s&&this.ElementsAreEqual(n,r);)n--,r--;if(t>n||s>r){let c;return s<=r?(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new $(t,0,s,r-s+1)]):t<=n?(K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[new $(t,n-t+1,s,0)]):(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const l=[0],u=[0],a=this.ComputeRecursionPoint(t,n,s,r,l,u,i),o=l[0],f=u[0];if(a!==null)return a;if(!i[0]){const c=this.ComputeDiffRecursive(t,o,s,f,i);let m=[];return i[0]?m=[new $(o+1,n-(o+1)+1,f+1,r-(f+1)+1)]:m=this.ComputeDiffRecursive(o+1,n,f+1,r,i),this.ConcatenateChanges(c,m)}return[new $(t,n-t+1,s,r-s+1)]}WALKTRACE(t,n,s,r,i,l,u,a,o,f,c,m,L,b,w,M,P,d){let h=null,g=null,_=new st,A=n,S=s,N=L[0]-M[0]-r,p=-1073741824,I=this.m_forwardHistory.length-1;do{const R=N+t;R===A||R=0&&(o=this.m_forwardHistory[I],t=o[0],A=1,S=o.length-1)}while(--I>=-1);if(h=_.getReverseChanges(),d[0]){let R=L[0]+1,C=M[0]+1;if(h!==null&&h.length>0){const Q=h[h.length-1];R=Math.max(R,Q.getOriginalEnd()),C=Math.max(C,Q.getModifiedEnd())}g=[new $(R,m-R+1,C,w-C+1)]}else{_=new st,A=l,S=u,N=L[0]-M[0]-a,p=1073741824,I=P?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+i;R===A||R=f[R+1]?(c=f[R+1]-1,b=c-N-a,c>p&&_.MarkNextChange(),p=c+1,_.AddOriginalElement(c+1,b+1),N=R+1-i):(c=f[R-1],b=c-N-a,c>p&&_.MarkNextChange(),p=c,_.AddModifiedElement(c+1,b+1),N=R-1-i),I>=0&&(f=this.m_reverseHistory[I],i=f[0],A=1,S=f.length-1)}while(--I>=-1);g=_.getChanges()}return this.ConcatenateChanges(h,g)}ComputeRecursionPoint(t,n,s,r,i,l,u){let a=0,o=0,f=0,c=0,m=0,L=0;t--,s--,i[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const b=n-t+(r-s),w=b+1,M=new Int32Array(w),P=new Int32Array(w),d=r-s,h=n-t,g=t-s,_=n-r,S=(h-d)%2==0;M[d]=t,P[h]=n,u[0]=!1;for(let N=1;N<=b/2+1;N++){let p=0,I=0;f=this.ClipDiagonalBound(d-N,N,d,w),c=this.ClipDiagonalBound(d+N,N,d,w);for(let C=f;C<=c;C+=2){C===f||Cp+I&&(p=a,I=o),!S&&Math.abs(C-h)<=N-1&&a>=P[C])return i[0]=a,l[0]=o,Q<=P[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}const R=(p-t+(I-s)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,R))return u[0]=!0,i[0]=p,l[0]=I,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):(t++,s++,[new $(t,n-t+1,s,r-s+1)]);m=this.ClipDiagonalBound(h-N,N,h,w),L=this.ClipDiagonalBound(h+N,N,h,w);for(let C=m;C<=L;C+=2){C===m||C=P[C+1]?a=P[C+1]-1:a=P[C-1],o=a-(C-h)-_;const Q=a;for(;a>t&&o>s&&this.ElementsAreEqual(a,o);)a--,o--;if(P[C]=a,S&&Math.abs(C-d)<=N&&a<=M[C])return i[0]=a,l[0]=o,Q>=M[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}if(N<=1447){let C=new Int32Array(c-f+2);C[0]=d-f+1,ee.Copy2(M,f,C,1,c-f+1),this.m_forwardHistory.push(C),C=new Int32Array(L-m+2),C[0]=h-m+1,ee.Copy2(P,m,C,1,L-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u)}PrettifyChanges(t){for(let n=0;n0,u=s.modifiedLength>0;for(;s.originalStart+s.originalLength=0;n--){const s=t[n];let r=0,i=0;if(n>0){const c=t[n-1];r=c.originalStart+c.originalLength,i=c.modifiedStart+c.modifiedLength}const l=s.originalLength>0,u=s.modifiedLength>0;let a=0,o=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let c=1;;c++){const m=s.originalStart-c,L=s.modifiedStart-c;if(mo&&(o=w,a=c)}s.originalStart-=a,s.modifiedStart-=a;const f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,s=t.length;n0&&L>a&&(a=L,o=c,f=m)}return a>0?[o,f]:null}_contiguousSequenceScore(t,n,s){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(t,n,s,r){const i=this._OriginalRegionIsBoundary(t,n)?1:0,l=this._ModifiedRegionIsBoundary(s,r)?1:0;return i+l}ConcatenateChanges(t,n){let s=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],s)){const r=new Array(t.length+n.length-1);return ee.Copy(t,0,r,0,t.length-1),r[t.length-1]=s[0],ee.Copy(n,1,r,t.length,n.length-1),r}else{const r=new Array(t.length+n.length);return ee.Copy(t,0,r,0,t.length),ee.Copy(n,0,r,t.length,n.length),r}}ChangesOverlap(t,n,s){if(K.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),K.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const r=t.originalStart;let i=t.originalLength;const l=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),s[0]=new $(r,i,l,u),!0}else return s[0]=null,!1}ClipDiagonalBound(t,n,s,r){if(t>=0&&t=An&&e<=Cn||e>=wn&&e<=vn}function de(e,t,n,s){let r="",i=0,l=-1,u=0,a=0;for(let o=0;o<=e.length;++o){if(o2){const f=r.lastIndexOf(n);f===-1?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf(n)),l=o,u=0;continue}else if(r.length!==0){r="",i=0,l=o,u=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",i=2)}else r.length>0?r+=`${n}${e.slice(l+1,o)}`:r=e.slice(l+1,o),i=o-l-1;l=o,u=0}else a===G&&u!==-1?++u:u=-1}return r}function it(e,t){if(t===null||typeof t!="object")throw new rt("pathObject","Object",t);const n=t.dir||t.root,s=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${s}`:`${n}${e}${s}`:s}const H={resolve(...e){let t="",n="",s=!1;for(let r=e.length-1;r>=-1;r--){let i;if(r>=0){if(i=e[r],D(i,"path"),i.length===0)continue}else t.length===0?i=Ue():(i=bn[`=${t}`]||Ue(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===q)&&(i=`${t}\\`));const l=i.length;let u=0,a="",o=!1;const f=i.charCodeAt(0);if(l===1)v(f)&&(u=1,o=!0);else if(v(f))if(o=!0,v(i.charCodeAt(1))){let c=2,m=c;for(;c2&&v(i.charCodeAt(2))&&(o=!0,u=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(s){if(t.length>0)break}else if(n=`${i.slice(u)}\\${n}`,s=o,o&&t.length>0)break}return n=de(n,!s,"\\",v),s?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){D(e,"path");const t=e.length;if(t===0)return".";let n=0,s,r=!1;const i=e.charCodeAt(0);if(t===1)return xe(i)?"\\":e;if(v(i))if(r=!0,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))&&(r=!0,n=3));let l=n0&&v(e.charCodeAt(t-1))&&(l+="\\"),s===void 0?r?`\\${l}`:l:r?`${s}\\${l}`:`${s}${l}`},isAbsolute(e){D(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return v(n)||t>2&&y(n)&&e.charCodeAt(1)===j&&v(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let s=!0,r=0;if(typeof n=="string"&&v(n.charCodeAt(0))){++r;const i=n.length;i>1&&v(n.charCodeAt(1))&&(++r,i>2&&(v(n.charCodeAt(2))?++r:s=!1))}if(s){for(;r=2&&(t=`\\${t.slice(r)}`)}return H.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t)return"";const n=H.resolve(e),s=H.resolve(t);if(n===s||(e=n.toLowerCase(),t=s.toLowerCase(),e===t))return"";let r=0;for(;rr&&e.charCodeAt(i-1)===q;)i--;const l=i-r;let u=0;for(;uu&&t.charCodeAt(a-1)===q;)a--;const o=a-u,f=lf){if(t.charCodeAt(u+m)===q)return s.slice(u+m+1);if(m===2)return s.slice(u+m)}l>f&&(e.charCodeAt(r+m)===q?c=m:m===2&&(c=3)),c===-1&&(c=0)}let L="";for(m=r+c+1;m<=i;++m)(m===i||e.charCodeAt(m)===q)&&(L+=L.length===0?"..":"\\..");return u+=c,L.length>0?`${L}${s.slice(u,a)}`:(s.charCodeAt(u)===q&&++u,s.slice(u,a))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=H.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===q){if(t.charCodeAt(1)===q){const n=t.charCodeAt(2);if(n!==Mn&&n!==G)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===j&&t.charCodeAt(2)===q)return`\\\\?\\${t}`;return e},dirname(e){D(e,"path");const t=e.length;if(t===0)return".";let n=-1,s=0;const r=e.charCodeAt(0);if(t===1)return v(r)?e:".";if(v(r)){if(n=s=1,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))?3:2,s=n);let i=-1,l=!0;for(let u=t-1;u>=s;--u)if(v(e.charCodeAt(u))){if(!l){i=u;break}}else l=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===j&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=n;--i){const a=e.charCodeAt(i);if(v(a)){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l==-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(v(e.charCodeAt(i))){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=0,n=-1,s=0,r=-1,i=!0,l=0;e.length>=2&&e.charCodeAt(1)===j&&y(e.charCodeAt(0))&&(t=s=2);for(let u=e.length-1;u>=t;--u){const a=e.charCodeAt(u);if(v(a)){if(!i){s=u+1;break}continue}r===-1&&(i=!1,r=u+1),a===G?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===s+1?"":e.slice(n,r)},format:it.bind(null,"\\"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let s=0,r=e.charCodeAt(0);if(n===1)return v(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(v(r)){if(s=1,v(e.charCodeAt(1))){let c=2,m=c;for(;c0&&(t.root=e.slice(0,s));let i=-1,l=s,u=-1,a=!0,o=e.length-1,f=0;for(;o>=s;--o){if(r=e.charCodeAt(o),v(r)){if(!a){l=o+1;break}continue}u===-1&&(a=!1,u=o+1),r===G?i===-1?i=o:f!==1&&(f=1):i!==-1&&(f=-1)}return u!==-1&&(i===-1||f===0||f===1&&i===u-1&&i===l+1?t.base=t.name=e.slice(l,u):(t.name=e.slice(l,i),t.base=e.slice(l,u),t.ext=e.slice(i,u))),l>0&&l!==s?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W={resolve(...e){let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Ue();D(r,"path"),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===F)}return t=de(t,!n,"/",xe),n?`/${t}`:t.length>0?t:"."},normalize(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F,n=e.charCodeAt(e.length-1)===F;return e=de(e,!t,"/",xe),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return D(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=s:t+=`/${s}`)}return t===void 0?".":W.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t||(e=W.resolve(e),t=W.resolve(t),e===t))return"";const n=1,s=e.length,r=s-n,i=1,l=t.length-i,u=ru){if(t.charCodeAt(i+o)===F)return t.slice(i+o+1);if(o===0)return t.slice(i+o)}else r>u&&(e.charCodeAt(n+o)===F?a=o:o===0&&(a=0));let f="";for(o=n+a+1;o<=s;++o)(o===s||e.charCodeAt(o)===F)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(i+a)}`},toNamespacedPath(e){return e},dirname(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F;let n=-1,s=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===F){if(!s){n=r;break}}else s=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a===F){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l==-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===F){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=-1,n=0,s=-1,r=!0,i=0;for(let l=e.length-1;l>=0;--l){const u=e.charCodeAt(l);if(u===F){if(!r){n=l+1;break}continue}s===-1&&(r=!1,s=l+1),u===G?t===-1?t=l:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===n+1?"":e.slice(t,s)},format:it.bind(null,"/"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===F;let s;n?(t.root="/",s=1):s=0;let r=-1,i=0,l=-1,u=!0,a=e.length-1,o=0;for(;a>=s;--a){const f=e.charCodeAt(a);if(f===F){if(!u){i=a+1;break}continue}l===-1&&(u=!1,l=a+1),f===G?r===-1?r=a:o!==1&&(o=1):r!==-1&&(o=-1)}if(l!==-1){const f=i===0&&n?1:i;r===-1||o===0||o===1&&r===l-1&&r===i+1?t.base=t.name=e.slice(f,l):(t.name=e.slice(f,r),t.base=e.slice(f,l),t.ext=e.slice(r,l))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};W.win32=H.win32=H,W.posix=H.posix=W,X==="win32"?H.normalize:W.normalize,X==="win32"?H.resolve:W.resolve,X==="win32"?H.relative:W.relative,X==="win32"?H.dirname:W.dirname,X==="win32"?H.basename:W.basename,X==="win32"?H.extname:W.extname,X==="win32"?H.sep:W.sep;const Pn=/^\w[\w\d+.-]*$/,pn=/^\//,Rn=/^\/\//;function lt(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&&!Pn.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!pn.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(Rn.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 ("//")')}}function Un(e,t){return!e&&!t?"file":e}function xn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Y&&(t=Y+t):t=Y;break}return t}const x="",Y="/",En=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class J{constructor(t,n,s,r,i,l=!1){typeof t=="object"?(this.scheme=t.scheme||x,this.authority=t.authority||x,this.path=t.path||x,this.query=t.query||x,this.fragment=t.fragment||x):(this.scheme=Un(t,l),this.authority=n||x,this.path=xn(this.scheme,s||x),this.query=r||x,this.fragment=i||x,lt(this,l))}static isUri(t){return t instanceof J?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Ee(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:s,path:r,query:i,fragment:l}=t;return n===void 0?n=this.scheme:n===null&&(n=x),s===void 0?s=this.authority:s===null&&(s=x),r===void 0?r=this.path:r===null&&(r=x),i===void 0?i=this.query:i===null&&(i=x),l===void 0?l=this.fragment:l===null&&(l=x),n===this.scheme&&s===this.authority&&r===this.path&&i===this.query&&l===this.fragment?this:new ne(n,s,r,i,l)}static parse(t,n=!1){const s=En.exec(t);return s?new ne(s[2]||x,ge(s[4]||x),ge(s[5]||x),ge(s[7]||x),ge(s[9]||x),n):new ne(x,x,x,x,x)}static file(t){let n=x;if(ue&&(t=t.replace(/\\/g,Y)),t[0]===Y&&t[1]===Y){const s=t.indexOf(Y,2);s===-1?(n=t.substring(2),t=Y):(n=t.substring(2,s),t=t.substring(s)||Y)}return new ne("file",n,t,x,x)}static from(t){const n=new ne(t.scheme,t.authority,t.path,t.query,t.fragment);return lt(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let s;return ue&&t.scheme==="file"?s=J.file(H.join(Ee(t,!0),...n)).path:s=W.join(t.path,...n),t.with({path:s})}toString(t=!1){return De(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof J)return t;{const n=new ne(t);return n._formatted=t.external,n._fsPath=t._sep===ut?t.fsPath:null,n}}else return t}}const ut=ue?1:void 0;class ne extends J{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Ee(this,!1)),this._fsPath}toString(t=!1){return t?De(this,!0):(this._formatted||(this._formatted=De(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=ut),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const at={[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 ot(e,t){let n,s=-1;for(let r=0;r=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n!==void 0&&(n+=e.charAt(r));else{n===void 0&&(n=e.substr(0,r));const l=at[i];l!==void 0?(s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n+=l):s===-1&&(s=r)}}return s!==-1&&(n+=encodeURIComponent(e.substring(s))),n!==void 0?n:e}function Dn(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,ue&&(n=n.replace(/\//g,"\\")),n}function De(e,t){const n=t?Dn:ot;let s="",{scheme:r,authority:i,path:l,query:u,fragment:a}=e;if(r&&(s+=r,s+=":"),(i||r==="file")&&(s+=Y,s+=Y),i){let o=i.indexOf("@");if(o!==-1){const f=i.substr(0,o);i=i.substr(o+1),o=f.indexOf(":"),o===-1?s+=n(f,!1):(s+=n(f.substr(0,o),!1),s+=":",s+=n(f.substr(o+1),!1)),s+="@"}i=i.toLowerCase(),o=i.indexOf(":"),o===-1?s+=n(i,!1):(s+=n(i.substr(0,o),!1),s+=i.substr(o))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const o=l.charCodeAt(1);o>=65&&o<=90&&(l=`/${String.fromCharCode(o+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const o=l.charCodeAt(0);o>=65&&o<=90&&(l=`${String.fromCharCode(o+32)}:${l.substr(2)}`)}s+=n(l,!0)}return u&&(s+="?",s+=n(u,!1)),a&&(s+="#",s+=t?a:ot(a,!1)),s}function ct(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ct(e.substr(3)):e}}const ft=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ge(e){return e.match(ft)?e.replace(ft,t=>ct(t)):e}class B{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new B(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return B.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return B.isBefore(this,t)}static isBefore(t,n){return t.lineNumbers||t===s&&n>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=s,this.endColumn=r)}isEmpty(){return E.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return E.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return E.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return E.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return E.plusRange(this,t)}static plusRange(t,n){let s,r,i,l;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,l=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,l=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,l=t.endColumn),new E(s,r,i,l)}intersectRanges(t){return E.intersectRanges(this,t)}static intersectRanges(t,n){let s=t.startLineNumber,r=t.startColumn,i=t.endLineNumber,l=t.endColumn,u=n.startLineNumber,a=n.startColumn,o=n.endLineNumber,f=n.endColumn;return so?(i=o,l=f):i===o&&(l=Math.min(l,f)),s>i||s===i&&r>l?null:new E(s,r,i,l)}equalsRange(t){return E.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return E.getEndPosition(this)}static getEndPosition(t){return new B(t.endLineNumber,t.endColumn)}getStartPosition(){return E.getStartPosition(this)}static getStartPosition(t){return new B(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new E(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new E(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return E.collapseToStart(this)}static collapseToStart(t){return new E(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new E(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new E(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const kn=3;function ht(e,t,n,s){return new z(e,t,n).ComputeDiff(s)}class mt{constructor(t){const n=[],s=[];for(let r=0,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const L=s.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),b=r.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let w=ht(L,b,i,!0).changes;u&&(w=Tn(w)),m=[];for(let M=0,P=w.length;M1&&w>1;){const M=m.charCodeAt(b-2),P=L.charCodeAt(w-2);if(M!==P)break;b--,w--}(b>1||w>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,b,l+1,1,w)}{let b=Fe(m,1),w=Fe(L,1);const M=m.length+1,P=L.length+1;for(;b!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function se(e){return e<0?0:e>4294967295?4294967295:e|0}class Hn{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class qn{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=se(t);const s=this.values,r=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(s.length+i),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t),t+i),this.values.set(n,t),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=se(t),n=se(n),this.values[t]===n?!1:(this.values[t]=n,t-1=s.length)return!1;let i=s.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(s.length-n),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=se(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let s=n;s<=t;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,s=this.values.length-1,r=0,i=0,l=0;for(;n<=s;)if(r=n+(s-n)/2|0,i=this.prefixSum[r],l=i-this.values[r],t=i)n=r+1;else break;return new Hn(r,t-l)}}class Wn{constructor(t,n,s,r){this._uri=t,this._lines=n,this._eol=s,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const s of n)this._acceptDeleteRange(s.range),this._acceptInsertText(new B(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,s=new Uint32Array(n);for(let r=0;r/?";function Yn(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of Bn)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const Vn=Yn();function $n(e){let t=Vn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const zn={maxLen:1e3,windowSize:15,timeBudget:150};function _t(e,t,n,s,r=zn){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:s+=o,n=n.substring(o,e+r.maxLen/2),_t(e,t,n,s,r)}const i=Date.now(),l=e-1-s;let u=-1,a=null;for(let o=1;!(Date.now()-i>=r.timeBudget);o++){const f=l-r.windowSize*o;t.lastIndex=Math.max(0,f);const c=Gn(t,n,l,u);if(!c&&a||(a=c,f<=0))break;u=f}if(a){let o={word:a[0],startColumn:s+1+a.index,endColumn:s+1+a.index+a[0].length};return t.lastIndex=0,o}return null}function Gn(e,t,n,s){let r;for(;r=e.exec(t);){const i=r.index||0;if(i<=n&&e.lastIndex>=n)return r;if(s>0&&i>s)return null}return null}class Te{constructor(t){let n=gt(t);this._defaultValue=n,this._asciiMap=Te._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let s=0;s<256;s++)n[s]=t;return n}set(t,n){let s=gt(n);t>=0&&t<256?this._asciiMap[t]=s:this._map.set(t,s)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class jn{constructor(t,n,s){const r=new Uint8Array(t*n);for(let i=0,l=t*n;in&&(n=a),u>s&&(s=u),o>s&&(s=o)}n++,s++;let r=new jn(s,n,0);for(let i=0,l=t.length;i=this._maxCharCode?0:this._states.get(t,n)}}let Ie=null;function Qn(){return Ie===null&&(Ie=new yn([[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]])),Ie}let ce=null;function Zn(){if(ce===null){ce=new Te(0);const e=` <>'"\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 n=0;nr);if(r>0){const u=n.charCodeAt(r-1),a=n.charCodeAt(l);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&l--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:l+2},url:n.substring(r,l+1)}}static computeLinks(t,n=Qn()){const s=Zn();let r=[];for(let i=1,l=t.getLineCount();i<=l;i++){const u=t.getLineContent(i),a=u.length;let o=0,f=0,c=0,m=1,L=!1,b=!1,w=!1,M=!1;for(;o=0?(r+=s?1:-1,r<0?r=t.length-1:r%=t.length,t[r]):null}}He.INSTANCE=new He;class U{constructor(t){this.element=t,this.next=U.Undefined,this.prev=U.Undefined}}U.Undefined=new U(void 0);class Lt{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let t=this._first;for(;t!==U.Undefined;){const n=t.next;t.prev=U.Undefined,t.next=U.Undefined,t=n}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const s=new U(t);if(this._first===U.Undefined)this._first=s,this._last=s;else if(n){const i=this._last;this._last=s,s.prev=i,i.next=s}else{const i=this._first;this._first=s,s.next=i,i.prev=s}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(s))}}shift(){if(this._first!==U.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==U.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==U.Undefined&&t.next!==U.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===U.Undefined&&t.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):t.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):t.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==U.Undefined;)yield t.element,t=t.next}}const Jn=T.performance&&typeof T.performance.now=="function";class Le{constructor(t){this._highResolution=Jn&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Le(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?T.performance.now():Date.now()}}var qe;(function(e){e.None=()=>Oe.None;function t(d){return(h,g=null,_)=>{let A=!1,S;return S=d(N=>{if(!A)return S?S.dispose():A=!0,h.call(g,N)},null,_),A&&S.dispose(),S}}e.once=t;function n(d,h){return a((g,_=null,A)=>d(S=>g.call(_,h(S)),null,A))}e.map=n;function s(d,h){return a((g,_=null,A)=>d(S=>{h(S),g.call(_,S)},null,A))}e.forEach=s;function r(d,h){return a((g,_=null,A)=>d(S=>h(S)&&g.call(_,S),null,A))}e.filter=r;function i(d){return d}e.signal=i;function l(...d){return(h,g=null,_)=>un(...d.map(A=>A(S=>h.call(g,S),null,_)))}e.any=l;function u(d,h,g){let _=g;return n(d,A=>(_=h(_,A),_))}e.reduce=u;function a(d){let h;const g=new O({onFirstListenerAdd(){h=d(g.fire,g)},onLastListenerRemove(){h.dispose()}});return g.event}function o(d,h,g=100,_=!1,A){let S,N,p,I=0;const R=new O({leakWarningThreshold:A,onFirstListenerAdd(){S=d(C=>{I++,N=h(N,C),_&&!p&&(R.fire(N),N=void 0),clearTimeout(p),p=setTimeout(()=>{const Q=N;N=void 0,p=void 0,(!_||I>1)&&R.fire(Q),I=0},g)})},onLastListenerRemove(){S.dispose()}});return R.event}e.debounce=o;function f(d,h=(g,_)=>g===_){let g=!0,_;return r(d,A=>{const S=g||!h(A,_);return g=!1,_=A,S})}e.latch=f;function c(d,h){return[e.filter(d,h),e.filter(d,g=>!h(g))]}e.split=c;function m(d,h=!1,g=[]){let _=g.slice(),A=d(p=>{_?_.push(p):N.fire(p)});const S=()=>{_&&_.forEach(p=>N.fire(p)),_=null},N=new O({onFirstListenerAdd(){A||(A=d(p=>N.fire(p)))},onFirstListenerDidAdd(){_&&(h?setTimeout(S):S())},onLastListenerRemove(){A&&A.dispose(),A=null}});return N.event}e.buffer=m;class L{constructor(h){this.event=h}map(h){return new L(n(this.event,h))}forEach(h){return new L(s(this.event,h))}filter(h){return new L(r(this.event,h))}reduce(h,g){return new L(u(this.event,h,g))}latch(){return new L(f(this.event))}debounce(h,g=100,_=!1,A){return new L(o(this.event,h,g,_,A))}on(h,g,_){return this.event(h,g,_)}once(h,g,_){return t(this.event)(h,g,_)}}function b(d){return new L(d)}e.chain=b;function w(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.on(h,_),S=()=>d.removeListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromNodeEventEmitter=w;function M(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.addEventListener(h,_),S=()=>d.removeEventListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromDOMEventEmitter=M;function P(d){return new Promise(h=>t(d)(h))}e.toPromise=P})(qe||(qe={}));class Ne{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Ne._idPool++}`}start(t){this._stopWatch=new Le(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Ne._idPool=0;class O{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=((n=this._options)===null||n===void 0?void 0:n._profName)?new Ne(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,s)=>{var r;this._listeners||(this._listeners=new Lt);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(n?[t,n]:t);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),a=Je(()=>{u&&u(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return s instanceof le?s.add(a):Array.isArray(s)&&s.push(a),a}),this._event}fire(t){var n,s;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Lt);for(let r of this._listeners)this._deliveryQueue.push([r,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,i]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,i):r[0].call(r[1],i)}catch(l){en(l)}}(s=this._perfMon)===null||s===void 0||s.stop()}}dispose(){var t,n,s,r,i;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(r=(s=this._options)===null||s===void 0?void 0:s.onLastListenerRemove)===null||r===void 0||r.call(s),(i=this._leakageMon)===null||i===void 0||i.dispose())}}const Nt=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Se;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof be?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:qe.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Nt})})(Se||(Se={}));class be{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?Nt:(this._emitter||(this._emitter=new O),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class On{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new be),this._token}cancel(){this._token?this._token instanceof be&&this._token.cancel():this._token=Se.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof be&&this._token.dispose():this._token=Se.None}}class We{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const Be=new We,Ye=new We,Ve=new We;(function(){function e(t,n,s=n,r=s){Be.define(t,n),Ye.define(t,s),Ve.define(t,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var St;(function(e){function t(l){return Be.keyCodeToStr(l)}e.toString=t;function n(l){return Be.strToKeyCode(l)}e.fromString=n;function s(l){return Ye.keyCodeToStr(l)}e.toUserSettingsUS=s;function r(l){return Ve.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function i(l){return Ye.strToKeyCode(l)||Ve.strToKeyCode(l)}e.fromUserSettings=i})(St||(St={}));function Kn(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class V extends E{constructor(t,n,s,r){super(t,n,s,r);this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=s,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return V.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new V(this.startLineNumber,this.startColumn,t,n):new V(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new V(t,n,this.endLineNumber,this.endColumn):new V(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new V(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new V(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let s=0,r=t.length;sthis._lines.length)n=this._lines.length,s=this._lines[n-1].length+1,r=!0;else{let i=this._lines[n-1].length+1;s<1?(s=1,r=!0):s>i&&(s=i,r=!0)}return r?{lineNumber:n,column:s}:t}}class ie{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new ns(J.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,s,r){return re(this,void 0,void 0,function*(){const i=this._getModel(t),l=this._getModel(n);if(!i||!l)return null;const u=i.getLinesContent(),a=l.getLinesContent(),f=new In(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),c=f.changes.length>0?!1:this._modelsAreIdentical(i,l);return{quitEarly:f.quitEarly,identical:c,changes:f.changes}})}_modelsAreIdentical(t,n){const s=t.getLineCount(),r=n.getLineCount();if(s!==r)return!1;for(let i=1;i<=s;i++){const l=t.getLineContent(i),u=n.getLineContent(i);if(l!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return re(this,void 0,void 0,function*(){const s=this._getModel(t);if(!s)return n;const r=[];let i;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return E.compareRangesUsingStarts(l.range,u.range);let a=l.range?0:1,o=u.range?0:1;return a-o});for(let{range:l,text:u,eol:a}of n){if(typeof a=="number"&&(i=a),E.isEmpty(l)&&!u)continue;const o=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),o===u)continue;if(Math.max(u.length,o.length)>ie._diffLimit){r.push({range:l,text:u});continue}const f=Sn(o,u,!1),c=s.offsetAt(E.lift(l).getStartPosition());for(const m of f){const L=s.positionAt(c+m.originalStart),b=s.positionAt(c+m.originalStart+m.originalLength),w={text:u.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:b.lineNumber,endColumn:b.column}};s.getValueInRange(w.range)!==w.text&&r.push(w)}}return typeof i=="number"&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(t){return re(this,void 0,void 0,function*(){let n=this._getModel(t);return n?Xn(n):null})}textualSuggest(t,n,s,r){return re(this,void 0,void 0,function*(){const i=new Le(!0),l=new RegExp(s,r),u=new Set;e:for(let a of t){const o=this._getModel(a);if(!!o){for(let f of o.words(l))if(!(f===n||!isNaN(Number(f)))&&(u.add(f),u.size>ie._suggestionsLimit))break e}}return{words:Array.from(u),duration:i.elapsed()}})}computeWordRanges(t,n,s,r){return re(this,void 0,void 0,function*(){let i=this._getModel(t);if(!i)return Object.create(null);const l=new RegExp(s,r),u=Object.create(null);for(let a=n.startLineNumber;athis._host.fhr(u,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(l,n),Promise.resolve(Re(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(s){return Promise.reject(s)}}}ie._diffLimit=1e5,ie._suggestionsLimit=1e4,typeof importScripts=="function"&&(T.monaco=ts());let ye=!1;function Jt(e){if(ye)return;ye=!0;const t=new dn(n=>{self.postMessage(n)},n=>new ie(n,e));self.onmessage=n=>{t.onmessage(n.data)}}return self.onmessage=e=>{ye||Jt(null)},Ae.initialize=Jt,Object.defineProperty(Ae,"__esModule",{value:!0}),Ae})({}); diff --git a/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js b/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js new file mode 100644 index 00000000..3f322c18 --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/editor.worker.7ef0e0c2.js @@ -0,0 +1,3 @@ +(function(){"use strict";class Xt{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` + +`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Jt=new Xt;function Ot(e){Kt(e)||Jt.onUnexpectedError(e)}function ye(e){if(e instanceof Error){let{name:t,message:n}=e;const s=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:s}}return e}const Qe="Canceled";function Kt(e){return e instanceof Error&&e.name===Qe&&e.message===Qe}function en(e){const t=this;let n=!1,s;return function(){return n||(n=!0,s=e.apply(t,arguments)),s}}var Ae;(function(e){function t(d){return d&&typeof d=="object"&&typeof d[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function s(){return n}e.empty=s;function*r(d){yield d}e.single=r;function i(d){return d||n}e.from=i;function l(d){return!d||d[Symbol.iterator]().next().done===!0}e.isEmpty=l;function u(d){return d[Symbol.iterator]().next().value}e.first=u;function a(d,h){for(const g of d)if(h(g))return!0;return!1}e.some=a;function o(d,h){for(const g of d)if(h(g))return g}e.find=o;function*f(d,h){for(const g of d)h(g)&&(yield g)}e.filter=f;function*c(d,h){let g=0;for(const _ of d)yield h(_,g++)}e.map=c;function*m(...d){for(const h of d)for(const g of h)yield g}e.concat=m;function*L(d){for(const h of d)for(const g of h)yield g}e.concatNested=L;function b(d,h,g){let _=g;for(const A of d)_=h(_,A);return _}e.reduce=b;function*w(d,h,g=d.length){for(h<0&&(h+=d.length),g<0?g+=d.length:g>d.length&&(g=d.length);h_===A){const _=d[Symbol.iterator](),A=h[Symbol.iterator]();for(;;){const S=_.next(),N=A.next();if(S.done!==N.done)return!1;if(S.done)return!0;if(!g(S.value,N.value))return!1}}e.equals=P})(Ae||(Ae={}));function es(e){return e}function ts(e,t){}class tn extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Ze(e){if(Ae.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(s){t.push(s)}if(t.length===1)throw t[0];if(t.length>1)throw new tn(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function nn(...e){return Xe(()=>Ze(e))}function Xe(e){return{dispose:en(()=>{e()})}}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Ze(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.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(t),t}}le.DISABLE_DISPOSED_WARNING=!1;class Je{constructor(){this._store=new le,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Je.None=Object.freeze({dispose(){}});var we;const he="en";let Ce=!1,ve=!1,Me=!1,me,Pe=he,sn,Z;const T=typeof self=="object"?self:typeof global=="object"?global:{};let k;typeof T.vscode!="undefined"&&typeof T.vscode.process!="undefined"?k=T.vscode.process:typeof process!="undefined"&&(k=process);const rn=typeof((we=k==null?void 0:k.versions)===null||we===void 0?void 0:we.electron)=="string"&&k.type==="renderer";if(typeof navigator=="object"&&!rn)Z=navigator.userAgent,Ce=Z.indexOf("Windows")>=0,ve=Z.indexOf("Macintosh")>=0,(Z.indexOf("Macintosh")>=0||Z.indexOf("iPad")>=0||Z.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Me=Z.indexOf("Linux")>=0,me=navigator.language,Pe=me;else if(typeof k=="object"){Ce=k.platform==="win32",ve=k.platform==="darwin",Me=k.platform==="linux",Me&&!!k.env.SNAP&&k.env.SNAP_REVISION,me=he,Pe=he;const e=k.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];me=t.locale,Pe=n||he,sn=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const ue=Ce,ln=ve,Oe=function(){if(T.setImmediate)return T.setImmediate.bind(T);if(typeof T.postMessage=="function"&&!T.importScripts){let n=[];T.addEventListener("message",r=>{if(r.data&&r.data.vscodeSetImmediateId)for(let i=0,l=n.length;i{const i=++s;n.push({id:i,callback:r}),T.postMessage({vscodeSetImmediateId:i},"*")}}if(typeof(k==null?void 0:k.nextTick)=="function")return k.nextTick.bind(k);const t=Promise.resolve();return n=>t.then(n)}();function un(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function pe(e){const t=[];for(const n of un(e))typeof e[n]=="function"&&t.push(n);return t}function Ke(e,t){const n=r=>function(){const i=Array.prototype.slice.call(arguments,0);return t(r,i)};let s={};for(const r of e)s[r]=n(r);return s}const an="$initialize";class on{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let s=String(++this._lastSentReq);return new Promise((r,i)=>{this._pendingReplies[s]={resolve:r,reject:i},this._send({vsWorker:this._workerId,req:s,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let i=t;if(!this._pendingReplies[i.seq]){console.warn("Got reply to unknown seq");return}let l=this._pendingReplies[i.seq];if(delete this._pendingReplies[i.seq],i.err){let u=i.err;i.err.$isError&&(u=new Error,u.name=i.err.name,u.message=i.err.message,u.stack=i.err.stack),l.reject(u);return}l.resolve(i.res);return}let n=t,s=n.req;this._handler.handleMessage(n.method,n.args).then(i=>{this._send({vsWorker:this._workerId,seq:s,res:i,err:void 0})},i=>{i.detail instanceof Error&&(i.detail=ye(i.detail)),this._send({vsWorker:this._workerId,seq:s,res:void 0,err:ye(i)})})}_send(t){let n=[];if(t.req){const s=t;for(let r=0;r{t(s,r)},handleMessage:(s,r)=>this._handleMessage(s,r)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===an)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(s){return Promise.reject(s)}}initialize(t,n,s,r){this._protocol.setWorkerId(t);const l=Ke(r,(u,a)=>this._protocol.sendMessage(u,a));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(l),Promise.resolve(pe(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,a)=>{self.require([s],o=>{if(this._requestHandler=o.create(l),!this._requestHandler){a(new Error("No RequestHandler!"));return}u(pe(this._requestHandler))},a)}))}}class ${constructor(t,n,s,r){this.originalStart=t,this.originalLength=n,this.modifiedStart=s,this.modifiedLength=r}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function fn(e){return e.split(/\r\n|\r|\n/)}function hn(e){for(let t=0,n=e.length;t=0;n--){const s=e.charCodeAt(n);if(s!==32&&s!==9)return n}return-1}function et(e,t){return(t<<5)-t+e|0}function dn(e,t){t=et(149417,t);for(let n=0,s=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new $(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(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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 z{constructor(t,n,s=null){this.ContinueProcessingPredicate=s,this._originalSequence=t,this._modifiedSequence=n;const[r,i,l]=z._getElements(t),[u,a,o]=z._getElements(n);this._hasStrings=l&&o,this._originalStringElements=r,this._originalElementsOrHash=i,this._modifiedStringElements=u,this._modifiedElementsOrHash=a,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(z._isStringArray(n)){const s=new Int32Array(n.length);for(let r=0,i=n.length;r=t&&r>=s&&this.ElementsAreEqual(n,r);)n--,r--;if(t>n||s>r){let c;return s<=r?(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new $(t,0,s,r-s+1)]):t<=n?(K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[new $(t,n-t+1,s,0)]):(K.Assert(t===n+1,"originalStart should only be one more than originalEnd"),K.Assert(s===r+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const l=[0],u=[0],a=this.ComputeRecursionPoint(t,n,s,r,l,u,i),o=l[0],f=u[0];if(a!==null)return a;if(!i[0]){const c=this.ComputeDiffRecursive(t,o,s,f,i);let m=[];return i[0]?m=[new $(o+1,n-(o+1)+1,f+1,r-(f+1)+1)]:m=this.ComputeDiffRecursive(o+1,n,f+1,r,i),this.ConcatenateChanges(c,m)}return[new $(t,n-t+1,s,r-s+1)]}WALKTRACE(t,n,s,r,i,l,u,a,o,f,c,m,L,b,w,M,P,d){let h=null,g=null,_=new nt,A=n,S=s,N=L[0]-M[0]-r,p=-1073741824,I=this.m_forwardHistory.length-1;do{const R=N+t;R===A||R=0&&(o=this.m_forwardHistory[I],t=o[0],A=1,S=o.length-1)}while(--I>=-1);if(h=_.getReverseChanges(),d[0]){let R=L[0]+1,C=M[0]+1;if(h!==null&&h.length>0){const Q=h[h.length-1];R=Math.max(R,Q.getOriginalEnd()),C=Math.max(C,Q.getModifiedEnd())}g=[new $(R,m-R+1,C,w-C+1)]}else{_=new nt,A=l,S=u,N=L[0]-M[0]-a,p=1073741824,I=P?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=N+i;R===A||R=f[R+1]?(c=f[R+1]-1,b=c-N-a,c>p&&_.MarkNextChange(),p=c+1,_.AddOriginalElement(c+1,b+1),N=R+1-i):(c=f[R-1],b=c-N-a,c>p&&_.MarkNextChange(),p=c,_.AddModifiedElement(c+1,b+1),N=R-1-i),I>=0&&(f=this.m_reverseHistory[I],i=f[0],A=1,S=f.length-1)}while(--I>=-1);g=_.getChanges()}return this.ConcatenateChanges(h,g)}ComputeRecursionPoint(t,n,s,r,i,l,u){let a=0,o=0,f=0,c=0,m=0,L=0;t--,s--,i[0]=0,l[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const b=n-t+(r-s),w=b+1,M=new Int32Array(w),P=new Int32Array(w),d=r-s,h=n-t,g=t-s,_=n-r,S=(h-d)%2===0;M[d]=t,P[h]=n,u[0]=!1;for(let N=1;N<=b/2+1;N++){let p=0,I=0;f=this.ClipDiagonalBound(d-N,N,d,w),c=this.ClipDiagonalBound(d+N,N,d,w);for(let C=f;C<=c;C+=2){C===f||Cp+I&&(p=a,I=o),!S&&Math.abs(C-h)<=N-1&&a>=P[C])return i[0]=a,l[0]=o,Q<=P[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}const R=(p-t+(I-s)-N)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(p,R))return u[0]=!0,i[0]=p,l[0]=I,R>0&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):(t++,s++,[new $(t,n-t+1,s,r-s+1)]);m=this.ClipDiagonalBound(h-N,N,h,w),L=this.ClipDiagonalBound(h+N,N,h,w);for(let C=m;C<=L;C+=2){C===m||C=P[C+1]?a=P[C+1]-1:a=P[C-1],o=a-(C-h)-_;const Q=a;for(;a>t&&o>s&&this.ElementsAreEqual(a,o);)a--,o--;if(P[C]=a,S&&Math.abs(C-d)<=N&&a<=M[C])return i[0]=a,l[0]=o,Q>=M[C]&&1447>0&&N<=1447+1?this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u):null}if(N<=1447){let C=new Int32Array(c-f+2);C[0]=d-f+1,ee.Copy2(M,f,C,1,c-f+1),this.m_forwardHistory.push(C),C=new Int32Array(L-m+2),C[0]=h-m+1,ee.Copy2(P,m,C,1,L-m+1),this.m_reverseHistory.push(C)}}return this.WALKTRACE(d,f,c,g,h,m,L,_,M,P,a,n,i,o,r,l,S,u)}PrettifyChanges(t){for(let n=0;n0,u=s.modifiedLength>0;for(;s.originalStart+s.originalLength=0;n--){const s=t[n];let r=0,i=0;if(n>0){const c=t[n-1];r=c.originalStart+c.originalLength,i=c.modifiedStart+c.modifiedLength}const l=s.originalLength>0,u=s.modifiedLength>0;let a=0,o=this._boundaryScore(s.originalStart,s.originalLength,s.modifiedStart,s.modifiedLength);for(let c=1;;c++){const m=s.originalStart-c,L=s.modifiedStart-c;if(mo&&(o=w,a=c)}s.originalStart-=a,s.modifiedStart-=a;const f=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],f)){t[n-1]=f[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,s=t.length;n0&&L>a&&(a=L,o=c,f=m)}return a>0?[o,f]:null}_contiguousSequenceScore(t,n,s){let r=0;for(let i=0;i=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._OriginalIsBoundary(s-1)||this._OriginalIsBoundary(s))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const s=t+n;if(this._ModifiedIsBoundary(s-1)||this._ModifiedIsBoundary(s))return!0}return!1}_boundaryScore(t,n,s,r){const i=this._OriginalRegionIsBoundary(t,n)?1:0,l=this._ModifiedRegionIsBoundary(s,r)?1:0;return i+l}ConcatenateChanges(t,n){let s=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],s)){const r=new Array(t.length+n.length-1);return ee.Copy(t,0,r,0,t.length-1),r[t.length-1]=s[0],ee.Copy(n,1,r,t.length,n.length-1),r}else{const r=new Array(t.length+n.length);return ee.Copy(t,0,r,0,t.length),ee.Copy(n,0,r,t.length,n.length),r}}ChangesOverlap(t,n,s){if(K.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),K.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const r=t.originalStart;let i=t.originalLength;const l=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(i=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),s[0]=new $(r,i,l,u),!0}else return s[0]=null,!1}ClipDiagonalBound(t,n,s,r){if(t>=0&&t=Ln&&e<=Sn||e>=Nn&&e<=bn}function de(e,t,n,s){let r="",i=0,l=-1,u=0,a=0;for(let o=0;o<=e.length;++o){if(o2){const f=r.lastIndexOf(n);f===-1?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf(n)),l=o,u=0;continue}else if(r.length!==0){r="",i=0,l=o,u=0;continue}}t&&(r+=r.length>0?`${n}..`:"..",i=2)}else r.length>0?r+=`${n}${e.slice(l+1,o)}`:r=e.slice(l+1,o),i=o-l-1;l=o,u=0}else a===G&&u!==-1?++u:u=-1}return r}function rt(e,t){if(t===null||typeof t!="object")throw new st("pathObject","Object",t);const n=t.dir||t.root,s=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${s}`:`${n}${e}${s}`:s}const H={resolve(...e){let t="",n="",s=!1;for(let r=e.length-1;r>=-1;r--){let i;if(r>=0){if(i=e[r],D(i,"path"),i.length===0)continue}else t.length===0?i=Re():(i=_n[`=${t}`]||Re(),(i===void 0||i.slice(0,2).toLowerCase()!==t.toLowerCase()&&i.charCodeAt(2)===q)&&(i=`${t}\\`));const l=i.length;let u=0,a="",o=!1;const f=i.charCodeAt(0);if(l===1)v(f)&&(u=1,o=!0);else if(v(f))if(o=!0,v(i.charCodeAt(1))){let c=2,m=c;for(;c2&&v(i.charCodeAt(2))&&(o=!0,u=3));if(a.length>0)if(t.length>0){if(a.toLowerCase()!==t.toLowerCase())continue}else t=a;if(s){if(t.length>0)break}else if(n=`${i.slice(u)}\\${n}`,s=o,o&&t.length>0)break}return n=de(n,!s,"\\",v),s?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){D(e,"path");const t=e.length;if(t===0)return".";let n=0,s,r=!1;const i=e.charCodeAt(0);if(t===1)return Ue(i)?"\\":e;if(v(i))if(r=!0,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))&&(r=!0,n=3));let l=n0&&v(e.charCodeAt(t-1))&&(l+="\\"),s===void 0?r?`\\${l}`:l:r?`${s}\\${l}`:`${s}${l}`},isAbsolute(e){D(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return v(n)||t>2&&y(n)&&e.charCodeAt(1)===j&&v(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let i=0;i0&&(t===void 0?t=n=l:t+=`\\${l}`)}if(t===void 0)return".";let s=!0,r=0;if(typeof n=="string"&&v(n.charCodeAt(0))){++r;const i=n.length;i>1&&v(n.charCodeAt(1))&&(++r,i>2&&(v(n.charCodeAt(2))?++r:s=!1))}if(s){for(;r=2&&(t=`\\${t.slice(r)}`)}return H.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t)return"";const n=H.resolve(e),s=H.resolve(t);if(n===s||(e=n.toLowerCase(),t=s.toLowerCase(),e===t))return"";let r=0;for(;rr&&e.charCodeAt(i-1)===q;)i--;const l=i-r;let u=0;for(;uu&&t.charCodeAt(a-1)===q;)a--;const o=a-u,f=lf){if(t.charCodeAt(u+m)===q)return s.slice(u+m+1);if(m===2)return s.slice(u+m)}l>f&&(e.charCodeAt(r+m)===q?c=m:m===2&&(c=3)),c===-1&&(c=0)}let L="";for(m=r+c+1;m<=i;++m)(m===i||e.charCodeAt(m)===q)&&(L+=L.length===0?"..":"\\..");return u+=c,L.length>0?`${L}${s.slice(u,a)}`:(s.charCodeAt(u)===q&&++u,s.slice(u,a))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=H.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===q){if(t.charCodeAt(1)===q){const n=t.charCodeAt(2);if(n!==An&&n!==G)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(y(t.charCodeAt(0))&&t.charCodeAt(1)===j&&t.charCodeAt(2)===q)return`\\\\?\\${t}`;return e},dirname(e){D(e,"path");const t=e.length;if(t===0)return".";let n=-1,s=0;const r=e.charCodeAt(0);if(t===1)return v(r)?e:".";if(v(r)){if(n=s=1,v(e.charCodeAt(1))){let u=2,a=u;for(;u2&&v(e.charCodeAt(2))?3:2,s=n);let i=-1,l=!0;for(let u=t-1;u>=s;--u)if(v(e.charCodeAt(u))){if(!l){i=u;break}}else l=!1;if(i===-1){if(n===-1)return".";i=n}return e.slice(0,i)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(e.length>=2&&y(e.charCodeAt(0))&&e.charCodeAt(1)===j&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=n;--i){const a=e.charCodeAt(i);if(v(a)){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=n;--i)if(v(e.charCodeAt(i))){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=0,n=-1,s=0,r=-1,i=!0,l=0;e.length>=2&&e.charCodeAt(1)===j&&y(e.charCodeAt(0))&&(t=s=2);for(let u=e.length-1;u>=t;--u){const a=e.charCodeAt(u);if(v(a)){if(!i){s=u+1;break}continue}r===-1&&(i=!1,r=u+1),a===G?n===-1?n=u:l!==1&&(l=1):n!==-1&&(l=-1)}return n===-1||r===-1||l===0||l===1&&n===r-1&&n===s+1?"":e.slice(n,r)},format:rt.bind(null,"\\"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let s=0,r=e.charCodeAt(0);if(n===1)return v(r)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(v(r)){if(s=1,v(e.charCodeAt(1))){let c=2,m=c;for(;c0&&(t.root=e.slice(0,s));let i=-1,l=s,u=-1,a=!0,o=e.length-1,f=0;for(;o>=s;--o){if(r=e.charCodeAt(o),v(r)){if(!a){l=o+1;break}continue}u===-1&&(a=!1,u=o+1),r===G?i===-1?i=o:f!==1&&(f=1):i!==-1&&(f=-1)}return u!==-1&&(i===-1||f===0||f===1&&i===u-1&&i===l+1?t.base=t.name=e.slice(l,u):(t.name=e.slice(l,i),t.base=e.slice(l,u),t.ext=e.slice(i,u))),l>0&&l!==s?t.dir=e.slice(0,l-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},W={resolve(...e){let t="",n=!1;for(let s=e.length-1;s>=-1&&!n;s--){const r=s>=0?e[s]:Re();D(r,"path"),r.length!==0&&(t=`${r}/${t}`,n=r.charCodeAt(0)===F)}return t=de(t,!n,"/",Ue),n?`/${t}`:t.length>0?t:"."},normalize(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F,n=e.charCodeAt(e.length-1)===F;return e=de(e,!t,"/",Ue),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return D(e,"path"),e.length>0&&e.charCodeAt(0)===F},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=s:t+=`/${s}`)}return t===void 0?".":W.normalize(t)},relative(e,t){if(D(e,"from"),D(t,"to"),e===t||(e=W.resolve(e),t=W.resolve(t),e===t))return"";const n=1,s=e.length,r=s-n,i=1,l=t.length-i,u=ru){if(t.charCodeAt(i+o)===F)return t.slice(i+o+1);if(o===0)return t.slice(i+o)}else r>u&&(e.charCodeAt(n+o)===F?a=o:o===0&&(a=0));let f="";for(o=n+a+1;o<=s;++o)(o===s||e.charCodeAt(o)===F)&&(f+=f.length===0?"..":"/..");return`${f}${t.slice(i+a)}`},toNamespacedPath(e){return e},dirname(e){if(D(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===F;let n=-1,s=!0;for(let r=e.length-1;r>=1;--r)if(e.charCodeAt(r)===F){if(!s){n=r;break}}else s=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&D(t,"ext"),D(e,"path");let n=0,s=-1,r=!0,i;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let l=t.length-1,u=-1;for(i=e.length-1;i>=0;--i){const a=e.charCodeAt(i);if(a===F){if(!r){n=i+1;break}}else u===-1&&(r=!1,u=i+1),l>=0&&(a===t.charCodeAt(l)?--l===-1&&(s=i):(l=-1,s=u))}return n===s?s=u:s===-1&&(s=e.length),e.slice(n,s)}for(i=e.length-1;i>=0;--i)if(e.charCodeAt(i)===F){if(!r){n=i+1;break}}else s===-1&&(r=!1,s=i+1);return s===-1?"":e.slice(n,s)},extname(e){D(e,"path");let t=-1,n=0,s=-1,r=!0,i=0;for(let l=e.length-1;l>=0;--l){const u=e.charCodeAt(l);if(u===F){if(!r){n=l+1;break}continue}s===-1&&(r=!1,s=l+1),u===G?t===-1?t=l:i!==1&&(i=1):t!==-1&&(i=-1)}return t===-1||s===-1||i===0||i===1&&t===s-1&&t===n+1?"":e.slice(t,s)},format:rt.bind(null,"/"),parse(e){D(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===F;let s;n?(t.root="/",s=1):s=0;let r=-1,i=0,l=-1,u=!0,a=e.length-1,o=0;for(;a>=s;--a){const f=e.charCodeAt(a);if(f===F){if(!u){i=a+1;break}continue}l===-1&&(u=!1,l=a+1),f===G?r===-1?r=a:o!==1&&(o=1):r!==-1&&(o=-1)}if(l!==-1){const f=i===0&&n?1:i;r===-1||o===0||o===1&&r===l-1&&r===i+1?t.base=t.name=e.slice(f,l):(t.name=e.slice(f,r),t.base=e.slice(f,l),t.ext=e.slice(r,l))}return i>0?t.dir=e.slice(0,i-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};W.win32=H.win32=H,W.posix=H.posix=W,X==="win32"?H.normalize:W.normalize,X==="win32"?H.resolve:W.resolve,X==="win32"?H.relative:W.relative,X==="win32"?H.dirname:W.dirname,X==="win32"?H.basename:W.basename,X==="win32"?H.extname:W.extname,X==="win32"?H.sep:W.sep;const wn=/^\w[\w\d+.-]*$/,Cn=/^\//,vn=/^\/\//;function it(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&&!wn.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Cn.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(vn.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 ("//")')}}function Mn(e,t){return!e&&!t?"file":e}function Pn(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==Y&&(t=Y+t):t=Y;break}return t}const x="",Y="/",pn=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class J{constructor(t,n,s,r,i,l=!1){typeof t=="object"?(this.scheme=t.scheme||x,this.authority=t.authority||x,this.path=t.path||x,this.query=t.query||x,this.fragment=t.fragment||x):(this.scheme=Mn(t,l),this.authority=n||x,this.path=Pn(this.scheme,s||x),this.query=r||x,this.fragment=i||x,it(this,l))}static isUri(t){return t instanceof J?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return xe(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:s,path:r,query:i,fragment:l}=t;return n===void 0?n=this.scheme:n===null&&(n=x),s===void 0?s=this.authority:s===null&&(s=x),r===void 0?r=this.path:r===null&&(r=x),i===void 0?i=this.query:i===null&&(i=x),l===void 0?l=this.fragment:l===null&&(l=x),n===this.scheme&&s===this.authority&&r===this.path&&i===this.query&&l===this.fragment?this:new ne(n,s,r,i,l)}static parse(t,n=!1){const s=pn.exec(t);return s?new ne(s[2]||x,ge(s[4]||x),ge(s[5]||x),ge(s[7]||x),ge(s[9]||x),n):new ne(x,x,x,x,x)}static file(t){let n=x;if(ue&&(t=t.replace(/\\/g,Y)),t[0]===Y&&t[1]===Y){const s=t.indexOf(Y,2);s===-1?(n=t.substring(2),t=Y):(n=t.substring(2,s),t=t.substring(s)||Y)}return new ne("file",n,t,x,x)}static from(t){const n=new ne(t.scheme,t.authority,t.path,t.query,t.fragment);return it(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let s;return ue&&t.scheme==="file"?s=J.file(H.join(xe(t,!0),...n)).path:s=W.join(t.path,...n),t.with({path:s})}toString(t=!1){return Ee(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof J)return t;{const n=new ne(t);return n._formatted=t.external,n._fsPath=t._sep===lt?t.fsPath:null,n}}else return t}}const lt=ue?1:void 0;class ne extends J{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=xe(this,!1)),this._fsPath}toString(t=!1){return t?Ee(this,!0):(this._formatted||(this._formatted=Ee(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=lt),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const ut={[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 at(e,t){let n,s=-1;for(let r=0;r=97&&i<=122||i>=65&&i<=90||i>=48&&i<=57||i===45||i===46||i===95||i===126||t&&i===47)s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n!==void 0&&(n+=e.charAt(r));else{n===void 0&&(n=e.substr(0,r));const l=ut[i];l!==void 0?(s!==-1&&(n+=encodeURIComponent(e.substring(s,r)),s=-1),n+=l):s===-1&&(s=r)}}return s!==-1&&(n+=encodeURIComponent(e.substring(s))),n!==void 0?n:e}function Rn(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,ue&&(n=n.replace(/\//g,"\\")),n}function Ee(e,t){const n=t?Rn:at;let s="",{scheme:r,authority:i,path:l,query:u,fragment:a}=e;if(r&&(s+=r,s+=":"),(i||r==="file")&&(s+=Y,s+=Y),i){let o=i.indexOf("@");if(o!==-1){const f=i.substr(0,o);i=i.substr(o+1),o=f.indexOf(":"),o===-1?s+=n(f,!1):(s+=n(f.substr(0,o),!1),s+=":",s+=n(f.substr(o+1),!1)),s+="@"}i=i.toLowerCase(),o=i.indexOf(":"),o===-1?s+=n(i,!1):(s+=n(i.substr(0,o),!1),s+=i.substr(o))}if(l){if(l.length>=3&&l.charCodeAt(0)===47&&l.charCodeAt(2)===58){const o=l.charCodeAt(1);o>=65&&o<=90&&(l=`/${String.fromCharCode(o+32)}:${l.substr(3)}`)}else if(l.length>=2&&l.charCodeAt(1)===58){const o=l.charCodeAt(0);o>=65&&o<=90&&(l=`${String.fromCharCode(o+32)}:${l.substr(2)}`)}s+=n(l,!0)}return u&&(s+="?",s+=n(u,!1)),a&&(s+="#",s+=t?a:at(a,!1)),s}function ot(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+ot(e.substr(3)):e}}const ct=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ge(e){return e.match(ct)?e.replace(ct,t=>ot(t)):e}class B{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new B(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return B.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return B.isBefore(this,t)}static isBefore(t,n){return t.lineNumbers||t===s&&n>r?(this.startLineNumber=s,this.startColumn=r,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=s,this.endColumn=r)}isEmpty(){return E.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return E.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return E.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return E.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return E.plusRange(this,t)}static plusRange(t,n){let s,r,i,l;return n.startLineNumbert.endLineNumber?(i=n.endLineNumber,l=n.endColumn):n.endLineNumber===t.endLineNumber?(i=n.endLineNumber,l=Math.max(n.endColumn,t.endColumn)):(i=t.endLineNumber,l=t.endColumn),new E(s,r,i,l)}intersectRanges(t){return E.intersectRanges(this,t)}static intersectRanges(t,n){let s=t.startLineNumber,r=t.startColumn,i=t.endLineNumber,l=t.endColumn,u=n.startLineNumber,a=n.startColumn,o=n.endLineNumber,f=n.endColumn;return so?(i=o,l=f):i===o&&(l=Math.min(l,f)),s>i||s===i&&r>l?null:new E(s,r,i,l)}equalsRange(t){return E.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return E.getEndPosition(this)}static getEndPosition(t){return new B(t.endLineNumber,t.endColumn)}getStartPosition(){return E.getStartPosition(this)}static getStartPosition(t){return new B(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new E(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new E(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return E.collapseToStart(this)}static collapseToStart(t){return new E(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new E(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new E(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const Un=3;function ft(e,t,n,s){return new z(e,t,n).ComputeDiff(s)}class ht{constructor(t){const n=[],s=[];for(let r=0,i=t.length;r0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&i()){const L=s.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),b=r.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let w=ft(L,b,i,!0).changes;u&&(w=En(w)),m=[];for(let M=0,P=w.length;M1&&w>1;){const M=m.charCodeAt(b-2),P=L.charCodeAt(w-2);if(M!==P)break;b--,w--}(b>1||w>1)&&this._pushTrimWhitespaceCharChange(r,i+1,1,b,l+1,1,w)}{let b=ke(m,1),w=ke(L,1);const M=m.length+1,P=L.length+1;for(;b!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function se(e){return e<0?0:e>4294967295?4294967295:e|0}class kn{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class Fn{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=se(t);const s=this.values,r=this.prefixSum,i=n.length;return i===0?!1:(this.values=new Uint32Array(s.length+i),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t),t+i),this.values.set(n,t),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=se(t),n=se(n),this.values[t]===n?!1:(this.values[t]=n,t-1=s.length)return!1;let i=s.length-t;return n>=i&&(n=i),n===0?!1:(this.values=new Uint32Array(s.length-n),this.values.set(s.subarray(0,t),0),this.values.set(s.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(r.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=se(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let s=n;s<=t;s++)this.prefixSum[s]=this.prefixSum[s-1]+this.values[s];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,s=this.values.length-1,r=0,i=0,l=0;for(;n<=s;)if(r=n+(s-n)/2|0,i=this.prefixSum[r],l=i-this.values[r],t=i)n=r+1;else break;return new kn(r,t-l)}}class Tn{constructor(t,n,s,r){this._uri=t,this._lines=n,this._eol=s,this._versionId=r,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const s of n)this._acceptDeleteRange(s.range),this._acceptInsertText(new B(s.range.startLineNumber,s.range.startColumn),s.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,s=new Uint32Array(n);for(let r=0;r/?";function Hn(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of In)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const qn=Hn();function Wn(e){let t=qn;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const Bn={maxLen:1e3,windowSize:15,timeBudget:150};function gt(e,t,n,s,r=Bn){if(n.length>r.maxLen){let o=e-r.maxLen/2;return o<0?o=0:s+=o,n=n.substring(o,e+r.maxLen/2),gt(e,t,n,s,r)}const i=Date.now(),l=e-1-s;let u=-1,a=null;for(let o=1;!(Date.now()-i>=r.timeBudget);o++){const f=l-r.windowSize*o;t.lastIndex=Math.max(0,f);const c=Yn(t,n,l,u);if(!c&&a||(a=c,f<=0))break;u=f}if(a){let o={word:a[0],startColumn:s+1+a.index,endColumn:s+1+a.index+a[0].length};return t.lastIndex=0,o}return null}function Yn(e,t,n,s){let r;for(;r=e.exec(t);){const i=r.index||0;if(i<=n&&e.lastIndex>=n)return r;if(s>0&&i>s)return null}return null}class Fe{constructor(t){let n=dt(t);this._defaultValue=n,this._asciiMap=Fe._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let s=0;s<256;s++)n[s]=t;return n}set(t,n){let s=dt(n);t>=0&&t<256?this._asciiMap[t]=s:this._map.set(t,s)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Vn{constructor(t,n,s){const r=new Uint8Array(t*n);for(let i=0,l=t*n;in&&(n=a),u>s&&(s=u),o>s&&(s=o)}n++,s++;let r=new Vn(s,n,0);for(let i=0,l=t.length;i=this._maxCharCode?0:this._states.get(t,n)}}let Te=null;function zn(){return Te===null&&(Te=new $n([[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]])),Te}let ce=null;function Gn(){if(ce===null){ce=new Fe(0);const e=` <>'"\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 n=0;nr);if(r>0){const u=n.charCodeAt(r-1),a=n.charCodeAt(l);(u===40&&a===41||u===91&&a===93||u===123&&a===125)&&l--}return{range:{startLineNumber:s,startColumn:r+1,endLineNumber:s,endColumn:l+2},url:n.substring(r,l+1)}}static computeLinks(t,n=zn()){const s=Gn();let r=[];for(let i=1,l=t.getLineCount();i<=l;i++){const u=t.getLineContent(i),a=u.length;let o=0,f=0,c=0,m=1,L=!1,b=!1,w=!1,M=!1;for(;o=0?(r+=s?1:-1,r<0?r=t.length-1:r%=t.length,t[r]):null}}Ie.INSTANCE=new Ie;class U{constructor(t){this.element=t,this.next=U.Undefined,this.prev=U.Undefined}}U.Undefined=new U(void 0);class _t{constructor(){this._first=U.Undefined,this._last=U.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===U.Undefined}clear(){let t=this._first;for(;t!==U.Undefined;){const n=t.next;t.prev=U.Undefined,t.next=U.Undefined,t=n}this._first=U.Undefined,this._last=U.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const s=new U(t);if(this._first===U.Undefined)this._first=s,this._last=s;else if(n){const i=this._last;this._last=s,s.prev=i,i.next=s}else{const i=this._first;this._first=s,s.next=i,i.prev=s}this._size+=1;let r=!1;return()=>{r||(r=!0,this._remove(s))}}shift(){if(this._first!==U.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==U.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==U.Undefined&&t.next!==U.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===U.Undefined&&t.next===U.Undefined?(this._first=U.Undefined,this._last=U.Undefined):t.next===U.Undefined?(this._last=this._last.prev,this._last.next=U.Undefined):t.prev===U.Undefined&&(this._first=this._first.next,this._first.prev=U.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==U.Undefined;)yield t.element,t=t.next}}const yn=T.performance&&typeof T.performance.now=="function";class Le{constructor(t){this._highResolution=yn&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new Le(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?T.performance.now():Date.now()}}var He;(function(e){e.None=()=>Je.None;function t(d){return(h,g=null,_)=>{let A=!1,S;return S=d(N=>{if(!A)return S?S.dispose():A=!0,h.call(g,N)},null,_),A&&S.dispose(),S}}e.once=t;function n(d,h){return a((g,_=null,A)=>d(S=>g.call(_,h(S)),null,A))}e.map=n;function s(d,h){return a((g,_=null,A)=>d(S=>{h(S),g.call(_,S)},null,A))}e.forEach=s;function r(d,h){return a((g,_=null,A)=>d(S=>h(S)&&g.call(_,S),null,A))}e.filter=r;function i(d){return d}e.signal=i;function l(...d){return(h,g=null,_)=>nn(...d.map(A=>A(S=>h.call(g,S),null,_)))}e.any=l;function u(d,h,g){let _=g;return n(d,A=>(_=h(_,A),_))}e.reduce=u;function a(d){let h;const g=new O({onFirstListenerAdd(){h=d(g.fire,g)},onLastListenerRemove(){h.dispose()}});return g.event}function o(d,h,g=100,_=!1,A){let S,N,p,I=0;const R=new O({leakWarningThreshold:A,onFirstListenerAdd(){S=d(C=>{I++,N=h(N,C),_&&!p&&(R.fire(N),N=void 0),clearTimeout(p),p=setTimeout(()=>{const Q=N;N=void 0,p=void 0,(!_||I>1)&&R.fire(Q),I=0},g)})},onLastListenerRemove(){S.dispose()}});return R.event}e.debounce=o;function f(d,h=(g,_)=>g===_){let g=!0,_;return r(d,A=>{const S=g||!h(A,_);return g=!1,_=A,S})}e.latch=f;function c(d,h){return[e.filter(d,h),e.filter(d,g=>!h(g))]}e.split=c;function m(d,h=!1,g=[]){let _=g.slice(),A=d(p=>{_?_.push(p):N.fire(p)});const S=()=>{_&&_.forEach(p=>N.fire(p)),_=null},N=new O({onFirstListenerAdd(){A||(A=d(p=>N.fire(p)))},onFirstListenerDidAdd(){_&&(h?setTimeout(S):S())},onLastListenerRemove(){A&&A.dispose(),A=null}});return N.event}e.buffer=m;class L{constructor(h){this.event=h}map(h){return new L(n(this.event,h))}forEach(h){return new L(s(this.event,h))}filter(h){return new L(r(this.event,h))}reduce(h,g){return new L(u(this.event,h,g))}latch(){return new L(f(this.event))}debounce(h,g=100,_=!1,A){return new L(o(this.event,h,g,_,A))}on(h,g,_){return this.event(h,g,_)}once(h,g,_){return t(this.event)(h,g,_)}}function b(d){return new L(d)}e.chain=b;function w(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.on(h,_),S=()=>d.removeListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromNodeEventEmitter=w;function M(d,h,g=_=>_){const _=(...p)=>N.fire(g(...p)),A=()=>d.addEventListener(h,_),S=()=>d.removeEventListener(h,_),N=new O({onFirstListenerAdd:A,onLastListenerRemove:S});return N.event}e.fromDOMEventEmitter=M;function P(d){return new Promise(h=>t(d)(h))}e.toPromise=P})(He||(He={}));class Ne{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Ne._idPool++}`}start(t){this._stopWatch=new Le(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Ne._idPool=0;class O{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new Ne(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,s)=>{var r;this._listeners||(this._listeners=new _t);const i=this._listeners.isEmpty();i&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const l=this._listeners.push(n?[t,n]:t);i&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(r=this._leakageMon)===null||r===void 0?void 0:r.check(this._listeners.size),a=Xe(()=>{u&&u(),this._disposed||(l(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return s instanceof le?s.add(a):Array.isArray(s)&&s.push(a),a}),this._event}fire(t){var n,s;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new _t);for(let r of this._listeners)this._deliveryQueue.push([r,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[r,i]=this._deliveryQueue.shift();try{typeof r=="function"?r.call(void 0,i):r[0].call(r[1],i)}catch(l){Ot(l)}}(s=this._perfMon)===null||s===void 0||s.stop()}}dispose(){var t,n,s,r,i;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(r=(s=this._options)===null||s===void 0?void 0:s.onLastListenerRemove)===null||r===void 0||r.call(s),(i=this._leakageMon)===null||i===void 0||i.dispose())}}const Lt=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var Se;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof be?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:He.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Lt})})(Se||(Se={}));class be{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?Lt:(this._emitter||(this._emitter=new O),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Qn{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new be),this._token}cancel(){this._token?this._token instanceof be&&this._token.cancel():this._token=Se.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof be&&this._token.dispose():this._token=Se.None}}class qe{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const We=new qe,Be=new qe,Ye=new qe;(function(){function e(t,n,s=n,r=s){We.define(t,n),Be.define(t,s),Ye.define(t,r)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var Nt;(function(e){function t(l){return We.keyCodeToStr(l)}e.toString=t;function n(l){return We.strToKeyCode(l)}e.fromString=n;function s(l){return Be.keyCodeToStr(l)}e.toUserSettingsUS=s;function r(l){return Ye.keyCodeToStr(l)}e.toUserSettingsGeneral=r;function i(l){return Be.strToKeyCode(l)||Ye.strToKeyCode(l)}e.fromUserSettings=i})(Nt||(Nt={}));function Zn(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class V extends E{constructor(t,n,s,r){super(t,n,s,r);this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=s,this.positionColumn=r}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return V.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new V(this.startLineNumber,this.startColumn,t,n):new V(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new B(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new V(t,n,this.endLineNumber,this.endColumn):new V(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new V(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new V(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let s=0,r=t.length;sthis._lines.length)n=this._lines.length,s=this._lines[n-1].length+1,r=!0;else{let i=this._lines[n-1].length+1;s<1?(s=1,r=!0):s>i&&(s=i,r=!0)}return r?{lineNumber:n,column:s}:t}}class ie{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new On(J.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,s,r){return re(this,void 0,void 0,function*(){const i=this._getModel(t),l=this._getModel(n);if(!i||!l)return null;const u=i.getLinesContent(),a=l.getLinesContent(),f=new Dn(u,a,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:s,shouldMakePrettyDiff:!0,maxComputationTime:r}).computeDiff(),c=f.changes.length>0?!1:this._modelsAreIdentical(i,l);return{quitEarly:f.quitEarly,identical:c,changes:f.changes}})}_modelsAreIdentical(t,n){const s=t.getLineCount(),r=n.getLineCount();if(s!==r)return!1;for(let i=1;i<=s;i++){const l=t.getLineContent(i),u=n.getLineContent(i);if(l!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return re(this,void 0,void 0,function*(){const s=this._getModel(t);if(!s)return n;const r=[];let i;n=n.slice(0).sort((l,u)=>{if(l.range&&u.range)return E.compareRangesUsingStarts(l.range,u.range);let a=l.range?0:1,o=u.range?0:1;return a-o});for(let{range:l,text:u,eol:a}of n){if(typeof a=="number"&&(i=a),E.isEmpty(l)&&!u)continue;const o=s.getValueInRange(l);if(u=u.replace(/\r\n|\n|\r/g,s.eol),o===u)continue;if(Math.max(u.length,o.length)>ie._diffLimit){r.push({range:l,text:u});continue}const f=gn(o,u,!1),c=s.offsetAt(E.lift(l).getStartPosition());for(const m of f){const L=s.positionAt(c+m.originalStart),b=s.positionAt(c+m.originalStart+m.originalLength),w={text:u.substr(m.modifiedStart,m.modifiedLength),range:{startLineNumber:L.lineNumber,startColumn:L.column,endLineNumber:b.lineNumber,endColumn:b.column}};s.getValueInRange(w.range)!==w.text&&r.push(w)}}return typeof i=="number"&&r.push({eol:i,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),r})}computeLinks(t){return re(this,void 0,void 0,function*(){let n=this._getModel(t);return n?jn(n):null})}textualSuggest(t,n,s,r){return re(this,void 0,void 0,function*(){const i=new Le(!0),l=new RegExp(s,r),u=new Set;e:for(let a of t){const o=this._getModel(a);if(!!o){for(let f of o.words(l))if(!(f===n||!isNaN(Number(f)))&&(u.add(f),u.size>ie._suggestionsLimit))break e}}return{words:Array.from(u),duration:i.elapsed()}})}computeWordRanges(t,n,s,r){return re(this,void 0,void 0,function*(){let i=this._getModel(t);if(!i)return Object.create(null);const l=new RegExp(s,r),u=Object.create(null);for(let a=n.startLineNumber;athis._host.fhr(u,a)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(l,n),Promise.resolve(pe(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(s){return Promise.reject(s)}}}ie._diffLimit=1e5,ie._suggestionsLimit=1e4,typeof importScripts=="function"&&(T.monaco=Jn());let je=!1;function Kn(e){if(je)return;je=!0;const t=new cn(n=>{self.postMessage(n)},n=>new ie(n,e));self.onmessage=n=>{t.onmessage(n.data)}}self.onmessage=e=>{je||Kn(null)}})(); diff --git a/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js b/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js new file mode 100644 index 00000000..f2dcd26d --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/html.worker.ca00066f.js @@ -0,0 +1,446 @@ +(function(){"use strict";class Sr{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` + +`+t.stack):t},0)}}emit(t){this.listeners.forEach(n=>{n(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const Ar=new Sr;function Lr(e){Cr(e)||Ar.onUnexpectedError(e)}function gn(e){if(e instanceof Error){let{name:t,message:n}=e;const r=e.stacktrace||e.stack;return{$isError:!0,name:t,message:n,stack:r}}return e}const bn="Canceled";function Cr(e){return e instanceof Error&&e.name===bn&&e.message===bn}function xr(e){const t=this;let n=!1,r;return function(){return n||(n=!0,r=e.apply(t,arguments)),r}}var Et;(function(e){function t(f){return f&&typeof f=="object"&&typeof f[Symbol.iterator]=="function"}e.is=t;const n=Object.freeze([]);function r(){return n}e.empty=r;function*i(f){yield f}e.single=i;function a(f){return f||n}e.from=a;function o(f){return!f||f[Symbol.iterator]().next().done===!0}e.isEmpty=o;function u(f){return f[Symbol.iterator]().next().value}e.first=u;function s(f,v){for(const A of f)if(v(A))return!0;return!1}e.some=s;function l(f,v){for(const A of f)if(v(A))return A}e.find=l;function*h(f,v){for(const A of f)v(A)&&(yield A)}e.filter=h;function*c(f,v){let A=0;for(const D of f)yield v(D,A++)}e.map=c;function*d(...f){for(const v of f)for(const A of v)yield A}e.concat=d;function*p(f){for(const v of f)for(const A of v)yield A}e.concatNested=p;function _(f,v,A){let D=A;for(const H of f)D=v(D,H);return D}e.reduce=_;function*b(f,v,A=f.length){for(v<0&&(v+=f.length),A<0?A+=f.length:A>f.length&&(A=f.length);vD===H){const D=f[Symbol.iterator](),H=v[Symbol.iterator]();for(;;){const g=D.next(),m=H.next();if(g.done!==m.done)return!1;if(g.done)return!0;if(!A(g.value,m.value))return!1}}e.equals=k})(Et||(Et={}));function Vs(e){return e}function Ys(e,t){}class Dr extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function _n(e){if(Et.is(e)){let t=[];for(const n of e)if(n)try{n.dispose()}catch(r){t.push(r)}if(t.length===1)throw t[0];if(t.length>1)throw new Dr(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Er(...e){return vn(()=>_n(e))}function vn(e){return{dispose:xr(()=>{e()})}}class Ve{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{_n(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?Ve.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(t),t}}Ve.DISABLE_DISPOSED_WARNING=!1;class wn{constructor(){this._store=new Ve,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}wn.None=Object.freeze({dispose(){}});var Mt;const at="en";let Rt=!1,Nt=!1,Ut=!1,st,Ht=at,Mr,Ee;const ie=typeof self=="object"?self:typeof global=="object"?global:{};let ee;typeof ie.vscode!="undefined"&&typeof ie.vscode.process!="undefined"?ee=ie.vscode.process:typeof process!="undefined"&&(ee=process);const Rr=typeof((Mt=ee==null?void 0:ee.versions)===null||Mt===void 0?void 0:Mt.electron)=="string"&&ee.type==="renderer";if(typeof navigator=="object"&&!Rr)Ee=navigator.userAgent,Rt=Ee.indexOf("Windows")>=0,Nt=Ee.indexOf("Macintosh")>=0,(Ee.indexOf("Macintosh")>=0||Ee.indexOf("iPad")>=0||Ee.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Ut=Ee.indexOf("Linux")>=0,st=navigator.language,Ht=st;else if(typeof ee=="object"){Rt=ee.platform==="win32",Nt=ee.platform==="darwin",Ut=ee.platform==="linux",Ut&&!!ee.env.SNAP&&ee.env.SNAP_REVISION,st=at,Ht=at;const e=ee.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),n=t.availableLanguages["*"];st=t.locale,Ht=n||at,Mr=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const Ye=Rt,Nr=Nt,yn=function(){if(ie.setImmediate)return ie.setImmediate.bind(ie);if(typeof ie.postMessage=="function"&&!ie.importScripts){let n=[];ie.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let a=0,o=n.length;a{const a=++r;n.push({id:a,callback:i}),ie.postMessage({vscodeSetImmediateId:a},"*")}}if(typeof(ee==null?void 0:ee.nextTick)=="function")return ee.nextTick.bind(ee);const t=Promise.resolve();return n=>t.then(n)}();function Ur(e){let t=[],n=Object.getPrototypeOf(e);for(;Object.prototype!==n;)t=t.concat(Object.getOwnPropertyNames(n)),n=Object.getPrototypeOf(n);return t}function zt(e){const t=[];for(const n of Ur(e))typeof e[n]=="function"&&t.push(n);return t}function Tn(e,t){const n=i=>function(){const a=Array.prototype.slice.call(arguments,0);return t(i,a)};let r={};for(const i of e)r[i]=n(i);return r}const Hr="$initialize";class zr{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,n){let r=String(++this._lastSentReq);return new Promise((i,a)=>{this._pendingReplies[r]={resolve:i,reject:a},this._send({vsWorker:this._workerId,req:r,method:t,args:n})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let a=t;if(!this._pendingReplies[a.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[a.seq];if(delete this._pendingReplies[a.seq],a.err){let u=a.err;a.err.$isError&&(u=new Error,u.name=a.err.name,u.message=a.err.message,u.stack=a.err.stack),o.reject(u);return}o.resolve(a.res);return}let n=t,r=n.req;this._handler.handleMessage(n.method,n.args).then(a=>{this._send({vsWorker:this._workerId,seq:r,res:a,err:void 0})},a=>{a.detail instanceof Error&&(a.detail=gn(a.detail)),this._send({vsWorker:this._workerId,seq:r,res:void 0,err:gn(a)})})}_send(t){let n=[];if(t.req){const r=t;for(let i=0;i{t(r,i)},handleMessage:(r,i)=>this._handleMessage(r,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,n){if(t===Hr)return this.initialize(n[0],n[1],n[2],n[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,n))}catch(r){return Promise.reject(r)}}initialize(t,n,r,i){this._protocol.setWorkerId(t);const o=Tn(i,(u,s)=>this._protocol.sendMessage(u,s));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(o),Promise.resolve(zt(this._requestHandler))):(n&&(typeof n.baseUrl!="undefined"&&delete n.baseUrl,typeof n.paths!="undefined"&&typeof n.paths.vs!="undefined"&&delete n.paths.vs,typeof n.trustedTypesPolicy!==void 0&&delete n.trustedTypesPolicy,n.catchError=!0,self.require.config(n)),new Promise((u,s)=>{self.require([r],l=>{if(this._requestHandler=l.create(o),!this._requestHandler){s(new Error("No RequestHandler!"));return}u(zt(this._requestHandler))},s)}))}}class ye{constructor(t,n,r,i){this.originalStart=t,this.originalLength=n,this.modifiedStart=r,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function Wr(e){return e.split(/\r\n|\r|\n/)}function Pr(e){for(let t=0,n=e.length;t=0;n--){const r=e.charCodeAt(n);if(r!==32&&r!==9)return n}return-1}function kn(e,t){return(t<<5)-t+e|0}function Fr(e,t){t=kn(149417,t);for(let n=0,r=e.length;n0||this.m_modifiedCount>0)&&this.m_changes.push(new ye(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(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),this.m_originalCount++}AddModifiedElement(t,n){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,n),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 Te{constructor(t,n,r=null){this.ContinueProcessingPredicate=r,this._originalSequence=t,this._modifiedSequence=n;const[i,a,o]=Te._getElements(t),[u,s,l]=Te._getElements(n);this._hasStrings=o&&l,this._originalStringElements=i,this._originalElementsOrHash=a,this._modifiedStringElements=u,this._modifiedElementsOrHash=s,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const n=t.getElements();if(Te._isStringArray(n)){const r=new Int32Array(n.length);for(let i=0,a=n.length;i=t&&i>=r&&this.ElementsAreEqual(n,i);)n--,i--;if(t>n||r>i){let c;return r<=i?(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),c=[new ye(t,0,r,i-r+1)]):t<=n?(ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[new ye(t,n-t+1,r,0)]):(ze.Assert(t===n+1,"originalStart should only be one more than originalEnd"),ze.Assert(r===i+1,"modifiedStart should only be one more than modifiedEnd"),c=[]),c}const o=[0],u=[0],s=this.ComputeRecursionPoint(t,n,r,i,o,u,a),l=o[0],h=u[0];if(s!==null)return s;if(!a[0]){const c=this.ComputeDiffRecursive(t,l,r,h,a);let d=[];return a[0]?d=[new ye(l+1,n-(l+1)+1,h+1,i-(h+1)+1)]:d=this.ComputeDiffRecursive(l+1,n,h+1,i,a),this.ConcatenateChanges(c,d)}return[new ye(t,n-t+1,r,i-r+1)]}WALKTRACE(t,n,r,i,a,o,u,s,l,h,c,d,p,_,b,T,k,f){let v=null,A=null,D=new An,H=n,g=r,m=p[0]-T[0]-i,w=-1073741824,B=this.m_forwardHistory.length-1;do{const R=m+t;R===H||R=0&&(l=this.m_forwardHistory[B],t=l[0],H=1,g=l.length-1)}while(--B>=-1);if(v=D.getReverseChanges(),f[0]){let R=p[0]+1,N=T[0]+1;if(v!==null&&v.length>0){const I=v[v.length-1];R=Math.max(R,I.getOriginalEnd()),N=Math.max(N,I.getModifiedEnd())}A=[new ye(R,d-R+1,N,b-N+1)]}else{D=new An,H=o,g=u,m=p[0]-T[0]-s,w=1073741824,B=k?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const R=m+a;R===H||R=h[R+1]?(c=h[R+1]-1,_=c-m-s,c>w&&D.MarkNextChange(),w=c+1,D.AddOriginalElement(c+1,_+1),m=R+1-a):(c=h[R-1],_=c-m-s,c>w&&D.MarkNextChange(),w=c,D.AddModifiedElement(c+1,_+1),m=R-1-a),B>=0&&(h=this.m_reverseHistory[B],a=h[0],H=1,g=h.length-1)}while(--B>=-1);A=D.getChanges()}return this.ConcatenateChanges(v,A)}ComputeRecursionPoint(t,n,r,i,a,o,u){let s=0,l=0,h=0,c=0,d=0,p=0;t--,r--,a[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const _=n-t+(i-r),b=_+1,T=new Int32Array(b),k=new Int32Array(b),f=i-r,v=n-t,A=t-r,D=n-i,g=(v-f)%2===0;T[f]=t,k[v]=n,u[0]=!1;for(let m=1;m<=_/2+1;m++){let w=0,B=0;h=this.ClipDiagonalBound(f-m,m,f,b),c=this.ClipDiagonalBound(f+m,m,f,b);for(let N=h;N<=c;N+=2){N===h||Nw+B&&(w=s,B=l),!g&&Math.abs(N-v)<=m-1&&s>=k[N])return a[0]=s,o[0]=l,I<=k[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}const R=(w-t+(B-r)-m)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(w,R))return u[0]=!0,a[0]=w,o[0]=B,R>0&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):(t++,r++,[new ye(t,n-t+1,r,i-r+1)]);d=this.ClipDiagonalBound(v-m,m,v,b),p=this.ClipDiagonalBound(v+m,m,v,b);for(let N=d;N<=p;N+=2){N===d||N=k[N+1]?s=k[N+1]-1:s=k[N-1],l=s-(N-v)-D;const I=s;for(;s>t&&l>r&&this.ElementsAreEqual(s,l);)s--,l--;if(k[N]=s,g&&Math.abs(N-f)<=m&&s<=T[N])return a[0]=s,o[0]=l,I>=T[N]&&1447>0&&m<=1447+1?this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u):null}if(m<=1447){let N=new Int32Array(c-h+2);N[0]=f-h+1,Ie.Copy2(T,h,N,1,c-h+1),this.m_forwardHistory.push(N),N=new Int32Array(p-d+2),N[0]=v-d+1,Ie.Copy2(k,d,N,1,p-d+1),this.m_reverseHistory.push(N)}}return this.WALKTRACE(f,h,c,A,v,d,p,D,T,k,s,n,a,l,i,o,g,u)}PrettifyChanges(t){for(let n=0;n0,u=r.modifiedLength>0;for(;r.originalStart+r.originalLength=0;n--){const r=t[n];let i=0,a=0;if(n>0){const c=t[n-1];i=c.originalStart+c.originalLength,a=c.modifiedStart+c.modifiedLength}const o=r.originalLength>0,u=r.modifiedLength>0;let s=0,l=this._boundaryScore(r.originalStart,r.originalLength,r.modifiedStart,r.modifiedLength);for(let c=1;;c++){const d=r.originalStart-c,p=r.modifiedStart-c;if(dl&&(l=b,s=c)}r.originalStart-=s,r.modifiedStart-=s;const h=[null];if(n>0&&this.ChangesOverlap(t[n-1],t[n],h)){t[n-1]=h[0],t.splice(n,1),n++;continue}}if(this._hasStrings)for(let n=1,r=t.length;n0&&p>s&&(s=p,l=c,h=d)}return s>0?[l,h]:null}_contiguousSequenceScore(t,n,r){let i=0;for(let a=0;a=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,n){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._OriginalIsBoundary(r-1)||this._OriginalIsBoundary(r))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,n){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(n>0){const r=t+n;if(this._ModifiedIsBoundary(r-1)||this._ModifiedIsBoundary(r))return!0}return!1}_boundaryScore(t,n,r,i){const a=this._OriginalRegionIsBoundary(t,n)?1:0,o=this._ModifiedRegionIsBoundary(r,i)?1:0;return a+o}ConcatenateChanges(t,n){let r=[];if(t.length===0||n.length===0)return n.length>0?n:t;if(this.ChangesOverlap(t[t.length-1],n[0],r)){const i=new Array(t.length+n.length-1);return Ie.Copy(t,0,i,0,t.length-1),i[t.length-1]=r[0],Ie.Copy(n,1,i,t.length,n.length-1),i}else{const i=new Array(t.length+n.length);return Ie.Copy(t,0,i,0,t.length),Ie.Copy(n,0,i,t.length,n.length),i}}ChangesOverlap(t,n,r){if(ze.Assert(t.originalStart<=n.originalStart,"Left change is not less than or equal to right change"),ze.Assert(t.modifiedStart<=n.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=n.originalStart||t.modifiedStart+t.modifiedLength>=n.modifiedStart){const i=t.originalStart;let a=t.originalLength;const o=t.modifiedStart;let u=t.modifiedLength;return t.originalStart+t.originalLength>=n.originalStart&&(a=n.originalStart+n.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=n.modifiedStart&&(u=n.modifiedStart+n.modifiedLength-t.modifiedStart),r[0]=new ye(i,a,o,u),!0}else return r[0]=null,!1}ClipDiagonalBound(t,n,r,i){if(t>=0&&t=jr&&e<=Vr||e>=Gr&&e<=Yr}function ot(e,t,n,r){let i="",a=0,o=-1,u=0,s=0;for(let l=0;l<=e.length;++l){if(l2){const h=i.lastIndexOf(n);h===-1?(i="",a=0):(i=i.slice(0,h),a=i.length-1-i.lastIndexOf(n)),o=l,u=0;continue}else if(i.length!==0){i="",a=0,o=l,u=0;continue}}t&&(i+=i.length>0?`${n}..`:"..",a=2)}else i.length>0?i+=`${n}${e.slice(o+1,l)}`:i=e.slice(o+1,l),a=l-o-1;o=l,u=0}else s===ke&&u!==-1?++u:u=-1}return i}function Cn(e,t){if(t===null||typeof t!="object")throw new Ln("pathObject","Object",t);const n=t.dir||t.root,r=t.base||`${t.name||""}${t.ext||""}`;return n?n===t.root?`${n}${r}`:`${n}${e}${r}`:r}const ae={resolve(...e){let t="",n="",r=!1;for(let i=e.length-1;i>=-1;i--){let a;if(i>=0){if(a=e[i],Z(a,"path"),a.length===0)continue}else t.length===0?a=It():(a=Or[`=${t}`]||It(),(a===void 0||a.slice(0,2).toLowerCase()!==t.toLowerCase()&&a.charCodeAt(2)===oe)&&(a=`${t}\\`));const o=a.length;let u=0,s="",l=!1;const h=a.charCodeAt(0);if(o===1)O(h)&&(u=1,l=!0);else if(O(h))if(l=!0,O(a.charCodeAt(1))){let c=2,d=c;for(;c2&&O(a.charCodeAt(2))&&(l=!0,u=3));if(s.length>0)if(t.length>0){if(s.toLowerCase()!==t.toLowerCase())continue}else t=s;if(r){if(t.length>0)break}else if(n=`${a.slice(u)}\\${n}`,r=l,l&&t.length>0)break}return n=ot(n,!r,"\\",O),r?`${t}\\${n}`:`${t}${n}`||"."},normalize(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=0,r,i=!1;const a=e.charCodeAt(0);if(t===1)return Wt(a)?"\\":e;if(O(a))if(i=!0,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))&&(i=!0,n=3));let o=n0&&O(e.charCodeAt(t-1))&&(o+="\\"),r===void 0?i?`\\${o}`:o:i?`${r}\\${o}`:`${r}${o}`},isAbsolute(e){Z(e,"path");const t=e.length;if(t===0)return!1;const n=e.charCodeAt(0);return O(n)||t>2&&Ae(n)&&e.charCodeAt(1)===Se&&O(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,n;for(let a=0;a0&&(t===void 0?t=n=o:t+=`\\${o}`)}if(t===void 0)return".";let r=!0,i=0;if(typeof n=="string"&&O(n.charCodeAt(0))){++i;const a=n.length;a>1&&O(n.charCodeAt(1))&&(++i,a>2&&(O(n.charCodeAt(2))?++i:r=!1))}if(r){for(;i=2&&(t=`\\${t.slice(i)}`)}return ae.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t)return"";const n=ae.resolve(e),r=ae.resolve(t);if(n===r||(e=n.toLowerCase(),t=r.toLowerCase(),e===t))return"";let i=0;for(;ii&&e.charCodeAt(a-1)===oe;)a--;const o=a-i;let u=0;for(;uu&&t.charCodeAt(s-1)===oe;)s--;const l=s-u,h=oh){if(t.charCodeAt(u+d)===oe)return r.slice(u+d+1);if(d===2)return r.slice(u+d)}o>h&&(e.charCodeAt(i+d)===oe?c=d:d===2&&(c=3)),c===-1&&(c=0)}let p="";for(d=i+c+1;d<=a;++d)(d===a||e.charCodeAt(d)===oe)&&(p+=p.length===0?"..":"\\..");return u+=c,p.length>0?`${p}${r.slice(u,s)}`:(r.charCodeAt(u)===oe&&++u,r.slice(u,s))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ae.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===oe){if(t.charCodeAt(1)===oe){const n=t.charCodeAt(2);if(n!==$r&&n!==ke)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Ae(t.charCodeAt(0))&&t.charCodeAt(1)===Se&&t.charCodeAt(2)===oe)return`\\\\?\\${t}`;return e},dirname(e){Z(e,"path");const t=e.length;if(t===0)return".";let n=-1,r=0;const i=e.charCodeAt(0);if(t===1)return O(i)?e:".";if(O(i)){if(n=r=1,O(e.charCodeAt(1))){let u=2,s=u;for(;u2&&O(e.charCodeAt(2))?3:2,r=n);let a=-1,o=!0;for(let u=t-1;u>=r;--u)if(O(e.charCodeAt(u))){if(!o){a=u;break}}else o=!1;if(a===-1){if(n===-1)return".";a=n}return e.slice(0,a)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(e.length>=2&&Ae(e.charCodeAt(0))&&e.charCodeAt(1)===Se&&(n=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=n;--a){const s=e.charCodeAt(a);if(O(s)){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=n;--a)if(O(e.charCodeAt(a))){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=0,n=-1,r=0,i=-1,a=!0,o=0;e.length>=2&&e.charCodeAt(1)===Se&&Ae(e.charCodeAt(0))&&(t=r=2);for(let u=e.length-1;u>=t;--u){const s=e.charCodeAt(u);if(O(s)){if(!a){r=u+1;break}continue}i===-1&&(a=!1,i=u+1),s===ke?n===-1?n=u:o!==1&&(o=1):n!==-1&&(o=-1)}return n===-1||i===-1||o===0||o===1&&n===i-1&&n===r+1?"":e.slice(n,i)},format:Cn.bind(null,"\\"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.length;let r=0,i=e.charCodeAt(0);if(n===1)return O(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(O(i)){if(r=1,O(e.charCodeAt(1))){let c=2,d=c;for(;c0&&(t.root=e.slice(0,r));let a=-1,o=r,u=-1,s=!0,l=e.length-1,h=0;for(;l>=r;--l){if(i=e.charCodeAt(l),O(i)){if(!s){o=l+1;break}continue}u===-1&&(s=!1,u=l+1),i===ke?a===-1?a=l:h!==1&&(h=1):a!==-1&&(h=-1)}return u!==-1&&(a===-1||h===0||h===1&&a===u-1&&a===o+1?t.base=t.name=e.slice(o,u):(t.name=e.slice(o,a),t.base=e.slice(o,u),t.ext=e.slice(a,u))),o>0&&o!==r?t.dir=e.slice(0,o-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},le={resolve(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){const i=r>=0?e[r]:It();Z(i,"path"),i.length!==0&&(t=`${i}/${t}`,n=i.charCodeAt(0)===te)}return t=ot(t,!n,"/",Wt),n?`/${t}`:t.length>0?t:"."},normalize(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te,n=e.charCodeAt(e.length-1)===te;return e=ot(e,!t,"/",Wt),e.length===0?t?"/":n?"./":".":(n&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return Z(e,"path"),e.length>0&&e.charCodeAt(0)===te},join(...e){if(e.length===0)return".";let t;for(let n=0;n0&&(t===void 0?t=r:t+=`/${r}`)}return t===void 0?".":le.normalize(t)},relative(e,t){if(Z(e,"from"),Z(t,"to"),e===t||(e=le.resolve(e),t=le.resolve(t),e===t))return"";const n=1,r=e.length,i=r-n,a=1,o=t.length-a,u=iu){if(t.charCodeAt(a+l)===te)return t.slice(a+l+1);if(l===0)return t.slice(a+l)}else i>u&&(e.charCodeAt(n+l)===te?s=l:l===0&&(s=0));let h="";for(l=n+s+1;l<=r;++l)(l===r||e.charCodeAt(l)===te)&&(h+=h.length===0?"..":"/..");return`${h}${t.slice(a+s)}`},toNamespacedPath(e){return e},dirname(e){if(Z(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===te;let n=-1,r=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===te){if(!r){n=i;break}}else r=!1;return n===-1?t?"/":".":t&&n===1?"//":e.slice(0,n)},basename(e,t){t!==void 0&&Z(t,"ext"),Z(e,"path");let n=0,r=-1,i=!0,a;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let o=t.length-1,u=-1;for(a=e.length-1;a>=0;--a){const s=e.charCodeAt(a);if(s===te){if(!i){n=a+1;break}}else u===-1&&(i=!1,u=a+1),o>=0&&(s===t.charCodeAt(o)?--o===-1&&(r=a):(o=-1,r=u))}return n===r?r=u:r===-1&&(r=e.length),e.slice(n,r)}for(a=e.length-1;a>=0;--a)if(e.charCodeAt(a)===te){if(!i){n=a+1;break}}else r===-1&&(i=!1,r=a+1);return r===-1?"":e.slice(n,r)},extname(e){Z(e,"path");let t=-1,n=0,r=-1,i=!0,a=0;for(let o=e.length-1;o>=0;--o){const u=e.charCodeAt(o);if(u===te){if(!i){n=o+1;break}continue}r===-1&&(i=!1,r=o+1),u===ke?t===-1?t=o:a!==1&&(a=1):t!==-1&&(a=-1)}return t===-1||r===-1||a===0||a===1&&t===r-1&&t===n+1?"":e.slice(t,r)},format:Cn.bind(null,"/"),parse(e){Z(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const n=e.charCodeAt(0)===te;let r;n?(t.root="/",r=1):r=0;let i=-1,a=0,o=-1,u=!0,s=e.length-1,l=0;for(;s>=r;--s){const h=e.charCodeAt(s);if(h===te){if(!u){a=s+1;break}continue}o===-1&&(u=!1,o=s+1),h===ke?i===-1?i=s:l!==1&&(l=1):i!==-1&&(l=-1)}if(o!==-1){const h=a===0&&n?1:a;i===-1||l===0||l===1&&i===o-1&&i===a+1?t.base=t.name=e.slice(h,o):(t.name=e.slice(h,i),t.base=e.slice(h,o),t.ext=e.slice(i,o))}return a>0?t.dir=e.slice(0,a-1):n&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};le.win32=ae.win32=ae,le.posix=ae.posix=le,Me==="win32"?ae.normalize:le.normalize,Me==="win32"?ae.resolve:le.resolve,Me==="win32"?ae.relative:le.relative,Me==="win32"?ae.dirname:le.dirname,Me==="win32"?ae.basename:le.basename,Me==="win32"?ae.extname:le.extname,Me==="win32"?ae.sep:le.sep;const Xr=/^\w[\w\d+.-]*$/,Qr=/^\//,Jr=/^\/\//;function xn(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&&!Xr.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!Qr.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(Jr.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 ("//")')}}function Zr(e,t){return!e&&!t?"file":e}function Kr(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==me&&(t=me+t):t=me;break}return t}const Q="",me="/",ea=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,n,r,i,a,o=!1){typeof t=="object"?(this.scheme=t.scheme||Q,this.authority=t.authority||Q,this.path=t.path||Q,this.query=t.query||Q,this.fragment=t.fragment||Q):(this.scheme=Zr(t,o),this.authority=n||Q,this.path=Kr(this.scheme,r||Q),this.query=i||Q,this.fragment=a||Q,xn(this,o))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return Pt(this,!1)}with(t){if(!t)return this;let{scheme:n,authority:r,path:i,query:a,fragment:o}=t;return n===void 0?n=this.scheme:n===null&&(n=Q),r===void 0?r=this.authority:r===null&&(r=Q),i===void 0?i=this.path:i===null&&(i=Q),a===void 0?a=this.query:a===null&&(a=Q),o===void 0?o=this.fragment:o===null&&(o=Q),n===this.scheme&&r===this.authority&&i===this.path&&a===this.query&&o===this.fragment?this:new Pe(n,r,i,a,o)}static parse(t,n=!1){const r=ea.exec(t);return r?new Pe(r[2]||Q,lt(r[4]||Q),lt(r[5]||Q),lt(r[7]||Q),lt(r[9]||Q),n):new Pe(Q,Q,Q,Q,Q)}static file(t){let n=Q;if(Ye&&(t=t.replace(/\\/g,me)),t[0]===me&&t[1]===me){const r=t.indexOf(me,2);r===-1?(n=t.substring(2),t=me):(n=t.substring(2,r),t=t.substring(r)||me)}return new Pe("file",n,t,Q,Q)}static from(t){const n=new Pe(t.scheme,t.authority,t.path,t.query,t.fragment);return xn(n,!0),n}static joinPath(t,...n){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let r;return Ye&&t.scheme==="file"?r=Re.file(ae.join(Pt(t,!0),...n)).path:r=le.join(t.path,...n),t.with({path:r})}toString(t=!1){return Bt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const n=new Pe(t);return n._formatted=t.external,n._fsPath=t._sep===Dn?t.fsPath:null,n}}else return t}}const Dn=Ye?1:void 0;class Pe extends Re{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Pt(this,!1)),this._fsPath}toString(t=!1){return t?Bt(this,!0):(this._formatted||(this._formatted=Bt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Dn),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const En={[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 Mn(e,t){let n,r=-1;for(let i=0;i=97&&a<=122||a>=65&&a<=90||a>=48&&a<=57||a===45||a===46||a===95||a===126||t&&a===47)r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n!==void 0&&(n+=e.charAt(i));else{n===void 0&&(n=e.substr(0,i));const o=En[a];o!==void 0?(r!==-1&&(n+=encodeURIComponent(e.substring(r,i)),r=-1),n+=o):r===-1&&(r=i)}}return r!==-1&&(n+=encodeURIComponent(e.substring(r))),n!==void 0?n:e}function ta(e){let t;for(let n=0;n1&&e.scheme==="file"?n=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?n=e.path.substr(1):n=e.path[1].toLowerCase()+e.path.substr(2):n=e.path,Ye&&(n=n.replace(/\//g,"\\")),n}function Bt(e,t){const n=t?ta:Mn;let r="",{scheme:i,authority:a,path:o,query:u,fragment:s}=e;if(i&&(r+=i,r+=":"),(a||i==="file")&&(r+=me,r+=me),a){let l=a.indexOf("@");if(l!==-1){const h=a.substr(0,l);a=a.substr(l+1),l=h.indexOf(":"),l===-1?r+=n(h,!1):(r+=n(h.substr(0,l),!1),r+=":",r+=n(h.substr(l+1),!1)),r+="@"}a=a.toLowerCase(),l=a.indexOf(":"),l===-1?r+=n(a,!1):(r+=n(a.substr(0,l),!1),r+=a.substr(l))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const l=o.charCodeAt(1);l>=65&&l<=90&&(o=`/${String.fromCharCode(l+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const l=o.charCodeAt(0);l>=65&&l<=90&&(o=`${String.fromCharCode(l+32)}:${o.substr(2)}`)}r+=n(o,!0)}return u&&(r+="?",r+=n(u,!1)),s&&(r+="#",r+=t?s:Mn(s,!1)),r}function Rn(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Rn(e.substr(3)):e}}const Nn=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function lt(e){return e.match(Nn)?e.replace(Nn,t=>Rn(t)):e}class he{constructor(t,n){this.lineNumber=t,this.column=n}with(t=this.lineNumber,n=this.column){return t===this.lineNumber&&n===this.column?this:new he(t,n)}delta(t=0,n=0){return this.with(this.lineNumber+t,this.column+n)}equals(t){return he.equals(this,t)}static equals(t,n){return!t&&!n?!0:!!t&&!!n&&t.lineNumber===n.lineNumber&&t.column===n.column}isBefore(t){return he.isBefore(this,t)}static isBefore(t,n){return t.lineNumberr||t===r&&n>i?(this.startLineNumber=r,this.startColumn=i,this.endLineNumber=t,this.endColumn=n):(this.startLineNumber=t,this.startColumn=n,this.endLineNumber=r,this.endColumn=i)}isEmpty(){return J.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return J.containsPosition(this,t)}static containsPosition(t,n){return!(n.lineNumbert.endLineNumber||n.lineNumber===t.startLineNumber&&n.columnt.endColumn)}containsRange(t){return J.containsRange(this,t)}static containsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumnt.endColumn)}strictContainsRange(t){return J.strictContainsRange(this,t)}static strictContainsRange(t,n){return!(n.startLineNumbert.endLineNumber||n.endLineNumber>t.endLineNumber||n.startLineNumber===t.startLineNumber&&n.startColumn<=t.startColumn||n.endLineNumber===t.endLineNumber&&n.endColumn>=t.endColumn)}plusRange(t){return J.plusRange(this,t)}static plusRange(t,n){let r,i,a,o;return n.startLineNumbert.endLineNumber?(a=n.endLineNumber,o=n.endColumn):n.endLineNumber===t.endLineNumber?(a=n.endLineNumber,o=Math.max(n.endColumn,t.endColumn)):(a=t.endLineNumber,o=t.endColumn),new J(r,i,a,o)}intersectRanges(t){return J.intersectRanges(this,t)}static intersectRanges(t,n){let r=t.startLineNumber,i=t.startColumn,a=t.endLineNumber,o=t.endColumn,u=n.startLineNumber,s=n.startColumn,l=n.endLineNumber,h=n.endColumn;return rl?(a=l,o=h):a===l&&(o=Math.min(o,h)),r>a||r===a&&i>o?null:new J(r,i,a,o)}equalsRange(t){return J.equalsRange(this,t)}static equalsRange(t,n){return!!t&&!!n&&t.startLineNumber===n.startLineNumber&&t.startColumn===n.startColumn&&t.endLineNumber===n.endLineNumber&&t.endColumn===n.endColumn}getEndPosition(){return J.getEndPosition(this)}static getEndPosition(t){return new he(t.endLineNumber,t.endColumn)}getStartPosition(){return J.getStartPosition(this)}static getStartPosition(t){return new he(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,n){return new J(this.startLineNumber,this.startColumn,t,n)}setStartPosition(t,n){return new J(t,n,this.endLineNumber,this.endColumn)}collapseToStart(){return J.collapseToStart(this)}static collapseToStart(t){return new J(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,n=t){return new J(t.lineNumber,t.column,n.lineNumber,n.column)}static lift(t){return t?new J(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,n){return!(t.endLineNumbert.startLineNumber}}const na=3;function Un(e,t,n,r){return new Te(e,t,n).ComputeDiff(r)}class Hn{constructor(t){const n=[],r=[];for(let i=0,a=t.length;i0&&n.originalLength<20&&n.modifiedLength>0&&n.modifiedLength<20&&a()){const p=r.createCharSequence(t,n.originalStart,n.originalStart+n.originalLength-1),_=i.createCharSequence(t,n.modifiedStart,n.modifiedStart+n.modifiedLength-1);let b=Un(p,_,a,!0).changes;u&&(b=ra(b)),d=[];for(let T=0,k=b.length;T1&&b>1;){const T=d.charCodeAt(_-2),k=p.charCodeAt(b-2);if(T!==k)break;_--,b--}(_>1||b>1)&&this._pushTrimWhitespaceCharChange(i,a+1,1,_,o+1,1,b)}{let _=qt(d,1),b=qt(p,1);const T=d.length+1,k=p.length+1;for(;_!0;const t=Date.now();return()=>Date.now()-t255?255:e|0}function Be(e){return e<0?0:e>4294967295?4294967295:e|0}class sa{constructor(t,n){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=n}}class oa{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,n){t=Be(t);const r=this.values,i=this.prefixSum,a=n.length;return a===0?!1:(this.values=new Uint32Array(r.length+a),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t),t+a),this.values.set(n,t),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,n){return t=Be(t),n=Be(n),this.values[t]===n?!1:(this.values[t]=n,t-1=r.length)return!1;let a=r.length-t;return n>=a&&(n=a),n===0?!1:(this.values=new Uint32Array(r.length-n),this.values.set(r.subarray(0,t),0),this.values.set(r.subarray(t+n),t),this.prefixSum=new Uint32Array(this.values.length),t-1=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Be(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let n=this.prefixSumValidIndex[0]+1;n===0&&(this.prefixSum[0]=this.values[0],n++),t>=this.values.length&&(t=this.values.length-1);for(let r=n;r<=t;r++)this.prefixSum[r]=this.prefixSum[r-1]+this.values[r];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let n=0,r=this.values.length-1,i=0,a=0,o=0;for(;n<=r;)if(i=n+(r-n)/2|0,a=this.prefixSum[i],o=a-this.values[i],t=a)n=i+1;else break;return new sa(i,t-o)}}class la{constructor(t,n,r,i){this._uri=t,this._lines=n,this._eol=r,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const n=t.changes;for(const r of n)this._acceptDeleteRange(r.range),this._acceptInsertText(new he(r.range.startLineNumber,r.range.startColumn),r.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,n=this._lines.length,r=new Uint32Array(n);for(let i=0;i/?";function ha(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const n of ua)e.indexOf(n)>=0||(t+="\\"+n);return t+="\\s]+)",new RegExp(t,"g")}const ca=ha();function da(e){let t=ca;if(e&&e instanceof RegExp)if(e.global)t=e;else{let n="g";e.ignoreCase&&(n+="i"),e.multiline&&(n+="m"),e.unicode&&(n+="u"),t=new RegExp(e.source,n)}return t.lastIndex=0,t}const ma={maxLen:1e3,windowSize:15,timeBudget:150};function Wn(e,t,n,r,i=ma){if(n.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:r+=l,n=n.substring(l,e+i.maxLen/2),Wn(e,t,n,r,i)}const a=Date.now(),o=e-1-r;let u=-1,s=null;for(let l=1;!(Date.now()-a>=i.timeBudget);l++){const h=o-i.windowSize*l;t.lastIndex=Math.max(0,h);const c=fa(t,n,o,u);if(!c&&s||(s=c,h<=0))break;u=h}if(s){let l={word:s[0],startColumn:r+1+s.index,endColumn:r+1+s.index+s[0].length};return t.lastIndex=0,l}return null}function fa(e,t,n,r){let i;for(;i=e.exec(t);){const a=i.index||0;if(a<=n&&e.lastIndex>=n)return i;if(r>0&&a>r)return null}return null}class Ot{constructor(t){let n=In(t);this._defaultValue=n,this._asciiMap=Ot._createAsciiMap(n),this._map=new Map}static _createAsciiMap(t){let n=new Uint8Array(256);for(let r=0;r<256;r++)n[r]=t;return n}set(t,n){let r=In(n);t>=0&&t<256?this._asciiMap[t]=r:this._map.set(t,r)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class pa{constructor(t,n,r){const i=new Uint8Array(t*n);for(let a=0,o=t*n;an&&(n=s),u>r&&(r=u),l>r&&(r=l)}n++,r++;let i=new pa(r,n,0);for(let a=0,o=t.length;a=this._maxCharCode?0:this._states.get(t,n)}}let jt=null;function ba(){return jt===null&&(jt=new ga([[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]])),jt}let Qe=null;function _a(){if(Qe===null){Qe=new Ot(0);const e=` <>'"\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 n=0;ni);if(i>0){const u=n.charCodeAt(i-1),s=n.charCodeAt(o);(u===40&&s===41||u===91&&s===93||u===123&&s===125)&&o--}return{range:{startLineNumber:r,startColumn:i+1,endLineNumber:r,endColumn:o+2},url:n.substring(i,o+1)}}static computeLinks(t,n=ba()){const r=_a();let i=[];for(let a=1,o=t.getLineCount();a<=o;a++){const u=t.getLineContent(a),s=u.length;let l=0,h=0,c=0,d=1,p=!1,_=!1,b=!1,T=!1;for(;l=0?(i+=r?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Gt.INSTANCE=new Gt;class X{constructor(t){this.element=t,this.next=X.Undefined,this.prev=X.Undefined}}X.Undefined=new X(void 0);class Pn{constructor(){this._first=X.Undefined,this._last=X.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===X.Undefined}clear(){let t=this._first;for(;t!==X.Undefined;){const n=t.next;t.prev=X.Undefined,t.next=X.Undefined,t=n}this._first=X.Undefined,this._last=X.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,n){const r=new X(t);if(this._first===X.Undefined)this._first=r,this._last=r;else if(n){const a=this._last;this._last=r,r.prev=a,a.next=r}else{const a=this._first;this._first=r,r.next=a,a.prev=r}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(r))}}shift(){if(this._first!==X.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==X.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==X.Undefined&&t.next!==X.Undefined){const n=t.prev;n.next=t.next,t.next.prev=n}else t.prev===X.Undefined&&t.next===X.Undefined?(this._first=X.Undefined,this._last=X.Undefined):t.next===X.Undefined?(this._last=this._last.prev,this._last.next=X.Undefined):t.prev===X.Undefined&&(this._first=this._first.next,this._first.prev=X.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==X.Undefined;)yield t.element,t=t.next}}const wa=ie.performance&&typeof ie.performance.now=="function";class ht{constructor(t){this._highResolution=wa&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new ht(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ie.performance.now():Date.now()}}var Vt;(function(e){e.None=()=>wn.None;function t(f){return(v,A=null,D)=>{let H=!1,g;return g=f(m=>{if(!H)return g?g.dispose():H=!0,v.call(A,m)},null,D),H&&g.dispose(),g}}e.once=t;function n(f,v){return s((A,D=null,H)=>f(g=>A.call(D,v(g)),null,H))}e.map=n;function r(f,v){return s((A,D=null,H)=>f(g=>{v(g),A.call(D,g)},null,H))}e.forEach=r;function i(f,v){return s((A,D=null,H)=>f(g=>v(g)&&A.call(D,g),null,H))}e.filter=i;function a(f){return f}e.signal=a;function o(...f){return(v,A=null,D)=>Er(...f.map(H=>H(g=>v.call(A,g),null,D)))}e.any=o;function u(f,v,A){let D=A;return n(f,H=>(D=v(D,H),D))}e.reduce=u;function s(f){let v;const A=new Ne({onFirstListenerAdd(){v=f(A.fire,A)},onLastListenerRemove(){v.dispose()}});return A.event}function l(f,v,A=100,D=!1,H){let g,m,w,B=0;const R=new Ne({leakWarningThreshold:H,onFirstListenerAdd(){g=f(N=>{B++,m=v(m,N),D&&!w&&(R.fire(m),m=void 0),clearTimeout(w),w=setTimeout(()=>{const I=m;m=void 0,w=void 0,(!D||B>1)&&R.fire(I),B=0},A)})},onLastListenerRemove(){g.dispose()}});return R.event}e.debounce=l;function h(f,v=(A,D)=>A===D){let A=!0,D;return i(f,H=>{const g=A||!v(H,D);return A=!1,D=H,g})}e.latch=h;function c(f,v){return[e.filter(f,v),e.filter(f,A=>!v(A))]}e.split=c;function d(f,v=!1,A=[]){let D=A.slice(),H=f(w=>{D?D.push(w):m.fire(w)});const g=()=>{D&&D.forEach(w=>m.fire(w)),D=null},m=new Ne({onFirstListenerAdd(){H||(H=f(w=>m.fire(w)))},onFirstListenerDidAdd(){D&&(v?setTimeout(g):g())},onLastListenerRemove(){H&&H.dispose(),H=null}});return m.event}e.buffer=d;class p{constructor(v){this.event=v}map(v){return new p(n(this.event,v))}forEach(v){return new p(r(this.event,v))}filter(v){return new p(i(this.event,v))}reduce(v,A){return new p(u(this.event,v,A))}latch(){return new p(h(this.event))}debounce(v,A=100,D=!1,H){return new p(l(this.event,v,A,D,H))}on(v,A,D){return this.event(v,A,D)}once(v,A,D){return t(this.event)(v,A,D)}}function _(f){return new p(f)}e.chain=_;function b(f,v,A=D=>D){const D=(...w)=>m.fire(A(...w)),H=()=>f.on(v,D),g=()=>f.removeListener(v,D),m=new Ne({onFirstListenerAdd:H,onLastListenerRemove:g});return m.event}e.fromNodeEventEmitter=b;function T(f,v,A=D=>D){const D=(...w)=>m.fire(A(...w)),H=()=>f.addEventListener(v,D),g=()=>f.removeEventListener(v,D),m=new Ne({onFirstListenerAdd:H,onLastListenerRemove:g});return m.event}e.fromDOMEventEmitter=T;function k(f){return new Promise(v=>t(f)(v))}e.toPromise=k})(Vt||(Vt={}));class ct{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${ct._idPool++}`}start(t){this._stopWatch=new ht(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}ct._idPool=0;class Ne{constructor(t){var n;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((n=this._options)===null||n===void 0)&&n._profName?new ct(this._options._profName):void 0}get event(){return this._event||(this._event=(t,n,r)=>{var i;this._listeners||(this._listeners=new Pn);const a=this._listeners.isEmpty();a&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(n?[t,n]:t);a&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,n);const u=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),s=vn(()=>{u&&u(),this._disposed||(o(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return r instanceof Ve?r.add(s):Array.isArray(r)&&r.push(s),s}),this._event}fire(t){var n,r;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Pn);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((n=this._perfMon)===null||n===void 0||n.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,a]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,a):i[0].call(i[1],a)}catch(o){Lr(o)}}(r=this._perfMon)===null||r===void 0||r.stop()}}dispose(){var t,n,r,i,a;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(n=this._deliveryQueue)===null||n===void 0||n.clear(),(i=(r=this._options)===null||r===void 0?void 0:r.onLastListenerRemove)===null||i===void 0||i.call(r),(a=this._leakageMon)===null||a===void 0||a.dispose())}}const Bn=Object.freeze(function(e,t){const n=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(n)}}});var dt;(function(e){function t(n){return n===e.None||n===e.Cancelled||n instanceof mt?!0:!n||typeof n!="object"?!1:typeof n.isCancellationRequested=="boolean"&&typeof n.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:Vt.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:Bn})})(dt||(dt={}));class mt{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?Bn:(this._emitter||(this._emitter=new Ne),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class ya{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new mt),this._token}cancel(){this._token?this._token instanceof mt&&this._token.cancel():this._token=dt.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof mt&&this._token.dispose():this._token=dt.None}}class Yt{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,n){this._keyCodeToStr[t]=n,this._strToKeyCode[n.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const $t=new Yt,Xt=new Yt,Qt=new Yt;(function(){function e(t,n,r=n,i=r){$t.define(t,n),Xt.define(t,r),Qt.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var Fn;(function(e){function t(o){return $t.keyCodeToStr(o)}e.toString=t;function n(o){return $t.strToKeyCode(o)}e.fromString=n;function r(o){return Xt.keyCodeToStr(o)}e.toUserSettingsUS=r;function i(o){return Qt.keyCodeToStr(o)}e.toUserSettingsGeneral=i;function a(o){return Xt.strToKeyCode(o)||Qt.strToKeyCode(o)}e.fromUserSettings=a})(Fn||(Fn={}));function Ta(e,t){const n=(t&65535)<<16>>>0;return(e|n)>>>0}class fe extends J{constructor(t,n,r,i){super(t,n,r,i);this.selectionStartLineNumber=t,this.selectionStartColumn=n,this.positionLineNumber=r,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return fe.selectionsEqual(this,t)}static selectionsEqual(t,n){return t.selectionStartLineNumber===n.selectionStartLineNumber&&t.selectionStartColumn===n.selectionStartColumn&&t.positionLineNumber===n.positionLineNumber&&t.positionColumn===n.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,n){return this.getDirection()===0?new fe(this.startLineNumber,this.startColumn,t,n):new fe(t,n,this.startLineNumber,this.startColumn)}getPosition(){return new he(this.positionLineNumber,this.positionColumn)}setStartPosition(t,n){return this.getDirection()===0?new fe(t,n,this.endLineNumber,this.endColumn):new fe(this.endLineNumber,this.endColumn,t,n)}static fromPositions(t,n=t){return new fe(t.lineNumber,t.column,n.lineNumber,n.column)}static liftSelection(t){return new fe(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,n){if(t&&!n||!t&&n)return!1;if(!t&&!n)return!0;if(t.length!==n.length)return!1;for(let r=0,i=t.length;rthis._lines.length)n=this._lines.length,r=this._lines[n-1].length+1,i=!0;else{let a=this._lines[n-1].length+1;r<1?(r=1,i=!0):r>a&&(r=a,i=!0)}return i?{lineNumber:n,column:r}:t}}class qe{constructor(t,n){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=n,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(n=>t.push(this._models[n])),t}acceptNewModel(t){this._models[t.url]=new Aa(Re.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,n){if(!this._models[t])return;this._models[t].onEvents(n)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,n,r,i){return Fe(this,void 0,void 0,function*(){const a=this._getModel(t),o=this._getModel(n);if(!a||!o)return null;const u=a.getLinesContent(),s=o.getLinesContent(),h=new aa(u,s,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:r,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),c=h.changes.length>0?!1:this._modelsAreIdentical(a,o);return{quitEarly:h.quitEarly,identical:c,changes:h.changes}})}_modelsAreIdentical(t,n){const r=t.getLineCount(),i=n.getLineCount();if(r!==i)return!1;for(let a=1;a<=r;a++){const o=t.getLineContent(a),u=n.getLineContent(a);if(o!==u)return!1}return!0}computeMoreMinimalEdits(t,n){return Fe(this,void 0,void 0,function*(){const r=this._getModel(t);if(!r)return n;const i=[];let a;n=n.slice(0).sort((o,u)=>{if(o.range&&u.range)return J.compareRangesUsingStarts(o.range,u.range);let s=o.range?0:1,l=u.range?0:1;return s-l});for(let{range:o,text:u,eol:s}of n){if(typeof s=="number"&&(a=s),J.isEmpty(o)&&!u)continue;const l=r.getValueInRange(o);if(u=u.replace(/\r\n|\n|\r/g,r.eol),l===u)continue;if(Math.max(u.length,l.length)>qe._diffLimit){i.push({range:o,text:u});continue}const h=qr(l,u,!1),c=r.offsetAt(J.lift(o).getStartPosition());for(const d of h){const p=r.positionAt(c+d.originalStart),_=r.positionAt(c+d.originalStart+d.originalLength),b={text:u.substr(d.modifiedStart,d.modifiedLength),range:{startLineNumber:p.lineNumber,startColumn:p.column,endLineNumber:_.lineNumber,endColumn:_.column}};r.getValueInRange(b.range)!==b.text&&i.push(b)}}return typeof a=="number"&&i.push({eol:a,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Fe(this,void 0,void 0,function*(){let n=this._getModel(t);return n?va(n):null})}textualSuggest(t,n,r,i){return Fe(this,void 0,void 0,function*(){const a=new ht(!0),o=new RegExp(r,i),u=new Set;e:for(let s of t){const l=this._getModel(s);if(!!l){for(let h of l.words(o))if(!(h===n||!isNaN(Number(h)))&&(u.add(h),u.size>qe._suggestionsLimit))break e}}return{words:Array.from(u),duration:a.elapsed()}})}computeWordRanges(t,n,r,i){return Fe(this,void 0,void 0,function*(){let a=this._getModel(t);if(!a)return Object.create(null);const o=new RegExp(r,i),u=Object.create(null);for(let s=n.startLineNumber;sthis._host.fhr(u,s)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,n),Promise.resolve(zt(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,n){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,n))}catch(r){return Promise.reject(r)}}}qe._diffLimit=1e5,qe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ie.monaco=Sa());let tn=!1;function vi(e){if(tn)return;tn=!0;const t=new Ir(n=>{self.postMessage(n)},n=>new qe(n,e));self.onmessage=n=>{t.onmessage(n.data)}}self.onmessage=e=>{tn||vi(null)};function La(e,t){var n;return t.length===0?n=e:n=e.replace(/\{(\d+)\}/g,function(r,i){var a=i[0];return typeof t[a]!="undefined"?t[a]:r}),n}function Ca(e,t){for(var n=[],r=2;r0&&(u.arguments=a),u}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.title)&&S.string(i.command)}e.is=n})(Ze||(Ze={}));var K;(function(e){function t(a,o){return{range:a,newText:o}}e.replace=t;function n(a,o){return{range:{start:a,end:a},newText:o}}e.insert=n;function r(a){return{range:a,newText:""}}e.del=r;function i(a){var o=a;return S.objectLiteral(o)&&S.string(o.newText)&&G.is(o.range)}e.is=i})(K||(K={}));var Oe;(function(e){function t(r,i,a){var o={label:r};return i!==void 0&&(o.needsConfirmation=i),a!==void 0&&(o.description=a),o}e.create=t;function n(r){var i=r;return i!==void 0&&S.objectLiteral(i)&&S.string(i.label)&&(S.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(S.string(i.description)||i.description===void 0)}e.is=n})(Oe||(Oe={}));var re;(function(e){function t(n){var r=n;return typeof r=="string"}e.is=t})(re||(re={}));var Le;(function(e){function t(a,o,u){return{range:a,newText:o,annotationId:u}}e.replace=t;function n(a,o,u){return{range:{start:a,end:a},newText:o,annotationId:u}}e.insert=n;function r(a,o){return{range:a,newText:"",annotationId:o}}e.del=r;function i(a){var o=a;return K.is(o)&&(Oe.is(o.annotationId)||re.is(o.annotationId))}e.is=i})(Le||(Le={}));var _t;(function(e){function t(r,i){return{textDocument:r,edits:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&wt.is(i.textDocument)&&Array.isArray(i.edits)}e.is=n})(_t||(_t={}));var Ke;(function(e){function t(r,i,a){var o={kind:"create",uri:r};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){var i=r;return i&&i.kind==="create"&&S.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(Ke||(Ke={}));var et;(function(e){function t(r,i,a,o){var u={kind:"rename",oldUri:r,newUri:i};return a!==void 0&&(a.overwrite!==void 0||a.ignoreIfExists!==void 0)&&(u.options=a),o!==void 0&&(u.annotationId=o),u}e.create=t;function n(r){var i=r;return i&&i.kind==="rename"&&S.string(i.oldUri)&&S.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||S.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||S.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(et||(et={}));var tt;(function(e){function t(r,i,a){var o={kind:"delete",uri:r};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(o.options=i),a!==void 0&&(o.annotationId=a),o}e.create=t;function n(r){var i=r;return i&&i.kind==="delete"&&S.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||S.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||S.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||re.is(i.annotationId))}e.is=n})(tt||(tt={}));var sn;(function(e){function t(n){var r=n;return r&&(r.changes!==void 0||r.documentChanges!==void 0)&&(r.documentChanges===void 0||r.documentChanges.every(function(i){return S.string(i.kind)?Ke.is(i)||et.is(i)||tt.is(i):_t.is(i)}))}e.is=t})(sn||(sn={}));var vt=function(){function e(t,n){this.edits=t,this.changeAnnotations=n}return e.prototype.insert=function(t,n,r){var i,a;if(r===void 0?i=K.insert(t,n):re.is(r)?(a=r,i=Le.insert(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),i=Le.insert(t,n,a)),this.edits.push(i),a!==void 0)return a},e.prototype.replace=function(t,n,r){var i,a;if(r===void 0?i=K.replace(t,n):re.is(r)?(a=r,i=Le.replace(t,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),a=this.changeAnnotations.manage(r),i=Le.replace(t,n,a)),this.edits.push(i),a!==void 0)return a},e.prototype.delete=function(t,n){var r,i;if(n===void 0?r=K.del(t):re.is(n)?(i=n,r=Le.del(t,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=Le.del(t,i)),this.edits.push(r),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),xi=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,n){var r;if(re.is(t)?r=t:(r=this.nextId(),n=t),this._annotations[r]!==void 0)throw new Error("Id "+r+" is already in use.");if(n===void 0)throw new Error("No annotation provided for id "+r);return this._annotations[r]=n,this._size++,r},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var n=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new xi(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(r){if(_t.is(r)){var i=new vt(r.edits,n._changeAnnotations);n._textEditChanges[r.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(r){var i=new vt(t.changes[r]);n._textEditChanges[r]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(wt.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n={uri:t.uri,version:t.version},r=this._textEditChanges[n.uri];if(!r){var i=[],a={textDocument:n,edits:i};this._workspaceEdit.documentChanges.push(a),r=new vt(i,this._changeAnnotations),this._textEditChanges[n.uri]=r}return r}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var r=this._textEditChanges[t];if(!r){var i=[];this._workspaceEdit.changes[t]=i,r=new vt(i),this._textEditChanges[t]=r}return r}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new xi,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Oe.is(n)||re.is(n)?i=n:r=n;var a,o;if(i===void 0?a=Ke.create(t,r):(o=re.is(i)?i:this._changeAnnotations.manage(i),a=Ke.create(t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.renameFile=function(t,n,r,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var a;Oe.is(r)||re.is(r)?a=r:i=r;var o,u;if(a===void 0?o=et.create(t,n,i):(u=re.is(a)?a:this._changeAnnotations.manage(a),o=et.create(t,n,i,u)),this._workspaceEdit.documentChanges.push(o),u!==void 0)return u},e.prototype.deleteFile=function(t,n,r){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Oe.is(n)||re.is(n)?i=n:r=n;var a,o;if(i===void 0?a=tt.create(t,r):(o=re.is(i)?i:this._changeAnnotations.manage(i),a=tt.create(t,r,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e})();var Di;(function(e){function t(r){return{uri:r}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)}e.is=n})(Di||(Di={}));var Ei;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&S.integer(i.version)}e.is=n})(Ei||(Ei={}));var wt;(function(e){function t(r,i){return{uri:r,version:i}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&(i.version===null||S.integer(i.version))}e.is=n})(wt||(wt={}));var Mi;(function(e){function t(r,i,a,o){return{uri:r,languageId:i,version:a,text:o}}e.create=t;function n(r){var i=r;return S.defined(i)&&S.string(i.uri)&&S.string(i.languageId)&&S.integer(i.version)&&S.string(i.text)}e.is=n})(Mi||(Mi={}));var pe;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(pe||(pe={})),function(e){function t(n){var r=n;return r===e.PlainText||r===e.Markdown}e.is=t}(pe||(pe={}));var on;(function(e){function t(n){var r=n;return S.objectLiteral(n)&&pe.is(r.kind)&&S.string(r.value)}e.is=t})(on||(on={}));var ue;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(ue||(ue={}));var ge;(function(e){e.PlainText=1,e.Snippet=2})(ge||(ge={}));var Ri;(function(e){e.Deprecated=1})(Ri||(Ri={}));var Ni;(function(e){function t(r,i,a){return{newText:r,insert:i,replace:a}}e.create=t;function n(r){var i=r;return i&&S.string(i.newText)&&G.is(i.insert)&&G.is(i.replace)}e.is=n})(Ni||(Ni={}));var Ui;(function(e){e.asIs=1,e.adjustIndentation=2})(Ui||(Ui={}));var Hi;(function(e){function t(n){return{label:n}}e.create=t})(Hi||(Hi={}));var zi;(function(e){function t(n,r){return{items:n||[],isIncomplete:!!r}}e.create=t})(zi||(zi={}));var yt;(function(e){function t(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function n(r){var i=r;return S.string(i)||S.objectLiteral(i)&&S.string(i.language)&&S.string(i.value)}e.is=n})(yt||(yt={}));var Ii;(function(e){function t(n){var r=n;return!!r&&S.objectLiteral(r)&&(on.is(r.contents)||yt.is(r.contents)||S.typedArray(r.contents,yt.is))&&(n.range===void 0||G.is(n.range))}e.is=t})(Ii||(Ii={}));var Wi;(function(e){function t(n,r){return r?{label:n,documentation:r}:{label:n}}e.create=t})(Wi||(Wi={}));var Pi;(function(e){function t(n,r){for(var i=[],a=2;a=0;h--){var c=s[h],d=a.offsetAt(c.range.start),p=a.offsetAt(c.range.end);if(p<=l)u=u.substring(0,d)+c.newText+u.substring(p,u.length);else throw new Error("Overlapping edit");l=d}return u}e.applyEdits=r;function i(a,o){if(a.length<=1)return a;var u=a.length/2|0,s=a.slice(0,u),l=a.slice(u);i(s,o),i(l,o);for(var h=0,c=0,d=0;h0&&t.push(n.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var n=this.getLineOffsets(),r=0,i=n.length;if(i===0)return ne.create(0,t);for(;rt?i=a:r=a+1}var o=r-1;return ne.create(o,t-n[o])},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1t?i=a:r=a+1}var o=r-1;return{line:o,character:t-n[o]}},e.prototype.offsetAt=function(t){var n=this.getLineOffsets();if(t.line>=n.length)return this._content.length;if(t.line<0)return 0;var r=n[t.line],i=t.line+1s&&l.push(o.substring(s,p)),d.newText.length&&l.push(d.newText),s=i.offsetAt(d.range.end)}return l.push(o.substr(s)),l.join("")}e.applyEdits=r})(un||(un={}));function hn(e,t){if(e.length<=1)return e;var n=e.length/2|0,r=e.slice(0,n),i=e.slice(n);hn(r,t),hn(i,t);for(var a=0,o=0,u=0;an.line||t.line===n.line&&t.character>n.character?{start:n,end:t}:e}function Da(e){var t=Ki(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var M;(function(e){e[e.StartCommentTag=0]="StartCommentTag",e[e.Comment=1]="Comment",e[e.EndCommentTag=2]="EndCommentTag",e[e.StartTagOpen=3]="StartTagOpen",e[e.StartTagClose=4]="StartTagClose",e[e.StartTagSelfClose=5]="StartTagSelfClose",e[e.StartTag=6]="StartTag",e[e.EndTagOpen=7]="EndTagOpen",e[e.EndTagClose=8]="EndTagClose",e[e.EndTag=9]="EndTag",e[e.DelimiterAssign=10]="DelimiterAssign",e[e.AttributeName=11]="AttributeName",e[e.AttributeValue=12]="AttributeValue",e[e.StartDoctypeTag=13]="StartDoctypeTag",e[e.Doctype=14]="Doctype",e[e.EndDoctypeTag=15]="EndDoctypeTag",e[e.Content=16]="Content",e[e.Whitespace=17]="Whitespace",e[e.Unknown=18]="Unknown",e[e.Script=19]="Script",e[e.Styles=20]="Styles",e[e.EOS=21]="EOS"})(M||(M={}));var F;(function(e){e[e.WithinContent=0]="WithinContent",e[e.AfterOpeningStartTag=1]="AfterOpeningStartTag",e[e.AfterOpeningEndTag=2]="AfterOpeningEndTag",e[e.WithinDoctype=3]="WithinDoctype",e[e.WithinTag=4]="WithinTag",e[e.WithinEndTag=5]="WithinEndTag",e[e.WithinComment=6]="WithinComment",e[e.WithinScriptContent=7]="WithinScriptContent",e[e.WithinStyleContent=8]="WithinStyleContent",e[e.AfterAttributeName=9]="AfterAttributeName",e[e.BeforeAttributeValue=10]="BeforeAttributeValue"})(F||(F={}));var er;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[pe.Markdown,pe.PlainText]}},hover:{contentFormat:[pe.Markdown,pe.PlainText]}}}})(er||(er={}));var cn;(function(e){e[e.Unknown=0]="Unknown",e[e.File=1]="File",e[e.Directory=2]="Directory",e[e.SymbolicLink=64]="SymbolicLink"})(cn||(cn={}));var Ce=nn(),Ea=function(){function e(t,n){this.source=t,this.len=t.length,this.position=n}return e.prototype.eos=function(){return this.len<=this.position},e.prototype.getSource=function(){return this.source},e.prototype.pos=function(){return this.position},e.prototype.goBackTo=function(t){this.position=t},e.prototype.goBack=function(t){this.position-=t},e.prototype.advance=function(t){this.position+=t},e.prototype.goToEnd=function(){this.position=this.source.length},e.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},e.prototype.peekChar=function(t){return t===void 0&&(t=0),this.source.charCodeAt(this.position+t)||0},e.prototype.advanceIfChar=function(t){return t===this.source.charCodeAt(this.position)?(this.position++,!0):!1},e.prototype.advanceIfChars=function(t){var n;if(this.position+t.length>this.source.length)return!1;for(n=0;n0},e.prototype.advanceWhileChar=function(t){for(var n=this.position;this.position0?(a=F.WithinEndTag,b(f,M.EndTag)):i.skipWhitespace()?b(f,M.Whitespace,Ce("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(a=F.WithinEndTag,i.advanceUntilChar(be),f0?(l=!1,a=F.WithinTag,b(f,M.StartTag)):i.skipWhitespace()?b(f,M.Whitespace,Ce("error.unexpectedWhitespace","Tag name must directly follow the open bracket.")):(a=F.WithinTag,i.advanceUntilChar(be),f0)?(a=F.AfterAttributeName,l=!1,b(f,M.AttributeName)):i.advanceIfChars([dn,be])?(a=F.WithinContent,b(f,M.StartTagSelfClose)):i.advanceIfChar(be)?(h==="script"?d&&Pa[d]?a=F.WithinContent:a=F.WithinScriptContent:h==="style"?a=F.WithinStyleContent:a=F.WithinContent,b(f,M.StartTagClose)):r&&i.peekChar()===St?(a=F.WithinContent,b(f,M.StartTagClose,Ce("error.closingBracketMissing","Closing bracket missing."))):(i.advance(1),b(f,M.Unknown,Ce("error.unexpectedCharacterInTag","Unexpected character in tag.")));case F.AfterAttributeName:return i.skipWhitespace()?(l=!0,b(f,M.Whitespace)):i.advanceIfChar(Ma)?(a=F.BeforeAttributeValue,b(f,M.DelimiterAssign)):(a=F.WithinTag,k());case F.BeforeAttributeValue:if(i.skipWhitespace())return b(f,M.Whitespace);var D=i.advanceIfRegExp(/^[^\s"'`=<>]+/);if(D.length>0)return i.peekChar()===be&&i.peekChar(-1)===dn&&(i.goBack(1),D=D.substr(0,D.length-1)),c==="type"&&(d=D),a=F.WithinTag,l=!1,b(f,M.AttributeValue);var H=i.peekChar();return H===Na||H===Ra?(i.advance(1),i.advanceUntilChar(H)&&i.advance(1),c==="type"&&(d=i.getSource().substring(f+1,i.pos()-1)),a=F.WithinTag,l=!1,b(f,M.AttributeValue)):(a=F.WithinTag,l=!1,k());case F.WithinScriptContent:for(var g=1;!i.eos();){var m=i.advanceIfRegExp(/|<\/?script\s*\/?>?/i);if(m.length===0)return i.goToEnd(),b(f,M.Script);if(m==="")g=1;else if(m[1]!=="/")g===2&&(g=3);else if(g===3)g=2;else{i.goBack(m.length);break}}return a=F.WithinContent,f0)i=a-1;else return a}return-(r+1)}var Fa=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"];function At(e){return!!e&&Ba(Fa,e.toLowerCase(),function(t,n){return t.localeCompare(n)})>=0}var ir=function(){function e(t,n,r,i){this.start=t,this.end=n,this.children=r,this.parent=i,this.closed=!1}return Object.defineProperty(e.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),e.prototype.isSameTag=function(t){return this.tag===void 0?t===void 0:t!==void 0&&this.tag.length===t.length&&this.tag.toLowerCase()===t},Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),e.prototype.findNodeBefore=function(t){var n=nr(this.children,function(a){return t<=a.start})-1;if(n>=0){var r=this.children[n];if(t>r.start){if(t=0){var r=this.children[n];if(t>r.start&&t<=r.end)return r.findNodeAt(t)}return this},e}();function rr(e){for(var t=de(e,void 0,void 0,!0),n=new ir(0,e.length,[],void 0),r=n,i=-1,a=void 0,o=null,u=t.scan();u!==M.EOS;){switch(u){case M.StartTagOpen:var s=new ir(t.getTokenOffset(),e.length,[],r);r.children.push(s),r=s;break;case M.StartTag:r.tag=t.getTokenText();break;case M.StartTagClose:r.parent&&(r.end=t.getTokenEnd(),t.getTokenLength()?(r.startTagEnd=t.getTokenEnd(),r.tag&&At(r.tag)&&(r.closed=!0,r=r.parent)):r=r.parent);break;case M.StartTagSelfClose:r.parent&&(r.closed=!0,r.end=t.getTokenEnd(),r.startTagEnd=t.getTokenEnd(),r=r.parent);break;case M.EndTagOpen:i=t.getTokenOffset(),a=void 0;break;case M.EndTag:a=t.getTokenText().toLowerCase();break;case M.EndTagClose:for(var l=r;!l.isSameTag(a)&&l.parent;)l=l.parent;if(l.parent){for(;r!==l;)r.end=i,r.closed=!1,r=r.parent;r.closed=!0,r.endTagStart=i,r.end=t.getTokenEnd(),r=r.parent}break;case M.AttributeName:{o=t.getTokenText();var h=r.attributes;h||(r.attributes=h={}),h[o]=null;break}case M.AttributeValue:{var c=t.getTokenText(),h=r.attributes;h&&o&&(h[o]=c,o=null);break}}u=t.scan()}for(;r.parent;)r.end=e.length,r.closed=!1,r=r.parent;return{roots:n.children,findNodeBefore:n.findNodeBefore.bind(n),findNodeAt:n.findNodeAt.bind(n)}}var nt={"Aacute;":"\xC1",Aacute:"\xC1","aacute;":"\xE1",aacute:"\xE1","Abreve;":"\u0102","abreve;":"\u0103","ac;":"\u223E","acd;":"\u223F","acE;":"\u223E\u0333","Acirc;":"\xC2",Acirc:"\xC2","acirc;":"\xE2",acirc:"\xE2","acute;":"\xB4",acute:"\xB4","Acy;":"\u0410","acy;":"\u0430","AElig;":"\xC6",AElig:"\xC6","aelig;":"\xE6",aelig:"\xE6","af;":"\u2061","Afr;":"\u{1D504}","afr;":"\u{1D51E}","Agrave;":"\xC0",Agrave:"\xC0","agrave;":"\xE0",agrave:"\xE0","alefsym;":"\u2135","aleph;":"\u2135","Alpha;":"\u0391","alpha;":"\u03B1","Amacr;":"\u0100","amacr;":"\u0101","amalg;":"\u2A3F","AMP;":"&",AMP:"&","amp;":"&",amp:"&","And;":"\u2A53","and;":"\u2227","andand;":"\u2A55","andd;":"\u2A5C","andslope;":"\u2A58","andv;":"\u2A5A","ang;":"\u2220","ange;":"\u29A4","angle;":"\u2220","angmsd;":"\u2221","angmsdaa;":"\u29A8","angmsdab;":"\u29A9","angmsdac;":"\u29AA","angmsdad;":"\u29AB","angmsdae;":"\u29AC","angmsdaf;":"\u29AD","angmsdag;":"\u29AE","angmsdah;":"\u29AF","angrt;":"\u221F","angrtvb;":"\u22BE","angrtvbd;":"\u299D","angsph;":"\u2222","angst;":"\xC5","angzarr;":"\u237C","Aogon;":"\u0104","aogon;":"\u0105","Aopf;":"\u{1D538}","aopf;":"\u{1D552}","ap;":"\u2248","apacir;":"\u2A6F","apE;":"\u2A70","ape;":"\u224A","apid;":"\u224B","apos;":"'","ApplyFunction;":"\u2061","approx;":"\u2248","approxeq;":"\u224A","Aring;":"\xC5",Aring:"\xC5","aring;":"\xE5",aring:"\xE5","Ascr;":"\u{1D49C}","ascr;":"\u{1D4B6}","Assign;":"\u2254","ast;":"*","asymp;":"\u2248","asympeq;":"\u224D","Atilde;":"\xC3",Atilde:"\xC3","atilde;":"\xE3",atilde:"\xE3","Auml;":"\xC4",Auml:"\xC4","auml;":"\xE4",auml:"\xE4","awconint;":"\u2233","awint;":"\u2A11","backcong;":"\u224C","backepsilon;":"\u03F6","backprime;":"\u2035","backsim;":"\u223D","backsimeq;":"\u22CD","Backslash;":"\u2216","Barv;":"\u2AE7","barvee;":"\u22BD","Barwed;":"\u2306","barwed;":"\u2305","barwedge;":"\u2305","bbrk;":"\u23B5","bbrktbrk;":"\u23B6","bcong;":"\u224C","Bcy;":"\u0411","bcy;":"\u0431","bdquo;":"\u201E","becaus;":"\u2235","Because;":"\u2235","because;":"\u2235","bemptyv;":"\u29B0","bepsi;":"\u03F6","bernou;":"\u212C","Bernoullis;":"\u212C","Beta;":"\u0392","beta;":"\u03B2","beth;":"\u2136","between;":"\u226C","Bfr;":"\u{1D505}","bfr;":"\u{1D51F}","bigcap;":"\u22C2","bigcirc;":"\u25EF","bigcup;":"\u22C3","bigodot;":"\u2A00","bigoplus;":"\u2A01","bigotimes;":"\u2A02","bigsqcup;":"\u2A06","bigstar;":"\u2605","bigtriangledown;":"\u25BD","bigtriangleup;":"\u25B3","biguplus;":"\u2A04","bigvee;":"\u22C1","bigwedge;":"\u22C0","bkarow;":"\u290D","blacklozenge;":"\u29EB","blacksquare;":"\u25AA","blacktriangle;":"\u25B4","blacktriangledown;":"\u25BE","blacktriangleleft;":"\u25C2","blacktriangleright;":"\u25B8","blank;":"\u2423","blk12;":"\u2592","blk14;":"\u2591","blk34;":"\u2593","block;":"\u2588","bne;":"=\u20E5","bnequiv;":"\u2261\u20E5","bNot;":"\u2AED","bnot;":"\u2310","Bopf;":"\u{1D539}","bopf;":"\u{1D553}","bot;":"\u22A5","bottom;":"\u22A5","bowtie;":"\u22C8","boxbox;":"\u29C9","boxDL;":"\u2557","boxDl;":"\u2556","boxdL;":"\u2555","boxdl;":"\u2510","boxDR;":"\u2554","boxDr;":"\u2553","boxdR;":"\u2552","boxdr;":"\u250C","boxH;":"\u2550","boxh;":"\u2500","boxHD;":"\u2566","boxHd;":"\u2564","boxhD;":"\u2565","boxhd;":"\u252C","boxHU;":"\u2569","boxHu;":"\u2567","boxhU;":"\u2568","boxhu;":"\u2534","boxminus;":"\u229F","boxplus;":"\u229E","boxtimes;":"\u22A0","boxUL;":"\u255D","boxUl;":"\u255C","boxuL;":"\u255B","boxul;":"\u2518","boxUR;":"\u255A","boxUr;":"\u2559","boxuR;":"\u2558","boxur;":"\u2514","boxV;":"\u2551","boxv;":"\u2502","boxVH;":"\u256C","boxVh;":"\u256B","boxvH;":"\u256A","boxvh;":"\u253C","boxVL;":"\u2563","boxVl;":"\u2562","boxvL;":"\u2561","boxvl;":"\u2524","boxVR;":"\u2560","boxVr;":"\u255F","boxvR;":"\u255E","boxvr;":"\u251C","bprime;":"\u2035","Breve;":"\u02D8","breve;":"\u02D8","brvbar;":"\xA6",brvbar:"\xA6","Bscr;":"\u212C","bscr;":"\u{1D4B7}","bsemi;":"\u204F","bsim;":"\u223D","bsime;":"\u22CD","bsol;":"\\","bsolb;":"\u29C5","bsolhsub;":"\u27C8","bull;":"\u2022","bullet;":"\u2022","bump;":"\u224E","bumpE;":"\u2AAE","bumpe;":"\u224F","Bumpeq;":"\u224E","bumpeq;":"\u224F","Cacute;":"\u0106","cacute;":"\u0107","Cap;":"\u22D2","cap;":"\u2229","capand;":"\u2A44","capbrcup;":"\u2A49","capcap;":"\u2A4B","capcup;":"\u2A47","capdot;":"\u2A40","CapitalDifferentialD;":"\u2145","caps;":"\u2229\uFE00","caret;":"\u2041","caron;":"\u02C7","Cayleys;":"\u212D","ccaps;":"\u2A4D","Ccaron;":"\u010C","ccaron;":"\u010D","Ccedil;":"\xC7",Ccedil:"\xC7","ccedil;":"\xE7",ccedil:"\xE7","Ccirc;":"\u0108","ccirc;":"\u0109","Cconint;":"\u2230","ccups;":"\u2A4C","ccupssm;":"\u2A50","Cdot;":"\u010A","cdot;":"\u010B","cedil;":"\xB8",cedil:"\xB8","Cedilla;":"\xB8","cemptyv;":"\u29B2","cent;":"\xA2",cent:"\xA2","CenterDot;":"\xB7","centerdot;":"\xB7","Cfr;":"\u212D","cfr;":"\u{1D520}","CHcy;":"\u0427","chcy;":"\u0447","check;":"\u2713","checkmark;":"\u2713","Chi;":"\u03A7","chi;":"\u03C7","cir;":"\u25CB","circ;":"\u02C6","circeq;":"\u2257","circlearrowleft;":"\u21BA","circlearrowright;":"\u21BB","circledast;":"\u229B","circledcirc;":"\u229A","circleddash;":"\u229D","CircleDot;":"\u2299","circledR;":"\xAE","circledS;":"\u24C8","CircleMinus;":"\u2296","CirclePlus;":"\u2295","CircleTimes;":"\u2297","cirE;":"\u29C3","cire;":"\u2257","cirfnint;":"\u2A10","cirmid;":"\u2AEF","cirscir;":"\u29C2","ClockwiseContourIntegral;":"\u2232","CloseCurlyDoubleQuote;":"\u201D","CloseCurlyQuote;":"\u2019","clubs;":"\u2663","clubsuit;":"\u2663","Colon;":"\u2237","colon;":":","Colone;":"\u2A74","colone;":"\u2254","coloneq;":"\u2254","comma;":",","commat;":"@","comp;":"\u2201","compfn;":"\u2218","complement;":"\u2201","complexes;":"\u2102","cong;":"\u2245","congdot;":"\u2A6D","Congruent;":"\u2261","Conint;":"\u222F","conint;":"\u222E","ContourIntegral;":"\u222E","Copf;":"\u2102","copf;":"\u{1D554}","coprod;":"\u2210","Coproduct;":"\u2210","COPY;":"\xA9",COPY:"\xA9","copy;":"\xA9",copy:"\xA9","copysr;":"\u2117","CounterClockwiseContourIntegral;":"\u2233","crarr;":"\u21B5","Cross;":"\u2A2F","cross;":"\u2717","Cscr;":"\u{1D49E}","cscr;":"\u{1D4B8}","csub;":"\u2ACF","csube;":"\u2AD1","csup;":"\u2AD0","csupe;":"\u2AD2","ctdot;":"\u22EF","cudarrl;":"\u2938","cudarrr;":"\u2935","cuepr;":"\u22DE","cuesc;":"\u22DF","cularr;":"\u21B6","cularrp;":"\u293D","Cup;":"\u22D3","cup;":"\u222A","cupbrcap;":"\u2A48","CupCap;":"\u224D","cupcap;":"\u2A46","cupcup;":"\u2A4A","cupdot;":"\u228D","cupor;":"\u2A45","cups;":"\u222A\uFE00","curarr;":"\u21B7","curarrm;":"\u293C","curlyeqprec;":"\u22DE","curlyeqsucc;":"\u22DF","curlyvee;":"\u22CE","curlywedge;":"\u22CF","curren;":"\xA4",curren:"\xA4","curvearrowleft;":"\u21B6","curvearrowright;":"\u21B7","cuvee;":"\u22CE","cuwed;":"\u22CF","cwconint;":"\u2232","cwint;":"\u2231","cylcty;":"\u232D","Dagger;":"\u2021","dagger;":"\u2020","daleth;":"\u2138","Darr;":"\u21A1","dArr;":"\u21D3","darr;":"\u2193","dash;":"\u2010","Dashv;":"\u2AE4","dashv;":"\u22A3","dbkarow;":"\u290F","dblac;":"\u02DD","Dcaron;":"\u010E","dcaron;":"\u010F","Dcy;":"\u0414","dcy;":"\u0434","DD;":"\u2145","dd;":"\u2146","ddagger;":"\u2021","ddarr;":"\u21CA","DDotrahd;":"\u2911","ddotseq;":"\u2A77","deg;":"\xB0",deg:"\xB0","Del;":"\u2207","Delta;":"\u0394","delta;":"\u03B4","demptyv;":"\u29B1","dfisht;":"\u297F","Dfr;":"\u{1D507}","dfr;":"\u{1D521}","dHar;":"\u2965","dharl;":"\u21C3","dharr;":"\u21C2","DiacriticalAcute;":"\xB4","DiacriticalDot;":"\u02D9","DiacriticalDoubleAcute;":"\u02DD","DiacriticalGrave;":"`","DiacriticalTilde;":"\u02DC","diam;":"\u22C4","Diamond;":"\u22C4","diamond;":"\u22C4","diamondsuit;":"\u2666","diams;":"\u2666","die;":"\xA8","DifferentialD;":"\u2146","digamma;":"\u03DD","disin;":"\u22F2","div;":"\xF7","divide;":"\xF7",divide:"\xF7","divideontimes;":"\u22C7","divonx;":"\u22C7","DJcy;":"\u0402","djcy;":"\u0452","dlcorn;":"\u231E","dlcrop;":"\u230D","dollar;":"$","Dopf;":"\u{1D53B}","dopf;":"\u{1D555}","Dot;":"\xA8","dot;":"\u02D9","DotDot;":"\u20DC","doteq;":"\u2250","doteqdot;":"\u2251","DotEqual;":"\u2250","dotminus;":"\u2238","dotplus;":"\u2214","dotsquare;":"\u22A1","doublebarwedge;":"\u2306","DoubleContourIntegral;":"\u222F","DoubleDot;":"\xA8","DoubleDownArrow;":"\u21D3","DoubleLeftArrow;":"\u21D0","DoubleLeftRightArrow;":"\u21D4","DoubleLeftTee;":"\u2AE4","DoubleLongLeftArrow;":"\u27F8","DoubleLongLeftRightArrow;":"\u27FA","DoubleLongRightArrow;":"\u27F9","DoubleRightArrow;":"\u21D2","DoubleRightTee;":"\u22A8","DoubleUpArrow;":"\u21D1","DoubleUpDownArrow;":"\u21D5","DoubleVerticalBar;":"\u2225","DownArrow;":"\u2193","Downarrow;":"\u21D3","downarrow;":"\u2193","DownArrowBar;":"\u2913","DownArrowUpArrow;":"\u21F5","DownBreve;":"\u0311","downdownarrows;":"\u21CA","downharpoonleft;":"\u21C3","downharpoonright;":"\u21C2","DownLeftRightVector;":"\u2950","DownLeftTeeVector;":"\u295E","DownLeftVector;":"\u21BD","DownLeftVectorBar;":"\u2956","DownRightTeeVector;":"\u295F","DownRightVector;":"\u21C1","DownRightVectorBar;":"\u2957","DownTee;":"\u22A4","DownTeeArrow;":"\u21A7","drbkarow;":"\u2910","drcorn;":"\u231F","drcrop;":"\u230C","Dscr;":"\u{1D49F}","dscr;":"\u{1D4B9}","DScy;":"\u0405","dscy;":"\u0455","dsol;":"\u29F6","Dstrok;":"\u0110","dstrok;":"\u0111","dtdot;":"\u22F1","dtri;":"\u25BF","dtrif;":"\u25BE","duarr;":"\u21F5","duhar;":"\u296F","dwangle;":"\u29A6","DZcy;":"\u040F","dzcy;":"\u045F","dzigrarr;":"\u27FF","Eacute;":"\xC9",Eacute:"\xC9","eacute;":"\xE9",eacute:"\xE9","easter;":"\u2A6E","Ecaron;":"\u011A","ecaron;":"\u011B","ecir;":"\u2256","Ecirc;":"\xCA",Ecirc:"\xCA","ecirc;":"\xEA",ecirc:"\xEA","ecolon;":"\u2255","Ecy;":"\u042D","ecy;":"\u044D","eDDot;":"\u2A77","Edot;":"\u0116","eDot;":"\u2251","edot;":"\u0117","ee;":"\u2147","efDot;":"\u2252","Efr;":"\u{1D508}","efr;":"\u{1D522}","eg;":"\u2A9A","Egrave;":"\xC8",Egrave:"\xC8","egrave;":"\xE8",egrave:"\xE8","egs;":"\u2A96","egsdot;":"\u2A98","el;":"\u2A99","Element;":"\u2208","elinters;":"\u23E7","ell;":"\u2113","els;":"\u2A95","elsdot;":"\u2A97","Emacr;":"\u0112","emacr;":"\u0113","empty;":"\u2205","emptyset;":"\u2205","EmptySmallSquare;":"\u25FB","emptyv;":"\u2205","EmptyVerySmallSquare;":"\u25AB","emsp;":"\u2003","emsp13;":"\u2004","emsp14;":"\u2005","ENG;":"\u014A","eng;":"\u014B","ensp;":"\u2002","Eogon;":"\u0118","eogon;":"\u0119","Eopf;":"\u{1D53C}","eopf;":"\u{1D556}","epar;":"\u22D5","eparsl;":"\u29E3","eplus;":"\u2A71","epsi;":"\u03B5","Epsilon;":"\u0395","epsilon;":"\u03B5","epsiv;":"\u03F5","eqcirc;":"\u2256","eqcolon;":"\u2255","eqsim;":"\u2242","eqslantgtr;":"\u2A96","eqslantless;":"\u2A95","Equal;":"\u2A75","equals;":"=","EqualTilde;":"\u2242","equest;":"\u225F","Equilibrium;":"\u21CC","equiv;":"\u2261","equivDD;":"\u2A78","eqvparsl;":"\u29E5","erarr;":"\u2971","erDot;":"\u2253","Escr;":"\u2130","escr;":"\u212F","esdot;":"\u2250","Esim;":"\u2A73","esim;":"\u2242","Eta;":"\u0397","eta;":"\u03B7","ETH;":"\xD0",ETH:"\xD0","eth;":"\xF0",eth:"\xF0","Euml;":"\xCB",Euml:"\xCB","euml;":"\xEB",euml:"\xEB","euro;":"\u20AC","excl;":"!","exist;":"\u2203","Exists;":"\u2203","expectation;":"\u2130","ExponentialE;":"\u2147","exponentiale;":"\u2147","fallingdotseq;":"\u2252","Fcy;":"\u0424","fcy;":"\u0444","female;":"\u2640","ffilig;":"\uFB03","fflig;":"\uFB00","ffllig;":"\uFB04","Ffr;":"\u{1D509}","ffr;":"\u{1D523}","filig;":"\uFB01","FilledSmallSquare;":"\u25FC","FilledVerySmallSquare;":"\u25AA","fjlig;":"fj","flat;":"\u266D","fllig;":"\uFB02","fltns;":"\u25B1","fnof;":"\u0192","Fopf;":"\u{1D53D}","fopf;":"\u{1D557}","ForAll;":"\u2200","forall;":"\u2200","fork;":"\u22D4","forkv;":"\u2AD9","Fouriertrf;":"\u2131","fpartint;":"\u2A0D","frac12;":"\xBD",frac12:"\xBD","frac13;":"\u2153","frac14;":"\xBC",frac14:"\xBC","frac15;":"\u2155","frac16;":"\u2159","frac18;":"\u215B","frac23;":"\u2154","frac25;":"\u2156","frac34;":"\xBE",frac34:"\xBE","frac35;":"\u2157","frac38;":"\u215C","frac45;":"\u2158","frac56;":"\u215A","frac58;":"\u215D","frac78;":"\u215E","frasl;":"\u2044","frown;":"\u2322","Fscr;":"\u2131","fscr;":"\u{1D4BB}","gacute;":"\u01F5","Gamma;":"\u0393","gamma;":"\u03B3","Gammad;":"\u03DC","gammad;":"\u03DD","gap;":"\u2A86","Gbreve;":"\u011E","gbreve;":"\u011F","Gcedil;":"\u0122","Gcirc;":"\u011C","gcirc;":"\u011D","Gcy;":"\u0413","gcy;":"\u0433","Gdot;":"\u0120","gdot;":"\u0121","gE;":"\u2267","ge;":"\u2265","gEl;":"\u2A8C","gel;":"\u22DB","geq;":"\u2265","geqq;":"\u2267","geqslant;":"\u2A7E","ges;":"\u2A7E","gescc;":"\u2AA9","gesdot;":"\u2A80","gesdoto;":"\u2A82","gesdotol;":"\u2A84","gesl;":"\u22DB\uFE00","gesles;":"\u2A94","Gfr;":"\u{1D50A}","gfr;":"\u{1D524}","Gg;":"\u22D9","gg;":"\u226B","ggg;":"\u22D9","gimel;":"\u2137","GJcy;":"\u0403","gjcy;":"\u0453","gl;":"\u2277","gla;":"\u2AA5","glE;":"\u2A92","glj;":"\u2AA4","gnap;":"\u2A8A","gnapprox;":"\u2A8A","gnE;":"\u2269","gne;":"\u2A88","gneq;":"\u2A88","gneqq;":"\u2269","gnsim;":"\u22E7","Gopf;":"\u{1D53E}","gopf;":"\u{1D558}","grave;":"`","GreaterEqual;":"\u2265","GreaterEqualLess;":"\u22DB","GreaterFullEqual;":"\u2267","GreaterGreater;":"\u2AA2","GreaterLess;":"\u2277","GreaterSlantEqual;":"\u2A7E","GreaterTilde;":"\u2273","Gscr;":"\u{1D4A2}","gscr;":"\u210A","gsim;":"\u2273","gsime;":"\u2A8E","gsiml;":"\u2A90","GT;":">",GT:">","Gt;":"\u226B","gt;":">",gt:">","gtcc;":"\u2AA7","gtcir;":"\u2A7A","gtdot;":"\u22D7","gtlPar;":"\u2995","gtquest;":"\u2A7C","gtrapprox;":"\u2A86","gtrarr;":"\u2978","gtrdot;":"\u22D7","gtreqless;":"\u22DB","gtreqqless;":"\u2A8C","gtrless;":"\u2277","gtrsim;":"\u2273","gvertneqq;":"\u2269\uFE00","gvnE;":"\u2269\uFE00","Hacek;":"\u02C7","hairsp;":"\u200A","half;":"\xBD","hamilt;":"\u210B","HARDcy;":"\u042A","hardcy;":"\u044A","hArr;":"\u21D4","harr;":"\u2194","harrcir;":"\u2948","harrw;":"\u21AD","Hat;":"^","hbar;":"\u210F","Hcirc;":"\u0124","hcirc;":"\u0125","hearts;":"\u2665","heartsuit;":"\u2665","hellip;":"\u2026","hercon;":"\u22B9","Hfr;":"\u210C","hfr;":"\u{1D525}","HilbertSpace;":"\u210B","hksearow;":"\u2925","hkswarow;":"\u2926","hoarr;":"\u21FF","homtht;":"\u223B","hookleftarrow;":"\u21A9","hookrightarrow;":"\u21AA","Hopf;":"\u210D","hopf;":"\u{1D559}","horbar;":"\u2015","HorizontalLine;":"\u2500","Hscr;":"\u210B","hscr;":"\u{1D4BD}","hslash;":"\u210F","Hstrok;":"\u0126","hstrok;":"\u0127","HumpDownHump;":"\u224E","HumpEqual;":"\u224F","hybull;":"\u2043","hyphen;":"\u2010","Iacute;":"\xCD",Iacute:"\xCD","iacute;":"\xED",iacute:"\xED","ic;":"\u2063","Icirc;":"\xCE",Icirc:"\xCE","icirc;":"\xEE",icirc:"\xEE","Icy;":"\u0418","icy;":"\u0438","Idot;":"\u0130","IEcy;":"\u0415","iecy;":"\u0435","iexcl;":"\xA1",iexcl:"\xA1","iff;":"\u21D4","Ifr;":"\u2111","ifr;":"\u{1D526}","Igrave;":"\xCC",Igrave:"\xCC","igrave;":"\xEC",igrave:"\xEC","ii;":"\u2148","iiiint;":"\u2A0C","iiint;":"\u222D","iinfin;":"\u29DC","iiota;":"\u2129","IJlig;":"\u0132","ijlig;":"\u0133","Im;":"\u2111","Imacr;":"\u012A","imacr;":"\u012B","image;":"\u2111","ImaginaryI;":"\u2148","imagline;":"\u2110","imagpart;":"\u2111","imath;":"\u0131","imof;":"\u22B7","imped;":"\u01B5","Implies;":"\u21D2","in;":"\u2208","incare;":"\u2105","infin;":"\u221E","infintie;":"\u29DD","inodot;":"\u0131","Int;":"\u222C","int;":"\u222B","intcal;":"\u22BA","integers;":"\u2124","Integral;":"\u222B","intercal;":"\u22BA","Intersection;":"\u22C2","intlarhk;":"\u2A17","intprod;":"\u2A3C","InvisibleComma;":"\u2063","InvisibleTimes;":"\u2062","IOcy;":"\u0401","iocy;":"\u0451","Iogon;":"\u012E","iogon;":"\u012F","Iopf;":"\u{1D540}","iopf;":"\u{1D55A}","Iota;":"\u0399","iota;":"\u03B9","iprod;":"\u2A3C","iquest;":"\xBF",iquest:"\xBF","Iscr;":"\u2110","iscr;":"\u{1D4BE}","isin;":"\u2208","isindot;":"\u22F5","isinE;":"\u22F9","isins;":"\u22F4","isinsv;":"\u22F3","isinv;":"\u2208","it;":"\u2062","Itilde;":"\u0128","itilde;":"\u0129","Iukcy;":"\u0406","iukcy;":"\u0456","Iuml;":"\xCF",Iuml:"\xCF","iuml;":"\xEF",iuml:"\xEF","Jcirc;":"\u0134","jcirc;":"\u0135","Jcy;":"\u0419","jcy;":"\u0439","Jfr;":"\u{1D50D}","jfr;":"\u{1D527}","jmath;":"\u0237","Jopf;":"\u{1D541}","jopf;":"\u{1D55B}","Jscr;":"\u{1D4A5}","jscr;":"\u{1D4BF}","Jsercy;":"\u0408","jsercy;":"\u0458","Jukcy;":"\u0404","jukcy;":"\u0454","Kappa;":"\u039A","kappa;":"\u03BA","kappav;":"\u03F0","Kcedil;":"\u0136","kcedil;":"\u0137","Kcy;":"\u041A","kcy;":"\u043A","Kfr;":"\u{1D50E}","kfr;":"\u{1D528}","kgreen;":"\u0138","KHcy;":"\u0425","khcy;":"\u0445","KJcy;":"\u040C","kjcy;":"\u045C","Kopf;":"\u{1D542}","kopf;":"\u{1D55C}","Kscr;":"\u{1D4A6}","kscr;":"\u{1D4C0}","lAarr;":"\u21DA","Lacute;":"\u0139","lacute;":"\u013A","laemptyv;":"\u29B4","lagran;":"\u2112","Lambda;":"\u039B","lambda;":"\u03BB","Lang;":"\u27EA","lang;":"\u27E8","langd;":"\u2991","langle;":"\u27E8","lap;":"\u2A85","Laplacetrf;":"\u2112","laquo;":"\xAB",laquo:"\xAB","Larr;":"\u219E","lArr;":"\u21D0","larr;":"\u2190","larrb;":"\u21E4","larrbfs;":"\u291F","larrfs;":"\u291D","larrhk;":"\u21A9","larrlp;":"\u21AB","larrpl;":"\u2939","larrsim;":"\u2973","larrtl;":"\u21A2","lat;":"\u2AAB","lAtail;":"\u291B","latail;":"\u2919","late;":"\u2AAD","lates;":"\u2AAD\uFE00","lBarr;":"\u290E","lbarr;":"\u290C","lbbrk;":"\u2772","lbrace;":"{","lbrack;":"[","lbrke;":"\u298B","lbrksld;":"\u298F","lbrkslu;":"\u298D","Lcaron;":"\u013D","lcaron;":"\u013E","Lcedil;":"\u013B","lcedil;":"\u013C","lceil;":"\u2308","lcub;":"{","Lcy;":"\u041B","lcy;":"\u043B","ldca;":"\u2936","ldquo;":"\u201C","ldquor;":"\u201E","ldrdhar;":"\u2967","ldrushar;":"\u294B","ldsh;":"\u21B2","lE;":"\u2266","le;":"\u2264","LeftAngleBracket;":"\u27E8","LeftArrow;":"\u2190","Leftarrow;":"\u21D0","leftarrow;":"\u2190","LeftArrowBar;":"\u21E4","LeftArrowRightArrow;":"\u21C6","leftarrowtail;":"\u21A2","LeftCeiling;":"\u2308","LeftDoubleBracket;":"\u27E6","LeftDownTeeVector;":"\u2961","LeftDownVector;":"\u21C3","LeftDownVectorBar;":"\u2959","LeftFloor;":"\u230A","leftharpoondown;":"\u21BD","leftharpoonup;":"\u21BC","leftleftarrows;":"\u21C7","LeftRightArrow;":"\u2194","Leftrightarrow;":"\u21D4","leftrightarrow;":"\u2194","leftrightarrows;":"\u21C6","leftrightharpoons;":"\u21CB","leftrightsquigarrow;":"\u21AD","LeftRightVector;":"\u294E","LeftTee;":"\u22A3","LeftTeeArrow;":"\u21A4","LeftTeeVector;":"\u295A","leftthreetimes;":"\u22CB","LeftTriangle;":"\u22B2","LeftTriangleBar;":"\u29CF","LeftTriangleEqual;":"\u22B4","LeftUpDownVector;":"\u2951","LeftUpTeeVector;":"\u2960","LeftUpVector;":"\u21BF","LeftUpVectorBar;":"\u2958","LeftVector;":"\u21BC","LeftVectorBar;":"\u2952","lEg;":"\u2A8B","leg;":"\u22DA","leq;":"\u2264","leqq;":"\u2266","leqslant;":"\u2A7D","les;":"\u2A7D","lescc;":"\u2AA8","lesdot;":"\u2A7F","lesdoto;":"\u2A81","lesdotor;":"\u2A83","lesg;":"\u22DA\uFE00","lesges;":"\u2A93","lessapprox;":"\u2A85","lessdot;":"\u22D6","lesseqgtr;":"\u22DA","lesseqqgtr;":"\u2A8B","LessEqualGreater;":"\u22DA","LessFullEqual;":"\u2266","LessGreater;":"\u2276","lessgtr;":"\u2276","LessLess;":"\u2AA1","lesssim;":"\u2272","LessSlantEqual;":"\u2A7D","LessTilde;":"\u2272","lfisht;":"\u297C","lfloor;":"\u230A","Lfr;":"\u{1D50F}","lfr;":"\u{1D529}","lg;":"\u2276","lgE;":"\u2A91","lHar;":"\u2962","lhard;":"\u21BD","lharu;":"\u21BC","lharul;":"\u296A","lhblk;":"\u2584","LJcy;":"\u0409","ljcy;":"\u0459","Ll;":"\u22D8","ll;":"\u226A","llarr;":"\u21C7","llcorner;":"\u231E","Lleftarrow;":"\u21DA","llhard;":"\u296B","lltri;":"\u25FA","Lmidot;":"\u013F","lmidot;":"\u0140","lmoust;":"\u23B0","lmoustache;":"\u23B0","lnap;":"\u2A89","lnapprox;":"\u2A89","lnE;":"\u2268","lne;":"\u2A87","lneq;":"\u2A87","lneqq;":"\u2268","lnsim;":"\u22E6","loang;":"\u27EC","loarr;":"\u21FD","lobrk;":"\u27E6","LongLeftArrow;":"\u27F5","Longleftarrow;":"\u27F8","longleftarrow;":"\u27F5","LongLeftRightArrow;":"\u27F7","Longleftrightarrow;":"\u27FA","longleftrightarrow;":"\u27F7","longmapsto;":"\u27FC","LongRightArrow;":"\u27F6","Longrightarrow;":"\u27F9","longrightarrow;":"\u27F6","looparrowleft;":"\u21AB","looparrowright;":"\u21AC","lopar;":"\u2985","Lopf;":"\u{1D543}","lopf;":"\u{1D55D}","loplus;":"\u2A2D","lotimes;":"\u2A34","lowast;":"\u2217","lowbar;":"_","LowerLeftArrow;":"\u2199","LowerRightArrow;":"\u2198","loz;":"\u25CA","lozenge;":"\u25CA","lozf;":"\u29EB","lpar;":"(","lparlt;":"\u2993","lrarr;":"\u21C6","lrcorner;":"\u231F","lrhar;":"\u21CB","lrhard;":"\u296D","lrm;":"\u200E","lrtri;":"\u22BF","lsaquo;":"\u2039","Lscr;":"\u2112","lscr;":"\u{1D4C1}","Lsh;":"\u21B0","lsh;":"\u21B0","lsim;":"\u2272","lsime;":"\u2A8D","lsimg;":"\u2A8F","lsqb;":"[","lsquo;":"\u2018","lsquor;":"\u201A","Lstrok;":"\u0141","lstrok;":"\u0142","LT;":"<",LT:"<","Lt;":"\u226A","lt;":"<",lt:"<","ltcc;":"\u2AA6","ltcir;":"\u2A79","ltdot;":"\u22D6","lthree;":"\u22CB","ltimes;":"\u22C9","ltlarr;":"\u2976","ltquest;":"\u2A7B","ltri;":"\u25C3","ltrie;":"\u22B4","ltrif;":"\u25C2","ltrPar;":"\u2996","lurdshar;":"\u294A","luruhar;":"\u2966","lvertneqq;":"\u2268\uFE00","lvnE;":"\u2268\uFE00","macr;":"\xAF",macr:"\xAF","male;":"\u2642","malt;":"\u2720","maltese;":"\u2720","Map;":"\u2905","map;":"\u21A6","mapsto;":"\u21A6","mapstodown;":"\u21A7","mapstoleft;":"\u21A4","mapstoup;":"\u21A5","marker;":"\u25AE","mcomma;":"\u2A29","Mcy;":"\u041C","mcy;":"\u043C","mdash;":"\u2014","mDDot;":"\u223A","measuredangle;":"\u2221","MediumSpace;":"\u205F","Mellintrf;":"\u2133","Mfr;":"\u{1D510}","mfr;":"\u{1D52A}","mho;":"\u2127","micro;":"\xB5",micro:"\xB5","mid;":"\u2223","midast;":"*","midcir;":"\u2AF0","middot;":"\xB7",middot:"\xB7","minus;":"\u2212","minusb;":"\u229F","minusd;":"\u2238","minusdu;":"\u2A2A","MinusPlus;":"\u2213","mlcp;":"\u2ADB","mldr;":"\u2026","mnplus;":"\u2213","models;":"\u22A7","Mopf;":"\u{1D544}","mopf;":"\u{1D55E}","mp;":"\u2213","Mscr;":"\u2133","mscr;":"\u{1D4C2}","mstpos;":"\u223E","Mu;":"\u039C","mu;":"\u03BC","multimap;":"\u22B8","mumap;":"\u22B8","nabla;":"\u2207","Nacute;":"\u0143","nacute;":"\u0144","nang;":"\u2220\u20D2","nap;":"\u2249","napE;":"\u2A70\u0338","napid;":"\u224B\u0338","napos;":"\u0149","napprox;":"\u2249","natur;":"\u266E","natural;":"\u266E","naturals;":"\u2115","nbsp;":"\xA0",nbsp:"\xA0","nbump;":"\u224E\u0338","nbumpe;":"\u224F\u0338","ncap;":"\u2A43","Ncaron;":"\u0147","ncaron;":"\u0148","Ncedil;":"\u0145","ncedil;":"\u0146","ncong;":"\u2247","ncongdot;":"\u2A6D\u0338","ncup;":"\u2A42","Ncy;":"\u041D","ncy;":"\u043D","ndash;":"\u2013","ne;":"\u2260","nearhk;":"\u2924","neArr;":"\u21D7","nearr;":"\u2197","nearrow;":"\u2197","nedot;":"\u2250\u0338","NegativeMediumSpace;":"\u200B","NegativeThickSpace;":"\u200B","NegativeThinSpace;":"\u200B","NegativeVeryThinSpace;":"\u200B","nequiv;":"\u2262","nesear;":"\u2928","nesim;":"\u2242\u0338","NestedGreaterGreater;":"\u226B","NestedLessLess;":"\u226A","NewLine;":` +`,"nexist;":"\u2204","nexists;":"\u2204","Nfr;":"\u{1D511}","nfr;":"\u{1D52B}","ngE;":"\u2267\u0338","nge;":"\u2271","ngeq;":"\u2271","ngeqq;":"\u2267\u0338","ngeqslant;":"\u2A7E\u0338","nges;":"\u2A7E\u0338","nGg;":"\u22D9\u0338","ngsim;":"\u2275","nGt;":"\u226B\u20D2","ngt;":"\u226F","ngtr;":"\u226F","nGtv;":"\u226B\u0338","nhArr;":"\u21CE","nharr;":"\u21AE","nhpar;":"\u2AF2","ni;":"\u220B","nis;":"\u22FC","nisd;":"\u22FA","niv;":"\u220B","NJcy;":"\u040A","njcy;":"\u045A","nlArr;":"\u21CD","nlarr;":"\u219A","nldr;":"\u2025","nlE;":"\u2266\u0338","nle;":"\u2270","nLeftarrow;":"\u21CD","nleftarrow;":"\u219A","nLeftrightarrow;":"\u21CE","nleftrightarrow;":"\u21AE","nleq;":"\u2270","nleqq;":"\u2266\u0338","nleqslant;":"\u2A7D\u0338","nles;":"\u2A7D\u0338","nless;":"\u226E","nLl;":"\u22D8\u0338","nlsim;":"\u2274","nLt;":"\u226A\u20D2","nlt;":"\u226E","nltri;":"\u22EA","nltrie;":"\u22EC","nLtv;":"\u226A\u0338","nmid;":"\u2224","NoBreak;":"\u2060","NonBreakingSpace;":"\xA0","Nopf;":"\u2115","nopf;":"\u{1D55F}","Not;":"\u2AEC","not;":"\xAC",not:"\xAC","NotCongruent;":"\u2262","NotCupCap;":"\u226D","NotDoubleVerticalBar;":"\u2226","NotElement;":"\u2209","NotEqual;":"\u2260","NotEqualTilde;":"\u2242\u0338","NotExists;":"\u2204","NotGreater;":"\u226F","NotGreaterEqual;":"\u2271","NotGreaterFullEqual;":"\u2267\u0338","NotGreaterGreater;":"\u226B\u0338","NotGreaterLess;":"\u2279","NotGreaterSlantEqual;":"\u2A7E\u0338","NotGreaterTilde;":"\u2275","NotHumpDownHump;":"\u224E\u0338","NotHumpEqual;":"\u224F\u0338","notin;":"\u2209","notindot;":"\u22F5\u0338","notinE;":"\u22F9\u0338","notinva;":"\u2209","notinvb;":"\u22F7","notinvc;":"\u22F6","NotLeftTriangle;":"\u22EA","NotLeftTriangleBar;":"\u29CF\u0338","NotLeftTriangleEqual;":"\u22EC","NotLess;":"\u226E","NotLessEqual;":"\u2270","NotLessGreater;":"\u2278","NotLessLess;":"\u226A\u0338","NotLessSlantEqual;":"\u2A7D\u0338","NotLessTilde;":"\u2274","NotNestedGreaterGreater;":"\u2AA2\u0338","NotNestedLessLess;":"\u2AA1\u0338","notni;":"\u220C","notniva;":"\u220C","notnivb;":"\u22FE","notnivc;":"\u22FD","NotPrecedes;":"\u2280","NotPrecedesEqual;":"\u2AAF\u0338","NotPrecedesSlantEqual;":"\u22E0","NotReverseElement;":"\u220C","NotRightTriangle;":"\u22EB","NotRightTriangleBar;":"\u29D0\u0338","NotRightTriangleEqual;":"\u22ED","NotSquareSubset;":"\u228F\u0338","NotSquareSubsetEqual;":"\u22E2","NotSquareSuperset;":"\u2290\u0338","NotSquareSupersetEqual;":"\u22E3","NotSubset;":"\u2282\u20D2","NotSubsetEqual;":"\u2288","NotSucceeds;":"\u2281","NotSucceedsEqual;":"\u2AB0\u0338","NotSucceedsSlantEqual;":"\u22E1","NotSucceedsTilde;":"\u227F\u0338","NotSuperset;":"\u2283\u20D2","NotSupersetEqual;":"\u2289","NotTilde;":"\u2241","NotTildeEqual;":"\u2244","NotTildeFullEqual;":"\u2247","NotTildeTilde;":"\u2249","NotVerticalBar;":"\u2224","npar;":"\u2226","nparallel;":"\u2226","nparsl;":"\u2AFD\u20E5","npart;":"\u2202\u0338","npolint;":"\u2A14","npr;":"\u2280","nprcue;":"\u22E0","npre;":"\u2AAF\u0338","nprec;":"\u2280","npreceq;":"\u2AAF\u0338","nrArr;":"\u21CF","nrarr;":"\u219B","nrarrc;":"\u2933\u0338","nrarrw;":"\u219D\u0338","nRightarrow;":"\u21CF","nrightarrow;":"\u219B","nrtri;":"\u22EB","nrtrie;":"\u22ED","nsc;":"\u2281","nsccue;":"\u22E1","nsce;":"\u2AB0\u0338","Nscr;":"\u{1D4A9}","nscr;":"\u{1D4C3}","nshortmid;":"\u2224","nshortparallel;":"\u2226","nsim;":"\u2241","nsime;":"\u2244","nsimeq;":"\u2244","nsmid;":"\u2224","nspar;":"\u2226","nsqsube;":"\u22E2","nsqsupe;":"\u22E3","nsub;":"\u2284","nsubE;":"\u2AC5\u0338","nsube;":"\u2288","nsubset;":"\u2282\u20D2","nsubseteq;":"\u2288","nsubseteqq;":"\u2AC5\u0338","nsucc;":"\u2281","nsucceq;":"\u2AB0\u0338","nsup;":"\u2285","nsupE;":"\u2AC6\u0338","nsupe;":"\u2289","nsupset;":"\u2283\u20D2","nsupseteq;":"\u2289","nsupseteqq;":"\u2AC6\u0338","ntgl;":"\u2279","Ntilde;":"\xD1",Ntilde:"\xD1","ntilde;":"\xF1",ntilde:"\xF1","ntlg;":"\u2278","ntriangleleft;":"\u22EA","ntrianglelefteq;":"\u22EC","ntriangleright;":"\u22EB","ntrianglerighteq;":"\u22ED","Nu;":"\u039D","nu;":"\u03BD","num;":"#","numero;":"\u2116","numsp;":"\u2007","nvap;":"\u224D\u20D2","nVDash;":"\u22AF","nVdash;":"\u22AE","nvDash;":"\u22AD","nvdash;":"\u22AC","nvge;":"\u2265\u20D2","nvgt;":">\u20D2","nvHarr;":"\u2904","nvinfin;":"\u29DE","nvlArr;":"\u2902","nvle;":"\u2264\u20D2","nvlt;":"<\u20D2","nvltrie;":"\u22B4\u20D2","nvrArr;":"\u2903","nvrtrie;":"\u22B5\u20D2","nvsim;":"\u223C\u20D2","nwarhk;":"\u2923","nwArr;":"\u21D6","nwarr;":"\u2196","nwarrow;":"\u2196","nwnear;":"\u2927","Oacute;":"\xD3",Oacute:"\xD3","oacute;":"\xF3",oacute:"\xF3","oast;":"\u229B","ocir;":"\u229A","Ocirc;":"\xD4",Ocirc:"\xD4","ocirc;":"\xF4",ocirc:"\xF4","Ocy;":"\u041E","ocy;":"\u043E","odash;":"\u229D","Odblac;":"\u0150","odblac;":"\u0151","odiv;":"\u2A38","odot;":"\u2299","odsold;":"\u29BC","OElig;":"\u0152","oelig;":"\u0153","ofcir;":"\u29BF","Ofr;":"\u{1D512}","ofr;":"\u{1D52C}","ogon;":"\u02DB","Ograve;":"\xD2",Ograve:"\xD2","ograve;":"\xF2",ograve:"\xF2","ogt;":"\u29C1","ohbar;":"\u29B5","ohm;":"\u03A9","oint;":"\u222E","olarr;":"\u21BA","olcir;":"\u29BE","olcross;":"\u29BB","oline;":"\u203E","olt;":"\u29C0","Omacr;":"\u014C","omacr;":"\u014D","Omega;":"\u03A9","omega;":"\u03C9","Omicron;":"\u039F","omicron;":"\u03BF","omid;":"\u29B6","ominus;":"\u2296","Oopf;":"\u{1D546}","oopf;":"\u{1D560}","opar;":"\u29B7","OpenCurlyDoubleQuote;":"\u201C","OpenCurlyQuote;":"\u2018","operp;":"\u29B9","oplus;":"\u2295","Or;":"\u2A54","or;":"\u2228","orarr;":"\u21BB","ord;":"\u2A5D","order;":"\u2134","orderof;":"\u2134","ordf;":"\xAA",ordf:"\xAA","ordm;":"\xBA",ordm:"\xBA","origof;":"\u22B6","oror;":"\u2A56","orslope;":"\u2A57","orv;":"\u2A5B","oS;":"\u24C8","Oscr;":"\u{1D4AA}","oscr;":"\u2134","Oslash;":"\xD8",Oslash:"\xD8","oslash;":"\xF8",oslash:"\xF8","osol;":"\u2298","Otilde;":"\xD5",Otilde:"\xD5","otilde;":"\xF5",otilde:"\xF5","Otimes;":"\u2A37","otimes;":"\u2297","otimesas;":"\u2A36","Ouml;":"\xD6",Ouml:"\xD6","ouml;":"\xF6",ouml:"\xF6","ovbar;":"\u233D","OverBar;":"\u203E","OverBrace;":"\u23DE","OverBracket;":"\u23B4","OverParenthesis;":"\u23DC","par;":"\u2225","para;":"\xB6",para:"\xB6","parallel;":"\u2225","parsim;":"\u2AF3","parsl;":"\u2AFD","part;":"\u2202","PartialD;":"\u2202","Pcy;":"\u041F","pcy;":"\u043F","percnt;":"%","period;":".","permil;":"\u2030","perp;":"\u22A5","pertenk;":"\u2031","Pfr;":"\u{1D513}","pfr;":"\u{1D52D}","Phi;":"\u03A6","phi;":"\u03C6","phiv;":"\u03D5","phmmat;":"\u2133","phone;":"\u260E","Pi;":"\u03A0","pi;":"\u03C0","pitchfork;":"\u22D4","piv;":"\u03D6","planck;":"\u210F","planckh;":"\u210E","plankv;":"\u210F","plus;":"+","plusacir;":"\u2A23","plusb;":"\u229E","pluscir;":"\u2A22","plusdo;":"\u2214","plusdu;":"\u2A25","pluse;":"\u2A72","PlusMinus;":"\xB1","plusmn;":"\xB1",plusmn:"\xB1","plussim;":"\u2A26","plustwo;":"\u2A27","pm;":"\xB1","Poincareplane;":"\u210C","pointint;":"\u2A15","Popf;":"\u2119","popf;":"\u{1D561}","pound;":"\xA3",pound:"\xA3","Pr;":"\u2ABB","pr;":"\u227A","prap;":"\u2AB7","prcue;":"\u227C","prE;":"\u2AB3","pre;":"\u2AAF","prec;":"\u227A","precapprox;":"\u2AB7","preccurlyeq;":"\u227C","Precedes;":"\u227A","PrecedesEqual;":"\u2AAF","PrecedesSlantEqual;":"\u227C","PrecedesTilde;":"\u227E","preceq;":"\u2AAF","precnapprox;":"\u2AB9","precneqq;":"\u2AB5","precnsim;":"\u22E8","precsim;":"\u227E","Prime;":"\u2033","prime;":"\u2032","primes;":"\u2119","prnap;":"\u2AB9","prnE;":"\u2AB5","prnsim;":"\u22E8","prod;":"\u220F","Product;":"\u220F","profalar;":"\u232E","profline;":"\u2312","profsurf;":"\u2313","prop;":"\u221D","Proportion;":"\u2237","Proportional;":"\u221D","propto;":"\u221D","prsim;":"\u227E","prurel;":"\u22B0","Pscr;":"\u{1D4AB}","pscr;":"\u{1D4C5}","Psi;":"\u03A8","psi;":"\u03C8","puncsp;":"\u2008","Qfr;":"\u{1D514}","qfr;":"\u{1D52E}","qint;":"\u2A0C","Qopf;":"\u211A","qopf;":"\u{1D562}","qprime;":"\u2057","Qscr;":"\u{1D4AC}","qscr;":"\u{1D4C6}","quaternions;":"\u210D","quatint;":"\u2A16","quest;":"?","questeq;":"\u225F","QUOT;":'"',QUOT:'"',"quot;":'"',quot:'"',"rAarr;":"\u21DB","race;":"\u223D\u0331","Racute;":"\u0154","racute;":"\u0155","radic;":"\u221A","raemptyv;":"\u29B3","Rang;":"\u27EB","rang;":"\u27E9","rangd;":"\u2992","range;":"\u29A5","rangle;":"\u27E9","raquo;":"\xBB",raquo:"\xBB","Rarr;":"\u21A0","rArr;":"\u21D2","rarr;":"\u2192","rarrap;":"\u2975","rarrb;":"\u21E5","rarrbfs;":"\u2920","rarrc;":"\u2933","rarrfs;":"\u291E","rarrhk;":"\u21AA","rarrlp;":"\u21AC","rarrpl;":"\u2945","rarrsim;":"\u2974","Rarrtl;":"\u2916","rarrtl;":"\u21A3","rarrw;":"\u219D","rAtail;":"\u291C","ratail;":"\u291A","ratio;":"\u2236","rationals;":"\u211A","RBarr;":"\u2910","rBarr;":"\u290F","rbarr;":"\u290D","rbbrk;":"\u2773","rbrace;":"}","rbrack;":"]","rbrke;":"\u298C","rbrksld;":"\u298E","rbrkslu;":"\u2990","Rcaron;":"\u0158","rcaron;":"\u0159","Rcedil;":"\u0156","rcedil;":"\u0157","rceil;":"\u2309","rcub;":"}","Rcy;":"\u0420","rcy;":"\u0440","rdca;":"\u2937","rdldhar;":"\u2969","rdquo;":"\u201D","rdquor;":"\u201D","rdsh;":"\u21B3","Re;":"\u211C","real;":"\u211C","realine;":"\u211B","realpart;":"\u211C","reals;":"\u211D","rect;":"\u25AD","REG;":"\xAE",REG:"\xAE","reg;":"\xAE",reg:"\xAE","ReverseElement;":"\u220B","ReverseEquilibrium;":"\u21CB","ReverseUpEquilibrium;":"\u296F","rfisht;":"\u297D","rfloor;":"\u230B","Rfr;":"\u211C","rfr;":"\u{1D52F}","rHar;":"\u2964","rhard;":"\u21C1","rharu;":"\u21C0","rharul;":"\u296C","Rho;":"\u03A1","rho;":"\u03C1","rhov;":"\u03F1","RightAngleBracket;":"\u27E9","RightArrow;":"\u2192","Rightarrow;":"\u21D2","rightarrow;":"\u2192","RightArrowBar;":"\u21E5","RightArrowLeftArrow;":"\u21C4","rightarrowtail;":"\u21A3","RightCeiling;":"\u2309","RightDoubleBracket;":"\u27E7","RightDownTeeVector;":"\u295D","RightDownVector;":"\u21C2","RightDownVectorBar;":"\u2955","RightFloor;":"\u230B","rightharpoondown;":"\u21C1","rightharpoonup;":"\u21C0","rightleftarrows;":"\u21C4","rightleftharpoons;":"\u21CC","rightrightarrows;":"\u21C9","rightsquigarrow;":"\u219D","RightTee;":"\u22A2","RightTeeArrow;":"\u21A6","RightTeeVector;":"\u295B","rightthreetimes;":"\u22CC","RightTriangle;":"\u22B3","RightTriangleBar;":"\u29D0","RightTriangleEqual;":"\u22B5","RightUpDownVector;":"\u294F","RightUpTeeVector;":"\u295C","RightUpVector;":"\u21BE","RightUpVectorBar;":"\u2954","RightVector;":"\u21C0","RightVectorBar;":"\u2953","ring;":"\u02DA","risingdotseq;":"\u2253","rlarr;":"\u21C4","rlhar;":"\u21CC","rlm;":"\u200F","rmoust;":"\u23B1","rmoustache;":"\u23B1","rnmid;":"\u2AEE","roang;":"\u27ED","roarr;":"\u21FE","robrk;":"\u27E7","ropar;":"\u2986","Ropf;":"\u211D","ropf;":"\u{1D563}","roplus;":"\u2A2E","rotimes;":"\u2A35","RoundImplies;":"\u2970","rpar;":")","rpargt;":"\u2994","rppolint;":"\u2A12","rrarr;":"\u21C9","Rrightarrow;":"\u21DB","rsaquo;":"\u203A","Rscr;":"\u211B","rscr;":"\u{1D4C7}","Rsh;":"\u21B1","rsh;":"\u21B1","rsqb;":"]","rsquo;":"\u2019","rsquor;":"\u2019","rthree;":"\u22CC","rtimes;":"\u22CA","rtri;":"\u25B9","rtrie;":"\u22B5","rtrif;":"\u25B8","rtriltri;":"\u29CE","RuleDelayed;":"\u29F4","ruluhar;":"\u2968","rx;":"\u211E","Sacute;":"\u015A","sacute;":"\u015B","sbquo;":"\u201A","Sc;":"\u2ABC","sc;":"\u227B","scap;":"\u2AB8","Scaron;":"\u0160","scaron;":"\u0161","sccue;":"\u227D","scE;":"\u2AB4","sce;":"\u2AB0","Scedil;":"\u015E","scedil;":"\u015F","Scirc;":"\u015C","scirc;":"\u015D","scnap;":"\u2ABA","scnE;":"\u2AB6","scnsim;":"\u22E9","scpolint;":"\u2A13","scsim;":"\u227F","Scy;":"\u0421","scy;":"\u0441","sdot;":"\u22C5","sdotb;":"\u22A1","sdote;":"\u2A66","searhk;":"\u2925","seArr;":"\u21D8","searr;":"\u2198","searrow;":"\u2198","sect;":"\xA7",sect:"\xA7","semi;":";","seswar;":"\u2929","setminus;":"\u2216","setmn;":"\u2216","sext;":"\u2736","Sfr;":"\u{1D516}","sfr;":"\u{1D530}","sfrown;":"\u2322","sharp;":"\u266F","SHCHcy;":"\u0429","shchcy;":"\u0449","SHcy;":"\u0428","shcy;":"\u0448","ShortDownArrow;":"\u2193","ShortLeftArrow;":"\u2190","shortmid;":"\u2223","shortparallel;":"\u2225","ShortRightArrow;":"\u2192","ShortUpArrow;":"\u2191","shy;":"\xAD",shy:"\xAD","Sigma;":"\u03A3","sigma;":"\u03C3","sigmaf;":"\u03C2","sigmav;":"\u03C2","sim;":"\u223C","simdot;":"\u2A6A","sime;":"\u2243","simeq;":"\u2243","simg;":"\u2A9E","simgE;":"\u2AA0","siml;":"\u2A9D","simlE;":"\u2A9F","simne;":"\u2246","simplus;":"\u2A24","simrarr;":"\u2972","slarr;":"\u2190","SmallCircle;":"\u2218","smallsetminus;":"\u2216","smashp;":"\u2A33","smeparsl;":"\u29E4","smid;":"\u2223","smile;":"\u2323","smt;":"\u2AAA","smte;":"\u2AAC","smtes;":"\u2AAC\uFE00","SOFTcy;":"\u042C","softcy;":"\u044C","sol;":"/","solb;":"\u29C4","solbar;":"\u233F","Sopf;":"\u{1D54A}","sopf;":"\u{1D564}","spades;":"\u2660","spadesuit;":"\u2660","spar;":"\u2225","sqcap;":"\u2293","sqcaps;":"\u2293\uFE00","sqcup;":"\u2294","sqcups;":"\u2294\uFE00","Sqrt;":"\u221A","sqsub;":"\u228F","sqsube;":"\u2291","sqsubset;":"\u228F","sqsubseteq;":"\u2291","sqsup;":"\u2290","sqsupe;":"\u2292","sqsupset;":"\u2290","sqsupseteq;":"\u2292","squ;":"\u25A1","Square;":"\u25A1","square;":"\u25A1","SquareIntersection;":"\u2293","SquareSubset;":"\u228F","SquareSubsetEqual;":"\u2291","SquareSuperset;":"\u2290","SquareSupersetEqual;":"\u2292","SquareUnion;":"\u2294","squarf;":"\u25AA","squf;":"\u25AA","srarr;":"\u2192","Sscr;":"\u{1D4AE}","sscr;":"\u{1D4C8}","ssetmn;":"\u2216","ssmile;":"\u2323","sstarf;":"\u22C6","Star;":"\u22C6","star;":"\u2606","starf;":"\u2605","straightepsilon;":"\u03F5","straightphi;":"\u03D5","strns;":"\xAF","Sub;":"\u22D0","sub;":"\u2282","subdot;":"\u2ABD","subE;":"\u2AC5","sube;":"\u2286","subedot;":"\u2AC3","submult;":"\u2AC1","subnE;":"\u2ACB","subne;":"\u228A","subplus;":"\u2ABF","subrarr;":"\u2979","Subset;":"\u22D0","subset;":"\u2282","subseteq;":"\u2286","subseteqq;":"\u2AC5","SubsetEqual;":"\u2286","subsetneq;":"\u228A","subsetneqq;":"\u2ACB","subsim;":"\u2AC7","subsub;":"\u2AD5","subsup;":"\u2AD3","succ;":"\u227B","succapprox;":"\u2AB8","succcurlyeq;":"\u227D","Succeeds;":"\u227B","SucceedsEqual;":"\u2AB0","SucceedsSlantEqual;":"\u227D","SucceedsTilde;":"\u227F","succeq;":"\u2AB0","succnapprox;":"\u2ABA","succneqq;":"\u2AB6","succnsim;":"\u22E9","succsim;":"\u227F","SuchThat;":"\u220B","Sum;":"\u2211","sum;":"\u2211","sung;":"\u266A","Sup;":"\u22D1","sup;":"\u2283","sup1;":"\xB9",sup1:"\xB9","sup2;":"\xB2",sup2:"\xB2","sup3;":"\xB3",sup3:"\xB3","supdot;":"\u2ABE","supdsub;":"\u2AD8","supE;":"\u2AC6","supe;":"\u2287","supedot;":"\u2AC4","Superset;":"\u2283","SupersetEqual;":"\u2287","suphsol;":"\u27C9","suphsub;":"\u2AD7","suplarr;":"\u297B","supmult;":"\u2AC2","supnE;":"\u2ACC","supne;":"\u228B","supplus;":"\u2AC0","Supset;":"\u22D1","supset;":"\u2283","supseteq;":"\u2287","supseteqq;":"\u2AC6","supsetneq;":"\u228B","supsetneqq;":"\u2ACC","supsim;":"\u2AC8","supsub;":"\u2AD4","supsup;":"\u2AD6","swarhk;":"\u2926","swArr;":"\u21D9","swarr;":"\u2199","swarrow;":"\u2199","swnwar;":"\u292A","szlig;":"\xDF",szlig:"\xDF","Tab;":" ","target;":"\u2316","Tau;":"\u03A4","tau;":"\u03C4","tbrk;":"\u23B4","Tcaron;":"\u0164","tcaron;":"\u0165","Tcedil;":"\u0162","tcedil;":"\u0163","Tcy;":"\u0422","tcy;":"\u0442","tdot;":"\u20DB","telrec;":"\u2315","Tfr;":"\u{1D517}","tfr;":"\u{1D531}","there4;":"\u2234","Therefore;":"\u2234","therefore;":"\u2234","Theta;":"\u0398","theta;":"\u03B8","thetasym;":"\u03D1","thetav;":"\u03D1","thickapprox;":"\u2248","thicksim;":"\u223C","ThickSpace;":"\u205F\u200A","thinsp;":"\u2009","ThinSpace;":"\u2009","thkap;":"\u2248","thksim;":"\u223C","THORN;":"\xDE",THORN:"\xDE","thorn;":"\xFE",thorn:"\xFE","Tilde;":"\u223C","tilde;":"\u02DC","TildeEqual;":"\u2243","TildeFullEqual;":"\u2245","TildeTilde;":"\u2248","times;":"\xD7",times:"\xD7","timesb;":"\u22A0","timesbar;":"\u2A31","timesd;":"\u2A30","tint;":"\u222D","toea;":"\u2928","top;":"\u22A4","topbot;":"\u2336","topcir;":"\u2AF1","Topf;":"\u{1D54B}","topf;":"\u{1D565}","topfork;":"\u2ADA","tosa;":"\u2929","tprime;":"\u2034","TRADE;":"\u2122","trade;":"\u2122","triangle;":"\u25B5","triangledown;":"\u25BF","triangleleft;":"\u25C3","trianglelefteq;":"\u22B4","triangleq;":"\u225C","triangleright;":"\u25B9","trianglerighteq;":"\u22B5","tridot;":"\u25EC","trie;":"\u225C","triminus;":"\u2A3A","TripleDot;":"\u20DB","triplus;":"\u2A39","trisb;":"\u29CD","tritime;":"\u2A3B","trpezium;":"\u23E2","Tscr;":"\u{1D4AF}","tscr;":"\u{1D4C9}","TScy;":"\u0426","tscy;":"\u0446","TSHcy;":"\u040B","tshcy;":"\u045B","Tstrok;":"\u0166","tstrok;":"\u0167","twixt;":"\u226C","twoheadleftarrow;":"\u219E","twoheadrightarrow;":"\u21A0","Uacute;":"\xDA",Uacute:"\xDA","uacute;":"\xFA",uacute:"\xFA","Uarr;":"\u219F","uArr;":"\u21D1","uarr;":"\u2191","Uarrocir;":"\u2949","Ubrcy;":"\u040E","ubrcy;":"\u045E","Ubreve;":"\u016C","ubreve;":"\u016D","Ucirc;":"\xDB",Ucirc:"\xDB","ucirc;":"\xFB",ucirc:"\xFB","Ucy;":"\u0423","ucy;":"\u0443","udarr;":"\u21C5","Udblac;":"\u0170","udblac;":"\u0171","udhar;":"\u296E","ufisht;":"\u297E","Ufr;":"\u{1D518}","ufr;":"\u{1D532}","Ugrave;":"\xD9",Ugrave:"\xD9","ugrave;":"\xF9",ugrave:"\xF9","uHar;":"\u2963","uharl;":"\u21BF","uharr;":"\u21BE","uhblk;":"\u2580","ulcorn;":"\u231C","ulcorner;":"\u231C","ulcrop;":"\u230F","ultri;":"\u25F8","Umacr;":"\u016A","umacr;":"\u016B","uml;":"\xA8",uml:"\xA8","UnderBar;":"_","UnderBrace;":"\u23DF","UnderBracket;":"\u23B5","UnderParenthesis;":"\u23DD","Union;":"\u22C3","UnionPlus;":"\u228E","Uogon;":"\u0172","uogon;":"\u0173","Uopf;":"\u{1D54C}","uopf;":"\u{1D566}","UpArrow;":"\u2191","Uparrow;":"\u21D1","uparrow;":"\u2191","UpArrowBar;":"\u2912","UpArrowDownArrow;":"\u21C5","UpDownArrow;":"\u2195","Updownarrow;":"\u21D5","updownarrow;":"\u2195","UpEquilibrium;":"\u296E","upharpoonleft;":"\u21BF","upharpoonright;":"\u21BE","uplus;":"\u228E","UpperLeftArrow;":"\u2196","UpperRightArrow;":"\u2197","Upsi;":"\u03D2","upsi;":"\u03C5","upsih;":"\u03D2","Upsilon;":"\u03A5","upsilon;":"\u03C5","UpTee;":"\u22A5","UpTeeArrow;":"\u21A5","upuparrows;":"\u21C8","urcorn;":"\u231D","urcorner;":"\u231D","urcrop;":"\u230E","Uring;":"\u016E","uring;":"\u016F","urtri;":"\u25F9","Uscr;":"\u{1D4B0}","uscr;":"\u{1D4CA}","utdot;":"\u22F0","Utilde;":"\u0168","utilde;":"\u0169","utri;":"\u25B5","utrif;":"\u25B4","uuarr;":"\u21C8","Uuml;":"\xDC",Uuml:"\xDC","uuml;":"\xFC",uuml:"\xFC","uwangle;":"\u29A7","vangrt;":"\u299C","varepsilon;":"\u03F5","varkappa;":"\u03F0","varnothing;":"\u2205","varphi;":"\u03D5","varpi;":"\u03D6","varpropto;":"\u221D","vArr;":"\u21D5","varr;":"\u2195","varrho;":"\u03F1","varsigma;":"\u03C2","varsubsetneq;":"\u228A\uFE00","varsubsetneqq;":"\u2ACB\uFE00","varsupsetneq;":"\u228B\uFE00","varsupsetneqq;":"\u2ACC\uFE00","vartheta;":"\u03D1","vartriangleleft;":"\u22B2","vartriangleright;":"\u22B3","Vbar;":"\u2AEB","vBar;":"\u2AE8","vBarv;":"\u2AE9","Vcy;":"\u0412","vcy;":"\u0432","VDash;":"\u22AB","Vdash;":"\u22A9","vDash;":"\u22A8","vdash;":"\u22A2","Vdashl;":"\u2AE6","Vee;":"\u22C1","vee;":"\u2228","veebar;":"\u22BB","veeeq;":"\u225A","vellip;":"\u22EE","Verbar;":"\u2016","verbar;":"|","Vert;":"\u2016","vert;":"|","VerticalBar;":"\u2223","VerticalLine;":"|","VerticalSeparator;":"\u2758","VerticalTilde;":"\u2240","VeryThinSpace;":"\u200A","Vfr;":"\u{1D519}","vfr;":"\u{1D533}","vltri;":"\u22B2","vnsub;":"\u2282\u20D2","vnsup;":"\u2283\u20D2","Vopf;":"\u{1D54D}","vopf;":"\u{1D567}","vprop;":"\u221D","vrtri;":"\u22B3","Vscr;":"\u{1D4B1}","vscr;":"\u{1D4CB}","vsubnE;":"\u2ACB\uFE00","vsubne;":"\u228A\uFE00","vsupnE;":"\u2ACC\uFE00","vsupne;":"\u228B\uFE00","Vvdash;":"\u22AA","vzigzag;":"\u299A","Wcirc;":"\u0174","wcirc;":"\u0175","wedbar;":"\u2A5F","Wedge;":"\u22C0","wedge;":"\u2227","wedgeq;":"\u2259","weierp;":"\u2118","Wfr;":"\u{1D51A}","wfr;":"\u{1D534}","Wopf;":"\u{1D54E}","wopf;":"\u{1D568}","wp;":"\u2118","wr;":"\u2240","wreath;":"\u2240","Wscr;":"\u{1D4B2}","wscr;":"\u{1D4CC}","xcap;":"\u22C2","xcirc;":"\u25EF","xcup;":"\u22C3","xdtri;":"\u25BD","Xfr;":"\u{1D51B}","xfr;":"\u{1D535}","xhArr;":"\u27FA","xharr;":"\u27F7","Xi;":"\u039E","xi;":"\u03BE","xlArr;":"\u27F8","xlarr;":"\u27F5","xmap;":"\u27FC","xnis;":"\u22FB","xodot;":"\u2A00","Xopf;":"\u{1D54F}","xopf;":"\u{1D569}","xoplus;":"\u2A01","xotime;":"\u2A02","xrArr;":"\u27F9","xrarr;":"\u27F6","Xscr;":"\u{1D4B3}","xscr;":"\u{1D4CD}","xsqcup;":"\u2A06","xuplus;":"\u2A04","xutri;":"\u25B3","xvee;":"\u22C1","xwedge;":"\u22C0","Yacute;":"\xDD",Yacute:"\xDD","yacute;":"\xFD",yacute:"\xFD","YAcy;":"\u042F","yacy;":"\u044F","Ycirc;":"\u0176","ycirc;":"\u0177","Ycy;":"\u042B","ycy;":"\u044B","yen;":"\xA5",yen:"\xA5","Yfr;":"\u{1D51C}","yfr;":"\u{1D536}","YIcy;":"\u0407","yicy;":"\u0457","Yopf;":"\u{1D550}","yopf;":"\u{1D56A}","Yscr;":"\u{1D4B4}","yscr;":"\u{1D4CE}","YUcy;":"\u042E","yucy;":"\u044E","Yuml;":"\u0178","yuml;":"\xFF",yuml:"\xFF","Zacute;":"\u0179","zacute;":"\u017A","Zcaron;":"\u017D","zcaron;":"\u017E","Zcy;":"\u0417","zcy;":"\u0437","Zdot;":"\u017B","zdot;":"\u017C","zeetrf;":"\u2128","ZeroWidthSpace;":"\u200B","Zeta;":"\u0396","zeta;":"\u03B6","Zfr;":"\u2128","zfr;":"\u{1D537}","ZHcy;":"\u0416","zhcy;":"\u0436","zigrarr;":"\u21DD","Zopf;":"\u2124","zopf;":"\u{1D56B}","Zscr;":"\u{1D4B5}","zscr;":"\u{1D4CF}","zwj;":"\u200D","zwnj;":"\u200C"};function xe(e,t){if(e.length0?e.lastIndexOf(t)===n:n===0?e===t:!1}function ar(e,t){for(var n="";t>0;)(t&1)===1&&(n+=e),e+=e,t=t>>>1;return n}var Oa="a".charCodeAt(0),ja="z".charCodeAt(0),Ga="A".charCodeAt(0),Va="Z".charCodeAt(0),Ya="0".charCodeAt(0),$a="9".charCodeAt(0);function it(e,t){var n=e.charCodeAt(t);return Oa<=n&&n<=ja||Ga<=n&&n<=Va||Ya<=n&&n<=$a}function Lt(e){return typeof e!="undefined"}function Xa(e){if(!!e)return typeof e=="string"?{kind:"markdown",value:e}:{kind:"markdown",value:e.value}}var sr=function(){function e(t,n){var r=this;this.id=t,this._tags=[],this._tagMap={},this._valueSetMap={},this._tags=n.tags||[],this._globalAttributes=n.globalAttributes||[],this._tags.forEach(function(i){r._tagMap[i.name.toLowerCase()]=i}),n.valueSets&&n.valueSets.forEach(function(i){r._valueSetMap[i.name]=i.values})}return e.prototype.isApplicable=function(){return!0},e.prototype.getId=function(){return this.id},e.prototype.provideTags=function(){return this._tags},e.prototype.provideAttributes=function(t){var n=[],r=function(a){n.push(a)},i=this._tagMap[t.toLowerCase()];return i&&i.attributes.forEach(r),this._globalAttributes.forEach(r),n},e.prototype.provideValues=function(t,n){var r=this,i=[];n=n.toLowerCase();var a=function(u){u.forEach(function(s){s.name.toLowerCase()===n&&(s.values&&s.values.forEach(function(l){i.push(l)}),s.valueSet&&r._valueSetMap[s.valueSet]&&r._valueSetMap[s.valueSet].forEach(function(l){i.push(l)}))})},o=this._tagMap[t.toLowerCase()];return o&&a(o.attributes),a(this._globalAttributes),i},e}();function Ue(e,t,n){t===void 0&&(t={});var r={kind:n?"markdown":"plaintext",value:""};if(e.description&&t.documentation!==!1){var i=Xa(e.description);i&&(r.value+=i.value)}if(e.references&&e.references.length>0&&t.references!==!1&&(r.value.length&&(r.value+=` + +`),n?r.value+=e.references.map(function(a){return"["+a.name+"]("+a.url+")"}).join(" | "):r.value+=e.references.map(function(a){return a.name+": "+a.url}).join(` +`)),r.value!=="")return r}var or=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(h){try{l(r.next(h))}catch(c){o(c)}}function s(h){try{l(r.throw(h))}catch(c){o(c)}}function l(h){h.done?a(h.value):i(h.value).then(u,s)}l((r=r.apply(e,t||[])).next())})},lr=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(h){return s([l,h])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]h&&(x=h),{start:t.positionAt(x),end:t.positionAt(E)}}function T(x,E){var z=b(x,E);return u.forEach(function(j){j.provideTags().forEach(function(V){a.items.push({label:V.name,kind:ue.Property,documentation:Ue(V,void 0,s),textEdit:K.replace(z,V.name),insertTextFormat:ge.PlainText})})}),a}function k(x){for(var E=x;E>0;){var z=l.charAt(E-1);if(` +\r`.indexOf(z)>=0)return l.substring(E,x);if(!Ct(z))return null;E--}return l.substring(0,x)}function f(x,E,z){z===void 0&&(z=h);var j=b(x,z),V=ur(l,z,F.WithinEndTag,M.EndTagClose)?"":">",Y=c;for(E&&(Y=Y.parent);Y;){var $=Y.tag;if($&&(!Y.closed||Y.endTagStart&&Y.endTagStart>h)){var He={label:"/"+$,kind:ue.Property,filterText:"/"+$,textEdit:K.replace(j,"/"+$+V),insertTextFormat:ge.PlainText},se=k(Y.start),_e=k(x-1);if(se!==null&&_e!==null&&se!==_e){var Ge=se+"",kind:ue.Property,filterText:"",textEdit:K.insert(z,"$0"),insertTextFormat:ge.Snippet})}return a}function A(x,E){return T(x,E),f(x,!0,E),a}function D(){var x=Object.create(null);return c.attributeNames.forEach(function(E){x[E]=!0}),x}function H(x,E){E===void 0&&(E=h);for(var z=h;zx&&h<=E&&us(l[x])){var Y=x+1,$=E;E>x&&l[E-1]===l[x]&&$--;var He=hs(l,h,Y),se=cs(l,h,$);z=b(He,se),V=h>=Y&&h<=$?l.substring(Y,h):"",j=!1}else z=b(x,E),V=l.substring(x,h),j=!0;if(o.length>0)for(var _e=p.toLowerCase(),Ge=_.toLowerCase(),pn=b(x,E),De=0,yr=o;De=0&&it(l,x);)x--,E--;if(x>=0&&l[x]==="&"){var z=G.create(ne.create(n.line,E-1),n);for(var j in nt)if(qa(j,";")){var V="&"+j;a.items.push({label:V,kind:ue.Keyword,documentation:os("entity.propose","Character entity representing '"+nt[j]+"'"),textEdit:K.replace(z,V),insertTextFormat:ge.PlainText})}}return a}function N(x,E){var z=b(x,E);a.items.push({label:"!DOCTYPE",kind:ue.Property,documentation:"A preamble for an HTML document.",textEdit:K.replace(z,"!DOCTYPE html>"),insertTextFormat:ge.PlainText})}for(var I=d.scan();I!==M.EOS&&d.getTokenOffset()<=h;){switch(I){case M.StartTagOpen:if(d.getTokenEnd()===h){var P=w(M.StartTag);return n.line===0&&N(h,P),A(h,P)}break;case M.StartTag:if(d.getTokenOffset()<=h&&h<=d.getTokenEnd())return T(d.getTokenOffset(),d.getTokenEnd());p=d.getTokenText();break;case M.AttributeName:if(d.getTokenOffset()<=h&&h<=d.getTokenEnd())return H(d.getTokenOffset(),d.getTokenEnd());_=d.getTokenText();break;case M.DelimiterAssign:if(d.getTokenEnd()===h){var P=w(M.AttributeValue);return m(h,P)}break;case M.AttributeValue:if(d.getTokenOffset()<=h&&h<=d.getTokenEnd())return m(d.getTokenOffset(),d.getTokenEnd());break;case M.Whitespace:if(h<=d.getTokenEnd())switch(d.getScannerState()){case F.AfterOpeningStartTag:var W=d.getTokenOffset(),L=w(M.StartTag);return A(W,L);case F.WithinTag:case F.AfterAttributeName:return H(d.getTokenEnd());case F.BeforeAttributeValue:return m(d.getTokenEnd());case F.AfterOpeningEndTag:return f(d.getTokenOffset()-1,!1);case F.WithinContent:return B()}break;case M.EndTagOpen:if(h<=d.getTokenEnd()){var y=d.getTokenOffset()+1,C=w(M.EndTag);return f(y,!1,C)}break;case M.EndTag:if(h<=d.getTokenEnd())for(var U=d.getTokenOffset()-1;U>=0;){var q=l.charAt(U);if(q==="/")return f(U,!1,d.getTokenEnd());if(!Ct(q))break;U--}break;case M.StartTagClose:if(h<=d.getTokenEnd()&&p)return v(d.getTokenEnd(),p);break;case M.Content:if(h<=d.getTokenEnd())return B();break;default:if(h<=d.getTokenEnd())return a;break}I=d.scan()}return a},e.prototype.doTagComplete=function(t,n,r){var i=t.offsetAt(n);if(i<=0)return null;var a=t.getText().charAt(i-1);if(a===">"){var o=r.findNodeBefore(i);if(o&&o.tag&&!At(o.tag)&&o.starti))for(var u=de(t.getText(),o.start),s=u.scan();s!==M.EOS&&u.getTokenEnd()<=i;){if(s===M.StartTagClose&&u.getTokenEnd()===i)return"$0";s=u.scan()}}else if(a==="/"){for(var o=r.findNodeBefore(i);o&&o.closed&&!(o.endTagStart&&o.endTagStart>i);)o=o.parent;if(o&&o.tag)for(var u=de(t.getText(),o.start),s=u.scan();s!==M.EOS&&u.getTokenEnd()<=i;){if(s===M.EndTagOpen&&u.getTokenEnd()===i)return o.tag+">";s=u.scan()}}return null},e.prototype.convertCompletionList=function(t){return this.doesSupportMarkdown()||t.items.forEach(function(n){n.documentation&&typeof n.documentation!="string"&&(n.documentation={kind:"plaintext",value:n.documentation.value})}),t},e.prototype.doesSupportMarkdown=function(){var t,n,r;if(!Lt(this.supportsMarkdown)){if(!Lt(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var i=(r=(n=(t=this.lsOptions.clientCapabilities.textDocument)===null||t===void 0?void 0:t.completion)===null||n===void 0?void 0:n.completionItem)===null||r===void 0?void 0:r.documentationFormat;this.supportsMarkdown=Array.isArray(i)&&i.indexOf(pe.Markdown)!==-1}return this.supportsMarkdown},e}();function us(e){return/^["']*$/.test(e)}function Ct(e){return/^\s*$/.test(e)}function ur(e,t,n,r){for(var i=de(e,t,n),a=i.scan();a===M.Whitespace;)a=i.scan();return a===r}function hs(e,t,n){for(;t>n&&!Ct(e[t-1]);)t--;return t}function cs(e,t,n){for(;t=0&&it(l,N);)N--,I--;for(var P=N+1,W=I;it(l,P);)P++,W++;if(N>=0&&l[N]==="&"){var L=null;return l[P]===";"?L=G.create(ne.create(n.line,I),ne.create(n.line,W+1)):L=G.create(ne.create(n.line,I),ne.create(n.line,W)),L}return null}function k(N){for(var I=u-1,P="&";I>=0&&it(N,I);)I--;for(I=I+1;it(N,I);)P+=N[I],I+=1;return P+=";",P}if(s.endTagStart&&u>=s.endTagStart){var f=b(M.EndTag,s.endTagStart);return f?c(s.tag,f):null}var v=b(M.StartTag,s.start);if(v)return c(s.tag,v);var A=b(M.AttributeName,s.start);if(A){var D=s.tag,H=t.getText(A);return d(D,H,A)}var g=T();if(g)return _(l,g);function m(N,I){for(var P=de(t.getText(),N),W=P.scan(),L=void 0;W!==M.EOS&&P.getTokenEnd()<=I;)W=P.scan(),W===M.AttributeName&&(L=P.getTokenText());return L}var w=b(M.AttributeValue,s.start);if(w){var D=s.tag,B=fs(t.getText(w)),R=m(s.start,t.offsetAt(w.start));if(R)return p(D,R,B,w)}return null},e.prototype.convertContents=function(t){if(!this.doesSupportMarkdown()){if(typeof t=="string")return t;if("kind"in t)return{kind:"plaintext",value:t.value};if(Array.isArray(t))t.map(function(n){return typeof n=="string"?n:n.value});else return t.value}return t},e.prototype.doesSupportMarkdown=function(){var t,n,r;if(!Lt(this.supportsMarkdown)){if(!Lt(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var i=(r=(n=(t=this.lsOptions.clientCapabilities)===null||t===void 0?void 0:t.textDocument)===null||n===void 0?void 0:n.hover)===null||r===void 0?void 0:r.contentFormat;this.supportsMarkdown=Array.isArray(i)&&i.indexOf(pe.Markdown)!==-1}return this.supportsMarkdown},e}();function fs(e){return e.length<=1?e.replace(/['"]/,""):((e[0]==="'"||e[0]==='"')&&(e=e.slice(1)),(e[e.length-1]==="'"||e[e.length-1]==='"')&&(e=e.slice(0,-1)),e)}function ps(e,t){return e}var hr;(function(){var e=[,,function(i){function a(s){this.__parent=s,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}a.prototype.clone_empty=function(){var s=new a(this.__parent);return s.set_indent(this.__indent_count,this.__alignment_count),s},a.prototype.item=function(s){return s<0?this.__items[this.__items.length+s]:this.__items[s]},a.prototype.has_match=function(s){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(s))return!0;return!1},a.prototype.set_indent=function(s,l){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},a.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},a.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},a.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},a.prototype.is_empty=function(){return this.__items.length===0},a.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},a.prototype.push=function(s){this.__items.push(s);var l=s.lastIndexOf(` +`);l!==-1?this.__character_count=s.length-l:this.__character_count+=s.length},a.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},a.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},a.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},a.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},a.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function o(s,l){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),l=l||"",s.indent_level>0&&(l=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}o.prototype.get_indent_size=function(s,l){var h=this.__base_string_length;return l=l||0,s<0&&(h=0),h+=s*this.__indent_size,h+=l,h},o.prototype.get_indent_string=function(s,l){var h=this.__base_string;return l=l||0,s<0&&(s=0,h=""),l+=s*this.__indent_size,this.__ensure_cache(l),h+=this.__cache[l],h},o.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var s=this.__cache.length,l=0,h="";this.__indent_size&&s>=this.__indent_size&&(l=Math.floor(s/this.__indent_size),s-=l*this.__indent_size,h=new Array(l+1).join(this.__indent_string)),s&&(h+=new Array(s+1).join(" ")),this.__cache.push(h)};function u(s,l){this.__indent_cache=new o(s,l),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new a(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(s,l){return this.__indent_cache.get_indent_string(s,l)},u.prototype.get_indent_size=function(s,l){return this.__indent_cache.get_indent_size(s,l)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(s){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` +`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` +`);return s!==` +`&&(h=h.replace(/[\n]/g,s)),h},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(s,l){return s=s||0,l=l||0,this.next_line.set_indent(s,l),this.__lines.length>1?(this.current_line.set_indent(s,l),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(s){for(var l=0;l1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(s,l){for(var h=this.__lines.length-2;h>=0;){var c=this.__lines[h];if(c.is_empty())break;if(c.item(0).indexOf(s)!==0&&c.item(-1)!==l){this.__lines.splice(h+1,0,new a(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},i.exports.Output=u},,,,function(i){function a(s,l){this.raw_options=o(s,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}a.prototype._get_array=function(s,l){var h=this.raw_options[s],c=l||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(c=h.concat()):typeof h=="string"&&(c=h.split(/[^a-zA-Z0-9_\/\-]+/)),c},a.prototype._get_boolean=function(s,l){var h=this.raw_options[s],c=h===void 0?!!l:!!h;return c},a.prototype._get_characters=function(s,l){var h=this.raw_options[s],c=l||"";return typeof h=="string"&&(c=h.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),c},a.prototype._get_number=function(s,l){var h=this.raw_options[s];l=parseInt(l,10),isNaN(l)&&(l=0);var c=parseInt(h,10);return isNaN(c)&&(c=l),c},a.prototype._get_selection=function(s,l,h){var c=this._get_selection_list(s,l,h);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values: +`+l+` +You passed in: '`+this.raw_options[s]+"'");return c[0]},a.prototype._get_selection_list=function(s,l,h){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[l[0]],!this._is_valid_selection(h,l))throw new Error("Invalid Default Value!");var c=this._get_array(s,h);if(!this._is_valid_selection(c,l))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values: +`+l+` +You passed in: '`+this.raw_options[s]+"'");return c},a.prototype._is_valid_selection=function(s,l){return s.length&&l.length&&!s.some(function(h){return l.indexOf(h)===-1})};function o(s,l){var h={};s=u(s);var c;for(c in s)c!==l&&(h[c]=s[c]);if(l&&s[l])for(c in s[l])h[c]=s[l][c];return h}function u(s){var l={},h;for(h in s){var c=h.replace(/-/g,"_");l[c]=s[h]}return l}i.exports.Options=a,i.exports.normalizeOpts=u,i.exports.mergeOpts=o},,function(i){var a=RegExp.prototype.hasOwnProperty("sticky");function o(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position=0&&u=0&&s=u.length&&this.__input.substring(s-u.length,s).toLowerCase()===u},i.exports.InputScanner=o},,,,,function(i){function a(o,u){o=typeof o=="string"?o:o.source,u=typeof u=="string"?u:u.source,this.__directives_block_pattern=new RegExp(o+/ beautify( \w+[:]\w+)+ /.source+u,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(o+/\sbeautify\signore:end\s/.source+u,"g")}a.prototype.get_directives=function(o){if(!o.match(this.__directives_block_pattern))return null;var u={};this.__directive_pattern.lastIndex=0;for(var s=this.__directive_pattern.exec(o);s;)u[s[1]]=s[2],s=this.__directive_pattern.exec(o);return u},a.prototype.readIgnored=function(o){return o.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=a},,function(i,a,o){var u=o(16).Beautifier,s=o(17).Options;function l(h,c){var d=new u(h,c);return d.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new s}},function(i,a,o){var u=o(17).Options,s=o(2).Output,l=o(8).InputScanner,h=o(13).Directives,c=new h(/\/\*/,/\*\//),d=/\r\n|[\r\n]/,p=/\r\n|[\r\n]/g,_=/\s/,b=/(?:\s|\n)+/g,T=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,k=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function f(v,A){this._source_text=v||"",this._options=new u(A),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}f.prototype.eatString=function(v){var A="";for(this._ch=this._input.next();this._ch;){if(A+=this._ch,this._ch==="\\")A+=this._input.next();else if(v.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return A},f.prototype.eatWhitespace=function(v){for(var A=_.test(this._input.peek()),D=0;_.test(this._input.peek());)this._ch=this._input.next(),v&&this._ch===` +`&&(D===0||D0&&this._indentLevel--},f.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var v=this._source_text,A=this._options.eol;A==="auto"&&(A=` +`,v&&d.test(v||"")&&(A=v.match(d)[0])),v=v.replace(p,` +`);var D=v.match(/^[\t ]*/)[0];this._output=new s(this._options,D),this._input=new l(v),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var H=0,g=!1,m=!1,w=!1,B=!1,R=!1,N=this._ch,I,P,W;I=this._input.read(b),P=I!=="",W=N,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),N=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var L=this._input.read(T),y=c.get_directives(L);y&&y.ignore==="start"&&(L+=c.readIgnored(this._input)),this.print_string(L),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(k)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(P),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var C=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);C.match(/[ :]$/)&&(C=this.eatString(": ").replace(/\s$/,""),this.print_string(C),this._output.space_before_token=!0),C=C.replace(/\s$/,""),C==="extend"?B=!0:C==="import"&&(R=!0),C in this.NESTED_AT_RULE?(this._nestedLevel+=1,C in this.CONDITIONAL_GROUP_RULE&&(w=!0)):!g&&H===0&&C.indexOf(":")!==-1&&(m=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(m&&(m=!1,this.outdent()),w?(w=!1,g=this._indentLevel>=this._nestedLevel):g=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&g&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),W==="{"&&this._output.trim(!0),R=!1,B=!1,m&&(this.outdent(),m=!1),this.print_string(this._ch),g=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(g||w)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!B&&H===0?(this.print_string(":"),m||(m=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(P),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?H===0?(m&&(this.outdent(),m=!1),B=!1,R=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),H++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),H&&(H--,this.outdent()))):(this.preserveSingleSpace(P),this.print_string(this._ch),this.eatWhitespace(),H++,this.indent()):this._ch===")"?(H&&(H--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!m&&H===0&&!R&&!B?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!m&&H===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&_.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(P),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),_.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(P),this.print_string(this._ch));var U=this._output.get_code(A);return U},i.exports.Beautifier=f},function(i,a,o){var u=o(6).Options;function s(l){u.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var h=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||h;var c=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var d=0;d=0;l--)if(this.__items[l].match(s))return!0;return!1},a.prototype.set_indent=function(s,l){this.is_empty()&&(this.__indent_count=s||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},a.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},a.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},a.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var s=this.__parent.current_line;return s.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),s.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),s.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,s.__items[0]===" "&&(s.__items.splice(0,1),s.__character_count-=1),!0}return!1},a.prototype.is_empty=function(){return this.__items.length===0},a.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},a.prototype.push=function(s){this.__items.push(s);var l=s.lastIndexOf(` +`);l!==-1?this.__character_count=s.length-l:this.__character_count+=s.length},a.prototype.pop=function(){var s=null;return this.is_empty()||(s=this.__items.pop(),this.__character_count-=s.length),s},a.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},a.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},a.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},a.prototype.toString=function(){var s="";return this.is_empty()?this.__parent.indent_empty_lines&&(s=this.__parent.get_indent_string(this.__indent_count)):(s=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),s+=this.__items.join("")),s};function o(s,l){this.__cache=[""],this.__indent_size=s.indent_size,this.__indent_string=s.indent_char,s.indent_with_tabs||(this.__indent_string=new Array(s.indent_size+1).join(s.indent_char)),l=l||"",s.indent_level>0&&(l=new Array(s.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}o.prototype.get_indent_size=function(s,l){var h=this.__base_string_length;return l=l||0,s<0&&(h=0),h+=s*this.__indent_size,h+=l,h},o.prototype.get_indent_string=function(s,l){var h=this.__base_string;return l=l||0,s<0&&(s=0,h=""),l+=s*this.__indent_size,this.__ensure_cache(l),h+=this.__cache[l],h},o.prototype.__ensure_cache=function(s){for(;s>=this.__cache.length;)this.__add_column()},o.prototype.__add_column=function(){var s=this.__cache.length,l=0,h="";this.__indent_size&&s>=this.__indent_size&&(l=Math.floor(s/this.__indent_size),s-=l*this.__indent_size,h=new Array(l+1).join(this.__indent_string)),s&&(h+=new Array(s+1).join(" ")),this.__cache.push(h)};function u(s,l){this.__indent_cache=new o(s,l),this.raw=!1,this._end_with_newline=s.end_with_newline,this.indent_size=s.indent_size,this.wrap_line_length=s.wrap_line_length,this.indent_empty_lines=s.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new a(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}u.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},u.prototype.get_line_number=function(){return this.__lines.length},u.prototype.get_indent_string=function(s,l){return this.__indent_cache.get_indent_string(s,l)},u.prototype.get_indent_size=function(s,l){return this.__indent_cache.get_indent_size(s,l)},u.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},u.prototype.add_new_line=function(s){return this.is_empty()||!s&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},u.prototype.get_code=function(s){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` +`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var h=this.__lines.join(` +`);return s!==` +`&&(h=h.replace(/[\n]/g,s)),h},u.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},u.prototype.set_indent=function(s,l){return s=s||0,l=l||0,this.next_line.set_indent(s,l),this.__lines.length>1?(this.current_line.set_indent(s,l),!0):(this.current_line.set_indent(),!1)},u.prototype.add_raw_token=function(s){for(var l=0;l1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},u.prototype.just_added_newline=function(){return this.current_line.is_empty()},u.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},u.prototype.ensure_empty_line_above=function(s,l){for(var h=this.__lines.length-2;h>=0;){var c=this.__lines[h];if(c.is_empty())break;if(c.item(0).indexOf(s)!==0&&c.item(-1)!==l){this.__lines.splice(h+1,0,new a(this)),this.previous_line=this.__lines[this.__lines.length-2];break}h--}},i.exports.Output=u},function(i){function a(o,u,s,l){this.type=o,this.text=u,this.comments_before=null,this.newlines=s||0,this.whitespace_before=l||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=a},,,function(i){function a(s,l){this.raw_options=o(s,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}a.prototype._get_array=function(s,l){var h=this.raw_options[s],c=l||[];return typeof h=="object"?h!==null&&typeof h.concat=="function"&&(c=h.concat()):typeof h=="string"&&(c=h.split(/[^a-zA-Z0-9_\/\-]+/)),c},a.prototype._get_boolean=function(s,l){var h=this.raw_options[s],c=h===void 0?!!l:!!h;return c},a.prototype._get_characters=function(s,l){var h=this.raw_options[s],c=l||"";return typeof h=="string"&&(c=h.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),c},a.prototype._get_number=function(s,l){var h=this.raw_options[s];l=parseInt(l,10),isNaN(l)&&(l=0);var c=parseInt(h,10);return isNaN(c)&&(c=l),c},a.prototype._get_selection=function(s,l,h){var c=this._get_selection_list(s,l,h);if(c.length!==1)throw new Error("Invalid Option Value: The option '"+s+`' can only be one of the following values: +`+l+` +You passed in: '`+this.raw_options[s]+"'");return c[0]},a.prototype._get_selection_list=function(s,l,h){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(h=h||[l[0]],!this._is_valid_selection(h,l))throw new Error("Invalid Default Value!");var c=this._get_array(s,h);if(!this._is_valid_selection(c,l))throw new Error("Invalid Option Value: The option '"+s+`' can contain only the following values: +`+l+` +You passed in: '`+this.raw_options[s]+"'");return c},a.prototype._is_valid_selection=function(s,l){return s.length&&l.length&&!s.some(function(h){return l.indexOf(h)===-1})};function o(s,l){var h={};s=u(s);var c;for(c in s)c!==l&&(h[c]=s[c]);if(l&&s[l])for(c in s[l])h[c]=s[l][c];return h}function u(s){var l={},h;for(h in s){var c=h.replace(/-/g,"_");l[c]=s[h]}return l}i.exports.Options=a,i.exports.normalizeOpts=u,i.exports.mergeOpts=o},,function(i){var a=RegExp.prototype.hasOwnProperty("sticky");function o(u){this.__input=u||"",this.__input_length=this.__input.length,this.__position=0}o.prototype.restart=function(){this.__position=0},o.prototype.back=function(){this.__position>0&&(this.__position-=1)},o.prototype.hasNext=function(){return this.__position=0&&u=0&&s=u.length&&this.__input.substring(s-u.length,s).toLowerCase()===u},i.exports.InputScanner=o},function(i,a,o){var u=o(8).InputScanner,s=o(3).Token,l=o(10).TokenStream,h=o(11).WhitespacePattern,c={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},d=function(p,_){this._input=new u(p),this._options=_||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new h(this._input)};d.prototype.tokenize=function(){this._input.restart(),this.__tokens=new l,this._reset();for(var p,_=new s(c.START,""),b=null,T=[],k=new l;_.type!==c.EOF;){for(p=this._get_next_token(_,b);this._is_comment(p);)k.add(p),p=this._get_next_token(_,b);k.isEmpty()||(p.comments_before=k,k=new l),p.parent=b,this._is_opening(p)?(T.push(b),b=p):b&&this._is_closing(p,b)&&(p.opened=b,b.closed=p,b=T.pop(),p.parent=b),p.previous=_,_.next=p,this.__tokens.add(p),_=p}return this.__tokens},d.prototype._is_first_token=function(){return this.__tokens.isEmpty()},d.prototype._reset=function(){},d.prototype._get_next_token=function(p,_){this._readWhitespace();var b=this._input.read(/.+/g);return b?this._create_token(c.RAW,b):this._create_token(c.EOF,"")},d.prototype._is_comment=function(p){return!1},d.prototype._is_opening=function(p){return!1},d.prototype._is_closing=function(p,_){return!1},d.prototype._create_token=function(p,_){var b=new s(p,_,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return b},d.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=d,i.exports.TOKEN=c},function(i){function a(o){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=o}a.prototype.restart=function(){this.__position=0},a.prototype.isEmpty=function(){return this.__tokens_length===0},a.prototype.hasNext=function(){return this.__position=0&&o/),erb:d.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:d.starting_with(/{%/).until_after(/%}/),django_value:d.starting_with(/{{/).until_after(/}}/),django_comment:d.starting_with(/{#/).until_after(/#}/),smarty:d.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:d.starting_with(/{\*/).until_after(/\*}/),smarty_literal:d.starting_with(/{literal}/).until_after(/{\/literal}/)}}l.prototype=new u,l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){this.__set_templated_pattern()},l.prototype.disable=function(h){var c=this._create();return c._disabled[h]=!0,c._update(),c},l.prototype.read_options=function(h){var c=this._create();for(var d in s)c._disabled[d]=h.templating.indexOf(d)===-1;return c._update(),c},l.prototype.exclude=function(h){var c=this._create();return c._excluded[h]=!0,c._update(),c},l.prototype.read=function(){var h="";this._match_pattern?h=this._input.read(this._starting_pattern):h=this._input.read(this._starting_pattern,this.__template_pattern);for(var c=this._read_template();c;)this._match_pattern?c+=this._input.read(this._match_pattern):c+=this._input.readUntil(this.__template_pattern),h+=c,c=this._read_template();return this._until_after&&(h+=this._input.readUntilAfter(this._until_pattern)),h},l.prototype.__set_templated_pattern=function(){var h=[];this._disabled.php||h.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||h.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||h.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(h.push(this.__patterns.django._starting_pattern.source),h.push(this.__patterns.django_value._starting_pattern.source),h.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||h.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&h.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+h.join("|")+")")},l.prototype._read_template=function(){var h="",c=this._input.peek();if(c==="<"){var d=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&d==="?"&&(h=h||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&d==="%"&&(h=h||this.__patterns.erb.read())}else c==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(h=h||this.__patterns.handlebars_comment.read(),h=h||this.__patterns.handlebars_unescaped.read(),h=h||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(h=h||this.__patterns.django_value.read()),this._excluded.django||(h=h||this.__patterns.django_comment.read(),h=h||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(h=h||this.__patterns.smarty_comment.read(),h=h||this.__patterns.smarty_literal.read(),h=h||this.__patterns.smarty.read()));return h},i.exports.TemplatablePattern=l},,,,function(i,a,o){var u=o(19).Beautifier,s=o(20).Options;function l(h,c,d,p){var _=new u(h,c,d,p);return _.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new s}},function(i,a,o){var u=o(20).Options,s=o(2).Output,l=o(21).Tokenizer,h=o(21).TOKEN,c=/\r\n|[\r\n]/,d=/\r\n|[\r\n]/g,p=function(g,m){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=g.max_preserve_newlines,this.preserve_newlines=g.preserve_newlines,this._output=new s(g,m)};p.prototype.current_line_has_match=function(g){return this._output.current_line.has_match(g)},p.prototype.set_space_before_token=function(g,m){this._output.space_before_token=g,this._output.non_breaking_space=m},p.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},p.prototype.add_raw_token=function(g){this._output.add_raw_token(g)},p.prototype.print_preserved_newlines=function(g){var m=0;g.type!==h.TEXT&&g.previous.type!==h.TEXT&&(m=g.newlines?1:0),this.preserve_newlines&&(m=g.newlines0);return m!==0},p.prototype.traverse_whitespace=function(g){return g.whitespace_before||g.newlines?(this.print_preserved_newlines(g)||(this._output.space_before_token=!0),!0):!1},p.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},p.prototype.print_newline=function(g){this._output.add_new_line(g)},p.prototype.print_token=function(g){g.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(g.text))},p.prototype.indent=function(){this.indent_level++},p.prototype.get_full_indent=function(g){return g=this.indent_level+(g||0),g<1?"":this._output.get_indent_string(g)};var _=function(g){for(var m=null,w=g.next;w.type!==h.EOF&&g.closed!==w;){if(w.type===h.ATTRIBUTE&&w.text==="type"){w.next&&w.next.type===h.EQUALS&&w.next.next&&w.next.next.type===h.VALUE&&(m=w.next.next.text);break}w=w.next}return m},b=function(g,m){var w=null,B=null;return m.closed?(g==="script"?w="text/javascript":g==="style"&&(w="text/css"),w=_(m)||w,w.search("text/css")>-1?B="css":w.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?B="javascript":w.search(/(text|application|dojo)\/(x-)?(html)/)>-1?B="html":w.search(/test\/null/)>-1&&(B="null"),B):null};function T(g,m){return m.indexOf(g)!==-1}function k(g,m,w){this.parent=g||null,this.tag=m?m.tag_name:"",this.indent_level=w||0,this.parser_token=m||null}function f(g){this._printer=g,this._current_frame=null}f.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},f.prototype.record_tag=function(g){var m=new k(this._current_frame,g,this._printer.indent_level);this._current_frame=m},f.prototype._try_pop_frame=function(g){var m=null;return g&&(m=g.parser_token,this._printer.indent_level=g.indent_level,this._current_frame=g.parent),m},f.prototype._get_frame=function(g,m){for(var w=this._current_frame;w&&g.indexOf(w.tag)===-1;){if(m&&m.indexOf(w.tag)!==-1){w=null;break}w=w.parent}return w},f.prototype.try_pop=function(g,m){var w=this._get_frame([g],m);return this._try_pop_frame(w)},f.prototype.indent_to_tag=function(g){var m=this._get_frame(g);m&&(this._printer.indent_level=m.indent_level)};function v(g,m,w,B){this._source_text=g||"",m=m||{},this._js_beautify=w,this._css_beautify=B,this._tag_stack=null;var R=new u(m,"html");this._options=R,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var g=this._source_text,m=this._options.eol;this._options.eol==="auto"&&(m=` +`,g&&c.test(g)&&(m=g.match(c)[0])),g=g.replace(d,` +`);var w=g.match(/^[\t ]*/)[0],B={text:"",type:""},R=new A,N=new p(this._options,w),I=new l(g,this._options).tokenize();this._tag_stack=new f(N);for(var P=null,W=I.next();W.type!==h.EOF;)W.type===h.TAG_OPEN||W.type===h.COMMENT?(P=this._handle_tag_open(N,W,R,B),R=P):W.type===h.ATTRIBUTE||W.type===h.EQUALS||W.type===h.VALUE||W.type===h.TEXT&&!R.tag_complete?P=this._handle_inside_tag(N,W,R,I):W.type===h.TAG_CLOSE?P=this._handle_tag_close(N,W,R):W.type===h.TEXT?P=this._handle_text(N,W,R):N.add_raw_token(W),B=P,W=I.next();var L=N._output.get_code(m);return L},v.prototype._handle_tag_close=function(g,m,w){var B={text:m.text,type:m.type};return g.alignment_size=0,w.tag_complete=!0,g.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),w.is_unformatted?g.add_raw_token(m):(w.tag_start_char==="<"&&(g.set_space_before_token(m.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&w.has_wrapped_attrs&&g.print_newline(!1)),g.print_token(m)),w.indent_content&&!(w.is_unformatted||w.is_content_unformatted)&&(g.indent(),w.indent_content=!1),!w.is_inline_element&&!(w.is_unformatted||w.is_content_unformatted)&&g.set_wrap_point(),B},v.prototype._handle_inside_tag=function(g,m,w,B){var R=w.has_wrapped_attrs,N={text:m.text,type:m.type};if(g.set_space_before_token(m.newlines||m.whitespace_before!=="",!0),w.is_unformatted)g.add_raw_token(m);else if(w.tag_start_char==="{"&&m.type===h.TEXT)g.print_preserved_newlines(m)?(m.newlines=0,g.add_raw_token(m)):g.print_token(m);else{if(m.type===h.ATTRIBUTE?(g.set_space_before_token(!0),w.attr_count+=1):(m.type===h.EQUALS||m.type===h.VALUE&&m.previous.type===h.EQUALS)&&g.set_space_before_token(!1),m.type===h.ATTRIBUTE&&w.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(g.traverse_whitespace(m),R=R||m.newlines!==0),this._is_wrap_attributes_force)){var I=w.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&w.attr_count===1){var P=!0,W=0,L;do{if(L=B.peek(W),L.type===h.ATTRIBUTE){P=!1;break}W+=1}while(W<4&&L.type!==h.EOF&&L.type!==h.TAG_CLOSE);I=!P}I&&(g.print_newline(!1),R=!0)}g.print_token(m),R=R||g.previous_token_wrapped(),w.has_wrapped_attrs=R}return N},v.prototype._handle_text=function(g,m,w){var B={text:m.text,type:"TK_CONTENT"};return w.custom_beautifier_name?this._print_custom_beatifier_text(g,m,w):w.is_unformatted||w.is_content_unformatted?g.add_raw_token(m):(g.traverse_whitespace(m),g.print_token(m)),B},v.prototype._print_custom_beatifier_text=function(g,m,w){var B=this;if(m.text!==""){var R=m.text,N,I=1,P="",W="";w.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?N=this._js_beautify:w.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?N=this._css_beautify:w.custom_beautifier_name==="html"&&(N=function(x,E){var z=new v(x,E,B._js_beautify,B._css_beautify);return z.beautify()}),this._options.indent_scripts==="keep"?I=0:this._options.indent_scripts==="separate"&&(I=-g.indent_level);var L=g.get_full_indent(I);if(R=R.replace(/\n[ \t]*$/,""),w.custom_beautifier_name!=="html"&&R[0]==="<"&&R.match(/^(|]]>)$/.exec(R);if(!y){g.add_raw_token(m);return}P=L+y[1]+` +`,R=y[4],y[5]&&(W=L+y[5]),R=R.replace(/\n[ \t]*$/,""),(y[2]||y[3].indexOf(` +`)!==-1)&&(y=y[3].match(/[ \t]+$/),y&&(m.whitespace_before=y[0]))}if(R)if(N){var C=function(){this.eol=` +`};C.prototype=this._options.raw_options;var U=new C;R=N(L+R,U)}else{var q=m.whitespace_before;q&&(R=R.replace(new RegExp(` +(`+q+")?","g"),` +`)),R=L+R.replace(/\n/g,` +`+L)}P&&(R?R=P+R+` +`+W:R=P+W),g.print_newline(!1),R&&(m.text=R,m.whitespace_before="",m.newlines=0,g.add_raw_token(m),g.print_newline(!0))}},v.prototype._handle_tag_open=function(g,m,w,B){var R=this._get_tag_open_token(m);return(w.is_unformatted||w.is_content_unformatted)&&!w.is_empty_element&&m.type===h.TAG_OPEN&&m.text.indexOf("]*)/),this.tag_check=w?w[1]:""):(w=m.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=w?w[1]:"",m.text==="{{#>"&&this.tag_check===">"&&m.next!==null&&(this.tag_check=m.next.text)),this.tag_check=this.tag_check.toLowerCase(),m.type===h.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||m.closed&&m.closed.text==="/>",this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))}};v.prototype._get_tag_open_token=function(g){var m=new A(this._tag_stack.get_parser_token(),g);return m.alignment_size=this._options.wrap_attributes_indent_size,m.is_end_tag=m.is_end_tag||T(m.tag_check,this._options.void_elements),m.is_empty_element=m.tag_complete||m.is_start_tag&&m.is_end_tag,m.is_unformatted=!m.tag_complete&&T(m.tag_check,this._options.unformatted),m.is_content_unformatted=!m.is_empty_element&&T(m.tag_check,this._options.content_unformatted),m.is_inline_element=T(m.tag_name,this._options.inline)||m.tag_start_char==="{",m},v.prototype._set_tag_position=function(g,m,w,B,R){if(w.is_empty_element||(w.is_end_tag?w.start_tag_token=this._tag_stack.try_pop(w.tag_name):(this._do_optional_end_element(w)&&(w.is_inline_element||g.print_newline(!1)),this._tag_stack.record_tag(w),(w.tag_name==="script"||w.tag_name==="style")&&!(w.is_unformatted||w.is_content_unformatted)&&(w.custom_beautifier_name=b(w.tag_check,m)))),T(w.tag_check,this._options.extra_liners)&&(g.print_newline(!1),g._output.just_added_blankline()||g.print_newline(!0)),w.is_empty_element){if(w.tag_start_char==="{"&&w.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),w.indent_content=!0;var N=g.current_line_has_match(/{{#if/);N||g.print_newline(!1)}w.tag_name==="!--"&&R.type===h.TAG_CLOSE&&B.is_end_tag&&w.text.indexOf(` +`)===-1||(w.is_inline_element||w.is_unformatted||g.print_newline(!1),this._calcluate_parent_multiline(g,w))}else if(w.is_end_tag){var I=!1;I=w.start_tag_token&&w.start_tag_token.multiline_content,I=I||!w.is_inline_element&&!(B.is_inline_element||B.is_unformatted)&&!(R.type===h.TAG_CLOSE&&w.start_tag_token===B)&&R.type!=="TK_CONTENT",(w.is_content_unformatted||w.is_unformatted)&&(I=!1),I&&g.print_newline(!1)}else w.indent_content=!w.custom_beautifier_name,w.tag_start_char==="<"&&(w.tag_name==="html"?w.indent_content=this._options.indent_inner_html:w.tag_name==="head"?w.indent_content=this._options.indent_head_inner_html:w.tag_name==="body"&&(w.indent_content=this._options.indent_body_inner_html)),!(w.is_inline_element||w.is_unformatted)&&(R.type!=="TK_CONTENT"||w.is_content_unformatted)&&g.print_newline(!1),this._calcluate_parent_multiline(g,w)},v.prototype._calcluate_parent_multiline=function(g,m){m.parent&&g._output.just_added_newline()&&!((m.is_inline_element||m.is_unformatted)&&m.parent.is_inline_element)&&(m.parent.multiline_content=!0)};var D=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],H=["a","audio","del","ins","map","noscript","video"];v.prototype._do_optional_end_element=function(g){var m=null;if(!(g.is_empty_element||!g.is_start_tag||!g.parent)){if(g.tag_name==="body")m=m||this._tag_stack.try_pop("head");else if(g.tag_name==="li")m=m||this._tag_stack.try_pop("li",["ol","ul"]);else if(g.tag_name==="dd"||g.tag_name==="dt")m=m||this._tag_stack.try_pop("dt",["dl"]),m=m||this._tag_stack.try_pop("dd",["dl"]);else if(g.parent.tag_name==="p"&&D.indexOf(g.tag_name)!==-1){var w=g.parent.parent;(!w||H.indexOf(w.tag_name)===-1)&&(m=m||this._tag_stack.try_pop("p"))}else g.tag_name==="rp"||g.tag_name==="rt"?(m=m||this._tag_stack.try_pop("rt",["ruby","rtc"]),m=m||this._tag_stack.try_pop("rp",["ruby","rtc"])):g.tag_name==="optgroup"?m=m||this._tag_stack.try_pop("optgroup",["select"]):g.tag_name==="option"?m=m||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):g.tag_name==="colgroup"?m=m||this._tag_stack.try_pop("caption",["table"]):g.tag_name==="thead"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"])):g.tag_name==="tbody"||g.tag_name==="tfoot"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("thead",["table"]),m=m||this._tag_stack.try_pop("tbody",["table"])):g.tag_name==="tr"?(m=m||this._tag_stack.try_pop("caption",["table"]),m=m||this._tag_stack.try_pop("colgroup",["table"]),m=m||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(g.tag_name==="th"||g.tag_name==="td")&&(m=m||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),m=m||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return g.parent=this._tag_stack.get_parser_token(),m}},i.exports.Beautifier=v},function(i,a,o){var u=o(6).Options;function s(l){u.call(this,l,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}s.prototype=new u,i.exports.Options=s},function(i,a,o){var u=o(9).Tokenizer,s=o(9).TOKEN,l=o(13).Directives,h=o(14).TemplatablePattern,c=o(12).Pattern,d={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:s.START,RAW:s.RAW,EOF:s.EOF},p=new l(/<\!--/,/-->/),_=function(b,T){u.call(this,b,T),this._current_tag_name="";var k=new h(this._input).read_options(this._options),f=new c(this._input);if(this.__patterns={word:k.until(/[\n\r\t <]/),single_quote:k.until_after(/'/),double_quote:k.until_after(/"/),attribute:k.until(/[\n\r\t =>]|\/>/),element_name:k.until(/[\n\r\t >\/]/),handlebars_comment:f.starting_with(/{{!--/).until_after(/--}}/),handlebars:f.starting_with(/{{/).until_after(/}}/),handlebars_open:f.until(/[\n\r\t }]/),handlebars_raw_close:f.until(/}}/),comment:f.starting_with(//),cdata:f.starting_with(//),conditional_comment:f.starting_with(//),processing:f.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var v=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=f.matching(v).until_after(v)}};_.prototype=new u,_.prototype._is_comment=function(b){return!1},_.prototype._is_opening=function(b){return b.type===d.TAG_OPEN},_.prototype._is_closing=function(b,T){return b.type===d.TAG_CLOSE&&T&&((b.text===">"||b.text==="/>")&&T.text[0]==="<"||b.text==="}}"&&T.text[0]==="{"&&T.text[1]==="{")},_.prototype._reset=function(){this._current_tag_name=""},_.prototype._get_next_token=function(b,T){var k=null;this._readWhitespace();var f=this._input.peek();return f===null?this._create_token(d.EOF,""):(k=k||this._read_open_handlebars(f,T),k=k||this._read_attribute(f,b,T),k=k||this._read_close(f,T),k=k||this._read_raw_content(f,b,T),k=k||this._read_content_word(f),k=k||this._read_comment_or_cdata(f),k=k||this._read_processing(f),k=k||this._read_open(f,T),k=k||this._create_token(d.UNKNOWN,this._input.next()),k)},_.prototype._read_comment_or_cdata=function(b){var T=null,k=null,f=null;if(b==="<"){var v=this._input.peek(1);v==="!"&&(k=this.__patterns.comment.read(),k?(f=p.get_directives(k),f&&f.ignore==="start"&&(k+=p.readIgnored(this._input))):k=this.__patterns.cdata.read()),k&&(T=this._create_token(d.COMMENT,k),T.directives=f)}return T},_.prototype._read_processing=function(b){var T=null,k=null,f=null;if(b==="<"){var v=this._input.peek(1);(v==="!"||v==="?")&&(k=this.__patterns.conditional_comment.read(),k=k||this.__patterns.processing.read()),k&&(T=this._create_token(d.COMMENT,k),T.directives=f)}return T},_.prototype._read_open=function(b,T){var k=null,f=null;return T||b==="<"&&(k=this._input.next(),this._input.peek()==="/"&&(k+=this._input.next()),k+=this.__patterns.element_name.read(),f=this._create_token(d.TAG_OPEN,k)),f},_.prototype._read_open_handlebars=function(b,T){var k=null,f=null;return T||this._options.indent_handlebars&&b==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(k=this.__patterns.handlebars_comment.read(),k=k||this.__patterns.handlebars.read(),f=this._create_token(d.COMMENT,k)):(k=this.__patterns.handlebars_open.read(),f=this._create_token(d.TAG_OPEN,k))),f},_.prototype._read_close=function(b,T){var k=null,f=null;return T&&(T.text[0]==="<"&&(b===">"||b==="/"&&this._input.peek(1)===">")?(k=this._input.next(),b==="/"&&(k+=this._input.next()),f=this._create_token(d.TAG_CLOSE,k)):T.text[0]==="{"&&b==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),f=this._create_token(d.TAG_CLOSE,"}}"))),f},_.prototype._read_attribute=function(b,T,k){var f=null,v="";if(k&&k.text[0]==="<")if(b==="=")f=this._create_token(d.EQUALS,this._input.next());else if(b==='"'||b==="'"){var A=this._input.next();b==='"'?A+=this.__patterns.double_quote.read():A+=this.__patterns.single_quote.read(),f=this._create_token(d.VALUE,A)}else v=this.__patterns.attribute.read(),v&&(T.type===d.EQUALS?f=this._create_token(d.VALUE,v):f=this._create_token(d.ATTRIBUTE,v));return f},_.prototype._is_content_unformatted=function(b){return this._options.void_elements.indexOf(b)===-1&&(this._options.content_unformatted.indexOf(b)!==-1||this._options.unformatted.indexOf(b)!==-1)},_.prototype._read_raw_content=function(b,T,k){var f="";if(k&&k.text[0]==="{")f=this.__patterns.handlebars_raw_close.read();else if(T.type===d.TAG_CLOSE&&T.opened.text[0]==="<"&&T.text[0]!=="/"){var v=T.opened.text.substr(1).toLowerCase();if(v==="script"||v==="style"){var A=this._read_comment_or_cdata(b);if(A)return A.type=d.TEXT,A;f=this._input.readUntil(new RegExp("","ig"))}else this._is_content_unformatted(v)&&(f=this._input.readUntil(new RegExp("","ig")))}return f?this._create_token(d.TEXT,f):null},_.prototype._read_content_word=function(b){var T="";if(this._options.unformatted_content_delimiter&&b===this._options.unformatted_content_delimiter[0]&&(T=this.__patterns.unformatted_content_delimiter.read()),T||(T=this.__patterns.word.read()),T)return this._create_token(d.TEXT,T)},i.exports.Tokenizer=_,i.exports.TOKEN=d}],t={};function n(i){var a=t[i];if(a!==void 0)return a.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}var r=n(18);cr=r})();function bs(e,t){return cr(e,t,ps,gs)}function _s(e,t,n){var r=e.getText(),i=!0,a=0,o=n.tabSize||4;if(t){for(var u=e.offsetAt(t.start),s=u;s>0&&mr(r,s-1);)s--;s===0||dr(r,s-1)?u=s:s]*$/).test(c))return r=r.substring(u,l),[{range:t,newText:r}];if(i=l===r.length,r=r.substring(u,l),u!==0){var d=e.offsetAt(ne.create(t.start.line,0));a=ys(e.getText(),d,n)}}else t=G.create(ne.create(0,0),e.positionAt(r.length));var p={indent_size:o,indent_char:n.insertSpaces?" ":" ",indent_empty_lines:ce(n,"indentEmptyLines",!1),wrap_line_length:ce(n,"wrapLineLength",120),unformatted:mn(n,"unformatted",void 0),content_unformatted:mn(n,"contentUnformatted",void 0),indent_inner_html:ce(n,"indentInnerHtml",!1),preserve_newlines:ce(n,"preserveNewLines",!0),max_preserve_newlines:ce(n,"maxPreserveNewLines",32786),indent_handlebars:ce(n,"indentHandlebars",!1),end_with_newline:i&&ce(n,"endWithNewline",!1),extra_liners:mn(n,"extraLiners",void 0),wrap_attributes:ce(n,"wrapAttributes","auto"),wrap_attributes_indent_size:ce(n,"wrapAttributesIndentSize",void 0),eol:` +`,indent_scripts:ce(n,"indentScripts","normal"),templating:ws(n,"all"),unformatted_content_delimiter:ce(n,"unformattedContentDelimiter","")},_=bs(vs(r),p);if(a>0){var b=n.insertSpaces?ar(" ",o*a):ar(" ",a);_=_.split(` +`).join(` +`+b),t.start.character===0&&(_=b+_)}return[{range:t,newText:_}]}function vs(e){return e.replace(/^\s+/,"")}function ce(e,t,n){if(e&&e.hasOwnProperty(t)){var r=e[t];if(r!==null)return r}return n}function mn(e,t,n){var r=ce(e,t,null);return typeof r=="string"?r.length>0?r.split(",").map(function(i){return i.trim().toLowerCase()}):[]:n}function ws(e,t){var n=ce(e,"templating",t);return n===!0?["auto"]:["none"]}function ys(e,t,n){for(var r=t,i=0,a=n.tabSize||4;r{var e={470:r=>{function i(u){if(typeof u!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(u))}function a(u,s){for(var l,h="",c=0,d=-1,p=0,_=0;_<=u.length;++_){if(_2){var b=h.lastIndexOf("/");if(b!==h.length-1){b===-1?(h="",c=0):c=(h=h.slice(0,b)).length-1-h.lastIndexOf("/"),d=_,p=0;continue}}else if(h.length===2||h.length===1){h="",c=0,d=_,p=0;continue}}s&&(h.length>0?h+="/..":h="..",c=2)}else h.length>0?h+="/"+u.slice(d+1,_):h=u.slice(d+1,_),c=_-d-1;d=_,p=0}else l===46&&p!==-1?++p:p=-1}return h}var o={resolve:function(){for(var u,s="",l=!1,h=arguments.length-1;h>=-1&&!l;h--){var c;h>=0?c=arguments[h]:(u===void 0&&(u=process.cwd()),c=u),i(c),c.length!==0&&(s=c+"/"+s,l=c.charCodeAt(0)===47)}return s=a(s,!l),l?s.length>0?"/"+s:"/":s.length>0?s:"."},normalize:function(u){if(i(u),u.length===0)return".";var s=u.charCodeAt(0)===47,l=u.charCodeAt(u.length-1)===47;return(u=a(u,!s)).length!==0||s||(u="."),u.length>0&&l&&(u+="/"),s?"/"+u:u},isAbsolute:function(u){return i(u),u.length>0&&u.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var u,s=0;s0&&(u===void 0?u=l:u+="/"+l)}return u===void 0?".":o.normalize(u)},relative:function(u,s){if(i(u),i(s),u===s||(u=o.resolve(u))===(s=o.resolve(s)))return"";for(var l=1;l_){if(s.charCodeAt(d+T)===47)return s.slice(d+T+1);if(T===0)return s.slice(d+T)}else c>_&&(u.charCodeAt(l+T)===47?b=T:T===0&&(b=0));break}var k=u.charCodeAt(l+T);if(k!==s.charCodeAt(d+T))break;k===47&&(b=T)}var f="";for(T=l+b+1;T<=h;++T)T!==h&&u.charCodeAt(T)!==47||(f.length===0?f+="..":f+="/..");return f.length>0?f+s.slice(d+b):(d+=b,s.charCodeAt(d)===47&&++d,s.slice(d))},_makeLong:function(u){return u},dirname:function(u){if(i(u),u.length===0)return".";for(var s=u.charCodeAt(0),l=s===47,h=-1,c=!0,d=u.length-1;d>=1;--d)if((s=u.charCodeAt(d))===47){if(!c){h=d;break}}else c=!1;return h===-1?l?"/":".":l&&h===1?"//":u.slice(0,h)},basename:function(u,s){if(s!==void 0&&typeof s!="string")throw new TypeError('"ext" argument must be a string');i(u);var l,h=0,c=-1,d=!0;if(s!==void 0&&s.length>0&&s.length<=u.length){if(s.length===u.length&&s===u)return"";var p=s.length-1,_=-1;for(l=u.length-1;l>=0;--l){var b=u.charCodeAt(l);if(b===47){if(!d){h=l+1;break}}else _===-1&&(d=!1,_=l+1),p>=0&&(b===s.charCodeAt(p)?--p==-1&&(c=l):(p=-1,c=_))}return h===c?c=_:c===-1&&(c=u.length),u.slice(h,c)}for(l=u.length-1;l>=0;--l)if(u.charCodeAt(l)===47){if(!d){h=l+1;break}}else c===-1&&(d=!1,c=l+1);return c===-1?"":u.slice(h,c)},extname:function(u){i(u);for(var s=-1,l=0,h=-1,c=!0,d=0,p=u.length-1;p>=0;--p){var _=u.charCodeAt(p);if(_!==47)h===-1&&(c=!1,h=p+1),_===46?s===-1?s=p:d!==1&&(d=1):s!==-1&&(d=-1);else if(!c){l=p+1;break}}return s===-1||h===-1||d===0||d===1&&s===h-1&&s===l+1?"":u.slice(s,h)},format:function(u){if(u===null||typeof u!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof u);return function(s,l){var h=l.dir||l.root,c=l.base||(l.name||"")+(l.ext||"");return h?h===l.root?h+c:h+"/"+c:c}(0,u)},parse:function(u){i(u);var s={root:"",dir:"",base:"",ext:"",name:""};if(u.length===0)return s;var l,h=u.charCodeAt(0),c=h===47;c?(s.root="/",l=1):l=0;for(var d=-1,p=0,_=-1,b=!0,T=u.length-1,k=0;T>=l;--T)if((h=u.charCodeAt(T))!==47)_===-1&&(b=!1,_=T+1),h===46?d===-1?d=T:k!==1&&(k=1):d!==-1&&(k=-1);else if(!b){p=T+1;break}return d===-1||_===-1||k===0||k===1&&d===_-1&&d===p+1?_!==-1&&(s.base=s.name=p===0&&c?u.slice(1,_):u.slice(p,_)):(p===0&&c?(s.name=u.slice(1,d),s.base=u.slice(1,_)):(s.name=u.slice(p,d),s.base=u.slice(p,_)),s.ext=u.slice(d,_)),p>0?s.dir=u.slice(0,p-1):c&&(s.dir="/"),s},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,r.exports=o},447:(r,i,a)=>{var o;if(a.r(i),a.d(i,{URI:()=>k,Utils:()=>N}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var u=navigator.userAgent;o=u.indexOf("Windows")>=0}var s,l,h=(s=function(L,y){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(C,U){C.__proto__=U}||function(C,U){for(var q in U)Object.prototype.hasOwnProperty.call(U,q)&&(C[q]=U[q])})(L,y)},function(L,y){function C(){this.constructor=L}s(L,y),L.prototype=y===null?Object.create(y):(C.prototype=y.prototype,new C)}),c=/^\w[\w\d+.-]*$/,d=/^\//,p=/^\/\//,_="",b="/",T=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,k=function(){function L(y,C,U,q,x,E){E===void 0&&(E=!1),typeof y=="object"?(this.scheme=y.scheme||_,this.authority=y.authority||_,this.path=y.path||_,this.query=y.query||_,this.fragment=y.fragment||_):(this.scheme=function(z,j){return z||j?z:"file"}(y,E),this.authority=C||_,this.path=function(z,j){switch(z){case"https":case"http":case"file":j?j[0]!==b&&(j=b+j):j=b}return j}(this.scheme,U||_),this.query=q||_,this.fragment=x||_,function(z,j){if(!z.scheme&&j)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+z.authority+'", path: "'+z.path+'", query: "'+z.query+'", fragment: "'+z.fragment+'"}');if(z.scheme&&!c.test(z.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(z.path){if(z.authority){if(!d.test(z.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(p.test(z.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,E))}return L.isUri=function(y){return y instanceof L||!!y&&typeof y.authority=="string"&&typeof y.fragment=="string"&&typeof y.path=="string"&&typeof y.query=="string"&&typeof y.scheme=="string"&&typeof y.fsPath=="function"&&typeof y.with=="function"&&typeof y.toString=="function"},Object.defineProperty(L.prototype,"fsPath",{get:function(){return g(this,!1)},enumerable:!1,configurable:!0}),L.prototype.with=function(y){if(!y)return this;var C=y.scheme,U=y.authority,q=y.path,x=y.query,E=y.fragment;return C===void 0?C=this.scheme:C===null&&(C=_),U===void 0?U=this.authority:U===null&&(U=_),q===void 0?q=this.path:q===null&&(q=_),x===void 0?x=this.query:x===null&&(x=_),E===void 0?E=this.fragment:E===null&&(E=_),C===this.scheme&&U===this.authority&&q===this.path&&x===this.query&&E===this.fragment?this:new v(C,U,q,x,E)},L.parse=function(y,C){C===void 0&&(C=!1);var U=T.exec(y);return U?new v(U[2]||_,R(U[4]||_),R(U[5]||_),R(U[7]||_),R(U[9]||_),C):new v(_,_,_,_,_)},L.file=function(y){var C=_;if(o&&(y=y.replace(/\\/g,b)),y[0]===b&&y[1]===b){var U=y.indexOf(b,2);U===-1?(C=y.substring(2),y=b):(C=y.substring(2,U),y=y.substring(U)||b)}return new v("file",C,y,_,_)},L.from=function(y){return new v(y.scheme,y.authority,y.path,y.query,y.fragment)},L.prototype.toString=function(y){return y===void 0&&(y=!1),m(this,y)},L.prototype.toJSON=function(){return this},L.revive=function(y){if(y){if(y instanceof L)return y;var C=new v(y);return C._formatted=y.external,C._fsPath=y._sep===f?y.fsPath:null,C}return y},L}(),f=o?1:void 0,v=function(L){function y(){var C=L!==null&&L.apply(this,arguments)||this;return C._formatted=null,C._fsPath=null,C}return h(y,L),Object.defineProperty(y.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=g(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),y.prototype.toString=function(C){return C===void 0&&(C=!1),C?m(this,!0):(this._formatted||(this._formatted=m(this,!1)),this._formatted)},y.prototype.toJSON=function(){var C={$mid:1};return this._fsPath&&(C.fsPath=this._fsPath,C._sep=f),this._formatted&&(C.external=this._formatted),this.path&&(C.path=this.path),this.scheme&&(C.scheme=this.scheme),this.authority&&(C.authority=this.authority),this.query&&(C.query=this.query),this.fragment&&(C.fragment=this.fragment),C},y}(k),A=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function D(L,y){for(var C=void 0,U=-1,q=0;q=97&&x<=122||x>=65&&x<=90||x>=48&&x<=57||x===45||x===46||x===95||x===126||y&&x===47)U!==-1&&(C+=encodeURIComponent(L.substring(U,q)),U=-1),C!==void 0&&(C+=L.charAt(q));else{C===void 0&&(C=L.substr(0,q));var E=A[x];E!==void 0?(U!==-1&&(C+=encodeURIComponent(L.substring(U,q)),U=-1),C+=E):U===-1&&(U=q)}}return U!==-1&&(C+=encodeURIComponent(L.substring(U))),C!==void 0?C:L}function H(L){for(var y=void 0,C=0;C1&&L.scheme==="file"?"//"+L.authority+L.path:L.path.charCodeAt(0)===47&&(L.path.charCodeAt(1)>=65&&L.path.charCodeAt(1)<=90||L.path.charCodeAt(1)>=97&&L.path.charCodeAt(1)<=122)&&L.path.charCodeAt(2)===58?y?L.path.substr(1):L.path[1].toLowerCase()+L.path.substr(2):L.path,o&&(C=C.replace(/\//g,"\\")),C}function m(L,y){var C=y?H:D,U="",q=L.scheme,x=L.authority,E=L.path,z=L.query,j=L.fragment;if(q&&(U+=q,U+=":"),(x||q==="file")&&(U+=b,U+=b),x){var V=x.indexOf("@");if(V!==-1){var Y=x.substr(0,V);x=x.substr(V+1),(V=Y.indexOf(":"))===-1?U+=C(Y,!1):(U+=C(Y.substr(0,V),!1),U+=":",U+=C(Y.substr(V+1),!1)),U+="@"}(V=(x=x.toLowerCase()).indexOf(":"))===-1?U+=C(x,!1):(U+=C(x.substr(0,V),!1),U+=x.substr(V))}if(E){if(E.length>=3&&E.charCodeAt(0)===47&&E.charCodeAt(2)===58)($=E.charCodeAt(1))>=65&&$<=90&&(E="/"+String.fromCharCode($+32)+":"+E.substr(3));else if(E.length>=2&&E.charCodeAt(1)===58){var $;($=E.charCodeAt(0))>=65&&$<=90&&(E=String.fromCharCode($+32)+":"+E.substr(2))}U+=C(E,!0)}return z&&(U+="?",U+=C(z,!1)),j&&(U+="#",U+=y?j:D(j,!1)),U}function w(L){try{return decodeURIComponent(L)}catch{return L.length>3?L.substr(0,3)+w(L.substr(3)):L}}var B=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function R(L){return L.match(B)?L.replace(B,function(y){return w(y)}):L}var N,I=a(470),P=function(){for(var L=0,y=0,C=arguments.length;y{for(var a in i)n.o(i,a)&&!n.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:i[a]})},n.o=(r,i)=>Object.prototype.hasOwnProperty.call(r,i),n.r=r=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},n(447)})();const{URI:Ts,Utils:$s}=fr;function fn(e){var t=e[0],n=e[e.length-1];return t===n&&(t==="'"||t==='"')&&(e=e.substr(1,e.length-2)),e}function ks(e,t){return!e.length||t==="handlebars"&&/{{.*}}/.test(e)?!1:/\b(w[\w\d+.-]*:\/\/)?[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|\/?))/.test(e)}function Ss(e,t,n,r){if(!(/^\s*javascript\:/i.test(t)||/[\n\r]/.test(t))){if(t=t.replace(/^\s*/g,""),/^https?:\/\//i.test(t)||/^file:\/\//i.test(t))return t;if(/^\#/i.test(t))return e+t;if(/^\/\//i.test(t)){var i=xe(e,"https://")?"https":"http";return i+":"+t.replace(/^\s*/g,"")}return n?n.resolveReference(t,r||e):t}}function As(e,t,n,r,i,a){var o=fn(n);if(!!ks(o,e.languageId)){o.lengthn.startLine){if(s.endLine<=n.endLine)r.push(n),n=s,o(u,r.length);else if(s.startLine>n.endLine){do n=r.pop();while(n&&s.startLine>n.endLine);n&&r.push(n),n=s,o(u,r.length)}}}for(var l=0,h=0,u=0;ut){h=u;break}l+=c}}for(var d=[],u=0;u=0&&a[c].tagName!==o;)c--;if(c>=0){var d=a[c];a.length=c;var p=e.positionAt(n.getTokenOffset()).line,h=d.startLine,_=p-1;_>h&&u!==h&&s({startLine:h,endLine:_})}break}case M.Comment:{var h=e.positionAt(n.getTokenOffset()).line,b=n.getTokenText(),T=b.match(/^\s*#(region\b)|(endregion\b)/);if(T)if(T[1])a.push({startLine:h,tagName:""});else{for(var c=a.length-1;c>=0&&a[c].tagName.length;)c--;if(c>=0){var d=a[c];a.length=c;var _=h;h=d.startLine,_>h&&u!==h&&s({startLine:h,endLine:_,kind:gt.Region})}}else{var _=e.positionAt(n.getTokenOffset()+n.getTokenLength()).line;h<_&&s({startLine:h,endLine:_,kind:gt.Comment})}break}}r=n.scan()}var k=t&&t.rangeLimit||Number.MAX_VALUE;return i.length>k?Us(i,k):i}function zs(e,t){function n(r){for(var i=Is(e,r),a=void 0,o=void 0,u=i.length-1;u>=0;u--){var s=i[u];(!a||s[0]!==a[0]||s[1]!==a[1])&&(o=kt.create(G.create(e.positionAt(i[u][0]),e.positionAt(i[u][1])),o)),a=s}return o||(o=kt.create(G.create(r,r))),o}return t.map(n)}function Is(e,t){var n=rr(e.getText()),r=e.offsetAt(t),i=n.findNodeAt(r),a=Ws(i);if(i.startTagEnd&&!i.endTagStart){if(i.startTagEnd!==i.end)return[[i.start,i.end]];var o=G.create(e.positionAt(i.startTagEnd-2),e.positionAt(i.startTagEnd)),u=e.getText(o);u==="/>"?a.unshift([i.start+1,i.startTagEnd-2]):a.unshift([i.start+1,i.startTagEnd-1]);var s=wr(e,i,r);return a=s.concat(a),a}if(!i.startTagEnd||!i.endTagStart)return a;if(a.unshift([i.start,i.end]),i.start=i.endTagStart+2&&a.unshift([i.endTagStart+2,i.end-1]),a)}function Ws(e){for(var t=e,n=function(i){return i.startTagEnd&&i.endTagStart&&i.startTagEnd=o.getTokenOffset()&&a<=o.getTokenEnd()&&(l.unshift([o.getTokenOffset(),o.getTokenEnd()]),(d[0]==='"'&&d[d.length-1]==='"'||d[0]==="'"&&d[d.length-1]==="'")&&a>=o.getTokenOffset()+1&&a<=o.getTokenEnd()-1&&l.unshift([o.getTokenOffset()+1,o.getTokenEnd()-1]),l.push([c,o.getTokenEnd()]));break}}u=o.scan()}return l.map(function(p){return[p[0]+s,p[1]+s]})}var Ps={version:1.1,tags:[{name:"html",description:{kind:"markdown",value:"The html element represents the root of an HTML document."},attributes:[{name:"manifest",description:{kind:"markdown",value:"Specifies the URI of a resource manifest indicating resources that should be cached locally. See [Using the application cache](https://developer.mozilla.org/en-US/docs/Web/HTML/Using_the_application_cache) for details."}},{name:"version",description:'Specifies the version of the HTML [Document Type Definition](https://developer.mozilla.org/en-US/docs/Glossary/DTD "Document Type Definition: In HTML, the doctype is the required "" preamble found at the top of all documents. Its sole purpose is to prevent a browser from switching into so-called \u201Cquirks mode\u201D when rendering a document; that is, the "" doctype ensures that the browser makes a best-effort attempt at following the relevant specifications, rather than using a different rendering mode that is incompatible with some specifications.") that governs the current document. This attribute is not needed, because it is redundant with the version information in the document type declaration.'},{name:"xmlns",description:'Specifies the XML Namespace of the document. Default value is `"http://www.w3.org/1999/xhtml"`. This is required in documents parsed with XML parsers, and optional in text/html documents.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/html"}]},{name:"head",description:{kind:"markdown",value:"The head element represents a collection of metadata for the Document."},attributes:[{name:"profile",description:"The URIs of one or more metadata profiles, separated by white space."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/head"}]},{name:"title",description:{kind:"markdown",value:"The title element represents the document's title or name. Authors should use titles that identify their documents even when they are used out of context, for example in a user's history or bookmarks, or in search results. The document's title is often different from its first heading, since the first heading does not have to stand alone when taken out of context."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/title"}]},{name:"base",description:{kind:"markdown",value:"The base element allows authors to specify the document base URL for the purposes of resolving relative URLs, and the name of the default browsing context for the purposes of following hyperlinks. The element does not represent any content beyond this information."},attributes:[{name:"href",description:{kind:"markdown",value:"The base URL to be used throughout the document for relative URL addresses. If this attribute is specified, this element must come before any other elements with attributes whose values are URLs. Absolute and relative URLs are allowed."}},{name:"target",description:{kind:"markdown",value:"A name or keyword indicating the default location to display the result when hyperlinks or forms cause navigation, for elements that do not have an explicit target reference. It is a name of, or keyword for, a _browsing context_ (for example: tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the result into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the result into a new unnamed browsing context.\n* `_parent`: Load the result into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the result into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n\nIf this attribute is specified, this element must come before any other elements with attributes whose values are URLs."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/base"}]},{name:"link",description:{kind:"markdown",value:"The link element allows authors to link their document to other resources."},attributes:[{name:"href",description:{kind:"markdown",value:'This attribute specifies the [URL](https://developer.mozilla.org/en-US/docs/Glossary/URL "URL: Uniform Resource Locator (URL) is a text string specifying where a resource can be found on the Internet.") of the linked resource. A URL can be absolute or relative.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'This enumerated attribute indicates whether [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") must be used when fetching the resource. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_Enabled_Image) can be reused in the [``](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\n`anonymous`\n\nA cross-origin request (i.e. with an [`Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Origin "The Origin request header indicates where a fetch originates from. It doesn\'t include any path information, but only the server name. It is sent with CORS requests, as well as with POST requests. It is similar to the Referer header, but, unlike this header, it doesn\'t disclose the whole path.") HTTP header) is performed, but no credential is sent (i.e. no cookie, X.509 certificate, or HTTP Basic authentication). If the server does not give credentials to the origin site (by not setting the [`Access-Control-Allow-Origin`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin "The Access-Control-Allow-Origin response header indicates whether the response can be shared with requesting code from the given origin.") HTTP header) the image will be tainted and its usage restricted.\n\n`use-credentials`\n\nA cross-origin request (i.e. with an `Origin` HTTP header) is performed along with a credential sent (i.e. a cookie, certificate, and/or HTTP Basic authentication is performed). If the server does not give credentials to the origin site (through [`Access-Control-Allow-Credentials`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials "The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to frontend JavaScript code when the request\'s credentials mode (Request.credentials) is "include".") HTTP header), the resource will be _tainted_ and its usage restricted.\n\nIf the attribute is not present, the resource is fetched without a [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") request (i.e. without sending the `Origin` HTTP header), preventing its non-tainted usage. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for additional information.'}},{name:"rel",description:{kind:"markdown",value:"This attribute names a relationship of the linked document to the current document. The attribute must be a space-separated list of the [link types values](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."}},{name:"media",description:{kind:"markdown",value:"This attribute specifies the media that the linked resource applies to. Its value must be a media type / [media query](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries). This attribute is mainly useful when linking to external stylesheets \u2014 it allows the user agent to pick the best adapted one for the device it runs on.\n\n**Notes:**\n\n* In HTML 4, this can only be a simple white-space-separated list of media description literals, i.e., [media types and groups](https://developer.mozilla.org/en-US/docs/Web/CSS/@media), where defined and allowed as values for this attribute, such as `print`, `screen`, `aural`, `braille`. HTML5 extended this to any kind of [media queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries), which are a superset of the allowed values of HTML 4.\n* Browsers not supporting [CSS3 Media Queries](https://developer.mozilla.org/en-US/docs/Web/CSS/Media_queries) won't necessarily recognize the adequate link; do not forget to set fallback links, the restricted set of media queries defined in HTML 4."}},{name:"hreflang",description:{kind:"markdown",value:"This attribute indicates the language of the linked resource. It is purely advisory. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt). Use this attribute only if the [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute is present."}},{name:"type",description:{kind:"markdown",value:'This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as **text/html**, **text/css**, and so on. The common use of this attribute is to define the type of stylesheet being referenced (such as **text/css**), but given that CSS is the only stylesheet language used on the web, not only is it possible to omit the `type` attribute, but is actually now recommended practice. It is also used on `rel="preload"` link types, to make sure the browser only downloads file types that it supports.'}},{name:"sizes",description:{kind:"markdown",value:"This attribute defines the sizes of the icons for visual media contained in the resource. It must be present only if the [`rel`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link#attr-rel) contains a value of `icon` or a non-standard type such as Apple's `apple-touch-icon`. It may have the following values:\n\n* `any`, meaning that the icon can be scaled to any size as it is in a vector format, like `image/svg+xml`.\n* a white-space separated list of sizes, each in the format `__x__` or `__X__`. Each of these sizes must be contained in the resource.\n\n**Note:** Most icon formats are only able to store one single icon; therefore most of the time the [`sizes`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-sizes) contains only one entry. MS's ICO format does, as well as Apple's ICNS. ICO is more ubiquitous; you should definitely use it."}},{name:"as",description:'This attribute is only used when `rel="preload"` or `rel="prefetch"` has been set on the `` element. It specifies the type of content being loaded by the ``, which is necessary for content prioritization, request matching, application of correct [content security policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP), and setting of correct [`Accept`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept "The Accept request HTTP header advertises which content types, expressed as MIME types, the client is able to understand. Using content negotiation, the server then selects one of the proposals, uses it and informs the client of its choice with the Content-Type response header. Browsers set adequate values for this header depending on\xA0the context where the request is done: when fetching a CSS stylesheet a different value is set for the request than when fetching an image,\xA0video or a script.") request header.'},{name:"importance",description:"Indicates the relative importance of the resource. Priority hints are delegated using the values:"},{name:"importance",description:'**`auto`**: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the resource.\n\n**`high`**: Indicates to the\xA0browser\xA0that the resource is of\xA0**high** priority.\n\n**`low`**:\xA0Indicates to the\xA0browser\xA0that the resource is of\xA0**low** priority.\n\n**Note:** The `importance` attribute may only be used for the `` element if `rel="preload"` or `rel="prefetch"` is present.'},{name:"integrity",description:"Contains inline metadata \u2014 a base64-encoded cryptographic hash of the resource (file) you\u2019re telling the browser to fetch. The browser can use this to verify that the fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."},{name:"referrerpolicy",description:'A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer` means that the [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` means that no [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent\u2019s default behavior, if no policy is otherwise specified.\n* `origin` means that the referrer will be the origin of the page, which is roughly the scheme, the host, and the port.\n* `origin-when-cross-origin` means that navigating to other origins will be limited to the scheme, the host, and the port, while navigating on the same origin will include the referrer\'s path.\n* `unsafe-url` means that the referrer will include the origin and the path (but not the fragment, password, or username). This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins.'},{name:"title",description:'The `title` attribute has special semantics on the `` element. When used on a `` it defines a [preferred or an alternate stylesheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets). Incorrectly using it may [cause the stylesheet to be ignored](https://developer.mozilla.org/en-US/docs/Correctly_Using_Titles_With_External_Stylesheets).'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/link"}]},{name:"meta",description:{kind:"markdown",value:"The meta element represents various kinds of metadata that cannot be expressed using the title, base, link, style, and script elements."},attributes:[{name:"name",description:{kind:"markdown",value:`This attribute defines the name of a piece of document-level metadata. It should not be set if one of the attributes [\`itemprop\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-itemprop), [\`http-equiv\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [\`charset\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) is also set. + +This metadata name is associated with the value contained by the [\`content\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute. The possible values for the name attribute are: + +* \`application-name\` which defines the name of the application running in the web page. + + **Note:** + + * Browsers may use this to identify the application. It is different from the [\`\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/title "The HTML Title element (<title>) defines the document's title that is shown in a browser's title bar or a page's tab.") element, which usually contain the application name, but may also contain information like the document name or a status. + * Simple web pages shouldn't define an application-name. + +* \`author\` which defines the name of the document's author. +* \`description\` which contains a short and accurate summary of the content of the page. Several browsers, like Firefox and Opera, use this as the default description of bookmarked pages. +* \`generator\` which contains the identifier of the software that generated the page. +* \`keywords\` which contains words relevant to the page's content separated by commas. +* \`referrer\` which controls the [\`Referer\` HTTP header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) attached to requests sent from the document: + + Values for the \`content\` attribute of \`<meta name="referrer">\` + + \`no-referrer\` + + Do not send a HTTP \`Referrer\` header. + + \`origin\` + + Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the document. + + \`no-referrer-when-downgrade\` + + Send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) as a referrer to URLs as secure as the current page, (https\u2192https), but does not send a referrer to less secure URLs (https\u2192http). This is the default behaviour. + + \`origin-when-cross-origin\` + + Send the full URL (stripped of parameters) for same-origin requests, but only send the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) for other cases. + + \`same-origin\` + + A referrer will be sent for [same-site origins](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy), but cross-origin requests will contain no referrer information. + + \`strict-origin\` + + Only send the origin of the document as the referrer to a-priori as-much-secure destination (HTTPS->HTTPS), but don't send it to a less secure destination (HTTPS->HTTP). + + \`strict-origin-when-cross-origin\` + + Send a full URL when performing a same-origin request, only send the origin of the document to a-priori as-much-secure destination (HTTPS->HTTPS), and send no header to a less secure destination (HTTPS->HTTP). + + \`unsafe-URL\` + + Send the full URL (stripped of parameters) for same-origin or cross-origin requests. + + **Notes:** + + * Some browsers support the deprecated values of \`always\`, \`default\`, and \`never\` for referrer. + * Dynamically inserting \`<meta name="referrer">\` (with [\`document.write\`](https://developer.mozilla.org/en-US/docs/Web/API/Document/write) or [\`appendChild\`](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild)) makes the referrer behaviour unpredictable. + * When several conflicting policies are defined, the no-referrer policy is applied. + + +This attribute may also have a value taken from the extended list defined on [WHATWG Wiki MetaExtensions page](https://wiki.whatwg.org/wiki/MetaExtensions). Although none have been formally accepted yet, a few commonly used names are: + +* \`creator\` which defines the name of the creator of the document, such as an organization or institution. If there are more than one, several [\`<meta>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") elements should be used. +* \`googlebot\`, a synonym of \`robots\`, is only followed by Googlebot (the indexing crawler for Google). +* \`publisher\` which defines the name of the document's publisher. +* \`robots\` which defines the behaviour that cooperative crawlers, or "robots", should use with the page. It is a comma-separated list of the values below: + + Values for the content of \`<meta name="robots">\` + + Value + + Description + + Used by + + \`index\` + + Allows the robot to index the page (default). + + All + + \`noindex\` + + Requests the robot to not index the page. + + All + + \`follow\` + + Allows the robot to follow the links on the page (default). + + All + + \`nofollow\` + + Requests the robot to not follow the links on the page. + + All + + \`none\` + + Equivalent to \`noindex, nofollow\` + + [Google](https://support.google.com/webmasters/answer/79812) + + \`noodp\` + + Prevents using the [Open Directory Project](https://www.dmoz.org/) description, if any, as the page description in search engine results. + + [Google](https://support.google.com/webmasters/answer/35624#nodmoz), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/meta-tags-robotstxt-yahoo-search-sln2213.html#cont5), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240) + + \`noarchive\` + + Requests the search engine not to cache the page content. + + [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Yahoo](https://help.yahoo.com/kb/search-for-desktop/SLN2213.html), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240) + + \`nosnippet\` + + Prevents displaying any description of the page in search engine results. + + [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives), [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240) + + \`noimageindex\` + + Requests this page not to appear as the referring page of an indexed image. + + [Google](https://developers.google.com/webmasters/control-crawl-index/docs/robots_meta_tag#valid-indexing--serving-directives) + + \`nocache\` + + Synonym of \`noarchive\`. + + [Bing](https://www.bing.com/webmaster/help/which-robots-metatags-does-bing-support-5198d240) + + **Notes:** + + * Only cooperative robots follow these rules. Do not expect to prevent e-mail harvesters with them. + * The robot still needs to access the page in order to read these rules. To prevent bandwidth consumption, use a _[robots.txt](https://developer.mozilla.org/en-US/docs/Glossary/robots.txt "robots.txt: Robots.txt is a file which is usually placed in the root of any website. It decides whether\xA0crawlers are permitted or forbidden access to the web site.")_ file. + * If you want to remove a page, \`noindex\` will work, but only after the robot visits the page again. Ensure that the \`robots.txt\` file is not preventing revisits. + * Some values are mutually exclusive, like \`index\` and \`noindex\`, or \`follow\` and \`nofollow\`. In these cases the robot's behaviour is undefined and may vary between them. + * Some crawler robots, like Google, Yahoo and Bing, support the same values for the HTTP header \`X-Robots-Tag\`; this allows non-HTML documents like images to use these rules. + +* \`slurp\`, is a synonym of \`robots\`, but only for Slurp - the crawler for Yahoo Search. +* \`viewport\`, which gives hints about the size of the initial size of the [viewport](https://developer.mozilla.org/en-US/docs/Glossary/viewport "viewport: A viewport represents a polygonal (normally rectangular) area in computer graphics that is currently being viewed. In web browser terms, it refers to the part of the document you're viewing which is currently visible in its window (or the screen, if the document is being viewed in full screen mode). Content outside the viewport is not visible onscreen until scrolled into view."). Used by mobile devices only. + + Values for the content of \`<meta name="viewport">\` + + Value + + Possible subvalues + + Description + + \`width\` + + A positive integer number, or the text \`device-width\` + + Defines the pixel width of the viewport that you want the web site to be rendered at. + + \`height\` + + A positive integer, or the text \`device-height\` + + Defines the height of the viewport. Not used by any browser. + + \`initial-scale\` + + A positive number between \`0.0\` and \`10.0\` + + Defines the ratio between the device width (\`device-width\` in portrait mode or \`device-height\` in landscape mode) and the viewport size. + + \`maximum-scale\` + + A positive number between \`0.0\` and \`10.0\` + + Defines the maximum amount to zoom in. It must be greater or equal to the \`minimum-scale\` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default. + + \`minimum-scale\` + + A positive number between \`0.0\` and \`10.0\` + + Defines the minimum zoom level. It must be smaller or equal to the \`maximum-scale\` or the behaviour is undefined. Browser settings can ignore this rule and iOS10+ ignores it by default. + + \`user-scalable\` + + \`yes\` or \`no\` + + If set to \`no\`, the user is not able to zoom in the webpage. The default is \`yes\`. Browser settings can ignore this rule, and iOS10+ ignores it by default. + + Specification + + Status + + Comment + + [CSS Device Adaptation + The definition of '<meta name="viewport">' in that specification.](https://drafts.csswg.org/css-device-adapt/#viewport-meta) + + Working Draft + + Non-normatively describes the Viewport META element + + See also: [\`@viewport\`](https://developer.mozilla.org/en-US/docs/Web/CSS/@viewport "The @viewport CSS at-rule lets you configure the viewport through which the document is viewed. It's primarily used for mobile devices, but is also used by desktop browsers that support features like "snap to edge" (such as Microsoft Edge).") + + **Notes:** + + * Though unstandardized, this declaration is respected by most mobile browsers due to de-facto dominance. + * The default values may vary between devices and browsers. + * To learn about this declaration in Firefox for Mobile, see [this article](https://developer.mozilla.org/en-US/docs/Mobile/Viewport_meta_tag "Mobile/Viewport meta tag").`}},{name:"http-equiv",description:{kind:"markdown",value:'Defines a pragma directive. The attribute is named `**http-equiv**(alent)` because all the allowed values are names of particular HTTP headers:\n\n* `"content-language"` \n Defines the default language of the page. It can be overridden by the [lang](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/lang) attribute on any element.\n \n **Warning:** Do not use this value, as it is obsolete. Prefer the `lang` attribute on the [`<html>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/html "The HTML <html> element represents the root (top-level element) of an HTML document, so it is also referred to as the root element. All other elements must be descendants of this element.") element.\n \n* `"content-security-policy"` \n Allows page authors to define a [content policy](https://developer.mozilla.org/en-US/docs/Web/Security/CSP/CSP_policy_directives) for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.\n* `"content-type"` \n Defines the [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type) of the document, followed by its character encoding. It follows the same syntax as the HTTP `content-type` entity-header field, but as it is inside a HTML page, most values other than `text/html` are impossible. Therefore the valid syntax for its `content` is the string \'`text/html`\' followed by a character set with the following syntax: \'`; charset=_IANAcharset_`\', where `IANAcharset` is the _preferred MIME name_ for a character set as [defined by the IANA.](https://www.iana.org/assignments/character-sets)\n \n **Warning:** Do not use this value, as it is obsolete. Use the [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute on the [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") element.\n \n **Note:** As [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") can\'t change documents\' types in XHTML or HTML5\'s XHTML serialization, never set the MIME type to an XHTML MIME type with `<meta>`.\n \n* `"refresh"` \n This instruction specifies:\n * The number of seconds until the page should be reloaded - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer.\n * The number of seconds until the page should redirect to another - only if the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) attribute contains a positive integer followed by the string \'`;url=`\', and a valid URL.\n* `"set-cookie"` \n Defines a [cookie](https://developer.mozilla.org/en-US/docs/cookie) for the page. Its content must follow the syntax defined in the [IETF HTTP Cookie Specification](https://tools.ietf.org/html/draft-ietf-httpstate-cookie-14).\n \n **Warning:** Do not use this instruction, as it is obsolete. Use the HTTP header [`Set-Cookie`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie) instead.'}},{name:"content",description:{kind:"markdown",value:"This attribute contains the value for the [`http-equiv`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-http-equiv) or [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-name) attribute, depending on which is used."}},{name:"charset",description:{kind:"markdown",value:'This attribute declares the page\'s character encoding. It must contain a [standard IANA MIME name for character encodings](https://www.iana.org/assignments/character-sets). Although the standard doesn\'t request a specific encoding, it suggests:\n\n* Authors are encouraged to use [`UTF-8`](https://developer.mozilla.org/en-US/docs/Glossary/UTF-8).\n* Authors should not use ASCII-incompatible encodings to avoid security risk: browsers not supporting them may interpret harmful content as HTML. This happens with the `JIS_C6226-1983`, `JIS_X0212-1990`, `HZ-GB-2312`, `JOHAB`, the ISO-2022 family and the EBCDIC family.\n\n**Note:** ASCII-incompatible encodings are those that don\'t map the 8-bit code points `0x20` to `0x7E` to the `0x0020` to `0x007E` Unicode code points)\n\n* Authors **must not** use `CESU-8`, `UTF-7`, `BOCU-1` and/or `SCSU` as [cross-site scripting](https://developer.mozilla.org/en-US/docs/Glossary/Cross-site_scripting) attacks with these encodings have been demonstrated.\n* Authors should not use `UTF-32` because not all HTML5 encoding algorithms can distinguish it from `UTF-16`.\n\n**Notes:**\n\n* The declared character encoding must match the one the page was saved with to avoid garbled characters and security holes.\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") element declaring the encoding must be inside the [`<head>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head "The HTML <head> element provides general information (metadata) about the document, including its title and links to its\xA0scripts and style sheets.") element and **within the first 1024 bytes** of the HTML as some browsers only look at those bytes before choosing an encoding.\n* This [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") element is only one part of the [algorithm to determine a page\'s character set](https://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html#encoding-sniffing-algorithm "Algorithm charset page"). The [`Content-Type` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Type) and any [Byte-Order Marks](https://developer.mozilla.org/en-US/docs/Glossary/Byte-Order_Mark "The definition of that term (Byte-Order Marks) has not been written yet; please consider contributing it!") override this element.\n* It is strongly recommended to define the character encoding. If a page\'s encoding is undefined, cross-scripting techniques are possible, such as the [`UTF-7` fallback cross-scripting technique](https://code.google.com/p/doctype-mirror/wiki/ArticleUtf7).\n* The [`<meta>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta "The HTML <meta> element represents metadata that cannot be represented by other HTML meta-related elements, like <base>, <link>, <script>, <style> or <title>.") element with a `charset` attribute is a synonym for the pre-HTML5 `<meta http-equiv="Content-Type" content="text/html; charset=_IANAcharset_">`, where _`IANAcharset`_ contains the value of the equivalent [`charset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-charset) attribute. This syntax is still allowed, although no longer recommended.'}},{name:"scheme",description:"This attribute defines the scheme in which metadata is described. A scheme is a context leading to the correct interpretations of the [`content`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#attr-content) value, like a format.\n\n**Warning:** Do not use this value, as it is obsolete. There is no replacement as there was no real usage for it."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/meta"}]},{name:"style",description:{kind:"markdown",value:"The style element allows authors to embed style information in their documents. The style element is one of several inputs to the styling processing model. The element does not represent content for the user."},attributes:[{name:"media",description:{kind:"markdown",value:"This attribute defines which media the style should be applied to. Its value is a [media query](https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries), which defaults to `all` if the attribute is missing."}},{name:"nonce",description:{kind:"markdown",value:"A cryptographic nonce (number used once) used to whitelist inline styles in a [style-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/style-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource\u2019s policy is otherwise trivial."}},{name:"type",description:{kind:"markdown",value:"This attribute defines the styling language as a MIME type (charset should not be specified). This attribute is optional and defaults to `text/css` if it is not specified \u2014 there is very little reason to include this in modern web documents."}},{name:"scoped",valueSet:"v"},{name:"title",description:"This attribute specifies [alternative style sheet](https://developer.mozilla.org/en-US/docs/Web/CSS/Alternative_style_sheets) sets."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/style"}]},{name:"body",description:{kind:"markdown",value:"The body element represents the content of the document."},attributes:[{name:"onafterprint",description:{kind:"markdown",value:"Function to call after the user has printed the document."}},{name:"onbeforeprint",description:{kind:"markdown",value:"Function to call when the user requests printing of the document."}},{name:"onbeforeunload",description:{kind:"markdown",value:"Function to call when the document is about to be unloaded."}},{name:"onhashchange",description:{kind:"markdown",value:"Function to call when the fragment identifier part (starting with the hash (`'#'`) character) of the document's current address has changed."}},{name:"onlanguagechange",description:{kind:"markdown",value:"Function to call when the preferred languages changed."}},{name:"onmessage",description:{kind:"markdown",value:"Function to call when the document has received a message."}},{name:"onoffline",description:{kind:"markdown",value:"Function to call when network communication has failed."}},{name:"ononline",description:{kind:"markdown",value:"Function to call when network communication has been restored."}},{name:"onpagehide"},{name:"onpageshow"},{name:"onpopstate",description:{kind:"markdown",value:"Function to call when the user has navigated session history."}},{name:"onstorage",description:{kind:"markdown",value:"Function to call when the storage area has changed."}},{name:"onunload",description:{kind:"markdown",value:"Function to call when the document is going away."}},{name:"alink",description:'Color of text for hyperlinks when selected. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color "The color CSS property sets the foreground color value of an element\'s text and text decorations, and sets the currentcolor value.") property in conjunction with the [`:active`](https://developer.mozilla.org/en-US/docs/Web/CSS/:active "The :active CSS pseudo-class represents an element (such as a button) that is being activated by the user.") pseudo-class instead._'},{name:"background",description:'URI of a image to use as a background. _This method is non-conforming, use CSS [`background`](https://developer.mozilla.org/en-US/docs/Web/CSS/background "The background shorthand CSS property sets all background style properties at once, such as color, image, origin and size, or repeat method.") property on the element instead._'},{name:"bgcolor",description:'Background color for the document. _This method is non-conforming, use CSS [`background-color`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color "The background-color CSS property sets the background color of an element.") property on the element instead._'},{name:"bottommargin",description:'The margin of the bottom of the body. _This method is non-conforming, use CSS [`margin-bottom`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom "The margin-bottom CSS property sets the margin area on the bottom of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") property on the element instead._'},{name:"leftmargin",description:'The margin of the left of the body. _This method is non-conforming, use CSS [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left "The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") property on the element instead._'},{name:"link",description:'Color of text for unvisited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color "The color CSS property sets the foreground color value of an element\'s text and text decorations, and sets the currentcolor value.") property in conjunction with the [`:link`](https://developer.mozilla.org/en-US/docs/Web/CSS/:link "The :link CSS pseudo-class represents an element that has not yet been visited. It matches every unvisited <a>, <area>, or <link> element that has an href attribute.") pseudo-class instead._'},{name:"onblur",description:"Function to call when the document loses focus."},{name:"onerror",description:"Function to call when the document fails to load properly."},{name:"onfocus",description:"Function to call when the document receives focus."},{name:"onload",description:"Function to call when the document has finished loading."},{name:"onredo",description:"Function to call when the user has moved forward in undo transaction history."},{name:"onresize",description:"Function to call when the document has been resized."},{name:"onundo",description:"Function to call when the user has moved backward in undo transaction history."},{name:"rightmargin",description:'The margin of the right of the body. _This method is non-conforming, use CSS [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right "The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") property on the element instead._'},{name:"text",description:'Foreground color of text. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color "The color CSS property sets the foreground color value of an element\'s text and text decorations, and sets the currentcolor value.") property on the element instead._'},{name:"topmargin",description:'The margin of the top of the body. _This method is non-conforming, use CSS [`margin-top`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top "The margin-top CSS property sets the margin area on the top of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") property on the element instead._'},{name:"vlink",description:'Color of text for visited hypertext links. _This method is non-conforming, use CSS [`color`](https://developer.mozilla.org/en-US/docs/Web/CSS/color "The color CSS property sets the foreground color value of an element\'s text and text decorations, and sets the currentcolor value.") property in conjunction with the [`:visited`](https://developer.mozilla.org/en-US/docs/Web/CSS/:visited "The :visited CSS pseudo-class represents links that the user has already visited. For privacy reasons, the styles that can be modified using this selector are very limited.") pseudo-class instead._'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/body"}]},{name:"article",description:{kind:"markdown",value:"The article element represents a complete, or self-contained, composition in a document, page, application, or site and that is, in principle, independently distributable or reusable, e.g. in syndication. This could be a forum post, a magazine or newspaper article, a blog entry, a user-submitted comment, an interactive widget or gadget, or any other independent item of content. Each article should be identified, typically by including a heading (h1\u2013h6 element) as a child of the article element."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/article"}]},{name:"section",description:{kind:"markdown",value:"The section element represents a generic section of a document or application. A section, in this context, is a thematic grouping of content. Each section should be identified, typically by including a heading ( h1- h6 element) as a child of the section element."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/section"}]},{name:"nav",description:{kind:"markdown",value:"The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/nav"}]},{name:"aside",description:{kind:"markdown",value:"The aside element represents a section of a page that consists of content that is tangentially related to the content around the aside element, and which could be considered separate from that content. Such sections are often represented as sidebars in printed typography."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/aside"}]},{name:"h1",description:{kind:"markdown",value:"The h1 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"h2",description:{kind:"markdown",value:"The h2 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"h3",description:{kind:"markdown",value:"The h3 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"h4",description:{kind:"markdown",value:"The h4 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"h5",description:{kind:"markdown",value:"The h5 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"h6",description:{kind:"markdown",value:"The h6 element represents a section heading."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/Heading_Elements"}]},{name:"header",description:{kind:"markdown",value:"The header element represents introductory content for its nearest ancestor sectioning content or sectioning root element. A header typically contains a group of introductory or navigational aids. When the nearest ancestor sectioning content or sectioning root element is the body element, then it applies to the whole page."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/header"}]},{name:"footer",description:{kind:"markdown",value:"The footer element represents a footer for its nearest ancestor sectioning content or sectioning root element. A footer typically contains information about its section such as who wrote it, links to related documents, copyright data, and the like."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/footer"}]},{name:"address",description:{kind:"markdown",value:"The address element represents the contact information for its nearest article or body element ancestor. If that is the body element, then the contact information applies to the document as a whole."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/address"}]},{name:"p",description:{kind:"markdown",value:"The p element represents a paragraph."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/p"}]},{name:"hr",description:{kind:"markdown",value:"The hr element represents a paragraph-level thematic break, e.g. a scene change in a story, or a transition to another topic within a section of a reference book."},attributes:[{name:"align",description:"Sets the alignment of the rule on the page. If no value is specified, the default value is `left`."},{name:"color",description:"Sets the color of the rule through color name or hexadecimal value."},{name:"noshade",description:"Sets the rule to have no shading."},{name:"size",description:"Sets the height, in pixels, of the rule."},{name:"width",description:"Sets the length of the rule on the page through a pixel or percentage value."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/hr"}]},{name:"pre",description:{kind:"markdown",value:"The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements."},attributes:[{name:"cols",description:'Contains the _preferred_ count of characters that a line should have. It was a non-standard synonym of [`width`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/pre#attr-width). To achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width "The width CSS property sets an element\'s width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.") instead.'},{name:"width",description:'Contains the _preferred_ count of characters that a line should have. Though technically still implemented, this attribute has no visual effect; to achieve such an effect, use CSS [`width`](https://developer.mozilla.org/en-US/docs/Web/CSS/width "The width CSS property sets an element\'s width. By default it sets the width of the content area, but if box-sizing is set to border-box, it sets the width of the border area.") instead.'},{name:"wrap",description:'Is a _hint_ indicating how the overflow must happen. In modern browser this hint is ignored and no visual effect results in its present; to achieve such an effect, use CSS [`white-space`](https://developer.mozilla.org/en-US/docs/Web/CSS/white-space "The white-space CSS property sets how white space inside an element is handled.") instead.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/pre"}]},{name:"blockquote",description:{kind:"markdown",value:"The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a footer or cite element, and optionally with in-line changes such as annotations and abbreviations."},attributes:[{name:"cite",description:{kind:"markdown",value:"A URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/blockquote"}]},{name:"ol",description:{kind:"markdown",value:"The ol element represents a list of items, where the items have been intentionally ordered, such that changing the order would change the meaning of the document."},attributes:[{name:"reversed",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute specifies that the items of the list are specified in reversed order."}},{name:"start",description:{kind:"markdown",value:'This integer attribute specifies the start value for numbering the individual list items. Although the ordering type of list elements might be Roman numerals, such as XXXI, or letters, the value of start is always represented as a number. To start numbering elements from the letter "C", use `<ol start="3">`.\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.'}},{name:"type",valueSet:"lt",description:{kind:"markdown",value:"Indicates the numbering type:\n\n* `'a'` indicates lowercase letters,\n* `'A'` indicates uppercase letters,\n* `'i'` indicates lowercase Roman numerals,\n* `'I'` indicates uppercase Roman numerals,\n* and `'1'` indicates numbers (default).\n\nThe type set is used for the entire list unless a different [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li#attr-type) attribute is used within an enclosed [`<li>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li \"The HTML <li> element is used to represent an item in a list. It must be contained in a parent element: an ordered list (<ol>), an unordered list (<ul>), or a menu (<menu>). In menus and unordered lists, list items are usually displayed using bullet points. In ordered lists, they are usually displayed with an ascending counter on the left, such as a number or letter.\") element.\n\n**Note:** This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\nUnless the value of the list number matters (e.g. in legal or technical documents where items are to be referenced by their number/letter), the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type \"The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.\") property should be used instead."}},{name:"compact",description:'This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn\'t work in all browsers.\n\n**Warning:** Do not use this attribute, as it has been deprecated: the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol "The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give an effect similar to the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [`line-height`](https://developer.mozilla.org/en-US/docs/Web/CSS/line-height "The line-height CSS property sets the amount of space used for lines, such as in text. On block-level elements, it specifies the minimum height of line boxes within the element. On non-replaced inline elements, it specifies the height that is used to calculate line box height.") can be used with a value of `80%`.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/ol"}]},{name:"ul",description:{kind:"markdown",value:"The ul element represents a list of items, where the order of the items is not important \u2014 that is, where changing the order would not materially change the meaning of the document."},attributes:[{name:"compact",description:'This Boolean attribute hints that the list should be rendered in a compact style. The interpretation of this attribute depends on the user agent and it doesn\'t work in all browsers.\n\n**Usage note:\xA0**Do not use this attribute, as it has been deprecated: the [`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul "The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To give a similar effect as the `compact` attribute, the [CSS](https://developer.mozilla.org/en-US/docs/CSS) property [line-height](https://developer.mozilla.org/en-US/docs/CSS/line-height) can be used with a value of `80%`.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/ul"}]},{name:"li",description:{kind:"markdown",value:"The li element represents a list item. If its parent element is an ol, ul, or menu element, then the element is an item of the parent element's list, as defined for those elements. Otherwise, the list item has no defined list-related relationship to any other li element."},attributes:[{name:"value",description:{kind:"markdown",value:'This integer attribute indicates the current ordinal value of the list item as defined by the [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol "The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.") element. The only allowed value for this attribute is a number, even if the list is displayed with Roman numerals or letters. List items that follow this one continue numbering from the value set. The **value** attribute has no meaning for unordered lists ([`<ul>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ul "The HTML <ul> element represents an unordered list of items, typically rendered as a bulleted list.")) or for menus ([`<menu>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/menu "The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.")).\n\n**Note**: This attribute was deprecated in HTML4, but reintroduced in HTML5.\n\n**Note:** Prior to Gecko\xA09.0, negative values were incorrectly converted to 0. Starting in Gecko\xA09.0 all integer values are correctly parsed.'}},{name:"type",description:'This character attribute indicates the numbering type:\n\n* `a`: lowercase letters\n* `A`: uppercase letters\n* `i`: lowercase Roman numerals\n* `I`: uppercase Roman numerals\n* `1`: numbers\n\nThis type overrides the one used by its parent [`<ol>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ol "The HTML <ol> element represents an ordered list of items, typically rendered as a numbered list.") element, if any.\n\n**Usage note:** This attribute has been deprecated: use the CSS [`list-style-type`](https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type "The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.") property instead.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/li"}]},{name:"dl",description:{kind:"markdown",value:"The dl element represents an association list consisting of zero or more name-value groups (a description list). A name-value group consists of one or more names (dt elements) followed by one or more values (dd elements), ignoring any nodes other than dt and dd elements. Within a single dl element, there should not be more than one dt element for each name."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/dl"}]},{name:"dt",description:{kind:"markdown",value:"The dt element represents the term, or name, part of a term-description group in a description list (dl element)."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/dt"}]},{name:"dd",description:{kind:"markdown",value:"The dd element represents the description, definition, or value, part of a term-description group in a description list (dl element)."},attributes:[{name:"nowrap",description:"If the value of this attribute is set to `yes`, the definition text will not wrap. The default value is `no`."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/dd"}]},{name:"figure",description:{kind:"markdown",value:"The figure element represents some flow content, optionally with a caption, that is self-contained (like a complete sentence) and is typically referenced as a single unit from the main flow of the document."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/figure"}]},{name:"figcaption",description:{kind:"markdown",value:"The figcaption element represents a caption or legend for the rest of the contents of the figcaption element's parent figure element, if any."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/figcaption"}]},{name:"main",description:{kind:"markdown",value:"The main element represents the main content of the body of a document or application. The main content area consists of content that is directly related to or expands upon the central topic of a document or central functionality of an application."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/main"}]},{name:"div",description:{kind:"markdown",value:"The div element has no special meaning at all. It represents its children. It can be used with the class, lang, and title attributes to mark up semantics common to a group of consecutive elements."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/div"}]},{name:"a",description:{kind:"markdown",value:"If the a element has an href attribute, then it represents a hyperlink (a hypertext anchor) labeled by its contents."},attributes:[{name:"href",description:{kind:"markdown",value:"Contains a URL or a URL fragment that the hyperlink points to."}},{name:"target",description:{kind:"markdown",value:'Specifies where to display the linked URL. It is a name of, or keyword for, a _browsing context_: a tab, window, or `<iframe>`. The following keywords have special meanings:\n\n* `_self`: Load the URL into the same browsing context as the current one. This is the default behavior.\n* `_blank`: Load the URL into a new browsing context. This is usually a tab, but users can configure browsers to use new windows instead.\n* `_parent`: Load the URL into the parent browsing context of the current one. If there is no parent, this behaves the same way as `_self`.\n* `_top`: Load the URL into the top-level browsing context (that is, the "highest" browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this behaves the same way as `_self`.\n\n**Note:** When using `target`, consider adding `rel="noreferrer"` to avoid exploitation of the `window.opener` API.\n\n**Note:** Linking to another page using `target="_blank"` will run the new page on the same process as your page. If the new page is executing expensive JS, your page\'s performance may suffer. To avoid this use `rel="noopener"`.'}},{name:"download",description:{kind:"markdown",value:"This attribute instructs browsers to download a URL instead of navigating to it, so the user will be prompted to save it as a local file. If the attribute has a value, it is used as the pre-filled file name in the Save prompt (the user can still change the file name if they want). There are no restrictions on allowed values, though `/` and `\\` are converted to underscores. Most file systems limit some punctuation in file names, and browsers will adjust the suggested name accordingly.\n\n**Notes:**\n\n* This attribute only works for [same-origin URLs](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy).\n* Although HTTP(s) URLs need to be in the same-origin, [`blob:` URLs](https://developer.mozilla.org/en-US/docs/Web/API/URL.createObjectURL) and [`data:` URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs) are allowed so that content generated by JavaScript, such as pictures created in an image-editor Web app, can be downloaded.\n* If the HTTP header [`Content-Disposition:`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) gives a different filename than this attribute, the HTTP header takes priority over this attribute.\n* If `Content-Disposition:` is set to `inline`, Firefox prioritizes `Content-Disposition`, like the filename case, while Chrome prioritizes the `download` attribute."}},{name:"ping",description:{kind:"markdown",value:'Contains a space-separated list of URLs to which, when the hyperlink is followed, [`POST`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST "The HTTP POST method sends data to the server. The type of the body of the request is indicated by the Content-Type header.") requests with the body `PING` will be sent by the browser (in the background). Typically used for tracking.'}},{name:"rel",description:{kind:"markdown",value:"Specifies the relationship of the target object to the link object. The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types)."}},{name:"hreflang",description:{kind:"markdown",value:'This attribute indicates the human language of the linked resource. It is purely advisory, with no built-in functionality. Allowed values are determined by [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt "Tags for Identifying Languages").'}},{name:"type",description:{kind:"markdown",value:'Specifies the media type in the form of a [MIME type](https://developer.mozilla.org/en-US/docs/Glossary/MIME_type "MIME type: A\xA0MIME type\xA0(now properly called "media type", but\xA0also sometimes "content type") is a string sent along\xA0with a file indicating the type of the file (describing the content format, for example, a sound file might be labeled\xA0audio/ogg, or an image file\xA0image/png).") for the linked URL. It is purely advisory, with no built-in functionality.'}},{name:"referrerpolicy",description:"Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer) to send when fetching the URL:\n\n* `'no-referrer'` means the `Referer:` header will not be sent.\n* `'no-referrer-when-downgrade'` means no `Referer:` header will be sent when navigating to an origin without HTTPS. This is the default behavior.\n* `'origin'` means the referrer will be the [origin](https://developer.mozilla.org/en-US/docs/Glossary/Origin) of the page, not including information after the domain.\n* `'origin-when-cross-origin'` meaning that navigations to other origins will be limited to the scheme, the host and the port, while navigations on the same origin will include the referrer's path.\n* `'strict-origin-when-cross-origin'`\n* `'unsafe-url'` means the referrer will include the origin and path, but not the fragment, password, or username. This is unsafe because it can leak data from secure URLs to insecure ones."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/a"}]},{name:"em",description:{kind:"markdown",value:"The em element represents stress emphasis of its contents."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/em"}]},{name:"strong",description:{kind:"markdown",value:"The strong element represents strong importance, seriousness, or urgency for its contents."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/strong"}]},{name:"small",description:{kind:"markdown",value:"The small element represents side comments such as small print."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/small"}]},{name:"s",description:{kind:"markdown",value:"The s element represents contents that are no longer accurate or no longer relevant."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/s"}]},{name:"cite",description:{kind:"markdown",value:"The cite element represents a reference to a creative work. It must include the title of the work or the name of the author(person, people or organization) or an URL reference, or a reference in abbreviated form as per the conventions used for the addition of citation metadata."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/cite"}]},{name:"q",description:{kind:"markdown",value:"The q element represents some phrasing content quoted from another source."},attributes:[{name:"cite",description:{kind:"markdown",value:"The value of this attribute is a URL that designates a source document or message for the information quoted. This attribute is intended to point to information explaining the context or the reference for the quote."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/q"}]},{name:"dfn",description:{kind:"markdown",value:"The dfn element represents the defining instance of a term. The paragraph, description list group, or section that is the nearest ancestor of the dfn element must also contain the definition(s) for the term given by the dfn element."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/dfn"}]},{name:"abbr",description:{kind:"markdown",value:"The abbr element represents an abbreviation or acronym, optionally with its expansion. The title attribute may be used to provide an expansion of the abbreviation. The attribute, if specified, must contain an expansion of the abbreviation, and nothing else."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/abbr"}]},{name:"ruby",description:{kind:"markdown",value:"The ruby element allows one or more spans of phrasing content to be marked with ruby annotations. Ruby annotations are short runs of text presented alongside base text, primarily used in East Asian typography as a guide for pronunciation or to include other annotations. In Japanese, this form of typography is also known as furigana. Ruby text can appear on either side, and sometimes both sides, of the base text, and it is possible to control its position using CSS. A more complete introduction to ruby can be found in the Use Cases & Exploratory Approaches for Ruby Markup document as well as in CSS Ruby Module Level 1. [RUBY-UC] [CSSRUBY]"},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/ruby"}]},{name:"rb",description:{kind:"markdown",value:"The rb element marks the base text component of a ruby annotation. When it is the child of a ruby element, it doesn't represent anything itself, but its parent ruby element uses it as part of determining what it represents."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/rb"}]},{name:"rt",description:{kind:"markdown",value:"The rt element marks the ruby text component of a ruby annotation. When it is the child of a ruby element or of an rtc element that is itself the child of a ruby element, it doesn't represent anything itself, but its ancestor ruby element uses it as part of determining what it represents."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/rt"}]},{name:"rp",description:{kind:"markdown",value:"The rp element is used to provide fallback text to be shown by user agents that don't support ruby annotations. One widespread convention is to provide parentheses around the ruby text component of a ruby annotation."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/rp"}]},{name:"time",description:{kind:"markdown",value:"The time element represents its contents, along with a machine-readable form of those contents in the datetime attribute. The kind of content is limited to various kinds of dates, times, time-zone offsets, and durations, as described below."},attributes:[{name:"datetime",description:{kind:"markdown",value:"This attribute indicates the time and/or date of the element and must be in one of the formats described below."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/time"}]},{name:"code",description:{kind:"markdown",value:"The code element represents a fragment of computer code. This could be an XML element name, a file name, a computer program, or any other string that a computer would recognize."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/code"}]},{name:"var",description:{kind:"markdown",value:"The var element represents a variable. This could be an actual variable in a mathematical expression or programming context, an identifier representing a constant, a symbol identifying a physical quantity, a function parameter, or just be a term used as a placeholder in prose."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/var"}]},{name:"samp",description:{kind:"markdown",value:"The samp element represents sample or quoted output from another program or computing system."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/samp"}]},{name:"kbd",description:{kind:"markdown",value:"The kbd element represents user input (typically keyboard input, although it may also be used to represent other input, such as voice commands)."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/kbd"}]},{name:"sub",description:{kind:"markdown",value:"The sub element represents a subscript."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/sub"}]},{name:"sup",description:{kind:"markdown",value:"The sup element represents a superscript."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/sup"}]},{name:"i",description:{kind:"markdown",value:"The i element represents a span of text in an alternate voice or mood, or otherwise offset from the normal prose in a manner indicating a different quality of text, such as a taxonomic designation, a technical term, an idiomatic phrase from another language, transliteration, a thought, or a ship name in Western texts."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/i"}]},{name:"b",description:{kind:"markdown",value:"The b element represents a span of text to which attention is being drawn for utilitarian purposes without conveying any extra importance and with no implication of an alternate voice or mood, such as key words in a document abstract, product names in a review, actionable words in interactive text-driven software, or an article lede."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/b"}]},{name:"u",description:{kind:"markdown",value:"The u element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelt."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/u"}]},{name:"mark",description:{kind:"markdown",value:"The mark element represents a run of text in one document marked or highlighted for reference purposes, due to its relevance in another context. When used in a quotation or other block of text referred to from the prose, it indicates a highlight that was not originally present but which has been added to bring the reader's attention to a part of the text that might not have been considered important by the original author when the block was originally written, but which is now under previously unexpected scrutiny. When used in the main prose of a document, it indicates a part of the document that has been highlighted due to its likely relevance to the user's current activity."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/mark"}]},{name:"bdi",description:{kind:"markdown",value:"The bdi element represents a span of text that is to be isolated from its surroundings for the purposes of bidirectional text formatting. [BIDI]"},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/bdi"}]},{name:"bdo",description:{kind:"markdown",value:"The bdo element represents explicit text directionality formatting control for its children. It allows authors to override the Unicode bidirectional algorithm by explicitly specifying a direction override. [BIDI]"},attributes:[{name:"dir",description:"The direction in which text should be rendered in this element's contents. Possible values are:\n\n* `ltr`: Indicates that the text should go in a left-to-right direction.\n* `rtl`: Indicates that the text should go in a right-to-left direction."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/bdo"}]},{name:"span",description:{kind:"markdown",value:"The span element doesn't mean anything on its own, but can be useful when used together with the global attributes, e.g. class, lang, or dir. It represents its children."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/span"}]},{name:"br",description:{kind:"markdown",value:"The br element represents a line break."},attributes:[{name:"clear",description:"Indicates where to begin the next line after the break."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/br"}]},{name:"wbr",description:{kind:"markdown",value:"The wbr element represents a line break opportunity."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/wbr"}]},{name:"ins",description:{kind:"markdown",value:"The ins element represents an addition to the document."},attributes:[{name:"cite",description:"This attribute defines the URI of a resource that explains the change, such as a link to meeting minutes or a ticket in a troubleshooting system."},{name:"datetime",description:'This attribute indicates the time and date of the change and must be a valid date with an optional time string. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article."). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.").'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/ins"}]},{name:"del",description:{kind:"markdown",value:"The del element represents a removal from the document."},attributes:[{name:"cite",description:{kind:"markdown",value:"A URI for a resource that explains the change (for example, meeting minutes)."}},{name:"datetime",description:{kind:"markdown",value:'This attribute indicates the time and date of the change and must be a valid date string with an optional time. If the value cannot be parsed as a date with an optional time string, the element does not have an associated time stamp. For the format of the string without a time, see [Format of a valid date string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_date_string "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article."). The format of the string if it includes both date and time is covered in [Format of a valid local date and time string](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats#Format_of_a_valid_local_date_and_time_string "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.") in [Date and time formats used in HTML](https://developer.mozilla.org/en-US/docs/Web/HTML/Date_and_time_formats "Certain HTML elements use date and/or time values. The formats of the strings that specify these are described in this article.").'}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/del"}]},{name:"picture",description:{kind:"markdown",value:"The picture element is a container which provides multiple sources to its contained img element to allow authors to declaratively control or give hints to the user agent about which image resource to use, based on the screen pixel density, viewport size, image format, and other factors. It represents its children."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/picture"}]},{name:"img",description:{kind:"markdown",value:"An img element represents an image."},attributes:[{name:"alt",description:{kind:"markdown",value:'This attribute defines an alternative text description of the image.\n\n**Note:** Browsers do not always display the image referenced by the element. This is the case for non-graphical browsers (including those used by people with visual impairments), if the user chooses not to display images, or if the browser cannot display the image because it is invalid or an [unsupported type](#Supported_image_formats). In these cases, the browser may replace the image with the text defined in this element\'s `alt` attribute. You should, for these reasons and others, provide a useful value for `alt` whenever possible.\n\n**Note:** Omitting this attribute altogether indicates that the image is a key part of the content, and no textual equivalent is available. Setting this attribute to an empty string (`alt=""`) indicates that this image is _not_ a key part of the content (decorative), and that non-visual browsers may omit it from rendering.'}},{name:"src",description:{kind:"markdown",value:"The image URL. This attribute is mandatory for the `<img>` element. On browsers supporting `srcset`, `src` is treated like a candidate image with a pixel density descriptor `1x` unless an image with this pixel density descriptor is already defined in `srcset,` or unless `srcset` contains '`w`' descriptors."}},{name:"srcset",description:{kind:"markdown",value:"A list of one or more strings separated by commas indicating a set of possible image sources for the user agent to use. Each string is composed of:\n\n1. a URL to an image,\n2. optionally, whitespace followed by one of:\n * A width descriptor, or a positive integer directly followed by '`w`'. The width descriptor is divided by the source size given in the `sizes` attribute to calculate the effective pixel density.\n * A pixel density descriptor, which is a positive floating point number directly followed by '`x`'.\n\nIf no descriptor is specified, the source is assigned the default descriptor: `1x`.\n\nIt is incorrect to mix width descriptors and pixel density descriptors in the same `srcset` attribute. Duplicate descriptors (for instance, two sources in the same `srcset` which are both described with '`2x`') are also invalid.\n\nThe user agent selects any one of the available sources at its discretion. This provides them with significant leeway to tailor their selection based on things like user preferences or bandwidth conditions. See our [Responsive images](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) tutorial for an example."}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'This enumerated attribute indicates if the fetching of the related image must be done using CORS or not. [CORS-enabled images](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being "[tainted](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image#What_is_a_tainted_canvas)." The allowed values are:'}},{name:"usemap",description:{kind:"markdown",value:'The partial URL (starting with \'#\') of an [image map](https://developer.mozilla.org/en-US/docs/HTML/Element/map) associated with the element.\n\n**Note:** You cannot use this attribute if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") element.'}},{name:"ismap",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute indicates that the image is part of a server-side map. If so, the precise coordinates of a click are sent to the server.\n\n**Note:** This attribute is allowed only if the `<img>` element is a descendant of an [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL.") element with a valid [`href`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#attr-href) attribute.'}},{name:"width",description:{kind:"markdown",value:"The intrinsic width of the image in pixels."}},{name:"height",description:{kind:"markdown",value:"The intrinsic height of the image in pixels."}},{name:"decoding",description:"Provides an image decoding hint to the browser. The allowed values are:"},{name:"decoding",description:`\`sync\` + +Decode the image synchronously for atomic presentation with other content. + +\`async\` + +Decode the image asynchronously to reduce delay in presenting other content. + +\`auto\` + +Default mode, which indicates no preference for the decoding mode. The browser decides what is best for the user.`},{name:"importance",description:"Indicates the relative importance of the resource. Priority hints are delegated using the values:"},{name:"importance",description:"`auto`: Indicates\xA0**no\xA0preference**. The browser may use its own heuristics to decide the priority of the image.\n\n`high`: Indicates to the\xA0browser\xA0that the image is of\xA0**high** priority.\n\n`low`:\xA0Indicates to the\xA0browser\xA0that the image is of\xA0**low** priority."},{name:"intrinsicsize",description:"This attribute tells the browser to ignore the actual intrinsic size of the image and pretend it\u2019s the size specified in the attribute. Specifically, the image would raster at these dimensions and `naturalWidth`/`naturalHeight` on images would return the values specified in this attribute. [Explainer](https://github.com/ojanvafai/intrinsicsize-attribute), [examples](https://googlechrome.github.io/samples/intrinsic-size/index.html)"},{name:"referrerpolicy",description:"A string indicating which referrer to use when fetching the resource:\n\n* `no-referrer:` The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer \"The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.\") header will not be sent.\n* `no-referrer-when-downgrade:` No `Referer` header will be sent when navigating to an origin without TLS (HTTPS). This is a user agent\u2019s default behavior if no policy is otherwise specified.\n* `origin:` The `Referer` header will include the page of origin's scheme, the host, and the port.\n* `origin-when-cross-origin:` Navigating to other origins will limit the included referral data to the scheme, the host and the port, while navigating from the same origin will include the referrer's full path.\n* `unsafe-url:` The `Referer` header will include the origin and the path, but not the fragment, password, or username. This case is unsafe because it can leak origins and paths from TLS-protected resources to insecure origins."},{name:"sizes",description:"A list of one or more strings separated by commas indicating a set of source sizes. Each source size consists of:\n\n1. a media condition. This must be omitted for the last item.\n2. a source size value.\n\nSource size values specify the intended display size of the image. User agents use the current source size to select one of the sources supplied by the `srcset` attribute, when those sources are described using width ('`w`') descriptors. The selected source size affects the intrinsic size of the image (the image\u2019s display size if no CSS styling is applied). If the `srcset` attribute is absent, or contains no values with a width (`w`) descriptor, then the `sizes` attribute has no effect."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/img"}]},{name:"iframe",description:{kind:"markdown",value:"The iframe element represents a nested browsing context."},attributes:[{name:"src",description:{kind:"markdown",value:'The URL of the page to embed. Use a value of `about:blank` to embed an empty page that conforms to the [same-origin policy](https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy#Inherited_origins). Also note that programatically removing an `<iframe>`\'s src attribute (e.g. via [`Element.removeAttribute()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/removeAttribute "The Element method removeAttribute() removes the attribute with the specified name from the element.")) causes `about:blank` to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS.'}},{name:"srcdoc",description:{kind:"markdown",value:"Inline HTML to embed, overriding the `src` attribute. If a browser does not support the `srcdoc` attribute, it will fall back to the URL in the `src` attribute."}},{name:"name",description:{kind:"markdown",value:'A targetable name for the embedded browsing context. This can be used in the `target` attribute of the [`<a>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a "The HTML <a> element (or anchor element) creates a hyperlink to other web pages, files, locations within the same page, email addresses, or any other URL."), [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server."), or [`<base>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base "The HTML <base> element specifies the base URL to use for all relative URLs contained within a document. There can be only one <base> element in a document.") elements; the `formtarget` attribute of the [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") or [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") elements; or the `windowName` parameter in the [`window.open()`](https://developer.mozilla.org/en-US/docs/Web/API/Window/open "The\xA0Window interface\'s open() method loads the specified resource into the browsing context (window, <iframe> or tab) with the specified name. If the name doesn\'t exist, then a new window is opened and the specified resource is loaded into its browsing context.") method.'}},{name:"sandbox",valueSet:"sb",description:{kind:"markdown",value:'Applies extra restrictions to the content in the frame. The value of the attribute can either be empty to apply all restrictions, or space-separated tokens to lift particular restrictions:\n\n* `allow-forms`: Allows the resource to submit forms. If this keyword is not used, form submission is blocked.\n* `allow-modals`: Lets the resource [open modal windows](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-modals-flag).\n* `allow-orientation-lock`: Lets the resource [lock the screen orientation](https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).\n* `allow-pointer-lock`: Lets the resource use the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/WebAPI/Pointer_Lock).\n* `allow-popups`: Allows popups (such as `window.open()`, `target="_blank"`, or `showModalDialog()`). If this keyword is not used, the popup will silently fail to open.\n* `allow-popups-to-escape-sandbox`: Lets the sandboxed document open new windows without those windows inheriting the sandboxing. For example, this can safely sandbox an advertisement without forcing the same restrictions upon the page the ad links to.\n* `allow-presentation`: Lets the resource start a [presentation session](https://developer.mozilla.org/en-US/docs/Web/API/PresentationRequest).\n* `allow-same-origin`: If this token is not used, the resource is treated as being from a special origin that always fails the [same-origin policy](https://developer.mozilla.org/en-US/docs/Glossary/same-origin_policy "same-origin policy: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin.").\n* `allow-scripts`: Lets the resource run scripts (but not create popup windows).\n* `allow-storage-access-by-user-activation` : Lets the resource request access to the parent\'s storage capabilities with the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).\n* `allow-top-navigation`: Lets the resource navigate the top-level browsing context (the one named `_top`).\n* `allow-top-navigation-by-user-activation`: Lets the resource navigate the top-level browsing context, but only if initiated by a user gesture.\n\n**Notes about sandboxing:**\n\n* When the embedded document has the same origin as the embedding page, it is **strongly discouraged** to use both `allow-scripts` and `allow-same-origin`, as that lets the embedded document remove the `sandbox` attribute \u2014 making it no more secure than not using the `sandbox` attribute at all.\n* Sandboxing is useless if the attacker can display content outside a sandboxed `iframe` \u2014 such as if the viewer opens the frame in a new tab. Such content should be also served from a _separate origin_ to limit potential damage.\n* The `sandbox` attribute is unsupported in Internet Explorer 9 and earlier.'}},{name:"seamless",valueSet:"v"},{name:"allowfullscreen",valueSet:"v",description:{kind:"markdown",value:'Set to `true` if the `<iframe>` can activate fullscreen mode by calling the [`requestFullscreen()`](https://developer.mozilla.org/en-US/docs/Web/API/Element/requestFullscreen "The Element.requestFullscreen() method issues an asynchronous request to make the element be displayed in full-screen mode.") method.'}},{name:"width",description:{kind:"markdown",value:"The width of the frame in CSS pixels. Default is `300`."}},{name:"height",description:{kind:"markdown",value:"The height of the frame in CSS pixels. Default is `150`."}},{name:"allow",description:"Specifies a [feature policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Feature_Policy) for the `<iframe>`."},{name:"allowpaymentrequest",description:"Set to `true` if a cross-origin `<iframe>` should be allowed to invoke the [Payment Request API](https://developer.mozilla.org/en-US/docs/Web/API/Payment_Request_API)."},{name:"allowpaymentrequest",description:'This attribute is considered a legacy attribute and redefined as `allow="payment"`.'},{name:"csp",description:'A [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP) enforced for the embedded resource. See [`HTMLIFrameElement.csp`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp "The csp property of the HTMLIFrameElement interface specifies the Content Security Policy that an embedded document must agree to enforce upon itself.") for details.'},{name:"importance",description:`The download priority of the resource in the \`<iframe>\`'s \`src\` attribute. Allowed values: + +\`auto\` (default) + +No preference. The browser uses its own heuristics to decide the priority of the resource. + +\`high\` + +The resource should be downloaded before other lower-priority page resources. + +\`low\` + +The resource should be downloaded after other higher-priority page resources.`},{name:"referrerpolicy",description:'Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the frame\'s resource:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin "origin: Web content\'s origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS "TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS "HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host "host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails."), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port "port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy "same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin."), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (HTTPS\u2192HTTPS), but don\'t send it to a less secure destination (HTTPS\u2192HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, only send the origin when the protocol security level stays the same (HTTPS\u2192HTTPS), and send no header to a less secure destination (HTTPS\u2192HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/iframe"}]},{name:"embed",description:{kind:"markdown",value:"The embed element provides an integration point for an external (typically non-HTML) application or interactive content."},attributes:[{name:"src",description:{kind:"markdown",value:"The URL\xA0of the resource being embedded."}},{name:"type",description:{kind:"markdown",value:"The MIME\xA0type to use to select the plug-in to instantiate."}},{name:"width",description:{kind:"markdown",value:"The displayed width of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."}},{name:"height",description:{kind:"markdown",value:"The displayed height of the resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). This must be an absolute value; percentages are _not_ allowed."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/embed"}]},{name:"object",description:{kind:"markdown",value:"The object element can represent an external resource, which, depending on the type of the resource, will either be treated as an image, as a nested browsing context, or as an external resource to be processed by a plugin."},attributes:[{name:"data",description:{kind:"markdown",value:"The address of the resource as a valid URL. At least one of **data** and **type** must be defined."}},{name:"type",description:{kind:"markdown",value:"The [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource specified by **data**. At least one of **data** and **type** must be defined."}},{name:"typemustmatch",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute indicates if the **type** attribute and the actual [content type](https://developer.mozilla.org/en-US/docs/Glossary/Content_type) of the resource must match to be used."}},{name:"name",description:{kind:"markdown",value:"The name of valid browsing context (HTML5), or the name of the control (HTML 4)."}},{name:"usemap",description:{kind:"markdown",value:"A hash-name reference to a [`<map>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map \"The HTML <map> element is used with <area> elements to define an image map (a clickable link area).\") element; that is a '#' followed by the value of a [`name`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/map#attr-name) of a map element."}},{name:"form",description:{kind:"markdown",value:'The form element, if any, that the object element is associated with (its _form owner_). The value of the attribute must be an ID of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element in the same document.'}},{name:"width",description:{kind:"markdown",value:"The width of the display resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"}},{name:"height",description:{kind:"markdown",value:"The height of the displayed resource, in [CSS pixels](https://drafts.csswg.org/css-values/#px). -- (Absolute values only. [NO percentages](https://html.spec.whatwg.org/multipage/embedded-content.html#dimension-attributes))"}},{name:"archive",description:"A space-separated list of URIs for archives of resources for the object."},{name:"border",description:"The width of a border around the control, in pixels."},{name:"classid",description:"The URI of the object's implementation. It can be used together with, or in place of, the **data** attribute."},{name:"codebase",description:"The base path used to resolve relative URIs specified by **classid**, **data**, or **archive**. If not specified, the default is the base URI of the current document."},{name:"codetype",description:"The content type of the data specified by **classid**."},{name:"declare",description:"The presence of this Boolean attribute makes this element a declaration only. The object must be instantiated by a subsequent `<object>` element. In HTML5, repeat the <object> element completely each that that the resource is reused."},{name:"standby",description:"A message that the browser can show while loading the object's implementation and data."},{name:"tabindex",description:"The position of the element in the tabbing navigation order for the current document."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/object"}]},{name:"param",description:{kind:"markdown",value:"The param element defines parameters for plugins invoked by object elements. It does not represent anything on its own."},attributes:[{name:"name",description:{kind:"markdown",value:"Name of the parameter."}},{name:"value",description:{kind:"markdown",value:"Specifies the value of the parameter."}},{name:"type",description:'Only used if the `valuetype` is set to "ref". Specifies the MIME type of values found at the URI specified by value.'},{name:"valuetype",description:`Specifies the type of the \`value\` attribute. Possible values are: + +* data: Default value. The value is passed to the object's implementation as a string. +* ref: The value is a URI to a resource where run-time values are stored. +* object: An ID of another [\`<object>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object "The HTML <object> element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.") in the same document.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/param"}]},{name:"video",description:{kind:"markdown",value:"A video element is used for playing videos or movies, and audio files with captions."},attributes:[{name:"src"},{name:"crossorigin",valueSet:"xo"},{name:"poster"},{name:"preload",valueSet:"pl"},{name:"autoplay",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute; if specified, the video automatically begins to play back as soon as it can do so without stopping to finish loading the data."}},{name:"mediagroup"},{name:"loop",valueSet:"v"},{name:"muted",valueSet:"v"},{name:"controls",valueSet:"v"},{name:"width"},{name:"height"}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/video"}]},{name:"audio",description:{kind:"markdown",value:"An audio element represents a sound or audio stream."},attributes:[{name:"src",description:{kind:"markdown",value:'The URL of the audio to embed. This is subject to [HTTP access controls](https://developer.mozilla.org/en-US/docs/HTTP_access_control). This is optional; you may instead use the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source "The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.") element within the audio block to specify the audio to embed.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'This enumerated attribute indicates whether to use CORS to fetch the related image. [CORS-enabled resources](https://developer.mozilla.org/en-US/docs/CORS_Enabled_Image) can be reused in the [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") element without being _tainted_. The allowed values are:\n\nanonymous\n\nSends a cross-origin request without a credential. In other words, it sends the `Origin:` HTTP header without a cookie, X.509 certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (by not setting the `Access-Control-Allow-Origin:` HTTP header), the image will be _tainted_, and its usage restricted.\n\nuse-credentials\n\nSends a cross-origin request with a credential. In other words, it sends the `Origin:` HTTP header with a cookie, a certificate, or performing HTTP Basic authentication. If the server does not give credentials to the origin site (through `Access-Control-Allow-Credentials:` HTTP header), the image will be _tainted_ and its usage restricted.\n\nWhen not present, the resource is fetched without a CORS request (i.e. without sending the `Origin:` HTTP header), preventing its non-tainted used in [`<canvas>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas "Use the HTML <canvas> element with either the canvas scripting API or the WebGL API to draw graphics and animations.") elements. If invalid, it is handled as if the enumerated keyword **anonymous** was used. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/HTML/CORS_settings_attributes) for additional information.'}},{name:"preload",valueSet:"pl",description:{kind:"markdown",value:"This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values:\n\n* `none`: Indicates that the audio should not be preloaded.\n* `metadata`: Indicates that only audio metadata (e.g. length) is fetched.\n* `auto`: Indicates that the whole audio file can be downloaded, even if the user is not expected to use it.\n* _empty string_: A synonym of the `auto` value.\n\nIf not set, `preload`'s default value is browser-defined (i.e. each browser may have its own default value). The spec advises it to be set to `metadata`.\n\n**Usage notes:**\n\n* The `autoplay` attribute has precedence over\xA0`preload`. If `autoplay` is specified, the browser would obviously need to start downloading the audio for playback.\n* The browser is not forced by the specification to follow the value of this attribute; it is a mere hint."}},{name:"autoplay",valueSet:"v",description:{kind:"markdown",value:`A Boolean attribute:\xA0if specified, the audio will automatically begin playback as soon as it can do so, without waiting for the entire audio file to finish downloading. + +**Note**: Sites that automatically play audio (or videos with an audio track) can be an unpleasant experience for users, so should be avoided when possible. If you must offer autoplay functionality, you should make it opt-in (requiring a user to specifically enable it). However, this can be useful when creating media elements whose source will be set at a later time, under user control.`}},{name:"mediagroup"},{name:"loop",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute:\xA0if specified, the audio player will\xA0automatically seek back to the start\xA0upon reaching the end of the audio."}},{name:"muted",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute that indicates whether the audio will be initially silenced. Its default value is `false`."}},{name:"controls",valueSet:"v",description:{kind:"markdown",value:"If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/audio"}]},{name:"source",description:{kind:"markdown",value:"The source element allows authors to specify multiple alternative media resources for media elements. It does not represent anything on its own."},attributes:[{name:"src",description:{kind:"markdown",value:'Required for [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio "The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element:\xA0the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.") and [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video "The HTML Video element (<video>) embeds a media player which supports video playback into the document."), address of the media resource. The value of this attribute is ignored when the `<source>` element is placed inside a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture "The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.") element.'}},{name:"type",description:{kind:"markdown",value:"The MIME-type of the resource, optionally with a `codecs` parameter. See [RFC 4281](https://tools.ietf.org/html/rfc4281) for information about how to specify codecs."}},{name:"sizes",description:'Is a list of source sizes that describes the final rendered width of the image represented by the source. Each source size consists of a comma-separated list of media condition-length pairs. This information is used by the browser to determine, before laying the page out, which image defined in [`srcset`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source#attr-srcset) to use. \nThe `sizes` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source "The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture "The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.") element.'},{name:"srcset",description:"A list of one or more strings separated by commas indicating a set of possible images represented by the source for the browser to use. Each string is composed of:\n\n1. one URL to an image,\n2. a width descriptor, that is a positive integer directly followed by `'w'`. The default value, if missing, is the infinity.\n3. a pixel density descriptor, that is a positive floating number directly followed by `'x'`. The default value, if missing, is `1x`.\n\nEach string in the list must have at least a width descriptor or a pixel density descriptor to be valid. Among the list, there must be only one string containing the same tuple of width descriptor and pixel density descriptor. \nThe browser chooses the most adequate image to display at a given point of time. \nThe `srcset` attribute has an effect only when the [`<source>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/source \"The HTML <source> element specifies multiple media resources for the <picture>, the <audio> element, or the <video> element.\") element is the direct child of a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture \"The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.\") element."},{name:"media",description:'[Media query](https://developer.mozilla.org/en-US/docs/CSS/Media_queries) of the resource\'s intended media; this should be used only in a [`<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture "The HTML <picture> element contains zero or more <source> elements and one <img> element to provide versions of an image for different display/device scenarios.") element.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/source"}]},{name:"track",description:{kind:"markdown",value:"The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own."},attributes:[{name:"default",valueSet:"v",description:{kind:"markdown",value:"This attribute indicates that the track should be enabled unless the user's preferences indicate that another track is more appropriate. This may only be used on one `track` element per media element."}},{name:"kind",valueSet:"tk",description:{kind:"markdown",value:"How the text track is meant to be used. If omitted the default kind is `subtitles`. If the attribute is not present, it will use the `subtitles`. If the attribute contains an invalid value, it will use `metadata`. (Versions of Chrome earlier than 52 treated an invalid value as `subtitles`.)\xA0The following keywords are allowed:\n\n* `subtitles`\n * Subtitles provide translation of content that cannot be understood by the viewer. For example dialogue or text that is not English in an English language film.\n * Subtitles may contain additional content, usually extra background information. For example the text at the beginning of the Star Wars films, or the date, time, and location of a scene.\n* `captions`\n * Closed captions provide a transcription and possibly a translation of audio.\n * It may include important non-verbal information such as music cues or sound effects. It may indicate the cue's source (e.g. music, text, character).\n * Suitable for users who are deaf or when the sound is muted.\n* `descriptions`\n * Textual description of the video content.\n * Suitable for users who are blind or where the video cannot be seen.\n* `chapters`\n * Chapter titles are intended to be used when the user is navigating the media resource.\n* `metadata`\n * Tracks used by scripts. Not visible to the user."}},{name:"label",description:{kind:"markdown",value:"A user-readable title of the text track which is used by the browser when listing available text tracks."}},{name:"src",description:{kind:"markdown",value:'Address of the track (`.vtt` file). Must be a valid URL. This attribute must be specified and its URL value must have the same origin as the document \u2014 unless the [`<audio>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/audio "The HTML <audio> element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element:\xA0the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.") or [`<video>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video "The HTML Video element (<video>) embeds a media player which supports video playback into the document.") parent element of the `track` element has a [`crossorigin`](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) attribute.'}},{name:"srclang",description:{kind:"markdown",value:"Language of the track text data. It must be a valid [BCP 47](https://r12a.github.io/app-subtags/) language tag. If the `kind` attribute is set to\xA0`subtitles,` then `srclang` must be defined."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/track"}]},{name:"map",description:{kind:"markdown",value:"The map element, in conjunction with an img element and any area element descendants, defines an image map. The element represents its children."},attributes:[{name:"name",description:{kind:"markdown",value:"The name attribute gives the map a name so that it can be referenced. The attribute must be present and must have a non-empty value with no space characters. The value of the name attribute must not be a compatibility-caseless match for the value of the name attribute of another map element in the same document. If the id attribute is also specified, both attributes must have the same value."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/map"}]},{name:"area",description:{kind:"markdown",value:"The area element represents either a hyperlink with some text and a corresponding area on an image map, or a dead area on an image map."},attributes:[{name:"alt"},{name:"coords"},{name:"shape",valueSet:"sh"},{name:"href"},{name:"target"},{name:"download"},{name:"ping"},{name:"rel"},{name:"hreflang"},{name:"type"},{name:"accesskey",description:"Specifies a keyboard navigation accelerator for the element. Pressing ALT or a similar key in association with the specified character selects the form control correlated with that key sequence. Page designers are forewarned to avoid key sequences already bound to browsers. This attribute is global since HTML5."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/area"}]},{name:"table",description:{kind:"markdown",value:"The table element represents data with more than one dimension, in the form of a table."},attributes:[{name:"border"},{name:"align",description:'This enumerated attribute indicates how the table must be aligned inside the containing document. It may have the following values:\n\n* left: the table is displayed on the left side of the document;\n* center: the table is displayed in the center of the document;\n* right: the table is displayed on the right side of the document.\n\n**Usage Note**\n\n* **Do not use this attribute**, as it has been deprecated. The [`<table>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/table "The HTML <table> element represents tabular data \u2014 that is, information presented in a two-dimensional table comprised of rows and columns of cells containing data.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). Set [`margin-left`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left "The margin-left CSS property sets the margin area on the left side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") and [`margin-right`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right "The margin-right CSS property sets the margin area on the right side of an element. A positive value places it farther from its neighbors, while a negative value places it closer.") to `auto` or [`margin`](https://developer.mozilla.org/en-US/docs/Web/CSS/margin "The margin CSS property sets the margin area on all four sides of an element. It is a shorthand for margin-top, margin-right, margin-bottom, and margin-left.") to `0 auto` to achieve an effect that is similar to the align attribute.\n* Prior to Firefox 4, Firefox also supported the `middle`, `absmiddle`, and `abscenter` values as synonyms of `center`, in quirks mode only.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/table"}]},{name:"caption",description:{kind:"markdown",value:"The caption element represents the title of the table that is its parent, if it has a parent and that is a table element."},attributes:[{name:"align",description:`This enumerated attribute indicates how the caption must be aligned with respect to the table. It may have one of the following values: + +\`left\` + +The caption is displayed to the left of the table. + +\`top\` + +The caption is displayed above the table. + +\`right\` + +The caption is displayed to the right of the table. + +\`bottom\` + +The caption is displayed below the table. + +**Usage note:** Do not use this attribute, as it has been deprecated. The [\`<caption>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption "The HTML Table Caption element (<caption>) specifies the caption (or title) of a table, and if used is always the first child of a <table>.") element should be styled using the [CSS](https://developer.mozilla.org/en-US/docs/CSS) properties [\`caption-side\`](https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side "The caption-side CSS property puts the content of a table's <caption> on the specified side. The values are relative to the writing-mode of the table.") and [\`text-align\`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.").`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/caption"}]},{name:"colgroup",description:{kind:"markdown",value:"The colgroup element represents a group of one or more columns in the table that is its parent, if it has a parent and that is a table element."},attributes:[{name:"span"},{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nIf this attribute is not set, the `left` value is assumed. The descendant [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col "The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.") elements may override this value using their own [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-align) attribute.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on a selector giving a [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup "The HTML <colgroup> element defines a group of columns within a table.") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td "The HTML <td> element defines a cell of a table that contains data. It participates in the table model.") elements are not descendant of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup "The HTML <colgroup> element defines a group of columns within a table.") element, they won\'t inherit it.\n * If the table doesn\'t use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use one `td:nth-child(an+b)` CSS selector per column, where a is the total number of the columns in the table and b is the ordinal position of this column in the table. Only after this selector the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property can be used.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/colgroup"}]},{name:"col",description:{kind:"markdown",value:"If a col element has a parent and that is a colgroup element that itself has a parent that is a table element, then the col element represents one or more columns in the column group represented by that colgroup."},attributes:[{name:"span"},{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each column cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nIf this attribute is not set, its value is inherited from the [`align`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup#attr-align) of the [`<colgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/colgroup "The HTML <colgroup> element defines a group of columns within a table.") element this `<col>` element belongs too. If there are none, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values:\n * Do not try to set the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on a selector giving a [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col "The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.") element. Because [`<td>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td "The HTML <td> element defines a cell of a table that contains data. It participates in the table model.") elements are not descendant of the [`<col>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col "The HTML <col> element defines a column within a table and is used for defining common semantics on all common cells. It is generally found within a <colgroup> element.") element, they won\'t inherit it.\n * If the table doesn\'t use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, use the `td:nth-child(an+b)` CSS selector. Set `a` to zero and `b` to the position of the column in the table, e.g. `td:nth-child(2) { text-align: right; }` to right-align the second column.\n * If the table does use a [`colspan`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan) attribute, the effect can be achieved by combining adequate CSS attribute selectors like `[colspan=n]`, though this is not trivial.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/col#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/col"}]},{name:"tbody",description:{kind:"markdown",value:"The tbody element represents a block of rows that consist of a body of data for the parent table element, if the tbody element has a parent and it is a table."},attributes:[{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes.\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/tbody"}]},{name:"thead",description:{kind:"markdown",value:"The thead element represents the block of rows that consist of the column labels (headers) for the parent table element, if the thead element has a parent and it is a table."},attributes:[{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/thead#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/thead"}]},{name:"tfoot",description:{kind:"markdown",value:"The tfoot element represents the block of rows that consist of the column summaries (footers) for the parent table element, if the tfoot element has a parent and it is a table."},attributes:[{name:"align",description:'This enumerated attribute specifies how horizontal alignment of each cell content will be handled. Possible values are:\n\n* `left`, aligning the content to the left of the cell\n* `center`, centering the content in the cell\n* `right`, aligning the content to the right of the cell\n* `justify`, inserting spaces into the textual content so that the content is justified in the cell\n* `char`, aligning the textual content on a special character with a minimal offset, defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tbody#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nIf this attribute is not set, the `left` value is assumed.\n\n**Note:** Do not use this attribute as it is obsolete (not supported) in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property on it.\n* To achieve the same effect as the `char` value, in CSS3, you can use the value of the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tfoot#attr-char) as the value of the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property Unimplemented.'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/tfoot"}]},{name:"tr",description:{kind:"markdown",value:"The tr element represents a row of cells in a table."},attributes:[{name:"align",description:'A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString "DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.") which specifies how the cell\'s context should be aligned horizontally within the cells in the row; this is shorthand for using `align` on every cell in the row individually. Possible values are:\n\n`left`\n\nAlign the content of each cell at its left edge.\n\n`center`\n\nCenter the contents of each cell between their left and right edges.\n\n`right`\n\nAlign the content of each cell at its right edge.\n\n`justify`\n\nWiden whitespaces within the text of each cell so that the text fills the full width of each cell (full justification).\n\n`char`\n\nAlign each cell in the row on a specific character (such that each row in the column that is configured this way will horizontally align its cells on that character). This uses the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/tr#attr-charoff) to establish the alignment character (typically "." or "," when aligning numerical data) and the number of characters that should follow the alignment character. This alignment type was never widely supported.\n\nIf no value is expressly set for `align`, the parent node\'s value is inherited.\n\nInstead of using the obsolete `align` attribute, you should instead use the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to establish `left`, `center`, `right`, or `justify` alignment for the row\'s cells. To apply character-based alignment, set the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to the alignment character (such as `"."` or `","`).'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/tr"}]},{name:"td",description:{kind:"markdown",value:"The td element represents a data cell in a table."},attributes:[{name:"colspan"},{name:"rowspan"},{name:"headers"},{name:"abbr",description:`This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself. + +**Note:** Do not use this attribute as it is obsolete in the latest standard. Alternatively, you can put the abbreviated description inside the cell and place the long content in the **title** attribute.`},{name:"align",description:'This enumerated attribute specifies how the cell content\'s horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-charoff) attributes Unimplemented (see [bug\xA02212](https://bugzilla.mozilla.org/show_bug.cgi?id=2212 "character alignment not implemented (align=char, charoff=, text-align:<string>)")).\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-char). Unimplemented in CSS3.'},{name:"axis",description:"This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard."},{name:"bgcolor",description:`This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings: + +\xA0 + +\`black\` = "#000000" + +\xA0 + +\`green\` = "#008000" + +\xA0 + +\`silver\` = "#C0C0C0" + +\xA0 + +\`lime\` = "#00FF00" + +\xA0 + +\`gray\` = "#808080" + +\xA0 + +\`olive\` = "#808000" + +\xA0 + +\`white\` = "#FFFFFF" + +\xA0 + +\`yellow\` = "#FFFF00" + +\xA0 + +\`maroon\` = "#800000" + +\xA0 + +\`navy\` = "#000080" + +\xA0 + +\`red\` = "#FF0000" + +\xA0 + +\`blue\` = "#0000FF" + +\xA0 + +\`purple\` = "#800080" + +\xA0 + +\`teal\` = "#008080" + +\xA0 + +\`fuchsia\` = "#FF00FF" + +\xA0 + +\`aqua\` = "#00FFFF" + +**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [\`<td>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td "The HTML <td> element defines a cell of a table that contains data. It participates in the table model.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/CSS). To create a similar effect use the [\`background-color\`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color "The background-color CSS property sets the background color of an element.") property in [CSS](https://developer.mozilla.org/en-US/docs/CSS) instead.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/td"}]},{name:"th",description:{kind:"markdown",value:"The th element represents a header cell in a table."},attributes:[{name:"colspan"},{name:"rowspan"},{name:"headers"},{name:"scope",valueSet:"s"},{name:"sorted"},{name:"abbr",description:{kind:"markdown",value:"This attribute contains a short abbreviated description of the cell's content. Some user-agents, such as speech readers, may present this description before the content itself."}},{name:"align",description:'This enumerated attribute specifies how the cell content\'s horizontal alignment will be handled. Possible values are:\n\n* `left`: The content is aligned to the left of the cell.\n* `center`: The content is centered in the cell.\n* `right`: The content is aligned to the right of the cell.\n* `justify` (with text only): The content is stretched out inside the cell so that it covers its entire width.\n* `char` (with text only): The content is aligned to a character inside the `<th>` element with minimal offset. This character is defined by the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char) and [`charoff`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-charoff) attributes.\n\nThe default value when this attribute is not specified is `left`.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard.\n\n* To achieve the same effect as the `left`, `center`, `right` or `justify` values, apply the CSS [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property to the element.\n* To achieve the same effect as the `char` value, give the [`text-align`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-align "The text-align CSS property sets the horizontal alignment of an inline or table-cell box. This means it works like vertical-align but in the horizontal direction.") property the same value you would use for the [`char`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-char). Unimplemented in CSS3.'},{name:"axis",description:"This attribute contains a list of space-separated strings. Each string is the `id` of a group of cells that this header applies to.\n\n**Note:** Do not use this attribute as it is obsolete in the latest standard: use the [`scope`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th#attr-scope) attribute instead."},{name:"bgcolor",description:`This attribute defines the background color of each cell in a column. It consists of a 6-digit hexadecimal code as defined in [sRGB](https://www.w3.org/Graphics/Color/sRGB) and is prefixed by '#'. This attribute may be used with one of sixteen predefined color strings: + +\xA0 + +\`black\` = "#000000" + +\xA0 + +\`green\` = "#008000" + +\xA0 + +\`silver\` = "#C0C0C0" + +\xA0 + +\`lime\` = "#00FF00" + +\xA0 + +\`gray\` = "#808080" + +\xA0 + +\`olive\` = "#808000" + +\xA0 + +\`white\` = "#FFFFFF" + +\xA0 + +\`yellow\` = "#FFFF00" + +\xA0 + +\`maroon\` = "#800000" + +\xA0 + +\`navy\` = "#000080" + +\xA0 + +\`red\` = "#FF0000" + +\xA0 + +\`blue\` = "#0000FF" + +\xA0 + +\`purple\` = "#800080" + +\xA0 + +\`teal\` = "#008080" + +\xA0 + +\`fuchsia\` = "#FF00FF" + +\xA0 + +\`aqua\` = "#00FFFF" + +**Note:** Do not use this attribute, as it is non-standard and only implemented in some versions of Microsoft Internet Explorer: The [\`<th>\`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th "The HTML <th> element defines a cell as header of a group of table cells. The exact nature of this group is defined by the scope and headers attributes.") element should be styled using [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS). To create a similar effect use the [\`background-color\`](https://developer.mozilla.org/en-US/docs/Web/CSS/background-color "The background-color CSS property sets the background color of an element.") property in [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) instead.`}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/th"}]},{name:"form",description:{kind:"markdown",value:"The form element represents a collection of form-associated elements, some of which can represent editable values that can be submitted to a server for processing."},attributes:[{name:"accept-charset",description:{kind:"markdown",value:'A space- or comma-delimited list of character encodings that the server accepts. The browser uses them in the order in which they are listed. The default value, the reserved string `"UNKNOWN"`, indicates the same encoding as that of the document containing the form element. \nIn previous versions of HTML, the different character encodings could be delimited by spaces or commas. In HTML5, only spaces are allowed as delimiters.'}},{name:"action",description:{kind:"markdown",value:'The URI of a program that processes the form information. This value can be overridden by a [`formaction`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formaction) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'}},{name:"autocomplete",valueSet:"o",description:{kind:"markdown",value:"Indicates whether input elements can by default have their values automatically completed by the browser. This setting can be overridden by an `autocomplete` attribute on an element belonging to the form. Possible values are:\n\n* `off`: The user must explicitly enter a value into each field for every use, or the document provides its own auto-completion method; the browser does not automatically complete entries.\n* `on`: The browser can automatically complete values based on values that the user has previously entered in the form.\n\nFor most modern browsers (including Firefox 38+, Google Chrome 34+, IE 11+) setting the autocomplete attribute will not prevent a browser's password manager from asking the user if they want to store login fields (username and password), if the user permits the storage the browser will autofill the login the next time the user visits the page. See [The autocomplete attribute and login fields](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion#The_autocomplete_attribute_and_login_fields)."}},{name:"enctype",valueSet:"et",description:{kind:"markdown",value:'When the value of the `method` attribute is `post`, enctype is the [MIME type](https://en.wikipedia.org/wiki/Mime_type) of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: The value used for an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element with the `type` attribute set to "file".\n* `text/plain`: (HTML5)\n\nThis value can be overridden by a [`formenctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formenctype) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'}},{name:"method",valueSet:"m",description:{kind:"markdown",value:'The [HTTP](https://developer.mozilla.org/en-US/docs/Web/HTTP) method that the browser uses to submit the form. Possible values are:\n\n* `post`: Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5) ; form data are included in the body of the form and sent to the server.\n* `get`: Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a \'?\' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n* `dialog`: Use when the form is inside a\xA0[`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog "The HTML <dialog> element represents a dialog box or other interactive component, such as an inspector or window.") element to close the dialog when submitted.\n\nThis value can be overridden by a [`formmethod`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formmethod) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'}},{name:"name",description:{kind:"markdown",value:"The name of the form. In HTML 4, its use is deprecated (`id` should be used instead). It must be unique among the forms in a document and not just an empty string in HTML 5."}},{name:"novalidate",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute indicates that the form is not to be validated when submitted. If this attribute is not specified (and therefore the form is validated), this default setting can be overridden by a [`formnovalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formnovalidate) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element belonging to the form.'}},{name:"target",description:{kind:"markdown",value:'A name or keyword indicating where to display the response that is received after submitting the form. In HTML 4, this is the name/keyword for a frame. In HTML5, it is a name/keyword for a _browsing context_ (for example, tab, window, or inline frame). The following keywords have special meanings:\n\n* `_self`: Load the response into the same HTML 4 frame (or HTML5 browsing context) as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed HTML 4 window or HTML5 browsing context.\n* `_parent`: Load the response into the HTML 4 frameset parent of the current frame, or HTML5 parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: HTML 4: Load the response into the full original window, and cancel all other frames. HTML5: Load the response into the top-level browsing context (i.e., the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`.\n* _iframename_: The response is displayed in a named [`<iframe>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe "The HTML Inline Frame element (<iframe>) represents a nested browsing context, embedding another HTML page into the current one.").\n\nHTML5: This value can be overridden by a [`formtarget`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-formtarget) attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") or [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'}},{name:"accept",description:'A comma-separated list of content types that the server accepts.\n\n**Usage note:** This attribute has been removed in HTML5 and should no longer be used. Instead, use the [`accept`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-accept) attribute of the specific [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element.'},{name:"autocapitalize",description:"This is a nonstandard attribute used by iOS Safari Mobile which controls whether and how the text value for textual form control descendants should be automatically capitalized as it is entered/edited by the user. If the `autocapitalize` attribute is specified on an individual form control descendant, it trumps the form-wide `autocapitalize` setting. The non-deprecated values are available in iOS 5 and later. The default value is `sentences`. Possible values are:\n\n* `none`: Completely disables automatic capitalization\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/form"}]},{name:"label",description:{kind:"markdown",value:"The label element represents a caption in a user interface. The caption can be associated with a specific form control, known as the label element's labeled control, either using the for attribute, or by putting the form control inside the label element itself."},attributes:[{name:"form",description:{kind:"markdown",value:'The [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element with which the label is associated (its _form owner_). If specified, the value of the attribute is the `id` of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element in the same document. This lets you place label elements anywhere within a document, not just as descendants of their form elements.'}},{name:"for",description:{kind:"markdown",value:"The [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-id) of a [labelable](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Form_labelable) form-related element in the same document as the `<label>` element. The first element in the document with an `id` matching the value of the `for` attribute is the _labeled control_ for this label element, if it is a labelable element. If it is\xA0not labelable then the `for` attribute has no effect. If there are other elements which also match the `id` value, later in the document, they are not considered.\n\n**Note**: A `<label>` element can have both a `for` attribute and a contained control element, as long as the `for` attribute points to the contained control element."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/label"}]},{name:"input",description:{kind:"markdown",value:"The input element represents a typed data field, usually with a form control to allow the user to edit the data."},attributes:[{name:"accept"},{name:"alt"},{name:"autocomplete",valueSet:"inputautocomplete"},{name:"autofocus",valueSet:"v"},{name:"checked",valueSet:"v"},{name:"dirname"},{name:"disabled",valueSet:"v"},{name:"form"},{name:"formaction"},{name:"formenctype",valueSet:"et"},{name:"formmethod",valueSet:"fm"},{name:"formnovalidate",valueSet:"v"},{name:"formtarget"},{name:"height"},{name:"inputmode",valueSet:"im"},{name:"list"},{name:"max"},{name:"maxlength"},{name:"min"},{name:"minlength"},{name:"multiple",valueSet:"v"},{name:"name"},{name:"pattern"},{name:"placeholder"},{name:"readonly",valueSet:"v"},{name:"required",valueSet:"v"},{name:"size"},{name:"src"},{name:"step"},{name:"type",valueSet:"t"},{name:"value"},{name:"width"}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/input"}]},{name:"button",description:{kind:"markdown",value:"The button element represents a button labeled by its contents."},attributes:[{name:"autofocus",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute lets you specify that the button should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form-associated element in a document can have this attribute specified."}},{name:"disabled",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute indicates that the user cannot interact with the button. If this attribute is not specified, the button inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset "The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form."); if there is no containing element with the **disabled** attribute set, then the button is enabled.\n\nFirefox will, unlike other browsers, by default, [persist the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") across page loads. Use the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#attr-autocomplete) attribute to control this feature.'}},{name:"form",description:{kind:"markdown",value:'The form element that the button is associated with (its _form owner_). The value of the attribute must be the **id** attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element in the same document. If this attribute is not specified, the `<button>` element will be associated to an ancestor [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element, if one exists. This attribute enables you to associate `<button>` elements to [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") elements anywhere within a document, not just as descendants of [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") elements.'}},{name:"formaction",description:{kind:"markdown",value:"The URI of a program that processes the information submitted by the button. If specified, it overrides the [`action`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-action) attribute of the button's form owner."}},{name:"formenctype",valueSet:"et",description:{kind:"markdown",value:'If the button is a submit button, this attribute specifies the type of content that is used to submit the form to the server. Possible values are:\n\n* `application/x-www-form-urlencoded`: The default value if the attribute is not specified.\n* `multipart/form-data`: Use this value if you are using an [`<input>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") element with the [`type`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type) attribute set to `file`.\n* `text/plain`\n\nIf this attribute is specified, it overrides the [`enctype`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-enctype) attribute of the button\'s form owner.'}},{name:"formmethod",valueSet:"fm",description:{kind:"markdown",value:"If the button is a submit button, this attribute specifies the HTTP method that the browser uses to submit the form. Possible values are:\n\n* `post`: The data from the form are included in the body of the form and sent to the server.\n* `get`: The data from the form are appended to the **form** attribute URI, with a '?' as a separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters.\n\nIf specified, this attribute overrides the [`method`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-method) attribute of the button's form owner."}},{name:"formnovalidate",valueSet:"v",description:{kind:"markdown",value:"If the button is a submit button, this Boolean attribute specifies that the form is not to be validated when it is submitted. If this attribute is specified, it overrides the [`novalidate`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-novalidate) attribute of the button's form owner."}},{name:"formtarget",description:{kind:"markdown",value:"If the button is a submit button, this attribute is a name or keyword indicating where to display the response that is received after submitting the form. This is a name of, or keyword for, a _browsing context_ (for example, tab, window, or inline frame). If this attribute is specified, it overrides the [`target`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-target) attribute of the button's form owner. The following keywords have special meanings:\n\n* `_self`: Load the response into the same browsing context as the current one. This value is the default if the attribute is not specified.\n* `_blank`: Load the response into a new unnamed browsing context.\n* `_parent`: Load the response into the parent browsing context of the current one. If there is no parent, this option behaves the same way as `_self`.\n* `_top`: Load the response into the top-level browsing context (that is, the browsing context that is an ancestor of the current one, and has no parent). If there is no parent, this option behaves the same way as `_self`."}},{name:"name",description:{kind:"markdown",value:"The name of the button, which is submitted with the form data."}},{name:"type",valueSet:"bt",description:{kind:"markdown",value:"The type of the button. Possible values are:\n\n* `submit`: The button submits the form data to the server. This is the default if the attribute is not specified, or if the attribute is dynamically changed to an empty or invalid value.\n* `reset`: The button resets all the controls to their initial values.\n* `button`: The button has no default behavior. It can have client-side scripts associated with the element's events, which are triggered when the events occur."}},{name:"value",description:{kind:"markdown",value:"The initial value of the button. It defines the value associated with the button which is submitted with the form data. This value is passed to the server in params when the form is submitted."}},{name:"autocomplete",description:'The use of this attribute on a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") is nonstandard and Firefox-specific. By default, unlike other browsers, [Firefox persists the dynamic disabled state](https://stackoverflow.com/questions/5985839/bug-with-firefox-disabled-attribute-of-input-not-resetting-when-refreshing) of a [`<button>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button "The HTML <button> element represents a clickable button, which can be used in forms or anywhere in a document that needs simple, standard button functionality.") across page loads. Setting the value of this attribute to `off` (i.e. `autocomplete="off"`) disables this feature. See [bug\xA0654072](https://bugzilla.mozilla.org/show_bug.cgi?id=654072 "if disabled state is changed with javascript, the normal state doesn\'t return after refreshing the page").'}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/button"}]},{name:"select",description:{kind:"markdown",value:"The select element represents a control for selecting amongst a set of options."},attributes:[{name:"autocomplete",valueSet:"inputautocomplete",description:{kind:"markdown",value:'A [`DOMString`](https://developer.mozilla.org/en-US/docs/Web/API/DOMString "DOMString is a UTF-16 String. As JavaScript already uses such strings, DOMString is mapped directly to a String.") providing a hint for a [user agent\'s](https://developer.mozilla.org/en-US/docs/Glossary/user_agent "user agent\'s: A user agent is a computer program representing a person, for example, a browser in a Web context.") autocomplete feature. See [The HTML autocomplete attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) for a complete list of values and details on how to use autocomplete.'}},{name:"autofocus",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form element in a document can have the `autofocus` attribute."}},{name:"disabled",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example `fieldset`; if there is no containing element with the `disabled` attribute set, then the control is enabled."}},{name:"form",description:{kind:"markdown",value:'This attribute lets you specify the form element to\xA0which\xA0the select element is associated\xA0(that is, its "form owner"). If this attribute is specified, its value must be the same as the `id` of a form element in the same document. This enables you to place select elements anywhere within a document, not just as descendants of their form elements.'}},{name:"multiple",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute indicates that multiple options can be selected in the list. If it is not specified, then only one option can be selected at a time. When `multiple` is specified, most browsers will show a scrolling list box instead of a single line dropdown."}},{name:"name",description:{kind:"markdown",value:"This attribute is used to specify the name of the control."}},{name:"required",valueSet:"v",description:{kind:"markdown",value:"A Boolean attribute indicating that an option with a non-empty string value must be selected."}},{name:"size",description:{kind:"markdown",value:"If the control is presented as a scrolling list box (e.g. when `multiple` is specified), this attribute represents the number of rows in the list that should be visible at one time. Browsers are not required to present a select element as a scrolled list box. The default value is 0.\n\n**Note:** According to the HTML5 specification, the default value for size should be 1; however, in practice, this has been found to break some web sites, and no other browser currently does that, so Mozilla has opted to continue to return 0 for the time being with Firefox."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/select"}]},{name:"datalist",description:{kind:"markdown",value:"The datalist element represents a set of option elements that represent predefined options for other controls. In the rendering, the datalist element represents nothing and it, along with its children, should be hidden."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/datalist"}]},{name:"optgroup",description:{kind:"markdown",value:"The optgroup element represents a group of option elements with a common label."},attributes:[{name:"disabled",valueSet:"v",description:{kind:"markdown",value:"If this Boolean attribute is set, none of the items in this option group is selectable. Often browsers grey out such control and it won't receive any browsing events, like mouse clicks or focus-related ones."}},{name:"label",description:{kind:"markdown",value:"The name of the group of options, which the browser can use when labeling the options in the user interface. This attribute is mandatory if this element is used."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/optgroup"}]},{name:"option",description:{kind:"markdown",value:"The option element represents an option in a select element or as part of a list of suggestions in a datalist element."},attributes:[{name:"disabled",valueSet:"v",description:{kind:"markdown",value:'If this Boolean attribute is set, this option is not checkable. Often browsers grey out such control and it won\'t receive any browsing event, like mouse clicks or focus-related ones. If this attribute is not set, the element can still be disabled if one of its ancestors is a disabled [`<optgroup>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/optgroup "The HTML <optgroup> element creates a grouping of options within a <select> element.") element.'}},{name:"label",description:{kind:"markdown",value:"This attribute is text for the label indicating the meaning of the option. If the `label` attribute isn't defined, its value is that of the element text content."}},{name:"selected",valueSet:"v",description:{kind:"markdown",value:'If present, this Boolean attribute indicates that the option is initially selected. If the `<option>` element is the descendant of a [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select "The HTML <select> element represents a control that provides a menu of options") element whose [`multiple`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select#attr-multiple) attribute is not set, only one single `<option>` of this [`<select>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select "The HTML <select> element represents a control that provides a menu of options") element may have the `selected` attribute.'}},{name:"value",description:{kind:"markdown",value:"The content of this attribute represents the value to be submitted with the form, should this option be selected.\xA0If this attribute is omitted, the value is taken from the text content of the option element."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/option"}]},{name:"textarea",description:{kind:"markdown",value:"The textarea element represents a multiline plain text edit control for the element's raw value. The contents of the control represent the control's default value."},attributes:[{name:"autocomplete",valueSet:"inputautocomplete",description:{kind:"markdown",value:'This attribute indicates whether the value of the control can be automatically completed by the browser. Possible values are:\n\n* `off`: The user must explicitly enter a value into this field for every use, or the document provides its own auto-completion method; the browser does not automatically complete the entry.\n* `on`: The browser can automatically complete the value based on values that the user has entered during previous uses.\n\nIf the `autocomplete` attribute is not specified on a `<textarea>` element, then the browser uses the `autocomplete` attribute value of the `<textarea>` element\'s form owner. The form owner is either the [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element that this `<textarea>` element is a descendant of or the form element whose `id` is specified by the `form` attribute of the input element. For more information, see the [`autocomplete`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form#attr-autocomplete) attribute in [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.").'}},{name:"autofocus",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute lets you specify that a form control should have input focus when the page loads. Only one form-associated element in a document can have this attribute specified."}},{name:"cols",description:{kind:"markdown",value:"The visible width of the text control, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is `20`."}},{name:"dirname"},{name:"disabled",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute indicates that the user cannot interact with the control. If this attribute is not specified, the control inherits its setting from the containing element, for example [`<fieldset>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset "The HTML <fieldset> element is used to group several controls as well as labels (<label>) within a web form."); if there is no containing element when the `disabled` attribute is set, the control is enabled.'}},{name:"form",description:{kind:"markdown",value:'The form element that the `<textarea>` element is associated with (its "form owner"). The value of the attribute must be the `id` of a form element in the same document. If this attribute is not specified, the `<textarea>` element must be a descendant of a form element. This attribute enables you to place `<textarea>` elements anywhere within a document, not just as descendants of form elements.'}},{name:"inputmode",valueSet:"im"},{name:"maxlength",description:{kind:"markdown",value:"The maximum number of characters (unicode code points) that the user can enter. If this value isn't specified, the user can enter an unlimited number of characters."}},{name:"minlength",description:{kind:"markdown",value:"The minimum number of characters (unicode code points) required that the user should enter."}},{name:"name",description:{kind:"markdown",value:"The name of the control."}},{name:"placeholder",description:{kind:"markdown",value:'A hint to the user of what can be entered in the control. Carriage returns or line-feeds within the placeholder text must be treated as line breaks when rendering the hint.\n\n**Note:** Placeholders should only be used to show an example of the type of data that should be entered into a form; they are _not_ a substitute for a proper [`<label>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label "The HTML <label> element represents a caption for an item in a user interface.") element tied to the input. See [Labels and placeholders](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Labels_and_placeholders "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") in [<input>: The Input (Form Input) element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") for a full explanation.'}},{name:"readonly",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute indicates that the user cannot modify the value of the control. Unlike the `disabled` attribute, the `readonly` attribute does not prevent the user from clicking or selecting in the control. The value of a read-only control is still submitted with the form."}},{name:"required",valueSet:"v",description:{kind:"markdown",value:"This attribute specifies that the user must fill in a value before submitting a form."}},{name:"rows",description:{kind:"markdown",value:"The number of visible text lines for the control."}},{name:"wrap",valueSet:"w",description:{kind:"markdown",value:"Indicates how the control wraps text. Possible values are:\n\n* `hard`: The browser automatically inserts line breaks (CR+LF) so that each line has no more than the width of the control; the `cols` attribute must also be specified for this to take effect.\n* `soft`: The browser ensures that all line breaks in the value consist of a CR+LF pair, but does not insert any additional line breaks.\n* `off` : Like `soft` but changes appearance to `white-space: pre` so line segments exceeding `cols` are not wrapped and the `<textarea>` becomes horizontally scrollable.\n\nIf this attribute is not specified, `soft` is its default value."}},{name:"autocapitalize",description:"This is a non-standard attribute supported by WebKit on iOS (therefore nearly all browsers running on iOS, including Safari, Firefox, and Chrome), which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user. The non-deprecated values are available in iOS 5 and later. Possible values are:\n\n* `none`: Completely disables automatic capitalization.\n* `sentences`: Automatically capitalize the first letter of sentences.\n* `words`: Automatically capitalize the first letter of words.\n* `characters`: Automatically capitalize all characters.\n* `on`: Deprecated since iOS 5.\n* `off`: Deprecated since iOS 5."},{name:"spellcheck",description:"Specifies whether the `<textarea>` is subject to spell checking by the underlying browser/OS. the value can be:\n\n* `true`: Indicates that the element needs to have its spelling and grammar checked.\n* `default` : Indicates that the element is to act according to a default behavior, possibly based on the parent element's own `spellcheck` value.\n* `false` : Indicates that the element should not be spell checked."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/textarea"}]},{name:"output",description:{kind:"markdown",value:"The output element represents the result of a calculation performed by the application, or the result of a user action."},attributes:[{name:"for",description:{kind:"markdown",value:"A space-separated list of other elements\u2019 [`id`](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id)s, indicating that those elements contributed input values to (or otherwise affected) the calculation."}},{name:"form",description:{kind:"markdown",value:'The [form element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form) that this element is associated with (its "form owner"). The value of the attribute must be an `id` of a form element in the same document. If this attribute is not specified, the output element must be a descendant of a form element. This attribute enables you to place output elements anywhere within a document, not just as descendants of their form elements.'}},{name:"name",description:{kind:"markdown",value:'The name of the element, exposed in the [`HTMLFormElement`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement "The HTMLFormElement interface represents a <form> element in the DOM; it allows access to and in some cases modification of aspects of the form, as well as access to its component elements.") API.'}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/output"}]},{name:"progress",description:{kind:"markdown",value:"The progress element represents the completion progress of a task. The progress is either indeterminate, indicating that progress is being made but that it is not clear how much more work remains to be done before the task is complete (e.g. because the task is waiting for a remote host to respond), or the progress is a number in the range zero to a maximum, giving the fraction of work that has so far been completed."},attributes:[{name:"value",description:{kind:"markdown",value:"This attribute specifies how much of the task that has been completed. It must be a valid floating point number between 0 and `max`, or between 0 and 1 if `max` is omitted. If there is no `value` attribute, the progress bar is indeterminate; this indicates that an activity is ongoing with no indication of how long it is expected to take."}},{name:"max",description:{kind:"markdown",value:"This attribute describes how much work the task indicated by the `progress` element requires. The `max` attribute, if present, must have a value greater than zero and be a valid floating point number. The default value is 1."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/progress"}]},{name:"meter",description:{kind:"markdown",value:"The meter element represents a scalar measurement within a known range, or a fractional value; for example disk usage, the relevance of a query result, or the fraction of a voting population to have selected a particular candidate."},attributes:[{name:"value",description:{kind:"markdown",value:"The current numeric value. This must be between the minimum and maximum values (`min` attribute and `max` attribute) if they are specified. If unspecified or malformed, the value is 0. If specified, but not within the range given by the `min` attribute and `max` attribute, the value is equal to the nearest end of the range.\n\n**Usage note:** Unless the `value` attribute is between `0` and `1` (inclusive), the `min` and `max` attributes should define the range so that the `value` attribute's value is within it."}},{name:"min",description:{kind:"markdown",value:"The lower numeric bound of the measured range. This must be less than the maximum value (`max` attribute), if specified. If unspecified, the minimum value is 0."}},{name:"max",description:{kind:"markdown",value:"The upper numeric bound of the measured range. This must be greater than the minimum value (`min` attribute), if specified. If unspecified, the maximum value is 1."}},{name:"low",description:{kind:"markdown",value:"The upper numeric bound of the low end of the measured range. This must be greater than the minimum value (`min` attribute), and it also must be less than the high value and maximum value (`high` attribute and `max` attribute, respectively), if any are specified. If unspecified, or if less than the minimum value, the `low` value is equal to the minimum value."}},{name:"high",description:{kind:"markdown",value:"The lower numeric bound of the high end of the measured range. This must be less than the maximum value (`max` attribute), and it also must be greater than the low value and minimum value (`low` attribute and **min** attribute, respectively), if any are specified. If unspecified, or if greater than the maximum value, the `high` value is equal to the maximum value."}},{name:"optimum",description:{kind:"markdown",value:"This attribute indicates the optimal numeric value. It must be within the range (as defined by the `min` attribute and `max` attribute). When used with the `low` attribute and `high` attribute, it gives an indication where along the range is considered preferable. For example, if it is between the `min` attribute and the `low` attribute, then the lower range is considered preferred."}},{name:"form",description:"This attribute associates the element with a `form` element that has ownership of the `meter` element. For example, a `meter` might be displaying a range corresponding to an `input` element of `type` _number_. This attribute is only used if the `meter` element is being used as a form-associated element; even then, it may be omitted if the element appears as a descendant of a `form` element."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/meter"}]},{name:"fieldset",description:{kind:"markdown",value:"The fieldset element represents a set of form controls optionally grouped under a common name."},attributes:[{name:"disabled",valueSet:"v",description:{kind:"markdown",value:"If this Boolean attribute is set, all form controls that are descendants of the `<fieldset>`, are disabled, meaning they are not editable and won't be submitted along with the `<form>`. They won't receive any browsing events, like mouse clicks or focus-related events. By default browsers display such controls grayed out. Note that form elements inside the [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend \"The HTML <legend> element represents a caption for the content of its parent <fieldset>.\") element won't be disabled."}},{name:"form",description:{kind:"markdown",value:'This attribute takes the value of the `id` attribute of a [`<form>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/form "The HTML <form> element represents a document section that contains interactive controls for submitting information to a web server.") element you want the `<fieldset>` to be part of, even if it is not inside the form.'}},{name:"name",description:{kind:"markdown",value:'The name associated with the group.\n\n**Note**: The caption for the fieldset is given by the first [`<legend>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend "The HTML <legend> element represents a caption for the content of its parent <fieldset>.") element nested inside it.'}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/fieldset"}]},{name:"legend",description:{kind:"markdown",value:"The legend element represents a caption for the rest of the contents of the legend element's parent fieldset element, if any."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/legend"}]},{name:"details",description:{kind:"markdown",value:"The details element represents a disclosure widget from which the user can obtain additional information or controls."},attributes:[{name:"open",valueSet:"v",description:{kind:"markdown",value:"This Boolean attribute indicates whether or not the details \u2014 that is, the contents of the `<details>` element \u2014 are currently visible. The default, `false`, means the details are not visible."}}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/details"}]},{name:"summary",description:{kind:"markdown",value:"The summary element represents a summary, caption, or legend for the rest of the contents of the summary element's parent details element, if any."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/summary"}]},{name:"dialog",description:{kind:"markdown",value:"The dialog element represents a part of an application that a user interacts with to perform a task, for example a dialog box, inspector, or window."},attributes:[{name:"open",description:"Indicates that the dialog is active and available for interaction. When the `open` attribute is not set, the dialog shouldn't be shown to the user."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/dialog"}]},{name:"script",description:{kind:"markdown",value:"The script element allows authors to include dynamic script and data blocks in their documents. The element does not represent content for the user."},attributes:[{name:"src",description:{kind:"markdown",value:"This attribute specifies the URI of an external script; this can be used as an alternative to embedding a script directly within a document.\n\nIf a `script` element has a `src` attribute specified, it should not have a script embedded inside its tags."}},{name:"type",description:{kind:"markdown",value:'This attribute indicates the type of script represented. The value of this attribute will be in one of the following categories:\n\n* **Omitted or a JavaScript MIME type:** For HTML5-compliant browsers this indicates the script is JavaScript. HTML5 specification urges authors to omit the attribute rather than provide a redundant MIME type. In earlier browsers, this identified the scripting language of the embedded or imported (via the `src` attribute) code. JavaScript MIME types are [listed in the specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#JavaScript_types).\n* **`module`:** For HTML5-compliant browsers the code is treated as a JavaScript module. The processing of the script contents is not affected by the `charset` and `defer` attributes. For information on using `module`, see [ES6 in Depth: Modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/). Code may behave differently when the `module` keyword is used.\n* **Any other value:** The embedded content is treated as a data block which won\'t be processed by the browser. Developers must use a valid MIME type that is not a JavaScript MIME type to denote data blocks. The `src` attribute will be ignored.\n\n**Note:** in Firefox you could specify the version of JavaScript contained in a `<script>` element by including a non-standard `version` parameter inside the `type` attribute \u2014 for example `type="text/javascript;version=1.8"`. This has been removed in Firefox 59 (see [bug\xA01428745](https://bugzilla.mozilla.org/show_bug.cgi?id=1428745 "FIXED: Remove support for version parameter from script loader")).'}},{name:"charset"},{name:"async",valueSet:"v",description:{kind:"markdown",value:`This is a Boolean attribute indicating that the browser should, if possible, load the script asynchronously. + +This attribute must not be used if the \`src\` attribute is absent (i.e. for inline scripts). If it is included in this case it will have no effect. + +Browsers usually assume the worst case scenario and load scripts synchronously, (i.e. \`async="false"\`) during HTML parsing. + +Dynamically inserted scripts (using [\`document.createElement()\`](https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement "In an HTML document, the document.createElement() method creates the HTML element specified by tagName, or an HTMLUnknownElement if tagName isn't recognized.")) load asynchronously by default, so to turn on synchronous loading (i.e. scripts load in the order they were inserted) set \`async="false"\`. + +See [Browser compatibility](#Browser_compatibility) for notes on browser support. See also [Async scripts for asm.js](https://developer.mozilla.org/en-US/docs/Games/Techniques/Async_scripts).`}},{name:"defer",valueSet:"v",description:{kind:"markdown",value:'This Boolean attribute is set to indicate to a browser that the script is meant to be executed after the document has been parsed, but before firing [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded "/en-US/docs/Web/Events/DOMContentLoaded").\n\nScripts with the `defer` attribute will prevent the `DOMContentLoaded` event from firing until the script has loaded and finished evaluating.\n\nThis attribute must not be used if the `src` attribute is absent (i.e. for inline scripts), in this case it would have no effect.\n\nTo achieve a similar effect for dynamically inserted scripts use `async="false"` instead. Scripts with the `defer` attribute will execute in the order in which they appear in the document.'}},{name:"crossorigin",valueSet:"xo",description:{kind:"markdown",value:'Normal `script` elements pass minimal information to the [`window.onerror`](https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror "The onerror property of the GlobalEventHandlers mixin is an EventHandler that processes error events.") for scripts which do not pass the standard [CORS](https://developer.mozilla.org/en-US/docs/Glossary/CORS "CORS: CORS (Cross-Origin Resource Sharing) is a system, consisting of transmitting HTTP headers, that determines whether browsers block frontend JavaScript code from accessing responses for cross-origin requests.") checks. To allow error logging for sites which use a separate domain for static media, use this attribute. See [CORS settings attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes) for a more descriptive explanation of its valid arguments.'}},{name:"nonce",description:{kind:"markdown",value:"A cryptographic nonce (number used once) to whitelist inline scripts in a [script-src Content-Security-Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src). The server must generate a unique nonce value each time it transmits a policy. It is critical to provide a nonce that cannot be guessed as bypassing a resource's policy is otherwise trivial."}},{name:"integrity",description:"This attribute contains inline metadata that a user agent can use to verify that a fetched resource has been delivered free of unexpected manipulation. See [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity)."},{name:"nomodule",description:"This Boolean attribute is set to indicate that the script should not be executed in browsers that support [ES2015 modules](https://hacks.mozilla.org/2015/08/es6-in-depth-modules/) \u2014 in effect, this can be used to serve fallback scripts to older browsers that do not support modular JavaScript code."},{name:"referrerpolicy",description:'Indicates which [referrer](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer) to send when fetching the script, or resources fetched by the script:\n\n* `no-referrer`: The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent.\n* `no-referrer-when-downgrade` (default): The [`Referer`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer "The Referer request header contains the address of the previous web page from which a link to the currently requested page was followed. The Referer header allows servers to identify where people are visiting them from and may use that data for analytics, logging, or optimized caching, for example.") header will not be sent to [origin](https://developer.mozilla.org/en-US/docs/Glossary/origin "origin: Web content\'s origin is defined by the scheme (protocol), host (domain), and port of the URL used to access it. Two objects have the same origin only when the scheme, host, and port all match.")s without [TLS](https://developer.mozilla.org/en-US/docs/Glossary/TLS "TLS: Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), is a protocol used by applications to communicate securely across a network, preventing tampering with and eavesdropping on email, web browsing, messaging, and other protocols.") ([HTTPS](https://developer.mozilla.org/en-US/docs/Glossary/HTTPS "HTTPS: HTTPS (HTTP Secure) is an encrypted version of the HTTP protocol. It usually uses SSL or TLS to encrypt all communication between a client and a server. This secure connection allows clients to safely exchange sensitive data with a server, for example for banking activities or online shopping.")).\n* `origin`: The sent referrer will be limited to the origin of the referring page: its [scheme](https://developer.mozilla.org/en-US/docs/Archive/Mozilla/URIScheme), [host](https://developer.mozilla.org/en-US/docs/Glossary/host "host: A host is a device connected to the Internet (or a local network). Some hosts called servers offer additional services like serving webpages or storing files and emails."), and [port](https://developer.mozilla.org/en-US/docs/Glossary/port "port: For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol.").\n* `origin-when-cross-origin`: The referrer sent to other origins will be limited to the scheme, the host, and the port. Navigations on the same origin will still include the path.\n* `same-origin`: A referrer will be sent for [same origin](https://developer.mozilla.org/en-US/docs/Glossary/Same-origin_policy "same origin: The same-origin policy is a critical security mechanism that restricts how a document or script loaded from one origin can interact with a resource from another origin."), but cross-origin requests will contain no referrer information.\n* `strict-origin`: Only send the origin of the document as the referrer when the protocol security level stays the same (e.g. HTTPS\u2192HTTPS), but don\'t send it to a less secure destination (e.g. HTTPS\u2192HTTP).\n* `strict-origin-when-cross-origin`: Send a full URL when performing a same-origin request, but only send the origin when the protocol security level stays the same (e.g.HTTPS\u2192HTTPS), and send no header to a less secure destination (e.g. HTTPS\u2192HTTP).\n* `unsafe-url`: The referrer will include the origin _and_ the path (but not the [fragment](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/hash), [password](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/password), or [username](https://developer.mozilla.org/en-US/docs/Web/API/HTMLHyperlinkElementUtils/username)). **This value is unsafe**, because it leaks origins and paths from TLS-protected resources to insecure origins.\n\n**Note**: An empty string value (`""`) is both the default value, and a fallback value if `referrerpolicy` is not supported. If `referrerpolicy` is not explicitly specified on the `<script>` element, it will adopt a higher-level referrer policy, i.e. one set on the whole document or domain. If a higher-level policy is not available,\xA0the empty string is treated as being equivalent to `no-referrer-when-downgrade`.'},{name:"text",description:"Like the `textContent` attribute, this attribute sets the text content of the element. Unlike the `textContent` attribute, however, this attribute is evaluated as executable code after the node is inserted into the DOM."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/script"}]},{name:"noscript",description:{kind:"markdown",value:"The noscript element represents nothing if scripting is enabled, and represents its children if scripting is disabled. It is used to present different markup to user agents that support scripting and those that don't support scripting, by affecting how the document is parsed."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/noscript"}]},{name:"template",description:{kind:"markdown",value:"The template element is used to declare fragments of HTML that can be cloned and inserted in the document by script."},attributes:[],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/template"}]},{name:"canvas",description:{kind:"markdown",value:"The canvas element provides scripts with a resolution-dependent bitmap canvas, which can be used for rendering graphs, game graphics, art, or other visual images on the fly."},attributes:[{name:"width",description:{kind:"markdown",value:"The width of the coordinate space in CSS pixels. Defaults to 300."}},{name:"height",description:{kind:"markdown",value:"The height of the coordinate space in CSS pixels. Defaults to 150."}},{name:"moz-opaque",description:"Lets the canvas know whether or not translucency will be a factor. If the canvas knows there's no translucency, painting performance can be optimized. This is only supported by Mozilla-based browsers; use the standardized [`canvas.getContext('2d', { alpha: false })`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext \"The HTMLCanvasElement.getContext() method returns a drawing context on the canvas, or null if the context identifier is not supported.\") instead."}],references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Element/canvas"}]}],globalAttributes:[{name:"accesskey",description:{kind:"markdown",value:"Provides a hint for generating a keyboard shortcut for the current element. This attribute consists of a space-separated list of characters. The browser should use the first one that exists on the computer keyboard layout."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/accesskey"}]},{name:"autocapitalize",description:{kind:"markdown",value:"Controls whether and how text input is automatically capitalized as it is entered/edited by the user. It can have the following values:\n\n* `off` or `none`, no autocapitalization is applied (all letters default to lowercase)\n* `on` or `sentences`, the first letter of each sentence defaults to a capital letter; all other letters default to lowercase\n* `words`, the first letter of each word defaults to a capital letter; all other letters default to lowercase\n* `characters`, all letters should default to uppercase"},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/autocapitalize"}]},{name:"class",description:{kind:"markdown",value:'A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the [class selectors](/en-US/docs/Web/CSS/Class_selectors) or functions like the method [`Document.getElementsByClassName()`](/en-US/docs/Web/API/Document/getElementsByClassName "returns an array-like object of all child elements which have all of the given class names.").'},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/class"}]},{name:"contenteditable",description:{kind:"markdown",value:"An enumerated attribute indicating if the element should be editable by the user. If so, the browser modifies its widget to allow editing. The attribute must take one of the following values:\n\n* `true` or the _empty string_, which indicates that the element must be editable;\n* `false`, which indicates that the element must not be editable."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contenteditable"}]},{name:"contextmenu",description:{kind:"markdown",value:'The `[**id**](#attr-id)` of a [`<menu>`](/en-US/docs/Web/HTML/Element/menu "The HTML <menu> element represents a group of commands that a user can perform or activate. This includes both list menus, which might appear across the top of a screen, as well as context menus, such as those that might appear underneath a button after it has been clicked.") to use as the contextual menu for this element.'},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/contextmenu"}]},{name:"dir",description:{kind:"markdown",value:"An enumerated attribute indicating the directionality of the element's text. It can have the following values:\n\n* `ltr`, which means _left to right_ and is to be used for languages that are written from the left to the right (like English);\n* `rtl`, which means _right to left_ and is to be used for languages that are written from the right to the left (like Arabic);\n* `auto`, which lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then it applies that directionality to the whole element."},valueSet:"d",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/dir"}]},{name:"draggable",description:{kind:"markdown",value:"An enumerated attribute indicating whether the element can be dragged, using the [Drag and Drop API](/en-us/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `true`, which indicates that the element may be dragged\n* `false`, which indicates that the element may not be dragged."},valueSet:"b",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/draggable"}]},{name:"dropzone",description:{kind:"markdown",value:"An enumerated attribute indicating what types of content can be dropped on an element, using the [Drag and Drop API](/en-US/docs/DragDrop/Drag_and_Drop). It can have the following values:\n\n* `copy`, which indicates that dropping will create a copy of the element that was dragged\n* `move`, which indicates that the element that was dragged will be moved to this new location.\n* `link`, will create a link to the dragged data."}},{name:"exportparts",description:{kind:"markdown",value:"Used to transitively export shadow parts from a nested shadow tree into a containing light tree."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/exportparts"}]},{name:"hidden",description:{kind:"markdown",value:"A Boolean attribute indicates that the element is not yet, or is no longer, _relevant_. For example, it can be used to hide elements of the page that can't be used until the login process has been completed. The browser won't render such elements. This attribute must not be used to hide content that could legitimately be shown."},valueSet:"v",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/hidden"}]},{name:"id",description:{kind:"markdown",value:"Defines a unique identifier (ID) which must be unique in the whole document. Its purpose is to identify the element when linking (using a fragment identifier), scripting, or styling (with CSS)."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/id"}]},{name:"inputmode",description:{kind:"markdown",value:'Provides a hint to browsers as to the type of virtual keyboard configuration to use when editing this element or its contents. Used primarily on [`<input>`](/en-US/docs/Web/HTML/Element/input "The HTML <input> element is used to create interactive controls for web-based forms in order to accept data from the user; a wide variety of types of input data and control widgets are available, depending on the device and user agent.") elements, but is usable on any element while in `[contenteditable](/en-US/docs/Web/HTML/Global_attributes#attr-contenteditable)` mode.'},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/inputmode"}]},{name:"is",description:{kind:"markdown",value:"Allows you to specify that a standard HTML element should behave like a registered custom built-in element (see [Using custom elements](/en-US/docs/Web/Web_Components/Using_custom_elements) for more details)."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/is"}]},{name:"itemid",description:{kind:"markdown",value:"The unique, global identifier of an item."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemid"}]},{name:"itemprop",description:{kind:"markdown",value:"Used to add properties to an item. Every HTML element may have an `itemprop` attribute specified, where an `itemprop` consists of a name and value pair."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemprop"}]},{name:"itemref",description:{kind:"markdown",value:"Properties that are not descendants of an element with the `itemscope` attribute can be associated with the item using an `itemref`. It provides a list of element ids (not `itemid`s) with additional properties elsewhere in the document."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemref"}]},{name:"itemscope",description:{kind:"markdown",value:"`itemscope` (usually) works along with `[itemtype](/en-US/docs/Web/HTML/Global_attributes#attr-itemtype)` to specify that the HTML contained in a block is about a particular item. `itemscope` creates the Item and defines the scope of the `itemtype` associated with it. `itemtype` is a valid URL of a vocabulary (such as [schema.org](https://schema.org/)) that describes the item and its properties context."},valueSet:"v",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemscope"}]},{name:"itemtype",description:{kind:"markdown",value:"Specifies the URL of the vocabulary that will be used to define `itemprop`s (item properties) in the data structure. `[itemscope](/en-US/docs/Web/HTML/Global_attributes#attr-itemscope)` is used to set the scope of where in the data structure the vocabulary set by `itemtype` will be active."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/itemtype"}]},{name:"lang",description:{kind:"markdown",value:"Helps define the language of an element: the language that non-editable elements are in, or the language that editable elements should be written in by the user. The attribute contains one \u201Clanguage tag\u201D (made of hyphen-separated \u201Clanguage subtags\u201D) in the format defined in [_Tags for Identifying Languages (BCP47)_](https://www.ietf.org/rfc/bcp/bcp47.txt). [**xml:lang**](#attr-xml:lang) has priority over it."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/lang"}]},{name:"part",description:{kind:"markdown",value:'A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the [`::part`](/en-US/docs/Web/CSS/::part "The ::part CSS pseudo-element represents any element within a shadow tree that has a matching part attribute.") pseudo-element.'},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/part"}]},{name:"role",valueSet:"roles"},{name:"slot",description:{kind:"markdown",value:"Assigns a slot in a [shadow DOM](/en-US/docs/Web/Web_Components/Shadow_DOM) shadow tree to an element: An element with a `slot` attribute is assigned to the slot created by the [`<slot>`](/en-US/docs/Web/HTML/Element/slot \"The HTML <slot> element\u2014part of the Web Components technology suite\u2014is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.\") element whose `[name](/en-US/docs/Web/HTML/Element/slot#attr-name)` attribute's value matches that `slot` attribute's value."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/slot"}]},{name:"spellcheck",description:{kind:"markdown",value:"An enumerated attribute defines whether the element may be checked for spelling errors. It may have the following values:\n\n* `true`, which indicates that the element should be, if possible, checked for spelling errors;\n* `false`, which indicates that the element should not be checked for spelling errors."},valueSet:"b",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/spellcheck"}]},{name:"style",description:{kind:"markdown",value:'Contains [CSS](/en-US/docs/Web/CSS) styling declarations to be applied to the element. Note that it is recommended for styles to be defined in a separate file or files. This attribute and the [`<style>`](/en-US/docs/Web/HTML/Element/style "The HTML <style> element contains style information for a document, or part of a document.") element have mainly the purpose of allowing for quick styling, for example for testing purposes.'},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/style"}]},{name:"tabindex",description:{kind:"markdown",value:`An integer attribute indicating if the element can take input focus (is _focusable_), if it should participate to sequential keyboard navigation, and if so, at what position. It can take several values: + +* a _negative value_ means that the element should be focusable, but should not be reachable via sequential keyboard navigation; +* \`0\` means that the element should be focusable and reachable via sequential keyboard navigation, but its relative order is defined by the platform convention; +* a _positive value_ means that the element should be focusable and reachable via sequential keyboard navigation; the order in which the elements are focused is the increasing value of the [**tabindex**](#attr-tabindex). If several elements share the same tabindex, their relative order follows their relative positions in the document.`},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/tabindex"}]},{name:"title",description:{kind:"markdown",value:"Contains a text representing advisory information related to the element it belongs to. Such information can typically, but not necessarily, be presented to the user as a tooltip."},references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/title"}]},{name:"translate",description:{kind:"markdown",value:"An enumerated attribute that is used to specify whether an element's attribute values and the values of its [`Text`](/en-US/docs/Web/API/Text \"The Text interface represents the textual content of Element or Attr. If an element has no markup within its content, it has a single child implementing Text that contains the element's text. However, if the element contains markup, it is parsed into information items and Text nodes that form its children.\") node children are to be translated when the page is localized, or whether to leave them unchanged. It can have the following values:\n\n* empty string and `yes`, which indicates that the element will be translated.\n* `no`, which indicates that the element will not be translated."},valueSet:"y",references:[{name:"MDN Reference",url:"https://developer.mozilla.org/docs/Web/HTML/Global_attributes/translate"}]},{name:"onabort",description:{kind:"markdown",value:"The loading of a resource has been aborted."}},{name:"onblur",description:{kind:"markdown",value:"An element has lost focus (does not bubble)."}},{name:"oncanplay",description:{kind:"markdown",value:"The user agent can play the media, but estimates that not enough data has been loaded to play the media up to its end without having to stop for further buffering of content."}},{name:"oncanplaythrough",description:{kind:"markdown",value:"The user agent can play the media up to its end without having to stop for further buffering of content."}},{name:"onchange",description:{kind:"markdown",value:"The change event is fired for <input>, <select>, and <textarea> elements when a change to the element's value is committed by the user."}},{name:"onclick",description:{kind:"markdown",value:"A pointing device button has been pressed and released on an element."}},{name:"oncontextmenu",description:{kind:"markdown",value:"The right button of the mouse is clicked (before the context menu is displayed)."}},{name:"ondblclick",description:{kind:"markdown",value:"A pointing device button is clicked twice on an element."}},{name:"ondrag",description:{kind:"markdown",value:"An element or text selection is being dragged (every 350ms)."}},{name:"ondragend",description:{kind:"markdown",value:"A drag operation is being ended (by releasing a mouse button or hitting the escape key)."}},{name:"ondragenter",description:{kind:"markdown",value:"A dragged element or text selection enters a valid drop target."}},{name:"ondragleave",description:{kind:"markdown",value:"A dragged element or text selection leaves a valid drop target."}},{name:"ondragover",description:{kind:"markdown",value:"An element or text selection is being dragged over a valid drop target (every 350ms)."}},{name:"ondragstart",description:{kind:"markdown",value:"The user starts dragging an element or text selection."}},{name:"ondrop",description:{kind:"markdown",value:"An element is dropped on a valid drop target."}},{name:"ondurationchange",description:{kind:"markdown",value:"The duration attribute has been updated."}},{name:"onemptied",description:{kind:"markdown",value:"The media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it."}},{name:"onended",description:{kind:"markdown",value:"Playback has stopped because the end of the media was reached."}},{name:"onerror",description:{kind:"markdown",value:"A resource failed to load."}},{name:"onfocus",description:{kind:"markdown",value:"An element has received focus (does not bubble)."}},{name:"onformchange"},{name:"onforminput"},{name:"oninput",description:{kind:"markdown",value:"The value of an element changes or the content of an element with the attribute contenteditable is modified."}},{name:"oninvalid",description:{kind:"markdown",value:"A submittable element has been checked and doesn't satisfy its constraints."}},{name:"onkeydown",description:{kind:"markdown",value:"A key is pressed down."}},{name:"onkeypress",description:{kind:"markdown",value:"A key is pressed down and that key normally produces a character value (use input instead)."}},{name:"onkeyup",description:{kind:"markdown",value:"A key is released."}},{name:"onload",description:{kind:"markdown",value:"A resource and its dependent resources have finished loading."}},{name:"onloadeddata",description:{kind:"markdown",value:"The first frame of the media has finished loading."}},{name:"onloadedmetadata",description:{kind:"markdown",value:"The metadata has been loaded."}},{name:"onloadstart",description:{kind:"markdown",value:"Progress has begun."}},{name:"onmousedown",description:{kind:"markdown",value:"A pointing device button (usually a mouse) is pressed on an element."}},{name:"onmousemove",description:{kind:"markdown",value:"A pointing device is moved over an element."}},{name:"onmouseout",description:{kind:"markdown",value:"A pointing device is moved off the element that has the listener attached or off one of its children."}},{name:"onmouseover",description:{kind:"markdown",value:"A pointing device is moved onto the element that has the listener attached or onto one of its children."}},{name:"onmouseenter",description:"A pointing device is moved onto the element that has the listener attached."},{name:"onmouseleave",description:"A pointing device is moved off the element that has the listener attached."},{name:"onmouseup",description:{kind:"markdown",value:"A pointing device button is released over an element."}},{name:"onmousewheel"},{name:"onpause",description:{kind:"markdown",value:"Playback has been paused."}},{name:"onplay",description:{kind:"markdown",value:"Playback has begun."}},{name:"onplaying",description:{kind:"markdown",value:"Playback is ready to start after having been paused or delayed due to lack of data."}},{name:"onpointercancel",description:"The pointer is unlikely to produce any more events."},{name:"onpointerdown",description:"The pointer enters the active buttons state."},{name:"onpointerenter",description:"Pointing device is moved inside the hit-testing boundary."},{name:"onpointerleave",description:"Pointing device is moved out of the hit-testing boundary."},{name:"onpointerlockchange",description:"The pointer was locked or released."},{name:"onpointerlockerror",description:"It was impossible to lock the pointer for technical reasons or because the permission was denied."},{name:"onpointermove",description:"The pointer changed coordinates."},{name:"onpointerout",description:"The pointing device moved out of hit-testing boundary or leaves detectable hover range."},{name:"onpointerover",description:"The pointing device is moved into the hit-testing boundary."},{name:"onpointerup",description:"The pointer leaves the active buttons state."},{name:"onprogress",description:{kind:"markdown",value:"In progress."}},{name:"onratechange",description:{kind:"markdown",value:"The playback rate has changed."}},{name:"onreset",description:{kind:"markdown",value:"A form is reset."}},{name:"onresize",description:{kind:"markdown",value:"The document view has been resized."}},{name:"onreadystatechange",description:{kind:"markdown",value:"The readyState attribute of a document has changed."}},{name:"onscroll",description:{kind:"markdown",value:"The document view or an element has been scrolled."}},{name:"onseeked",description:{kind:"markdown",value:"A seek operation completed."}},{name:"onseeking",description:{kind:"markdown",value:"A seek operation began."}},{name:"onselect",description:{kind:"markdown",value:"Some text is being selected."}},{name:"onshow",description:{kind:"markdown",value:"A contextmenu event was fired on/bubbled to an element that has a contextmenu attribute"}},{name:"onstalled",description:{kind:"markdown",value:"The user agent is trying to fetch media data, but data is unexpectedly not forthcoming."}},{name:"onsubmit",description:{kind:"markdown",value:"A form is submitted."}},{name:"onsuspend",description:{kind:"markdown",value:"Media data loading has been suspended."}},{name:"ontimeupdate",description:{kind:"markdown",value:"The time indicated by the currentTime attribute has been updated."}},{name:"onvolumechange",description:{kind:"markdown",value:"The volume has changed."}},{name:"onwaiting",description:{kind:"markdown",value:"Playback has stopped because of a temporary lack of data."}},{name:"aria-activedescendant",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-activedescendant"}],description:{kind:"markdown",value:"Identifies the currently active element when DOM focus is on a [`composite`](https://www.w3.org/TR/wai-aria-1.1/#composite) widget, [`textbox`](https://www.w3.org/TR/wai-aria-1.1/#textbox), [`group`](https://www.w3.org/TR/wai-aria-1.1/#group), or [`application`](https://www.w3.org/TR/wai-aria-1.1/#application)."}},{name:"aria-atomic",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-atomic"}],description:{kind:"markdown",value:"Indicates whether [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology) will present all, or only parts of, the changed region based on the change notifications defined by the [`aria-relevant`](https://www.w3.org/TR/wai-aria-1.1/#aria-relevant) attribute."}},{name:"aria-autocomplete",valueSet:"autocomplete",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-autocomplete"}],description:{kind:"markdown",value:"Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be presented if they are made."}},{name:"aria-busy",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-busy"}],description:{kind:"markdown",value:"Indicates an element is being modified and that assistive technologies _MAY_ want to wait until the modifications are complete before exposing them to the user."}},{name:"aria-checked",valueSet:"tristate",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-checked"}],description:{kind:"markdown",value:'Indicates the current "checked" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of checkboxes, radio buttons, and other [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected).'}},{name:"aria-colcount",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-colcount"}],description:{kind:"markdown",value:"Defines the total number of columns in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex)."}},{name:"aria-colindex",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-colindex"}],description:{kind:"markdown",value:"Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) column index or position with respect to the total number of columns within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-colcount) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."}},{name:"aria-colspan",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-colspan"}],description:{kind:"markdown",value:"Defines the number of columns spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-colindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-colindex) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."}},{name:"aria-controls",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-controls"}],description:{kind:"markdown",value:"Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) whose contents or presence are controlled by the current element. See related [`aria-owns`](https://www.w3.org/TR/wai-aria-1.1/#aria-owns)."}},{name:"aria-current",valueSet:"current",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-current"}],description:{kind:"markdown",value:"Indicates the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that represents the current item within a container or set of related elements."}},{name:"aria-describedat",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-describedat"}]},{name:"aria-describedby",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-describedby"}],description:{kind:"markdown",value:"Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that describes the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."}},{name:"aria-disabled",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-disabled"}],description:{kind:"markdown",value:"Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is [perceivable](https://www.w3.org/TR/wai-aria-1.1/#dfn-perceivable) but disabled, so it is not editable or otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-hidden`](https://www.w3.org/TR/wai-aria-1.1/#aria-hidden) and [`aria-readonly`](https://www.w3.org/TR/wai-aria-1.1/#aria-readonly)."}},{name:"aria-dropeffect",valueSet:"dropeffect",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-dropeffect"}],description:{kind:"markdown",value:"\\[Deprecated in ARIA 1.1\\] Indicates what functions can be performed when a dragged object is released on the drop target."}},{name:"aria-errormessage",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage"}],description:{kind:"markdown",value:"Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides an error message for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-invalid`](https://www.w3.org/TR/wai-aria-1.1/#aria-invalid) and [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."}},{name:"aria-expanded",valueSet:"u",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-expanded"}],description:{kind:"markdown",value:"Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed."}},{name:"aria-flowto",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-flowto"}],description:{kind:"markdown",value:"Identifies the next [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order."}},{name:"aria-grabbed",valueSet:"u",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-grabbed"}],description:{kind:"markdown",value:`\\[Deprecated in ARIA 1.1\\] Indicates an element's "grabbed" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) in a drag-and-drop operation.`}},{name:"aria-haspopup",valueSet:"haspopup",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup"}],description:{kind:"markdown",value:"Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."}},{name:"aria-hidden",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"}],description:{kind:"markdown",value:"Indicates whether the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is exposed to an accessibility API. See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."}},{name:"aria-invalid",valueSet:"invalid",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-invalid"}],description:{kind:"markdown",value:"Indicates the entered value does not conform to the format expected by the application. See related [`aria-errormessage`](https://www.w3.org/TR/wai-aria-1.1/#aria-errormessage)."}},{name:"aria-kbdshortcuts",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-kbdshortcuts"}]},{name:"aria-label",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-label"}],description:{kind:"markdown",value:"Defines a string value that labels the current element. See related [`aria-labelledby`](https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby)."}},{name:"aria-labelledby",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"}],description:{kind:"markdown",value:"Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) that labels the current element. See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."}},{name:"aria-level",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-level"}],description:{kind:"markdown",value:"Defines the hierarchical level of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) within a structure."}},{name:"aria-live",valueSet:"live",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-live"}],description:{kind:"markdown",value:"Indicates that an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) will be updated, and describes the types of updates the [user agents](https://www.w3.org/TR/wai-aria-1.1/#dfn-user-agent), [assistive technologies](https://www.w3.org/TR/wai-aria-1.1/#dfn-assistive-technology), and user can expect from the [live region](https://www.w3.org/TR/wai-aria-1.1/#dfn-live-region)."}},{name:"aria-modal",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-modal"}],description:{kind:"markdown",value:"Indicates whether an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is modal when displayed."}},{name:"aria-multiline",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-multiline"}],description:{kind:"markdown",value:"Indicates whether a text box accepts multiple lines of input or only a single line."}},{name:"aria-multiselectable",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-multiselectable"}],description:{kind:"markdown",value:"Indicates that the user may select more than one item from the current selectable descendants."}},{name:"aria-orientation",valueSet:"orientation",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-orientation"}],description:{kind:"markdown",value:"Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous."}},{name:"aria-owns",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-owns"}],description:{kind:"markdown",value:"Identifies an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) (or elements) in order to define a visual, functional, or contextual parent/child [relationship](https://www.w3.org/TR/wai-aria-1.1/#dfn-relationship) between DOM elements where the DOM hierarchy cannot be used to represent the relationship. See related [`aria-controls`](https://www.w3.org/TR/wai-aria-1.1/#aria-controls)."}},{name:"aria-placeholder",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-placeholder"}],description:{kind:"markdown",value:"Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. A hint could be a sample value or a brief description of the expected format."}},{name:"aria-posinset",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-posinset"}],description:{kind:"markdown",value:"Defines an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)'s number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-setsize`](https://www.w3.org/TR/wai-aria-1.1/#aria-setsize)."}},{name:"aria-pressed",valueSet:"tristate",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-pressed"}],description:{kind:"markdown",value:'Indicates the current "pressed" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of toggle buttons. See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-selected`](https://www.w3.org/TR/wai-aria-1.1/#aria-selected).'}},{name:"aria-readonly",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-readonly"}],description:{kind:"markdown",value:"Indicates that the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) is not editable, but is otherwise [operable](https://www.w3.org/TR/wai-aria-1.1/#dfn-operable). See related [`aria-disabled`](https://www.w3.org/TR/wai-aria-1.1/#aria-disabled)."}},{name:"aria-relevant",valueSet:"relevant",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-relevant"}],description:{kind:"markdown",value:"Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. See related [`aria-atomic`](https://www.w3.org/TR/wai-aria-1.1/#aria-atomic)."}},{name:"aria-required",valueSet:"b",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-required"}],description:{kind:"markdown",value:"Indicates that user input is required on the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) before a form may be submitted."}},{name:"aria-roledescription",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-roledescription"}],description:{kind:"markdown",value:"Defines a human-readable, author-localized description for the [role](https://www.w3.org/TR/wai-aria-1.1/#dfn-role) of an [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element)."}},{name:"aria-rowcount",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount"}],description:{kind:"markdown",value:"Defines the total number of rows in a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex)."}},{name:"aria-rowindex",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex"}],description:{kind:"markdown",value:"Defines an [element's](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) row index or position with respect to the total number of rows within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowcount`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowcount) and [`aria-rowspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan)."}},{name:"aria-rowspan",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-rowspan"}],description:{kind:"markdown",value:"Defines the number of rows spanned by a cell or gridcell within a [`table`](https://www.w3.org/TR/wai-aria-1.1/#table), [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid), or [`treegrid`](https://www.w3.org/TR/wai-aria-1.1/#treegrid). See related [`aria-rowindex`](https://www.w3.org/TR/wai-aria-1.1/#aria-rowindex) and [`aria-colspan`](https://www.w3.org/TR/wai-aria-1.1/#aria-colspan)."}},{name:"aria-selected",valueSet:"u",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-selected"}],description:{kind:"markdown",value:'Indicates the current "selected" [state](https://www.w3.org/TR/wai-aria-1.1/#dfn-state) of various [widgets](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-checked`](https://www.w3.org/TR/wai-aria-1.1/#aria-checked) and [`aria-pressed`](https://www.w3.org/TR/wai-aria-1.1/#aria-pressed).'}},{name:"aria-setsize",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-setsize"}],description:{kind:"markdown",value:"Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. See related [`aria-posinset`](https://www.w3.org/TR/wai-aria-1.1/#aria-posinset)."}},{name:"aria-sort",valueSet:"sort",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-sort"}],description:{kind:"markdown",value:"Indicates if items in a table or grid are sorted in ascending or descending order."}},{name:"aria-valuemax",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-valuemax"}],description:{kind:"markdown",value:"Defines the maximum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."}},{name:"aria-valuemin",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-valuemin"}],description:{kind:"markdown",value:"Defines the minimum allowed value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."}},{name:"aria-valuenow",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow"}],description:{kind:"markdown",value:"Defines the current value for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget). See related [`aria-valuetext`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext)."}},{name:"aria-valuetext",references:[{name:"WAI-ARIA Reference",url:"https://www.w3.org/TR/wai-aria-1.1/#aria-valuetext"}],description:{kind:"markdown",value:"Defines the human readable text alternative of [`aria-valuenow`](https://www.w3.org/TR/wai-aria-1.1/#aria-valuenow) for a range [widget](https://www.w3.org/TR/wai-aria-1.1/#dfn-widget)."}},{name:"aria-details",description:{kind:"markdown",value:"Identifies the [element](https://www.w3.org/TR/wai-aria-1.1/#dfn-element) that provides a detailed, extended description for the [object](https://www.w3.org/TR/wai-aria-1.1/#dfn-object). See related [`aria-describedby`](https://www.w3.org/TR/wai-aria-1.1/#aria-describedby)."}},{name:"aria-keyshortcuts",description:{kind:"markdown",value:"Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element."}}],valueSets:[{name:"b",values:[{name:"true"},{name:"false"}]},{name:"u",values:[{name:"true"},{name:"false"},{name:"undefined"}]},{name:"o",values:[{name:"on"},{name:"off"}]},{name:"y",values:[{name:"yes"},{name:"no"}]},{name:"w",values:[{name:"soft"},{name:"hard"}]},{name:"d",values:[{name:"ltr"},{name:"rtl"},{name:"auto"}]},{name:"m",values:[{name:"GET",description:{kind:"markdown",value:"Corresponds to the HTTP [GET method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.3); form data are appended to the `action` attribute URI with a '?' as separator, and the resulting URI is sent to the server. Use this method when the form has no side-effects and contains only ASCII characters."}},{name:"POST",description:{kind:"markdown",value:"Corresponds to the HTTP [POST method](https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.5); form data are included in the body of the form and sent to the server."}},{name:"dialog",description:{kind:"markdown",value:"Use when the form is inside a [`<dialog>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dialog) element to close the dialog when submitted."}}]},{name:"fm",values:[{name:"GET"},{name:"POST"}]},{name:"s",values:[{name:"row"},{name:"col"},{name:"rowgroup"},{name:"colgroup"}]},{name:"t",values:[{name:"hidden"},{name:"text"},{name:"search"},{name:"tel"},{name:"url"},{name:"email"},{name:"password"},{name:"datetime"},{name:"date"},{name:"month"},{name:"week"},{name:"time"},{name:"datetime-local"},{name:"number"},{name:"range"},{name:"color"},{name:"checkbox"},{name:"radio"},{name:"file"},{name:"submit"},{name:"image"},{name:"reset"},{name:"button"}]},{name:"im",values:[{name:"verbatim"},{name:"latin"},{name:"latin-name"},{name:"latin-prose"},{name:"full-width-latin"},{name:"kana"},{name:"kana-name"},{name:"katakana"},{name:"numeric"},{name:"tel"},{name:"email"},{name:"url"}]},{name:"bt",values:[{name:"button"},{name:"submit"},{name:"reset"},{name:"menu"}]},{name:"lt",values:[{name:"1"},{name:"a"},{name:"A"},{name:"i"},{name:"I"}]},{name:"mt",values:[{name:"context"},{name:"toolbar"}]},{name:"mit",values:[{name:"command"},{name:"checkbox"},{name:"radio"}]},{name:"et",values:[{name:"application/x-www-form-urlencoded"},{name:"multipart/form-data"},{name:"text/plain"}]},{name:"tk",values:[{name:"subtitles"},{name:"captions"},{name:"descriptions"},{name:"chapters"},{name:"metadata"}]},{name:"pl",values:[{name:"none"},{name:"metadata"},{name:"auto"}]},{name:"sh",values:[{name:"circle"},{name:"default"},{name:"poly"},{name:"rect"}]},{name:"xo",values:[{name:"anonymous"},{name:"use-credentials"}]},{name:"sb",values:[{name:"allow-forms"},{name:"allow-modals"},{name:"allow-pointer-lock"},{name:"allow-popups"},{name:"allow-popups-to-escape-sandbox"},{name:"allow-same-origin"},{name:"allow-scripts"},{name:"allow-top-navigation"}]},{name:"tristate",values:[{name:"true"},{name:"false"},{name:"mixed"},{name:"undefined"}]},{name:"inputautocomplete",values:[{name:"additional-name"},{name:"address-level1"},{name:"address-level2"},{name:"address-level3"},{name:"address-level4"},{name:"address-line1"},{name:"address-line2"},{name:"address-line3"},{name:"bday"},{name:"bday-year"},{name:"bday-day"},{name:"bday-month"},{name:"billing"},{name:"cc-additional-name"},{name:"cc-csc"},{name:"cc-exp"},{name:"cc-exp-month"},{name:"cc-exp-year"},{name:"cc-family-name"},{name:"cc-given-name"},{name:"cc-name"},{name:"cc-number"},{name:"cc-type"},{name:"country"},{name:"country-name"},{name:"current-password"},{name:"email"},{name:"family-name"},{name:"fax"},{name:"given-name"},{name:"home"},{name:"honorific-prefix"},{name:"honorific-suffix"},{name:"impp"},{name:"language"},{name:"mobile"},{name:"name"},{name:"new-password"},{name:"nickname"},{name:"organization"},{name:"organization-title"},{name:"pager"},{name:"photo"},{name:"postal-code"},{name:"sex"},{name:"shipping"},{name:"street-address"},{name:"tel-area-code"},{name:"tel"},{name:"tel-country-code"},{name:"tel-extension"},{name:"tel-local"},{name:"tel-local-prefix"},{name:"tel-local-suffix"},{name:"tel-national"},{name:"transaction-amount"},{name:"transaction-currency"},{name:"url"},{name:"username"},{name:"work"}]},{name:"autocomplete",values:[{name:"inline"},{name:"list"},{name:"both"},{name:"none"}]},{name:"current",values:[{name:"page"},{name:"step"},{name:"location"},{name:"date"},{name:"time"},{name:"true"},{name:"false"}]},{name:"dropeffect",values:[{name:"copy"},{name:"move"},{name:"link"},{name:"execute"},{name:"popup"},{name:"none"}]},{name:"invalid",values:[{name:"grammar"},{name:"false"},{name:"spelling"},{name:"true"}]},{name:"live",values:[{name:"off"},{name:"polite"},{name:"assertive"}]},{name:"orientation",values:[{name:"vertical"},{name:"horizontal"},{name:"undefined"}]},{name:"relevant",values:[{name:"additions"},{name:"removals"},{name:"text"},{name:"all"},{name:"additions text"}]},{name:"sort",values:[{name:"ascending"},{name:"descending"},{name:"none"},{name:"other"}]},{name:"roles",values:[{name:"alert"},{name:"alertdialog"},{name:"button"},{name:"checkbox"},{name:"dialog"},{name:"gridcell"},{name:"link"},{name:"log"},{name:"marquee"},{name:"menuitem"},{name:"menuitemcheckbox"},{name:"menuitemradio"},{name:"option"},{name:"progressbar"},{name:"radio"},{name:"scrollbar"},{name:"searchbox"},{name:"slider"},{name:"spinbutton"},{name:"status"},{name:"switch"},{name:"tab"},{name:"tabpanel"},{name:"textbox"},{name:"timer"},{name:"tooltip"},{name:"treeitem"},{name:"combobox"},{name:"grid"},{name:"listbox"},{name:"menu"},{name:"menubar"},{name:"radiogroup"},{name:"tablist"},{name:"tree"},{name:"treegrid"},{name:"application"},{name:"article"},{name:"cell"},{name:"columnheader"},{name:"definition"},{name:"directory"},{name:"document"},{name:"feed"},{name:"figure"},{name:"group"},{name:"heading"},{name:"img"},{name:"list"},{name:"listitem"},{name:"math"},{name:"none"},{name:"note"},{name:"presentation"},{name:"region"},{name:"row"},{name:"rowgroup"},{name:"rowheader"},{name:"separator"},{name:"table"},{name:"term"},{name:"text"},{name:"toolbar"},{name:"banner"},{name:"complementary"},{name:"contentinfo"},{name:"form"},{name:"main"},{name:"navigation"},{name:"region"},{name:"search"},{name:"doc-abstract"},{name:"doc-acknowledgments"},{name:"doc-afterword"},{name:"doc-appendix"},{name:"doc-backlink"},{name:"doc-biblioentry"},{name:"doc-bibliography"},{name:"doc-biblioref"},{name:"doc-chapter"},{name:"doc-colophon"},{name:"doc-conclusion"},{name:"doc-cover"},{name:"doc-credit"},{name:"doc-credits"},{name:"doc-dedication"},{name:"doc-endnote"},{name:"doc-endnotes"},{name:"doc-epigraph"},{name:"doc-epilogue"},{name:"doc-errata"},{name:"doc-example"},{name:"doc-footnote"},{name:"doc-foreword"},{name:"doc-glossary"},{name:"doc-glossref"},{name:"doc-index"},{name:"doc-introduction"},{name:"doc-noteref"},{name:"doc-notice"},{name:"doc-pagebreak"},{name:"doc-pagelist"},{name:"doc-part"},{name:"doc-preface"},{name:"doc-prologue"},{name:"doc-pullquote"},{name:"doc-qna"},{name:"doc-subtitle"},{name:"doc-tip"},{name:"doc-toc"}]},{name:"metanames",values:[{name:"application-name"},{name:"author"},{name:"description"},{name:"format-detection"},{name:"generator"},{name:"keywords"},{name:"publisher"},{name:"referrer"},{name:"robots"},{name:"theme-color"},{name:"viewport"}]},{name:"haspopup",values:[{name:"false",description:{kind:"markdown",value:"(default) Indicates the element does not have a popup."}},{name:"true",description:{kind:"markdown",value:"Indicates the popup is a menu."}},{name:"menu",description:{kind:"markdown",value:"Indicates the popup is a menu."}},{name:"listbox",description:{kind:"markdown",value:"Indicates the popup is a listbox."}},{name:"tree",description:{kind:"markdown",value:"Indicates the popup is a tree."}},{name:"grid",description:{kind:"markdown",value:"Indicates the popup is a grid."}},{name:"dialog",description:{kind:"markdown",value:"Indicates the popup is a dialog."}}]}]},Bs=function(){function e(t){this.dataProviders=[],this.setDataProviders(t.useDefaultDataProvider!==!1,t.customDataProviders||[])}return e.prototype.setDataProviders=function(t,n){var r;this.dataProviders=[],t&&this.dataProviders.push(new sr("html5",Ps)),(r=this.dataProviders).push.apply(r,n)},e.prototype.getDataProviders=function(){return this.dataProviders},e}(),Fs={};function qs(e){e===void 0&&(e=Fs);var t=new Bs(e),n=new ms(e,t),r=new ls(e,t);return{setDataProviders:t.setDataProviders.bind(t),createScanner:de,parseHTMLDocument:function(i){return rr(i.getText())},doComplete:r.doComplete.bind(r),doComplete2:r.doComplete2.bind(r),setCompletionParticipants:r.setCompletionParticipants.bind(r),doHover:n.doHover.bind(n),format:_s,findDocumentHighlights:xs,findDocumentLinks:Cs,findDocumentSymbols:Ds,getFoldingRanges:Hs,getSelectionRanges:zs,doTagComplete:r.doTagComplete.bind(r),doRename:Ms,findMatchingTagPosition:Ns,findOnTypeRenameRanges:vr,findLinkedEditingRanges:vr}}function Os(e,t){return new sr(e,t)}var xt=function(){return xt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},xt.apply(this,arguments)},ve=function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(o){o(a)})}return new(n||(n=Promise))(function(a,o){function u(h){try{l(r.next(h))}catch(c){o(c)}}function s(h){try{l(r.throw(h))}catch(c){o(c)}}function l(h){h.done?a(h.value):i(h.value).then(u,s)}l((r=r.apply(e,t||[])).next())})},we=function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(l){return function(h){return s([l,h])}}function s(l){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=l[0]&2?i.return:l[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,l[1])).done)return a;switch(i=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,i=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){n=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){n.label=l[1];break}if(l[0]===6&&n.label<a[1]){n.label=a[1],a=l;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(l);break}a[2]&&n.ops.pop(),n.trys.pop();continue}l=t.call(e,n)}catch(h){l=[6,h],i=0}finally{r=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},js=function(){function e(t,n){this._ctx=t,this._languageSettings=n.languageSettings,this._languageId=n.languageId;var r=this._languageSettings.data,i=r==null?void 0:r.useDefaultDataProvider,a=[];if(r!=null&&r.dataProviders)for(var o in r.dataProviders)a.push(Os(o,r.dataProviders[o]));this._languageService=qs({useDefaultDataProvider:i,customDataProviders:a})}return e.prototype.doComplete=function(t,n){return ve(this,void 0,void 0,function(){var r,i;return we(this,function(a){return r=this._getTextDocument(t),i=this._languageService.parseHTMLDocument(r),[2,Promise.resolve(this._languageService.doComplete(r,n,i,this._languageSettings&&this._languageSettings.suggest))]})})},e.prototype.format=function(t,n,r){return ve(this,void 0,void 0,function(){var i,a,o;return we(this,function(u){return i=this._getTextDocument(t),a=xt(xt({},this._languageSettings.format),r),o=this._languageService.format(i,n,a),[2,Promise.resolve(o)]})})},e.prototype.doHover=function(t,n){return ve(this,void 0,void 0,function(){var r,i,a;return we(this,function(o){return r=this._getTextDocument(t),i=this._languageService.parseHTMLDocument(r),a=this._languageService.doHover(r,n,i),[2,Promise.resolve(a)]})})},e.prototype.findDocumentHighlights=function(t,n){return ve(this,void 0,void 0,function(){var r,i,a;return we(this,function(o){return r=this._getTextDocument(t),i=this._languageService.parseHTMLDocument(r),a=this._languageService.findDocumentHighlights(r,n,i),[2,Promise.resolve(a)]})})},e.prototype.findDocumentLinks=function(t){return ve(this,void 0,void 0,function(){var n,r;return we(this,function(i){return n=this._getTextDocument(t),r=this._languageService.findDocumentLinks(n,null),[2,Promise.resolve(r)]})})},e.prototype.findDocumentSymbols=function(t){return ve(this,void 0,void 0,function(){var n,r,i;return we(this,function(a){return n=this._getTextDocument(t),r=this._languageService.parseHTMLDocument(n),i=this._languageService.findDocumentSymbols(n,r),[2,Promise.resolve(i)]})})},e.prototype.getFoldingRanges=function(t,n){return ve(this,void 0,void 0,function(){var r,i;return we(this,function(a){return r=this._getTextDocument(t),i=this._languageService.getFoldingRanges(r,n),[2,Promise.resolve(i)]})})},e.prototype.getSelectionRanges=function(t,n){return ve(this,void 0,void 0,function(){var r,i;return we(this,function(a){return r=this._getTextDocument(t),i=this._languageService.getSelectionRanges(r,n),[2,Promise.resolve(i)]})})},e.prototype.doRename=function(t,n,r){return ve(this,void 0,void 0,function(){var i,a,o;return we(this,function(u){return i=this._getTextDocument(t),a=this._languageService.parseHTMLDocument(i),o=this._languageService.doRename(i,n,r,a),[2,Promise.resolve(o)]})})},e.prototype._getTextDocument=function(t){for(var n=this._ctx.getMirrorModels(),r=0,i=n;r<i.length;r++){var a=i[r];if(a.uri.toString()===t)return un.create(t,this._languageId,a.version,a.getValue())}return null},e}();self.onmessage=function(){vi(function(e,t){return new js(e,t)})}})(); diff --git a/magic-editor/src/main/resources/magic-editor/assets/index.c85bc970.js b/magic-editor/src/main/resources/magic-editor/assets/index.6b6c80cf.js similarity index 77% rename from magic-editor/src/main/resources/magic-editor/assets/index.c85bc970.js rename to magic-editor/src/main/resources/magic-editor/assets/index.6b6c80cf.js index 6dd7bf03..beed7ad2 100644 --- a/magic-editor/src/main/resources/magic-editor/assets/index.c85bc970.js +++ b/magic-editor/src/main/resources/magic-editor/assets/index.6b6c80cf.js @@ -1 +1 @@ -import"./app.028aeefd.js";import"./vue.e2ed9d9e.js";import"./axios.23e7b955.js";import"./vendor.95bdc8f2.js";const s=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerpolicy&&(r.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?r.credentials="include":e.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}};s(); +import"./app.c638e5c5.js";import"./vue.d1ea1415.js";import"./axios.23e7b955.js";import"./vendor.08c4cc4b.js";const l=function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerpolicy&&(r.referrerPolicy=e.referrerpolicy),e.crossorigin==="use-credentials"?r.credentials="include":e.crossorigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=n(e);fetch(e.href,r)}};l(); diff --git a/magic-editor/src/main/resources/magic-editor/assets/json.worker.5e438d37.js b/magic-editor/src/main/resources/magic-editor/assets/json.worker.5e438d37.js new file mode 100644 index 00000000..4bf02029 --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/json.worker.5e438d37.js @@ -0,0 +1,29 @@ +(function(){"use strict";class Wi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` + +`+t.stack):t},0)}}emit(t){this.listeners.forEach(r=>{r(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const qi=new Wi;function Hi(e){Bi(e)||qi.onUnexpectedError(e)}function jr(e){if(e instanceof Error){let{name:t,message:r}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:n}}return e}const Ur="Canceled";function Bi(e){return e instanceof Error&&e.name===Ur&&e.message===Ur}function Yi(e){const t=this;let r=!1,n;return function(){return r||(r=!0,n=e.apply(t,arguments)),n}}var Rt;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return p||r}e.from=s;function a(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=a;function o(p){return p[Symbol.iterator]().next().value}e.first=o;function u(p,g){for(const _ of p)if(g(_))return!0;return!1}e.some=u;function l(p,g){for(const _ of p)if(g(_))return _}e.find=l;function*c(p,g){for(const _ of p)g(_)&&(yield _)}e.filter=c;function*f(p,g){let _=0;for(const L of p)yield g(L,_++)}e.map=f;function*h(...p){for(const g of p)for(const _ of g)yield _}e.concat=h;function*d(p){for(const g of p)for(const _ of g)yield _}e.concatNested=d;function m(p,g,_){let L=_;for(const S of p)L=g(L,S);return L}e.reduce=m;function*v(p,g,_=p.length){for(g<0&&(g+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);g<_;g++)yield p[g]}e.slice=v;function b(p,g=Number.POSITIVE_INFINITY){const _=[];if(g===0)return[_,p];const L=p[Symbol.iterator]();for(let S=0;S<g;S++){const A=L.next();if(A.done)return[_,e.empty()];_.push(A.value)}return[_,{[Symbol.iterator](){return L}}]}e.consume=b;function N(p,g,_=(L,S)=>L===S){const L=p[Symbol.iterator](),S=g[Symbol.iterator]();for(;;){const A=L.next(),w=S.next();if(A.done!==w.done)return!1;if(A.done)return!0;if(!_(A.value,w.value))return!1}}e.equals=N})(Rt||(Rt={}));function Qa(e){return e}function Xa(e,t){}class zi extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Rr(e){if(Rt.is(e)){let t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new zi(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Gi(...e){return Or(()=>Rr(e))}function Or(e){return{dispose:Yi(()=>{e()})}}class tt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Rr(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?tt.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(t),t}}tt.DISABLE_DISPOSED_WARNING=!1;class Vr{constructor(){this._store=new tt,this._store}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Vr.None=Object.freeze({dispose(){}});var Ot;const bt="en";let Vt=!1,$t=!1,Wt=!1,yt,qt=bt,Ji,je;const ee=typeof self=="object"?self:typeof global=="object"?global:{};let Z;typeof ee.vscode!="undefined"&&typeof ee.vscode.process!="undefined"?Z=ee.vscode.process:typeof process!="undefined"&&(Z=process);const Qi=typeof((Ot=Z==null?void 0:Z.versions)===null||Ot===void 0?void 0:Ot.electron)=="string"&&Z.type==="renderer";if(typeof navigator=="object"&&!Qi)je=navigator.userAgent,Vt=je.indexOf("Windows")>=0,$t=je.indexOf("Macintosh")>=0,(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Wt=je.indexOf("Linux")>=0,yt=navigator.language,qt=yt;else if(typeof Z=="object"){Vt=Z.platform==="win32",$t=Z.platform==="darwin",Wt=Z.platform==="linux",Wt&&!!Z.env.SNAP&&Z.env.SNAP_REVISION,yt=bt,qt=bt;const e=Z.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];yt=t.locale,qt=r||bt,Ji=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const rt=Vt,Xi=$t,$r=function(){if(ee.setImmediate)return ee.setImmediate.bind(ee);if(typeof ee.postMessage=="function"&&!ee.importScripts){let r=[];ee.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=r.length;s<a;s++){const o=r[s];if(o.id===i.data.vscodeSetImmediateId){r.splice(s,1),o.callback();return}}});let n=0;return i=>{const s=++n;r.push({id:s,callback:i}),ee.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(Z==null?void 0:Z.nextTick)=="function")return Z.nextTick.bind(Z);const t=Promise.resolve();return r=>t.then(r)}();function Zi(e){let t=[],r=Object.getPrototypeOf(e);for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t}function Ht(e){const t=[];for(const r of Zi(e))typeof e[r]=="function"&&t.push(r);return t}function Wr(e,t){const r=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)};let n={};for(const i of e)n[i]=r(i);return n}const Ki="$initialize";class es{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,r){let n=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[n]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:n,method:t,args:r})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let s=t;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let r=t,n=r.req;this._handler.handleMessage(r.method,r.args).then(s=>{this._send({vsWorker:this._workerId,seq:n,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=jr(s.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:jr(s)})})}_send(t){let r=[];if(t.req){const n=t;for(let i=0;i<n.args.length;i++)n.args[i]instanceof ArrayBuffer&&r.push(n.args[i])}else{const n=t;n.res instanceof ArrayBuffer&&r.push(n.res)}this._handler.sendMessage(t,r)}}class ts{constructor(t,r){this._requestHandlerFactory=r,this._requestHandler=null,this._protocol=new es({sendMessage:(n,i)=>{t(n,i)},handleMessage:(n,i)=>this._handleMessage(n,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,r){if(t===Ki)return this.initialize(r[0],r[1],r[2],r[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,r))}catch(n){return Promise.reject(n)}}initialize(t,r,n,i){this._protocol.setWorkerId(t);const a=Wr(i,(o,u)=>this._protocol.sendMessage(o,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Ht(this._requestHandler))):(r&&(typeof r.baseUrl!="undefined"&&delete r.baseUrl,typeof r.paths!="undefined"&&typeof r.paths.vs!="undefined"&&delete r.paths.vs,typeof r.trustedTypesPolicy!==void 0&&delete r.trustedTypesPolicy,r.catchError=!0,self.require.config(r)),new Promise((o,u)=>{self.require([n],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){u(new Error("No RequestHandler!"));return}o(Ht(this._requestHandler))},u)}))}}class Le{constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function rs(e){return e.split(/\r\n|\r|\n/)}function ns(e){for(let t=0,r=e.length;t<r;t++){const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function is(e,t=e.length-1){for(let r=t;r>=0;r--){const n=e.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}function qr(e,t){return(t<<5)-t+e|0}function ss(e,t){t=qr(149417,t);for(let r=0,n=e.length;r<n;r++)t=qr(e.charCodeAt(r),t);return t}class Hr{constructor(t){this.source=t}getElements(){const t=this.source,r=new Int32Array(t.length);for(let n=0,i=t.length;n<i;n++)r[n]=t.charCodeAt(n);return r}}function as(e,t,r){return new Ce(new Hr(e),new Hr(t)).ComputeDiff(r).changes}class He{static Assert(t,r){if(!t)throw new Error(r)}}class Be{static Copy(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}static Copy2(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}}class Br{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Le(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(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),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 Ce{constructor(t,r,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,s,a]=Ce._getElements(t),[o,u,l]=Ce._getElements(r);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Ce._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,s=r.length;i<s;i++)n[i]=ss(r[i],0);return[r,n,!0]}return r instanceof Int32Array?[[],r,!1]:[[],new Int32Array(r),!1]}ElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[r]:!0}ElementsAreStrictEqual(t,r){if(!this.ElementsAreEqual(t,r))return!1;const n=Ce._getStrictElement(this._originalSequence,t),i=Ce._getStrictElement(this._modifiedSequence,r);return n===i}static _getStrictElement(t,r){return typeof t.getStrictElement=="function"?t.getStrictElement(r):null}OriginalElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[r]:!0}ModifiedElementsAreEqual(t,r){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[r]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,r,n,i,s){const a=[!1];let o=this.ComputeDiffRecursive(t,r,n,i,a);return s&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}ComputeDiffRecursive(t,r,n,i,s){for(s[0]=!1;t<=r&&n<=i&&this.ElementsAreEqual(t,n);)t++,n++;for(;r>=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new Le(t,0,n,i-n+1)]):t<=r?(He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Le(t,r-t+1,n,0)]):(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,r,n,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,n,c,s);let h=[];return s[0]?h=[new Le(l+1,r-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,r,c+1,i,s),this.ConcatenateChanges(f,h)}return[new Le(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,s,a,o,u,l,c,f,h,d,m,v,b,N,p){let g=null,_=null,L=new Br,S=r,A=n,w=d[0]-b[0]-i,y=-1073741824,T=this.m_forwardHistory.length-1;do{const M=w+t;M===S||M<A&&l[M-1]<l[M+1]?(f=l[M+1],m=f-w-i,f<y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m),w=M+1-t):(f=l[M-1]+1,m=f-w-i,f<y&&L.MarkNextChange(),y=f-1,L.AddOriginalElement(f,m+1),w=M-1-t),T>=0&&(l=this.m_forwardHistory[T],t=l[0],S=1,A=l.length-1)}while(--T>=-1);if(g=L.getReverseChanges(),p[0]){let M=d[0]+1,k=b[0]+1;if(g!==null&&g.length>0){const F=g[g.length-1];M=Math.max(M,F.getOriginalEnd()),k=Math.max(k,F.getModifiedEnd())}_=[new Le(M,h-M+1,k,v-k+1)]}else{L=new Br,S=a,A=o,w=d[0]-b[0]-u,y=1073741824,T=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const M=w+s;M===S||M<A&&c[M-1]>=c[M+1]?(f=c[M+1]-1,m=f-w-u,f>y&&L.MarkNextChange(),y=f+1,L.AddOriginalElement(f+1,m+1),w=M+1-s):(f=c[M-1],m=f-w-u,f>y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m+1),w=M-1-s),T>=0&&(c=this.m_reverseHistory[T],s=c[0],S=1,A=c.length-1)}while(--T>=-1);_=L.getChanges()}return this.ConcatenateChanges(g,_)}ComputeRecursionPoint(t,r,n,i,s,a,o){let u=0,l=0,c=0,f=0,h=0,d=0;t--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=r-t+(i-n),v=m+1,b=new Int32Array(v),N=new Int32Array(v),p=i-n,g=r-t,_=t-n,L=r-i,A=(g-p)%2===0;b[p]=t,N[g]=r,o[0]=!1;for(let w=1;w<=m/2+1;w++){let y=0,T=0;c=this.ClipDiagonalBound(p-w,w,p,v),f=this.ClipDiagonalBound(p+w,w,p,v);for(let k=c;k<=f;k+=2){k===c||k<f&&b[k-1]<b[k+1]?u=b[k+1]:u=b[k-1]+1,l=u-(k-p)-_;const F=u;for(;u<r&&l<i&&this.ElementsAreEqual(u+1,l+1);)u++,l++;if(b[k]=u,u+l>y+T&&(y=u,T=l),!A&&Math.abs(k-g)<=w-1&&u>=N[k])return s[0]=u,a[0]=l,F<=N[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}const M=(y-t+(T-n)-w)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(y,M))return o[0]=!0,s[0]=y,a[0]=T,M>0&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):(t++,n++,[new Le(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(g-w,w,g,v),d=this.ClipDiagonalBound(g+w,w,g,v);for(let k=h;k<=d;k+=2){k===h||k<d&&N[k-1]>=N[k+1]?u=N[k+1]-1:u=N[k-1],l=u-(k-g)-L;const F=u;for(;u>t&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(N[k]=u,A&&Math.abs(k-p)<=w&&u<=b[k])return s[0]=u,a[0]=l,F>=b[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}if(w<=1447){let k=new Int32Array(f-c+2);k[0]=p-c+1,Be.Copy2(b,c,k,1,f-c+1),this.m_forwardHistory.push(k),k=new Int32Array(d-h+2),k[0]=g-h+1,Be.Copy2(N,h,k,1,d-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o)}PrettifyChanges(t){for(let r=0;r<t.length;r++){const n=t[r],i=r<t.length-1?t[r+1].originalStart:this._originalElementsOrHash.length,s=r<t.length-1?t[r+1].modifiedStart:this._modifiedElementsOrHash.length,a=n.originalLength>0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<s&&(!a||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!o||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const l=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!l)break;n.originalStart++,n.modifiedStart++}let u=[null];if(r<t.length-1&&this.ChangesOverlap(t[r],t[r+1],u)){t[r]=u[0],t.splice(r+1,1),r--;continue}}for(let r=t.length-1;r>=0;r--){const n=t[r];let i=0,s=0;if(r>0){const f=t[r-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let u=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let f=1;;f++){const h=n.originalStart-f,d=n.modifiedStart-f;if(h<i||d<s||a&&!this.OriginalElementsAreEqual(h,h+n.originalLength)||o&&!this.ModifiedElementsAreEqual(d,d+n.modifiedLength))break;const v=(h===i&&d===s?5:0)+this._boundaryScore(h,n.originalLength,d,n.modifiedLength);v>l&&(l=v,u=f)}n.originalStart-=u,n.modifiedStart-=u;const c=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],c)){t[r-1]=c[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r<n;r++){const i=t[r-1],s=t[r],a=s.originalStart-i.originalStart-i.originalLength,o=i.originalStart,u=s.originalStart+s.originalLength,l=u-o,c=i.modifiedStart,f=s.modifiedStart+s.modifiedLength,h=f-c;if(a<5&&l<20&&h<20){const d=this._findBetterContiguousSequence(o,l,c,h,a);if(d){const[m,v]=d;(m!==i.originalStart+i.originalLength||v!==i.modifiedStart+i.modifiedLength)&&(i.originalLength=m-i.originalStart,i.modifiedLength=v-i.modifiedStart,s.originalStart=m+a,s.modifiedStart=v+a,s.originalLength=u-s.originalStart,s.modifiedLength=f-s.modifiedStart)}}}return t}_findBetterContiguousSequence(t,r,n,i,s){if(r<s||i<s)return null;const a=t+r-s+1,o=n+i-s+1;let u=0,l=0,c=0;for(let f=t;f<a;f++)for(let h=n;h<o;h++){const d=this._contiguousSequenceScore(f,h,s);d>0&&d>u&&(u=d,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let s=0;s<n;s++){if(!this.ElementsAreEqual(t+s,r+s))return 0;i+=this._originalStringElements[t+s].length}return i}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){const s=this._OriginalRegionIsBoundary(t,r)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return s+a}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return Be.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],Be.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return Be.Copy(t,0,i,0,t.length),Be.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(He.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),He.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(s=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(o=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Le(i,s,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t<i)return t;const s=n,a=i-n-1,o=r%2===0;if(t<0){const u=s%2===0;return o===u?0:1}else{const u=a%2===0;return o===u?i-1:i-2}}}let Ye;if(typeof ee.vscode!="undefined"&&typeof ee.vscode.process!="undefined"){const e=ee.vscode.process;Ye={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()},nextTick(t){return $r(t)}}}else typeof process!="undefined"?Ye={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(e){return process.nextTick(e)}}:Ye={get platform(){return rt?"win32":Xi?"darwin":"linux"},get arch(){},nextTick(e){return $r(e)},get env(){return{}},cwd(){return"/"}};const Bt=Ye.cwd,os=Ye.env,Ue=Ye.platform,us=65,ls=97,fs=90,cs=122,xe=46,K=47,se=92,ke=58,hs=63;class Yr extends Error{constructor(t,r,n){let i;typeof r=="string"&&r.indexOf("not ")===0?(i="must not be",r=r.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${r}`;a+=`. Received type ${typeof n}`;super(a);this.code="ERR_INVALID_ARG_TYPE"}}function J(e,t){if(typeof e!="string")throw new Yr(t,"string",e)}function R(e){return e===K||e===se}function Yt(e){return e===K}function Te(e){return e>=us&&e<=fs||e>=ls&&e<=cs}function St(e,t,r,n){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)u=e.charCodeAt(l);else{if(n(u))break;u=K}if(n(u)){if(!(a===l-1||o===1))if(o===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==xe||i.charCodeAt(i.length-2)!==xe){if(i.length>2){const c=i.lastIndexOf(r);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(r)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===xe&&o!==-1?++o:o=-1}return i}function zr(e,t){if(t===null||typeof t!="object")throw new Yr("pathObject","Object",t);const r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}const ie={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],J(s,"path"),s.length===0)continue}else t.length===0?s=Bt():(s=os[`=${t}`]||Bt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)R(c)&&(o=1,l=!0);else if(R(c))if(l=!0,R(s.charCodeAt(1))){let f=2,h=f;for(;f<a&&!R(s.charCodeAt(f));)f++;if(f<a&&f!==h){const d=s.slice(h,f);for(h=f;f<a&&R(s.charCodeAt(f));)f++;if(f<a&&f!==h){for(h=f;f<a&&!R(s.charCodeAt(f));)f++;(f===a||f!==h)&&(u=`\\\\${d}\\${s.slice(h,f)}`,o=f)}}}else o=1;else Te(c)&&s.charCodeAt(1)===ke&&(u=s.slice(0,2),o=2,a>2&&R(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(o)}\\${r}`,n=l,l&&t.length>0)break}return r=St(r,!n,"\\",R),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){J(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return Yt(s)?"\\":e;if(R(s))if(i=!0,R(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!R(e.charCodeAt(o));)o++;if(o<t&&o!==u){const l=e.slice(u,o);for(u=o;o<t&&R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!R(e.charCodeAt(o));)o++;if(o===t)return`\\\\${l}\\${e.slice(u)}\\`;o!==u&&(n=`\\\\${l}\\${e.slice(u,o)}`,r=o)}}}else r=1;else Te(s)&&e.charCodeAt(1)===ke&&(n=e.slice(0,2),r=2,t>2&&R(e.charCodeAt(2))&&(i=!0,r=3));let a=r<t?St(e.slice(r),!i,"\\",R):"";return a.length===0&&!i&&(a="."),a.length>0&&R(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){J(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return R(r)||t>2&&Te(r)&&e.charCodeAt(1)===ke&&R(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const a=e[s];J(a,"path"),a.length>0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&R(r.charCodeAt(0))){++i;const s=r.length;s>1&&R(r.charCodeAt(1))&&(++i,s>2&&(R(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&R(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return ie.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t)return"";const r=ie.resolve(e),n=ie.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;i<e.length&&e.charCodeAt(i)===se;)i++;let s=e.length;for(;s-1>i&&e.charCodeAt(s-1)===se;)s--;const a=s-i;let o=0;for(;o<t.length&&t.charCodeAt(o)===se;)o++;let u=t.length;for(;u-1>o&&t.charCodeAt(u-1)===se;)u--;const l=u-o,c=a<l?a:l;let f=-1,h=0;for(;h<c;h++){const m=e.charCodeAt(i+h);if(m!==t.charCodeAt(o+h))break;m===se&&(f=h)}if(h!==c){if(f===-1)return n}else{if(l>c){if(t.charCodeAt(o+h)===se)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(e.charCodeAt(i+h)===se?f=h:h===2&&(f=3)),f===-1&&(f=0)}let d="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===se)&&(d+=d.length===0?"..":"\\..");return o+=f,d.length>0?`${d}${n.slice(o,u)}`:(n.charCodeAt(o)===se&&++o,n.slice(o,u))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ie.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const r=t.charCodeAt(2);if(r!==hs&&r!==xe)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===ke&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){J(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return R(i)?e:".";if(R(i)){if(r=n=1,R(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!R(e.charCodeAt(o));)o++;if(o===t)return e;o!==u&&(r=n=o+1)}}}}else Te(i)&&e.charCodeAt(1)===ke&&(r=t>2&&R(e.charCodeAt(2))?3:2,n=r);let s=-1,a=!0;for(let o=t-1;o>=n;--o)if(R(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===ke&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(R(u)){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(R(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ke&&Te(e.charCodeAt(0))&&(t=n=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(R(u)){if(!s){n=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===xe?r===-1?r=o:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:zr.bind(null,"\\"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return R(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(R(i)){if(n=1,R(e.charCodeAt(1))){let f=2,h=f;for(;f<r&&!R(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&R(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&!R(e.charCodeAt(f));)f++;f===r?n=f:f!==h&&(n=f+1)}}}}else if(Te(i)&&e.charCodeAt(1)===ke){if(r<=2)return t.root=t.dir=e,t;if(n=2,R(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,a=n,o=-1,u=!0,l=e.length-1,c=0;for(;l>=n;--l){if(i=e.charCodeAt(l),R(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===xe?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ae={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Bt();J(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===K)}return t=St(t,!r,"/",Yt),r?`/${t}`:t.length>0?t:"."},normalize(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K,r=e.charCodeAt(e.length-1)===K;return e=St(e,!t,"/",Yt),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return J(e,"path"),e.length>0&&e.charCodeAt(0)===K},join(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){const n=e[r];J(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":ae.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t||(e=ae.resolve(e),t=ae.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,a=t.length-s,o=i<a?i:a;let u=-1,l=0;for(;l<o;l++){const f=e.charCodeAt(r+l);if(f!==t.charCodeAt(s+l))break;f===K&&(u=l)}if(l===o)if(a>o){if(t.charCodeAt(s+l)===K)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(r+l)===K?u=l:l===0&&(u=0));let c="";for(l=r+u+1;l<=n;++l)(l===n||e.charCodeAt(l)===K)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===K){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===K){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a===-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===K){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===K){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:zr.bind(null,"/"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===K;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=n;--u){const c=e.charCodeAt(u);if(c===K){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===xe?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&r?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ae.win32=ie.win32=ie,ae.posix=ie.posix=ae,Ue==="win32"?ie.normalize:ae.normalize,Ue==="win32"?ie.resolve:ae.resolve,Ue==="win32"?ie.relative:ae.relative,Ue==="win32"?ie.dirname:ae.dirname,Ue==="win32"?ie.basename:ae.basename,Ue==="win32"?ie.extname:ae.extname,Ue==="win32"?ie.sep:ae.sep;const ds=/^\w[\w\d+.-]*$/,gs=/^\//,ms=/^\/\//;function Gr(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&&!ds.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!gs.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(ms.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 ("//")')}}function ps(e,t){return!e&&!t?"file":e}function vs(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ge&&(t=ge+t):t=ge;break}return t}const Y="",ge="/",bs=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,r,n,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=ps(t,a),this.authority=r||Y,this.path=vs(this.scheme,n||Y),this.query=i||Y,this.fragment=s||Y,Gr(this,a))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return zt(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Y),n===void 0?n=this.authority:n===null&&(n=Y),i===void 0?i=this.path:i===null&&(i=Y),s===void 0?s=this.query:s===null&&(s=Y),a===void 0?a=this.fragment:a===null&&(a=Y),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new ze(r,n,i,s,a)}static parse(t,r=!1){const n=bs.exec(t);return n?new ze(n[2]||Y,_t(n[4]||Y),_t(n[5]||Y),_t(n[7]||Y),_t(n[9]||Y),r):new ze(Y,Y,Y,Y,Y)}static file(t){let r=Y;if(rt&&(t=t.replace(/\\/g,ge)),t[0]===ge&&t[1]===ge){const n=t.indexOf(ge,2);n===-1?(r=t.substring(2),t=ge):(r=t.substring(2,n),t=t.substring(n)||ge)}return new ze("file",r,t,Y,Y)}static from(t){const r=new ze(t.scheme,t.authority,t.path,t.query,t.fragment);return Gr(r,!0),r}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return rt&&t.scheme==="file"?n=Re.file(ie.join(zt(t,!0),...r)).path:n=ae.join(t.path,...r),t.with({path:n})}toString(t=!1){return Gt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const r=new ze(t);return r._formatted=t.external,r._fsPath=t._sep===Jr?t.fsPath:null,r}}else return t}}const Jr=rt?1:void 0;class ze extends Re{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=zt(this,!1)),this._fsPath}toString(t=!1){return t?Gt(this,!0):(this._formatted||(this._formatted=Gt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Jr),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Qr={[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 Xr(e,t){let r,n=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const a=Qr[s];a!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function ys(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=Qr[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function zt(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,rt&&(r=r.replace(/\//g,"\\")),r}function Gt(e,t){const r=t?ys:Xr;let n="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=ge,n+=ge),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.indexOf(":"),l===-1?n+=r(c,!1):(n+=r(c.substr(0,l),!1),n+=":",n+=r(c.substr(l+1),!1)),n+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?n+=r(s,!1):(n+=r(s.substr(0,l),!1),n+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=r(a,!0)}return o&&(n+="?",n+=r(o,!1)),u&&(n+="#",n+=t?u:Xr(u,!1)),n}function Zr(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Zr(e.substr(3)):e}}const Kr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _t(e){return e.match(Kr)?e.replace(Kr,t=>Zr(t)):e}class le{constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new le(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return le.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return le.isBefore(this,t)}static isBefore(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<r.column}isBeforeOrEqual(t){return le.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<=r.column}static compare(t,r){let n=t.lineNumber|0,i=r.lineNumber|0;if(n===i){let s=t.column|0,a=r.column|0;return s-a}return n-i}clone(){return new le(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new le(t.lineNumber,t.column)}static isIPosition(t){return t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}}class G{constructor(t,r,n,i){t>n||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return G.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return G.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumber<t.startLineNumber||r.lineNumber>t.endLineNumber||r.lineNumber===t.startLineNumber&&r.column<t.startColumn||r.lineNumber===t.endLineNumber&&r.column>t.endColumn)}containsRange(t){return G.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>t.endColumn)}strictContainsRange(t){return G.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return G.plusRange(this,t)}static plusRange(t,r){let n,i,s,a;return r.startLineNumber<t.startLineNumber?(n=r.startLineNumber,i=r.startColumn):r.startLineNumber===t.startLineNumber?(n=r.startLineNumber,i=Math.min(r.startColumn,t.startColumn)):(n=t.startLineNumber,i=t.startColumn),r.endLineNumber>t.endLineNumber?(s=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(s=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new G(n,i,s,a)}intersectRanges(t){return G.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn,o=r.startLineNumber,u=r.startColumn,l=r.endLineNumber,c=r.endColumn;return n<o?(n=o,i=u):n===o&&(i=Math.max(i,u)),s>l?(s=l,a=c):s===l&&(a=Math.min(a,c)),n>s||n===s&&i>a?null:new G(n,i,s,a)}equalsRange(t){return G.equalsRange(this,t)}static equalsRange(t,r){return!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return G.getEndPosition(this)}static getEndPosition(t){return new le(t.endLineNumber,t.endColumn)}getStartPosition(){return G.getStartPosition(this)}static getStartPosition(t){return new le(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new G(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new G(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return G.collapseToStart(this)}static collapseToStart(t){return new G(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,r=t){return new G(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new G(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<t.startColumn)}static areIntersecting(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<=r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<=t.startColumn)}static compareRangesUsingStarts(t,r){if(t&&r){const s=t.startLineNumber|0,a=r.startLineNumber|0;if(s===a){const o=t.startColumn|0,u=r.startColumn|0;if(o===u){const l=t.endLineNumber|0,c=r.endLineNumber|0;if(l===c){const f=t.endColumn|0,h=r.endColumn|0;return f-h}return l-c}return o-u}return s-a}return(t?1:0)-(r?1:0)}static compareRangesUsingEnds(t,r){return t.endLineNumber===r.endLineNumber?t.endColumn===r.endColumn?t.startLineNumber===r.startLineNumber?t.startColumn-r.startColumn:t.startLineNumber-r.startLineNumber:t.endColumn-r.endColumn:t.endLineNumber-r.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}}const Ss=3;function en(e,t,r,n){return new Ce(e,t,r).ComputeDiff(n)}class tn{constructor(t){const r=[],n=[];for(let i=0,s=t.length;i<s;i++)r[i]=Jt(t[i],1),n[i]=Qt(t[i],1);this.lines=t,this._startColumns=r,this._endColumns=n}getElements(){const t=[];for(let r=0,n=this.lines.length;r<n;r++)t[r]=this.lines[r].substring(this._startColumns[r]-1,this._endColumns[r]-1);return t}getStrictElement(t){return this.lines[t]}getStartLineNumber(t){return t+1}getEndLineNumber(t){return t+1}createCharSequence(t,r,n){const i=[],s=[],a=[];let o=0;for(let u=r;u<=n;u++){const l=this.lines[u],c=t?this._startColumns[u]:1,f=t?this._endColumns[u]:l.length+1;for(let h=c;h<f;h++)i[o]=l.charCodeAt(h-1),s[o]=u+1,a[o]=h,o++}return new _s(i,s,a)}}class _s{constructor(t,r,n){this._charCodes=t,this._lineNumbers=r,this._columns=n}getElements(){return this._charCodes}getStartLineNumber(t){return this._lineNumbers[t]}getStartColumn(t){return this._columns[t]}getEndLineNumber(t){return this._lineNumbers[t]}getEndColumn(t){return this._columns[t]+1}}class nt{constructor(t,r,n,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=r,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,r,n){let i,s,a,o,u,l,c,f;return t.originalLength===0?(i=0,s=0,a=0,o=0):(i=r.getStartLineNumber(t.originalStart),s=r.getStartColumn(t.originalStart),a=r.getEndLineNumber(t.originalStart+t.originalLength-1),o=r.getEndColumn(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(u=0,l=0,c=0,f=0):(u=n.getStartLineNumber(t.modifiedStart),l=n.getStartColumn(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=n.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new nt(i,s,a,o,u,l,c,f)}}function As(e){if(e.length<=1)return e;const t=[e[0]];let r=t[0];for(let n=1,i=e.length;n<i;n++){const s=e[n],a=s.originalStart-(r.originalStart+r.originalLength),o=s.modifiedStart-(r.modifiedStart+r.modifiedLength);Math.min(a,o)<Ss?(r.originalLength=s.originalStart+s.originalLength-r.originalStart,r.modifiedLength=s.modifiedStart+s.modifiedLength-r.modifiedStart):(t.push(s),r=s)}return t}class it{constructor(t,r,n,i,s){this.originalStartLineNumber=t,this.originalEndLineNumber=r,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=s}static createFromDiffResult(t,r,n,i,s,a,o){let u,l,c,f,h;if(r.originalLength===0?(u=n.getStartLineNumber(r.originalStart)-1,l=0):(u=n.getStartLineNumber(r.originalStart),l=n.getEndLineNumber(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(c=i.getStartLineNumber(r.modifiedStart)-1,f=0):(c=i.getStartLineNumber(r.modifiedStart),f=i.getEndLineNumber(r.modifiedStart+r.modifiedLength-1)),a&&r.originalLength>0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&s()){const d=n.createCharSequence(t,r.originalStart,r.originalStart+r.originalLength-1),m=i.createCharSequence(t,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let v=en(d,m,s,!0).changes;o&&(v=As(v)),h=[];for(let b=0,N=v.length;b<N;b++)h.push(nt.createFromDiffChange(v[b],d,m))}return new it(u,l,c,f,h)}}class ws{constructor(t,r,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=r,this.original=new tn(t),this.modified=new tn(r),this.continueLineDiff=rn(n.maxComputationTime),this.continueCharDiff=rn(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const t=en(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),r=t.changes,n=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let u=0,l=r.length;u<l;u++)o.push(it.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r[u],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:o}}const i=[];let s=0,a=0;for(let o=-1,u=r.length;o<u;o++){const l=o+1<u?r[o+1]:null,c=l?l.originalStart:this.originalLines.length,f=l?l.modifiedStart:this.modifiedLines.length;for(;s<c&&a<f;){const h=this.originalLines[s],d=this.modifiedLines[a];if(h!==d){{let m=Jt(h,1),v=Jt(d,1);for(;m>1&&v>1;){const b=h.charCodeAt(m-2),N=d.charCodeAt(v-2);if(b!==N)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,v)}{let m=Qt(h,1),v=Qt(d,1);const b=h.length+1,N=d.length+1;for(;m<b&&v<N;){const p=h.charCodeAt(m-1),g=h.charCodeAt(v-1);if(p!==g)break;m++,v++}(m<b||v<N)&&this._pushTrimWhitespaceCharChange(i,s+1,m,b,a+1,v,N)}}s++,a++}l&&(i.push(it.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=l.originalLength,a+=l.modifiedLength)}return{quitEarly:n,changes:i}}_pushTrimWhitespaceCharChange(t,r,n,i,s,a,o){if(this._mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o))return;let u;this.shouldComputeCharChanges&&(u=[new nt(r,n,r,i,s,a,s,o)]),t.push(new it(r,r,s,s,u))}_mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o){const u=t.length;if(u===0)return!1;const l=t[u-1];return l.originalEndLineNumber===0||l.modifiedEndLineNumber===0?!1:l.originalEndLineNumber+1===r&&l.modifiedEndLineNumber+1===s?(l.originalEndLineNumber=r,l.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new nt(r,n,r,i,s,a,s,o)),!0):!1}}function Jt(e,t){const r=ns(e);return r===-1?t:r+1}function Qt(e,t){const r=is(e);return r===-1?t:r+2}function rn(e){if(e===0)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function nn(e){return e<0?0:e>255?255:e|0}function Ge(e){return e<0?0:e>4294967295?4294967295:e|0}class Ns{constructor(t,r){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=r}}class Ls{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,r){t=Ge(t);const n=this.values,i=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+s),this.values.set(r,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,r){return t=Ge(t),r=Ge(r),this.values[t]===r?!1:(this.values[t]=r,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,r){t=Ge(t),r=Ge(r);const n=this.values,i=this.prefixSum;if(t>=n.length)return!1;let s=n.length-t;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Ge(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,s=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,s=this.prefixSum[i],a=s-this.values[i],t<a)n=i-1;else if(t>=s)r=i+1;else break;return new Ns(i,t-a)}}class Cs{constructor(t,r,n,i){this._uri=t,this._lines=r,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const r=t.changes;for(const n of r)this._acceptDeleteRange(n.range),this._acceptInsertText(new le(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,r=this._lines.length,n=new Uint32Array(r);for(let i=0;i<r;i++)n[i]=this._lines[i].length+t;this._lineStarts=new Ls(n)}}_setLineText(t,r){this._lines[t]=r,this._lineStarts&&this._lineStarts.changeValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,r){if(r.length===0)return;let n=rs(r);if(n.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}n[n.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]);let i=new Uint32Array(n.length-1);for(let s=1;s<n.length;s++)this._lines.splice(t.lineNumber+s-1,0,n[s]),i[s-1]=n[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,i)}}const xs="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function ks(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const r of xs)e.indexOf(r)>=0||(t+="\\"+r);return t+="\\s]+)",new RegExp(t,"g")}const Ts=ks();function Ps(e){let t=Ts;if(e&&e instanceof RegExp)if(e.global)t=e;else{let r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),t=new RegExp(e.source,r)}return t.lastIndex=0,t}const Ms={maxLen:1e3,windowSize:15,timeBudget:150};function sn(e,t,r,n,i=Ms){if(r.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:n+=l,r=r.substring(l,e+i.maxLen/2),sn(e,t,r,n,i)}const s=Date.now(),a=e-1-n;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const f=Es(t,r,a,o);if(!f&&u||(u=f,c<=0))break;o=c}if(u){let l={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Es(e,t,r,n){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=r&&e.lastIndex>=r)return i;if(n>0&&s>n)return null}return null}class Xt{constructor(t){let r=nn(t);this._defaultValue=r,this._asciiMap=Xt._createAsciiMap(r),this._map=new Map}static _createAsciiMap(t){let r=new Uint8Array(256);for(let n=0;n<256;n++)r[n]=t;return r}set(t,r){let n=nn(r);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Is{constructor(t,r,n){const i=new Uint8Array(t*r);for(let s=0,a=t*r;s<a;s++)i[s]=n;this._data=i,this.rows=t,this.cols=r}get(t,r){return this._data[t*this.cols+r]}set(t,r,n){this._data[t*this.cols+r]=n}}class Fs{constructor(t){let r=0,n=0;for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];u>r&&(r=u),o>n&&(n=o),l>n&&(n=l)}r++,n++;let i=new Is(n,r,0);for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];i.set(o,u,l)}this._states=i,this._maxCharCode=r}nextState(t,r){return r<0||r>=this._maxCharCode?0:this._states.get(t,r)}}let Zt=null;function Ds(){return Zt===null&&(Zt=new Fs([[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]])),Zt}let st=null;function js(){if(st===null){st=new Xt(0);const e=` <>'"\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 r=0;r<e.length;r++)st.set(e.charCodeAt(r),1);const t=".,;";for(let r=0;r<t.length;r++)st.set(t.charCodeAt(r),2)}return st}class At{static _createLink(t,r,n,i,s){let a=s-1;do{const o=r.charCodeAt(a);if(t.get(o)!==2)break;a--}while(a>i);if(i>0){const o=r.charCodeAt(i-1),u=r.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:r.substring(i,a+1)}}static computeLinks(t,r=Ds()){const n=js();let i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,f=0,h=1,d=!1,m=!1,v=!1,b=!1;for(;l<u;){let N=!1;const p=o.charCodeAt(l);if(h===13){let g;switch(p){case 40:d=!0,g=0;break;case 41:g=d?0:1;break;case 91:v=!0,m=!0,g=0;break;case 93:v=!1,g=m?0:1;break;case 123:b=!0,g=0;break;case 125:g=b?0:1;break;case 39:g=f===34||f===96?0:1;break;case 34:g=f===39||f===96?0:1;break;case 96:g=f===39||f===34?0:1;break;case 42:g=f===42?1:0;break;case 124:g=f===124?1:0;break;case 32:g=v?0:1;break;default:g=n.get(p)}g===1&&(i.push(At._createLink(n,o,s,c,l)),N=!0)}else if(h===12){let g;p===91?(m=!0,g=0):g=n.get(p),g===1?N=!0:h=13}else h=r.nextState(h,p),h===0&&(N=!0);N&&(h=1,d=!1,m=!1,b=!1,c=l+1,f=p),l++}h===13&&i.push(At._createLink(n,o,s,c,u))}return i}}function Us(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:At.computeLinks(e)}class Kt{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(t,r,n,i,s){if(t&&r){let a=this.doNavigateValueSet(r,s);if(a)return{range:t,value:a}}if(n&&i){let a=this.doNavigateValueSet(i,s);if(a)return{range:n,value:a}}return null}doNavigateValueSet(t,r){let n=this.numberReplace(t,r);return n!==null?n:this.textReplace(t,r)}numberReplace(t,r){let n=Math.pow(10,t.length-(t.lastIndexOf(".")+1)),i=Number(t),s=parseFloat(t);return!isNaN(i)&&!isNaN(s)&&i===s?i===0&&!r?null:(i=Math.floor(i*n),i+=r?n:-n,String(i/n)):null}textReplace(t,r){return this.valueSetsReplace(this._defaultValueSet,t,r)}valueSetsReplace(t,r,n){let i=null;for(let s=0,a=t.length;i===null&&s<a;s++)i=this.valueSetReplace(t[s],r,n);return i}valueSetReplace(t,r,n){let i=t.indexOf(r);return i>=0?(i+=n?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Kt.INSTANCE=new Kt;class H{constructor(t){this.element=t,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class an{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!==H.Undefined;){const r=t.next;t.prev=H.Undefined,t.next=H.Undefined,t=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){const n=new H(t);if(this._first===H.Undefined)this._first=n,this._last=n;else if(r){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==H.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==H.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==H.Undefined&&t.next!==H.Undefined){const r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===H.Undefined&&t.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):t.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):t.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==H.Undefined;)yield t.element,t=t.next}}const Rs=ee.performance&&typeof ee.performance.now=="function";class wt{constructor(t){this._highResolution=Rs&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new wt(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.performance.now():Date.now()}}var er;(function(e){e.None=()=>Vr.None;function t(p){return(g,_=null,L)=>{let S=!1,A;return A=p(w=>{if(!S)return A?A.dispose():S=!0,g.call(_,w)},null,L),S&&A.dispose(),A}}e.once=t;function r(p,g){return u((_,L=null,S)=>p(A=>_.call(L,g(A)),null,S))}e.map=r;function n(p,g){return u((_,L=null,S)=>p(A=>{g(A),_.call(L,A)},null,S))}e.forEach=n;function i(p,g){return u((_,L=null,S)=>p(A=>g(A)&&_.call(L,A),null,S))}e.filter=i;function s(p){return p}e.signal=s;function a(...p){return(g,_=null,L)=>Gi(...p.map(S=>S(A=>g.call(_,A),null,L)))}e.any=a;function o(p,g,_){let L=_;return r(p,S=>(L=g(L,S),L))}e.reduce=o;function u(p){let g;const _=new Oe({onFirstListenerAdd(){g=p(_.fire,_)},onLastListenerRemove(){g.dispose()}});return _.event}function l(p,g,_=100,L=!1,S){let A,w,y,T=0;const M=new Oe({leakWarningThreshold:S,onFirstListenerAdd(){A=p(k=>{T++,w=g(w,k),L&&!y&&(M.fire(w),w=void 0),clearTimeout(y),y=setTimeout(()=>{const F=w;w=void 0,y=void 0,(!L||T>1)&&M.fire(F),T=0},_)})},onLastListenerRemove(){A.dispose()}});return M.event}e.debounce=l;function c(p,g=(_,L)=>_===L){let _=!0,L;return i(p,S=>{const A=_||!g(S,L);return _=!1,L=S,A})}e.latch=c;function f(p,g){return[e.filter(p,g),e.filter(p,_=>!g(_))]}e.split=f;function h(p,g=!1,_=[]){let L=_.slice(),S=p(y=>{L?L.push(y):w.fire(y)});const A=()=>{L&&L.forEach(y=>w.fire(y)),L=null},w=new Oe({onFirstListenerAdd(){S||(S=p(y=>w.fire(y)))},onFirstListenerDidAdd(){L&&(g?setTimeout(A):A())},onLastListenerRemove(){S&&S.dispose(),S=null}});return w.event}e.buffer=h;class d{constructor(g){this.event=g}map(g){return new d(r(this.event,g))}forEach(g){return new d(n(this.event,g))}filter(g){return new d(i(this.event,g))}reduce(g,_){return new d(o(this.event,g,_))}latch(){return new d(c(this.event))}debounce(g,_=100,L=!1,S){return new d(l(this.event,g,_,L,S))}on(g,_,L){return this.event(g,_,L)}once(g,_,L){return t(this.event)(g,_,L)}}function m(p){return new d(p)}e.chain=m;function v(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.on(g,L),A=()=>p.removeListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromNodeEventEmitter=v;function b(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.addEventListener(g,L),A=()=>p.removeEventListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromDOMEventEmitter=b;function N(p){return new Promise(g=>t(p)(g))}e.toPromise=N})(er||(er={}));class Nt{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Nt._idPool++}`}start(t){this._stopWatch=new wt(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Nt._idPool=0;class Oe{constructor(t){var r;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=!((r=this._options)===null||r===void 0)&&r._profName?new Nt(this._options._profName):void 0}get event(){return this._event||(this._event=(t,r,n)=>{var i;this._listeners||(this._listeners=new an);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(r?[t,r]:t);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,r);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),u=Or(()=>{o&&o(),this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return n instanceof tt?n.add(u):Array.isArray(n)&&n.push(u),u}),this._event}fire(t){var r,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new an);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){Hi(a)}}(n=this._perfMon)===null||n===void 0||n.stop()}}dispose(){var t,r,n,i,s;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(n=this._options)===null||n===void 0?void 0:n.onLastListenerRemove)===null||i===void 0||i.call(n),(s=this._leakageMon)===null||s===void 0||s.dispose())}}const on=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var Lt;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof Ct?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:er.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:on})})(Lt||(Lt={}));class Ct{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?on:(this._emitter||(this._emitter=new Oe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Os{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Ct),this._token}cancel(){this._token?this._token instanceof Ct&&this._token.cancel():this._token=Lt.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Ct&&this._token.dispose():this._token=Lt.None}}class tr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,r){this._keyCodeToStr[t]=r,this._strToKeyCode[r.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const rr=new tr,nr=new tr,ir=new tr;(function(){function e(t,r,n=r,i=n){rr.define(t,r),nr.define(t,n),ir.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var un;(function(e){function t(a){return rr.keyCodeToStr(a)}e.toString=t;function r(a){return rr.strToKeyCode(a)}e.fromString=r;function n(a){return nr.keyCodeToStr(a)}e.toUserSettingsUS=n;function i(a){return ir.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return nr.strToKeyCode(a)||ir.strToKeyCode(a)}e.fromUserSettings=s})(un||(un={}));function Vs(e,t){const r=(t&65535)<<16>>>0;return(e|r)>>>0}class me extends G{constructor(t,r,n,i){super(t,r,n,i);this.selectionStartLineNumber=t,this.selectionStartColumn=r,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return me.selectionsEqual(this,t)}static selectionsEqual(t,r){return t.selectionStartLineNumber===r.selectionStartLineNumber&&t.selectionStartColumn===r.selectionStartColumn&&t.positionLineNumber===r.positionLineNumber&&t.positionColumn===r.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,r){return this.getDirection()===0?new me(this.startLineNumber,this.startColumn,t,r):new me(t,r,this.startLineNumber,this.startColumn)}getPosition(){return new le(this.positionLineNumber,this.positionColumn)}setStartPosition(t,r){return this.getDirection()===0?new me(t,r,this.endLineNumber,this.endColumn):new me(this.endLineNumber,this.endColumn,t,r)}static fromPositions(t,r=t){return new me(t.lineNumber,t.column,r.lineNumber,r.column)}static liftSelection(t){return new me(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,r){if(t&&!r||!t&&r)return!1;if(!t&&!r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n<i;n++)if(!this.selectionsEqual(t[n],r[n]))return!1;return!0}static isISelection(t){return t&&typeof t.selectionStartLineNumber=="number"&&typeof t.selectionStartColumn=="number"&&typeof t.positionLineNumber=="number"&&typeof t.positionColumn=="number"}static createWithDirection(t,r,n,i,s){return s===0?new me(t,r,n,i):new me(n,i,t,r)}}class $s{constructor(t,r,n){this._tokenBrand=void 0,this.offset=t|0,this.type=r,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}var ln;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(ln||(ln={}));var fn;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(fn||(fn={}));var cn;(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"})(cn||(cn={}));var hn;(function(e){e[e.Deprecated=1]="Deprecated"})(hn||(hn={}));var dn;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(dn||(dn={}));var gn;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(gn||(gn={}));var mn;(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"})(mn||(mn={}));var pn;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(pn||(pn={}));var vn;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(vn||(vn={}));var bn;(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"})(bn||(bn={}));var yn;(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.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=42]="fontFamily",e[e.fontInfo=43]="fontInfo",e[e.fontLigatures=44]="fontLigatures",e[e.fontSize=45]="fontSize",e[e.fontWeight=46]="fontWeight",e[e.formatOnPaste=47]="formatOnPaste",e[e.formatOnType=48]="formatOnType",e[e.glyphMargin=49]="glyphMargin",e[e.gotoLocation=50]="gotoLocation",e[e.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",e[e.hover=52]="hover",e[e.inDiffEditor=53]="inDiffEditor",e[e.inlineSuggest=54]="inlineSuggest",e[e.letterSpacing=55]="letterSpacing",e[e.lightbulb=56]="lightbulb",e[e.lineDecorationsWidth=57]="lineDecorationsWidth",e[e.lineHeight=58]="lineHeight",e[e.lineNumbers=59]="lineNumbers",e[e.lineNumbersMinChars=60]="lineNumbersMinChars",e[e.linkedEditing=61]="linkedEditing",e[e.links=62]="links",e[e.matchBrackets=63]="matchBrackets",e[e.minimap=64]="minimap",e[e.mouseStyle=65]="mouseStyle",e[e.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=67]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",e[e.multiCursorModifier=69]="multiCursorModifier",e[e.multiCursorPaste=70]="multiCursorPaste",e[e.occurrencesHighlight=71]="occurrencesHighlight",e[e.overviewRulerBorder=72]="overviewRulerBorder",e[e.overviewRulerLanes=73]="overviewRulerLanes",e[e.padding=74]="padding",e[e.parameterHints=75]="parameterHints",e[e.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",e[e.quickSuggestions=78]="quickSuggestions",e[e.quickSuggestionsDelay=79]="quickSuggestionsDelay",e[e.readOnly=80]="readOnly",e[e.renameOnType=81]="renameOnType",e[e.renderControlCharacters=82]="renderControlCharacters",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"})(yn||(yn={}));var Sn;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Sn||(Sn={}));var _n;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(_n||(_n={}));var An;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(An||(An={}));var wn;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(wn||(wn={}));var Nn;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Nn||(Nn={}));var sr;(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.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",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.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"})(sr||(sr={}));var ar;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(ar||(ar={}));var or;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(or||(or={}));var Ln;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Ln||(Ln={}));var Cn;(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"})(Cn||(Cn={}));var xn;(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"})(xn||(xn={}));var kn;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(kn||(kn={}));var Tn;(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"})(Tn||(Tn={}));var Pn;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Pn||(Pn={}));var Mn;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Mn||(Mn={}));var En;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(En||(En={}));var ur;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(ur||(ur={}));var In;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(In||(In={}));var Fn;(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"})(Fn||(Fn={}));var Dn;(function(e){e[e.Deprecated=1]="Deprecated"})(Dn||(Dn={}));var jn;(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"})(jn||(jn={}));var Un;(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"})(Un||(Un={}));var Rn;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Rn||(Rn={}));var On;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(On||(On={}));class at{static chord(t,r){return Vs(t,r)}}at.CtrlCmd=2048,at.Shift=1024,at.Alt=512,at.WinCtrl=256;function Ws(){return{editor:void 0,languages:void 0,CancellationTokenSource:Os,Emitter:Oe,KeyCode:sr,KeyMod:at,Position:le,Range:G,Selection:me,SelectionDirection:ur,MarkerSeverity:ar,MarkerTag:or,Uri:Re,Token:$s}}var Je=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})};class qs extends Cs{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(t){return this._lines[t-1]}getWordAtPosition(t,r){let n=sn(t.column,Ps(r),this._lines[t.lineNumber-1],0);return n?new G(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn):null}words(t){const r=this._lines,n=this._wordenize.bind(this);let i=0,s="",a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){const u=s.substring(o[a].start,o[a].end);a+=1,yield u}else if(i<r.length)s=r[i],o=n(s,t),a=0,i+=1;else break}}}getLineWords(t,r){let n=this._lines[t-1],i=this._wordenize(n,r),s=[];for(const a of i)s.push({word:n.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return s}_wordenize(t,r){const n=[];let i;for(r.lastIndex=0;(i=r.exec(t))&&i[0].length!==0;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(t){if(t=this._validateRange(t),t.startLineNumber===t.endLineNumber)return this._lines[t.startLineNumber-1].substring(t.startColumn-1,t.endColumn-1);let r=this._eol,n=t.startLineNumber-1,i=t.endLineNumber-1,s=[];s.push(this._lines[n].substring(t.startColumn-1));for(let a=n+1;a<i;a++)s.push(this._lines[a]);return s.push(this._lines[i].substring(0,t.endColumn-1)),s.join(r)}offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.lineNumber-2)+(t.column-1)}positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();let r=this._lineStarts.getIndexOf(t),n=this._lines[r.index].length;return{lineNumber:1+r.index,column:1+Math.min(r.remainder,n)}}_validateRange(t){const r=this._validatePosition({lineNumber:t.startLineNumber,column:t.startColumn}),n=this._validatePosition({lineNumber:t.endLineNumber,column:t.endColumn});return r.lineNumber!==t.startLineNumber||r.column!==t.startColumn||n.lineNumber!==t.endLineNumber||n.column!==t.endColumn?{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:n.lineNumber,endColumn:n.column}:t}_validatePosition(t){if(!le.isIPosition(t))throw new Error("bad position");let{lineNumber:r,column:n}=t,i=!1;if(r<1)r=1,n=1,i=!0;else if(r>this._lines.length)r=this._lines.length,n=this._lines[r-1].length+1,i=!0;else{let s=this._lines[r-1].length+1;n<1?(n=1,i=!0):n>s&&(n=s,i=!0)}return i?{lineNumber:r,column:n}:t}}class Qe{constructor(t,r){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(r=>t.push(this._models[r])),t}acceptNewModel(t){this._models[t.url]=new qs(Re.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,r){if(!this._models[t])return;this._models[t].onEvents(r)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=this._getModel(t),a=this._getModel(r);if(!s||!a)return null;const o=s.getLinesContent(),u=a.getLinesContent(),c=new ws(o,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),f=c.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:c.quitEarly,identical:f,changes:c.changes}})}_modelsAreIdentical(t,r){const n=t.getLineCount(),i=r.getLineCount();if(n!==i)return!1;for(let s=1;s<=n;s++){const a=t.getLineContent(s),o=r.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(t,r){return Je(this,void 0,void 0,function*(){const n=this._getModel(t);if(!n)return r;const i=[];let s;r=r.slice(0).sort((a,o)=>{if(a.range&&o.range)return G.compareRangesUsingStarts(a.range,o.range);let u=a.range?0:1,l=o.range?0:1;return u-l});for(let{range:a,text:o,eol:u}of r){if(typeof u=="number"&&(s=u),G.isEmpty(a)&&!o)continue;const l=n.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,n.eol),l===o)continue;if(Math.max(o.length,l.length)>Qe._diffLimit){i.push({range:a,text:o});continue}const c=as(l,o,!1),f=n.offsetAt(G.lift(a).getStartPosition());for(const h of c){const d=n.positionAt(f+h.originalStart),m=n.positionAt(f+h.originalStart+h.originalLength),v={text:o.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(v.range)!==v.text&&i.push(v)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Je(this,void 0,void 0,function*(){let r=this._getModel(t);return r?Us(r):null})}textualSuggest(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=new wt(!0),a=new RegExp(n,i),o=new Set;e:for(let u of t){const l=this._getModel(u);if(!!l){for(let c of l.words(a))if(!(c===r||!isNaN(Number(c)))&&(o.add(c),o.size>Qe._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(t,r,n,i){return Je(this,void 0,void 0,function*(){let s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let u=r.startLineNumber;u<r.endLineNumber;u++){let l=s.getLineWords(u,a);for(const c of l){if(!isNaN(Number(c.word)))continue;let f=o[c.word];f||(f=[],o[c.word]=f),f.push({startLineNumber:u,startColumn:c.startColumn,endLineNumber:u,endColumn:c.endColumn})}}return o})}navigateValueSet(t,r,n,i,s){return Je(this,void 0,void 0,function*(){let a=this._getModel(t);if(!a)return null;let o=new RegExp(i,s);r.startColumn===r.endColumn&&(r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.endColumn+1});let u=a.getValueInRange(r),l=a.getWordAtPosition({lineNumber:r.startLineNumber,column:r.startColumn},o);if(!l)return null;let c=a.getValueInRange(l);return Kt.INSTANCE.navigateValueSet(r,u,l,c,n)})}loadForeignModule(t,r,n){let a={host:Wr(n,(o,u)=>this._host.fhr(o,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,r),Promise.resolve(Ht(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,r){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,r))}catch(n){return Promise.reject(n)}}}Qe._diffLimit=1e5,Qe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ee.monaco=Ws());let lr=!1;function Vn(e){if(lr)return;lr=!0;const t=new ts(r=>{self.postMessage(r)},r=>new Qe(r,e));self.onmessage=r=>{t.onmessage(r.data)}}self.onmessage=e=>{lr||Vn(null)};function fr(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",s=0,a=16,o=0,u=0,l=0,c=0,f=0;function h(g,_){for(var L=0,S=0;L<g||!_;){var A=e.charCodeAt(n);if(A>=48&&A<=57)S=S*16+A-48;else if(A>=65&&A<=70)S=S*16+A-65+10;else if(A>=97&&A<=102)S=S*16+A-97+10;else break;n++,L++}return L<g&&(S=-1),S}function d(g){n=g,i="",s=0,a=16,f=0}function m(){var g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Xe(e.charCodeAt(n)))for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;else return f=3,e.substring(g,n);var _=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Xe(e.charCodeAt(n))){for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;_=n}else f=3;return e.substring(g,_)}function v(){for(var g="",_=n;;){if(n>=r){g+=e.substring(_,n),f=2;break}var L=e.charCodeAt(n);if(L===34){g+=e.substring(_,n),n++;break}if(L===92){if(g+=e.substring(_,n),n++,n>=r){f=2;break}var S=e.charCodeAt(n++);switch(S){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=` +`;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:var A=h(4,!0);A>=0?g+=String.fromCharCode(A):f=4;break;default:f=5}_=n;continue}if(L>=0&&L<=31)if(ot(L)){g+=e.substring(_,n),f=2;break}else f=6;n++}return g}function b(){if(i="",f=0,s=n,u=o,c=l,n>=r)return s=r,a=17;var g=e.charCodeAt(n);if(cr(g)){do n++,i+=String.fromCharCode(g),g=e.charCodeAt(n);while(cr(g));return a=15}if(ot(g))return n++,i+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,i+=` +`),o++,l=n,a=14;switch(g){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=v(),a=10;case 47:var _=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!ot(e.charCodeAt(n));)n++;return i=e.substring(_,n),a=12}if(e.charCodeAt(n+1)===42){n+=2;for(var L=r-1,S=!1;n<L;){var A=e.charCodeAt(n);if(A===42&&e.charCodeAt(n+1)===47){n+=2,S=!0;break}n++,ot(A)&&(A===13&&e.charCodeAt(n)===10&&n++,o++,l=n)}return S||(n++,f=1),i=e.substring(_,n),a=13}return i+=String.fromCharCode(g),n++,a=16;case 45:if(i+=String.fromCharCode(g),n++,n===r||!Xe(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),a=11;default:for(;n<r&&N(g);)n++,g=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(g),n++,a=16}}function N(g){if(cr(g)||ot(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function p(){var g;do g=b();while(g>=12&&g<=15);return g}return{setPosition:d,getPosition:function(){return n},scan:t?p:b,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return s},getTokenLength:function(){return n-s},getTokenStartLine:function(){return u},getTokenStartCharacter:function(){return s-c},getTokenError:function(){return f}}}function cr(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function ot(e){return e===10||e===13||e===8232||e===8233}function Xe(e){return e>=48&&e<=57}function Hs(e,t,r){var n,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!$n(e,s-1);)s--;for(var u=o;u<e.length&&!$n(e,u);)u++;i=e.substring(s,u),n=Bs(i,r)}else i=e,n=0,s=0,a=0,o=e.length;var l=Ys(r,e),c=!1,f=0,h;r.insertSpaces?h=hr(" ",r.tabSize||4):h=" ";var d=fr(i,!1),m=!1;function v(){return l+hr(h,n+f)}function b(){var k=d.scan();for(c=!1;k===15||k===14;)c=c||k===14,k=d.scan();return m=k===16||d.getTokenError()!==0,k}var N=[];function p(k,F,V){!m&&(!t||F<o&&V>a)&&e.substring(F,V)!==k&&N.push({offset:F,length:V-F,content:k})}var g=b();if(g!==17){var _=d.getTokenOffset()+s,L=hr(h,n);p(L,s,_)}for(;g!==17;){for(var S=d.getTokenOffset()+d.getTokenLength()+s,A=b(),w="",y=!1;!c&&(A===12||A===13);){var T=d.getTokenOffset()+s;p(" ",S,T),S=d.getTokenOffset()+d.getTokenLength()+s,y=A===12,w=y?v():"",A=b()}if(A===2)g!==1&&(f--,w=v());else if(A===4)g!==3&&(f--,w=v());else{switch(g){case 3:case 1:f++,w=v();break;case 5:case 12:w=v();break;case 13:c?w=v():y||(w=" ");break;case 6:y||(w=" ");break;case 10:if(A===6){y||(w="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?y||(w=" "):A!==5&&A!==17&&(m=!0);break;case 16:m=!0;break}c&&(A===12||A===13)&&(w=v())}A===17&&(w=r.insertFinalNewline?l:"");var M=d.getTokenOffset()+s;p(w,S,M),g=A}return N}function hr(e,t){for(var r="",n=0;n<t;n++)r+=e;return r}function Bs(e,t){for(var r=0,n=0,i=t.tabSize||4;r<e.length;){var s=e.charAt(r);if(s===" ")n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function Ys(e,t){for(var r=0;r<t.length;r++){var n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===` +`?`\r +`:"\r";if(n===` +`)return` +`}return e&&e.eol||` +`}function $n(e,t){return`\r +`.indexOf(e.charAt(t))!==-1}var xt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(xt||(xt={}));function zs(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=xt.DEFAULT);var n=null,i=[],s=[];function a(u){Array.isArray(i)?i.push(u):n!==null&&(i[n]=u)}var o={onObjectBegin:function(){var u={};a(u),s.push(i),i=u,n=null},onObjectProperty:function(u){n=u},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var u=[];a(u),s.push(i),i=u,n=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(u,l,c){t.push({error:u,offset:l,length:c})}};return Js(e,o,r),i[0]}function Wn(e){if(!e.parent||!e.parent.children)return[];var t=Wn(e.parent);if(e.parent.type==="property"){var r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){var n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function dr(e){switch(e.type){case"array":return e.children.map(dr);case"object":for(var t=Object.create(null),r=0,n=e.children;r<n.length;r++){var i=n[r],s=i.children[1];s&&(t[i.children[0].value]=dr(s))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Gs(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function qn(e,t,r){if(r===void 0&&(r=!1),Gs(e,t,r)){var n=e.children;if(Array.isArray(n))for(var i=0;i<n.length&&n[i].offset<=t;i++){var s=qn(n[i],t,r);if(s)return s}return e}}function Js(e,t,r){r===void 0&&(r=xt.DEFAULT);var n=fr(e,!1);function i(y){return y?function(){return y(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}function s(y){return y?function(T){return y(T,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}var a=i(t.onObjectBegin),o=s(t.onObjectProperty),u=i(t.onObjectEnd),l=i(t.onArrayBegin),c=i(t.onArrayEnd),f=s(t.onLiteralValue),h=s(t.onSeparator),d=i(t.onComment),m=s(t.onError),v=r&&r.disallowComments,b=r&&r.allowTrailingComma;function N(){for(;;){var y=n.scan();switch(n.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:v||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(y){case 12:case 13:v?p(10):d();break;case 16:p(1);break;case 15:case 14:break;default:return y}}}function p(y,T,M){if(T===void 0&&(T=[]),M===void 0&&(M=[]),m(y),T.length+M.length>0)for(var k=n.getToken();k!==17;){if(T.indexOf(k)!==-1){N();break}else if(M.indexOf(k)!==-1)break;k=N()}}function g(y){var T=n.getTokenValue();return y?f(T):o(T),N(),!0}function _(){switch(n.getToken()){case 11:var y=n.getTokenValue(),T=Number(y);isNaN(T)&&(p(2),T=0),f(T);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return N(),!0}function L(){return n.getToken()!==10?(p(3,[],[2,5]),!1):(g(!1),n.getToken()===6?(h(":"),N(),w()||p(4,[],[2,5])):p(5,[],[2,5]),!0)}function S(){a(),N();for(var y=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===2&&b)break}else y&&p(6,[],[]);L()||p(4,[],[2,5]),y=!0}return u(),n.getToken()!==2?p(7,[2],[]):N(),!0}function A(){l(),N();for(var y=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===4&&b)break}else y&&p(6,[],[]);w()||p(4,[],[4,5]),y=!0}return c(),n.getToken()!==4?p(8,[4],[]):N(),!0}function w(){switch(n.getToken()){case 3:return A();case 1:return S();case 10:return g(!0);default:return _()}}return N(),n.getToken()===17?r.allowEmptyContent?!0:(p(4,[],[]),!1):w()?(n.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Ze=fr,Qs=zs,Xs=qn,Zs=Wn,Ks=dr;function ea(e,t,r){return Hs(e,t,r)}function ut(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!ut(e[r],t[r]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var s=[];for(n in t)s.push(n);if(s.sort(),!ut(i,s))return!1;for(r=0;r<i.length;r++)if(!ut(e[i[r]],t[i[r]]))return!1}return!0}function fe(e){return typeof e=="number"}function Ae(e){return typeof e!="undefined"}function Se(e){return typeof e=="boolean"}function ta(e){return typeof e=="string"}function Hn(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function lt(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function kt(e){return Hn(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}var Bn;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Bn||(Bn={}));var Tt;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(Tt||(Tt={}));var pe;(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=Tt.MAX_VALUE),i===Number.MAX_VALUE&&(i=Tt.MAX_VALUE),{line:n,character:i}}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}e.is=r})(pe||(pe={}));var q;(function(e){function t(n,i,s,a){if(C.uinteger(n)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:pe.create(n,i),end:pe.create(s,a)};if(pe.is(n)&&pe.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments["+n+", "+i+", "+s+", "+a+"]")}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&pe.is(i.start)&&pe.is(i.end)}e.is=r})(q||(q={}));var ft;(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}e.is=r})(ft||(ft={}));var Yn;(function(e){function t(n,i,s,a){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.targetRange)&&C.string(i.targetUri)&&(q.is(i.targetSelectionRange)||C.undefined(i.targetSelectionRange))&&(q.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}e.is=r})(Yn||(Yn={}));var gr;(function(e){function t(n,i,s,a){return{red:n,green:i,blue:s,alpha:a}}e.create=t;function r(n){var i=n;return C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}e.is=r})(gr||(gr={}));var zn;(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){var i=n;return q.is(i.range)&&gr.is(i.color)}e.is=r})(zn||(zn={}));var Gn;(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}e.create=t;function r(n){var i=n;return C.string(i.label)&&(C.undefined(i.textEdit)||ve.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,ve.is))}e.is=r})(Gn||(Gn={}));var ct;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ct||(ct={}));var Jn;(function(e){function t(n,i,s,a,o){var u={startLine:n,endLine:i};return C.defined(s)&&(u.startCharacter=s),C.defined(a)&&(u.endCharacter=a),C.defined(o)&&(u.kind=o),u}e.create=t;function r(n){var i=n;return C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}e.is=r})(Jn||(Jn={}));var mr;(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&ft.is(i.location)&&C.string(i.message)}e.is=r})(mr||(mr={}));var ce;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ce||(ce={}));var Qn;(function(e){e.Unnecessary=1,e.Deprecated=2})(Qn||(Qn={}));var Xn;(function(e){function t(r){var n=r;return n!=null&&C.string(n.href)}e.is=t})(Xn||(Xn={}));var we;(function(e){function t(n,i,s,a,o,u){var l={range:n,message:i};return C.defined(s)&&(l.severity=s),C.defined(a)&&(l.code=a),C.defined(o)&&(l.source=o),C.defined(u)&&(l.relatedInformation=u),l}e.create=t;function r(n){var i,s=n;return C.defined(s)&&q.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,mr.is))}e.is=r})(we||(we={}));var ht;(function(e){function t(n,i){for(var s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];var o={title:n,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}e.is=r})(ht||(ht={}));var ve;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function r(s,a){return{range:{start:s,end:s},newText:a}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){var a=s;return C.objectLiteral(a)&&C.string(a.newText)&&q.is(a.range)}e.is=i})(ve||(ve={}));var Ke;(function(e){function t(n,i,s){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function r(n){var i=n;return i!==void 0&&C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}e.is=r})(Ke||(Ke={}));var ne;(function(e){function t(r){var n=r;return typeof n=="string"}e.is=t})(ne||(ne={}));var Pe;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}e.del=n;function i(s){var a=s;return ve.is(a)&&(Ke.is(a.annotationId)||ne.is(a.annotationId))}e.is=i})(Pe||(Pe={}));var Pt;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&Et.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Pt||(Pt={}));var dt;(function(e){function t(n,i,s){var a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(dt||(dt={}));var gt;(function(e){function t(n,i,s,a){var o={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function r(n){var i=n;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(gt||(gt={}));var mt;(function(e){function t(n,i,s){var a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(mt||(mt={}));var pr;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return C.string(i.kind)?dt.is(i)||gt.is(i)||mt.is(i):Pt.is(i)}))}e.is=t})(pr||(pr={}));var Mt=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var i,s;if(n===void 0?i=ve.insert(t,r):ne.is(n)?(s=n,i=Pe.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.insert(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,r,n){var i,s;if(n===void 0?i=ve.replace(t,r):ne.is(n)?(s=n,i=Pe.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.replace(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,r){var n,i;if(r===void 0?n=ve.del(t):ne.is(r)?(i=r,n=Pe.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Pe.del(t,i)),this.edits.push(n),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Zn=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,r){var n;if(ne.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id "+n+" is already in use.");if(r===void 0)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Zn(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Pt.is(n)){var i=new Mt(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(n){var i=new Mt(t.changes[n]);r._textEditChanges[n]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Et.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),n=new Mt(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var i=[];this._workspaceEdit.changes[t]=i,n=new Mt(i),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Zn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ke.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=dt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=dt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.renameFile=function(t,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Ke.is(n)||ne.is(n)?s=n:i=n;var a,o;if(s===void 0?a=gt.create(t,r,i):(o=ne.is(s)?s:this._changeAnnotations.manage(s),a=gt.create(t,r,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ke.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=mt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=mt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e})();var Kn;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)}e.is=r})(Kn||(Kn={}));var ei;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}e.is=r})(ei||(ei={}));var Et;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}e.is=r})(Et||(Et={}));var ti;(function(e){function t(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}e.is=r})(ti||(ti={}));var Ne;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(Ne||(Ne={})),function(e){function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t}(Ne||(Ne={}));var vr;(function(e){function t(r){var n=r;return C.objectLiteral(r)&&Ne.is(n.kind)&&C.string(n.value)}e.is=t})(vr||(vr={}));var he;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(he||(he={}));var X;(function(e){e.PlainText=1,e.Snippet=2})(X||(X={}));var ri;(function(e){e.Deprecated=1})(ri||(ri={}));var ni;(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){var i=n;return i&&C.string(i.newText)&&q.is(i.insert)&&q.is(i.replace)}e.is=r})(ni||(ni={}));var ii;(function(e){e.asIs=1,e.adjustIndentation=2})(ii||(ii={}));var br;(function(e){function t(r){return{label:r}}e.create=t})(br||(br={}));var si;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(si||(si={}));var It;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var i=n;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}e.is=r})(It||(It={}));var ai;(function(e){function t(r){var n=r;return!!n&&C.objectLiteral(n)&&(vr.is(n.contents)||It.is(n.contents)||C.typedArray(n.contents,It.is))&&(r.range===void 0||q.is(r.range))}e.is=t})(ai||(ai={}));var oi;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(oi||(oi={}));var ui;(function(e){function t(r,n){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var a={label:r};return C.defined(n)&&(a.documentation=n),C.defined(i)?a.parameters=i:a.parameters=[],a}e.create=t})(ui||(ui={}));var li;(function(e){e.Text=1,e.Read=2,e.Write=3})(li||(li={}));var fi;(function(e){function t(r,n){var i={range:r};return C.number(n)&&(i.kind=n),i}e.create=t})(fi||(fi={}));var _e;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_e||(_e={}));var ci;(function(e){e.Deprecated=1})(ci||(ci={}));var hi;(function(e){function t(r,n,i,s,a){var o={name:r,kind:n,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(hi||(hi={}));var di;(function(e){function t(n,i,s,a,o,u){var l={name:n,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function r(n){var i=n;return i&&C.string(i.name)&&C.number(i.kind)&&q.is(i.range)&&q.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})(di||(di={}));var gi;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(gi||(gi={}));var mi;(function(e){function t(n,i){var s={diagnostics:n};return i!=null&&(s.only=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&C.typedArray(i.diagnostics,we.is)&&(i.only===void 0||C.typedArray(i.only,C.string))}e.is=r})(mi||(mi={}));var pi;(function(e){function t(n,i,s){var a={title:n},o=!0;return typeof i=="string"?(o=!1,a.kind=i):ht.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function r(n){var i=n;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,we.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ht.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||pr.is(i.edit))}e.is=r})(pi||(pi={}));var vi;(function(e){function t(n,i){var s={range:n};return C.defined(i)&&(s.data=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.command)||ht.is(i.command))}e.is=r})(vi||(vi={}));var bi;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}e.is=r})(bi||(bi={}));var yi;(function(e){function t(n,i,s){return{range:n,target:i,data:s}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}e.is=r})(yi||(yi={}));var Ft;(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){var i=n;return i!==void 0&&q.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(Ft||(Ft={}));var Si;(function(e){function t(s,a,o,u){return new ra(s,a,o,u)}e.create=t;function r(s){var a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}e.is=r;function n(s,a){for(var o=s.getText(),u=i(a,function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),l=o.length,c=u.length-1;c>=0;c--){var f=u[c],h=s.offsetAt(f.range.start),d=s.offsetAt(f.range.end);if(d<=l)o=o.substring(0,h)+f.newText+o.substring(d,o.length);else throw new Error("Overlapping edit");l=h}return o}e.applyEdits=n;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);for(var c=0,f=0,h=0;c<u.length&&f<l.length;){var d=a(u[c],l[f]);d<=0?s[h++]=u[c++]:s[h++]=l[f++]}for(;c<u.length;)s[h++]=u[c++];for(;f<l.length;)s[h++]=l[f++];return s}})(Si||(Si={}));var ra=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,i=0;i<r.length;i++){n&&(t.push(i),n=!1);var s=r.charAt(i);n=s==="\r"||s===` +`,s==="\r"&&i+1<r.length&&r.charAt(i+1)===` +`&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return pe.create(0,t);for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return pe.create(a,t-r[a])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),C;(function(e){var t=Object.prototype.toString;function r(d){return typeof d!="undefined"}e.defined=r;function n(d){return typeof d=="undefined"}e.undefined=n;function i(d){return d===!0||d===!1}e.boolean=i;function s(d){return t.call(d)==="[object String]"}e.string=s;function a(d){return t.call(d)==="[object Number]"}e.number=a;function o(d,m,v){return t.call(d)==="[object Number]"&&m<=d&&d<=v}e.numberRange=o;function u(d){return t.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}e.integer=u;function l(d){return t.call(d)==="[object Number]"&&0<=d&&d<=2147483647}e.uinteger=l;function c(d){return t.call(d)==="[object Function]"}e.func=c;function f(d){return d!==null&&typeof d=="object"}e.objectLiteral=f;function h(d,m){return Array.isArray(d)&&d.every(m)}e.typedArray=h})(C||(C={}));var _i=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,i=t;n<i.length;n++){var s=i[n];if(e.isIncremental(s)){var a=wi(s.range),o=this.offsetAt(a.start),u=this.offsetAt(a.end);this._content=this._content.substring(0,o)+s.text+this._content.substring(u,this._content.length);var l=Math.max(a.start.line,0),c=Math.max(a.end.line,0),f=this._lineOffsets,h=Ai(s.text,!1,o);if(c-l===h.length)for(var d=0,m=h.length;d<m;d++)f[d+l+1]=h[d];else h.length<1e4?f.splice.apply(f,[l+1,c-l].concat(h)):this._lineOffsets=f=f.slice(0,l+1).concat(h,f.slice(c+1));var v=s.text.length-(u-o);if(v!==0)for(var d=l+1+h.length,m=f.length;d<m;d++)f[d]=f[d]+v}else if(e.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Ai(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return{line:a,character:t-r[a]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),yr;(function(e){function t(i,s,a,o){return new _i(i,s,a,o)}e.create=t;function r(i,s,a){if(i instanceof _i)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,s){for(var a=i.getText(),o=Sr(s.map(na),function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),u=0,l=[],c=0,f=o;c<f.length;c++){var h=f[c],d=i.offsetAt(h.range.start);if(d<u)throw new Error("Overlapping edit");d>u&&l.push(a.substring(u,d)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=n})(yr||(yr={}));function Sr(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Sr(n,t),Sr(i,t);for(var s=0,a=0,o=0;s<n.length&&a<i.length;){var u=t(n[s],i[a]);u<=0?e[o++]=n[s++]:e[o++]=i[a++]}for(;s<n.length;)e[o++]=n[s++];for(;a<i.length;)e[o++]=i[a++];return e}function Ai(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],i=0;i<e.length;i++){var s=e.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function wi(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function na(e){var t=wi(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var W;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(W||(W={}));var Ni;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ne.Markdown,Ne.PlainText],commitCharactersSupport:!0}}}}})(Ni||(Ni={}));function ia(e,t){var r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var s=i[0];return typeof t[s]!="undefined"?t[s]:n}),r}function sa(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return ia(t,r)}function pt(e){return sa}var Ve=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),D=pt(),aa={"color-hex":{errorMessage:D("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:D("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:D("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:D("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:D("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},$e=function(){function e(t,r,n){n===void 0&&(n=0),this.offset=r,this.length=n,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),oa=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="null",i.value=null,i}return t}($e),Li=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,i)||this;return s.type="boolean",s.value=n,s}return t}($e),ua=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}($e),la=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}($e),_r=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s.type="string",s.value="",s}return t}($e),fa=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,n)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}($e),ca=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}($e);function oe(e){return Se(e)?e?{}:{not:{}}:e}var Ci;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Ci||(Ci={}));var ha=function(){function e(t,r){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=r,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||xi(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Ar=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),ue=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];this.merge(i)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var r=0,n=this.problems;r<n.length;r++){var i=n[r];i.code===W.EnumValueMismatch&&(i.message=D("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(s){return JSON.stringify(s)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function da(e,t){return t===void 0&&(t=[]),new ki(e,t,[])}function Me(e){return Ks(e)}function wr(e){return Zs(e)}function xi(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var ki=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return Xs(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var i=t(n),s=n.children;if(Array.isArray(s))for(var a=0;a<s.length&&i;a++)i=r(s[a]);return i};r(this.root)}},e.prototype.validate=function(t,r,n){if(n===void 0&&(n=ce.Warning),this.root&&r){var i=new ue;return te(this.root,r,i,Ar.instance),i.problems.map(function(s){var a,o=q.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return we.create(o,s.message,(a=s.severity)!==null&&a!==void 0?a:n,s.code)})}},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1);var i=new ha(r,n);return this.root&&t&&te(this.root,t,new ue,i),i.schemas},e}();function te(e,t,r,n){if(!e||!n.include(e))return;var i=e;switch(i.type){case"object":l(i,t,r,n);break;case"array":u(i,t,r,n);break;case"string":o(i,t,r);break;case"number":a(i,t,r);break;case"property":return te(i.valueNode,t,r,n)}s(),n.add({node:i,schema:t});function s(){function c(F){return i.type===F||F==="integer"&&i.type==="number"&&i.isInteger}if(Array.isArray(t.type)?t.type.some(c)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||D("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(c(t.type)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||D("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var f=0,h=t.allOf;f<h.length;f++){var d=h[f];te(i,oe(d),r,n)}var m=oe(t.not);if(m){var v=new ue,b=n.newSub();te(i,m,v,b),v.hasProblems()||r.problems.push({location:{offset:i.offset,length:i.length},message:D("notSchemaWarning","Matches a schema that is not allowed.")});for(var N=0,p=b.schemas;N<p.length;N++){var g=p[N];g.inverted=!g.inverted,n.add(g)}}var _=function(F,V){for(var z=[],P=void 0,x=0,E=F;x<E.length;x++){var I=E[x],$=oe(I),j=new ue,O=n.newSub();if(te(i,$,j,O),j.hasProblems()||z.push($),!P)P={schema:$,validationResult:j,matchingSchemas:O};else if(!V&&!j.hasProblems()&&!P.validationResult.hasProblems())P.matchingSchemas.merge(O),P.validationResult.propertiesMatches+=j.propertiesMatches,P.validationResult.propertiesValueMatches+=j.propertiesValueMatches;else{var B=j.compare(P.validationResult);B>0?P={schema:$,validationResult:j,matchingSchemas:O}:B===0&&(P.matchingSchemas.merge(O),P.validationResult.mergeEnumValues(j))}}return z.length>1&&V&&r.problems.push({location:{offset:i.offset,length:1},message:D("oneOfWarning","Matches multiple schemas when only one must validate.")}),P&&(r.merge(P.validationResult),r.propertiesMatches+=P.validationResult.propertiesMatches,r.propertiesValueMatches+=P.validationResult.propertiesValueMatches,n.merge(P.matchingSchemas)),z.length};Array.isArray(t.anyOf)&&_(t.anyOf,!1),Array.isArray(t.oneOf)&&_(t.oneOf,!0);var L=function(F){var V=new ue,z=n.newSub();te(i,oe(F),V,z),r.merge(V),r.propertiesMatches+=V.propertiesMatches,r.propertiesValueMatches+=V.propertiesValueMatches,n.merge(z)},S=function(F,V,z){var P=oe(F),x=new ue,E=n.newSub();te(i,P,x,E),n.merge(E),x.hasProblems()?z&&L(z):V&&L(V)},A=oe(t.if);if(A&&S(A,oe(t.then),oe(t.else)),Array.isArray(t.enum)){for(var w=Me(i),y=!1,T=0,M=t.enum;T<M.length;T++){var k=M[T];if(ut(w,k)){y=!0;break}}r.enumValues=t.enum,r.enumValueMatch=y,y||r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||D("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(F){return JSON.stringify(F)}).join(", "))})}if(Ae(t.const)){var w=Me(i);ut(w,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||D("constWarning","Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&i.parent&&r.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:ce.Warning,message:t.deprecationMessage,code:W.Deprecated})}function a(c,f,h,d){var m=c.value;function v(T){var M,k=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(T.toString());return k&&{value:Number(k[1]+(k[2]||"")),multiplier:(((M=k[2])===null||M===void 0?void 0:M.length)||0)-(parseInt(k[3])||0)}}if(fe(f.multipleOf)){var b=-1;if(Number.isInteger(f.multipleOf))b=m%f.multipleOf;else{var N=v(f.multipleOf),p=v(m);if(N&&p){var g=Math.pow(10,Math.abs(p.multiplier-N.multiplier));p.multiplier<N.multiplier?p.value*=g:N.value*=g,b=p.value%N.value}}b!==0&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("multipleOfWarning","Value is not divisible by {0}.",f.multipleOf)})}function _(T,M){if(fe(M))return M;if(Se(M)&&M)return T}function L(T,M){if(!Se(M)||!M)return T}var S=_(f.minimum,f.exclusiveMinimum);fe(S)&&m<=S&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",S)});var A=_(f.maximum,f.exclusiveMaximum);fe(A)&&m>=A&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var w=L(f.minimum,f.exclusiveMinimum);fe(w)&&m<w&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minimumWarning","Value is below the minimum of {0}.",w)});var y=L(f.maximum,f.exclusiveMaximum);fe(y)&&m>y&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maximumWarning","Value is above the maximum of {0}.",y)})}function o(c,f,h,d){if(fe(f.minLength)&&c.value.length<f.minLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minLengthWarning","String is shorter than the minimum length of {0}.",f.minLength)}),fe(f.maxLength)&&c.value.length>f.maxLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maxLengthWarning","String is longer than the maximum length of {0}.",f.maxLength)}),ta(f.pattern)){var m=kt(f.pattern);m.test(c.value)||h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||D("patternWarning",'String does not match the pattern of "{0}".',f.pattern)})}if(f.format)switch(f.format){case"uri":case"uri-reference":{var v=void 0;if(!c.value)v=D("uriEmpty","URI expected.");else{var b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);b?!b[2]&&f.format==="uri"&&(v=D("uriSchemeMissing","URI with a scheme is expected.")):v=D("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||D("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var N=aa[f.format];(!c.value||!N.pattern.exec(c.value))&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||N.errorMessage})}}function u(c,f,h,d){if(Array.isArray(f.items)){for(var m=f.items,v=0;v<m.length;v++){var b=m[v],N=oe(b),p=new ue,g=c.items[v];g?(te(g,N,p,d),h.mergePropertyMatch(p)):c.items.length>=m.length&&h.propertiesValueMatches++}if(c.items.length>m.length)if(typeof f.additionalItems=="object")for(var _=m.length;_<c.items.length;_++){var p=new ue;te(c.items[_],f.additionalItems,p,d),h.mergePropertyMatch(p)}else f.additionalItems===!1&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",m.length)})}else{var L=oe(f.items);if(L)for(var S=0,A=c.items;S<A.length;S++){var g=A[S],p=new ue;te(g,L,p,d),h.mergePropertyMatch(p)}}var w=oe(f.contains);if(w){var y=c.items.some(function(k){var F=new ue;return te(k,w,F,Ar.instance),!F.hasProblems()});y||h.problems.push({location:{offset:c.offset,length:c.length},message:f.errorMessage||D("requiredItemMissingWarning","Array does not contain required item.")})}if(fe(f.minItems)&&c.items.length<f.minItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minItemsWarning","Array has too few items. Expected {0} or more.",f.minItems)}),fe(f.maxItems)&&c.items.length>f.maxItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maxItemsWarning","Array has too many items. Expected {0} or fewer.",f.maxItems)}),f.uniqueItems===!0){var T=Me(c),M=T.some(function(k,F){return F!==T.lastIndexOf(k)});M&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("uniqueItemsWarning","Array has duplicate items.")})}}function l(c,f,h,d){for(var m=Object.create(null),v=[],b=0,N=c.properties;b<N.length;b++){var p=N[b],g=p.keyNode.value;m[g]=p.valueNode,v.push(g)}if(Array.isArray(f.required))for(var _=0,L=f.required;_<L.length;_++){var S=L[_];if(!m[S]){var A=c.parent&&c.parent.type==="property"&&c.parent.keyNode,w=A?{offset:A.offset,length:A.length}:{offset:c.offset,length:1};h.problems.push({location:w,message:D("MissingRequiredPropWarning",'Missing property "{0}".',S)})}}var y=function($i){for(var Dr=v.indexOf($i);Dr>=0;)v.splice(Dr,1),Dr=v.indexOf($i)};if(f.properties)for(var T=0,M=Object.keys(f.properties);T<M.length;T++){var S=M[T];y(S);var k=f.properties[S],F=m[S];if(F)if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,d),h.mergePropertyMatch(V)}}if(f.patternProperties)for(var z=0,P=Object.keys(f.patternProperties);z<P.length;z++)for(var x=P[z],E=kt(x),I=0,$=v.slice(0);I<$.length;I++){var S=$[I];if(E.test(S)){y(S);var F=m[S];if(F){var k=f.patternProperties[x];if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,d),h.mergePropertyMatch(V)}}}}if(typeof f.additionalProperties=="object")for(var j=0,O=v;j<O.length;j++){var S=O[j],F=m[S];if(F){var V=new ue;te(F,f.additionalProperties,V,d),h.mergePropertyMatch(V)}}else if(f.additionalProperties===!1&&v.length>0)for(var B=0,re=v;B<re.length;B++){var S=re[B],F=m[S];if(F){var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}}if(fe(f.maxProperties)&&c.properties.length>f.maxProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("MaxPropWarning","Object has more properties than limit of {0}.",f.maxProperties)}),fe(f.minProperties)&&c.properties.length<f.minProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("MinPropWarning","Object has fewer properties than the required number of {0}",f.minProperties)}),f.dependencies)for(var de=0,qe=Object.keys(f.dependencies);de<qe.length;de++){var g=qe[de],De=m[g];if(De){var Er=f.dependencies[g];if(Array.isArray(Er))for(var Ir=0,Ui=Er;Ir<Ui.length;Ir++){var Ri=Ui[Ir];m[Ri]?h.propertiesValueMatches++:h.problems.push({location:{offset:c.offset,length:c.length},message:D("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",Ri,g)})}else{var k=oe(Er);if(k){var V=new ue;te(c,k,V,d),h.mergePropertyMatch(V)}}}}var Oi=oe(f.propertyNames);if(Oi)for(var Fr=0,Vi=c.properties;Fr<Vi.length;Fr++){var Ja=Vi[Fr],g=Ja.keyNode;g&&te(g,Oi,h,Ar.instance)}}}function ga(e,t){var r=[],n=-1,i=e.getText(),s=Ze(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){var S=s.scan();switch(c(),S){case 12:case 13:Array.isArray(a)&&a.push(q.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return S}}}function u(S,A,w,y,T){if(T===void 0&&(T=ce.Error),r.length===0||w!==n){var M=q.create(e.positionAt(w),e.positionAt(y));r.push(we.create(M,S,T,A,e.languageId)),n=w}}function l(S,A,w,y,T){w===void 0&&(w=void 0),y===void 0&&(y=[]),T===void 0&&(T=[]);var M=s.getTokenOffset(),k=s.getTokenOffset()+s.getTokenLength();if(M===k&&M>0){for(M--;M>0&&/\s/.test(i.charAt(M));)M--;k=M+1}if(u(S,A,M,k),w&&f(w,!1),y.length+T.length>0)for(var F=s.getToken();F!==17;){if(y.indexOf(F)!==-1){o();break}else if(T.indexOf(F)!==-1)break;F=o()}return w}function c(){switch(s.getTokenError()){case 4:return l(D("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return l(D("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return l(D("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return l(D("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return l(D("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return l(D("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function f(S,A){return S.length=s.getTokenOffset()+s.getTokenLength()-S.offset,A&&o(),S}function h(S){if(s.getToken()===3){var A=new ua(S,s.getTokenOffset());o();for(var w=!1;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){w||l(D("ValueExpected","Value expected"),W.ValueExpected);var y=s.getTokenOffset();if(o(),s.getToken()===4){w&&u(D("TrailingComma","Trailing comma"),W.TrailingComma,y,y+1);continue}}else w&&l(D("ExpectedComma","Expected comma"),W.CommaExpected);var T=g(A);T?A.items.push(T):l(D("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),w=!0}return s.getToken()!==4?l(D("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,A):f(A,!0)}}var d=new _r(void 0,0,0);function m(S,A){var w=new fa(S,s.getTokenOffset(),d),y=b(w);if(!y)if(s.getToken()===16){l(D("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var T=new _r(w,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),y=T,o()}else return;w.keyNode=y;var M=A[y.value];if(M?(u(D("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,ce.Warning),typeof M=="object"&&u(D("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,M.keyNode.offset,M.keyNode.offset+M.keyNode.length,ce.Warning),A[y.value]=!0):A[y.value]=w,s.getToken()===6)w.colonOffset=s.getTokenOffset(),o();else if(l(D("ColonExpected","Colon expected"),W.ColonExpected),s.getToken()===10&&e.positionAt(y.offset+y.length).line<e.positionAt(s.getTokenOffset()).line)return w.length=y.length,w;var k=g(w);return k?(w.valueNode=k,w.length=k.offset+k.length-w.offset,w):l(D("ValueExpected","Value expected"),W.ValueExpected,w,[],[2,5])}function v(S){if(s.getToken()===1){var A=new ca(S,s.getTokenOffset()),w=Object.create(null);o();for(var y=!1;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){y||l(D("PropertyExpected","Property expected"),W.PropertyExpected);var T=s.getTokenOffset();if(o(),s.getToken()===2){y&&u(D("TrailingComma","Trailing comma"),W.TrailingComma,T,T+1);continue}}else y&&l(D("ExpectedComma","Expected comma"),W.CommaExpected);var M=m(A,w);M?A.properties.push(M):l(D("PropertyExpected","Property expected"),W.PropertyExpected,void 0,[],[2,5]),y=!0}return s.getToken()!==2?l(D("ExpectedCloseBrace","Expected comma or closing brace"),W.CommaOrCloseBraceExpected,A):f(A,!0)}}function b(S){if(s.getToken()===10){var A=new _r(S,s.getTokenOffset());return A.value=s.getTokenValue(),f(A,!0)}}function N(S){if(s.getToken()===11){var A=new la(S,s.getTokenOffset());if(s.getTokenError()===0){var w=s.getTokenValue();try{var y=JSON.parse(w);if(!fe(y))return l(D("InvalidNumberFormat","Invalid number format."),W.Undefined,A);A.value=y}catch{return l(D("InvalidNumberFormat","Invalid number format."),W.Undefined,A)}A.isInteger=w.indexOf(".")===-1}return f(A,!0)}}function p(S){switch(s.getToken()){case 7:return f(new oa(S,s.getTokenOffset()),!0);case 8:return f(new Li(S,!0,s.getTokenOffset()),!0);case 9:return f(new Li(S,!1,s.getTokenOffset()),!0);default:return}}function g(S){return h(S)||v(S)||b(S)||N(S)||p(S)}var _=void 0,L=o();return L!==17&&(_=g(_),_?s.getToken()!==17&&l(D("End of file expected","End of file expected."),W.Undefined):l(D("Invalid symbol","Expected a JSON object, array or literal."),W.Undefined)),new ki(_,r,a)}function Nr(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var i=`[ +`,s=0;s<e.length;s++)i+=n+Nr(e[s],n,r),s<e.length-1&&(i+=","),i+=` +`;return i+=t+"]",i}else{var a=Object.keys(e);if(a.length===0)return"{}";for(var i=`{ +`,s=0;s<a.length;s++){var o=a[s];i+=n+JSON.stringify(o)+": "+Nr(e[o],n,r),s<a.length-1&&(i+=","),i+=` +`}return i+=t+"}",i}}return r(e)}var Lr=pt(),ma=function(){function e(t,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--){var n=this.contributions[r].resolveCompletion;if(n){var i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var i=this,s={items:[],isIncomplete:!1},a=t.getText(),o=t.offsetAt(r),u=n.getNodeFromOffset(o,!0);if(this.isInComment(t,u?u.offset:0,o))return Promise.resolve(s);if(u&&o===u.offset+u.length&&o>0){var l=a[o-1];(u.type==="object"&&l==="}"||u.type==="array"&&l==="]")&&(u=u.parent)}var c=this.getCurrentWord(t,o),f;if(u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null"))f=q.create(t.positionAt(u.offset),t.positionAt(u.offset+u.length));else{var h=o-c.length;h>0&&a[h-1]==='"'&&h--,f=q.create(t.positionAt(h),r)}var d={},m={add:function(v){var b=v.label,N=d[b];if(N)N.documentation||(N.documentation=v.documentation),N.detail||(N.detail=v.detail);else{if(b=b.replace(/[\n]/g,"\u21B5"),b.length>60){var p=b.substr(0,57).trim()+"...";d[p]||(b=p)}f&&v.insertText!==void 0&&(v.textEdit=ve.replace(f,v.insertText)),v.label=b,d[b]=v,s.items.push(v)}},setAsIncomplete:function(){s.isIncomplete=!0},error:function(v){console.error(v)},log:function(v){console.log(v)},getNumberOfProposals:function(){return s.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(v){var b=[],N=!0,p="",g=void 0;if(u&&u.type==="string"){var _=u.parent;_&&_.type==="property"&&_.keyNode===u&&(N=!_.valueNode,g=_,p=a.substr(u.offset+1,u.length-2),_&&(u=_.parent))}if(u&&u.type==="object"){if(u.offset===o)return s;var L=u.properties;L.forEach(function(y){(!g||g!==y)&&(d[y.keyNode.value]=br.create("__"))});var S="";N&&(S=i.evaluateSeparatorAfter(t,t.offsetAt(f.end))),v?i.getPropertyCompletions(v,n,u,N,S,m):i.getSchemaLessPropertyCompletions(n,u,p,m);var A=wr(u);i.contributions.forEach(function(y){var T=y.collectPropertyCompletions(t.uri,A,c,N,S==="",m);T&&b.push(T)}),!v&&c.length>0&&a.charAt(o-c.length-1)!=='"'&&(m.add({kind:he.Property,label:i.getLabelForValue(c),insertText:i.getInsertTextForProperty(c,void 0,!1,S),insertTextFormat:X.Snippet,documentation:""}),m.setAsIncomplete())}var w={};return v?i.getValueCompletions(v,n,u,o,t,m,w):i.getSchemaLessValueCompletions(n,u,o,t,m),i.contributions.length>0&&i.getContributedValueCompletions(n,u,o,t,m,b),i.promiseConstructor.all(b).then(function(){if(m.getNumberOfProposals()===0){var y=o;u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null")&&(y=u.offset+u.length);var T=i.evaluateSeparatorAfter(t,y);i.addFillerValueCompletions(w,T,m)}return s})})},e.prototype.getPropertyCompletions=function(t,r,n,i,s,a){var o=this,u=r.getMatchingSchemas(t.schema,n.offset);u.forEach(function(l){if(l.node===n&&!l.inverted){var c=l.schema.properties;c&&Object.keys(c).forEach(function(v){var b=c[v];if(typeof b=="object"&&!b.deprecationMessage&&!b.doNotSuggest){var N={kind:he.Property,label:v,insertText:o.getInsertTextForProperty(v,b,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:o.fromMarkup(b.markdownDescription)||b.description||""};b.suggestSortText!==void 0&&(N.sortText=b.suggestSortText),N.insertText&<(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)}});var f=l.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){var h=function(v,b){b===void 0&&(b=void 0);var N={kind:he.Property,label:v,insertText:o.getInsertTextForProperty(v,void 0,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:b||o.fromMarkup(f.markdownDescription)||f.description||""};f.suggestSortText!==void 0&&(N.sortText=f.suggestSortText),N.insertText&<(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)};if(f.enum)for(var d=0;d<f.enum.length;d++){var m=void 0;f.markdownEnumDescriptions&&d<f.markdownEnumDescriptions.length?m=o.fromMarkup(f.markdownEnumDescriptions[d]):f.enumDescriptions&&d<f.enumDescriptions.length&&(m=f.enumDescriptions[d]),h(f.enum[d],m)}f.const&&h(f.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,i){var s=this,a=function(u){u.properties.forEach(function(l){var c=l.keyNode.value;i.add({kind:he.Property,label:c,insertText:s.getInsertTextForValue(c,""),insertTextFormat:X.Snippet,filterText:s.getFilterTextForValue(c),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var o=r.parent.keyNode.value;t.visit(function(u){return u.type==="property"&&u!==r.parent&&u.keyNode.value===o&&u.valueNode&&u.valueNode.type==="object"&&a(u.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(u){u.type==="object"&&u!==r&&a(u)});else r.type==="object"&&i.add({kind:he.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:X.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,i,s){var a=this,o=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:X.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:X.Snippet,documentation:""});return}var u=this.evaluateSeparatorAfter(i,o),l=function(d){d.parent&&!xi(d.parent,n,!0)&&s.add({kind:a.getSuggestionKind(d.type),label:a.getLabelTextForMatchingNode(d,i),insertText:a.getInsertTextForMatchingNode(d,i,u),insertTextFormat:X.Snippet,documentation:""}),d.type==="boolean"&&a.addBooleanValueCompletion(!d.value,u,s)};if(r.type==="property"&&n>(r.colonOffset||0)){var c=r.valueNode;if(c&&(n>c.offset+c.length||c.type==="object"||c.type==="array"))return;var f=r.keyNode.value;t.visit(function(d){return d.type==="property"&&d.keyNode.value===f&&d.valueNode&&l(d.valueNode),!0}),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(u,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var h=r.parent.keyNode.value;t.visit(function(d){return d.type==="property"&&d.keyNode.value===h&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(l),!0})}else r.items.forEach(l)},e.prototype.getValueCompletions=function(t,r,n,i,s,a,o){var u=i,l=void 0,c=void 0;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(u=n.offset+n.length,c=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(n.type==="property"&&i>(n.colonOffset||0)){var f=n.valueNode;if(f&&i>f.offset+f.length)return;l=n.keyNode.value,n=n.parent}if(n&&(l!==void 0||n.type==="array")){for(var h=this.evaluateSeparatorAfter(s,u),d=r.getMatchingSchemas(t.schema,n.offset,c),m=0,v=d;m<v.length;m++){var b=v[m];if(b.node===n&&!b.inverted&&b.schema){if(n.type==="array"&&b.schema.items)if(Array.isArray(b.schema.items)){var N=this.findItemAtOffset(n,s,i);N<b.schema.items.length&&this.addSchemaValueCompletions(b.schema.items[N],h,a,o)}else this.addSchemaValueCompletions(b.schema.items,h,a,o);if(l!==void 0){var p=!1;if(b.schema.properties){var g=b.schema.properties[l];g&&(p=!0,this.addSchemaValueCompletions(g,h,a,o))}if(b.schema.patternProperties&&!p)for(var _=0,L=Object.keys(b.schema.patternProperties);_<L.length;_++){var S=L[_],A=kt(S);if(A.test(l)){p=!0;var g=b.schema.patternProperties[S];this.addSchemaValueCompletions(g,h,a,o)}}if(b.schema.additionalProperties&&!p){var g=b.schema.additionalProperties;this.addSchemaValueCompletions(g,h,a,o)}}}}l==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}},e.prototype.getContributedValueCompletions=function(t,r,n,i,s,a){if(!r)this.contributions.forEach(function(c){var f=c.collectDefaultCompletions(i.uri,s);f&&a.push(f)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){var o=r.keyNode.value,u=r.valueNode;if((!u||n<=u.offset+u.length)&&r.parent){var l=wr(r.parent);this.contributions.forEach(function(c){var f=c.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,i){var s=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,i){var s=this;i===void 0&&(i=0);var a=!1;if(Ae(t.default)){for(var o=t.type,u=t.default,l=i;l>0;l--)u=[u],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:X.Snippet,detail:Lr("json.suggest.default","Default value")}),a=!0}Array.isArray(t.examples)&&t.examples.forEach(function(c){for(var f=t.type,h=c,d=i;d>0;d--)h=[h],f="array";n.add({kind:s.getSuggestionKind(f),label:s.getLabelForValue(h),insertText:s.getInsertTextForValue(h,r),insertTextFormat:X.Snippet}),a=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(c){var f=t.type,h=c.body,d=c.label,m,v;if(Ae(h)){t.type;for(var b=i;b>0;b--)h=[h];m=s.getInsertTextForSnippetValue(h,r),v=s.getFilterTextForSnippetValue(h),d=d||s.getLabelForSnippetValue(h)}else if(typeof c.bodyText=="string"){for(var N="",p="",g="",b=i;b>0;b--)N=N+g+`[ +`,p=p+` +`+g+"]",g+=" ",f="array";m=N+g+c.bodyText.split(` +`).join(` +`+g)+p+r,d=d||m,v=m.replace(/[\n]/g,"")}else return;n.add({kind:s.getSuggestionKind(f),label:d,documentation:s.fromMarkup(c.markdownDescription)||c.description,insertText:m,insertTextFormat:X.Snippet,filterText:v}),a=!0}),!a&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Ae(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:X.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,s=t.enum.length;i<s;i++){var a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:X.Snippet,documentation:o})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||Ae(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(i){return r[i]=!0}):n&&(r[n]=!0)}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:X.Snippet,detail:Lr("defaults.object","New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:X.Snippet,detail:Lr("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:X.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:X.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,i=this.schemaService.getRegisteredSchemaIds(function(s){return s==="http"||s==="https"});i.forEach(function(s){return r.add({kind:he.Module,label:n.getLabelForValue(s),filterText:n.getFilterTextForValue(s),insertText:n.getInsertTextForValue(s,t),insertTextFormat:X.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var r=JSON.stringify(t);return r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(i){return typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i)};return Nr(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?r[0]:void 0}if(!t)return he.Value;switch(t){case"string":return he.Value;case"object":return he.Module;case"property":return he.Property;default:return he.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,r,n,i){var s=this.getInsertTextForValue(t,"");if(!n)return s;var a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var l=r.defaultSnippets[0].body;Ae(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),Ae(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){var c=Array.isArray(r.type)?r.type[0]:r.type;switch(c||(r.properties?c="object":r.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+i},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,i=t.getText();n>=0&&` +\r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=Ze(t.getText(),!0);n.setPosition(r);var i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var i=Ze(r.getText(),!0),s=t.items,a=s.length-1;a>=0;a--){var o=s[a];if(n>o.offset+o.length){i.setPosition(o.offset+o.length);var u=i.scan();return u===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a}else if(n>=o.offset)return a}return 0},e.prototype.isInComment=function(t,r,n){var i=Ze(t.getText(),!1);i.setPosition(r);for(var s=i.scan();s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:Ne.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!Ae(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(Ne.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!Ae(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),pa=function(){function e(t,r,n){r===void 0&&(r=[]),this.schemaService=t,this.contributions=r,this.promise=n||Promise}return e.prototype.doHover=function(t,r,n){var i=t.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);var a=s;if(s.type==="string"){var o=s.parent;if(o&&o.type==="property"&&o.keyNode===s&&(s=o.valueNode,!s))return this.promise.resolve(null)}for(var u=q.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),l=function(m){var v={contents:m,range:u};return v},c=wr(s),f=this.contributions.length-1;f>=0;f--){var h=this.contributions[f],d=h.getInfoContribution(t.uri,c);if(d)return d.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(m){if(m&&s){var v=n.getMatchingSchemas(m.schema,s.offset),b=void 0,N=void 0,p=void 0,g=void 0;v.every(function(L){if(L.node===s&&!L.inverted&&L.schema&&(b=b||L.schema.title,N=N||L.schema.markdownDescription||Cr(L.schema.description),L.schema.enum)){var S=L.schema.enum.indexOf(Me(s));L.schema.markdownEnumDescriptions?p=L.schema.markdownEnumDescriptions[S]:L.schema.enumDescriptions&&(p=Cr(L.schema.enumDescriptions[S])),p&&(g=L.schema.enum[S],typeof g!="string"&&(g=JSON.stringify(g)))}return!0});var _="";return b&&(_=Cr(b)),N&&(_.length>0&&(_+=` + +`),_+=N),p&&(_.length>0&&(_+=` + +`),_+="`"+va(g)+"`: "+p),l([_])}return null})},e}();function Cr(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 + +$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function va(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ti;Ti=(()=>{var e={470:n=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,u){for(var l,c="",f=0,h=-1,d=0,m=0;m<=o.length;++m){if(m<o.length)l=o.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(h===m-1||d===1))if(h!==m-1&&d===2){if(c.length<2||f!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",f=0):f=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),h=m,d=0;continue}}else if(c.length===2||c.length===1){c="",f=0,h=m,d=0;continue}}u&&(c.length>0?c+="/..":c="..",f=2)}else c.length>0?c+="/"+o.slice(h+1,m):c=o.slice(h+1,m),f=m-h-1;h=m,d=0}else l===46&&d!==-1?++d:d=-1}return c}var a={resolve:function(){for(var o,u="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var f;c>=0?f=arguments[c]:(o===void 0&&(o=process.cwd()),f=o),i(f),f.length!==0&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=s(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(i(o),o.length===0)return".";var u=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=s(o,!u)).length!==0||u||(o="."),o.length>0&&l&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var l=arguments[u];i(l),l.length>0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":a.normalize(o)},relative:function(o,u){if(i(o),i(u),o===u||(o=a.resolve(o))===(u=a.resolve(u)))return"";for(var l=1;l<o.length&&o.charCodeAt(l)===47;++l);for(var c=o.length,f=c-l,h=1;h<u.length&&u.charCodeAt(h)===47;++h);for(var d=u.length-h,m=f<d?f:d,v=-1,b=0;b<=m;++b){if(b===m){if(d>m){if(u.charCodeAt(h+b)===47)return u.slice(h+b+1);if(b===0)return u.slice(h+b)}else f>m&&(o.charCodeAt(l+b)===47?v=b:b===0&&(v=0));break}var N=o.charCodeAt(l+b);if(N!==u.charCodeAt(h+b))break;N===47&&(v=b)}var p="";for(b=l+v+1;b<=c;++b)b!==c&&o.charCodeAt(b)!==47||(p.length===0?p+="..":p+="/..");return p.length>0?p+u.slice(h+v):(h+=v,u.charCodeAt(h)===47&&++h,u.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var u=o.charCodeAt(0),l=u===47,c=-1,f=!0,h=o.length-1;h>=1;--h)if((u=o.charCodeAt(h))===47){if(!f){c=h;break}}else f=!1;return c===-1?l?"/":".":l&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');i(o);var l,c=0,f=-1,h=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var d=u.length-1,m=-1;for(l=o.length-1;l>=0;--l){var v=o.charCodeAt(l);if(v===47){if(!h){c=l+1;break}}else m===-1&&(h=!1,m=l+1),d>=0&&(v===u.charCodeAt(d)?--d==-1&&(f=l):(d=-1,f=m))}return c===f?f=m:f===-1&&(f=o.length),o.slice(c,f)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){c=l+1;break}}else f===-1&&(h=!1,f=l+1);return f===-1?"":o.slice(c,f)},extname:function(o){i(o);for(var u=-1,l=0,c=-1,f=!0,h=0,d=o.length-1;d>=0;--d){var m=o.charCodeAt(d);if(m!==47)c===-1&&(f=!1,c=d+1),m===46?u===-1?u=d:h!==1&&(h=1):u!==-1&&(h=-1);else if(!f){l=d+1;break}}return u===-1||c===-1||h===0||h===1&&u===c-1&&u===l+1?"":o.slice(u,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,l){var c=l.dir||l.root,f=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+f:c+"/"+f:f}(0,o)},parse:function(o){i(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var l,c=o.charCodeAt(0),f=c===47;f?(u.root="/",l=1):l=0;for(var h=-1,d=0,m=-1,v=!0,b=o.length-1,N=0;b>=l;--b)if((c=o.charCodeAt(b))!==47)m===-1&&(v=!1,m=b+1),c===46?h===-1?h=b:N!==1&&(N=1):h!==-1&&(N=-1);else if(!v){d=b+1;break}return h===-1||m===-1||N===0||N===1&&h===m-1&&h===d+1?m!==-1&&(u.base=u.name=d===0&&f?o.slice(1,m):o.slice(d,m)):(d===0&&f?(u.name=o.slice(1,h),u.base=o.slice(1,m)):(u.name=o.slice(d,h),u.base=o.slice(d,m)),u.ext=o.slice(h,m)),d>0?u.dir=o.slice(0,d-1):f&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a},447:(n,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>N,Utils:()=>k}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var u,l,c=(u=function(P,x){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,I){E.__proto__=I}||function(E,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(E[$]=I[$])})(P,x)},function(P,x){function E(){this.constructor=P}u(P,x),P.prototype=x===null?Object.create(x):(E.prototype=x.prototype,new E)}),f=/^\w[\w\d+.-]*$/,h=/^\//,d=/^\/\//,m="",v="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,N=function(){function P(x,E,I,$,j,O){O===void 0&&(O=!1),typeof x=="object"?(this.scheme=x.scheme||m,this.authority=x.authority||m,this.path=x.path||m,this.query=x.query||m,this.fragment=x.fragment||m):(this.scheme=function(B,re){return B||re?B:"file"}(x,O),this.authority=E||m,this.path=function(B,re){switch(B){case"https":case"http":case"file":re?re[0]!==v&&(re=v+re):re=v}return re}(this.scheme,I||m),this.query=$||m,this.fragment=j||m,function(B,re){if(!B.scheme&&re)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+B.authority+'", path: "'+B.path+'", query: "'+B.query+'", fragment: "'+B.fragment+'"}');if(B.scheme&&!f.test(B.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(B.path){if(B.authority){if(!h.test(B.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(d.test(B.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))}return P.isUri=function(x){return x instanceof P||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="function"&&typeof x.with=="function"&&typeof x.toString=="function"},Object.defineProperty(P.prototype,"fsPath",{get:function(){return A(this,!1)},enumerable:!1,configurable:!0}),P.prototype.with=function(x){if(!x)return this;var E=x.scheme,I=x.authority,$=x.path,j=x.query,O=x.fragment;return E===void 0?E=this.scheme:E===null&&(E=m),I===void 0?I=this.authority:I===null&&(I=m),$===void 0?$=this.path:$===null&&($=m),j===void 0?j=this.query:j===null&&(j=m),O===void 0?O=this.fragment:O===null&&(O=m),E===this.scheme&&I===this.authority&&$===this.path&&j===this.query&&O===this.fragment?this:new g(E,I,$,j,O)},P.parse=function(x,E){E===void 0&&(E=!1);var I=b.exec(x);return I?new g(I[2]||m,M(I[4]||m),M(I[5]||m),M(I[7]||m),M(I[9]||m),E):new g(m,m,m,m,m)},P.file=function(x){var E=m;if(a&&(x=x.replace(/\\/g,v)),x[0]===v&&x[1]===v){var I=x.indexOf(v,2);I===-1?(E=x.substring(2),x=v):(E=x.substring(2,I),x=x.substring(I)||v)}return new g("file",E,x,m,m)},P.from=function(x){return new g(x.scheme,x.authority,x.path,x.query,x.fragment)},P.prototype.toString=function(x){return x===void 0&&(x=!1),w(this,x)},P.prototype.toJSON=function(){return this},P.revive=function(x){if(x){if(x instanceof P)return x;var E=new g(x);return E._formatted=x.external,E._fsPath=x._sep===p?x.fsPath:null,E}return x},P}(),p=a?1:void 0,g=function(P){function x(){var E=P!==null&&P.apply(this,arguments)||this;return E._formatted=null,E._fsPath=null,E}return c(x,P),Object.defineProperty(x.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),x.prototype.toString=function(E){return E===void 0&&(E=!1),E?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},x.prototype.toJSON=function(){var E={$mid:1};return this._fsPath&&(E.fsPath=this._fsPath,E._sep=p),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},x}(N),_=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function L(P,x){for(var E=void 0,I=-1,$=0;$<P.length;$++){var j=P.charCodeAt($);if(j>=97&&j<=122||j>=65&&j<=90||j>=48&&j<=57||j===45||j===46||j===95||j===126||x&&j===47)I!==-1&&(E+=encodeURIComponent(P.substring(I,$)),I=-1),E!==void 0&&(E+=P.charAt($));else{E===void 0&&(E=P.substr(0,$));var O=_[j];O!==void 0?(I!==-1&&(E+=encodeURIComponent(P.substring(I,$)),I=-1),E+=O):I===-1&&(I=$)}}return I!==-1&&(E+=encodeURIComponent(P.substring(I))),E!==void 0?E:P}function S(P){for(var x=void 0,E=0;E<P.length;E++){var I=P.charCodeAt(E);I===35||I===63?(x===void 0&&(x=P.substr(0,E)),x+=_[I]):x!==void 0&&(x+=P[E])}return x!==void 0?x:P}function A(P,x){var E;return E=P.authority&&P.path.length>1&&P.scheme==="file"?"//"+P.authority+P.path:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?x?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(E=E.replace(/\//g,"\\")),E}function w(P,x){var E=x?S:L,I="",$=P.scheme,j=P.authority,O=P.path,B=P.query,re=P.fragment;if($&&(I+=$,I+=":"),(j||$==="file")&&(I+=v,I+=v),j){var de=j.indexOf("@");if(de!==-1){var qe=j.substr(0,de);j=j.substr(de+1),(de=qe.indexOf(":"))===-1?I+=E(qe,!1):(I+=E(qe.substr(0,de),!1),I+=":",I+=E(qe.substr(de+1),!1)),I+="@"}(de=(j=j.toLowerCase()).indexOf(":"))===-1?I+=E(j,!1):(I+=E(j.substr(0,de),!1),I+=j.substr(de))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58)(De=O.charCodeAt(1))>=65&&De<=90&&(O="/"+String.fromCharCode(De+32)+":"+O.substr(3));else if(O.length>=2&&O.charCodeAt(1)===58){var De;(De=O.charCodeAt(0))>=65&&De<=90&&(O=String.fromCharCode(De+32)+":"+O.substr(2))}I+=E(O,!0)}return B&&(I+="?",I+=E(B,!1)),re&&(I+="#",I+=x?re:L(re,!1)),I}function y(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+y(P.substr(3)):P}}var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function M(P){return P.match(T)?P.replace(T,function(x){return y(x)}):P}var k,F=s(470),V=function(){for(var P=0,x=0,E=arguments.length;x<E;x++)P+=arguments[x].length;var I=Array(P),$=0;for(x=0;x<E;x++)for(var j=arguments[x],O=0,B=j.length;O<B;O++,$++)I[$]=j[O];return I},z=F.posix||F;(function(P){P.joinPath=function(x){for(var E=[],I=1;I<arguments.length;I++)E[I-1]=arguments[I];return x.with({path:z.join.apply(z,V([x.path],E))})},P.resolvePath=function(x){for(var E=[],I=1;I<arguments.length;I++)E[I-1]=arguments[I];var $=x.path||"/";return x.with({path:z.resolve.apply(z,V([$],E))})},P.dirname=function(x){var E=z.dirname(x.path);return E.length===1&&E.charCodeAt(0)===46?x:x.with({path:E})},P.basename=function(x){return z.basename(x.path)},P.extname=function(x){return z.extname(x.path)}})(k||(k={}))}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(n,i)=>{for(var s in i)r.o(i,s)&&!r.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:i[s]})},r.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),r.r=n=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r(447)})();const{URI:et,Utils:Za}=Ti;function ba(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var r=String(e),n="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",u,l=0,c=r.length;l<c;l++)switch(u=r[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":n+="\\"+u;break;case"?":if(i){n+=".";break}case"[":case"]":if(i){n+=u;break}case"{":if(i){a=!0,n+="(";break}case"}":if(i){a=!1,n+=")";break}case",":if(a){n+="|";break}n+="\\"+u;break;case"*":for(var f=r[l-1],h=1;r[l+1]==="*";)h++,l++;var d=r[l+1];if(!s)n+=".*";else{var m=h>1&&(f==="/"||f===void 0||f==="{"||f===",")&&(d==="/"||d===void 0||d===","||d==="}");m?(d==="/"?l++:f==="/"&&n.endsWith("\\/")&&(n=n.substr(0,n.length-2)),n+="((?:[^/]*(?:/|$))*)"):n+="([^/]*)"}break;default:n+=u}return(!o||!~o.indexOf("g"))&&(n="^"+n+"$"),new RegExp(n,o)}var Ee=pt(),ya="!",Sa="/",_a=function(){function e(t,r){this.globWrappers=[];try{for(var n=0,i=t;n<i.length;n++){var s=i[n],a=s[0]!==ya;a||(s=s.substring(1)),s.length>0&&(s[0]===Sa&&(s=s.substring(1)),this.globWrappers.push({regexp:ba("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=r}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var r=!1,n=0,i=this.globWrappers;n<i.length;n++){var s=i[n],a=s.regexp,o=s.include;a.test(t)&&(r=o)}return r},e.prototype.getURIs=function(){return this.uris},e}(),Aa=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new We(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),We=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}(),Pi=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){var r=this.getSectionRecursive(t,this.schema);if(r)return oe(r)},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var i=0,s=Object.keys(r.patternProperties);i<s.length;i++){var a=s[i],o=kt(a);if(o.test(n))return this.getSectionRecursive(t,r.patternProperties[a])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var u=parseInt(n,10);if(!isNaN(u)&&r.items[u])return this.getSectionRecursive(t,r.items[u])}else if(r.items)return this.getSectionRecursive(t,r.items)}}},e}(),wa=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(r){var n=et.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var r=this,n=!1;t=Ie(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return r.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o<s.length;o++){var u=s[o];u&&(u.url===a||u.dependencies[a])&&(u.url!==a&&i.push(u.url),u.clearSchema(),s[o]=void 0,n=!0)}return n},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var i=Ie(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations))for(var s=t.schemaAssociations,a=0,o=s;a<o.length;a++){var u=o[a],l=u.uris.map(Ie),c=this.addFilePatternAssociation(u.pattern,l);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(t,r){var n=new Aa(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.addFilePatternAssociation=function(t,r){var n=new _a(t,r);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(t,r,n){var i=Ie(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,r&&this.addFilePatternAssociation(r,[t]),n?this.addSchemaHandle(i,n):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var r=0,n=this.contributionAssociations;r<n.length;r++){var i=n[r];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var r=Ie(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var r=Ee("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Dt(t));return this.promise.resolve(new We({},[r]))}return this.requestService(t).then(function(n){if(!n){var i=Ee("json.schema.nocontent","Unable to load schema from '{0}': No content.",Dt(t));return new We({},[i])}var s={},a=[];s=Qs(n,a);var o=a.length?[Ee("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Dt(t),a[0].offset)]:[];return new We(s,o)},function(n){var i=n.toString(),s=n.toString().split("Error: ");return s.length>1&&(i=s[1]),lt(i,".")&&(i=i.substr(0,i.length-1)),new We({},[Ee("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Dt(t),i)])})},e.prototype.resolveSchemaContent=function(t,r,n){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=Ie(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Pi({},[Ee("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Ee("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(d,m){if(!m)return d;var v=d;return m[0]==="/"&&(m=m.substr(1)),m.split("/").some(function(b){return b=b.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[b],!v}),v},c=function(d,m,v,b){var N=b?decodeURIComponent(b):void 0,p=l(m,N);if(p)for(var g in p)p.hasOwnProperty(g)&&!d.hasOwnProperty(g)&&(d[g]=p[g]);else s.push(Ee("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",N,v))},f=function(d,m,v,b,N){u&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(m)&&(m=u.resolveRelativePath(m,b)),m=Ie(m);var p=i.getOrAddSchemaHandle(m);return p.getUnresolvedSchema().then(function(g){if(N[m]=!0,g.errors.length){var _=v?m+"#"+v:m;s.push(Ee("json.schema.problemloadingref","Problems loading reference '{0}': {1}",_,g.errors[0]))}return c(d,g.schema,m,v),h(d,g.schema,m,p.dependencies)})},h=function(d,m,v,b){if(!d||typeof d!="object")return Promise.resolve(null);for(var N=[d],p=[],g=[],_=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];typeof F=="object"&&N.push(F)}},L=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];if(typeof F=="object")for(var V in F){var z=V,P=F[z];typeof P=="object"&&N.push(P)}}},S=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];if(Array.isArray(F))for(var V=0,z=F;V<z.length;V++){var P=z[V];typeof P=="object"&&N.push(P)}}},A=function(y){for(var T=[];y.$ref;){var M=y.$ref,k=M.split("#",2);if(delete y.$ref,k[0].length>0){g.push(f(y,k[0],k[1],v,b));return}else T.indexOf(M)===-1&&(c(y,m,v,k[1]),T.push(M))}_(y.items,y.additionalItems,y.additionalProperties,y.not,y.contains,y.propertyNames,y.if,y.then,y.else),L(y.definitions,y.properties,y.patternProperties,y.dependencies),S(y.anyOf,y.allOf,y.oneOf,y.items)};N.length;){var w=N.pop();p.indexOf(w)>=0||(p.push(w),A(w))}return i.promise.all(g)};return h(a,a,r,n).then(function(d){return new Pi(a,s)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(N){return N.keyNode.value==="$schema"&&N.valueNode&&N.valueNode.type==="string"});if(n.length>0){var i=n[0].valueNode;if(i&&i.type==="string"){var s=Me(i);if(s&&Hn(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=Ie(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=La(t),c=0,f=this.filePatternAssociations;c<f.length;c++){var h=f[c];if(h.matchesPattern(l))for(var d=0,m=h.getURIs();d<m.length;d++){var v=m[d];o[v]||(u.push(v),o[v]=!0)}}var b=u.length>0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:b},b},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(function(s){return{$ref:s}})};return this.addSchemaHandle(n,i)},e.prototype.getMatchingSchemas=function(t,r,n){if(n){var i=n.id||"schemaservice://untitled/matchingSchemas/"+Na++;return this.resolveSchemaContent(new We(n),i,{}).then(function(s){return r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,r).then(function(s){return s?r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),Na=0;function Ie(e){try{return et.parse(e).toString()}catch{return e}}function La(e){try{return et.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Dt(e){try{var t=et.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var Ca=pt(),xa=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:ce.Error)},e.prototype.doValidation=function(t,r,n,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(f){var h=f.range.start.line+" "+f.range.start.character+" "+f.message;o[h]||(o[h]=!0,a.push(f))},l=function(f){var h=n!=null&&n.trailingCommas?jt(n.trailingCommas):ce.Error,d=n!=null&&n.comments?jt(n.comments):s.commentSeverity,m=n!=null&&n.schemaValidation?jt(n.schemaValidation):ce.Warning,v=n!=null&&n.schemaRequest?jt(n.schemaRequest):ce.Warning;if(f){if(f.errors.length&&r.root&&v){var b=r.root,N=b.type==="object"?b.properties[0]:void 0;if(N&&N.keyNode.value==="$schema"){var p=N.valueNode||N,g=q.create(t.positionAt(p.offset),t.positionAt(p.offset+p.length));u(we.create(g,f.errors[0],v,W.SchemaResolveError))}else{var g=q.create(t.positionAt(b.offset),t.positionAt(b.offset+1));u(we.create(g,f.errors[0],v,W.SchemaResolveError))}}else if(m){var _=r.validate(t,f.schema,m);_&&_.forEach(u)}Mi(f.schema)&&(d=void 0),Ei(f.schema)&&(h=void 0)}for(var L=0,S=r.syntaxErrors;L<S.length;L++){var A=S[L];if(A.code===W.TrailingComma){if(typeof h!="number")continue;A.severity=h}u(A)}if(typeof d=="number"){var w=Ca("InvalidCommentToken","Comments are not permitted in JSON.");r.comments.forEach(function(y){u(we.create(y,w,d,W.CommentNotPermitted))})}return a};if(i){var c=i.id||"schemaservice://untitled/"+ka++;return this.jsonSchemaService.resolveSchemaContent(new We(i),c,{}).then(function(f){return l(f)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(f){return l(f)})},e}(),ka=0;function Mi(e){if(e&&typeof e=="object"){if(Se(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],i=Mi(n);if(Se(i))return i}}}function Ei(e){if(e&&typeof e=="object"){if(Se(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Se(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var r=0,n=e.allOf;r<n.length;r++){var i=n[r],s=Ei(i);if(Se(s))return s}}}function jt(e){switch(e){case"error":return ce.Error;case"warning":return ce.Warning;case"ignore":return}}var Ii=48,Ta=57,Pa=65,Ut=97,Ma=102;function Q(e){return e<Ii?0:e<=Ta?e-Ii:(e<Ut&&(e+=Ut-Pa),e>=Ut&&e<=Ma?e-Ut+10:0)}function Ea(e){if(e[0]==="#")switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var Ia=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||lt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,d=f.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var v=ft.create(t.uri,Fe(t,f));if(u.push({name:Me(m.valueNode),kind:_e.Function,location:v}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var b=[{node:s,containerName:""}],N=0,p=!1,g=[],_=function(S,A){S.type==="array"?S.items.forEach(function(w){w&&b.push({node:w,containerName:A})}):S.type==="object"&&S.properties.forEach(function(w){var y=w.valueNode;if(y)if(a>0){a--;var T=ft.create(t.uri,Fe(t,w)),M=A?A+"."+w.keyNode.value:w.keyNode.value;g.push({name:i.getKeyLabel(w),kind:i.getSymbolKind(y.type),location:T,containerName:A}),b.push({node:y,containerName:M})}else p=!0})};N<b.length;){var L=b[N++];_(L.node,L.containerName)}return p&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),g},e.prototype.findDocumentSymbols2=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||lt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,d=f.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var v=Fe(t,f),b=Fe(t,m.keyNode);if(u.push({name:Me(m.valueNode),kind:_e.Function,range:v,selectionRange:b}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var N=[],p=[{node:s,result:N}],g=0,_=!1,L=function(A,w){A.type==="array"?A.items.forEach(function(y,T){if(y)if(a>0){a--;var M=Fe(t,y),k=M,F=String(T),V={name:F,kind:i.getSymbolKind(y.type),range:M,selectionRange:k,children:[]};w.push(V),p.push({result:V.children,node:y})}else _=!0}):A.type==="object"&&A.properties.forEach(function(y){var T=y.valueNode;if(T)if(a>0){a--;var M=Fe(t,y),k=Fe(t,y.keyNode),F=[],V={name:i.getKeyLabel(y),kind:i.getSymbolKind(T.type),range:M,selectionRange:k,children:F,detail:i.getDetail(T)};w.push(V),p.push({result:F,node:T})}else _=!0})};g<p.length;){var S=p[g++];L(S.node,S.result)}return _&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),N},e.prototype.getSymbolKind=function(t){switch(t){case"object":return _e.Module;case"string":return _e.String;case"number":return _e.Number;case"array":return _e.Array;case"boolean":return _e.Boolean;default:return _e.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:'"'+r+'"'},e.prototype.getDetail=function(t){if(!!t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(i){var s=[];if(i)for(var a=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(i.schema),u={},l=0,c=o;l<c.length;l++){var f=c[l];if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){var h=String(f.node.offset);if(!u[h]){var d=Ea(Me(f.node));if(d){var m=Fe(t,f.node);s.push({color:d,range:m})}if(u[h]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),s}}}return s})},e.prototype.getColorPresentations=function(t,r,n,i){var s=[],a=Math.round(n.red*255),o=Math.round(n.green*255),u=Math.round(n.blue*255);function l(f){var h=f.toString(16);return h.length!==2?"0"+h:h}var c;return n.alpha===1?c="#"+l(a)+l(o)+l(u):c="#"+l(a)+l(o)+l(u)+l(Math.round(n.alpha*255)),s.push({label:c,textEdit:ve.replace(i,JSON.stringify(c))}),s},e}();function Fe(e,t){return q.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var U=pt(),xr={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:U("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:U("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Fa={id:U("schema.json.id","A unique identifier for the schema."),$schema:U("schema.json.$schema","The schema to verify this document against."),title:U("schema.json.title","A descriptive title of the element."),description:U("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:U("schema.json.default","A default value. Used by suggestions."),multipleOf:U("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:U("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:U("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:U("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:U("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:U("schema.json.maxLength","The maximum length of a string."),minLength:U("schema.json.minLength","The minimum length of a string."),pattern:U("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:U("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:U("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:U("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:U("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:U("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:U("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:U("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:U("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:U("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:U("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:U("schema.json.properties","A map of property names to schemas for each property."),patternProperties:U("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:U("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:U("schema.json.enum","The set of literal values that are valid."),type:U("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:U("schema.json.format","Describes the format expected for the value."),allOf:U("schema.json.allOf","An array of schemas, all of which must match."),anyOf:U("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:U("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:U("schema.json.not","A schema which must not match."),$id:U("schema.json.$id","A unique identifier for the schema."),$ref:U("schema.json.$ref","Reference a definition hosted on any location."),$comment:U("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:U("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:U("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:U("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:U("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:U("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:U("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:U("schema.json.contentEncoding","Describes the content encoding of a string property."),if:U("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:U("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:U("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var Da in xr.schemas){var kr=xr.schemas[Da];for(var vt in kr.properties){var Tr=kr.properties[vt];typeof Tr=="boolean"&&(Tr=kr.properties[vt]={});var Fi=Fa[vt];Fi?Tr.description=Fi:console.log(vt+": localize('schema.json."+vt+`', "")`)}}function ja(e,t){var r=[],n=[],i=[],s=-1,a=Ze(e.getText(),!1),o=a.scan();function u(T){r.push(T),n.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{var l=e.positionAt(a.getTokenOffset()).line,c={startLine:l,endLine:l,kind:o===1?"object":"array"};i.push(c);break}case 2:case 4:{var f=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===f){var c=i.pop(),h=e.positionAt(a.getTokenOffset()).line;c&&h>c.startLine+1&&s!==c.startLine&&(c.endLine=h-1,u(c),s=c.startLine)}break}case 13:{var l=e.positionAt(a.getTokenOffset()).line,d=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&l+1<e.lineCount?a.setPosition(e.offsetAt(pe.create(l+1,0))):l<d&&(u({startLine:l,endLine:d,kind:ct.Comment}),s=l);break}case 12:{var m=e.getText().substr(a.getTokenOffset(),a.getTokenLength()),v=m.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(v){var h=e.positionAt(a.getTokenOffset()).line;if(v[1]){var c={startLine:h,endLine:h,kind:ct.Region};i.push(c)}else{for(var b=i.length-1;b>=0&&i[b].kind!==ct.Region;)b--;if(b>=0){var c=i[b];i.length=b,h>c.startLine&&s!==c.startLine&&(c.endLine=h,u(c),s=c.startLine)}}}break}}o=a.scan()}var N=t&&t.rangeLimit;if(typeof N!="number"||r.length<=N)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var p=[],g=0,_=n;g<_.length;g++){var L=_[g];L<30&&(p[L]=(p[L]||0)+1)}for(var S=0,A=0,b=0;b<p.length;b++){var w=p[b];if(w){if(w+S>N){A=b;break}S+=w}}for(var y=[],b=0;b<r.length;b++){var L=n[b];typeof L=="number"&&(L<A||L===A&&S++<N)&&y.push(r[b])}return y}function Ua(e,t,r){function n(o){for(var u=e.offsetAt(o),l=r.getNodeFromOffset(u,!0),c=[];l;){switch(l.type){case"string":case"object":case"array":var f=l.offset+1,h=l.offset+l.length-1;f<h&&u>=f&&u<=h&&c.push(i(f,h)),c.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":c.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var d=a(l.offset+l.length,5);d!==-1&&c.push(i(l.offset,d))}l=l.parent}for(var m=void 0,v=c.length-1;v>=0;v--)m=Ft.create(c[v],m);return m||(m=Ft.create(q.create(o,o))),m}function i(o,u){return q.create(e.positionAt(o),e.positionAt(u))}var s=Ze(e.getText(),!0);function a(o,u){s.setPosition(o);var l=s.scan();return l===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}function Ra(e,t){var r=[];return t.visit(function(n){var i;if(n.type==="property"&&n.keyNode.value==="$ref"&&((i=n.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=n.valueNode.value,a=Va(t,s);if(a){var o=e.positionAt(a.offset);r.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:Oa(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function Oa(e,t){return q.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Va(e,t){var r=$a(t);return r?Pr(r,e.root):null}function Pr(e,t){if(!t)return null;if(e.length===0)return t;var r=e.shift();if(t&&t.type==="object"){var n=t.properties.find(function(a){return a.keyNode.value===r});return n?Pr(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),s=t.items[i];return s?Pr(e,s):null}return null}function $a(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Wa)}function Wa(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function qa(e){var t=e.promiseConstructor||Promise,r=new wa(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(xr);var n=new ma(r,e.contributions,t,e.clientCapabilities),i=new pa(r,e.contributions,t),s=new Ia(r),a=new xa(r,t);return{configure:function(o){r.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(u){r.registerExternalSchema(u.uri,u.fileMatch,u.schema)}),a.configure(o)},resetSchema:function(o){return r.onResourceChange(o)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(o){return ga(o,{collectComments:!0})},newJSONDocument:function(o,u){return da(o,u)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:ja,getSelectionRanges:Ua,findDefinition:function(){return Promise.resolve([])},findLinks:Ra,format:function(o,u,l){var c=void 0;if(u){var f=o.offsetAt(u.start),h=o.offsetAt(u.end)-f;c={offset:f,length:h}}var d={tabSize:l?l.tabSize:4,insertSpaces:(l==null?void 0:l.insertSpaces)===!0,insertFinalNewline:(l==null?void 0:l.insertFinalNewline)===!0,eol:` +`};return ea(o.getText(),c,d).map(function(m){return ve.replace(q.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var be=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})},ye=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Di;typeof fetch!="undefined"&&(Di=function(e){return fetch(e).then(function(t){return t.text()})});var Ha=function(){function e(t,r){this._ctx=t,this._languageSettings=r.languageSettings,this._languageId=r.languageId,this._languageService=qa({workspaceContext:{resolveRelativePath:function(n,i){var s=i.substr(0,i.lastIndexOf("/")+1);return za(s,n)}},schemaRequestService:r.enableSchemaRequest&&Di}),this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(t){return be(this,void 0,void 0,function(){var r,n;return ye(this,function(i){return r=this._getTextDocument(t),r?(n=this._languageService.parseJSONDocument(r),[2,this._languageService.doValidation(r,n,this._languageSettings)]):[2,Promise.resolve([])]})})},e.prototype.doComplete=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doComplete(n,r,i)]})})},e.prototype.doResolve=function(t){return be(this,void 0,void 0,function(){return ye(this,function(r){return[2,this._languageService.doResolve(t)]})})},e.prototype.doHover=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doHover(n,r,i)]})})},e.prototype.format=function(t,r,n){return be(this,void 0,void 0,function(){var i,s;return ye(this,function(a){return i=this._getTextDocument(t),s=this._languageService.format(i,r,n),[2,Promise.resolve(s)]})})},e.prototype.resetSchema=function(t){return be(this,void 0,void 0,function(){return ye(this,function(r){return[2,Promise.resolve(this._languageService.resetSchema(t))]})})},e.prototype.findDocumentSymbols=function(t){return be(this,void 0,void 0,function(){var r,n,i;return ye(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentSymbols(r,n),[2,Promise.resolve(i)]})})},e.prototype.findDocumentColors=function(t){return be(this,void 0,void 0,function(){var r,n,i;return ye(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentColors(r,n),[2,Promise.resolve(i)]})})},e.prototype.getColorPresentations=function(t,r,n){return be(this,void 0,void 0,function(){var i,s,a;return ye(this,function(o){return i=this._getTextDocument(t),s=this._languageService.parseJSONDocument(i),a=this._languageService.getColorPresentations(i,s,r,n),[2,Promise.resolve(a)]})})},e.prototype.getFoldingRanges=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.getFoldingRanges(n,r),[2,Promise.resolve(i)]})})},e.prototype.getSelectionRanges=function(t,r){return be(this,void 0,void 0,function(){var n,i,s;return ye(this,function(a){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),s=this._languageService.getSelectionRanges(n,r,i),[2,Promise.resolve(s)]})})},e.prototype._getTextDocument=function(t){for(var r=this._ctx.getMirrorModels(),n=0,i=r;n<i.length;n++){var s=i[n];if(s.uri.toString()===t)return yr.create(t,this._languageId,s.version,s.getValue())}return null},e}(),Ba="/".charCodeAt(0),Mr=".".charCodeAt(0);function Ya(e){return e.charCodeAt(0)===Ba}function za(e,t){if(Ya(t)){var r=et.parse(e),n=t.split("/");return r.with({path:ji(n)}).toString()}return Ga(e,t)}function ji(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];i.length===0||i.length===1&&i.charCodeAt(0)===Mr||(i.length===2&&i.charCodeAt(0)===Mr&&i.charCodeAt(1)===Mr?t.pop():t.push(i))}e.length>1&&e[e.length-1].length===0&&t.push("");var s=t.join("/");return e[0].length===0&&(s="/"+s),s}function Ga(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=et.parse(e),i=n.path.split("/"),s=0,a=t;s<a.length;s++){var o=a[s];i.push.apply(i,o.split("/"))}return n.with({path:ji(i)}).toString()}self.onmessage=function(){Vn(function(e,t){return new Ha(e,t)})}})(); diff --git a/magic-editor/src/main/resources/magic-editor/assets/json.worker.b78cae82.js b/magic-editor/src/main/resources/magic-editor/assets/json.worker.b78cae82.js deleted file mode 100644 index 250c8e17..00000000 --- a/magic-editor/src/main/resources/magic-editor/assets/json.worker.b78cae82.js +++ /dev/null @@ -1,29 +0,0 @@ -(function(){"use strict";class Wi{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(t){setTimeout(()=>{throw t.stack?new Error(t.message+` - -`+t.stack):t},0)}}emit(t){this.listeners.forEach(r=>{r(t)})}onUnexpectedError(t){this.unexpectedErrorHandler(t),this.emit(t)}onUnexpectedExternalError(t){this.unexpectedErrorHandler(t)}}const qi=new Wi;function Hi(e){Bi(e)||qi.onUnexpectedError(e)}function jr(e){if(e instanceof Error){let{name:t,message:r}=e;const n=e.stacktrace||e.stack;return{$isError:!0,name:t,message:r,stack:n}}return e}const Ur="Canceled";function Bi(e){return e instanceof Error&&e.name===Ur&&e.message===Ur}function Yi(e){const t=this;let r=!1,n;return function(){return r||(r=!0,n=e.apply(t,arguments)),n}}var Rt;(function(e){function t(p){return p&&typeof p=="object"&&typeof p[Symbol.iterator]=="function"}e.is=t;const r=Object.freeze([]);function n(){return r}e.empty=n;function*i(p){yield p}e.single=i;function s(p){return p||r}e.from=s;function a(p){return!p||p[Symbol.iterator]().next().done===!0}e.isEmpty=a;function o(p){return p[Symbol.iterator]().next().value}e.first=o;function u(p,g){for(const _ of p)if(g(_))return!0;return!1}e.some=u;function l(p,g){for(const _ of p)if(g(_))return _}e.find=l;function*c(p,g){for(const _ of p)g(_)&&(yield _)}e.filter=c;function*f(p,g){let _=0;for(const L of p)yield g(L,_++)}e.map=f;function*h(...p){for(const g of p)for(const _ of g)yield _}e.concat=h;function*d(p){for(const g of p)for(const _ of g)yield _}e.concatNested=d;function m(p,g,_){let L=_;for(const S of p)L=g(L,S);return L}e.reduce=m;function*v(p,g,_=p.length){for(g<0&&(g+=p.length),_<0?_+=p.length:_>p.length&&(_=p.length);g<_;g++)yield p[g]}e.slice=v;function b(p,g=Number.POSITIVE_INFINITY){const _=[];if(g===0)return[_,p];const L=p[Symbol.iterator]();for(let S=0;S<g;S++){const A=L.next();if(A.done)return[_,e.empty()];_.push(A.value)}return[_,{[Symbol.iterator](){return L}}]}e.consume=b;function N(p,g,_=(L,S)=>L===S){const L=p[Symbol.iterator](),S=g[Symbol.iterator]();for(;;){const A=L.next(),w=S.next();if(A.done!==w.done)return!1;if(A.done)return!0;if(!_(A.value,w.value))return!1}}e.equals=N})(Rt||(Rt={}));function zi(e){return e}function Gi(e,t){}class Ji extends Error{constructor(t){super(`Encountered errors while disposing of store. Errors: [${t.join(", ")}]`);this.errors=t}}function Rr(e){if(Rt.is(e)){let t=[];for(const r of e)if(r)try{r.dispose()}catch(n){t.push(n)}if(t.length===1)throw t[0];if(t.length>1)throw new Ji(t);return Array.isArray(e)?[]:e}else if(e)return e.dispose(),e}function Qi(...e){return Or(()=>Rr(e))}function Or(e){return zi({dispose:Yi(()=>{e()})})}class tt{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{Rr(this._toDispose.values())}finally{this._toDispose.clear()}}add(t){if(!t)return t;if(t===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?tt.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(t),t}}tt.DISABLE_DISPOSED_WARNING=!1;class Vr{constructor(){this._store=new tt,Gi(this._store)}dispose(){this._store.dispose()}_register(t){if(t===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(t)}}Vr.None=Object.freeze({dispose(){}});var Ot;const bt="en";let Vt=!1,$t=!1,Wt=!1,yt,qt=bt,Xi,je;const ee=typeof self=="object"?self:typeof global=="object"?global:{};let Z;typeof ee.vscode!="undefined"&&typeof ee.vscode.process!="undefined"?Z=ee.vscode.process:typeof process!="undefined"&&(Z=process);const Zi=typeof((Ot=Z==null?void 0:Z.versions)===null||Ot===void 0?void 0:Ot.electron)=="string"&&Z.type==="renderer";if(typeof navigator=="object"&&!Zi)je=navigator.userAgent,Vt=je.indexOf("Windows")>=0,$t=je.indexOf("Macintosh")>=0,(je.indexOf("Macintosh")>=0||je.indexOf("iPad")>=0||je.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Wt=je.indexOf("Linux")>=0,yt=navigator.language,qt=yt;else if(typeof Z=="object"){Vt=Z.platform==="win32",$t=Z.platform==="darwin",Wt=Z.platform==="linux",Wt&&!!Z.env.SNAP&&Z.env.SNAP_REVISION,yt=bt,qt=bt;const e=Z.env.VSCODE_NLS_CONFIG;if(e)try{const t=JSON.parse(e),r=t.availableLanguages["*"];yt=t.locale,qt=r||bt,Xi=t._translationsConfigFile}catch{}}else console.error("Unable to resolve platform.");const rt=Vt,Ki=$t,$r=function(){if(ee.setImmediate)return ee.setImmediate.bind(ee);if(typeof ee.postMessage=="function"&&!ee.importScripts){let r=[];ee.addEventListener("message",i=>{if(i.data&&i.data.vscodeSetImmediateId)for(let s=0,a=r.length;s<a;s++){const o=r[s];if(o.id===i.data.vscodeSetImmediateId){r.splice(s,1),o.callback();return}}});let n=0;return i=>{const s=++n;r.push({id:s,callback:i}),ee.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(Z==null?void 0:Z.nextTick)=="function")return Z.nextTick.bind(Z);const t=Promise.resolve();return r=>t.then(r)}();function es(e){let t=[],r=Object.getPrototypeOf(e);for(;Object.prototype!==r;)t=t.concat(Object.getOwnPropertyNames(r)),r=Object.getPrototypeOf(r);return t}function Ht(e){const t=[];for(const r of es(e))typeof e[r]=="function"&&t.push(r);return t}function Wr(e,t){const r=i=>function(){const s=Array.prototype.slice.call(arguments,0);return t(i,s)};let n={};for(const i of e)n[i]=r(i);return n}const ts="$initialize";class rs{constructor(t){this._workerId=-1,this._handler=t,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(t){this._workerId=t}sendMessage(t,r){let n=String(++this._lastSentReq);return new Promise((i,s)=>{this._pendingReplies[n]={resolve:i,reject:s},this._send({vsWorker:this._workerId,req:n,method:t,args:r})})}handleMessage(t){!t||!t.vsWorker||this._workerId!==-1&&t.vsWorker!==this._workerId||this._handleMessage(t)}_handleMessage(t){if(t.seq){let s=t;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let a=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let o=s.err;s.err.$isError&&(o=new Error,o.name=s.err.name,o.message=s.err.message,o.stack=s.err.stack),a.reject(o);return}a.resolve(s.res);return}let r=t,n=r.req;this._handler.handleMessage(r.method,r.args).then(s=>{this._send({vsWorker:this._workerId,seq:n,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=jr(s.detail)),this._send({vsWorker:this._workerId,seq:n,res:void 0,err:jr(s)})})}_send(t){let r=[];if(t.req){const n=t;for(let i=0;i<n.args.length;i++)n.args[i]instanceof ArrayBuffer&&r.push(n.args[i])}else{const n=t;n.res instanceof ArrayBuffer&&r.push(n.res)}this._handler.sendMessage(t,r)}}class ns{constructor(t,r){this._requestHandlerFactory=r,this._requestHandler=null,this._protocol=new rs({sendMessage:(n,i)=>{t(n,i)},handleMessage:(n,i)=>this._handleMessage(n,i)})}onmessage(t){this._protocol.handleMessage(t)}_handleMessage(t,r){if(t===ts)return this.initialize(r[0],r[1],r[2],r[3]);if(!this._requestHandler||typeof this._requestHandler[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._requestHandler[t].apply(this._requestHandler,r))}catch(n){return Promise.reject(n)}}initialize(t,r,n,i){this._protocol.setWorkerId(t);const a=Wr(i,(o,u)=>this._protocol.sendMessage(o,u));return this._requestHandlerFactory?(this._requestHandler=this._requestHandlerFactory(a),Promise.resolve(Ht(this._requestHandler))):(r&&(typeof r.baseUrl!="undefined"&&delete r.baseUrl,typeof r.paths!="undefined"&&typeof r.paths.vs!="undefined"&&delete r.paths.vs,typeof r.trustedTypesPolicy!==void 0&&delete r.trustedTypesPolicy,r.catchError=!0,self.require.config(r)),new Promise((o,u)=>{self.require([n],l=>{if(this._requestHandler=l.create(a),!this._requestHandler){u(new Error("No RequestHandler!"));return}o(Ht(this._requestHandler))},u)}))}}class Le{constructor(t,r,n,i){this.originalStart=t,this.originalLength=r,this.modifiedStart=n,this.modifiedLength=i}getOriginalEnd(){return this.originalStart+this.originalLength}getModifiedEnd(){return this.modifiedStart+this.modifiedLength}}function is(e){return e.split(/\r\n|\r|\n/)}function ss(e){for(let t=0,r=e.length;t<r;t++){const n=e.charCodeAt(t);if(n!==32&&n!==9)return t}return-1}function as(e,t=e.length-1){for(let r=t;r>=0;r--){const n=e.charCodeAt(r);if(n!==32&&n!==9)return r}return-1}function qr(e,t){return(t<<5)-t+e|0}function os(e,t){t=qr(149417,t);for(let r=0,n=e.length;r<n;r++)t=qr(e.charCodeAt(r),t);return t}class Hr{constructor(t){this.source=t}getElements(){const t=this.source,r=new Int32Array(t.length);for(let n=0,i=t.length;n<i;n++)r[n]=t.charCodeAt(n);return r}}function us(e,t,r){return new Ce(new Hr(e),new Hr(t)).ComputeDiff(r).changes}class He{static Assert(t,r){if(!t)throw new Error(r)}}class Be{static Copy(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}static Copy2(t,r,n,i,s){for(let a=0;a<s;a++)n[i+a]=t[r+a]}}class Br{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Le(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(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),this.m_originalCount++}AddModifiedElement(t,r){this.m_originalStart=Math.min(this.m_originalStart,t),this.m_modifiedStart=Math.min(this.m_modifiedStart,r),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 Ce{constructor(t,r,n=null){this.ContinueProcessingPredicate=n,this._originalSequence=t,this._modifiedSequence=r;const[i,s,a]=Ce._getElements(t),[o,u,l]=Ce._getElements(r);this._hasStrings=a&&l,this._originalStringElements=i,this._originalElementsOrHash=s,this._modifiedStringElements=o,this._modifiedElementsOrHash=u,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(t){return t.length>0&&typeof t[0]=="string"}static _getElements(t){const r=t.getElements();if(Ce._isStringArray(r)){const n=new Int32Array(r.length);for(let i=0,s=r.length;i<s;i++)n[i]=os(r[i],0);return[r,n,!0]}return r instanceof Int32Array?[[],r,!1]:[[],new Int32Array(r),!1]}ElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._modifiedStringElements[r]:!0}ElementsAreStrictEqual(t,r){if(!this.ElementsAreEqual(t,r))return!1;const n=Ce._getStrictElement(this._originalSequence,t),i=Ce._getStrictElement(this._modifiedSequence,r);return n===i}static _getStrictElement(t,r){return typeof t.getStrictElement=="function"?t.getStrictElement(r):null}OriginalElementsAreEqual(t,r){return this._originalElementsOrHash[t]!==this._originalElementsOrHash[r]?!1:this._hasStrings?this._originalStringElements[t]===this._originalStringElements[r]:!0}ModifiedElementsAreEqual(t,r){return this._modifiedElementsOrHash[t]!==this._modifiedElementsOrHash[r]?!1:this._hasStrings?this._modifiedStringElements[t]===this._modifiedStringElements[r]:!0}ComputeDiff(t){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,t)}_ComputeDiff(t,r,n,i,s){const a=[!1];let o=this.ComputeDiffRecursive(t,r,n,i,a);return s&&(o=this.PrettifyChanges(o)),{quitEarly:a[0],changes:o}}ComputeDiffRecursive(t,r,n,i,s){for(s[0]=!1;t<=r&&n<=i&&this.ElementsAreEqual(t,n);)t++,n++;for(;r>=t&&i>=n&&this.ElementsAreEqual(r,i);)r--,i--;if(t>r||n>i){let f;return n<=i?(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),f=[new Le(t,0,n,i-n+1)]):t<=r?(He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[new Le(t,r-t+1,n,0)]):(He.Assert(t===r+1,"originalStart should only be one more than originalEnd"),He.Assert(n===i+1,"modifiedStart should only be one more than modifiedEnd"),f=[]),f}const a=[0],o=[0],u=this.ComputeRecursionPoint(t,r,n,i,a,o,s),l=a[0],c=o[0];if(u!==null)return u;if(!s[0]){const f=this.ComputeDiffRecursive(t,l,n,c,s);let h=[];return s[0]?h=[new Le(l+1,r-(l+1)+1,c+1,i-(c+1)+1)]:h=this.ComputeDiffRecursive(l+1,r,c+1,i,s),this.ConcatenateChanges(f,h)}return[new Le(t,r-t+1,n,i-n+1)]}WALKTRACE(t,r,n,i,s,a,o,u,l,c,f,h,d,m,v,b,N,p){let g=null,_=null,L=new Br,S=r,A=n,w=d[0]-b[0]-i,y=-1073741824,T=this.m_forwardHistory.length-1;do{const M=w+t;M===S||M<A&&l[M-1]<l[M+1]?(f=l[M+1],m=f-w-i,f<y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m),w=M+1-t):(f=l[M-1]+1,m=f-w-i,f<y&&L.MarkNextChange(),y=f-1,L.AddOriginalElement(f,m+1),w=M-1-t),T>=0&&(l=this.m_forwardHistory[T],t=l[0],S=1,A=l.length-1)}while(--T>=-1);if(g=L.getReverseChanges(),p[0]){let M=d[0]+1,k=b[0]+1;if(g!==null&&g.length>0){const F=g[g.length-1];M=Math.max(M,F.getOriginalEnd()),k=Math.max(k,F.getModifiedEnd())}_=[new Le(M,h-M+1,k,v-k+1)]}else{L=new Br,S=a,A=o,w=d[0]-b[0]-u,y=1073741824,T=N?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const M=w+s;M===S||M<A&&c[M-1]>=c[M+1]?(f=c[M+1]-1,m=f-w-u,f>y&&L.MarkNextChange(),y=f+1,L.AddOriginalElement(f+1,m+1),w=M+1-s):(f=c[M-1],m=f-w-u,f>y&&L.MarkNextChange(),y=f,L.AddModifiedElement(f+1,m+1),w=M-1-s),T>=0&&(c=this.m_reverseHistory[T],s=c[0],S=1,A=c.length-1)}while(--T>=-1);_=L.getChanges()}return this.ConcatenateChanges(g,_)}ComputeRecursionPoint(t,r,n,i,s,a,o){let u=0,l=0,c=0,f=0,h=0,d=0;t--,n--,s[0]=0,a[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const m=r-t+(i-n),v=m+1,b=new Int32Array(v),N=new Int32Array(v),p=i-n,g=r-t,_=t-n,L=r-i,A=(g-p)%2==0;b[p]=t,N[g]=r,o[0]=!1;for(let w=1;w<=m/2+1;w++){let y=0,T=0;c=this.ClipDiagonalBound(p-w,w,p,v),f=this.ClipDiagonalBound(p+w,w,p,v);for(let k=c;k<=f;k+=2){k===c||k<f&&b[k-1]<b[k+1]?u=b[k+1]:u=b[k-1]+1,l=u-(k-p)-_;const F=u;for(;u<r&&l<i&&this.ElementsAreEqual(u+1,l+1);)u++,l++;if(b[k]=u,u+l>y+T&&(y=u,T=l),!A&&Math.abs(k-g)<=w-1&&u>=N[k])return s[0]=u,a[0]=l,F<=N[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}const M=(y-t+(T-n)-w)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(y,M))return o[0]=!0,s[0]=y,a[0]=T,M>0&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):(t++,n++,[new Le(t,r-t+1,n,i-n+1)]);h=this.ClipDiagonalBound(g-w,w,g,v),d=this.ClipDiagonalBound(g+w,w,g,v);for(let k=h;k<=d;k+=2){k===h||k<d&&N[k-1]>=N[k+1]?u=N[k+1]-1:u=N[k-1],l=u-(k-g)-L;const F=u;for(;u>t&&l>n&&this.ElementsAreEqual(u,l);)u--,l--;if(N[k]=u,A&&Math.abs(k-p)<=w&&u<=b[k])return s[0]=u,a[0]=l,F>=b[k]&&1447>0&&w<=1447+1?this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o):null}if(w<=1447){let k=new Int32Array(f-c+2);k[0]=p-c+1,Be.Copy2(b,c,k,1,f-c+1),this.m_forwardHistory.push(k),k=new Int32Array(d-h+2),k[0]=g-h+1,Be.Copy2(N,h,k,1,d-h+1),this.m_reverseHistory.push(k)}}return this.WALKTRACE(p,c,f,_,g,h,d,L,b,N,u,r,s,l,i,a,A,o)}PrettifyChanges(t){for(let r=0;r<t.length;r++){const n=t[r],i=r<t.length-1?t[r+1].originalStart:this._originalElementsOrHash.length,s=r<t.length-1?t[r+1].modifiedStart:this._modifiedElementsOrHash.length,a=n.originalLength>0,o=n.modifiedLength>0;for(;n.originalStart+n.originalLength<i&&n.modifiedStart+n.modifiedLength<s&&(!a||this.OriginalElementsAreEqual(n.originalStart,n.originalStart+n.originalLength))&&(!o||this.ModifiedElementsAreEqual(n.modifiedStart,n.modifiedStart+n.modifiedLength));){const l=this.ElementsAreStrictEqual(n.originalStart,n.modifiedStart);if(this.ElementsAreStrictEqual(n.originalStart+n.originalLength,n.modifiedStart+n.modifiedLength)&&!l)break;n.originalStart++,n.modifiedStart++}let u=[null];if(r<t.length-1&&this.ChangesOverlap(t[r],t[r+1],u)){t[r]=u[0],t.splice(r+1,1),r--;continue}}for(let r=t.length-1;r>=0;r--){const n=t[r];let i=0,s=0;if(r>0){const f=t[r-1];i=f.originalStart+f.originalLength,s=f.modifiedStart+f.modifiedLength}const a=n.originalLength>0,o=n.modifiedLength>0;let u=0,l=this._boundaryScore(n.originalStart,n.originalLength,n.modifiedStart,n.modifiedLength);for(let f=1;;f++){const h=n.originalStart-f,d=n.modifiedStart-f;if(h<i||d<s||a&&!this.OriginalElementsAreEqual(h,h+n.originalLength)||o&&!this.ModifiedElementsAreEqual(d,d+n.modifiedLength))break;const v=(h===i&&d===s?5:0)+this._boundaryScore(h,n.originalLength,d,n.modifiedLength);v>l&&(l=v,u=f)}n.originalStart-=u,n.modifiedStart-=u;const c=[null];if(r>0&&this.ChangesOverlap(t[r-1],t[r],c)){t[r-1]=c[0],t.splice(r,1),r++;continue}}if(this._hasStrings)for(let r=1,n=t.length;r<n;r++){const i=t[r-1],s=t[r],a=s.originalStart-i.originalStart-i.originalLength,o=i.originalStart,u=s.originalStart+s.originalLength,l=u-o,c=i.modifiedStart,f=s.modifiedStart+s.modifiedLength,h=f-c;if(a<5&&l<20&&h<20){const d=this._findBetterContiguousSequence(o,l,c,h,a);if(d){const[m,v]=d;(m!==i.originalStart+i.originalLength||v!==i.modifiedStart+i.modifiedLength)&&(i.originalLength=m-i.originalStart,i.modifiedLength=v-i.modifiedStart,s.originalStart=m+a,s.modifiedStart=v+a,s.originalLength=u-s.originalStart,s.modifiedLength=f-s.modifiedStart)}}}return t}_findBetterContiguousSequence(t,r,n,i,s){if(r<s||i<s)return null;const a=t+r-s+1,o=n+i-s+1;let u=0,l=0,c=0;for(let f=t;f<a;f++)for(let h=n;h<o;h++){const d=this._contiguousSequenceScore(f,h,s);d>0&&d>u&&(u=d,l=f,c=h)}return u>0?[l,c]:null}_contiguousSequenceScore(t,r,n){let i=0;for(let s=0;s<n;s++){if(!this.ElementsAreEqual(t+s,r+s))return 0;i+=this._originalStringElements[t+s].length}return i}_OriginalIsBoundary(t){return t<=0||t>=this._originalElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._originalStringElements[t])}_OriginalRegionIsBoundary(t,r){if(this._OriginalIsBoundary(t)||this._OriginalIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._OriginalIsBoundary(n-1)||this._OriginalIsBoundary(n))return!0}return!1}_ModifiedIsBoundary(t){return t<=0||t>=this._modifiedElementsOrHash.length-1?!0:this._hasStrings&&/^\s*$/.test(this._modifiedStringElements[t])}_ModifiedRegionIsBoundary(t,r){if(this._ModifiedIsBoundary(t)||this._ModifiedIsBoundary(t-1))return!0;if(r>0){const n=t+r;if(this._ModifiedIsBoundary(n-1)||this._ModifiedIsBoundary(n))return!0}return!1}_boundaryScore(t,r,n,i){const s=this._OriginalRegionIsBoundary(t,r)?1:0,a=this._ModifiedRegionIsBoundary(n,i)?1:0;return s+a}ConcatenateChanges(t,r){let n=[];if(t.length===0||r.length===0)return r.length>0?r:t;if(this.ChangesOverlap(t[t.length-1],r[0],n)){const i=new Array(t.length+r.length-1);return Be.Copy(t,0,i,0,t.length-1),i[t.length-1]=n[0],Be.Copy(r,1,i,t.length,r.length-1),i}else{const i=new Array(t.length+r.length);return Be.Copy(t,0,i,0,t.length),Be.Copy(r,0,i,t.length,r.length),i}}ChangesOverlap(t,r,n){if(He.Assert(t.originalStart<=r.originalStart,"Left change is not less than or equal to right change"),He.Assert(t.modifiedStart<=r.modifiedStart,"Left change is not less than or equal to right change"),t.originalStart+t.originalLength>=r.originalStart||t.modifiedStart+t.modifiedLength>=r.modifiedStart){const i=t.originalStart;let s=t.originalLength;const a=t.modifiedStart;let o=t.modifiedLength;return t.originalStart+t.originalLength>=r.originalStart&&(s=r.originalStart+r.originalLength-t.originalStart),t.modifiedStart+t.modifiedLength>=r.modifiedStart&&(o=r.modifiedStart+r.modifiedLength-t.modifiedStart),n[0]=new Le(i,s,a,o),!0}else return n[0]=null,!1}ClipDiagonalBound(t,r,n,i){if(t>=0&&t<i)return t;const s=n,a=i-n-1,o=r%2==0;if(t<0){const u=s%2==0;return o===u?0:1}else{const u=a%2==0;return o===u?i-1:i-2}}}let Ye;if(typeof ee.vscode!="undefined"&&typeof ee.vscode.process!="undefined"){const e=ee.vscode.process;Ye={get platform(){return e.platform},get arch(){return e.arch},get env(){return e.env},cwd(){return e.cwd()},nextTick(t){return $r(t)}}}else typeof process!="undefined"?Ye={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(e){return process.nextTick(e)}}:Ye={get platform(){return rt?"win32":Ki?"darwin":"linux"},get arch(){},nextTick(e){return $r(e)},get env(){return{}},cwd(){return"/"}};const Bt=Ye.cwd,ls=Ye.env,Ue=Ye.platform,fs=65,cs=97,hs=90,ds=122,xe=46,K=47,se=92,ke=58,gs=63;class Yr extends Error{constructor(t,r,n){let i;typeof r=="string"&&r.indexOf("not ")===0?(i="must not be",r=r.replace(/^not /,"")):i="must be";const s=t.indexOf(".")!==-1?"property":"argument";let a=`The "${t}" ${s} ${i} of type ${r}`;a+=`. Received type ${typeof n}`;super(a);this.code="ERR_INVALID_ARG_TYPE"}}function J(e,t){if(typeof e!="string")throw new Yr(t,"string",e)}function R(e){return e===K||e===se}function Yt(e){return e===K}function Te(e){return e>=fs&&e<=hs||e>=cs&&e<=ds}function St(e,t,r,n){let i="",s=0,a=-1,o=0,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)u=e.charCodeAt(l);else{if(n(u))break;u=K}if(n(u)){if(!(a===l-1||o===1))if(o===2){if(i.length<2||s!==2||i.charCodeAt(i.length-1)!==xe||i.charCodeAt(i.length-2)!==xe){if(i.length>2){const c=i.lastIndexOf(r);c===-1?(i="",s=0):(i=i.slice(0,c),s=i.length-1-i.lastIndexOf(r)),a=l,o=0;continue}else if(i.length!==0){i="",s=0,a=l,o=0;continue}}t&&(i+=i.length>0?`${r}..`:"..",s=2)}else i.length>0?i+=`${r}${e.slice(a+1,l)}`:i=e.slice(a+1,l),s=l-a-1;a=l,o=0}else u===xe&&o!==-1?++o:o=-1}return i}function zr(e,t){if(t===null||typeof t!="object")throw new Yr("pathObject","Object",t);const r=t.dir||t.root,n=t.base||`${t.name||""}${t.ext||""}`;return r?r===t.root?`${r}${n}`:`${r}${e}${n}`:n}const ie={resolve(...e){let t="",r="",n=!1;for(let i=e.length-1;i>=-1;i--){let s;if(i>=0){if(s=e[i],J(s,"path"),s.length===0)continue}else t.length===0?s=Bt():(s=ls[`=${t}`]||Bt(),(s===void 0||s.slice(0,2).toLowerCase()!==t.toLowerCase()&&s.charCodeAt(2)===se)&&(s=`${t}\\`));const a=s.length;let o=0,u="",l=!1;const c=s.charCodeAt(0);if(a===1)R(c)&&(o=1,l=!0);else if(R(c))if(l=!0,R(s.charCodeAt(1))){let f=2,h=f;for(;f<a&&!R(s.charCodeAt(f));)f++;if(f<a&&f!==h){const d=s.slice(h,f);for(h=f;f<a&&R(s.charCodeAt(f));)f++;if(f<a&&f!==h){for(h=f;f<a&&!R(s.charCodeAt(f));)f++;(f===a||f!==h)&&(u=`\\\\${d}\\${s.slice(h,f)}`,o=f)}}}else o=1;else Te(c)&&s.charCodeAt(1)===ke&&(u=s.slice(0,2),o=2,a>2&&R(s.charCodeAt(2))&&(l=!0,o=3));if(u.length>0)if(t.length>0){if(u.toLowerCase()!==t.toLowerCase())continue}else t=u;if(n){if(t.length>0)break}else if(r=`${s.slice(o)}\\${r}`,n=l,l&&t.length>0)break}return r=St(r,!n,"\\",R),n?`${t}\\${r}`:`${t}${r}`||"."},normalize(e){J(e,"path");const t=e.length;if(t===0)return".";let r=0,n,i=!1;const s=e.charCodeAt(0);if(t===1)return Yt(s)?"\\":e;if(R(s))if(i=!0,R(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!R(e.charCodeAt(o));)o++;if(o<t&&o!==u){const l=e.slice(u,o);for(u=o;o<t&&R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!R(e.charCodeAt(o));)o++;if(o===t)return`\\\\${l}\\${e.slice(u)}\\`;o!==u&&(n=`\\\\${l}\\${e.slice(u,o)}`,r=o)}}}else r=1;else Te(s)&&e.charCodeAt(1)===ke&&(n=e.slice(0,2),r=2,t>2&&R(e.charCodeAt(2))&&(i=!0,r=3));let a=r<t?St(e.slice(r),!i,"\\",R):"";return a.length===0&&!i&&(a="."),a.length>0&&R(e.charCodeAt(t-1))&&(a+="\\"),n===void 0?i?`\\${a}`:a:i?`${n}\\${a}`:`${n}${a}`},isAbsolute(e){J(e,"path");const t=e.length;if(t===0)return!1;const r=e.charCodeAt(0);return R(r)||t>2&&Te(r)&&e.charCodeAt(1)===ke&&R(e.charCodeAt(2))},join(...e){if(e.length===0)return".";let t,r;for(let s=0;s<e.length;++s){const a=e[s];J(a,"path"),a.length>0&&(t===void 0?t=r=a:t+=`\\${a}`)}if(t===void 0)return".";let n=!0,i=0;if(typeof r=="string"&&R(r.charCodeAt(0))){++i;const s=r.length;s>1&&R(r.charCodeAt(1))&&(++i,s>2&&(R(r.charCodeAt(2))?++i:n=!1))}if(n){for(;i<t.length&&R(t.charCodeAt(i));)i++;i>=2&&(t=`\\${t.slice(i)}`)}return ie.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t)return"";const r=ie.resolve(e),n=ie.resolve(t);if(r===n||(e=r.toLowerCase(),t=n.toLowerCase(),e===t))return"";let i=0;for(;i<e.length&&e.charCodeAt(i)===se;)i++;let s=e.length;for(;s-1>i&&e.charCodeAt(s-1)===se;)s--;const a=s-i;let o=0;for(;o<t.length&&t.charCodeAt(o)===se;)o++;let u=t.length;for(;u-1>o&&t.charCodeAt(u-1)===se;)u--;const l=u-o,c=a<l?a:l;let f=-1,h=0;for(;h<c;h++){const m=e.charCodeAt(i+h);if(m!==t.charCodeAt(o+h))break;m===se&&(f=h)}if(h!==c){if(f===-1)return n}else{if(l>c){if(t.charCodeAt(o+h)===se)return n.slice(o+h+1);if(h===2)return n.slice(o+h)}a>c&&(e.charCodeAt(i+h)===se?f=h:h===2&&(f=3)),f===-1&&(f=0)}let d="";for(h=i+f+1;h<=s;++h)(h===s||e.charCodeAt(h)===se)&&(d+=d.length===0?"..":"\\..");return o+=f,d.length>0?`${d}${n.slice(o,u)}`:(n.charCodeAt(o)===se&&++o,n.slice(o,u))},toNamespacedPath(e){if(typeof e!="string")return e;if(e.length===0)return"";const t=ie.resolve(e);if(t.length<=2)return e;if(t.charCodeAt(0)===se){if(t.charCodeAt(1)===se){const r=t.charCodeAt(2);if(r!==gs&&r!==xe)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(Te(t.charCodeAt(0))&&t.charCodeAt(1)===ke&&t.charCodeAt(2)===se)return`\\\\?\\${t}`;return e},dirname(e){J(e,"path");const t=e.length;if(t===0)return".";let r=-1,n=0;const i=e.charCodeAt(0);if(t===1)return R(i)?e:".";if(R(i)){if(r=n=1,R(e.charCodeAt(1))){let o=2,u=o;for(;o<t&&!R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&R(e.charCodeAt(o));)o++;if(o<t&&o!==u){for(u=o;o<t&&!R(e.charCodeAt(o));)o++;if(o===t)return e;o!==u&&(r=n=o+1)}}}}else Te(i)&&e.charCodeAt(1)===ke&&(r=t>2&&R(e.charCodeAt(2))?3:2,n=r);let s=-1,a=!0;for(let o=t-1;o>=n;--o)if(R(e.charCodeAt(o))){if(!a){s=o;break}}else a=!1;if(s===-1){if(r===-1)return".";s=r}return e.slice(0,s)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(e.length>=2&&Te(e.charCodeAt(0))&&e.charCodeAt(1)===ke&&(r=2),t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=r;--s){const u=e.charCodeAt(s);if(R(u)){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a==-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=r;--s)if(R(e.charCodeAt(s))){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=0,r=-1,n=0,i=-1,s=!0,a=0;e.length>=2&&e.charCodeAt(1)===ke&&Te(e.charCodeAt(0))&&(t=n=2);for(let o=e.length-1;o>=t;--o){const u=e.charCodeAt(o);if(R(u)){if(!s){n=o+1;break}continue}i===-1&&(s=!1,i=o+1),u===xe?r===-1?r=o:a!==1&&(a=1):r!==-1&&(a=-1)}return r===-1||i===-1||a===0||a===1&&r===i-1&&r===n+1?"":e.slice(r,i)},format:zr.bind(null,"\\"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.length;let n=0,i=e.charCodeAt(0);if(r===1)return R(i)?(t.root=t.dir=e,t):(t.base=t.name=e,t);if(R(i)){if(n=1,R(e.charCodeAt(1))){let f=2,h=f;for(;f<r&&!R(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&R(e.charCodeAt(f));)f++;if(f<r&&f!==h){for(h=f;f<r&&!R(e.charCodeAt(f));)f++;f===r?n=f:f!==h&&(n=f+1)}}}}else if(Te(i)&&e.charCodeAt(1)===ke){if(r<=2)return t.root=t.dir=e,t;if(n=2,R(e.charCodeAt(2))){if(r===3)return t.root=t.dir=e,t;n=3}}n>0&&(t.root=e.slice(0,n));let s=-1,a=n,o=-1,u=!0,l=e.length-1,c=0;for(;l>=n;--l){if(i=e.charCodeAt(l),R(i)){if(!u){a=l+1;break}continue}o===-1&&(u=!1,o=l+1),i===xe?s===-1?s=l:c!==1&&(c=1):s!==-1&&(c=-1)}return o!==-1&&(s===-1||c===0||c===1&&s===o-1&&s===a+1?t.base=t.name=e.slice(a,o):(t.name=e.slice(a,s),t.base=e.slice(a,o),t.ext=e.slice(s,o))),a>0&&a!==n?t.dir=e.slice(0,a-1):t.dir=t.root,t},sep:"\\",delimiter:";",win32:null,posix:null},ae={resolve(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){const i=n>=0?e[n]:Bt();J(i,"path"),i.length!==0&&(t=`${i}/${t}`,r=i.charCodeAt(0)===K)}return t=St(t,!r,"/",Yt),r?`/${t}`:t.length>0?t:"."},normalize(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K,r=e.charCodeAt(e.length-1)===K;return e=St(e,!t,"/",Yt),e.length===0?t?"/":r?"./":".":(r&&(e+="/"),t?`/${e}`:e)},isAbsolute(e){return J(e,"path"),e.length>0&&e.charCodeAt(0)===K},join(...e){if(e.length===0)return".";let t;for(let r=0;r<e.length;++r){const n=e[r];J(n,"path"),n.length>0&&(t===void 0?t=n:t+=`/${n}`)}return t===void 0?".":ae.normalize(t)},relative(e,t){if(J(e,"from"),J(t,"to"),e===t||(e=ae.resolve(e),t=ae.resolve(t),e===t))return"";const r=1,n=e.length,i=n-r,s=1,a=t.length-s,o=i<a?i:a;let u=-1,l=0;for(;l<o;l++){const f=e.charCodeAt(r+l);if(f!==t.charCodeAt(s+l))break;f===K&&(u=l)}if(l===o)if(a>o){if(t.charCodeAt(s+l)===K)return t.slice(s+l+1);if(l===0)return t.slice(s+l)}else i>o&&(e.charCodeAt(r+l)===K?u=l:l===0&&(u=0));let c="";for(l=r+u+1;l<=n;++l)(l===n||e.charCodeAt(l)===K)&&(c+=c.length===0?"..":"/..");return`${c}${t.slice(s+u)}`},toNamespacedPath(e){return e},dirname(e){if(J(e,"path"),e.length===0)return".";const t=e.charCodeAt(0)===K;let r=-1,n=!0;for(let i=e.length-1;i>=1;--i)if(e.charCodeAt(i)===K){if(!n){r=i;break}}else n=!1;return r===-1?t?"/":".":t&&r===1?"//":e.slice(0,r)},basename(e,t){t!==void 0&&J(t,"ext"),J(e,"path");let r=0,n=-1,i=!0,s;if(t!==void 0&&t.length>0&&t.length<=e.length){if(t===e)return"";let a=t.length-1,o=-1;for(s=e.length-1;s>=0;--s){const u=e.charCodeAt(s);if(u===K){if(!i){r=s+1;break}}else o===-1&&(i=!1,o=s+1),a>=0&&(u===t.charCodeAt(a)?--a==-1&&(n=s):(a=-1,n=o))}return r===n?n=o:n===-1&&(n=e.length),e.slice(r,n)}for(s=e.length-1;s>=0;--s)if(e.charCodeAt(s)===K){if(!i){r=s+1;break}}else n===-1&&(i=!1,n=s+1);return n===-1?"":e.slice(r,n)},extname(e){J(e,"path");let t=-1,r=0,n=-1,i=!0,s=0;for(let a=e.length-1;a>=0;--a){const o=e.charCodeAt(a);if(o===K){if(!i){r=a+1;break}continue}n===-1&&(i=!1,n=a+1),o===xe?t===-1?t=a:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===r+1?"":e.slice(t,n)},format:zr.bind(null,"/"),parse(e){J(e,"path");const t={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return t;const r=e.charCodeAt(0)===K;let n;r?(t.root="/",n=1):n=0;let i=-1,s=0,a=-1,o=!0,u=e.length-1,l=0;for(;u>=n;--u){const c=e.charCodeAt(u);if(c===K){if(!o){s=u+1;break}continue}a===-1&&(o=!1,a=u+1),c===xe?i===-1?i=u:l!==1&&(l=1):i!==-1&&(l=-1)}if(a!==-1){const c=s===0&&r?1:s;i===-1||l===0||l===1&&i===a-1&&i===s+1?t.base=t.name=e.slice(c,a):(t.name=e.slice(c,i),t.base=e.slice(c,a),t.ext=e.slice(i,a))}return s>0?t.dir=e.slice(0,s-1):r&&(t.dir="/"),t},sep:"/",delimiter:":",win32:null,posix:null};ae.win32=ie.win32=ie,ae.posix=ie.posix=ae,Ue==="win32"?ie.normalize:ae.normalize,Ue==="win32"?ie.resolve:ae.resolve,Ue==="win32"?ie.relative:ae.relative,Ue==="win32"?ie.dirname:ae.dirname,Ue==="win32"?ie.basename:ae.basename,Ue==="win32"?ie.extname:ae.extname,Ue==="win32"?ie.sep:ae.sep;const ms=/^\w[\w\d+.-]*$/,ps=/^\//,vs=/^\/\//;function Gr(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&&!ms.test(e.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(e.path){if(e.authority){if(!ps.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(vs.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 ("//")')}}function bs(e,t){return!e&&!t?"file":e}function ys(e,t){switch(e){case"https":case"http":case"file":t?t[0]!==ge&&(t=ge+t):t=ge;break}return t}const Y="",ge="/",Ss=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Re{constructor(t,r,n,i,s,a=!1){typeof t=="object"?(this.scheme=t.scheme||Y,this.authority=t.authority||Y,this.path=t.path||Y,this.query=t.query||Y,this.fragment=t.fragment||Y):(this.scheme=bs(t,a),this.authority=r||Y,this.path=ys(this.scheme,n||Y),this.query=i||Y,this.fragment=s||Y,Gr(this,a))}static isUri(t){return t instanceof Re?!0:t?typeof t.authority=="string"&&typeof t.fragment=="string"&&typeof t.path=="string"&&typeof t.query=="string"&&typeof t.scheme=="string"&&typeof t.fsPath=="string"&&typeof t.with=="function"&&typeof t.toString=="function":!1}get fsPath(){return zt(this,!1)}with(t){if(!t)return this;let{scheme:r,authority:n,path:i,query:s,fragment:a}=t;return r===void 0?r=this.scheme:r===null&&(r=Y),n===void 0?n=this.authority:n===null&&(n=Y),i===void 0?i=this.path:i===null&&(i=Y),s===void 0?s=this.query:s===null&&(s=Y),a===void 0?a=this.fragment:a===null&&(a=Y),r===this.scheme&&n===this.authority&&i===this.path&&s===this.query&&a===this.fragment?this:new ze(r,n,i,s,a)}static parse(t,r=!1){const n=Ss.exec(t);return n?new ze(n[2]||Y,_t(n[4]||Y),_t(n[5]||Y),_t(n[7]||Y),_t(n[9]||Y),r):new ze(Y,Y,Y,Y,Y)}static file(t){let r=Y;if(rt&&(t=t.replace(/\\/g,ge)),t[0]===ge&&t[1]===ge){const n=t.indexOf(ge,2);n===-1?(r=t.substring(2),t=ge):(r=t.substring(2,n),t=t.substring(n)||ge)}return new ze("file",r,t,Y,Y)}static from(t){const r=new ze(t.scheme,t.authority,t.path,t.query,t.fragment);return Gr(r,!0),r}static joinPath(t,...r){if(!t.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let n;return rt&&t.scheme==="file"?n=Re.file(ie.join(zt(t,!0),...r)).path:n=ae.join(t.path,...r),t.with({path:n})}toString(t=!1){return Gt(this,t)}toJSON(){return this}static revive(t){if(t){if(t instanceof Re)return t;{const r=new ze(t);return r._formatted=t.external,r._fsPath=t._sep===Jr?t.fsPath:null,r}}else return t}}const Jr=rt?1:void 0;class ze extends Re{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=zt(this,!1)),this._fsPath}toString(t=!1){return t?Gt(this,!0):(this._formatted||(this._formatted=Gt(this,!1)),this._formatted)}toJSON(){const t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=Jr),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}const Qr={[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 Xr(e,t){let r,n=-1;for(let i=0;i<e.length;i++){const s=e.charCodeAt(i);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||t&&s===47)n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r!==void 0&&(r+=e.charAt(i));else{r===void 0&&(r=e.substr(0,i));const a=Qr[s];a!==void 0?(n!==-1&&(r+=encodeURIComponent(e.substring(n,i)),n=-1),r+=a):n===-1&&(n=i)}}return n!==-1&&(r+=encodeURIComponent(e.substring(n))),r!==void 0?r:e}function _s(e){let t;for(let r=0;r<e.length;r++){const n=e.charCodeAt(r);n===35||n===63?(t===void 0&&(t=e.substr(0,r)),t+=Qr[n]):t!==void 0&&(t+=e[r])}return t!==void 0?t:e}function zt(e,t){let r;return e.authority&&e.path.length>1&&e.scheme==="file"?r=`//${e.authority}${e.path}`:e.path.charCodeAt(0)===47&&(e.path.charCodeAt(1)>=65&&e.path.charCodeAt(1)<=90||e.path.charCodeAt(1)>=97&&e.path.charCodeAt(1)<=122)&&e.path.charCodeAt(2)===58?t?r=e.path.substr(1):r=e.path[1].toLowerCase()+e.path.substr(2):r=e.path,rt&&(r=r.replace(/\//g,"\\")),r}function Gt(e,t){const r=t?_s:Xr;let n="",{scheme:i,authority:s,path:a,query:o,fragment:u}=e;if(i&&(n+=i,n+=":"),(s||i==="file")&&(n+=ge,n+=ge),s){let l=s.indexOf("@");if(l!==-1){const c=s.substr(0,l);s=s.substr(l+1),l=c.indexOf(":"),l===-1?n+=r(c,!1):(n+=r(c.substr(0,l),!1),n+=":",n+=r(c.substr(l+1),!1)),n+="@"}s=s.toLowerCase(),l=s.indexOf(":"),l===-1?n+=r(s,!1):(n+=r(s.substr(0,l),!1),n+=s.substr(l))}if(a){if(a.length>=3&&a.charCodeAt(0)===47&&a.charCodeAt(2)===58){const l=a.charCodeAt(1);l>=65&&l<=90&&(a=`/${String.fromCharCode(l+32)}:${a.substr(3)}`)}else if(a.length>=2&&a.charCodeAt(1)===58){const l=a.charCodeAt(0);l>=65&&l<=90&&(a=`${String.fromCharCode(l+32)}:${a.substr(2)}`)}n+=r(a,!0)}return o&&(n+="?",n+=r(o,!1)),u&&(n+="#",n+=t?u:Xr(u,!1)),n}function Zr(e){try{return decodeURIComponent(e)}catch{return e.length>3?e.substr(0,3)+Zr(e.substr(3)):e}}const Kr=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function _t(e){return e.match(Kr)?e.replace(Kr,t=>Zr(t)):e}class le{constructor(t,r){this.lineNumber=t,this.column=r}with(t=this.lineNumber,r=this.column){return t===this.lineNumber&&r===this.column?this:new le(t,r)}delta(t=0,r=0){return this.with(this.lineNumber+t,this.column+r)}equals(t){return le.equals(this,t)}static equals(t,r){return!t&&!r?!0:!!t&&!!r&&t.lineNumber===r.lineNumber&&t.column===r.column}isBefore(t){return le.isBefore(this,t)}static isBefore(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<r.column}isBeforeOrEqual(t){return le.isBeforeOrEqual(this,t)}static isBeforeOrEqual(t,r){return t.lineNumber<r.lineNumber?!0:r.lineNumber<t.lineNumber?!1:t.column<=r.column}static compare(t,r){let n=t.lineNumber|0,i=r.lineNumber|0;if(n===i){let s=t.column|0,a=r.column|0;return s-a}return n-i}clone(){return new le(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(t){return new le(t.lineNumber,t.column)}static isIPosition(t){return t&&typeof t.lineNumber=="number"&&typeof t.column=="number"}}class G{constructor(t,r,n,i){t>n||t===n&&r>i?(this.startLineNumber=n,this.startColumn=i,this.endLineNumber=t,this.endColumn=r):(this.startLineNumber=t,this.startColumn=r,this.endLineNumber=n,this.endColumn=i)}isEmpty(){return G.isEmpty(this)}static isEmpty(t){return t.startLineNumber===t.endLineNumber&&t.startColumn===t.endColumn}containsPosition(t){return G.containsPosition(this,t)}static containsPosition(t,r){return!(r.lineNumber<t.startLineNumber||r.lineNumber>t.endLineNumber||r.lineNumber===t.startLineNumber&&r.column<t.startColumn||r.lineNumber===t.endLineNumber&&r.column>t.endColumn)}containsRange(t){return G.containsRange(this,t)}static containsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>t.endColumn)}strictContainsRange(t){return G.strictContainsRange(this,t)}static strictContainsRange(t,r){return!(r.startLineNumber<t.startLineNumber||r.endLineNumber<t.startLineNumber||r.startLineNumber>t.endLineNumber||r.endLineNumber>t.endLineNumber||r.startLineNumber===t.startLineNumber&&r.startColumn<=t.startColumn||r.endLineNumber===t.endLineNumber&&r.endColumn>=t.endColumn)}plusRange(t){return G.plusRange(this,t)}static plusRange(t,r){let n,i,s,a;return r.startLineNumber<t.startLineNumber?(n=r.startLineNumber,i=r.startColumn):r.startLineNumber===t.startLineNumber?(n=r.startLineNumber,i=Math.min(r.startColumn,t.startColumn)):(n=t.startLineNumber,i=t.startColumn),r.endLineNumber>t.endLineNumber?(s=r.endLineNumber,a=r.endColumn):r.endLineNumber===t.endLineNumber?(s=r.endLineNumber,a=Math.max(r.endColumn,t.endColumn)):(s=t.endLineNumber,a=t.endColumn),new G(n,i,s,a)}intersectRanges(t){return G.intersectRanges(this,t)}static intersectRanges(t,r){let n=t.startLineNumber,i=t.startColumn,s=t.endLineNumber,a=t.endColumn,o=r.startLineNumber,u=r.startColumn,l=r.endLineNumber,c=r.endColumn;return n<o?(n=o,i=u):n===o&&(i=Math.max(i,u)),s>l?(s=l,a=c):s===l&&(a=Math.min(a,c)),n>s||n===s&&i>a?null:new G(n,i,s,a)}equalsRange(t){return G.equalsRange(this,t)}static equalsRange(t,r){return!!t&&!!r&&t.startLineNumber===r.startLineNumber&&t.startColumn===r.startColumn&&t.endLineNumber===r.endLineNumber&&t.endColumn===r.endColumn}getEndPosition(){return G.getEndPosition(this)}static getEndPosition(t){return new le(t.endLineNumber,t.endColumn)}getStartPosition(){return G.getStartPosition(this)}static getStartPosition(t){return new le(t.startLineNumber,t.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(t,r){return new G(this.startLineNumber,this.startColumn,t,r)}setStartPosition(t,r){return new G(t,r,this.endLineNumber,this.endColumn)}collapseToStart(){return G.collapseToStart(this)}static collapseToStart(t){return new G(t.startLineNumber,t.startColumn,t.startLineNumber,t.startColumn)}static fromPositions(t,r=t){return new G(t.lineNumber,t.column,r.lineNumber,r.column)}static lift(t){return t?new G(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):null}static isIRange(t){return t&&typeof t.startLineNumber=="number"&&typeof t.startColumn=="number"&&typeof t.endLineNumber=="number"&&typeof t.endColumn=="number"}static areIntersectingOrTouching(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<t.startColumn)}static areIntersecting(t,r){return!(t.endLineNumber<r.startLineNumber||t.endLineNumber===r.startLineNumber&&t.endColumn<=r.startColumn||r.endLineNumber<t.startLineNumber||r.endLineNumber===t.startLineNumber&&r.endColumn<=t.startColumn)}static compareRangesUsingStarts(t,r){if(t&&r){const s=t.startLineNumber|0,a=r.startLineNumber|0;if(s===a){const o=t.startColumn|0,u=r.startColumn|0;if(o===u){const l=t.endLineNumber|0,c=r.endLineNumber|0;if(l===c){const f=t.endColumn|0,h=r.endColumn|0;return f-h}return l-c}return o-u}return s-a}return(t?1:0)-(r?1:0)}static compareRangesUsingEnds(t,r){return t.endLineNumber===r.endLineNumber?t.endColumn===r.endColumn?t.startLineNumber===r.startLineNumber?t.startColumn-r.startColumn:t.startLineNumber-r.startLineNumber:t.endColumn-r.endColumn:t.endLineNumber-r.endLineNumber}static spansMultipleLines(t){return t.endLineNumber>t.startLineNumber}}const As=3;function en(e,t,r,n){return new Ce(e,t,r).ComputeDiff(n)}class tn{constructor(t){const r=[],n=[];for(let i=0,s=t.length;i<s;i++)r[i]=Jt(t[i],1),n[i]=Qt(t[i],1);this.lines=t,this._startColumns=r,this._endColumns=n}getElements(){const t=[];for(let r=0,n=this.lines.length;r<n;r++)t[r]=this.lines[r].substring(this._startColumns[r]-1,this._endColumns[r]-1);return t}getStrictElement(t){return this.lines[t]}getStartLineNumber(t){return t+1}getEndLineNumber(t){return t+1}createCharSequence(t,r,n){const i=[],s=[],a=[];let o=0;for(let u=r;u<=n;u++){const l=this.lines[u],c=t?this._startColumns[u]:1,f=t?this._endColumns[u]:l.length+1;for(let h=c;h<f;h++)i[o]=l.charCodeAt(h-1),s[o]=u+1,a[o]=h,o++}return new ws(i,s,a)}}class ws{constructor(t,r,n){this._charCodes=t,this._lineNumbers=r,this._columns=n}getElements(){return this._charCodes}getStartLineNumber(t){return this._lineNumbers[t]}getStartColumn(t){return this._columns[t]}getEndLineNumber(t){return this._lineNumbers[t]}getEndColumn(t){return this._columns[t]+1}}class nt{constructor(t,r,n,i,s,a,o,u){this.originalStartLineNumber=t,this.originalStartColumn=r,this.originalEndLineNumber=n,this.originalEndColumn=i,this.modifiedStartLineNumber=s,this.modifiedStartColumn=a,this.modifiedEndLineNumber=o,this.modifiedEndColumn=u}static createFromDiffChange(t,r,n){let i,s,a,o,u,l,c,f;return t.originalLength===0?(i=0,s=0,a=0,o=0):(i=r.getStartLineNumber(t.originalStart),s=r.getStartColumn(t.originalStart),a=r.getEndLineNumber(t.originalStart+t.originalLength-1),o=r.getEndColumn(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(u=0,l=0,c=0,f=0):(u=n.getStartLineNumber(t.modifiedStart),l=n.getStartColumn(t.modifiedStart),c=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1),f=n.getEndColumn(t.modifiedStart+t.modifiedLength-1)),new nt(i,s,a,o,u,l,c,f)}}function Ns(e){if(e.length<=1)return e;const t=[e[0]];let r=t[0];for(let n=1,i=e.length;n<i;n++){const s=e[n],a=s.originalStart-(r.originalStart+r.originalLength),o=s.modifiedStart-(r.modifiedStart+r.modifiedLength);Math.min(a,o)<As?(r.originalLength=s.originalStart+s.originalLength-r.originalStart,r.modifiedLength=s.modifiedStart+s.modifiedLength-r.modifiedStart):(t.push(s),r=s)}return t}class it{constructor(t,r,n,i,s){this.originalStartLineNumber=t,this.originalEndLineNumber=r,this.modifiedStartLineNumber=n,this.modifiedEndLineNumber=i,this.charChanges=s}static createFromDiffResult(t,r,n,i,s,a,o){let u,l,c,f,h;if(r.originalLength===0?(u=n.getStartLineNumber(r.originalStart)-1,l=0):(u=n.getStartLineNumber(r.originalStart),l=n.getEndLineNumber(r.originalStart+r.originalLength-1)),r.modifiedLength===0?(c=i.getStartLineNumber(r.modifiedStart)-1,f=0):(c=i.getStartLineNumber(r.modifiedStart),f=i.getEndLineNumber(r.modifiedStart+r.modifiedLength-1)),a&&r.originalLength>0&&r.originalLength<20&&r.modifiedLength>0&&r.modifiedLength<20&&s()){const d=n.createCharSequence(t,r.originalStart,r.originalStart+r.originalLength-1),m=i.createCharSequence(t,r.modifiedStart,r.modifiedStart+r.modifiedLength-1);let v=en(d,m,s,!0).changes;o&&(v=Ns(v)),h=[];for(let b=0,N=v.length;b<N;b++)h.push(nt.createFromDiffChange(v[b],d,m))}return new it(u,l,c,f,h)}}class Ls{constructor(t,r,n){this.shouldComputeCharChanges=n.shouldComputeCharChanges,this.shouldPostProcessCharChanges=n.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=n.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=n.shouldMakePrettyDiff,this.originalLines=t,this.modifiedLines=r,this.original=new tn(t),this.modified=new tn(r),this.continueLineDiff=rn(n.maxComputationTime),this.continueCharDiff=rn(n.maxComputationTime===0?0:Math.min(n.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const t=en(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),r=t.changes,n=t.quitEarly;if(this.shouldIgnoreTrimWhitespace){const o=[];for(let u=0,l=r.length;u<l;u++)o.push(it.createFromDiffResult(this.shouldIgnoreTrimWhitespace,r[u],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:n,changes:o}}const i=[];let s=0,a=0;for(let o=-1,u=r.length;o<u;o++){const l=o+1<u?r[o+1]:null,c=l?l.originalStart:this.originalLines.length,f=l?l.modifiedStart:this.modifiedLines.length;for(;s<c&&a<f;){const h=this.originalLines[s],d=this.modifiedLines[a];if(h!==d){{let m=Jt(h,1),v=Jt(d,1);for(;m>1&&v>1;){const b=h.charCodeAt(m-2),N=d.charCodeAt(v-2);if(b!==N)break;m--,v--}(m>1||v>1)&&this._pushTrimWhitespaceCharChange(i,s+1,1,m,a+1,1,v)}{let m=Qt(h,1),v=Qt(d,1);const b=h.length+1,N=d.length+1;for(;m<b&&v<N;){const p=h.charCodeAt(m-1),g=h.charCodeAt(v-1);if(p!==g)break;m++,v++}(m<b||v<N)&&this._pushTrimWhitespaceCharChange(i,s+1,m,b,a+1,v,N)}}s++,a++}l&&(i.push(it.createFromDiffResult(this.shouldIgnoreTrimWhitespace,l,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=l.originalLength,a+=l.modifiedLength)}return{quitEarly:n,changes:i}}_pushTrimWhitespaceCharChange(t,r,n,i,s,a,o){if(this._mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o))return;let u;this.shouldComputeCharChanges&&(u=[new nt(r,n,r,i,s,a,s,o)]),t.push(new it(r,r,s,s,u))}_mergeTrimWhitespaceCharChange(t,r,n,i,s,a,o){const u=t.length;if(u===0)return!1;const l=t[u-1];return l.originalEndLineNumber===0||l.modifiedEndLineNumber===0?!1:l.originalEndLineNumber+1===r&&l.modifiedEndLineNumber+1===s?(l.originalEndLineNumber=r,l.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&l.charChanges&&l.charChanges.push(new nt(r,n,r,i,s,a,s,o)),!0):!1}}function Jt(e,t){const r=ss(e);return r===-1?t:r+1}function Qt(e,t){const r=as(e);return r===-1?t:r+2}function rn(e){if(e===0)return()=>!0;const t=Date.now();return()=>Date.now()-t<e}function nn(e){return e<0?0:e>255?255:e|0}function Ge(e){return e<0?0:e>4294967295?4294967295:e|0}class Cs{constructor(t,r){this._prefixSumIndexOfResultBrand=void 0,this.index=t,this.remainder=r}}class xs{constructor(t){this.values=t,this.prefixSum=new Uint32Array(t.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(t,r){t=Ge(t);const n=this.values,i=this.prefixSum,s=r.length;return s===0?!1:(this.values=new Uint32Array(n.length+s),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t),t+s),this.values.set(r,t),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(t,r){return t=Ge(t),r=Ge(r),this.values[t]===r?!1:(this.values[t]=r,t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),!0)}removeValues(t,r){t=Ge(t),r=Ge(r);const n=this.values,i=this.prefixSum;if(t>=n.length)return!1;let s=n.length-t;return r>=s&&(r=s),r===0?!1:(this.values=new Uint32Array(n.length-r),this.values.set(n.subarray(0,t),0),this.values.set(n.subarray(t+r),t),this.prefixSum=new Uint32Array(this.values.length),t-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=t-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(i.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(t){return t<0?0:(t=Ge(t),this._getPrefixSum(t))}_getPrefixSum(t){if(t<=this.prefixSumValidIndex[0])return this.prefixSum[t];let r=this.prefixSumValidIndex[0]+1;r===0&&(this.prefixSum[0]=this.values[0],r++),t>=this.values.length&&(t=this.values.length-1);for(let n=r;n<=t;n++)this.prefixSum[n]=this.prefixSum[n-1]+this.values[n];return this.prefixSumValidIndex[0]=Math.max(this.prefixSumValidIndex[0],t),this.prefixSum[t]}getIndexOf(t){t=Math.floor(t),this.getTotalSum();let r=0,n=this.values.length-1,i=0,s=0,a=0;for(;r<=n;)if(i=r+(n-r)/2|0,s=this.prefixSum[i],a=s-this.values[i],t<a)n=i-1;else if(t>=s)r=i+1;else break;return new Cs(i,t-a)}}class ks{constructor(t,r,n,i){this._uri=t,this._lines=r,this._eol=n,this._versionId=i,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(t){t.eol&&t.eol!==this._eol&&(this._eol=t.eol,this._lineStarts=null);const r=t.changes;for(const n of r)this._acceptDeleteRange(n.range),this._acceptInsertText(new le(n.range.startLineNumber,n.range.startColumn),n.text);this._versionId=t.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const t=this._eol.length,r=this._lines.length,n=new Uint32Array(r);for(let i=0;i<r;i++)n[i]=this._lines[i].length+t;this._lineStarts=new xs(n)}}_setLineText(t,r){this._lines[t]=r,this._lineStarts&&this._lineStarts.changeValue(t,this._lines[t].length+this._eol.length)}_acceptDeleteRange(t){if(t.startLineNumber===t.endLineNumber){if(t.startColumn===t.endColumn)return;this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.startLineNumber-1].substring(t.endColumn-1));return}this._setLineText(t.startLineNumber-1,this._lines[t.startLineNumber-1].substring(0,t.startColumn-1)+this._lines[t.endLineNumber-1].substring(t.endColumn-1)),this._lines.splice(t.startLineNumber,t.endLineNumber-t.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(t.startLineNumber,t.endLineNumber-t.startLineNumber)}_acceptInsertText(t,r){if(r.length===0)return;let n=is(r);if(n.length===1){this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]+this._lines[t.lineNumber-1].substring(t.column-1));return}n[n.length-1]+=this._lines[t.lineNumber-1].substring(t.column-1),this._setLineText(t.lineNumber-1,this._lines[t.lineNumber-1].substring(0,t.column-1)+n[0]);let i=new Uint32Array(n.length-1);for(let s=1;s<n.length;s++)this._lines.splice(t.lineNumber+s-1,0,n[s]),i[s-1]=n[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(t.lineNumber,i)}}const Ts="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function Ps(e=""){let t="(-?\\d*\\.\\d\\w*)|([^";for(const r of Ts)e.indexOf(r)>=0||(t+="\\"+r);return t+="\\s]+)",new RegExp(t,"g")}const Ms=Ps();function Es(e){let t=Ms;if(e&&e instanceof RegExp)if(e.global)t=e;else{let r="g";e.ignoreCase&&(r+="i"),e.multiline&&(r+="m"),e.unicode&&(r+="u"),t=new RegExp(e.source,r)}return t.lastIndex=0,t}const Is={maxLen:1e3,windowSize:15,timeBudget:150};function sn(e,t,r,n,i=Is){if(r.length>i.maxLen){let l=e-i.maxLen/2;return l<0?l=0:n+=l,r=r.substring(l,e+i.maxLen/2),sn(e,t,r,n,i)}const s=Date.now(),a=e-1-n;let o=-1,u=null;for(let l=1;!(Date.now()-s>=i.timeBudget);l++){const c=a-i.windowSize*l;t.lastIndex=Math.max(0,c);const f=Fs(t,r,a,o);if(!f&&u||(u=f,c<=0))break;o=c}if(u){let l={word:u[0],startColumn:n+1+u.index,endColumn:n+1+u.index+u[0].length};return t.lastIndex=0,l}return null}function Fs(e,t,r,n){let i;for(;i=e.exec(t);){const s=i.index||0;if(s<=r&&e.lastIndex>=r)return i;if(n>0&&s>n)return null}return null}class Xt{constructor(t){let r=nn(t);this._defaultValue=r,this._asciiMap=Xt._createAsciiMap(r),this._map=new Map}static _createAsciiMap(t){let r=new Uint8Array(256);for(let n=0;n<256;n++)r[n]=t;return r}set(t,r){let n=nn(r);t>=0&&t<256?this._asciiMap[t]=n:this._map.set(t,n)}get(t){return t>=0&&t<256?this._asciiMap[t]:this._map.get(t)||this._defaultValue}}class Ds{constructor(t,r,n){const i=new Uint8Array(t*r);for(let s=0,a=t*r;s<a;s++)i[s]=n;this._data=i,this.rows=t,this.cols=r}get(t,r){return this._data[t*this.cols+r]}set(t,r,n){this._data[t*this.cols+r]=n}}class js{constructor(t){let r=0,n=0;for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];u>r&&(r=u),o>n&&(n=o),l>n&&(n=l)}r++,n++;let i=new Ds(n,r,0);for(let s=0,a=t.length;s<a;s++){let[o,u,l]=t[s];i.set(o,u,l)}this._states=i,this._maxCharCode=r}nextState(t,r){return r<0||r>=this._maxCharCode?0:this._states.get(t,r)}}let Zt=null;function Us(){return Zt===null&&(Zt=new js([[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]])),Zt}let st=null;function Rs(){if(st===null){st=new Xt(0);const e=` <>'"\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 r=0;r<e.length;r++)st.set(e.charCodeAt(r),1);const t=".,;";for(let r=0;r<t.length;r++)st.set(t.charCodeAt(r),2)}return st}class At{static _createLink(t,r,n,i,s){let a=s-1;do{const o=r.charCodeAt(a);if(t.get(o)!==2)break;a--}while(a>i);if(i>0){const o=r.charCodeAt(i-1),u=r.charCodeAt(a);(o===40&&u===41||o===91&&u===93||o===123&&u===125)&&a--}return{range:{startLineNumber:n,startColumn:i+1,endLineNumber:n,endColumn:a+2},url:r.substring(i,a+1)}}static computeLinks(t,r=Us()){const n=Rs();let i=[];for(let s=1,a=t.getLineCount();s<=a;s++){const o=t.getLineContent(s),u=o.length;let l=0,c=0,f=0,h=1,d=!1,m=!1,v=!1,b=!1;for(;l<u;){let N=!1;const p=o.charCodeAt(l);if(h===13){let g;switch(p){case 40:d=!0,g=0;break;case 41:g=d?0:1;break;case 91:v=!0,m=!0,g=0;break;case 93:v=!1,g=m?0:1;break;case 123:b=!0,g=0;break;case 125:g=b?0:1;break;case 39:g=f===34||f===96?0:1;break;case 34:g=f===39||f===96?0:1;break;case 96:g=f===39||f===34?0:1;break;case 42:g=f===42?1:0;break;case 124:g=f===124?1:0;break;case 32:g=v?0:1;break;default:g=n.get(p)}g===1&&(i.push(At._createLink(n,o,s,c,l)),N=!0)}else if(h===12){let g;p===91?(m=!0,g=0):g=n.get(p),g===1?N=!0:h=13}else h=r.nextState(h,p),h===0&&(N=!0);N&&(h=1,d=!1,m=!1,b=!1,c=l+1,f=p),l++}h===13&&i.push(At._createLink(n,o,s,c,u))}return i}}function Os(e){return!e||typeof e.getLineCount!="function"||typeof e.getLineContent!="function"?[]:At.computeLinks(e)}class Kt{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(t,r,n,i,s){if(t&&r){let a=this.doNavigateValueSet(r,s);if(a)return{range:t,value:a}}if(n&&i){let a=this.doNavigateValueSet(i,s);if(a)return{range:n,value:a}}return null}doNavigateValueSet(t,r){let n=this.numberReplace(t,r);return n!==null?n:this.textReplace(t,r)}numberReplace(t,r){let n=Math.pow(10,t.length-(t.lastIndexOf(".")+1)),i=Number(t),s=parseFloat(t);return!isNaN(i)&&!isNaN(s)&&i===s?i===0&&!r?null:(i=Math.floor(i*n),i+=r?n:-n,String(i/n)):null}textReplace(t,r){return this.valueSetsReplace(this._defaultValueSet,t,r)}valueSetsReplace(t,r,n){let i=null;for(let s=0,a=t.length;i===null&&s<a;s++)i=this.valueSetReplace(t[s],r,n);return i}valueSetReplace(t,r,n){let i=t.indexOf(r);return i>=0?(i+=n?1:-1,i<0?i=t.length-1:i%=t.length,t[i]):null}}Kt.INSTANCE=new Kt;class H{constructor(t){this.element=t,this.next=H.Undefined,this.prev=H.Undefined}}H.Undefined=new H(void 0);class an{constructor(){this._first=H.Undefined,this._last=H.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===H.Undefined}clear(){let t=this._first;for(;t!==H.Undefined;){const r=t.next;t.prev=H.Undefined,t.next=H.Undefined,t=r}this._first=H.Undefined,this._last=H.Undefined,this._size=0}unshift(t){return this._insert(t,!1)}push(t){return this._insert(t,!0)}_insert(t,r){const n=new H(t);if(this._first===H.Undefined)this._first=n,this._last=n;else if(r){const s=this._last;this._last=n,n.prev=s,s.next=n}else{const s=this._first;this._first=n,n.next=s,s.prev=n}this._size+=1;let i=!1;return()=>{i||(i=!0,this._remove(n))}}shift(){if(this._first!==H.Undefined){const t=this._first.element;return this._remove(this._first),t}}pop(){if(this._last!==H.Undefined){const t=this._last.element;return this._remove(this._last),t}}_remove(t){if(t.prev!==H.Undefined&&t.next!==H.Undefined){const r=t.prev;r.next=t.next,t.next.prev=r}else t.prev===H.Undefined&&t.next===H.Undefined?(this._first=H.Undefined,this._last=H.Undefined):t.next===H.Undefined?(this._last=this._last.prev,this._last.next=H.Undefined):t.prev===H.Undefined&&(this._first=this._first.next,this._first.prev=H.Undefined);this._size-=1}*[Symbol.iterator](){let t=this._first;for(;t!==H.Undefined;)yield t.element,t=t.next}}const Vs=ee.performance&&typeof ee.performance.now=="function";class wt{constructor(t){this._highResolution=Vs&&t,this._startTime=this._now(),this._stopTime=-1}static create(t=!0){return new wt(t)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?ee.performance.now():Date.now()}}var er;(function(e){e.None=()=>Vr.None;function t(p){return(g,_=null,L)=>{let S=!1,A;return A=p(w=>{if(!S)return A?A.dispose():S=!0,g.call(_,w)},null,L),S&&A.dispose(),A}}e.once=t;function r(p,g){return u((_,L=null,S)=>p(A=>_.call(L,g(A)),null,S))}e.map=r;function n(p,g){return u((_,L=null,S)=>p(A=>{g(A),_.call(L,A)},null,S))}e.forEach=n;function i(p,g){return u((_,L=null,S)=>p(A=>g(A)&&_.call(L,A),null,S))}e.filter=i;function s(p){return p}e.signal=s;function a(...p){return(g,_=null,L)=>Qi(...p.map(S=>S(A=>g.call(_,A),null,L)))}e.any=a;function o(p,g,_){let L=_;return r(p,S=>(L=g(L,S),L))}e.reduce=o;function u(p){let g;const _=new Oe({onFirstListenerAdd(){g=p(_.fire,_)},onLastListenerRemove(){g.dispose()}});return _.event}function l(p,g,_=100,L=!1,S){let A,w,y,T=0;const M=new Oe({leakWarningThreshold:S,onFirstListenerAdd(){A=p(k=>{T++,w=g(w,k),L&&!y&&(M.fire(w),w=void 0),clearTimeout(y),y=setTimeout(()=>{const F=w;w=void 0,y=void 0,(!L||T>1)&&M.fire(F),T=0},_)})},onLastListenerRemove(){A.dispose()}});return M.event}e.debounce=l;function c(p,g=(_,L)=>_===L){let _=!0,L;return i(p,S=>{const A=_||!g(S,L);return _=!1,L=S,A})}e.latch=c;function f(p,g){return[e.filter(p,g),e.filter(p,_=>!g(_))]}e.split=f;function h(p,g=!1,_=[]){let L=_.slice(),S=p(y=>{L?L.push(y):w.fire(y)});const A=()=>{L&&L.forEach(y=>w.fire(y)),L=null},w=new Oe({onFirstListenerAdd(){S||(S=p(y=>w.fire(y)))},onFirstListenerDidAdd(){L&&(g?setTimeout(A):A())},onLastListenerRemove(){S&&S.dispose(),S=null}});return w.event}e.buffer=h;class d{constructor(g){this.event=g}map(g){return new d(r(this.event,g))}forEach(g){return new d(n(this.event,g))}filter(g){return new d(i(this.event,g))}reduce(g,_){return new d(o(this.event,g,_))}latch(){return new d(c(this.event))}debounce(g,_=100,L=!1,S){return new d(l(this.event,g,_,L,S))}on(g,_,L){return this.event(g,_,L)}once(g,_,L){return t(this.event)(g,_,L)}}function m(p){return new d(p)}e.chain=m;function v(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.on(g,L),A=()=>p.removeListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromNodeEventEmitter=v;function b(p,g,_=L=>L){const L=(...y)=>w.fire(_(...y)),S=()=>p.addEventListener(g,L),A=()=>p.removeEventListener(g,L),w=new Oe({onFirstListenerAdd:S,onLastListenerRemove:A});return w.event}e.fromDOMEventEmitter=b;function N(p){return new Promise(g=>t(p)(g))}e.toPromise=N})(er||(er={}));class Nt{constructor(t){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${t}_${Nt._idPool++}`}start(t){this._stopWatch=new wt(!0),this._listenerCount=t}stop(){if(this._stopWatch){const t=this._stopWatch.elapsed();this._elapsedOverall+=t,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${t.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Nt._idPool=0;class Oe{constructor(t){var r;this._disposed=!1,this._options=t,this._leakageMon=void 0,this._perfMon=((r=this._options)===null||r===void 0?void 0:r._profName)?new Nt(this._options._profName):void 0}get event(){return this._event||(this._event=(t,r,n)=>{var i;this._listeners||(this._listeners=new an);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const a=this._listeners.push(r?[t,r]:t);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,t,r);const o=(i=this._leakageMon)===null||i===void 0?void 0:i.check(this._listeners.size),u=Or(()=>{o&&o(),this._disposed||(a(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return n instanceof tt?n.add(u):Array.isArray(n)&&n.push(u),u}),this._event}fire(t){var r,n;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new an);for(let i of this._listeners)this._deliveryQueue.push([i,t]);for((r=this._perfMon)===null||r===void 0||r.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[i,s]=this._deliveryQueue.shift();try{typeof i=="function"?i.call(void 0,s):i[0].call(i[1],s)}catch(a){Hi(a)}}(n=this._perfMon)===null||n===void 0||n.stop()}}dispose(){var t,r,n,i,s;this._disposed||(this._disposed=!0,(t=this._listeners)===null||t===void 0||t.clear(),(r=this._deliveryQueue)===null||r===void 0||r.clear(),(i=(n=this._options)===null||n===void 0?void 0:n.onLastListenerRemove)===null||i===void 0||i.call(n),(s=this._leakageMon)===null||s===void 0||s.dispose())}}const on=Object.freeze(function(e,t){const r=setTimeout(e.bind(t),0);return{dispose(){clearTimeout(r)}}});var Lt;(function(e){function t(r){return r===e.None||r===e.Cancelled||r instanceof Ct?!0:!r||typeof r!="object"?!1:typeof r.isCancellationRequested=="boolean"&&typeof r.onCancellationRequested=="function"}e.isCancellationToken=t,e.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:er.None}),e.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:on})})(Lt||(Lt={}));class Ct{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?on:(this._emitter||(this._emitter=new Oe),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class $s{constructor(t){this._token=void 0,this._parentListener=void 0,this._parentListener=t&&t.onCancellationRequested(this.cancel,this)}get token(){return this._token||(this._token=new Ct),this._token}cancel(){this._token?this._token instanceof Ct&&this._token.cancel():this._token=Lt.Cancelled}dispose(t=!1){t&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Ct&&this._token.dispose():this._token=Lt.None}}class tr{constructor(){this._keyCodeToStr=[],this._strToKeyCode=Object.create(null)}define(t,r){this._keyCodeToStr[t]=r,this._strToKeyCode[r.toLowerCase()]=t}keyCodeToStr(t){return this._keyCodeToStr[t]}strToKeyCode(t){return this._strToKeyCode[t.toLowerCase()]||0}}const rr=new tr,nr=new tr,ir=new tr;(function(){function e(t,r,n=r,i=n){rr.define(t,r),nr.define(t,n),ir.define(t,i)}e(0,"unknown"),e(1,"Backspace"),e(2,"Tab"),e(3,"Enter"),e(4,"Shift"),e(5,"Ctrl"),e(6,"Alt"),e(7,"PauseBreak"),e(8,"CapsLock"),e(9,"Escape"),e(10,"Space"),e(11,"PageUp"),e(12,"PageDown"),e(13,"End"),e(14,"Home"),e(15,"LeftArrow","Left"),e(16,"UpArrow","Up"),e(17,"RightArrow","Right"),e(18,"DownArrow","Down"),e(19,"Insert"),e(20,"Delete"),e(21,"0"),e(22,"1"),e(23,"2"),e(24,"3"),e(25,"4"),e(26,"5"),e(27,"6"),e(28,"7"),e(29,"8"),e(30,"9"),e(31,"A"),e(32,"B"),e(33,"C"),e(34,"D"),e(35,"E"),e(36,"F"),e(37,"G"),e(38,"H"),e(39,"I"),e(40,"J"),e(41,"K"),e(42,"L"),e(43,"M"),e(44,"N"),e(45,"O"),e(46,"P"),e(47,"Q"),e(48,"R"),e(49,"S"),e(50,"T"),e(51,"U"),e(52,"V"),e(53,"W"),e(54,"X"),e(55,"Y"),e(56,"Z"),e(57,"Meta"),e(58,"ContextMenu"),e(59,"F1"),e(60,"F2"),e(61,"F3"),e(62,"F4"),e(63,"F5"),e(64,"F6"),e(65,"F7"),e(66,"F8"),e(67,"F9"),e(68,"F10"),e(69,"F11"),e(70,"F12"),e(71,"F13"),e(72,"F14"),e(73,"F15"),e(74,"F16"),e(75,"F17"),e(76,"F18"),e(77,"F19"),e(78,"NumLock"),e(79,"ScrollLock"),e(80,";",";","OEM_1"),e(81,"=","=","OEM_PLUS"),e(82,",",",","OEM_COMMA"),e(83,"-","-","OEM_MINUS"),e(84,".",".","OEM_PERIOD"),e(85,"/","/","OEM_2"),e(86,"`","`","OEM_3"),e(110,"ABNT_C1"),e(111,"ABNT_C2"),e(87,"[","[","OEM_4"),e(88,"\\","\\","OEM_5"),e(89,"]","]","OEM_6"),e(90,"'","'","OEM_7"),e(91,"OEM_8"),e(92,"OEM_102"),e(93,"NumPad0"),e(94,"NumPad1"),e(95,"NumPad2"),e(96,"NumPad3"),e(97,"NumPad4"),e(98,"NumPad5"),e(99,"NumPad6"),e(100,"NumPad7"),e(101,"NumPad8"),e(102,"NumPad9"),e(103,"NumPad_Multiply"),e(104,"NumPad_Add"),e(105,"NumPad_Separator"),e(106,"NumPad_Subtract"),e(107,"NumPad_Decimal"),e(108,"NumPad_Divide")})();var un;(function(e){function t(a){return rr.keyCodeToStr(a)}e.toString=t;function r(a){return rr.strToKeyCode(a)}e.fromString=r;function n(a){return nr.keyCodeToStr(a)}e.toUserSettingsUS=n;function i(a){return ir.keyCodeToStr(a)}e.toUserSettingsGeneral=i;function s(a){return nr.strToKeyCode(a)||ir.strToKeyCode(a)}e.fromUserSettings=s})(un||(un={}));function Ws(e,t){const r=(t&65535)<<16>>>0;return(e|r)>>>0}class me extends G{constructor(t,r,n,i){super(t,r,n,i);this.selectionStartLineNumber=t,this.selectionStartColumn=r,this.positionLineNumber=n,this.positionColumn=i}toString(){return"["+this.selectionStartLineNumber+","+this.selectionStartColumn+" -> "+this.positionLineNumber+","+this.positionColumn+"]"}equalsSelection(t){return me.selectionsEqual(this,t)}static selectionsEqual(t,r){return t.selectionStartLineNumber===r.selectionStartLineNumber&&t.selectionStartColumn===r.selectionStartColumn&&t.positionLineNumber===r.positionLineNumber&&t.positionColumn===r.positionColumn}getDirection(){return this.selectionStartLineNumber===this.startLineNumber&&this.selectionStartColumn===this.startColumn?0:1}setEndPosition(t,r){return this.getDirection()===0?new me(this.startLineNumber,this.startColumn,t,r):new me(t,r,this.startLineNumber,this.startColumn)}getPosition(){return new le(this.positionLineNumber,this.positionColumn)}setStartPosition(t,r){return this.getDirection()===0?new me(t,r,this.endLineNumber,this.endColumn):new me(this.endLineNumber,this.endColumn,t,r)}static fromPositions(t,r=t){return new me(t.lineNumber,t.column,r.lineNumber,r.column)}static liftSelection(t){return new me(t.selectionStartLineNumber,t.selectionStartColumn,t.positionLineNumber,t.positionColumn)}static selectionsArrEqual(t,r){if(t&&!r||!t&&r)return!1;if(!t&&!r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n<i;n++)if(!this.selectionsEqual(t[n],r[n]))return!1;return!0}static isISelection(t){return t&&typeof t.selectionStartLineNumber=="number"&&typeof t.selectionStartColumn=="number"&&typeof t.positionLineNumber=="number"&&typeof t.positionColumn=="number"}static createWithDirection(t,r,n,i,s){return s===0?new me(t,r,n,i):new me(n,i,t,r)}}class qs{constructor(t,r,n){this._tokenBrand=void 0,this.offset=t|0,this.type=r,this.language=n}toString(){return"("+this.offset+", "+this.type+")"}}var ln;(function(e){e[e.Unknown=0]="Unknown",e[e.Disabled=1]="Disabled",e[e.Enabled=2]="Enabled"})(ln||(ln={}));var fn;(function(e){e[e.KeepWhitespace=1]="KeepWhitespace",e[e.InsertAsSnippet=4]="InsertAsSnippet"})(fn||(fn={}));var cn;(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"})(cn||(cn={}));var hn;(function(e){e[e.Deprecated=1]="Deprecated"})(hn||(hn={}));var dn;(function(e){e[e.Invoke=0]="Invoke",e[e.TriggerCharacter=1]="TriggerCharacter",e[e.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(dn||(dn={}));var gn;(function(e){e[e.EXACT=0]="EXACT",e[e.ABOVE=1]="ABOVE",e[e.BELOW=2]="BELOW"})(gn||(gn={}));var mn;(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"})(mn||(mn={}));var pn;(function(e){e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(pn||(pn={}));var vn;(function(e){e[e.Text=0]="Text",e[e.Read=1]="Read",e[e.Write=2]="Write"})(vn||(vn={}));var bn;(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"})(bn||(bn={}));var yn;(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.autoClosingBrackets=5]="autoClosingBrackets",e[e.autoClosingDelete=6]="autoClosingDelete",e[e.autoClosingOvertype=7]="autoClosingOvertype",e[e.autoClosingQuotes=8]="autoClosingQuotes",e[e.autoIndent=9]="autoIndent",e[e.automaticLayout=10]="automaticLayout",e[e.autoSurround=11]="autoSurround",e[e.bracketPairColorization=12]="bracketPairColorization",e[e.guides=13]="guides",e[e.codeLens=14]="codeLens",e[e.codeLensFontFamily=15]="codeLensFontFamily",e[e.codeLensFontSize=16]="codeLensFontSize",e[e.colorDecorators=17]="colorDecorators",e[e.columnSelection=18]="columnSelection",e[e.comments=19]="comments",e[e.contextmenu=20]="contextmenu",e[e.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",e[e.cursorBlinking=22]="cursorBlinking",e[e.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",e[e.cursorStyle=24]="cursorStyle",e[e.cursorSurroundingLines=25]="cursorSurroundingLines",e[e.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",e[e.cursorWidth=27]="cursorWidth",e[e.disableLayerHinting=28]="disableLayerHinting",e[e.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",e[e.domReadOnly=30]="domReadOnly",e[e.dragAndDrop=31]="dragAndDrop",e[e.emptySelectionClipboard=32]="emptySelectionClipboard",e[e.extraEditorClassName=33]="extraEditorClassName",e[e.fastScrollSensitivity=34]="fastScrollSensitivity",e[e.find=35]="find",e[e.fixedOverflowWidgets=36]="fixedOverflowWidgets",e[e.folding=37]="folding",e[e.foldingStrategy=38]="foldingStrategy",e[e.foldingHighlight=39]="foldingHighlight",e[e.foldingImportsByDefault=40]="foldingImportsByDefault",e[e.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",e[e.fontFamily=42]="fontFamily",e[e.fontInfo=43]="fontInfo",e[e.fontLigatures=44]="fontLigatures",e[e.fontSize=45]="fontSize",e[e.fontWeight=46]="fontWeight",e[e.formatOnPaste=47]="formatOnPaste",e[e.formatOnType=48]="formatOnType",e[e.glyphMargin=49]="glyphMargin",e[e.gotoLocation=50]="gotoLocation",e[e.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",e[e.hover=52]="hover",e[e.inDiffEditor=53]="inDiffEditor",e[e.inlineSuggest=54]="inlineSuggest",e[e.letterSpacing=55]="letterSpacing",e[e.lightbulb=56]="lightbulb",e[e.lineDecorationsWidth=57]="lineDecorationsWidth",e[e.lineHeight=58]="lineHeight",e[e.lineNumbers=59]="lineNumbers",e[e.lineNumbersMinChars=60]="lineNumbersMinChars",e[e.linkedEditing=61]="linkedEditing",e[e.links=62]="links",e[e.matchBrackets=63]="matchBrackets",e[e.minimap=64]="minimap",e[e.mouseStyle=65]="mouseStyle",e[e.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",e[e.mouseWheelZoom=67]="mouseWheelZoom",e[e.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",e[e.multiCursorModifier=69]="multiCursorModifier",e[e.multiCursorPaste=70]="multiCursorPaste",e[e.occurrencesHighlight=71]="occurrencesHighlight",e[e.overviewRulerBorder=72]="overviewRulerBorder",e[e.overviewRulerLanes=73]="overviewRulerLanes",e[e.padding=74]="padding",e[e.parameterHints=75]="parameterHints",e[e.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",e[e.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",e[e.quickSuggestions=78]="quickSuggestions",e[e.quickSuggestionsDelay=79]="quickSuggestionsDelay",e[e.readOnly=80]="readOnly",e[e.renameOnType=81]="renameOnType",e[e.renderControlCharacters=82]="renderControlCharacters",e[e.renderFinalNewline=83]="renderFinalNewline",e[e.renderLineHighlight=84]="renderLineHighlight",e[e.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",e[e.renderValidationDecorations=86]="renderValidationDecorations",e[e.renderWhitespace=87]="renderWhitespace",e[e.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",e[e.roundedSelection=89]="roundedSelection",e[e.rulers=90]="rulers",e[e.scrollbar=91]="scrollbar",e[e.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",e[e.scrollBeyondLastLine=93]="scrollBeyondLastLine",e[e.scrollPredominantAxis=94]="scrollPredominantAxis",e[e.selectionClipboard=95]="selectionClipboard",e[e.selectionHighlight=96]="selectionHighlight",e[e.selectOnLineNumbers=97]="selectOnLineNumbers",e[e.showFoldingControls=98]="showFoldingControls",e[e.showUnused=99]="showUnused",e[e.snippetSuggestions=100]="snippetSuggestions",e[e.smartSelect=101]="smartSelect",e[e.smoothScrolling=102]="smoothScrolling",e[e.stickyTabStops=103]="stickyTabStops",e[e.stopRenderingLineAfter=104]="stopRenderingLineAfter",e[e.suggest=105]="suggest",e[e.suggestFontSize=106]="suggestFontSize",e[e.suggestLineHeight=107]="suggestLineHeight",e[e.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",e[e.suggestSelection=109]="suggestSelection",e[e.tabCompletion=110]="tabCompletion",e[e.tabIndex=111]="tabIndex",e[e.unusualLineTerminators=112]="unusualLineTerminators",e[e.useShadowDOM=113]="useShadowDOM",e[e.useTabStops=114]="useTabStops",e[e.wordSeparators=115]="wordSeparators",e[e.wordWrap=116]="wordWrap",e[e.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",e[e.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",e[e.wordWrapColumn=119]="wordWrapColumn",e[e.wordWrapOverride1=120]="wordWrapOverride1",e[e.wordWrapOverride2=121]="wordWrapOverride2",e[e.wrappingIndent=122]="wrappingIndent",e[e.wrappingStrategy=123]="wrappingStrategy",e[e.showDeprecated=124]="showDeprecated",e[e.inlayHints=125]="inlayHints",e[e.editorClassName=126]="editorClassName",e[e.pixelRatio=127]="pixelRatio",e[e.tabFocusMode=128]="tabFocusMode",e[e.layoutInfo=129]="layoutInfo",e[e.wrappingInfo=130]="wrappingInfo"})(yn||(yn={}));var Sn;(function(e){e[e.TextDefined=0]="TextDefined",e[e.LF=1]="LF",e[e.CRLF=2]="CRLF"})(Sn||(Sn={}));var _n;(function(e){e[e.LF=0]="LF",e[e.CRLF=1]="CRLF"})(_n||(_n={}));var An;(function(e){e[e.None=0]="None",e[e.Indent=1]="Indent",e[e.IndentOutdent=2]="IndentOutdent",e[e.Outdent=3]="Outdent"})(An||(An={}));var wn;(function(e){e[e.Other=0]="Other",e[e.Type=1]="Type",e[e.Parameter=2]="Parameter"})(wn||(wn={}));var Nn;(function(e){e[e.Automatic=0]="Automatic",e[e.Explicit=1]="Explicit"})(Nn||(Nn={}));var sr;(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.KEY_0=21]="KEY_0",e[e.KEY_1=22]="KEY_1",e[e.KEY_2=23]="KEY_2",e[e.KEY_3=24]="KEY_3",e[e.KEY_4=25]="KEY_4",e[e.KEY_5=26]="KEY_5",e[e.KEY_6=27]="KEY_6",e[e.KEY_7=28]="KEY_7",e[e.KEY_8=29]="KEY_8",e[e.KEY_9=30]="KEY_9",e[e.KEY_A=31]="KEY_A",e[e.KEY_B=32]="KEY_B",e[e.KEY_C=33]="KEY_C",e[e.KEY_D=34]="KEY_D",e[e.KEY_E=35]="KEY_E",e[e.KEY_F=36]="KEY_F",e[e.KEY_G=37]="KEY_G",e[e.KEY_H=38]="KEY_H",e[e.KEY_I=39]="KEY_I",e[e.KEY_J=40]="KEY_J",e[e.KEY_K=41]="KEY_K",e[e.KEY_L=42]="KEY_L",e[e.KEY_M=43]="KEY_M",e[e.KEY_N=44]="KEY_N",e[e.KEY_O=45]="KEY_O",e[e.KEY_P=46]="KEY_P",e[e.KEY_Q=47]="KEY_Q",e[e.KEY_R=48]="KEY_R",e[e.KEY_S=49]="KEY_S",e[e.KEY_T=50]="KEY_T",e[e.KEY_U=51]="KEY_U",e[e.KEY_V=52]="KEY_V",e[e.KEY_W=53]="KEY_W",e[e.KEY_X=54]="KEY_X",e[e.KEY_Y=55]="KEY_Y",e[e.KEY_Z=56]="KEY_Z",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.NumLock=78]="NumLock",e[e.ScrollLock=79]="ScrollLock",e[e.US_SEMICOLON=80]="US_SEMICOLON",e[e.US_EQUAL=81]="US_EQUAL",e[e.US_COMMA=82]="US_COMMA",e[e.US_MINUS=83]="US_MINUS",e[e.US_DOT=84]="US_DOT",e[e.US_SLASH=85]="US_SLASH",e[e.US_BACKTICK=86]="US_BACKTICK",e[e.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",e[e.US_BACKSLASH=88]="US_BACKSLASH",e[e.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",e[e.US_QUOTE=90]="US_QUOTE",e[e.OEM_8=91]="OEM_8",e[e.OEM_102=92]="OEM_102",e[e.NUMPAD_0=93]="NUMPAD_0",e[e.NUMPAD_1=94]="NUMPAD_1",e[e.NUMPAD_2=95]="NUMPAD_2",e[e.NUMPAD_3=96]="NUMPAD_3",e[e.NUMPAD_4=97]="NUMPAD_4",e[e.NUMPAD_5=98]="NUMPAD_5",e[e.NUMPAD_6=99]="NUMPAD_6",e[e.NUMPAD_7=100]="NUMPAD_7",e[e.NUMPAD_8=101]="NUMPAD_8",e[e.NUMPAD_9=102]="NUMPAD_9",e[e.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",e[e.NUMPAD_ADD=104]="NUMPAD_ADD",e[e.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",e[e.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",e[e.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",e[e.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",e[e.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",e[e.ABNT_C1=110]="ABNT_C1",e[e.ABNT_C2=111]="ABNT_C2",e[e.MAX_VALUE=112]="MAX_VALUE"})(sr||(sr={}));var ar;(function(e){e[e.Hint=1]="Hint",e[e.Info=2]="Info",e[e.Warning=4]="Warning",e[e.Error=8]="Error"})(ar||(ar={}));var or;(function(e){e[e.Unnecessary=1]="Unnecessary",e[e.Deprecated=2]="Deprecated"})(or||(or={}));var Ln;(function(e){e[e.Inline=1]="Inline",e[e.Gutter=2]="Gutter"})(Ln||(Ln={}));var Cn;(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"})(Cn||(Cn={}));var xn;(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"})(xn||(xn={}));var kn;(function(e){e[e.Left=1]="Left",e[e.Center=2]="Center",e[e.Right=4]="Right",e[e.Full=7]="Full"})(kn||(kn={}));var Tn;(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"})(Tn||(Tn={}));var Pn;(function(e){e[e.None=0]="None",e[e.Text=1]="Text",e[e.Blocks=2]="Blocks"})(Pn||(Pn={}));var Mn;(function(e){e[e.Smooth=0]="Smooth",e[e.Immediate=1]="Immediate"})(Mn||(Mn={}));var En;(function(e){e[e.Auto=1]="Auto",e[e.Hidden=2]="Hidden",e[e.Visible=3]="Visible"})(En||(En={}));var ur;(function(e){e[e.LTR=0]="LTR",e[e.RTL=1]="RTL"})(ur||(ur={}));var In;(function(e){e[e.Invoke=1]="Invoke",e[e.TriggerCharacter=2]="TriggerCharacter",e[e.ContentChange=3]="ContentChange"})(In||(In={}));var Fn;(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"})(Fn||(Fn={}));var Dn;(function(e){e[e.Deprecated=1]="Deprecated"})(Dn||(Dn={}));var jn;(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"})(jn||(jn={}));var Un;(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"})(Un||(Un={}));var Rn;(function(e){e[e.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",e[e.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",e[e.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",e[e.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(Rn||(Rn={}));var On;(function(e){e[e.None=0]="None",e[e.Same=1]="Same",e[e.Indent=2]="Indent",e[e.DeepIndent=3]="DeepIndent"})(On||(On={}));class at{static chord(t,r){return Ws(t,r)}}at.CtrlCmd=2048,at.Shift=1024,at.Alt=512,at.WinCtrl=256;function Hs(){return{editor:void 0,languages:void 0,CancellationTokenSource:$s,Emitter:Oe,KeyCode:sr,KeyMod:at,Position:le,Range:G,Selection:me,SelectionDirection:ur,MarkerSeverity:ar,MarkerTag:or,Uri:Re,Token:qs}}var Je=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})};class Bs extends ks{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(t){return this._lines[t-1]}getWordAtPosition(t,r){let n=sn(t.column,Es(r),this._lines[t.lineNumber-1],0);return n?new G(t.lineNumber,n.startColumn,t.lineNumber,n.endColumn):null}words(t){const r=this._lines,n=this._wordenize.bind(this);let i=0,s="",a=0,o=[];return{*[Symbol.iterator](){for(;;)if(a<o.length){const u=s.substring(o[a].start,o[a].end);a+=1,yield u}else if(i<r.length)s=r[i],o=n(s,t),a=0,i+=1;else break}}}getLineWords(t,r){let n=this._lines[t-1],i=this._wordenize(n,r),s=[];for(const a of i)s.push({word:n.substring(a.start,a.end),startColumn:a.start+1,endColumn:a.end+1});return s}_wordenize(t,r){const n=[];let i;for(r.lastIndex=0;(i=r.exec(t))&&i[0].length!==0;)n.push({start:i.index,end:i.index+i[0].length});return n}getValueInRange(t){if(t=this._validateRange(t),t.startLineNumber===t.endLineNumber)return this._lines[t.startLineNumber-1].substring(t.startColumn-1,t.endColumn-1);let r=this._eol,n=t.startLineNumber-1,i=t.endLineNumber-1,s=[];s.push(this._lines[n].substring(t.startColumn-1));for(let a=n+1;a<i;a++)s.push(this._lines[a]);return s.push(this._lines[i].substring(0,t.endColumn-1)),s.join(r)}offsetAt(t){return t=this._validatePosition(t),this._ensureLineStarts(),this._lineStarts.getPrefixSum(t.lineNumber-2)+(t.column-1)}positionAt(t){t=Math.floor(t),t=Math.max(0,t),this._ensureLineStarts();let r=this._lineStarts.getIndexOf(t),n=this._lines[r.index].length;return{lineNumber:1+r.index,column:1+Math.min(r.remainder,n)}}_validateRange(t){const r=this._validatePosition({lineNumber:t.startLineNumber,column:t.startColumn}),n=this._validatePosition({lineNumber:t.endLineNumber,column:t.endColumn});return r.lineNumber!==t.startLineNumber||r.column!==t.startColumn||n.lineNumber!==t.endLineNumber||n.column!==t.endColumn?{startLineNumber:r.lineNumber,startColumn:r.column,endLineNumber:n.lineNumber,endColumn:n.column}:t}_validatePosition(t){if(!le.isIPosition(t))throw new Error("bad position");let{lineNumber:r,column:n}=t,i=!1;if(r<1)r=1,n=1,i=!0;else if(r>this._lines.length)r=this._lines.length,n=this._lines[r-1].length+1,i=!0;else{let s=this._lines[r-1].length+1;n<1?(n=1,i=!0):n>s&&(n=s,i=!0)}return i?{lineNumber:r,column:n}:t}}class Qe{constructor(t,r){this._host=t,this._models=Object.create(null),this._foreignModuleFactory=r,this._foreignModule=null}dispose(){this._models=Object.create(null)}_getModel(t){return this._models[t]}_getModels(){let t=[];return Object.keys(this._models).forEach(r=>t.push(this._models[r])),t}acceptNewModel(t){this._models[t.url]=new Bs(Re.parse(t.url),t.lines,t.EOL,t.versionId)}acceptModelChanged(t,r){if(!this._models[t])return;this._models[t].onEvents(r)}acceptRemovedModel(t){!this._models[t]||delete this._models[t]}computeDiff(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=this._getModel(t),a=this._getModel(r);if(!s||!a)return null;const o=s.getLinesContent(),u=a.getLinesContent(),c=new Ls(o,u,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:n,shouldMakePrettyDiff:!0,maxComputationTime:i}).computeDiff(),f=c.changes.length>0?!1:this._modelsAreIdentical(s,a);return{quitEarly:c.quitEarly,identical:f,changes:c.changes}})}_modelsAreIdentical(t,r){const n=t.getLineCount(),i=r.getLineCount();if(n!==i)return!1;for(let s=1;s<=n;s++){const a=t.getLineContent(s),o=r.getLineContent(s);if(a!==o)return!1}return!0}computeMoreMinimalEdits(t,r){return Je(this,void 0,void 0,function*(){const n=this._getModel(t);if(!n)return r;const i=[];let s;r=r.slice(0).sort((a,o)=>{if(a.range&&o.range)return G.compareRangesUsingStarts(a.range,o.range);let u=a.range?0:1,l=o.range?0:1;return u-l});for(let{range:a,text:o,eol:u}of r){if(typeof u=="number"&&(s=u),G.isEmpty(a)&&!o)continue;const l=n.getValueInRange(a);if(o=o.replace(/\r\n|\n|\r/g,n.eol),l===o)continue;if(Math.max(o.length,l.length)>Qe._diffLimit){i.push({range:a,text:o});continue}const c=us(l,o,!1),f=n.offsetAt(G.lift(a).getStartPosition());for(const h of c){const d=n.positionAt(f+h.originalStart),m=n.positionAt(f+h.originalStart+h.originalLength),v={text:o.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:d.lineNumber,startColumn:d.column,endLineNumber:m.lineNumber,endColumn:m.column}};n.getValueInRange(v.range)!==v.text&&i.push(v)}}return typeof s=="number"&&i.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),i})}computeLinks(t){return Je(this,void 0,void 0,function*(){let r=this._getModel(t);return r?Os(r):null})}textualSuggest(t,r,n,i){return Je(this,void 0,void 0,function*(){const s=new wt(!0),a=new RegExp(n,i),o=new Set;e:for(let u of t){const l=this._getModel(u);if(!!l){for(let c of l.words(a))if(!(c===r||!isNaN(Number(c)))&&(o.add(c),o.size>Qe._suggestionsLimit))break e}}return{words:Array.from(o),duration:s.elapsed()}})}computeWordRanges(t,r,n,i){return Je(this,void 0,void 0,function*(){let s=this._getModel(t);if(!s)return Object.create(null);const a=new RegExp(n,i),o=Object.create(null);for(let u=r.startLineNumber;u<r.endLineNumber;u++){let l=s.getLineWords(u,a);for(const c of l){if(!isNaN(Number(c.word)))continue;let f=o[c.word];f||(f=[],o[c.word]=f),f.push({startLineNumber:u,startColumn:c.startColumn,endLineNumber:u,endColumn:c.endColumn})}}return o})}navigateValueSet(t,r,n,i,s){return Je(this,void 0,void 0,function*(){let a=this._getModel(t);if(!a)return null;let o=new RegExp(i,s);r.startColumn===r.endColumn&&(r={startLineNumber:r.startLineNumber,startColumn:r.startColumn,endLineNumber:r.endLineNumber,endColumn:r.endColumn+1});let u=a.getValueInRange(r),l=a.getWordAtPosition({lineNumber:r.startLineNumber,column:r.startColumn},o);if(!l)return null;let c=a.getValueInRange(l);return Kt.INSTANCE.navigateValueSet(r,u,l,c,n)})}loadForeignModule(t,r,n){let a={host:Wr(n,(o,u)=>this._host.fhr(o,u)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(a,r),Promise.resolve(Ht(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(t,r){if(!this._foreignModule||typeof this._foreignModule[t]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+t));try{return Promise.resolve(this._foreignModule[t].apply(this._foreignModule,r))}catch(n){return Promise.reject(n)}}}Qe._diffLimit=1e5,Qe._suggestionsLimit=1e4,typeof importScripts=="function"&&(ee.monaco=Hs());let lr=!1;function Vn(e){if(lr)return;lr=!0;const t=new ns(r=>{self.postMessage(r)},r=>new Qe(r,e));self.onmessage=r=>{t.onmessage(r.data)}}self.onmessage=e=>{lr||Vn(null)};function fr(e,t){t===void 0&&(t=!1);var r=e.length,n=0,i="",s=0,a=16,o=0,u=0,l=0,c=0,f=0;function h(g,_){for(var L=0,S=0;L<g||!_;){var A=e.charCodeAt(n);if(A>=48&&A<=57)S=S*16+A-48;else if(A>=65&&A<=70)S=S*16+A-65+10;else if(A>=97&&A<=102)S=S*16+A-97+10;else break;n++,L++}return L<g&&(S=-1),S}function d(g){n=g,i="",s=0,a=16,f=0}function m(){var g=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&Xe(e.charCodeAt(n)))for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;else return f=3,e.substring(g,n);var _=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&Xe(e.charCodeAt(n))){for(n++;n<e.length&&Xe(e.charCodeAt(n));)n++;_=n}else f=3;return e.substring(g,_)}function v(){for(var g="",_=n;;){if(n>=r){g+=e.substring(_,n),f=2;break}var L=e.charCodeAt(n);if(L===34){g+=e.substring(_,n),n++;break}if(L===92){if(g+=e.substring(_,n),n++,n>=r){f=2;break}var S=e.charCodeAt(n++);switch(S){case 34:g+='"';break;case 92:g+="\\";break;case 47:g+="/";break;case 98:g+="\b";break;case 102:g+="\f";break;case 110:g+=` -`;break;case 114:g+="\r";break;case 116:g+=" ";break;case 117:var A=h(4,!0);A>=0?g+=String.fromCharCode(A):f=4;break;default:f=5}_=n;continue}if(L>=0&&L<=31)if(ot(L)){g+=e.substring(_,n),f=2;break}else f=6;n++}return g}function b(){if(i="",f=0,s=n,u=o,c=l,n>=r)return s=r,a=17;var g=e.charCodeAt(n);if(cr(g)){do n++,i+=String.fromCharCode(g),g=e.charCodeAt(n);while(cr(g));return a=15}if(ot(g))return n++,i+=String.fromCharCode(g),g===13&&e.charCodeAt(n)===10&&(n++,i+=` -`),o++,l=n,a=14;switch(g){case 123:return n++,a=1;case 125:return n++,a=2;case 91:return n++,a=3;case 93:return n++,a=4;case 58:return n++,a=6;case 44:return n++,a=5;case 34:return n++,i=v(),a=10;case 47:var _=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<r&&!ot(e.charCodeAt(n));)n++;return i=e.substring(_,n),a=12}if(e.charCodeAt(n+1)===42){n+=2;for(var L=r-1,S=!1;n<L;){var A=e.charCodeAt(n);if(A===42&&e.charCodeAt(n+1)===47){n+=2,S=!0;break}n++,ot(A)&&(A===13&&e.charCodeAt(n)===10&&n++,o++,l=n)}return S||(n++,f=1),i=e.substring(_,n),a=13}return i+=String.fromCharCode(g),n++,a=16;case 45:if(i+=String.fromCharCode(g),n++,n===r||!Xe(e.charCodeAt(n)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=m(),a=11;default:for(;n<r&&N(g);)n++,g=e.charCodeAt(n);if(s!==n){switch(i=e.substring(s,n),i){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return i+=String.fromCharCode(g),n++,a=16}}function N(g){if(cr(g)||ot(g))return!1;switch(g){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function p(){var g;do g=b();while(g>=12&&g<=15);return g}return{setPosition:d,getPosition:function(){return n},scan:t?p:b,getToken:function(){return a},getTokenValue:function(){return i},getTokenOffset:function(){return s},getTokenLength:function(){return n-s},getTokenStartLine:function(){return u},getTokenStartCharacter:function(){return s-c},getTokenError:function(){return f}}}function cr(e){return e===32||e===9||e===11||e===12||e===160||e===5760||e>=8192&&e<=8203||e===8239||e===8287||e===12288||e===65279}function ot(e){return e===10||e===13||e===8232||e===8233}function Xe(e){return e>=48&&e<=57}function Ys(e,t,r){var n,i,s,a,o;if(t){for(a=t.offset,o=a+t.length,s=a;s>0&&!$n(e,s-1);)s--;for(var u=o;u<e.length&&!$n(e,u);)u++;i=e.substring(s,u),n=zs(i,r)}else i=e,n=0,s=0,a=0,o=e.length;var l=Gs(r,e),c=!1,f=0,h;r.insertSpaces?h=hr(" ",r.tabSize||4):h=" ";var d=fr(i,!1),m=!1;function v(){return l+hr(h,n+f)}function b(){var k=d.scan();for(c=!1;k===15||k===14;)c=c||k===14,k=d.scan();return m=k===16||d.getTokenError()!==0,k}var N=[];function p(k,F,V){!m&&(!t||F<o&&V>a)&&e.substring(F,V)!==k&&N.push({offset:F,length:V-F,content:k})}var g=b();if(g!==17){var _=d.getTokenOffset()+s,L=hr(h,n);p(L,s,_)}for(;g!==17;){for(var S=d.getTokenOffset()+d.getTokenLength()+s,A=b(),w="",y=!1;!c&&(A===12||A===13);){var T=d.getTokenOffset()+s;p(" ",S,T),S=d.getTokenOffset()+d.getTokenLength()+s,y=A===12,w=y?v():"",A=b()}if(A===2)g!==1&&(f--,w=v());else if(A===4)g!==3&&(f--,w=v());else{switch(g){case 3:case 1:f++,w=v();break;case 5:case 12:w=v();break;case 13:c?w=v():y||(w=" ");break;case 6:y||(w=" ");break;case 10:if(A===6){y||(w="");break}case 7:case 8:case 9:case 11:case 2:case 4:A===12||A===13?y||(w=" "):A!==5&&A!==17&&(m=!0);break;case 16:m=!0;break}c&&(A===12||A===13)&&(w=v())}A===17&&(w=r.insertFinalNewline?l:"");var M=d.getTokenOffset()+s;p(w,S,M),g=A}return N}function hr(e,t){for(var r="",n=0;n<t;n++)r+=e;return r}function zs(e,t){for(var r=0,n=0,i=t.tabSize||4;r<e.length;){var s=e.charAt(r);if(s===" ")n++;else if(s===" ")n+=i;else break;r++}return Math.floor(n/i)}function Gs(e,t){for(var r=0;r<t.length;r++){var n=t.charAt(r);if(n==="\r")return r+1<t.length&&t.charAt(r+1)===` -`?`\r -`:"\r";if(n===` -`)return` -`}return e&&e.eol||` -`}function $n(e,t){return`\r -`.indexOf(e.charAt(t))!==-1}var xt;(function(e){e.DEFAULT={allowTrailingComma:!1}})(xt||(xt={}));function Js(e,t,r){t===void 0&&(t=[]),r===void 0&&(r=xt.DEFAULT);var n=null,i=[],s=[];function a(u){Array.isArray(i)?i.push(u):n!==null&&(i[n]=u)}var o={onObjectBegin:function(){var u={};a(u),s.push(i),i=u,n=null},onObjectProperty:function(u){n=u},onObjectEnd:function(){i=s.pop()},onArrayBegin:function(){var u=[];a(u),s.push(i),i=u,n=null},onArrayEnd:function(){i=s.pop()},onLiteralValue:a,onError:function(u,l,c){t.push({error:u,offset:l,length:c})}};return Xs(e,o,r),i[0]}function Wn(e){if(!e.parent||!e.parent.children)return[];var t=Wn(e.parent);if(e.parent.type==="property"){var r=e.parent.children[0].value;t.push(r)}else if(e.parent.type==="array"){var n=e.parent.children.indexOf(e);n!==-1&&t.push(n)}return t}function dr(e){switch(e.type){case"array":return e.children.map(dr);case"object":for(var t=Object.create(null),r=0,n=e.children;r<n.length;r++){var i=n[r],s=i.children[1];s&&(t[i.children[0].value]=dr(s))}return t;case"null":case"string":case"number":case"boolean":return e.value;default:return}}function Qs(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}function qn(e,t,r){if(r===void 0&&(r=!1),Qs(e,t,r)){var n=e.children;if(Array.isArray(n))for(var i=0;i<n.length&&n[i].offset<=t;i++){var s=qn(n[i],t,r);if(s)return s}return e}}function Xs(e,t,r){r===void 0&&(r=xt.DEFAULT);var n=fr(e,!1);function i(y){return y?function(){return y(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}function s(y){return y?function(T){return y(T,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter())}:function(){return!0}}var a=i(t.onObjectBegin),o=s(t.onObjectProperty),u=i(t.onObjectEnd),l=i(t.onArrayBegin),c=i(t.onArrayEnd),f=s(t.onLiteralValue),h=s(t.onSeparator),d=i(t.onComment),m=s(t.onError),v=r&&r.disallowComments,b=r&&r.allowTrailingComma;function N(){for(;;){var y=n.scan();switch(n.getTokenError()){case 4:p(14);break;case 5:p(15);break;case 3:p(13);break;case 1:v||p(11);break;case 2:p(12);break;case 6:p(16);break}switch(y){case 12:case 13:v?p(10):d();break;case 16:p(1);break;case 15:case 14:break;default:return y}}}function p(y,T,M){if(T===void 0&&(T=[]),M===void 0&&(M=[]),m(y),T.length+M.length>0)for(var k=n.getToken();k!==17;){if(T.indexOf(k)!==-1){N();break}else if(M.indexOf(k)!==-1)break;k=N()}}function g(y){var T=n.getTokenValue();return y?f(T):o(T),N(),!0}function _(){switch(n.getToken()){case 11:var y=n.getTokenValue(),T=Number(y);isNaN(T)&&(p(2),T=0),f(T);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return N(),!0}function L(){return n.getToken()!==10?(p(3,[],[2,5]),!1):(g(!1),n.getToken()===6?(h(":"),N(),w()||p(4,[],[2,5])):p(5,[],[2,5]),!0)}function S(){a(),N();for(var y=!1;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===2&&b)break}else y&&p(6,[],[]);L()||p(4,[],[2,5]),y=!0}return u(),n.getToken()!==2?p(7,[2],[]):N(),!0}function A(){l(),N();for(var y=!1;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(y||p(4,[],[]),h(","),N(),n.getToken()===4&&b)break}else y&&p(6,[],[]);w()||p(4,[],[4,5]),y=!0}return c(),n.getToken()!==4?p(8,[4],[]):N(),!0}function w(){switch(n.getToken()){case 3:return A();case 1:return S();case 10:return g(!0);default:return _()}}return N(),n.getToken()===17?r.allowEmptyContent?!0:(p(4,[],[]),!1):w()?(n.getToken()!==17&&p(9,[],[]),!0):(p(4,[],[]),!1)}var Ze=fr,Zs=Js,Ks=qn,ea=Wn,ta=dr;function ra(e,t,r){return Ys(e,t,r)}function ut(e,t){if(e===t)return!0;if(e==null||t===null||t===void 0||typeof e!=typeof t||typeof e!="object"||Array.isArray(e)!==Array.isArray(t))return!1;var r,n;if(Array.isArray(e)){if(e.length!==t.length)return!1;for(r=0;r<e.length;r++)if(!ut(e[r],t[r]))return!1}else{var i=[];for(n in e)i.push(n);i.sort();var s=[];for(n in t)s.push(n);if(s.sort(),!ut(i,s))return!1;for(r=0;r<i.length;r++)if(!ut(e[i[r]],t[i[r]]))return!1}return!0}function fe(e){return typeof e=="number"}function Ae(e){return typeof e!="undefined"}function Se(e){return typeof e=="boolean"}function na(e){return typeof e=="string"}function Hn(e,t){if(e.length<t.length)return!1;for(var r=0;r<t.length;r++)if(e[r]!==t[r])return!1;return!0}function lt(e,t){var r=e.length-t.length;return r>0?e.lastIndexOf(t)===r:r===0?e===t:!1}function kt(e){return Hn(e,"(?i)")?new RegExp(e.substring(4),"i"):new RegExp(e)}var Bn;(function(e){e.MIN_VALUE=-2147483648,e.MAX_VALUE=2147483647})(Bn||(Bn={}));var Tt;(function(e){e.MIN_VALUE=0,e.MAX_VALUE=2147483647})(Tt||(Tt={}));var pe;(function(e){function t(n,i){return n===Number.MAX_VALUE&&(n=Tt.MAX_VALUE),i===Number.MAX_VALUE&&(i=Tt.MAX_VALUE),{line:n,character:i}}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&C.uinteger(i.line)&&C.uinteger(i.character)}e.is=r})(pe||(pe={}));var q;(function(e){function t(n,i,s,a){if(C.uinteger(n)&&C.uinteger(i)&&C.uinteger(s)&&C.uinteger(a))return{start:pe.create(n,i),end:pe.create(s,a)};if(pe.is(n)&&pe.is(i))return{start:n,end:i};throw new Error("Range#create called with invalid arguments["+n+", "+i+", "+s+", "+a+"]")}e.create=t;function r(n){var i=n;return C.objectLiteral(i)&&pe.is(i.start)&&pe.is(i.end)}e.is=r})(q||(q={}));var ft;(function(e){function t(n,i){return{uri:n,range:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.string(i.uri)||C.undefined(i.uri))}e.is=r})(ft||(ft={}));var Yn;(function(e){function t(n,i,s,a){return{targetUri:n,targetRange:i,targetSelectionRange:s,originSelectionRange:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.targetRange)&&C.string(i.targetUri)&&(q.is(i.targetSelectionRange)||C.undefined(i.targetSelectionRange))&&(q.is(i.originSelectionRange)||C.undefined(i.originSelectionRange))}e.is=r})(Yn||(Yn={}));var gr;(function(e){function t(n,i,s,a){return{red:n,green:i,blue:s,alpha:a}}e.create=t;function r(n){var i=n;return C.numberRange(i.red,0,1)&&C.numberRange(i.green,0,1)&&C.numberRange(i.blue,0,1)&&C.numberRange(i.alpha,0,1)}e.is=r})(gr||(gr={}));var zn;(function(e){function t(n,i){return{range:n,color:i}}e.create=t;function r(n){var i=n;return q.is(i.range)&&gr.is(i.color)}e.is=r})(zn||(zn={}));var Gn;(function(e){function t(n,i,s){return{label:n,textEdit:i,additionalTextEdits:s}}e.create=t;function r(n){var i=n;return C.string(i.label)&&(C.undefined(i.textEdit)||ve.is(i))&&(C.undefined(i.additionalTextEdits)||C.typedArray(i.additionalTextEdits,ve.is))}e.is=r})(Gn||(Gn={}));var ct;(function(e){e.Comment="comment",e.Imports="imports",e.Region="region"})(ct||(ct={}));var Jn;(function(e){function t(n,i,s,a,o){var u={startLine:n,endLine:i};return C.defined(s)&&(u.startCharacter=s),C.defined(a)&&(u.endCharacter=a),C.defined(o)&&(u.kind=o),u}e.create=t;function r(n){var i=n;return C.uinteger(i.startLine)&&C.uinteger(i.startLine)&&(C.undefined(i.startCharacter)||C.uinteger(i.startCharacter))&&(C.undefined(i.endCharacter)||C.uinteger(i.endCharacter))&&(C.undefined(i.kind)||C.string(i.kind))}e.is=r})(Jn||(Jn={}));var mr;(function(e){function t(n,i){return{location:n,message:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&ft.is(i.location)&&C.string(i.message)}e.is=r})(mr||(mr={}));var ce;(function(e){e.Error=1,e.Warning=2,e.Information=3,e.Hint=4})(ce||(ce={}));var Qn;(function(e){e.Unnecessary=1,e.Deprecated=2})(Qn||(Qn={}));var Xn;(function(e){function t(r){var n=r;return n!=null&&C.string(n.href)}e.is=t})(Xn||(Xn={}));var we;(function(e){function t(n,i,s,a,o,u){var l={range:n,message:i};return C.defined(s)&&(l.severity=s),C.defined(a)&&(l.code=a),C.defined(o)&&(l.source=o),C.defined(u)&&(l.relatedInformation=u),l}e.create=t;function r(n){var i,s=n;return C.defined(s)&&q.is(s.range)&&C.string(s.message)&&(C.number(s.severity)||C.undefined(s.severity))&&(C.integer(s.code)||C.string(s.code)||C.undefined(s.code))&&(C.undefined(s.codeDescription)||C.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(C.string(s.source)||C.undefined(s.source))&&(C.undefined(s.relatedInformation)||C.typedArray(s.relatedInformation,mr.is))}e.is=r})(we||(we={}));var ht;(function(e){function t(n,i){for(var s=[],a=2;a<arguments.length;a++)s[a-2]=arguments[a];var o={title:n,command:i};return C.defined(s)&&s.length>0&&(o.arguments=s),o}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.title)&&C.string(i.command)}e.is=r})(ht||(ht={}));var ve;(function(e){function t(s,a){return{range:s,newText:a}}e.replace=t;function r(s,a){return{range:{start:s,end:s},newText:a}}e.insert=r;function n(s){return{range:s,newText:""}}e.del=n;function i(s){var a=s;return C.objectLiteral(a)&&C.string(a.newText)&&q.is(a.range)}e.is=i})(ve||(ve={}));var Ke;(function(e){function t(n,i,s){var a={label:n};return i!==void 0&&(a.needsConfirmation=i),s!==void 0&&(a.description=s),a}e.create=t;function r(n){var i=n;return i!==void 0&&C.objectLiteral(i)&&C.string(i.label)&&(C.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(C.string(i.description)||i.description===void 0)}e.is=r})(Ke||(Ke={}));var ne;(function(e){function t(r){var n=r;return typeof n=="string"}e.is=t})(ne||(ne={}));var Pe;(function(e){function t(s,a,o){return{range:s,newText:a,annotationId:o}}e.replace=t;function r(s,a,o){return{range:{start:s,end:s},newText:a,annotationId:o}}e.insert=r;function n(s,a){return{range:s,newText:"",annotationId:a}}e.del=n;function i(s){var a=s;return ve.is(a)&&(Ke.is(a.annotationId)||ne.is(a.annotationId))}e.is=i})(Pe||(Pe={}));var Pt;(function(e){function t(n,i){return{textDocument:n,edits:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&Et.is(i.textDocument)&&Array.isArray(i.edits)}e.is=r})(Pt||(Pt={}));var dt;(function(e){function t(n,i,s){var a={kind:"create",uri:n};return i!==void 0&&(i.overwrite!==void 0||i.ignoreIfExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="create"&&C.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(dt||(dt={}));var gt;(function(e){function t(n,i,s,a){var o={kind:"rename",oldUri:n,newUri:i};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(o.options=s),a!==void 0&&(o.annotationId=a),o}e.create=t;function r(n){var i=n;return i&&i.kind==="rename"&&C.string(i.oldUri)&&C.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||C.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||C.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(gt||(gt={}));var mt;(function(e){function t(n,i,s){var a={kind:"delete",uri:n};return i!==void 0&&(i.recursive!==void 0||i.ignoreIfNotExists!==void 0)&&(a.options=i),s!==void 0&&(a.annotationId=s),a}e.create=t;function r(n){var i=n;return i&&i.kind==="delete"&&C.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||C.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||C.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||ne.is(i.annotationId))}e.is=r})(mt||(mt={}));var pr;(function(e){function t(r){var n=r;return n&&(n.changes!==void 0||n.documentChanges!==void 0)&&(n.documentChanges===void 0||n.documentChanges.every(function(i){return C.string(i.kind)?dt.is(i)||gt.is(i)||mt.is(i):Pt.is(i)}))}e.is=t})(pr||(pr={}));var Mt=function(){function e(t,r){this.edits=t,this.changeAnnotations=r}return e.prototype.insert=function(t,r,n){var i,s;if(n===void 0?i=ve.insert(t,r):ne.is(n)?(s=n,i=Pe.insert(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.insert(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.replace=function(t,r,n){var i,s;if(n===void 0?i=ve.replace(t,r):ne.is(n)?(s=n,i=Pe.replace(t,r,n)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(n),i=Pe.replace(t,r,s)),this.edits.push(i),s!==void 0)return s},e.prototype.delete=function(t,r){var n,i;if(r===void 0?n=ve.del(t):ne.is(r)?(i=r,n=Pe.del(t,r)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(r),n=Pe.del(t,i)),this.edits.push(n),i!==void 0)return i},e.prototype.add=function(t){this.edits.push(t)},e.prototype.all=function(){return this.edits},e.prototype.clear=function(){this.edits.splice(0,this.edits.length)},e.prototype.assertChangeAnnotations=function(t){if(t===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},e}(),Zn=function(){function e(t){this._annotations=t===void 0?Object.create(null):t,this._counter=0,this._size=0}return e.prototype.all=function(){return this._annotations},Object.defineProperty(e.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),e.prototype.manage=function(t,r){var n;if(ne.is(t)?n=t:(n=this.nextId(),r=t),this._annotations[n]!==void 0)throw new Error("Id "+n+" is already in use.");if(r===void 0)throw new Error("No annotation provided for id "+n);return this._annotations[n]=r,this._size++,n},e.prototype.nextId=function(){return this._counter++,this._counter.toString()},e}();(function(){function e(t){var r=this;this._textEditChanges=Object.create(null),t!==void 0?(this._workspaceEdit=t,t.documentChanges?(this._changeAnnotations=new Zn(t.changeAnnotations),t.changeAnnotations=this._changeAnnotations.all(),t.documentChanges.forEach(function(n){if(Pt.is(n)){var i=new Mt(n.edits,r._changeAnnotations);r._textEditChanges[n.textDocument.uri]=i}})):t.changes&&Object.keys(t.changes).forEach(function(n){var i=new Mt(t.changes[n]);r._textEditChanges[n]=i})):this._workspaceEdit={}}return Object.defineProperty(e.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),e.prototype.getTextEditChange=function(t){if(Et.is(t)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var r={uri:t.uri,version:t.version},n=this._textEditChanges[r.uri];if(!n){var i=[],s={textDocument:r,edits:i};this._workspaceEdit.documentChanges.push(s),n=new Mt(i,this._changeAnnotations),this._textEditChanges[r.uri]=n}return n}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var n=this._textEditChanges[t];if(!n){var i=[];this._workspaceEdit.changes[t]=i,n=new Mt(i),this._textEditChanges[t]=n}return n}},e.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Zn,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},e.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},e.prototype.createFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ke.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=dt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=dt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e.prototype.renameFile=function(t,r,n,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Ke.is(n)||ne.is(n)?s=n:i=n;var a,o;if(s===void 0?a=gt.create(t,r,i):(o=ne.is(s)?s:this._changeAnnotations.manage(s),a=gt.create(t,r,i,o)),this._workspaceEdit.documentChanges.push(a),o!==void 0)return o},e.prototype.deleteFile=function(t,r,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var i;Ke.is(r)||ne.is(r)?i=r:n=r;var s,a;if(i===void 0?s=mt.create(t,n):(a=ne.is(i)?i:this._changeAnnotations.manage(i),s=mt.create(t,n,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a},e})();var Kn;(function(e){function t(n){return{uri:n}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)}e.is=r})(Kn||(Kn={}));var ei;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.integer(i.version)}e.is=r})(ei||(ei={}));var Et;(function(e){function t(n,i){return{uri:n,version:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&(i.version===null||C.integer(i.version))}e.is=r})(Et||(Et={}));var ti;(function(e){function t(n,i,s,a){return{uri:n,languageId:i,version:s,text:a}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.string(i.uri)&&C.string(i.languageId)&&C.integer(i.version)&&C.string(i.text)}e.is=r})(ti||(ti={}));var Ne;(function(e){e.PlainText="plaintext",e.Markdown="markdown"})(Ne||(Ne={})),function(e){function t(r){var n=r;return n===e.PlainText||n===e.Markdown}e.is=t}(Ne||(Ne={}));var vr;(function(e){function t(r){var n=r;return C.objectLiteral(r)&&Ne.is(n.kind)&&C.string(n.value)}e.is=t})(vr||(vr={}));var he;(function(e){e.Text=1,e.Method=2,e.Function=3,e.Constructor=4,e.Field=5,e.Variable=6,e.Class=7,e.Interface=8,e.Module=9,e.Property=10,e.Unit=11,e.Value=12,e.Enum=13,e.Keyword=14,e.Snippet=15,e.Color=16,e.File=17,e.Reference=18,e.Folder=19,e.EnumMember=20,e.Constant=21,e.Struct=22,e.Event=23,e.Operator=24,e.TypeParameter=25})(he||(he={}));var X;(function(e){e.PlainText=1,e.Snippet=2})(X||(X={}));var ri;(function(e){e.Deprecated=1})(ri||(ri={}));var ni;(function(e){function t(n,i,s){return{newText:n,insert:i,replace:s}}e.create=t;function r(n){var i=n;return i&&C.string(i.newText)&&q.is(i.insert)&&q.is(i.replace)}e.is=r})(ni||(ni={}));var ii;(function(e){e.asIs=1,e.adjustIndentation=2})(ii||(ii={}));var br;(function(e){function t(r){return{label:r}}e.create=t})(br||(br={}));var si;(function(e){function t(r,n){return{items:r||[],isIncomplete:!!n}}e.create=t})(si||(si={}));var It;(function(e){function t(n){return n.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}e.fromPlainText=t;function r(n){var i=n;return C.string(i)||C.objectLiteral(i)&&C.string(i.language)&&C.string(i.value)}e.is=r})(It||(It={}));var ai;(function(e){function t(r){var n=r;return!!n&&C.objectLiteral(n)&&(vr.is(n.contents)||It.is(n.contents)||C.typedArray(n.contents,It.is))&&(r.range===void 0||q.is(r.range))}e.is=t})(ai||(ai={}));var oi;(function(e){function t(r,n){return n?{label:r,documentation:n}:{label:r}}e.create=t})(oi||(oi={}));var ui;(function(e){function t(r,n){for(var i=[],s=2;s<arguments.length;s++)i[s-2]=arguments[s];var a={label:r};return C.defined(n)&&(a.documentation=n),C.defined(i)?a.parameters=i:a.parameters=[],a}e.create=t})(ui||(ui={}));var li;(function(e){e.Text=1,e.Read=2,e.Write=3})(li||(li={}));var fi;(function(e){function t(r,n){var i={range:r};return C.number(n)&&(i.kind=n),i}e.create=t})(fi||(fi={}));var _e;(function(e){e.File=1,e.Module=2,e.Namespace=3,e.Package=4,e.Class=5,e.Method=6,e.Property=7,e.Field=8,e.Constructor=9,e.Enum=10,e.Interface=11,e.Function=12,e.Variable=13,e.Constant=14,e.String=15,e.Number=16,e.Boolean=17,e.Array=18,e.Object=19,e.Key=20,e.Null=21,e.EnumMember=22,e.Struct=23,e.Event=24,e.Operator=25,e.TypeParameter=26})(_e||(_e={}));var ci;(function(e){e.Deprecated=1})(ci||(ci={}));var hi;(function(e){function t(r,n,i,s,a){var o={name:r,kind:n,location:{uri:s,range:i}};return a&&(o.containerName=a),o}e.create=t})(hi||(hi={}));var di;(function(e){function t(n,i,s,a,o,u){var l={name:n,detail:i,kind:s,range:a,selectionRange:o};return u!==void 0&&(l.children=u),l}e.create=t;function r(n){var i=n;return i&&C.string(i.name)&&C.number(i.kind)&&q.is(i.range)&&q.is(i.selectionRange)&&(i.detail===void 0||C.string(i.detail))&&(i.deprecated===void 0||C.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}e.is=r})(di||(di={}));var gi;(function(e){e.Empty="",e.QuickFix="quickfix",e.Refactor="refactor",e.RefactorExtract="refactor.extract",e.RefactorInline="refactor.inline",e.RefactorRewrite="refactor.rewrite",e.Source="source",e.SourceOrganizeImports="source.organizeImports",e.SourceFixAll="source.fixAll"})(gi||(gi={}));var mi;(function(e){function t(n,i){var s={diagnostics:n};return i!=null&&(s.only=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&C.typedArray(i.diagnostics,we.is)&&(i.only===void 0||C.typedArray(i.only,C.string))}e.is=r})(mi||(mi={}));var pi;(function(e){function t(n,i,s){var a={title:n},o=!0;return typeof i=="string"?(o=!1,a.kind=i):ht.is(i)?a.command=i:a.edit=i,o&&s!==void 0&&(a.kind=s),a}e.create=t;function r(n){var i=n;return i&&C.string(i.title)&&(i.diagnostics===void 0||C.typedArray(i.diagnostics,we.is))&&(i.kind===void 0||C.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||ht.is(i.command))&&(i.isPreferred===void 0||C.boolean(i.isPreferred))&&(i.edit===void 0||pr.is(i.edit))}e.is=r})(pi||(pi={}));var vi;(function(e){function t(n,i){var s={range:n};return C.defined(i)&&(s.data=i),s}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.command)||ht.is(i.command))}e.is=r})(vi||(vi={}));var bi;(function(e){function t(n,i){return{tabSize:n,insertSpaces:i}}e.create=t;function r(n){var i=n;return C.defined(i)&&C.uinteger(i.tabSize)&&C.boolean(i.insertSpaces)}e.is=r})(bi||(bi={}));var yi;(function(e){function t(n,i,s){return{range:n,target:i,data:s}}e.create=t;function r(n){var i=n;return C.defined(i)&&q.is(i.range)&&(C.undefined(i.target)||C.string(i.target))}e.is=r})(yi||(yi={}));var Ft;(function(e){function t(n,i){return{range:n,parent:i}}e.create=t;function r(n){var i=n;return i!==void 0&&q.is(i.range)&&(i.parent===void 0||e.is(i.parent))}e.is=r})(Ft||(Ft={}));var Si;(function(e){function t(s,a,o,u){return new ia(s,a,o,u)}e.create=t;function r(s){var a=s;return!!(C.defined(a)&&C.string(a.uri)&&(C.undefined(a.languageId)||C.string(a.languageId))&&C.uinteger(a.lineCount)&&C.func(a.getText)&&C.func(a.positionAt)&&C.func(a.offsetAt))}e.is=r;function n(s,a){for(var o=s.getText(),u=i(a,function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),l=o.length,c=u.length-1;c>=0;c--){var f=u[c],h=s.offsetAt(f.range.start),d=s.offsetAt(f.range.end);if(d<=l)o=o.substring(0,h)+f.newText+o.substring(d,o.length);else throw new Error("Overlapping edit");l=h}return o}e.applyEdits=n;function i(s,a){if(s.length<=1)return s;var o=s.length/2|0,u=s.slice(0,o),l=s.slice(o);i(u,a),i(l,a);for(var c=0,f=0,h=0;c<u.length&&f<l.length;){var d=a(u[c],l[f]);d<=0?s[h++]=u[c++]:s[h++]=l[f++]}for(;c<u.length;)s[h++]=u[c++];for(;f<l.length;)s[h++]=l[f++];return s}})(Si||(Si={}));var ia=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){this._content=t.text,this._version=r,this._lineOffsets=void 0},e.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var t=[],r=this._content,n=!0,i=0;i<r.length;i++){n&&(t.push(i),n=!1);var s=r.charAt(i);n=s==="\r"||s===` -`,s==="\r"&&i+1<r.length&&r.charAt(i+1)===` -`&&i++}n&&r.length>0&&t.push(r.length),this._lineOffsets=t}return this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return pe.create(0,t);for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return pe.create(a,t-r[a])},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),e}(),C;(function(e){var t=Object.prototype.toString;function r(d){return typeof d!="undefined"}e.defined=r;function n(d){return typeof d=="undefined"}e.undefined=n;function i(d){return d===!0||d===!1}e.boolean=i;function s(d){return t.call(d)==="[object String]"}e.string=s;function a(d){return t.call(d)==="[object Number]"}e.number=a;function o(d,m,v){return t.call(d)==="[object Number]"&&m<=d&&d<=v}e.numberRange=o;function u(d){return t.call(d)==="[object Number]"&&-2147483648<=d&&d<=2147483647}e.integer=u;function l(d){return t.call(d)==="[object Number]"&&0<=d&&d<=2147483647}e.uinteger=l;function c(d){return t.call(d)==="[object Function]"}e.func=c;function f(d){return d!==null&&typeof d=="object"}e.objectLiteral=f;function h(d,m){return Array.isArray(d)&&d.every(m)}e.typedArray=h})(C||(C={}));var _i=function(){function e(t,r,n,i){this._uri=t,this._languageId=r,this._version=n,this._content=i,this._lineOffsets=void 0}return Object.defineProperty(e.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),e.prototype.getText=function(t){if(t){var r=this.offsetAt(t.start),n=this.offsetAt(t.end);return this._content.substring(r,n)}return this._content},e.prototype.update=function(t,r){for(var n=0,i=t;n<i.length;n++){var s=i[n];if(e.isIncremental(s)){var a=wi(s.range),o=this.offsetAt(a.start),u=this.offsetAt(a.end);this._content=this._content.substring(0,o)+s.text+this._content.substring(u,this._content.length);var l=Math.max(a.start.line,0),c=Math.max(a.end.line,0),f=this._lineOffsets,h=Ai(s.text,!1,o);if(c-l===h.length)for(var d=0,m=h.length;d<m;d++)f[d+l+1]=h[d];else h.length<1e4?f.splice.apply(f,[l+1,c-l].concat(h)):this._lineOffsets=f=f.slice(0,l+1).concat(h,f.slice(c+1));var v=s.text.length-(u-o);if(v!==0)for(var d=l+1+h.length,m=f.length;d<m;d++)f[d]=f[d]+v}else if(e.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=r},e.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=Ai(this._content,!0)),this._lineOffsets},e.prototype.positionAt=function(t){t=Math.max(Math.min(t,this._content.length),0);var r=this.getLineOffsets(),n=0,i=r.length;if(i===0)return{line:0,character:t};for(;n<i;){var s=Math.floor((n+i)/2);r[s]>t?i=s:n=s+1}var a=n-1;return{line:a,character:t-r[a]}},e.prototype.offsetAt=function(t){var r=this.getLineOffsets();if(t.line>=r.length)return this._content.length;if(t.line<0)return 0;var n=r[t.line],i=t.line+1<r.length?r[t.line+1]:this._content.length;return Math.max(Math.min(n+t.character,i),n)},Object.defineProperty(e.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),e.isIncremental=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range!==void 0&&(r.rangeLength===void 0||typeof r.rangeLength=="number")},e.isFull=function(t){var r=t;return r!=null&&typeof r.text=="string"&&r.range===void 0&&r.rangeLength===void 0},e}(),yr;(function(e){function t(i,s,a,o){return new _i(i,s,a,o)}e.create=t;function r(i,s,a){if(i instanceof _i)return i.update(s,a),i;throw new Error("TextDocument.update: document must be created by TextDocument.create")}e.update=r;function n(i,s){for(var a=i.getText(),o=Sr(s.map(sa),function(m,v){var b=m.range.start.line-v.range.start.line;return b===0?m.range.start.character-v.range.start.character:b}),u=0,l=[],c=0,f=o;c<f.length;c++){var h=f[c],d=i.offsetAt(h.range.start);if(d<u)throw new Error("Overlapping edit");d>u&&l.push(a.substring(u,d)),h.newText.length&&l.push(h.newText),u=i.offsetAt(h.range.end)}return l.push(a.substr(u)),l.join("")}e.applyEdits=n})(yr||(yr={}));function Sr(e,t){if(e.length<=1)return e;var r=e.length/2|0,n=e.slice(0,r),i=e.slice(r);Sr(n,t),Sr(i,t);for(var s=0,a=0,o=0;s<n.length&&a<i.length;){var u=t(n[s],i[a]);u<=0?e[o++]=n[s++]:e[o++]=i[a++]}for(;s<n.length;)e[o++]=n[s++];for(;a<i.length;)e[o++]=i[a++];return e}function Ai(e,t,r){r===void 0&&(r=0);for(var n=t?[r]:[],i=0;i<e.length;i++){var s=e.charCodeAt(i);(s===13||s===10)&&(s===13&&i+1<e.length&&e.charCodeAt(i+1)===10&&i++,n.push(r+i+1))}return n}function wi(e){var t=e.start,r=e.end;return t.line>r.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function sa(e){var t=wi(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var W;(function(e){e[e.Undefined=0]="Undefined",e[e.EnumValueMismatch=1]="EnumValueMismatch",e[e.Deprecated=2]="Deprecated",e[e.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=258]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",e[e.InvalidUnicode=260]="InvalidUnicode",e[e.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",e[e.InvalidCharacter=262]="InvalidCharacter",e[e.PropertyExpected=513]="PropertyExpected",e[e.CommaExpected=514]="CommaExpected",e[e.ColonExpected=515]="ColonExpected",e[e.ValueExpected=516]="ValueExpected",e[e.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",e[e.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",e[e.TrailingComma=519]="TrailingComma",e[e.DuplicateKey=520]="DuplicateKey",e[e.CommentNotPermitted=521]="CommentNotPermitted",e[e.SchemaResolveError=768]="SchemaResolveError"})(W||(W={}));var Ni;(function(e){e.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Ne.Markdown,Ne.PlainText],commitCharactersSupport:!0}}}}})(Ni||(Ni={}));function aa(e,t){var r;return t.length===0?r=e:r=e.replace(/\{(\d+)\}/g,function(n,i){var s=i[0];return typeof t[s]!="undefined"?t[s]:n}),r}function oa(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return aa(t,r)}function pt(e){return oa}var Ve=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),D=pt(),ua={"color-hex":{errorMessage:D("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),pattern:/^#([0-9A-Fa-f]{3,4}|([0-9A-Fa-f]{2}){3,4})$/},"date-time":{errorMessage:D("dateTimeFormatWarning","String is not a RFC3339 date-time."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},date:{errorMessage:D("dateFormatWarning","String is not a RFC3339 date."),pattern:/^(\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])$/i},time:{errorMessage:D("timeFormatWarning","String is not a RFC3339 time."),pattern:/^([01][0-9]|2[0-3]):([0-5][0-9]):([0-5][0-9]|60)(\.[0-9]+)?(Z|(\+|-)([01][0-9]|2[0-3]):([0-5][0-9]))$/i},email:{errorMessage:D("emailFormatWarning","String is not an e-mail address."),pattern:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/}},$e=function(){function e(t,r,n){n===void 0&&(n=0),this.offset=r,this.length=n,this.parent=t}return Object.defineProperty(e.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},e}(),la=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="null",i.value=null,i}return t}($e),Li=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,i)||this;return s.type="boolean",s.value=n,s}return t}($e),fa=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="array",i.items=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),t}($e),ca=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="number",i.isInteger=!0,i.value=Number.NaN,i}return t}($e),_r=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,n,i)||this;return s.type="string",s.value="",s}return t}($e),ha=function(e){Ve(t,e);function t(r,n,i){var s=e.call(this,r,n)||this;return s.type="property",s.colonOffset=-1,s.keyNode=i,s}return Object.defineProperty(t.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),t}($e),da=function(e){Ve(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.type="object",i.properties=[],i}return Object.defineProperty(t.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),t}($e);function oe(e){return Se(e)?e?{}:{not:{}}:e}var Ci;(function(e){e[e.Key=0]="Key",e[e.Enum=1]="Enum"})(Ci||(Ci={}));var ga=function(){function e(t,r){t===void 0&&(t=-1),this.focusOffset=t,this.exclude=r,this.schemas=[]}return e.prototype.add=function(t){this.schemas.push(t)},e.prototype.merge=function(t){Array.prototype.push.apply(this.schemas,t.schemas)},e.prototype.include=function(t){return(this.focusOffset===-1||xi(t,this.focusOffset))&&t!==this.exclude},e.prototype.newSub=function(){return new e(-1,this.exclude)},e}(),Ar=function(){function e(){}return Object.defineProperty(e.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.add=function(t){},e.prototype.merge=function(t){},e.prototype.include=function(t){return!0},e.prototype.newSub=function(){return this},e.instance=new e,e}(),ue=function(){function e(){this.problems=[],this.propertiesMatches=0,this.propertiesValueMatches=0,this.primaryValueMatches=0,this.enumValueMatch=!1,this.enumValues=void 0}return e.prototype.hasProblems=function(){return!!this.problems.length},e.prototype.mergeAll=function(t){for(var r=0,n=t;r<n.length;r++){var i=n[r];this.merge(i)}},e.prototype.merge=function(t){this.problems=this.problems.concat(t.problems)},e.prototype.mergeEnumValues=function(t){if(!this.enumValueMatch&&!t.enumValueMatch&&this.enumValues&&t.enumValues){this.enumValues=this.enumValues.concat(t.enumValues);for(var r=0,n=this.problems;r<n.length;r++){var i=n[r];i.code===W.EnumValueMismatch&&(i.message=D("enumWarning","Value is not accepted. Valid values: {0}.",this.enumValues.map(function(s){return JSON.stringify(s)}).join(", ")))}}},e.prototype.mergePropertyMatch=function(t){this.merge(t),this.propertiesMatches++,(t.enumValueMatch||!t.hasProblems()&&t.propertiesMatches)&&this.propertiesValueMatches++,t.enumValueMatch&&t.enumValues&&t.enumValues.length===1&&this.primaryValueMatches++},e.prototype.compare=function(t){var r=this.hasProblems();return r!==t.hasProblems()?r?-1:1:this.enumValueMatch!==t.enumValueMatch?t.enumValueMatch?-1:1:this.primaryValueMatches!==t.primaryValueMatches?this.primaryValueMatches-t.primaryValueMatches:this.propertiesValueMatches!==t.propertiesValueMatches?this.propertiesValueMatches-t.propertiesValueMatches:this.propertiesMatches-t.propertiesMatches},e}();function ma(e,t){return t===void 0&&(t=[]),new ki(e,t,[])}function Me(e){return ta(e)}function wr(e){return ea(e)}function xi(e,t,r){return r===void 0&&(r=!1),t>=e.offset&&t<e.offset+e.length||r&&t===e.offset+e.length}var ki=function(){function e(t,r,n){r===void 0&&(r=[]),n===void 0&&(n=[]),this.root=t,this.syntaxErrors=r,this.comments=n}return e.prototype.getNodeFromOffset=function(t,r){if(r===void 0&&(r=!1),this.root)return Ks(this.root,t,r)},e.prototype.visit=function(t){if(this.root){var r=function(n){var i=t(n),s=n.children;if(Array.isArray(s))for(var a=0;a<s.length&&i;a++)i=r(s[a]);return i};r(this.root)}},e.prototype.validate=function(t,r,n){if(n===void 0&&(n=ce.Warning),this.root&&r){var i=new ue;return te(this.root,r,i,Ar.instance),i.problems.map(function(s){var a,o=q.create(t.positionAt(s.location.offset),t.positionAt(s.location.offset+s.location.length));return we.create(o,s.message,(a=s.severity)!==null&&a!==void 0?a:n,s.code)})}},e.prototype.getMatchingSchemas=function(t,r,n){r===void 0&&(r=-1);var i=new ga(r,n);return this.root&&t&&te(this.root,t,new ue,i),i.schemas},e}();function te(e,t,r,n){if(!e||!n.include(e))return;var i=e;switch(i.type){case"object":l(i,t,r,n);break;case"array":u(i,t,r,n);break;case"string":o(i,t,r);break;case"number":a(i,t,r);break;case"property":return te(i.valueNode,t,r,n)}s(),n.add({node:i,schema:t});function s(){function c(F){return i.type===F||F==="integer"&&i.type==="number"&&i.isInteger}if(Array.isArray(t.type)?t.type.some(c)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||D("typeArrayMismatchWarning","Incorrect type. Expected one of {0}.",t.type.join(", "))}):t.type&&(c(t.type)||r.problems.push({location:{offset:i.offset,length:i.length},message:t.errorMessage||D("typeMismatchWarning",'Incorrect type. Expected "{0}".',t.type)})),Array.isArray(t.allOf))for(var f=0,h=t.allOf;f<h.length;f++){var d=h[f];te(i,oe(d),r,n)}var m=oe(t.not);if(m){var v=new ue,b=n.newSub();te(i,m,v,b),v.hasProblems()||r.problems.push({location:{offset:i.offset,length:i.length},message:D("notSchemaWarning","Matches a schema that is not allowed.")});for(var N=0,p=b.schemas;N<p.length;N++){var g=p[N];g.inverted=!g.inverted,n.add(g)}}var _=function(F,V){for(var z=[],P=void 0,x=0,E=F;x<E.length;x++){var I=E[x],$=oe(I),j=new ue,O=n.newSub();if(te(i,$,j,O),j.hasProblems()||z.push($),!P)P={schema:$,validationResult:j,matchingSchemas:O};else if(!V&&!j.hasProblems()&&!P.validationResult.hasProblems())P.matchingSchemas.merge(O),P.validationResult.propertiesMatches+=j.propertiesMatches,P.validationResult.propertiesValueMatches+=j.propertiesValueMatches;else{var B=j.compare(P.validationResult);B>0?P={schema:$,validationResult:j,matchingSchemas:O}:B===0&&(P.matchingSchemas.merge(O),P.validationResult.mergeEnumValues(j))}}return z.length>1&&V&&r.problems.push({location:{offset:i.offset,length:1},message:D("oneOfWarning","Matches multiple schemas when only one must validate.")}),P&&(r.merge(P.validationResult),r.propertiesMatches+=P.validationResult.propertiesMatches,r.propertiesValueMatches+=P.validationResult.propertiesValueMatches,n.merge(P.matchingSchemas)),z.length};Array.isArray(t.anyOf)&&_(t.anyOf,!1),Array.isArray(t.oneOf)&&_(t.oneOf,!0);var L=function(F){var V=new ue,z=n.newSub();te(i,oe(F),V,z),r.merge(V),r.propertiesMatches+=V.propertiesMatches,r.propertiesValueMatches+=V.propertiesValueMatches,n.merge(z)},S=function(F,V,z){var P=oe(F),x=new ue,E=n.newSub();te(i,P,x,E),n.merge(E),x.hasProblems()?z&&L(z):V&&L(V)},A=oe(t.if);if(A&&S(A,oe(t.then),oe(t.else)),Array.isArray(t.enum)){for(var w=Me(i),y=!1,T=0,M=t.enum;T<M.length;T++){var k=M[T];if(ut(w,k)){y=!0;break}}r.enumValues=t.enum,r.enumValueMatch=y,y||r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||D("enumWarning","Value is not accepted. Valid values: {0}.",t.enum.map(function(F){return JSON.stringify(F)}).join(", "))})}if(Ae(t.const)){var w=Me(i);ut(w,t.const)?r.enumValueMatch=!0:(r.problems.push({location:{offset:i.offset,length:i.length},code:W.EnumValueMismatch,message:t.errorMessage||D("constWarning","Value must be {0}.",JSON.stringify(t.const))}),r.enumValueMatch=!1),r.enumValues=[t.const]}t.deprecationMessage&&i.parent&&r.problems.push({location:{offset:i.parent.offset,length:i.parent.length},severity:ce.Warning,message:t.deprecationMessage,code:W.Deprecated})}function a(c,f,h,d){var m=c.value;function v(T){var M,k=/^(-?\d+)(?:\.(\d+))?(?:e([-+]\d+))?$/.exec(T.toString());return k&&{value:Number(k[1]+(k[2]||"")),multiplier:(((M=k[2])===null||M===void 0?void 0:M.length)||0)-(parseInt(k[3])||0)}}if(fe(f.multipleOf)){var b=-1;if(Number.isInteger(f.multipleOf))b=m%f.multipleOf;else{var N=v(f.multipleOf),p=v(m);if(N&&p){var g=Math.pow(10,Math.abs(p.multiplier-N.multiplier));p.multiplier<N.multiplier?p.value*=g:N.value*=g,b=p.value%N.value}}b!==0&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("multipleOfWarning","Value is not divisible by {0}.",f.multipleOf)})}function _(T,M){if(fe(M))return M;if(Se(M)&&M)return T}function L(T,M){if(!Se(M)||!M)return T}var S=_(f.minimum,f.exclusiveMinimum);fe(S)&&m<=S&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("exclusiveMinimumWarning","Value is below the exclusive minimum of {0}.",S)});var A=_(f.maximum,f.exclusiveMaximum);fe(A)&&m>=A&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("exclusiveMaximumWarning","Value is above the exclusive maximum of {0}.",A)});var w=L(f.minimum,f.exclusiveMinimum);fe(w)&&m<w&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minimumWarning","Value is below the minimum of {0}.",w)});var y=L(f.maximum,f.exclusiveMaximum);fe(y)&&m>y&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maximumWarning","Value is above the maximum of {0}.",y)})}function o(c,f,h,d){if(fe(f.minLength)&&c.value.length<f.minLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minLengthWarning","String is shorter than the minimum length of {0}.",f.minLength)}),fe(f.maxLength)&&c.value.length>f.maxLength&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maxLengthWarning","String is longer than the maximum length of {0}.",f.maxLength)}),na(f.pattern)){var m=kt(f.pattern);m.test(c.value)||h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||D("patternWarning",'String does not match the pattern of "{0}".',f.pattern)})}if(f.format)switch(f.format){case"uri":case"uri-reference":{var v=void 0;if(!c.value)v=D("uriEmpty","URI expected.");else{var b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/.exec(c.value);b?!b[2]&&f.format==="uri"&&(v=D("uriSchemeMissing","URI with a scheme is expected.")):v=D("uriMissing","URI is expected.")}v&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||D("uriFormatWarning","String is not a URI: {0}",v)})}break;case"color-hex":case"date-time":case"date":case"time":case"email":var N=ua[f.format];(!c.value||!N.pattern.exec(c.value))&&h.problems.push({location:{offset:c.offset,length:c.length},message:f.patternErrorMessage||f.errorMessage||N.errorMessage})}}function u(c,f,h,d){if(Array.isArray(f.items)){for(var m=f.items,v=0;v<m.length;v++){var b=m[v],N=oe(b),p=new ue,g=c.items[v];g?(te(g,N,p,d),h.mergePropertyMatch(p)):c.items.length>=m.length&&h.propertiesValueMatches++}if(c.items.length>m.length)if(typeof f.additionalItems=="object")for(var _=m.length;_<c.items.length;_++){var p=new ue;te(c.items[_],f.additionalItems,p,d),h.mergePropertyMatch(p)}else f.additionalItems===!1&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("additionalItemsWarning","Array has too many items according to schema. Expected {0} or fewer.",m.length)})}else{var L=oe(f.items);if(L)for(var S=0,A=c.items;S<A.length;S++){var g=A[S],p=new ue;te(g,L,p,d),h.mergePropertyMatch(p)}}var w=oe(f.contains);if(w){var y=c.items.some(function(k){var F=new ue;return te(k,w,F,Ar.instance),!F.hasProblems()});y||h.problems.push({location:{offset:c.offset,length:c.length},message:f.errorMessage||D("requiredItemMissingWarning","Array does not contain required item.")})}if(fe(f.minItems)&&c.items.length<f.minItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("minItemsWarning","Array has too few items. Expected {0} or more.",f.minItems)}),fe(f.maxItems)&&c.items.length>f.maxItems&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("maxItemsWarning","Array has too many items. Expected {0} or fewer.",f.maxItems)}),f.uniqueItems===!0){var T=Me(c),M=T.some(function(k,F){return F!==T.lastIndexOf(k)});M&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("uniqueItemsWarning","Array has duplicate items.")})}}function l(c,f,h,d){for(var m=Object.create(null),v=[],b=0,N=c.properties;b<N.length;b++){var p=N[b],g=p.keyNode.value;m[g]=p.valueNode,v.push(g)}if(Array.isArray(f.required))for(var _=0,L=f.required;_<L.length;_++){var S=L[_];if(!m[S]){var A=c.parent&&c.parent.type==="property"&&c.parent.keyNode,w=A?{offset:A.offset,length:A.length}:{offset:c.offset,length:1};h.problems.push({location:w,message:D("MissingRequiredPropWarning",'Missing property "{0}".',S)})}}var y=function($i){for(var Dr=v.indexOf($i);Dr>=0;)v.splice(Dr,1),Dr=v.indexOf($i)};if(f.properties)for(var T=0,M=Object.keys(f.properties);T<M.length;T++){var S=M[T];y(S);var k=f.properties[S],F=m[S];if(F)if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,d),h.mergePropertyMatch(V)}}if(f.patternProperties)for(var z=0,P=Object.keys(f.patternProperties);z<P.length;z++)for(var x=P[z],E=kt(x),I=0,$=v.slice(0);I<$.length;I++){var S=$[I];if(E.test(S)){y(S);var F=m[S];if(F){var k=f.patternProperties[x];if(Se(k))if(k)h.propertiesMatches++,h.propertiesValueMatches++;else{var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}else{var V=new ue;te(F,k,V,d),h.mergePropertyMatch(V)}}}}if(typeof f.additionalProperties=="object")for(var j=0,O=v;j<O.length;j++){var S=O[j],F=m[S];if(F){var V=new ue;te(F,f.additionalProperties,V,d),h.mergePropertyMatch(V)}}else if(f.additionalProperties===!1&&v.length>0)for(var B=0,re=v;B<re.length;B++){var S=re[B],F=m[S];if(F){var p=F.parent;h.problems.push({location:{offset:p.keyNode.offset,length:p.keyNode.length},message:f.errorMessage||D("DisallowedExtraPropWarning","Property {0} is not allowed.",S)})}}if(fe(f.maxProperties)&&c.properties.length>f.maxProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("MaxPropWarning","Object has more properties than limit of {0}.",f.maxProperties)}),fe(f.minProperties)&&c.properties.length<f.minProperties&&h.problems.push({location:{offset:c.offset,length:c.length},message:D("MinPropWarning","Object has fewer properties than the required number of {0}",f.minProperties)}),f.dependencies)for(var de=0,qe=Object.keys(f.dependencies);de<qe.length;de++){var g=qe[de],De=m[g];if(De){var Er=f.dependencies[g];if(Array.isArray(Er))for(var Ir=0,Ui=Er;Ir<Ui.length;Ir++){var Ri=Ui[Ir];m[Ri]?h.propertiesValueMatches++:h.problems.push({location:{offset:c.offset,length:c.length},message:D("RequiredDependentPropWarning","Object is missing property {0} required by property {1}.",Ri,g)})}else{var k=oe(Er);if(k){var V=new ue;te(c,k,V,d),h.mergePropertyMatch(V)}}}}var Oi=oe(f.propertyNames);if(Oi)for(var Fr=0,Vi=c.properties;Fr<Vi.length;Fr++){var Xa=Vi[Fr],g=Xa.keyNode;g&&te(g,Oi,h,Ar.instance)}}}function pa(e,t){var r=[],n=-1,i=e.getText(),s=Ze(i,!1),a=t&&t.collectComments?[]:void 0;function o(){for(;;){var S=s.scan();switch(c(),S){case 12:case 13:Array.isArray(a)&&a.push(q.create(e.positionAt(s.getTokenOffset()),e.positionAt(s.getTokenOffset()+s.getTokenLength())));break;case 15:case 14:break;default:return S}}}function u(S,A,w,y,T){if(T===void 0&&(T=ce.Error),r.length===0||w!==n){var M=q.create(e.positionAt(w),e.positionAt(y));r.push(we.create(M,S,T,A,e.languageId)),n=w}}function l(S,A,w,y,T){w===void 0&&(w=void 0),y===void 0&&(y=[]),T===void 0&&(T=[]);var M=s.getTokenOffset(),k=s.getTokenOffset()+s.getTokenLength();if(M===k&&M>0){for(M--;M>0&&/\s/.test(i.charAt(M));)M--;k=M+1}if(u(S,A,M,k),w&&f(w,!1),y.length+T.length>0)for(var F=s.getToken();F!==17;){if(y.indexOf(F)!==-1){o();break}else if(T.indexOf(F)!==-1)break;F=o()}return w}function c(){switch(s.getTokenError()){case 4:return l(D("InvalidUnicode","Invalid unicode sequence in string."),W.InvalidUnicode),!0;case 5:return l(D("InvalidEscapeCharacter","Invalid escape character in string."),W.InvalidEscapeCharacter),!0;case 3:return l(D("UnexpectedEndOfNumber","Unexpected end of number."),W.UnexpectedEndOfNumber),!0;case 1:return l(D("UnexpectedEndOfComment","Unexpected end of comment."),W.UnexpectedEndOfComment),!0;case 2:return l(D("UnexpectedEndOfString","Unexpected end of string."),W.UnexpectedEndOfString),!0;case 6:return l(D("InvalidCharacter","Invalid characters in string. Control characters must be escaped."),W.InvalidCharacter),!0}return!1}function f(S,A){return S.length=s.getTokenOffset()+s.getTokenLength()-S.offset,A&&o(),S}function h(S){if(s.getToken()===3){var A=new fa(S,s.getTokenOffset());o();for(var w=!1;s.getToken()!==4&&s.getToken()!==17;){if(s.getToken()===5){w||l(D("ValueExpected","Value expected"),W.ValueExpected);var y=s.getTokenOffset();if(o(),s.getToken()===4){w&&u(D("TrailingComma","Trailing comma"),W.TrailingComma,y,y+1);continue}}else w&&l(D("ExpectedComma","Expected comma"),W.CommaExpected);var T=g(A);T?A.items.push(T):l(D("PropertyExpected","Value expected"),W.ValueExpected,void 0,[],[4,5]),w=!0}return s.getToken()!==4?l(D("ExpectedCloseBracket","Expected comma or closing bracket"),W.CommaOrCloseBacketExpected,A):f(A,!0)}}var d=new _r(void 0,0,0);function m(S,A){var w=new ha(S,s.getTokenOffset(),d),y=b(w);if(!y)if(s.getToken()===16){l(D("DoubleQuotesExpected","Property keys must be doublequoted"),W.Undefined);var T=new _r(w,s.getTokenOffset(),s.getTokenLength());T.value=s.getTokenValue(),y=T,o()}else return;w.keyNode=y;var M=A[y.value];if(M?(u(D("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,w.keyNode.offset,w.keyNode.offset+w.keyNode.length,ce.Warning),typeof M=="object"&&u(D("DuplicateKeyWarning","Duplicate object key"),W.DuplicateKey,M.keyNode.offset,M.keyNode.offset+M.keyNode.length,ce.Warning),A[y.value]=!0):A[y.value]=w,s.getToken()===6)w.colonOffset=s.getTokenOffset(),o();else if(l(D("ColonExpected","Colon expected"),W.ColonExpected),s.getToken()===10&&e.positionAt(y.offset+y.length).line<e.positionAt(s.getTokenOffset()).line)return w.length=y.length,w;var k=g(w);return k?(w.valueNode=k,w.length=k.offset+k.length-w.offset,w):l(D("ValueExpected","Value expected"),W.ValueExpected,w,[],[2,5])}function v(S){if(s.getToken()===1){var A=new da(S,s.getTokenOffset()),w=Object.create(null);o();for(var y=!1;s.getToken()!==2&&s.getToken()!==17;){if(s.getToken()===5){y||l(D("PropertyExpected","Property expected"),W.PropertyExpected);var T=s.getTokenOffset();if(o(),s.getToken()===2){y&&u(D("TrailingComma","Trailing comma"),W.TrailingComma,T,T+1);continue}}else y&&l(D("ExpectedComma","Expected comma"),W.CommaExpected);var M=m(A,w);M?A.properties.push(M):l(D("PropertyExpected","Property expected"),W.PropertyExpected,void 0,[],[2,5]),y=!0}return s.getToken()!==2?l(D("ExpectedCloseBrace","Expected comma or closing brace"),W.CommaOrCloseBraceExpected,A):f(A,!0)}}function b(S){if(s.getToken()===10){var A=new _r(S,s.getTokenOffset());return A.value=s.getTokenValue(),f(A,!0)}}function N(S){if(s.getToken()===11){var A=new ca(S,s.getTokenOffset());if(s.getTokenError()===0){var w=s.getTokenValue();try{var y=JSON.parse(w);if(!fe(y))return l(D("InvalidNumberFormat","Invalid number format."),W.Undefined,A);A.value=y}catch{return l(D("InvalidNumberFormat","Invalid number format."),W.Undefined,A)}A.isInteger=w.indexOf(".")===-1}return f(A,!0)}}function p(S){switch(s.getToken()){case 7:return f(new la(S,s.getTokenOffset()),!0);case 8:return f(new Li(S,!0,s.getTokenOffset()),!0);case 9:return f(new Li(S,!1,s.getTokenOffset()),!0);default:return}}function g(S){return h(S)||v(S)||b(S)||N(S)||p(S)}var _=void 0,L=o();return L!==17&&(_=g(_),_?s.getToken()!==17&&l(D("End of file expected","End of file expected."),W.Undefined):l(D("Invalid symbol","Expected a JSON object, array or literal."),W.Undefined)),new ki(_,r,a)}function Nr(e,t,r){if(e!==null&&typeof e=="object"){var n=t+" ";if(Array.isArray(e)){if(e.length===0)return"[]";for(var i=`[ -`,s=0;s<e.length;s++)i+=n+Nr(e[s],n,r),s<e.length-1&&(i+=","),i+=` -`;return i+=t+"]",i}else{var a=Object.keys(e);if(a.length===0)return"{}";for(var i=`{ -`,s=0;s<a.length;s++){var o=a[s];i+=n+JSON.stringify(o)+": "+Nr(e[o],n,r),s<a.length-1&&(i+=","),i+=` -`}return i+=t+"}",i}}return r(e)}var Lr=pt(),va=function(){function e(t,r,n,i){r===void 0&&(r=[]),n===void 0&&(n=Promise),i===void 0&&(i={}),this.schemaService=t,this.contributions=r,this.promiseConstructor=n,this.clientCapabilities=i}return e.prototype.doResolve=function(t){for(var r=this.contributions.length-1;r>=0;r--){var n=this.contributions[r].resolveCompletion;if(n){var i=n(t);if(i)return i}}return this.promiseConstructor.resolve(t)},e.prototype.doComplete=function(t,r,n){var i=this,s={items:[],isIncomplete:!1},a=t.getText(),o=t.offsetAt(r),u=n.getNodeFromOffset(o,!0);if(this.isInComment(t,u?u.offset:0,o))return Promise.resolve(s);if(u&&o===u.offset+u.length&&o>0){var l=a[o-1];(u.type==="object"&&l==="}"||u.type==="array"&&l==="]")&&(u=u.parent)}var c=this.getCurrentWord(t,o),f;if(u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null"))f=q.create(t.positionAt(u.offset),t.positionAt(u.offset+u.length));else{var h=o-c.length;h>0&&a[h-1]==='"'&&h--,f=q.create(t.positionAt(h),r)}var d={},m={add:function(v){var b=v.label,N=d[b];if(N)N.documentation||(N.documentation=v.documentation),N.detail||(N.detail=v.detail);else{if(b=b.replace(/[\n]/g,"\u21B5"),b.length>60){var p=b.substr(0,57).trim()+"...";d[p]||(b=p)}f&&v.insertText!==void 0&&(v.textEdit=ve.replace(f,v.insertText)),v.label=b,d[b]=v,s.items.push(v)}},setAsIncomplete:function(){s.isIncomplete=!0},error:function(v){console.error(v)},log:function(v){console.log(v)},getNumberOfProposals:function(){return s.items.length}};return this.schemaService.getSchemaForResource(t.uri,n).then(function(v){var b=[],N=!0,p="",g=void 0;if(u&&u.type==="string"){var _=u.parent;_&&_.type==="property"&&_.keyNode===u&&(N=!_.valueNode,g=_,p=a.substr(u.offset+1,u.length-2),_&&(u=_.parent))}if(u&&u.type==="object"){if(u.offset===o)return s;var L=u.properties;L.forEach(function(y){(!g||g!==y)&&(d[y.keyNode.value]=br.create("__"))});var S="";N&&(S=i.evaluateSeparatorAfter(t,t.offsetAt(f.end))),v?i.getPropertyCompletions(v,n,u,N,S,m):i.getSchemaLessPropertyCompletions(n,u,p,m);var A=wr(u);i.contributions.forEach(function(y){var T=y.collectPropertyCompletions(t.uri,A,c,N,S==="",m);T&&b.push(T)}),!v&&c.length>0&&a.charAt(o-c.length-1)!=='"'&&(m.add({kind:he.Property,label:i.getLabelForValue(c),insertText:i.getInsertTextForProperty(c,void 0,!1,S),insertTextFormat:X.Snippet,documentation:""}),m.setAsIncomplete())}var w={};return v?i.getValueCompletions(v,n,u,o,t,m,w):i.getSchemaLessValueCompletions(n,u,o,t,m),i.contributions.length>0&&i.getContributedValueCompletions(n,u,o,t,m,b),i.promiseConstructor.all(b).then(function(){if(m.getNumberOfProposals()===0){var y=o;u&&(u.type==="string"||u.type==="number"||u.type==="boolean"||u.type==="null")&&(y=u.offset+u.length);var T=i.evaluateSeparatorAfter(t,y);i.addFillerValueCompletions(w,T,m)}return s})})},e.prototype.getPropertyCompletions=function(t,r,n,i,s,a){var o=this,u=r.getMatchingSchemas(t.schema,n.offset);u.forEach(function(l){if(l.node===n&&!l.inverted){var c=l.schema.properties;c&&Object.keys(c).forEach(function(v){var b=c[v];if(typeof b=="object"&&!b.deprecationMessage&&!b.doNotSuggest){var N={kind:he.Property,label:v,insertText:o.getInsertTextForProperty(v,b,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:o.fromMarkup(b.markdownDescription)||b.description||""};b.suggestSortText!==void 0&&(N.sortText=b.suggestSortText),N.insertText&<(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)}});var f=l.schema.propertyNames;if(typeof f=="object"&&!f.deprecationMessage&&!f.doNotSuggest){var h=function(v,b){b===void 0&&(b=void 0);var N={kind:he.Property,label:v,insertText:o.getInsertTextForProperty(v,void 0,i,s),insertTextFormat:X.Snippet,filterText:o.getFilterTextForValue(v),documentation:b||o.fromMarkup(f.markdownDescription)||f.description||""};f.suggestSortText!==void 0&&(N.sortText=f.suggestSortText),N.insertText&<(N.insertText,"$1"+s)&&(N.command={title:"Suggest",command:"editor.action.triggerSuggest"}),a.add(N)};if(f.enum)for(var d=0;d<f.enum.length;d++){var m=void 0;f.markdownEnumDescriptions&&d<f.markdownEnumDescriptions.length?m=o.fromMarkup(f.markdownEnumDescriptions[d]):f.enumDescriptions&&d<f.enumDescriptions.length&&(m=f.enumDescriptions[d]),h(f.enum[d],m)}f.const&&h(f.const)}}})},e.prototype.getSchemaLessPropertyCompletions=function(t,r,n,i){var s=this,a=function(u){u.properties.forEach(function(l){var c=l.keyNode.value;i.add({kind:he.Property,label:c,insertText:s.getInsertTextForValue(c,""),insertTextFormat:X.Snippet,filterText:s.getFilterTextForValue(c),documentation:""})})};if(r.parent)if(r.parent.type==="property"){var o=r.parent.keyNode.value;t.visit(function(u){return u.type==="property"&&u!==r.parent&&u.keyNode.value===o&&u.valueNode&&u.valueNode.type==="object"&&a(u.valueNode),!0})}else r.parent.type==="array"&&r.parent.items.forEach(function(u){u.type==="object"&&u!==r&&a(u)});else r.type==="object"&&i.add({kind:he.Property,label:"$schema",insertText:this.getInsertTextForProperty("$schema",void 0,!0,""),insertTextFormat:X.Snippet,documentation:"",filterText:this.getFilterTextForValue("$schema")})},e.prototype.getSchemaLessValueCompletions=function(t,r,n,i,s){var a=this,o=n;if(r&&(r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(o=r.offset+r.length,r=r.parent),!r){s.add({kind:this.getSuggestionKind("object"),label:"Empty object",insertText:this.getInsertTextForValue({},""),insertTextFormat:X.Snippet,documentation:""}),s.add({kind:this.getSuggestionKind("array"),label:"Empty array",insertText:this.getInsertTextForValue([],""),insertTextFormat:X.Snippet,documentation:""});return}var u=this.evaluateSeparatorAfter(i,o),l=function(d){d.parent&&!xi(d.parent,n,!0)&&s.add({kind:a.getSuggestionKind(d.type),label:a.getLabelTextForMatchingNode(d,i),insertText:a.getInsertTextForMatchingNode(d,i,u),insertTextFormat:X.Snippet,documentation:""}),d.type==="boolean"&&a.addBooleanValueCompletion(!d.value,u,s)};if(r.type==="property"&&n>(r.colonOffset||0)){var c=r.valueNode;if(c&&(n>c.offset+c.length||c.type==="object"||c.type==="array"))return;var f=r.keyNode.value;t.visit(function(d){return d.type==="property"&&d.keyNode.value===f&&d.valueNode&&l(d.valueNode),!0}),f==="$schema"&&r.parent&&!r.parent.parent&&this.addDollarSchemaCompletions(u,s)}if(r.type==="array")if(r.parent&&r.parent.type==="property"){var h=r.parent.keyNode.value;t.visit(function(d){return d.type==="property"&&d.keyNode.value===h&&d.valueNode&&d.valueNode.type==="array"&&d.valueNode.items.forEach(l),!0})}else r.items.forEach(l)},e.prototype.getValueCompletions=function(t,r,n,i,s,a,o){var u=i,l=void 0,c=void 0;if(n&&(n.type==="string"||n.type==="number"||n.type==="boolean"||n.type==="null")&&(u=n.offset+n.length,c=n,n=n.parent),!n){this.addSchemaValueCompletions(t.schema,"",a,o);return}if(n.type==="property"&&i>(n.colonOffset||0)){var f=n.valueNode;if(f&&i>f.offset+f.length)return;l=n.keyNode.value,n=n.parent}if(n&&(l!==void 0||n.type==="array")){for(var h=this.evaluateSeparatorAfter(s,u),d=r.getMatchingSchemas(t.schema,n.offset,c),m=0,v=d;m<v.length;m++){var b=v[m];if(b.node===n&&!b.inverted&&b.schema){if(n.type==="array"&&b.schema.items)if(Array.isArray(b.schema.items)){var N=this.findItemAtOffset(n,s,i);N<b.schema.items.length&&this.addSchemaValueCompletions(b.schema.items[N],h,a,o)}else this.addSchemaValueCompletions(b.schema.items,h,a,o);if(l!==void 0){var p=!1;if(b.schema.properties){var g=b.schema.properties[l];g&&(p=!0,this.addSchemaValueCompletions(g,h,a,o))}if(b.schema.patternProperties&&!p)for(var _=0,L=Object.keys(b.schema.patternProperties);_<L.length;_++){var S=L[_],A=kt(S);if(A.test(l)){p=!0;var g=b.schema.patternProperties[S];this.addSchemaValueCompletions(g,h,a,o)}}if(b.schema.additionalProperties&&!p){var g=b.schema.additionalProperties;this.addSchemaValueCompletions(g,h,a,o)}}}}l==="$schema"&&!n.parent&&this.addDollarSchemaCompletions(h,a),o.boolean&&(this.addBooleanValueCompletion(!0,h,a),this.addBooleanValueCompletion(!1,h,a)),o.null&&this.addNullValueCompletion(h,a)}},e.prototype.getContributedValueCompletions=function(t,r,n,i,s,a){if(!r)this.contributions.forEach(function(c){var f=c.collectDefaultCompletions(i.uri,s);f&&a.push(f)});else if((r.type==="string"||r.type==="number"||r.type==="boolean"||r.type==="null")&&(r=r.parent),r&&r.type==="property"&&n>(r.colonOffset||0)){var o=r.keyNode.value,u=r.valueNode;if((!u||n<=u.offset+u.length)&&r.parent){var l=wr(r.parent);this.contributions.forEach(function(c){var f=c.collectValueCompletions(i.uri,l,o,s);f&&a.push(f)})}}},e.prototype.addSchemaValueCompletions=function(t,r,n,i){var s=this;typeof t=="object"&&(this.addEnumValueCompletions(t,r,n),this.addDefaultValueCompletions(t,r,n),this.collectTypes(t,i),Array.isArray(t.allOf)&&t.allOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.anyOf)&&t.anyOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}),Array.isArray(t.oneOf)&&t.oneOf.forEach(function(a){return s.addSchemaValueCompletions(a,r,n,i)}))},e.prototype.addDefaultValueCompletions=function(t,r,n,i){var s=this;i===void 0&&(i=0);var a=!1;if(Ae(t.default)){for(var o=t.type,u=t.default,l=i;l>0;l--)u=[u],o="array";n.add({kind:this.getSuggestionKind(o),label:this.getLabelForValue(u),insertText:this.getInsertTextForValue(u,r),insertTextFormat:X.Snippet,detail:Lr("json.suggest.default","Default value")}),a=!0}Array.isArray(t.examples)&&t.examples.forEach(function(c){for(var f=t.type,h=c,d=i;d>0;d--)h=[h],f="array";n.add({kind:s.getSuggestionKind(f),label:s.getLabelForValue(h),insertText:s.getInsertTextForValue(h,r),insertTextFormat:X.Snippet}),a=!0}),Array.isArray(t.defaultSnippets)&&t.defaultSnippets.forEach(function(c){var f=t.type,h=c.body,d=c.label,m,v;if(Ae(h)){t.type;for(var b=i;b>0;b--)h=[h];m=s.getInsertTextForSnippetValue(h,r),v=s.getFilterTextForSnippetValue(h),d=d||s.getLabelForSnippetValue(h)}else if(typeof c.bodyText=="string"){for(var N="",p="",g="",b=i;b>0;b--)N=N+g+`[ -`,p=p+` -`+g+"]",g+=" ",f="array";m=N+g+c.bodyText.split(` -`).join(` -`+g)+p+r,d=d||m,v=m.replace(/[\n]/g,"")}else return;n.add({kind:s.getSuggestionKind(f),label:d,documentation:s.fromMarkup(c.markdownDescription)||c.description,insertText:m,insertTextFormat:X.Snippet,filterText:v}),a=!0}),!a&&typeof t.items=="object"&&!Array.isArray(t.items)&&i<5&&this.addDefaultValueCompletions(t.items,r,n,i+1)},e.prototype.addEnumValueCompletions=function(t,r,n){if(Ae(t.const)&&n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(t.const),insertText:this.getInsertTextForValue(t.const,r),insertTextFormat:X.Snippet,documentation:this.fromMarkup(t.markdownDescription)||t.description}),Array.isArray(t.enum))for(var i=0,s=t.enum.length;i<s;i++){var a=t.enum[i],o=this.fromMarkup(t.markdownDescription)||t.description;t.markdownEnumDescriptions&&i<t.markdownEnumDescriptions.length&&this.doesSupportMarkdown()?o=this.fromMarkup(t.markdownEnumDescriptions[i]):t.enumDescriptions&&i<t.enumDescriptions.length&&(o=t.enumDescriptions[i]),n.add({kind:this.getSuggestionKind(t.type),label:this.getLabelForValue(a),insertText:this.getInsertTextForValue(a,r),insertTextFormat:X.Snippet,documentation:o})}},e.prototype.collectTypes=function(t,r){if(!(Array.isArray(t.enum)||Ae(t.const))){var n=t.type;Array.isArray(n)?n.forEach(function(i){return r[i]=!0}):n&&(r[n]=!0)}},e.prototype.addFillerValueCompletions=function(t,r,n){t.object&&n.add({kind:this.getSuggestionKind("object"),label:"{}",insertText:this.getInsertTextForGuessedValue({},r),insertTextFormat:X.Snippet,detail:Lr("defaults.object","New object"),documentation:""}),t.array&&n.add({kind:this.getSuggestionKind("array"),label:"[]",insertText:this.getInsertTextForGuessedValue([],r),insertTextFormat:X.Snippet,detail:Lr("defaults.array","New array"),documentation:""})},e.prototype.addBooleanValueCompletion=function(t,r,n){n.add({kind:this.getSuggestionKind("boolean"),label:t?"true":"false",insertText:this.getInsertTextForValue(t,r),insertTextFormat:X.Snippet,documentation:""})},e.prototype.addNullValueCompletion=function(t,r){r.add({kind:this.getSuggestionKind("null"),label:"null",insertText:"null"+t,insertTextFormat:X.Snippet,documentation:""})},e.prototype.addDollarSchemaCompletions=function(t,r){var n=this,i=this.schemaService.getRegisteredSchemaIds(function(s){return s==="http"||s==="https"});i.forEach(function(s){return r.add({kind:he.Module,label:n.getLabelForValue(s),filterText:n.getFilterTextForValue(s),insertText:n.getInsertTextForValue(s,t),insertTextFormat:X.Snippet,documentation:""})})},e.prototype.getLabelForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForValue=function(t){return JSON.stringify(t)},e.prototype.getFilterTextForSnippetValue=function(t){return JSON.stringify(t).replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getLabelForSnippetValue=function(t){var r=JSON.stringify(t);return r.replace(/\$\{\d+:([^}]+)\}|\$\d+/g,"$1")},e.prototype.getInsertTextForPlainText=function(t){return t.replace(/[\\\$\}]/g,"\\$&")},e.prototype.getInsertTextForValue=function(t,r){var n=JSON.stringify(t,null," ");return n==="{}"?"{$1}"+r:n==="[]"?"[$1]"+r:this.getInsertTextForPlainText(n+r)},e.prototype.getInsertTextForSnippetValue=function(t,r){var n=function(i){return typeof i=="string"&&i[0]==="^"?i.substr(1):JSON.stringify(i)};return Nr(t,"",n)+r},e.prototype.getInsertTextForGuessedValue=function(t,r){switch(typeof t){case"object":return t===null?"${1:null}"+r:this.getInsertTextForValue(t,r);case"string":var n=JSON.stringify(t);return n=n.substr(1,n.length-2),n=this.getInsertTextForPlainText(n),'"${1:'+n+'}"'+r;case"number":case"boolean":return"${1:"+JSON.stringify(t)+"}"+r}return this.getInsertTextForValue(t,r)},e.prototype.getSuggestionKind=function(t){if(Array.isArray(t)){var r=t;t=r.length>0?r[0]:void 0}if(!t)return he.Value;switch(t){case"string":return he.Value;case"object":return he.Module;case"property":return he.Property;default:return he.Value}},e.prototype.getLabelTextForMatchingNode=function(t,r){switch(t.type){case"array":return"[]";case"object":return"{}";default:var n=r.getText().substr(t.offset,t.length);return n}},e.prototype.getInsertTextForMatchingNode=function(t,r,n){switch(t.type){case"array":return this.getInsertTextForValue([],n);case"object":return this.getInsertTextForValue({},n);default:var i=r.getText().substr(t.offset,t.length)+n;return this.getInsertTextForPlainText(i)}},e.prototype.getInsertTextForProperty=function(t,r,n,i){var s=this.getInsertTextForValue(t,"");if(!n)return s;var a=s+": ",o,u=0;if(r){if(Array.isArray(r.defaultSnippets)){if(r.defaultSnippets.length===1){var l=r.defaultSnippets[0].body;Ae(l)&&(o=this.getInsertTextForSnippetValue(l,""))}u+=r.defaultSnippets.length}if(r.enum&&(!o&&r.enum.length===1&&(o=this.getInsertTextForGuessedValue(r.enum[0],"")),u+=r.enum.length),Ae(r.default)&&(o||(o=this.getInsertTextForGuessedValue(r.default,"")),u++),Array.isArray(r.examples)&&r.examples.length&&(o||(o=this.getInsertTextForGuessedValue(r.examples[0],"")),u+=r.examples.length),u===0){var c=Array.isArray(r.type)?r.type[0]:r.type;switch(c||(r.properties?c="object":r.items&&(c="array")),c){case"boolean":o="$1";break;case"string":o='"$1"';break;case"object":o="{$1}";break;case"array":o="[$1]";break;case"number":case"integer":o="${1:0}";break;case"null":o="${1:null}";break;default:return s}}}return(!o||u>1)&&(o="$1"),a+o+i},e.prototype.getCurrentWord=function(t,r){for(var n=r-1,i=t.getText();n>=0&&` -\r\v":{[,]}`.indexOf(i.charAt(n))===-1;)n--;return i.substring(n+1,r)},e.prototype.evaluateSeparatorAfter=function(t,r){var n=Ze(t.getText(),!0);n.setPosition(r);var i=n.scan();switch(i){case 5:case 2:case 4:case 17:return"";default:return","}},e.prototype.findItemAtOffset=function(t,r,n){for(var i=Ze(r.getText(),!0),s=t.items,a=s.length-1;a>=0;a--){var o=s[a];if(n>o.offset+o.length){i.setPosition(o.offset+o.length);var u=i.scan();return u===5&&n>=i.getTokenOffset()+i.getTokenLength()?a+1:a}else if(n>=o.offset)return a}return 0},e.prototype.isInComment=function(t,r,n){var i=Ze(t.getText(),!1);i.setPosition(r);for(var s=i.scan();s!==17&&i.getTokenOffset()+i.getTokenLength()<n;)s=i.scan();return(s===12||s===13)&&i.getTokenOffset()<=n},e.prototype.fromMarkup=function(t){if(t&&this.doesSupportMarkdown())return{kind:Ne.Markdown,value:t}},e.prototype.doesSupportMarkdown=function(){if(!Ae(this.supportsMarkdown)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsMarkdown=t&&t.completionItem&&Array.isArray(t.completionItem.documentationFormat)&&t.completionItem.documentationFormat.indexOf(Ne.Markdown)!==-1}return this.supportsMarkdown},e.prototype.doesSupportsCommitCharacters=function(){if(!Ae(this.supportsCommitCharacters)){var t=this.clientCapabilities.textDocument&&this.clientCapabilities.textDocument.completion;this.supportsCommitCharacters=t&&t.completionItem&&!!t.completionItem.commitCharactersSupport}return this.supportsCommitCharacters},e}(),ba=function(){function e(t,r,n){r===void 0&&(r=[]),this.schemaService=t,this.contributions=r,this.promise=n||Promise}return e.prototype.doHover=function(t,r,n){var i=t.offsetAt(r),s=n.getNodeFromOffset(i);if(!s||(s.type==="object"||s.type==="array")&&i>s.offset+1&&i<s.offset+s.length-1)return this.promise.resolve(null);var a=s;if(s.type==="string"){var o=s.parent;if(o&&o.type==="property"&&o.keyNode===s&&(s=o.valueNode,!s))return this.promise.resolve(null)}for(var u=q.create(t.positionAt(a.offset),t.positionAt(a.offset+a.length)),l=function(m){var v={contents:m,range:u};return v},c=wr(s),f=this.contributions.length-1;f>=0;f--){var h=this.contributions[f],d=h.getInfoContribution(t.uri,c);if(d)return d.then(function(m){return l(m)})}return this.schemaService.getSchemaForResource(t.uri,n).then(function(m){if(m&&s){var v=n.getMatchingSchemas(m.schema,s.offset),b=void 0,N=void 0,p=void 0,g=void 0;v.every(function(L){if(L.node===s&&!L.inverted&&L.schema&&(b=b||L.schema.title,N=N||L.schema.markdownDescription||Cr(L.schema.description),L.schema.enum)){var S=L.schema.enum.indexOf(Me(s));L.schema.markdownEnumDescriptions?p=L.schema.markdownEnumDescriptions[S]:L.schema.enumDescriptions&&(p=Cr(L.schema.enumDescriptions[S])),p&&(g=L.schema.enum[S],typeof g!="string"&&(g=JSON.stringify(g)))}return!0});var _="";return b&&(_=Cr(b)),N&&(_.length>0&&(_+=` - -`),_+=N),p&&(_.length>0&&(_+=` - -`),_+="`"+ya(g)+"`: "+p),l([_])}return null})},e}();function Cr(e){if(e){var t=e.replace(/([^\n\r])(\r?\n)([^\n\r])/gm,`$1 - -$3`);return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}}function ya(e){return e.indexOf("`")!==-1?"`` "+e+" ``":e}var Ti;Ti=(()=>{var e={470:n=>{function i(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function s(o,u){for(var l,c="",f=0,h=-1,d=0,m=0;m<=o.length;++m){if(m<o.length)l=o.charCodeAt(m);else{if(l===47)break;l=47}if(l===47){if(!(h===m-1||d===1))if(h!==m-1&&d===2){if(c.length<2||f!==2||c.charCodeAt(c.length-1)!==46||c.charCodeAt(c.length-2)!==46){if(c.length>2){var v=c.lastIndexOf("/");if(v!==c.length-1){v===-1?(c="",f=0):f=(c=c.slice(0,v)).length-1-c.lastIndexOf("/"),h=m,d=0;continue}}else if(c.length===2||c.length===1){c="",f=0,h=m,d=0;continue}}u&&(c.length>0?c+="/..":c="..",f=2)}else c.length>0?c+="/"+o.slice(h+1,m):c=o.slice(h+1,m),f=m-h-1;h=m,d=0}else l===46&&d!==-1?++d:d=-1}return c}var a={resolve:function(){for(var o,u="",l=!1,c=arguments.length-1;c>=-1&&!l;c--){var f;c>=0?f=arguments[c]:(o===void 0&&(o=process.cwd()),f=o),i(f),f.length!==0&&(u=f+"/"+u,l=f.charCodeAt(0)===47)}return u=s(u,!l),l?u.length>0?"/"+u:"/":u.length>0?u:"."},normalize:function(o){if(i(o),o.length===0)return".";var u=o.charCodeAt(0)===47,l=o.charCodeAt(o.length-1)===47;return(o=s(o,!u)).length!==0||u||(o="."),o.length>0&&l&&(o+="/"),u?"/"+o:o},isAbsolute:function(o){return i(o),o.length>0&&o.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var o,u=0;u<arguments.length;++u){var l=arguments[u];i(l),l.length>0&&(o===void 0?o=l:o+="/"+l)}return o===void 0?".":a.normalize(o)},relative:function(o,u){if(i(o),i(u),o===u||(o=a.resolve(o))===(u=a.resolve(u)))return"";for(var l=1;l<o.length&&o.charCodeAt(l)===47;++l);for(var c=o.length,f=c-l,h=1;h<u.length&&u.charCodeAt(h)===47;++h);for(var d=u.length-h,m=f<d?f:d,v=-1,b=0;b<=m;++b){if(b===m){if(d>m){if(u.charCodeAt(h+b)===47)return u.slice(h+b+1);if(b===0)return u.slice(h+b)}else f>m&&(o.charCodeAt(l+b)===47?v=b:b===0&&(v=0));break}var N=o.charCodeAt(l+b);if(N!==u.charCodeAt(h+b))break;N===47&&(v=b)}var p="";for(b=l+v+1;b<=c;++b)b!==c&&o.charCodeAt(b)!==47||(p.length===0?p+="..":p+="/..");return p.length>0?p+u.slice(h+v):(h+=v,u.charCodeAt(h)===47&&++h,u.slice(h))},_makeLong:function(o){return o},dirname:function(o){if(i(o),o.length===0)return".";for(var u=o.charCodeAt(0),l=u===47,c=-1,f=!0,h=o.length-1;h>=1;--h)if((u=o.charCodeAt(h))===47){if(!f){c=h;break}}else f=!1;return c===-1?l?"/":".":l&&c===1?"//":o.slice(0,c)},basename:function(o,u){if(u!==void 0&&typeof u!="string")throw new TypeError('"ext" argument must be a string');i(o);var l,c=0,f=-1,h=!0;if(u!==void 0&&u.length>0&&u.length<=o.length){if(u.length===o.length&&u===o)return"";var d=u.length-1,m=-1;for(l=o.length-1;l>=0;--l){var v=o.charCodeAt(l);if(v===47){if(!h){c=l+1;break}}else m===-1&&(h=!1,m=l+1),d>=0&&(v===u.charCodeAt(d)?--d==-1&&(f=l):(d=-1,f=m))}return c===f?f=m:f===-1&&(f=o.length),o.slice(c,f)}for(l=o.length-1;l>=0;--l)if(o.charCodeAt(l)===47){if(!h){c=l+1;break}}else f===-1&&(h=!1,f=l+1);return f===-1?"":o.slice(c,f)},extname:function(o){i(o);for(var u=-1,l=0,c=-1,f=!0,h=0,d=o.length-1;d>=0;--d){var m=o.charCodeAt(d);if(m!==47)c===-1&&(f=!1,c=d+1),m===46?u===-1?u=d:h!==1&&(h=1):u!==-1&&(h=-1);else if(!f){l=d+1;break}}return u===-1||c===-1||h===0||h===1&&u===c-1&&u===l+1?"":o.slice(u,c)},format:function(o){if(o===null||typeof o!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof o);return function(u,l){var c=l.dir||l.root,f=l.base||(l.name||"")+(l.ext||"");return c?c===l.root?c+f:c+"/"+f:f}(0,o)},parse:function(o){i(o);var u={root:"",dir:"",base:"",ext:"",name:""};if(o.length===0)return u;var l,c=o.charCodeAt(0),f=c===47;f?(u.root="/",l=1):l=0;for(var h=-1,d=0,m=-1,v=!0,b=o.length-1,N=0;b>=l;--b)if((c=o.charCodeAt(b))!==47)m===-1&&(v=!1,m=b+1),c===46?h===-1?h=b:N!==1&&(N=1):h!==-1&&(N=-1);else if(!v){d=b+1;break}return h===-1||m===-1||N===0||N===1&&h===m-1&&h===d+1?m!==-1&&(u.base=u.name=d===0&&f?o.slice(1,m):o.slice(d,m)):(d===0&&f?(u.name=o.slice(1,h),u.base=o.slice(1,m)):(u.name=o.slice(d,h),u.base=o.slice(d,m)),u.ext=o.slice(h,m)),d>0?u.dir=o.slice(0,d-1):f&&(u.dir="/"),u},sep:"/",delimiter:":",win32:null,posix:null};a.posix=a,n.exports=a},447:(n,i,s)=>{var a;if(s.r(i),s.d(i,{URI:()=>N,Utils:()=>k}),typeof process=="object")a=process.platform==="win32";else if(typeof navigator=="object"){var o=navigator.userAgent;a=o.indexOf("Windows")>=0}var u,l,c=(u=function(P,x){return(u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,I){E.__proto__=I}||function(E,I){for(var $ in I)Object.prototype.hasOwnProperty.call(I,$)&&(E[$]=I[$])})(P,x)},function(P,x){function E(){this.constructor=P}u(P,x),P.prototype=x===null?Object.create(x):(E.prototype=x.prototype,new E)}),f=/^\w[\w\d+.-]*$/,h=/^\//,d=/^\/\//,m="",v="/",b=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,N=function(){function P(x,E,I,$,j,O){O===void 0&&(O=!1),typeof x=="object"?(this.scheme=x.scheme||m,this.authority=x.authority||m,this.path=x.path||m,this.query=x.query||m,this.fragment=x.fragment||m):(this.scheme=function(B,re){return B||re?B:"file"}(x,O),this.authority=E||m,this.path=function(B,re){switch(B){case"https":case"http":case"file":re?re[0]!==v&&(re=v+re):re=v}return re}(this.scheme,I||m),this.query=$||m,this.fragment=j||m,function(B,re){if(!B.scheme&&re)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+B.authority+'", path: "'+B.path+'", query: "'+B.query+'", fragment: "'+B.fragment+'"}');if(B.scheme&&!f.test(B.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(B.path){if(B.authority){if(!h.test(B.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(d.test(B.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))}return P.isUri=function(x){return x instanceof P||!!x&&typeof x.authority=="string"&&typeof x.fragment=="string"&&typeof x.path=="string"&&typeof x.query=="string"&&typeof x.scheme=="string"&&typeof x.fsPath=="function"&&typeof x.with=="function"&&typeof x.toString=="function"},Object.defineProperty(P.prototype,"fsPath",{get:function(){return A(this,!1)},enumerable:!1,configurable:!0}),P.prototype.with=function(x){if(!x)return this;var E=x.scheme,I=x.authority,$=x.path,j=x.query,O=x.fragment;return E===void 0?E=this.scheme:E===null&&(E=m),I===void 0?I=this.authority:I===null&&(I=m),$===void 0?$=this.path:$===null&&($=m),j===void 0?j=this.query:j===null&&(j=m),O===void 0?O=this.fragment:O===null&&(O=m),E===this.scheme&&I===this.authority&&$===this.path&&j===this.query&&O===this.fragment?this:new g(E,I,$,j,O)},P.parse=function(x,E){E===void 0&&(E=!1);var I=b.exec(x);return I?new g(I[2]||m,M(I[4]||m),M(I[5]||m),M(I[7]||m),M(I[9]||m),E):new g(m,m,m,m,m)},P.file=function(x){var E=m;if(a&&(x=x.replace(/\\/g,v)),x[0]===v&&x[1]===v){var I=x.indexOf(v,2);I===-1?(E=x.substring(2),x=v):(E=x.substring(2,I),x=x.substring(I)||v)}return new g("file",E,x,m,m)},P.from=function(x){return new g(x.scheme,x.authority,x.path,x.query,x.fragment)},P.prototype.toString=function(x){return x===void 0&&(x=!1),w(this,x)},P.prototype.toJSON=function(){return this},P.revive=function(x){if(x){if(x instanceof P)return x;var E=new g(x);return E._formatted=x.external,E._fsPath=x._sep===p?x.fsPath:null,E}return x},P}(),p=a?1:void 0,g=function(P){function x(){var E=P!==null&&P.apply(this,arguments)||this;return E._formatted=null,E._fsPath=null,E}return c(x,P),Object.defineProperty(x.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=A(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),x.prototype.toString=function(E){return E===void 0&&(E=!1),E?w(this,!0):(this._formatted||(this._formatted=w(this,!1)),this._formatted)},x.prototype.toJSON=function(){var E={$mid:1};return this._fsPath&&(E.fsPath=this._fsPath,E._sep=p),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},x}(N),_=((l={})[58]="%3A",l[47]="%2F",l[63]="%3F",l[35]="%23",l[91]="%5B",l[93]="%5D",l[64]="%40",l[33]="%21",l[36]="%24",l[38]="%26",l[39]="%27",l[40]="%28",l[41]="%29",l[42]="%2A",l[43]="%2B",l[44]="%2C",l[59]="%3B",l[61]="%3D",l[32]="%20",l);function L(P,x){for(var E=void 0,I=-1,$=0;$<P.length;$++){var j=P.charCodeAt($);if(j>=97&&j<=122||j>=65&&j<=90||j>=48&&j<=57||j===45||j===46||j===95||j===126||x&&j===47)I!==-1&&(E+=encodeURIComponent(P.substring(I,$)),I=-1),E!==void 0&&(E+=P.charAt($));else{E===void 0&&(E=P.substr(0,$));var O=_[j];O!==void 0?(I!==-1&&(E+=encodeURIComponent(P.substring(I,$)),I=-1),E+=O):I===-1&&(I=$)}}return I!==-1&&(E+=encodeURIComponent(P.substring(I))),E!==void 0?E:P}function S(P){for(var x=void 0,E=0;E<P.length;E++){var I=P.charCodeAt(E);I===35||I===63?(x===void 0&&(x=P.substr(0,E)),x+=_[I]):x!==void 0&&(x+=P[E])}return x!==void 0?x:P}function A(P,x){var E;return E=P.authority&&P.path.length>1&&P.scheme==="file"?"//"+P.authority+P.path:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?x?P.path.substr(1):P.path[1].toLowerCase()+P.path.substr(2):P.path,a&&(E=E.replace(/\//g,"\\")),E}function w(P,x){var E=x?S:L,I="",$=P.scheme,j=P.authority,O=P.path,B=P.query,re=P.fragment;if($&&(I+=$,I+=":"),(j||$==="file")&&(I+=v,I+=v),j){var de=j.indexOf("@");if(de!==-1){var qe=j.substr(0,de);j=j.substr(de+1),(de=qe.indexOf(":"))===-1?I+=E(qe,!1):(I+=E(qe.substr(0,de),!1),I+=":",I+=E(qe.substr(de+1),!1)),I+="@"}(de=(j=j.toLowerCase()).indexOf(":"))===-1?I+=E(j,!1):(I+=E(j.substr(0,de),!1),I+=j.substr(de))}if(O){if(O.length>=3&&O.charCodeAt(0)===47&&O.charCodeAt(2)===58)(De=O.charCodeAt(1))>=65&&De<=90&&(O="/"+String.fromCharCode(De+32)+":"+O.substr(3));else if(O.length>=2&&O.charCodeAt(1)===58){var De;(De=O.charCodeAt(0))>=65&&De<=90&&(O=String.fromCharCode(De+32)+":"+O.substr(2))}I+=E(O,!0)}return B&&(I+="?",I+=E(B,!1)),re&&(I+="#",I+=x?re:L(re,!1)),I}function y(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+y(P.substr(3)):P}}var T=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function M(P){return P.match(T)?P.replace(T,function(x){return y(x)}):P}var k,F=s(470),V=function(){for(var P=0,x=0,E=arguments.length;x<E;x++)P+=arguments[x].length;var I=Array(P),$=0;for(x=0;x<E;x++)for(var j=arguments[x],O=0,B=j.length;O<B;O++,$++)I[$]=j[O];return I},z=F.posix||F;(function(P){P.joinPath=function(x){for(var E=[],I=1;I<arguments.length;I++)E[I-1]=arguments[I];return x.with({path:z.join.apply(z,V([x.path],E))})},P.resolvePath=function(x){for(var E=[],I=1;I<arguments.length;I++)E[I-1]=arguments[I];var $=x.path||"/";return x.with({path:z.resolve.apply(z,V([$],E))})},P.dirname=function(x){var E=z.dirname(x.path);return E.length===1&&E.charCodeAt(0)===46?x:x.with({path:E})},P.basename=function(x){return z.basename(x.path)},P.extname=function(x){return z.extname(x.path)}})(k||(k={}))}},t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}return r.d=(n,i)=>{for(var s in i)r.o(i,s)&&!r.o(n,s)&&Object.defineProperty(n,s,{enumerable:!0,get:i[s]})},r.o=(n,i)=>Object.prototype.hasOwnProperty.call(n,i),r.r=n=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},r(447)})();const{URI:et,Utils:Za}=Ti;function Sa(e,t){if(typeof e!="string")throw new TypeError("Expected a string");for(var r=String(e),n="",i=t?!!t.extended:!1,s=t?!!t.globstar:!1,a=!1,o=t&&typeof t.flags=="string"?t.flags:"",u,l=0,c=r.length;l<c;l++)switch(u=r[l],u){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":n+="\\"+u;break;case"?":if(i){n+=".";break}case"[":case"]":if(i){n+=u;break}case"{":if(i){a=!0,n+="(";break}case"}":if(i){a=!1,n+=")";break}case",":if(a){n+="|";break}n+="\\"+u;break;case"*":for(var f=r[l-1],h=1;r[l+1]==="*";)h++,l++;var d=r[l+1];if(!s)n+=".*";else{var m=h>1&&(f==="/"||f===void 0||f==="{"||f===",")&&(d==="/"||d===void 0||d===","||d==="}");m?(d==="/"?l++:f==="/"&&n.endsWith("\\/")&&(n=n.substr(0,n.length-2)),n+="((?:[^/]*(?:/|$))*)"):n+="([^/]*)"}break;default:n+=u}return(!o||!~o.indexOf("g"))&&(n="^"+n+"$"),new RegExp(n,o)}var Ee=pt(),_a="!",Aa="/",wa=function(){function e(t,r){this.globWrappers=[];try{for(var n=0,i=t;n<i.length;n++){var s=i[n],a=s[0]!==_a;a||(s=s.substring(1)),s.length>0&&(s[0]===Aa&&(s=s.substring(1)),this.globWrappers.push({regexp:Sa("**/"+s,{extended:!0,globstar:!0}),include:a}))}this.uris=r}catch{this.globWrappers.length=0,this.uris=[]}}return e.prototype.matchesPattern=function(t){for(var r=!1,n=0,i=this.globWrappers;n<i.length;n++){var s=i[n],a=s.regexp,o=s.include;a.test(t)&&(r=o)}return r},e.prototype.getURIs=function(){return this.uris},e}(),Na=function(){function e(t,r,n){this.service=t,this.url=r,this.dependencies={},n&&(this.unresolvedSchema=this.service.promise.resolve(new We(n)))}return e.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},e.prototype.getResolvedSchema=function(){var t=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(r){return t.service.resolveSchemaContent(r,t.url,t.dependencies)})),this.resolvedSchema},e.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},e}(),We=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e}(),Pi=function(){function e(t,r){r===void 0&&(r=[]),this.schema=t,this.errors=r}return e.prototype.getSection=function(t){var r=this.getSectionRecursive(t,this.schema);if(r)return oe(r)},e.prototype.getSectionRecursive=function(t,r){if(!r||typeof r=="boolean"||t.length===0)return r;var n=t.shift();if(r.properties&&typeof r.properties[n])return this.getSectionRecursive(t,r.properties[n]);if(r.patternProperties)for(var i=0,s=Object.keys(r.patternProperties);i<s.length;i++){var a=s[i],o=kt(a);if(o.test(n))return this.getSectionRecursive(t,r.patternProperties[a])}else{if(typeof r.additionalProperties=="object")return this.getSectionRecursive(t,r.additionalProperties);if(n.match("[0-9]+")){if(Array.isArray(r.items)){var u=parseInt(n,10);if(!isNaN(u)&&r.items[u])return this.getSectionRecursive(t,r.items[u])}else if(r.items)return this.getSectionRecursive(t,r.items)}}},e}(),La=function(){function e(t,r,n){this.contextService=r,this.requestService=t,this.promiseConstructor=n||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return e.prototype.getRegisteredSchemaIds=function(t){return Object.keys(this.registeredSchemasIds).filter(function(r){var n=et.parse(r).scheme;return n!=="schemaservice"&&(!t||t(n))})},Object.defineProperty(e.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),e.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},e.prototype.onResourceChange=function(t){var r=this,n=!1;t=Ie(t);for(var i=[t],s=Object.keys(this.schemasById).map(function(l){return r.schemasById[l]});i.length;)for(var a=i.pop(),o=0;o<s.length;o++){var u=s[o];u&&(u.url===a||u.dependencies[a])&&(u.url!==a&&i.push(u.url),u.clearSchema(),s[o]=void 0,n=!0)}return n},e.prototype.setSchemaContributions=function(t){if(t.schemas){var r=t.schemas;for(var n in r){var i=Ie(n);this.contributionSchemas[i]=this.addSchemaHandle(i,r[n])}}if(Array.isArray(t.schemaAssociations))for(var s=t.schemaAssociations,a=0,o=s;a<o.length;a++){var u=o[a],l=u.uris.map(Ie),c=this.addFilePatternAssociation(u.pattern,l);this.contributionAssociations.push(c)}},e.prototype.addSchemaHandle=function(t,r){var n=new Na(this,t,r);return this.schemasById[t]=n,n},e.prototype.getOrAddSchemaHandle=function(t,r){return this.schemasById[t]||this.addSchemaHandle(t,r)},e.prototype.addFilePatternAssociation=function(t,r){var n=new wa(t,r);return this.filePatternAssociations.push(n),n},e.prototype.registerExternalSchema=function(t,r,n){var i=Ie(t);return this.registeredSchemasIds[i]=!0,this.cachedSchemaForResource=void 0,r&&this.addFilePatternAssociation(r,[t]),n?this.addSchemaHandle(i,n):this.getOrAddSchemaHandle(i)},e.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var t in this.contributionSchemas)this.schemasById[t]=this.contributionSchemas[t],this.registeredSchemasIds[t]=!0;for(var r=0,n=this.contributionAssociations;r<n.length;r++){var i=n[r];this.filePatternAssociations.push(i)}},e.prototype.getResolvedSchema=function(t){var r=Ie(t),n=this.schemasById[r];return n?n.getResolvedSchema():this.promise.resolve(void 0)},e.prototype.loadSchema=function(t){if(!this.requestService){var r=Ee("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Dt(t));return this.promise.resolve(new We({},[r]))}return this.requestService(t).then(function(n){if(!n){var i=Ee("json.schema.nocontent","Unable to load schema from '{0}': No content.",Dt(t));return new We({},[i])}var s={},a=[];s=Zs(n,a);var o=a.length?[Ee("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Dt(t),a[0].offset)]:[];return new We(s,o)},function(n){var i=n.toString(),s=n.toString().split("Error: ");return s.length>1&&(i=s[1]),lt(i,".")&&(i=i.substr(0,i.length-1)),new We({},[Ee("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Dt(t),i)])})},e.prototype.resolveSchemaContent=function(t,r,n){var i=this,s=t.errors.slice(0),a=t.schema;if(a.$schema){var o=Ie(a.$schema);if(o==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new Pi({},[Ee("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));o==="https://json-schema.org/draft/2019-09/schema"&&s.push(Ee("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var u=this.contextService,l=function(d,m){if(!m)return d;var v=d;return m[0]==="/"&&(m=m.substr(1)),m.split("/").some(function(b){return b=b.replace(/~1/g,"/").replace(/~0/g,"~"),v=v[b],!v}),v},c=function(d,m,v,b){var N=b?decodeURIComponent(b):void 0,p=l(m,N);if(p)for(var g in p)p.hasOwnProperty(g)&&!d.hasOwnProperty(g)&&(d[g]=p[g]);else s.push(Ee("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",N,v))},f=function(d,m,v,b,N){u&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(m)&&(m=u.resolveRelativePath(m,b)),m=Ie(m);var p=i.getOrAddSchemaHandle(m);return p.getUnresolvedSchema().then(function(g){if(N[m]=!0,g.errors.length){var _=v?m+"#"+v:m;s.push(Ee("json.schema.problemloadingref","Problems loading reference '{0}': {1}",_,g.errors[0]))}return c(d,g.schema,m,v),h(d,g.schema,m,p.dependencies)})},h=function(d,m,v,b){if(!d||typeof d!="object")return Promise.resolve(null);for(var N=[d],p=[],g=[],_=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];typeof F=="object"&&N.push(F)}},L=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];if(typeof F=="object")for(var V in F){var z=V,P=F[z];typeof P=="object"&&N.push(P)}}},S=function(){for(var y=[],T=0;T<arguments.length;T++)y[T]=arguments[T];for(var M=0,k=y;M<k.length;M++){var F=k[M];if(Array.isArray(F))for(var V=0,z=F;V<z.length;V++){var P=z[V];typeof P=="object"&&N.push(P)}}},A=function(y){for(var T=[];y.$ref;){var M=y.$ref,k=M.split("#",2);if(delete y.$ref,k[0].length>0){g.push(f(y,k[0],k[1],v,b));return}else T.indexOf(M)===-1&&(c(y,m,v,k[1]),T.push(M))}_(y.items,y.additionalItems,y.additionalProperties,y.not,y.contains,y.propertyNames,y.if,y.then,y.else),L(y.definitions,y.properties,y.patternProperties,y.dependencies),S(y.anyOf,y.allOf,y.oneOf,y.items)};N.length;){var w=N.pop();p.indexOf(w)>=0||(p.push(w),A(w))}return i.promise.all(g)};return h(a,a,r,n).then(function(d){return new Pi(a,s)})},e.prototype.getSchemaForResource=function(t,r){if(r&&r.root&&r.root.type==="object"){var n=r.root.properties.filter(function(N){return N.keyNode.value==="$schema"&&N.valueNode&&N.valueNode.type==="string"});if(n.length>0){var i=n[0].valueNode;if(i&&i.type==="string"){var s=Me(i);if(s&&Hn(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,t)),s){var a=Ie(s);return this.getOrAddSchemaHandle(a).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===t)return this.cachedSchemaForResource.resolvedSchema;for(var o=Object.create(null),u=[],l=xa(t),c=0,f=this.filePatternAssociations;c<f.length;c++){var h=f[c];if(h.matchesPattern(l))for(var d=0,m=h.getURIs();d<m.length;d++){var v=m[d];o[v]||(u.push(v),o[v]=!0)}}var b=u.length>0?this.createCombinedSchema(t,u).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:t,resolvedSchema:b},b},e.prototype.createCombinedSchema=function(t,r){if(r.length===1)return this.getOrAddSchemaHandle(r[0]);var n="schemaservice://combinedSchema/"+encodeURIComponent(t),i={allOf:r.map(function(s){return{$ref:s}})};return this.addSchemaHandle(n,i)},e.prototype.getMatchingSchemas=function(t,r,n){if(n){var i=n.id||"schemaservice://untitled/matchingSchemas/"+Ca++;return this.resolveSchemaContent(new We(n),i,{}).then(function(s){return r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted})})}return this.getSchemaForResource(t.uri,r).then(function(s){return s?r.getMatchingSchemas(s.schema).filter(function(a){return!a.inverted}):[]})},e}(),Ca=0;function Ie(e){try{return et.parse(e).toString()}catch{return e}}function xa(e){try{return et.parse(e).with({fragment:null,query:null}).toString()}catch{return e}}function Dt(e){try{var t=et.parse(e);if(t.scheme==="file")return t.fsPath}catch{}return e}var ka=pt(),Ta=function(){function e(t,r){this.jsonSchemaService=t,this.promise=r,this.validationEnabled=!0}return e.prototype.configure=function(t){t&&(this.validationEnabled=t.validate!==!1,this.commentSeverity=t.allowComments?void 0:ce.Error)},e.prototype.doValidation=function(t,r,n,i){var s=this;if(!this.validationEnabled)return this.promise.resolve([]);var a=[],o={},u=function(f){var h=f.range.start.line+" "+f.range.start.character+" "+f.message;o[h]||(o[h]=!0,a.push(f))},l=function(f){var h=(n==null?void 0:n.trailingCommas)?jt(n.trailingCommas):ce.Error,d=(n==null?void 0:n.comments)?jt(n.comments):s.commentSeverity,m=(n==null?void 0:n.schemaValidation)?jt(n.schemaValidation):ce.Warning,v=(n==null?void 0:n.schemaRequest)?jt(n.schemaRequest):ce.Warning;if(f){if(f.errors.length&&r.root&&v){var b=r.root,N=b.type==="object"?b.properties[0]:void 0;if(N&&N.keyNode.value==="$schema"){var p=N.valueNode||N,g=q.create(t.positionAt(p.offset),t.positionAt(p.offset+p.length));u(we.create(g,f.errors[0],v,W.SchemaResolveError))}else{var g=q.create(t.positionAt(b.offset),t.positionAt(b.offset+1));u(we.create(g,f.errors[0],v,W.SchemaResolveError))}}else if(m){var _=r.validate(t,f.schema,m);_&&_.forEach(u)}Mi(f.schema)&&(d=void 0),Ei(f.schema)&&(h=void 0)}for(var L=0,S=r.syntaxErrors;L<S.length;L++){var A=S[L];if(A.code===W.TrailingComma){if(typeof h!="number")continue;A.severity=h}u(A)}if(typeof d=="number"){var w=ka("InvalidCommentToken","Comments are not permitted in JSON.");r.comments.forEach(function(y){u(we.create(y,w,d,W.CommentNotPermitted))})}return a};if(i){var c=i.id||"schemaservice://untitled/"+Pa++;return this.jsonSchemaService.resolveSchemaContent(new We(i),c,{}).then(function(f){return l(f)})}return this.jsonSchemaService.getSchemaForResource(t.uri,r).then(function(f){return l(f)})},e}(),Pa=0;function Mi(e){if(e&&typeof e=="object"){if(Se(e.allowComments))return e.allowComments;if(e.allOf)for(var t=0,r=e.allOf;t<r.length;t++){var n=r[t],i=Mi(n);if(Se(i))return i}}}function Ei(e){if(e&&typeof e=="object"){if(Se(e.allowTrailingCommas))return e.allowTrailingCommas;var t=e;if(Se(t.allowsTrailingCommas))return t.allowsTrailingCommas;if(e.allOf)for(var r=0,n=e.allOf;r<n.length;r++){var i=n[r],s=Ei(i);if(Se(s))return s}}}function jt(e){switch(e){case"error":return ce.Error;case"warning":return ce.Warning;case"ignore":return}}var Ii=48,Ma=57,Ea=65,Ut=97,Ia=102;function Q(e){return e<Ii?0:e<=Ma?e-Ii:(e<Ut&&(e+=Ut-Ea),e>=Ut&&e<=Ia?e-Ut+10:0)}function Fa(e){if(e[0]==="#")switch(e.length){case 4:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Q(e.charCodeAt(1))*17/255,green:Q(e.charCodeAt(2))*17/255,blue:Q(e.charCodeAt(3))*17/255,alpha:Q(e.charCodeAt(4))*17/255};case 7:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Q(e.charCodeAt(1))*16+Q(e.charCodeAt(2)))/255,green:(Q(e.charCodeAt(3))*16+Q(e.charCodeAt(4)))/255,blue:(Q(e.charCodeAt(5))*16+Q(e.charCodeAt(6)))/255,alpha:(Q(e.charCodeAt(7))*16+Q(e.charCodeAt(8)))/255}}}var Da=function(){function e(t){this.schemaService=t}return e.prototype.findDocumentSymbols=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||lt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,d=f.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var v=ft.create(t.uri,Fe(t,f));if(u.push({name:Me(m.valueNode),kind:_e.Function,location:v}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var b=[{node:s,containerName:""}],N=0,p=!1,g=[],_=function(S,A){S.type==="array"?S.items.forEach(function(w){w&&b.push({node:w,containerName:A})}):S.type==="object"&&S.properties.forEach(function(w){var y=w.valueNode;if(y)if(a>0){a--;var T=ft.create(t.uri,Fe(t,w)),M=A?A+"."+w.keyNode.value:w.keyNode.value;g.push({name:i.getKeyLabel(w),kind:i.getSymbolKind(y.type),location:T,containerName:A}),b.push({node:y,containerName:M})}else p=!0})};N<b.length;){var L=b[N++];_(L.node,L.containerName)}return p&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),g},e.prototype.findDocumentSymbols2=function(t,r,n){var i=this;n===void 0&&(n={resultLimit:Number.MAX_VALUE});var s=r.root;if(!s)return[];var a=n.resultLimit||Number.MAX_VALUE,o=t.uri;if((o==="vscode://defaultsettings/keybindings.json"||lt(o.toLowerCase(),"/user/keybindings.json"))&&s.type==="array"){for(var u=[],l=0,c=s.items;l<c.length;l++){var f=c[l];if(f.type==="object")for(var h=0,d=f.properties;h<d.length;h++){var m=d[h];if(m.keyNode.value==="key"&&m.valueNode){var v=Fe(t,f),b=Fe(t,m.keyNode);if(u.push({name:Me(m.valueNode),kind:_e.Function,range:v,selectionRange:b}),a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),u}}}return u}for(var N=[],p=[{node:s,result:N}],g=0,_=!1,L=function(A,w){A.type==="array"?A.items.forEach(function(y,T){if(y)if(a>0){a--;var M=Fe(t,y),k=M,F=String(T),V={name:F,kind:i.getSymbolKind(y.type),range:M,selectionRange:k,children:[]};w.push(V),p.push({result:V.children,node:y})}else _=!0}):A.type==="object"&&A.properties.forEach(function(y){var T=y.valueNode;if(T)if(a>0){a--;var M=Fe(t,y),k=Fe(t,y.keyNode),F=[],V={name:i.getKeyLabel(y),kind:i.getSymbolKind(T.type),range:M,selectionRange:k,children:F,detail:i.getDetail(T)};w.push(V),p.push({result:F,node:T})}else _=!0})};g<p.length;){var S=p[g++];L(S.node,S.result)}return _&&n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(o),N},e.prototype.getSymbolKind=function(t){switch(t){case"object":return _e.Module;case"string":return _e.String;case"number":return _e.Number;case"array":return _e.Array;case"boolean":return _e.Boolean;default:return _e.Variable}},e.prototype.getKeyLabel=function(t){var r=t.keyNode.value;return r&&(r=r.replace(/[\n]/g,"\u21B5")),r&&r.trim()?r:'"'+r+'"'},e.prototype.getDetail=function(t){if(!!t){if(t.type==="boolean"||t.type==="number"||t.type==="null"||t.type==="string")return String(t.value);if(t.type==="array")return t.children.length?void 0:"[]";if(t.type==="object")return t.children.length?void 0:"{}"}},e.prototype.findDocumentColors=function(t,r,n){return this.schemaService.getSchemaForResource(t.uri,r).then(function(i){var s=[];if(i)for(var a=n&&typeof n.resultLimit=="number"?n.resultLimit:Number.MAX_VALUE,o=r.getMatchingSchemas(i.schema),u={},l=0,c=o;l<c.length;l++){var f=c[l];if(!f.inverted&&f.schema&&(f.schema.format==="color"||f.schema.format==="color-hex")&&f.node&&f.node.type==="string"){var h=String(f.node.offset);if(!u[h]){var d=Fa(Me(f.node));if(d){var m=Fe(t,f.node);s.push({color:d,range:m})}if(u[h]=!0,a--,a<=0)return n&&n.onResultLimitExceeded&&n.onResultLimitExceeded(t.uri),s}}}return s})},e.prototype.getColorPresentations=function(t,r,n,i){var s=[],a=Math.round(n.red*255),o=Math.round(n.green*255),u=Math.round(n.blue*255);function l(f){var h=f.toString(16);return h.length!==2?"0"+h:h}var c;return n.alpha===1?c="#"+l(a)+l(o)+l(u):c="#"+l(a)+l(o)+l(u)+l(Math.round(n.alpha*255)),s.push({label:c,textEdit:ve.replace(i,JSON.stringify(c))}),s},e}();function Fe(e,t){return q.create(e.positionAt(t.offset),e.positionAt(t.offset+t.length))}var U=pt(),xr={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:U("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:U("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},ja={id:U("schema.json.id","A unique identifier for the schema."),$schema:U("schema.json.$schema","The schema to verify this document against."),title:U("schema.json.title","A descriptive title of the element."),description:U("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:U("schema.json.default","A default value. Used by suggestions."),multipleOf:U("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:U("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:U("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:U("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:U("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:U("schema.json.maxLength","The maximum length of a string."),minLength:U("schema.json.minLength","The minimum length of a string."),pattern:U("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:U("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:U("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:U("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:U("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:U("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:U("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:U("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:U("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:U("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:U("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:U("schema.json.properties","A map of property names to schemas for each property."),patternProperties:U("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:U("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:U("schema.json.enum","The set of literal values that are valid."),type:U("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:U("schema.json.format","Describes the format expected for the value."),allOf:U("schema.json.allOf","An array of schemas, all of which must match."),anyOf:U("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:U("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:U("schema.json.not","A schema which must not match."),$id:U("schema.json.$id","A unique identifier for the schema."),$ref:U("schema.json.$ref","Reference a definition hosted on any location."),$comment:U("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:U("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:U("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:U("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:U("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:U("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:U("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:U("schema.json.contentEncoding","Describes the content encoding of a string property."),if:U("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:U("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:U("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var Ua in xr.schemas){var kr=xr.schemas[Ua];for(var vt in kr.properties){var Tr=kr.properties[vt];typeof Tr=="boolean"&&(Tr=kr.properties[vt]={});var Fi=ja[vt];Fi?Tr.description=Fi:console.log(vt+": localize('schema.json."+vt+`', "")`)}}function Ra(e,t){var r=[],n=[],i=[],s=-1,a=Ze(e.getText(),!1),o=a.scan();function u(T){r.push(T),n.push(i.length)}for(;o!==17;){switch(o){case 1:case 3:{var l=e.positionAt(a.getTokenOffset()).line,c={startLine:l,endLine:l,kind:o===1?"object":"array"};i.push(c);break}case 2:case 4:{var f=o===2?"object":"array";if(i.length>0&&i[i.length-1].kind===f){var c=i.pop(),h=e.positionAt(a.getTokenOffset()).line;c&&h>c.startLine+1&&s!==c.startLine&&(c.endLine=h-1,u(c),s=c.startLine)}break}case 13:{var l=e.positionAt(a.getTokenOffset()).line,d=e.positionAt(a.getTokenOffset()+a.getTokenLength()).line;a.getTokenError()===1&&l+1<e.lineCount?a.setPosition(e.offsetAt(pe.create(l+1,0))):l<d&&(u({startLine:l,endLine:d,kind:ct.Comment}),s=l);break}case 12:{var m=e.getText().substr(a.getTokenOffset(),a.getTokenLength()),v=m.match(/^\/\/\s*#(region\b)|(endregion\b)/);if(v){var h=e.positionAt(a.getTokenOffset()).line;if(v[1]){var c={startLine:h,endLine:h,kind:ct.Region};i.push(c)}else{for(var b=i.length-1;b>=0&&i[b].kind!==ct.Region;)b--;if(b>=0){var c=i[b];i.length=b,h>c.startLine&&s!==c.startLine&&(c.endLine=h,u(c),s=c.startLine)}}}break}}o=a.scan()}var N=t&&t.rangeLimit;if(typeof N!="number"||r.length<=N)return r;t&&t.onRangeLimitExceeded&&t.onRangeLimitExceeded(e.uri);for(var p=[],g=0,_=n;g<_.length;g++){var L=_[g];L<30&&(p[L]=(p[L]||0)+1)}for(var S=0,A=0,b=0;b<p.length;b++){var w=p[b];if(w){if(w+S>N){A=b;break}S+=w}}for(var y=[],b=0;b<r.length;b++){var L=n[b];typeof L=="number"&&(L<A||L===A&&S++<N)&&y.push(r[b])}return y}function Oa(e,t,r){function n(o){for(var u=e.offsetAt(o),l=r.getNodeFromOffset(u,!0),c=[];l;){switch(l.type){case"string":case"object":case"array":var f=l.offset+1,h=l.offset+l.length-1;f<h&&u>=f&&u<=h&&c.push(i(f,h)),c.push(i(l.offset,l.offset+l.length));break;case"number":case"boolean":case"null":case"property":c.push(i(l.offset,l.offset+l.length));break}if(l.type==="property"||l.parent&&l.parent.type==="array"){var d=a(l.offset+l.length,5);d!==-1&&c.push(i(l.offset,d))}l=l.parent}for(var m=void 0,v=c.length-1;v>=0;v--)m=Ft.create(c[v],m);return m||(m=Ft.create(q.create(o,o))),m}function i(o,u){return q.create(e.positionAt(o),e.positionAt(u))}var s=Ze(e.getText(),!0);function a(o,u){s.setPosition(o);var l=s.scan();return l===u?s.getTokenOffset()+s.getTokenLength():-1}return t.map(n)}function Va(e,t){var r=[];return t.visit(function(n){var i;if(n.type==="property"&&n.keyNode.value==="$ref"&&((i=n.valueNode)===null||i===void 0?void 0:i.type)==="string"){var s=n.valueNode.value,a=Wa(t,s);if(a){var o=e.positionAt(a.offset);r.push({target:e.uri+"#"+(o.line+1)+","+(o.character+1),range:$a(e,n.valueNode)})}}return!0}),Promise.resolve(r)}function $a(e,t){return q.create(e.positionAt(t.offset+1),e.positionAt(t.offset+t.length-1))}function Wa(e,t){var r=qa(t);return r?Pr(r,e.root):null}function Pr(e,t){if(!t)return null;if(e.length===0)return t;var r=e.shift();if(t&&t.type==="object"){var n=t.properties.find(function(a){return a.keyNode.value===r});return n?Pr(e,n.valueNode):null}else if(t&&t.type==="array"&&r.match(/^(0|[1-9][0-9]*)$/)){var i=Number.parseInt(r),s=t.items[i];return s?Pr(e,s):null}return null}function qa(e){return e==="#"?[]:e[0]!=="#"||e[1]!=="/"?null:e.substring(2).split(/\//).map(Ha)}function Ha(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ba(e){var t=e.promiseConstructor||Promise,r=new La(e.schemaRequestService,e.workspaceContext,t);r.setSchemaContributions(xr);var n=new va(r,e.contributions,t,e.clientCapabilities),i=new ba(r,e.contributions,t),s=new Da(r),a=new Ta(r,t);return{configure:function(o){r.clearExternalSchemas(),o.schemas&&o.schemas.forEach(function(u){r.registerExternalSchema(u.uri,u.fileMatch,u.schema)}),a.configure(o)},resetSchema:function(o){return r.onResourceChange(o)},doValidation:a.doValidation.bind(a),parseJSONDocument:function(o){return pa(o,{collectComments:!0})},newJSONDocument:function(o,u){return ma(o,u)},getMatchingSchemas:r.getMatchingSchemas.bind(r),doResolve:n.doResolve.bind(n),doComplete:n.doComplete.bind(n),findDocumentSymbols:s.findDocumentSymbols.bind(s),findDocumentSymbols2:s.findDocumentSymbols2.bind(s),findDocumentColors:s.findDocumentColors.bind(s),getColorPresentations:s.getColorPresentations.bind(s),doHover:i.doHover.bind(i),getFoldingRanges:Ra,getSelectionRanges:Oa,findDefinition:function(){return Promise.resolve([])},findLinks:Va,format:function(o,u,l){var c=void 0;if(u){var f=o.offsetAt(u.start),h=o.offsetAt(u.end)-f;c={offset:f,length:h}}var d={tabSize:l?l.tabSize:4,insertSpaces:(l==null?void 0:l.insertSpaces)===!0,insertFinalNewline:(l==null?void 0:l.insertFinalNewline)===!0,eol:` -`};return ra(o.getText(),c,d).map(function(m){return ve.replace(q.create(o.positionAt(m.offset),o.positionAt(m.offset+m.length)),m.content)})}}}var be=function(e,t,r,n){function i(s){return s instanceof r?s:new r(function(a){a(s)})}return new(r||(r=Promise))(function(s,a){function o(c){try{l(n.next(c))}catch(f){a(f)}}function u(c){try{l(n.throw(c))}catch(f){a(f)}}function l(c){c.done?s(c.value):i(c.value).then(o,u)}l((n=n.apply(e,t||[])).next())})},ye=function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,a;return a={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(a[Symbol.iterator]=function(){return this}),a;function o(l){return function(c){return u([l,c])}}function u(l){if(n)throw new TypeError("Generator is already executing.");for(;r;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return r.label++,{value:l[1],done:!1};case 5:r.label++,i=l[1],l=[0];continue;case 7:l=r.ops.pop(),r.trys.pop();continue;default:if(s=r.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){r=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){r.label=l[1];break}if(l[0]===6&&r.label<s[1]){r.label=s[1],s=l;break}if(s&&r.label<s[2]){r.label=s[2],r.ops.push(l);break}s[2]&&r.ops.pop(),r.trys.pop();continue}l=t.call(e,r)}catch(c){l=[6,c],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Di;typeof fetch!="undefined"&&(Di=function(e){return fetch(e).then(function(t){return t.text()})});var Ya=function(){function e(t,r){this._ctx=t,this._languageSettings=r.languageSettings,this._languageId=r.languageId,this._languageService=Ba({workspaceContext:{resolveRelativePath:function(n,i){var s=i.substr(0,i.lastIndexOf("/")+1);return Ja(s,n)}},schemaRequestService:r.enableSchemaRequest&&Di}),this._languageService.configure(this._languageSettings)}return e.prototype.doValidation=function(t){return be(this,void 0,void 0,function(){var r,n;return ye(this,function(i){return r=this._getTextDocument(t),r?(n=this._languageService.parseJSONDocument(r),[2,this._languageService.doValidation(r,n,this._languageSettings)]):[2,Promise.resolve([])]})})},e.prototype.doComplete=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doComplete(n,r,i)]})})},e.prototype.doResolve=function(t){return be(this,void 0,void 0,function(){return ye(this,function(r){return[2,this._languageService.doResolve(t)]})})},e.prototype.doHover=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),[2,this._languageService.doHover(n,r,i)]})})},e.prototype.format=function(t,r,n){return be(this,void 0,void 0,function(){var i,s;return ye(this,function(a){return i=this._getTextDocument(t),s=this._languageService.format(i,r,n),[2,Promise.resolve(s)]})})},e.prototype.resetSchema=function(t){return be(this,void 0,void 0,function(){return ye(this,function(r){return[2,Promise.resolve(this._languageService.resetSchema(t))]})})},e.prototype.findDocumentSymbols=function(t){return be(this,void 0,void 0,function(){var r,n,i;return ye(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentSymbols(r,n),[2,Promise.resolve(i)]})})},e.prototype.findDocumentColors=function(t){return be(this,void 0,void 0,function(){var r,n,i;return ye(this,function(s){return r=this._getTextDocument(t),n=this._languageService.parseJSONDocument(r),i=this._languageService.findDocumentColors(r,n),[2,Promise.resolve(i)]})})},e.prototype.getColorPresentations=function(t,r,n){return be(this,void 0,void 0,function(){var i,s,a;return ye(this,function(o){return i=this._getTextDocument(t),s=this._languageService.parseJSONDocument(i),a=this._languageService.getColorPresentations(i,s,r,n),[2,Promise.resolve(a)]})})},e.prototype.getFoldingRanges=function(t,r){return be(this,void 0,void 0,function(){var n,i;return ye(this,function(s){return n=this._getTextDocument(t),i=this._languageService.getFoldingRanges(n,r),[2,Promise.resolve(i)]})})},e.prototype.getSelectionRanges=function(t,r){return be(this,void 0,void 0,function(){var n,i,s;return ye(this,function(a){return n=this._getTextDocument(t),i=this._languageService.parseJSONDocument(n),s=this._languageService.getSelectionRanges(n,r,i),[2,Promise.resolve(s)]})})},e.prototype._getTextDocument=function(t){for(var r=this._ctx.getMirrorModels(),n=0,i=r;n<i.length;n++){var s=i[n];if(s.uri.toString()===t)return yr.create(t,this._languageId,s.version,s.getValue())}return null},e}(),za="/".charCodeAt(0),Mr=".".charCodeAt(0);function Ga(e){return e.charCodeAt(0)===za}function Ja(e,t){if(Ga(t)){var r=et.parse(e),n=t.split("/");return r.with({path:ji(n)}).toString()}return Qa(e,t)}function ji(e){for(var t=[],r=0,n=e;r<n.length;r++){var i=n[r];i.length===0||i.length===1&&i.charCodeAt(0)===Mr||(i.length===2&&i.charCodeAt(0)===Mr&&i.charCodeAt(1)===Mr?t.pop():t.push(i))}e.length>1&&e[e.length-1].length===0&&t.push("");var s=t.join("/");return e[0].length===0&&(s="/"+s),s}function Qa(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];for(var n=et.parse(e),i=n.path.split("/"),s=0,a=t;s<a.length;s++){var o=a[s];i.push.apply(i,o.split("/"))}return n.with({path:ji(i)}).toString()}self.onmessage=function(){Vn(function(e,t){return new Ya(e,t)})}})(); diff --git a/magic-editor/src/main/resources/magic-editor/assets/style.4d6341ff.css b/magic-editor/src/main/resources/magic-editor/assets/style.f5d6f29c.css similarity index 55% rename from magic-editor/src/main/resources/magic-editor/assets/style.4d6341ff.css rename to magic-editor/src/main/resources/magic-editor/assets/style.f5d6f29c.css index 93b0ab4f..8588f5b3 100644 --- a/magic-editor/src/main/resources/magic-editor/assets/style.4d6341ff.css +++ b/magic-editor/src/main/resources/magic-editor/assets/style.f5d6f29c.css @@ -1 +1 @@ -html,body,#app{width:100%;height:100%;margin:0!important}@font-face{font-family:JetBrainsMono;src:url(./JetBrainsMono-Regular.bceff071.woff2) format("woff2");font-weight:100;font-style:normal}@font-face{font-family:PoetsenOne;src:url(./PoetsenOne.14047964.woff2) format("woff2");font-weight:100;font-style:normal}.magic-editor{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;position:relative;min-width:1200px;min-height:600px;font-size:12px;letter-spacing:0px;background-color:var(--main-background-color);cursor:default;color:var(--main-color);outline:0;--main-color: #000;--main-background-color: #f2f2f2;--main-border-color: #cdcdcd;--main-hover-background-color: #d9d9d9;--main-hover-icon-background-color: #d9d9d9;--main-selected-background-color: #bdbdbd;--main-selected-color: #000;--main-icon-color: #6e6e6e;--navbar-body-background-color: #fff;--navbar-body-border-color: #c0c0c0;--header-title-color: #000;--header-default-color: #6e6e6e;--empty-background-color: #b6b6b6;--empty-color: #505050;--empty-key-color: #5263a0;--tree-hover-background-color: #d4d4d4;--tree-icon-color: #aeb9c0;--table-border-color: #bdbdbd;--input-border-color: #bdbdbd;--input-background-color: #fff;--input-focus-color: #0784de;--dialog-border-color: #707070;--dialog-shadow-color: #cfcfcf;--button-border-color: #adadad;--button-background-color: #e3e3e3;--button-hover-border-color: #99a0a5;--button-hover-background-color: #e3f1fa;--button-disabled-color: #bdbdbd;--select-background-color: #e3e3e3;--select-hover-background-color: #e3f1fa;--select-option-background-color: #fff;--select-option-border-color: #808080;--select-option-hover-background-color: #1a7dc4;--select-option-hover-color: #fff;--select-inputable-background-color: #fff;--tab-selected-background-color: #fff;--icon-debug-color: #59A869;--icon-step-color: #389FD6;--data-type-default-color: #000;--data-type-string-color: #008000;--data-type-integer-color: #0000ff;--data-type-number-color: #0000ff;--data-type-byte-color: #0000ff;--data-type-long-color: #0000ff;--data-type-float-color: #0000ff;--data-type-double-color: #0000ff;--data-type-short-color: #0000ff;--data-type-boolean-color: #000080;--data-type-class-color: #660e7a;--data-type-key-color: #AC0039;--breakpoints-background-color: #db5860;--debug-line-background-color: #2154A6;--breakpoint-line-background-color: #FAEAE6;--run-log-background-color: #fff;--log-color-info: #00cd00;--log-color-warn: #A66F00;--log-color-debug: #00cccc;--log-color-error: #cd0000;--log-color-trace: #0000EE;--log-color-cyan: #00CCCC;--log-color-link: #006DCC;--todo-color: #008dde;--message-em-color: #007F31;--checkbox-background-color: #fff;--checkbox-text-color: #fff;--checkbox-border-color: #b0b0b0;--checkbox-selected-boder-color: #4F9EE3;--checkbox-selected-background-color: #4F9EE3;--resource-label-color: #000;--resource-span-color: #999;--scollbar-color: rgba(170, 170, 170, .7);--scollbar-background: rgba(194, 194, 194, .1);--scollbar-thumb-background: rgba(170, 170, 170, .4);--scollbar-thumb-hover-background: rgba(170, 170, 170, .7);--scollbar-scrollbar-corner-background: rgba(194, 194, 194, .1)}.magic-editor,.magic-editor .monaco-editor,.magic-log pre,.magic-input,.magic-dialog pre{font-family:JetBrainsMono,Consolas,Courier New,\5fae\8f6f\96c5\9ed1}.magic-editor *{box-sizing:border-box;padding:0;margin:0}.magic-editor .none-select{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none}.magic-editor ul{list-style:none;margin:0;padding:0}.magic-editor *{scrollbar-color:var(--scollbar-thumb-background) var(--scollbar-thumb-background);scrollbar-track-color:var(--scollbar-thumb-background);-ms-scrollbar-track-color:var(--scollbar-thumb-background);scrollbar-width:thin}.magic-editor *::-webkit-scrollbar{width:5px;height:5px;background:var(--scollbar-background)}.magic-editor *::-webkit-scrollbar-thumb{border-radius:3px;background:var(--scollbar-thumb-background)}.magic-editor *::-webkit-scrollbar-thumb:hover{background:var(--scollbar-thumb-hover-background)}.magic-editor *::-webkit-scrollbar-corner{background:var(--scollbar-scrollbar-corner-background)}.magic-header .magic-logo,.magic-dialog .magic-dialog-header{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA/1BMVEUIfPoENm0CHz8CIUMAAAAAAwYqKioaGhoQEBAsLCwQEBAJCQkrKysDAwMCAgL6+vr19fUWFhaJiYn8/PylpaWAgID8/PxmZmYSEhLk5ORJSUnLy8vk5OSgoKAFBQXk5OS7u7upqakmJiaqqqqDg4Pp6em5ubmQkJBNTU3x8fF4eHjn5+cBAQE5OTlwcHDm5uafn5/Nzc1+fn6lpaX09PTs7OwpKSk5OTn8/PwsLCz5+flHR0fV1dVsbGzY2NhwcHAMDAzu7u5gYGAMDAwJCQkAAAAHBwcGBgYHBwcEBAQHBwcGBgZtbGyvrq5ERERLSkp5eHgvLy8CIkQABAgABw6+8utZAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UIFBENHjcTIfEAAACNSURBVBjTY2DAAIxMSIAZKMDEggRYwQJs7CwcnFws3Dy8EAE+fgFBIWERFlExcYiAhLCklLSMrJy8giJEQElYWUVVTV1DU0tbByygK6ynb2BoZGxiKmwGFjC3sLSytrG1s3dwdILY4szi4urm7uHJ4uXNitUdPr5g4AcX8A8Ag0CES9G0BAUjgRBMzwMA2+sWGs+mksMAAAAuelRYdGRhdGU6Y3JlYXRlAAAImTMyMDLUNbDQNTIIMbC0MjS2MjbQNrCwMjAAAEGIBQ9X33PQAAAALnpUWHRkYXRlOm1vZGlmeQAACJkzMjAy1DWw0DUyCDGwtDI0tjI20DawsDIwAABBiAUPfuDbWAAAAABJRU5ErkJggg==)}.magic-data-type{color:var(--data-type-default-color)}.magic-data-type.string{color:var(--data-type-string-color);font-weight:700}.magic-data-type.integer{color:var(--data-type-integer-color)}.magic-data-type.number{color:var(--data-type-number-color)}.magic-data-type.double{color:var(--data-type-double-color)}.magic-data-type.float{color:var(--data-type-float-color)}.magic-data-type.short{color:var(--data-type-short-color)}.magic-data-type.long{color:var(--data-type-long-color)}.magic-data-type.byte{color:var(--data-type-byte-color)}.magic-data-type.boolean{color:var(--data-type-boolean-color);font-weight:700}.magic-data-type.class{color:var(--data-type-class-color)}.magic-icon.magic-icon-difference{fill:#389fd6!important}.magic-status-bar .message em,.magic-event em{color:var(--message-em-color);font-style:normal;font-weight:700}.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-expanded,.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-collapsed{margin-left:12px!important}.magic-context-menu[data-v-50740138]{position:absolute;z-index:999999;background-color:var(--main-background-color);border:1px solid var(--main-border-color)}.magic-context-menu li[data-v-50740138]{height:24px;line-height:24px;padding:0 10px;cursor:pointer;display:flex}.magic-context-menu li>span[data-v-50740138],.magic-context-menu li>label[data-v-50740138]{cursor:pointer;white-space:pre}.magic-context-menu li.divided[data-v-50740138]{border-bottom:1px solid var(--main-border-color)}.magic-context-menu .magic-context-menu-icon[data-v-50740138]{display:inline-block;text-align:center;margin-right:8px;width:13px}.magic-context-menu li[data-v-50740138]:hover{background-color:var(--select-option-hover-background-color)}.magic-context-menu li:hover>span[data-v-50740138],.magic-context-menu li:hover>label[data-v-50740138]{color:var(--select-option-hover-color)}.magic-context-menu li:hover>span[data-v-50740138] .magic-icon{fill:var(--select-option-hover-color)}.magic-context-menu li:hover .magic-context-menu[data-v-50740138]{display:block}.magic-context-menu li .magic-context-menu[data-v-50740138]{left:100%;margin-top:-1px;display:none}.magic-context-menu li .magic-context-menu-icon.right[data-v-50740138]{float:right;margin-right:0;margin-left:5px}.magic-empty[data-v-70308d5a]{width:100%;height:100%;position:relative}.magic-empty p[data-v-70308d5a]{text-align:center;width:100%;height:24px;line-height:24px;top:50%;position:relative;margin-top:-12px}.magic-loading[data-v-19c11c56]{width:100%;height:100%;position:relative;top:0;left:0}.magic-loading p[data-v-19c11c56]{position:absolute;text-align:center;width:100%;top:50%;margin-top:-20px}.magic-loading .icon[data-v-19c11c56]{width:20px;margin:0 auto;animation:rotate-19c11c56 1s linear infinite;display:block}@keyframes rotate-19c11c56{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.magic-monaco-editor[data-v-59a04eab],.magic-monaco-editor[data-v-001a684a]{flex:1;overflow:hidden}.magic-monaco-editor[data-v-001a684a] .breakpoints{background:var(--breakpoints-background-color);width:10px!important;height:10px!important;right:0px!important;margin-left:12px;top:5px;border-radius:5px}.magic-monaco-editor[data-v-001a684a] .debug-line{background:var(--debug-line-background-color);color:#fff!important}.magic-monaco-editor[data-v-001a684a] .breakpoint-line{background:var(--breakpoint-line-background-color)}.magic-resizer-x[data-v-032bc45e],.magic-resizer-y[data-v-032bc45e]{display:flex;position:relative;overflow:hidden;transition:none}.magic-resizer-event[data-v-032bc45e]{position:absolute;z-index:20;--width: 100%;--height: 100%}.magic-resizer-event[data-v-032bc45e]:after{content:" ";position:fixed;z-index:9999}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]{width:15px;height:100%;right:-15px;cursor:col-resize}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]:after{width:10px;height:var(--height)}.magic-resizer-x .magic-resizer-event.reverse[data-v-032bc45e]{right:unset;left:-5px}.magic-resizer-x[data-v-032bc45e]{height:100%}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]{height:10px;width:100%;top:-5px;cursor:row-resize}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]:after{height:10px;width:var(--width)}.magic-navbar-item[data-v-30388e35]{height:100%;width:100%}.magic-navbar{display:flex;background-color:var(--main-background-color);transition:.3s}.magic-navbar .magic-navbar-body{background-color:var(--navbar-body-background-color);overflow:auto}.magic-navbar .magic-navbar-header li:hover{background-color:var(--main-hover-background-color)}.magic-navbar .magic-navbar-header li.selected{background-color:var(--main-selected-background-color);color:var(--main-selected-color)}.magic-navbar .magic-navbar-header li.selected svg text{fill:var(--main-selected-color)}.magic-navbar .magic-navbar-header li svg text{letter-spacing:0px;font-size:10px}.magic-navbar__vertical.reverse{flex-direction:row-reverse}.magic-navbar__vertical .magic-navbar-header li{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:8px 3px;cursor:pointer;border-bottom:1px solid var(--main-border-color)}.magic-navbar__vertical .magic-navbar-header{width:22px;height:100%;letter-spacing:2px;text-align:center;padding:0;border-right:1px solid var(--main-border-color)}.magic-navbar__vertical.reverse .magic-navbar-header{border-left:1px solid var(--main-border-color);border-right:none}.magic-navbar__vertical.reverse .magic-navbar-header li{display:flex;flex-direction:column-reverse}.magic-navbar__vertical .magic-navbar-header li{line-height:14px;word-break:break-all}.magic-navbar__vertical .magic-navbar-body{flex:1}.magic-navbar__vertical .magic-navbar-body{border-right:1px solid var(--navbar-body-border-color)}.magic-navbar__vertical.reverse .magic-navbar-body{border-left:1px solid var(--navbar-body-border-color);border-right:none}.magic-navbar__horizontal>ul{width:100%}.magic-navbar__horizontal>ul li{display:inline-flex;flex-direction:row-reverse;padding:0 8px;height:24px;line-height:24px;cursor:pointer;color:var(--main-color)}.magic-navbar__horizontal>ul li svg.magic-icon{height:100%;margin-right:4px}.magic-navbar__horizontal>ul{border-top:1px solid var(--main-border-color)}.magic-navbar.magic-navbar__vertical .magic-navbar-title{padding-bottom:4px}.magic-navbar.magic-navbar__vertical.reverse .magic-navbar-title{padding-top:4px;padding-bottom:0}svg[data-v-15383e92]{width:1.3em;height:1.3em;vertical-align:-.25em;overflow:hidden;fill:var(--main-icon-color)}.magic-tab{width:100%;overflow:hidden;flex-wrap:nowrap;white-space:nowrap;transition:.3s}.magic-tab ul{overflow-x:auto}.magic-tab ul li{display:inline-block;cursor:pointer;padding:0 10px;height:24px;line-height:24px}.magic-tab ul li.selected,.magic-tab ul li:hover,.magic-tab.magic-script-tab ul li.selected:hover,.magic-tab ul li.draggable-target-item{background-color:var(--main-hover-background-color)}.magic-tab.magic-script-tab{border-bottom:1px solid var(--main-border-color);height:30px;position:absolute}.magic-tab.magic-script-tab ul li{height:30px;line-height:30px;border-bottom:3px solid transparent}.magic-tab.magic-script-tab ul li.selected{border-bottom-color:#4083c9;background-color:var(--tab-selected-background-color)}.magic-table{display:flex;flex-direction:column;box-sizing:border-box}.magic-table .magic-table-body{flex:1;overflow:auto}.magic-table .magic-table-header,.magic-table .magic-table-body .magic-table-row{display:flex;height:24px;line-height:24px;border-bottom:1px solid var(--main-border-color)}.magic-table .magic-table-body .magic-table-row:hover{background-color:var(--main-hover-background-color)}.magic-table .magic-table-column{flex:1;display:inline-flex}.magic-table .magic-table-column span:last-child{flex:1;overflow:hidden;text-overflow:ellipsis;width:0px;white-space:pre}.magic-table .magic-table-column .magic-select{width:100%}.magic-table__border .magic-table-body .magic-table-row{border-bottom:1px solid var(--table-border-color)}.magic-table__border .magic-table-column:not(:last-child){border-right:1px solid var(--table-border-color)}.magic-tree{position:relative;overflow:auto}.magic-tree>ul{position:absolute;top:0;left:0}.magic-tree .magic-tree-item{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}.magic-tree .magic-tree-item:hover,.magic-tree .magic-tree-item.selected,.magic-tree .magic-tree-item.draggable-target-item{background-color:var(--tree-hover-background-color)}.magic-tree .magic-tree-item .magic-icon{fill:var(--tree-icon-color);margin-right:2px}.magic-tree ul{max-height:99999px;min-width:100%}.magic-tree li{white-space:nowrap;word-break:break-all}.magic-tree .hide{opacity:0;max-height:0;position:relative}.magic-tree svg:not(.root) .magic-icon-datasource{fill:#089910}.magic-dialog[data-v-3e8f0d71]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;text-align:center}.magic-dialog__shade[data-v-3e8f0d71]{background-color:#0000004d}.magic-dialog[data-v-3e8f0d71]:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.magic-dialog-main[data-v-3e8f0d71]{background:var(--main-background-color);border:1px solid var(--dialog-border-color);display:inline-block;vertical-align:middle;position:relative;min-width:250px;box-shadow:0 0 8px var(--dialog-shadow-color);max-width:800px;color:var(--main-color);transition:none}.magic-dialog-header[data-v-3e8f0d71]{height:30px;line-height:30px;padding-left:30px;padding-right:75px;background-position:7px 7px;background-repeat:no-repeat;text-align:left}.magic-dialog-header.moveable[data-v-3e8f0d71]{cursor:move}.magic-dialog-header span[data-v-3e8f0d71]{display:inline-block;width:30px;position:absolute;right:0;text-align:center;cursor:pointer;font-size:12px;height:30px;line-height:30px}.magic-dialog-header span[data-v-3e8f0d71]:hover{background-color:#e81123}.magic-dialog-header span:hover .magic-icon[data-v-3e8f0d71]{fill:#fff}.magic-dialog-body[data-v-3e8f0d71]{text-align:left;word-break:break-all}.magic-dialog[data-v-3e8f0d71] .magic-loading{min-width:200px;min-height:200px}.magic-notify[data-v-11ebc230]{position:absolute;right:40px;bottom:65px;transition:.5s;z-index:999999}.magic-notify .magic-notify-item[data-v-11ebc230]{background-color:var(--main-background-color);padding:5px;position:relative;border-radius:2px;border:1px solid var(--main-border-color);max-width:280px;box-shadow:0 0 8px var(--dialog-shadow-color)}.magic-notify .magic-notify-item[data-v-11ebc230]:not(:first-child){margin-top:5px}.magic-notify .magic-notify-item .magic-icon-close[data-v-11ebc230]{font-size:12px}.magic-notify .magic-notify-item .close[data-v-11ebc230]{position:absolute;top:2px;right:2px;display:none}.magic-notify .magic-notify-item h3[data-v-11ebc230]{font-size:12px;height:20px;line-height:20px;display:flex;align-items:center}.magic-notify .magic-notify-item h3 svg[data-v-11ebc230]{vertical-align:middle;margin-right:2px}.magic-notify .magic-notify-item:hover .close[data-v-11ebc230]{display:block}.magic-notify .magic-notify-item p[data-v-11ebc230]{padding:5px 5px 5px 16px}.magic-notify .magic-notify-item .magic-button-group[data-v-11ebc230]{padding-left:11px}.magic-button-group[data-v-70c60ab6] .magic-button:not(:last-child){margin-right:10px}.magic-button-group.right[data-v-70c60ab6]{text-align:right}.magic-button-group.left[data-v-70c60ab6]{text-align:left}.magic-button-group.center[data-v-70c60ab6]{text-align:center}.magic-button[data-v-2e4c463a]{height:22px;line-height:22px;background-color:var(--button-background-color);text-align:center;padding:0 15px;border:1px solid var(--button-border-color);outline:0;cursor:pointer;color:var(--main-color)}.magic-button.link[data-v-2e4c463a]{background-color:transparent;color:var(--log-color-link);border:none;padding:0 5px}.magic-button.active[data-v-2e4c463a],.magic-button[data-v-2e4c463a]:hover:not(.link){background-color:var(--button-hover-background-color);border-color:var(--button-hover-border-color)}.magic-checkbox[data-v-22b807f1]{width:100%;height:100%;text-align:center;display:inline-block}.magic-checkbox input[data-v-22b807f1]{display:none}.magic-checkbox input+label[data-v-22b807f1]{position:relative;color:#c9c9c9;font-size:12px;height:24px;line-height:24px;width:24px;user-select:none;display:inline-block}.magic-checkbox input+label[data-v-22b807f1]:after{display:inline-block;background-color:var(--checkbox-background-color);border:1px solid var(--checkbox-border-color);content:"";width:16px;height:16px;line-height:16px;position:absolute;top:2px;left:3px;text-align:center;font-size:12px;color:var(--checkbox-text-color)}.magic-checkbox input:checked+label[data-v-22b807f1]:after{content:"\2714";background-color:var(--checkbox-selected-background-color);border-color:var(--checkbox-selected-border-color)}.magic-checkbox input+label.checkedHalf[data-v-22b807f1]:after{content:"\2501"}.magic-file[data-v-62524fc2]{width:100%;position:relative}.magic-file .magic-icon[data-v-62524fc2]{position:absolute;right:3px;top:3px;height:16px;line-height:16px}.magic-input[data-v-f43ad66a]{height:22px;line-height:22px;border-radius:0;outline:0;border:1px solid transparent;margin:0;padding:0 0 0 5px;background-color:var(--input-background-color);color:var(--main-color)}.magic-input[data-v-f43ad66a]:autofill{background:var(--input-background-color)}.magic-input[data-v-f43ad66a]:-webkit-autofill,.magic-input[data-v-f43ad66a]:-webkit-autofill:hover,.magic-input[data-v-f43ad66a]:-webkit-autofill:focus,.magic-input[data-v-f43ad66a]:-webkit-autofill:active{transition:background-color 5000s;-webkit-text-fill-color:var(--main-color)!important}.magic-input[data-v-f43ad66a]:focus{border-color:var(--input-focus-color)}.magic-input__border[data-v-f43ad66a]{border-color:var(--input-border-color)}.magic-input[data-v-f43ad66a]::-webkit-outer-spin-button,.magic-input[data-v-f43ad66a]::-webkit-inner-spin-button{-webkit-appearance:none}.magic-input[type=number][data-v-f43ad66a]{-moz-appearance:textfield}.magic-select[data-v-249fb96c]{position:relative;display:inline-block;background:var(--select-background-color);height:22px;line-height:22px;width:80px;font-size:12px;text-align:left}.magic-select.inputable[data-v-249fb96c]{background:var(--select-inputable-background-color);border-color:var(--select-inputable-border-color)}.magic-select.border[data-v-249fb96c]{border:1px solid var(--input-border-color)}.magic-select input[data-v-249fb96c]{background:none;border:none;height:22px;line-height:22px;border-radius:0;outline:0;padding-left:5px;width:100%;color:var(--main-color)}.magic-select span[data-v-249fb96c]{height:22px;line-height:22px;border-radius:0;outline:0;padding-left:5px}.magic-select[data-v-249fb96c]:hover:not(.inputable){background:var(--select-hover-background-color)}.magic-select .magic-icon[data-v-249fb96c]{position:absolute;right:5px;height:100%}.magic-select ul[data-v-249fb96c]{display:block;position:fixed;z-index:10;background:var(--select-option-background-color);border:1px solid var(--select-option-border-color);margin-top:-2px;padding:0;box-sizing:content-box;margin-left:-1px}.magic-select ul li[data-v-249fb96c]{padding:0 5px;width:100%!important;height:22px;text-overflow:ellipsis;word-break:keep-all;text-align:left}.magic-select ul li[data-v-249fb96c]:hover{background:var(--select-option-hover-background-color);color:var(--select-option-hover-color)}.magic-textarea[data-v-ca6693f6]{line-height:22px;border-radius:0;outline:0;border:1px solid var(--input-border-color);resize:none;background:var(--input-background-color);color:var(--input-color);width:100%;height:100%}.magic-textarea[data-v-ca6693f6]:focus{border-color:var(--input-focus-color)}.magic-avatar-group[data-v-511f7f80]{display:inline-block;height:22px;line-height:22px}.magic-avatar-group .magic-avatar[data-v-511f7f80]{position:relative;margin-left:-5px}.magic-avatar[data-v-73f02f44]{color:#fff;display:inline-block;text-align:center}.magic-navbar[data-v-41b9c04c]{width:100%;height:100%}.magic-navbar[data-v-41b9c04c] .magic-navbar-body{border-right:none;width:100%;height:100%;display:flex;position:relative}.magic-navbar[data-v-41b9c04c] .magic-navbar-item>*{width:100%;height:100%}.magic-api-group[data-v-07a9bc9f]{display:flex;flex-direction:column}.magic-api-group form[data-v-07a9bc9f]{display:flex;padding:5px}.magic-api-group form label[data-v-07a9bc9f]{display:inline-block;width:85px;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px}.magic-api-group+.magic-navbar[data-v-07a9bc9f]{flex-direction:column;overflow:hidden}.magic-api-group+.magic-navbar[data-v-07a9bc9f] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-07a9bc9f] .magic-navbar-body,.magic-navbar[data-v-07a9bc9f] .magic-navbar-item{width:100%;height:100%}.magic-api-group>form .magic-button[data-v-07a9bc9f]{margin-left:10px}.magic-api-info[data-v-8ed3340e]{display:flex;flex-direction:column}.magic-api-info form[data-v-8ed3340e]{display:flex;padding:5px}.magic-api-info form label[data-v-8ed3340e]{display:inline-block;width:75px;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px}.magic-api-info+.magic-navbar[data-v-8ed3340e]{flex-direction:column;overflow:hidden}.magic-api-info+.magic-navbar[data-v-8ed3340e] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-8ed3340e] .magic-navbar-body,.magic-navbar[data-v-8ed3340e] .magic-navbar-item{width:100%;height:100%}.magic-monaco-editor[data-v-5ab7df51]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-bda6618c]{flex:1}.magic-table[data-v-bda6618c] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-bda6618c] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-bda6618c]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:center}iframe[data-v-bbc94624]{width:100%;height:100%;border:0}.magic-monaco-editor[data-v-bbc94624]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-76813707]{flex:1}.magic-table span[data-v-76813707]{padding:0 5px}.magic-table[data-v-051e4f5a]{flex:1}.magic-table[data-v-051e4f5a] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-051e4f5a] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-051e4f5a]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.magic-panel-api-response[data-v-a23b6466]{width:100%;height:100%;display:flex;flex-direction:column}.magic-panel-api-response[data-v-a23b6466] .magic-navbar__horizontal>ul{border-top:none;border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-a23b6466]{flex-direction:column;width:100%;height:100%}.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-body,.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-item{width:100%;height:100%}.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-item{display:flex;position:relative}.magic-global[data-v-03e7bbcc]{display:flex;flex-direction:column;flex:1;width:100%;height:100%}.magic-global>.magic-navbar[data-v-03e7bbcc]{flex-direction:column;overflow:hidden}.magic-global>.magic-navbar[data-v-03e7bbcc] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-03e7bbcc] .magic-navbar-body,.magic-navbar[data-v-03e7bbcc] .magic-navbar-item{width:100%;height:100%}.magic-global .magic-panel-global[data-v-03e7bbcc]{display:flex;width:100%;height:100%}.magic-global[data-v-03e7bbcc] .magic-panel-global>div{flex:1}.magic-panel-toolbar[data-v-56150b69]{width:24px;border-right:1px solid var(--main-border-color);height:100%;text-align:center}.magic-panel-toolbar li[data-v-56150b69]{cursor:pointer;border-radius:2px;width:18px;height:18px;line-height:18px;margin:3px;font-size:.95em}.magic-panel-toolbar li[data-v-56150b69]:not(.disabled):hover,.magic-panel-toolbar li:not(.disabled).selected[data-v-56150b69]{background-color:var(--main-hover-icon-background-color)}.magic-panel-toolbar li.disabled[data-v-56150b69] .magic-icon>*{fill:var(--button-disabled-color)}.magic-resource-choose[data-v-4852fc0e]{max-height:400px;overflow:auto}.magic-resource-choose .magic-tree[data-v-4852fc0e]{margin-bottom:5px;min-height:300px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-icon.root{color:var(--main-icon-color)}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox{display:inline;margin-right:3px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label{width:12px!important;height:12px!important}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-tree-item{padding-left:5px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label:after{width:12px!important;height:12px!important;line-height:12px!important;top:0!important;left:0!important}.magic-resource-choose[data-v-4852fc0e] .magic-tree label{color:var(--resource-label-color)}.magic-resource-choose[data-v-4852fc0e] .magic-tree span{color:var(--resource-span-color)}.magic-table[data-v-5ad176c0]{width:270px;border-right:1px solid var(--table-border-color)}.magic-backup-file[data-v-5ad176c0]{height:100%;position:relative;overflow:hidden;display:flex}.magic-backup-file-diff-container[data-v-5ad176c0]{flex:1;overflow:hidden;height:100%;display:flex;flex-direction:column}.magic-backup-file-diff-container>ul[data-v-5ad176c0]{display:flex}.magic-backup-file-diff-container>ul li[data-v-5ad176c0]{flex:1;height:30px;line-height:30px;padding:0 5px}.magic-backup-file-diff-container>ul li button[data-v-5ad176c0]{float:right;margin-right:10px;margin-top:4px}.magic-backup[data-v-56b7f954]{display:flex;flex:1;height:100%}.magic-backup>div[data-v-56b7f954]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-backup .magic-table[data-v-56b7f954]{height:100%;position:absolute;width:100%}.magic-backup[data-v-56b7f954] .magic-table-row .magic-table-column:last-child,.magic-backup[data-v-56b7f954] .magic-table-header .magic-table-column:last-child{padding-left:5px}.magic-backup-diff-container[data-v-56b7f954]{width:100%;height:100%;display:flex;flex-direction:column}.magic-backup-diff-container .magic-backup-diff-header[data-v-56b7f954]{height:30px;line-height:30px;display:flex}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-56b7f954]{flex:1}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-56b7f954]:last-child{text-align:right}.magic-dialog-diff .magic-dialog-main{display:inline-flex;flex-direction:column}.magic-dialog-diff .magic-dialog-main .magic-dialog-body{flex:1;display:flex;flex-direction:column}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-continue{fill:var(--icon-debug-color)}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-step-over{fill:var(--icon-step-color)}.magic-debug[data-v-71b796dc]{display:flex;flex:1}.magic-debug .magic-debug-variables[data-v-71b796dc]{flex:1;background-color:var(--navbar-body-background-color);position:relative;overflow:auto}.magic-debug[data-v-71b796dc] .magic-tree{position:absolute;width:100%;height:100%}.magic-debug[data-v-71b796dc] .magic-tree .magic-tree-item{height:auto}.magic-debug .object-type[data-v-71b796dc]{color:var(--resource-span-color)}.magic-debug label.key[data-v-71b796dc]{color:var(--data-type-key-color);padding-left:3px}.magic-debug label.separator[data-v-71b796dc]{padding:0 5px}.magic-debug svg[data-v-71b796dc]{display:inline-block;width:16px;height:16px;vertical-align:middle}.magic-event[data-v-06d5ba36],.magic-event[data-v-06d5ba36] .magic-table{display:flex;flex:1}.magic-event>div[data-v-06d5ba36]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-event[data-v-06d5ba36] .magic-table{height:100%;position:absolute;width:100%}.magic-event[data-v-06d5ba36] .magic-table .magic-table-header{display:none}.magic-event[data-v-06d5ba36] .magic-table .magic-table-row{border-right:1px solid var(--main-border-color)}.magic-event[data-v-06d5ba36] .magic-table .magic-table-column{padding-left:5px}.magic-log-wrapper{display:flex;flex:1;height:100%;overflow:hidden;position:relative}.magic-log{font-size:13.5px;padding:5px;flex:1;overflow:auto;position:absolute;top:0;right:0;bottom:0;left:24px}.magic-log>div{width:100%}.magic-log>div pre{line-height:20px;width:100%}.magic-log>div.multiple pre{max-height:60px;overflow:hidden}.magic-log>div.multiple.more pre{max-height:none}.magic-log span.multiple{opacity:.5;font-size:13px;text-decoration:underline;cursor:pointer}.magic-log pre span.log-INFO{color:var(--log-color-info)}.magic-log pre span.log-DEBUG{color:var(--log-color-debug)}.magic-log pre span.log-ERROR{color:var(--log-color-error)}.magic-log pre span.log-WARN{color:var(--log-color-warn)}.magic-log pre span.log-TRACE{color:var(--log-color-trace)}.magic-log pre span.log-cyan{color:var(--log-color-cyan)}.magic-log pre a.log-link{color:var(--log-color-link)}.magic-online[data-v-0c296fa2]{height:30px;line-height:30px;float:right;padding-left:10px;max-width:500px}.magic-online>span[data-v-0c296fa2]{padding-left:5px}.magic-status-bar[data-v-49bc4fc3]{height:30px;line-height:30px;display:flex;background-color:var(--main-background-color);padding-left:24px}.magic-status-bar .message[data-v-49bc4fc3]{flex:1}.magic-status-bar ul[data-v-49bc4fc3]{float:right;display:inline-flex;align-items:center;padding-right:2px}.magic-status-bar ul li[data-v-49bc4fc3]{cursor:pointer;padding:0 4px;height:20px;line-height:20px;border-radius:3px}.magic-status-bar ul li .magic-icon[data-v-49bc4fc3]{height:20px;line-height:20px}.magic-status-bar ul li[data-v-49bc4fc3]:hover{background-color:var(--main-hover-icon-background-color)}.magic-todo[data-v-29308d9b]{display:flex;flex:1}.magic-todo div[data-v-29308d9b]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative}.magic-todo div[data-v-29308d9b] .magic-tree{width:100%;height:100%;position:absolute;overflow:auto}.magic-todo div[data-v-29308d9b] .magic-tree label{color:var(--resource-label-color)}.magic-todo div[data-v-29308d9b] .magic-tree label.todo{font-style:italic;color:var(--todo-color)}.magic-todo div[data-v-29308d9b] .magic-tree span{color:var(--resource-span-color)}.magic-toolbar .magic-navbar[data-v-200d8d00]{flex-direction:column-reverse}.magic-toolbar-header[data-v-200d8d00]{height:26px;line-height:26px;border-bottom:1px solid var(--main-border-color);border-top:1px solid var(--main-border-color);background-color:var(--main-background-color)}.magic-toolbar-header+div[data-v-200d8d00]{z-index:99999}.magic-toolbar-header label[data-v-200d8d00]{display:inline-block;padding-left:10px}.magic-toolbar .magic-resizer-y[data-v-200d8d00]{flex-direction:column}.magic-toolbar-header-buttons[data-v-200d8d00]{float:right;margin-right:5px;vertical-align:middle;display:flex;align-items:center;height:26px}.magic-toolbar-header-buttons .magic-icon[data-v-200d8d00]{display:inline-block;cursor:pointer;padding:0 2px;height:18px;line-height:18px;border-radius:3px;z-index:99999}.magic-toolbar-header-buttons .magic-icon[data-v-200d8d00]:hover{background-color:var(--main-hover-icon-background-color)}.magic-toolbar .magic-navbar[data-v-200d8d00] .magic-navbar-body{background-color:var(--main-background-color)}.magic-panel-api,.magic-panel-function,.magic-event{display:flex;width:100%;height:100%}.magic-panel-api>div,.magic-panel-function>div,.magic-event>div{flex:1}.magic-function-info[data-v-bc8654ec]{display:flex;flex-direction:column}.magic-function-info form[data-v-bc8654ec]{display:flex;padding:5px}.magic-function-info form label[data-v-bc8654ec]{display:inline-block;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px 0 20px}.magic-navbar[data-v-bc8654ec]{flex-direction:column;overflow:hidden}.magic-navbar[data-v-bc8654ec] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-bc8654ec] .magic-navbar-body,.magic-navbar[data-v-bc8654ec] .magic-navbar-item{width:100%;height:100%}.magic-dialog[data-v-097eba83] .magic-dialog-body{overflow:hidden}.magic-header[data-v-4e11654b]{height:30px;line-height:30px;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);display:flex;color:var(--header-default-color)}.magic-header .magic-logo[data-v-4e11654b]{float:left;font-weight:700;font-size:0;letter-spacing:0;background-repeat:no-repeat;background-position:4px 7px;padding-left:25px;color:var(--header-title-color)}.magic-header .magic-logo label[data-v-4e11654b]{font-size:16px;display:inline-block;margin-right:5px;text-align:left;font-weight:400}.magic-header .magic-logo label[data-v-4e11654b]:last-child{font-size:12px}.magic-header ul[data-v-4e11654b]{float:right}.magic-header ul li[data-v-4e11654b]{cursor:pointer;height:30px;text-align:center;display:inline-flex;align-items:center}.magic-header ul li svg[data-v-4e11654b]{padding:0 4px;height:24px;width:24px;border-radius:4px}.magic-header ul li.disabled svg[data-v-4e11654b]{fill:var(--button-disabled-color)}.magic-header ul li:not(.disabled) svg[data-v-4e11654b]:hover{background-color:var(--main-hover-icon-background-color)}.magic-header ul li[data-v-4e11654b]:not(.disabled) .magic-icon-run,.magic-header ul li[data-v-4e11654b] .magic-icon-push{fill:#59a869}.magic-header-title[data-v-4e11654b]{flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-skin-selector[data-v-4e11654b],.magic-locale-selector[data-v-4e11654b]{position:absolute;top:30px;right:24px;z-index:20;background-color:var(--main-background-color);border:1px solid var(--main-border-color);border-top:none}.magic-skin-selector[data-v-4e11654b]{right:48px}.magic-skin-selector ul li[data-v-4e11654b],.magic-locale-selector ul li[data-v-4e11654b]{height:24px;line-height:24px;text-align:center;cursor:pointer;padding:2px 5px}.magic-skin-selector ul li[data-v-4e11654b]:not(:last-child),.magic-locale-selector ul li[data-v-4e11654b]:not(:last-child){border-bottom:1px solid var(--main-border-color)}.magic-skin-selector ul li[data-v-4e11654b]:hover,.magic-locale-selector ul li[data-v-4e11654b]:hover{background-color:var(--main-hover-background-color)}.magic-dialog[data-v-e421c192] .magic-dialog-body{overflow:hidden}.magic-push-form[data-v-e421c192]{padding:0 10px}.magic-push-form>div[data-v-e421c192]{display:flex;margin-top:5px}.magic-push-form label[data-v-e421c192]{width:80px;text-align:right;display:inline-block}.magic-push-form[data-v-e421c192] .magic-input{width:auto!important;flex:1}.magic-search-result[data-v-4bbc2d10]{overflow:auto;max-height:200px;background-color:var(--navbar-body-background-color)}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]{display:flex;padding:0 5px;line-height:20px}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]:hover,.magic-search-result .magic-search-result-item.selected[data-v-4bbc2d10]{background-color:var(--tree-hover-background-color)}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10] .keyword{background:#FFDE7B;color:#000}.magic-search-result-item .name[data-v-4bbc2d10],.magic-search-result-item .line[data-v-4bbc2d10]{color:var(--resource-span-color)}.magic-search-result .magic-search-result-item .line[data-v-4bbc2d10]{padding-left:5px}.display-text[data-v-4bbc2d10]{height:30px;line-height:30px;border-top:1px solid var(--main-border-color);border-bottom:1px solid var(--main-border-color)}.magic-data-resource[data-v-18e97171]{display:flex;flex-direction:column;flex:1;width:100%}.magic-data-resource .magic-data-resource-header[data-v-18e97171]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);padding-left:3px}.magic-data-resource .magic-data-resource-header input[data-v-18e97171]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-data-resource .magic-data-resource-header ul[data-v-18e97171]{display:inline-flex;align-items:center}.magic-data-resource .magic-data-resource-header ul li[data-v-18e97171]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-data-resource .magic-data-resource-header ul li.separator[data-v-18e97171]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-data-resource .magic-data-resource-header ul li[data-v-18e97171]:hover{background:var(--main-hover-icon-background-color)}.magic-data-resource .magic-data-resource-header svg[data-v-18e97171]{height:100%}.magic-data-resource>ul[data-v-18e97171]{height:100%;overflow:auto}.magic-data-resource>ul li[data-v-18e97171]{line-height:22px;padding-left:10px;white-space:nowrap}.magic-data-resource>ul li[data-v-18e97171]:hover{background-color:var(--tree-hover-background-color)}.magic-data-resource>ul li .magic-icon[data-v-18e97171]{padding-right:2px}.magic-data-resource>ul li label[data-v-18e97171]{color:var(--resource-label-color)}.magic-data-resource>ul li span[data-v-18e97171]{color:var(--resource-span-color);display:inline-block;height:22px;line-height:22px}.magic-data-resource>ul li[data-v-18e97171] .magic-icon-datasource{fill:#089910}.magic-editor .magic-form-row{display:flex;margin-bottom:5px}.magic-editor .magic-form-row label{margin-right:5px;display:inline-block;width:70px;text-align:right;height:22px;line-height:22px}.magic-editor .magic-form-row>input,.magic-editor .magic-form-row>.magic-select{flex:1;width:auto}label[data-v-f15aae88]{width:60px;text-align:right;display:inline-block}.magic-login[data-v-f15aae88]{position:fixed;z-index:999999999999;background:#fff;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-image:url(./login-bg.025a11cc.svg)}.magic-login .magic-login-box[data-v-f15aae88]{border-radius:5px;width:450px;box-shadow:0 7px 25px #00000014;position:absolute;box-sizing:border-box;padding-top:60px;top:33.333333%;margin-top:-125px;background-color:#fff}.magic-login-logo[data-v-f15aae88]{background-image:url(./logo-magic-api.7bf52c65.png);width:128px;height:128px;background-size:90px 90px;background-repeat:no-repeat;background-position:center center;position:absolute;top:-64px;left:50%;margin-left:-64px;border-radius:64px;box-shadow:0 0 20px 5px #00000014;padding:10px;background-color:#fff}.magic-login-text[data-v-f15aae88]{height:70px;line-height:70px;display:block;text-align:center;font-family:PoetsenOne;font-size:28px;color:gray}.magic-login-text span[data-v-f15aae88]{font-size:16px}.magic-login-copyright[data-v-f15aae88]{text-align:center;color:#999;font-size:18px;font-family:Avenir,Helvetica,Arial,sans-serif;position:absolute;bottom:50px}.magic-login-copyright a[data-v-f15aae88]{text-decoration:none;color:#2196f3;outline:0}.magic-login-row[data-v-f15aae88]{width:400px;margin:25px auto;position:relative}.magic-login-row.error[data-v-f15aae88]{background-color:#fff1f0;border:1px solid #ffa39e;color:#000;border-radius:4px;padding:10px 0 10px 40px}.magic-login-row.error span[data-v-f15aae88]{font-size:14px;word-break:break-all}.magic-login-row svg[data-v-f15aae88]{position:absolute;width:20px;height:20px;top:15px;left:15px}.magic-login-row[data-v-f15aae88] .magic-icon-error{fill:red}.magic-login-box .magic-input[data-v-f15aae88]{height:50px;line-height:50px;background-color:transparent;display:block;border:1px solid #D9D9D9;border-radius:4px;padding-left:40px;color:#000000a6;transition:all .3s;font-size:16px}.magic-login-box .magic-input[data-v-f15aae88]:focus{border-color:#0784de}.magic-login-box .magic-button[data-v-f15aae88]{width:100%;height:50px;line-height:50px;background-color:#2196f3;color:#fff;border-radius:4px;font-size:18px;border-color:#2196f3;transition:all .3s}.magic-login-box .magic-button[data-v-f15aae88]:hover,.magic-login-box .magic-button[data-v-f15aae88]:focus{background-color:#4db5ff!important;border-color:#4db5ff!important}.magic-login-box .magic-button[data-v-f15aae88]:active{background-color:#1272cc;border-color:#1272cc}.magic-main[data-v-32b75b61]{flex:1;display:flex;border-bottom:1px solid var(--main-border-color);height:0;width:100%}.magic-main-body-wrapper[data-v-32b75b61]{display:flex;flex:1;flex-direction:column}.magic-main-body[data-v-32b75b61]{display:flex;flex:1;overflow:hidden}.magic-toolbar[data-v-32b75b61] .magic-resizer-y .magic-resizer-event{top:auto}ul[data-v-44903aa6]{max-width:400px;max-height:600px;overflow:auto}ul li[data-v-44903aa6]:hover{background-color:var(--tree-hover-background-color)}ul li[data-v-44903aa6]{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}ul li label[data-v-44903aa6]{color:var(--resource-label-color)}ul li span[data-v-44903aa6]{color:var(--resource-span-color)}.magic-dialog-main[data-v-44903aa6] .magic-dialog-body{padding:0}.magic-resource[data-v-3ed2708c]{display:flex;flex-direction:column;flex:1;width:100%}.magic-resource .magic-resource-header[data-v-3ed2708c]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color)}.magic-resource .magic-resource-header input[data-v-3ed2708c]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-resource .magic-resource-header ul[data-v-3ed2708c]{display:inline-flex;align-items:center}.magic-resource .magic-resource-header ul li[data-v-3ed2708c]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-resource .magic-resource-header svg[data-v-3ed2708c]{height:100%}.magic-resource .magic-resource-header ul li.separator[data-v-3ed2708c]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-resource .magic-resource-header ul li[data-v-3ed2708c]:hover{background:var(--main-hover-icon-background-color)}.magic-resource .magic-tree label[data-v-3ed2708c]{color:var(--resource-label-color)}.magic-resource .magic-tree span[data-v-3ed2708c]{color:var(--resource-span-color)}.magic-resource .magic-tree .magic-icon-lock[data-v-3ed2708c]{fill:var(--resource-label-color);margin-left:5px}.magic-resource>.magic-tree[data-v-3ed2708c]{flex:1;overflow:auto}.magic-create-group li[data-v-3ed2708c]{display:flex;height:26px;line-height:26px}.magic-create-group li input[data-v-3ed2708c]{flex:1}.magic-resource[data-v-3ed2708c] .magic-avatar-group{margin-left:10px}.magic-script-editor[data-v-4cec8173]{flex:1;overflow:hidden;position:relative}.magic-script-editor .magic-monaco-editor-wrapper[data-v-4cec8173]{position:absolute;top:30px;left:0;right:0;bottom:0}.magic-empty-container[data-v-4cec8173]{flex:1;position:relative;width:100%;height:100%;background:var(--empty-background-color)}.magic-hot-key[data-v-4cec8173]{position:absolute;top:50%;margin-top:-105px;text-align:center;color:var(--empty-color);font-size:16px;width:100%}.magic-hot-key p[data-v-4cec8173]{display:inline-block;text-align:left;line-height:30px}.magic-hot-key p em[data-v-4cec8173]{margin-left:15px;font-style:normal;color:var(--empty-key-color)}.magic-monaco-editor[data-v-4cec8173]{position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible!important}.magic-script-editor[data-v-4cec8173] .magic-avatar-group{margin-left:10px}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs .view-overlays .current-line,.monaco-editor.vs-dark .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs .cursor,.monaco-editor.vs-dark .cursor{background-color:windowtext!important}.monaco-editor.vs .dnd-target,.monaco-editor.vs-dark .dnd-target{border-color:windowtext!important}.monaco-editor.vs .selected-text,.monaco-editor.vs-dark .selected-text{background-color:highlight!important}.monaco-editor.vs .view-line,.monaco-editor.vs-dark .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs .view-line span,.monaco-editor.vs-dark .view-line span{color:windowtext!important}.monaco-editor.vs .view-line span.inline-selected-text,.monaco-editor.vs-dark .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs .view-overlays,.monaco-editor.vs-dark .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs .selectionHighlight,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs .wordHighlightStrong,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs-dark .reference-decoration{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .rangeHighlight,.monaco-editor.vs-dark .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .bracket-match,.monaco-editor.vs-dark .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs .findMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs-dark .currentFindMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .find-widget,.monaco-editor.vs-dark .find-widget{border:1px solid windowtext}.monaco-editor.vs .monaco-list .monaco-list-row,.monaco-editor.vs-dark .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs .monaco-list .monaco-list-row.focused,.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-list .monaco-list-row:hover,.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:highlight!important}.monaco-editor.vs .decorationsOverviewRuler,.monaco-editor.vs-dark .decorationsOverviewRuler{opacity:0}.monaco-editor.vs .minimap,.monaco-editor.vs-dark .minimap{display:none}.monaco-editor.vs .squiggly-d-error,.monaco-editor.vs-dark .squiggly-d-error{background:transparent!important;border-bottom:4px double #E47777}.monaco-editor.vs .squiggly-c-warning,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs-dark .squiggly-b-info{border-bottom:4px double #71B771}.monaco-editor.vs .squiggly-a-hint,.monaco-editor.vs-dark .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs .diffOverviewRuler,.monaco-diff-editor.vs-dark .diffOverviewRuler{display:none}.monaco-editor.vs .line-insert,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs-dark .line-delete{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs .char-insert,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs-dark .char-delete{background:transparent!important}}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.vs-dark .mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.hc-black.mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:#ddd 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:#ddd 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:#ddd 6px 6px 6px -6px inset}.vs .monaco-scrollable-element>.scrollbar>.slider{background:rgba(100,100,100,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:rgba(121,121,121,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(100,100,100,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(191,191,191,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(111,195,223,1)}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:#000 6px 0 6px -6px inset}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:#000 6px 6px 6px -6px inset}.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .lines-content .core-guide{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{position:absolute;top:0;background:white}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:rgba(255,255,255,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:rgba(0,0,0,0)}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:rgba(171,171,171,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}:root{--sash-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color .1s ease-out;background:transparent}.monaco-sash.vertical:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}@font-face{font-family:codicon;font-display:block;src:url(./codicon.d86f69b1.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}.context-view .monaco-menu{min-width:130px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:grab}.monaco-list-type-filter.dragging{cursor:grabbing}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight,.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight,.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear;transform:translate(0)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2000;padding:0 1px 1px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex;align-items:center}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{display:flex;align-items:center;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;-ms-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:center;font-size:13px;margin-left:20px;min-width:0}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta,.monaco-editor .peekview-widget .head .peekview-title .dirname{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,.hc-black .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-dropdown-with-default>.action-container.menu-entry>.action-label,.hc-black .monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-hover{cursor:default;position:absolute;overflow:hidden;z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;box-sizing:initial;animation:fadein .1s linear;line-height:1.5em}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:500px;word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:216px;line-height:24px;cursor:pointer;color:#fff;flex:1;text-align:center}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,#ff0000 0%,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid transparent;overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{opacity:.5;color:inherit}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text{font-style:italic}.monaco-editor.vs .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{margin-left:2px;float:left;cursor:pointer;overflow:hidden;opacity:.7;width:20px;height:20px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-custom-checkbox:hover,.monaco-custom-checkbox.checked{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px))}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:4px 0 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{opacity:.3;cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:rgba(255,255,255,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:rgba(255,255,255,.44)}99%{background:transparent}}.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"\22ef";display:inline;line-height:1em;cursor:pointer}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{z-index:10;display:flex;flex-direction:column;line-height:1.5em}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;opacity:.5;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .accessibilityHelpWidget{padding:10px;vertical-align:middle;overflow:scroll}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:10px}.tokens-inspect-separator{height:1px;border:0}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)} +html,body,#app{width:100%;height:100%;margin:0!important}@font-face{font-family:JetBrainsMono;src:url(./JetBrainsMono-Regular.bceff071.woff2) format("woff2");font-weight:100;font-style:normal}@font-face{font-family:PoetsenOne;src:url(./PoetsenOne.14047964.woff2) format("woff2");font-weight:100;font-style:normal}.magic-editor{width:100%;height:100%;overflow:auto;display:flex;flex-direction:column;position:relative;min-width:1200px;min-height:600px;font-size:12px;letter-spacing:0px;background-color:var(--main-background-color);cursor:default;color:var(--main-color);outline:0;--main-color: #000;--main-background-color: #f2f2f2;--main-border-color: #cdcdcd;--main-hover-background-color: #d9d9d9;--main-hover-icon-background-color: #d9d9d9;--main-selected-background-color: #bdbdbd;--main-selected-color: #000;--main-icon-color: #6e6e6e;--navbar-body-background-color: #fff;--navbar-body-border-color: #c0c0c0;--header-title-color: #000;--header-default-color: #6e6e6e;--empty-background-color: #b6b6b6;--empty-color: #505050;--empty-key-color: #5263a0;--tree-hover-background-color: #d4d4d4;--tree-icon-color: #aeb9c0;--table-border-color: #bdbdbd;--input-border-color: #bdbdbd;--input-background-color: #fff;--input-focus-color: #0784de;--dialog-border-color: #707070;--dialog-shadow-color: #cfcfcf;--button-border-color: #adadad;--button-background-color: #e3e3e3;--button-hover-border-color: #99a0a5;--button-hover-background-color: #e3f1fa;--button-disabled-color: #bdbdbd;--select-background-color: #e3e3e3;--select-hover-background-color: #e3f1fa;--select-option-background-color: #fff;--select-option-border-color: #808080;--select-option-hover-background-color: #1a7dc4;--select-option-hover-color: #fff;--select-inputable-background-color: #fff;--tab-selected-background-color: #fff;--icon-debug-color: #59A869;--icon-step-color: #389FD6;--data-type-default-color: #000;--data-type-string-color: #008000;--data-type-integer-color: #0000ff;--data-type-number-color: #0000ff;--data-type-byte-color: #0000ff;--data-type-long-color: #0000ff;--data-type-float-color: #0000ff;--data-type-double-color: #0000ff;--data-type-short-color: #0000ff;--data-type-boolean-color: #000080;--data-type-class-color: #660e7a;--data-type-key-color: #AC0039;--breakpoints-background-color: #db5860;--debug-line-background-color: #2154A6;--breakpoint-line-background-color: #FAEAE6;--run-log-background-color: #fff;--log-color-info: #00cd00;--log-color-warn: #A66F00;--log-color-debug: #00cccc;--log-color-error: #cd0000;--log-color-trace: #0000EE;--log-color-cyan: #00CCCC;--log-color-link: #006DCC;--todo-color: #008dde;--message-em-color: #007F31;--checkbox-background-color: #fff;--checkbox-text-color: #fff;--checkbox-border-color: #b0b0b0;--checkbox-selected-boder-color: #4F9EE3;--checkbox-selected-background-color: #4F9EE3;--resource-label-color: #000;--resource-span-color: #999;--scollbar-color: rgba(170, 170, 170, .7);--scollbar-background: rgba(194, 194, 194, .1);--scollbar-thumb-background: rgba(170, 170, 170, .4);--scollbar-thumb-hover-background: rgba(170, 170, 170, .7);--scollbar-scrollbar-corner-background: rgba(194, 194, 194, .1)}.magic-editor,.magic-editor .monaco-editor,.magic-log pre,.magic-input,.magic-dialog pre{font-family:JetBrainsMono,Consolas,Courier New,\5fae\8f6f\96c5\9ed1}.magic-editor *{box-sizing:border-box;padding:0;margin:0}.magic-editor .none-select{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;-khtml-user-select:none;user-select:none}.magic-editor ul{list-style:none;margin:0;padding:0}.magic-editor *{scrollbar-color:var(--scollbar-thumb-background) var(--scollbar-thumb-background);scrollbar-track-color:var(--scollbar-thumb-background);-ms-scrollbar-track-color:var(--scollbar-thumb-background);scrollbar-width:thin}.magic-editor *::-webkit-scrollbar{width:5px;height:5px;background:var(--scollbar-background)}.magic-editor *::-webkit-scrollbar-thumb{border-radius:3px;background:var(--scollbar-thumb-background)}.magic-editor *::-webkit-scrollbar-thumb:hover{background:var(--scollbar-thumb-hover-background)}.magic-editor *::-webkit-scrollbar-corner{background:var(--scollbar-scrollbar-corner-background)}.magic-header .magic-logo,.magic-dialog .magic-dialog-header{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAA/1BMVEUIfPoENm0CHz8CIUMAAAAAAwYqKioaGhoQEBAsLCwQEBAJCQkrKysDAwMCAgL6+vr19fUWFhaJiYn8/PylpaWAgID8/PxmZmYSEhLk5ORJSUnLy8vk5OSgoKAFBQXk5OS7u7upqakmJiaqqqqDg4Pp6em5ubmQkJBNTU3x8fF4eHjn5+cBAQE5OTlwcHDm5uafn5/Nzc1+fn6lpaX09PTs7OwpKSk5OTn8/PwsLCz5+flHR0fV1dVsbGzY2NhwcHAMDAzu7u5gYGAMDAwJCQkAAAAHBwcGBgYHBwcEBAQHBwcGBgZtbGyvrq5ERERLSkp5eHgvLy8CIkQABAgABw6+8utZAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+UIFBENHjcTIfEAAACNSURBVBjTY2DAAIxMSIAZKMDEggRYwQJs7CwcnFws3Dy8EAE+fgFBIWERFlExcYiAhLCklLSMrJy8giJEQElYWUVVTV1DU0tbByygK6ynb2BoZGxiKmwGFjC3sLSytrG1s3dwdILY4szi4urm7uHJ4uXNitUdPr5g4AcX8A8Ag0CES9G0BAUjgRBMzwMA2+sWGs+mksMAAAAuelRYdGRhdGU6Y3JlYXRlAAAImTMyMDLUNbDQNTIIMbC0MjS2MjbQNrCwMjAAAEGIBQ9X33PQAAAALnpUWHRkYXRlOm1vZGlmeQAACJkzMjAy1DWw0DUyCDGwtDI0tjI20DawsDIwAABBiAUPfuDbWAAAAABJRU5ErkJggg==)}.magic-data-type{color:var(--data-type-default-color)}.magic-data-type.string{color:var(--data-type-string-color);font-weight:700}.magic-data-type.integer{color:var(--data-type-integer-color)}.magic-data-type.number{color:var(--data-type-number-color)}.magic-data-type.double{color:var(--data-type-double-color)}.magic-data-type.float{color:var(--data-type-float-color)}.magic-data-type.short{color:var(--data-type-short-color)}.magic-data-type.long{color:var(--data-type-long-color)}.magic-data-type.byte{color:var(--data-type-byte-color)}.magic-data-type.boolean{color:var(--data-type-boolean-color);font-weight:700}.magic-data-type.class{color:var(--data-type-class-color)}.magic-icon.magic-icon-difference{fill:#389fd6!important}.magic-status-bar .message em,.magic-event em{color:var(--message-em-color);font-style:normal;font-weight:700}.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-expanded,.magic-editor .magic-monaco-editor[data-mode-id=magicscript] .monaco-editor .margin-view-overlays .codicon-folding-collapsed{margin-left:12px!important}.magic-context-menu[data-v-50740138]{position:absolute;z-index:999999;background-color:var(--main-background-color);border:1px solid var(--main-border-color)}.magic-context-menu li[data-v-50740138]{height:24px;line-height:24px;padding:0 10px;cursor:pointer;display:flex}.magic-context-menu li>span[data-v-50740138],.magic-context-menu li>label[data-v-50740138]{cursor:pointer;white-space:pre}.magic-context-menu li.divided[data-v-50740138]{border-bottom:1px solid var(--main-border-color)}.magic-context-menu .magic-context-menu-icon[data-v-50740138]{display:inline-block;text-align:center;margin-right:8px;width:13px}.magic-context-menu li[data-v-50740138]:hover{background-color:var(--select-option-hover-background-color)}.magic-context-menu li:hover>span[data-v-50740138],.magic-context-menu li:hover>label[data-v-50740138]{color:var(--select-option-hover-color)}.magic-context-menu li:hover>span[data-v-50740138] .magic-icon{fill:var(--select-option-hover-color)}.magic-context-menu li:hover .magic-context-menu[data-v-50740138]{display:block}.magic-context-menu li .magic-context-menu[data-v-50740138]{left:100%;margin-top:-1px;display:none}.magic-context-menu li .magic-context-menu-icon.right[data-v-50740138]{float:right;margin-right:0;margin-left:5px}.magic-empty[data-v-70308d5a]{width:100%;height:100%;position:relative}.magic-empty p[data-v-70308d5a]{text-align:center;width:100%;height:24px;line-height:24px;top:50%;position:relative;margin-top:-12px}.magic-loading[data-v-19c11c56]{width:100%;height:100%;position:relative;top:0;left:0}.magic-loading p[data-v-19c11c56]{position:absolute;text-align:center;width:100%;top:50%;margin-top:-20px}.magic-loading .icon[data-v-19c11c56]{width:20px;margin:0 auto;animation:rotate-19c11c56 1s linear infinite;display:block}@keyframes rotate-19c11c56{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.magic-monaco-editor[data-v-59a04eab],.magic-monaco-editor[data-v-9b3f02a8]{flex:1;overflow:hidden}.magic-monaco-editor[data-v-9b3f02a8] .breakpoints{background:var(--breakpoints-background-color);width:10px!important;height:10px!important;right:0px!important;margin-left:12px;top:5px;border-radius:5px}.magic-monaco-editor[data-v-9b3f02a8] .debug-line{background:var(--debug-line-background-color);color:#fff!important}.magic-monaco-editor[data-v-9b3f02a8] .breakpoint-line{background:var(--breakpoint-line-background-color)}.magic-resizer-x[data-v-032bc45e],.magic-resizer-y[data-v-032bc45e]{display:flex;position:relative;overflow:hidden;transition:none}.magic-resizer-event[data-v-032bc45e]{position:absolute;z-index:20;--width: 100%;--height: 100%}.magic-resizer-event[data-v-032bc45e]:after{content:" ";position:fixed;z-index:9999}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]{width:15px;height:100%;right:-15px;cursor:col-resize}.magic-resizer-x .magic-resizer-event[data-v-032bc45e]:after{width:10px;height:var(--height)}.magic-resizer-x .magic-resizer-event.reverse[data-v-032bc45e]{right:unset;left:-5px}.magic-resizer-x[data-v-032bc45e]{height:100%}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]{height:10px;width:100%;top:-5px;cursor:row-resize}.magic-resizer-y .magic-resizer-event[data-v-032bc45e]:after{height:10px;width:var(--width)}.magic-navbar-item[data-v-30388e35]{height:100%;width:100%}svg[data-v-15383e92]{width:1.3em;height:1.3em;vertical-align:-.25em;overflow:hidden;fill:var(--main-icon-color)}.magic-navbar{display:flex;background-color:var(--main-background-color);transition:.3s}.magic-navbar .magic-navbar-body{background-color:var(--navbar-body-background-color);overflow:auto}.magic-navbar .magic-navbar-header li:hover{background-color:var(--main-hover-background-color)}.magic-navbar .magic-navbar-header li.selected{background-color:var(--main-selected-background-color);color:var(--main-selected-color)}.magic-navbar .magic-navbar-header li.selected svg text{fill:var(--main-selected-color)}.magic-navbar .magic-navbar-header li svg text{letter-spacing:0px;font-size:10px}.magic-navbar__vertical.reverse{flex-direction:row-reverse}.magic-navbar__vertical .magic-navbar-header li{display:flex;flex-direction:column;align-items:center;overflow:hidden;padding:8px 3px;cursor:pointer;border-bottom:1px solid var(--main-border-color)}.magic-navbar__vertical .magic-navbar-header{width:22px;height:100%;letter-spacing:2px;text-align:center;padding:0;border-right:1px solid var(--main-border-color)}.magic-navbar__vertical.reverse .magic-navbar-header{border-left:1px solid var(--main-border-color);border-right:none}.magic-navbar__vertical.reverse .magic-navbar-header li{display:flex;flex-direction:column-reverse}.magic-navbar__vertical .magic-navbar-header li{line-height:14px;word-break:break-all}.magic-navbar__vertical .magic-navbar-body{flex:1}.magic-navbar__vertical .magic-navbar-body{border-right:1px solid var(--navbar-body-border-color)}.magic-navbar__vertical.reverse .magic-navbar-body{border-left:1px solid var(--navbar-body-border-color);border-right:none}.magic-navbar__horizontal>ul{width:100%}.magic-navbar__horizontal>ul li{display:inline-flex;flex-direction:row-reverse;padding:0 8px;height:24px;line-height:24px;cursor:pointer;color:var(--main-color)}.magic-navbar__horizontal>ul li svg.magic-icon{height:100%;margin-right:4px}.magic-navbar__horizontal>ul{border-top:1px solid var(--main-border-color)}.magic-navbar.magic-navbar__vertical .magic-navbar-title{padding-bottom:4px}.magic-navbar.magic-navbar__vertical.reverse .magic-navbar-title{padding-top:4px;padding-bottom:0}.magic-tab{width:100%;overflow:hidden;flex-wrap:nowrap;white-space:nowrap;transition:.3s}.magic-tab ul{overflow-x:auto}.magic-tab ul li{display:inline-block;cursor:pointer;padding:0 10px;height:24px;line-height:24px}.magic-tab ul li.selected,.magic-tab ul li:hover,.magic-tab.magic-script-tab ul li.selected:hover,.magic-tab ul li.draggable-target-item{background-color:var(--main-hover-background-color)}.magic-tab.magic-script-tab{border-bottom:1px solid var(--main-border-color);height:30px;position:absolute}.magic-tab.magic-script-tab ul li{height:30px;line-height:30px;border-bottom:3px solid transparent}.magic-tab.magic-script-tab ul li.selected{border-bottom-color:#4083c9;background-color:var(--tab-selected-background-color)}.magic-table{display:flex;flex-direction:column;box-sizing:border-box}.magic-table .magic-table-body{flex:1;overflow:auto}.magic-table .magic-table-header,.magic-table .magic-table-body .magic-table-row{display:flex;height:24px;line-height:24px;border-bottom:1px solid var(--main-border-color)}.magic-table .magic-table-body .magic-table-row:hover{background-color:var(--main-hover-background-color)}.magic-table .magic-table-column{flex:1;display:inline-flex}.magic-table .magic-table-column span:last-child{flex:1;overflow:hidden;text-overflow:ellipsis;width:0px;white-space:pre}.magic-table .magic-table-column .magic-select{width:100%}.magic-table__border .magic-table-body .magic-table-row{border-bottom:1px solid var(--table-border-color)}.magic-table__border .magic-table-column:not(:last-child){border-right:1px solid var(--table-border-color)}.magic-tree{position:relative;overflow:auto}.magic-tree>ul{position:absolute;top:0;left:0}.magic-tree .magic-tree-item{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}.magic-tree .magic-tree-item:hover,.magic-tree .magic-tree-item.selected,.magic-tree .magic-tree-item.draggable-target-item{background-color:var(--tree-hover-background-color)}.magic-tree .magic-tree-item .magic-icon{fill:var(--tree-icon-color);margin-right:2px}.magic-tree ul{max-height:99999px;min-width:100%}.magic-tree li{white-space:nowrap;word-break:break-all}.magic-tree .hide{opacity:0;max-height:0;position:relative}.magic-tree svg:not(.root) .magic-icon-datasource{fill:#089910}.magic-dialog[data-v-3e8f0d71]{position:fixed;top:0;left:0;width:100%;height:100%;z-index:999999;text-align:center}.magic-dialog__shade[data-v-3e8f0d71]{background-color:#0000004d}.magic-dialog[data-v-3e8f0d71]:before{content:"";display:inline-block;height:100%;vertical-align:middle;margin-right:-.25em}.magic-dialog-main[data-v-3e8f0d71]{background:var(--main-background-color);border:1px solid var(--dialog-border-color);display:inline-block;vertical-align:middle;position:relative;min-width:250px;box-shadow:0 0 8px var(--dialog-shadow-color);max-width:800px;color:var(--main-color);transition:none}.magic-dialog-header[data-v-3e8f0d71]{height:30px;line-height:30px;padding-left:30px;padding-right:75px;background-position:7px 7px;background-repeat:no-repeat;text-align:left}.magic-dialog-header.moveable[data-v-3e8f0d71]{cursor:move}.magic-dialog-header span[data-v-3e8f0d71]{display:inline-block;width:30px;position:absolute;right:0;text-align:center;cursor:pointer;font-size:12px;height:30px;line-height:30px}.magic-dialog-header span[data-v-3e8f0d71]:hover{background-color:#e81123}.magic-dialog-header span:hover .magic-icon[data-v-3e8f0d71]{fill:#fff}.magic-dialog-body[data-v-3e8f0d71]{text-align:left;word-break:break-all}.magic-dialog[data-v-3e8f0d71] .magic-loading{min-width:200px;min-height:200px}.magic-notify[data-v-11ebc230]{position:absolute;right:40px;bottom:65px;transition:.5s;z-index:999999}.magic-notify .magic-notify-item[data-v-11ebc230]{background-color:var(--main-background-color);padding:5px;position:relative;border-radius:2px;border:1px solid var(--main-border-color);max-width:280px;box-shadow:0 0 8px var(--dialog-shadow-color)}.magic-notify .magic-notify-item[data-v-11ebc230]:not(:first-child){margin-top:5px}.magic-notify .magic-notify-item .magic-icon-close[data-v-11ebc230]{font-size:12px}.magic-notify .magic-notify-item .close[data-v-11ebc230]{position:absolute;top:2px;right:2px;display:none}.magic-notify .magic-notify-item h3[data-v-11ebc230]{font-size:12px;height:20px;line-height:20px;display:flex;align-items:center}.magic-notify .magic-notify-item h3 svg[data-v-11ebc230]{vertical-align:middle;margin-right:2px}.magic-notify .magic-notify-item:hover .close[data-v-11ebc230]{display:block}.magic-notify .magic-notify-item p[data-v-11ebc230]{padding:5px 5px 5px 16px}.magic-notify .magic-notify-item .magic-button-group[data-v-11ebc230]{padding-left:11px}.magic-button-group[data-v-70c60ab6] .magic-button:not(:last-child){margin-right:10px}.magic-button-group.right[data-v-70c60ab6]{text-align:right}.magic-button-group.left[data-v-70c60ab6]{text-align:left}.magic-button-group.center[data-v-70c60ab6]{text-align:center}.magic-button[data-v-2e4c463a]{height:22px;line-height:22px;background-color:var(--button-background-color);text-align:center;padding:0 15px;border:1px solid var(--button-border-color);outline:0;cursor:pointer;color:var(--main-color)}.magic-button.link[data-v-2e4c463a]{background-color:transparent;color:var(--log-color-link);border:none;padding:0 5px}.magic-button.active[data-v-2e4c463a],.magic-button[data-v-2e4c463a]:hover:not(.link){background-color:var(--button-hover-background-color);border-color:var(--button-hover-border-color)}.magic-checkbox[data-v-22b807f1]{width:100%;height:100%;text-align:center;display:inline-block}.magic-checkbox input[data-v-22b807f1]{display:none}.magic-checkbox input+label[data-v-22b807f1]{position:relative;color:#c9c9c9;font-size:12px;height:24px;line-height:24px;width:24px;user-select:none;display:inline-block}.magic-checkbox input+label[data-v-22b807f1]:after{display:inline-block;background-color:var(--checkbox-background-color);border:1px solid var(--checkbox-border-color);content:"";width:16px;height:16px;line-height:16px;position:absolute;top:2px;left:3px;text-align:center;font-size:12px;color:var(--checkbox-text-color)}.magic-checkbox input:checked+label[data-v-22b807f1]:after{content:"\2714";background-color:var(--checkbox-selected-background-color);border-color:var(--checkbox-selected-border-color)}.magic-checkbox input+label.checkedHalf[data-v-22b807f1]:after{content:"\2501"}.magic-file[data-v-62524fc2]{width:100%;position:relative}.magic-file .magic-icon[data-v-62524fc2]{position:absolute;right:3px;top:3px;height:16px;line-height:16px}.magic-input[data-v-f43ad66a]{height:22px;line-height:22px;border-radius:0;outline:0;border:1px solid transparent;margin:0;padding:0 0 0 5px;background-color:var(--input-background-color);color:var(--main-color)}.magic-input[data-v-f43ad66a]:autofill{background:var(--input-background-color)}.magic-input[data-v-f43ad66a]:-webkit-autofill,.magic-input[data-v-f43ad66a]:-webkit-autofill:hover,.magic-input[data-v-f43ad66a]:-webkit-autofill:focus,.magic-input[data-v-f43ad66a]:-webkit-autofill:active{transition:background-color 5000s;-webkit-text-fill-color:var(--main-color)!important}.magic-input[data-v-f43ad66a]:focus{border-color:var(--input-focus-color)}.magic-input__border[data-v-f43ad66a]{border-color:var(--input-border-color)}.magic-input[data-v-f43ad66a]::-webkit-outer-spin-button,.magic-input[data-v-f43ad66a]::-webkit-inner-spin-button{-webkit-appearance:none}.magic-input[type=number][data-v-f43ad66a]{-moz-appearance:textfield}.magic-select[data-v-249fb96c]{position:relative;display:inline-block;background:var(--select-background-color);height:22px;line-height:22px;width:80px;font-size:12px;text-align:left}.magic-select.inputable[data-v-249fb96c]{background:var(--select-inputable-background-color);border-color:var(--select-inputable-border-color)}.magic-select.border[data-v-249fb96c]{border:1px solid var(--input-border-color)}.magic-select input[data-v-249fb96c]{background:none;border:none;height:22px;line-height:22px;border-radius:0;outline:0;padding-left:5px;width:100%;color:var(--main-color)}.magic-select span[data-v-249fb96c]{height:22px;line-height:22px;border-radius:0;outline:0;padding-left:5px}.magic-select[data-v-249fb96c]:hover:not(.inputable){background:var(--select-hover-background-color)}.magic-select .magic-icon[data-v-249fb96c]{position:absolute;right:5px;height:100%}.magic-select ul[data-v-249fb96c]{display:block;position:fixed;z-index:10;background:var(--select-option-background-color);border:1px solid var(--select-option-border-color);margin-top:-2px;padding:0;box-sizing:content-box;margin-left:-1px}.magic-select ul li[data-v-249fb96c]{padding:0 5px;width:100%!important;height:22px;text-overflow:ellipsis;word-break:keep-all;text-align:left}.magic-select ul li[data-v-249fb96c]:hover{background:var(--select-option-hover-background-color);color:var(--select-option-hover-color)}.magic-textarea[data-v-ca6693f6]{line-height:22px;border-radius:0;outline:0;border:1px solid var(--input-border-color);resize:none;background:var(--input-background-color);color:var(--input-color);width:100%;height:100%}.magic-textarea[data-v-ca6693f6]:focus{border-color:var(--input-focus-color)}.magic-avatar-group[data-v-511f7f80]{display:inline-block;height:22px;line-height:22px}.magic-avatar-group .magic-avatar[data-v-511f7f80]{position:relative;margin-left:-5px}.magic-avatar[data-v-73f02f44]{color:#fff;display:inline-block;text-align:center}.magic-navbar[data-v-41b9c04c]{width:100%;height:100%}.magic-navbar[data-v-41b9c04c] .magic-navbar-body{border-right:none;width:100%;height:100%;display:flex;position:relative}.magic-navbar[data-v-41b9c04c] .magic-navbar-item>*{width:100%;height:100%}.magic-api-group[data-v-07a9bc9f]{display:flex;flex-direction:column}.magic-api-group form[data-v-07a9bc9f]{display:flex;padding:5px}.magic-api-group form label[data-v-07a9bc9f]{display:inline-block;width:85px;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px}.magic-api-group+.magic-navbar[data-v-07a9bc9f]{flex-direction:column;overflow:hidden}.magic-api-group+.magic-navbar[data-v-07a9bc9f] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-07a9bc9f] .magic-navbar-body,.magic-navbar[data-v-07a9bc9f] .magic-navbar-item{width:100%;height:100%}.magic-api-group>form .magic-button[data-v-07a9bc9f]{margin-left:10px}.magic-api-info[data-v-8ed3340e]{display:flex;flex-direction:column}.magic-api-info form[data-v-8ed3340e]{display:flex;padding:5px}.magic-api-info form label[data-v-8ed3340e]{display:inline-block;width:75px;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px}.magic-api-info+.magic-navbar[data-v-8ed3340e]{flex-direction:column;overflow:hidden}.magic-api-info+.magic-navbar[data-v-8ed3340e] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-8ed3340e] .magic-navbar-body,.magic-navbar[data-v-8ed3340e] .magic-navbar-item{width:100%;height:100%}.magic-monaco-editor[data-v-0fba1ea3]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-bda6618c]{flex:1}.magic-table[data-v-bda6618c] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-bda6618c] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-bda6618c]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;text-align:center}iframe[data-v-27b4e47a]{width:100%;height:100%;border:0}.magic-monaco-editor[data-v-27b4e47a]{position:absolute;left:0;right:0;top:0;bottom:0}.magic-table[data-v-76813707]{flex:1}.magic-table span[data-v-76813707]{padding:0 5px}.magic-table[data-v-051e4f5a]{flex:1}.magic-table[data-v-051e4f5a] .magic-table-column{display:flex;justify-content:center;text-align:center}.magic-table[data-v-051e4f5a] .magic-table-column:first-child{justify-content:unset!important;text-align:unset!important}.magic-data-type[data-v-051e4f5a]{display:inline-block;width:0;padding:0 5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.magic-panel-api-response[data-v-a23b6466]{width:100%;height:100%;display:flex;flex-direction:column}.magic-panel-api-response[data-v-a23b6466] .magic-navbar__horizontal>ul{border-top:none;border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-a23b6466]{flex-direction:column;width:100%;height:100%}.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-body,.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-item{width:100%;height:100%}.magic-panel-api-response[data-v-a23b6466] .magic-navbar .magic-navbar-item{display:flex;position:relative}.magic-global[data-v-03e7bbcc]{display:flex;flex-direction:column;flex:1;width:100%;height:100%}.magic-global>.magic-navbar[data-v-03e7bbcc]{flex-direction:column;overflow:hidden}.magic-global>.magic-navbar[data-v-03e7bbcc] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-03e7bbcc] .magic-navbar-body,.magic-navbar[data-v-03e7bbcc] .magic-navbar-item{width:100%;height:100%}.magic-global .magic-panel-global[data-v-03e7bbcc]{display:flex;width:100%;height:100%}.magic-global[data-v-03e7bbcc] .magic-panel-global>div{flex:1}.magic-panel-toolbar[data-v-56150b69]{width:24px;border-right:1px solid var(--main-border-color);height:100%;text-align:center}.magic-panel-toolbar li[data-v-56150b69]{cursor:pointer;border-radius:2px;width:18px;height:18px;line-height:18px;margin:3px;font-size:.95em}.magic-panel-toolbar li[data-v-56150b69]:not(.disabled):hover,.magic-panel-toolbar li:not(.disabled).selected[data-v-56150b69]{background-color:var(--main-hover-icon-background-color)}.magic-panel-toolbar li.disabled[data-v-56150b69] .magic-icon>*{fill:var(--button-disabled-color)}.magic-resource-choose[data-v-4852fc0e]{max-height:400px;overflow:auto}.magic-resource-choose .magic-tree[data-v-4852fc0e]{margin-bottom:5px;min-height:300px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-icon.root{color:var(--main-icon-color)}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox{display:inline;margin-right:3px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label{width:12px!important;height:12px!important}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-tree-item{padding-left:5px}.magic-resource-choose .magic-tree[data-v-4852fc0e] .magic-checkbox input+label:after{width:12px!important;height:12px!important;line-height:12px!important;top:0!important;left:0!important}.magic-resource-choose[data-v-4852fc0e] .magic-tree label{color:var(--resource-label-color)}.magic-resource-choose[data-v-4852fc0e] .magic-tree span{color:var(--resource-span-color)}.magic-table[data-v-ef606938]{width:270px;border-right:1px solid var(--table-border-color)}.magic-backup-file[data-v-ef606938]{height:100%;position:relative;overflow:hidden;display:flex}.magic-backup-file-diff-container[data-v-ef606938]{flex:1;overflow:hidden;height:100%;display:flex;flex-direction:column}.magic-backup-file-diff-container>ul[data-v-ef606938]{display:flex}.magic-backup-file-diff-container>ul li[data-v-ef606938]{flex:1;height:30px;line-height:30px;padding:0 5px}.magic-backup-file-diff-container>ul li button[data-v-ef606938]{float:right;margin-right:10px;margin-top:4px}.magic-backup[data-v-b15945c0]{display:flex;flex:1;height:100%}.magic-backup>div[data-v-b15945c0]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-backup .magic-table[data-v-b15945c0]{height:100%;position:absolute;width:100%}.magic-backup[data-v-b15945c0] .magic-table-row .magic-table-column:last-child,.magic-backup[data-v-b15945c0] .magic-table-header .magic-table-column:last-child{padding-left:5px}.magic-backup-diff-container[data-v-b15945c0]{width:100%;height:100%;display:flex;flex-direction:column}.magic-backup-diff-container .magic-backup-diff-header[data-v-b15945c0]{height:30px;line-height:30px;display:flex}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-b15945c0]{flex:1}.magic-backup-diff-container .magic-backup-diff-header>div[data-v-b15945c0]:last-child{text-align:right}.magic-dialog-diff .magic-dialog-main{display:inline-flex;flex-direction:column}.magic-dialog-diff .magic-dialog-main .magic-dialog-body{flex:1;display:flex;flex-direction:column}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-continue{fill:var(--icon-debug-color)}.magic-panel-toolbar[data-v-71b796dc] .magic-icon-step-over{fill:var(--icon-step-color)}.magic-debug[data-v-71b796dc]{display:flex;flex:1}.magic-debug .magic-debug-variables[data-v-71b796dc]{flex:1;background-color:var(--navbar-body-background-color);position:relative;overflow:auto}.magic-debug[data-v-71b796dc] .magic-tree{position:absolute;width:100%;height:100%}.magic-debug[data-v-71b796dc] .magic-tree .magic-tree-item{height:auto}.magic-debug .object-type[data-v-71b796dc]{color:var(--resource-span-color)}.magic-debug label.key[data-v-71b796dc]{color:var(--data-type-key-color);padding-left:3px}.magic-debug label.separator[data-v-71b796dc]{padding:0 5px}.magic-debug svg[data-v-71b796dc]{display:inline-block;width:16px;height:16px;vertical-align:middle}.magic-event[data-v-06d5ba36],.magic-event[data-v-06d5ba36] .magic-table{display:flex;flex:1}.magic-event>div[data-v-06d5ba36]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative;height:100%}.magic-event[data-v-06d5ba36] .magic-table{height:100%;position:absolute;width:100%}.magic-event[data-v-06d5ba36] .magic-table .magic-table-header{display:none}.magic-event[data-v-06d5ba36] .magic-table .magic-table-row{border-right:1px solid var(--main-border-color)}.magic-event[data-v-06d5ba36] .magic-table .magic-table-column{padding-left:5px}.magic-log-wrapper{display:flex;flex:1;height:100%;overflow:hidden;position:relative}.magic-log{font-size:13.5px;padding:5px;flex:1;overflow:auto;position:absolute;top:0;right:0;bottom:0;left:24px}.magic-log>div{width:100%}.magic-log>div pre{line-height:20px;width:100%}.magic-log>div.multiple pre{max-height:60px;overflow:hidden}.magic-log>div.multiple.more pre{max-height:none}.magic-log span.multiple{opacity:.5;font-size:13px;text-decoration:underline;cursor:pointer}.magic-log pre span.log-INFO{color:var(--log-color-info)}.magic-log pre span.log-DEBUG{color:var(--log-color-debug)}.magic-log pre span.log-ERROR{color:var(--log-color-error)}.magic-log pre span.log-WARN{color:var(--log-color-warn)}.magic-log pre span.log-TRACE{color:var(--log-color-trace)}.magic-log pre span.log-cyan{color:var(--log-color-cyan)}.magic-log pre a.log-link{color:var(--log-color-link)}.magic-online[data-v-0c296fa2]{height:30px;line-height:30px;float:right;padding-left:10px;max-width:500px}.magic-online>span[data-v-0c296fa2]{padding-left:5px}.magic-status-bar[data-v-49bc4fc3]{height:30px;line-height:30px;display:flex;background-color:var(--main-background-color);padding-left:24px}.magic-status-bar .message[data-v-49bc4fc3]{flex:1}.magic-status-bar ul[data-v-49bc4fc3]{float:right;display:inline-flex;align-items:center;padding-right:2px}.magic-status-bar ul li[data-v-49bc4fc3]{cursor:pointer;padding:0 4px;height:20px;line-height:20px;border-radius:3px}.magic-status-bar ul li .magic-icon[data-v-49bc4fc3]{height:20px;line-height:20px}.magic-status-bar ul li[data-v-49bc4fc3]:hover{background-color:var(--main-hover-icon-background-color)}.magic-todo[data-v-29308d9b]{display:flex;flex:1}.magic-todo div[data-v-29308d9b]{background-color:var(--navbar-body-background-color);flex:1;overflow:hidden;position:relative}.magic-todo div[data-v-29308d9b] .magic-tree{width:100%;height:100%;position:absolute;overflow:auto}.magic-todo div[data-v-29308d9b] .magic-tree label{color:var(--resource-label-color)}.magic-todo div[data-v-29308d9b] .magic-tree label.todo{font-style:italic;color:var(--todo-color)}.magic-todo div[data-v-29308d9b] .magic-tree span{color:var(--resource-span-color)}.magic-toolbar .magic-navbar[data-v-200d8d00]{flex-direction:column-reverse}.magic-toolbar-header[data-v-200d8d00]{height:26px;line-height:26px;border-bottom:1px solid var(--main-border-color);border-top:1px solid var(--main-border-color);background-color:var(--main-background-color)}.magic-toolbar-header+div[data-v-200d8d00]{z-index:99999}.magic-toolbar-header label[data-v-200d8d00]{display:inline-block;padding-left:10px}.magic-toolbar .magic-resizer-y[data-v-200d8d00]{flex-direction:column}.magic-toolbar-header-buttons[data-v-200d8d00]{float:right;margin-right:5px;vertical-align:middle;display:flex;align-items:center;height:26px}.magic-toolbar-header-buttons .magic-icon[data-v-200d8d00]{display:inline-block;cursor:pointer;padding:0 2px;height:18px;line-height:18px;border-radius:3px;z-index:99999}.magic-toolbar-header-buttons .magic-icon[data-v-200d8d00]:hover{background-color:var(--main-hover-icon-background-color)}.magic-toolbar .magic-navbar[data-v-200d8d00] .magic-navbar-body{background-color:var(--main-background-color)}.magic-panel-api,.magic-panel-function,.magic-event{display:flex;width:100%;height:100%}.magic-panel-api>div,.magic-panel-function>div,.magic-event>div{flex:1}.magic-function-info[data-v-bc8654ec]{display:flex;flex-direction:column}.magic-function-info form[data-v-bc8654ec]{display:flex;padding:5px}.magic-function-info form label[data-v-bc8654ec]{display:inline-block;height:22px;line-height:22px;font-weight:400;text-align:right;padding:0 5px 0 20px}.magic-navbar[data-v-bc8654ec]{flex-direction:column;overflow:hidden}.magic-navbar[data-v-bc8654ec] .magic-navbar-header{border-bottom:1px solid var(--main-border-color)}.magic-navbar[data-v-bc8654ec] .magic-navbar-body,.magic-navbar[data-v-bc8654ec] .magic-navbar-item{width:100%;height:100%}.magic-dialog[data-v-097eba83] .magic-dialog-body{overflow:hidden}.magic-header[data-v-4e11654b]{height:30px;line-height:30px;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);display:flex;color:var(--header-default-color)}.magic-header .magic-logo[data-v-4e11654b]{float:left;font-weight:700;font-size:0;letter-spacing:0;background-repeat:no-repeat;background-position:4px 7px;padding-left:25px;color:var(--header-title-color)}.magic-header .magic-logo label[data-v-4e11654b]{font-size:16px;display:inline-block;margin-right:5px;text-align:left;font-weight:400}.magic-header .magic-logo label[data-v-4e11654b]:last-child{font-size:12px}.magic-header ul[data-v-4e11654b]{float:right}.magic-header ul li[data-v-4e11654b]{cursor:pointer;height:30px;text-align:center;display:inline-flex;align-items:center}.magic-header ul li svg[data-v-4e11654b]{padding:0 4px;height:24px;width:24px;border-radius:4px}.magic-header ul li.disabled svg[data-v-4e11654b]{fill:var(--button-disabled-color)}.magic-header ul li:not(.disabled) svg[data-v-4e11654b]:hover{background-color:var(--main-hover-icon-background-color)}.magic-header ul li[data-v-4e11654b]:not(.disabled) .magic-icon-run,.magic-header ul li[data-v-4e11654b] .magic-icon-push{fill:#59a869}.magic-header-title[data-v-4e11654b]{flex:1;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-skin-selector[data-v-4e11654b],.magic-locale-selector[data-v-4e11654b]{position:absolute;top:30px;right:24px;z-index:20;background-color:var(--main-background-color);border:1px solid var(--main-border-color);border-top:none}.magic-skin-selector[data-v-4e11654b]{right:48px}.magic-skin-selector ul li[data-v-4e11654b],.magic-locale-selector ul li[data-v-4e11654b]{height:24px;line-height:24px;text-align:center;cursor:pointer;padding:2px 5px}.magic-skin-selector ul li[data-v-4e11654b]:not(:last-child),.magic-locale-selector ul li[data-v-4e11654b]:not(:last-child){border-bottom:1px solid var(--main-border-color)}.magic-skin-selector ul li[data-v-4e11654b]:hover,.magic-locale-selector ul li[data-v-4e11654b]:hover{background-color:var(--main-hover-background-color)}.magic-dialog[data-v-e421c192] .magic-dialog-body{overflow:hidden}.magic-push-form[data-v-e421c192]{padding:0 10px}.magic-push-form>div[data-v-e421c192]{display:flex;margin-top:5px}.magic-push-form label[data-v-e421c192]{width:80px;text-align:right;display:inline-block}.magic-push-form[data-v-e421c192] .magic-input{width:auto!important;flex:1}.magic-search-result[data-v-4bbc2d10]{overflow:auto;max-height:200px;background-color:var(--navbar-body-background-color)}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]{display:flex;padding:0 5px;line-height:20px}.magic-search-result .magic-search-result-item[data-v-4bbc2d10]:hover,.magic-search-result .magic-search-result-item.selected[data-v-4bbc2d10]{background-color:var(--tree-hover-background-color)}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10]{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.magic-search-result .magic-search-result-item .label[data-v-4bbc2d10] .keyword{background:#FFDE7B;color:#000}.magic-search-result-item .name[data-v-4bbc2d10],.magic-search-result-item .line[data-v-4bbc2d10]{color:var(--resource-span-color)}.magic-search-result .magic-search-result-item .line[data-v-4bbc2d10]{padding-left:5px}.display-text[data-v-4bbc2d10]{height:30px;line-height:30px;border-top:1px solid var(--main-border-color);border-bottom:1px solid var(--main-border-color)}.magic-data-resource[data-v-2ca47240]{display:flex;flex-direction:column;flex:1;width:100%}.magic-data-resource .magic-data-resource-header[data-v-2ca47240]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color);padding-left:3px}.magic-data-resource .magic-data-resource-header input[data-v-2ca47240]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-data-resource .magic-data-resource-header ul[data-v-2ca47240]{display:inline-flex;align-items:center}.magic-data-resource .magic-data-resource-header ul li[data-v-2ca47240]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-data-resource .magic-data-resource-header ul li.separator[data-v-2ca47240]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-data-resource .magic-data-resource-header ul li[data-v-2ca47240]:hover{background:var(--main-hover-icon-background-color)}.magic-data-resource .magic-data-resource-header svg[data-v-2ca47240]{height:100%}.magic-data-resource>ul[data-v-2ca47240]{height:100%;overflow:auto}.magic-data-resource>ul li[data-v-2ca47240]{line-height:22px;padding-left:10px;white-space:nowrap}.magic-data-resource>ul li[data-v-2ca47240]:hover{background-color:var(--tree-hover-background-color)}.magic-data-resource>ul li .magic-icon[data-v-2ca47240]{padding-right:2px}.magic-data-resource>ul li label[data-v-2ca47240]{color:var(--resource-label-color)}.magic-data-resource>ul li span[data-v-2ca47240]{color:var(--resource-span-color);display:inline-block;height:22px;line-height:22px}.magic-data-resource>ul li[data-v-2ca47240] .magic-icon-datasource{fill:#089910}.magic-editor .magic-form-row{display:flex;margin-bottom:5px}.magic-editor .magic-form-row label{margin-right:5px;display:inline-block;width:70px;text-align:right;height:22px;line-height:22px}.magic-editor .magic-form-row>input,.magic-editor .magic-form-row>.magic-select{flex:1;width:auto}label[data-v-f15aae88]{width:60px;text-align:right;display:inline-block}.magic-login[data-v-f15aae88]{position:fixed;z-index:999999999999;background:#fff;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-image:url(./login-bg.025a11cc.svg)}.magic-login .magic-login-box[data-v-f15aae88]{border-radius:5px;width:450px;box-shadow:0 7px 25px #00000014;position:absolute;box-sizing:border-box;padding-top:60px;top:33.333333%;margin-top:-125px;background-color:#fff}.magic-login-logo[data-v-f15aae88]{background-image:url(./logo-magic-api.7bf52c65.png);width:128px;height:128px;background-size:90px 90px;background-repeat:no-repeat;background-position:center center;position:absolute;top:-64px;left:50%;margin-left:-64px;border-radius:64px;box-shadow:0 0 20px 5px #00000014;padding:10px;background-color:#fff}.magic-login-text[data-v-f15aae88]{height:70px;line-height:70px;display:block;text-align:center;font-family:PoetsenOne;font-size:28px;color:gray}.magic-login-text span[data-v-f15aae88]{font-size:16px}.magic-login-copyright[data-v-f15aae88]{text-align:center;color:#999;font-size:18px;font-family:Avenir,Helvetica,Arial,sans-serif;position:absolute;bottom:50px}.magic-login-copyright a[data-v-f15aae88]{text-decoration:none;color:#2196f3;outline:0}.magic-login-row[data-v-f15aae88]{width:400px;margin:25px auto;position:relative}.magic-login-row.error[data-v-f15aae88]{background-color:#fff1f0;border:1px solid #ffa39e;color:#000;border-radius:4px;padding:10px 0 10px 40px}.magic-login-row.error span[data-v-f15aae88]{font-size:14px;word-break:break-all}.magic-login-row svg[data-v-f15aae88]{position:absolute;width:20px;height:20px;top:15px;left:15px}.magic-login-row[data-v-f15aae88] .magic-icon-error{fill:red}.magic-login-box .magic-input[data-v-f15aae88]{height:50px;line-height:50px;background-color:transparent;display:block;border:1px solid #D9D9D9;border-radius:4px;padding-left:40px;color:#000000a6;transition:all .3s;font-size:16px}.magic-login-box .magic-input[data-v-f15aae88]:focus{border-color:#0784de}.magic-login-box .magic-button[data-v-f15aae88]{width:100%;height:50px;line-height:50px;background-color:#2196f3;color:#fff;border-radius:4px;font-size:18px;border-color:#2196f3;transition:all .3s}.magic-login-box .magic-button[data-v-f15aae88]:hover,.magic-login-box .magic-button[data-v-f15aae88]:focus{background-color:#4db5ff!important;border-color:#4db5ff!important}.magic-login-box .magic-button[data-v-f15aae88]:active{background-color:#1272cc;border-color:#1272cc}.magic-main[data-v-718a97af]{flex:1;display:flex;border-bottom:1px solid var(--main-border-color);height:0;width:100%}.magic-main-body-wrapper[data-v-718a97af]{display:flex;flex:1;flex-direction:column}.magic-main-body[data-v-718a97af]{display:flex;flex:1;overflow:hidden}.magic-toolbar[data-v-718a97af] .magic-resizer-y .magic-resizer-event{top:auto}ul[data-v-44903aa6]{max-width:400px;max-height:600px;overflow:auto}ul li[data-v-44903aa6]:hover{background-color:var(--tree-hover-background-color)}ul li[data-v-44903aa6]{height:20px;line-height:20px;transition:.3s;word-break:break-all;white-space:nowrap}ul li label[data-v-44903aa6]{color:var(--resource-label-color)}ul li span[data-v-44903aa6]{color:var(--resource-span-color)}.magic-dialog-main[data-v-44903aa6] .magic-dialog-body{padding:0}.magic-resource[data-v-1db99e04]{display:flex;flex-direction:column;flex:1;width:100%}.magic-resource .magic-resource-header[data-v-1db99e04]{height:24px;line-height:24px;display:flex;background-color:var(--main-background-color);border-bottom:1px solid var(--main-border-color)}.magic-resource .magic-resource-header input[data-v-1db99e04]{flex:1;border:none;background:none;height:24px;line-height:24px}.magic-resource .magic-resource-header ul[data-v-1db99e04]{display:inline-flex;align-items:center}.magic-resource .magic-resource-header ul li[data-v-1db99e04]{display:inline-block;cursor:pointer;padding:0 3px;height:20px;line-height:20px;border-radius:3px}.magic-resource .magic-resource-header svg[data-v-1db99e04]{height:100%}.magic-resource .magic-resource-header ul li.separator[data-v-1db99e04]{background-color:var(--main-border-color);width:1px;border-radius:0;padding:0;margin:0 4px}.magic-resource .magic-resource-header ul li[data-v-1db99e04]:hover{background:var(--main-hover-icon-background-color)}.magic-resource .magic-tree label[data-v-1db99e04]{color:var(--resource-label-color)}.magic-resource .magic-tree span[data-v-1db99e04]{color:var(--resource-span-color)}.magic-resource .magic-tree .magic-icon-lock[data-v-1db99e04]{fill:var(--resource-label-color);margin-left:5px}.magic-resource>.magic-tree[data-v-1db99e04]{flex:1;overflow:auto}.magic-create-group li[data-v-1db99e04]{display:flex;height:26px;line-height:26px}.magic-create-group li input[data-v-1db99e04]{flex:1}.magic-resource[data-v-1db99e04] .magic-avatar-group{margin-left:10px}.magic-script-editor[data-v-1401171b]{flex:1;overflow:hidden;position:relative}.magic-script-editor .magic-monaco-editor-wrapper[data-v-1401171b]{position:absolute;top:30px;left:0;right:0;bottom:0}.magic-empty-container[data-v-1401171b]{flex:1;position:relative;width:100%;height:100%;background:var(--empty-background-color)}.magic-hot-key[data-v-1401171b]{position:absolute;top:50%;margin-top:-105px;text-align:center;color:var(--empty-color);font-size:16px;width:100%}.magic-hot-key p[data-v-1401171b]{display:inline-block;text-align:left;line-height:30px}.magic-hot-key p em[data-v-1401171b]{margin-left:15px;font-style:normal;color:var(--empty-key-color)}.magic-monaco-editor[data-v-1401171b]{position:absolute;top:0;bottom:0;left:0;right:0;overflow:visible!important}.magic-script-editor[data-v-1401171b] .magic-avatar-group{margin-left:10px}.monaco-editor{font-family:-apple-system,BlinkMacSystemFont,Segoe WPC,Segoe UI,HelveticaNeue-Light,system-ui,Ubuntu,Droid Sans,sans-serif;--monaco-monospace-font: "SF Mono", Monaco, Menlo, Consolas, "Ubuntu Mono", "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace}.monaco-menu .monaco-action-bar.vertical .action-item .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.hc-black .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{stroke-width:1.2px}.monaco-hover p{margin:0}.monaco-aria-container{position:absolute!important;top:0;height:1px;width:1px;margin:-1px;overflow:hidden;padding:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%)}.monaco-editor.hc-black{-ms-high-contrast-adjust:none}@media screen and (-ms-high-contrast:active){.monaco-editor.vs .view-overlays .current-line,.monaco-editor.vs-dark .view-overlays .current-line{border-color:windowtext!important;border-left:0;border-right:0}.monaco-editor.vs .cursor,.monaco-editor.vs-dark .cursor{background-color:windowtext!important}.monaco-editor.vs .dnd-target,.monaco-editor.vs-dark .dnd-target{border-color:windowtext!important}.monaco-editor.vs .selected-text,.monaco-editor.vs-dark .selected-text{background-color:highlight!important}.monaco-editor.vs .view-line,.monaco-editor.vs-dark .view-line{-ms-high-contrast-adjust:none}.monaco-editor.vs .view-line span,.monaco-editor.vs-dark .view-line span{color:windowtext!important}.monaco-editor.vs .view-line span.inline-selected-text,.monaco-editor.vs-dark .view-line span.inline-selected-text{color:highlighttext!important}.monaco-editor.vs .view-overlays,.monaco-editor.vs-dark .view-overlays{-ms-high-contrast-adjust:none}.monaco-editor.vs .selectionHighlight,.monaco-editor.vs-dark .selectionHighlight,.monaco-editor.vs .wordHighlight,.monaco-editor.vs-dark .wordHighlight,.monaco-editor.vs .wordHighlightStrong,.monaco-editor.vs-dark .wordHighlightStrong,.monaco-editor.vs .reference-decoration,.monaco-editor.vs-dark .reference-decoration{border:2px dotted highlight!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .rangeHighlight,.monaco-editor.vs-dark .rangeHighlight{background:transparent!important;border:1px dotted activeborder!important;box-sizing:border-box}.monaco-editor.vs .bracket-match,.monaco-editor.vs-dark .bracket-match{border-color:windowtext!important;background:transparent!important}.monaco-editor.vs .findMatch,.monaco-editor.vs-dark .findMatch,.monaco-editor.vs .currentFindMatch,.monaco-editor.vs-dark .currentFindMatch{border:2px dotted activeborder!important;background:transparent!important;box-sizing:border-box}.monaco-editor.vs .find-widget,.monaco-editor.vs-dark .find-widget{border:1px solid windowtext}.monaco-editor.vs .monaco-list .monaco-list-row,.monaco-editor.vs-dark .monaco-list .monaco-list-row{-ms-high-contrast-adjust:none;color:windowtext!important}.monaco-editor.vs .monaco-list .monaco-list-row.focused,.monaco-editor.vs-dark .monaco-list .monaco-list-row.focused{color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-list .monaco-list-row:hover,.monaco-editor.vs-dark .monaco-list .monaco-list-row:hover{background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar{-ms-high-contrast-adjust:none;background:background!important;border:1px solid windowtext;box-sizing:border-box}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:windowtext!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider:hover,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider:hover{background:highlight!important}.monaco-editor.vs .monaco-scrollable-element>.scrollbar>.slider.active,.monaco-editor.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:highlight!important}.monaco-editor.vs .decorationsOverviewRuler,.monaco-editor.vs-dark .decorationsOverviewRuler{opacity:0}.monaco-editor.vs .minimap,.monaco-editor.vs-dark .minimap{display:none}.monaco-editor.vs .squiggly-d-error,.monaco-editor.vs-dark .squiggly-d-error{background:transparent!important;border-bottom:4px double #E47777}.monaco-editor.vs .squiggly-c-warning,.monaco-editor.vs-dark .squiggly-c-warning,.monaco-editor.vs .squiggly-b-info,.monaco-editor.vs-dark .squiggly-b-info{border-bottom:4px double #71B771}.monaco-editor.vs .squiggly-a-hint,.monaco-editor.vs-dark .squiggly-a-hint{border-bottom:4px double #6c6c6c}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:focus .action-label{-ms-high-contrast-adjust:none;color:highlighttext!important;background-color:highlight!important}.monaco-editor.vs .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label,.monaco-editor.vs-dark .monaco-menu .monaco-action-bar.vertical .action-menu-item:hover .action-label{-ms-high-contrast-adjust:none;background:transparent!important;border:1px solid highlight;box-sizing:border-box}.monaco-diff-editor.vs .diffOverviewRuler,.monaco-diff-editor.vs-dark .diffOverviewRuler{display:none}.monaco-editor.vs .line-insert,.monaco-editor.vs-dark .line-insert,.monaco-editor.vs .line-delete,.monaco-editor.vs-dark .line-delete{background:transparent!important;border:1px solid highlight!important;box-sizing:border-box}.monaco-editor.vs .char-insert,.monaco-editor.vs-dark .char-insert,.monaco-editor.vs .char-delete,.monaco-editor.vs-dark .char-delete{background:transparent!important}}.monaco-aria-container{position:absolute;left:-999em}::-ms-clear{display:none}.monaco-editor .editor-widget input{color:inherit}.monaco-editor{position:relative;overflow:visible;-webkit-text-size-adjust:100%}.monaco-editor .overflow-guard{position:relative;overflow:hidden}.monaco-editor .view-overlays{position:absolute;top:0}.monaco-editor .inputarea{min-width:0;min-height:0;margin:0;padding:0;position:absolute;outline:none!important;resize:none;border:none;overflow:hidden;color:transparent;background-color:transparent}.monaco-editor .inputarea.ime-input{z-index:10}.monaco-editor .margin-view-overlays .line-numbers{font-variant-numeric:tabular-nums;position:absolute;text-align:right;display:inline-block;vertical-align:middle;box-sizing:border-box;cursor:default;height:100%}.monaco-editor .relative-current-line-number{text-align:left;display:inline-block;width:100%}.monaco-editor .margin-view-overlays .line-numbers.lh-odd{margin-top:1px}.monaco-mouse-cursor-text{cursor:text}.vs-dark .mac .monaco-mouse-cursor-text,.hc-black .mac .monaco-mouse-cursor-text,.vs-dark.mac .monaco-mouse-cursor-text,.hc-black.mac .monaco-mouse-cursor-text{cursor:-webkit-image-set(url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAQAAAC1+jfqAAAAL0lEQVQoz2NgCD3x//9/BhBYBWdhgFVAiVW4JBFKGIa4AqD0//9D3pt4I4tAdAMAHTQ/j5Zom30AAAAASUVORK5CYII=) 1x,url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAAz0lEQVRIx2NgYGBY/R8I/vx5eelX3n82IJ9FxGf6tksvf/8FiTMQAcAGQMDvSwu09abffY8QYSAScNk45G198eX//yev73/4///701eh//kZSARckrNBRvz//+8+6ZohwCzjGNjdgQxkAg7B9WADeBjIBqtJCbhRA0YNoIkBSNmaPEMoNmA0FkYNoFKhapJ6FGyAH3nauaSmPfwI0v/3OukVi0CIZ+F25KrtYcx/CTIy0e+rC7R1Z4KMICVTQQ14feVXIbR695u14+Ir4gwAAD49E54wc1kWAAAAAElFTkSuQmCC) 2x) 5 8,text}.monaco-editor .view-overlays .current-line,.monaco-editor .margin-view-overlays .current-line{display:block;position:absolute;left:0;top:0;box-sizing:border-box}.monaco-editor .margin-view-overlays .current-line.current-line-margin.current-line-margin-both{border-right:0}.monaco-editor .lines-content .cdr{position:absolute}.monaco-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.monaco-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity .1s linear}.monaco-scrollable-element>.invisible{opacity:0;pointer-events:none}.monaco-scrollable-element>.invisible.fade{transition:opacity .8s linear}.monaco-scrollable-element>.shadow{position:absolute;display:none}.monaco-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:#ddd 0 6px 6px -6px inset}.monaco-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:#ddd 6px 0 6px -6px inset}.monaco-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.monaco-scrollable-element>.shadow.top.left{box-shadow:#ddd 6px 6px 6px -6px inset}.vs .monaco-scrollable-element>.scrollbar>.slider{background:rgba(100,100,100,.4)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider{background:rgba(121,121,121,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider{background:rgba(111,195,223,.6)}.monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(100,100,100,.7)}.hc-black .monaco-scrollable-element>.scrollbar>.slider:hover{background:rgba(111,195,223,.8)}.monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(0,0,0,.6)}.vs-dark .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(191,191,191,.4)}.hc-black .monaco-scrollable-element>.scrollbar>.slider.active{background:rgba(111,195,223,1)}.vs-dark .monaco-scrollable-element .shadow.top{box-shadow:none}.vs-dark .monaco-scrollable-element .shadow.left{box-shadow:#000 6px 0 6px -6px inset}.vs-dark .monaco-scrollable-element .shadow.top.left{box-shadow:#000 6px 6px 6px -6px inset}.hc-black .monaco-scrollable-element .shadow.top,.hc-black .monaco-scrollable-element .shadow.left,.hc-black .monaco-scrollable-element .shadow.top.left{box-shadow:none}.monaco-editor .glyph-margin{position:absolute;top:0}.monaco-editor .margin-view-overlays .cgmr{position:absolute;display:flex;align-items:center;justify-content:center}.monaco-editor .lines-content .core-guide{position:absolute}.monaco-editor.no-user-select .lines-content,.monaco-editor.no-user-select .view-line,.monaco-editor.no-user-select .view-lines{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .view-lines{white-space:nowrap}.monaco-editor .view-line{position:absolute;width:100%}.monaco-editor .mtkz{display:inline-block}.monaco-editor .lines-decorations{position:absolute;top:0;background:white}.monaco-editor .margin-view-overlays .cldr{position:absolute;height:100%}.monaco-editor .margin-view-overlays .cmdr{position:absolute;left:0;width:100%;height:100%}.monaco-editor .minimap.slider-mouseover .minimap-slider{opacity:0;transition:opacity .1s linear}.monaco-editor .minimap.slider-mouseover:hover .minimap-slider,.monaco-editor .minimap.slider-mouseover .minimap-slider.active{opacity:1}.monaco-editor .minimap-shadow-hidden{position:absolute;width:0}.monaco-editor .minimap-shadow-visible{position:absolute;left:-6px;width:6px}.monaco-editor.no-minimap-shadow .minimap-shadow-visible{position:absolute;left:-1px;width:1px}.monaco-editor .overlayWidgets{position:absolute;top:0;left:0}.monaco-editor .view-ruler{position:absolute;top:0}.monaco-editor .scroll-decoration{position:absolute;top:0;left:0;height:6px}.monaco-editor .lines-content .cslr{position:absolute}.monaco-editor .top-left-radius{border-top-left-radius:3px}.monaco-editor .bottom-left-radius{border-bottom-left-radius:3px}.monaco-editor .top-right-radius{border-top-right-radius:3px}.monaco-editor .bottom-right-radius{border-bottom-right-radius:3px}.monaco-editor.hc-black .top-left-radius{border-top-left-radius:0}.monaco-editor.hc-black .bottom-left-radius{border-bottom-left-radius:0}.monaco-editor.hc-black .top-right-radius{border-top-right-radius:0}.monaco-editor.hc-black .bottom-right-radius{border-bottom-right-radius:0}.monaco-editor .cursors-layer{position:absolute;top:0}.monaco-editor .cursors-layer>.cursor{position:absolute;overflow:hidden}.monaco-editor .cursors-layer.cursor-smooth-caret-animation>.cursor{transition:all 80ms}.monaco-editor .cursors-layer.cursor-block-outline-style>.cursor{box-sizing:border-box;background:transparent!important;border-style:solid;border-width:1px}.monaco-editor .cursors-layer.cursor-underline-style>.cursor{border-bottom-width:2px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}.monaco-editor .cursors-layer.cursor-underline-thin-style>.cursor{border-bottom-width:1px;border-bottom-style:solid;background:transparent!important;box-sizing:border-box}@keyframes monaco-cursor-smooth{0%,20%{opacity:1}60%,to{opacity:0}}@keyframes monaco-cursor-phase{0%,20%{opacity:1}90%,to{opacity:0}}@keyframes monaco-cursor-expand{0%,20%{transform:scaleY(1)}80%,to{transform:scaleY(0)}}.cursor-smooth{animation:monaco-cursor-smooth .5s ease-in-out 0s 20 alternate}.cursor-phase{animation:monaco-cursor-phase .5s ease-in-out 0s 20 alternate}.cursor-expand>.cursor{animation:monaco-cursor-expand .5s ease-in-out 0s 20 alternate}.monaco-diff-editor .diffOverview{z-index:9}.monaco-diff-editor .diffOverview .diffViewport{z-index:10}.monaco-diff-editor.vs .diffOverview{background:rgba(0,0,0,.03)}.monaco-diff-editor.vs-dark .diffOverview{background:rgba(255,255,255,.01)}.monaco-scrollable-element.modified-in-monaco-diff-editor.vs .scrollbar,.monaco-scrollable-element.modified-in-monaco-diff-editor.vs-dark .scrollbar{background:rgba(0,0,0,0)}.monaco-scrollable-element.modified-in-monaco-diff-editor.hc-black .scrollbar{background:none}.monaco-scrollable-element.modified-in-monaco-diff-editor .slider{z-index:10}.modified-in-monaco-diff-editor .slider.active{background:rgba(171,171,171,.4)}.modified-in-monaco-diff-editor.hc-black .slider.active{background:none}.monaco-editor .insert-sign,.monaco-diff-editor .insert-sign,.monaco-editor .delete-sign,.monaco-diff-editor .delete-sign{font-size:11px!important;opacity:.7!important;display:flex!important;align-items:center}.monaco-editor.hc-black .insert-sign,.monaco-diff-editor.hc-black .insert-sign,.monaco-editor.hc-black .delete-sign,.monaco-diff-editor.hc-black .delete-sign{opacity:1}.monaco-editor .inline-deleted-margin-view-zone,.monaco-editor .inline-added-margin-view-zone{text-align:right}.monaco-editor .view-zones .view-lines .view-line span{display:inline-block}.monaco-editor .margin-view-zones .lightbulb-glyph:hover{cursor:pointer}:root{--sash-size: 4px}.monaco-sash{position:absolute;z-index:35;touch-action:none}.monaco-sash.disabled{pointer-events:none}.monaco-sash.mac.vertical{cursor:col-resize}.monaco-sash.vertical.minimum{cursor:e-resize}.monaco-sash.vertical.maximum{cursor:w-resize}.monaco-sash.mac.horizontal{cursor:row-resize}.monaco-sash.horizontal.minimum{cursor:s-resize}.monaco-sash.horizontal.maximum{cursor:n-resize}.monaco-sash.disabled{cursor:default!important;pointer-events:none!important}.monaco-sash.vertical{cursor:ew-resize;top:0;width:var(--sash-size);height:100%}.monaco-sash.horizontal{cursor:ns-resize;left:0;width:100%;height:var(--sash-size)}.monaco-sash:not(.disabled)>.orthogonal-drag-handle{content:" ";height:calc(var(--sash-size) * 2);width:calc(var(--sash-size) * 2);z-index:100;display:block;cursor:all-scroll;position:absolute}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.start,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.end{cursor:nwse-resize}.monaco-sash.horizontal.orthogonal-edge-north:not(.disabled)>.orthogonal-drag-handle.end,.monaco-sash.horizontal.orthogonal-edge-south:not(.disabled)>.orthogonal-drag-handle.start{cursor:nesw-resize}.monaco-sash.vertical>.orthogonal-drag-handle.start{left:calc(var(--sash-size) * -.5);top:calc(var(--sash-size) * -1)}.monaco-sash.vertical>.orthogonal-drag-handle.end{left:calc(var(--sash-size) * -.5);bottom:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.start{top:calc(var(--sash-size) * -.5);left:calc(var(--sash-size) * -1)}.monaco-sash.horizontal>.orthogonal-drag-handle.end{top:calc(var(--sash-size) * -.5);right:calc(var(--sash-size) * -1)}.monaco-sash:before{content:"";pointer-events:none;position:absolute;width:100%;height:100%;transition:background-color .1s ease-out;background:transparent}.monaco-sash.vertical:before{width:var(--sash-hover-size);left:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.horizontal:before{height:var(--sash-hover-size);top:calc(50% - (var(--sash-hover-size) / 2))}.monaco-sash.debug{background:cyan}.monaco-sash.debug.disabled{background:rgba(0,255,255,.2)}.monaco-sash.debug:not(.disabled)>.orthogonal-drag-handle{background:red}.monaco-diff-editor .diff-review-line-number{text-align:right;display:inline-block}.monaco-diff-editor .diff-review{position:absolute;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-diff-editor .diff-review-summary{padding-left:10px}.monaco-diff-editor .diff-review-shadow{position:absolute}.monaco-diff-editor .diff-review-row{white-space:pre}.monaco-diff-editor .diff-review-table{display:table;min-width:100%}.monaco-diff-editor .diff-review-row{display:table-row;width:100%}.monaco-diff-editor .diff-review-spacer{display:inline-block;width:10px;vertical-align:middle}.monaco-diff-editor .diff-review-spacer>.codicon{font-size:9px!important}.monaco-diff-editor .diff-review-actions{display:inline-block;position:absolute;right:10px;top:2px}.monaco-diff-editor .diff-review-actions .action-label{width:16px;height:16px;margin:2px 0}.monaco-action-bar{white-space:nowrap;height:100%}.monaco-action-bar .actions-container{display:flex;margin:0 auto;padding:0;height:100%;width:100%;align-items:center}.monaco-action-bar.vertical .actions-container{display:inline-block}.monaco-action-bar .action-item{display:block;align-items:center;justify-content:center;cursor:pointer;position:relative}.monaco-action-bar .action-item.disabled{cursor:default}.monaco-action-bar .action-item .icon,.monaco-action-bar .action-item .codicon{display:block}.monaco-action-bar .action-item .codicon{display:flex;align-items:center;width:16px;height:16px}.monaco-action-bar .action-label{font-size:11px;padding:3px;border-radius:5px}.monaco-action-bar .action-item.disabled .action-label,.monaco-action-bar .action-item.disabled .action-label:before,.monaco-action-bar .action-item.disabled .action-label:hover{opacity:.4}.monaco-action-bar.vertical{text-align:left}.monaco-action-bar.vertical .action-item{display:block}.monaco-action-bar.vertical .action-label.separator{display:block;border-bottom:1px solid #bbb;padding-top:1px;margin-left:.8em;margin-right:.8em}.monaco-action-bar .action-item .action-label.separator{width:1px;height:16px;margin:5px 4px!important;cursor:default;min-width:1px;padding:0;background-color:#bbb}.secondary-actions .monaco-action-bar .action-label{margin-left:6px}.monaco-action-bar .action-item.select-container{overflow:hidden;flex:1;max-width:170px;min-width:60px;display:flex;align-items:center;justify-content:center;margin-right:10px}.monaco-action-bar .action-item.action-dropdown-item{display:flex}.monaco-action-bar .action-item.action-dropdown-item>.action-label{margin-right:1px}@font-face{font-family:codicon;font-display:block;src:url(./codicon.d86f69b1.ttf) format("truetype")}.codicon[class*=codicon-]{font: 16px/1 codicon;display:inline-block;text-decoration:none;text-rendering:auto;text-align:center;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;user-select:none;-webkit-user-select:none;-ms-user-select:none}.codicon-wrench-subaction{opacity:.5}@keyframes codicon-spin{to{transform:rotate(360deg)}}.codicon-sync.codicon-modifier-spin,.codicon-loading.codicon-modifier-spin,.codicon-gear.codicon-modifier-spin,.codicon-notebook-state-executing.codicon-modifier-spin{animation:codicon-spin 1.5s steps(30) infinite}.codicon-modifier-disabled{opacity:.4}.codicon-loading,.codicon-tree-item-loading:before{animation-duration:1s!important;animation-timing-function:cubic-bezier(.53,.21,.29,.67)!important}.context-view{position:absolute;z-index:2500}.context-view.fixed{all:initial;font-family:inherit;font-size:13px;position:fixed;z-index:2500;color:inherit}.context-view .monaco-menu{min-width:130px}.monaco-list{position:relative;height:100%;width:100%;white-space:nowrap}.monaco-list.mouse-support{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-list>.monaco-scrollable-element{height:100%}.monaco-list-rows{position:relative;width:100%;height:100%}.monaco-list.horizontal-scrolling .monaco-list-rows{width:auto;min-width:100%}.monaco-list-row{position:absolute;box-sizing:border-box;overflow:hidden;width:100%}.monaco-list.mouse-support .monaco-list-row{cursor:pointer;touch-action:none}.monaco-list-row.scrolling{display:none!important}.monaco-list.element-focused,.monaco-list.selection-single,.monaco-list.selection-multiple{outline:0!important}.monaco-drag-image{display:inline-block;padding:1px 7px;border-radius:10px;font-size:12px;position:absolute;z-index:1000}.monaco-list-type-filter{display:flex;align-items:center;position:absolute;border-radius:2px;padding:0 3px;max-width:calc(100% - 10px);text-overflow:ellipsis;overflow:hidden;text-align:right;box-sizing:border-box;cursor:all-scroll;font-size:13px;line-height:18px;height:20px;z-index:1;top:4px}.monaco-list-type-filter.dragging{transition:top .2s,left .2s}.monaco-list-type-filter.ne{right:4px}.monaco-list-type-filter.nw{left:4px}.monaco-list-type-filter>.controls{display:flex;align-items:center;box-sizing:border-box;transition:width .2s;width:0}.monaco-list-type-filter.dragging>.controls,.monaco-list-type-filter:hover>.controls{width:36px}.monaco-list-type-filter>.controls>*{border:none;box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;background:none;width:16px;height:16px;flex-shrink:0;margin:0;padding:0;display:flex;align-items:center;justify-content:center;cursor:pointer}.monaco-list-type-filter>.controls>.filter{margin-left:4px}.monaco-list-type-filter-message{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;padding:40px 1em 1em;text-align:center;white-space:normal;opacity:.7;pointer-events:none}.monaco-list-type-filter-message:empty{display:none}.monaco-list-type-filter{cursor:grab}.monaco-list-type-filter.dragging{cursor:grabbing}.monaco-split-view2{position:relative;width:100%;height:100%}.monaco-split-view2>.sash-container{position:absolute;width:100%;height:100%;pointer-events:none}.monaco-split-view2>.sash-container>.monaco-sash{pointer-events:initial}.monaco-split-view2>.monaco-scrollable-element{width:100%;height:100%}.monaco-split-view2>.monaco-scrollable-element>.split-view-container{width:100%;height:100%;white-space:nowrap;position:relative}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view{white-space:initial;position:absolute}.monaco-split-view2>.monaco-scrollable-element>.split-view-container>.split-view-view:not(.visible){display:none}.monaco-split-view2.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view{width:100%}.monaco-split-view2.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view{height:100%}.monaco-split-view2.separator-border>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{content:" ";position:absolute;top:0;left:0;z-index:5;pointer-events:none;background-color:var(--separator-border)}.monaco-split-view2.separator-border.horizontal>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:100%;width:1px}.monaco-split-view2.separator-border.vertical>.monaco-scrollable-element>.split-view-container>.split-view-view:not(:first-child):before{height:1px;width:100%}.monaco-table{display:flex;flex-direction:column;position:relative;height:100%;width:100%;white-space:nowrap}.monaco-table>.monaco-split-view2{border-bottom:1px solid transparent}.monaco-table>.monaco-list{flex:1}.monaco-table-tr{display:flex;height:100%}.monaco-table-th{width:100%;height:100%;font-weight:700;overflow:hidden;text-overflow:ellipsis}.monaco-table-th,.monaco-table-td{box-sizing:border-box;flex-shrink:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{content:"";position:absolute;left:calc(var(--sash-size) / 2);width:0;border-left:1px solid transparent}.monaco-table>.monaco-split-view2,.monaco-table>.monaco-split-view2 .monaco-sash.vertical:before{transition:border-color .2s ease-out}.monaco-tl-row{display:flex;height:100%;align-items:center;position:relative}.monaco-tl-indent{height:100%;position:absolute;top:0;left:16px;pointer-events:none}.hide-arrows .monaco-tl-indent{left:12px}.monaco-tl-indent>.indent-guide{display:inline-block;box-sizing:border-box;height:100%;border-left:1px solid transparent}.monaco-tl-indent>.indent-guide{transition:border-color .1s linear}.monaco-tl-twistie,.monaco-tl-contents{height:100%}.monaco-tl-twistie{font-size:10px;text-align:right;padding-right:6px;flex-shrink:0;width:16px;display:flex!important;align-items:center;justify-content:center;transform:translate(3px)}.monaco-tl-contents{flex:1;overflow:hidden}.monaco-tl-twistie:before{border-radius:20px}.monaco-tl-twistie.collapsed:before{transform:rotate(-90deg)}.monaco-tl-twistie.codicon-tree-item-loading:before{animation:codicon-spin 1.25s steps(30) infinite}.quick-input-widget{font-size:13px}.quick-input-widget .monaco-highlighted-label .highlight,.quick-input-widget .monaco-highlighted-label .highlight{color:#0066bf}.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight,.vs .quick-input-widget .monaco-list-row.focused .monaco-highlighted-label .highlight{color:#9dddff}.vs-dark .quick-input-widget .monaco-highlighted-label .highlight,.vs-dark .quick-input-widget .monaco-highlighted-label .highlight{color:#0097fb}.hc-black .quick-input-widget .monaco-highlighted-label .highlight,.hc-black .quick-input-widget .monaco-highlighted-label .highlight{color:#f38518}.monaco-keybinding>.monaco-keybinding-key{background-color:#ddd6;border:solid 1px rgba(204,204,204,.4);border-bottom-color:#bbb6;box-shadow:inset 0 -1px #bbb6;color:#555}.hc-black .monaco-keybinding>.monaco-keybinding-key{background-color:transparent;border:solid 1px rgb(111,195,223);box-shadow:none;color:#fff}.vs-dark .monaco-keybinding>.monaco-keybinding-key{background-color:#8080802b;border:solid 1px rgba(51,51,51,.6);border-bottom-color:#4449;box-shadow:inset 0 -1px #4449;color:#ccc}.monaco-text-button{box-sizing:border-box;display:flex;width:100%;padding:4px;text-align:center;cursor:pointer;justify-content:center;align-items:center}.monaco-text-button:focus{outline-offset:2px!important}.monaco-text-button:hover{text-decoration:none!important}.monaco-button.disabled:focus,.monaco-button.disabled{opacity:.4!important;cursor:default}.monaco-text-button>.codicon{margin:0 .2em;color:inherit!important}.monaco-button-dropdown{display:flex;cursor:pointer}.monaco-button-dropdown>.monaco-dropdown-button{margin-left:1px}.monaco-description-button{flex-direction:column}.monaco-description-button .monaco-button-label{font-weight:500}.monaco-description-button .monaco-button-description{font-style:italic}.monaco-count-badge{padding:3px 6px;border-radius:11px;font-size:11px;min-width:18px;min-height:18px;line-height:11px;font-weight:400;text-align:center;display:inline-block;box-sizing:border-box}.monaco-count-badge.long{padding:2px 3px;border-radius:2px;min-height:auto;line-height:normal}.monaco-progress-container{width:100%;height:5px;overflow:hidden}.monaco-progress-container .progress-bit{width:2%;height:5px;position:absolute;left:0;display:none}.monaco-progress-container.active .progress-bit{display:inherit}.monaco-progress-container.discrete .progress-bit{left:0;transition:width .1s linear}.monaco-progress-container.discrete.done .progress-bit{width:100%}.monaco-progress-container.infinite .progress-bit{animation-name:progress;animation-duration:4s;animation-iteration-count:infinite;animation-timing-function:linear;transform:translateZ(0)}@keyframes progress{0%{transform:translate(0) scaleX(1)}50%{transform:translate(2500%) scaleX(3)}to{transform:translate(4900%) scaleX(1)}}.quick-input-widget{position:absolute;width:600px;z-index:2000;padding:0 1px 1px;left:50%;margin-left:-300px}.quick-input-titlebar{display:flex;align-items:center}.quick-input-left-action-bar{display:flex;margin-left:4px;flex:1}.quick-input-title{padding:3px 0;text-align:center;text-overflow:ellipsis;overflow:hidden}.quick-input-right-action-bar{display:flex;margin-right:4px;flex:1}.quick-input-right-action-bar>.actions-container{justify-content:flex-end}.quick-input-titlebar .monaco-action-bar .action-label.codicon{background-position:center;background-repeat:no-repeat;padding:2px}.quick-input-description{margin:6px}.quick-input-header .quick-input-description{margin:4px 2px}.quick-input-header{display:flex;padding:6px 6px 0;margin-bottom:-2px}.quick-input-widget.hidden-input .quick-input-header{padding:0;margin-bottom:0}.quick-input-and-message{display:flex;flex-direction:column;flex-grow:1;min-width:0;position:relative}.quick-input-check-all{align-self:center;margin:0}.quick-input-filter{flex-grow:1;display:flex;position:relative}.quick-input-box{flex-grow:1}.quick-input-widget.show-checkboxes .quick-input-box,.quick-input-widget.show-checkboxes .quick-input-message{margin-left:5px}.quick-input-visible-count{position:absolute;left:-10000px}.quick-input-count{align-self:center;position:absolute;right:4px;display:flex;align-items:center}.quick-input-count .monaco-count-badge{vertical-align:middle;padding:2px 4px;border-radius:2px;min-height:auto;line-height:normal}.quick-input-action{margin-left:6px}.quick-input-action .monaco-text-button{font-size:11px;padding:0 6px;display:flex;height:27.5px;align-items:center}.quick-input-message{margin-top:-1px;padding:5px 5px 2px;overflow-wrap:break-word}.quick-input-message>.codicon{margin:0 .2em;vertical-align:text-bottom}.quick-input-progress.monaco-progress-container{position:relative}.quick-input-progress.monaco-progress-container,.quick-input-progress.monaco-progress-container .progress-bit{height:2px}.quick-input-list{line-height:22px;margin-top:6px}.quick-input-widget.hidden-input .quick-input-list{margin-top:0}.quick-input-list .monaco-list{overflow:hidden;max-height:440px}.quick-input-list .quick-input-list-entry{box-sizing:border-box;overflow:hidden;display:flex;height:100%;padding:0 6px}.quick-input-list .quick-input-list-entry.quick-input-list-separator-border{border-top-width:1px;border-top-style:solid}.quick-input-list .monaco-list-row[data-index="0"] .quick-input-list-entry.quick-input-list-separator-border{border-top-style:none}.quick-input-list .quick-input-list-label{overflow:hidden;display:flex;height:100%;flex:1}.quick-input-list .quick-input-list-checkbox{align-self:center;margin:0}.quick-input-list .quick-input-list-rows{overflow:hidden;text-overflow:ellipsis;display:flex;flex-direction:column;height:100%;flex:1;margin-left:5px}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-rows{margin-left:10px}.quick-input-widget .quick-input-list .quick-input-list-checkbox{display:none}.quick-input-widget.show-checkboxes .quick-input-list .quick-input-list-checkbox{display:inline}.quick-input-list .quick-input-list-rows>.quick-input-list-row{display:flex;align-items:center}.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label,.quick-input-list .quick-input-list-rows>.quick-input-list-row .monaco-icon-label .monaco-icon-label-container>.monaco-icon-name-container{flex:1}.quick-input-list .quick-input-list-rows>.quick-input-list-row .codicon[class*=codicon-]{vertical-align:text-bottom}.quick-input-list .quick-input-list-rows .monaco-highlighted-label span{opacity:1}.quick-input-list .quick-input-list-entry .quick-input-list-entry-keybinding{margin-right:8px}.quick-input-list .quick-input-list-label-meta{opacity:.7;line-height:normal;text-overflow:ellipsis;overflow:hidden}.quick-input-list .monaco-highlighted-label .highlight{font-weight:700}.quick-input-list .quick-input-list-entry .quick-input-list-separator{margin-right:8px}.quick-input-list .quick-input-list-entry-action-bar{display:flex;flex:0;overflow:visible}.quick-input-list .quick-input-list-entry-action-bar .action-label{display:none}.quick-input-list .quick-input-list-entry-action-bar .action-label.codicon{margin-right:4px;padding:0 2px 2px}.quick-input-list .quick-input-list-entry-action-bar{margin-top:1px}.quick-input-list .quick-input-list-entry-action-bar{margin-right:4px}.quick-input-list .quick-input-list-entry .quick-input-list-entry-action-bar .action-label.always-visible,.quick-input-list .quick-input-list-entry:hover .quick-input-list-entry-action-bar .action-label,.quick-input-list .monaco-list-row.focused .quick-input-list-entry-action-bar .action-label{display:flex}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key,.quick-input-list .monaco-list-row.focused .quick-input-list-entry .quick-input-list-separator{color:inherit}.quick-input-list .monaco-list-row.focused .monaco-keybinding-key{background:none}.monaco-inputbox{position:relative;display:block;padding:0;box-sizing:border-box;font-size:inherit}.monaco-inputbox.idle{border:1px solid transparent}.monaco-inputbox>.ibwrapper>.input,.monaco-inputbox>.ibwrapper>.mirror{padding:4px}.monaco-inputbox>.ibwrapper{position:relative;width:100%;height:100%}.monaco-inputbox>.ibwrapper>.input{display:inline-block;box-sizing:border-box;width:100%;height:100%;line-height:inherit;border:none;font-family:inherit;font-size:inherit;resize:none;color:inherit}.monaco-inputbox>.ibwrapper>input{text-overflow:ellipsis}.monaco-inputbox>.ibwrapper>textarea.input{display:block;-ms-overflow-style:none;scrollbar-width:none;outline:none}.monaco-inputbox>.ibwrapper>textarea.input::-webkit-scrollbar{display:none}.monaco-inputbox>.ibwrapper>textarea.input.empty{white-space:nowrap}.monaco-inputbox>.ibwrapper>.mirror{position:absolute;display:inline-block;width:100%;top:0;left:0;box-sizing:border-box;white-space:pre-wrap;visibility:hidden;word-wrap:break-word}.monaco-inputbox-container{text-align:right}.monaco-inputbox-container .monaco-inputbox-message{display:inline-block;overflow:hidden;text-align:left;width:100%;box-sizing:border-box;padding:.4em;font-size:12px;line-height:17px;margin-top:-1px;word-wrap:break-word}.monaco-inputbox .monaco-action-bar{position:absolute;right:2px;top:4px}.monaco-inputbox .monaco-action-bar .action-item{margin-left:2px}.monaco-inputbox .monaco-action-bar .action-item .codicon{background-repeat:no-repeat;width:16px;height:16px}.monaco-icon-label{display:flex;overflow:hidden;text-overflow:ellipsis}.monaco-icon-label:before{background-size:16px;background-position:left center;background-repeat:no-repeat;padding-right:6px;width:16px;height:22px;line-height:inherit!important;display:inline-block;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top;flex-shrink:0}.monaco-icon-label>.monaco-icon-label-container{min-width:0;overflow:hidden;text-overflow:ellipsis;flex:1}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name{color:inherit;white-space:pre}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-name-container>.label-name>.label-separator{margin:0 2px;opacity:.5}.monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.7;margin-left:.5em;font-size:.9em;white-space:pre}.monaco-icon-label.nowrap>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{white-space:nowrap}.vs .monaco-icon-label>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{opacity:.95}.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.italic>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{font-style:italic}.monaco-icon-label.deprecated{text-decoration:line-through;opacity:.66}.monaco-icon-label.italic:after{font-style:italic}.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-name-container>.label-name,.monaco-icon-label.strikethrough>.monaco-icon-label-container>.monaco-icon-description-container>.label-description{text-decoration:line-through}.monaco-icon-label:after{opacity:.75;font-size:90%;font-weight:600;margin:auto 16px 0 5px;text-align:center}.monaco-list:focus .selected .monaco-icon-label,.monaco-list:focus .selected .monaco-icon-label:after{color:inherit!important}.monaco-list-row.focused.selected .label-description,.monaco-list-row.selected .label-description{opacity:.8}.monaco-keybinding{display:flex;align-items:center;line-height:10px}.monaco-keybinding>.monaco-keybinding-key{display:inline-block;border-style:solid;border-width:1px;border-radius:3px;vertical-align:middle;font-size:11px;padding:3px 5px;margin:0 2px}.monaco-keybinding>.monaco-keybinding-key:first-child{margin-left:0}.monaco-keybinding>.monaco-keybinding-key:last-child{margin-right:0}.monaco-keybinding>.monaco-keybinding-key-separator{display:inline-block}.monaco-keybinding>.monaco-keybinding-key-chord-separator{width:6px}.monaco-editor .selection-anchor{background-color:#007acc;width:2px!important}.monaco-editor .bracket-match{box-sizing:border-box}.monaco-editor .monaco-editor-overlaymessage{padding-bottom:8px;z-index:10000}.monaco-editor .monaco-editor-overlaymessage.below{padding-bottom:0;padding-top:8px;z-index:10000}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.monaco-editor .monaco-editor-overlaymessage.fadeIn{animation:fadeIn .15s ease-out}@keyframes fadeOut{0%{opacity:1}to{opacity:0}}.monaco-editor .monaco-editor-overlaymessage.fadeOut{animation:fadeOut .1s ease-out}.monaco-editor .monaco-editor-overlaymessage .message{padding:1px 4px}.monaco-editor .monaco-editor-overlaymessage .anchor{width:0!important;height:0!important;border-color:transparent;border-style:solid;z-index:1000;border-width:8px;position:absolute}.monaco-editor .monaco-editor-overlaymessage:not(.below) .anchor.top,.monaco-editor .monaco-editor-overlaymessage.below .anchor.below{display:none}.monaco-editor .monaco-editor-overlaymessage.below .anchor.top{display:inherit;top:-8px}.monaco-editor .contentWidgets .codicon-light-bulb,.monaco-editor .contentWidgets .codicon-lightbulb-autofix{display:flex;align-items:center;justify-content:center}.monaco-editor .contentWidgets .codicon-light-bulb:hover,.monaco-editor .contentWidgets .codicon-lightbulb-autofix:hover{cursor:pointer}.monaco-editor .codelens-decoration{overflow:hidden;display:inline-block;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .codelens-decoration>span,.monaco-editor .codelens-decoration>a{user-select:none;-webkit-user-select:none;-ms-user-select:none;white-space:nowrap;vertical-align:sub}.monaco-editor .codelens-decoration>a{text-decoration:none}.monaco-editor .codelens-decoration>a:hover{cursor:pointer}.monaco-editor .codelens-decoration .codicon{vertical-align:middle;color:currentColor!important}.monaco-editor .codelens-decoration>a:hover .codicon:before{cursor:pointer}@keyframes fadein{0%{opacity:0;visibility:visible}to{opacity:1}}.monaco-editor .codelens-decoration.fadein{animation:fadein .1s linear}.monaco-editor .goto-definition-link{text-decoration:underline;cursor:pointer}.monaco-editor .peekview-widget .head{box-sizing:border-box;display:flex}.monaco-editor .peekview-widget .head .peekview-title{display:flex;align-items:center;font-size:13px;margin-left:20px;min-width:0}.monaco-editor .peekview-widget .head .peekview-title.clickable{cursor:pointer}.monaco-editor .peekview-widget .head .peekview-title .dirname:not(:empty){font-size:.9em;margin-left:.5em}.monaco-editor .peekview-widget .head .peekview-title .meta,.monaco-editor .peekview-widget .head .peekview-title .dirname{white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .filename{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .peekview-widget .head .peekview-title .meta:not(:empty):before{content:"-";padding:0 .3em}.monaco-editor .peekview-widget .head .peekview-actions{flex:1;text-align:right;padding-right:2px}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar{display:inline-block}.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar,.monaco-editor .peekview-widget .head .peekview-actions>.monaco-action-bar>.actions-container{height:100%}.monaco-editor .peekview-widget>.body{border-top:1px solid;position:relative}.monaco-editor .peekview-widget .head .peekview-title .codicon{margin-right:4px}.monaco-editor .peekview-widget .monaco-list .monaco-list-row.focused .codicon{color:inherit!important}.monaco-editor .zone-widget{position:absolute;z-index:10}.monaco-editor .zone-widget .zone-widget-container{border-top-style:solid;border-bottom-style:solid;border-top-width:0;border-bottom-width:0;position:relative}.monaco-dropdown{height:100%;padding:0}.monaco-dropdown>.dropdown-label{cursor:pointer;height:100%;display:flex;align-items:center;justify-content:center}.monaco-dropdown>.dropdown-label>.action-label.disabled{cursor:default}.monaco-dropdown-with-primary{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-primary>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-primary>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-action-bar .action-item.menu-entry .action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-action-bar .action-item.menu-entry .action-label,.hc-black .monaco-action-bar .action-item.menu-entry .action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default{display:flex!important;flex-direction:row;border-radius:5px}.monaco-dropdown-with-default>.action-container>.action-label{margin-right:0}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label.icon{width:16px;height:16px;background-repeat:no-repeat;background-position:50%;background-size:16px}.monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-light)}.vs-dark .monaco-dropdown-with-default>.action-container.menu-entry>.action-label,.hc-black .monaco-dropdown-with-default>.action-container.menu-entry>.action-label{background-image:var(--menu-entry-icon-dark)}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label .codicon[class*=codicon-]{font-size:12px;padding-left:0;padding-right:0;line-height:16px;margin-left:-3px}.monaco-dropdown-with-default>.dropdown-action-container>.monaco-dropdown>.dropdown-label>.action-label{display:block;background-size:16px;background-position:center center;background-repeat:no-repeat}.monaco-editor .zone-widget .zone-widget-container.reference-zone-widget{border-top-width:1px;border-bottom-width:1px}.monaco-editor .reference-zone-widget .inline{display:inline-block;vertical-align:top}.monaco-editor .reference-zone-widget .messages{height:100%;width:100%;text-align:center;padding:3em 0}.monaco-editor .reference-zone-widget .ref-tree{line-height:23px}.monaco-editor .reference-zone-widget .ref-tree .reference{text-overflow:ellipsis;overflow:hidden}.monaco-editor .reference-zone-widget .ref-tree .reference-file{display:inline-flex;width:100%;height:100%}.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .selected .reference-file{color:inherit!important}.monaco-editor .reference-zone-widget .ref-tree .reference-file .count{margin-right:12px;margin-left:auto}.monaco-editor.hc-black .reference-zone-widget .ref-tree .reference-file{font-weight:700}.monaco-hover{cursor:default;position:absolute;overflow:hidden;z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;box-sizing:initial;animation:fadein .1s linear;line-height:1.5em}.monaco-hover.hidden{display:none}.monaco-hover .hover-contents:not(.html-hover-contents){padding:4px 8px}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents){max-width:500px;word-wrap:break-word}.monaco-hover .markdown-hover>.hover-contents:not(.code-hover-contents) hr{min-width:100%}.monaco-hover p,.monaco-hover .code,.monaco-hover ul{margin:8px 0}.monaco-hover code{font-family:var(--monaco-monospace-font)}.monaco-hover hr{box-sizing:border-box;border-left:0px;border-right:0px;margin:4px -8px -4px;height:1px}.monaco-hover p:first-child,.monaco-hover .code:first-child,.monaco-hover ul:first-child{margin-top:0}.monaco-hover p:last-child,.monaco-hover .code:last-child,.monaco-hover ul:last-child{margin-bottom:0}.monaco-hover ul,.monaco-hover ol{padding-left:20px}.monaco-hover li>p{margin-bottom:0}.monaco-hover li>ul{margin-top:0}.monaco-hover code{border-radius:3px;padding:0 .4em}.monaco-hover .monaco-tokenized-source{white-space:pre-wrap}.monaco-hover .hover-row.status-bar{font-size:12px;line-height:22px}.monaco-hover .hover-row.status-bar .actions{display:flex;padding:0 8px}.monaco-hover .hover-row.status-bar .actions .action-container{margin-right:16px;cursor:pointer}.monaco-hover .hover-row.status-bar .actions .action-container .action .icon{padding-right:4px}.monaco-hover .markdown-hover .hover-contents .codicon{color:inherit;font-size:inherit;vertical-align:middle}.monaco-hover .hover-contents a.code-link:hover,.monaco-hover .hover-contents a.code-link{color:inherit}.monaco-hover .hover-contents a.code-link:before{content:"("}.monaco-hover .hover-contents a.code-link:after{content:")"}.monaco-hover .hover-contents a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-hover .markdown-hover .hover-contents:not(.code-hover-contents):not(.html-hover-contents) span{margin-bottom:4px;display:inline-block}.monaco-hover-content .action-container a{-webkit-user-select:none;user-select:none}.monaco-hover-content .action-container.disabled{pointer-events:none;opacity:.4;cursor:default}.colorpicker-widget{height:190px;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .colorpicker-hover:focus{outline:none}.colorpicker-header{display:flex;height:24px;position:relative;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-header .picked-color{width:216px;line-height:24px;cursor:pointer;color:#fff;flex:1;text-align:center}.colorpicker-header .picked-color.light{color:#000}.colorpicker-header .original-color{width:74px;z-index:inherit;cursor:pointer}.colorpicker-body{display:flex;padding:8px;position:relative}.colorpicker-body .saturation-wrap{overflow:hidden;height:150px;position:relative;min-width:220px;flex:1}.colorpicker-body .saturation-box{height:150px;position:absolute}.colorpicker-body .saturation-selection{width:9px;height:9px;margin:-5px 0 0 -5px;border:1px solid rgb(255,255,255);border-radius:100%;box-shadow:0 0 2px #000c;position:absolute}.colorpicker-body .strip{width:25px;height:150px}.colorpicker-body .hue-strip{position:relative;margin-left:8px;cursor:grab;background:linear-gradient(to bottom,#ff0000 0%,#ffff00 17%,#00ff00 33%,#00ffff 50%,#0000ff 67%,#ff00ff 83%,#ff0000 100%)}.colorpicker-body .opacity-strip{position:relative;margin-left:8px;cursor:grab;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMTZEaa/1AAAAHUlEQVQYV2PYvXu3JAi7uLiAMaYAjAGTQBPYLQkAa/0Zef3qRswAAAAASUVORK5CYII=);background-size:9px 9px;image-rendering:pixelated}.colorpicker-body .strip.grabbing{cursor:grabbing}.colorpicker-body .slider{position:absolute;top:0;left:-2px;width:calc(100% + 4px);height:4px;box-sizing:border-box;border:1px solid rgba(255,255,255,.71);box-shadow:0 0 1px #000000d9}.colorpicker-body .strip .overlay{height:150px;pointer-events:none}.monaco-editor .peekview-widget .head .peekview-title .severity-icon{display:inline-block;vertical-align:text-top;margin-right:4px}.monaco-editor .marker-widget{text-overflow:ellipsis;white-space:nowrap}.monaco-editor .marker-widget>.stale{opacity:.6;font-style:italic}.monaco-editor .marker-widget .title{display:inline-block;padding-right:5px}.monaco-editor .marker-widget .descriptioncontainer{position:absolute;white-space:pre;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:8px 12px 0 20px}.monaco-editor .marker-widget .descriptioncontainer .message{display:flex;flex-direction:column}.monaco-editor .marker-widget .descriptioncontainer .message .details{padding-left:6px}.monaco-editor .marker-widget .descriptioncontainer .message .source,.monaco-editor .marker-widget .descriptioncontainer .message span.code{opacity:.6}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link{opacity:.6;color:inherit}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:before{content:"("}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link:after{content:")"}.monaco-editor .marker-widget .descriptioncontainer .message a.code-link>span{text-decoration:underline;border-bottom:1px solid transparent;text-underline-position:under}.monaco-editor .marker-widget .descriptioncontainer .filename{cursor:pointer}.monaco-editor .snippet-placeholder{min-width:2px;outline-style:solid;outline-width:1px}.monaco-editor .finish-snippet-placeholder{outline-style:solid;outline-width:1px}.monaco-editor .suggest-widget{width:430px;z-index:40;display:flex;flex-direction:column}.monaco-editor .suggest-widget.message{flex-direction:row;align-items:center}.monaco-editor .suggest-widget,.monaco-editor .suggest-details{flex:0 1 auto;width:100%;border-style:solid;border-width:1px}.monaco-editor.hc-black .suggest-widget,.monaco-editor.hc-black .suggest-details{border-width:2px}.monaco-editor .suggest-widget .suggest-status-bar{box-sizing:border-box;display:none;flex-flow:row nowrap;justify-content:space-between;width:100%;font-size:80%;padding:0 4px;border-top:1px solid transparent;overflow:hidden}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar{display:flex}.monaco-editor .suggest-widget .suggest-status-bar .left{padding-right:8px}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-label{opacity:.5;color:inherit}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label{margin-right:0}.monaco-editor .suggest-widget.with-status-bar .suggest-status-bar .action-item:not(:last-of-type) .action-label:after{content:", ";margin-right:.3em}.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.with-status-bar .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget.with-status-bar:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:100%}.monaco-editor .suggest-widget>.message{padding-left:22px}.monaco-editor .suggest-widget>.tree{height:100%;width:100%}.monaco-editor .suggest-widget .monaco-list{user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row{display:flex;-mox-box-sizing:border-box;box-sizing:border-box;padding-right:10px;background-repeat:no-repeat;background-position:2px 2px;white-space:nowrap;cursor:pointer;touch-action:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents{flex:1;height:100%;overflow:hidden;padding-left:2px}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main{display:flex;overflow:hidden;text-overflow:ellipsis;white-space:pre;justify-content:space-between}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{display:flex}.monaco-editor .suggest-widget:not(.frozen) .monaco-highlighted-label .highlight{font-weight:700}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:before{color:inherit;opacity:1;font-size:14px;cursor:pointer}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close{position:absolute;top:6px;right:2px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.codicon-close:hover,.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore:hover{opacity:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{opacity:.7}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.signature-label{overflow:hidden;text-overflow:ellipsis;opacity:.6}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.qualifier-label{margin-left:12px;opacity:.4;font-size:85%;line-height:initial;text-overflow:ellipsis;overflow:hidden;align-self:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{font-size:85%;margin-left:1.1em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label>.monaco-tokenized-source{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.details-label{display:none}.monaco-editor .suggest-widget:not(.shows-details) .monaco-list .monaco-list-row.focused>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.right>.details-label,.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row.focused:not(.string-label)>.contents>.main>.right>.details-label{display:inline}.monaco-editor .suggest-widget:not(.docs-side) .monaco-list .monaco-list-row:hover>.contents>.main>.right.can-expand-details>.details-label{width:calc(100% - 26px)}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left{flex-shrink:1;flex-grow:1;overflow:hidden}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.left>.monaco-icon-label{flex-shrink:0}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:not(.string-label)>.contents>.main>.left>.monaco-icon-label{max-width:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.left>.monaco-icon-label{flex-shrink:1}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right{overflow:hidden;flex-shrink:4;max-width:70%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:inline-block;position:absolute;right:10px;width:18px;height:18px;visibility:hidden}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none!important}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.string-label>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused.string-label>.contents>.main>.right>.readMore{display:inline-block}.monaco-editor .suggest-widget.docs-side .monaco-list .monaco-list-row>.contents>.main>.right>.readMore,.monaco-editor .suggest-widget.docs-below .monaco-list .monaco-list-row>.contents>.main>.right>.readMore{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row:hover>.contents>.main>.right>.readMore{visibility:visible}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated{opacity:.66;text-decoration:unset}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label.deprecated>.monaco-icon-label-container>.monaco-icon-name-container{text-decoration:line-through}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-icon-label:before{height:100%}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon{display:block;height:16px;width:16px;margin-left:2px;background-repeat:no-repeat;background-size:80%;background-position:center}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.hide{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .suggest-icon{display:flex;align-items:center;margin-right:4px}.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .icon,.monaco-editor .suggest-widget.no-icons .monaco-list .monaco-list-row .suggest-icon:before{display:none}.monaco-editor .suggest-widget .monaco-list .monaco-list-row .icon.customcolor .colorspan{margin:0 0 0 .3em;border:.1em solid #000;width:.7em;height:.7em;display:inline-block}.monaco-editor .suggest-details-container{z-index:41}.monaco-editor .suggest-details{display:flex;flex-direction:column;cursor:default}.monaco-editor .suggest-details.no-docs{display:none}.monaco-editor .suggest-details>.monaco-scrollable-element{flex:1}.monaco-editor .suggest-details>.monaco-scrollable-element>.body{box-sizing:border-box;height:100%;width:100%}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type{flex:2;overflow:hidden;text-overflow:ellipsis;opacity:.7;white-space:pre;margin:0 24px 0 0;padding:4px 0 12px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.header>.type.auto-wrap{white-space:normal;word-break:break-all}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs{margin:0;padding:4px 5px;white-space:pre-wrap}.monaco-editor .suggest-details.no-type>.monaco-scrollable-element>.body>.docs{margin-right:24px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs{padding:0;white-space:initial;min-height:calc(1rem + 8px)}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div,.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>span:not(:empty){padding:4px 5px}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:first-child{margin-top:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs>div>p:last-child{margin-bottom:0}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs .code{white-space:pre-wrap;word-wrap:break-word}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>.docs.markdown-docs .codicon{vertical-align:sub}.monaco-editor .suggest-details>.monaco-scrollable-element>.body>p:empty{display:none}.monaco-editor .suggest-details code{border-radius:3px;padding:0 .4em}.monaco-editor .suggest-details ul,.monaco-editor .suggest-details ol{padding-left:20px}.monaco-editor .suggest-details p code{font-family:var(--monaco-monospace-font)}.monaco-editor .suggest-preview-additional-widget{white-space:nowrap}.monaco-editor .suggest-preview-additional-widget .content-spacer{color:transparent;white-space:pre}.monaco-editor .suggest-preview-additional-widget .button{display:inline-block;cursor:pointer;text-decoration:underline;text-underline-position:under}.monaco-editor .ghost-text-hidden{opacity:0;font-size:0}.monaco-editor .ghost-text-decoration,.monaco-editor .suggest-preview-text{font-style:italic}.monaco-editor.vs .dnd-target{border-right:2px dotted black;color:#fff}.monaco-editor.vs-dark .dnd-target{border-right:2px dotted #AEAFAD;color:#51504f}.monaco-editor.hc-black .dnd-target{border-right:2px dotted #fff;color:#000}.monaco-editor.mouse-default .view-lines,.monaco-editor.vs-dark.mac.mouse-default .view-lines,.monaco-editor.hc-black.mac.mouse-default .view-lines{cursor:default}.monaco-editor.mouse-copy .view-lines,.monaco-editor.vs-dark.mac.mouse-copy .view-lines,.monaco-editor.hc-black.mac.mouse-copy .view-lines{cursor:copy}.monaco-custom-checkbox{margin-left:2px;float:left;cursor:pointer;overflow:hidden;opacity:.7;width:20px;height:20px;border:1px solid transparent;padding:1px;box-sizing:border-box;user-select:none;-webkit-user-select:none;-ms-user-select:none}.monaco-custom-checkbox:hover,.monaco-custom-checkbox.checked{opacity:1}.hc-black .monaco-custom-checkbox,.hc-black .monaco-custom-checkbox:hover{background:none}.monaco-custom-checkbox.monaco-simple-checkbox{height:18px;width:18px;border:1px solid transparent;border-radius:3px;margin-right:9px;margin-left:0;padding:0;opacity:1;background-size:16px!important}.monaco-custom-checkbox.monaco-simple-checkbox:not(.checked):before{visibility:hidden}.monaco-editor .find-widget{position:absolute;z-index:35;height:33px;overflow:hidden;line-height:19px;transition:transform .2s linear;padding:0 4px;box-sizing:border-box;transform:translateY(calc(-100% - 10px))}.monaco-editor .find-widget textarea{margin:0}.monaco-editor .find-widget.hiddenEditor{display:none}.monaco-editor .find-widget.replaceToggled>.replace-part{display:flex}.monaco-editor .find-widget.visible{transform:translateY(0)}.monaco-editor .find-widget .monaco-inputbox.synthetic-focus{outline:1px solid -webkit-focus-ring-color;outline-offset:-1px}.monaco-editor .find-widget .monaco-inputbox .input{background-color:transparent;min-height:0}.monaco-editor .find-widget .monaco-findInput .input{font-size:13px}.monaco-editor .find-widget>.find-part,.monaco-editor .find-widget>.replace-part{margin:4px 0 0 17px;font-size:12px;display:flex}.monaco-editor .find-widget>.find-part .monaco-inputbox,.monaco-editor .find-widget>.replace-part .monaco-inputbox{min-height:25px}.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-right:22px}.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.find-part .monaco-inputbox>.ibwrapper>.mirror,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.input,.monaco-editor .find-widget>.replace-part .monaco-inputbox>.ibwrapper>.mirror{padding-top:2px;padding-bottom:2px}.monaco-editor .find-widget>.find-part .find-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget>.replace-part .replace-actions{height:25px;display:flex;align-items:center}.monaco-editor .find-widget .monaco-findInput{vertical-align:middle;display:flex;flex:1}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element{width:100%}.monaco-editor .find-widget .monaco-findInput .monaco-scrollable-element .scrollbar.vertical{opacity:0}.monaco-editor .find-widget .matchesCount{display:flex;flex:initial;margin:0 0 0 3px;padding:2px 0 0 2px;height:25px;vertical-align:middle;box-sizing:border-box;text-align:center;line-height:23px}.monaco-editor .find-widget .button{width:16px;height:16px;padding:3px;border-radius:5px;flex:initial;margin-left:3px;background-position:center center;background-repeat:no-repeat;cursor:pointer;display:flex;align-items:center;justify-content:center}.monaco-editor .find-widget .codicon-find-selection{width:22px;height:22px;padding:3px;border-radius:5px}.monaco-editor .find-widget .button.left{margin-left:0;margin-right:3px}.monaco-editor .find-widget .button.wide{width:auto;padding:1px 6px;top:-1px}.monaco-editor .find-widget .button.toggle{position:absolute;top:0;left:3px;width:18px;height:100%;border-radius:0;box-sizing:border-box}.monaco-editor .find-widget .button.toggle.disabled{display:none}.monaco-editor .find-widget .disabled{opacity:.3;cursor:default}.monaco-editor .find-widget>.replace-part{display:none}.monaco-editor .find-widget>.replace-part>.monaco-findInput{position:relative;display:flex;vertical-align:middle;flex:auto;flex-grow:0;flex-shrink:0}.monaco-editor .find-widget>.replace-part>.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.monaco-editor .find-widget.reduced-find-widget .matchesCount{display:none}.monaco-editor .find-widget.narrow-find-widget{max-width:257px!important}.monaco-editor .find-widget.collapsed-find-widget{max-width:170px!important}.monaco-editor .find-widget.collapsed-find-widget .button.previous,.monaco-editor .find-widget.collapsed-find-widget .button.next,.monaco-editor .find-widget.collapsed-find-widget .button.replace,.monaco-editor .find-widget.collapsed-find-widget .button.replace-all,.monaco-editor .find-widget.collapsed-find-widget>.find-part .monaco-findInput .controls{display:none}.monaco-editor .findMatch{animation-duration:0;animation-name:inherit!important}.monaco-editor .find-widget .monaco-sash{left:0!important}.monaco-editor.hc-black .find-widget .button:before{position:relative;top:1px;left:2px}.monaco-findInput{position:relative}.monaco-findInput .monaco-inputbox{font-size:13px;width:100%}.monaco-findInput>.controls{position:absolute;top:3px;right:2px}.vs .monaco-findInput.disabled{background-color:#e1e1e1}.vs-dark .monaco-findInput.disabled{background-color:#333}.monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-0 .1s linear 0s}.monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-1 .1s linear 0s}.hc-black .monaco-findInput.highlight-0 .controls,.vs-dark .monaco-findInput.highlight-0 .controls{animation:monaco-findInput-highlight-dark-0 .1s linear 0s}.hc-black .monaco-findInput.highlight-1 .controls,.vs-dark .monaco-findInput.highlight-1 .controls{animation:monaco-findInput-highlight-dark-1 .1s linear 0s}@keyframes monaco-findInput-highlight-0{0%{background:rgba(253,255,0,.8)}to{background:transparent}}@keyframes monaco-findInput-highlight-1{0%{background:rgba(253,255,0,.8)}99%{background:transparent}}@keyframes monaco-findInput-highlight-dark-0{0%{background:rgba(255,255,255,.44)}to{background:transparent}}@keyframes monaco-findInput-highlight-dark-1{0%{background:rgba(255,255,255,.44)}99%{background:transparent}}.monaco-editor .margin-view-overlays .codicon-folding-expanded,.monaco-editor .margin-view-overlays .codicon-folding-collapsed{cursor:pointer;opacity:0;transition:opacity .5s;display:flex;align-items:center;justify-content:center;font-size:140%;margin-left:2px}.monaco-editor .margin-view-overlays:hover .codicon,.monaco-editor .margin-view-overlays .codicon.codicon-folding-collapsed,.monaco-editor .margin-view-overlays .codicon.alwaysShowFoldIcons{opacity:1}.monaco-editor .inline-folded:after{color:gray;margin:.1em .2em 0;content:"\22ef";display:inline;line-height:1em;cursor:pointer}.monaco-editor .detected-link,.monaco-editor .detected-link-active{text-decoration:underline;text-underline-position:under}.monaco-editor .detected-link-active{cursor:pointer}.monaco-editor .parameter-hints-widget{z-index:10;display:flex;flex-direction:column;line-height:1.5em}.monaco-editor .parameter-hints-widget>.phwrapper{max-width:440px;display:flex;flex-direction:row}.monaco-editor .parameter-hints-widget.multiple{min-height:3.3em;padding:0}.monaco-editor .parameter-hints-widget.visible{transition:left .05s ease-in-out}.monaco-editor .parameter-hints-widget p,.monaco-editor .parameter-hints-widget ul{margin:8px 0}.monaco-editor .parameter-hints-widget .monaco-scrollable-element,.monaco-editor .parameter-hints-widget .body{display:flex;flex:1;flex-direction:column;min-height:100%}.monaco-editor .parameter-hints-widget .signature{padding:4px 5px}.monaco-editor .parameter-hints-widget .docs{padding:0 10px 0 5px;white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs.empty{display:none}.monaco-editor .parameter-hints-widget .docs .markdown-docs{white-space:initial}.monaco-editor .parameter-hints-widget .docs .markdown-docs code{font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .docs .code{white-space:pre-wrap}.monaco-editor .parameter-hints-widget .docs code{border-radius:3px;padding:0 .4em}.monaco-editor .parameter-hints-widget .controls{display:none;flex-direction:column;align-items:center;min-width:22px;justify-content:flex-end}.monaco-editor .parameter-hints-widget.multiple .controls{display:flex;padding:0 2px}.monaco-editor .parameter-hints-widget.multiple .button{width:16px;height:16px;background-repeat:no-repeat;cursor:pointer}.monaco-editor .parameter-hints-widget .button.previous{bottom:24px}.monaco-editor .parameter-hints-widget .overloads{text-align:center;height:12px;line-height:12px;opacity:.5;font-family:var(--monaco-monospace-font)}.monaco-editor .parameter-hints-widget .signature .parameter.active{font-weight:700;text-decoration:underline}.monaco-editor .parameter-hints-widget .documentation-parameter>.parameter{font-weight:700;margin-right:.5em}.monaco-editor .rename-box{z-index:100;color:inherit}.monaco-editor .rename-box.preview{padding:3px 3px 0}.monaco-editor .rename-box .rename-input{padding:3px;width:calc(100% - 6px)}.monaco-editor .rename-box .rename-label{display:none;opacity:.8}.monaco-editor .rename-box.preview .rename-label{display:inherit}.monaco-editor .accessibilityHelpWidget{padding:10px;vertical-align:middle;overflow:scroll}.monaco-editor .iPadShowKeyboard{width:58px;min-width:0;height:36px;min-height:0;margin:0;padding:0;position:absolute;resize:none;overflow:hidden;background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjNDI0MjQyIi8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #F6F6F6;border-radius:4px}.monaco-editor.vs-dark .iPadShowKeyboard{background:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIHZpZXdCb3g9IjAgMCA1MyAzNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwKSI+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNDguMDM2NCA0LjAxMDQySDQuMDA3NzlMNC4wMDc3OSAzMi4wMjg2SDQ4LjAzNjRWNC4wMTA0MlpNNC4wMDc3OSAwLjAwNzgxMjVDMS43OTcyMSAwLjAwNzgxMjUgMC4wMDUxODc5OSAxLjc5OTg0IDAuMDA1MTg3OTkgNC4wMTA0MlYzMi4wMjg2QzAuMDA1MTg3OTkgMzQuMjM5MiAxLjc5NzIxIDM2LjAzMTIgNC4wMDc3OSAzNi4wMzEySDQ4LjAzNjRDNTAuMjQ3IDM2LjAzMTIgNTIuMDM5IDM0LjIzOTIgNTIuMDM5IDMyLjAyODZWNC4wMTA0MkM1Mi4wMzkgMS43OTk4NCA1MC4yNDcgMC4wMDc4MTI1IDQ4LjAzNjQgMC4wMDc4MTI1SDQuMDA3NzlaTTguMDEwNDIgOC4wMTMwMkgxMi4wMTNWMTIuMDE1Nkg4LjAxMDQyVjguMDEzMDJaTTIwLjAxODIgOC4wMTMwMkgxNi4wMTU2VjEyLjAxNTZIMjAuMDE4MlY4LjAxMzAyWk0yNC4wMjA4IDguMDEzMDJIMjguMDIzNFYxMi4wMTU2SDI0LjAyMDhWOC4wMTMwMlpNMzYuMDI4NiA4LjAxMzAySDMyLjAyNlYxMi4wMTU2SDM2LjAyODZWOC4wMTMwMlpNNDAuMDMxMiA4LjAxMzAySDQ0LjAzMzlWMTIuMDE1Nkg0MC4wMzEyVjguMDEzMDJaTTE2LjAxNTYgMTYuMDE4Mkg4LjAxMDQyVjIwLjAyMDhIMTYuMDE1NlYxNi4wMTgyWk0yMC4wMTgyIDE2LjAxODJIMjQuMDIwOFYyMC4wMjA4SDIwLjAxODJWMTYuMDE4MlpNMzIuMDI2IDE2LjAxODJIMjguMDIzNFYyMC4wMjA4SDMyLjAyNlYxNi4wMTgyWk00NC4wMzM5IDE2LjAxODJWMjAuMDIwOEgzNi4wMjg2VjE2LjAxODJINDQuMDMzOVpNMTIuMDEzIDI0LjAyMzRIOC4wMTA0MlYyOC4wMjZIMTIuMDEzVjI0LjAyMzRaTTE2LjAxNTYgMjQuMDIzNEgzNi4wMjg2VjI4LjAyNkgxNi4wMTU2VjI0LjAyMzRaTTQ0LjAzMzkgMjQuMDIzNEg0MC4wMzEyVjI4LjAyNkg0NC4wMzM5VjI0LjAyMzRaIiBmaWxsPSIjQzVDNUM1Ii8+CjwvZz4KPGRlZnM+CjxjbGlwUGF0aCBpZD0iY2xpcDAiPgo8cmVjdCB3aWR0aD0iNTMiIGhlaWdodD0iMzYiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) center center no-repeat;border:4px solid #252526}.monaco-editor .tokens-inspect-widget{z-index:50;user-select:text;-webkit-user-select:text;-ms-user-select:text;padding:10px}.tokens-inspect-separator{height:1px;border:0}.monaco-editor .tokens-inspect-widget .tm-token{font-family:var(--monaco-monospace-font)}.monaco-editor .tokens-inspect-widget .tm-token-length{font-weight:400;font-size:60%;float:right}.monaco-editor .tokens-inspect-widget .tm-metadata-table{width:100%}.monaco-editor .tokens-inspect-widget .tm-metadata-value{font-family:var(--monaco-monospace-font);text-align:right}.monaco-editor .tokens-inspect-widget .tm-token-type{font-family:var(--monaco-monospace-font)}.magic-loading-wrapper{position:absolute;top:0;bottom:0;left:0;right:0;z-index:10000000;text-align:center;background:#fff}.magic-loading-container{position:absolute;top:50%;left:50%;width:500px;height:100px;margin-left:-250px;margin-top:-50px;text-align:center}.magic-loading-container .magic-title{font-size:0;color:#0075ff;letter-spacing:0}.magic-loading-container .magic-title label{font-size:14px;display:inline-block;margin-top:5px;vertical-align:top}.magic-loading-container .magic-title span{font-size:20px;display:inline-block;padding:0 3px;animation:stretch 1s infinite}.magic-loading-container .magic-title span:nth-child(1){animation-delay:0s}.magic-loading-container .magic-title span:nth-child(2){animation-delay:.0625s}.magic-loading-container .magic-title span:nth-child(3){animation-delay:.125s}.magic-loading-container .magic-title span:nth-child(4){animation-delay:.1875s}.magic-loading-container .magic-title span:nth-child(5){animation-delay:.25s}.magic-loading-container .magic-title span:nth-child(6){animation-delay:.3125s}.magic-loading-container .magic-title span:nth-child(7){animation-delay:.375s}.magic-loading-container .magic-title span:nth-child(8){animation-delay:.4375s}.magic-loading-container .magic-loading-text{text-align:center;font-weight:bolder;font-style:italic;color:#889aa4;font-size:14px;margin-top:5px;animation:blink-loading 2s ease-in infinite}@keyframes stretch{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(1)}to{transform:scale(1)}}@keyframes blink-loading{0%{opacity:1}50%{opacity:.5}to{opacity:1}} diff --git a/magic-editor/src/main/resources/magic-editor/assets/vendor.08c4cc4b.js b/magic-editor/src/main/resources/magic-editor/assets/vendor.08c4cc4b.js new file mode 100644 index 00000000..8795a400 --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/vendor.08c4cc4b.js @@ -0,0 +1,828 @@ +import{g as DH}from"./axios.23e7b955.js";var AH=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},CR=typeof Symbol!="undefined"&&Symbol,NH=AH,RH=function(){return typeof CR!="function"||typeof Symbol!="function"||typeof CR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:NH()},OH="Function.prototype.bind called on incompatible ",VS=Array.prototype.slice,MH=Object.prototype.toString,PH="[object Function]",FH=function(e){var t=this;if(typeof t!="function"||MH.call(t)!==PH)throw new TypeError(OH+t);for(var i=VS.call(arguments,1),n,s=function(){if(this instanceof n){var d=t.apply(this,i.concat(VS.call(arguments)));return Object(d)===d?d:this}else return t.apply(e,i.concat(VS.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],l=0;l<o;l++)a.push("$"+l);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var c=function(){};c.prototype=t.prototype,n.prototype=new c,c.prototype=null}return n},BH=FH,YI=Function.prototype.bind||BH,WH=YI,VH=WH.call(Function.call,Object.prototype.hasOwnProperty),Nt,mm=SyntaxError,_B=Function,of=TypeError,HS=function(r){try{return _B('"use strict"; return ('+r+").constructor;")()}catch{}},Nd=Object.getOwnPropertyDescriptor;if(Nd)try{Nd({},"")}catch{Nd=null}var $S=function(){throw new of},HH=Nd?function(){try{return arguments.callee,$S}catch{try{return Nd(arguments,"callee").get}catch{return $S}}}():$S,ch=RH(),Bl=Object.getPrototypeOf||function(r){return r.__proto__},Ph={},$H=typeof Uint8Array=="undefined"?Nt:Bl(Uint8Array),af={"%AggregateError%":typeof AggregateError=="undefined"?Nt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Nt:ArrayBuffer,"%ArrayIteratorPrototype%":ch?Bl([][Symbol.iterator]()):Nt,"%AsyncFromSyncIteratorPrototype%":Nt,"%AsyncFunction%":Ph,"%AsyncGenerator%":Ph,"%AsyncGeneratorFunction%":Ph,"%AsyncIteratorPrototype%":Ph,"%Atomics%":typeof Atomics=="undefined"?Nt:Atomics,"%BigInt%":typeof BigInt=="undefined"?Nt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Nt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?Nt:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Nt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Nt:FinalizationRegistry,"%Function%":_B,"%GeneratorFunction%":Ph,"%Int8Array%":typeof Int8Array=="undefined"?Nt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Nt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Nt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":ch?Bl(Bl([][Symbol.iterator]())):Nt,"%JSON%":typeof JSON=="object"?JSON:Nt,"%Map%":typeof Map=="undefined"?Nt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!ch?Nt:Bl(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Nt:Promise,"%Proxy%":typeof Proxy=="undefined"?Nt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?Nt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Nt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!ch?Nt:Bl(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Nt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":ch?Bl(""[Symbol.iterator]()):Nt,"%Symbol%":ch?Symbol:Nt,"%SyntaxError%":mm,"%ThrowTypeError%":HH,"%TypedArray%":$H,"%TypeError%":of,"%Uint8Array%":typeof Uint8Array=="undefined"?Nt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Nt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Nt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Nt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?Nt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Nt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Nt:WeakSet},UH=function r(e){var t;if(e==="%AsyncFunction%")t=HS("async function () {}");else if(e==="%GeneratorFunction%")t=HS("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=HS("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=r("%AsyncGenerator%");n&&(t=Bl(n.prototype))}return af[e]=t,t},wR={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Vy=YI,IC=VH,zH=Vy.call(Function.call,Array.prototype.concat),jH=Vy.call(Function.apply,Array.prototype.splice),yR=Vy.call(Function.call,String.prototype.replace),DC=Vy.call(Function.call,String.prototype.slice),qH=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,GH=/\\(\\)?/g,KH=function(e){var t=DC(e,0,1),i=DC(e,-1);if(t==="%"&&i!=="%")throw new mm("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new mm("invalid intrinsic syntax, expected opening `%`");var n=[];return yR(e,qH,function(s,o,a,l){n[n.length]=a?yR(l,GH,"$1"):o||s}),n},YH=function(e,t){var i=e,n;if(IC(wR,i)&&(n=wR[i],i="%"+n[0]+"%"),IC(af,i)){var s=af[i];if(s===Ph&&(s=UH(i)),typeof s=="undefined"&&!t)throw new of("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new mm("intrinsic "+e+" does not exist!")},ZI=function(e,t){if(typeof e!="string"||e.length===0)throw new of("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new of('"allowMissing" argument must be a boolean');var i=KH(e),n=i.length>0?i[0]:"",s=YH("%"+n+"%",t),o=s.name,a=s.value,l=!1,c=s.alias;c&&(n=c[0],jH(i,zH([0,1],c)));for(var d=1,u=!0;d<i.length;d+=1){var h=i[d],f=DC(h,0,1),g=DC(h,-1);if((f==='"'||f==="'"||f==="`"||g==='"'||g==="'"||g==="`")&&f!==g)throw new mm("property names with quotes must have matching quotes");if((h==="constructor"||!u)&&(l=!0),n+="."+h,o="%"+n+"%",IC(af,o))a=af[o];else if(a!=null){if(!(h in a)){if(!t)throw new of("base intrinsic for "+e+" exists, but the property is not available.");return}if(Nd&&d+1>=i.length){var p=Nd(a,h);u=!!p,u&&"get"in p&&!("originalValue"in p.get)?a=p.get:a=a[h]}else u=IC(a,h),a=a[h];u&&!l&&(af[o]=a)}}return a},bB={exports:{}};(function(r){var e=YI,t=ZI,i=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(n,i),o=t("%Object.getOwnPropertyDescriptor%",!0),a=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}r.exports=function(u){var h=s(e,n,arguments);if(o&&a){var f=o(h,"length");f.configurable&&a(h,"length",{value:1+l(0,u.length-(arguments.length-1))})}return h};var c=function(){return s(e,i,arguments)};a?a(r.exports,"apply",{value:c}):r.exports.apply=c})(bB);var vB=ZI,CB=bB.exports,ZH=CB(vB("String.prototype.indexOf")),XH=function(e,t){var i=vB(e,!!t);return typeof i=="function"&&ZH(e,".prototype.")>-1?CB(i):i},QH={},JH=Object.freeze(Object.defineProperty({__proto__:null,default:QH},Symbol.toStringTag,{value:"Module"})),e$=DH(JH),XI=typeof Map=="function"&&Map.prototype,US=Object.getOwnPropertyDescriptor&&XI?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,AC=XI&&US&&typeof US.get=="function"?US.get:null,t$=XI&&Map.prototype.forEach,QI=typeof Set=="function"&&Set.prototype,zS=Object.getOwnPropertyDescriptor&&QI?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,NC=QI&&zS&&typeof zS.get=="function"?zS.get:null,i$=QI&&Set.prototype.forEach,n$=typeof WeakMap=="function"&&WeakMap.prototype,Np=n$?WeakMap.prototype.has:null,r$=typeof WeakSet=="function"&&WeakSet.prototype,Rp=r$?WeakSet.prototype.has:null,s$=typeof WeakRef=="function"&&WeakRef.prototype,SR=s$?WeakRef.prototype.deref:null,o$=Boolean.prototype.valueOf,a$=Object.prototype.toString,l$=Function.prototype.toString,c$=String.prototype.match,JI=String.prototype.slice,Yl=String.prototype.replace,d$=String.prototype.toUpperCase,xR=String.prototype.toLowerCase,wB=RegExp.prototype.test,ER=Array.prototype.concat,Po=Array.prototype.join,u$=Array.prototype.slice,kR=Math.floor,LE=typeof BigInt=="function"?BigInt.prototype.valueOf:null,jS=Object.getOwnPropertySymbols,TE=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Df=typeof Symbol=="function"&&typeof Symbol.iterator=="object",tr=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Df?"object":"symbol")?Symbol.toStringTag:null,yB=Object.prototype.propertyIsEnumerable,LR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function TR(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||wB.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-kR(-r):kR(r);if(i!==r){var n=String(i),s=JI.call(e,n.length+1);return Yl.call(n,t,"$&_")+"."+Yl.call(Yl.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Yl.call(e,t,"$&_")}var qS=e$.custom,GS=qS&&xB(qS)?qS:null,h$=function r(e,t,i,n){var s=t||{};if(Wl(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Wl(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Wl(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Wl(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Wl(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return kB(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?TR(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?TR(e,c):c}var d=typeof s.depth=="undefined"?5:s.depth;if(typeof i=="undefined"&&(i=0),i>=d&&d>0&&typeof e=="object")return IE(e)?"[Array]":"[Object]";var u=A$(s,i);if(typeof n=="undefined")n=[];else if(EB(n,e)>=0)return"[Circular]";function h(j,re,te){if(re&&(n=u$.call(n),n.push(re)),te){var N={depth:s.depth};return Wl(s,"quoteStyle")&&(N.quoteStyle=s.quoteStyle),r(j,N,i+1,n)}return r(j,s,i+1,n)}if(typeof e=="function"){var f=y$(e),g=xb(e,h);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+Po.call(g,", ")+" }":"")}if(xB(e)){var p=Df?Yl.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):TE.call(e);return typeof e=="object"&&!Df?$g(p):p}if(T$(e)){for(var _="<"+xR.call(String(e.nodeName)),v=e.attributes||[],b=0;b<v.length;b++)_+=" "+v[b].name+"="+SB(f$(v[b].value),"double",s);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+xR.call(String(e.nodeName))+">",_}if(IE(e)){if(e.length===0)return"[]";var C=xb(e,h);return u&&!D$(C)?"["+DE(C,u)+"]":"[ "+Po.call(C,", ")+" ]"}if(m$(e)){var y=xb(e,h);return"cause"in e&&!yB.call(e,"cause")?"{ ["+String(e)+"] "+Po.call(ER.call("[cause]: "+h(e.cause),y),", ")+" }":y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Po.call(y,", ")+" }"}if(typeof e=="object"&&o){if(GS&&typeof e[GS]=="function")return e[GS]();if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(S$(e)){var E=[];return t$.call(e,function(j,re){E.push(h(re,e,!0)+" => "+h(j,e))}),IR("Map",AC.call(e),E,u)}if(k$(e)){var S=[];return i$.call(e,function(j){S.push(h(j,e))}),IR("Set",NC.call(e),S,u)}if(x$(e))return KS("WeakMap");if(L$(e))return KS("WeakSet");if(E$(e))return KS("WeakRef");if(b$(e))return $g(h(Number(e)));if(C$(e))return $g(h(LE.call(e)));if(v$(e))return $g(o$.call(e));if(_$(e))return $g(h(String(e)));if(!g$(e)&&!p$(e)){var w=xb(e,h),x=LR?LR(e)===Object.prototype:e instanceof Object||e.constructor===Object,D=e instanceof Object?"":"null prototype",M=!x&&tr&&Object(e)===e&&tr in e?JI.call(Fc(e),8,-1):D?"Object":"",B=x||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",z=B+(M||D?"["+Po.call(ER.call([],M||[],D||[]),": ")+"] ":"");return w.length===0?z+"{}":u?z+"{"+DE(w,u)+"}":z+"{ "+Po.call(w,", ")+" }"}return String(e)};function SB(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function f$(r){return Yl.call(String(r),/"/g,""")}function IE(r){return Fc(r)==="[object Array]"&&(!tr||!(typeof r=="object"&&tr in r))}function g$(r){return Fc(r)==="[object Date]"&&(!tr||!(typeof r=="object"&&tr in r))}function p$(r){return Fc(r)==="[object RegExp]"&&(!tr||!(typeof r=="object"&&tr in r))}function m$(r){return Fc(r)==="[object Error]"&&(!tr||!(typeof r=="object"&&tr in r))}function _$(r){return Fc(r)==="[object String]"&&(!tr||!(typeof r=="object"&&tr in r))}function b$(r){return Fc(r)==="[object Number]"&&(!tr||!(typeof r=="object"&&tr in r))}function v$(r){return Fc(r)==="[object Boolean]"&&(!tr||!(typeof r=="object"&&tr in r))}function xB(r){if(Df)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!TE)return!1;try{return TE.call(r),!0}catch{}return!1}function C$(r){if(!r||typeof r!="object"||!LE)return!1;try{return LE.call(r),!0}catch{}return!1}var w$=Object.prototype.hasOwnProperty||function(r){return r in this};function Wl(r,e){return w$.call(r,e)}function Fc(r){return a$.call(r)}function y$(r){if(r.name)return r.name;var e=c$.call(l$.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function EB(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t;return-1}function S$(r){if(!AC||!r||typeof r!="object")return!1;try{AC.call(r);try{NC.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function x$(r){if(!Np||!r||typeof r!="object")return!1;try{Np.call(r,Np);try{Rp.call(r,Rp)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function E$(r){if(!SR||!r||typeof r!="object")return!1;try{return SR.call(r),!0}catch{}return!1}function k$(r){if(!NC||!r||typeof r!="object")return!1;try{NC.call(r);try{AC.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function L$(r){if(!Rp||!r||typeof r!="object")return!1;try{Rp.call(r,Rp);try{Np.call(r,Np)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function T$(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function kB(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return kB(JI.call(r,0,e.maxStringLength),e)+i}var n=Yl.call(Yl.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,I$);return SB(n,"single",e)}function I$(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+d$.call(e.toString(16))}function $g(r){return"Object("+r+")"}function KS(r){return r+" { ? }"}function IR(r,e,t,i){var n=i?DE(t,i):Po.call(t,", ");return r+" ("+e+") {"+n+"}"}function D$(r){for(var e=0;e<r.length;e++)if(EB(r[e],` +`)>=0)return!1;return!0}function A$(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Po.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Po.call(Array(e+1),t)}}function DE(r,e){if(r.length===0)return"";var t=` +`+e.prev+e.base;return t+Po.call(r,","+t)+` +`+e.prev}function xb(r,e){var t=IE(r),i=[];if(t){i.length=r.length;for(var n=0;n<r.length;n++)i[n]=Wl(r,n)?e(r[n],r):""}var s=typeof jS=="function"?jS(r):[],o;if(Df){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in r)!Wl(r,l)||t&&String(Number(l))===l&&l<r.length||Df&&o["$"+l]instanceof Symbol||(wB.call(/[^\w$]/,l)?i.push(e(l,r)+": "+e(r[l],r)):i.push(l+": "+e(r[l],r)));if(typeof jS=="function")for(var c=0;c<s.length;c++)yB.call(r,s[c])&&i.push("["+e(s[c])+"]: "+e(r[s[c]],r));return i}var eD=ZI,mg=XH,N$=h$,R$=eD("%TypeError%"),Eb=eD("%WeakMap%",!0),kb=eD("%Map%",!0),O$=mg("WeakMap.prototype.get",!0),M$=mg("WeakMap.prototype.set",!0),P$=mg("WeakMap.prototype.has",!0),F$=mg("Map.prototype.get",!0),B$=mg("Map.prototype.set",!0),W$=mg("Map.prototype.has",!0),tD=function(r,e){for(var t=r,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=r.next,r.next=i,i},V$=function(r,e){var t=tD(r,e);return t&&t.value},H$=function(r,e,t){var i=tD(r,e);i?i.value=t:r.next={key:e,next:r.next,value:t}},$$=function(r,e){return!!tD(r,e)},U$=function(){var e,t,i,n={assert:function(s){if(!n.has(s))throw new R$("Side channel does not contain "+N$(s))},get:function(s){if(Eb&&s&&(typeof s=="object"||typeof s=="function")){if(e)return O$(e,s)}else if(kb){if(t)return F$(t,s)}else if(i)return V$(i,s)},has:function(s){if(Eb&&s&&(typeof s=="object"||typeof s=="function")){if(e)return P$(e,s)}else if(kb){if(t)return W$(t,s)}else if(i)return $$(i,s);return!1},set:function(s,o){Eb&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new Eb),M$(e,s,o)):kb?(t||(t=new kb),B$(t,s,o)):(i||(i={key:{},next:null}),H$(i,s,o))}};return n},z$=String.prototype.replace,j$=/%20/g,YS={RFC1738:"RFC1738",RFC3986:"RFC3986"},iD={default:YS.RFC3986,formatters:{RFC1738:function(r){return z$.call(r,j$,"+")},RFC3986:function(r){return String(r)}},RFC1738:YS.RFC1738,RFC3986:YS.RFC3986},q$=iD,ZS=Object.prototype.hasOwnProperty,dd=Array.isArray,So=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),G$=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(dd(i)){for(var n=[],s=0;s<i.length;++s)typeof i[s]!="undefined"&&n.push(i[s]);t.obj[t.prop]=n}}},LB=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]!="undefined"&&(i[n]=e[n]);return i},K$=function r(e,t,i){if(!t)return e;if(typeof t!="object"){if(dd(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!ZS.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return dd(e)&&!dd(t)&&(n=LB(e,i)),dd(e)&&dd(t)?(t.forEach(function(s,o){if(ZS.call(e,o)){var a=e[o];a&&typeof a=="object"&&s&&typeof s=="object"?e[o]=r(a,s,i):e.push(s)}else e[o]=s}),e):Object.keys(t).reduce(function(s,o){var a=t[o];return ZS.call(s,o)?s[o]=r(s[o],a,i):s[o]=a,s},n)},Y$=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},Z$=function(r,e,t){var i=r.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},X$=function(e,t,i,n,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),i==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(d){return"%26%23"+parseInt(d.slice(2),16)+"%3B"});for(var a="",l=0;l<o.length;++l){var c=o.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===q$.RFC1738&&(c===40||c===41)){a+=o.charAt(l);continue}if(c<128){a=a+So[c];continue}if(c<2048){a=a+(So[192|c>>6]+So[128|c&63]);continue}if(c<55296||c>=57344){a=a+(So[224|c>>12]+So[128|c>>6&63]+So[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|o.charCodeAt(l)&1023),a+=So[240|c>>18]+So[128|c>>12&63]+So[128|c>>6&63]+So[128|c&63]}return a},Q$=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var s=t[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var c=a[l],d=o[c];typeof d=="object"&&d!==null&&i.indexOf(d)===-1&&(t.push({obj:o,prop:c}),i.push(d))}return G$(t),e},J$=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},eU=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},tU=function(e,t){return[].concat(e,t)},iU=function(e,t){if(dd(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},TB={arrayToObject:LB,assign:Y$,combine:tU,compact:Q$,decode:Z$,encode:X$,isBuffer:eU,isRegExp:J$,maybeMap:iU,merge:K$},IB=U$,AE=TB,Op=iD,nU=Object.prototype.hasOwnProperty,DR={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},Sd=Array.isArray,rU=String.prototype.split,sU=Array.prototype.push,DB=function(r,e){sU.apply(r,Sd(e)?e:[e])},oU=Date.prototype.toISOString,AR=Op.default,An={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:AE.encode,encodeValuesOnly:!1,format:AR,formatter:Op.formatters[AR],indices:!1,serializeDate:function(e){return oU.call(e)},skipNulls:!1,strictNullHandling:!1},aU=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},XS={},lU=function r(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p){for(var _=e,v=p,b=0,C=!1;(v=v.get(XS))!==void 0&&!C;){var y=v.get(e);if(b+=1,typeof y!="undefined"){if(y===b)throw new RangeError("Cyclic object value");C=!0}typeof v.get(XS)=="undefined"&&(b=0)}if(typeof a=="function"?_=a(t,_):_ instanceof Date?_=d(_):i==="comma"&&Sd(_)&&(_=AE.maybeMap(_,function(L){return L instanceof Date?d(L):L})),_===null){if(n)return o&&!f?o(t,An.encoder,g,"key",u):t;_=""}if(aU(_)||AE.isBuffer(_)){if(o){var E=f?t:o(t,An.encoder,g,"key",u);if(i==="comma"&&f){for(var S=rU.call(String(_),","),w="",x=0;x<S.length;++x)w+=(x===0?"":",")+h(o(S[x],An.encoder,g,"value",u));return[h(E)+"="+w]}return[h(E)+"="+h(o(_,An.encoder,g,"value",u))]}return[h(t)+"="+h(String(_))]}var D=[];if(typeof _=="undefined")return D;var M;if(i==="comma"&&Sd(_))M=[{value:_.length>0?_.join(",")||null:void 0}];else if(Sd(a))M=a;else{var B=Object.keys(_);M=l?B.sort(l):B}for(var z=0;z<M.length;++z){var j=M[z],re=typeof j=="object"&&j.value!==void 0?j.value:_[j];if(!(s&&re===null)){var te=Sd(_)?typeof i=="function"?i(t,j):t:t+(c?"."+j:"["+j+"]");p.set(e,b);var N=IB();N.set(XS,p),DB(D,r(re,te,i,n,s,o,a,l,c,d,u,h,f,g,N))}}return D},cU=function(e){if(!e)return An;if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||An.charset;if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=Op.default;if(typeof e.format!="undefined"){if(!nU.call(Op.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=Op.formatters[i],s=An.filter;return(typeof e.filter=="function"||Sd(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:An.addQueryPrefix,allowDots:typeof e.allowDots=="undefined"?An.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:An.charsetSentinel,delimiter:typeof e.delimiter=="undefined"?An.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:An.encode,encoder:typeof e.encoder=="function"?e.encoder:An.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:An.encodeValuesOnly,filter:s,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:An.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:An.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:An.strictNullHandling}},dU=function(r,e){var t=r,i=cU(e),n,s;typeof i.filter=="function"?(s=i.filter,t=s("",t)):Sd(i.filter)&&(s=i.filter,n=s);var o=[];if(typeof t!="object"||t===null)return"";var a;e&&e.arrayFormat in DR?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=DR[a];n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var c=IB(),d=0;d<n.length;++d){var u=n[d];i.skipNulls&&t[u]===null||DB(o,lU(t[u],u,l,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,c))}var h=o.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),h.length>0?f+h:""},Af=TB,NE=Object.prototype.hasOwnProperty,uU=Array.isArray,Cn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:Af.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},hU=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},AB=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},fU="utf8=%26%2310003%3B",gU="utf8=%E2%9C%93",pU=function(e,t){var i={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,o=n.split(t.delimiter,s),a=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===gU?c="utf-8":o[l]===fU&&(c="iso-8859-1"),a=l,l=o.length);for(l=0;l<o.length;++l)if(l!==a){var d=o[l],u=d.indexOf("]="),h=u===-1?d.indexOf("="):u+1,f,g;h===-1?(f=t.decoder(d,Cn.decoder,c,"key"),g=t.strictNullHandling?null:""):(f=t.decoder(d.slice(0,h),Cn.decoder,c,"key"),g=Af.maybeMap(AB(d.slice(h+1),t),function(p){return t.decoder(p,Cn.decoder,c,"value")})),g&&t.interpretNumericEntities&&c==="iso-8859-1"&&(g=hU(g)),d.indexOf("[]=")>-1&&(g=uU(g)?[g]:g),NE.call(i,f)?i[f]=Af.combine(i[f],g):i[f]=g}return i},mU=function(r,e,t,i){for(var n=i?e:AB(e,t),s=r.length-1;s>=0;--s){var o,a=r[s];if(a==="[]"&&t.parseArrays)o=[].concat(n);else{o=t.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!t.parseArrays&&l===""?o={0:n}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=n):o[l]=n}n=o}return n},_U=function(e,t,i,n){if(!!e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&o.exec(s),c=l?s.slice(0,l.index):s,d=[];if(c){if(!i.plainObjects&&NE.call(Object.prototype,c)&&!i.allowPrototypes)return;d.push(c)}for(var u=0;i.depth>0&&(l=a.exec(s))!==null&&u<i.depth;){if(u+=1,!i.plainObjects&&NE.call(Object.prototype,l[1].slice(1,-1))&&!i.allowPrototypes)return;d.push(l[1])}return l&&d.push("["+s.slice(l.index)+"]"),mU(d,t,i,n)}},bU=function(e){if(!e)return Cn;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset=="undefined"?Cn.charset:e.charset;return{allowDots:typeof e.allowDots=="undefined"?Cn.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:Cn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:Cn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:Cn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Cn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:Cn.comma,decoder:typeof e.decoder=="function"?e.decoder:Cn.decoder,delimiter:typeof e.delimiter=="string"||Af.isRegExp(e.delimiter)?e.delimiter:Cn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:Cn.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:Cn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:Cn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:Cn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Cn.strictNullHandling}},vU=function(r,e){var t=bU(e);if(r===""||r===null||typeof r=="undefined")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?pU(r,t):r,n=t.plainObjects?Object.create(null):{},s=Object.keys(i),o=0;o<s.length;++o){var a=s[o],l=_U(a,i[a],t,typeof r=="string");n=Af.merge(n,l,t)}return t.allowSparse===!0?n:Af.compact(n)},CU=dU,wU=vU,yU=iD,jSe={formats:yU,parse:wU,stringify:CU};const SU={"{0} ({1})":0,input:1,"Match Case":2,"Match Whole Word":3,"Use Regular Expression":4,"Preserve Case":5,"Loading...":6,"Error: {0}":7,"Warning: {0}":8,"Info: {0}":9,"for history":10,Unbound:11,Clear:12,"Disable Filter on Type":13,"Enable Filter on Type":14,"No elements found":15,"Matched {0} out of {1} elements":16,"(empty)":17,"{0}: {1}":18,"A system error occurred ({0})":19,"An unknown error occurred. Please consult the log for more details.":20,"{0} ({1} errors in total)":21,Ctrl:22,Shift:23,Alt:24,Windows:25,Super:26,Control:27,Command:28,Back:29,"Press 'Enter' to confirm your input or 'Escape' to cancel":30,"{0}/{1}":31,"Type to narrow down results.":32,"{0} Results":33,"{0} Selected":34,OK:35,Custom:36,"Back ({0})":37,"Quick Input":38,"Stick to the end even when going to longer lines":39,"Removed secondary cursors":40,editor:41,"The editor is not accessible at this time. Press {0} for options.":42,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'":43,"&&Undo":44,Undo:45,"&&Redo":46,Redo:47,"&&Select All":48,"Select All":49,"The number of cursors has been limited to {0}.":50,"Line decoration for inserts in the diff editor.":51,"Line decoration for removals in the diff editor.":52,"Cannot compare files because one file is too large.":53,"Icon for 'Insert' in diff review.":54,"Icon for 'Remove' in diff review.":55,"Icon for 'Close' in diff review.":56,Close:57,"no lines changed":58,"1 line changed":59,"{0} lines changed":60,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}":61,blank:62,"{0} unchanged line {1}":63,"{0} original line {1} modified line {2}":64,"+ {0} modified line {1}":65,"- {0} original line {1}":66,"Go to Next Difference":67,"Go to Previous Difference":68,"Copy deleted lines":69,"Copy deleted line":70,"Copy deleted line ({0})":71,"Revert this change":72,Editor:73,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.":74,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.":75,"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.":76,"Remove trailing auto inserted whitespace.":77,"Special handling for large files to disable certain memory intensive features.":78,"Controls whether completions should be computed based on words in the document.":79,"Only suggest words from the active document.":80,"Suggest words from all open documents of the same language.":81,"Suggest words from all open documents.":82,"Controls from which documents word based completions are computed.":83,"Semantic highlighting enabled for all color themes.":84,"Semantic highlighting disabled for all color themes.":85,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.":86,"Controls whether the semanticHighlighting is shown for the languages that support it.":87,"Keep peek editors open even when double clicking their content or when hitting `Escape`.":88,"Lines above this length will not be tokenized for performance reasons":89,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.":90,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.":91,"Controls whether the diff editor shows the diff side by side or inline.":92,"When enabled, the diff editor ignores changes in leading or trailing whitespace.":93,"Controls whether the diff editor shows +/- indicators for added/removed changes.":94,"Controls whether the editor shows CodeLens.":95,"Lines will never wrap.":96,"Lines will wrap at the viewport width.":97,"Lines will wrap according to the `#editor.wordWrap#` setting.":98,"The editor will use platform APIs to detect when a Screen Reader is attached.":99,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled.":100,"The editor will never be optimized for usage with a Screen Reader.":101,"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.":102,"Controls whether a space character is inserted when commenting.":103,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.":104,"Controls whether copying without a selection copies the current line.":105,"Controls whether the cursor should jump to find matches while typing.":106,"Never seed search string from the editor selection.":107,"Always seed search string from the editor selection, including word at cursor position.":108,"Only seed search string from the editor selection.":109,"Controls whether the search string in the Find Widget is seeded from the editor selection.":110,"Never turn on Find in Selection automatically (default).":111,"Always turn on Find in Selection automatically.":112,"Turn on Find in Selection automatically when multiple lines of content are selected.":113,"Controls the condition for turning on Find in Selection automatically.":114,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.":115,"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.":116,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.":117,"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.":118,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.":119,"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.":120,"Controls the font size in pixels.":121,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.':122,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.':123,"Show peek view of the results (default)":124,"Go to the primary result and show a peek view":125,"Go to the primary result and enable peek-less navigation to others":126,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.":127,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.":128,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.":129,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.":130,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.":131,"Controls the behavior the 'Go to References'-command when multiple target locations exist.":132,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.":133,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.":134,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.":135,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.":136,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.":137,"Controls whether the hover is shown.":138,"Controls the delay in milliseconds after which the hover is shown.":139,"Controls whether the hover should remain visible when mouse is moved over it.":140,"Enables the code action lightbulb in the editor.":141,"Enables the inlay hints in the editor.":142,"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.":143,"Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.":144,"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.":145,"Controls whether the minimap is shown.":146,"The minimap has the same size as the editor contents (and might scroll).":147,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).":148,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).":149,"Controls the size of the minimap.":150,"Controls the side where to render the minimap.":151,"Controls when the minimap slider is shown.":152,"Scale of content drawn in the minimap: 1, 2 or 3.":153,"Render the actual characters on a line as opposed to color blocks.":154,"Limit the width of the minimap to render at most a certain number of columns.":155,"Controls the amount of space between the top edge of the editor and the first line.":156,"Controls the amount of space between the bottom edge of the editor and the last line.":157,"Enables a pop-up that shows parameter documentation and type information as you type.":158,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.":159,"Enable quick suggestions inside strings.":160,"Enable quick suggestions inside comments.":161,"Enable quick suggestions outside of strings and comments.":162,"Controls whether suggestions should automatically show up while typing.":163,"Line numbers are not rendered.":164,"Line numbers are rendered as absolute number.":165,"Line numbers are rendered as distance in lines to cursor position.":166,"Line numbers are rendered every 10 lines.":167,"Controls the display of line numbers.":168,"Number of monospace characters at which this editor ruler will render.":169,"Color of this editor ruler.":170,"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.":171,"The vertical scrollbar will be visible only when necessary.":172,"The vertical scrollbar will always be visible.":173,"The vertical scrollbar will always be hidden.":174,"Controls the visibility of the vertical scrollbar.":175,"The horizontal scrollbar will be visible only when necessary.":176,"The horizontal scrollbar will always be visible.":177,"The horizontal scrollbar will always be hidden.":178,"Controls the visibility of the horizontal scrollbar.":179,"The width of the vertical scrollbar.":180,"The height of the horizontal scrollbar.":181,"Controls whether clicks scroll by page or jump to click position.":182,"Controls whether to automatically show inline suggestions in the editor.":183,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.":184,"Controls whether bracket pair guides are enabled or not.":185,"Controls whether the editor should render indent guides.":186,"Controls whether the editor should highlight the active indent guide.":187,"Insert suggestion without overwriting text right of the cursor.":188,"Insert suggestion and overwrite text right of the cursor.":189,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.":190,"Controls whether filtering and sorting suggestions accounts for small typos.":191,"Controls whether sorting favors words that appear close to the cursor.":192,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).":193,"Controls whether an active snippet prevents quick suggestions.":194,"Controls whether to show or hide icons in suggestions.":195,"Controls the visibility of the status bar at the bottom of the suggest widget.":196,"Controls whether to preview the suggestion outcome in the editor.":197,"Controls whether suggest details show inline with the label or only in the details widget":198,"This setting is deprecated. The suggest widget can now be resized.":199,"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.":200,"When enabled IntelliSense shows `method`-suggestions.":201,"When enabled IntelliSense shows `function`-suggestions.":202,"When enabled IntelliSense shows `constructor`-suggestions.":203,"When enabled IntelliSense shows `deprecated`-suggestions.":204,"When enabled IntelliSense shows `field`-suggestions.":205,"When enabled IntelliSense shows `variable`-suggestions.":206,"When enabled IntelliSense shows `class`-suggestions.":207,"When enabled IntelliSense shows `struct`-suggestions.":208,"When enabled IntelliSense shows `interface`-suggestions.":209,"When enabled IntelliSense shows `module`-suggestions.":210,"When enabled IntelliSense shows `property`-suggestions.":211,"When enabled IntelliSense shows `event`-suggestions.":212,"When enabled IntelliSense shows `operator`-suggestions.":213,"When enabled IntelliSense shows `unit`-suggestions.":214,"When enabled IntelliSense shows `value`-suggestions.":215,"When enabled IntelliSense shows `constant`-suggestions.":216,"When enabled IntelliSense shows `enum`-suggestions.":217,"When enabled IntelliSense shows `enumMember`-suggestions.":218,"When enabled IntelliSense shows `keyword`-suggestions.":219,"When enabled IntelliSense shows `text`-suggestions.":220,"When enabled IntelliSense shows `color`-suggestions.":221,"When enabled IntelliSense shows `file`-suggestions.":222,"When enabled IntelliSense shows `reference`-suggestions.":223,"When enabled IntelliSense shows `customcolor`-suggestions.":224,"When enabled IntelliSense shows `folder`-suggestions.":225,"When enabled IntelliSense shows `typeParameter`-suggestions.":226,"When enabled IntelliSense shows `snippet`-suggestions.":227,"When enabled IntelliSense shows `user`-suggestions.":228,"When enabled IntelliSense shows `issues`-suggestions.":229,"Whether leading and trailing whitespace should always be selected.":230,"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.":231,"Only accept a suggestion with `Enter` when it makes a textual change.":232,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.":233,"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.":234,"Editor content":235,"Use language configurations to determine when to autoclose brackets.":236,"Autoclose brackets only when the cursor is to the left of whitespace.":237,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.":238,"Remove adjacent closing quotes or brackets only if they were automatically inserted.":239,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.":240,"Type over closing quotes or brackets only if they were automatically inserted.":241,"Controls whether the editor should type over closing quotes or brackets.":242,"Use language configurations to determine when to autoclose quotes.":243,"Autoclose quotes only when the cursor is to the left of whitespace.":244,"Controls whether the editor should automatically close quotes after the user adds an opening quote.":245,"The editor will not insert indentation automatically.":246,"The editor will keep the current line's indentation.":247,"The editor will keep the current line's indentation and honor language defined brackets.":248,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages.":249,"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.":250,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.":251,"Use language configurations to determine when to automatically surround selections.":252,"Surround with quotes but not brackets.":253,"Surround with brackets but not quotes.":254,"Controls whether the editor should automatically surround selections when typing quotes or brackets.":255,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.":256,"Controls the font family for CodeLens.":257,"Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.":258,"Controls whether the editor should render the inline color decorators and color picker.":259,"Enable that the selection with the mouse and keys is doing column selection.":260,"Controls whether syntax highlighting should be copied into the clipboard.":261,"Control the cursor animation style.":262,"Controls whether the smooth caret animation should be enabled.":263,"Controls the cursor style.":264,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.":265,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.":266,"`cursorSurroundingLines` is enforced always.":267,"Controls when `cursorSurroundingLines` should be enforced.":268,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.":269,"Controls whether the editor should allow moving selections via drag and drop.":270,"Scrolling speed multiplier when pressing `Alt`.":271,"Controls whether the editor has code folding enabled.":272,"Use a language-specific folding strategy if available, else the indentation-based one.":273,"Use the indentation-based folding strategy.":274,"Controls the strategy for computing folding ranges.":275,"Controls whether the editor should highlight folded ranges.":276,"Controls whether the editor automatically collapses import ranges.":277,"Controls whether clicking on the empty content after a folded line will unfold the line.":278,"Controls the font family.":279,"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.":280,"Controls whether the editor should automatically format the line after typing.":281,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.":282,"Controls whether the cursor should be hidden in the overview ruler.":283,"Controls the letter spacing in pixels.":284,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.":285,"Controls whether the editor should detect links and make them clickable.":286,"Highlight matching brackets.":287,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.":288,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.":289,"Merge multiple cursors when they are overlapping.":290,"Maps to `Control` on Windows and Linux and to `Command` on macOS.":291,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.":292,"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).":293,"Each cursor pastes a single line of the text.":294,"Each cursor pastes the full text.":295,"Controls pasting when the line count of the pasted text matches the cursor count.":296,"Controls whether the editor should highlight semantic symbol occurrences.":297,"Controls whether a border should be drawn around the overview ruler.":298,"Focus the tree when opening peek":299,"Focus the editor when opening peek":300,"Controls whether to focus the inline editor or the tree in the peek widget.":301,"Controls whether the Go to Definition mouse gesture always opens the peek widget.":302,"Controls the delay in milliseconds after which quick suggestions will show up.":303,"Controls whether the editor auto renames on type.":304,"Deprecated, use `editor.linkedEditing` instead.":305,"Controls whether the editor should render control characters.":306,"Render last line number when the file ends with a newline.":307,"Highlights both the gutter and the current line.":308,"Controls how the editor should render the current line highlight.":309,"Controls if the editor should render the current line highlight only when the editor is focused.":310,"Render whitespace characters except for single spaces between words.":311,"Render whitespace characters only on selected text.":312,"Render only trailing whitespace characters.":313,"Controls how the editor should render whitespace characters.":314,"Controls whether selections should have rounded corners.":315,"Controls the number of extra characters beyond which the editor will scroll horizontally.":316,"Controls whether the editor will scroll beyond the last line.":317,"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.":318,"Controls whether the Linux primary clipboard should be supported.":319,"Controls whether the editor should highlight matches similar to the selection.":320,"Always show the folding controls.":321,"Only show the folding controls when the mouse is over the gutter.":322,"Controls when the folding controls on the gutter are shown.":323,"Controls fading out of unused code.":324,"Controls strikethrough deprecated variables.":325,"Show snippet suggestions on top of other suggestions.":326,"Show snippet suggestions below other suggestions.":327,"Show snippets suggestions with other suggestions.":328,"Do not show snippet suggestions.":329,"Controls whether snippets are shown with other suggestions and how they are sorted.":330,"Controls whether the editor will scroll using an animation.":331,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.":332,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.":333,"Controls whether suggestions should automatically show up when typing trigger characters.":334,"Always select the first suggestion.":335,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.":336,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.":337,"Controls how suggestions are pre-selected when showing the suggest list.":338,"Tab complete will insert the best matching suggestion when pressing tab.":339,"Disable tab completions.":340,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.":341,"Enables tab completions.":342,"Unusual line terminators are automatically removed.":343,"Unusual line terminators are ignored.":344,"Unusual line terminators prompt to be removed.":345,"Remove unusual line terminators that might cause problems.":346,"Inserting and deleting whitespace follows tab stops.":347,"Characters that will be used as word separators when doing word related navigations or operations.":348,"Lines will wrap at `#editor.wordWrapColumn#`.":349,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.":350,"Controls how lines should wrap.":351,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.":352,"No indentation. Wrapped lines begin at column 1.":353,"Wrapped lines get the same indentation as the parent.":354,"Wrapped lines get +1 indentation toward the parent.":355,"Wrapped lines get +2 indentation toward the parent.":356,"Controls the indentation of wrapped lines.":357,"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.":358,"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.":359,"Controls the algorithm that computes wrapping points.":360,"Whether the editor text has focus (cursor is blinking)":361,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)":362,"Whether an editor or a rich text input has focus (cursor is blinking)":363,"Whether the editor is read only":364,"Whether the context is a diff editor":365,"Whether `editor.columnSelection` is enabled":366,"Whether the editor has text selected":367,"Whether the editor has multiple selections":368,"Whether `Tab` will move focus out of the editor":369,"Whether the editor hover is visible":370,"Whether the editor is part of a larger editor (e.g. notebooks)":371,"The language identifier of the editor":372,"Whether the editor has a completion item provider":373,"Whether the editor has a code actions provider":374,"Whether the editor has a code lens provider":375,"Whether the editor has a definition provider":376,"Whether the editor has a declaration provider":377,"Whether the editor has an implementation provider":378,"Whether the editor has a type definition provider":379,"Whether the editor has a hover provider":380,"Whether the editor has a document highlight provider":381,"Whether the editor has a document symbol provider":382,"Whether the editor has a reference provider":383,"Whether the editor has a rename provider":384,"Whether the editor has a signature help provider":385,"Whether the editor has an inline hints provider":386,"Whether the editor has a document formatting provider":387,"Whether the editor has a document selection formatting provider":388,"Whether the editor has multiple document formatting providers":389,"Whether the editor has multiple document selection formatting providers":390,Typing:391,"Plain Text":392,"No selection":393,"Line {0}, Column {1} ({2} selected)":394,"Line {0}, Column {1}":395,"{0} selections ({1} characters selected)":396,"{0} selections":397,"Now changing the setting `accessibilitySupport` to 'on'.":398,"Now opening the Editor Accessibility documentation page.":399," in a read-only pane of a diff editor.":400," in a pane of a diff editor.":401," in a read-only code editor":402," in a code editor":403,"To configure the editor to be optimized for usage with a Screen Reader press Command+E now.":404,"To configure the editor to be optimized for usage with a Screen Reader press Control+E now.":405,"The editor is configured to be optimized for usage with a Screen Reader.":406,"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.":407,"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.":408,"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.":409,"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.":410,"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.":411,"Press Command+H now to open a browser window with more information related to editor accessibility.":412,"Press Control+H now to open a browser window with more information related to editor accessibility.":413,"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.":414,"Show Accessibility Help":415,"Developer: Inspect Tokens":416,"Go to Line/Column...":417,"Show all Quick Access Providers":418,"Command Palette":419,"Show And Run Commands":420,"Go to Symbol...":421,"Go to Symbol by Category...":422,"Press Alt+F1 for Accessibility Options.":423,"Toggle High Contrast Theme":424,"Made {0} edits in {1} files":425,"Background color for the highlight of line at the cursor position.":426,"Background color for the border around the line at the cursor position.":427,"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.":428,"Background color of the border around highlighted ranges.":429,"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.":430,"Background color of the border around highlighted symbols.":431,"Color of the editor cursor.":432,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.":433,"Color of whitespace characters in the editor.":434,"Color of the editor indentation guides.":435,"Color of the active editor indentation guides.":436,"Color of editor line numbers.":437,"Color of editor active line number":438,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.":439,"Color of the editor rulers.":440,"Foreground color of editor CodeLens":441,"Background color behind matching brackets":442,"Color for matching brackets boxes":443,"Color of the overview ruler border.":444,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.":445,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.":446,"Border color of unnecessary (unused) source code in the editor.":447,"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.":448,"Border color of ghost text in the editor.":449,"Foreground color of the ghost text in the editor.":450,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.":451,"Overview ruler marker color for errors.":452,"Overview ruler marker color for warnings.":453,"Overview ruler marker color for infos.":454,"Foreground color of brackets (1). Requires enabling bracket pair colorization.":455,"Foreground color of brackets (2). Requires enabling bracket pair colorization.":456,"Foreground color of brackets (3). Requires enabling bracket pair colorization.":457,"Foreground color of brackets (4). Requires enabling bracket pair colorization.":458,"Foreground color of brackets (5). Requires enabling bracket pair colorization.":459,"Foreground color of brackets (6). Requires enabling bracket pair colorization.":460,"Foreground color of unexpected brackets.":461,"Selection Anchor":462,"Anchor set at {0}:{1}":463,"Set Selection Anchor":464,"Go to Selection Anchor":465,"Select from Anchor to Cursor":466,"Cancel Selection Anchor":467,"Overview ruler marker color for matching brackets.":468,"Go to Bracket":469,"Select to Bracket":470,"Go to &&Bracket":471,"Move Selected Text Left":472,"Move Selected Text Right":473,"Transpose Letters":474,"Cu&&t":475,Cut:476,"&&Copy":477,Copy:478,"Copy As":479,"&&Paste":480,Paste:481,"Copy With Syntax Highlighting":482,"Kind of the code action to run.":483,"Controls when the returned actions are applied.":484,"Always apply the first returned code action.":485,"Apply the first returned code action if it is the only one.":486,"Do not apply the returned code actions.":487,"Controls if only preferred code actions should be returned.":488,"An unknown error occurred while applying the code action":489,"Quick Fix...":490,"No code actions available":491,"No preferred code actions for '{0}' available":492,"No code actions for '{0}' available":493,"No preferred code actions available":494,"Refactor...":495,"No preferred refactorings for '{0}' available":496,"No refactorings for '{0}' available":497,"No preferred refactorings available":498,"No refactorings available":499,"Source Action...":500,"No preferred source actions for '{0}' available":501,"No source actions for '{0}' available":502,"No preferred source actions available":503,"No source actions available":504,"Organize Imports":505,"No organize imports action available":506,"Fix All":507,"No fix all action available":508,"Auto Fix...":509,"No auto fixes available":510,"Show Code Actions. Preferred Quick Fix Available ({0})":511,"Show Code Actions ({0})":512,"Show Code Actions":513,"Show CodeLens Commands For Current Line":514,"Toggle Line Comment":515,"&&Toggle Line Comment":516,"Add Line Comment":517,"Remove Line Comment":518,"Toggle Block Comment":519,"Toggle &&Block Comment":520,"Show Editor Context Menu":521,"Cursor Undo":522,"Cursor Redo":523,Find:524,"&&Find":525,"Find With Selection":526,"Find Next":527,"Find Previous":528,"Find Next Selection":529,"Find Previous Selection":530,Replace:531,"&&Replace":532,"Icon for 'Find in Selection' in the editor find widget.":533,"Icon to indicate that the editor find widget is collapsed.":534,"Icon to indicate that the editor find widget is expanded.":535,"Icon for 'Replace' in the editor find widget.":536,"Icon for 'Replace All' in the editor find widget.":537,"Icon for 'Find Previous' in the editor find widget.":538,"Icon for 'Find Next' in the editor find widget.":539,"Previous Match":540,"Next Match":541,"Find in Selection":542,"Replace All":543,"Toggle Replace":544,"Only the first {0} results are highlighted, but all find operations work on the entire text.":545,"{0} of {1}":546,"No results":547,"{0} found":548,"{0} found for '{1}'":549,"{0} found for '{1}', at {2}":550,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.":551,Unfold:552,"Unfold Recursively":553,Fold:554,"Toggle Fold":555,"Fold Recursively":556,"Fold All Block Comments":557,"Fold All Regions":558,"Unfold All Regions":559,"Fold All Regions Except Selected":560,"Unfold All Regions Except Selected":561,"Fold All":562,"Unfold All":563,"Go to Parent Fold":564,"Go to Previous Folding Range":565,"Go to Next Folding Range":566,"Fold Level {0}":567,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.":568,"Color of the folding control in the editor gutter.":569,"Icon for expanded ranges in the editor glyph margin.":570,"Icon for collapsed ranges in the editor glyph margin.":571,"Editor Font Zoom In":572,"Editor Font Zoom Out":573,"Editor Font Zoom Reset":574,"Made 1 formatting edit on line {0}":575,"Made {0} formatting edits on line {1}":576,"Made 1 formatting edit between lines {0} and {1}":577,"Made {0} formatting edits between lines {1} and {2}":578,"Format Document":579,"Format Selection":580,"Go to Next Problem (Error, Warning, Info)":581,"Icon for goto next marker.":582,"Go to Previous Problem (Error, Warning, Info)":583,"Icon for goto previous marker.":584,"Go to Next Problem in Files (Error, Warning, Info)":585,"Next &&Problem":586,"Go to Previous Problem in Files (Error, Warning, Info)":587,"Previous &&Problem":588,Error:589,Warning:590,Info:591,Hint:592,"{0} at {1}. ":593,"{0} of {1} problems":594,"{0} of {1} problem":595,"Editor marker navigation widget error color.":596,"Editor marker navigation widget error heading background.":597,"Editor marker navigation widget warning color.":598,"Editor marker navigation widget warning heading background.":599,"Editor marker navigation widget info color.":600,"Editor marker navigation widget info heading background.":601,"Editor marker navigation widget background.":602,Peek:603,Definitions:604,"No definition found for '{0}'":605,"No definition found":606,"Go to Definition":607,"Open Definition to the Side":608,"Peek Definition":609,Declarations:610,"No declaration found for '{0}'":611,"No declaration found":612,"Go to Declaration":613,"Peek Declaration":614,"Type Definitions":615,"No type definition found for '{0}'":616,"No type definition found":617,"Go to Type Definition":618,"Peek Type Definition":619,Implementations:620,"No implementation found for '{0}'":621,"No implementation found":622,"Go to Implementations":623,"Peek Implementations":624,"No references found for '{0}'":625,"No references found":626,"Go to References":627,References:628,"Peek References":629,"Go To Any Symbol":630,Locations:631,"No results for '{0}'":632,"Go to &&Definition":633,"Go to &&Declaration":634,"Go to &&Type Definition":635,"Go to &&Implementations":636,"Go to &&References":637,"Click to show {0} definitions.":638,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'":639,"{0} references":640,"{0} reference":641,"no preview available":642,"symbol in {0} on line {1} at column {2}":643,"symbol in {0} on line {1} at column {2}, {3}":644,"1 symbol in {0}, full path {1}":645,"{0} symbols in {1}, full path {2}":646,"No results found":647,"Found 1 symbol in {0}":648,"Found {0} symbols in {1}":649,"Found {0} symbols in {1} files":650,"Whether there are symbol locations that can be navigated via keyboard-only.":651,"Symbol {0} of {1}, {2} for next":652,"Symbol {0} of {1}":653,"Show Hover":654,"Show Definition Preview Hover":655,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.":656,"View Problem":657,"No quick fixes available":658,"Checking for quick fixes...":659,"Replace with Previous Value":660,"Replace with Next Value":661,"Convert Indentation to Spaces":662,"Convert Indentation to Tabs":663,"Configured Tab Size":664,"Select Tab Size for Current File":665,"Indent Using Tabs":666,"Indent Using Spaces":667,"Detect Indentation from Content":668,"Reindent Lines":669,"Reindent Selected Lines":670,"Whether an inline suggestion is visible":671,"Whether the inline suggestion starts with whitespace":672,"Show Next Inline Suggestion":673,"Show Previous Inline Suggestion":674,"Trigger Inline Suggestion":675,Next:676,Previous:677,Accept:678,"Suggestion:":679,"Copy Line Up":680,"&&Copy Line Up":681,"Copy Line Down":682,"Co&&py Line Down":683,"Duplicate Selection":684,"&&Duplicate Selection":685,"Move Line Up":686,"Mo&&ve Line Up":687,"Move Line Down":688,"Move &&Line Down":689,"Sort Lines Ascending":690,"Sort Lines Descending":691,"Trim Trailing Whitespace":692,"Delete Line":693,"Indent Line":694,"Outdent Line":695,"Insert Line Above":696,"Insert Line Below":697,"Delete All Left":698,"Delete All Right":699,"Join Lines":700,"Transpose characters around the cursor":701,"Transform to Uppercase":702,"Transform to Lowercase":703,"Transform to Title Case":704,"Transform to Snake Case":705,"Start Linked Editing":706,"Background color when the editor auto renames on type.":707,"Execute command":708,"Follow link":709,"cmd + click":710,"ctrl + click":711,"option + click":712,"alt + click":713,"Execute command {0}":714,"Failed to open this link because it is not well-formed: {0}":715,"Failed to open this link because its target is missing.":716,"Open Link":717,"Whether the editor is currently showing an inline message":718,"Cannot edit in read-only editor":719,"Cursor added: {0}":720,"Cursors added: {0}":721,"Add Cursor Above":722,"&&Add Cursor Above":723,"Add Cursor Below":724,"A&&dd Cursor Below":725,"Add Cursors to Line Ends":726,"Add C&&ursors to Line Ends":727,"Add Cursors To Bottom":728,"Add Cursors To Top":729,"Add Selection To Next Find Match":730,"Add &&Next Occurrence":731,"Add Selection To Previous Find Match":732,"Add P&&revious Occurrence":733,"Move Last Selection To Next Find Match":734,"Move Last Selection To Previous Find Match":735,"Select All Occurrences of Find Match":736,"Select All &&Occurrences":737,"Change All Occurrences":738,"Trigger Parameter Hints":739,"Icon for show next parameter hint.":740,"Icon for show previous parameter hint.":741,"{0}, hint":742,"Whether the current code editor is embedded inside peek":743,"Background color of the peek view title area.":744,"Color of the peek view title.":745,"Color of the peek view title info.":746,"Color of the peek view borders and arrow.":747,"Background color of the peek view result list.":748,"Foreground color for line nodes in the peek view result list.":749,"Foreground color for file nodes in the peek view result list.":750,"Background color of the selected entry in the peek view result list.":751,"Foreground color of the selected entry in the peek view result list.":752,"Background color of the peek view editor.":753,"Background color of the gutter in the peek view editor.":754,"Match highlight color in the peek view result list.":755,"Match highlight color in the peek view editor.":756,"Match highlight border in the peek view editor.":757,"Open a text editor first to go to a line.":758,"Go to line {0} and character {1}.":759,"Go to line {0}.":760,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.":761,"Current Line: {0}, Character: {1}. Type a line number to navigate to.":762,"To go to a symbol, first open a text editor with symbol information.":763,"The active text editor does not provide symbol information.":764,"No matching editor symbols":765,"No editor symbols":766,"Open to the Side":767,"Open to the Bottom":768,"symbols ({0})":769,"properties ({0})":770,"methods ({0})":771,"functions ({0})":772,"constructors ({0})":773,"variables ({0})":774,"classes ({0})":775,"structs ({0})":776,"events ({0})":777,"operators ({0})":778,"interfaces ({0})":779,"namespaces ({0})":780,"packages ({0})":781,"type parameters ({0})":782,"modules ({0})":783,"enumerations ({0})":784,"enumeration members ({0})":785,"strings ({0})":786,"files ({0})":787,"arrays ({0})":788,"numbers ({0})":789,"booleans ({0})":790,"objects ({0})":791,"keys ({0})":792,"fields ({0})":793,"constants ({0})":794,"No result.":795,"An unknown error occurred while resolving rename location":796,"Renaming '{0}'":797,"Renaming {0}":798,"Successfully renamed '{0}' to '{1}'. Summary: {2}":799,"Rename failed to apply edits":800,"Rename failed to compute edits":801,"Rename Symbol":802,"Enable/disable the ability to preview changes before renaming":803,"Whether the rename input widget is visible":804,"Rename input. Type new name and press Enter to commit.":805,"{0} to Rename, {1} to Preview":806,"Expand Selection":807,"&&Expand Selection":808,"Shrink Selection":809,"&&Shrink Selection":810,"Whether the editor in current in snippet mode":811,"Whether there is a next tab stop when in snippet mode":812,"Whether there is a previous tab stop when in snippet mode":813,Sunday:814,Monday:815,Tuesday:816,Wednesday:817,Thursday:818,Friday:819,Saturday:820,Sun:821,Mon:822,Tue:823,Wed:824,Thu:825,Fri:826,Sat:827,January:828,February:829,March:830,April:831,May:832,June:833,July:834,August:835,September:836,October:837,November:838,December:839,Jan:840,Feb:841,Mar:842,Apr:843,Jun:844,Jul:845,Aug:846,Sep:847,Oct:848,Nov:849,Dec:850,"Whether suggestion are visible":851,"Whether suggestion details are visible":852,"Whether there are multiple suggestions to pick from":853,"Whether inserting the current suggestion yields in a change or has everything already been typed":854,"Whether suggestions are inserted when pressing Enter":855,"Whether the current suggestion has insert and replace behaviour":856,"Whether the default behaviour is to insert or replace":857,"Whether the current suggestion supports to resolve further details":858,"Accepting '{0}' made {1} additional edits":859,"Trigger Suggest":860,Insert:861,"show less":862,"show more":863,"Reset Suggest Widget Size":864,"Background color of the suggest widget.":865,"Border color of the suggest widget.":866,"Foreground color of the suggest widget.":867,"Foreground color of the selected entry in the suggest widget.":868,"Icon foreground color of the selected entry in the suggest widget.":869,"Background color of the selected entry in the suggest widget.":870,"Color of the match highlights in the suggest widget.":871,"Color of the match highlights in the suggest widget when an item is focused.":872,"No suggestions.":873,"{0}, docs: {1}":874,Suggest:875,"Icon for more information in the suggest widget.":876,"Read More":877,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":878,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":879,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":880,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":881,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":882,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":883,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":884,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":885,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":886,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":887,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":888,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":889,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":890,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":891,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":892,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":893,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":894,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":895,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":896,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":897,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":898,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":899,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":900,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":901,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":902,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":903,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":904,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":905,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":906,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":907,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":908,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":909,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":910,"Toggle Tab Key Moves Focus":911,"Pressing Tab will now move focus to the next focusable element":912,"Pressing Tab will now insert the tab character":913,"Developer: Force Retokenize":914,"Unusual Line Terminators":915,"Detected unusual line terminators":916,"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`.":917,"Remove Unusual Line Terminators":918,Ignore:919,"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.":920,"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.":921,"Border color of a symbol during read-access, like reading a variable.":922,"Border color of a symbol during write-access, like writing to a variable.":923,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.":924,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.":925,"Go to Next Symbol Highlight":926,"Go to Previous Symbol Highlight":927,"Trigger Symbol Highlight":928,"Delete Word":929,"Default Language Configuration Overrides":930,"Configure editor settings to be overridden for a language.":931,"This setting does not support per-language configuration.":932,"Cannot register an empty property":933,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.":934,"Cannot register '{0}'. This property is already registered.":935,"A command that returns information about context keys":936,"Whether the operating system is Windows":937,"({0}) was pressed. Waiting for second key of chord...":938,"The key combination ({0}, {1}) is not a command.":939,Workbench:940,"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.":941,"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.":942,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.":943,"Controls tree indentation in pixels.":944,"Controls whether the tree should render indent guides.":945,"Controls whether lists and trees have smooth scrolling.":946,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes.":947,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements.":948,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.":949,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.":950,"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.":951,"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.":952,"{0}, {1}":953,"recently used":954,"other commands":955,"Command '{0}' resulted in an error ({1})":956,"global commands":957,"editor commands":958,"Overall foreground color. This color is only used if not overridden by a component.":959,"Overall foreground color for error messages. This color is only used if not overridden by a component.":960,"The default color for icons in the workbench.":961,"Overall border color for focused elements. This color is only used if not overridden by a component.":962,"An extra border around elements to separate them from others for greater contrast.":963,"An extra border around active elements to separate them from others for greater contrast.":964,"Foreground color for links in text.":965,"Foreground color for links in text when clicked on and on mouse hover.":966,"Background color for code blocks in text.":967,"Shadow color of widgets such as find/replace inside the editor.":968,"Input box background.":969,"Input box foreground.":970,"Input box border.":971,"Border color of activated options in input fields.":972,"Background color of activated options in input fields.":973,"Foreground color of activated options in input fields.":974,"Input validation background color for information severity.":975,"Input validation foreground color for information severity.":976,"Input validation border color for information severity.":977,"Input validation background color for warning severity.":978,"Input validation foreground color for warning severity.":979,"Input validation border color for warning severity.":980,"Input validation background color for error severity.":981,"Input validation foreground color for error severity.":982,"Input validation border color for error severity.":983,"Dropdown background.":984,"Dropdown foreground.":985,"Button foreground color.":986,"Button background color.":987,"Button background color when hovering.":988,"Badge background color. Badges are small information labels, e.g. for search results count.":989,"Badge foreground color. Badges are small information labels, e.g. for search results count.":990,"Scrollbar shadow to indicate that the view is scrolled.":991,"Scrollbar slider background color.":992,"Scrollbar slider background color when hovering.":993,"Scrollbar slider background color when clicked on.":994,"Background color of the progress bar that can show for long running operations.":995,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.":996,"Foreground color of error squigglies in the editor.":997,"Border color of error boxes in the editor.":998,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.":999,"Foreground color of warning squigglies in the editor.":1e3,"Border color of warning boxes in the editor.":1001,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.":1002,"Foreground color of info squigglies in the editor.":1003,"Border color of info boxes in the editor.":1004,"Foreground color of hint squigglies in the editor.":1005,"Border color of hint boxes in the editor.":1006,"Editor background color.":1007,"Editor default foreground color.":1008,"Background color of editor widgets, such as find/replace.":1009,"Foreground color of editor widgets, such as find/replace.":1010,"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.":1011,"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.":1012,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.":1013,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.":1014,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.":1015,"Quick picker color for grouping labels.":1016,"Quick picker color for grouping borders.":1017,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.":1018,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.":1019,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.":1020,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.":1021,"Color of the editor selection.":1022,"Color of the selected text for high contrast.":1023,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.":1024,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.":1025,"Border color for regions with the same content as the selection.":1026,"Color of the current search match.":1027,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.":1028,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.":1029,"Border color of the current search match.":1030,"Border color of the other search matches.":1031,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.":1032,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.":1033,"Background color of the editor hover.":1034,"Foreground color of the editor hover.":1035,"Border color of the editor hover.":1036,"Background color of the editor hover status bar.":1037,"Color of active links.":1038,"Foreground color of inline hints":1039,"Background color of inline hints":1040,"Foreground color of inline hints for types":1041,"Background color of inline hints for types":1042,"Foreground color of inline hints for parameters":1043,"Background color of inline hints for parameters":1044,"The color used for the lightbulb actions icon.":1045,"The color used for the lightbulb auto fix actions icon.":1046,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.":1047,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.":1048,"Outline color for the text that got inserted.":1049,"Outline color for text that got removed.":1050,"Border color between the two text editors.":1051,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.":1052,"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.":1053,"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.":1054,"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.":1055,"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.":1056,"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.":1057,"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.":1058,"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.":1059,"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.":1060,"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.":1061,"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.":1062,"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.":1063,"List/Tree background when hovering over items using the mouse.":1064,"List/Tree foreground when hovering over items using the mouse.":1065,"List/Tree drag and drop background when moving items around using the mouse.":1066,"List/Tree foreground color of the match highlights when searching inside the list/tree.":1067,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.":1068,"Background color of the type filter widget in lists and trees.":1069,"Outline color of the type filter widget in lists and trees.":1070,"Outline color of the type filter widget in lists and trees, when there are no matches.":1071,"Tree stroke color for the indentation guides.":1072,"Please use quickInputList.focusBackground instead":1073,"Quick picker foreground color for the focused item.":1074,"Quick picker icon foreground color for the focused item.":1075,"Quick picker background color for the focused item.":1076,"Border color of menus.":1077,"Foreground color of menu items.":1078,"Background color of menu items.":1079,"Foreground color of the selected menu item in menus.":1080,"Background color of the selected menu item in menus.":1081,"Border color of the selected menu item in menus.":1082,"Color of a separator menu item in menus.":1083,"Toolbar background when hovering over actions using the mouse":1084,"Highlight background color of a snippet tabstop.":1085,"Highlight border color of a snippet tabstop.":1086,"Highlight background color of the final tabstop of a snippet.":1087,"Highlight border color of the final tabstop of a snippet.":1088,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.":1089,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.":1090,"Minimap marker color for find matches.":1091,"Minimap marker color for repeating editor selections.":1092,"Minimap marker color for the editor selection.":1093,"Minimap marker color for errors.":1094,"Minimap marker color for warnings.":1095,"Minimap background color.":1096,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.':1097,"Minimap slider background color.":1098,"Minimap slider background color when hovering.":1099,"Minimap slider background color when clicked on.":1100,"The color used for the problems error icon.":1101,"The color used for the problems warning icon.":1102,"The color used for the problems info icon.":1103,"The id of the font to use. If not set, the font that is defined first is used.":1104,"The font character associated with the icon definition.":1105,"Icon for the close action in widgets.":1106,"The following files have been closed and modified on disk: {0}.":1107,"The following files have been modified in an incompatible way: {0}.":1108,"Could not undo '{0}' across all files. {1}":1109,"Could not undo '{0}' across all files because changes were made to {1}":1110,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}":1111,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime":1112,"Would you like to undo '{0}' across all files?":1113,"Undo in {0} Files":1114,"Undo this File":1115,Cancel:1116,"Could not undo '{0}' because there is already an undo or redo operation running.":1117,"Would you like to undo '{0}'?":1118,Yes:1119,"Could not redo '{0}' across all files. {1}":1120,"Could not redo '{0}' across all files because changes were made to {1}":1121,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}":1122,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime":1123,"Could not redo '{0}' because there is already an undo or redo operation running.":1124},xU={"zh-cn":{"0":"{0} ({1})","1":"\u8F93\u5165","2":"\u533A\u5206\u5927\u5C0F\u5199","3":"\u5168\u5B57\u5339\u914D","4":"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F","5":"\u4FDD\u7559\u5927\u5C0F\u5199","6":"\u6B63\u5728\u52A0\u8F7D\u2026","7":"\u9519\u8BEF: {0}","8":"\u8B66\u544A: {0}","9":"\u4FE1\u606F: {0}","10":"for history","11":"\u672A\u7ED1\u5B9A","12":"\u6E05\u9664","13":"\u7981\u7528\u8F93\u5165\u65F6\u7B5B\u9009","14":"\u542F\u7528\u8F93\u5165\u65F6\u7B5B\u9009","15":"\u672A\u627E\u5230\u5143\u7D20","16":"\u5DF2\u5339\u914D {0} \u4E2A\u5143\u7D20(\u5171 {1} \u4E2A)","17":"(\u7A7A)","18":"{0}: {1}","19":"\u53D1\u751F\u4E86\u7CFB\u7EDF\u9519\u8BEF ({0})","20":"\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u9605\u65E5\u5FD7\u3002","21":"{0} \u4E2A(\u5171 {1} \u4E2A\u9519\u8BEF)","22":"Ctrl","23":"Shift","24":"Alt","25":"Windows","26":"\u8D85\u952E","27":"Control","28":"Command","29":"\u4E0A\u4E00\u6B65","30":'\u6309 "Enter" \u4EE5\u786E\u8BA4\u6216\u6309 "Esc" \u4EE5\u53D6\u6D88',"31":"{0}/{1}","32":"\u5728\u6B64\u8F93\u5165\u53EF\u7F29\u5C0F\u7ED3\u679C\u8303\u56F4\u3002","33":"{0} \u4E2A\u7ED3\u679C","34":"\u5DF2\u9009 {0} \u9879","35":"\u786E\u5B9A","36":"\u81EA\u5B9A\u4E49","37":"\u540E\u9000 ({0})","38":"\u5FEB\u901F\u8F93\u5165","39":"\u5373\u4F7F\u8F6C\u5230\u8F83\u957F\u7684\u884C\uFF0C\u4E5F\u4E00\u76F4\u5230\u672B\u5C3E","40":"\u5DF2\u5220\u9664\u8F85\u52A9\u6E38\u6807","41":"\u7F16\u8F91\u5668","42":"\u73B0\u5728\u65E0\u6CD5\u8BBF\u95EE\u7F16\u8F91\u5668\u3002\u6309 {0} \u83B7\u53D6\u9009\u9879\u3002","43":"\u7F16\u8F91\u5668\u662F\u5426\u8FD0\u884C\u53EF\u53D6\u6D88\u7684\u64CD\u4F5C\uFF0C\u4F8B\u5982\u201C\u9884\u89C8\u5F15\u7528\u201D","44":"\u64A4\u6D88(&&U)","45":"\u64A4\u6D88","46":"\u6062\u590D(&&R)","47":"\u6062\u590D","48":"\u5168\u9009(&&S)","49":"\u9009\u62E9\u5168\u90E8","50":"\u5149\u6807\u6570\u91CF\u88AB\u9650\u5236\u4E3A {0}\u3002","51":"\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u63D2\u5165\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","52":"\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u5220\u9664\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","53":"\u6587\u4EF6\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6BD4\u8F83\u3002","54":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u63D2\u5165\u201D\u56FE\u6807\u3002","55":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u5220\u9664\u201D\u56FE\u6807\u3002","56":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u5173\u95ED\u201D\u56FE\u6807\u3002","57":"\u5173\u95ED","58":"\u672A\u66F4\u6539\u884C","59":"\u66F4\u6539\u4E86 1 \u884C","60":"\u66F4\u6539\u4E86 {0} \u884C","61":"\u5DEE\u5F02 {0}/ {1}: \u539F\u59CB\u884C {2}\uFF0C{3}\uFF0C\u4FEE\u6539\u540E\u7684\u884C {4}\uFF0C{5}","62":"\u7A7A\u767D","63":"{0} \u672A\u66F4\u6539\u7684\u884C {1}","64":"{0}\u539F\u59CB\u884C{1}\u4FEE\u6539\u7684\u884C{2}","65":"+ {0}\u4FEE\u6539\u7684\u884C{1}","66":"- {0}\u539F\u59CB\u884C{1}","67":"\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u5DEE\u5F02","68":"\u8F6C\u81F3\u4E0A\u4E00\u4E2A\u5DEE\u5F02","69":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","70":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","71":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C({0})","72":"\u8FD8\u539F\u6B64\u66F4\u6539","73":"\u7F16\u8F91\u5668","74":"\u4E00\u4E2A\u5236\u8868\u7B26\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u5728 `#editor.detectIndentation#` \u542F\u7528\u65F6\uFF0C\u6839\u636E\u6587\u4EF6\u5185\u5BB9\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6\u3002","75":"\u6309 `Tab` \u952E\u65F6\u63D2\u5165\u7A7A\u683C\u3002\u8BE5\u8BBE\u7F6E\u5728 `#editor.detectIndentation#` \u542F\u7528\u65F6\u6839\u636E\u6587\u4EF6\u5185\u5BB9\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6\u3002","76":"\u63A7\u5236\u662F\u5426\u5728\u6253\u5F00\u6587\u4EF6\u65F6\uFF0C\u57FA\u4E8E\u6587\u4EF6\u5185\u5BB9\u81EA\u52A8\u68C0\u6D4B `#editor.tabSize#` \u548C `#editor.insertSpaces#`\u3002","77":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","78":"\u5BF9\u5927\u578B\u6587\u4EF6\u8FDB\u884C\u7279\u6B8A\u5904\u7406\uFF0C\u7981\u7528\u67D0\u4E9B\u5185\u5B58\u5BC6\u96C6\u578B\u529F\u80FD\u3002","79":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u6587\u5B57\u8BA1\u7B97\u81EA\u52A8\u5B8C\u6210\u5217\u8868\u3002","80":"\u4EC5\u5EFA\u8BAE\u6D3B\u52A8\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","81":"\u5EFA\u8BAE\u4F7F\u7528\u540C\u4E00\u8BED\u8A00\u7684\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","82":"\u5EFA\u8BAE\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","83":"\u63A7\u5236\u901A\u8FC7\u54EA\u4E9B\u6587\u6863\u8BA1\u7B97\u57FA\u4E8E\u5B57\u8BCD\u7684\u8865\u5168\u3002","84":"\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u542F\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","85":"\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u7981\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","86":'\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u662F\u7531\u5F53\u524D\u989C\u8272\u4E3B\u9898\u7684 "semanticHighlighting" \u8BBE\u7F6E\u914D\u7F6E\u7684\u3002',"87":"\u63A7\u5236\u662F\u5426\u4E3A\u652F\u6301\u5B83\u7684\u8BED\u8A00\u663E\u793A\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","88":"\u5728\u901F\u89C8\u7F16\u8F91\u5668\u4E2D\uFF0C\u5373\u4F7F\u53CC\u51FB\u5176\u4E2D\u7684\u5185\u5BB9\u6216\u8005\u6309 `Esc` \u952E\uFF0C\u4E5F\u4FDD\u6301\u5176\u6253\u5F00\u72B6\u6001\u3002","89":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BB0","90":"\u8D85\u65F6(\u4EE5\u6BEB\u79D2\u4E3A\u5355\u4F4D)\uFF0C\u4E4B\u540E\u5C06\u53D6\u6D88\u5DEE\u5F02\u8BA1\u7B97\u3002\u4F7F\u75280\u8868\u793A\u6CA1\u6709\u8D85\u65F6\u3002","91":"Maximum file size in MB for which to compute diffs. Use 0 for no limit.","92":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u662F\u5E76\u6392\u8FD8\u662F\u5185\u8054\u3002","93":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u5C06\u5FFD\u7565\u524D\u5BFC\u7A7A\u683C\u6216\u5C3E\u968F\u7A7A\u683C\u4E2D\u7684\u66F4\u6539\u3002","94":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u6DFB\u52A0/\u5220\u9664\u7684\u66F4\u6539\u663E\u793A +/- \u6307\u793A\u7B26\u53F7\u3002","95":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","96":"\u6C38\u4E0D\u6362\u884C\u3002","97":"\u5C06\u5728\u89C6\u533A\u5BBD\u5EA6\u5904\u6362\u884C\u3002","98":"\u5C06\u6839\u636E `#editor.wordWrap#` \u8BBE\u7F6E\u6362\u884C\u3002","99":"\u7F16\u8F91\u5668\u5C06\u4F7F\u7528\u5E73\u53F0 API \u4EE5\u68C0\u6D4B\u662F\u5426\u9644\u52A0\u4E86\u5C4F\u5E55\u9605\u8BFB\u5668\u3002","100":"\u7F16\u8F91\u5668\u5C06\u9488\u5BF9\u4E0E\u5C4F\u5E55\u9605\u8BFB\u5668\u642D\u914D\u4F7F\u7528\u8FDB\u884C\u6C38\u4E45\u4F18\u5316\u3002\u5C06\u7981\u7528\u81EA\u52A8\u6362\u884C\u3002","101":"\u7F16\u8F91\u5668\u5C06\u4E0D\u518D\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\u8FDB\u884C\u4F18\u5316\u3002","102":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5728\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u8FDB\u884C\u4E86\u4F18\u5316\u7684\u6A21\u5F0F\u4E0B\u8FD0\u884C\u3002\u8BBE\u7F6E\u4E3A\u201C\u5F00\u201D\u5C06\u7981\u7528\u81EA\u52A8\u6362\u884C\u3002","103":"\u63A7\u5236\u5728\u6CE8\u91CA\u65F6\u662F\u5426\u63D2\u5165\u7A7A\u683C\u5B57\u7B26\u3002","104":"\u63A7\u5236\u5728\u5BF9\u884C\u6CE8\u91CA\u6267\u884C\u5207\u6362\u3001\u6DFB\u52A0\u6216\u5220\u9664\u64CD\u4F5C\u65F6\uFF0C\u662F\u5426\u5E94\u5FFD\u7565\u7A7A\u884C\u3002","105":"\u63A7\u5236\u5728\u6CA1\u6709\u9009\u62E9\u5185\u5BB9\u65F6\u8FDB\u884C\u590D\u5236\u662F\u5426\u590D\u5236\u5F53\u524D\u884C\u3002","106":"\u63A7\u5236\u5728\u952E\u5165\u65F6\u5149\u6807\u662F\u5426\u5E94\u8DF3\u8F6C\u4EE5\u67E5\u627E\u5339\u914D\u9879\u3002","107":"\u5207\u52FF\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","108":"\u59CB\u7EC8\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\uFF0C\u5305\u62EC\u5149\u6807\u4F4D\u7F6E\u7684\u5B57\u8BCD\u3002","109":"\u4EC5\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","110":"\u63A7\u5236\u662F\u5426\u5C06\u7F16\u8F91\u5668\u9009\u4E2D\u5185\u5BB9\u4F5C\u4E3A\u641C\u7D22\u8BCD\u586B\u5165\u5230\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u3002","111":"\u4ECE\u4E0D\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D(\u9ED8\u8BA4)\u3002","112":"\u59CB\u7EC8\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","113":"\u9009\u62E9\u591A\u884C\u5185\u5BB9\u65F6\uFF0C\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","114":"\u63A7\u5236\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u7684\u6761\u4EF6\u3002","115":"\u63A7\u5236\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u662F\u5426\u8BFB\u53D6\u6216\u4FEE\u6539 macOS \u7684\u5171\u4EAB\u67E5\u627E\u526A\u8D34\u677F\u3002","116":'\u63A7\u5236 "\u67E5\u627E\u5C0F\u90E8\u4EF6" \u662F\u5426\u5E94\u5728\u7F16\u8F91\u5668\u9876\u90E8\u6DFB\u52A0\u989D\u5916\u7684\u884C\u3002\u5982\u679C\u4E3A true, \u5219\u53EF\u4EE5\u5728 "\u67E5\u627E\u5C0F\u5DE5\u5177" \u53EF\u89C1\u65F6\u6EDA\u52A8\u5230\u7B2C\u4E00\u884C\u4E4B\u5916\u3002',"117":"\u63A7\u5236\u5728\u627E\u4E0D\u5230\u5176\u4ED6\u5339\u914D\u9879\u65F6\uFF0C\u662F\u5426\u81EA\u52A8\u4ECE\u5F00\u5934(\u6216\u7ED3\u5C3E)\u91CD\u65B0\u5F00\u59CB\u641C\u7D22\u3002","118":'\u542F\u7528/\u7981\u7528\u5B57\u4F53\u8FDE\u5B57("calt" \u548C "liga" \u5B57\u4F53\u7279\u6027)\u3002\u5C06\u6B64\u66F4\u6539\u4E3A\u5B57\u7B26\u4E32\uFF0C\u53EF\u5BF9 "font-feature-settings" CSS \u5C5E\u6027\u8FDB\u884C\u7CBE\u7EC6\u63A7\u5236\u3002',"119":'\u663E\u5F0F "font-feature-settings" CSS \u5C5E\u6027\u3002\u5982\u679C\u53EA\u9700\u6253\u5F00/\u5173\u95ED\u8FDE\u5B57\uFF0C\u53EF\u4EE5\u6539\u4E3A\u4F20\u9012\u5E03\u5C14\u503C\u3002',"120":'\u914D\u7F6E\u5B57\u4F53\u8FDE\u5B57\u6216\u5B57\u4F53\u7279\u6027\u3002\u53EF\u4EE5\u662F\u7528\u4E8E\u542F\u7528/\u7981\u7528\u8FDE\u5B57\u7684\u5E03\u5C14\u503C\uFF0C\u6216\u7528\u4E8E\u8BBE\u7F6E CSS "font-feature-settings" \u5C5E\u6027\u503C\u7684\u5B57\u7B26\u4E32\u3002',"121":"\u63A7\u5236\u5B57\u4F53\u5927\u5C0F(\u50CF\u7D20)\u3002","122":"\u4EC5\u5141\u8BB8\u4F7F\u7528\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u4F7F\u7528\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","123":"\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\u3002\u63A5\u53D7\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u8005\u63A5\u53D7\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","124":"\u663E\u793A\u7ED3\u679C\u7684\u9884\u89C8\u89C6\u56FE (\u9ED8\u8BA4\u503C)","125":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u9884\u89C8\u89C6\u56FE","126":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u4EBA\u542F\u7528\u9632\u5077\u7AA5\u5BFC\u822A","127":'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.editor.gotoLocation.multipleDefinitions"\u6216"editor.editor.gotoLocation.multipleImplementations"\u3002',"128":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"129":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"130":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u58F0\u660E"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"131":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9E\u73B0"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"132":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5F15\u7528"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"133":'\u5F53"\u8F6C\u5230\u5B9A\u4E49"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"134":'\u5F53"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u5907\u7528\u547D\u4EE4 ID\u3002',"135":'\u5F53"\u8F6C\u5230\u58F0\u660E"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"136":'\u5F53"\u8F6C\u5230\u5B9E\u73B0"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"137":'\u5F53"\u8F6C\u5230\u5F15\u7528"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4 ID\u3002',"138":"\u63A7\u5236\u662F\u5426\u663E\u793A\u60AC\u505C\u63D0\u793A\u3002","139":"\u63A7\u5236\u663E\u793A\u60AC\u505C\u63D0\u793A\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","140":"\u63A7\u5236\u5F53\u9F20\u6807\u79FB\u52A8\u5230\u60AC\u505C\u63D0\u793A\u4E0A\u65F6\uFF0C\u5176\u662F\u5426\u4FDD\u6301\u53EF\u89C1\u3002","141":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u5C0F\u706F\u6CE1\u63D0\u793A\u3002","142":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u5185\u8054\u63D0\u793A\u3002","143":"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.","144":"\u5728\u7F16\u8F91\u5668\u4E2D\u63A7\u5236\u5185\u5D4C\u63D0\u793A\u7684\u5B57\u4F53\u7CFB\u5217\u3002\u8BBE\u7F6E\u4E3A\u7A7A\u65F6\uFF0C\u4F7F\u7528 `#editor.fontFamily#`\u3002","145":`\u63A7\u5236\u884C\u9AD8\u3002\r + - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002\r + - \u4ECB\u4E8E 0 \u548C 8 \u4E4B\u95F4\u7684\u503C\u5C06\u7528\u4F5C\u5B57\u53F7\u7684\u4E58\u6570\u3002\r + - \u5927\u4E8E\u6216\u7B49\u4E8E 8 \u7684\u503C\u5C06\u7528\u4F5C\u6709\u6548\u503C\u3002`,"146":"\u63A7\u5236\u662F\u5426\u663E\u793A\u7F29\u7565\u56FE\u3002","147":"\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u4E0E\u7F16\u8F91\u5668\u5185\u5BB9\u76F8\u540C(\u5E76\u4E14\u53EF\u80FD\u6EDA\u52A8)\u3002","148":"\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u62C9\u4F38\u6216\u7F29\u5C0F\u4EE5\u586B\u5145\u7F16\u8F91\u5668\u7684\u9AD8\u5EA6(\u4E0D\u6EDA\u52A8)\u3002","149":"\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u7F29\u5C0F\uFF0C\u6C38\u8FDC\u4E0D\u4F1A\u5927\u4E8E\u7F16\u8F91\u5668(\u4E0D\u6EDA\u52A8)\u3002","150":"\u63A7\u5236\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u3002","151":"\u63A7\u5236\u5728\u54EA\u4E00\u4FA7\u663E\u793A\u7F29\u7565\u56FE\u3002","152":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u3002","153":"\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u7ED8\u5236\u7684\u5185\u5BB9\u6BD4\u4F8B: 1\u30012 \u6216 3\u3002","154":"\u6E32\u67D3\u6BCF\u884C\u7684\u5B9E\u9645\u5B57\u7B26\uFF0C\u800C\u4E0D\u662F\u8272\u5757\u3002","155":"\u9650\u5236\u7F29\u7565\u56FE\u7684\u5BBD\u5EA6\uFF0C\u63A7\u5236\u5176\u6700\u591A\u663E\u793A\u7684\u5217\u6570\u3002","156":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u9876\u8FB9\u548C\u7B2C\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","157":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5E95\u8FB9\u548C\u6700\u540E\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","158":"\u5728\u8F93\u5165\u65F6\u663E\u793A\u542B\u6709\u53C2\u6570\u6587\u6863\u548C\u7C7B\u578B\u4FE1\u606F\u7684\u5C0F\u9762\u677F\u3002","159":"\u63A7\u5236\u53C2\u6570\u63D0\u793A\u83DC\u5355\u5728\u5230\u8FBE\u5217\u8868\u672B\u5C3E\u65F6\u8FDB\u884C\u5FAA\u73AF\u8FD8\u662F\u5173\u95ED\u3002","160":"\u5728\u5B57\u7B26\u4E32\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","161":"\u5728\u6CE8\u91CA\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","162":"\u5728\u5B57\u7B26\u4E32\u548C\u6CE8\u91CA\u5916\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","163":"\u63A7\u5236\u662F\u5426\u5728\u952E\u5165\u65F6\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","164":"\u4E0D\u663E\u793A\u884C\u53F7\u3002","165":"\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u7EDD\u5BF9\u884C\u6570\u3002","166":"\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u4E0E\u5149\u6807\u76F8\u9694\u7684\u884C\u6570\u3002","167":"\u6BCF 10 \u884C\u663E\u793A\u4E00\u6B21\u884C\u53F7\u3002","168":"\u63A7\u5236\u884C\u53F7\u7684\u663E\u793A\u3002","169":"\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u5C06\u6E32\u67D3\u7684\u7B49\u5BBD\u5B57\u7B26\u6570\u3002","170":"\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","171":"\u5728\u4E00\u5B9A\u6570\u91CF\u7684\u7B49\u5BBD\u5B57\u7B26\u540E\u663E\u793A\u5782\u76F4\u6807\u5C3A\u3002\u8F93\u5165\u591A\u4E2A\u503C\uFF0C\u663E\u793A\u591A\u4E2A\u6807\u5C3A\u3002\u82E5\u6570\u7EC4\u4E3A\u7A7A\uFF0C\u5219\u4E0D\u7ED8\u5236\u6807\u5C3A\u3002","172":"\u5782\u76F4\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","173":"\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","174":"\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","175":"\u63A7\u5236\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","176":"\u6C34\u5E73\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","177":"\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","178":"\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","179":"\u63A7\u5236\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","180":"\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u5BBD\u5EA6\u3002","181":"\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u9AD8\u5EA6\u3002","182":"\u63A7\u5236\u5355\u51FB\u6309\u9875\u6EDA\u52A8\u8FD8\u662F\u8DF3\u8F6C\u5230\u5355\u51FB\u4F4D\u7F6E\u3002","183":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","184":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","185":"Controls whether bracket pair guides are enabled or not.","186":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","187":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","188":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","189":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","190":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","191":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","192":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","193":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","194":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","195":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","196":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","197":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","198":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","199":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","200":'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.suggest.showKeywords"\u6216"editor.suggest.showSnippets"\u3002',"201":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","202":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","203":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","204":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","205":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","206":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","207":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","208":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","209":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","210":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","211":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","212":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","213":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","214":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","215":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","216":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","217":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","218":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"219":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","220":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","221":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","222":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","223":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","224":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","225":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","226":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"227":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","228":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"229":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"230":"\u662F\u5426\u5E94\u59CB\u7EC8\u9009\u62E9\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u683C\u3002","231":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u9047\u5230\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u534A\u89D2\u5206\u53F7 (`;`) \u53EF\u4EE5\u4E3A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u80FD\u591F\u5728\u63A5\u53D7\u5EFA\u8BAE\u7684\u540C\u65F6\u952E\u5165\u8BE5\u5B57\u7B26\u3002","232":"\u4EC5\u5F53\u5EFA\u8BAE\u5305\u542B\u6587\u672C\u6539\u52A8\u65F6\u624D\u53EF\u4F7F\u7528 `Enter` \u952E\u8FDB\u884C\u63A5\u53D7\u3002","233":"\u63A7\u5236\u9664\u4E86 `Tab` \u952E\u4EE5\u5916\uFF0C `Enter` \u952E\u662F\u5426\u540C\u6837\u53EF\u4EE5\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u80FD\u51CF\u5C11\u201C\u63D2\u5165\u65B0\u884C\u201D\u548C\u201C\u63A5\u53D7\u5EFA\u8BAE\u201D\u547D\u4EE4\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","234":"\u63A7\u5236\u7F16\u8F91\u5668\u4E2D\u53EF\u7531\u5C4F\u5E55\u9605\u8BFB\u5668\u4E00\u6B21\u8BFB\u51FA\u7684\u884C\u6570\u3002\u6211\u4EEC\u68C0\u6D4B\u5230\u5C4F\u5E55\u9605\u8BFB\u5668\u65F6\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9ED8\u8BA4\u503C\u8BBE\u7F6E\u4E3A 500\u3002\u8B66\u544A: \u5982\u679C\u884C\u6570\u5927\u4E8E\u9ED8\u8BA4\u503C\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","235":"\u7F16\u8F91\u5668\u5185\u5BB9","236":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","237":"\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","238":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u62EC\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u62EC\u53F7\u3002","239":"\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","240":"\u63A7\u5236\u5728\u5220\u9664\u65F6\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u65B9\u62EC\u53F7\u3002","241":"\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","242":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","243":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","244":"\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","245":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u5F15\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u5F15\u53F7\u3002","246":"\u7F16\u8F91\u5668\u4E0D\u4F1A\u81EA\u52A8\u63D2\u5165\u7F29\u8FDB\u3002","247":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3002","248":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u5E76\u9075\u5FAA\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u3002","249":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3001\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u5E76\u8C03\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u5B9A onEnterRules\u3002","250":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\uFF0C\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\uFF0C\u8C03\u7528\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u6B8A\u8F93\u5165\u89C4\u5219\uFF0C\u5E76\u9075\u5FAA\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7F29\u8FDB\u89C4\u5219\u3002","251":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u3001\u79FB\u52A8\u6216\u7F29\u8FDB\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002","252":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","253":"\u4F7F\u7528\u5F15\u53F7\u800C\u975E\u62EC\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","254":"\u4F7F\u7528\u62EC\u53F7\u800C\u975E\u5F15\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","255":"\u63A7\u5236\u5728\u952E\u5165\u5F15\u53F7\u6216\u65B9\u62EC\u53F7\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u5E94\u81EA\u52A8\u5C06\u6240\u9009\u5185\u5BB9\u62EC\u8D77\u6765\u3002","256":"\u5728\u4F7F\u7528\u7A7A\u683C\u8FDB\u884C\u7F29\u8FDB\u65F6\u6A21\u62DF\u5236\u8868\u7B26\u7684\u9009\u62E9\u884C\u4E3A\u3002\u6240\u9009\u5185\u5BB9\u5C06\u59CB\u7EC8\u4F7F\u7528\u5236\u8868\u7B26\u505C\u6B62\u4F4D\u3002","257":"\u63A7\u5236 CodeLens \u7684\u5B57\u4F53\u7CFB\u5217\u3002","258":"\u63A7\u5236 CodeLens \u7684\u5B57\u4F53\u5927\u5C0F(\u50CF\u7D20)\u3002\u8BBE\u7F6E\u4E3A `0` \u65F6\uFF0C\u5C06\u4F7F\u7528 `#editor.fontSize#` \u7684 90%\u3002","259":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u5185\u8054\u989C\u8272\u4FEE\u9970\u5668\u548C\u989C\u8272\u9009\u53D6\u5668\u3002","260":"\u542F\u7528\u4F7F\u7528\u9F20\u6807\u548C\u952E\u8FDB\u884C\u5217\u9009\u62E9\u3002","261":"\u63A7\u5236\u5728\u590D\u5236\u65F6\u662F\u5426\u540C\u65F6\u590D\u5236\u8BED\u6CD5\u9AD8\u4EAE\u3002","262":"\u63A7\u5236\u5149\u6807\u7684\u52A8\u753B\u6837\u5F0F\u3002","263":"\u63A7\u5236\u662F\u5426\u542F\u7528\u5E73\u6ED1\u63D2\u5165\u52A8\u753B\u3002","264":"\u63A7\u5236\u5149\u6807\u6837\u5F0F\u3002","265":'\u63A7\u5236\u5149\u6807\u5468\u56F4\u53EF\u89C1\u7684\u524D\u7F6E\u884C\u548C\u5C3E\u968F\u884C\u7684\u6700\u5C0F\u6570\u76EE\u3002\u5728\u5176\u4ED6\u4E00\u4E9B\u7F16\u8F91\u5668\u4E2D\u79F0\u4E3A "scrollOff" \u6216 "scrollOffset"\u3002',"266":'\u4EC5\u5F53\u901A\u8FC7\u952E\u76D8\u6216 API \u89E6\u53D1\u65F6\uFF0C\u624D\u4F1A\u5F3A\u5236\u6267\u884C"\u5149\u6807\u73AF\u7ED5\u884C"\u3002',"267":'\u59CB\u7EC8\u5F3A\u5236\u6267\u884C "cursorSurroundingLines"',"268":'\u63A7\u5236\u4F55\u65F6\u5E94\u5F3A\u5236\u6267\u884C"\u5149\u6807\u73AF\u7ED5\u884C"\u3002',"269":"\u5F53 `#editor.cursorStyle#` \u8BBE\u7F6E\u4E3A `line` \u65F6\uFF0C\u63A7\u5236\u5149\u6807\u7684\u5BBD\u5EA6\u3002","270":"\u63A7\u5236\u5728\u7F16\u8F91\u5668\u4E2D\u662F\u5426\u5141\u8BB8\u901A\u8FC7\u62D6\u653E\u6765\u79FB\u52A8\u9009\u4E2D\u5185\u5BB9\u3002","271":'\u6309\u4E0B"Alt"\u65F6\u6EDA\u52A8\u901F\u5EA6\u500D\u589E\u3002',"272":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u542F\u7528\u4E86\u4EE3\u7801\u6298\u53E0\u3002","273":"\u4F7F\u7528\u7279\u5B9A\u4E8E\u8BED\u8A00\u7684\u6298\u53E0\u7B56\u7565(\u5982\u679C\u53EF\u7528)\uFF0C\u5426\u5219\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u7B56\u7565\u3002","274":"\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u6298\u53E0\u7B56\u7565\u3002","275":"\u63A7\u5236\u8BA1\u7B97\u6298\u53E0\u8303\u56F4\u7684\u7B56\u7565\u3002","276":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u6298\u53E0\u8303\u56F4\u3002","277":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u6298\u53E0\u5BFC\u5165\u8303\u56F4\u3002","278":"\u63A7\u5236\u5355\u51FB\u5DF2\u6298\u53E0\u7684\u884C\u540E\u9762\u7684\u7A7A\u5185\u5BB9\u662F\u5426\u4F1A\u5C55\u5F00\u8BE5\u884C\u3002","279":"\u63A7\u5236\u5B57\u4F53\u7CFB\u5217\u3002","280":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u683C\u5F0F\u5316\u7A0B\u5E8F\u5FC5\u987B\u53EF\u7528\uFF0C\u5E76\u4E14\u80FD\u9488\u5BF9\u6587\u6863\u4E2D\u7684\u67D0\u4E00\u8303\u56F4\u8FDB\u884C\u683C\u5F0F\u5316\u3002","281":"\u63A7\u5236\u7F16\u8F91\u5668\u5728\u952E\u5165\u4E00\u884C\u540E\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","282":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5448\u73B0\u5782\u76F4\u5B57\u5F62\u8FB9\u8DDD\u3002\u5B57\u5F62\u8FB9\u8DDD\u6700\u5E38\u7528\u4E8E\u8C03\u8BD5\u3002","283":"\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u4E2D\u9690\u85CF\u5149\u6807\u3002","284":"\u63A7\u5236\u5B57\u6BCD\u95F4\u8DDD(\u50CF\u7D20)\u3002","285":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u542F\u7528\u94FE\u63A5\u7F16\u8F91\u3002\u76F8\u5173\u7B26\u53F7(\u5982 HTML \u6807\u8BB0)\u5728\u7F16\u8F91\u65F6\u8FDB\u884C\u66F4\u65B0\uFF0C\u5177\u4F53\u7531\u8BED\u8A00\u800C\u5B9A\u3002","286":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u68C0\u6D4B\u94FE\u63A5\u5E76\u4F7F\u5176\u53EF\u88AB\u70B9\u51FB\u3002","287":"\u7A81\u51FA\u663E\u793A\u5339\u914D\u7684\u62EC\u53F7\u3002","288":"\u5BF9\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u4E8B\u4EF6\u7684 `deltaX` \u548C `deltaY` \u4E58\u4E0A\u7684\u7CFB\u6570\u3002","289":"\u6309\u4F4F `Ctrl` \u952E\u5E76\u6EDA\u52A8\u9F20\u6807\u6EDA\u8F6E\u65F6\u5BF9\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F\u8FDB\u884C\u7F29\u653E\u3002","290":"\u5F53\u591A\u4E2A\u5149\u6807\u91CD\u53E0\u65F6\u8FDB\u884C\u5408\u5E76\u3002","291":"\u6620\u5C04\u4E3A `Ctrl` (Windows \u548C Linux) \u6216 `Command` (macOS)\u3002","292":"\u6620\u5C04\u4E3A `Alt` (Windows \u548C Linux) \u6216 `Option` (macOS)\u3002","293":"\u5728\u901A\u8FC7\u9F20\u6807\u6DFB\u52A0\u591A\u4E2A\u5149\u6807\u65F6\u4F7F\u7528\u7684\u4FEE\u6539\u952E\u3002\u201C\u8F6C\u5230\u5B9A\u4E49\u201D\u548C\u201C\u6253\u5F00\u94FE\u63A5\u201D\u529F\u80FD\u6240\u9700\u7684\u9F20\u6807\u52A8\u4F5C\u5C06\u4F1A\u76F8\u5E94\u8C03\u6574\uFF0C\u4E0D\u4E0E\u591A\u5149\u6807\u4FEE\u6539\u952E\u51B2\u7A81\u3002[\u9605\u8BFB\u8BE6\u7EC6\u4FE1\u606F](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier)\u3002","294":"\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u4E00\u884C\u6587\u672C\u3002","295":"\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u5168\u6587\u3002","296":"\u63A7\u5236\u7C98\u8D34\u65F6\u7C98\u8D34\u6587\u672C\u7684\u884C\u8BA1\u6570\u4E0E\u5149\u6807\u8BA1\u6570\u76F8\u5339\u914D\u3002","297":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u7A81\u51FA\u663E\u793A\u8BED\u4E49\u7B26\u53F7\u7684\u5339\u914D\u9879\u3002","298":"\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u5468\u56F4\u7ED8\u5236\u8FB9\u6846\u3002","299":"\u6253\u5F00\u901F\u89C8\u65F6\u805A\u7126\u6811","300":"\u6253\u5F00\u9884\u89C8\u65F6\u5C06\u7126\u70B9\u653E\u5728\u7F16\u8F91\u5668\u4E0A","301":"\u63A7\u5236\u662F\u5C06\u7126\u70B9\u653E\u5728\u5185\u8054\u7F16\u8F91\u5668\u4E0A\u8FD8\u662F\u653E\u5728\u9884\u89C8\u5C0F\u90E8\u4EF6\u4E2D\u7684\u6811\u4E0A\u3002","302":'\u63A7\u5236"\u8F6C\u5230\u5B9A\u4E49"\u9F20\u6807\u624B\u52BF\u662F\u5426\u59CB\u7EC8\u6253\u5F00\u9884\u89C8\u5C0F\u90E8\u4EF6\u3002',"303":"\u63A7\u5236\u663E\u793A\u5FEB\u901F\u5EFA\u8BAE\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","304":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u8F93\u5165\u65F6\u81EA\u52A8\u91CD\u547D\u540D\u3002","305":'\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editor.linkedEditing"\u3002',"306":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u63A7\u5236\u5B57\u7B26\u3002","307":"\u5F53\u6587\u4EF6\u4EE5\u6362\u884C\u7B26\u7ED3\u675F\u65F6, \u5448\u73B0\u6700\u540E\u4E00\u884C\u7684\u884C\u53F7\u3002","308":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","309":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","310":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","311":"\u5448\u73B0\u7A7A\u683C\u5B57\u7B26(\u5B57\u8BCD\u4E4B\u95F4\u7684\u5355\u4E2A\u7A7A\u683C\u9664\u5916)\u3002","312":"\u4EC5\u5728\u9009\u5B9A\u6587\u672C\u4E0A\u5448\u73B0\u7A7A\u767D\u5B57\u7B26\u3002","313":"\u4EC5\u5448\u73B0\u5C3E\u968F\u7A7A\u683C\u5B57\u7B26\u3002","314":"\u63A7\u5236\u7F16\u8F91\u5668\u5728\u7A7A\u767D\u5B57\u7B26\u4E0A\u663E\u793A\u7B26\u53F7\u7684\u65B9\u5F0F\u3002","315":"\u63A7\u5236\u9009\u533A\u662F\u5426\u6709\u5706\u89D2\u3002","316":"\u63A7\u5236\u7F16\u8F91\u5668\u6C34\u5E73\u6EDA\u52A8\u65F6\u53EF\u4EE5\u8D85\u8FC7\u8303\u56F4\u7684\u5B57\u7B26\u6570\u3002","317":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u53EF\u4EE5\u6EDA\u52A8\u5230\u6700\u540E\u4E00\u884C\u4E4B\u540E\u3002","318":"\u540C\u65F6\u5782\u76F4\u548C\u6C34\u5E73\u6EDA\u52A8\u65F6\uFF0C\u4EC5\u6CBF\u4E3B\u8F74\u6EDA\u52A8\u3002\u5728\u89E6\u63A7\u677F\u4E0A\u5782\u76F4\u6EDA\u52A8\u65F6\uFF0C\u53EF\u9632\u6B62\u6C34\u5E73\u6F02\u79FB\u3002","319":"\u63A7\u5236\u662F\u5426\u652F\u6301 Linux \u4E3B\u526A\u8D34\u677F\u3002","320":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u4E0E\u6240\u9009\u5185\u5BB9\u7C7B\u4F3C\u7684\u5339\u914D\u9879\u3002","321":"\u59CB\u7EC8\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","322":"\u4EC5\u5728\u9F20\u6807\u4F4D\u4E8E\u88C5\u8BA2\u7EBF\u4E0A\u65B9\u65F6\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","323":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u884C\u53F7\u69FD\u4E0A\u7684\u6298\u53E0\u63A7\u4EF6\u3002","324":"\u63A7\u5236\u662F\u5426\u6DE1\u5316\u672A\u4F7F\u7528\u7684\u4EE3\u7801\u3002","325":"\u63A7\u5236\u52A0\u5220\u9664\u7EBF\u88AB\u5F03\u7528\u7684\u53D8\u91CF\u3002","326":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0A\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","327":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0B\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","328":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E2D\u7A7F\u63D2\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","329":"\u4E0D\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","330":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u8D77\u663E\u793A\u53CA\u5176\u6392\u5217\u7684\u4F4D\u7F6E\u3002","331":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4F7F\u7528\u52A8\u753B\u6EDA\u52A8\u3002","332":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","333":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","334":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","335":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","336":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","337":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","338":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","339":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","340":"\u7981\u7528 Tab \u8865\u5168\u3002","341":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"342":"\u542F\u7528 Tab \u8865\u5168\u3002","343":"\u81EA\u52A8\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","344":"\u5FFD\u7565\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","345":"\u63D0\u793A\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","346":"\u5220\u9664\u53EF\u80FD\u5BFC\u81F4\u95EE\u9898\u7684\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26\u3002","347":"\u6839\u636E\u5236\u8868\u4F4D\u63D2\u5165\u548C\u5220\u9664\u7A7A\u683C\u3002","348":"\u6267\u884C\u5355\u8BCD\u76F8\u5173\u7684\u5BFC\u822A\u6216\u64CD\u4F5C\u65F6\u4F5C\u4E3A\u5355\u8BCD\u5206\u9694\u7B26\u7684\u5B57\u7B26\u3002","349":"\u5728 `#editor.wordWrapColumn#` \u5904\u6298\u884C\u3002","350":"\u5728\u89C6\u533A\u5BBD\u5EA6\u548C `#editor.wordWrapColumn#` \u4E2D\u7684\u8F83\u5C0F\u503C\u5904\u6298\u884C\u3002","351":"\u63A7\u5236\u6298\u884C\u7684\u65B9\u5F0F\u3002","352":"\u5728 `#editor.wordWrap#` \u4E3A `wordWrapColumn` \u6216 `bounded` \u65F6\uFF0C\u63A7\u5236\u7F16\u8F91\u5668\u7684\u6298\u884C\u5217\u3002","353":"\u6CA1\u6709\u7F29\u8FDB\u3002\u6298\u884C\u4ECE\u7B2C 1 \u5217\u5F00\u59CB\u3002","354":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u4E0E\u5176\u7236\u7EA7\u76F8\u540C\u3002","355":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 1\u3002","356":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 2\u3002","357":"\u63A7\u5236\u6298\u884C\u7684\u7F29\u8FDB\u3002","358":"\u5047\u5B9A\u6240\u6709\u5B57\u7B26\u7684\u5BBD\u5EA6\u76F8\u540C\u3002\u8FD9\u662F\u4E00\u79CD\u5FEB\u901F\u7B97\u6CD5\uFF0C\u9002\u7528\u4E8E\u7B49\u5BBD\u5B57\u4F53\u548C\u67D0\u4E9B\u5B57\u5F62\u5BBD\u5EA6\u76F8\u7B49\u7684\u6587\u5B57(\u5982\u62C9\u4E01\u5B57\u7B26)\u3002","359":"\u5C06\u5305\u88C5\u70B9\u8BA1\u7B97\u59D4\u6258\u7ED9\u6D4F\u89C8\u5668\u3002\u8FD9\u662F\u4E00\u4E2A\u7F13\u6162\u7B97\u6CD5\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u5927\u578B\u6587\u4EF6\u88AB\u51BB\u7ED3\uFF0C\u4F46\u5B83\u5728\u6240\u6709\u60C5\u51B5\u4E0B\u90FD\u6B63\u5E38\u5DE5\u4F5C\u3002","360":"\u63A7\u5236\u8BA1\u7B97\u5305\u88F9\u70B9\u7684\u7B97\u6CD5\u3002","361":"\u7F16\u8F91\u5668\u6587\u672C\u662F\u5426\u5177\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","362":"\u7F16\u8F91\u5668\u6216\u7F16\u8F91\u5668\u5C0F\u7EC4\u4EF6\u662F\u5426\u5177\u6709\u7126\u70B9(\u4F8B\u5982\u7126\u70B9\u5728\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u4E2D)","363":"\u7F16\u8F91\u5668\u6216 RTF \u8F93\u5165\u662F\u5426\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","364":"\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u53EA\u8BFB","365":"\u4E0A\u4E0B\u6587\u662F\u5426\u4E3A\u5DEE\u5F02\u7F16\u8F91\u5668","366":'\u662F\u5426\u5DF2\u542F\u7528 "editor.columnSelection"',"367":"\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u9009\u5B9A\u6587\u672C","368":"\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u9009\u62E9","369":'"Tab" \u662F\u5426\u5C06\u7126\u70B9\u79FB\u51FA\u7F16\u8F91\u5668',"370":"\u7F16\u8F91\u5668\u8F6F\u952E\u76D8\u662F\u5426\u53EF\u89C1","371":"\u8BE5\u7F16\u8F91\u5668\u662F\u5426\u662F\u66F4\u5927\u7684\u7F16\u8F91\u5668(\u4F8B\u5982\u7B14\u8BB0\u672C)\u7684\u4E00\u90E8\u5206","372":"\u7F16\u8F91\u5668\u7684\u8BED\u8A00\u6807\u8BC6\u7B26","373":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u8865\u5168\u9879\u63D0\u4F9B\u7A0B\u5E8F","374":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u4EE3\u7801\u64CD\u4F5C\u63D0\u4F9B\u7A0B\u5E8F","375":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709 CodeLens \u63D0\u4F9B\u7A0B\u5E8F","376":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","377":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u58F0\u660E\u63D0\u4F9B\u7A0B\u5E8F","378":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9E\u73B0\u63D0\u4F9B\u7A0B\u5E8F","379":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7C7B\u578B\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","380":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u60AC\u505C\u63D0\u4F9B\u7A0B\u5E8F","381":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7A81\u51FA\u663E\u793A\u63D0\u4F9B\u7A0B\u5E8F","382":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7B26\u53F7\u63D0\u4F9B\u7A0B\u5E8F","383":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5F15\u7528\u63D0\u4F9B\u7A0B\u5E8F","384":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u91CD\u547D\u540D\u63D0\u4F9B\u7A0B\u5E8F","385":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7B7E\u540D\u5E2E\u52A9\u63D0\u4F9B\u7A0B\u5E8F","386":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5185\u8054\u63D0\u793A\u63D0\u4F9B\u7A0B\u5E8F","387":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","388":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","389":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u591A\u4E2A\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","390":"\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","391":"\u8F93\u5165","392":"\u7EAF\u6587\u672C","393":"\u65E0\u9009\u62E9","394":"\u884C {0}, \u5217 {1} (\u9009\u4E2D {2})","395":"\u884C {0}, \u5217 {1}","396":"{0} \u9009\u62E9(\u5DF2\u9009\u62E9 {1} \u4E2A\u5B57\u7B26)","397":"{0} \u9009\u62E9","398":'\u73B0\u5728\u5C06 "\u8F85\u52A9\u529F\u80FD\u652F\u6301" \u8BBE\u7F6E\u66F4\u6539\u4E3A "\u6253\u5F00"\u3002',"399":"\u73B0\u5728\u6B63\u5728\u6253\u5F00\u201C\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u201D\u6587\u6863\u9875\u3002","400":"\u5728\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u53EA\u8BFB\u7A97\u683C\u4E2D\u3002","401":"\u5728\u4E00\u4E2A\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u7A97\u683C\u4E2D\u3002","402":"\u5728\u53EA\u8BFB\u4EE3\u7801\u7F16\u8F91\u5668\u4E2D","403":"\u5728\u4EE3\u7801\u7F16\u8F91\u5668\u4E2D","404":"\u82E5\u8981\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u597D\u5730\u914D\u5408\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\uFF0C\u8BF7\u7ACB\u5373\u6309 Command+E\u3002","405":"\u82E5\u8981\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u9AD8\u6548\u5730\u914D\u5408\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\uFF0C\u6309\u4E0B Ctrl+E\u3002","406":"\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u597D\u5730\u914D\u5408\u5C4F\u5E55\u8BFB\u53D6\u5668\u7684\u4F7F\u7528\u3002","407":"\u7F16\u8F91\u5668\u88AB\u914D\u7F6E\u4E3A\u6C38\u8FDC\u4E0D\u8FDB\u884C\u4F18\u5316\u4EE5\u914D\u5408\u5C4F\u5E55\u8BFB\u53D6\u5668\u7684\u4F7F\u7528, \u800C\u5F53\u524D\u4E0D\u662F\u8FD9\u79CD\u60C5\u51B5\u3002","408":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u5C06\u7126\u70B9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u53EF\u805A\u7126\u7684\u5143\u7D20\u3002\u901A\u8FC7\u6309 {0} \u5207\u6362\u6B64\u884C\u4E3A\u3002","409":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u5C06\u7126\u70B9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u53EF\u805A\u7126\u7684\u5143\u7D20\u3002\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u6309\u952E\u7ED1\u5B9A\u89E6\u53D1\u547D\u4EE4 {0}\u3002","410":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u5C06\u63D2\u5165\u5236\u8868\u7B26\u3002\u901A\u8FC7\u6309 {0} \u5207\u6362\u6B64\u884C\u4E3A\u3002","411":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u63D2\u5165\u5236\u8868\u7B26\u3002\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u952E\u7ED1\u5B9A\u89E6\u53D1\u547D\u4EE4 {0}\u3002","412":"\u73B0\u5728\u6309 Command+H \u6253\u5F00\u4E00\u4E2A\u6D4F\u89C8\u5668\u7A97\u53E3, \u5176\u4E2D\u5305\u542B\u6709\u5173\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002","413":"\u73B0\u5728\u6309 Ctrl+H \u6253\u5F00\u4E00\u4E2A\u6D4F\u89C8\u5668\u7A97\u53E3, \u5176\u4E2D\u5305\u542B\u6709\u5173\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u7684\u66F4\u591A\u4FE1\u606F\u3002","414":"\u4F60\u53EF\u4EE5\u6309 Esc \u6216 Shift+Esc \u6D88\u9664\u6B64\u5DE5\u5177\u63D0\u793A\u5E76\u8FD4\u56DE\u5230\u7F16\u8F91\u5668\u3002","415":"\u663E\u793A\u8F85\u52A9\u529F\u80FD\u5E2E\u52A9","416":"\u5F00\u53D1\u4EBA\u5458: \u68C0\u67E5\u4EE4\u724C","417":"\u8F6C\u5230\u884C/\u5217...","418":"\u663E\u793A\u6240\u6709\u5FEB\u901F\u8BBF\u95EE\u63D0\u4F9B\u7A0B\u5E8F","419":"\u547D\u4EE4\u9762\u677F","420":"\u663E\u793A\u5E76\u8FD0\u884C\u547D\u4EE4","421":"\u8F6C\u5230\u7B26\u53F7...","422":"\u6309\u7C7B\u522B\u8F6C\u5230\u7B26\u53F7...","423":"\u6309 Alt+F1 \u53EF\u6253\u5F00\u8F85\u52A9\u529F\u80FD\u9009\u9879\u3002","424":"\u5207\u6362\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898","425":"\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u8FDB\u884C\u4E86 {0} \u6B21\u7F16\u8F91","426":"\u5149\u6807\u6240\u5728\u884C\u9AD8\u4EAE\u5185\u5BB9\u7684\u80CC\u666F\u989C\u8272\u3002","427":"\u5149\u6807\u6240\u5728\u884C\u56DB\u5468\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","428":"\u80CC\u666F\u989C\u8272\u7684\u9AD8\u4EAE\u8303\u56F4\uFF0C\u559C\u6B22\u901A\u8FC7\u5FEB\u901F\u6253\u5F00\u548C\u67E5\u627E\u529F\u80FD\u3002\u989C\u8272\u4E0D\u80FD\u4E0D\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","429":"\u9AD8\u4EAE\u533A\u57DF\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","430":"\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u7684\u80CC\u666F\u989C\u8272\uFF0C\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\u6216\u8F6C\u5230\u4E0B\u4E00\u4E2A/\u4E0A\u4E00\u4E2A\u7B26\u53F7\u3002\u989C\u8272\u4E0D\u80FD\u662F\u4E0D\u900F\u660E\u7684\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","431":"\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u5468\u56F4\u7684\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","432":"\u7F16\u8F91\u5668\u5149\u6807\u989C\u8272\u3002","433":"\u7F16\u8F91\u5668\u5149\u6807\u7684\u80CC\u666F\u8272\u3002\u53EF\u4EE5\u81EA\u5B9A\u4E49\u5757\u578B\u5149\u6807\u8986\u76D6\u5B57\u7B26\u7684\u989C\u8272\u3002","434":"\u7F16\u8F91\u5668\u4E2D\u7A7A\u767D\u5B57\u7B26\u7684\u989C\u8272\u3002","435":"\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","436":"\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","437":"\u7F16\u8F91\u5668\u884C\u53F7\u7684\u989C\u8272\u3002","438":"\u7F16\u8F91\u5668\u6D3B\u52A8\u884C\u53F7\u7684\u989C\u8272","439":'"Id" \u5DF2\u88AB\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editorLineNumber.activeForeground"\u3002',"440":"\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","441":"\u7F16\u8F91\u5668 CodeLens \u7684\u524D\u666F\u8272","442":"\u5339\u914D\u62EC\u53F7\u7684\u80CC\u666F\u8272","443":"\u5339\u914D\u62EC\u53F7\u5916\u6846\u7684\u989C\u8272","444":"\u6982\u89C8\u6807\u5C3A\u8FB9\u6846\u7684\u989C\u8272\u3002","445":"\u7F16\u8F91\u5668\u6982\u8FF0\u6807\u5C3A\u7684\u80CC\u666F\u8272\u3002\u4EC5\u5F53\u7F29\u7565\u56FE\u5DF2\u542F\u7528\u4E14\u7F6E\u4E8E\u7F16\u8F91\u5668\u53F3\u4FA7\u65F6\u624D\u4F7F\u7528\u3002","446":"\u7F16\u8F91\u5668\u5BFC\u822A\u7EBF\u7684\u80CC\u666F\u8272\u3002\u5BFC\u822A\u7EBF\u5305\u62EC\u8FB9\u7F18\u7B26\u53F7\u548C\u884C\u53F7\u3002","447":"\u7F16\u8F91\u5668\u4E2D\u4E0D\u5FC5\u8981(\u672A\u4F7F\u7528)\u7684\u6E90\u4EE3\u7801\u7684\u8FB9\u6846\u989C\u8272\u3002","448":'\u975E\u5FC5\u987B(\u672A\u4F7F\u7528)\u4EE3\u7801\u7684\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A\u7684\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982\uFF0C"#000000c0" \u5C06\u4EE5 75% \u7684\u4E0D\u900F\u660E\u5EA6\u663E\u793A\u4EE3\u7801\u3002\u5BF9\u4E8E\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898\uFF0C\u8BF7\u4F7F\u7528 \u201DeditorUnnecessaryCode.border\u201C \u4E3B\u9898\u6765\u4E3A\u975E\u5FC5\u987B\u4EE3\u7801\u6DFB\u52A0\u4E0B\u5212\u7EBF\uFF0C\u4EE5\u907F\u514D\u989C\u8272\u6DE1\u5316\u3002',"449":"\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u8FB9\u6846\u989C\u8272\u3002","450":"\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u524D\u666F\u8272\u3002","451":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u8303\u56F4\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","452":"\u6982\u89C8\u6807\u5C3A\u4E2D\u9519\u8BEF\u6807\u8BB0\u7684\u989C\u8272\u3002","453":"\u6982\u89C8\u6807\u5C3A\u4E2D\u8B66\u544A\u6807\u8BB0\u7684\u989C\u8272\u3002","454":"\u6982\u89C8\u6807\u5C3A\u4E2D\u4FE1\u606F\u6807\u8BB0\u7684\u989C\u8272\u3002","455":"\u62EC\u53F7\u7684\u524D\u666F\u8272(1)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","456":"\u62EC\u53F7\u7684\u524D\u666F\u8272(2)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","457":"\u62EC\u53F7\u7684\u524D\u666F\u8272(3)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","458":"\u62EC\u53F7\u7684\u524D\u666F\u8272(4)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","459":"\u62EC\u53F7\u7684\u524D\u666F\u8272(5)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","460":"\u62EC\u53F7\u7684\u524D\u666F\u8272(6)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","461":"\u65B9\u62EC\u53F7\u51FA\u73B0\u610F\u5916\u7684\u524D\u666F\u8272\u3002","462":"\u9009\u62E9\u5B9A\u4F4D\u70B9","463":"\u5B9A\u4F4D\u70B9\u8BBE\u7F6E\u4E3A {0}:{1}","464":"\u8BBE\u7F6E\u9009\u62E9\u5B9A\u4F4D\u70B9","465":"\u8F6C\u5230\u9009\u62E9\u5B9A\u4F4D\u70B9","466":"\u9009\u62E9\u4ECE\u5B9A\u4F4D\u70B9\u5230\u5149\u6807","467":"\u53D6\u6D88\u9009\u62E9\u5B9A\u4F4D\u70B9","468":"\u6982\u89C8\u6807\u5C3A\u4E0A\u8868\u793A\u5339\u914D\u62EC\u53F7\u7684\u6807\u8BB0\u989C\u8272\u3002","469":"\u8F6C\u5230\u62EC\u53F7","470":"\u9009\u62E9\u62EC\u53F7\u6240\u6709\u5185\u5BB9","471":"\u8F6C\u5230\u62EC\u53F7(&&B)","472":"\u5411\u5DE6\u79FB\u52A8\u6240\u9009\u6587\u672C","473":"\u5411\u53F3\u79FB\u52A8\u6240\u9009\u6587\u672C","474":"\u8F6C\u7F6E\u5B57\u6BCD","475":"\u526A\u5207(&&T)","476":"\u526A\u5207","477":"\u590D\u5236(&&C)","478":"\u590D\u5236","479":"\u590D\u5236\u4E3A","480":"\u7C98\u8D34(&&P)","481":"\u7C98\u8D34","482":"\u590D\u5236\u5E76\u7A81\u51FA\u663E\u793A\u8BED\u6CD5","483":"\u8981\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7684\u79CD\u7C7B\u3002","484":"\u63A7\u5236\u4F55\u65F6\u5E94\u7528\u8FD4\u56DE\u7684\u64CD\u4F5C\u3002","485":"\u59CB\u7EC8\u5E94\u7528\u7B2C\u4E00\u4E2A\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","486":"\u5982\u679C\u4EC5\u8FD4\u56DE\u7684\u7B2C\u4E00\u4E2A\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u7528\u8BE5\u64CD\u4F5C\u3002","487":"\u4E0D\u8981\u5E94\u7528\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","488":"\u5982\u679C\u53EA\u5E94\u8FD4\u56DE\u9996\u9009\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u8FD4\u56DE\u63A7\u4EF6\u3002","489":"\u5E94\u7528\u4EE3\u7801\u64CD\u4F5C\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF","490":"\u5FEB\u901F\u4FEE\u590D...","491":"\u6CA1\u6709\u53EF\u7528\u7684\u4EE3\u7801\u64CD\u4F5C","492":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C',"493":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u4EE3\u7801\u64CD\u4F5C',"494":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C","495":"\u91CD\u6784...","496":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u91CD\u6784',"497":'\u6CA1\u6709\u53EF\u7528\u7684"{0}"\u91CD\u6784',"498":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u91CD\u6784","499":"\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u6784\u64CD\u4F5C","500":"\u6E90\u4EE3\u7801\u64CD\u4F5C...","501":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u6E90\u64CD\u4F5C',"502":"\u6CA1\u6709\u9002\u7528\u4E8E\u201C {0}\u201D\u7684\u6E90\u64CD\u4F5C","503":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u6E90\u64CD\u4F5C","504":"\u6CA1\u6709\u53EF\u7528\u7684\u6E90\u4EE3\u7801\u64CD\u4F5C","505":"\u6574\u7406 import \u8BED\u53E5","506":"\u6CA1\u6709\u53EF\u7528\u7684\u6574\u7406 import \u8BED\u53E5\u64CD\u4F5C","507":"\u5168\u90E8\u4FEE\u590D","508":"\u6CA1\u6709\u53EF\u7528\u7684\u201C\u5168\u90E8\u4FEE\u590D\u201D\u64CD\u4F5C","509":"\u81EA\u52A8\u4FEE\u590D...","510":"\u6CA1\u6709\u53EF\u7528\u7684\u81EA\u52A8\u4FEE\u590D\u7A0B\u5E8F","511":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u3002\u9996\u9009\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D({0})","512":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C({0})","513":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C","514":"\u663E\u793A\u5F53\u524D\u884C\u7684 Code Lens \u547D\u4EE4","515":"\u5207\u6362\u884C\u6CE8\u91CA","516":"\u5207\u6362\u884C\u6CE8\u91CA(&&T)","517":"\u6DFB\u52A0\u884C\u6CE8\u91CA","518":"\u5220\u9664\u884C\u6CE8\u91CA","519":"\u5207\u6362\u5757\u6CE8\u91CA","520":"\u5207\u6362\u5757\u6CE8\u91CA(&&B)","521":"\u663E\u793A\u7F16\u8F91\u5668\u4E0A\u4E0B\u6587\u83DC\u5355","522":"\u5149\u6807\u64A4\u6D88","523":"\u5149\u6807\u91CD\u505A","524":"\u67E5\u627E","525":"\u67E5\u627E(&&F)","526":"\u67E5\u627E\u9009\u5B9A\u5185\u5BB9","527":"\u67E5\u627E\u4E0B\u4E00\u4E2A","528":"\u67E5\u627E\u4E0A\u4E00\u4E2A","529":"\u67E5\u627E\u4E0B\u4E00\u4E2A\u9009\u62E9","530":"\u67E5\u627E\u4E0A\u4E00\u4E2A\u9009\u62E9","531":"\u66FF\u6362","532":"\u66FF\u6362(&&R)","533":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u56FE\u6807\u3002","534":"\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u6298\u53E0\u7684\u56FE\u6807\u3002","535":"\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u5C55\u5F00\u7684\u56FE\u6807\u3002","536":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u66FF\u6362\u201D\u56FE\u6807\u3002","537":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5168\u90E8\u66FF\u6362\u201D\u56FE\u6807\u3002","538":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0A\u4E00\u4E2A\u201D\u56FE\u6807\u3002","539":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0B\u4E00\u4E2A\u201D\u56FE\u6807\u3002","540":"\u4E0A\u4E00\u4E2A\u5339\u914D\u9879","541":"\u4E0B\u4E00\u4E2A\u5339\u914D\u9879","542":"\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E","543":"\u5168\u90E8\u66FF\u6362","544":"\u5207\u6362\u66FF\u6362","545":"\u4EC5\u9AD8\u4EAE\u4E86\u524D {0} \u4E2A\u7ED3\u679C\uFF0C\u4F46\u6240\u6709\u67E5\u627E\u64CD\u4F5C\u5747\u9488\u5BF9\u5168\u6587\u3002","546":"{1} \u4E2D\u7684 {0}","547":"\u65E0\u7ED3\u679C","548":"\u627E\u5230 {0}","549":"\u4E3A\u201C{1}\u201D\u627E\u5230 {0}","550":"\u5728 {2} \u5904\u627E\u5230\u201C{1}\u201D\u7684 {0}","551":"Ctrl+Enter \u73B0\u5728\u7531\u5168\u90E8\u66FF\u6362\u6539\u4E3A\u63D2\u5165\u6362\u884C\u3002\u4F60\u53EF\u4EE5\u4FEE\u6539editor.action.replaceAll \u7684\u6309\u952E\u7ED1\u5B9A\u4EE5\u8986\u76D6\u6B64\u884C\u4E3A\u3002","552":"\u5C55\u5F00","553":"\u4EE5\u9012\u5F52\u65B9\u5F0F\u5C55\u5F00","554":"\u6298\u53E0","555":"\u5207\u6362\u6298\u53E0","556":"\u4EE5\u9012\u5F52\u65B9\u5F0F\u6298\u53E0","557":"\u6298\u53E0\u6240\u6709\u5757\u6CE8\u91CA","558":"\u6298\u53E0\u6240\u6709\u533A\u57DF","559":"\u5C55\u5F00\u6240\u6709\u533A\u57DF","560":"\u6298\u53E0\u9664\u6240\u9009\u533A\u57DF\u4E4B\u5916\u7684\u6240\u6709\u533A\u57DF","561":"\u5C55\u5F00\u9664\u6240\u9009\u533A\u57DF\u4E4B\u5916\u7684\u6240\u6709\u533A\u57DF","562":"\u5168\u90E8\u6298\u53E0","563":"\u5168\u90E8\u5C55\u5F00","564":"\u8DF3\u8F6C\u5230\u7236\u7EA7\u6298\u53E0","565":"Go to Previous Folding Range","566":"Go to Next Folding Range","567":"\u6298\u53E0\u7EA7\u522B {0}","568":"\u6298\u53E0\u8303\u56F4\u540E\u9762\u7684\u80CC\u666F\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u8BBE\u4E3A\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","569":"\u7F16\u8F91\u5668\u88C5\u8BA2\u7EBF\u4E2D\u6298\u53E0\u63A7\u4EF6\u7684\u989C\u8272\u3002","570":"\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u5C55\u5F00\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","571":"\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u6298\u53E0\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","572":"\u653E\u5927\u7F16\u8F91\u5668\u5B57\u4F53","573":"\u7F29\u5C0F\u7F16\u8F91\u5668\u5B57\u4F53","574":"\u91CD\u7F6E\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F","575":"\u5728\u7B2C {0} \u884C\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","576":"\u5728\u7B2C {1} \u884C\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91","577":"\u7B2C {0} \u884C\u5230\u7B2C {1} \u884C\u95F4\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","578":"\u7B2C {1} \u884C\u5230\u7B2C {2} \u884C\u95F4\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91","579":"\u683C\u5F0F\u5316\u6587\u6863","580":"\u683C\u5F0F\u5316\u9009\u5B9A\u5185\u5BB9","581":"\u8F6C\u5230\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","582":"\u201C\u8F6C\u5230\u4E0B\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","583":"\u8F6C\u5230\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","584":"\u201C\u8F6C\u5230\u4E0A\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","585":"\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","586":"\u4E0B\u4E00\u4E2A\u95EE\u9898(&&P)","587":"\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","588":"\u4E0A\u4E00\u4E2A\u95EE\u9898(&&P)","589":"\u9519\u8BEF","590":"\u8B66\u544A","591":"\u4FE1\u606F","592":"\u63D0\u793A","593":"{1} \u4E2D\u7684 {0}","594":"{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","595":"{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","596":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u989C\u8272\u3002","597":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u6807\u9898\u80CC\u666F\u8272\u3002","598":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u989C\u8272\u3002","599":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u6807\u9898\u80CC\u666F\u8272\u3002","600":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u989C\u8272\u3002","601":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u6807\u9898\u80CC\u666F\u8272\u3002","602":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u80CC\u666F\u8272\u3002","603":"\u5FEB\u901F\u67E5\u770B","604":"\u5B9A\u4E49","605":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u4EFB\u4F55\u5B9A\u4E49","606":"\u627E\u4E0D\u5230\u5B9A\u4E49","607":"\u8F6C\u5230\u5B9A\u4E49","608":"\u6253\u5F00\u4FA7\u8FB9\u7684\u5B9A\u4E49","609":"\u901F\u89C8\u5B9A\u4E49","610":"\u58F0\u660E","611":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u58F0\u660E","612":"\u672A\u627E\u5230\u58F0\u660E","613":"\u8F6C\u5230\u58F0\u660E","614":"\u67E5\u770B\u58F0\u660E","615":"\u7C7B\u578B\u5B9A\u4E49","616":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u7C7B\u578B\u5B9A\u4E49","617":"\u672A\u627E\u5230\u7C7B\u578B\u5B9A\u4E49","618":"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49","619":"\u5FEB\u901F\u67E5\u770B\u7C7B\u578B\u5B9A\u4E49","620":"\u5B9E\u73B0","621":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u5B9E\u73B0","622":"\u672A\u627E\u5230\u5B9E\u73B0","623":"\u8F6C\u5230\u5B9E\u73B0","624":"\u67E5\u770B\u5B9E\u73B0","625":'\u672A\u627E\u5230"{0}"\u7684\u5F15\u7528',"626":"\u672A\u627E\u5230\u5F15\u7528","627":"\u8F6C\u5230\u5F15\u7528","628":"\u5F15\u7528","629":"\u67E5\u770B\u5F15\u7528","630":"\u8F6C\u5230\u4EFB\u4F55\u7B26\u53F7","631":"\u4F4D\u7F6E","632":"\u65E0\u201C{0}\u201D\u7684\u7ED3\u679C","633":"\u8F6C\u5230\u5B9A\u4E49(&&D)","634":"\u8F6C\u5230\u58F0\u660E(&&D)","635":"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49(&&T)","636":"\u8F6C\u5230\u5B9E\u73B0(&&I)","637":"\u8F6C\u5230\u5F15\u7528(&&R)","638":"\u5355\u51FB\u663E\u793A {0} \u4E2A\u5B9A\u4E49\u3002","639":"\u5F15\u7528\u901F\u89C8\u662F\u5426\u53EF\u89C1\uFF0C\u4F8B\u5982\u201C\u901F\u89C8\u5F15\u7528\u201D\u6216\u201C\u901F\u89C8\u5B9A\u4E49\u201D","640":"{0} \u4E2A\u5F15\u7528","641":"{0} \u4E2A\u5F15\u7528","642":"\u65E0\u53EF\u7528\u9884\u89C8","643":"\u5728\u6587\u4EF6 {0} \u7684 {1} \u884C {2} \u5217\u7684\u7B26\u53F7","644":"{0} \u4E2D {1} \u884C {2} \u5217\u7684\u7B26\u53F7\uFF0C{3}","645":"{0} \u4E2D\u6709 1 \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {1}","646":"{1} \u4E2D\u6709 {0} \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {2}","647":"\u672A\u627E\u5230\u7ED3\u679C","648":"\u5728 {0} \u4E2D\u627E\u5230 1 \u4E2A\u7B26\u53F7","649":"\u5728 {1} \u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7","650":"\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7","651":"\u662F\u5426\u5B58\u5728\u53EA\u80FD\u901A\u8FC7\u952E\u76D8\u5BFC\u822A\u7684\u7B26\u53F7\u4F4D\u7F6E\u3002","652":"{1} \u7684\u7B26\u53F7 {0}\uFF0C\u4E0B\u4E00\u4E2A\u4F7F\u7528 {2}","653":"{1} \u7684\u7B26\u53F7 {0}","654":"\u663E\u793A\u60AC\u505C","655":"\u663E\u793A\u5B9A\u4E49\u9884\u89C8\u60AC\u505C","656":"\u51FA\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u672A\u5BF9\u957F\u884C\u8FDB\u884C\u89E3\u6790\u3002\u89E3\u6790\u957F\u5EA6\u9608\u503C\u53EF\u901A\u8FC7\u201Ceditor.maxTokenizationLineLength\u201D\u8FDB\u884C\u914D\u7F6E\u3002","657":"\u67E5\u770B\u95EE\u9898","658":"\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D","659":"\u6B63\u5728\u68C0\u67E5\u5FEB\u901F\u4FEE\u590D...","660":"\u66FF\u6362\u4E3A\u4E0A\u4E00\u4E2A\u503C","661":"\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u503C","662":"\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u7A7A\u683C","663":"\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u5236\u8868\u7B26","664":"\u5DF2\u914D\u7F6E\u5236\u8868\u7B26\u5927\u5C0F","665":"\u9009\u62E9\u5F53\u524D\u6587\u4EF6\u7684\u5236\u8868\u7B26\u5927\u5C0F","666":'\u4F7F\u7528 "Tab" \u7F29\u8FDB',"667":"\u4F7F\u7528\u7A7A\u683C\u7F29\u8FDB","668":"\u4ECE\u5185\u5BB9\u4E2D\u68C0\u6D4B\u7F29\u8FDB\u65B9\u5F0F","669":"\u91CD\u65B0\u7F29\u8FDB\u884C","670":"\u91CD\u65B0\u7F29\u8FDB\u6240\u9009\u884C","671":"\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1","672":"\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u4EE5\u7A7A\u767D\u5F00\u5934","673":"\u663E\u793A\u4E0B\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","674":"\u663E\u793A\u4E0A\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","675":"\u89E6\u53D1\u5185\u8054\u5EFA\u8BAE","676":"\u4E0B\u4E00\u4E2A","677":"\u4E0A\u4E00\u4E2A","678":"\u63A5\u53D7","679":"\u5EFA\u8BAE:","680":"\u5411\u4E0A\u590D\u5236\u884C","681":"\u5411\u4E0A\u590D\u5236\u4E00\u884C(&&C)","682":"\u5411\u4E0B\u590D\u5236\u884C","683":"\u5411\u4E0B\u590D\u5236\u4E00\u884C(&&P)","684":"\u91CD\u590D\u9009\u62E9","685":"\u91CD\u590D\u9009\u62E9(&&D)","686":"\u5411\u4E0A\u79FB\u52A8\u884C","687":"\u5411\u4E0A\u79FB\u52A8\u4E00\u884C(&&V)","688":"\u5411\u4E0B\u79FB\u52A8\u884C","689":"\u5411\u4E0B\u79FB\u52A8\u4E00\u884C(&&L)","690":"\u6309\u5347\u5E8F\u6392\u5217\u884C","691":"\u6309\u964D\u5E8F\u6392\u5217\u884C","692":"\u88C1\u526A\u5C3E\u968F\u7A7A\u683C","693":"\u5220\u9664\u884C","694":"\u884C\u7F29\u8FDB","695":"\u884C\u51CF\u5C11\u7F29\u8FDB","696":"\u5728\u4E0A\u9762\u63D2\u5165\u884C","697":"\u5728\u4E0B\u9762\u63D2\u5165\u884C","698":"\u5220\u9664\u5DE6\u4FA7\u6240\u6709\u5185\u5BB9","699":"\u5220\u9664\u53F3\u4FA7\u6240\u6709\u5185\u5BB9","700":"\u5408\u5E76\u884C","701":"\u8F6C\u7F6E\u5149\u6807\u5904\u7684\u5B57\u7B26","702":"\u8F6C\u6362\u4E3A\u5927\u5199","703":"\u8F6C\u6362\u4E3A\u5C0F\u5199","704":"\u8F6C\u6362\u4E3A\u8BCD\u9996\u5B57\u6BCD\u5927\u5199","705":"\u8F6C\u6362\u4E3A\u86C7\u5F62\u547D\u540D\u6CD5","706":"\u542F\u52A8\u94FE\u63A5\u7F16\u8F91","707":"\u7F16\u8F91\u5668\u6839\u636E\u7C7B\u578B\u81EA\u52A8\u91CD\u547D\u540D\u65F6\u7684\u80CC\u666F\u8272\u3002","708":"\u6267\u884C\u547D\u4EE4","709":"\u5173\u6CE8\u94FE\u63A5","710":"cmd + \u5355\u51FB","711":"ctrl + \u5355\u51FB","712":"option + \u5355\u51FB","713":"alt + \u5355\u51FB","714":"\u6267\u884C\u547D\u4EE4 {0}","715":"\u6B64\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u65E0\u6CD5\u6253\u5F00: {0}","716":"\u6B64\u94FE\u63A5\u76EE\u6807\u5DF2\u4E22\u5931\uFF0C\u65E0\u6CD5\u6253\u5F00\u3002","717":"\u6253\u5F00\u94FE\u63A5","718":"\u7F16\u8F91\u5668\u5F53\u524D\u662F\u5426\u6B63\u5728\u663E\u793A\u5185\u8054\u6D88\u606F","719":"\u65E0\u6CD5\u5728\u53EA\u8BFB\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91","720":"\u6DFB\u52A0\u7684\u5149\u6807: {0}","721":"\u6DFB\u52A0\u7684\u6E38\u6807: {0}","722":"\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807","723":"\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807(&&A)","724":"\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807","725":"\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807(&&D)","726":"\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807","727":"\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807(&&U)","728":"\u5728\u5E95\u90E8\u6DFB\u52A0\u5149\u6807","729":"\u5728\u9876\u90E8\u6DFB\u52A0\u5149\u6807","730":"\u5C06\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879\u6DFB\u52A0\u5230\u9009\u62E9","731":"\u6DFB\u52A0\u4E0B\u4E00\u4E2A\u5339\u914D\u9879(&&N)","732":"\u5C06\u9009\u62E9\u5185\u5BB9\u6DFB\u52A0\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","733":"\u6DFB\u52A0\u4E0A\u4E00\u4E2A\u5339\u914D\u9879(&&R)","734":"\u5C06\u4E0A\u6B21\u9009\u62E9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879","735":"\u5C06\u4E0A\u4E2A\u9009\u62E9\u5185\u5BB9\u79FB\u52A8\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","736":"\u9009\u62E9\u6240\u6709\u627E\u5230\u7684\u67E5\u627E\u5339\u914D\u9879","737":"\u9009\u62E9\u6240\u6709\u5339\u914D\u9879(&&O)","738":"\u66F4\u6539\u6240\u6709\u5339\u914D\u9879","739":"\u89E6\u53D1\u53C2\u6570\u63D0\u793A","740":"\u201C\u663E\u793A\u4E0B\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","741":"\u201C\u663E\u793A\u4E0A\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","742":"{0}\uFF0C\u63D0\u793A","743":"\u901F\u89C8\u4E2D\u662F\u5426\u5D4C\u5165\u4E86\u5F53\u524D\u4EE3\u7801\u7F16\u8F91\u5668","744":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u533A\u57DF\u80CC\u666F\u989C\u8272\u3002","745":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u989C\u8272\u3002","746":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u4FE1\u606F\u989C\u8272\u3002","747":"\u901F\u89C8\u89C6\u56FE\u8FB9\u6846\u548C\u7BAD\u5934\u989C\u8272\u3002","748":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u80CC\u666F\u8272\u3002","749":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u884C\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","750":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6587\u4EF6\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","751":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","752":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","753":"\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","754":"\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u88C5\u8BA2\u7EBF\u7684\u80CC\u666F\u8272\u3002","755":"\u5728\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","756":"\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","757":"\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u9879\u7684\u7A81\u51FA\u663E\u793A\u8FB9\u6846\u3002","758":"\u5148\u6253\u5F00\u6587\u672C\u7F16\u8F91\u5668\u7136\u540E\u8DF3\u8F6C\u5230\u884C\u3002","759":"\u8F6C\u5230\u7B2C {0} \u884C\u7B2C {1} \u4E2A\u5B57\u7B26\u3002","760":"\u8F6C\u5230\u884C {0}\u3002","761":"\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002\u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7(\u4ECB\u4E8E 1 \u81F3 {2} \u4E4B\u95F4)\u3002","762":"\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002 \u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7\u3002","763":"\u8981\u8F6C\u5230\u7B26\u53F7\uFF0C\u9996\u5148\u6253\u5F00\u5177\u6709\u7B26\u53F7\u4FE1\u606F\u7684\u6587\u672C\u7F16\u8F91\u5668\u3002","764":"\u6D3B\u52A8\u6587\u672C\u7F16\u8F91\u5668\u4E0D\u63D0\u4F9B\u7B26\u53F7\u4FE1\u606F\u3002","765":"\u6CA1\u6709\u5339\u914D\u7684\u7F16\u8F91\u5668\u7B26\u53F7","766":"\u6CA1\u6709\u7F16\u8F91\u5668\u7B26\u53F7","767":"\u5728\u4FA7\u8FB9\u6253\u5F00","768":"\u5728\u5E95\u90E8\u6253\u5F00","769":"\u7B26\u53F7({0})","770":"\u5C5E\u6027({0})","771":"\u65B9\u6CD5({0})","772":"\u51FD\u6570({0})","773":"\u6784\u9020\u51FD\u6570 ({0})","774":"\u53D8\u91CF({0})","775":"\u7C7B({0})","776":"\u7ED3\u6784({0})","777":"\u4E8B\u4EF6({0})","778":"\u8FD0\u7B97\u7B26({0})","779":"\u63A5\u53E3({0})","780":"\u547D\u540D\u7A7A\u95F4({0})","781":"\u5305({0})","782":"\u7C7B\u578B\u53C2\u6570({0})","783":"\u6A21\u5757({0})","784":"\u679A\u4E3E({0})","785":"\u679A\u4E3E\u6210\u5458({0})","786":"\u5B57\u7B26\u4E32({0})","787":"\u6587\u4EF6({0})","788":"\u6570\u7EC4({0})","789":"\u6570\u5B57({0})","790":"\u5E03\u5C14\u503C({0})","791":"\u5BF9\u8C61({0})","792":"\u952E({0})","793":"\u5B57\u6BB5({0})","794":"\u5E38\u91CF({0})","795":"\u65E0\u7ED3\u679C\u3002","796":"\u89E3\u6790\u91CD\u547D\u540D\u4F4D\u7F6E\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF","797":"\u6B63\u5728\u91CD\u547D\u540D\u201C{0}\u201D","798":"\u91CD\u547D\u540D {0}","799":"\u6210\u529F\u5C06\u201C{0}\u201D\u91CD\u547D\u540D\u4E3A\u201C{1}\u201D\u3002\u6458\u8981: {2}","800":"\u91CD\u547D\u540D\u65E0\u6CD5\u5E94\u7528\u4FEE\u6539","801":"\u91CD\u547D\u540D\u65E0\u6CD5\u8BA1\u7B97\u4FEE\u6539","802":"\u91CD\u547D\u540D\u7B26\u53F7","803":"\u542F\u7528/\u7981\u7528\u91CD\u547D\u540D\u4E4B\u524D\u9884\u89C8\u66F4\u6539\u7684\u529F\u80FD","804":"\u91CD\u547D\u540D\u8F93\u5165\u5C0F\u7EC4\u4EF6\u662F\u5426\u53EF\u89C1","805":'\u91CD\u547D\u540D\u8F93\u5165\u3002\u952E\u5165\u65B0\u540D\u79F0\u5E76\u6309 "Enter" \u63D0\u4EA4\u3002',"806":"\u6309 {0} \u8FDB\u884C\u91CD\u547D\u540D\uFF0C\u6309 {1} \u8FDB\u884C\u9884\u89C8","807":"\u5C55\u5F00\u9009\u62E9","808":"\u6269\u5927\u9009\u533A(&&E)","809":"\u6536\u8D77\u9009\u62E9","810":"\u7F29\u5C0F\u9009\u533A(&&S)","811":"\u7F16\u8F91\u5668\u76EE\u524D\u662F\u5426\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B","812":"\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0B\u4E00\u5236\u8868\u4F4D","813":"\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0A\u4E00\u5236\u8868\u4F4D","814":"\u661F\u671F\u5929","815":"\u661F\u671F\u4E00","816":"\u661F\u671F\u4E8C","817":"\u661F\u671F\u4E09","818":"\u661F\u671F\u56DB","819":"\u661F\u671F\u4E94","820":"\u661F\u671F\u516D","821":"\u5468\u65E5","822":"\u5468\u4E00","823":"\u5468\u4E8C","824":"\u5468\u4E09","825":"\u5468\u56DB","826":"\u5468\u4E94","827":"\u5468\u516D","828":"\u4E00\u6708","829":"\u4E8C\u6708","830":"\u4E09\u6708","831":"\u56DB\u6708","832":"5\u6708","833":"\u516D\u6708","834":"\u4E03\u6708","835":"\u516B\u6708","836":"\u4E5D\u6708","837":"\u5341\u6708","838":"\u5341\u4E00\u6708","839":"\u5341\u4E8C\u6708","840":"1\u6708","841":"2\u6708","842":"3\u6708","843":"4\u6708","844":"6\u6708","845":"7\u6708","846":"8\u6708","847":"9\u6708","848":"10\u6708","849":"11 \u6708","850":"12\u6708","851":"\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1","852":"\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u5426\u53EF\u89C1","853":"\u662F\u5426\u5B58\u5728\u591A\u6761\u5EFA\u8BAE\u53EF\u4F9B\u9009\u62E9","854":"\u63D2\u5165\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u4F1A\u5BFC\u81F4\u66F4\u6539\u6216\u5BFC\u81F4\u5DF2\u952E\u5165\u6240\u6709\u5185\u5BB9","855":"\u6309 Enter \u65F6\u662F\u5426\u4F1A\u63D2\u5165\u5EFA\u8BAE","856":"\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u5177\u6709\u63D2\u5165\u548C\u66FF\u6362\u884C\u4E3A","857":"\u9ED8\u8BA4\u884C\u4E3A\u662F\u5426\u662F\u63D2\u5165\u6216\u66FF\u6362","858":"\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u652F\u6301\u89E3\u6790\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F","859":"\u9009\u62E9\u201C{0}\u201D\u540E\u8FDB\u884C\u4E86\u5176\u4ED6 {1} \u6B21\u7F16\u8F91","860":"\u89E6\u53D1\u5EFA\u8BAE","861":"\u63D2\u5165","862":"\u663E\u793A\u66F4\u5C11","863":"\u663E\u793A\u66F4\u591A","864":"\u91CD\u7F6E\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u5927\u5C0F","865":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","866":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002","867":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u524D\u666F\u8272\u3002","868":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","869":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u56FE\u6807\u524D\u666F\u8272\u3002","870":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","871":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","872":"\u5F53\u67D0\u9879\u83B7\u5F97\u7126\u70B9\u65F6\uFF0C\u5728\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7A81\u51FA\u663E\u793A\u7684\u5339\u914D\u9879\u7684\u989C\u8272\u3002","873":"\u65E0\u5EFA\u8BAE\u3002","874":"{0}\uFF0C\u6587\u6863: {1}","875":"\u5EFA\u8BAE","876":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u8BE6\u7EC6\u4FE1\u606F\u7684\u56FE\u6807\u3002","877":"\u4E86\u89E3\u8BE6\u7EC6\u4FE1\u606F","878":"\u6570\u7EC4\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","879":"\u5E03\u5C14\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","880":"\u7C7B\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","881":"\u989C\u8272\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","882":"\u5E38\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","883":"\u6784\u9020\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","884":"\u679A\u4E3E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","885":"\u679A\u4E3E\u5668\u6210\u5458\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","886":"\u4E8B\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","887":"\u5B57\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","888":"\u6587\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","889":"\u6587\u4EF6\u5939\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","890":"\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","891":"\u63A5\u53E3\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","892":"\u952E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","893":"\u5173\u952E\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","894":"\u65B9\u6CD5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","895":"\u6A21\u5757\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","896":"\u547D\u540D\u7A7A\u95F4\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","897":"\u7A7A\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","898":"\u6570\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","899":"\u5BF9\u8C61\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","900":"\u8FD0\u7B97\u7B26\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","901":"\u5305\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","902":"\u5C5E\u6027\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","903":"\u53C2\u8003\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","904":"\u7247\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","905":"\u5B57\u7B26\u4E32\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","906":"\u7ED3\u6784\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","907":"\u6587\u672C\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","908":"\u7C7B\u578B\u53C2\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","909":"\u5355\u4F4D\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","910":"\u53D8\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","911":"\u5207\u6362 Tab \u952E\u79FB\u52A8\u7126\u70B9","912":"Tab \u952E\u5C06\u79FB\u52A8\u5230\u4E0B\u4E00\u53EF\u805A\u7126\u7684\u5143\u7D20","913":"Tab \u952E\u5C06\u63D2\u5165\u5236\u8868\u7B26","914":"\u5F00\u53D1\u4EBA\u5458: \u5F3A\u5236\u91CD\u65B0\u8FDB\u884C\u6807\u8BB0","915":"\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","916":"\u68C0\u6D4B\u5230\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","917":`\u6587\u4EF6\u201C{0}\u201D\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\uFF0C\u4F8B\u5982\u884C\u5206\u9694\u7B26(LS)\u6216\u6BB5\u843D\u5206\u9694\u7B26(PS)\u3002\r +\r +\u5EFA\u8BAE\u4ECE\u6587\u4EF6\u4E2D\u5220\u9664\u5B83\u4EEC\u3002\u53EF\u901A\u8FC7\u201Ceditor.unusualLineTerminators\u201D\u8FDB\u884C\u914D\u7F6E\u3002`,"918":"\u5220\u9664\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","919":"\u5FFD\u7565","920":"\u8BFB\u53D6\u8BBF\u95EE\u671F\u95F4\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","921":"\u5199\u5165\u8BBF\u95EE\u8FC7\u7A0B\u4E2D\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","922":"\u7B26\u53F7\u5728\u8FDB\u884C\u8BFB\u53D6\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u3002","923":"\u7B26\u53F7\u5728\u8FDB\u884C\u5199\u5165\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u3002","924":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","925":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u5199\u6743\u9650\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","926":"\u8F6C\u5230\u4E0B\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","927":"\u8F6C\u5230\u4E0A\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","928":"\u89E6\u53D1\u7B26\u53F7\u9AD8\u4EAE","929":"\u5220\u9664 Word","930":"\u9ED8\u8BA4\u8BED\u8A00\u914D\u7F6E\u66FF\u4EE3","931":"\u9488\u5BF9\u67D0\u79CD\u8BED\u8A00\uFF0C\u914D\u7F6E\u66FF\u4EE3\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002","932":"\u6B64\u8BBE\u7F6E\u4E0D\u652F\u6301\u6309\u8BED\u8A00\u914D\u7F6E\u3002","933":"\u65E0\u6CD5\u6CE8\u518C\u7A7A\u5C5E\u6027","934":'\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u5176\u7B26\u5408\u63CF\u8FF0\u7279\u5B9A\u8BED\u8A00\u7F16\u8F91\u5668\u8BBE\u7F6E\u7684\u8868\u8FBE\u5F0F "\\\\[.*\\\\]$"\u3002\u8BF7\u4F7F\u7528 "configurationDefaults"\u3002',"935":"\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u6B64\u5C5E\u6027\u5DF2\u6CE8\u518C\u3002","936":"\u7528\u4E8E\u8FD4\u56DE\u4E0A\u4E0B\u6587\u952E\u7684\u76F8\u5173\u4FE1\u606F\u7684\u547D\u4EE4","937":"\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u4E3A Windows","938":"({0})\u5DF2\u6309\u4E0B\u3002\u6B63\u5728\u7B49\u5F85\u6309\u4E0B\u7B2C\u4E8C\u4E2A\u952E...","939":"\u7EC4\u5408\u952E({0}\uFF0C{1})\u4E0D\u662F\u547D\u4EE4\u3002","940":"\u5DE5\u4F5C\u53F0","941":"\u5728\u901A\u8FC7\u9F20\u6807\u591A\u9009\u6811\u548C\u5217\u8868\u6761\u76EE\u65F6\u4F7F\u7528\u7684\u4FEE\u6539\u952E (\u4F8B\u5982\u201C\u8D44\u6E90\u7BA1\u7406\u5668\u201D\u3001\u201C\u6253\u5F00\u7684\u7F16\u8F91\u5668\u201D\u548C\u201C\u6E90\u4EE3\u7801\u7BA1\u7406\u201D\u89C6\u56FE)\u3002\u201C\u5728\u4FA7\u8FB9\u6253\u5F00\u201D\u529F\u80FD\u6240\u9700\u7684\u9F20\u6807\u52A8\u4F5C (\u82E5\u53EF\u7528) \u5C06\u4F1A\u76F8\u5E94\u8C03\u6574\uFF0C\u4E0D\u4E0E\u591A\u9009\u4FEE\u6539\u952E\u51B2\u7A81\u3002","942":"\u63A7\u5236\u5982\u4F55\u4F7F\u7528\u9F20\u6807\u6253\u5F00\u6811\u548C\u5217\u8868\u4E2D\u7684\u9879(\u82E5\u652F\u6301)\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u6B64\u8BBE\u7F6E\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u5B83\u3002","943":"\u63A7\u5236\u5217\u8868\u548C\u6811\u662F\u5426\u652F\u6301\u5DE5\u4F5C\u53F0\u4E2D\u7684\u6C34\u5E73\u6EDA\u52A8\u3002\u8B66\u544A: \u6253\u5F00\u6B64\u8BBE\u7F6E\u5F71\u54CD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","944":"\u63A7\u5236\u6811\u7F29\u8FDB(\u4EE5\u50CF\u7D20\u4E3A\u5355\u4F4D)\u3002","945":"\u63A7\u5236\u6811\u662F\u5426\u5E94\u5448\u73B0\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","946":"\u63A7\u5236\u5217\u8868\u548C\u6811\u662F\u5426\u5177\u6709\u5E73\u6ED1\u6EDA\u52A8\u6548\u679C\u3002","947":"\u7B80\u5355\u952E\u76D8\u5BFC\u822A\u805A\u7126\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u4EC5\u5BF9\u524D\u7F00\u8FDB\u884C\u5339\u914D\u3002","948":"\u9AD8\u4EAE\u952E\u76D8\u5BFC\u822A\u4F1A\u7A81\u51FA\u663E\u793A\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u8FDB\u4E00\u6B65\u5411\u4E0A\u548C\u5411\u4E0B\u5BFC\u822A\u5C06\u4EC5\u904D\u5386\u7A81\u51FA\u663E\u793A\u7684\u5143\u7D20\u3002","949":"\u7B5B\u9009\u5668\u952E\u76D8\u5BFC\u822A\u5C06\u7B5B\u9009\u51FA\u5E76\u9690\u85CF\u4E0E\u952E\u76D8\u8F93\u5165\u4E0D\u5339\u914D\u7684\u6240\u6709\u5143\u7D20\u3002","950":"\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E2D\u7684\u5217\u8868\u548C\u6811\u7684\u952E\u76D8\u5BFC\u822A\u6837\u5F0F\u3002\u5B83\u53EF\u4E3A\u201C\u7B80\u5355\u201D\u3001\u201C\u7A81\u51FA\u663E\u793A\u201D\u6216\u201C\u7B5B\u9009\u201D\u3002","951":"\u63A7\u5236\u5217\u8868\u548C\u6811\u4E2D\u7684\u952E\u76D8\u5BFC\u822A\u662F\u5426\u4EC5\u901A\u8FC7\u952E\u5165\u81EA\u52A8\u89E6\u53D1\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `false` \uFF0C\u952E\u76D8\u5BFC\u822A\u53EA\u5728\u6267\u884C `list.toggleKeyboardNavigation` \u547D\u4EE4\u65F6\u89E6\u53D1\uFF0C\u60A8\u53EF\u4EE5\u4E3A\u8BE5\u547D\u4EE4\u6307\u5B9A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","952":"\u63A7\u5236\u5728\u5355\u51FB\u6587\u4EF6\u5939\u540D\u79F0\u65F6\u5982\u4F55\u6269\u5C55\u6811\u6587\u4EF6\u5939\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u6B64\u8BBE\u7F6E\u3002","953":"{0}, {1}","954":"\u6700\u8FD1\u4F7F\u7528","955":"\u5176\u4ED6\u547D\u4EE4","956":'\u547D\u4EE4"{0}"\u5BFC\u81F4\u9519\u8BEF ({1})',"957":"\u5168\u5C40\u547D\u4EE4","958":"\u7F16\u8F91\u5668\u547D\u4EE4","959":"\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","960":"\u9519\u8BEF\u4FE1\u606F\u7684\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","961":"\u5DE5\u4F5C\u53F0\u4E2D\u56FE\u6807\u7684\u9ED8\u8BA4\u989C\u8272\u3002","962":"\u7126\u70B9\u5143\u7D20\u7684\u6574\u4F53\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u5176\u4ED6\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","963":"\u5728\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","964":"\u5728\u6D3B\u52A8\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","965":"\u6587\u672C\u4E2D\u94FE\u63A5\u7684\u524D\u666F\u8272\u3002","966":"\u6587\u672C\u4E2D\u94FE\u63A5\u5728\u70B9\u51FB\u6216\u9F20\u6807\u60AC\u505C\u65F6\u7684\u524D\u666F\u8272 \u3002","967":"\u6587\u672C\u4E2D\u4EE3\u7801\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","968":"\u7F16\u8F91\u5668\u5185\u5C0F\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u7684\u9634\u5F71\u989C\u8272\u3002","969":"\u8F93\u5165\u6846\u80CC\u666F\u8272\u3002","970":"\u8F93\u5165\u6846\u524D\u666F\u8272\u3002","971":"\u8F93\u5165\u6846\u8FB9\u6846\u3002","972":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u9009\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","973":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u6FC0\u6D3B\u9009\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","974":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u7684\u9009\u9879\u7684\u524D\u666F\u8272\u3002","975":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","976":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","977":"\u4E25\u91CD\u6027\u4E3A\u4FE1\u606F\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","978":"\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u80CC\u666F\u8272\u3002","979":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u8B66\u544A\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","980":"\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","981":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","982":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","983":"\u4E25\u91CD\u6027\u4E3A\u9519\u8BEF\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","984":"\u4E0B\u62C9\u5217\u8868\u80CC\u666F\u8272\u3002","985":"\u4E0B\u62C9\u5217\u8868\u524D\u666F\u8272\u3002","986":"\u6309\u94AE\u524D\u666F\u8272\u3002","987":"\u6309\u94AE\u80CC\u666F\u8272\u3002","988":"\u6309\u94AE\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002","989":"Badge \u80CC\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","990":"Badge \u524D\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","991":"\u8868\u793A\u89C6\u56FE\u88AB\u6EDA\u52A8\u7684\u6EDA\u52A8\u6761\u9634\u5F71\u3002","992":"\u6EDA\u52A8\u6761\u6ED1\u5757\u80CC\u666F\u8272","993":"\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u8272","994":"\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u88AB\u70B9\u51FB\u65F6\u7684\u80CC\u666F\u8272\u3002","995":"\u8868\u793A\u957F\u65F6\u95F4\u64CD\u4F5C\u7684\u8FDB\u5EA6\u6761\u7684\u80CC\u666F\u8272\u3002","996":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","997":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","998":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","999":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1000":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1001":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1002":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1003":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1004":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1005":"\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1006":"\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1007":"\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","1008":"\u7F16\u8F91\u5668\u9ED8\u8BA4\u524D\u666F\u8272\u3002","1009":"\u7F16\u8F91\u5668\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u80CC\u666F\u989C\u8272\u3002","1010":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u524D\u666F\u8272\uFF0C\u5982\u67E5\u627E/\u66FF\u6362\u3002","1011":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u91CD\u5199\u65F6\u9002\u7528\u3002","1012":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u5927\u5C0F\u8C03\u6574\u6761\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8C03\u6574\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u989C\u8272\u8986\u76D6\u65F6\u4F7F\u7528\u3002","1013":"\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u9009\u53D6\u5668(\u5982\u547D\u4EE4\u8C03\u8272\u677F)\u7684\u5BB9\u5668\u3002","1014":"\u524D\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","1015":"\u6807\u9898\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","1016":"\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u6807\u7B7E\u7684\u989C\u8272\u3002","1017":"\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u8FB9\u6846\u7684\u989C\u8272\u3002","1018":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u80CC\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1019":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u524D\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1020":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1021":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u5E95\u90E8\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1022":"\u7F16\u8F91\u5668\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\u3002","1023":"\u7528\u4EE5\u5F70\u663E\u9AD8\u5BF9\u6BD4\u5EA6\u7684\u6240\u9009\u6587\u672C\u7684\u989C\u8272\u3002","1024":"\u975E\u6D3B\u52A8\u7F16\u8F91\u5668\u4E2D\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\uFF0C\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u88C5\u9970\u6548\u679C\u3002","1025":"\u5177\u6709\u4E0E\u6240\u9009\u9879\u76F8\u5173\u5185\u5BB9\u7684\u533A\u57DF\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1026":"\u4E0E\u6240\u9009\u9879\u5185\u5BB9\u76F8\u540C\u7684\u533A\u57DF\u7684\u8FB9\u6846\u989C\u8272\u3002","1027":"\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002","1028":"\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1029":"\u9650\u5236\u641C\u7D22\u8303\u56F4\u7684\u989C\u8272\u3002\u989C\u8272\u4E0D\u80FD\u4E0D\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","1030":"\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1031":"\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1032":"\u9650\u5236\u641C\u7D22\u7684\u8303\u56F4\u7684\u8FB9\u6846\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1033":"\u5728\u4E0B\u9762\u7A81\u51FA\u663E\u793A\u60AC\u505C\u7684\u5B57\u8BCD\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1034":"\u7F16\u8F91\u5668\u60AC\u505C\u63D0\u793A\u7684\u80CC\u666F\u989C\u8272\u3002","1035":"\u7F16\u8F91\u5668\u60AC\u505C\u7684\u524D\u666F\u989C\u8272\u3002","1036":"\u5149\u6807\u60AC\u505C\u65F6\u7F16\u8F91\u5668\u7684\u8FB9\u6846\u989C\u8272\u3002","1037":"\u7F16\u8F91\u5668\u60AC\u505C\u72B6\u6001\u680F\u7684\u80CC\u666F\u8272\u3002","1038":"\u6D3B\u52A8\u94FE\u63A5\u989C\u8272\u3002","1039":"\u5185\u8054\u63D0\u793A\u7684\u524D\u666F\u8272","1040":"\u5185\u8054\u63D0\u793A\u7684\u80CC\u666F\u8272","1041":"Foreground color of inline hints for types","1042":"Background color of inline hints for types","1043":"Foreground color of inline hints for parameters","1044":"Background color of inline hints for parameters","1045":"\u7528\u4E8E\u706F\u6CE1\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","1046":"\u7528\u4E8E\u706F\u6CE1\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","1047":"\u5DF2\u63D2\u5165\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1048":"\u5DF2\u5220\u9664\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1049":"\u63D2\u5165\u7684\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1050":"\u88AB\u5220\u9664\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1051":"\u4E24\u4E2A\u6587\u672C\u7F16\u8F91\u5668\u4E4B\u95F4\u7684\u8FB9\u6846\u989C\u8272\u3002","1052":"\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u5BF9\u89D2\u7EBF\u586B\u5145\u989C\u8272\u3002\u5BF9\u89D2\u7EBF\u586B\u5145\u7528\u4E8E\u5E76\u6392\u5DEE\u5F02\u89C6\u56FE\u3002","1053":"\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1054":"\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1055":"\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1056":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1057":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1058":"\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\u7684\u5217\u8868/\u6811\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","1059":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1060":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1061":"\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","1062":"\u975E\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u63A7\u4EF6\u4E2D\u7126\u70B9\u9879\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1063":"\u5217\u8868/\u6570\u975E\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1064":"\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u80CC\u666F\u989C\u8272\u3002","1065":"\u9F20\u6807\u5728\u9879\u76EE\u4E0A\u60AC\u505C\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u524D\u666F\u989C\u8272\u3002","1066":"\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u8FDB\u884C\u62D6\u653E\u7684\u80CC\u666F\u989C\u8272\u3002","1067":"\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5176\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","1068":"\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5339\u914D\u6D3B\u52A8\u805A\u7126\u9879\u7684\u7A81\u51FA\u663E\u793A\u5185\u5BB9\u7684\u5217\u8868/\u6811\u524D\u666F\u8272\u3002","1069":"\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","1070":"\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1071":"\u5F53\u6CA1\u6709\u5339\u914D\u9879\u65F6\uFF0C\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1072":"\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u6811\u63CF\u8FB9\u989C\u8272\u3002","1073":"\u8BF7\u6539\u7528 quickInputList.focusBackground","1074":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u524D\u666F\u8272\u3002","1075":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u53D6\u5668\u56FE\u6807\u524D\u666F\u8272\u3002","1076":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u80CC\u666F\u8272\u3002","1077":"\u83DC\u5355\u7684\u8FB9\u6846\u989C\u8272\u3002","1078":"\u83DC\u5355\u9879\u7684\u524D\u666F\u989C\u8272\u3002","1079":"\u83DC\u5355\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","1080":"\u83DC\u5355\u4E2D\u9009\u5B9A\u83DC\u5355\u9879\u7684\u524D\u666F\u8272\u3002","1081":"\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u80CC\u666F\u8272\u3002","1082":"\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1083":"\u83DC\u5355\u4E2D\u5206\u9694\u7EBF\u7684\u989C\u8272\u3002","1084":"\u4F7F\u7528\u9F20\u6807\u60AC\u505C\u5728\u64CD\u4F5C\u4E0A\u65F6\u663E\u793A\u5DE5\u5177\u680F\u80CC\u666F","1085":"\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","1086":"\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","1087":"\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","1088":"\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684\u5236\u8868\u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","1089":"\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1090":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u6240\u9009\u5185\u5BB9\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1091":"\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1092":"Minimap marker color for repeating editor selections.","1093":"\u7F16\u8F91\u5668\u9009\u533A\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u5BF9\u5E94\u7684\u6807\u8BB0\u989C\u8272\u3002","1094":"\u7528\u4E8E\u9519\u8BEF\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1095":"\u7528\u4E8E\u8B66\u544A\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1096":"\u8FF7\u4F60\u5730\u56FE\u80CC\u666F\u989C\u8272\u3002","1097":'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.',"1098":"\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u80CC\u666F\u989C\u8272\u3002","1099":"\u60AC\u505C\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","1100":"\u5355\u51FB\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","1101":"\u7528\u4E8E\u95EE\u9898\u9519\u8BEF\u56FE\u6807\u7684\u989C\u8272\u3002","1102":"\u7528\u4E8E\u95EE\u9898\u8B66\u544A\u56FE\u6807\u7684\u989C\u8272\u3002","1103":"\u7528\u4E8E\u95EE\u9898\u4FE1\u606F\u56FE\u6807\u7684\u989C\u8272\u3002","1104":"\u8981\u4F7F\u7528\u7684\u5B57\u4F53\u7684 ID\u3002\u5982\u679C\u672A\u8BBE\u7F6E\uFF0C\u5219\u4F7F\u7528\u6700\u5148\u5B9A\u4E49\u7684\u5B57\u4F53\u3002","1105":"\u4E0E\u56FE\u6807\u5B9A\u4E49\u5173\u8054\u7684\u5B57\u4F53\u5B57\u7B26\u3002","1106":"\u5C0F\u7EC4\u4EF6\u4E2D\u201C\u5173\u95ED\u201D\u64CD\u4F5C\u7684\u56FE\u6807\u3002","1107":"\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u5173\u95ED\u5E76\u4E14\u5DF2\u5728\u78C1\u76D8\u4E0A\u4FEE\u6539: {0}\u3002","1108":"\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u4EE5\u4E0D\u517C\u5BB9\u7684\u65B9\u5F0F\u4FEE\u6539: {0}\u3002","1109":"\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D\u3002{1}","1110":"\u65E0\u6CD5\u64A4\u6D88\u6240\u6709\u6587\u4EF6\u7684\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","1111":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","1112":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","1113":"\u662F\u5426\u8981\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D?","1114":"\u5728 {0} \u4E2A\u6587\u4EF6\u4E2D\u64A4\u6D88","1115":"\u64A4\u6D88\u6B64\u6587\u4EF6","1116":"\u53D6\u6D88","1117":"\u65E0\u6CD5\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002","1118":"\u662F\u5426\u8981\u64A4\u6D88\u201C{0}\u201D?","1119":"\u662F","1120":"\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u91CD\u505A\u201C{0}\u201D\u3002{1}","1121":"\u65E0\u6CD5\u5BF9\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","1122":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","1123":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","1124":"\u65E0\u6CD5\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002"}},NR=localStorage.getItem("magic-locale")||"zh-cn";function EU(r,e){let t;return e.length===0?t=r:t=r.replace(/{(d+)}/g,function(i,n){const s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function m(r,e){if(NR!=="en"){let s=SU[e]||-1;const o=xU[NR];s in o&&(e=o[s])}const t=[];for(var i=0,n=arguments.length;i<n;++i)t.push(arguments[i]);return EU(e,t)}var QS;const Vv="en";let RC=!1,OC=!1,Hv=!1,NB=!1,RB=!1,nD=!1,Lb,JS=Vv,kU,Rl;const yi=typeof self=="object"?self:typeof global=="object"?global:{};let Sn;typeof yi.vscode!="undefined"&&typeof yi.vscode.process!="undefined"?Sn=yi.vscode.process:typeof process!="undefined"&&(Sn=process);const LU=typeof((QS=Sn==null?void 0:Sn.versions)===null||QS===void 0?void 0:QS.electron)=="string"&&Sn.type==="renderer";if(typeof navigator=="object"&&!LU)Rl=navigator.userAgent,RC=Rl.indexOf("Windows")>=0,OC=Rl.indexOf("Macintosh")>=0,nD=(Rl.indexOf("Macintosh")>=0||Rl.indexOf("iPad")>=0||Rl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Hv=Rl.indexOf("Linux")>=0,RB=!0,Lb=navigator.language,JS=Lb;else if(typeof Sn=="object"){RC=Sn.platform==="win32",OC=Sn.platform==="darwin",Hv=Sn.platform==="linux",Hv&&!!Sn.env.SNAP&&Sn.env.SNAP_REVISION,Lb=Vv,JS=Vv;const r=Sn.env.VSCODE_NLS_CONFIG;if(r)try{const e=JSON.parse(r),t=e.availableLanguages["*"];Lb=e.locale,JS=t||Vv,kU=e._translationsConfigFile}catch{}NB=!0}else console.error("Unable to resolve platform.");const an=RC,tt=OC,ir=Hv,io=NB,_g=RB,ra=nD,TU=Rl,RE=function(){if(yi.setImmediate)return yi.setImmediate.bind(yi);if(typeof yi.postMessage=="function"&&!yi.importScripts){let t=[];yi.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a.id===n.data.vscodeSetImmediateId){t.splice(s,1),a.callback();return}}});let i=0;return n=>{const s=++i;t.push({id:s,callback:n}),yi.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(Sn==null?void 0:Sn.nextTick)=="function")return Sn.nextTick.bind(Sn);const e=Promise.resolve();return t=>e.then(t)}(),Cs=OC||nD?2:RC?1:3;let RR=!0,OR=!1;function OB(){if(!OR){OR=!0;const r=new Uint8Array(2);r[0]=1,r[1]=2,RR=new Uint16Array(r.buffer)[0]===(2<<8)+1}return RR}const MB="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function IU(r=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of MB)r.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const PB=IU();function OE(r){let e=PB;if(r&&r instanceof RegExp)if(r.global)e=r;else{let t="g";r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.unicode&&(t+="u"),e=new RegExp(r.source,t)}return e.lastIndex=0,e}const DU={maxLen:1e3,windowSize:15,timeBudget:150};function MC(r,e,t,i,n=DU){if(t.length>n.maxLen){let c=r-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,r+n.maxLen/2),MC(r,e,t,i,n)}const s=Date.now(),o=r-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const d=o-n.windowSize*c;e.lastIndex=Math.max(0,d);const u=AU(e,t,o,a);if(!u&&l||(l=u,d<=0))break;a=d}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function AU(r,e,t,i){let n;for(;n=r.exec(e);){const s=n.index||0;if(s<=t&&r.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const Ol=8;class FB{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class NU{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class BB{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Fi{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class bg{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class Au{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e=="undefined"?this.defaultValue:e}compute(e,t,i){return i}}function Ne(r,e){return typeof r=="undefined"?e:r==="false"?!1:Boolean(r)}class rt extends Au{constructor(e,t,i,n=void 0){typeof n!="undefined"&&(n.type="boolean",n.default=i);super(e,t,i,n)}validate(e){return Ne(e,this.defaultValue)}}function ME(r,e,t,i){if(typeof r=="undefined")return e;let n=parseInt(r,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class zt extends Au{constructor(e,t,i,n,s,o=void 0){typeof o!="undefined"&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s);super(e,t,i,o);this.minimum=n,this.maximum=s}static clampedInt(e,t,i,n){return ME(e,t,i,n)}validate(e){return zt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class Go extends Au{constructor(e,t,i,n,s){typeof s!="undefined"&&(s.type="number",s.default=i);super(e,t,i,s);this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e=="undefined")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(Go.float(e,this.defaultValue))}}class dr extends Au{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n!="undefined"&&(n.type="string",n.default=i);super(e,t,i,n)}validate(e){return dr.string(e,this.defaultValue)}}function Yn(r,e,t){return typeof r!="string"||t.indexOf(r)===-1?e:r}class Si extends Au{constructor(e,t,i,n,s=void 0){typeof s!="undefined"&&(s.type="string",s.enum=n,s.default=i);super(e,t,i,s);this._allowedValues=n}validate(e){return Yn(e,this.defaultValue,this._allowedValues)}}class Ug extends Fi{constructor(e,t,i,n,s,o,a=void 0){typeof a!="undefined"&&(a.type="string",a.enum=s,a.default=n);super(e,t,i,a);this._allowedValues=s,this._convert=o}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function RU(r){switch(r){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class OU extends Fi{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),m("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:m("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class MU extends Fi{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Ne(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Ne(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function PU(r){switch(r){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var ji;(function(r){r[r.Line=1]="Line",r[r.Block=2]="Block",r[r.Underline=3]="Underline",r[r.LineThin=4]="LineThin",r[r.BlockOutline=5]="BlockOutline",r[r.UnderlineThin=6]="UnderlineThin"})(ji||(ji={}));function FU(r){switch(r){case"line":return ji.Line;case"block":return ji.Block;case"underline":return ji.Underline;case"line-thin":return ji.LineThin;case"block-outline":return ji.BlockOutline;case"underline-thin":return ji.UnderlineThin}}class BU extends bg{constructor(){super(126,[65,33])}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(65)==="default"?n.push("mouse-default"):t.get(65)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class WU extends rt{constructor(){super(32,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class VU extends Fi{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","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:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:tt},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","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:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Ne(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Yn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Yn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Ne(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Ne(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Ne(t.loop,this.defaultValue.loop)}}}class Lr extends Fi{constructor(){super(44,"fontLigatures",Lr.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","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:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","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 typeof e=="undefined"?this.defaultValue:typeof e=="string"?e==="false"?Lr.OFF:e==="true"?Lr.ON:e:Boolean(e)?Lr.ON:Lr.OFF}}Lr.OFF='"liga" off, "calt" off';Lr.ON='"liga" on, "calt" on';class HU extends bg{constructor(){super(43)}compute(e,t,i){return e.fontInfo}}class $U extends Au{constructor(){super(45,"fontSize",gr.fontSize,{type:"number",minimum:6,maximum:100,default:gr.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){let t=Go.float(e,this.defaultValue);return t===0?gr.fontSize:Go.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class $o extends Fi{constructor(){super(46,"fontWeight",gr.fontWeight,{anyOf:[{type:"number",minimum:$o.MINIMUM_VALUE,maximum:$o.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'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:$o.SUGGESTION_VALUES}],default:gr.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(zt.clampedInt(e,gr.fontWeight,$o.MINIMUM_VALUE,$o.MAXIMUM_VALUE))}}$o.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];$o.MINIMUM_VALUE=1;$o.MAXIMUM_VALUE=1e3;class UU extends Fi{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:[m("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),m("editor.gotoLocation.multiple.goto","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(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","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:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:m("editor.editor.gotoLocation.multipleReferences","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:m("alternativeDefinitionCommand","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:m("alternativeTypeDefinitionCommand","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:m("alternativeDeclarationCommand","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:m("alternativeImplementationCommand","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:m("alternativeReferenceCommand","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||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Yn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Yn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Yn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Yn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Yn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(o=a.multipleReferences)!==null&&o!==void 0?o:Yn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:dr.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:dr.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:dr.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:dr.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:dr.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class zU extends Fi{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),delay:zt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Ne(t.sticky,this.defaultValue.sticky)}}}class lf extends bg{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,i){return lf.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount: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,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&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,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,d=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let h=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,v=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,y=u?2:3;let E=Math.floor(s*n);const S=E/s;let w=!1,x=!1,D=y*h,M=h/s,B=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:O,extraLinesBeyondLastLine:W,desiredRatio:ge,minimapLineCount:se}=lf.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:d,height:n,lineHeight:l,pixelRatio:s});if(v/se>1)w=!0,x=!0,h=1,D=1,M=h/s;else{let Ce=!1,Le=h+1;if(g==="fit"){const ct=Math.ceil((v+W)*D);C&&a&&b<=t.stableFitRemainingWidth?(Ce=!0,Le=t.stableFitMaxMinimapScale):Ce=ct>E}if(g==="fill"||Ce){w=!0;const ct=h;D=Math.min(l*s,Math.max(1,Math.floor(1/ge))),C&&a&&b<=t.stableFitRemainingWidth&&(Le=t.stableFitMaxMinimapScale),h=Math.min(Le,Math.max(1,Math.floor(D/y))),h>ct&&(B=Math.min(2,h/ct)),M=h/s/B,E=Math.ceil(Math.max(O,v+W)*D),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=h):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const z=Math.floor(f*M),j=Math.min(z,Math.max(0,Math.floor((b-_-2)*M/(c+M)))+Ol);let re=Math.floor(s*j);const te=re/s;re=Math.floor(re*B);const N=u?1:2,L=p==="left"?0:i-j-_;return{renderMinimap:N,minimapLeft:L,minimapWidth:j,minimapHeightIsEditorHeight:w,minimapIsSampling:x,minimapScale:h,minimapLineHeight:D,minimapCanvasInnerWidth:re,minimapCanvasInnerHeight:E,minimapCanvasOuterWidth:te,minimapCanvasOuterHeight:S}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,o=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,d=t.viewLineCount,u=e.get(121),h=u==="inherit"?e.get(120):u,f=h==="inherit"?e.get(116):h,g=e.get(119),p=e.get(2),_=t.isDominatedByLongLines,v=e.get(49),b=e.get(59).renderType!==0,C=e.get(60),y=e.get(93),E=e.get(64),S=e.get(91),w=S.verticalScrollbarSize,x=S.verticalHasArrows,D=S.arrowSize,M=S.horizontalScrollbarSize,B=e.get(57),z=e.get(37);let j;if(typeof B=="string"&&/^\d+(\.\d+)?ch$/.test(B)){const Bs=parseFloat(B.substr(0,B.length-2));j=zt.clampedInt(Bs*a,0,0,1e3)}else j=zt.clampedInt(B,0,0,1e3);z&&(j+=16);let re=0;if(b){const Bs=Math.max(o,C);re=Math.round(Bs*l)}let te=0;v&&(te=s);let N=0,L=N+te,O=L+re,W=O+j;const ge=i-te-re-j;let se=!1,ae=!1,Ce=-1;p!==2&&(h==="inherit"&&_?(se=!0,ae=!0):f==="on"||f==="bounded"?ae=!0:f==="wordWrapColumn"&&(Ce=g));const Le=lf._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:y,minimap:E,verticalScrollbarWidth:w,viewLineCount:d,remainingWidth:ge,isViewportWrapping:ae},t.memory||new BB);Le.renderMinimap!==0&&Le.minimapLeft===0&&(N+=Le.minimapWidth,L+=Le.minimapWidth,O+=Le.minimapWidth,W+=Le.minimapWidth);const ct=ge-Le.minimapWidth,bi=Math.max(1,Math.floor((ct-w-2)/a)),Kt=x?D:0;return ae&&(Ce=Math.max(1,bi),f==="bounded"&&(Ce=Math.min(Ce,g))),{width:i,height:n,glyphMarginLeft:N,glyphMarginWidth:te,lineNumbersLeft:L,lineNumbersWidth:re,decorationsLeft:O,decorationsWidth:j,contentLeft:W,contentWidth:ct,minimap:Le,viewportColumn:bi,isWordWrapMinified:se,isViewportWrapping:ae,wrappingColumn:Ce,verticalScrollbarWidth:w,horizontalScrollbarHeight:M,overviewRuler:{top:Kt,width:w,height:n-2*Kt,right:0}}}}class jU extends Fi{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:m("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Ne(e.enabled,this.defaultValue.enabled)}}}class qU extends Fi{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),fontSize:zt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:dr.string(t.fontFamily,this.defaultValue.fontFamily)}}}class GU extends Go{constructor(){super(58,"lineHeight",gr.lineHeight,e=>Go.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height. + - Use 0 to automatically compute the line height from the font size. + - Values between 0 and 8 will be used as a multiplier with the font size. + - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class KU extends Fi{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),size:Yn(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Yn(t.side,this.defaultValue.side,["right","left"]),showSlider:Yn(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Ne(t.renderCharacters,this.defaultValue.renderCharacters),scale:zt.clampedInt(t.scale,1,1,3),maxColumn:zt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function YU(r){return r==="ctrlCmd"?tt?"metaKey":"ctrlKey":"altKey"}class ZU extends Fi{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","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:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:zt.clampedInt(t.top,0,0,1e3),bottom:zt.clampedInt(t.bottom,0,0,1e3)}}}class XU extends Fi{constructor(){const e={enabled:!0,cycle:!1};super(75,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),cycle:Ne(t.cycle,this.defaultValue.cycle)}}}class QU extends bg{constructor(){super(127)}compute(e,t,i){return e.pixelRatio}}class JU extends Fi{constructor(){const e={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:m("quickSuggestions","Controls whether suggestions should automatically show up while typing.")});this.defaultValue=e}validate(e){if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const t=e,i={other:Ne(t.other,this.defaultValue.other),comments:Ne(t.comments,this.defaultValue.comments),strings:Ne(t.strings,this.defaultValue.strings)};return i.other&&i.comments&&i.strings?!0:!i.other&&!i.comments&&!i.strings?!1:i}return this.defaultValue}}class ez extends Fi{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e!="undefined"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function rD(r){const e=r.get(86);return e==="editable"?r.get(80):e!=="on"}class tz extends Fi{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","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)){let t=[];for(let i of e)if(typeof i=="number")t.push({column:zt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:zt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function MR(r,e){if(typeof r!="string")return e;switch(r){case"hidden":return 2;case"visible":return 3;default:return 1}}class iz extends Fi{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(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=zt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=zt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:zt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:MR(t.vertical,this.defaultValue.vertical),horizontal:MR(t.horizontal,this.defaultValue.horizontal),useShadows:Ne(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Ne(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Ne(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Ne(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Ne(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:zt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:zt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Ne(t.scrollByPage,this.defaultValue.scrollByPage)}}}class nz extends Fi{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Ne(t.enabled,this.defaultValue.enabled),mode:Yn(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class rz extends Fi{constructor(){const e={enabled:xn.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:m("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Ne(e.enabled,this.defaultValue.enabled)}}}class sz extends Fi{constructor(){const e={bracketPairs:!1,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:"boolean",default:e.bracketPairs,description:m("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:m("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:m("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Ne(t.bracketPairs,this.defaultValue.bracketPairs),indentation:Ne(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Ne(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}class oz extends Fi{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","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:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","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:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Yn(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Ne(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Ne(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Ne(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Ne(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:Ne(t.showIcons,this.defaultValue.showIcons),showStatusBar:Ne(t.showStatusBar,this.defaultValue.showStatusBar),preview:Ne(t.preview,this.defaultValue.preview),previewMode:Yn(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Ne(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Ne(t.showMethods,this.defaultValue.showMethods),showFunctions:Ne(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Ne(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Ne(t.showDeprecated,this.defaultValue.showDeprecated),showFields:Ne(t.showFields,this.defaultValue.showFields),showVariables:Ne(t.showVariables,this.defaultValue.showVariables),showClasses:Ne(t.showClasses,this.defaultValue.showClasses),showStructs:Ne(t.showStructs,this.defaultValue.showStructs),showInterfaces:Ne(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Ne(t.showModules,this.defaultValue.showModules),showProperties:Ne(t.showProperties,this.defaultValue.showProperties),showEvents:Ne(t.showEvents,this.defaultValue.showEvents),showOperators:Ne(t.showOperators,this.defaultValue.showOperators),showUnits:Ne(t.showUnits,this.defaultValue.showUnits),showValues:Ne(t.showValues,this.defaultValue.showValues),showConstants:Ne(t.showConstants,this.defaultValue.showConstants),showEnums:Ne(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Ne(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Ne(t.showKeywords,this.defaultValue.showKeywords),showWords:Ne(t.showWords,this.defaultValue.showWords),showColors:Ne(t.showColors,this.defaultValue.showColors),showFiles:Ne(t.showFiles,this.defaultValue.showFiles),showReferences:Ne(t.showReferences,this.defaultValue.showReferences),showFolders:Ne(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Ne(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Ne(t.showSnippets,this.defaultValue.showSnippets),showUsers:Ne(t.showUsers,this.defaultValue.showUsers),showIssues:Ne(t.showIssues,this.defaultValue.showIssues)}}}class az extends Fi{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Ne(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class lz extends bg{constructor(){super(128,[80])}compute(e,t,i){return t.get(80)?!0:e.tabFocusMode}}function cz(r){switch(r){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class dz extends bg{constructor(){super(130,[129])}compute(e,t,i){const n=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const uz="Consolas, 'Courier New', monospace",hz="Menlo, Monaco, 'Courier New', monospace",fz="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",gr={fontFamily:tt?hz:ir?fz:uz,fontWeight:"normal",fontSize:tt?12:14,lineHeight:0,letterSpacing:0},xn={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},zh=[];function he(r){return zh[r.id]=r,r}const mo={acceptSuggestionOnCommitCharacter:he(new rt(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","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:he(new Si(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:he(new OU),accessibilityPageSize:he(new zt(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","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.")})),ariaLabel:he(new dr(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:he(new Si(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:he(new Si(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:he(new Si(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:he(new Si(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:he(new Ug(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],RU,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","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:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:he(new rt(10,"automaticLayout",!1)),autoSurround:he(new Si(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:he(new rz),bracketPairGuides:he(new sz),stickyTabStops:he(new rt(103,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:he(new rt(14,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:he(new dr(15,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:he(new zt(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:he(new rt(17,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:he(new rt(18,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:he(new MU),contextmenu:he(new rt(20,"contextmenu",!0)),copyWithSyntaxHighlighting:he(new rt(21,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:he(new Ug(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],PU,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:he(new rt(23,"cursorSmoothCaretAnimation",!1,{description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:he(new Ug(24,"cursorStyle",ji.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],FU,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:he(new zt(25,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:he(new Si(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:m("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:he(new zt(27,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:he(new rt(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:he(new rt(29,"disableMonospaceOptimizations",!1)),domReadOnly:he(new rt(30,"domReadOnly",!1)),dragAndDrop:he(new rt(31,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:he(new WU),extraEditorClassName:he(new dr(33,"extraEditorClassName","")),fastScrollSensitivity:he(new Go(34,"fastScrollSensitivity",5,r=>r<=0?5:r,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:he(new VU),fixedOverflowWidgets:he(new rt(36,"fixedOverflowWidgets",!1)),folding:he(new rt(37,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:he(new Si(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:he(new rt(39,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:he(new rt(40,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:he(new rt(41,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:he(new dr(42,"fontFamily",gr.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:he(new HU),fontLigatures2:he(new Lr),fontSize:he(new $U),fontWeight:he(new $o),formatOnPaste:he(new rt(47,"formatOnPaste",!1,{description:m("formatOnPaste","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:he(new rt(48,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:he(new rt(49,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:he(new UU),hideCursorInOverviewRuler:he(new rt(51,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:he(new zU),inDiffEditor:he(new rt(53,"inDiffEditor",!1)),letterSpacing:he(new Go(55,"letterSpacing",gr.letterSpacing,r=>Go.clamp(r,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:he(new jU),lineDecorationsWidth:he(new Au(57,"lineDecorationsWidth",10)),lineHeight:he(new GU),lineNumbers:he(new ez),lineNumbersMinChars:he(new zt(60,"lineNumbersMinChars",5,1,300)),linkedEditing:he(new rt(61,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:he(new rt(62,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:he(new Si(63,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:he(new KU),mouseStyle:he(new Si(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:he(new Go(66,"mouseWheelScrollSensitivity",1,r=>r===0?1:r,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:he(new rt(67,"mouseWheelZoom",!1,{markdownDescription:m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:he(new rt(68,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:he(new Ug(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],YU,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:he(new Si(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:he(new rt(71,"occurrencesHighlight",!0,{description:m("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:he(new rt(72,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:he(new zt(73,"overviewRulerLanes",3,0,3)),padding:he(new ZU),parameterHints:he(new XU),peekWidgetDefaultFocus:he(new Si(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:he(new rt(77,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:he(new JU),quickSuggestionsDelay:he(new zt(79,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:he(new rt(80,"readOnly",!1)),renameOnType:he(new rt(81,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:he(new rt(82,"renderControlCharacters",!1,{description:m("renderControlCharacters","Controls whether the editor should render control characters.")})),renderFinalNewline:he(new rt(83,"renderFinalNewline",!0,{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:he(new Si(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:he(new rt(85,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:he(new Si(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:he(new Si(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:he(new zt(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:he(new rt(89,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:he(new tz),scrollbar:he(new iz),scrollBeyondLastColumn:he(new zt(92,"scrollBeyondLastColumn",5,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:he(new rt(93,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:he(new rt(94,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","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:he(new rt(95,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:ir})),selectionHighlight:he(new rt(96,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:he(new rt(97,"selectOnLineNumbers",!0)),showFoldingControls:he(new Si(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:he(new rt(99,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:he(new rt(124,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:he(new qU),snippetSuggestions:he(new Si(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:he(new az),smoothScrolling:he(new rt(102,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:he(new zt(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:he(new oz),inlineSuggest:he(new nz),suggestFontSize:he(new zt(106,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:he(new zt(107,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:he(new rt(108,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:he(new Si(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:he(new Si(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:he(new zt(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:he(new Si(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:he(new rt(113,"useShadowDOM",!0)),useTabStops:he(new rt(114,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:he(new dr(115,"wordSeparators",MB,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:he(new Si(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:he(new dr(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;\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:he(new dr(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:he(new zt(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:he(new Si(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:he(new Si(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:he(new Ug(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],cz,{enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:he(new Si(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[m("wrappingStrategy.simple","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."),m("wrappingStrategy.advanced","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.")],description:m("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:he(new BU),pixelRatio:he(new QU),tabFocusMode:he(new lz),layoutInfo:he(new lf),wrappingInfo:he(new dz)};class gz{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+` + +`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const WB=new gz;function Fe(r){ga(r)||WB.onUnexpectedError(r)}function Yi(r){ga(r)||WB.onUnexpectedExternalError(r)}function PR(r){if(r instanceof Error){let{name:e,message:t}=r;const i=r.stacktrace||r.stack;return{$isError:!0,name:e,message:t,stack:i}}return r}const PE="Canceled";function ga(r){return r instanceof Error&&r.name===PE&&r.message===PE}function vg(){const r=new Error(PE);return r.name=r.message,r}function Or(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}function pz(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}class mz extends Error{constructor(e){super("NotSupported");e&&(this.message=e)}}function ll(r){const e=this;let t=!1,i;return function(){return t||(t=!0,i=r.apply(e,arguments)),i}}var at;(function(r){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}r.is=e;const t=Object.freeze([]);function i(){return t}r.empty=i;function*n(b){yield b}r.single=n;function s(b){return b||t}r.from=s;function o(b){return!b||b[Symbol.iterator]().next().done===!0}r.isEmpty=o;function a(b){return b[Symbol.iterator]().next().value}r.first=a;function l(b,C){for(const y of b)if(C(y))return!0;return!1}r.some=l;function c(b,C){for(const y of b)if(C(y))return y}r.find=c;function*d(b,C){for(const y of b)C(y)&&(yield y)}r.filter=d;function*u(b,C){let y=0;for(const E of b)yield C(E,y++)}r.map=u;function*h(...b){for(const C of b)for(const y of C)yield y}r.concat=h;function*f(b){for(const C of b)for(const y of C)yield y}r.concatNested=f;function g(b,C,y){let E=y;for(const S of b)E=C(E,S);return E}r.reduce=g;function*p(b,C,y=b.length){for(C<0&&(C+=b.length),y<0?y+=b.length:y>b.length&&(y=b.length);C<y;C++)yield b[C]}r.slice=p;function _(b,C=Number.POSITIVE_INFINITY){const y=[];if(C===0)return[y,b];const E=b[Symbol.iterator]();for(let S=0;S<C;S++){const w=E.next();if(w.done)return[y,r.empty()];y.push(w.value)}return[y,{[Symbol.iterator](){return E}}]}r.consume=_;function v(b,C,y=(E,S)=>E===S){const E=b[Symbol.iterator](),S=C[Symbol.iterator]();for(;;){const w=E.next(),x=S.next();if(w.done!==x.done)return!1;if(w.done)return!0;if(!y(w.value,x.value))return!1}}r.equals=v})(at||(at={}));class _z extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`);this.errors=e}}function sD(r){return typeof r.dispose=="function"&&r.dispose.length===0}function ft(r){if(at.is(r)){let e=[];for(const t of r)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new _z(e);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function rc(...r){return Xe(()=>ft(r))}function Xe(r){return{dispose:ll(()=>{r()})}}class ue{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{ft(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?ue.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}}ue.DISABLE_DISPOSED_WARNING=!1;class Z{constructor(){this._store=new ue,this._store}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Z.None=Object.freeze({dispose(){}});class Un{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class bz{constructor(e){this.object=e}dispose(){}}class ti{constructor(e){this.element=e,this.next=ti.Undefined,this.prev=ti.Undefined}}ti.Undefined=new ti(void 0);class Dr{constructor(){this._first=ti.Undefined,this._last=ti.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ti.Undefined}clear(){let e=this._first;for(;e!==ti.Undefined;){const t=e.next;e.prev=ti.Undefined,e.next=ti.Undefined,e=t}this._first=ti.Undefined,this._last=ti.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new ti(e);if(this._first===ti.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==ti.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ti.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ti.Undefined&&e.next!==ti.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ti.Undefined&&e.next===ti.Undefined?(this._first=ti.Undefined,this._last=ti.Undefined):e.next===ti.Undefined?(this._last=this._last.prev,this._last.next=ti.Undefined):e.prev===ti.Undefined&&(this._first=this._first.next,this._first.prev=ti.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ti.Undefined;)yield e.element,e=e.next}}const vz=yi.performance&&typeof yi.performance.now=="function";class sa{constructor(e){this._highResolution=vz&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new sa(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?yi.performance.now():Date.now()}}var ke;(function(r){r.None=()=>Z.None;function e(b){return(C,y=null,E)=>{let S=!1,w;return w=b(x=>{if(!S)return w?w.dispose():S=!0,C.call(y,x)},null,E),S&&w.dispose(),w}}r.once=e;function t(b,C){return l((y,E=null,S)=>b(w=>y.call(E,C(w)),null,S))}r.map=t;function i(b,C){return l((y,E=null,S)=>b(w=>{C(w),y.call(E,w)},null,S))}r.forEach=i;function n(b,C){return l((y,E=null,S)=>b(w=>C(w)&&y.call(E,w),null,S))}r.filter=n;function s(b){return b}r.signal=s;function o(...b){return(C,y=null,E)=>rc(...b.map(S=>S(w=>C.call(y,w),null,E)))}r.any=o;function a(b,C,y){let E=y;return t(b,S=>(E=C(E,S),E))}r.reduce=a;function l(b){let C;const y=new H({onFirstListenerAdd(){C=b(y.fire,y)},onLastListenerRemove(){C.dispose()}});return y.event}function c(b,C,y=100,E=!1,S){let w,x,D,M=0;const B=new H({leakWarningThreshold:S,onFirstListenerAdd(){w=b(z=>{M++,x=C(x,z),E&&!D&&(B.fire(x),x=void 0),clearTimeout(D),D=setTimeout(()=>{const j=x;x=void 0,D=void 0,(!E||M>1)&&B.fire(j),M=0},y)})},onLastListenerRemove(){w.dispose()}});return B.event}r.debounce=c;function d(b,C=(y,E)=>y===E){let y=!0,E;return n(b,S=>{const w=y||!C(S,E);return y=!1,E=S,w})}r.latch=d;function u(b,C){return[r.filter(b,C),r.filter(b,y=>!C(y))]}r.split=u;function h(b,C=!1,y=[]){let E=y.slice(),S=b(D=>{E?E.push(D):x.fire(D)});const w=()=>{E&&E.forEach(D=>x.fire(D)),E=null},x=new H({onFirstListenerAdd(){S||(S=b(D=>x.fire(D)))},onFirstListenerDidAdd(){E&&(C?setTimeout(w):w())},onLastListenerRemove(){S&&S.dispose(),S=null}});return x.event}r.buffer=h;class f{constructor(C){this.event=C}map(C){return new f(t(this.event,C))}forEach(C){return new f(i(this.event,C))}filter(C){return new f(n(this.event,C))}reduce(C,y){return new f(a(this.event,C,y))}latch(){return new f(d(this.event))}debounce(C,y=100,E=!1,S){return new f(c(this.event,C,y,E,S))}on(C,y,E){return this.event(C,y,E)}once(C,y,E){return e(this.event)(C,y,E)}}function g(b){return new f(b)}r.chain=g;function p(b,C,y=E=>E){const E=(...D)=>x.fire(y(...D)),S=()=>b.on(C,E),w=()=>b.removeListener(C,E),x=new H({onFirstListenerAdd:S,onLastListenerRemove:w});return x.event}r.fromNodeEventEmitter=p;function _(b,C,y=E=>E){const E=(...D)=>x.fire(y(...D)),S=()=>b.addEventListener(C,E),w=()=>b.removeEventListener(C,E),x=new H({onFirstListenerAdd:S,onLastListenerRemove:w});return x.event}r.fromDOMEventEmitter=_;function v(b){return new Promise(C=>e(b)(C))}r.toPromise=v})(ke||(ke={}));class Hy{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Hy._idPool++}`}start(e){this._stopWatch=new sa(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Hy._idPool=0;class H{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=!((t=this._options)===null||t===void 0)&&t._profName?new Hy(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new Dr);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(t?[e,t]:e);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const a=(n=this._leakageMon)===null||n===void 0?void 0:n.check(this._listeners.size),l=Xe(()=>{a&&a(),this._disposed||(o(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return i instanceof ue?i.add(l):Array.isArray(i)&&i.push(l),l}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Dr);for(let n of this._listeners)this._deliveryQueue.push([n,e]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[n,s]=this._deliveryQueue.shift();try{typeof n=="function"?n.call(void 0,s):n[0].call(n[1],s)}catch(o){Fe(o)}}(i=this._perfMon)===null||i===void 0||i.stop()}}dispose(){var e,t,i,n,s;this._disposed||(this._disposed=!0,(e=this._listeners)===null||e===void 0||e.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(n=(i=this._options)===null||i===void 0?void 0:i.onLastListenerRemove)===null||n===void 0||n.call(i),(s=this._leakageMon)===null||s===void 0||s.dispose())}}class PC extends H{constructor(e){super(e);this._isPaused=0,this._eventQueue=new Dr,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class Cz extends PC{constructor(e){var t;super(e);this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class oD{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(s=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>t.call(i,s)):t.call(i,s)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class FR{constructor(){this.listening=!1,this.inputEvent=ke.None,this.inputEventListener=Z.None,this.emitter=new H({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{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()}}const VB=Object.freeze(function(r,e){const t=setTimeout(r.bind(e),0);return{dispose(){clearTimeout(t)}}});var it;(function(r){function e(t){return t===r.None||t===r.Cancelled||t instanceof $v?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}r.isCancellationToken=e,r.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ke.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:VB})})(it||(it={}));class $v{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?VB:(this._emitter||(this._emitter=new H),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Hn{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 $v),this._token}cancel(){this._token?this._token instanceof $v&&this._token.cancel():this._token=it.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof $v&&this._token.dispose():this._token=it.None}}class aD{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 FE=new aD,BE=new aD,WE=new aD;(function(){function r(e,t,i=t,n=i){FE.define(e,t),BE.define(e,i),WE.define(e,n)}r(0,"unknown"),r(1,"Backspace"),r(2,"Tab"),r(3,"Enter"),r(4,"Shift"),r(5,"Ctrl"),r(6,"Alt"),r(7,"PauseBreak"),r(8,"CapsLock"),r(9,"Escape"),r(10,"Space"),r(11,"PageUp"),r(12,"PageDown"),r(13,"End"),r(14,"Home"),r(15,"LeftArrow","Left"),r(16,"UpArrow","Up"),r(17,"RightArrow","Right"),r(18,"DownArrow","Down"),r(19,"Insert"),r(20,"Delete"),r(21,"0"),r(22,"1"),r(23,"2"),r(24,"3"),r(25,"4"),r(26,"5"),r(27,"6"),r(28,"7"),r(29,"8"),r(30,"9"),r(31,"A"),r(32,"B"),r(33,"C"),r(34,"D"),r(35,"E"),r(36,"F"),r(37,"G"),r(38,"H"),r(39,"I"),r(40,"J"),r(41,"K"),r(42,"L"),r(43,"M"),r(44,"N"),r(45,"O"),r(46,"P"),r(47,"Q"),r(48,"R"),r(49,"S"),r(50,"T"),r(51,"U"),r(52,"V"),r(53,"W"),r(54,"X"),r(55,"Y"),r(56,"Z"),r(57,"Meta"),r(58,"ContextMenu"),r(59,"F1"),r(60,"F2"),r(61,"F3"),r(62,"F4"),r(63,"F5"),r(64,"F6"),r(65,"F7"),r(66,"F8"),r(67,"F9"),r(68,"F10"),r(69,"F11"),r(70,"F12"),r(71,"F13"),r(72,"F14"),r(73,"F15"),r(74,"F16"),r(75,"F17"),r(76,"F18"),r(77,"F19"),r(78,"NumLock"),r(79,"ScrollLock"),r(80,";",";","OEM_1"),r(81,"=","=","OEM_PLUS"),r(82,",",",","OEM_COMMA"),r(83,"-","-","OEM_MINUS"),r(84,".",".","OEM_PERIOD"),r(85,"/","/","OEM_2"),r(86,"`","`","OEM_3"),r(110,"ABNT_C1"),r(111,"ABNT_C2"),r(87,"[","[","OEM_4"),r(88,"\\","\\","OEM_5"),r(89,"]","]","OEM_6"),r(90,"'","'","OEM_7"),r(91,"OEM_8"),r(92,"OEM_102"),r(93,"NumPad0"),r(94,"NumPad1"),r(95,"NumPad2"),r(96,"NumPad3"),r(97,"NumPad4"),r(98,"NumPad5"),r(99,"NumPad6"),r(100,"NumPad7"),r(101,"NumPad8"),r(102,"NumPad9"),r(103,"NumPad_Multiply"),r(104,"NumPad_Add"),r(105,"NumPad_Separator"),r(106,"NumPad_Subtract"),r(107,"NumPad_Decimal"),r(108,"NumPad_Divide")})();var xd;(function(r){function e(o){return FE.keyCodeToStr(o)}r.toString=e;function t(o){return FE.strToKeyCode(o)}r.fromString=t;function i(o){return BE.keyCodeToStr(o)}r.toUserSettingsUS=i;function n(o){return WE.keyCodeToStr(o)}r.toUserSettingsGeneral=n;function s(o){return BE.strToKeyCode(o)||WE.strToKeyCode(o)}r.fromUserSettings=s})(xd||(xd={}));function Bi(r,e){const t=(e&65535)<<16>>>0;return(r|t)>>>0}function VE(r,e){if(r===0)return null;const t=(r&65535)>>>0,i=(r&4294901760)>>>16;return i!==0?new HE([e1(t,e),e1(i,e)]):new HE([e1(t,e)])}function e1(r,e){const t=!!(r&2048),i=!!(r&256),n=e===2?i:t,s=!!(r&1024),o=!!(r&512),a=e===2?t:i,l=r&255;return new _m(n,s,o,a,l)}class _m{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new HE([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class HE{constructor(e){if(e.length===0)throw Or("parts");this.parts=e}}class wz{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 yz{}let cf;if(typeof yi.vscode!="undefined"&&typeof yi.vscode.process!="undefined"){const r=yi.vscode.process;cf={get platform(){return r.platform},get arch(){return r.arch},get env(){return r.env},cwd(){return r.cwd()},nextTick(e){return RE(e)}}}else typeof process!="undefined"?cf={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(r){return process.nextTick(r)}}:cf={get platform(){return an?"win32":tt?"darwin":"linux"},get arch(){},nextTick(r){return RE(r)},get env(){return{}},cwd(){return"/"}};const $E=cf.cwd,Sz=cf.env,Nu=cf.platform,xz=65,Ez=97,kz=90,Lz=122,sc=46,wn=47,xr=92,xl=58,Tz=63;class HB extends Error{constructor(e,t,i){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=e.indexOf(".")!==-1?"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 Oi(r,e){if(typeof r!="string")throw new HB(e,"string",r)}function vt(r){return r===wn||r===xr}function UE(r){return r===wn}function El(r){return r>=xz&&r<=kz||r>=Ez&&r<=Lz}function FC(r,e,t,i){let n="",s=0,o=-1,a=0,l=0;for(let c=0;c<=r.length;++c){if(c<r.length)l=r.charCodeAt(c);else{if(i(l))break;l=wn}if(i(l)){if(!(o===c-1||a===1))if(a===2){if(n.length<2||s!==2||n.charCodeAt(n.length-1)!==sc||n.charCodeAt(n.length-2)!==sc){if(n.length>2){const d=n.lastIndexOf(t);d===-1?(n="",s=0):(n=n.slice(0,d),s=n.length-1-n.lastIndexOf(t)),o=c,a=0;continue}else if(n.length!==0){n="",s=0,o=c,a=0;continue}}e&&(n+=n.length>0?`${t}..`:"..",s=2)}else n.length>0?n+=`${t}${r.slice(o+1,c)}`:n=r.slice(o+1,c),s=c-o-1;o=c,a=0}else l===sc&&a!==-1?++a:a=-1}return n}function $B(r,e){if(e===null||typeof e!="object")throw new HB("pathObject","Object",e);const t=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${i}`:`${t}${r}${i}`:i}const fr={resolve(...r){let e="",t="",i=!1;for(let n=r.length-1;n>=-1;n--){let s;if(n>=0){if(s=r[n],Oi(s,"path"),s.length===0)continue}else e.length===0?s=$E():(s=Sz[`=${e}`]||$E(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===xr)&&(s=`${e}\\`));const o=s.length;let a=0,l="",c=!1;const d=s.charCodeAt(0);if(o===1)vt(d)&&(a=1,c=!0);else if(vt(d))if(c=!0,vt(s.charCodeAt(1))){let u=2,h=u;for(;u<o&&!vt(s.charCodeAt(u));)u++;if(u<o&&u!==h){const f=s.slice(h,u);for(h=u;u<o&&vt(s.charCodeAt(u));)u++;if(u<o&&u!==h){for(h=u;u<o&&!vt(s.charCodeAt(u));)u++;(u===o||u!==h)&&(l=`\\\\${f}\\${s.slice(h,u)}`,a=u)}}}else a=1;else El(d)&&s.charCodeAt(1)===xl&&(l=s.slice(0,2),a=2,o>2&&vt(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(t=`${s.slice(a)}\\${t}`,i=c,c&&e.length>0)break}return t=FC(t,!i,"\\",vt),i?`${e}\\${t}`:`${e}${t}`||"."},normalize(r){Oi(r,"path");const e=r.length;if(e===0)return".";let t=0,i,n=!1;const s=r.charCodeAt(0);if(e===1)return UE(s)?"\\":r;if(vt(s))if(n=!0,vt(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){const c=r.slice(l,a);for(l=a;a<e&&vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!vt(r.charCodeAt(a));)a++;if(a===e)return`\\\\${c}\\${r.slice(l)}\\`;a!==l&&(i=`\\\\${c}\\${r.slice(l,a)}`,t=a)}}}else t=1;else El(s)&&r.charCodeAt(1)===xl&&(i=r.slice(0,2),t=2,e>2&&vt(r.charCodeAt(2))&&(n=!0,t=3));let o=t<e?FC(r.slice(t),!n,"\\",vt):"";return o.length===0&&!n&&(o="."),o.length>0&&vt(r.charCodeAt(e-1))&&(o+="\\"),i===void 0?n?`\\${o}`:o:n?`${i}\\${o}`:`${i}${o}`},isAbsolute(r){Oi(r,"path");const e=r.length;if(e===0)return!1;const t=r.charCodeAt(0);return vt(t)||e>2&&El(t)&&r.charCodeAt(1)===xl&&vt(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let e,t;for(let s=0;s<r.length;++s){const o=r[s];Oi(o,"path"),o.length>0&&(e===void 0?e=t=o:e+=`\\${o}`)}if(e===void 0)return".";let i=!0,n=0;if(typeof t=="string"&&vt(t.charCodeAt(0))){++n;const s=t.length;s>1&&vt(t.charCodeAt(1))&&(++n,s>2&&(vt(t.charCodeAt(2))?++n:i=!1))}if(i){for(;n<e.length&&vt(e.charCodeAt(n));)n++;n>=2&&(e=`\\${e.slice(n)}`)}return fr.normalize(e)},relative(r,e){if(Oi(r,"from"),Oi(e,"to"),r===e)return"";const t=fr.resolve(r),i=fr.resolve(e);if(t===i||(r=t.toLowerCase(),e=i.toLowerCase(),r===e))return"";let n=0;for(;n<r.length&&r.charCodeAt(n)===xr;)n++;let s=r.length;for(;s-1>n&&r.charCodeAt(s-1)===xr;)s--;const o=s-n;let a=0;for(;a<e.length&&e.charCodeAt(a)===xr;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===xr;)l--;const c=l-a,d=o<c?o:c;let u=-1,h=0;for(;h<d;h++){const g=r.charCodeAt(n+h);if(g!==e.charCodeAt(a+h))break;g===xr&&(u=h)}if(h!==d){if(u===-1)return i}else{if(c>d){if(e.charCodeAt(a+h)===xr)return i.slice(a+h+1);if(h===2)return i.slice(a+h)}o>d&&(r.charCodeAt(n+h)===xr?u=h:h===2&&(u=3)),u===-1&&(u=0)}let f="";for(h=n+u+1;h<=s;++h)(h===s||r.charCodeAt(h)===xr)&&(f+=f.length===0?"..":"\\..");return a+=u,f.length>0?`${f}${i.slice(a,l)}`:(i.charCodeAt(a)===xr&&++a,i.slice(a,l))},toNamespacedPath(r){if(typeof r!="string")return r;if(r.length===0)return"";const e=fr.resolve(r);if(e.length<=2)return r;if(e.charCodeAt(0)===xr){if(e.charCodeAt(1)===xr){const t=e.charCodeAt(2);if(t!==Tz&&t!==sc)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(El(e.charCodeAt(0))&&e.charCodeAt(1)===xl&&e.charCodeAt(2)===xr)return`\\\\?\\${e}`;return r},dirname(r){Oi(r,"path");const e=r.length;if(e===0)return".";let t=-1,i=0;const n=r.charCodeAt(0);if(e===1)return vt(n)?r:".";if(vt(n)){if(t=i=1,vt(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!vt(r.charCodeAt(a));)a++;if(a===e)return r;a!==l&&(t=i=a+1)}}}}else El(n)&&r.charCodeAt(1)===xl&&(t=e>2&&vt(r.charCodeAt(2))?3:2,i=t);let s=-1,o=!0;for(let a=e-1;a>=i;--a)if(vt(r.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(t===-1)return".";s=t}return r.slice(0,s)},basename(r,e){e!==void 0&&Oi(e,"ext"),Oi(r,"path");let t=0,i=-1,n=!0,s;if(r.length>=2&&El(r.charCodeAt(0))&&r.charCodeAt(1)===xl&&(t=2),e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let o=e.length-1,a=-1;for(s=r.length-1;s>=t;--s){const l=r.charCodeAt(s);if(vt(l)){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=s):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(s=r.length-1;s>=t;--s)if(vt(r.charCodeAt(s))){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(t,i)},extname(r){Oi(r,"path");let e=0,t=-1,i=0,n=-1,s=!0,o=0;r.length>=2&&r.charCodeAt(1)===xl&&El(r.charCodeAt(0))&&(e=i=2);for(let a=r.length-1;a>=e;--a){const l=r.charCodeAt(a);if(vt(l)){if(!s){i=a+1;break}continue}n===-1&&(s=!1,n=a+1),l===sc?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===i+1?"":r.slice(t,n)},format:$B.bind(null,"\\"),parse(r){Oi(r,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;const t=r.length;let i=0,n=r.charCodeAt(0);if(t===1)return vt(n)?(e.root=e.dir=r,e):(e.base=e.name=r,e);if(vt(n)){if(i=1,vt(r.charCodeAt(1))){let u=2,h=u;for(;u<t&&!vt(r.charCodeAt(u));)u++;if(u<t&&u!==h){for(h=u;u<t&&vt(r.charCodeAt(u));)u++;if(u<t&&u!==h){for(h=u;u<t&&!vt(r.charCodeAt(u));)u++;u===t?i=u:u!==h&&(i=u+1)}}}}else if(El(n)&&r.charCodeAt(1)===xl){if(t<=2)return e.root=e.dir=r,e;if(i=2,vt(r.charCodeAt(2))){if(t===3)return e.root=e.dir=r,e;i=3}}i>0&&(e.root=r.slice(0,i));let s=-1,o=i,a=-1,l=!0,c=r.length-1,d=0;for(;c>=i;--c){if(n=r.charCodeAt(c),vt(n)){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),n===sc?s===-1?s=c:d!==1&&(d=1):s!==-1&&(d=-1)}return a!==-1&&(s===-1||d===0||d===1&&s===a-1&&s===o+1?e.base=e.name=r.slice(o,a):(e.name=r.slice(o,s),e.base=r.slice(o,a),e.ext=r.slice(s,a))),o>0&&o!==i?e.dir=r.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Ii={resolve(...r){let e="",t=!1;for(let i=r.length-1;i>=-1&&!t;i--){const n=i>=0?r[i]:$E();Oi(n,"path"),n.length!==0&&(e=`${n}/${e}`,t=n.charCodeAt(0)===wn)}return e=FC(e,!t,"/",UE),t?`/${e}`:e.length>0?e:"."},normalize(r){if(Oi(r,"path"),r.length===0)return".";const e=r.charCodeAt(0)===wn,t=r.charCodeAt(r.length-1)===wn;return r=FC(r,!e,"/",UE),r.length===0?e?"/":t?"./":".":(t&&(r+="/"),e?`/${r}`:r)},isAbsolute(r){return Oi(r,"path"),r.length>0&&r.charCodeAt(0)===wn},join(...r){if(r.length===0)return".";let e;for(let t=0;t<r.length;++t){const i=r[t];Oi(i,"path"),i.length>0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":Ii.normalize(e)},relative(r,e){if(Oi(r,"from"),Oi(e,"to"),r===e||(r=Ii.resolve(r),e=Ii.resolve(e),r===e))return"";const t=1,i=r.length,n=i-t,s=1,o=e.length-s,a=n<o?n:o;let l=-1,c=0;for(;c<a;c++){const u=r.charCodeAt(t+c);if(u!==e.charCodeAt(s+c))break;u===wn&&(l=c)}if(c===a)if(o>a){if(e.charCodeAt(s+c)===wn)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else n>a&&(r.charCodeAt(t+c)===wn?l=c:c===0&&(l=0));let d="";for(c=t+l+1;c<=i;++c)(c===i||r.charCodeAt(c)===wn)&&(d+=d.length===0?"..":"/..");return`${d}${e.slice(s+l)}`},toNamespacedPath(r){return r},dirname(r){if(Oi(r,"path"),r.length===0)return".";const e=r.charCodeAt(0)===wn;let t=-1,i=!0;for(let n=r.length-1;n>=1;--n)if(r.charCodeAt(n)===wn){if(!i){t=n;break}}else i=!1;return t===-1?e?"/":".":e&&t===1?"//":r.slice(0,t)},basename(r,e){e!==void 0&&Oi(e,"ext"),Oi(r,"path");let t=0,i=-1,n=!0,s;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let o=e.length-1,a=-1;for(s=r.length-1;s>=0;--s){const l=r.charCodeAt(s);if(l===wn){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=s):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(s=r.length-1;s>=0;--s)if(r.charCodeAt(s)===wn){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(t,i)},extname(r){Oi(r,"path");let e=-1,t=0,i=-1,n=!0,s=0;for(let o=r.length-1;o>=0;--o){const a=r.charCodeAt(o);if(a===wn){if(!n){t=o+1;break}continue}i===-1&&(n=!1,i=o+1),a===sc?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":r.slice(e,i)},format:$B.bind(null,"/"),parse(r){Oi(r,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;const t=r.charCodeAt(0)===wn;let i;t?(e.root="/",i=1):i=0;let n=-1,s=0,o=-1,a=!0,l=r.length-1,c=0;for(;l>=i;--l){const d=r.charCodeAt(l);if(d===wn){if(!a){s=l+1;break}continue}o===-1&&(a=!1,o=l+1),d===sc?n===-1?n=l:c!==1&&(c=1):n!==-1&&(c=-1)}if(o!==-1){const d=s===0&&t?1:s;n===-1||c===0||c===1&&n===o-1&&n===s+1?e.base=e.name=r.slice(d,o):(e.name=r.slice(d,n),e.base=r.slice(d,o),e.ext=r.slice(n,o))}return s>0?e.dir=r.slice(0,s-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ii.win32=fr.win32=fr;Ii.posix=fr.posix=Ii;const lD=Nu==="win32"?fr.normalize:Ii.normalize,Iz=Nu==="win32"?fr.resolve:Ii.resolve,Dz=Nu==="win32"?fr.relative:Ii.relative,UB=Nu==="win32"?fr.dirname:Ii.dirname,Rd=Nu==="win32"?fr.basename:Ii.basename,Az=Nu==="win32"?fr.extname:Ii.extname,Od=Nu==="win32"?fr.sep:Ii.sep,Nz=/^\w[\w\d+.-]*$/,Rz=/^\//,Oz=/^\/\//;function BR(r,e){if(!r.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${r.authority}", path: "${r.path}", query: "${r.query}", fragment: "${r.fragment}"}`);if(r.scheme&&!Nz.test(r.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(r.path){if(r.authority){if(!Rz.test(r.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(Oz.test(r.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function Mz(r,e){return!r&&!e?"file":r}function Pz(r,e){switch(r){case"https":case"http":case"file":e?e[0]!==Gs&&(e=Gs+e):e=Gs;break}return e}const si="",Gs="/",Fz=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class De{constructor(e,t,i,n,s,o=!1){typeof e=="object"?(this.scheme=e.scheme||si,this.authority=e.authority||si,this.path=e.path||si,this.query=e.query||si,this.fragment=e.fragment||si):(this.scheme=Mz(e,o),this.authority=t||si,this.path=Pz(this.scheme,i||si),this.query=n||si,this.fragment=s||si,BR(this,o))}static isUri(e){return e instanceof De?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}get fsPath(){return BC(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return t===void 0?t=this.scheme:t===null&&(t=si),i===void 0?i=this.authority:i===null&&(i=si),n===void 0?n=this.path:n===null&&(n=si),s===void 0?s=this.query:s===null&&(s=si),o===void 0?o=this.fragment:o===null&&(o=si),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new dh(t,i,n,s,o)}static parse(e,t=!1){const i=Fz.exec(e);return i?new dh(i[2]||si,Tb(i[4]||si),Tb(i[5]||si),Tb(i[7]||si),Tb(i[9]||si),t):new dh(si,si,si,si,si)}static file(e){let t=si;if(an&&(e=e.replace(/\\/g,Gs)),e[0]===Gs&&e[1]===Gs){const i=e.indexOf(Gs,2);i===-1?(t=e.substring(2),e=Gs):(t=e.substring(2,i),e=e.substring(i)||Gs)}return new dh("file",t,e,si,si)}static from(e){const t=new dh(e.scheme,e.authority,e.path,e.query,e.fragment);return BR(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return an&&e.scheme==="file"?i=De.file(fr.join(BC(e,!0),...t)).path:i=Ii.join(e.path,...t),e.with({path:i})}toString(e=!1){return zE(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof De)return e;{const t=new dh(e);return t._formatted=e.external,t._fsPath=e._sep===zB?e.fsPath:null,t}}else return e}}const zB=an?1:void 0;class dh extends De{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=BC(this,!1)),this._fsPath}toString(e=!1){return e?zE(this,!0):(this._formatted||(this._formatted=zE(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=zB),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 jB={[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 WR(r,e){let t,i=-1;for(let n=0;n<r.length;n++){const s=r.charCodeAt(n);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47)i!==-1&&(t+=encodeURIComponent(r.substring(i,n)),i=-1),t!==void 0&&(t+=r.charAt(n));else{t===void 0&&(t=r.substr(0,n));const o=jB[s];o!==void 0?(i!==-1&&(t+=encodeURIComponent(r.substring(i,n)),i=-1),t+=o):i===-1&&(i=n)}}return i!==-1&&(t+=encodeURIComponent(r.substring(i))),t!==void 0?t:r}function Bz(r){let e;for(let t=0;t<r.length;t++){const i=r.charCodeAt(t);i===35||i===63?(e===void 0&&(e=r.substr(0,t)),e+=jB[i]):e!==void 0&&(e+=r[t])}return e!==void 0?e:r}function BC(r,e){let t;return r.authority&&r.path.length>1&&r.scheme==="file"?t=`//${r.authority}${r.path}`:r.path.charCodeAt(0)===47&&(r.path.charCodeAt(1)>=65&&r.path.charCodeAt(1)<=90||r.path.charCodeAt(1)>=97&&r.path.charCodeAt(1)<=122)&&r.path.charCodeAt(2)===58?e?t=r.path.substr(1):t=r.path[1].toLowerCase()+r.path.substr(2):t=r.path,an&&(t=t.replace(/\//g,"\\")),t}function zE(r,e){const t=e?Bz:WR;let i="",{scheme:n,authority:s,path:o,query:a,fragment:l}=r;if(n&&(i+=n,i+=":"),(s||n==="file")&&(i+=Gs,i+=Gs),s){let c=s.indexOf("@");if(c!==-1){const d=s.substr(0,c);s=s.substr(c+1),c=d.indexOf(":"),c===-1?i+=t(d,!1):(i+=t(d.substr(0,c),!1),i+=":",i+=t(d.substr(c+1),!1)),i+="@"}s=s.toLowerCase(),c=s.indexOf(":"),c===-1?i+=t(s,!1):(i+=t(s.substr(0,c),!1),i+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}i+=t(o,!0)}return a&&(i+="?",i+=t(a,!1)),l&&(i+="#",i+=e?l:WR(l,!1)),i}function qB(r){try{return decodeURIComponent(r)}catch{return r.length>3?r.substr(0,3)+qB(r.substr(3)):r}}const VR=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function Tb(r){return r.match(VR)?r.replace(VR,e=>qB(e)):r}class U{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 U(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return U.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return U.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<t.column}isBeforeOrEqual(e){return U.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<=t.column}static compare(e,t){let i=e.lineNumber|0,n=t.lineNumber|0;if(i===n){let s=e.column|0,o=t.column|0;return s-o}return i-n}clone(){return new U(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new U(e.lineNumber,e.column)}static isIPosition(e){return e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}}class k{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 k.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return k.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}containsRange(e){return k.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return k.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return k.plusRange(this,e)}static plusRange(e,t){let i,n,s,o;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.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 k(i,n,s,o)}intersectRanges(e){return k.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,d=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),s>c?(s=c,o=d):s===c&&(o=Math.min(o,d)),i>s||i===s&&n>o?null:new k(i,n,s,o)}equalsRange(e){return k.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return k.getEndPosition(this)}static getEndPosition(e){return new U(e.endLineNumber,e.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(e){return new U(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new k(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new k(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return k.collapseToStart(this)}static collapseToStart(e){return new k(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new k(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const s=e.startLineNumber|0,o=t.startLineNumber|0;if(s===o){const a=e.startColumn|0,l=t.startColumn|0;if(a===l){const c=e.endLineNumber|0,d=t.endLineNumber|0;if(c===d){const u=e.endColumn|0,h=t.endColumn|0;return u-h}return c-d}return a-l}return s-o}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}class _e extends k{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 _e.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 this.getDirection()===0?new _e(this.startLineNumber,this.startColumn,e,t):new _e(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new U(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return this.getDirection()===0?new _e(e,t,this.endLineNumber,this.endColumn):new _e(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new _e(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new _e(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<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&typeof e.selectionStartLineNumber=="number"&&typeof e.selectionStartColumn=="number"&&typeof e.positionLineNumber=="number"&&typeof e.positionColumn=="number"}static createWithDirection(e,t,i,n,s){return s===0?new _e(e,t,i,n):new _e(i,n,e,t)}}class $y{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e|0,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class cD{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class Uy{constructor(e,t){this._tokenizationResult2Brand=void 0,this.tokens=e,this.endState=t}}var jE;(function(r){r[r.Unknown=0]="Unknown",r[r.Disabled=1]="Disabled",r[r.Enabled=2]="Enabled"})(jE||(jE={}));var qE;(function(r){r[r.KeepWhitespace=1]="KeepWhitespace",r[r.InsertAsSnippet=4]="InsertAsSnippet"})(qE||(qE={}));var GE;(function(r){r[r.Method=0]="Method",r[r.Function=1]="Function",r[r.Constructor=2]="Constructor",r[r.Field=3]="Field",r[r.Variable=4]="Variable",r[r.Class=5]="Class",r[r.Struct=6]="Struct",r[r.Interface=7]="Interface",r[r.Module=8]="Module",r[r.Property=9]="Property",r[r.Event=10]="Event",r[r.Operator=11]="Operator",r[r.Unit=12]="Unit",r[r.Value=13]="Value",r[r.Constant=14]="Constant",r[r.Enum=15]="Enum",r[r.EnumMember=16]="EnumMember",r[r.Keyword=17]="Keyword",r[r.Text=18]="Text",r[r.Color=19]="Color",r[r.File=20]="File",r[r.Reference=21]="Reference",r[r.Customcolor=22]="Customcolor",r[r.Folder=23]="Folder",r[r.TypeParameter=24]="TypeParameter",r[r.User=25]="User",r[r.Issue=26]="Issue",r[r.Snippet=27]="Snippet"})(GE||(GE={}));var KE;(function(r){r[r.Deprecated=1]="Deprecated"})(KE||(KE={}));var YE;(function(r){r[r.Invoke=0]="Invoke",r[r.TriggerCharacter=1]="TriggerCharacter",r[r.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(YE||(YE={}));var ZE;(function(r){r[r.EXACT=0]="EXACT",r[r.ABOVE=1]="ABOVE",r[r.BELOW=2]="BELOW"})(ZE||(ZE={}));var XE;(function(r){r[r.NotSet=0]="NotSet",r[r.ContentFlush=1]="ContentFlush",r[r.RecoverFromMarkers=2]="RecoverFromMarkers",r[r.Explicit=3]="Explicit",r[r.Paste=4]="Paste",r[r.Undo=5]="Undo",r[r.Redo=6]="Redo"})(XE||(XE={}));var QE;(function(r){r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(QE||(QE={}));var JE;(function(r){r[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write"})(JE||(JE={}));var ek;(function(r){r[r.None=0]="None",r[r.Keep=1]="Keep",r[r.Brackets=2]="Brackets",r[r.Advanced=3]="Advanced",r[r.Full=4]="Full"})(ek||(ek={}));var tk;(function(r){r[r.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",r[r.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",r[r.accessibilitySupport=2]="accessibilitySupport",r[r.accessibilityPageSize=3]="accessibilityPageSize",r[r.ariaLabel=4]="ariaLabel",r[r.autoClosingBrackets=5]="autoClosingBrackets",r[r.autoClosingDelete=6]="autoClosingDelete",r[r.autoClosingOvertype=7]="autoClosingOvertype",r[r.autoClosingQuotes=8]="autoClosingQuotes",r[r.autoIndent=9]="autoIndent",r[r.automaticLayout=10]="automaticLayout",r[r.autoSurround=11]="autoSurround",r[r.bracketPairColorization=12]="bracketPairColorization",r[r.guides=13]="guides",r[r.codeLens=14]="codeLens",r[r.codeLensFontFamily=15]="codeLensFontFamily",r[r.codeLensFontSize=16]="codeLensFontSize",r[r.colorDecorators=17]="colorDecorators",r[r.columnSelection=18]="columnSelection",r[r.comments=19]="comments",r[r.contextmenu=20]="contextmenu",r[r.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",r[r.cursorBlinking=22]="cursorBlinking",r[r.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",r[r.cursorStyle=24]="cursorStyle",r[r.cursorSurroundingLines=25]="cursorSurroundingLines",r[r.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",r[r.cursorWidth=27]="cursorWidth",r[r.disableLayerHinting=28]="disableLayerHinting",r[r.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",r[r.domReadOnly=30]="domReadOnly",r[r.dragAndDrop=31]="dragAndDrop",r[r.emptySelectionClipboard=32]="emptySelectionClipboard",r[r.extraEditorClassName=33]="extraEditorClassName",r[r.fastScrollSensitivity=34]="fastScrollSensitivity",r[r.find=35]="find",r[r.fixedOverflowWidgets=36]="fixedOverflowWidgets",r[r.folding=37]="folding",r[r.foldingStrategy=38]="foldingStrategy",r[r.foldingHighlight=39]="foldingHighlight",r[r.foldingImportsByDefault=40]="foldingImportsByDefault",r[r.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",r[r.fontFamily=42]="fontFamily",r[r.fontInfo=43]="fontInfo",r[r.fontLigatures=44]="fontLigatures",r[r.fontSize=45]="fontSize",r[r.fontWeight=46]="fontWeight",r[r.formatOnPaste=47]="formatOnPaste",r[r.formatOnType=48]="formatOnType",r[r.glyphMargin=49]="glyphMargin",r[r.gotoLocation=50]="gotoLocation",r[r.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",r[r.hover=52]="hover",r[r.inDiffEditor=53]="inDiffEditor",r[r.inlineSuggest=54]="inlineSuggest",r[r.letterSpacing=55]="letterSpacing",r[r.lightbulb=56]="lightbulb",r[r.lineDecorationsWidth=57]="lineDecorationsWidth",r[r.lineHeight=58]="lineHeight",r[r.lineNumbers=59]="lineNumbers",r[r.lineNumbersMinChars=60]="lineNumbersMinChars",r[r.linkedEditing=61]="linkedEditing",r[r.links=62]="links",r[r.matchBrackets=63]="matchBrackets",r[r.minimap=64]="minimap",r[r.mouseStyle=65]="mouseStyle",r[r.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",r[r.mouseWheelZoom=67]="mouseWheelZoom",r[r.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",r[r.multiCursorModifier=69]="multiCursorModifier",r[r.multiCursorPaste=70]="multiCursorPaste",r[r.occurrencesHighlight=71]="occurrencesHighlight",r[r.overviewRulerBorder=72]="overviewRulerBorder",r[r.overviewRulerLanes=73]="overviewRulerLanes",r[r.padding=74]="padding",r[r.parameterHints=75]="parameterHints",r[r.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",r[r.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",r[r.quickSuggestions=78]="quickSuggestions",r[r.quickSuggestionsDelay=79]="quickSuggestionsDelay",r[r.readOnly=80]="readOnly",r[r.renameOnType=81]="renameOnType",r[r.renderControlCharacters=82]="renderControlCharacters",r[r.renderFinalNewline=83]="renderFinalNewline",r[r.renderLineHighlight=84]="renderLineHighlight",r[r.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",r[r.renderValidationDecorations=86]="renderValidationDecorations",r[r.renderWhitespace=87]="renderWhitespace",r[r.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",r[r.roundedSelection=89]="roundedSelection",r[r.rulers=90]="rulers",r[r.scrollbar=91]="scrollbar",r[r.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",r[r.scrollBeyondLastLine=93]="scrollBeyondLastLine",r[r.scrollPredominantAxis=94]="scrollPredominantAxis",r[r.selectionClipboard=95]="selectionClipboard",r[r.selectionHighlight=96]="selectionHighlight",r[r.selectOnLineNumbers=97]="selectOnLineNumbers",r[r.showFoldingControls=98]="showFoldingControls",r[r.showUnused=99]="showUnused",r[r.snippetSuggestions=100]="snippetSuggestions",r[r.smartSelect=101]="smartSelect",r[r.smoothScrolling=102]="smoothScrolling",r[r.stickyTabStops=103]="stickyTabStops",r[r.stopRenderingLineAfter=104]="stopRenderingLineAfter",r[r.suggest=105]="suggest",r[r.suggestFontSize=106]="suggestFontSize",r[r.suggestLineHeight=107]="suggestLineHeight",r[r.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",r[r.suggestSelection=109]="suggestSelection",r[r.tabCompletion=110]="tabCompletion",r[r.tabIndex=111]="tabIndex",r[r.unusualLineTerminators=112]="unusualLineTerminators",r[r.useShadowDOM=113]="useShadowDOM",r[r.useTabStops=114]="useTabStops",r[r.wordSeparators=115]="wordSeparators",r[r.wordWrap=116]="wordWrap",r[r.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",r[r.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",r[r.wordWrapColumn=119]="wordWrapColumn",r[r.wordWrapOverride1=120]="wordWrapOverride1",r[r.wordWrapOverride2=121]="wordWrapOverride2",r[r.wrappingIndent=122]="wrappingIndent",r[r.wrappingStrategy=123]="wrappingStrategy",r[r.showDeprecated=124]="showDeprecated",r[r.inlayHints=125]="inlayHints",r[r.editorClassName=126]="editorClassName",r[r.pixelRatio=127]="pixelRatio",r[r.tabFocusMode=128]="tabFocusMode",r[r.layoutInfo=129]="layoutInfo",r[r.wrappingInfo=130]="wrappingInfo"})(tk||(tk={}));var ik;(function(r){r[r.TextDefined=0]="TextDefined",r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(ik||(ik={}));var nk;(function(r){r[r.LF=0]="LF",r[r.CRLF=1]="CRLF"})(nk||(nk={}));var rk;(function(r){r[r.None=0]="None",r[r.Indent=1]="Indent",r[r.IndentOutdent=2]="IndentOutdent",r[r.Outdent=3]="Outdent"})(rk||(rk={}));var sk;(function(r){r[r.Other=0]="Other",r[r.Type=1]="Type",r[r.Parameter=2]="Parameter"})(sk||(sk={}));var ok;(function(r){r[r.Automatic=0]="Automatic",r[r.Explicit=1]="Explicit"})(ok||(ok={}));var ak;(function(r){r[r.DependsOnKbLayout=-1]="DependsOnKbLayout",r[r.Unknown=0]="Unknown",r[r.Backspace=1]="Backspace",r[r.Tab=2]="Tab",r[r.Enter=3]="Enter",r[r.Shift=4]="Shift",r[r.Ctrl=5]="Ctrl",r[r.Alt=6]="Alt",r[r.PauseBreak=7]="PauseBreak",r[r.CapsLock=8]="CapsLock",r[r.Escape=9]="Escape",r[r.Space=10]="Space",r[r.PageUp=11]="PageUp",r[r.PageDown=12]="PageDown",r[r.End=13]="End",r[r.Home=14]="Home",r[r.LeftArrow=15]="LeftArrow",r[r.UpArrow=16]="UpArrow",r[r.RightArrow=17]="RightArrow",r[r.DownArrow=18]="DownArrow",r[r.Insert=19]="Insert",r[r.Delete=20]="Delete",r[r.KEY_0=21]="KEY_0",r[r.KEY_1=22]="KEY_1",r[r.KEY_2=23]="KEY_2",r[r.KEY_3=24]="KEY_3",r[r.KEY_4=25]="KEY_4",r[r.KEY_5=26]="KEY_5",r[r.KEY_6=27]="KEY_6",r[r.KEY_7=28]="KEY_7",r[r.KEY_8=29]="KEY_8",r[r.KEY_9=30]="KEY_9",r[r.KEY_A=31]="KEY_A",r[r.KEY_B=32]="KEY_B",r[r.KEY_C=33]="KEY_C",r[r.KEY_D=34]="KEY_D",r[r.KEY_E=35]="KEY_E",r[r.KEY_F=36]="KEY_F",r[r.KEY_G=37]="KEY_G",r[r.KEY_H=38]="KEY_H",r[r.KEY_I=39]="KEY_I",r[r.KEY_J=40]="KEY_J",r[r.KEY_K=41]="KEY_K",r[r.KEY_L=42]="KEY_L",r[r.KEY_M=43]="KEY_M",r[r.KEY_N=44]="KEY_N",r[r.KEY_O=45]="KEY_O",r[r.KEY_P=46]="KEY_P",r[r.KEY_Q=47]="KEY_Q",r[r.KEY_R=48]="KEY_R",r[r.KEY_S=49]="KEY_S",r[r.KEY_T=50]="KEY_T",r[r.KEY_U=51]="KEY_U",r[r.KEY_V=52]="KEY_V",r[r.KEY_W=53]="KEY_W",r[r.KEY_X=54]="KEY_X",r[r.KEY_Y=55]="KEY_Y",r[r.KEY_Z=56]="KEY_Z",r[r.Meta=57]="Meta",r[r.ContextMenu=58]="ContextMenu",r[r.F1=59]="F1",r[r.F2=60]="F2",r[r.F3=61]="F3",r[r.F4=62]="F4",r[r.F5=63]="F5",r[r.F6=64]="F6",r[r.F7=65]="F7",r[r.F8=66]="F8",r[r.F9=67]="F9",r[r.F10=68]="F10",r[r.F11=69]="F11",r[r.F12=70]="F12",r[r.F13=71]="F13",r[r.F14=72]="F14",r[r.F15=73]="F15",r[r.F16=74]="F16",r[r.F17=75]="F17",r[r.F18=76]="F18",r[r.F19=77]="F19",r[r.NumLock=78]="NumLock",r[r.ScrollLock=79]="ScrollLock",r[r.US_SEMICOLON=80]="US_SEMICOLON",r[r.US_EQUAL=81]="US_EQUAL",r[r.US_COMMA=82]="US_COMMA",r[r.US_MINUS=83]="US_MINUS",r[r.US_DOT=84]="US_DOT",r[r.US_SLASH=85]="US_SLASH",r[r.US_BACKTICK=86]="US_BACKTICK",r[r.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",r[r.US_BACKSLASH=88]="US_BACKSLASH",r[r.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",r[r.US_QUOTE=90]="US_QUOTE",r[r.OEM_8=91]="OEM_8",r[r.OEM_102=92]="OEM_102",r[r.NUMPAD_0=93]="NUMPAD_0",r[r.NUMPAD_1=94]="NUMPAD_1",r[r.NUMPAD_2=95]="NUMPAD_2",r[r.NUMPAD_3=96]="NUMPAD_3",r[r.NUMPAD_4=97]="NUMPAD_4",r[r.NUMPAD_5=98]="NUMPAD_5",r[r.NUMPAD_6=99]="NUMPAD_6",r[r.NUMPAD_7=100]="NUMPAD_7",r[r.NUMPAD_8=101]="NUMPAD_8",r[r.NUMPAD_9=102]="NUMPAD_9",r[r.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",r[r.NUMPAD_ADD=104]="NUMPAD_ADD",r[r.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",r[r.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",r[r.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",r[r.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",r[r.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",r[r.ABNT_C1=110]="ABNT_C1",r[r.ABNT_C2=111]="ABNT_C2",r[r.MAX_VALUE=112]="MAX_VALUE"})(ak||(ak={}));var lk;(function(r){r[r.Hint=1]="Hint",r[r.Info=2]="Info",r[r.Warning=4]="Warning",r[r.Error=8]="Error"})(lk||(lk={}));var ck;(function(r){r[r.Unnecessary=1]="Unnecessary",r[r.Deprecated=2]="Deprecated"})(ck||(ck={}));var dk;(function(r){r[r.Inline=1]="Inline",r[r.Gutter=2]="Gutter"})(dk||(dk={}));var uk;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.TEXTAREA=1]="TEXTAREA",r[r.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",r[r.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",r[r.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",r[r.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",r[r.CONTENT_TEXT=6]="CONTENT_TEXT",r[r.CONTENT_EMPTY=7]="CONTENT_EMPTY",r[r.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",r[r.CONTENT_WIDGET=9]="CONTENT_WIDGET",r[r.OVERVIEW_RULER=10]="OVERVIEW_RULER",r[r.SCROLLBAR=11]="SCROLLBAR",r[r.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",r[r.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(uk||(uk={}));var hk;(function(r){r[r.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",r[r.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",r[r.TOP_CENTER=2]="TOP_CENTER"})(hk||(hk={}));var fk;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(fk||(fk={}));var gk;(function(r){r[r.Off=0]="Off",r[r.On=1]="On",r[r.Relative=2]="Relative",r[r.Interval=3]="Interval",r[r.Custom=4]="Custom"})(gk||(gk={}));var pk;(function(r){r[r.None=0]="None",r[r.Text=1]="Text",r[r.Blocks=2]="Blocks"})(pk||(pk={}));var mk;(function(r){r[r.Smooth=0]="Smooth",r[r.Immediate=1]="Immediate"})(mk||(mk={}));var _k;(function(r){r[r.Auto=1]="Auto",r[r.Hidden=2]="Hidden",r[r.Visible=3]="Visible"})(_k||(_k={}));var bk;(function(r){r[r.LTR=0]="LTR",r[r.RTL=1]="RTL"})(bk||(bk={}));var vk;(function(r){r[r.Invoke=1]="Invoke",r[r.TriggerCharacter=2]="TriggerCharacter",r[r.ContentChange=3]="ContentChange"})(vk||(vk={}));var Ck;(function(r){r[r.File=0]="File",r[r.Module=1]="Module",r[r.Namespace=2]="Namespace",r[r.Package=3]="Package",r[r.Class=4]="Class",r[r.Method=5]="Method",r[r.Property=6]="Property",r[r.Field=7]="Field",r[r.Constructor=8]="Constructor",r[r.Enum=9]="Enum",r[r.Interface=10]="Interface",r[r.Function=11]="Function",r[r.Variable=12]="Variable",r[r.Constant=13]="Constant",r[r.String=14]="String",r[r.Number=15]="Number",r[r.Boolean=16]="Boolean",r[r.Array=17]="Array",r[r.Object=18]="Object",r[r.Key=19]="Key",r[r.Null=20]="Null",r[r.EnumMember=21]="EnumMember",r[r.Struct=22]="Struct",r[r.Event=23]="Event",r[r.Operator=24]="Operator",r[r.TypeParameter=25]="TypeParameter"})(Ck||(Ck={}));var wk;(function(r){r[r.Deprecated=1]="Deprecated"})(wk||(wk={}));var yk;(function(r){r[r.Hidden=0]="Hidden",r[r.Blink=1]="Blink",r[r.Smooth=2]="Smooth",r[r.Phase=3]="Phase",r[r.Expand=4]="Expand",r[r.Solid=5]="Solid"})(yk||(yk={}));var Sk;(function(r){r[r.Line=1]="Line",r[r.Block=2]="Block",r[r.Underline=3]="Underline",r[r.LineThin=4]="LineThin",r[r.BlockOutline=5]="BlockOutline",r[r.UnderlineThin=6]="UnderlineThin"})(Sk||(Sk={}));var xk;(function(r){r[r.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",r[r.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",r[r.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",r[r.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(xk||(xk={}));var Ek;(function(r){r[r.None=0]="None",r[r.Same=1]="Same",r[r.Indent=2]="Indent",r[r.DeepIndent=3]="DeepIndent"})(Ek||(Ek={}));class U_{static chord(e,t){return Bi(e,t)}}U_.CtrlCmd=2048;U_.Shift=1024;U_.Alt=512;U_.WinCtrl=256;function GB(){return{editor:void 0,languages:void 0,CancellationTokenSource:Hn,Emitter:H,KeyCode:ak,KeyMod:U_,Position:U,Range:k,Selection:_e,SelectionDirection:bk,MarkerSeverity:lk,MarkerTag:ck,Uri:De,Token:$y}}var Js;(function(r){r.serviceIds=new Map,r.DI_TARGET="$di$target",r.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[r.DI_DEPENDENCIES]||[]}r.getServiceDependencies=e})(Js||(Js={}));const gt=bt("instantiationService");function KB(r,e,t,i){e[Js.DI_TARGET]===e?e[Js.DI_DEPENDENCIES].push({id:r,index:t,optional:i}):(e[Js.DI_DEPENDENCIES]=[{id:r,index:t,optional:i}],e[Js.DI_TARGET]=e)}function bt(r){if(Js.serviceIds.has(r))return Js.serviceIds.get(r);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");KB(e,t,n,!1)};return e.toString=()=>r,Js.serviceIds.set(r,e),e}function Wz(r){return function(e,t,i){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");KB(r,e,i,!0)}}const Ct=bt("codeEditorService");class Xd{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new H,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}Xd.INSTANCE=new Xd;function kk(){return Xd.INSTANCE.getZoomLevel()}function Vz(){return Xd.INSTANCE.getTimeSinceLastZoomLevelChanged()}function YB(r){return Xd.INSTANCE.onDidChangeZoomLevel(r)}function Hz(){return Xd.INSTANCE.getZoomFactor()}function WC(){return Xd.INSTANCE.getPixelRatio()}const z_=navigator.userAgent,Bn=z_.indexOf("Firefox")>=0,Md=z_.indexOf("AppleWebKit")>=0,VC=z_.indexOf("Chrome")>=0,Ko=!VC&&z_.indexOf("Safari")>=0,$z=!VC&&!Ko&&Md,vp=z_.indexOf("Android")>=0,ZB=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,zy={clipboard:{writeText:io||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:io||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>io||ZB?0:navigator.keyboard||Ko?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};let XB=new Array(230),t1=new Array(112);(function(){for(let e=0;e<t1.length;e++)t1[e]=-1;function r(e,t){XB[e]=t,t1[t]=e}r(3,7),r(8,1),r(9,2),r(13,3),r(16,4),r(17,5),r(18,6),r(19,7),r(20,8),r(27,9),r(32,10),r(33,11),r(34,12),r(35,13),r(36,14),r(37,15),r(38,16),r(39,17),r(40,18),r(45,19),r(46,20),r(48,21),r(49,22),r(50,23),r(51,24),r(52,25),r(53,26),r(54,27),r(55,28),r(56,29),r(57,30),r(65,31),r(66,32),r(67,33),r(68,34),r(69,35),r(70,36),r(71,37),r(72,38),r(73,39),r(74,40),r(75,41),r(76,42),r(77,43),r(78,44),r(79,45),r(80,46),r(81,47),r(82,48),r(83,49),r(84,50),r(85,51),r(86,52),r(87,53),r(88,54),r(89,55),r(90,56),r(93,58),r(96,93),r(97,94),r(98,95),r(99,96),r(100,97),r(101,98),r(102,99),r(103,100),r(104,101),r(105,102),r(106,103),r(107,104),r(108,105),r(109,106),r(110,107),r(111,108),r(112,59),r(113,60),r(114,61),r(115,62),r(116,63),r(117,64),r(118,65),r(119,66),r(120,67),r(121,68),r(122,69),r(123,70),r(124,71),r(125,72),r(126,73),r(127,74),r(128,75),r(129,76),r(130,77),r(144,78),r(145,79),r(186,80),r(187,81),r(188,82),r(189,83),r(190,84),r(191,85),r(192,86),r(193,110),r(194,111),r(219,87),r(220,88),r(221,89),r(222,90),r(223,91),r(226,92),r(229,109),Bn?(r(59,80),r(107,81),r(109,83),tt&&r(224,57)):Md&&(r(91,57),r(tt?93:92,57))})();function Uz(r){if(r.charCode){let e=String.fromCharCode(r.charCode).toUpperCase();return xd.fromString(e)}return XB[r.keyCode]||0}const zz=tt?256:2048,jz=512,qz=1024,Gz=tt?2048:256;class ei{constructor(e){this._standardKeyboardEventBrand=!0;let 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.keyCode=Uz(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=zz),this.altKey&&(t|=jz),this.shiftKey&&(t|=qz),this.metaKey&&(t|=Gz),t|=e,t}_computeRuntimeKeybinding(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new _m(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let Lk=!1,uh=null;function Kz(r){if(!r.parent||r.parent===r)return null;try{let e=r.location,t=r.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return Lk=!0,null}catch{return Lk=!0,null}return r.parent}class Tk{static getSameOriginWindowChain(){if(!uh){uh=[];let e=window,t;do t=Kz(e),t?uh.push({window:e,iframeElement:e.frameElement||null}):uh.push({window:e,iframeElement:null}),e=t;while(e)}return uh.slice(0)}static hasDifferentOriginAncestor(){return uh||this.getSameOriginWindowChain(),Lk}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t||!o.iframeElement)break;let a=o.iframeElement.getBoundingClientRect();i+=a.top,n+=a.left}return{top:i,left:n}}}class Zr{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=Tk.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Nf{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){let n=e,s=e;if(typeof n.wheelDeltaY!="undefined")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS!="undefined"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?Bn&&!tt?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX!="undefined")Ko&&an?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS!="undefined"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?Bn&&!tt?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var Yz=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Zz(r){return!!r&&typeof r.then=="function"}function Pi(r){const e=new Hn,t=r(e.token),i=new Promise((n,s)=>{const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),s(vg())});Promise.resolve(t).then(a=>{o.dispose(),e.dispose(),n(a)},a=>{o.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(n,s){return i.then(n,s)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function dD(r,e,t){return Promise.race([r,new Promise(i=>e.onCancellationRequested(()=>i(t)))])}class Xz{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{this.queuedPromise=null;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}}class cl{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,n)=>{this.doResolve=i,this.doReject=n}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const i=this.task;return this.task=null,i()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(vg()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class Qz{constructor(e){this.delayer=new cl(e),this.throttler=new Xz}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}dispose(){this.delayer.dispose()}}function mc(r,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},r),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(vg())})}):Pi(t=>mc(r,t))}function Qd(r,e=0){const t=setTimeout(r,e);return Xe(()=>clearTimeout(t))}function QB(r,e=i=>!!i,t=null){let i=0;const n=r.length,s=()=>{if(i>=n)return Promise.resolve(t);const o=r[i++];return Promise.resolve(o()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class rr{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class j_{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class $t{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 this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let HC;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?HC=r=>{const e=setTimeout(()=>{const i=Date.now()+15;r(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0,clearTimeout(e))}}}:HC=(r,e)=>{const t=requestIdleCallback(r,typeof e=="number"?{timeout:e}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(t))}}}})();class df{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=HC(()=>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}}var Ik;(function(r){function e(t){return Yz(this,void 0,void 0,function*(){let i;const n=yield Promise.all(t.map(s=>s.then(o=>o,o=>{i||(i=o)})));if(typeof i!="undefined")throw i;return n})}r.settled=e})(Ik||(Ik={}));var Ye;(function(r){r.inMemory="inmemory",r.vscode="vscode",r.internal="private",r.walkThrough="walkThrough",r.walkThroughSnippet="walkThroughSnippet",r.http="http",r.https="https",r.file="file",r.mailto="mailto",r.untitled="untitled",r.data="data",r.command="command",r.vscodeRemote="vscode-remote",r.vscodeRemoteResource="vscode-remote-resource",r.userData="vscode-userdata",r.vscodeCustomEditor="vscode-custom-editor",r.vscodeNotebook="vscode-notebook",r.vscodeNotebookCell="vscode-notebook-cell",r.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",r.vscodeNotebookCellOutput="vscode-notebook-cell-output",r.vscodeInteractive="vscode-interactive",r.vscodeInteractiveInput="vscode-interactive-input",r.vscodeSettings="vscode-settings",r.vscodeWorkspaceTrust="vscode-workspace-trust",r.vscodeTerminal="vscode-terminal",r.webviewPanel="webview-panel",r.vscodeWebview="vscode-webview",r.extension="extension",r.vscodeFileResource="vscode-file",r.tmp="tmp"})(Ye||(Ye={}));class Jz{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&i.indexOf(":")!==-1&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let o=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(o+=`&tkn=${encodeURIComponent(s)}`),De.from({scheme:_g?this._preferredWebSchema:Ye.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:o})}}const JB=new Jz;class bm{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===Ye.vscodeRemote?JB.rewrite(i):i.scheme===Ye.file&&(io||typeof yi.importScripts=="function"&&yi.origin===`${Ye.vscodeFileResource}://${bm.FALLBACK_AUTHORITY}`)?i.with({scheme:Ye.vscodeFileResource,authority:i.authority||bm.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return De.isUri(e)?e:De.parse(t.toUrl(e))}}bm.FALLBACK_AUTHORITY="vscode-app";const e3=new bm;function Ki(r){for(;r.firstChild;)r.firstChild.remove()}function uD(r){var e;return(e=r==null?void 0:r.isConnected)!==null&&e!==void 0?e:!1}class ej{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 J(r,e,t,i){return new ej(r,e,t,i)}function t3(r){return function(e){return r(new Zr(e))}}function tj(r){return function(e){return r(new ei(e))}}let Ei=function(e,t,i,n){let s=i;return t==="click"||t==="mousedown"?s=t3(i):(t==="keydown"||t==="keypress"||t==="keyup")&&(s=tj(i)),J(e,t,s,n)},ij=function(e,t,i){let n=t3(t);return hD(e,n,i)};function hD(r,e,t){return J(r,ra&&zy.pointerEvents?Te.POINTER_DOWN:Te.MOUSE_DOWN,e,t)}function i3(r,e,t){return J(r,ra&&zy.pointerEvents?Te.POINTER_UP:Te.MOUSE_UP,e,t)}function fD(r,e){return J(r,"mouseout",t=>{let i=t.relatedTarget;for(;i&&i!==r;)i=i.parentNode;i!==r&&e(t)})}function nj(r,e){return J(r,"pointerout",t=>{let i=t.relatedTarget;for(;i&&i!==r;)i=i.parentNode;i!==r&&e(t)})}let i1=null;function rj(r){if(!i1){const e=t=>setTimeout(()=>t(new Date().getTime()),0);i1=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return i1.call(self,r)}let n3,oa;class n1{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(e){Fe(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let r=[],e=null,t=!1,i=!1,n=()=>{for(t=!1,e=r,r=[],i=!0;e.length>0;)e.sort(n1.sort),e.shift().execute();i=!1};oa=(s,o=0)=>{let a=new n1(s,o);return r.push(a),t||(t=!0,rj(n)),a},n3=(s,o)=>{if(i){let a=new n1(s,o);return e.push(a),a}else return oa(s,o)}})();const sj=8,oj=function(r,e){return e};class aj extends Z{constructor(e,t,i,n=oj,s=sj){super();let o=null,a=0,l=this._register(new rr),c=()=>{a=new Date().getTime(),i(o),o=null};this._register(J(e,t,d=>{o=n(o,d);let u=new Date().getTime()-a;u>=s?(l.cancel(),c()):l.setIfNotSet(c,s-u)}))}}function gD(r,e,t,i,n){return new aj(r,e,t,i,n)}function pD(r){return document.defaultView.getComputedStyle(r,null)}function jy(r){if(r!==document.body)return new Ht(r.clientWidth,r.clientHeight);if(ra&&window.visualViewport)return new Ht(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Ht(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Ht(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Ht(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class ni{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=pD(e),s="0";return n&&(n.getPropertyValue?s=n.getPropertyValue(t):s=n.getAttribute(i)),ni.convertToPixels(e,s)}static getBorderLeftWidth(e){return ni.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return ni.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return ni.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return ni.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return ni.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return ni.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return ni.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return ni.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return ni.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return ni.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return ni.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return ni.getDimension(e,"margin-bottom","marginBottom")}}class Ht{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Ht(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof Ht?e:new Ht(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}function r3(r){let e=r.offsetParent,t=r.offsetTop,i=r.offsetLeft;for(;(r=r.parentNode)!==null&&r!==document.body&&r!==document.documentElement;){t-=r.scrollTop;const n=o3(r)?null:pD(r);n&&(i-=n.direction!=="rtl"?r.scrollLeft:-r.scrollLeft),r===e&&(i+=ni.getBorderLeftWidth(r),t+=ni.getBorderTopWidth(r),t+=r.offsetTop,i+=r.offsetLeft,e=r.offsetParent)}return{left:i,top:t}}function lj(r,e,t){typeof e=="number"&&(r.style.width=`${e}px`),typeof t=="number"&&(r.style.height=`${t}px`)}function rn(r){let e=r.getBoundingClientRect();return{left:e.left+tl.scrollX,top:e.top+tl.scrollY,width:e.width,height:e.height}}const tl=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function ps(r){let e=ni.getMarginLeft(r)+ni.getMarginRight(r);return r.offsetWidth+e}function r1(r){let e=ni.getBorderLeftWidth(r)+ni.getBorderRightWidth(r),t=ni.getPaddingLeft(r)+ni.getPaddingRight(r);return r.offsetWidth-e-t}function cj(r){let e=ni.getBorderTopWidth(r)+ni.getBorderBottomWidth(r),t=ni.getPaddingTop(r)+ni.getPaddingBottom(r);return r.offsetHeight-e-t}function Dk(r){let e=ni.getMarginTop(r)+ni.getMarginBottom(r);return r.offsetHeight+e}function Qo(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function s3(r,e,t){for(;r&&r.nodeType===r.ELEMENT_NODE;){if(r.classList.contains(e))return r;if(t){if(typeof t=="string"){if(r.classList.contains(t))return null}else if(r===t)return null}r=r.parentNode}return null}function HR(r,e,t){return!!s3(r,e,t)}function o3(r){return r&&!!r.host&&!!r.mode}function qy(r){return!!Ru(r)}function Ru(r){for(;r.parentNode;){if(r===document.body)return null;r=r.parentNode}return o3(r)?r:null}function uf(){let r=document.activeElement;for(;r!=null&&r.shadowRoot;)r=r.shadowRoot.activeElement;return r}function Pr(r=document.getElementsByTagName("head")[0]){let e=document.createElement("style");return e.type="text/css",e.media="screen",r.appendChild(e),e}let s1=null;function a3(){return s1||(s1=Pr()),s1}function dj(r){var e,t;return!((e=r==null?void 0:r.sheet)===null||e===void 0)&&e.rules?r.sheet.rules:!((t=r==null?void 0:r.sheet)===null||t===void 0)&&t.cssRules?r.sheet.cssRules:[]}function Ak(r,e,t=a3()){!t||!e||t.sheet.insertRule(r+"{"+e+"}",0)}function $C(r,e=a3()){if(!e)return;let t=dj(e),i=[];for(let n=0;n<t.length;n++)t[n].selectorText.indexOf(r)!==-1&&i.push(n);for(let n=i.length-1;n>=0;n--)e.sheet.deleteRule(i[n])}function l3(r){return typeof HTMLElement=="object"?r instanceof HTMLElement:r&&typeof r=="object"&&r.nodeType===1&&typeof r.nodeName=="string"}const Te={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",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",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:Md?"webkitAnimationStart":"animationstart",ANIMATION_END:Md?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:Md?"webkitAnimationIteration":"animationiteration"},xt={stop:function(r,e){r.preventDefault?r.preventDefault():r.returnValue=!1,e&&(r.stopPropagation?r.stopPropagation():r.cancelBubble=!0)}};function uj(r){let e=[];for(let t=0;r&&r.nodeType===r.ELEMENT_NODE;t++)e[t]=r.scrollTop,r=r.parentNode;return e}function hj(r,e){for(let t=0;r&&r.nodeType===r.ELEMENT_NODE;t++)r.scrollTop!==e[t]&&(r.scrollTop=e[t]),r=r.parentNode}class fj extends Z{constructor(e){super();this._onDidFocus=this._register(new H),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new H),this.onDidBlur=this._onDidBlur.event;let t=Qo(document.activeElement,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=()=>{Qo(document.activeElement,e)!==t&&(t?s():n())},this._register(J(e,Te.FOCUS,n,!0)),this._register(J(e,Te.BLUR,s,!0))}}function Rf(r){return new fj(r)}function X(r,...e){if(r.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function gj(r,e){return r.insertBefore(e,r.firstChild),e}function _c(r,...e){r.innerText="",X(r,...e)}const pj=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var vm;(function(r){r.HTML="http://www.w3.org/1999/xhtml",r.SVG="http://www.w3.org/2000/svg"})(vm||(vm={}));function c3(r,e,t,...i){let n=pj.exec(e);if(!n)throw new Error("Bad use of emmet");t=Object.assign({},t||{});let s=n[1]||"div",o;return r!==vm.HTML?o=document.createElementNS(r,s):o=document.createElement(s),n[3]&&(o.id=n[3]),n[4]&&(o.className=n[4].replace(/\./g," ").trim()),Object.keys(t).forEach(a=>{const l=t[a];typeof l!="undefined"&&(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...i),o}function oe(r,e,...t){return c3(vm.HTML,r,e,...t)}oe.SVG=function(r,e,...t){return c3(vm.SVG,r,e,...t)};function Tr(...r){for(let e of r)e.style.display="",e.removeAttribute("aria-hidden")}function Zn(...r){for(let e of r)e.style.display="none",e.setAttribute("aria-hidden","true")}function mj(r){return Array.prototype.slice.call(document.getElementsByTagName(r),0)}function $R(r){const e=window.devicePixelRatio*r;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function d3(r){window.open(r,"_blank","noopener")}function _j(r){const e=()=>{r(),t=oa(e)};let t=oa(e);return Xe(()=>t.dispose())}JB.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function dl(r){return r?`url('${e3.asBrowserUri(r).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function UR(r){return`'${r.replace(/'/g,"%27")}'`}class Ed extends H{constructor(){super();this._subscriptions=new ue,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(J(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new ei(e);if(!(t.keyCode===6&&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(t.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;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(J(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(J(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(J(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(J(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(J(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 Ed.instance||(Ed.instance=new Ed),Ed.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function bj(r,e){const t=window.matchMedia(r);typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)}function u3(r){return!r||typeof r!="string"?!0:r.trim().length===0}const vj=/{(\d+)}/g;function bn(r,...e){return e.length===0?r:r.replace(vj,function(t,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=e.length?t:e[n]})}function mD(r){return r.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function Ns(r){return r.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Cj(r,e=" "){const t=_D(r,e);return h3(t,e)}function _D(r,e){if(!r||!e)return r;const t=e.length;if(t===0||r.length===0)return r;let i=0;for(;r.indexOf(e,i)===i;)i=i+t;return r.substring(i)}function h3(r,e){if(!r||!e)return r;const t=e.length,i=r.length;if(t===0||i===0)return r;let n=i,s=-1;for(;s=r.lastIndexOf(e,n-1),!(s===-1||s+t!==n);){if(s===0)return"";n=s}return r.substring(0,n)}function wj(r){return r.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function yj(r){return r.replace(/\*/g,"")}function f3(r,e,t={}){if(!r)throw new Error("Cannot create regex from empty string");e||(r=Ns(r)),t.wholeWord&&(/\B/.test(r.charAt(0))||(r="\\b"+r),/\B/.test(r.charAt(r.length-1))||(r=r+"\\b"));let i="";return t.global&&(i+="g"),t.matchCase||(i+="i"),t.multiline&&(i+="m"),t.unicode&&(i+="u"),new RegExp(r,i)}function Sj(r){return r.source==="^"||r.source==="^$"||r.source==="$"||r.source==="^\\s*$"?!1:!!(r.exec("")&&r.lastIndex===0)}function o1(r){return(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")}function aa(r){return r.split(/\r\n|\r|\n/)}function pr(r){for(let e=0,t=r.length;e<t;e++){const i=r.charCodeAt(e);if(i!==32&&i!==9)return e}return-1}function Tt(r,e=0,t=r.length){for(let i=e;i<t;i++){const n=r.charCodeAt(i);if(n!==32&&n!==9)return r.substring(e,i)}return r.substring(e,t)}function Jo(r,e=r.length-1){for(let t=e;t>=0;t--){const i=r.charCodeAt(t);if(i!==32&&i!==9)return t}return-1}function Cm(r,e){return r<e?-1:r>e?1:0}function bD(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){let l=r.charCodeAt(t),c=e.charCodeAt(n);if(l<c)return-1;if(l>c)return 1}const o=i-t,a=s-n;return o<a?-1:o>a?1:0}function Nk(r,e){return vD(r,e,0,r.length,0,e.length)}function vD(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){let l=r.charCodeAt(t),c=e.charCodeAt(n);if(l===c)continue;const d=l-c;if(!(d===32&&Ks(c))&&!(d===-32&&Ks(l)))return Ka(l)&&Ka(c)?d:bD(r.toLowerCase(),e.toLowerCase(),t,i,n,s)}const o=i-t,a=s-n;return o<a?-1:o>a?1:0}function Ka(r){return r>=97&&r<=122}function Ks(r){return r>=65&&r<=90}function zR(r){return Ka(r)||Ks(r)}function Cp(r,e){return r.length===e.length&&g3(r,e)}function g3(r,e,t=r.length){for(let i=0;i<t;i++){const n=r.charCodeAt(i),s=e.charCodeAt(i);if(n!==s){if(zR(n)&&zR(s)){const o=Math.abs(n-s);if(o!==0&&o!==32)return!1}else if(String.fromCharCode(n).toLowerCase()!==String.fromCharCode(s).toLowerCase())return!1}}return!0}function CD(r,e){const t=e.length;return e.length>r.length?!1:g3(r,e,t)}function Of(r,e){let t,i=Math.min(r.length,e.length);for(t=0;t<i;t++)if(r.charCodeAt(t)!==e.charCodeAt(t))return t;return i}function UC(r,e){let t,i=Math.min(r.length,e.length);const n=r.length-1,s=e.length-1;for(t=0;t<i;t++)if(r.charCodeAt(n-t)!==e.charCodeAt(s-t))return t;return i}function qi(r){return 55296<=r&&r<=56319}function Mf(r){return 56320<=r&&r<=57343}function wD(r,e){return(r-55296<<10)+(e-56320)+65536}function Pa(r,e,t){const i=r.charCodeAt(t);if(qi(i)&&t+1<e){const n=r.charCodeAt(t+1);if(Mf(n))return wD(i,n)}return i}function hf(r,e){const t=r.charCodeAt(e-1);if(Mf(t)&&e>1){const i=r.charCodeAt(e-2);if(qi(i))return wD(i,t)}return t}function zC(r,e){const t=Ya.getInstance(),i=e,n=r.length,s=Pa(r,n,e);e+=s>=65536?2:1;let o=t.getGraphemeBreakType(s);for(;e<n;){const a=Pa(r,n,e),l=t.getGraphemeBreakType(a);if(Pp(o,l))break;e+=a>=65536?2:1,o=l}return e-i}function xj(r,e){const t=Ya.getInstance(),i=e,n=hf(r,e);e-=n>=65536?2:1;let s=t.getGraphemeBreakType(n);for(;e>0;){const o=hf(r,e),a=t.getGraphemeBreakType(o);if(Pp(a,s))break;e-=o>=65536?2:1,s=a}return i-e}const Ej=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function Gy(r){return Ej.test(r)}const kj=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function Lj(r){return kj.test(r)}const Tj=/^[\t\n\r\x20-\x7E]*$/;function yD(r){return Tj.test(r)}const p3=/[\u2028\u2029]/;function m3(r){return p3.test(r)}function Ij(r){for(let e=0,t=r.length;e<t;e++)if(no(r.charCodeAt(e)))return!0;return!1}function no(r){return r=+r,r>=11904&&r<=55215||r>=63744&&r<=64255||r>=65281&&r<=65374}function Mp(r){return r>=127462&&r<=127487||r===8986||r===8987||r===9200||r===9203||r>=9728&&r<=10175||r===11088||r===11093||r>=127744&&r<=128591||r>=128640&&r<=128764||r>=128992&&r<=129003||r>=129280&&r<=129535||r>=129648&&r<=129750}const Dj=String.fromCharCode(65279);function SD(r){return!!(r&&r.length>0&&r.charCodeAt(0)===65279)}function Aj(r,e=!1){return r?(e&&(r=r.replace(/\\./g,"")),r.toLowerCase()!==r):!1}function _3(r){return r=r%(2*26),r<26?String.fromCharCode(97+r):String.fromCharCode(65+r-26)}function hh(r){return Ya.getInstance().getGraphemeBreakType(r)}function Pp(r,e){return r===0?e!==5&&e!==7:r===2&&e===3?!1:r===4||r===2||r===3||e===4||e===2||e===3?!0:!(r===8&&(e===8||e===9||e===11||e===12)||(r===11||r===9)&&(e===9||e===10)||(r===12||r===10)&&e===10||e===5||e===13||e===7||r===1||r===13&&e===14||r===6&&e===6)}class Ya{constructor(){this._data=Nj()}static getInstance(){return Ya._INSTANCE||(Ya._INSTANCE=new Ya),Ya._INSTANCE}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n=2*n;else if(e>t[3*n+1])n=2*n+1;else return t[3*n+2];return 0}}Ya._INSTANCE=null;function Nj(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,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,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,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,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,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,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,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,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,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,2259,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,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,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,6848,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,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,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,9776,9783,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,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,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,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,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Rj(r,e){if(r===0)return 0;const t=Oj(r,e);if(t!==void 0)return t;const i=hf(e,r);return r-=Uv(i),r}function Oj(r,e){let t=hf(e,r);for(r-=Uv(t);Mj(t)||t===65039||t===8419;){if(r===0)return;t=hf(e,r),r-=Uv(t)}if(!!Mp(t)){if(r>=0){const i=hf(e,r);i===8205&&(r-=Uv(i))}return r}}function Uv(r){return r>=65536?2:1}function Mj(r){return 127995<=r&&r<=127999}var jR,qR;class Pj{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return t-i}value(){return this._value[this._pos]}}class Fj{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?bD(e,this._value,0,e.length,this._from,this._to):vD(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class Bj{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(t===47||this._splitOnBackslash&&t===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?bD(e,this._value,0,e.length,this._from,this._to):vD(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class Wj{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new Bj(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return Nk(e,this._value.scheme);if(this._states[this._stateIdx]===2)return Nk(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return Cm(e,this._value.query);if(this._states[this._stateIdx]===5)return Cm(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class Ib{isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class ff{constructor(e){this._iter=e}static forUris(e=()=>!1){return new ff(new Wj(e))}static forStrings(){return new ff(new Pj)}static forConfigKeys(){return new ff(new Fj)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;for(this._root||(this._root=new Ib,this._root.segment=i.value()),n=this._root;;){const o=i.cmp(n.segment);if(o>0)n.left||(n.left=new Ib,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new Ib,n.right.segment=i.value()),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new Ib,n.mid.segment=i.value()),n=n.mid;else break}const s=n.value;return n.value=t,n.key=e,s}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const o=i.cmp(s.segment);if(o>0)n.push([1,s]),s=s.left;else if(o<0)n.push([-1,s]),s=s.right;else if(i.hasNext())i.next(),n.push([0,s]),s=s.mid;else{for(t?(s.left=void 0,s.mid=void 0,s.right=void 0):s.value=void 0;n.length>0&&s.isEmpty();){let[a,l]=n.pop();switch(a){case 1:l.left=void 0;break;case 0:l.mid=void 0;break;case-1:l.right=void 0;break}s=l}break}}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){if(!e)return;const t=[e];for(;t.length>0;){const i=t.pop();i&&(i.value&&(yield[i.key,i.value]),i.left&&t.push(i.left),i.mid&&t.push(i.mid),i.right&&t.push(i.right))}}}class Mn{constructor(e,t){this[jR]="ResourceMap",e instanceof Mn?(this.map=new Map(e.map),this.toKey=t!=null?t:Mn.defaultToKey):(this.map=new Map,this.toKey=e!=null?e:Mn.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}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){typeof t!="undefined"&&(e=e.bind(t));for(let[i,n]of this.map)e(n,De.parse(i),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield De.parse(e)}*entries(){for(let e of this.map.entries())yield[De.parse(e[0]),e[1]]}*[(jR=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[De.parse(e[0]),e[1]]}}Mn.defaultToKey=r=>r.toString();class Vj{constructor(){this[qR]="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(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(!!i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}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](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(qR=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}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)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");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(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),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 Bc extends Vj{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))}}const GR=typeof Buffer!="undefined";let a1;class Ky{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return GR&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new Ky(e)}toString(){return GR?this.buffer.toString():(a1||(a1=new TextDecoder),a1.decode(this.buffer))}}function Hj(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0}function $j(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255}function Hs(r,e){return r[e]*Math.pow(2,24)+r[e+1]*Math.pow(2,16)+r[e+2]*Math.pow(2,8)+r[e+3]}function $s(r,e,t){r[t+3]=e,e=e>>>8,r[t+2]=e,e=e>>>8,r[t+1]=e,e=e>>>8,r[t]=e}function KR(r,e){return r[e]}function YR(r,e,t){r[t]=e}function Rk(r){let e=JSON.parse(r);return e=Ok(e),e}function Ok(r,e=0){if(!r||e>200)return r;if(typeof r=="object"){switch(r.$mid){case 1:return De.revive(r);case 2:return new RegExp(r.source,r.flags)}if(r instanceof Ky||r instanceof Uint8Array)return r;if(Array.isArray(r))for(let t=0;t<r.length;++t)r[t]=Ok(r[t],e+1);else for(const t in r)Object.hasOwnProperty.call(r,t)&&(r[t]=Ok(r[t],e+1))}return r}function Uj(r){return r.replace(/[\\/]/g,Ii.sep)}function zj(r){return r.indexOf("/")===-1&&(r=Uj(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}function jj(r,e,t,i=Od){if(r===e)return!0;if(!r||!e||e.length>r.length)return!1;if(t){if(!CD(r,e))return!1;if(e.length===r.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,r.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),r.indexOf(e)===0}function qj(r){return r>=65&&r<=90||r>=97&&r<=122}function Gj(r){const e=lD(r);return an?r.length>3?!1:b3(e)&&(r.length===2||e.charCodeAt(2)===92):e===Ii.sep}function b3(r){return an?qj(r.charCodeAt(0))&&r.charCodeAt(1)===58:!1}function zv(r){return BC(r,!0)}class Kj{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:Cm(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1: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()}joinPath(e,...t){return De.joinPath(e,...t)}basenameOrAuthority(e){return Rs(e)||e.authority}basename(e){return Ii.basename(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Ye.file?t=De.file(UB(zv(e))).path:(t=Ii.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(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 e.scheme===Ye.file?t=De.file(lD(zv(e))).path:t=Ii.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===Ye.file){const i=De.file(Iz(zv(e),t));return e.with({authority:i.authority,path:i.path})}return t=zj(t),e.with({path:Ii.resolve(e.path,t)})}}const nr=new Kj(()=>!1),v3=nr.isEqual.bind(nr),C3=nr.basenameOrAuthority.bind(nr),Rs=nr.basename.bind(nr),xD=nr.dirname.bind(nr),Yj=nr.joinPath.bind(nr),Zj=nr.normalizePath.bind(nr),ZR=nr.resolvePath.bind(nr);var bc;(function(r){r.META_DATA_LABEL="label",r.META_DATA_DESCRIPTION="description",r.META_DATA_SIZE="size",r.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(o=>{const[a,l]=o.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(r.META_DATA_MIME,s),i}r.parseMetaData=e})(bc||(bc={}));function w3(r){return Array.isArray(r)}function Os(r){return typeof r=="string"}function er(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function Jd(r){return typeof r=="number"&&!isNaN(r)}function y3(r){return r===!0||r===!1}function Pn(r){return typeof r=="undefined"}function qr(r){return Pn(r)||r===null}function Dt(r,e){if(!r)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function Db(r){if(qr(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function Fp(r){return typeof r=="function"}function Xj(r,e){const t=Math.min(r.length,e.length);for(let i=0;i<t;i++)Qj(r[i],e[i])}function Qj(r,e){if(Os(e)){if(typeof r!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(Fp(e)){try{if(r instanceof e)return}catch{}if(!qr(r)&&r.constructor===e||e.length===1&&e.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function Jj(r){let e=[],t=Object.getPrototypeOf(r);for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function ED(r){const e=[];for(const t of Jj(r))typeof r[t]=="function"&&e.push(t);return e}function S3(r,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)};let i={};for(const n of r)i[n]=t(n);return i}function Ar(r){return r===null?void 0:r}function eq(r,e="Unreachable"){throw new Error(e)}const pi=bt("commandService"),lt=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new H,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(r,e){if(!r)throw new Error("invalid command");if(typeof r=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:r,handler:e})}if(r.description){const o=[];for(let l of r.description.args)o.push(l.constraint);const a=r.handler;r.handler=function(l,...c){return Xj(c,o),a(l,...c)}}const{id:t}=r;let i=this._commands.get(t);i||(i=new Dr,this._commands.set(t,i));let n=i.unshift(r),s=Xe(()=>{n();const o=this._commands.get(t);o!=null&&o.isEmpty()&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),s}registerCommandAlias(r,e){return lt.registerCommand(r,(t,...i)=>t.get(pi).executeCommand(e,...i))}getCommand(r){const e=this._commands.get(r);if(!(!e||e.isEmpty()))return at.first(e)}getCommands(){const r=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&r.set(e,t)}return r}};lt.registerCommand("noop",()=>{});var jC;(function(r){r[r.API=0]="API",r[r.USER=1]="USER"})(jC||(jC={}));var XR=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const co=bt("openerService"),tq=Object.freeze({_serviceBrand:void 0,registerOpener(){return Z.None},registerValidator(){return Z.None},registerExternalUriResolver(){return Z.None},setDefaultExternalOpener(){},registerExternalOpener(){return Z.None},open(){return XR(this,void 0,void 0,function*(){return!1})},resolveExternalUri(r){return XR(this,void 0,void 0,function*(){return{resolved:r,dispose(){}}})}});function Fh(r,e){return De.isUri(r)?Cp(r.scheme,e):CD(r,e+":")}var kD=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qC=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},ud=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let Mk=class{constructor(e){this._commandService=e}open(e,t){return ud(this,void 0,void 0,function*(){if(!Fh(e,Ye.command))return!1;if(!(t!=null&&t.allowCommands))return!0;typeof e=="string"&&(e=De.parse(e));let i=[];try{i=Rk(decodeURIComponent(e.query))}catch{try{i=Rk(e.query)}catch{}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0})}};Mk=kD([qC(0,pi)],Mk);let Pk=class{constructor(e){this._editorService=e}open(e,t){return ud(this,void 0,void 0,function*(){typeof e=="string"&&(e=De.parse(e));let i;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===Ye.file&&(e=Zj(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:t!=null&&t.fromUserGesture?jC.USER:jC.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};Pk=kD([qC(0,Ct)],Pk);let Fk=class{constructor(e,t){this._openers=new Dr,this._validators=new Dr,this._resolvers=new Dr,this._resolvedUriTargets=new Mn(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Dr,this._defaultExternalOpener={openExternal:i=>ud(this,void 0,void 0,function*(){return Fh(i,Ye.http)||Fh(i,Ye.https)?d3(i):window.location.href=i,!0})},this._openers.push({open:(i,n)=>ud(this,void 0,void 0,function*(){return(n==null?void 0:n.openExternal)||Fh(i,Ye.mailto)||Fh(i,Ye.http)||Fh(i,Ye.https)?(yield this._doOpenExternal(i,n),!0):!1})}),this._openers.push(new Mk(t)),this._openers.push(new Pk(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return ud(this,void 0,void 0,function*(){const n=typeof e=="string"?De.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const o of this._validators)if(!(yield o.shouldOpen(s)))return!1;for(const o of this._openers)if(yield o.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return ud(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{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return ud(this,void 0,void 0,function*(){const i=typeof e=="string"?De.parse(e):e;let n;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t!=null&&t.allowContributedOpeners){const o=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(s,{sourceUri:i,preferredOpenerId:o},it.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},it.None)})}dispose(){this._validators.clear()}};Fk=kD([qC(0,Ct),qC(1,pi)],Fk);function jv(r,e){if(!r)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function jl(r){if(!r||typeof r!="object"||r instanceof RegExp)return r;const e=Array.isArray(r)?[]:{};return Object.keys(r).forEach(t=>{r[t]&&typeof r[t]=="object"?e[t]=jl(r[t]):e[t]=r[t]}),e}function iq(r){if(!r||typeof r!="object")return r;const e=[r];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(x3.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&e.push(n)}}return r}const x3=Object.prototype.hasOwnProperty;function nq(r,e){return Bk(r,e,new Set)}function Bk(r,e,t){if(qr(r))return r;const i=e(r);if(typeof i!="undefined")return i;if(w3(r)){const n=[];for(const s of r)n.push(Bk(s,e,t));return n}if(er(r)){if(t.has(r))throw new Error("Cannot clone recursive data-structure");t.add(r);const n={};for(let s in r)x3.call(r,s)&&(n[s]=Bk(r[s],e,t));return t.delete(r),n}return r}function _o(r,e,t=!0){return er(r)?(er(e)&&Object.keys(e).forEach(i=>{i in r?t&&(er(r[i])&&er(e[i])?_o(r[i],e[i],t):r[i]=e[i]):r[i]=e[i]}),r):e}function ro(r,e){if(r===e)return!0;if(r==null||e===null||e===void 0||typeof r!=typeof e||typeof r!="object"||Array.isArray(r)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(r)){if(r.length!==e.length)return!1;for(t=0;t<r.length;t++)if(!ro(r[t],e[t]))return!1}else{const n=[];for(i in r)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!ro(n,s))return!1;for(t=0;t<n.length;t++)if(!ro(r[n[t]],e[n[t]]))return!1}return!0}function xo(r,e,t){const i=e(r);return typeof i=="undefined"?t:i}const rq={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class sq extends Z{constructor(e,t={}){super();this._onDidUpdate=this._register(new H),this._editor=e,this._options=_o(t,rq,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(i=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(i=>{this.revealFirst=!0})),this._init()}_init(){this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new k(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new k(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber,1)})}),this.ranges.sort((t,i)=>t.range.getStartPosition().isBeforeOrEqual(i.range.getStartPosition())?-1:i.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,s=this.ranges.length;n<s&&!t;n++){let o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(e,t){if(jv(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealPositionInCenter(n,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const ul=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new H,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(r){r=Math.min(Math.max(-5,r),20),this._zoomLevel!==r&&(this._zoomLevel=r,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},oq=tt?1.5:1.35,l1=8;class Pd{constructor(e){this._bareFontInfoBrand=void 0,this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const s=e.get(42),o=e.get(46),a=e.get(45),l=e.get(44),c=e.get(58),d=e.get(55);return Pd._create(s,o,a,l,c,d,t,i,n)}static _create(e,t,i,n,s,o,a,l,c){s===0?s=oq*i:s<l1&&(s=s*i),s=Math.round(s),s<l1&&(s=l1);const d=1+(c?0:ul.getZoomLevel()*.1);return i*=d,s*=d,new Pd({zoomLevel:a,pixelRatio:l,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:s,letterSpacing:o})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(e){const t=Pd._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const aq=1;class Wk extends Pd{constructor(e,t){super(e);this._editorStylingBrand=void 0,this.version=aq,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}function lq(r){return r&&typeof r.id=="string"}const q_={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var Fr;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(Fr||(Fr={}));var Qr;(function(r){r[r.Inline=1]="Inline",r[r.Gutter=2]="Gutter"})(Qr||(Qr={}));class qv{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),this.indentSize=e.tabSize|0,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&ro(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class wm{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class E3{constructor(e,t){this.visibleColumn=e,this.className=t}}class cq{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}class c1{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class dq{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function LD(r){return Yy(r,0)}function Yy(r,e){switch(typeof r){case"object":return r===null?Za(349,e):Array.isArray(r)?hq(r,e):fq(r,e);case"string":return TD(r,e);case"boolean":return uq(r,e);case"number":return Za(r,e);case"undefined":return Za(937,e);default:return Za(617,e)}}function Za(r,e){return(e<<5)-e+r|0}function uq(r,e){return Za(r?433:863,e)}function TD(r,e){e=Za(149417,e);for(let t=0,i=r.length;t<i;t++)e=Za(r.charCodeAt(t),e);return e}function hq(r,e){return e=Za(104579,e),r.reduce((t,i)=>Yy(i,t),e)}function fq(r,e){return e=Za(181387,e),Object.keys(r).sort().reduce((t,i)=>(t=TD(i,t),Yy(r[i],t)),e)}function d1(r,e,t=32){const i=t-e,n=~((1<<i)-1);return(r<<e|(n&r)>>>i)>>>0}function QR(r,e=0,t=r.byteLength,i=0){for(let n=0;n<t;n++)r[e+n]=i}function gq(r,e,t="0"){for(;r.length<e;)r=t+r;return r}function zg(r,e=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join(""):gq((r>>>0).toString(16),e/4)}class Zy{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),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(t===0)return;const i=this._buff;let n=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(qi(o))if(a+1<t){const c=e.charCodeAt(a+1);Mf(c)?(a++,l=wD(o,c)):l=65533}else{s=o;break}else Mf(o)&&(l=65533);if(n=this._push(i,n,l),a++,a<t)o=e.charCodeAt(a);else break}this._buffLen=n,this._leftoverHighSurrogate=s}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(i&1984)>>>6,e[t++]=128|(i&63)>>>0):i<65536?(e[t++]=224|(i&61440)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0):(e[t++]=240|(i&1835008)>>>18,e[t++]=128|(i&258048)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64+0],e[1]=e[64+1],e[2]=e[64+2]),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()),zg(this._h0)+zg(this._h1)+zg(this._h2)+zg(this._h3)+zg(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,QR(this._buff,this._buffLen),this._buffLen>56&&(this._step(),QR(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=Zy._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,d1(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let i=this._h0,n=this._h1,s=this._h2,o=this._h3,a=this._h4,l,c,d;for(let u=0;u<80;u++)u<20?(l=n&s|~n&o,c=1518500249):u<40?(l=n^s^o,c=1859775393):u<60?(l=n&s|n&o|s&o,c=2400959708):(l=n^s^o,c=3395469782),d=d1(i,5)+l+a+c+e.getUint32(u*4,!1)&4294967295,a=o,o=s,s=d1(n,30),n=i,i=d;this._h0=this._h0+i&4294967295,this._h1=this._h1+n&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}}Zy._bigBlock32=new DataView(new ArrayBuffer(320));function bs(r,e,t){return Math.min(Math.max(r,e),t)}class pq{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}const u1="**",JR="/",Gv="[/\\\\]",Kv="[^/\\\\]",mq=/\//g;function eO(r){switch(r){case 0:return"";case 1:return`${Kv}*?`;default:return`(?:${Gv}|${Kv}+${Gv}|${Gv}${Kv}+)*?`}}function tO(r,e){if(!r)return[];const t=[];let i=!1,n=!1,s="";for(const o of r){switch(o){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=o}return s&&t.push(s),t}function k3(r){if(!r)return"";let e="";const t=tO(r,JR);if(t.every(i=>i===u1))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===u1){i||(e+=eO(2),i=!0);return}let o=!1,a="",l=!1,c="";for(const d of n){if(d!=="}"&&o){a+=d;continue}if(l&&(d!=="]"||!c)){let u;d==="-"?u=d:(d==="^"||d==="!")&&!c?u="^":d===JR?u="":u=Ns(d),c+=u;continue}switch(d){case"{":o=!0;continue;case"[":l=!0;continue;case"}":e+=`(?:${tO(a,",").map(f=>k3(f)).join("|")})`,o=!1,a="";break;case"]":e+="["+c+"]",l=!1,c="";break;case"?":e+=Kv;continue;case"*":e+=eO(1);continue;default:e+=Ns(d)}}s<t.length-1&&(t[s+1]!==u1||s+2<t.length)&&(e+=Gv),i=!1})}return e}const _q=/^\*\*\/\*\.[\w\.-]+$/,bq=/^\*\*\/([\w\.-]+)\/?$/,vq=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,Cq=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,wq=/^\*\*((\/[\w\.-]+)+)\/?$/,yq=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,iO=new Bc(1e4),nO=function(){return!1},ea=function(){return null};function ID(r,e){if(!r)return ea;let t;typeof r!="string"?t=r.pattern:t=r,t=t.trim();const i=`${t}_${!!e.trimForExclusions}`;let n=iO.get(i);if(n)return rO(n,r);let s;if(_q.test(t)){const o=t.substr(4);n=function(a,l){return typeof a=="string"&&a.endsWith(o)?t:null}}else(s=bq.exec(h1(t,e)))?n=Sq(s[1],t):(e.trimForExclusions?Cq:vq).test(t)?n=xq(t,e):(s=wq.exec(h1(t,e)))?n=sO(s[1].substr(1),t,!0):(s=yq.exec(h1(t,e)))?n=sO(s[1],t,!1):n=Eq(t);return iO.set(i,n),rO(n,r)}function rO(r,e){return typeof e=="string"?r:function(t,i){return jj(t,e.base)?r(Dz(e.base,t),i):null}}function h1(r,e){return e.trimForExclusions&&r.endsWith("/**")?r.substr(0,r.length-2):r}function Sq(r,e){const t=`/${r}`,i=`\\${r}`,n=function(o,a){return typeof o!="string"?null:a?a===r?e:null:o===r||o.endsWith(t)||o.endsWith(i)?e:null},s=[r];return n.basenames=s,n.patterns=[e],n.allBasenames=s,n}function xq(r,e){const t=T3(r.slice(1,-1).split(",").map(a=>ID(a,e)).filter(a=>a!==ea),r),i=t.length;if(!i)return ea;if(i===1)return t[0];const n=function(a,l){for(let c=0,d=t.length;c<d;c++)if(t[c](a,l))return r;return null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(n.allPaths=o),n}function sO(r,e,t){const i=Od===Ii.sep,n=i?r:r.replace(mq,Od),s=Od+n,o=Ii.sep+r,a=t?function(l,c){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===r||l.endsWith(o)))?e:null}:function(l,c){return typeof l=="string"&&(l===n||!i&&l===r)?e:null};return a.allPaths=[(t?"*/":"./")+r],a}function Eq(r){try{const e=new RegExp(`^${k3(r)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?r:null}}catch{return ea}}function kq(r,e,t){return!r||typeof e!="string"?!1:L3(r)(e,void 0,t)}function L3(r,e={}){if(!r)return nO;if(typeof r=="string"||Lq(r)){const t=ID(r,e);if(t===ea)return nO;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return Tq(r,e)}function Lq(r){const e=r;return e&&typeof e.base=="string"&&typeof e.pattern=="string"}function Tq(r,e){const t=T3(Object.getOwnPropertyNames(r).map(a=>Iq(a,r[a],e)).filter(a=>a!==ea)),i=t.length;if(!i)return ea;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(d,u){for(let h=0,f=t.length;h<f;h++){const g=t[h](d,u);if(g)return g}return null},l=t.find(d=>!!d.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((d,u)=>u.allPaths?d.concat(u.allPaths):d,[]);return c.length&&(a.allPaths=c),a}const n=function(a,l,c){let d;for(let u=0,h=t.length;u<h;u++){const f=t[u];f.requiresSiblings&&c&&(l||(l=Rd(a)),d||(d=l.substr(0,l.length-Az(a).length)));const g=f(a,l,d,c);if(g)return g}return null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(n.allPaths=o),n}function Iq(r,e,t){if(e===!1)return ea;const i=ID(r,t);if(i===ea)return ea;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(o,a,l,c)=>{if(!c||!i(o,a))return null;const d=n.replace("$(basename)",l),u=c(d);return Zz(u)?u.then(h=>h?r:null):u?r:null};return s.requiresSiblings=!0,s}}return i}function T3(r,e){const t=r.filter(a=>!!a.basenames);if(t.length<2)return r;const i=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a<l;a++)n.push(e)}else n=t.reduce((a,l)=>{const c=l.patterns;return c?a.concat(c):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let d;for(d=a.length;d>0;d--){const u=a.charCodeAt(d-1);if(u===47||u===92)break}l=a.substr(d)}const c=i.indexOf(l);return c!==-1?n[c]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const o=r.filter(a=>!a.basenames);return o.push(s),o}function I3(r,e,t,i){if(Array.isArray(r)){let n=0;for(const s of r){const o=I3(s,e,t,i);if(o===10)return o;o>n&&(n=o)}return n}else{if(typeof r=="string")return i?r==="*"?5:r===t?10:0:0;if(r){const{language:n,pattern:s,scheme:o,hasAccessToAllModels:a}=r;if(!i&&!a)return 0;let l=0;if(o)if(o===e.scheme)l=10;else if(o==="*")l=5;else return 0;if(n)if(n===t)l=10;else if(n==="*")l=Math.max(l,5);else return 0;if(s){let c;if(typeof s=="string"?c=s:c=Object.assign(Object.assign({},s),{base:lD(s.base)}),c===e.fsPath||kq(c,e.fsPath))l=10;else return 0}return l}else return 0}}const mi=bt("modelService");function Dq(r){return!r.isTooLargeForSyncing()&&!r.isForSimpleWidget}function D3(r){return typeof r=="string"?!1:Array.isArray(r)?r.every(D3):!!r.exclusive}class ci{constructor(){this._clock=0,this._entries=[],this._onDidChange=new H}get onDidChange(){return 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),Xe(()=>{if(i){let n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,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(let i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,i=>t.push(i.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t){if(!!e){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!(this._lastCandidate&&this._lastCandidate.language===t.language&&this._lastCandidate.uri===t.uri)){this._lastCandidate=t;for(let i of this._entries)if(i._score=I3(i.selector,e.uri,e.getLanguageIdentifier().language,Dq(e)),D3(i.selector)&&i._score>0){for(let n of this._entries)n._score=0;i._score=1e3;break}this._entries.sort(ci._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}const oO=new WeakMap;let Aq=0;function Nq(r){let e=oO.get(r);return e===void 0&&(e=++Aq,oO.set(r,e)),e}class GC{constructor(e,t,i=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=i,this._cache=new Bc(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>Yy(Nq(i),t),0)}_clamp(e){return e===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(e*1.3)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(i==null?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new pq,this._cache.set(i,n)),n.update(t),this.get(e)}}class Rq{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Xe(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then(s=>{this._promises.delete(e),!(n||!s)&&(i=this.register(e,s))})),Xe(()=>{n=!0,i&&i.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then(n=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class Oq{constructor(){this._icons=new Map,this._onDidRegister=new H}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const A3=new Oq,KC=A3;function Ms(r,e){return new be(r,e)}function Mq(r){return r?r.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}class be{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,A3.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var hr;(function(r){r.iconNameSegment="[A-Za-z0-9]+",r.iconNameExpression="[A-Za-z0-9\\-]+",r.iconModifierExpression="~[A-Za-z]+";const e=new RegExp(`^(${r.iconNameExpression})(${r.iconModifierExpression})?$`);function t(s){if(s instanceof be)return["codicon","codicon-"+s.id];const o=e.exec(s.id);if(!o)return t(be.error);let[,a,l]=o;const c=["codicon","codicon-"+a];return l&&c.push("codicon-modifier-"+l.substr(1)),c}r.asClassNameArray=t;function i(s){return t(s).join(" ")}r.asClassName=i;function n(s){return"."+t(s).join(".")}r.asCSSSelector=n})(hr||(hr={}));(function(r){r.add=new r("add",{fontCharacter:"\\ea60"}),r.plus=new r("plus",{fontCharacter:"\\ea60"}),r.gistNew=new r("gist-new",{fontCharacter:"\\ea60"}),r.repoCreate=new r("repo-create",{fontCharacter:"\\ea60"}),r.lightbulb=new r("lightbulb",{fontCharacter:"\\ea61"}),r.lightBulb=new r("light-bulb",{fontCharacter:"\\ea61"}),r.repo=new r("repo",{fontCharacter:"\\ea62"}),r.repoDelete=new r("repo-delete",{fontCharacter:"\\ea62"}),r.gistFork=new r("gist-fork",{fontCharacter:"\\ea63"}),r.repoForked=new r("repo-forked",{fontCharacter:"\\ea63"}),r.gitPullRequest=new r("git-pull-request",{fontCharacter:"\\ea64"}),r.gitPullRequestAbandoned=new r("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),r.recordKeys=new r("record-keys",{fontCharacter:"\\ea65"}),r.keyboard=new r("keyboard",{fontCharacter:"\\ea65"}),r.tag=new r("tag",{fontCharacter:"\\ea66"}),r.tagAdd=new r("tag-add",{fontCharacter:"\\ea66"}),r.tagRemove=new r("tag-remove",{fontCharacter:"\\ea66"}),r.person=new r("person",{fontCharacter:"\\ea67"}),r.personFollow=new r("person-follow",{fontCharacter:"\\ea67"}),r.personOutline=new r("person-outline",{fontCharacter:"\\ea67"}),r.personFilled=new r("person-filled",{fontCharacter:"\\ea67"}),r.gitBranch=new r("git-branch",{fontCharacter:"\\ea68"}),r.gitBranchCreate=new r("git-branch-create",{fontCharacter:"\\ea68"}),r.gitBranchDelete=new r("git-branch-delete",{fontCharacter:"\\ea68"}),r.sourceControl=new r("source-control",{fontCharacter:"\\ea68"}),r.mirror=new r("mirror",{fontCharacter:"\\ea69"}),r.mirrorPublic=new r("mirror-public",{fontCharacter:"\\ea69"}),r.star=new r("star",{fontCharacter:"\\ea6a"}),r.starAdd=new r("star-add",{fontCharacter:"\\ea6a"}),r.starDelete=new r("star-delete",{fontCharacter:"\\ea6a"}),r.starEmpty=new r("star-empty",{fontCharacter:"\\ea6a"}),r.comment=new r("comment",{fontCharacter:"\\ea6b"}),r.commentAdd=new r("comment-add",{fontCharacter:"\\ea6b"}),r.alert=new r("alert",{fontCharacter:"\\ea6c"}),r.warning=new r("warning",{fontCharacter:"\\ea6c"}),r.search=new r("search",{fontCharacter:"\\ea6d"}),r.searchSave=new r("search-save",{fontCharacter:"\\ea6d"}),r.logOut=new r("log-out",{fontCharacter:"\\ea6e"}),r.signOut=new r("sign-out",{fontCharacter:"\\ea6e"}),r.logIn=new r("log-in",{fontCharacter:"\\ea6f"}),r.signIn=new r("sign-in",{fontCharacter:"\\ea6f"}),r.eye=new r("eye",{fontCharacter:"\\ea70"}),r.eyeUnwatch=new r("eye-unwatch",{fontCharacter:"\\ea70"}),r.eyeWatch=new r("eye-watch",{fontCharacter:"\\ea70"}),r.circleFilled=new r("circle-filled",{fontCharacter:"\\ea71"}),r.primitiveDot=new r("primitive-dot",{fontCharacter:"\\ea71"}),r.closeDirty=new r("close-dirty",{fontCharacter:"\\ea71"}),r.debugBreakpoint=new r("debug-breakpoint",{fontCharacter:"\\ea71"}),r.debugBreakpointDisabled=new r("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),r.debugHint=new r("debug-hint",{fontCharacter:"\\ea71"}),r.primitiveSquare=new r("primitive-square",{fontCharacter:"\\ea72"}),r.edit=new r("edit",{fontCharacter:"\\ea73"}),r.pencil=new r("pencil",{fontCharacter:"\\ea73"}),r.info=new r("info",{fontCharacter:"\\ea74"}),r.issueOpened=new r("issue-opened",{fontCharacter:"\\ea74"}),r.gistPrivate=new r("gist-private",{fontCharacter:"\\ea75"}),r.gitForkPrivate=new r("git-fork-private",{fontCharacter:"\\ea75"}),r.lock=new r("lock",{fontCharacter:"\\ea75"}),r.mirrorPrivate=new r("mirror-private",{fontCharacter:"\\ea75"}),r.close=new r("close",{fontCharacter:"\\ea76"}),r.removeClose=new r("remove-close",{fontCharacter:"\\ea76"}),r.x=new r("x",{fontCharacter:"\\ea76"}),r.repoSync=new r("repo-sync",{fontCharacter:"\\ea77"}),r.sync=new r("sync",{fontCharacter:"\\ea77"}),r.clone=new r("clone",{fontCharacter:"\\ea78"}),r.desktopDownload=new r("desktop-download",{fontCharacter:"\\ea78"}),r.beaker=new r("beaker",{fontCharacter:"\\ea79"}),r.microscope=new r("microscope",{fontCharacter:"\\ea79"}),r.vm=new r("vm",{fontCharacter:"\\ea7a"}),r.deviceDesktop=new r("device-desktop",{fontCharacter:"\\ea7a"}),r.file=new r("file",{fontCharacter:"\\ea7b"}),r.fileText=new r("file-text",{fontCharacter:"\\ea7b"}),r.more=new r("more",{fontCharacter:"\\ea7c"}),r.ellipsis=new r("ellipsis",{fontCharacter:"\\ea7c"}),r.kebabHorizontal=new r("kebab-horizontal",{fontCharacter:"\\ea7c"}),r.mailReply=new r("mail-reply",{fontCharacter:"\\ea7d"}),r.reply=new r("reply",{fontCharacter:"\\ea7d"}),r.organization=new r("organization",{fontCharacter:"\\ea7e"}),r.organizationFilled=new r("organization-filled",{fontCharacter:"\\ea7e"}),r.organizationOutline=new r("organization-outline",{fontCharacter:"\\ea7e"}),r.newFile=new r("new-file",{fontCharacter:"\\ea7f"}),r.fileAdd=new r("file-add",{fontCharacter:"\\ea7f"}),r.newFolder=new r("new-folder",{fontCharacter:"\\ea80"}),r.fileDirectoryCreate=new r("file-directory-create",{fontCharacter:"\\ea80"}),r.trash=new r("trash",{fontCharacter:"\\ea81"}),r.trashcan=new r("trashcan",{fontCharacter:"\\ea81"}),r.history=new r("history",{fontCharacter:"\\ea82"}),r.clock=new r("clock",{fontCharacter:"\\ea82"}),r.folder=new r("folder",{fontCharacter:"\\ea83"}),r.fileDirectory=new r("file-directory",{fontCharacter:"\\ea83"}),r.symbolFolder=new r("symbol-folder",{fontCharacter:"\\ea83"}),r.logoGithub=new r("logo-github",{fontCharacter:"\\ea84"}),r.markGithub=new r("mark-github",{fontCharacter:"\\ea84"}),r.github=new r("github",{fontCharacter:"\\ea84"}),r.terminal=new r("terminal",{fontCharacter:"\\ea85"}),r.console=new r("console",{fontCharacter:"\\ea85"}),r.repl=new r("repl",{fontCharacter:"\\ea85"}),r.zap=new r("zap",{fontCharacter:"\\ea86"}),r.symbolEvent=new r("symbol-event",{fontCharacter:"\\ea86"}),r.error=new r("error",{fontCharacter:"\\ea87"}),r.stop=new r("stop",{fontCharacter:"\\ea87"}),r.variable=new r("variable",{fontCharacter:"\\ea88"}),r.symbolVariable=new r("symbol-variable",{fontCharacter:"\\ea88"}),r.array=new r("array",{fontCharacter:"\\ea8a"}),r.symbolArray=new r("symbol-array",{fontCharacter:"\\ea8a"}),r.symbolModule=new r("symbol-module",{fontCharacter:"\\ea8b"}),r.symbolPackage=new r("symbol-package",{fontCharacter:"\\ea8b"}),r.symbolNamespace=new r("symbol-namespace",{fontCharacter:"\\ea8b"}),r.symbolObject=new r("symbol-object",{fontCharacter:"\\ea8b"}),r.symbolMethod=new r("symbol-method",{fontCharacter:"\\ea8c"}),r.symbolFunction=new r("symbol-function",{fontCharacter:"\\ea8c"}),r.symbolConstructor=new r("symbol-constructor",{fontCharacter:"\\ea8c"}),r.symbolBoolean=new r("symbol-boolean",{fontCharacter:"\\ea8f"}),r.symbolNull=new r("symbol-null",{fontCharacter:"\\ea8f"}),r.symbolNumeric=new r("symbol-numeric",{fontCharacter:"\\ea90"}),r.symbolNumber=new r("symbol-number",{fontCharacter:"\\ea90"}),r.symbolStructure=new r("symbol-structure",{fontCharacter:"\\ea91"}),r.symbolStruct=new r("symbol-struct",{fontCharacter:"\\ea91"}),r.symbolParameter=new r("symbol-parameter",{fontCharacter:"\\ea92"}),r.symbolTypeParameter=new r("symbol-type-parameter",{fontCharacter:"\\ea92"}),r.symbolKey=new r("symbol-key",{fontCharacter:"\\ea93"}),r.symbolText=new r("symbol-text",{fontCharacter:"\\ea93"}),r.symbolReference=new r("symbol-reference",{fontCharacter:"\\ea94"}),r.goToFile=new r("go-to-file",{fontCharacter:"\\ea94"}),r.symbolEnum=new r("symbol-enum",{fontCharacter:"\\ea95"}),r.symbolValue=new r("symbol-value",{fontCharacter:"\\ea95"}),r.symbolRuler=new r("symbol-ruler",{fontCharacter:"\\ea96"}),r.symbolUnit=new r("symbol-unit",{fontCharacter:"\\ea96"}),r.activateBreakpoints=new r("activate-breakpoints",{fontCharacter:"\\ea97"}),r.archive=new r("archive",{fontCharacter:"\\ea98"}),r.arrowBoth=new r("arrow-both",{fontCharacter:"\\ea99"}),r.arrowDown=new r("arrow-down",{fontCharacter:"\\ea9a"}),r.arrowLeft=new r("arrow-left",{fontCharacter:"\\ea9b"}),r.arrowRight=new r("arrow-right",{fontCharacter:"\\ea9c"}),r.arrowSmallDown=new r("arrow-small-down",{fontCharacter:"\\ea9d"}),r.arrowSmallLeft=new r("arrow-small-left",{fontCharacter:"\\ea9e"}),r.arrowSmallRight=new r("arrow-small-right",{fontCharacter:"\\ea9f"}),r.arrowSmallUp=new r("arrow-small-up",{fontCharacter:"\\eaa0"}),r.arrowUp=new r("arrow-up",{fontCharacter:"\\eaa1"}),r.bell=new r("bell",{fontCharacter:"\\eaa2"}),r.bold=new r("bold",{fontCharacter:"\\eaa3"}),r.book=new r("book",{fontCharacter:"\\eaa4"}),r.bookmark=new r("bookmark",{fontCharacter:"\\eaa5"}),r.debugBreakpointConditionalUnverified=new r("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),r.debugBreakpointConditional=new r("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),r.debugBreakpointConditionalDisabled=new r("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),r.debugBreakpointDataUnverified=new r("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),r.debugBreakpointData=new r("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),r.debugBreakpointDataDisabled=new r("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),r.debugBreakpointLogUnverified=new r("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),r.debugBreakpointLog=new r("debug-breakpoint-log",{fontCharacter:"\\eaab"}),r.debugBreakpointLogDisabled=new r("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),r.briefcase=new r("briefcase",{fontCharacter:"\\eaac"}),r.broadcast=new r("broadcast",{fontCharacter:"\\eaad"}),r.browser=new r("browser",{fontCharacter:"\\eaae"}),r.bug=new r("bug",{fontCharacter:"\\eaaf"}),r.calendar=new r("calendar",{fontCharacter:"\\eab0"}),r.caseSensitive=new r("case-sensitive",{fontCharacter:"\\eab1"}),r.check=new r("check",{fontCharacter:"\\eab2"}),r.checklist=new r("checklist",{fontCharacter:"\\eab3"}),r.chevronDown=new r("chevron-down",{fontCharacter:"\\eab4"}),r.chevronLeft=new r("chevron-left",{fontCharacter:"\\eab5"}),r.chevronRight=new r("chevron-right",{fontCharacter:"\\eab6"}),r.chevronUp=new r("chevron-up",{fontCharacter:"\\eab7"}),r.chromeClose=new r("chrome-close",{fontCharacter:"\\eab8"}),r.chromeMaximize=new r("chrome-maximize",{fontCharacter:"\\eab9"}),r.chromeMinimize=new r("chrome-minimize",{fontCharacter:"\\eaba"}),r.chromeRestore=new r("chrome-restore",{fontCharacter:"\\eabb"}),r.circleOutline=new r("circle-outline",{fontCharacter:"\\eabc"}),r.debugBreakpointUnverified=new r("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),r.circleSlash=new r("circle-slash",{fontCharacter:"\\eabd"}),r.circuitBoard=new r("circuit-board",{fontCharacter:"\\eabe"}),r.clearAll=new r("clear-all",{fontCharacter:"\\eabf"}),r.clippy=new r("clippy",{fontCharacter:"\\eac0"}),r.closeAll=new r("close-all",{fontCharacter:"\\eac1"}),r.cloudDownload=new r("cloud-download",{fontCharacter:"\\eac2"}),r.cloudUpload=new r("cloud-upload",{fontCharacter:"\\eac3"}),r.code=new r("code",{fontCharacter:"\\eac4"}),r.collapseAll=new r("collapse-all",{fontCharacter:"\\eac5"}),r.colorMode=new r("color-mode",{fontCharacter:"\\eac6"}),r.commentDiscussion=new r("comment-discussion",{fontCharacter:"\\eac7"}),r.compareChanges=new r("compare-changes",{fontCharacter:"\\eafd"}),r.creditCard=new r("credit-card",{fontCharacter:"\\eac9"}),r.dash=new r("dash",{fontCharacter:"\\eacc"}),r.dashboard=new r("dashboard",{fontCharacter:"\\eacd"}),r.database=new r("database",{fontCharacter:"\\eace"}),r.debugContinue=new r("debug-continue",{fontCharacter:"\\eacf"}),r.debugDisconnect=new r("debug-disconnect",{fontCharacter:"\\ead0"}),r.debugPause=new r("debug-pause",{fontCharacter:"\\ead1"}),r.debugRestart=new r("debug-restart",{fontCharacter:"\\ead2"}),r.debugStart=new r("debug-start",{fontCharacter:"\\ead3"}),r.debugStepInto=new r("debug-step-into",{fontCharacter:"\\ead4"}),r.debugStepOut=new r("debug-step-out",{fontCharacter:"\\ead5"}),r.debugStepOver=new r("debug-step-over",{fontCharacter:"\\ead6"}),r.debugStop=new r("debug-stop",{fontCharacter:"\\ead7"}),r.debug=new r("debug",{fontCharacter:"\\ead8"}),r.deviceCameraVideo=new r("device-camera-video",{fontCharacter:"\\ead9"}),r.deviceCamera=new r("device-camera",{fontCharacter:"\\eada"}),r.deviceMobile=new r("device-mobile",{fontCharacter:"\\eadb"}),r.diffAdded=new r("diff-added",{fontCharacter:"\\eadc"}),r.diffIgnored=new r("diff-ignored",{fontCharacter:"\\eadd"}),r.diffModified=new r("diff-modified",{fontCharacter:"\\eade"}),r.diffRemoved=new r("diff-removed",{fontCharacter:"\\eadf"}),r.diffRenamed=new r("diff-renamed",{fontCharacter:"\\eae0"}),r.diff=new r("diff",{fontCharacter:"\\eae1"}),r.discard=new r("discard",{fontCharacter:"\\eae2"}),r.editorLayout=new r("editor-layout",{fontCharacter:"\\eae3"}),r.emptyWindow=new r("empty-window",{fontCharacter:"\\eae4"}),r.exclude=new r("exclude",{fontCharacter:"\\eae5"}),r.extensions=new r("extensions",{fontCharacter:"\\eae6"}),r.eyeClosed=new r("eye-closed",{fontCharacter:"\\eae7"}),r.fileBinary=new r("file-binary",{fontCharacter:"\\eae8"}),r.fileCode=new r("file-code",{fontCharacter:"\\eae9"}),r.fileMedia=new r("file-media",{fontCharacter:"\\eaea"}),r.filePdf=new r("file-pdf",{fontCharacter:"\\eaeb"}),r.fileSubmodule=new r("file-submodule",{fontCharacter:"\\eaec"}),r.fileSymlinkDirectory=new r("file-symlink-directory",{fontCharacter:"\\eaed"}),r.fileSymlinkFile=new r("file-symlink-file",{fontCharacter:"\\eaee"}),r.fileZip=new r("file-zip",{fontCharacter:"\\eaef"}),r.files=new r("files",{fontCharacter:"\\eaf0"}),r.filter=new r("filter",{fontCharacter:"\\eaf1"}),r.flame=new r("flame",{fontCharacter:"\\eaf2"}),r.foldDown=new r("fold-down",{fontCharacter:"\\eaf3"}),r.foldUp=new r("fold-up",{fontCharacter:"\\eaf4"}),r.fold=new r("fold",{fontCharacter:"\\eaf5"}),r.folderActive=new r("folder-active",{fontCharacter:"\\eaf6"}),r.folderOpened=new r("folder-opened",{fontCharacter:"\\eaf7"}),r.gear=new r("gear",{fontCharacter:"\\eaf8"}),r.gift=new r("gift",{fontCharacter:"\\eaf9"}),r.gistSecret=new r("gist-secret",{fontCharacter:"\\eafa"}),r.gist=new r("gist",{fontCharacter:"\\eafb"}),r.gitCommit=new r("git-commit",{fontCharacter:"\\eafc"}),r.gitCompare=new r("git-compare",{fontCharacter:"\\eafd"}),r.gitMerge=new r("git-merge",{fontCharacter:"\\eafe"}),r.githubAction=new r("github-action",{fontCharacter:"\\eaff"}),r.githubAlt=new r("github-alt",{fontCharacter:"\\eb00"}),r.globe=new r("globe",{fontCharacter:"\\eb01"}),r.grabber=new r("grabber",{fontCharacter:"\\eb02"}),r.graph=new r("graph",{fontCharacter:"\\eb03"}),r.gripper=new r("gripper",{fontCharacter:"\\eb04"}),r.heart=new r("heart",{fontCharacter:"\\eb05"}),r.home=new r("home",{fontCharacter:"\\eb06"}),r.horizontalRule=new r("horizontal-rule",{fontCharacter:"\\eb07"}),r.hubot=new r("hubot",{fontCharacter:"\\eb08"}),r.inbox=new r("inbox",{fontCharacter:"\\eb09"}),r.issueClosed=new r("issue-closed",{fontCharacter:"\\eba4"}),r.issueReopened=new r("issue-reopened",{fontCharacter:"\\eb0b"}),r.issues=new r("issues",{fontCharacter:"\\eb0c"}),r.italic=new r("italic",{fontCharacter:"\\eb0d"}),r.jersey=new r("jersey",{fontCharacter:"\\eb0e"}),r.json=new r("json",{fontCharacter:"\\eb0f"}),r.kebabVertical=new r("kebab-vertical",{fontCharacter:"\\eb10"}),r.key=new r("key",{fontCharacter:"\\eb11"}),r.law=new r("law",{fontCharacter:"\\eb12"}),r.lightbulbAutofix=new r("lightbulb-autofix",{fontCharacter:"\\eb13"}),r.linkExternal=new r("link-external",{fontCharacter:"\\eb14"}),r.link=new r("link",{fontCharacter:"\\eb15"}),r.listOrdered=new r("list-ordered",{fontCharacter:"\\eb16"}),r.listUnordered=new r("list-unordered",{fontCharacter:"\\eb17"}),r.liveShare=new r("live-share",{fontCharacter:"\\eb18"}),r.loading=new r("loading",{fontCharacter:"\\eb19"}),r.location=new r("location",{fontCharacter:"\\eb1a"}),r.mailRead=new r("mail-read",{fontCharacter:"\\eb1b"}),r.mail=new r("mail",{fontCharacter:"\\eb1c"}),r.markdown=new r("markdown",{fontCharacter:"\\eb1d"}),r.megaphone=new r("megaphone",{fontCharacter:"\\eb1e"}),r.mention=new r("mention",{fontCharacter:"\\eb1f"}),r.milestone=new r("milestone",{fontCharacter:"\\eb20"}),r.mortarBoard=new r("mortar-board",{fontCharacter:"\\eb21"}),r.move=new r("move",{fontCharacter:"\\eb22"}),r.multipleWindows=new r("multiple-windows",{fontCharacter:"\\eb23"}),r.mute=new r("mute",{fontCharacter:"\\eb24"}),r.noNewline=new r("no-newline",{fontCharacter:"\\eb25"}),r.note=new r("note",{fontCharacter:"\\eb26"}),r.octoface=new r("octoface",{fontCharacter:"\\eb27"}),r.openPreview=new r("open-preview",{fontCharacter:"\\eb28"}),r.package_=new r("package",{fontCharacter:"\\eb29"}),r.paintcan=new r("paintcan",{fontCharacter:"\\eb2a"}),r.pin=new r("pin",{fontCharacter:"\\eb2b"}),r.play=new r("play",{fontCharacter:"\\eb2c"}),r.run=new r("run",{fontCharacter:"\\eb2c"}),r.plug=new r("plug",{fontCharacter:"\\eb2d"}),r.preserveCase=new r("preserve-case",{fontCharacter:"\\eb2e"}),r.preview=new r("preview",{fontCharacter:"\\eb2f"}),r.project=new r("project",{fontCharacter:"\\eb30"}),r.pulse=new r("pulse",{fontCharacter:"\\eb31"}),r.question=new r("question",{fontCharacter:"\\eb32"}),r.quote=new r("quote",{fontCharacter:"\\eb33"}),r.radioTower=new r("radio-tower",{fontCharacter:"\\eb34"}),r.reactions=new r("reactions",{fontCharacter:"\\eb35"}),r.references=new r("references",{fontCharacter:"\\eb36"}),r.refresh=new r("refresh",{fontCharacter:"\\eb37"}),r.regex=new r("regex",{fontCharacter:"\\eb38"}),r.remoteExplorer=new r("remote-explorer",{fontCharacter:"\\eb39"}),r.remote=new r("remote",{fontCharacter:"\\eb3a"}),r.remove=new r("remove",{fontCharacter:"\\eb3b"}),r.replaceAll=new r("replace-all",{fontCharacter:"\\eb3c"}),r.replace=new r("replace",{fontCharacter:"\\eb3d"}),r.repoClone=new r("repo-clone",{fontCharacter:"\\eb3e"}),r.repoForcePush=new r("repo-force-push",{fontCharacter:"\\eb3f"}),r.repoPull=new r("repo-pull",{fontCharacter:"\\eb40"}),r.repoPush=new r("repo-push",{fontCharacter:"\\eb41"}),r.report=new r("report",{fontCharacter:"\\eb42"}),r.requestChanges=new r("request-changes",{fontCharacter:"\\eb43"}),r.rocket=new r("rocket",{fontCharacter:"\\eb44"}),r.rootFolderOpened=new r("root-folder-opened",{fontCharacter:"\\eb45"}),r.rootFolder=new r("root-folder",{fontCharacter:"\\eb46"}),r.rss=new r("rss",{fontCharacter:"\\eb47"}),r.ruby=new r("ruby",{fontCharacter:"\\eb48"}),r.saveAll=new r("save-all",{fontCharacter:"\\eb49"}),r.saveAs=new r("save-as",{fontCharacter:"\\eb4a"}),r.save=new r("save",{fontCharacter:"\\eb4b"}),r.screenFull=new r("screen-full",{fontCharacter:"\\eb4c"}),r.screenNormal=new r("screen-normal",{fontCharacter:"\\eb4d"}),r.searchStop=new r("search-stop",{fontCharacter:"\\eb4e"}),r.server=new r("server",{fontCharacter:"\\eb50"}),r.settingsGear=new r("settings-gear",{fontCharacter:"\\eb51"}),r.settings=new r("settings",{fontCharacter:"\\eb52"}),r.shield=new r("shield",{fontCharacter:"\\eb53"}),r.smiley=new r("smiley",{fontCharacter:"\\eb54"}),r.sortPrecedence=new r("sort-precedence",{fontCharacter:"\\eb55"}),r.splitHorizontal=new r("split-horizontal",{fontCharacter:"\\eb56"}),r.splitVertical=new r("split-vertical",{fontCharacter:"\\eb57"}),r.squirrel=new r("squirrel",{fontCharacter:"\\eb58"}),r.starFull=new r("star-full",{fontCharacter:"\\eb59"}),r.starHalf=new r("star-half",{fontCharacter:"\\eb5a"}),r.symbolClass=new r("symbol-class",{fontCharacter:"\\eb5b"}),r.symbolColor=new r("symbol-color",{fontCharacter:"\\eb5c"}),r.symbolConstant=new r("symbol-constant",{fontCharacter:"\\eb5d"}),r.symbolEnumMember=new r("symbol-enum-member",{fontCharacter:"\\eb5e"}),r.symbolField=new r("symbol-field",{fontCharacter:"\\eb5f"}),r.symbolFile=new r("symbol-file",{fontCharacter:"\\eb60"}),r.symbolInterface=new r("symbol-interface",{fontCharacter:"\\eb61"}),r.symbolKeyword=new r("symbol-keyword",{fontCharacter:"\\eb62"}),r.symbolMisc=new r("symbol-misc",{fontCharacter:"\\eb63"}),r.symbolOperator=new r("symbol-operator",{fontCharacter:"\\eb64"}),r.symbolProperty=new r("symbol-property",{fontCharacter:"\\eb65"}),r.wrench=new r("wrench",{fontCharacter:"\\eb65"}),r.wrenchSubaction=new r("wrench-subaction",{fontCharacter:"\\eb65"}),r.symbolSnippet=new r("symbol-snippet",{fontCharacter:"\\eb66"}),r.tasklist=new r("tasklist",{fontCharacter:"\\eb67"}),r.telescope=new r("telescope",{fontCharacter:"\\eb68"}),r.textSize=new r("text-size",{fontCharacter:"\\eb69"}),r.threeBars=new r("three-bars",{fontCharacter:"\\eb6a"}),r.thumbsdown=new r("thumbsdown",{fontCharacter:"\\eb6b"}),r.thumbsup=new r("thumbsup",{fontCharacter:"\\eb6c"}),r.tools=new r("tools",{fontCharacter:"\\eb6d"}),r.triangleDown=new r("triangle-down",{fontCharacter:"\\eb6e"}),r.triangleLeft=new r("triangle-left",{fontCharacter:"\\eb6f"}),r.triangleRight=new r("triangle-right",{fontCharacter:"\\eb70"}),r.triangleUp=new r("triangle-up",{fontCharacter:"\\eb71"}),r.twitter=new r("twitter",{fontCharacter:"\\eb72"}),r.unfold=new r("unfold",{fontCharacter:"\\eb73"}),r.unlock=new r("unlock",{fontCharacter:"\\eb74"}),r.unmute=new r("unmute",{fontCharacter:"\\eb75"}),r.unverified=new r("unverified",{fontCharacter:"\\eb76"}),r.verified=new r("verified",{fontCharacter:"\\eb77"}),r.versions=new r("versions",{fontCharacter:"\\eb78"}),r.vmActive=new r("vm-active",{fontCharacter:"\\eb79"}),r.vmOutline=new r("vm-outline",{fontCharacter:"\\eb7a"}),r.vmRunning=new r("vm-running",{fontCharacter:"\\eb7b"}),r.watch=new r("watch",{fontCharacter:"\\eb7c"}),r.whitespace=new r("whitespace",{fontCharacter:"\\eb7d"}),r.wholeWord=new r("whole-word",{fontCharacter:"\\eb7e"}),r.window=new r("window",{fontCharacter:"\\eb7f"}),r.wordWrap=new r("word-wrap",{fontCharacter:"\\eb80"}),r.zoomIn=new r("zoom-in",{fontCharacter:"\\eb81"}),r.zoomOut=new r("zoom-out",{fontCharacter:"\\eb82"}),r.listFilter=new r("list-filter",{fontCharacter:"\\eb83"}),r.listFlat=new r("list-flat",{fontCharacter:"\\eb84"}),r.listSelection=new r("list-selection",{fontCharacter:"\\eb85"}),r.selection=new r("selection",{fontCharacter:"\\eb85"}),r.listTree=new r("list-tree",{fontCharacter:"\\eb86"}),r.debugBreakpointFunctionUnverified=new r("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),r.debugBreakpointFunction=new r("debug-breakpoint-function",{fontCharacter:"\\eb88"}),r.debugBreakpointFunctionDisabled=new r("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),r.debugStackframeActive=new r("debug-stackframe-active",{fontCharacter:"\\eb89"}),r.debugStackframeDot=new r("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),r.debugStackframe=new r("debug-stackframe",{fontCharacter:"\\eb8b"}),r.debugStackframeFocused=new r("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),r.debugBreakpointUnsupported=new r("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),r.symbolString=new r("symbol-string",{fontCharacter:"\\eb8d"}),r.debugReverseContinue=new r("debug-reverse-continue",{fontCharacter:"\\eb8e"}),r.debugStepBack=new r("debug-step-back",{fontCharacter:"\\eb8f"}),r.debugRestartFrame=new r("debug-restart-frame",{fontCharacter:"\\eb90"}),r.callIncoming=new r("call-incoming",{fontCharacter:"\\eb92"}),r.callOutgoing=new r("call-outgoing",{fontCharacter:"\\eb93"}),r.menu=new r("menu",{fontCharacter:"\\eb94"}),r.expandAll=new r("expand-all",{fontCharacter:"\\eb95"}),r.feedback=new r("feedback",{fontCharacter:"\\eb96"}),r.groupByRefType=new r("group-by-ref-type",{fontCharacter:"\\eb97"}),r.ungroupByRefType=new r("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),r.account=new r("account",{fontCharacter:"\\eb99"}),r.bellDot=new r("bell-dot",{fontCharacter:"\\eb9a"}),r.debugConsole=new r("debug-console",{fontCharacter:"\\eb9b"}),r.library=new r("library",{fontCharacter:"\\eb9c"}),r.output=new r("output",{fontCharacter:"\\eb9d"}),r.runAll=new r("run-all",{fontCharacter:"\\eb9e"}),r.syncIgnored=new r("sync-ignored",{fontCharacter:"\\eb9f"}),r.pinned=new r("pinned",{fontCharacter:"\\eba0"}),r.githubInverted=new r("github-inverted",{fontCharacter:"\\eba1"}),r.debugAlt=new r("debug-alt",{fontCharacter:"\\eb91"}),r.serverProcess=new r("server-process",{fontCharacter:"\\eba2"}),r.serverEnvironment=new r("server-environment",{fontCharacter:"\\eba3"}),r.pass=new r("pass",{fontCharacter:"\\eba4"}),r.stopCircle=new r("stop-circle",{fontCharacter:"\\eba5"}),r.playCircle=new r("play-circle",{fontCharacter:"\\eba6"}),r.record=new r("record",{fontCharacter:"\\eba7"}),r.debugAltSmall=new r("debug-alt-small",{fontCharacter:"\\eba8"}),r.vmConnect=new r("vm-connect",{fontCharacter:"\\eba9"}),r.cloud=new r("cloud",{fontCharacter:"\\ebaa"}),r.merge=new r("merge",{fontCharacter:"\\ebab"}),r.exportIcon=new r("export",{fontCharacter:"\\ebac"}),r.graphLeft=new r("graph-left",{fontCharacter:"\\ebad"}),r.magnet=new r("magnet",{fontCharacter:"\\ebae"}),r.notebook=new r("notebook",{fontCharacter:"\\ebaf"}),r.redo=new r("redo",{fontCharacter:"\\ebb0"}),r.checkAll=new r("check-all",{fontCharacter:"\\ebb1"}),r.pinnedDirty=new r("pinned-dirty",{fontCharacter:"\\ebb2"}),r.passFilled=new r("pass-filled",{fontCharacter:"\\ebb3"}),r.circleLargeFilled=new r("circle-large-filled",{fontCharacter:"\\ebb4"}),r.circleLargeOutline=new r("circle-large-outline",{fontCharacter:"\\ebb5"}),r.combine=new r("combine",{fontCharacter:"\\ebb6"}),r.gather=new r("gather",{fontCharacter:"\\ebb6"}),r.table=new r("table",{fontCharacter:"\\ebb7"}),r.variableGroup=new r("variable-group",{fontCharacter:"\\ebb8"}),r.typeHierarchy=new r("type-hierarchy",{fontCharacter:"\\ebb9"}),r.typeHierarchySub=new r("type-hierarchy-sub",{fontCharacter:"\\ebba"}),r.typeHierarchySuper=new r("type-hierarchy-super",{fontCharacter:"\\ebbb"}),r.gitPullRequestCreate=new r("git-pull-request-create",{fontCharacter:"\\ebbc"}),r.runAbove=new r("run-above",{fontCharacter:"\\ebbd"}),r.runBelow=new r("run-below",{fontCharacter:"\\ebbe"}),r.notebookTemplate=new r("notebook-template",{fontCharacter:"\\ebbf"}),r.debugRerun=new r("debug-rerun",{fontCharacter:"\\ebc0"}),r.workspaceTrusted=new r("workspace-trusted",{fontCharacter:"\\ebc1"}),r.workspaceUntrusted=new r("workspace-untrusted",{fontCharacter:"\\ebc2"}),r.workspaceUnspecified=new r("workspace-unspecified",{fontCharacter:"\\ebc3"}),r.terminalCmd=new r("terminal-cmd",{fontCharacter:"\\ebc4"}),r.terminalDebian=new r("terminal-debian",{fontCharacter:"\\ebc5"}),r.terminalLinux=new r("terminal-linux",{fontCharacter:"\\ebc6"}),r.terminalPowershell=new r("terminal-powershell",{fontCharacter:"\\ebc7"}),r.terminalTmux=new r("terminal-tmux",{fontCharacter:"\\ebc8"}),r.terminalUbuntu=new r("terminal-ubuntu",{fontCharacter:"\\ebc9"}),r.terminalBash=new r("terminal-bash",{fontCharacter:"\\ebca"}),r.arrowSwap=new r("arrow-swap",{fontCharacter:"\\ebcb"}),r.copy=new r("copy",{fontCharacter:"\\ebcc"}),r.personAdd=new r("person-add",{fontCharacter:"\\ebcd"}),r.filterFilled=new r("filter-filled",{fontCharacter:"\\ebce"}),r.wand=new r("wand",{fontCharacter:"\\ebcf"}),r.debugLineByLine=new r("debug-line-by-line",{fontCharacter:"\\ebd0"}),r.inspect=new r("inspect",{fontCharacter:"\\ebd1"}),r.layers=new r("layers",{fontCharacter:"\\ebd2"}),r.layersDot=new r("layers-dot",{fontCharacter:"\\ebd3"}),r.layersActive=new r("layers-active",{fontCharacter:"\\ebd4"}),r.compass=new r("compass",{fontCharacter:"\\ebd5"}),r.compassDot=new r("compass-dot",{fontCharacter:"\\ebd6"}),r.compassActive=new r("compass-active",{fontCharacter:"\\ebd7"}),r.azure=new r("azure",{fontCharacter:"\\ebd8"}),r.issueDraft=new r("issue-draft",{fontCharacter:"\\ebd9"}),r.gitPullRequestClosed=new r("git-pull-request-closed",{fontCharacter:"\\ebda"}),r.gitPullRequestDraft=new r("git-pull-request-draft",{fontCharacter:"\\ebdb"}),r.debugAll=new r("debug-all",{fontCharacter:"\\ebdc"}),r.debugCoverage=new r("debug-coverage",{fontCharacter:"\\ebdd"}),r.runErrors=new r("run-errors",{fontCharacter:"\\ebde"}),r.folderLibrary=new r("folder-library",{fontCharacter:"\\ebdf"}),r.debugContinueSmall=new r("debug-continue-small",{fontCharacter:"\\ebe0"}),r.beakerStop=new r("beaker-stop",{fontCharacter:"\\ebe1"}),r.graphLine=new r("graph-line",{fontCharacter:"\\ebe2"}),r.graphScatter=new r("graph-scatter",{fontCharacter:"\\ebe3"}),r.pieChart=new r("pie-chart",{fontCharacter:"\\ebe4"}),r.bracket=new r("bracket",{fontCharacter:"\\eb0f"}),r.bracketDot=new r("bracket-dot",{fontCharacter:"\\ebe5"}),r.bracketError=new r("bracket-error",{fontCharacter:"\\ebe6"}),r.dropDownButton=new r("drop-down-button",r.chevronDown.definition)})(be||(be={}));class DD{constructor(e,t){this.language=e,this.id=t}}class kn{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&1792)>>>8}static getFontStyle(e){return(e&14336)>>>11}static getForeground(e){return(e&8372224)>>>14}static getBackground(e){return(e&4286578688)>>>23}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return n&1&&(i+=" mtki"),n&2&&(i+=" mtkb"),n&4&&(i+=" mtku"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;return n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;"),n&4&&(s+="text-decoration: underline;"),s}}const Pq=function(){let r=Object.create(null);return r[0]="symbol-method",r[1]="symbol-function",r[2]="symbol-constructor",r[3]="symbol-field",r[4]="symbol-variable",r[5]="symbol-class",r[6]="symbol-struct",r[7]="symbol-interface",r[8]="symbol-module",r[9]="symbol-property",r[10]="symbol-event",r[11]="symbol-operator",r[12]="symbol-unit",r[13]="symbol-value",r[14]="symbol-constant",r[15]="symbol-enum",r[16]="symbol-enum-member",r[17]="symbol-keyword",r[27]="symbol-snippet",r[18]="symbol-text",r[19]="symbol-color",r[20]="symbol-file",r[21]="symbol-reference",r[22]="symbol-customcolor",r[23]="symbol-folder",r[24]="symbol-type-parameter",r[25]="account",r[26]="issues",function(e){const t=r[e];let i=t&&KC.get(t);return i||(console.info("No codicon found for CompletionItemKind "+e),i=be.symbolProperty),i.classNames}}();let N3=function(){let r=Object.create(null);return r.method=0,r.function=1,r.constructor=2,r.field=3,r.variable=4,r.class=5,r.struct=6,r.interface=7,r.module=8,r.property=9,r.event=10,r.operator=11,r.unit=12,r.value=13,r.constant=14,r.enum=15,r["enum-member"]=16,r.enumMember=16,r.keyword=17,r.snippet=27,r.text=18,r.color=19,r.file=20,r.reference=21,r.customcolor=22,r.folder=23,r["type-parameter"]=24,r.typeParameter=24,r.account=25,r.issue=26,function(e,t){let i=r[e];return typeof i=="undefined"&&!t&&(i=9),i}}();var Gr;(function(r){r[r.Automatic=0]="Automatic",r[r.Explicit=1]="Explicit"})(Gr||(Gr={}));var ta;(function(r){r[r.Invoke=1]="Invoke",r[r.TriggerCharacter=2]="TriggerCharacter",r[r.ContentChange=3]="ContentChange"})(ta||(ta={}));var ym;(function(r){r[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write"})(ym||(ym={}));function Fq(r){return r&&De.isUri(r.uri)&&k.isIRange(r.range)&&(k.isIRange(r.originSelectionRange)||k.isIRange(r.targetSelectionRange))}var Vk;(function(r){const e=new Map;e.set("file",0),e.set("module",1),e.set("namespace",2),e.set("package",3),e.set("class",4),e.set("method",5),e.set("property",6),e.set("field",7),e.set("constructor",8),e.set("enum",9),e.set("interface",10),e.set("function",11),e.set("variable",12),e.set("constant",13),e.set("string",14),e.set("number",15),e.set("boolean",16),e.set("array",17),e.set("object",18),e.set("key",19),e.set("null",20),e.set("enum-member",21),e.set("struct",22),e.set("event",23),e.set("operator",24),e.set("type-parameter",25);const t=new Map;t.set(0,"file"),t.set(1,"module"),t.set(2,"namespace"),t.set(3,"package"),t.set(4,"class"),t.set(5,"method"),t.set(6,"property"),t.set(7,"field"),t.set(8,"constructor"),t.set(9,"enum"),t.set(10,"interface"),t.set(11,"function"),t.set(12,"variable"),t.set(13,"constant"),t.set(14,"string"),t.set(15,"number"),t.set(16,"boolean"),t.set(17,"array"),t.set(18,"object"),t.set(19,"key"),t.set(20,"null"),t.set(21,"enum-member"),t.set(22,"struct"),t.set(23,"event"),t.set(24,"operator"),t.set(25,"type-parameter");function i(o){return e.get(o)}r.fromString=i;function n(o){return t.get(o)}r.toString=n;function s(o,a){const l=t.get(o);let c=l&&KC.get("symbol-"+l);return c||(console.info("No codicon found for SymbolKind "+o),c=be.symbolProperty),`${a?"inline":"block"} ${c.classNames}`}r.toCssClassName=s})(Vk||(Vk={}));class uo{constructor(e){this.value=e}}uo.Comment=new uo("comment");uo.Imports=new uo("imports");uo.Region=new uo("region");var YC;(function(r){r[r.Other=0]="Other",r[r.Type=1]="Type",r[r.Parameter=2]="Parameter"})(YC||(YC={}));const ZC=new ci,XC=new ci,Zs=new ci,AD=new ci,Fd=new ci,Sm=new ci,Es=new ci,Pf=new ci,QC=new ci,xm=new ci,JC=new ci,ew=new ci,tw=new ci,za=new ci,Zl=new ci,ia=new ci,Bp=new ci,Xs=new ci,iw=new ci,Em=new ci,Ff=new ci,Xy=new ci,Hk=new ci,nw=new ci,ND=new ci,Qt=new Rq;class Bq{clone(){return this}equals(e){return this===e}}const G_=new Bq,RD="vs.editor.nullMode",rw=new DD(RD,0);function R3(r,e,t,i){return new cD([new $y(i,"",r)],t)}function OD(r,e,t,i){let n=new Uint32Array(2);return n[0]=i,n[1]=(r<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new Uy(n,t===null?G_:t)}const Wq="editorWorkerService",Ps=bt(Wq),Fs=bt("modeService"),ho=bt("textModelService"),Vq="$initialize";let aO=!1;function $k(r){!_g||(aO||(aO=!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(r.message))}class Hq{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send({vsWorker:this._workerId,req:i,method:e,args:t})})}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){if(e.seq){let s=e;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let a=s.err;s.err.$isError&&(a=new Error,a.name=s.err.name,a.message=s.err.message,a.stack=s.err.stack),o.reject(a);return}o.resolve(s.res);return}let t=e,i=t.req;this._handler.handleMessage(t.method,t.args).then(s=>{this._send({vsWorker:this._workerId,seq:i,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=PR(s.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:PR(s)})})}_send(e){let t=[];if(e.req){const i=e;for(let n=0;n<i.args.length;n++)i.args[n]instanceof ArrayBuffer&&t.push(i.args[n])}else{const i=e;i.res instanceof ArrayBuffer&&t.push(i.res)}this._handler.sendMessage(e,t)}}class $q extends Z{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",l=>{this._protocol.handleMessage(l)},l=>{n&&n(l)})),this._protocol=new Hq({sendMessage:(l,c)=>{this._worker.postMessage(l,c)},handleMessage:(l,c)=>{if(typeof i[l]!="function")return Promise.reject(new Error("Missing method "+l+" on main thread host."));try{return Promise.resolve(i[l].apply(i,c))}catch(d){return Promise.reject(d)}}}),this._protocol.setWorkerId(this._worker.getId());let s=null;typeof self.require!="undefined"&&typeof self.require.getConfig=="function"?s=self.require.getConfig():typeof self.requirejs!="undefined"&&(s=self.requirejs.s.contexts._.config);const o=ED(i);this._onModuleLoaded=this._protocol.sendMessage(Vq,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,o]);const a=(l,c)=>this._request(l,c);this._lazyProxy=new Promise((l,c)=>{n=c,this._onModuleLoaded.then(d=>{l(S3(d,a))},d=>{c(d),this._onError("Worker failed to load "+t,d)})})}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)}}var f1;const lO=(f1=window.trustedTypes)===null||f1===void 0?void 0:f1.createPolicy("defaultWorkerFactory",{createScriptURL:r=>r});function Uq(r,e){if(yi.MonacoEnvironment){if(typeof yi.MonacoEnvironment.getWorker=="function")return yi.MonacoEnvironment.getWorker(r,e);if(typeof yi.MonacoEnvironment.getWorkerUrl=="function"){const t=yi.MonacoEnvironment.getWorkerUrl(r,e);return new Worker(lO?lO.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function zq(r){return typeof r.then=="function"}class jq{constructor(e,t,i,n,s){this.id=t;const o=Uq("workerMain.js",i);zq(o)?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){n(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(i=>i.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class Qy{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Qy.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new jq(e,n,this._label||"anonymous"+n,t,s=>{$k(s),this._webWorkerFailedBeforeError=s,i(s)})}}Qy.LAST_WORKER_ID=0;var fi;(function(r){r[r.None=0]="None",r[r.Indent=1]="Indent",r[r.IndentOutdent=2]="IndentOutdent",r[r.Outdent=3]="Outdent"})(fi||(fi={}));class g1{constructor(e){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}isOK(e){return(this._standardTokenMask&e)===0}}class qq{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)jg(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),jg(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),jg(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),jg(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),t.close.length===1&&t.open.length===1&&jg(this.autoClosingPairsCloseSingleChar,t.close,t)}}function jg(r,e,t){r.has(e)?r.get(e).push(t):r.set(e,[t])}function Ab(r,e){let t=r.getCount(),i=r.findTokenIndexAtOffset(e),n=r.getLanguageId(i),s=i;for(;s+1<t&&r.getLanguageId(s+1)===n;)s++;let o=i;for(;o>0&&r.getLanguageId(o-1)===n;)o--;return new Gq(r,n,o,s+1,r.getStartOffset(o),r.getEndOffset(s))}class Gq{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 Io(r){return(r&7)!==0}class Bf{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new g1(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new g1({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=e.colorizedBracketPairs.map(t=>[t[0],t[1]]):e.brackets?this._colorizedBracketPairs=e.brackets.map(t=>[t[0],t[1]]).filter(t=>!(t[0]==="<"&&t[1]===">")):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new g1({open:t.open,close:t.close||""}))}this._autoCloseBefore=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:Bf.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(t.getTokenCount()===0)return!0;const n=t.findTokenIndexAtOffset(i-2),s=t.getStandardTokenType(n);return e.isOK(s)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}Bf.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> + `;let p1;function O3(){return p1||(p1=new TextDecoder("UTF-16LE")),p1}let m1;function Kq(){return m1||(m1=new TextDecoder("UTF-16BE")),m1}let _1;function M3(){return _1||(_1=OB()?O3():Kq()),_1}const P3=typeof TextDecoder!="undefined";let eu,Uk;P3?(eu=r=>new Zq(r),Uk=Yq):(eu=r=>new Xq,Uk=F3);function Yq(r,e,t){const i=new Uint16Array(r.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?F3(r,e,t):O3().decode(i)}function F3(r,e,t){let i=[],n=0;for(let s=0;s<t;s++){const o=Hj(r,e);e+=2,i[n++]=String.fromCharCode(o)}return i.join("")}class Zq{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return M3().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||qi(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class Xq{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class sw{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=sw._toSet(this.open),this._closeSet=sw._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function Qq(r){const e=r.length;r=r.map(o=>[o[0].toLowerCase(),o[1].toLowerCase()]);const t=[];for(let o=0;o<e;o++)t[o]=o;const i=(o,a)=>{const[l,c]=o,[d,u]=a;return l===d||l===u||c===d||c===u},n=(o,a)=>{const l=Math.min(o,a),c=Math.max(o,a);for(let d=0;d<e;d++)t[d]===c&&(t[d]=l)};for(let o=0;o<e;o++){const a=r[o];for(let l=o+1;l<e;l++){const c=r[l];i(a,c)&&n(t[o],t[l])}}const s=[];for(let o=0;o<e;o++){let a=[],l=[];for(let c=0;c<e;c++)if(t[c]===o){const[d,u]=r[c];a.push(d),l.push(u)}a.length>0&&s.push({open:a,close:l})}return s}class Jq{constructor(e,t){this._richEditBracketsBrand=void 0;const i=Qq(t);this.brackets=i.map((n,s)=>new sw(e,s,n.open,n.close,eG(n.open,n.close,i,s),tG(n.open,n.close,i,s))),this.forwardRegex=iG(this.brackets),this.reversedRegex=nG(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function B3(r,e,t,i){for(let n=0,s=e.length;n<s;n++){if(n===t)continue;const o=e[n];for(const a of o.open)a.indexOf(r)>=0&&i.push(a);for(const a of o.close)a.indexOf(r)>=0&&i.push(a)}}function W3(r,e){return r.length-e.length}function Jy(r){if(r.length<=1)return r;const e=[],t=new Set;for(const i of r)t.has(i)||(e.push(i),t.add(i));return e}function eG(r,e,t,i){let n=[];n=n.concat(r),n=n.concat(e);for(let s=0,o=n.length;s<o;s++)B3(n[s],t,i,n);return n=Jy(n),n.sort(W3),n.reverse(),e0(n)}function tG(r,e,t,i){let n=[];n=n.concat(r),n=n.concat(e);for(let s=0,o=n.length;s<o;s++)B3(n[s],t,i,n);return n=Jy(n),n.sort(W3),n.reverse(),e0(n.map(MD))}function iG(r){let e=[];for(const t of r){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=Jy(e),e0(e)}function nG(r){let e=[];for(const t of r){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=Jy(e),e0(e.map(MD))}function rG(r){const e=/^[\w ]+$/.test(r);return r=Ns(r),e?`\\b${r}\\b`:r}function e0(r){let e=`(${r.map(rG).join(")|(")})`;return f3(e,!0)}const MD=function(){function r(i){if(P3){const n=new Uint16Array(i.length);let s=0;for(let o=i.length-1;o>=0;o--)n[s++]=i.charCodeAt(o);return M3().decode(n)}else{let n=[],s=0;for(let o=i.length-1;o>=0;o--)n[s++]=i.charAt(o);return n.join("")}}let e=null,t=null;return function(n){return e!==n&&(e=n,t=r(e)),t}}();class gs{static _findPrevBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let o=i.length-(s.index||0),a=s[0].length,l=n+o;return new k(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=MD(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let o=s.index||0,a=s[0].length;if(a===0)return null;let l=n+o;return new k(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}class sG{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const n=i.charAt(i.length-1);e.push(n)}return e=e.filter((t,i,n)=>n.indexOf(t)===i),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=t.findTokenIndexAtOffset(i-1);if(Io(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,a=gs.findPrevBracketInRange(s,1,o,0,o.length);if(!a)return null;const l=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const d=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(d)?{matchOpenBracket:l}:null}}function Nb(r){return r.global&&(r.lastIndex=0),!0}class oG{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Nb(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Nb(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Nb(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Nb(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 jh{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const i=jh._createOpenBracketRegExp(t[0]),n=jh._createCloseBracketRegExp(t[1]);i&&n&&this._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;s<o;s++){let a=this._regExpRules[s];if([{reg:a.beforeText,text:i},{reg:a.afterText,text:n},{reg:a.previousLineText,text:t}].every(c=>c.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s<o;s++){let a=this._brackets[s];if(a.openRegExp.test(i)&&a.closeRegExp.test(n))return{indentAction:fi.IndentOutdent}}if(e>=2&&i.length>0){for(let s=0,o=this._brackets.length;s<o;s++)if(this._brackets[s].openRegExp.test(i))return{indentAction:fi.Indent}}return null}static _createOpenBracketRegExp(e){let t=Ns(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",jh._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=Ns(e);return/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"),t="^\\s*"+t,jh._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(t){return Fe(t),null}}}class PD{constructor(e,t){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null,this._conf=t,this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new jh(this._conf):null,this.comments=PD._handleComments(this._conf),this.characterPair=new Bf(this._conf),this.wordDefinition=this._conf.wordPattern||PB,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new oG(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new Jq(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new sG(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[n,s]=t.blockComment;i.blockCommentStartToken=n,i.blockCommentEndToken=s}return i}}class cO{constructor(e){this.languageIdentifier=e}}class dO{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 aG{constructor(e){this.languageIdentifier=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new dO(e,t,++this._order);return this._entries.push(i),this._resolved=null,Xe(()=>{for(let n=0;n<this._entries.length;n++)if(this._entries[n]===i){this._entries.splice(n,1),this._resolved=null;break}})}getRichEditSupport(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new PD(this.languageIdentifier,e))}return this._resolved}_resolve(){if(this._entries.length===0)return null;this._entries.sort(dO.cmp);const e={};for(const t of this._entries){const i=t.configuration;e.comments=i.comments||e.comments,e.brackets=i.brackets||e.brackets,e.wordPattern=i.wordPattern||e.wordPattern,e.indentationRules=i.indentationRules||e.indentationRules,e.onEnterRules=i.onEnterRules||e.onEnterRules,e.autoClosingPairs=i.autoClosingPairs||e.autoClosingPairs,e.surroundingPairs=i.surroundingPairs||e.surroundingPairs,e.autoCloseBefore=i.autoCloseBefore||e.autoCloseBefore,e.folding=i.folding||e.folding,e.colorizedBracketPairs=i.colorizedBracketPairs||e.colorizedBracketPairs,e.__electricCharacterSupport=i.__electricCharacterSupport||e.__electricCharacterSupport}return e}}class lG{constructor(){this._entries=new Map,this._onDidChange=new H,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e.id);n||(n=new aG(e),this._entries.set(e.id,n));const s=n.register(t,i);return this._onDidChange.fire(new cO(e)),Xe(()=>{s.dispose(),this._onDidChange.fire(new cO(e))})}_getRichEditSupport(e){const t=this._entries.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=Ab(t,i-1),s=this._getElectricCharacterSupport(n.languageId);return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new qq(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():Bf.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=Ab(t,i-1);return Bf.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return OE(t&&t.wordDefinition||null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.getLanguageIdAtPosition(s,0)!==n)return o;let a=e.getLineContent(s);if(i.shouldIgnore(a)||/^\s+$/.test(a)||a===""){o=s;continue}return s}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const s=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!s)return null;if(i<=1)return{indentation:"",action:null};const o=this.getPrecedingValidLine(t,i,s);if(o<0)return null;if(o<1)return{indentation:"",action:null};const a=t.getLineContent(o);if(s.shouldIncrease(a)||s.shouldIndentNextLine(a))return{indentation:Tt(a),action:fi.Indent,line:o};if(s.shouldDecrease(a))return{indentation:Tt(a),action:null,line:o};{if(o===1)return{indentation:Tt(t.getLineContent(o)),action:null,line:o};const l=o-1,c=s.getIndentMetadata(t.getLineContent(l));if(!(c&3)&&c&4){let d=0;for(let u=l-1;u>0;u--)if(!s.shouldIndentNextLine(t.getLineContent(u))){d=u;break}return{indentation:Tt(t.getLineContent(d+1)),action:null,line:d+1}}if(n)return{indentation:Tt(t.getLineContent(o)),action:null,line:o};for(let d=o;d>0;d--){const u=t.getLineContent(d);if(s.shouldIncrease(u))return{indentation:Tt(u),action:fi.Indent,line:d};if(s.shouldIndentNextLine(u)){let h=0;for(let f=d-1;f>0;f--)if(!s.shouldIndentNextLine(t.getLineContent(d))){h=f;break}return{indentation:Tt(t.getLineContent(h+1)),action:null,line:h+1}}else if(s.shouldDecrease(u))return{indentation:Tt(u),action:null,line:d}}return{indentation:Tt(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,s){if(e<4)return null;const o=this._getRichEditSupport(i);if(!o)return null;const a=this.getIndentRulesSupport(i);if(!a)return null;const l=this.getInheritIndentForLine(e,t,n),c=t.getLineContent(n);if(l){const d=l.line;if(d!==void 0){const u=o.onEnter(e,"",t.getLineContent(d),"");if(u){let h=Tt(t.getLineContent(d));return u.removeText&&(h=h.substring(0,h.length-u.removeText)),u.indentAction===fi.Indent||u.indentAction===fi.IndentOutdent?h=s.shiftIndent(h):u.indentAction===fi.Outdent&&(h=s.unshiftIndent(h)),a.shouldDecrease(c)&&(h=s.unshiftIndent(h)),u.appendText&&(h+=u.appendText),Tt(h)}}return a.shouldDecrease(c)?l.action===fi.Indent?l.indentation:s.unshiftIndent(l.indentation):l.action===fi.Indent?s.shiftIndent(l.indentation):l.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const s=t.getLineTokens(i.startLineNumber),o=Ab(s,i.startColumn-1),a=o.getLineContent();let l=!1,c;o.firstCharOffset>0&&s.getLanguageId(0)!==o.languageId?(l=!0,c=a.substr(0,i.startColumn-1-o.firstCharOffset)):c=s.getLineContent().substring(0,i.startColumn-1);let d;i.isEmpty()?d=a.substr(i.startColumn-1-o.firstCharOffset):d=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-o.firstCharOffset);const u=this.getIndentRulesSupport(o.languageId);if(!u)return null;const h=c,f=Tt(c),g={getLineTokens:b=>t.getLineTokens(b),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(b,C)=>t.getLanguageIdAtPosition(b,C),getLineContent:b=>b===i.startLineNumber?h:t.getLineContent(b)},p=Tt(s.getLineContent()),_=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!_){const b=l?p:f;return{beforeEnter:b,afterEnter:b}}let v=l?p:_.indentation;return _.action===fi.Indent&&(v=n.shiftIndent(v)),u.shouldDecrease(d)&&(v=n.unshiftIndent(v)),{beforeEnter:l?p:f,afterEnter:v}}getIndentActionForType(e,t,i,n,s){if(e<4)return null;const o=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(o.firstCharOffset)return null;const a=this.getIndentRulesSupport(o.languageId);if(!a)return null;const l=o.getLineContent(),c=l.substr(0,i.startColumn-1-o.firstCharOffset);let d;if(i.isEmpty()?d=l.substr(i.startColumn-1-o.firstCharOffset):d=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-o.firstCharOffset),!a.shouldDecrease(c+d)&&a.shouldDecrease(c+n+d)){const u=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!u)return null;let h=u.indentation;return u.action!==fi.Indent&&(h=s.unshiftIndent(h)),h}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return!i||t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t))}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),s=this._getRichEditSupport(n.languageId);if(!s)return null;const o=n.getLineContent(),a=o.substr(0,i.startColumn-1-n.firstCharOffset);let l;i.isEmpty()?l=o.substr(i.startColumn-1-n.firstCharOffset):l=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let c="";if(i.startLineNumber>1&&n.firstCharOffset===0){const p=this.getScopedLineTokens(t,i.startLineNumber-1);p.languageId===n.languageId&&(c=p.getLineContent())}const d=s.onEnter(e,c,a,l);if(!d)return null;const u=d.indentAction;let h=d.appendText;const f=d.removeText||0;h?u===fi.Indent&&(h=" "+h):u===fi.Indent||u===fi.IndentOutdent?h=" ":h="";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:u,appendText:h,removeText:f,indentation:g}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let s=Tt(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),s=typeof i=="undefined"?e.getLineMaxColumn(t)-1:i-1;return Ab(n,s)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}getColorizedBracketPairs(e){var t;return((t=this._getRichEditSupport(e))===null||t===void 0?void 0:t.characterPair.getColorizedBrackets())||[]}}const Ue=new lG;class Ml{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 uO{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function cG(r,e,t){return new Uo(new uO(r),new uO(e)).ComputeDiff(t).changes}class fh{static Assert(e,t){if(!e)throw new Error(t)}}class gh{static Copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}static Copy2(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}}class hO{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new Ml(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 Uo{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=Uo._getElements(e),[a,l,c]=Uo._getElements(t);this._hasStrings=o&&c,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if(Uo._isStringArray(t)){const i=new Int32Array(t.length);for(let n=0,s=t.length;n<s;n++)i[n]=TD(t[n],0);return[t,i,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(e,t){if(!this.ElementsAreEqual(e,t))return!1;const i=Uo._getStrictElement(this._originalSequence,e),n=Uo._getStrictElement(this._modifiedSequence,t);return i===n}static _getStrictElement(e,t){return typeof e.getStrictElement=="function"?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[t]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,s){const o=[!1];let a=this.ComputeDiffRecursive(e,t,i,n,o);return s&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}ComputeDiffRecursive(e,t,i,n,s){for(s[0]=!1;e<=t&&i<=n&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let u;return i<=n?(fh.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new Ml(e,0,i,n-i+1)]):e<=t?(fh.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[new Ml(e,t-e+1,i,0)]):(fh.Assert(e===t+1,"originalStart should only be one more than originalEnd"),fh.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const o=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,o,a,s),c=o[0],d=a[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,i,d,s);let h=[];return s[0]?h=[new Ml(c+1,t-(c+1)+1,d+1,n-(d+1)+1)]:h=this.ComputeDiffRecursive(c+1,t,d+1,n,s),this.ConcatenateChanges(u,h)}return[new Ml(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p,_,v,b){let C=null,y=null,E=new hO,S=t,w=i,x=f[0]-_[0]-n,D=-1073741824,M=this.m_forwardHistory.length-1;do{const B=x+e;B===S||B<w&&c[B-1]<c[B+1]?(u=c[B+1],g=u-x-n,u<D&&E.MarkNextChange(),D=u,E.AddModifiedElement(u+1,g),x=B+1-e):(u=c[B-1]+1,g=u-x-n,u<D&&E.MarkNextChange(),D=u-1,E.AddOriginalElement(u,g+1),x=B-1-e),M>=0&&(c=this.m_forwardHistory[M],e=c[0],S=1,w=c.length-1)}while(--M>=-1);if(C=E.getReverseChanges(),b[0]){let B=f[0]+1,z=_[0]+1;if(C!==null&&C.length>0){const j=C[C.length-1];B=Math.max(B,j.getOriginalEnd()),z=Math.max(z,j.getModifiedEnd())}y=[new Ml(B,h-B+1,z,p-z+1)]}else{E=new hO,S=o,w=a,x=f[0]-_[0]-l,D=1073741824,M=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const B=x+s;B===S||B<w&&d[B-1]>=d[B+1]?(u=d[B+1]-1,g=u-x-l,u>D&&E.MarkNextChange(),D=u+1,E.AddOriginalElement(u+1,g+1),x=B+1-s):(u=d[B-1],g=u-x-l,u>D&&E.MarkNextChange(),D=u,E.AddModifiedElement(u+1,g+1),x=B-1-s),M>=0&&(d=this.m_reverseHistory[M],s=d[0],S=1,w=d.length-1)}while(--M>=-1);y=E.getChanges()}return this.ConcatenateChanges(C,y)}ComputeRecursionPoint(e,t,i,n,s,o,a){let l=0,c=0,d=0,u=0,h=0,f=0;e--,i--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,_=new Int32Array(p),v=new Int32Array(p),b=n-i,C=t-e,y=e-i,E=t-n,w=(C-b)%2===0;_[b]=e,v[C]=t,a[0]=!1;for(let x=1;x<=g/2+1;x++){let D=0,M=0;d=this.ClipDiagonalBound(b-x,x,b,p),u=this.ClipDiagonalBound(b+x,x,b,p);for(let z=d;z<=u;z+=2){z===d||z<u&&_[z-1]<_[z+1]?l=_[z+1]:l=_[z-1]+1,c=l-(z-b)-y;const j=l;for(;l<t&&c<n&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(_[z]=l,l+c>D+M&&(D=l,M=c),!w&&Math.abs(z-C)<=x-1&&l>=v[z])return s[0]=l,o[0]=c,j<=v[z]&&1447>0&&x<=1447+1?this.WALKTRACE(b,d,u,y,C,h,f,E,_,v,l,t,s,c,n,o,w,a):null}const B=(D-e+(M-i)-x)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(D,B))return a[0]=!0,s[0]=D,o[0]=M,B>0&&1447>0&&x<=1447+1?this.WALKTRACE(b,d,u,y,C,h,f,E,_,v,l,t,s,c,n,o,w,a):(e++,i++,[new Ml(e,t-e+1,i,n-i+1)]);h=this.ClipDiagonalBound(C-x,x,C,p),f=this.ClipDiagonalBound(C+x,x,C,p);for(let z=h;z<=f;z+=2){z===h||z<f&&v[z-1]>=v[z+1]?l=v[z+1]-1:l=v[z-1],c=l-(z-C)-E;const j=l;for(;l>e&&c>i&&this.ElementsAreEqual(l,c);)l--,c--;if(v[z]=l,w&&Math.abs(z-b)<=x&&l<=_[z])return s[0]=l,o[0]=c,j>=_[z]&&1447>0&&x<=1447+1?this.WALKTRACE(b,d,u,y,C,h,f,E,_,v,l,t,s,c,n,o,w,a):null}if(x<=1447){let z=new Int32Array(u-d+2);z[0]=b-d+1,gh.Copy2(_,d,z,1,u-d+1),this.m_forwardHistory.push(z),z=new Int32Array(f-h+2),z[0]=C-h+1,gh.Copy2(v,h,z,1,f-h+1),this.m_reverseHistory.push(z)}}return this.WALKTRACE(b,d,u,y,C,h,f,E,_,v,l,t,s,c,n,o,w,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,s=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,o=i.originalLength>0,a=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<s&&(!o||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!a||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const c=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!c)break;i.originalStart++,i.modifiedStart++}let l=[null];if(t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],l)){e[t]=l[0],e.splice(t+1,1),t--;continue}}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,s=0;if(t>0){const u=e[t-1];n=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const o=i.originalLength>0,a=i.modifiedLength>0;let l=0,c=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let u=1;;u++){const h=i.originalStart-u,f=i.modifiedStart-u;if(h<n||f<s||o&&!this.OriginalElementsAreEqual(h,h+i.originalLength)||a&&!this.ModifiedElementsAreEqual(f,f+i.modifiedLength))break;const p=(h===n&&f===s?5:0)+this._boundaryScore(h,i.originalLength,f,i.modifiedLength);p>c&&(c=p,l=u)}i.originalStart-=l,i.modifiedStart-=l;const d=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],d)){e[t-1]=d[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const n=e[t-1],s=e[t],o=s.originalStart-n.originalStart-n.originalLength,a=n.originalStart,l=s.originalStart+s.originalLength,c=l-a,d=n.modifiedStart,u=s.modifiedStart+s.modifiedLength,h=u-d;if(o<5&&c<20&&h<20){const f=this._findBetterContiguousSequence(a,c,d,h,o);if(f){const[g,p]=f;(g!==n.originalStart+n.originalLength||p!==n.modifiedStart+n.modifiedLength)&&(n.originalLength=g-n.originalStart,n.modifiedLength=p-n.modifiedStart,s.originalStart=g+o,s.modifiedStart=p+o,s.originalLength=l-s.originalStart,s.modifiedLength=u-s.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,s){if(t<s||n<s)return null;const o=e+t-s+1,a=i+n-s+1;let l=0,c=0,d=0;for(let u=e;u<o;u++)for(let h=i;h<a;h++){const f=this._contiguousSequenceScore(u,h,s);f>0&&f>l&&(l=f,c=u,d=h)}return l>0?[c,d]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s<i;s++){if(!this.ElementsAreEqual(e+s,t+s))return 0;n+=this._originalStringElements[e+s].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0: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?!0: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){const s=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(i,n)?1:0;return s+o}ConcatenateChanges(e,t){let i=[];if(e.length===0||t.length===0)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 gh.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],gh.Copy(t,1,n,e.length,t.length-1),n}else{const n=new Array(e.length+t.length);return gh.Copy(e,0,n,0,e.length),gh.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,i){if(fh.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),fh.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 a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new Ml(n,s,o,a),!0}else return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const s=i,o=n-i-1,a=t%2===0;if(e<0){const l=s%2===0;return a===l?0:1}else{const l=o%2===0;return a===l?n-1:n-2}}}const dG=3;function V3(r,e,t,i){return new Uo(r,e,t).ComputeDiff(i)}class fO{constructor(e){const t=[],i=[];for(let n=0,s=e.length;n<s;n++)t[n]=zk(e[n],1),i[n]=jk(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],s=[],o=[];let a=0;for(let l=t;l<=i;l++){const c=this.lines[l],d=e?this._startColumns[l]:1,u=e?this._endColumns[l]:c.length+1;for(let h=d;h<u;h++)n[a]=c.charCodeAt(h-1),s[a]=l+1,o[a]=h,a++}return new uG(n,s,o)}}class uG{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class km{constructor(e,t,i,n,s,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,i){let n,s,o,a,l,c,d,u;return e.originalLength===0?(n=0,s=0,o=0,a=0):(n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1)),e.modifiedLength===0?(l=0,c=0,d=0,u=0):(l=i.getStartLineNumber(e.modifiedStart),c=i.getStartColumn(e.modifiedStart),d=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new km(n,s,o,a,l,c,d,u)}}function hG(r){if(r.length<=1)return r;const e=[r[0]];let t=e[0];for(let i=1,n=r.length;i<n;i++){const s=r[i],o=s.originalStart-(t.originalStart+t.originalLength),a=s.modifiedStart-(t.modifiedStart+t.modifiedLength);Math.min(o,a)<dG?(t.originalLength=s.originalStart+s.originalLength-t.originalStart,t.modifiedLength=s.modifiedStart+s.modifiedLength-t.modifiedStart):(e.push(s),t=s)}return e}class Wp{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,a){let l,c,d,u,h;if(t.originalLength===0?(l=i.getStartLineNumber(t.originalStart)-1,c=0):(l=i.getStartLineNumber(t.originalStart),c=i.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(d=n.getStartLineNumber(t.modifiedStart)-1,u=0):(d=n.getStartLineNumber(t.modifiedStart),u=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const f=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),g=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let p=V3(f,g,s,!0).changes;a&&(p=hG(p)),h=[];for(let _=0,v=p.length;_<v;_++)h.push(km.createFromDiffChange(p[_],f,g))}return new Wp(l,c,d,u,h)}}class fG{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new fO(e),this.modified=new fO(t),this.continueLineDiff=gO(i.maxComputationTime),this.continueCharDiff=gO(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=V3(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,c=t.length;l<c;l++)a.push(Wp.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[l],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:a}}const n=[];let s=0,o=0;for(let a=-1,l=t.length;a<l;a++){const c=a+1<l?t[a+1]:null,d=c?c.originalStart:this.originalLines.length,u=c?c.modifiedStart:this.modifiedLines.length;for(;s<d&&o<u;){const h=this.originalLines[s],f=this.modifiedLines[o];if(h!==f){{let g=zk(h,1),p=zk(f,1);for(;g>1&&p>1;){const _=h.charCodeAt(g-2),v=f.charCodeAt(p-2);if(_!==v)break;g--,p--}(g>1||p>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,g,o+1,1,p)}{let g=jk(h,1),p=jk(f,1);const _=h.length+1,v=f.length+1;for(;g<_&&p<v;){const b=h.charCodeAt(g-1),C=h.charCodeAt(p-1);if(b!==C)break;g++,p++}(g<_||p<v)&&this._pushTrimWhitespaceCharChange(n,s+1,g,_,o+1,p,v)}}s++,o++}c&&(n.push(Wp.createFromDiffResult(this.shouldIgnoreTrimWhitespace,c,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=c.originalLength,o+=c.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,s,o,a){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,s,o,a))return;let l;this.shouldComputeCharChanges&&(l=[new km(t,i,t,n,s,o,s,a)]),e.push(new Wp(t,t,s,s,l))}_mergeTrimWhitespaceCharChange(e,t,i,n,s,o,a){const l=e.length;if(l===0)return!1;const c=e[l-1];return c.originalEndLineNumber===0||c.modifiedEndLineNumber===0?!1:c.originalEndLineNumber+1===t&&c.modifiedEndLineNumber+1===s?(c.originalEndLineNumber=t,c.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new km(t,i,t,n,s,o,s,a)),!0):!1}}function zk(r,e){const t=pr(r);return t===-1?e:t+1}function jk(r,e){const t=Jo(r);return t===-1?e:t+2}function gO(r){if(r===0)return()=>!0;const e=Date.now();return()=>Date.now()-e<r}function ow(r){return r<0?0:r>255?255:r|0}function ph(r){return r<0?0:r>4294967295?4294967295:r|0}class H3{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class gG{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=ph(e);const i=this.values,n=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=ph(e),t=ph(t),this.values[e]===t?!1:(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=ph(e),t=ph(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;let s=i.length-e;return t>=s&&(t=s),t===0?!1:(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<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=ph(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(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<o)i=n-1;else if(e>=s)t=n+1;else break;return new H3(n,e-o)}}class pG{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new U(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new gG(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let i=aa(t);if(i.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);let n=new Uint32Array(i.length-1);for(let s=1;s<i.length;s++)this._lines.splice(e.lineNumber+s-1,0,i[s]),n[s-1]=i[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}class Cg{constructor(e){let t=ow(e);this._defaultValue=t,this._asciiMap=Cg._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=ow(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}}class qh{constructor(){this._actual=new Cg(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}}class mG{constructor(e,t,i){const n=new Uint8Array(e*t);for(let s=0,o=e*t;s<o;s++)n[s]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class _G{constructor(e){let t=0,i=0;for(let s=0,o=e.length;s<o;s++){let[a,l,c]=e[s];l>t&&(t=l),a>i&&(i=a),c>i&&(i=c)}t++,i++;let n=new mG(i,t,0);for(let s=0,o=e.length;s<o;s++){let[a,l,c]=e[s];n.set(a,l,c)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let b1=null;function bG(){return b1===null&&(b1=new _G([[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]])),b1}let qg=null;function vG(){if(qg===null){qg=new Cg(0);const r=` <>'"\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 t=0;t<r.length;t++)qg.set(r.charCodeAt(t),1);const e=".,;";for(let t=0;t<e.length;t++)qg.set(e.charCodeAt(t),2)}return qg}class aw{static _createLink(e,t,i,n,s){let o=s-1;do{const a=t.charCodeAt(o);if(e.get(a)!==2)break;o--}while(o>n);if(n>0){const a=t.charCodeAt(n-1),l=t.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=bG()){const i=vG();let n=[];for(let s=1,o=e.getLineCount();s<=o;s++){const a=e.getLineContent(s),l=a.length;let c=0,d=0,u=0,h=1,f=!1,g=!1,p=!1,_=!1;for(;c<l;){let v=!1;const b=a.charCodeAt(c);if(h===13){let C;switch(b){case 40:f=!0,C=0;break;case 41:C=f?0:1;break;case 91:p=!0,g=!0,C=0;break;case 93:p=!1,C=g?0:1;break;case 123:_=!0,C=0;break;case 125:C=_?0:1;break;case 39:C=u===34||u===96?0:1;break;case 34:C=u===39||u===96?0:1;break;case 96:C=u===39||u===34?0:1;break;case 42:C=u===42?1:0;break;case 124:C=u===124?1:0;break;case 32:C=p?0:1;break;default:C=i.get(b)}C===1&&(n.push(aw._createLink(i,a,s,d,c)),v=!0)}else if(h===12){let C;b===91?(g=!0,C=0):C=i.get(b),C===1?v=!0:h=13}else h=t.nextState(h,b),h===0&&(v=!0);v&&(h=1,f=!1,g=!1,_=!1,d=c+1,u=b),c++}h===13&&n.push(aw._createLink(i,a,s,d,l))}return n}}function CG(r){return!r||typeof r.getLineCount!="function"||typeof r.getLineContent!="function"?[]:aw.computeLinks(r)}class qk{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,s){if(e&&t){let o=this.doNavigateValueSet(t,s);if(o)return{range:e,value:o}}if(i&&n){let o=this.doNavigateValueSet(n,s);if(o)return{range:i,value:o}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return i!==null?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),s=parseFloat(e);return!isNaN(n)&&!isNaN(s)&&n===s?n===0&&!t?null:(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let s=0,o=e.length;n===null&&s<o;s++)n=this.valueSetReplace(e[s],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}qk.INSTANCE=new qk;var mh=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class wG extends pG{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=MC(e.column,OE(t),this._lines[e.lineNumber-1],0);return i?new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,s="",o=0,a=[];return{*[Symbol.iterator](){for(;;)if(o<a.length){const l=s.substring(a[o].start,a[o].end);o+=1,yield l}else if(n<t.length)s=t[n],a=i(s,e),o=0,n+=1;else break}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),s=[];for(const o of n)s.push({word:i.substring(o.start,o.end),startColumn:o.start+1,endColumn:o.end+1});return s}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&n[0].length!==0;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,s=[];s.push(this._lines[i].substring(e.startColumn-1));for(let o=i+1;o<n;o++)s.push(this._lines[o]);return s.push(this._lines[n].substring(0,e.endColumn-1)),s.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!U.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let s=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>s&&(i=s,n=!0)}return n?{lineNumber:t,column:i}:e}}class tu{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(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new wG(De.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]}computeDiff(e,t,i,n){return mh(this,void 0,void 0,function*(){const s=this._getModel(e),o=this._getModel(t);if(!s||!o)return null;const a=s.getLinesContent(),l=o.getLinesContent(),d=new fG(a,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),u=d.changes.length>0?!1:this._modelsAreIdentical(s,o);return{quitEarly:d.quitEarly,identical:u,changes:d.changes}})}_modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let s=1;s<=i;s++){const o=e.getLineContent(s),a=t.getLineContent(s);if(o!==a)return!1}return!0}computeMoreMinimalEdits(e,t){return mh(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return t;const n=[];let s;t=t.slice(0).sort((o,a)=>{if(o.range&&a.range)return k.compareRangesUsingStarts(o.range,a.range);let l=o.range?0:1,c=a.range?0:1;return l-c});for(let{range:o,text:a,eol:l}of t){if(typeof l=="number"&&(s=l),k.isEmpty(o)&&!a)continue;const c=i.getValueInRange(o);if(a=a.replace(/\r\n|\n|\r/g,i.eol),c===a)continue;if(Math.max(a.length,c.length)>tu._diffLimit){n.push({range:o,text:a});continue}const d=cG(c,a,!1),u=i.offsetAt(k.lift(o).getStartPosition());for(const h of d){const f=i.positionAt(u+h.originalStart),g=i.positionAt(u+h.originalStart+h.originalLength),p={text:a.substr(h.modifiedStart,h.modifiedLength),range:{startLineNumber:f.lineNumber,startColumn:f.column,endLineNumber:g.lineNumber,endColumn:g.column}};i.getValueInRange(p.range)!==p.text&&n.push(p)}}return typeof s=="number"&&n.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n})}computeLinks(e){return mh(this,void 0,void 0,function*(){let t=this._getModel(e);return t?CG(t):null})}textualSuggest(e,t,i,n){return mh(this,void 0,void 0,function*(){const s=new sa(!0),o=new RegExp(i,n),a=new Set;e:for(let l of e){const c=this._getModel(l);if(!!c){for(let d of c.words(o))if(!(d===t||!isNaN(Number(d)))&&(a.add(d),a.size>tu._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}})}computeWordRanges(e,t,i,n){return mh(this,void 0,void 0,function*(){let s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),a=Object.create(null);for(let l=t.startLineNumber;l<t.endLineNumber;l++){let c=s.getLineWords(l,o);for(const d of c){if(!isNaN(Number(d.word)))continue;let u=a[d.word];u||(u=[],a[d.word]=u),u.push({startLineNumber:l,startColumn:d.startColumn,endLineNumber:l,endColumn:d.endColumn})}}return a})}navigateValueSet(e,t,i,n,s){return mh(this,void 0,void 0,function*(){let o=this._getModel(e);if(!o)return null;let a=new RegExp(n,s);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let l=o.getValueInRange(t),c=o.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},a);if(!c)return null;let d=o.getValueInRange(c);return qk.INSTANCE.navigateValueSet(t,l,c,d,i)})}loadForeignModule(e,t,i){let o={host:S3(i,(a,l)=>this._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(ED(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}tu._diffLimit=1e5;tu._suggestionsLimit=1e4;typeof importScripts=="function"&&(yi.monaco=GB());const FD=bt("textResourceConfigurationService"),$3=bt("textResourcePropertiesService");function $r(r,e=0){return r[r.length-(1+e)]}function yG(r){if(r.length===0)throw new Error("Invalid tail call");return[r.slice(0,r.length-1),r[r.length-1]]}function Ls(r,e,t=(i,n)=>i===n){if(r===e)return!0;if(!r||!e||r.length!==e.length)return!1;for(let i=0,n=r.length;i<n;i++)if(!t(r[i],e[i]))return!1;return!0}function BD(r,e,t){let i=0,n=r.length-1;for(;i<=n;){const s=(i+n)/2|0,o=t(r[s],e);if(o<0)i=s+1;else if(o>0)n=s-1;else return s}return-(i+1)}function U3(r,e){let t=0,i=r.length;if(i===0)return 0;for(;t<i;){const n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}function Gk(r,e,t){if(r=r|0,r>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],n=[],s=[],o=[];for(let a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):o.push(a)}return r<n.length?Gk(r,n,t):r<n.length+o.length?o[0]:Gk(r-(n.length+o.length),s,t)}function pO(r,e){const t=[];let i;for(const n of r.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function Ou(r){return r.filter(e=>!!e)}function z3(r){return!Array.isArray(r)||r.length===0}function mr(r){return Array.isArray(r)&&r.length>0}function j3(r,e){if(!e)return r.filter((i,n)=>r.indexOf(i)===n);const t=Object.create(null);return r.filter(i=>{const n=e(i);return t[n]?!1:(t[n]=!0,!0)})}function mO(r){const e=new Set;return r.filter(t=>e.has(t)?!1:(e.add(t),!0))}function SG(r,e){const t=xG(r,e);if(t!==-1)return r[t]}function xG(r,e){for(let t=r.length-1;t>=0;t--){const i=r[t];if(e(i))return t}return-1}function Kk(r,e){return r.length>0?r[0]:e}function WD(r){return[].concat(...r)}function Nn(r,e){let t=typeof e=="number"?r:0;typeof e=="number"?t=r:(t=0,e=r);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function Lm(r,e,t){const i=r.slice(0,e),n=r.slice(e);return i.concat(t,n)}function v1(r,e){const t=r.indexOf(e);t>-1&&(r.splice(t,1),r.unshift(e))}function Rb(r,e){const t=r.indexOf(e);t>-1&&(r.splice(t,1),r.push(e))}function VD(r){return Array.isArray(r)?r:[r]}function EG(r,e,t){const i=q3(r,e),n=r.length,s=t.length;r.length=n+s;for(let o=n-1;o>=i;o--)r[o+s]=r[o];for(let o=0;o<s;o++)r[o+i]=t[o]}function kG(r,e,t,i){const n=q3(r,e),s=r.splice(n,t);return EG(r,n,i),s}function q3(r,e){return e<0?Math.max(e+r.length,0):Math.min(e,r.length)}class Vp{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;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(){return this.items[this.firstIdx]}}const _l=bt("logService");var eo;(function(r){r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Info=2]="Info",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.Off=6]="Off"})(eo||(eo={}));const G3=eo.Info;class LG extends Z{constructor(){super(...arguments);this.level=G3,this._onDidChangeLogLevel=this._register(new H)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class TG extends LG{constructor(e=G3){super();this.setLevel(e)}trace(e,...t){this.getLevel()<=eo.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=eo.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=eo.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=eo.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class IG extends Z{constructor(e){super();this.logger=e,this._register(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)}error(e,...t){this.logger.error(e,...t)}}var DG=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},C1=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Yk=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const _O=60*1e3,bO=5*60*1e3;function Gh(r,e){let t=r.getModel(e);return!(!t||t.isTooLargeForSyncing())}let Zk=class extends Z{constructor(e,t,i){super();this._modelService=e,this._workerManager=this._register(new NG(this._modelService)),this._logService=i,this._register(Em.register("*",{provideLinks:(n,s)=>Gh(this._modelService,n.uri)?this._workerManager.withWorker().then(o=>o.computeLinks(n.uri)).then(o=>o&&{links:o}):Promise.resolve({links:[]})})),this._register(Zs.register("*",new AG(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}computeDiff(e,t,i,n){return this._workerManager.withWorker().then(s=>s.computeDiff(e,t,i,n))}computeMoreMinimalEdits(e,t){if(mr(t)){if(!Gh(this._modelService,e))return Promise.resolve(t);const i=sa.create(!0),n=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([n,mc(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return Gh(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return Gh(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};Zk=DG([C1(0,mi),C1(1,FD),C1(2,_l)],Zk);class AG{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return Yk(this,void 0,void 0,function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if(i.wordBasedSuggestionsMode==="currentDocument")Gh(this._modelService,e.uri)&&n.push(e.uri);else for(const u of this._modelService.getModels())!Gh(this._modelService,u.uri)||(u===e?n.unshift(u.uri):(i.wordBasedSuggestionsMode==="allDocuments"||u.getLanguageIdentifier().id===e.getLanguageIdentifier().id)&&n.push(u.uri));if(n.length===0)return;const s=Ue.getWordDefinition(e.getLanguageIdentifier().id),o=e.getWordAtPosition(t),a=o?new k(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):k.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),d=yield(yield this._workerManager.withWorker()).textualSuggest(n,o==null?void 0:o.word,s);if(!!d)return{duration:d.duration,suggestions:d.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}})}}class NG extends Z{constructor(e){super();this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new j_).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(bO/2)),this._register(this._modelService.onModelRemoved(i=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>bO&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new K3(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class RG extends Z{constructor(e,t,i){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let n=new j_;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(_O/2)),this._register(n)}}dispose(){for(let e in this._syncedModels)ft(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){let n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>_O&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){let i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;let n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new ue;s.add(i.onDidChangeContent(o=>{this._proxy.acceptModelChanged(n.toString(),o)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(Xe(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],ft(t)}}class vO{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class w1{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class K3 extends Z{constructor(e,t,i){super();this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Qy(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 $q(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new w1(this)))}catch(e){$k(e),this._worker=new vO(new tu(new w1(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>($k(e),this._worker=new vO(new tu(new w1(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new RG(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return Yk(this,void 0,void 0,function*(){return this._disposed?Promise.reject(vg()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,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){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,i){return Yk(this,void 0,void 0,function*(){const n=yield this._withSyncedResources(e),s=i.source,o=o1(i);return n.textualSuggest(e.map(a=>a.toString()),t,s,o)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let s=Ue.getWordDefinition(n.getLanguageIdentifier().id),o=s.source,a=o1(s);return i.computeWordRanges(e.toString(),t,o,a)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{let s=this._modelService.getModel(e);if(!s)return null;let o=Ue.getWordDefinition(s.getLanguageIdentifier().id),a=o.source,l=o1(o);return n.navigateValueSet(e.toString(),t,i,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function OG(r,e){return new MG(r,e)}class MG extends K3{constructor(e,t){super(e,t.keepIdleModels||!1,t.label);this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")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(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?ED(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(i=>{this._foreignModuleCreateData=null;const n=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(a,c)};let o={};for(const a of i)o[a]=s(a,n);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}class Gi{constructor(e,t){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=Gi.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=t,new Gi(i,e)}equals(e){return e instanceof Gi?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o<s;o++)if(this._tokens[o]!==e._tokens[o])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1];return kn.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return kn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return kn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return kn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return kn.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Gi.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new HD(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s<n;s++)e[s<<1]=e[s+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const s=i+Math.floor((n-i)/2),o=e[s<<1];if(o===t)return s+1;o<t?i=s+1:o>t&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let o=0;for(;;){let a=t<this._tokensCount?this._tokens[t<<1]:-1,l=i<e.length?e[i]:null;if(a!==-1&&(l===null||a<=l.offset)){n+=this._text.substring(o,a);const c=this._tokens[(t<<1)+1];s.push(n.length,c),t++,o=a}else if(l){if(l.offset>o){n+=this._text.substring(o,l.offset);const c=this._tokens[(t<<1)+1];s.push(n.length,c),o=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Gi(new Uint32Array(s),n)}}Gi.defaultTokenMetadata=(0<<11|1<<14|2<<23)>>>0;class HD{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<o&&!(e.getStartOffset(s)>=i);s++)this._tokensCount++}equals(e){return e instanceof HD?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}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)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class Nr{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,n=t.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!Nr._equals(e[s],t[s]))return!1;return!0}static extractWrapped(e,t,i){if(e.length===0)return e;const n=t+1,s=i+1,o=i-t,a=[];let l=0;for(const c of e)c.endColumn<=n||c.startColumn>=s||(a[l++]=new Nr(Math.max(1,c.startColumn-n+1),Math.min(o+1,c.endColumn-n+1),c.className,c.type));return a}static filter(e,t,i,n){if(e.length===0)return[];let s=[],o=0;for(let a=0,l=e.length;a<l;a++){const c=e[a],d=c.range;if(d.endLineNumber<t||d.startLineNumber>t||d.isEmpty()&&(c.type===0||c.type===3))continue;const u=d.startLineNumber===t?d.startColumn:i,h=d.endLineNumber===t?d.endColumn:n;s[o++]=new Nr(u,h,c.inlineClassName,c.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=Nr._typeCompare(e.type,t.type);return i!==0?i:e.className!==t.className?e.className<t.className?-1:1:0}}class CO{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class lw{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let n=0;for(;n+1<this.count&&this.stopOffsets[n]===this.stopOffsets[n+1];)n++;i.push(new CO(t,this.stopOffsets[n],this.classNames.join(" "),lw._metadata(this.metadata))),t=this.stopOffsets[n]+1,this.stopOffsets.splice(0,n+1),this.classNames.splice(0,n+1),this.metadata.splice(0,n+1),this.count-=n+1}return this.count>0&&t<e&&(i.push(new CO(t,e-1,this.classNames.join(" "),lw._metadata(this.metadata))),t=e),t}insert(e,t,i){if(this.count===0||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class PG{static normalize(e,t){if(t.length===0)return[];let i=[];const n=new lw;let s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];let c=l.startColumn,d=l.endColumn;const u=l.className,h=l.type===1?2:l.type===2?4:0;if(c>1){const p=e.charCodeAt(c-2);qi(p)&&c--}if(d>1){const p=e.charCodeAt(d-2);qi(p)&&d--}const f=c-1,g=d-2;s=n.consumeLowerThan(f,s,i),n.count===0&&(s=f),n.insert(g,u,h)}return n.consumeLowerThan(1073741824,s,i),i}}class En{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class FG{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class Mu{constructor(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p,_,v,b,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Nr.compare),this.tabSize=d,this.startVisibleColumn=u,this.spaceWidth=h,this.stopRenderingLineAfter=p,this.renderWhitespace=_==="all"?4:_==="boundary"?1:_==="selection"?2:_==="trailing"?3:0,this.renderControlCharacters=v,this.fontLigatures=b,this.selectionsOnLine=C&&C.sort((S,w)=>S.startOffset<w.startOffset?-1:1);const y=Math.abs(g-h),E=Math.abs(f-h);y<E?(this.renderSpaceWidth=g,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=f,this.renderSpaceCharCode=183)}sameSelection(e){if(this.selectionsOnLine===null)return e===null;if(e===null||e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&Nr.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class $D{constructor(e,t){this.partIndex=e,this.charIndex=t}}class Fo{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(e&4294901760)>>>16}static getCharIndex(e){return(e&65535)>>>0}setColumnInfo(e,t,i,n){const s=(t<<16|i<<0)>>>0;this._data[e-1]=s,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return this.length===0?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=Fo.getPartIndex(t),n=Fo.getCharIndex(t);return new $D(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(this.length===0)return 0;let n=(e<<16|i<<0)>>>0,s=0,o=this.length-1;for(;s+1<o;){let p=s+o>>>1,_=this._data[p];if(_===n)return p;_>n?o=p:s=p}if(s===o)return s;let a=this._data[s],l=this._data[o];if(a===n)return s;if(l===n)return o;let c=Fo.getPartIndex(a),d=Fo.getCharIndex(a),u=Fo.getPartIndex(l),h;c!==u?h=t:h=Fo.getCharIndex(l);let f=i-d,g=h-i;return f<=g?s:o}}class Xk{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function t0(r,e){if(r.lineContent.length===0){if(r.lineDecorations.length>0){e.appendASCIIString("<span>");let t=0,i=0,n=0;for(const o of r.lineDecorations)(o.type===1||o.type===2)&&(e.appendASCIIString('<span class="'),e.appendASCIIString(o.className),e.appendASCIIString('"></span>'),o.type===1&&(n|=1,t++),o.type===2&&(n|=2,i++));e.appendASCIIString("</span>");const s=new Fo(1,t+i);return s.setColumnInfo(1,t,0,0),new Xk(s,!1,n)}return e.appendASCIIString("<span><span></span></span>"),new Xk(new Fo(0,0),!1,0)}return jG(VG(r),e)}class BG{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function i0(r){let e=eu(1e4),t=t0(r,e);return new BG(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class WG{constructor(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.parts=o,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=d,this.containsRTL=u,this.spaceWidth=h,this.renderSpaceCharCode=f,this.renderWhitespace=g,this.renderControlCharacters=p}}function VG(r){const e=r.lineContent;let t,i;r.stopRenderingLineAfter!==-1&&r.stopRenderingLineAfter<e.length?(t=!0,i=r.stopRenderingLineAfter):(t=!1,i=e.length);let n=HG(r.lineTokens,r.fauxIndentLength,i);(r.renderWhitespace===4||r.renderWhitespace===1||r.renderWhitespace===2&&!!r.selectionsOnLine||r.renderWhitespace===3)&&(n=UG(r,e,i,n));let s=0;if(r.lineDecorations.length>0){for(let o=0,a=r.lineDecorations.length;o<a;o++){const l=r.lineDecorations[o];l.type===3||l.type===1?s|=1:l.type===2&&(s|=2)}n=zG(e,i,n,r.lineDecorations)}return r.containsRTL||(n=$G(e,n,!r.isBasicASCII||r.fontLigatures)),new WG(r.useMonospaceOptimizations,r.canUseHalfwidthRightwardsArrow,e,i,t,n,s,r.fauxIndentLength,r.tabSize,r.startVisibleColumn,r.containsRTL,r.spaceWidth,r.renderSpaceCharCode,r.renderWhitespace,r.renderControlCharacters)}function HG(r,e,t){let i=[],n=0;e>0&&(i[n++]=new En(e,"",0));for(let s=0,o=r.getCount();s<o;s++){const a=r.getEndOffset(s);if(a<=e)continue;const l=r.getClassName(s);if(a>=t){i[n++]=new En(t,l,0);break}i[n++]=new En(a,l,0)}return i}function $G(r,e,t){let i=0,n=[],s=0;if(t)for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.endIndex;if(i+50<c){const d=l.type,u=l.metadata;let h=-1,f=i;for(let g=i;g<c;g++)r.charCodeAt(g)===32&&(h=g),h!==-1&&g-f>=50&&(n[s++]=new En(h+1,d,u),f=h+1,h=-1);f!==c&&(n[s++]=new En(c,d,u))}else n[s++]=l;i=c}else for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.endIndex;let d=c-i;if(d>50){const u=l.type,h=l.metadata,f=Math.ceil(d/50);for(let g=1;g<f;g++){let p=i+g*50;n[s++]=new En(p,u,h)}n[s++]=new En(c,u,h)}else n[s++]=l;i=c}return n}function UG(r,e,t,i){const n=r.continuesWithWrappedLine,s=r.fauxIndentLength,o=r.tabSize,a=r.startVisibleColumn,l=r.useMonospaceOptimizations,c=r.selectionsOnLine,d=r.renderWhitespace===1,u=r.renderWhitespace===3,h=r.renderSpaceWidth!==r.spaceWidth;let f=[],g=0,p=0,_=i[p].type,v=i[p].endIndex;const b=i.length;let C=!1,y=pr(e),E;y===-1?(C=!0,y=t,E=t):E=Jo(e);let S=!1,w=0,x=c&&c[w],D=a%o;for(let B=s;B<t;B++){const z=e.charCodeAt(B);x&&B>=x.endOffset&&(w++,x=c&&c[w]);let j;if(B<y||B>E)j=!0;else if(z===9)j=!0;else if(z===32)if(d)if(S)j=!0;else{const re=B+1<t?e.charCodeAt(B+1):0;j=re===32||re===9}else j=!0;else j=!1;if(j&&c&&(j=!!x&&x.startOffset<=B&&x.endOffset>B),j&&u&&(j=C||B>E),S){if(!j||!l&&D>=o){if(h){const re=g>0?f[g-1].endIndex:s;for(let te=re+1;te<=B;te++)f[g++]=new En(te,"mtkw",1)}else f[g++]=new En(B,"mtkw",1);D=D%o}}else(B===v||j&&B>s)&&(f[g++]=new En(B,_,0),D=D%o);for(z===9?D=o:no(z)?D+=2:D++,S=j;B===v&&(p++,p<b);)_=i[p].type,v=i[p].endIndex}let M=!1;if(S)if(n&&d){let B=t>0?e.charCodeAt(t-1):0,z=t>1?e.charCodeAt(t-2):0;B===32&&z!==32&&z!==9||(M=!0)}else M=!0;if(M)if(h){const B=g>0?f[g-1].endIndex:s;for(let z=B+1;z<=t;z++)f[g++]=new En(z,"mtkw",1)}else f[g++]=new En(t,"mtkw",1);else f[g++]=new En(t,_,0);return f}function zG(r,e,t,i){i.sort(Nr.compare);const n=PG.normalize(r,i),s=n.length;let o=0,a=[],l=0,c=0;for(let u=0,h=t.length;u<h;u++){const f=t[u],g=f.endIndex,p=f.type,_=f.metadata;for(;o<s&&n[o].startOffset<g;){const v=n[o];if(v.startOffset>c&&(c=v.startOffset,a[l++]=new En(c,p,_)),v.endOffset+1<=g)c=v.endOffset+1,a[l++]=new En(c,p+" "+v.className,_|v.metadata),o++;else{c=g,a[l++]=new En(c,p+" "+v.className,_|v.metadata);break}}g>c&&(c=g,a[l++]=new En(c,p,_))}const d=t[t.length-1].endIndex;if(o<s&&n[o].startOffset===d)for(;o<s&&n[o].startOffset===d;){const u=n[o];a[l++]=new En(c,u.className,u.metadata),o++}return a}function jG(r,e){const t=r.fontIsMonospace,i=r.canUseHalfwidthRightwardsArrow,n=r.containsForeignElements,s=r.lineContent,o=r.len,a=r.isOverflowing,l=r.parts,c=r.fauxIndentLength,d=r.tabSize,u=r.startVisibleColumn,h=r.containsRTL,f=r.spaceWidth,g=r.renderSpaceCharCode,p=r.renderWhitespace,_=r.renderControlCharacters,v=new Fo(o+1,l.length);let b=!1,C=0,y=u,E=0,S=0,w=0,x=0;h?e.appendASCIIString('<span dir="ltr">'):e.appendASCIIString("<span>");for(let D=0,M=l.length;D<M;D++){x+=w;const B=l[D],z=B.endIndex,j=B.type,re=p!==0&&B.isWhitespace(),te=re&&!t&&(j==="mtkw"||!n),N=C===z&&B.isPseudoAfter();if(E=0,e.appendASCIIString('<span class="'),e.appendASCIIString(te?"mtkz":j),e.appendASCII(34),re){let L=0;{let O=C,W=y;for(;O<z;O++){const se=(s.charCodeAt(O)===9?d-W%d:1)|0;L+=se,O>=c&&(W+=se)}}for(te&&(e.appendASCIIString(' style="width:'),e.appendASCIIString(String(f*L)),e.appendASCIIString('px"')),e.appendASCII(62);C<z;C++){v.setColumnInfo(C+1,D-S,E,x),S=0;const O=s.charCodeAt(C);let W;if(O===9){W=d-y%d|0,!i||W>1?e.write1(8594):e.write1(65515);for(let ge=2;ge<=W;ge++)e.write1(160)}else W=1,e.write1(g);E+=W,C>=c&&(y+=W)}w=L}else{let L=0;for(e.appendASCII(62);C<z;C++){v.setColumnInfo(C+1,D-S,E,x),S=0;const O=s.charCodeAt(C);let W=1,ge=1;switch(O){case 9:W=d-y%d,ge=W;for(let se=1;se<=W;se++)e.write1(160);break;case 32:e.write1(160);break;case 60:e.appendASCIIString("<");break;case 62:e.appendASCIIString(">");break;case 38:e.appendASCIIString("&");break;case 0:_?e.write1(9216):e.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:e.write1(65533);break;default:no(O)&&ge++,_&&O<32?e.write1(9216+O):_&&O===127?e.write1(9249):e.write1(O)}E+=W,L+=W,C>=c&&(y+=ge)}w=L}N?S++:S=0,C>=o&&!b&&B.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,D,E,x)),e.appendASCIIString("</span>")}return b||v.setColumnInfo(o+1,l.length-1,E,x),a&&e.appendASCIIString("<span>…</span>"),e.appendASCIIString("</span>"),new Xk(v,h,n)}class wO{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=i|0,this.height=n|0}}class qG{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e,t){const i=this.outputLineIndex>0?t:0;return new U(e+this.outputLineIndex,i+this.outputOffset+1)}}class Hp{constructor(e,t,i,n,s){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i,this.injectionOffsets=n,this.injectionOptions=s}getInputOffsetOfOutputPosition(e,t){let i=0;if(e===0?i=t:i=this.breakOffsets[e-1]+t,this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&i>this.injectionOffsets[n];n++)i<this.injectionOffsets[n]+this.injectionOptions[n].content.length?i=this.injectionOffsets[n]:i-=this.injectionOptions[n].content.length;return i}getOutputPositionOfInputOffset(e,t=2){let i=0;if(this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n]||t!==1&&e===this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return e+=i,this.getOutputPositionOfOffsetInUnwrappedLine(e,t)}getOutputPositionOfOffsetInUnwrappedLine(e,t=2){let i=0,n=this.breakOffsets.length-1,s=0,o=0;for(;i<=n;){s=i+(n-i)/2|0;const a=this.breakOffsets[s];if(o=s>0?this.breakOffsets[s-1]:0,t===0)if(e<=o)n=s-1;else if(e>a)i=s+1;else break;else if(e<o)n=s-1;else if(e>=a)i=s+1;else break}return new qG(s,e-o)}outputPositionToOffsetInUnwrappedLine(e,t){let i=(e>0?this.breakOffsets[e-1]:0)+t;return e>0&&(i-=this.wrappedTextIndentLength),i}normalizeOffsetAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2)return e===i.offsetInUnwrappedLine+i.length?i.offsetInUnwrappedLine+i.length:i.offsetInUnwrappedLine;if(t===1){let o=i.offsetInUnwrappedLine+i.length,a=i.injectedTextIndex;for(;a+1<this.injectionOffsets.length&&this.injectionOffsets[a+1]===this.injectionOffsets[a];)o+=this.injectionOptions[a+1].content.length,a++;return o}let n=i.offsetInUnwrappedLine,s=i.injectedTextIndex;for(;s-1>=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s++;return n}getInjectedText(e,t){const i=this.outputPositionToOffsetInUnwrappedLine(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;s<t.length;s++){const o=i[s].content.length,a=t[s]+n,l=t[s]+n+o;if(a>e)break;if(e<=l)return{injectedTextIndex:s,offsetInUnwrappedLine:a,length:o};n+=o}}}}class GG{constructor(e,t){this.tabSize=e,this.data=t}}class UD{constructor(e,t,i,n,s,o,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=a}}class Br{constructor(e,t,i,n,s,o,a,l,c,d){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Br.isBasicASCII(i,o),this.containsRTL=Br.containsRTL(i,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=d}static isBasicASCII(e,t){return t?yD(e):!0}static containsRTL(e,t,i){return!t&&i?Gy(e):!1}}class $p{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class KG{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new $p(new k(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class Y3{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function YG(r){return Array.isArray(r)}function ZG(r){return!YG(r)}function Z3(r){return typeof r=="string"}function yO(r){return!Z3(r)}function Bh(r){return!r}function oc(r,e){return r.ignoreCase&&e?e.toLowerCase():e}function SO(r){return r.replace(/[&<>'"_]/g,"-")}function XG(r,e){console.log(`${r.languageId}: ${e}`)}function Ot(r,e){return new Error(`${r.languageId}: ${e}`)}function ql(r,e,t,i,n){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(s,function(a,l,c,d,u,h,f,g,p){return Bh(c)?Bh(d)?!Bh(u)&&u<i.length?oc(r,i[u]):!Bh(f)&&r&&typeof r[f]=="string"?r[f]:(o===null&&(o=n.split("."),o.unshift(n)),!Bh(h)&&h<o.length?oc(r,o[h]):""):oc(r,t):"$"})}function Ob(r,e){let t=e;for(;t&&t.length>0;){const i=r.tokenizer[t];if(i)return i;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function QG(r,e){let t=e;for(;t&&t.length>0;){if(r.stateNames[t])return!0;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}const X3=5;class Tm{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new gf(e,t);let i=gf.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new gf(e,t),this._entries[i]=n,n)}}Tm._INSTANCE=new Tm(X3);class gf{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return gf._equals(this,e)}push(e){return Tm.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Tm.create(this.parent,e)}}class Up{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Up(this.modeId,this.state)}}class Gl{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(t!==null)return new zp(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new zp(e,t);let i=gf.getStackElementId(e),n=this._entries[i];return n||(n=new zp(e,null),this._entries[i]=n,n)}}Gl._INSTANCE=new Gl(X3);class zp{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:Gl.create(this.stack,this.embeddedModeData)}equals(e){return!(e instanceof zp)||!this.stack.equals(e.stack)?!1:this.embeddedModeData===null&&e.embeddedModeData===null?!0:this.embeddedModeData===null||e.embeddedModeData===null?!1:this.embeddedModeData.equals(e.embeddedModeData)}}class JG{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new $y(e,t,this._language)))}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,a=Qt.get(s);if(!a)return this.enterMode(n,s),this.emit(n,""),o;let l=a.tokenize(e,t,o,n);return this._tokens=this._tokens.concat(l.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,l.endState}finalize(e){return new cD(this._tokens,e)}}class cw{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=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){let n=e!==null?e.length:0,s=t.length,o=i!==null?i.length:0;if(n===0&&s===0&&o===0)return new Uint32Array(0);if(n===0&&s===0)return i;if(s===0&&o===0)return e;let a=new Uint32Array(n+s+o);e!==null&&a.set(e);for(let l=0;l<s;l++)a[n+l]=t[l];return i!==null&&a.set(i,n+s),a}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,a=Qt.get(s);if(!a)return this.enterMode(n,s),this.emit(n,""),o;let l=a.tokenize2(e,t,o,n);return this._prependTokens=cw._merge(this._prependTokens,this._tokens,l.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,l.endState}finalize(e){return new Uy(cw._merge(this._prependTokens,this._tokens,null),e)}}class n0{constructor(e,t,i,n){this._modeService=e,this._standaloneThemeService=t,this._modeId=i,this._lexer=n,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._tokenizationRegistryListener=Qt.onDidChange(o=>{if(s)return;let a=!1;for(let l=0,c=o.changedLanguages.length;l<c;l++){let d=o.changedLanguages[l];if(this._embeddedModes[d]){a=!0;break}}a&&(s=!0,Qt.fire([this._modeId]),s=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const i=Qt.get(t);if(i){if(i instanceof n0){const s=i.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}const n=Qt.getPromise(t);n&&e.push(n)}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=Tm.create(null,this._lexer.start);return Gl.create(e,null)}tokenize(e,t,i,n){let s=new JG,o=this._tokenize(e,t,i,n,s);return s.finalize(o)}tokenize2(e,t,i,n){let s=new cw(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n,s);return s.finalize(o)}_tokenize(e,t,i,n,s){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,s):this._myTokenize(e,t,i,n,s)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Ob(this._lexer,t.stack.state),!i))throw Ot(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!yO(o.action)||o.action.nextEmbedded!=="@pop")continue;s=!0;let a=o.regex,l=o.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let d=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),d)}let c=e.search(a);c===-1||c!==0&&o.matchOnlyAtLineStart||(n===-1||c<n)&&(n=c)}if(!s)throw Ot(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,s){let o=this._findLeavingNestedModeOffset(e,i);if(o===-1){let c=s.nestedModeTokenize(e,t,i.embeddedModeData,n);return Gl.create(i.stack,new Up(i.embeddedModeData.modeId,c))}let a=e.substring(0,o);a.length>0&&s.nestedModeTokenize(a,!1,i.embeddedModeData,n);let l=e.substring(o);return this._myTokenize(l,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterMode(n,this._modeId);const o=e.length,a=t&&this._lexer.includeLF?e+` +`:e,l=a.length;let c=i.embeddedModeData,d=i.stack,u=0,h=null,f=!0;for(;f||u<l;){const g=u,p=d.depth,_=h?h.groups.length:0,v=d.state;let b=null,C=null,y=null,E=null,S=null;if(h){b=h.matches;const D=h.groups.shift();C=D.matched,y=D.action,E=h.rule,h.groups.length===0&&(h=null)}else{if(!f&&u>=l)break;f=!1;let D=this._lexer.tokenizer[v];if(!D&&(D=Ob(this._lexer,v),!D))throw Ot(this._lexer,"tokenizer state is not defined: "+v);let M=a.substr(u);for(const B of D)if((u===0||!B.matchOnlyAtLineStart)&&(b=M.match(B.regex),b)){C=b[0],y=B.action;break}}if(b||(b=[""],C=""),y||(u<l&&(b=[a.charAt(u)],C=b[0]),y=this._lexer.defaultToken),C===null)break;for(u+=C.length;ZG(y)&&yO(y)&&y.test;)y=y.test(C,b,v,u===l);let w=null;if(typeof y=="string"||Array.isArray(y))w=y;else if(y.group)w=y.group;else if(y.token!==null&&y.token!==void 0){if(y.tokenSubst?w=ql(this._lexer,y.token,C,b,v):w=y.token,y.nextEmbedded)if(y.nextEmbedded==="@pop"){if(!c)throw Ot(this._lexer,"cannot pop embedded mode if not inside one");c=null}else{if(c)throw Ot(this._lexer,"cannot enter embedded mode from within an embedded mode");S=ql(this._lexer,y.nextEmbedded,C,b,v)}if(y.goBack&&(u=Math.max(0,u-y.goBack)),y.switchTo&&typeof y.switchTo=="string"){let D=ql(this._lexer,y.switchTo,C,b,v);if(D[0]==="@"&&(D=D.substr(1)),Ob(this._lexer,D))d=d.switchTo(D);else throw Ot(this._lexer,"trying to switch to a state '"+D+"' that is undefined in rule: "+this._safeRuleName(E))}else{if(y.transform&&typeof y.transform=="function")throw Ot(this._lexer,"action.transform not supported");if(y.next)if(y.next==="@push"){if(d.depth>=this._lexer.maxStack)throw Ot(this._lexer,"maximum tokenizer stack size reached: ["+d.state+","+d.parent.state+",...]");d=d.push(v)}else if(y.next==="@pop"){if(d.depth<=1)throw Ot(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(E));d=d.pop()}else if(y.next==="@popall")d=d.popall();else{let D=ql(this._lexer,y.next,C,b,v);if(D[0]==="@"&&(D=D.substr(1)),Ob(this._lexer,D))d=d.push(D);else throw Ot(this._lexer,"trying to set a next state '"+D+"' that is undefined in rule: "+this._safeRuleName(E))}}y.log&&typeof y.log=="string"&&XG(this._lexer,this._lexer.languageId+": "+ql(this._lexer,y.log,C,b,v))}if(w===null)throw Ot(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(E));const x=D=>{let M=this._modeService.getModeIdForLanguageName(D);M&&(D=M);const B=this._getNestedEmbeddedModeData(D);if(u<l){const z=e.substr(u);return this._nestedTokenize(z,t,Gl.create(d,B),n+u,s)}else return Gl.create(d,B)};if(Array.isArray(w)){if(h&&h.groups.length>0)throw Ot(this._lexer,"groups cannot be nested: "+this._safeRuleName(E));if(b.length!==w.length+1)throw Ot(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(E));let D=0;for(let M=1;M<b.length;M++)D+=b[M].length;if(D!==C.length)throw Ot(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(E));h={rule:E,matches:b,groups:[]};for(let M=0;M<w.length;M++)h.groups[M]={action:w[M],matched:b[M+1]};u-=C.length;continue}else{if(w==="@rematch"&&(u-=C.length,C="",b=null,w="",S!==null))return x(S);if(C.length===0){if(l===0||p!==d.depth||v!==d.state||(h?h.groups.length:0)!==_)continue;throw Ot(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(E))}let D=null;if(Z3(w)&&w.indexOf("@brackets")===0){let M=w.substr(9),B=eK(this._lexer,C);if(!B)throw Ot(this._lexer,"@brackets token returned but no bracket defined as: "+C);D=SO(B.token+M)}else{let M=w===""?"":w+this._lexer.tokenPostfix;D=SO(M)}g<o&&s.emit(g+n,D)}if(S!==null)return x(S)}return Gl.create(d,c)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let i=Qt.get(t);if(i)return new Up(t,i.getInitialState())}return new Up(t||RD,G_)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;let t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function eK(r,e){if(!e)return null;e=oc(r,e);let t=r.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}function tK(r,e,t,i){return new n0(r,e,t,i)}var y1;const S1=(y1=window.trustedTypes)===null||y1===void 0?void 0:y1.createPolicy("standaloneColorizer",{createHTML:r=>r});class zD{static colorizeElement(e,t,i,n){n=n||{};let s=n.theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();e.setTheme(s);let a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;let l=c=>{var d;const u=(d=S1==null?void 0:S1.createHTML(c))!==null&&d!==void 0?d:c;i.innerHTML=u};return this.colorize(t,a||"",o,n).then(l,c=>console.error(c))}static colorize(e,t,i,n){let s=4;n&&typeof n.tabSize=="number"&&(s=n.tabSize),SD(t)&&(t=t.substr(1));let o=aa(t),a=e.getModeId(i);if(!a)return Promise.resolve(xO(o,s));e.triggerMode(a);const l=Qt.get(a);if(l)return x1(o,s,l);const c=Qt.getPromise(a);return c?new Promise((d,u)=>{c.then(h=>{x1(o,s,h).then(d,u)},u)}):new Promise((d,u)=>{let h=null,f=null;const g=()=>{h&&(h.dispose(),h=null),f&&(f.dispose(),f=null);const p=Qt.get(a);if(p){x1(o,s,p).then(d,u);return}d(xO(o,s))};f=new rr,f.cancelAndSet(g,500),h=Qt.onDidChange(p=>{p.changedLanguages.indexOf(a)>=0&&g()})})}static colorizeLine(e,t,i,n,s=4){const o=Br.isBasicASCII(e,t),a=Br.containsRTL(e,o,i);return i0(new Mu(!1,!0,e,!1,o,a,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function x1(r,e,t){return new Promise((i,n)=>{const s=()=>{const o=iK(r,e,t);if(t instanceof n0){const a=t.getLoadStatus();if(a.loaded===!1){a.promise.then(s,n);return}}i(o)};s()})}function xO(r,e){let t=[];const n=new Uint32Array(2);n[0]=0,n[1]=16793600;for(let s=0,o=r.length;s<o;s++){let a=r[s];n[0]=a.length;const l=new Gi(n,a),c=Br.isBasicASCII(a,!0),d=Br.containsRTL(a,c,!0);let u=i0(new Mu(!1,!0,a,!1,c,d,0,l,[],e,0,0,0,0,-1,"none",!1,!1,null));t=t.concat(u.html),t.push("<br/>")}return t.join("")}function iK(r,e,t){let i=[],n=t.getInitialState();for(let s=0,o=r.length;s<o;s++){let a=r[s],l=t.tokenize2(a,!0,n,0);Gi.convertToEndOffset(l.tokens,a.length);let c=new Gi(l.tokens,a);const d=Br.isBasicASCII(a,!0),u=Br.containsRTL(a,d,!0);let h=i0(new Mu(!1,!0,a,!1,d,u,0,c.inflate(),[],e,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(h.html),i.push("<br/>"),n=l.endState}return i.join("")}var Im;(function(r){r[r.Ignore=0]="Ignore",r[r.Info=1]="Info",r[r.Warning=2]="Warning",r[r.Error=3]="Error"})(Im||(Im={}));(function(r){const e="error",t="warning",i="warn",n="info",s="ignore";function o(l){return l?Cp(e,l)?r.Error:Cp(t,l)||Cp(i,l)?r.Warning:Cp(n,l)?r.Info:r.Ignore:r.Ignore}r.fromValue=o;function a(l){switch(l){case r.Error:return e;case r.Warning:return t;case r.Info:return n;default:return s}}r.toString=a})(Im||(Im={}));var ri=Im;function la(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===q_.ICodeEditor:!1}function Q3(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===q_.IDiffEditor:!1}function J3(r){return la(r)?r:Q3(r)?r.getModifiedEditor():null}const jD=bt("IWorkspaceEditService");function nK(r){return er(r)&&(Boolean(r.newUri)||Boolean(r.oldUri))}function rK(r){return er(r)&&De.isUri(r.resource)&&er(r.edit)}class r0{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(rK(t))return new eW(t.resource,t.edit,t.modelVersionId,t.metadata);if(nK(t))return new sK(t.oldUri,t.newUri,t.options,t.metadata);throw new Error("Unsupported edit")})}}class eW extends r0{constructor(e,t,i,n){super(n);this.resource=e,this.textEdit=t,this.versionId=i}}class sK extends r0{constructor(e,t,i,n){super(n);this.oldResource=e,this.newResource=t,this.options=i}}class oK{constructor(){this.data=new Map}add(e,t){jv(Os(e)),jv(er(t)),jv(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const _i=new oK,s0={JSONContribution:"base.contributions.json"};function aK(r){return r.length>0&&r.charAt(r.length-1)==="#"?r.substring(0,r.length-1):r}class lK{constructor(){this._onDidChangeSchema=new H,this.schemasById={}}registerSchema(e,t){this.schemasById[aK(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const cK=new lK;_i.add(s0.JSONContribution,cK);const Pu={Configuration:"base.contributions.configuration"},EO={properties:{},patternProperties:{}},kO={properties:{},patternProperties:{}},LO={properties:{},patternProperties:{}},TO={properties:{},patternProperties:{}},IO={properties:{},patternProperties:{}},E1={properties:{},patternProperties:{}},k1="vscode://schemas/settings/resourceLanguage",DO=_i.as(s0.JSONContribution);class dK{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new H,this._onDidUpdateConfiguration=new H,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:m("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},DO.registerSchema(k1,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);DO.registerSchema(k1,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach(n=>{i.push(...this.validateAndRegisterProperties(n,t,n.extensionInfo)),this.configurationContributors.push(n),this.registerJSONConfiguration(n)}),i}validateAndRegisterProperties(e,t=!0,i,n=3){var s;n=qr(e.scope)?n:e.scope;let o=[],a=e.properties;if(a)for(let c in a){if(t&&gK(c)){delete a[c];continue}const d=a[c];if(this.updatePropertyDefaultValue(c,d),qD.test(c)?d.scope=void 0:(d.scope=qr(d.scope)?n:d.scope,d.restricted=qr(d.restricted)?!!(!((s=i==null?void 0:i.restrictedConfigurations)===null||s===void 0)&&s.includes(c)):d.restricted),a[c].hasOwnProperty("included")&&!a[c].included){this.excludedConfigurationProperties[c]=a[c],delete a[c];continue}else this.configurationProperties[c]=a[c];!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),o.push(c)}let l=e.allOf;if(l)for(let c of l)o.push(...this.validateAndRegisterProperties(c,t,i,n));return o}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=i=>{let n=i.properties;if(n)for(const o in n)this.updateSchema(o,n[o]);let s=i.allOf;s&&s.forEach(t)};t(e)}updateSchema(e,t){switch(EO.properties[e]=t,t.scope){case 1:kO.properties[e]=t;break;case 2:LO.properties[e]=t;break;case 6:TO.properties[e]=t;break;case 3:IO.properties[e]=t;break;case 4:E1.properties[e]=t;break;case 5:E1.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:m("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:m("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:k1};this.updatePropertyDefaultValue(t,i),EO.properties[t]=i,kO.properties[t]=i,LO.properties[t]=i,TO.properties[t]=i,IO.properties[t]=i,E1.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];Pn(i)&&(i=t.default),Pn(i)&&(i=fK(t.type)),t.default=i}}const uK="\\[.*\\]$",qD=new RegExp(uK);function hK(r){return r.substring(1,r.length-1)}function fK(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const tW=new dK;_i.add(Pu.Configuration,tW);function gK(r){return r.trim()?qD.test(r)?m("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",r):tW.getConfigurationProperties()[r]!==void 0?m("config.property.duplicate","Cannot register '{0}'. This property is already registered.",r):null:m("config.property.empty","Cannot register an empty property")}const pK=Object.prototype.hasOwnProperty;function mK(r,e){for(let t in r)if(pK.call(r,t)&&e({key:t,value:r[t]},function(){delete r[t]})===!1)return}class _K{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),i.size===0&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);!i||i.forEach(t)}}const dw=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new H,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(r){this._tabFocus!==r&&(this._tabFocus=r,this._onDidChangeTabFocus.fire(this._tabFocus))}},iW=Object.hasOwnProperty;class bK{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class vK{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Fa{static readOptions(e){const t=e,i=new vK;for(const n of zh){const s=n.name==="_never_"?void 0:t[n.name];i._write(n.id,s)}return i}static validateOptions(e){const t=new NU;for(const i of zh)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new bK;for(const n of zh)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object")return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Ls(e,t):!1;for(let i in e)if(!Fa._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of zh){const o=!Fa._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new FB(i):null}}function CK(r){const e=r.wordWrap;e===!0?r.wordWrap="on":e===!1&&(r.wordWrap="off");const t=r.lineNumbers;t===!0?r.lineNumbers="on":t===!1&&(r.lineNumbers="off"),r.autoClosingBrackets===!1&&(r.autoClosingBrackets="never",r.autoClosingQuotes="never",r.autoSurround="never"),r.cursorBlinking==="visible"&&(r.cursorBlinking="solid");const s=r.renderWhitespace;s===!0?r.renderWhitespace="boundary":s===!1&&(r.renderWhitespace="none");const o=r.renderLineHighlight;o===!0?r.renderLineHighlight="line":o===!1&&(r.renderLineHighlight="none");const a=r.acceptSuggestionOnEnter;a===!0?r.acceptSuggestionOnEnter="on":a===!1&&(r.acceptSuggestionOnEnter="off");const l=r.tabCompletion;l===!1?r.tabCompletion="off":l===!0&&(r.tabCompletion="onlySnippets");const c=r.suggest;if(c&&typeof c.filteredTypes=="object"&&c.filteredTypes){const _={};_.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",mK(_,v=>{const b=c.filteredTypes[v.key];b===!1&&(c[v.value]=b)})}const d=r.hover;d===!0?r.hover={enabled:!0}:d===!1&&(r.hover={enabled:!1});const u=r.parameterHints;u===!0?r.parameterHints={enabled:!0}:u===!1&&(r.parameterHints={enabled:!1});const h=r.autoIndent;h===!0?r.autoIndent="full":h===!1&&(r.autoIndent="advanced");const f=r.matchBrackets;f===!0?r.matchBrackets="always":f===!1&&(r.matchBrackets="never");const{renderIndentGuides:g,highlightActiveIndentGuide:p}=r;r.guides||(r.guides={}),g!==void 0&&(r.guides.indentation=!!g),p!==void 0&&(r.guides.highlightActiveIndentation=!!p)}function AO(r){const e=jl(r);return CK(e),e}class uw extends Z{constructor(e,t){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new H),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new BB,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=AO(t),this._readOptions=Fa.readOptions(this._rawOptions),this._validatedOptions=Fa.validateOptions(this._readOptions),this._register(ul.onDidChangeZoomLevel(i=>this._recomputeOptions())),this._register(dw.onDidChangeTabFocus(i=>this._recomputeOptions()))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(!e)this.options=t;else{const i=Fa.checkEquals(e,t);if(i===null)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=Pd.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:dw.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Fa.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(iW.call(t,i)){const n=t[i],s=e[i];if(s===n)continue;if(Array.isArray(s)&&Array.isArray(n)){if(!Ls(s,n))return!1;continue}if(s&&typeof s=="object"&&n&&typeof n=="object"){if(!this._subsetEquals(s,n))return!1;continue}return!1}return!0}updateOptions(e){if(typeof e=="undefined")return;const t=AO(e);uw._subsetEquals(this._rawOptions,t)||(this._rawOptions=_o(this._rawOptions,t||{}),this._readOptions=Fa.readOptions(this._rawOptions),this._validatedOptions=Fa.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=uw._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const wK=Object.freeze({id:"editor",order:5,type:"object",title:m("editorConfigurationTitle","Editor"),scope:5}),yK=_i.as(Pu.Configuration),hw=Object.assign(Object.assign({},wK),{properties:{"editor.tabSize":{type:"number",default:xn.tabSize,minimum:1,markdownDescription:m("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:xn.insertSpaces,markdownDescription:m("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:xn.detectIndentation,markdownDescription:m("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:xn.trimAutoWhitespace,description:m("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:xn.largeFileOptimizations,description:m("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:m("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[m("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),m("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),m("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:m("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[m("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),m("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),m("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:m("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:m("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:m("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:m("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:m("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:m("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:m("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:m("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:m("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function SK(r){return typeof r.type!="undefined"||typeof r.anyOf!="undefined"}for(const r of zh){const e=r.schema;if(typeof e!="undefined")if(SK(e))hw.properties[`editor.${r.name}`]=e;else for(let t in e)iW.call(e,t)&&(hw.properties[t]=e[t])}let Mb=null;function nW(){return Mb===null&&(Mb=Object.create(null),Object.keys(hw.properties).forEach(r=>{Mb[r]=!0})),Mb}function xK(r){return nW()[`editor.${r}`]||!1}function EK(r){return nW()[`diffEditor.${r}`]||!1}yK.registerConfiguration(hw);class ai{static insert(e,t){return{range:new k(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}}}const di=bt("configurationService");function rW(r,e){const t=Object.create(null);for(let i in r)GD(t,i,r[i],e);return t}function GD(r,e,t,i){const n=e.split("."),s=n.pop();let o=r;for(let a=0;a<n.length;a++){let l=n[a],c=o[l];switch(typeof c){case"undefined":c=o[l]=Object.create(null);break;case"object":break;default:i(`Ignoring ${e} as ${n.slice(0,a+1).join(".")} is ${JSON.stringify(c)}`);return}o=c}if(typeof o=="object"&&o!==null)try{o[s]=t}catch{i(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`)}else i(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`)}function kK(r,e){const t=e.split(".");sW(r,t)}function sW(r,e){const t=e.shift();if(e.length===0){delete r[t];return}if(Object.keys(r).indexOf(t)!==-1){const i=r[t];typeof i=="object"&&!Array.isArray(i)&&(sW(i,e),Object.keys(i).length===0&&delete r[t])}}function LK(r,e,t){function i(o,a){let l=o;for(const c of a){if(typeof l!="object"||l===null)return;l=l[c]}return l}const n=e.split("."),s=i(r,n);return typeof s=="undefined"?t:s}function TK(){const r=_i.as(Pu.Configuration).getConfigurationProperties();return Object.keys(r)}function IK(){const r=Object.create(null),e=_i.as(Pu.Configuration).getConfigurationProperties();for(let t in e){let i=e[t].default;GD(r,t,i,n=>console.error(`Conflict in default settings: ${n}`))}return r}class zr{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?LK(this.contents,e):this.contents}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=jl(this.contents),i=jl(this.overrides),n=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const o of s.overrides){const[a]=i.filter(l=>Ls(l.identifiers,o.identifiers));a?this.mergeContents(a.contents,o.contents):i.push(jl(o))}for(const o of s.keys)n.indexOf(o)===-1&&n.push(o)}return new zr(t,n,i)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let i={};for(const n of j3([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n],o=t[n];o&&(typeof s=="object"&&typeof o=="object"?(s=jl(s),this.mergeContents(s,o)):s=o),i[n]=s}return new zr(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&er(e[i])&&er(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=jl(t[i])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?iq(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(t.identifiers.indexOf(e)!==-1)return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),GD(this.contents,e,t,i=>{throw new Error(i)})}removeValue(e){this.removeKey(e)&&kK(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)e.indexOf(this.keys[i])===0&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return t!==-1?(this.keys.splice(t,1),!0):!1}}class DK extends zr{constructor(){const e=IK(),t=TK(),i=[];for(const n of Object.keys(e))qD.test(n)&&i.push({identifiers:[hK(n).trim()],keys:Object.keys(e[n]),contents:rW(e[n],s=>console.error(`Conflict in default settings file: ${s}`))});super(e,t,i)}}class o0{constructor(e,t,i=new zr,n=new zr,s=new Mn,o=new zr,a=new Mn,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Mn,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new zr,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}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.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),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._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.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.user),n=this.parseConfigurationModel(e.workspace),s=e.folders.reduce((o,a)=>(o.set(De.revive(a[0]),this.parseConfigurationModel(a[1])),o),new Mn);return new o0(t,i,new zr,n,s,new zr,new Mn,!1)}static parseConfigurationModel(e){return new zr(e.contents,e.keys,e.overrides).freeze()}}class AK{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(a=>s.add(a)),e.overrides.forEach(([,a])=>a.forEach(l=>s.add(l))),this.affectedKeys=[...s.values()];const o=new zr;this.affectedKeys.forEach(a=>o.setValue(a,{})),this.affectedKeysTree=o.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=o0.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!ro(n,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i=rW({[t]:!0},()=>{}),n;for(;typeof i=="object"&&(n=Object.keys(i)[0]);){if(e=e[n],!e)return!1;i=i[n]}return!0}}const NK=/^(cursor|delete)/;class RK extends Z{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 H),this._currentChord=null,this._currentChordChecker=new j_,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=Kh.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new rr,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ke.None}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){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return null;const s=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,o,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(m("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=Kh.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=Kh.EMPTY,this._currentSingleModifier===null?(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.getParts();return this._ignoreSingleModifiers=new Kh(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,o=null;if(i){const[d]=e.getSingleModifierDispatchParts();s=d,o=d}else[s]=e.getDispatchParts(),o=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,o,s);return this._logService.trace("KeybindingService#dispatch",l,c==null?void 0:c.commandId),c&&c.enterChord?(n=!0,this._enterChordMode(s,l),n):(this._currentChord&&(!c||!c.commandId)&&(this._notificationService.status(m("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(n=!0),typeof c.commandArgs=="undefined"?this._commandService.executeCommand(c.commandId).then(void 0,d=>this._notificationService.warn(d)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,d=>this._notificationService.warn(d)),NK.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class Kh{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}Kh.EMPTY=new Kh(null);let a0=TU||"";const vn=new Map;vn.set("false",!1);vn.set("true",!0);vn.set("isMac",tt);vn.set("isLinux",ir);vn.set("isWindows",an);vn.set("isWeb",_g);vn.set("isMacNative",tt&&!_g);vn.set("isEdge",a0.indexOf("Edg/")>=0);vn.set("isFirefox",a0.indexOf("Firefox")>=0);vn.set("isChrome",a0.indexOf("Chrome")>=0);vn.set("isSafari",a0.indexOf("Safari")>=0);const OK=Object.prototype.hasOwnProperty;class me{static has(e){return vc.create(e)}static equals(e,t){return Wf.create(e,t)}static regex(e,t){return fw.create(e,t)}static not(e){return iu.create(e)}static and(...e){return Xl.create(e,null)}static or(...e){return Xa.create(e,null,!0)}static deserialize(e,t=!1){if(!!e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return Xa.create(i.map(n=>this._deserializeAndExpression(n,t)),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return Xl.create(i.map(n=>this._deserializeOne(n,t)),null)}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let i=e.split("!=");return l0.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return Wf.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return fw.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let i=e.split(" in ");return KD.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const i=e.split(">=");return d0.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const i=e.split(">");return c0.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const i=e.split("<=");return h0.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const i=e.split("<");return u0.create(i[0].trim(),i[1].trim())}return/^\!\s*/.test(e)?iu.create(e.substr(1).trim()):vc.create(e)}static _deserializeValue(e,t){if(e=e.trim(),e==="true")return!0;if(e==="false")return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(u3(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let s=e.slice(i+1,n),o=e[n+1]==="i"?"i":"";try{return new RegExp(s,o)}catch(a){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${a}`);return console.warn(`bad regexp-value '${e}', parse error: ${a}`),null}}}function MK(r,e){const t=r?r.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function pf(r,e){return r.cmp(e)}class rs{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 ss.INSTANCE}}rs.INSTANCE=new rs;class ss{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 rs.INSTANCE}}ss.INSTANCE=new ss;class vc{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=vn.get(e);return typeof i=="boolean"?i?ss.INSTANCE:rs.INSTANCE:new vc(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:aW(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=vn.get(this.key);return typeof e=="boolean"?e?ss.INSTANCE:rs.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=iu.create(this.key,this)),this.negated}}class Wf{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if(typeof t=="boolean")return t?vc.create(e,i):iu.create(e,i);const n=vn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?ss.INSTANCE:rs.INSTANCE:new Wf(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=vn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?ss.INSTANCE:rs.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=l0.create(this.key,this.value,this)),this.negated}}class KD{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new KD(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:typeof i=="string"&&typeof t=="object"&&t!==null?OK.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=YD.create(this)),this.negated}}class YD{constructor(e){this._actual=e,this.type=11}static create(e){return new YD(e)}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):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class l0{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if(typeof t=="boolean")return t?iu.create(e,i):vc.create(e,i);const n=vn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?rs.INSTANCE:ss.INSTANCE:new l0(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=vn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?rs.INSTANCE:ss.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=Wf.create(this.key,this.value,this)),this.negated}}class iu{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=vn.get(e);return typeof i=="boolean"?i?rs.INSTANCE:ss.INSTANCE:new iu(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:aW(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=vn.get(this.key);return typeof e=="boolean"?e?rs.INSTANCE:ss.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=vc.create(this.key,this)),this.negated}}class c0{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return new c0(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h0.create(this.key,this.value,this)),this.negated}}class d0{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return new d0(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=u0.create(this.key,this.value,this)),this.negated}}class u0{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return new u0(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<parseFloat(this.value)}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d0.create(this.key,this.value,this)),this.negated}}class h0{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}static create(e,t,i=null){return new h0(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Fu(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<=parseFloat(this.value)}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=c0.create(this.key,this.value,this)),this.negated}}class fw{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new fw(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?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){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ZD.create(this)),this.negated}}class ZD{constructor(e){this._actual=e,this.type=8}static create(e){return new ZD(e)}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):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function oW(r){let e=null;for(let t=0,i=r.length;t<i;t++){const n=r[t].substituteConstants();if(r[t]!==n&&e===null){e=[];for(let s=0;s<t;s++)e[s]=r[s]}e!==null&&(e[t]=n)}return e===null?r:e}class Xl{constructor(e,t){this.expr=e,this.negated=t,this.type=6}static create(e,t){return Xl._normalizeArr(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const n=pf(this.expr[t],e.expr[t]);if(n!==0)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=oW(this.expr);return e===this.expr?this:Xl.create(e,this.negated)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t){const i=[];let n=!1;for(const s of e)if(!!s){if(s.type===1){n=!0;continue}if(s.type===0)return rs.INSTANCE;if(s.type===6){i.push(...s.expr);continue}i.push(s)}if(i.length===0&&n)return ss.INSTANCE;if(i.length!==0){if(i.length===1)return i[0];i.sort(pf);for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];for(;i.length>1;){const s=i[i.length-1];if(s.type!==9)break;i.pop();const o=i.pop(),a=i.length===0,l=Xa.create(s.expr.map(c=>Xl.create([c,o],null)),null,a);l&&(i.push(l),i.sort(pf))}return i.length===1?i[0]:new Xl(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=Xa.create(e,this,!0)}return this.negated}}class Xa{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return Xa._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const n=pf(this.expr[t],e.expr[t]);if(n!==0)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=oW(this.expr);return e===this.expr?this:Xa.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],s=!1;if(e){for(let o=0,a=e.length;o<a;o++){const l=e[o];if(!!l){if(l.type===0){s=!0;continue}if(l.type===1)return ss.INSTANCE;if(l.type===9){n=n.concat(l.expr);continue}n.push(l)}}if(n.length===0&&s)return rs.INSTANCE;n.sort(pf)}if(n.length!==0){if(n.length===1)return n[0];for(let o=1;o<n.length;o++)n[o-1].equals(n[o])&&(n.splice(o,1),o--);if(n.length===1)return n[0];if(i){for(let o=0;o<n.length;o++)for(let a=o+1;a<n.length;a++)lW(n[o],n[a])&&(n.splice(a,1),a--);if(n.length===1)return n[0]}return new Xa(n,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const o of gw(t))for(const a of gw(i))n.push(Xl.create([o,a],null));const s=e.length===0;e.unshift(Xa.create(n,null,s))}this.negated=e[0]}return this.negated}}class xe extends vc{constructor(e,t,i){super(e,null);this._defaultValue=t,typeof i=="object"?xe._info.push(Object.assign(Object.assign({},i),{key:e})):i!==!0&&xe._info.push({key:e,description:i,type:t!=null?typeof t:void 0})}static all(){return xe._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return Wf.create(this.key,e)}}xe._info=[];const Be=bt("contextKeyService"),PK="setContext";function aW(r,e){return r<e?-1:r>e?1:0}function Fu(r,e,t,i){return r<t?-1:r>t?1:e<i?-1:e>i?1:0}function lW(r,e){if(e.type===6&&r.type!==9&&r.type!==6){for(const n of e.expr)if(r.equals(n))return!0}const t=r.negate(),i=gw(t).concat(gw(e));i.sort(pf);for(let n=0;n<i.length;n++){const o=i[n].negate();for(let a=n+1;a<i.length;a++){const l=i[a];if(o.equals(l))return!0}}return!1}function gw(r){return r.type===9?r.expr:[r]}class mf{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let n=0,s=e.length;n<s;n++){const o=e[n].command;o&&this._defaultBoundCommands.set(o,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=mf.combine(e,t);for(let n=0,s=this._keybindings.length;n<s;n++){let o=this._keybindings[n];o.keypressParts.length!==0&&(o.when&&o.when.type===0||this._addKeyPress(o.keypressParts[0],o))}}static _isTargetedForRemoval(e,t,i,n,s){return!(e.command!==n||t&&e.keypressParts[0]!==t||i&&e.keypressParts[1]!==i||s&&(!e.when||!MK(s,e.when)))}static combine(e,t){e=e.slice(0);let i=[];for(const n of t){if(!n.command||n.command.length===0||n.command.charAt(0)!=="-"){i.push(n);continue}const s=n.command.substr(1),o=n.keypressParts[0],a=n.keypressParts[1],l=n.when;for(let c=e.length-1;c>=0;c--)this._isTargetedForRemoval(e[c],o,a,s,l)&&e.splice(c,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(typeof i=="undefined"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){let s=i[n];if(s.command===t.command)continue;const o=s.keypressParts.length>1,a=t.keypressParts.length>1;o&&a&&s.keypressParts[1]!==t.keypressParts[1]||mf.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t=="undefined"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(typeof t!="undefined"){for(let i=0,n=t.length;i<n;i++)if(t[i]===e){t.splice(i,1);return}}}static whenIsEntirelyIncluded(e,t){return!t||t.type===1?!0:!e||e.type===1?!1:lW(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(typeof i=="undefined"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(t!==null){const o=this._map.get(t);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;n=[];for(let a=0,l=o.length;a<l;a++){let c=o[a];c.keypressParts[1]===i&&n.push(c)}}else{const o=this._map.get(i);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;n=o}let s=this._findCommand(e,n);return s?t===null&&s.keypressParts.length>1&&s.keypressParts[1]!==null?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${NO(s.when)}, source: ${RO(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${s.command}, when: ${NO(s.when)}, source: ${RO(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(!!mf.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function NO(r){return r?`${r.serialize()}`:"no when condition"}function RO(r){return r.extensionId?r.isBuiltinExtension?`built-in extension ${r.extensionId}`:`user extension ${r.extensionId}`:r.isDefault?"built-in":"user"}class pw{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(Cs===1){if(e&&e.win)return e.win}else if(Cs===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=pw.bindToCurrentPlatform(e);if(t&&t.primary){const i=VE(t.primary,Cs);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i<n;i++){const s=t.secondary[i],o=VE(s,Cs);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),lt.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||e>=31&&e<=56?!0:e===80||e===81||e===82||e===83||e===84||e===85||e===86||e===110||e===111||e===87||e===88||e===89||e===90||e===91||e===92}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&pw._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,s,o){Cs===1&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:o,weight1:n,weight2:s,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(BK)),this._cachedMergedKeybindings.slice(0)}}const zn=new pw,FK={EditorModes:"platform.keybindingsRegistry"};_i.add(FK.EditorModes,zn);function BK(r,e){return r.weight1!==e.weight1?r.weight1-e.weight1:r.command<e.command?-1:r.command>e.command?1:r.weight2-e.weight2}class OO{constructor(e,t,i,n,s,o,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?MO(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=MO(e.getSingleModifierDispatchParts())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=a}}function MO(r){let e=[];for(let t=0,i=r.length;t<i;t++){const n=r[t];if(!n)return e;e.push(n)}return e}class XD{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(t.length===0)return null;const n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=i(a);if(l===null)return null;n[s]=HK(a,l,this.modifierLabels[e])}return n.join(" ")}}const QD=new XD({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),WK=new XD({ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),VK=new XD({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function HK(r,e,t){if(e===null)return"";const i=[];return r.ctrlKey&&i.push(t.ctrlKey),r.shiftKey&&i.push(t.shiftKey),r.altKey&&i.push(t.altKey),r.metaKey&&i.push(t.metaKey),e!==""&&i.push(e),i.join(t.separator)}class $K extends yz{constructor(e,t){super();if(t.length===0)throw Or("parts");this._os=e,this._parts=t}getLabel(){return QD.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return WK.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1?null:VK.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new wz(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class mw extends $K{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return xd.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":xd.toString(e.keyCode)}_keyCodeToElectronAccelerator(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return xd.toString(e)}_getElectronAccelerator(e){return e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode)}_getDispatchPart(e){return mw.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+=xd.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}}const ki=bt("notificationService");class UK{}const cW=bt("contextService");class zK{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}}}var Ci;(function(r){r.noSelection=m("noSelection","No selection"),r.singleSelectionRange=m("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),r.singleSelection=m("singleSelection","Line {0}, Column {1}"),r.multiSelectionRange=m("multiSelectionRange","{0} selections ({1} characters selected)"),r.multiSelection=m("multiSelection","{0} selections"),r.emergencyConfOn=m("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),r.openingDocs=m("openingDocs","Now opening the Editor Accessibility documentation page."),r.readonlyDiffEditor=m("readonlyDiffEditor"," in a read-only pane of a diff editor."),r.editableDiffEditor=m("editableDiffEditor"," in a pane of a diff editor."),r.readonlyEditor=m("readonlyEditor"," in a read-only code editor"),r.editableEditor=m("editableEditor"," in a code editor"),r.changeConfigToOnMac=m("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),r.changeConfigToOnWinLinux=m("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),r.auto_on=m("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),r.auto_off=m("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r.tabFocusModeOnMsg=m("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),r.tabFocusModeOnMsgNoKb=m("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),r.tabFocusModeOffMsg=m("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),r.tabFocusModeOffMsgNoKb=m("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),r.openDocMac=m("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),r.openDocWinLinux=m("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),r.outroMsg=m("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),r.showAccessibilityHelpAction=m("showAccessibilityHelpAction","Show Accessibility Help")})(Ci||(Ci={}));var Qk;(function(r){r.inspectTokensAction=m("inspectTokens","Developer: Inspect Tokens")})(Qk||(Qk={}));var _w;(function(r){r.gotoLineActionLabel=m("gotoLineActionLabel","Go to Line/Column...")})(_w||(_w={}));var Jk;(function(r){r.helpQuickAccessActionLabel=m("helpQuickAccess","Show all Quick Access Providers")})(Jk||(Jk={}));var bw;(function(r){r.quickCommandActionLabel=m("quickCommandActionLabel","Command Palette"),r.quickCommandHelp=m("quickCommandActionHelp","Show And Run Commands")})(bw||(bw={}));var Dm;(function(r){r.quickOutlineActionLabel=m("quickOutlineActionLabel","Go to Symbol..."),r.quickOutlineByCategoryActionLabel=m("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Dm||(Dm={}));var vw;(function(r){r.editorViewAccessibleLabel=m("editorViewAccessibleLabel","Editor content"),r.accessibilityHelpMessage=m("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(vw||(vw={}));var eL;(function(r){r.toggleHighContrast=m("toggleHighContrast","Toggle High Contrast Theme")})(eL||(eL={}));var tL;(function(r){r.bulkEditServiceSummary=m("bulkEditServiceSummary","Made {0} edits in {1} files")})(tL||(tL={}));var dW=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uW=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},hW=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class jK{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new H}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}function qK(r,e,t){return la(r)?e(r):t(r)}let iL=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;return this.editor&&(t=qK(this.editor,i=>this.findModel(i,e),i=>this.findModel(i.getOriginalEditor(),e)||this.findModel(i.getModifiedEditor(),e))),t?Promise.resolve(new bz(new jK(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};iL=dW([uW(0,mi)],iL);class f0{show(){return f0.NULL_PROGRESS_RUNNER}showWhile(e,t){return hW(this,void 0,void 0,function*(){yield e})}}f0.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class GK{confirm(e){return this.doConfirm(e).then(t=>({confirmed:t,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+` + +`+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class g0{info(e){return this.notify({severity:ri.Info,message:e})}warn(e){return this.notify({severity:ri.Warning,message:e})}error(e){return this.notify({severity:ri.Error,message:e})}notify(e){switch(e.severity){case ri.Error:console.error(e.message);break;case ri.Warning:console.warn(e.message);break;default:console.log(e.message);break}return g0.NO_OP}status(e,t){return Z.None}}g0.NO_OP=new UK;class KK{constructor(e){this._onWillExecuteCommand=new H,this._onDidExecuteCommand=new H,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=lt.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)}}}class fW extends RK{constructor(e,t,i,n,s,o){super(e,t,i,n,s);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(J(o,Te.KEY_DOWN,a=>{const l=new ei(a);this._dispatch(l,l.target)&&(l.preventDefault(),l.stopPropagation())})),this._register(J(window,Te.KEY_UP,a=>{const l=new ei(a);this._singleModifierDispatch(l,l.target)&&l.preventDefault()}))}addDynamicKeybinding(e,t,i,n){const s=VE(t,Cs),o=new ue;return s&&(this._dynamicKeybindings.push({keybinding:s,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),o.add(Xe(()=>{for(let a=0;a<this._dynamicKeybindings.length;a++)if(this._dynamicKeybindings[a].command===e){this._dynamicKeybindings.splice(a,1),this.updateResolver({source:1});return}}))),o.add(lt.registerCommand(e,i)),this.updateResolver({source:1}),o}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(zn.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new mf(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const s of e){const o=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new OO(void 0,s.command,s.commandArgs,o,t,null,!1);else{const l=this.resolveKeybinding(a);for(const c of l)i[n++]=new OO(c,s.command,s.commandArgs,o,t,null,!1)}}return i}resolveKeybinding(e){return[new mw(e,Cs)]}resolveKeyboardEvent(e){let t=new _m(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new mw(t,Cs)}}function PO(r){return r&&typeof r=="object"&&(!r.overrideIdentifier||typeof r.overrideIdentifier=="string")&&(!r.resource||r.resource instanceof De)}class gW{constructor(){this._onDidChangeConfiguration=new H,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new o0(new DK,new zr)}getValue(e,t){const i=typeof e=="string"?e:void 0,n=PO(e)?e:PO(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const n of e){const[s,o]=n;this.getValue(s)!==o&&(this._configuration.updateValue(s,o),i.push(s))}if(i.length>0){const n=new AK({keys:i,overrides:[]},t,this._configuration);n.source=7,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}}class YK{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new H,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(i,n)=>t.affectsConfiguration(n)})})}getValue(e,t,i){const s=(U.isIPosition(t)?t:null)?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0;return typeof s=="undefined"?this.configurationService.getValue():this.configurationService.getValue(s)}}let nL=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:ir||tt?` +`:`\r +`}};nL=dW([uW(0,di)],nL);class ZK{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class p0{constructor(){const e=De.from({scheme:p0.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new zK({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}p0.SCHEME="inmemory";function Cw(r,e,t){if(!e||!(r instanceof gW))return;let i=[];Object.keys(e).forEach(n=>{xK(n)&&i.push([`editor.${n}`,e[n]]),t&&EK(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&r.updateValues(i)}class XK{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return hW(this,void 0,void 0,function*(){const i=new Map;for(let o of e){if(!(o instanceof eW))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(o.resource);if(!a)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&a.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(ai.replaceMove(k.lift(o.textEdit.range),o.textEdit.text))}let n=0,s=0;for(const[o,a]of i)o.pushStackElement(),o.pushEditOperations([],a,()=>[]),o.pushStackElement(),s+=1,n+=a.length;return{ariaSummary:bn(tL.bulkEditServiceSummary,n,s)}})}}class QK{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}}class JK{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=ke.None}get dimension(){return this._dimension||(this._dimension=jy(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}}const FO=2e4;let hd,Yv,rL,Zv,sL;function eY(r){hd=document.createElement("div"),hd.className="monaco-aria-container";const e=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),hd.appendChild(i),i};Yv=e(),rL=e();const t=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("role","complementary"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),hd.appendChild(i),i};Zv=t(),sL=t(),r.appendChild(hd)}function sn(r){!hd||(Yv.textContent!==r?(Ki(rL),yw(Yv,r)):(Ki(Yv),yw(rL,r)))}function ww(r){!hd||(tt?sn(r):Zv.textContent!==r?(Ki(sL),yw(Zv,r)):(Ki(Zv),yw(sL,r)))}function yw(r,e){Ki(r),e.length>FO&&(e=e.substr(0,FO)),r.textContent=e,r.style.visibility="hidden",r.style.visibility="visible"}const JD=bt("markerDecorationsService");var Sw=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Ts extends Z{constructor(e,t="",i="",n=!0,s){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return Sw(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(e))})}}class Vf extends Z{constructor(){super(...arguments);this._onBeforeRun=this._register(new H),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new H),this.onDidRun=this._onDidRun.event}run(e,t){return Sw(this,void 0,void 0,function*(){if(!e.enabled)return;this._onBeforeRun.fire({action:e});let i;try{yield this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})})}runAction(e,t){return Sw(this,void 0,void 0,function*(){yield e.run(t)})}}class Is extends Ts{constructor(e){super(Is.ID,e,e?"separator text":"separator");this.checked=!1,this.enabled=!1}}Is.ID="vs.actions.separator";class m0{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return Sw(this,void 0,void 0,function*(){})}}class _0 extends Ts{constructor(){super(_0.ID,m("submenu.empty","(empty)"),void 0,!1)}}_0.ID="vs.actions.empty";var Jr;(function(r){r.DARK="dark",r.LIGHT="light",r.HIGH_CONTRAST="hc"})(Jr||(Jr={}));const Gt=bt("themeService");var oL;(function(r){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}r.isThemeColor=e})(oL||(oL={}));function li(r){return{id:r}}var qt;(function(r){function e(a){return a&&typeof a=="object"&&typeof a.id=="string"&&(typeof a.color=="undefined"||oL.isThemeColor(a.color))}r.isThemeIcon=e;const t=new RegExp(`^\\$\\((${hr.iconNameExpression}(?:${hr.iconModifierExpression})?)\\)$`);function i(a){const l=t.exec(a);if(!l)return;let[,c]=l;return{id:c}}r.fromString=i;function n(a,l){let c=a.id;const d=c.lastIndexOf("~");return d!==-1&&(c=c.substring(0,d)),l&&(c=`${c}~${l}`),{id:c}}r.modify=n;function s(a,l){var c,d;return a.id===l.id&&((c=a.color)===null||c===void 0?void 0:c.id)===((d=l.color)===null||d===void 0?void 0:d.id)}r.isEqual=s;function o(a,l){return{id:a.id,color:l?li(l):void 0}}r.asThemeIcon=o,r.asClassNameArray=hr.asClassNameArray,r.asClassName=hr.asClassName,r.asCSSSelector=hr.asCSSSelector})(qt||(qt={}));function xw(r){switch(r){case Jr.DARK:return"vs-dark";case Jr.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const pW={ThemingContribution:"base.contributions.theming"};class tY{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new H}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Xe(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let mW=new tY;_i.add(pW.ThemingContribution,mW);function Et(r){return mW.onColorThemeChange(r)}class iY extends Z{constructor(e){super();this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}var nY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},BO=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function wp(r){return r.command!==void 0}class Ee{constructor(e){this.id=Ee._idPool++,this._debugName=e}}Ee._idPool=0;Ee.CommandPalette=new Ee("CommandPalette");Ee.EditorContext=new Ee("EditorContext");Ee.SimpleEditorContext=new Ee("SimpleEditorContext");Ee.EditorContextCopy=new Ee("EditorContextCopy");Ee.EditorContextPeek=new Ee("EditorContextPeek");Ee.MenubarEditMenu=new Ee("MenubarEditMenu");Ee.MenubarCopy=new Ee("MenubarCopy");Ee.MenubarGoMenu=new Ee("MenubarGoMenu");Ee.MenubarSelectionMenu=new Ee("MenubarSelectionMenu");Ee.InlineCompletionsActions=new Ee("InlineCompletionsActions");const Bu=bt("menuService"),es=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new H,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===Ee.CommandPalette}}addCommand(r){return this.addCommands(at.single(r))}addCommands(r){for(const e of r)this._commands.set(e.id,e);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Xe(()=>{let e=!1;for(const t of r)e=this._commands.delete(t.id)||e;e&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((e,t)=>r.set(t,e)),r}appendMenuItem(r,e){return this.appendMenuItems(at.single({id:r,item:e}))}appendMenuItems(r){const e=new Set,t=new Dr;for(const{id:i,item:n}of r){let s=this._menuItems.get(i);s||(s=new Dr,this._menuItems.set(i,s)),t.push(s.push(n)),e.add(i)}return this._onDidChangeMenu.fire(e),Xe(()=>{if(t.size>0){for(let i of t)i();this._onDidChangeMenu.fire(e),t.clear()}})}getMenuItems(r){let e;return this._menuItems.has(r)?e=[...this._menuItems.get(r)]:e=[],r===Ee.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(r){const e=new Set;for(const t of r)wp(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,i)=>{e.has(i)||r.push({command:t})})}};class eA extends m0{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,[],"submenu");this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,n]of i)n.length>0&&(e.push(...n),e.push(new Is));return e.length&&e.pop(),e}}let Cc=class _W{constructor(e,t,i,n,s){var o,a;if(this._commandService=s,this.id=e.id,this.label=(i==null?void 0:i.renderShortTitle)&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value,this.tooltip=(a=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:"",this.enabled=!e.precondition||n.contextMatchesRules(e.precondition),this.checked=!1,e.toggled){const l=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=n.contextMatchesRules(l.condition),this.checked&&l.tooltip&&(this.tooltip=typeof l.tooltip=="string"?l.tooltip:l.tooltip.value),l.title&&(this.label=typeof l.title=="string"?l.title:l.title.value)}this.item=e,this.alt=t?new _W(t,void 0,i,n,s):void 0,this._options=i,qt.isThemeIcon(e.icon)&&(this.class=hr.asClassName(e.icon))}dispose(){}run(...e){var t,i;let n=[];return!((t=this._options)===null||t===void 0)&&t.arg&&(n=[...n,this._options.arg]),!((i=this._options)===null||i===void 0)&&i.shouldForwardArgs&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Cc=nY([BO(3,Be),BO(4,pi)],Cc);const Wc=bt("telemetryService");class b0{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 i=t.kbExpr;this.precondition&&(i?i=me.and(i,this.precondition):i=this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:i,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};zn.registerKeybindingRule(n)}}lt.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){es.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 wg extends b0{constructor(){super(...arguments);this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort((n,s)=>s.priority-n.priority),{dispose:()=>{for(let n=0;n<this._implementations.length;n++)if(this._implementations[n].implementation===i){this._implementations.splice(n,1);return}}}}runCommand(e,t){const i=e.get(_l);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const s=n.implementation(e,t);if(s)return i.trace(`Command '${this.id}' was handled by '${n.name}'.`),typeof s=="boolean"?void 0:s}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class bW extends b0{constructor(e,t){super(t);this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class dn extends b0{static bindToContribution(e){return class extends dn{constructor(i){super(i);this._callback=i.handler}runEditorCommand(i,n,s){e(n)&&this._callback(e(n),s)}}}runCommand(e,t){const i=e.get(Ct),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(!!n)return n.invokeWithinContext(s=>{if(!!s.get(Be).contextMatchesRules(Ar(this.precondition)))return this.runEditorCommand(s,n,t)})}}class Se extends dn{constructor(e){super(Se.convertOptions(e));this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function i(n){return n.menuId||(n.menuId=Ee.EditorContext),n.title||(n.title=e.label),n.when=me.and(e.precondition,n.when),n}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(Wc).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class vW extends Se{constructor(){super(...arguments);this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((i,n)=>n[0]-i[0]),{dispose:()=>{for(let i=0;i<this._implementations.length;i++)if(this._implementations[i][1]===t){this._implementations.splice(i,1);return}}}}run(e,t,i){for(const n of this._implementations){const s=n[1](e,t,i);if(s)return typeof s=="boolean"?void 0:s}}}function pa(r,e){lt.registerCommand(r,function(t,...i){const[n,s]=i;Dt(De.isUri(n)),Dt(U.isIPosition(s));const o=t.get(mi).getModel(n);if(o){const a=U.lift(s);return e(o,a,...i.slice(2))}return t.get(ho).createModelReference(n).then(a=>new Promise((l,c)=>{try{const d=e(a.object.textEditorModel,U.lift(s),i.slice(2));l(d)}catch(d){c(d)}}).finally(()=>{a.dispose()}))})}function rY(r,e){lt.registerCommand(r,function(t,...i){const[n]=i;Dt(De.isUri(n));const s=t.get(mi).getModel(n);return s?e(s,...i.slice(1)):t.get(ho).createModelReference(n).then(o=>new Promise((a,l)=>{try{const c=e(o.object.textEditorModel,i.slice(1));a(c)}catch(c){l(c)}}).finally(()=>{o.dispose()}))})}function fe(r){return Kr.INSTANCE.registerEditorCommand(r),r}function pe(r){const e=new r;return Kr.INSTANCE.registerEditorAction(e),e}function CW(r){return Kr.INSTANCE.registerEditorAction(r),r}function wW(r){Kr.INSTANCE.registerEditorAction(r)}function wt(r,e){Kr.INSTANCE.registerEditorContribution(r,e)}var _f;(function(r){function e(o){return Kr.INSTANCE.getEditorCommand(o)}r.getEditorCommand=e;function t(){return Kr.INSTANCE.getEditorActions()}r.getEditorActions=t;function i(){return Kr.INSTANCE.getEditorContributions()}r.getEditorContributions=i;function n(o){return Kr.INSTANCE.getEditorContributions().filter(a=>o.indexOf(a.id)>=0)}r.getSomeEditorContributions=n;function s(){return Kr.INSTANCE.getDiffEditorContributions()}r.getDiffEditorContributions=s})(_f||(_f={}));const sY={EditorCommonContributions:"editor.contributions"};class Kr{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}Kr.INSTANCE=new Kr;_i.add(sY.EditorCommonContributions,Kr.INSTANCE);function K_(r){return r.register(),r}const tA=K_(new wg({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2104},menuOpts:[{menuId:Ee.MenubarEditMenu,group:"1_do",title:m({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:Ee.CommandPalette,group:"",title:m("undo","Undo"),order:1}]}));K_(new bW(tA,{id:"default:undo",precondition:void 0}));const iA=K_(new wg({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2103,secondary:[3128],mac:{primary:3128}},menuOpts:[{menuId:Ee.MenubarEditMenu,group:"1_do",title:m({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:Ee.CommandPalette,group:"",title:m("redo","Redo"),order:1}]}));K_(new bW(iA,{id:"default:redo",precondition:void 0}));const oY=K_(new wg({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2079},menuOpts:[{menuId:Ee.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:Ee.CommandPalette,group:"",title:m("selectAll","Select All"),order:1}]}));var aY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lY=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Am=class{constructor(e,t){}dispose(){}};Am.ID="editor.contrib.markerDecorations";Am=aY([lY(1,JD)],Am);wt(Am.ID,Am);class cY{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class nA{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=this._bareFontInfo.getMassagedFontFamily(Ko?gr.fontFamily:null),t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const i=document.createElement("div");i.style.fontFamily=e,i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);const n=document.createElement("div");n.style.fontFamily=e,n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);const s=document.createElement("div");s.style.fontFamily=e,s.style.fontWeight=this._bareFontInfo.fontWeight,s.style.fontSize=this._bareFontInfo.fontSize+"px",s.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,s.style.lineHeight=this._bareFontInfo.lineHeight+"px",s.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",s.style.fontStyle="italic",t.appendChild(s);const o=[];for(const a of this._requests){let l;a.type===0&&(l=i),a.type===2&&(l=n),a.type===1&&(l=s),l.appendChild(document.createElement("br"));const c=document.createElement("span");nA._render(c,a),l.appendChild(c),o.push(c)}this._container=t,this._testElements=o}static _render(e,t){if(t.chr===" "){let i="\xA0";for(let n=0;n<8;n++)i+=i;e.innerText=i}else{let i=t.chr;for(let n=0;n<8;n++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const i=this._requests[e],n=this._testElements[e];i.fulfill(n.offsetWidth/256)}}}function dY(r,e){new nA(r,e).read()}class yW extends Z{constructor(e,t,i){super();this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}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.changeCallback())}}class WO{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}function uY(){nu.INSTANCE.clearCache()}class nu extends Z{constructor(){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._cache=new WO,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new WO,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=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()}readConfiguration(e){if(!this._cache.has(e)){let t=nu._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new Wk({zoomLevel:kk(),pixelRatio:WC(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,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)}static createRequest(e,t,i,n){const s=new cY(e,t);return i.push(s),n&&n.push(s),s}static _actualReadConfiguration(e){const t=[],i=[],n=this.createRequest("n",0,t,i),s=this.createRequest("\uFF4D",0,t,null),o=this.createRequest(" ",0,t,i),a=this.createRequest("0",0,t,i),l=this.createRequest("1",0,t,i),c=this.createRequest("2",0,t,i),d=this.createRequest("3",0,t,i),u=this.createRequest("4",0,t,i),h=this.createRequest("5",0,t,i),f=this.createRequest("6",0,t,i),g=this.createRequest("7",0,t,i),p=this.createRequest("8",0,t,i),_=this.createRequest("9",0,t,i),v=this.createRequest("\u2192",0,t,i),b=this.createRequest("\uFFEB",0,t,null),C=this.createRequest("\xB7",0,t,i),y=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),dY(e,t);const E=Math.max(a.width,l.width,c.width,d.width,u.width,h.width,f.width,g.width,p.width,_.width);let S=e.fontFeatureSettings===Lr.OFF;const w=i[0].width;for(let M=1,B=i.length;S&&M<B;M++){const z=w-i[M].width;if(z<-.001||z>.001){S=!1;break}}let x=!0;S&&b.width!==w&&(x=!1),b.width>v.width&&(x=!1);const D=Vz()>2e3;return new Wk({zoomLevel:kk(),pixelRatio:WC(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:S,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:x,spaceWidth:o.width,middotWidth:C.width,wsmiddotWidth:y.width,maxDigitWidth:E},D)}}nu.INSTANCE=new nu;class Ln extends uw{constructor(e,t,i=null,n){super(e,t);this.accessibilityService=n,this._elementSizeObserver=this._register(new yW(i,t.dimension,()=>this._recomputeOptions())),this._register(nu.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(YB(s=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(Ko?gr.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily(Ko?gr.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return!Ko&&!$z&&(e+="no-user-select "),Ko&&(e+="no-minimap-shadow "),tt&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:Ln._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:Md||Bn,pixelRatio:WC(),zoomLevel:kk(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return nu.INSTANCE.readConfiguration(e)}}class SW{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}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){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}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)}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 ht(r){return new SW(r)}function Li(r,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");const s=`$memoize$${e}`;t[i]=function(...o){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,o)}),this[s]}}var hY=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vt;(function(r){r.Tap="-monaco-gesturetap",r.Change="-monaco-gesturechange",r.Start="-monaco-gesturestart",r.End="-monaco-gesturesend",r.Contextmenu="-monaco-gesturecontextmenu"})(Vt||(Vt={}));class Lt extends Z{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(J(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(J(document,"touchend",e=>this.onTouchEnd(e))),this._register(J(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return Lt.isTouchDevice()?(Lt.INSTANCE||(Lt.INSTANCE=new Lt),Lt.INSTANCE.targets.push(e),{dispose:()=>{Lt.INSTANCE.targets=Lt.INSTANCE.targets.filter(t=>t!==e)}}):Z.None}static ignoreTarget(e){return Lt.isTouchDevice()?(Lt.INSTANCE||(Lt.INSTANCE=new Lt),Lt.INSTANCE.ignoreTargets.push(e),{dispose:()=>{Lt.INSTANCE.ignoreTargets=Lt.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):Z.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i<n;i++){let s=e.targetTouches.item(i);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:t,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[t],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let o=this.newGestureEvent(Vt.Start,s.target);o.pageX=s.pageX,o.pageY=s.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let n=0,s=e.changedTouches.length;n<s;n++){let o=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("move of an UNKNOWN touch",o);continue}let a=this.activeTouches[o.identifier],l=Date.now()-a.initialTimeStamp;if(l<Lt.HOLD_DELAY&&Math.abs(a.initialPageX-$r(a.rollingPageX))<30&&Math.abs(a.initialPageY-$r(a.rollingPageY))<30){let c=this.newGestureEvent(Vt.Tap,a.initialTarget);c.pageX=$r(a.rollingPageX),c.pageY=$r(a.rollingPageY),this.dispatchEvent(c)}else if(l>=Lt.HOLD_DELAY&&Math.abs(a.initialPageX-$r(a.rollingPageX))<30&&Math.abs(a.initialPageY-$r(a.rollingPageY))<30){let c=this.newGestureEvent(Vt.Contextmenu,a.initialTarget);c.pageX=$r(a.rollingPageX),c.pageY=$r(a.rollingPageY),this.dispatchEvent(c)}else if(i===1){let c=$r(a.rollingPageX),d=$r(a.rollingPageY),u=$r(a.rollingTimestamps)-a.rollingTimestamps[0],h=c-a.rollingPageX[0],f=d-a.rollingPageY[0];const g=this.targets.filter(p=>a.initialTarget instanceof Node&&p.contains(a.initialTarget));this.inertia(g,t,Math.abs(h)/u,h>0?1:-1,c,Math.abs(f)/u,f>0?1:-1,d)}this.dispatchEvent(this.newGestureEvent(Vt.End,a.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===Vt.Tap){const t=new Date().getTime();let i=0;t-this._lastSetTapCountTime>Lt.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=t,e.tapCount=i}else(e.type===Vt.Change||e.type===Vt.Contextmenu)&&(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach(t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,i,n,s,o,a,l){this.handle=oa(()=>{let c=Date.now(),d=c-t,u=0,h=0,f=!0;i+=Lt.SCROLL_FRICTION*d,o+=Lt.SCROLL_FRICTION*d,i>0&&(f=!1,u=n*i*d),o>0&&(f=!1,h=a*o*d);let g=this.newGestureEvent(Vt.Change);g.translationX=u,g.translationY=h,e.forEach(p=>p.dispatchEvent(g)),f||this.inertia(e,c,i,n,s+u,o,a,l+h)})}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i<n;i++){let s=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}let o=this.activeTouches[s.identifier],a=this.newGestureEvent(Vt.Change,o.initialTarget);a.translationX=s.pageX-$r(o.rollingPageX),a.translationY=s.pageY-$r(o.rollingPageY),a.pageX=s.pageX,a.pageY=s.pageY,this.dispatchEvent(a),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(s.pageX),o.rollingPageY.push(s.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}Lt.SCROLL_FRICTION=-.005;Lt.HOLD_DELAY=700;Lt.CLEAR_TAP_COUNT_TIME=400;hY([Li],Lt,"isTouchDevice",null);function yg(r,e){let t=new Zr(e);return t.preventDefault(),{leftButton:t.leftButton,buttons:t.buttons,posx:t.posx,posy:t.posy}}class Wu{constructor(){this._hooks=new ue,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,s){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=s;const o=Tk.getSameOriginWindowChain(),a=ra?"pointermove":"mousemove",l="mouseup",c=o.map(u=>u.window.document),d=Ru(e);d&&c.unshift(d);for(const u of c)this._hooks.add(gD(u,a,h=>{if(h.buttons!==t){this.stopMonitoring(!0);return}this._mouseMoveCallback(h)},(h,f)=>this._mouseMoveEventMerger(h,f))),this._hooks.add(J(u,l,h=>this.stopMonitoring(!0)));if(Tk.hasDifferentOriginAncestor()){let u=o[o.length-1];this._hooks.add(J(u.window.document,"mouseout",h=>{new Zr(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(J(u.window.document,"mouseover",h=>{new Zr(h).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(J(u.window.document.body,"mouseleave",h=>{this.stopMonitoring(!0)}))}}}class rA{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new xW(this.x-tl.scrollX,this.y-tl.scrollY)}}class xW{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new rA(this.clientX+tl.scrollX,this.clientY+tl.scrollY)}}class fY{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}function EW(r){const e=rn(r);return new fY(e.left,e.top,e.width,e.height)}class ru extends Zr{constructor(e,t){super(e);this._editorMouseEventBrand=void 0,this.pos=new rA(this.posx,this.posy),this.editorPos=EW(t)}}class gY{constructor(e){this._editorViewDomNode=e}_create(e){return new ru(e,this._editorViewDomNode)}onContextMenu(e,t){return J(e,"contextmenu",i=>{t(this._create(i))})}onMouseUp(e,t){return J(e,"mouseup",i=>{t(this._create(i))})}onMouseDown(e,t){return J(e,"mousedown",i=>{t(this._create(i))})}onMouseLeave(e,t){return fD(e,i=>{t(this._create(i))})}onMouseMoveThrottled(e,t,i,n){return gD(e,"mousemove",t,(o,a)=>i(o,this._create(a)),n)}}class pY{constructor(e){this._editorViewDomNode=e}_create(e){return new ru(e,this._editorViewDomNode)}onPointerUp(e,t){return J(e,"pointerup",i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,"pointerdown",i=>{t(this._create(i))})}onPointerLeave(e,t){return nj(e,i=>{t(this._create(i))})}onPointerMoveThrottled(e,t,i,n){return gD(e,"pointermove",t,(o,a)=>i(o,this._create(a)),n)}}class mY extends Z{constructor(e){super();this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Wu),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=Ei(document,"keydown",a=>{a.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0);const o=(a,l)=>i(a,new ru(l,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,o,n,a=>{this._keydownListener.dispose(),s(a)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class Y_ extends Z{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<n;i++){let s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class as extends Y_{constructor(e){super();this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class ca{static write(e,t){e instanceof SW,e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const s=new Uint8Array(n);for(let o=0;o<n;o++)s[o]=i[n-o-1];return s}}class _Y{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class bY extends _Y{constructor(e,t,i){super(e,t);this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class vY{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class v0{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new v0(s.left,s.width)}return t}toString(){return`[${this.left},${this.width}]`}}class bf{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class CY{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class wY{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class L1{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,s){const o=this._createRange();try{return o.setStart(e,t),o.setEnd(i,n),o.getClientRects()}catch{return null}finally{this._detachRange(o,s)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(bf.compare);let t=[],i=0,n=e[0];for(let s=1,o=e.length;s<o;s++){const a=e[s];n.left+n.width+.9>=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t){if(!e||e.length===0)return null;const i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];i[n]=new bf(Math.max(0,o.left-t),o.width)}return this._mergeAdjacentRanges(i)}static readHorizontalRanges(e,t,i,n,s,o,a){const c=e.children.length-1;if(0>c)return null;if(t=Math.min(c,Math.max(0,t)),n=Math.min(c,Math.max(0,n)),t===n&&i===s&&i===0&&!e.children[t].firstChild){const f=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(f,o)}t!==n&&n>0&&s===0&&(n--,s=1073741824);let d=e.children[t].firstChild,u=e.children[n].firstChild;if((!d||!u)&&(!d&&i===0&&t>0&&(d=e.children[t-1].firstChild,i=1073741824),!u&&s===0&&n>0&&(u=e.children[n-1].firstChild,s=1073741824)),!d||!u)return null;i=Math.min(d.textContent.length,Math.max(0,i)),s=Math.min(u.textContent.length,Math.max(0,s));const h=this._readClientRects(d,i,u,s,a);return this._createHorizontalRangesFromClientRects(h,o)}}const yY=function(){return io?!0:!(ir||Bn||Ko)}();let vf=!0;class VO{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class HO{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(43);this.renderWhitespace=i.get(87),this.renderControlCharacters=i.get(82),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(58),this.stopRenderingLineAfter=i.get(104),this.fontLigatures=i.get(44)}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 zo{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)this._renderedViewLine.domNode=ht(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return this._options.themeType===Jr.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,i,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),o=this._options,a=Nr.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(o.themeType===Jr.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const h=i.selections;for(const f of h){if(f.endLineNumber<e||f.startLineNumber>e)continue;const g=f.startLineNumber===e?f.startColumn:s.minColumn,p=f.endLineNumber===e?f.endColumn:s.maxColumn;g<p&&(o.themeType===Jr.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?a.push(new Nr(g,p,"inline-selected-text",0)):(l||(l=[]),l.push(new FG(g-1,p-1))))}}const c=new Mu(o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,s.minColumn-1,s.tokens,a,s.tabSize,s.startVisibleColumn,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==Lr.OFF,l);if(this._renderedViewLine&&this._renderedViewLine.input.equals(c))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(zo.CLASS_NAME),n.appendASCIIString('">');const d=t0(c,n);n.appendASCIIString("</div>");let u=null;return vf&&yY&&s.isBasicASCII&&o.useMonospaceOptimizations&&d.containsForeignElements===0&&s.content.length<300&&c.lineTokens.getCount()<100&&(u=new Pb(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping)),u||(u=LW(this._renderedViewLine?this._renderedViewLine.domNode:null,c,d.characterMapping,d.containsRTL,d.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof Pb:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof Pb?this._renderedViewLine.monospaceAssumptionsAreValid():vf}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof Pb&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=t|0,i=i|0,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|0;let o=!1;s!==-1&&t>s+1&&i>s+1&&(o=!0),s!==-1&&t>s+1&&(t=s+1),s!==-1&&i>s+1&&(i=s+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return a&&a.length>0?new wY(o,a):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}zo.CLASS_NAME="view-line";class Pb{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return vf;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),vf=!1),vf}toSlowRenderedLine(){return LW(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getCharPosition(t),o=this._getCharPosition(i);return[new bf(s,o-s)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new $D(s,i),n)}}class kW{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||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let o=0,a=this._characterMapping.length;o<=a;o++)this._pixelOffsetCache[o]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,e,t,n);if(s===-1)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return o===-1?null:[new bf(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const o=this._readPixelOffset(e,t,i,s);return o===-1?null:[new bf(o,0)]}else return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const s=this._getReadingTarget(e);return s.firstChild?s.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[i];if(s!==-1)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(this._characterMapping.length===0){const l=L1.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return!l||l.length===0?-1:l[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const s=this._characterMapping.getDomPosition(i),o=L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.endNode);if(!o||o.length===0)return-1;const a=o[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getAbsoluteOffset(i),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,i,n){if(t===1&&i===this._characterMapping.length)return[new bf(0,this.getWidth())];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return L1.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new $D(s,i),n)}}class SY extends kW{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||o.length===0||i===n||i===1&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const a=this._readPixelOffset(e,t,n,s);if(a!==-1){const l=o[o.length-1];l.left<a&&(l.width=a-l.left)}}return o}}const LW=function(){return Md?xY:EY}();function xY(r,e,t,i,n){return new SY(r,e,t,i,n)}function EY(r,e,t,i,n){return new kW(r,e,t,i,n)}function Fb(r){return r.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class nn{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}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}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${Fb(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${Fb(this.oldText)}")`:`(replace@${this.oldPosition} "${Fb(this.oldText)}" with "${Fb(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;$s(e,n,i),i+=4;for(let s=0;s<n;s++)$j(e,t.charCodeAt(s),i),i+=2;return i}static _readString(e,t){const i=Hs(e,t);return t+=4,Uk(e,t,i)}writeSize(){return 4+4+nn._writeStringSize(this.oldText)+nn._writeStringSize(this.newText)}write(e,t){return $s(e,this.oldPosition,t),t+=4,$s(e,this.newPosition,t),t+=4,t=nn._writeString(e,this.oldText,t),t=nn._writeString(e,this.newText,t),t}static read(e,t,i){const n=Hs(e,t);t+=4;const s=Hs(e,t);t+=4;const o=nn._readString(e,t);t+=nn._writeStringSize(o);const a=nn._readString(e,t);return t+=nn._writeStringSize(a),i.push(new nn(n,o,s,a)),t}}function kY(r,e){return r===null||r.length===0?e:new No(r,e).compress()}class No{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(i===null){this._acceptCurr(n),n=this._getCurr(++t);continue}if(n===null){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[c,d]=No._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(c),n=d;continue}if(i.newPosition<n.oldPosition){const[c,d]=No._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(c),i=d;continue}let a,l;if(n.oldEnd===i.newEnd)a=i,l=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[c,d]=No._splitPrev(i,n.oldLength);a=c,l=n,i=d,n=this._getCurr(++t)}else{const[c,d]=No._splitCurr(n,i.newLength);a=i,l=c,i=this._getPrev(++e),n=d}this._result[this._resultLen++]=new nn(a.oldPosition,a.oldText,l.newPosition,l.newText),this._prevDeltaOffset+=a.newLength-a.oldLength,this._currDeltaOffset+=l.newLength-l.oldLength}const s=No._merge(this._result);return No._removeNoOps(s)}_acceptCurr(e){this._result[this._resultLen++]=No._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=No._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new nn(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new nn(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new nn(e.oldPosition,e.oldText,e.newPosition,i),new nn(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new nn(e.oldPosition,i,e.newPosition,e.newText),new nn(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(e.length===0)return e;let t=[],i=0,n=e[0];for(let s=1;s<e.length;s++){const o=e[s];n.oldEnd===o.oldPosition?n=new nn(n.oldPosition,n.oldText+o.oldText,n.newPosition,n.newText+o.newText):(t[i++]=n,n=o)}return t[i++]=n,t}static _removeNoOps(e){if(e.length===0)return e;let t=[],i=0;for(let n=0;n<e.length;n++){const s=e[n];s.oldText!==s.newText&&(t[i++]=s)}return t}}function _h(r){return r.toString()}class Ri{constructor(e,t,i,n,s,o,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=o,this.changes=a}static create(e,t){const i=e.getAlternativeVersionId(),n=aL(e);return new Ri(i,i,n,n,t,t,[])}append(e,t,i,n,s){t.length>0&&(this.changes=kY(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if($s(e,t?t.length:0,i),i+=4,t)for(const n of t)$s(e,n.selectionStartLineNumber,i),i+=4,$s(e,n.selectionStartColumn,i),i+=4,$s(e,n.positionLineNumber,i),i+=4,$s(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Hs(e,t);t+=4;for(let s=0;s<n;s++){const o=Hs(e,t);t+=4;const a=Hs(e,t);t+=4;const l=Hs(e,t);t+=4;const c=Hs(e,t);t+=4,i.push(new _e(o,a,l,c))}return t}serialize(){let e=10+Ri._writeSelectionsSize(this.beforeCursorState)+Ri._writeSelectionsSize(this.afterCursorState)+4;for(const n of this.changes)e+=n.writeSize();const t=new Uint8Array(e);let i=0;$s(t,this.beforeVersionId,i),i+=4,$s(t,this.afterVersionId,i),i+=4,YR(t,this.beforeEOL,i),i+=1,YR(t,this.afterEOL,i),i+=1,i=Ri._writeSelections(t,this.beforeCursorState,i),i=Ri._writeSelections(t,this.afterCursorState,i),$s(t,this.changes.length,i),i+=4;for(const n of this.changes)i=n.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=Hs(t,i);i+=4;const s=Hs(t,i);i+=4;const o=KR(t,i);i+=1;const a=KR(t,i);i+=1;const l=[];i=Ri._readSelections(t,i,l);const c=[];i=Ri._readSelections(t,i,c);const d=Hs(t,i);i+=4;const u=[];for(let h=0;h<d;h++)i=nn.read(t,i,u);return new Ri(n,s,o,a,l,c,u)}}class TW{constructor(e,t){this.model=e,this._data=Ri.create(e,t)}get type(){return 0}get resource(){return De.isUri(this.model)?this.model:this.model.uri}get label(){return m("edit","Typing")}toString(){return(this._data instanceof Ri?this._data:Ri.deserialize(this._data)).changes.map(t=>t.toString()).join(", ")}matchesResource(e){return(De.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 Ri}append(e,t,i,n,s){this._data instanceof Ri&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Ri&&(this._data=this._data.serialize())}open(){this._data instanceof Ri||(this._data=Ri.deserialize(this._data))}undo(){if(De.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ri&&(this._data=this._data.serialize());const e=Ri.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(De.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Ri&&(this._data=this._data.serialize());const e=Ri.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Ri&&(this._data=this._data.serialize()),this._data.byteLength+168}}class LY{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const n=_h(i.resource);this._editStackElementsMap.set(n,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=_h(e);return this._editStackElementsMap.has(t)}setModel(e){const t=_h(De.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=_h(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const o=_h(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=_h(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${Rs(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function aL(r){return r.getEOL()===` +`?0:1}function Ba(r){return r?r instanceof TW||r instanceof LY:!1}class sA{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ba(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);Ba(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if(Ba(t)&&t.canAppend(this._model))return t;const i=new TW(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],aL(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),o=sA._computeCursorState(i,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),aL(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Fe(i),null}}}class TY{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function IY(r,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){let h=r.charCodeAt(s),f=t.charCodeAt(s);if(h!==f)break}let o=0,a=0;for(let h=s;h<e;h++)r.charCodeAt(h)===32?o++:a++;let l=0,c=0;for(let h=s;h<i;h++)t.charCodeAt(h)===32?l++:c++;if(o>0&&a>0||l>0&&c>0)return;let d=Math.abs(a-c),u=Math.abs(o-l);if(d===0){n.spacesDiff=u,u>0&&0<=l-1&&l-1<r.length&&l<t.length&&t.charCodeAt(l)!==32&&r.charCodeAt(l-1)===32&&r.charCodeAt(r.length-1)===44&&(n.looksLikeAlignment=!0);return}if(u%d===0){n.spacesDiff=u/d;return}}function $O(r,e,t){const i=Math.min(r.getLineCount(),1e4);let n=0,s=0,o="",a=0;const l=[2,4,6,8,3,5,7],c=8;let d=[0,0,0,0,0,0,0,0,0],u=new TY;for(let g=1;g<=i;g++){let p=r.getLineLength(g),_=r.getLineContent(g);const v=p<=65536;let b=!1,C=0,y=0,E=0;for(let w=0,x=p;w<x;w++){let D=v?_.charCodeAt(w):r.getLineCharCode(g,w);if(D===9)E++;else if(D===32)y++;else{b=!0,C=w;break}}if(!b||(E>0?n++:y>1&&s++,IY(o,a,_,C,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;let S=u.spacesDiff;S<=c&&d[S]++,o=_,a=C}let h=t;n!==s&&(h=n<s);let f=e;if(h){let g=h?0:.1*i;l.forEach(p=>{let _=d[p];_>g&&(g=_,f=p)}),f===4&&d[4]>0&&d[2]>0&&d[2]>=d[4]/2&&(f=2)}return{insertSpaces:h,tabSize:f}}function Gn(r){return(r.metadata&1)>>>0}function Rt(r,e){r.metadata=r.metadata&254|e<<0}function on(r){return(r.metadata&2)>>>1===1}function At(r,e){r.metadata=r.metadata&253|(e?1:0)<<1}function IW(r){return(r.metadata&4)>>>2===1}function UO(r,e){r.metadata=r.metadata&251|(e?1:0)<<2}function DY(r){return(r.metadata&24)>>>3}function zO(r,e){r.metadata=r.metadata&231|e<<3}function AY(r){return(r.metadata&32)>>>5===1}function jO(r,e){r.metadata=r.metadata&223|(e?1:0)<<5}class DW{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Rt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,UO(this,!1),zO(this,1),jO(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,At(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;let t=this.options.className;UO(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),zO(this,this.options.stickiness),jO(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 ze=new DW(null,0,0);ze.parent=ze;ze.left=ze;ze.right=ze;Rt(ze,0);class T1{constructor(){this.root=ze,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===ze?[]:WY(this,e,t,i,n,s)}search(e,t,i){return this.root===ze?[]:BY(this,e,t,i)}collectNodesFromOwner(e){return PY(this,e)}collectNodesPostOrder(){return FY(this)}insert(e){qO(this,e),this._normalizeDeltaIfNecessary()}delete(e){GO(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=OY(this,e,e+t);for(let o=0,a=s.length;o<a;o++){const l=s[o];GO(this,l)}this._normalizeDeltaIfNecessary(),MY(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,a=s.length;o<a;o++){const l=s[o];l.start=l.cachedAbsoluteStart,l.end=l.cachedAbsoluteEnd,RY(l,e,e+t,i,n),l.maxEnd=l.end,qO(this,l)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,NY(this))}}function NY(r){let e=r.root,t=0;for(;e!==ze;){if(e.left!==ze&&!on(e.left)){e=e.left;continue}if(e.right!==ze&&!on(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,wc(e),At(e,!0),At(e.left,!1),At(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}At(r.root,!1)}function bh(r,e,t,i){return r<t?!0:r>t||i===1?!1:i===2?!0:e}function RY(r,e,t,i,n){const s=DY(r),o=s===0||s===2,a=s===1||s===2,l=t-e,c=i,d=Math.min(l,c),u=r.start;let h=!1;const f=r.end;let g=!1;e<=u&&f<=t&&AY(r)&&(r.start=e,h=!0,r.end=e,g=!0);{const _=n?1:l>0?2:0;!h&&bh(u,o,e,_)&&(h=!0),!g&&bh(f,a,e,_)&&(g=!0)}if(d>0&&!n){const _=l>c?2:0;!h&&bh(u,o,e+d,_)&&(h=!0),!g&&bh(f,a,e+d,_)&&(g=!0)}{const _=n?1:0;!h&&bh(u,o,t,_)&&(r.start=e+c,h=!0),!g&&bh(f,a,t,_)&&(r.end=e+c,g=!0)}const p=c-l;h||(r.start=Math.max(0,u+p)),g||(r.end=Math.max(0,f+p)),r.start>r.end&&(r.end=r.start)}function OY(r,e,t){let i=r.root,n=0,s=0,o=0,a=0,l=[],c=0;for(;i!==ze;){if(on(i)){At(i.left,!1),At(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!on(i.left)){if(s=n+i.maxEnd,s<e){At(i,!0);continue}if(i.left!==ze){i=i.left;continue}}if(o=n+i.start,o>t){At(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(o,a,0),l[c++]=i),At(i,!0),i.right!==ze&&!on(i.right)){n+=i.delta,i=i.right;continue}}return At(r.root,!1),l}function MY(r,e,t,i){let n=r.root,s=0,o=0,a=0;const l=i-(t-e);for(;n!==ze;){if(on(n)){At(n.left,!1),At(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),wc(n),n=n.parent;continue}if(!on(n.left)){if(o=s+n.maxEnd,o<e){At(n,!0);continue}if(n.left!==ze){n=n.left;continue}}if(a=s+n.start,a>t){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(r.requestNormalizeDelta=!0),At(n,!0);continue}if(At(n,!0),n.right!==ze&&!on(n.right)){s+=n.delta,n=n.right;continue}}At(r.root,!1)}function PY(r,e){let t=r.root,i=[],n=0;for(;t!==ze;){if(on(t)){At(t.left,!1),At(t.right,!1),t=t.parent;continue}if(t.left!==ze&&!on(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),At(t,!0),t.right!==ze&&!on(t.right)){t=t.right;continue}}return At(r.root,!1),i}function FY(r){let e=r.root,t=[],i=0;for(;e!==ze;){if(on(e)){At(e.left,!1),At(e.right,!1),e=e.parent;continue}if(e.left!==ze&&!on(e.left)){e=e.left;continue}if(e.right!==ze&&!on(e.right)){e=e.right;continue}t[i++]=e,At(e,!0)}return At(r.root,!1),t}function BY(r,e,t,i){let n=r.root,s=0,o=0,a=0,l=[],c=0;for(;n!==ze;){if(on(n)){At(n.left,!1),At(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(n.left!==ze&&!on(n.left)){n=n.left;continue}o=s+n.start,a=s+n.end,n.setCachedOffsets(o,a,i);let d=!0;if(e&&n.ownerId&&n.ownerId!==e&&(d=!1),t&&IW(n)&&(d=!1),d&&(l[c++]=n),At(n,!0),n.right!==ze&&!on(n.right)){s+=n.delta,n=n.right;continue}}return At(r.root,!1),l}function WY(r,e,t,i,n,s){let o=r.root,a=0,l=0,c=0,d=0,u=[],h=0;for(;o!==ze;){if(on(o)){At(o.left,!1),At(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),o=o.parent;continue}if(!on(o.left)){if(l=a+o.maxEnd,l<e){At(o,!0);continue}if(o.left!==ze){o=o.left;continue}}if(c=a+o.start,c>t){At(o,!0);continue}if(d=a+o.end,d>=e){o.setCachedOffsets(c,d,s);let f=!0;i&&o.ownerId&&o.ownerId!==i&&(f=!1),n&&IW(o)&&(f=!1),f&&(u[h++]=o)}if(At(o,!0),o.right!==ze&&!on(o.right)){a+=o.delta,o=o.right;continue}}return At(r.root,!1),u}function qO(r,e){if(r.root===ze)return e.parent=ze,e.left=ze,e.right=ze,Rt(e,0),r.root=e,r.root;VY(r,e),Pl(e.parent);let t=e;for(;t!==r.root&&Gn(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;Gn(i)===1?(Rt(t.parent,0),Rt(i,0),Rt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,jp(r,t)),Rt(t.parent,0),Rt(t.parent.parent,1),qp(r,t.parent.parent))}else{const i=t.parent.parent.left;Gn(i)===1?(Rt(t.parent,0),Rt(i,0),Rt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,qp(r,t)),Rt(t.parent,0),Rt(t.parent.parent,1),jp(r,t.parent.parent))}return Rt(r.root,0),e}function VY(r,e){let t=0,i=r.root;const n=e.start,s=e.end;for(;;)if($Y(n,s,i.start+t,i.end+t)<0)if(i.left===ze){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===ze){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=ze,e.right=ze,Rt(e,1)}function GO(r,e){let t,i;if(e.left===ze?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===ze?(t=e.left,i=e):(i=HY(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(r.requestNormalizeDelta=!0)),i===r.root){r.root=t,Rt(t,0),e.detach(),I1(),wc(t),r.root.parent=ze;return}let n=Gn(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,Rt(i,Gn(e)),e===r.root?r.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==ze&&(i.left.parent=i),i.right!==ze&&(i.right.parent=i)),e.detach(),n){Pl(t.parent),i!==e&&(Pl(i),Pl(i.parent)),I1();return}Pl(t),Pl(t.parent),i!==e&&(Pl(i),Pl(i.parent));let s;for(;t!==r.root&&Gn(t)===0;)t===t.parent.left?(s=t.parent.right,Gn(s)===1&&(Rt(s,0),Rt(t.parent,1),jp(r,t.parent),s=t.parent.right),Gn(s.left)===0&&Gn(s.right)===0?(Rt(s,1),t=t.parent):(Gn(s.right)===0&&(Rt(s.left,0),Rt(s,1),qp(r,s),s=t.parent.right),Rt(s,Gn(t.parent)),Rt(t.parent,0),Rt(s.right,0),jp(r,t.parent),t=r.root)):(s=t.parent.left,Gn(s)===1&&(Rt(s,0),Rt(t.parent,1),qp(r,t.parent),s=t.parent.left),Gn(s.left)===0&&Gn(s.right)===0?(Rt(s,1),t=t.parent):(Gn(s.left)===0&&(Rt(s.right,0),Rt(s,1),jp(r,s),s=t.parent.left),Rt(s,Gn(t.parent)),Rt(t.parent,0),Rt(s.left,0),qp(r,t.parent),t=r.root));Rt(t,0),I1()}function HY(r){for(;r.left!==ze;)r=r.left;return r}function I1(){ze.parent=ze,ze.delta=0,ze.start=0,ze.end=0}function jp(r,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==ze&&(t.left.parent=e),t.parent=e.parent,e.parent===ze?r.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,wc(e),wc(t)}function qp(r,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(r.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==ze&&(t.right.parent=e),t.parent=e.parent,e.parent===ze?r.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,wc(e),wc(t)}function AW(r){let e=r.end;if(r.left!==ze){const t=r.left.maxEnd;t>e&&(e=t)}if(r.right!==ze){const t=r.right.maxEnd+r.delta;t>e&&(e=t)}return e}function wc(r){r.maxEnd=AW(r)}function Pl(r){for(;r!==ze;){const e=AW(r);if(r.maxEnd===e)return;r.maxEnd=e,r=r.parent}}function $Y(r,e,t,i){return r===t?e-i:r-t}class lL{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!==Me)return oA(this.right);let e=this;for(;e.parent!==Me&&e.parent.left!==e;)e=e.parent;return e.parent===Me?Me:e.parent}prev(){if(this.left!==Me)return NW(this.left);let e=this;for(;e.parent!==Me&&e.parent.right!==e;)e=e.parent;return e.parent===Me?Me:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Me=new lL(null,0);Me.parent=Me;Me.left=Me;Me.right=Me;Me.color=0;function oA(r){for(;r.left!==Me;)r=r.left;return r}function NW(r){for(;r.right!==Me;)r=r.right;return r}function aA(r){return r===Me?0:r.size_left+r.piece.length+aA(r.right)}function lA(r){return r===Me?0:r.lf_left+r.piece.lineFeedCnt+lA(r.right)}function D1(){Me.parent=Me}function Gp(r,e){let t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==Me&&(t.left.parent=e),t.parent=e.parent,e.parent===Me?r.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function Kp(r,e){let t=e.left;e.left=t.right,t.right!==Me&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===Me?r.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function Bb(r,e){let t,i;if(e.left===Me?(i=e,t=i.right):e.right===Me?(i=e,t=i.left):(i=oA(e.right),t=i.right),i===r.root){r.root=t,t.color=0,e.detach(),D1(),r.root.parent=Me;return}let n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,yp(r,t)):(i.parent===e?t.parent=i:t.parent=i.parent,yp(r,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===r.root?r.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Me&&(i.left.parent=i),i.right!==Me&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,yp(r,i)),e.detach(),t.parent.left===t){let o=aA(t),a=lA(t);if(o!==t.parent.size_left||a!==t.parent.lf_left){let l=o-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=o,t.parent.lf_left=a,Da(r,t.parent,l,c)}}if(yp(r,t.parent),n){D1();return}let s;for(;t!==r.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,Gp(r,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,Kp(r,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,Gp(r,t.parent),t=r.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,Kp(r,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,Gp(r,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,Kp(r,t.parent),t=r.root));t.color=0,D1()}function KO(r,e){for(yp(r,e);e!==r.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,Gp(r,e)),e.parent.color=0,e.parent.parent.color=1,Kp(r,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,Kp(r,e)),e.parent.color=0,e.parent.parent.color=1,Gp(r,e.parent.parent))}r.root.color=0}function Da(r,e,t,i){for(;e!==r.root&&e!==Me;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function yp(r,e){let t=0,i=0;if(e!==r.root){if(t===0){for(;e!==r.root&&e===e.parent.right;)e=e.parent;if(e===r.root)return;e=e.parent,t=aA(e.left)-e.size_left,i=lA(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i}for(;e!==r.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}class UY extends Cg{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}function zY(r){let e={};return t=>(e.hasOwnProperty(t)||(e[t]=r(t)),e[t])}const os=zY(r=>new UY(r)),jY=999;class ad{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;this.isRegex?e=qY(this.searchString):e=this.searchString.indexOf(` +`)>=0;let t=null;try{t=f3(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new GY(t,this.wordSeparators?os(this.wordSeparators):null,i?this.searchString:null)}}function qY(r){if(!r||r.length===0)return!1;for(let e=0,t=r.length;e<t;e++)if(r.charCodeAt(e)===92){if(e++,e>=t)break;const n=r.charCodeAt(e);if(n===110||n===114||n===87)return!0}return!1}class GY{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function fd(r,e,t){if(!t)return new wm(r,null);let i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return new wm(r,i)}class YO{constructor(e){let t=[],i=0;for(let n=0,s=e.length;n<s;n++)e.charCodeAt(n)===10&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(n===-1||e<=t[0])return 0;for(;i<n;){const s=i+((n-i)/2>>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class Wb{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new Sp(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let c;if(n){let f=n.findLineFeedCountBeforeOffset(s+o.length)-l;c=a+o.length+f}else c=a+o.length;const d=e.getPositionAt(a),u=e.getPositionAt(c);return new k(d.lineNumber,d.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r +`?new YO(a):null,c=[];let d=0,u;for(i.reset(0);u=i.next(a);)if(c[d++]=fd(this._getMultilineMatchRange(e,o,a,l,u.index,u[0]),u,n),d>=s)return c;return c}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,c,t.startLineNumber,t.startColumn-1,a,o,n,s),o}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,o,n,s);for(let c=t.startLineNumber+1;c<t.endLineNumber&&a<s;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,o,n,s);if(a<s){const c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);a=this._findMatchesInLine(i,c,t.endLineNumber,0,a,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const h=e.simpleSearch,f=h.length,g=t.length;let p=-f;for(;(p=t.indexOf(h,p+f))!==-1;)if((!c||cA(c,t,g,p,f))&&(o[s++]=new wm(new k(i,p+1+n,i,p+1+f+n),null),s>=l))return s;return s}const d=new Sp(e.wordSeparators,e.regex);let u;d.reset(0);do if(u=d.next(t),u&&(o[s++]=fd(new k(i,u.index+1+n,i,u.index+1+u[0].length+n),u,a),s>=l))return s;while(u);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new Sp(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 U(t.lineNumber,1),o=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new k(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r +`?new YO(l):null;i.reset(t.column-1);let d=i.next(l);return d?fd(this._getMultilineMatchRange(e,o,l,c,d.index,d[0]),d,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new U(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o),l=this._findFirstMatchInLine(i,a,o,t.column,n);if(l)return l;for(let c=1;c<=s;c++){const d=(o+c-1)%s,u=e.getLineContent(d+1),h=this._findFirstMatchInLine(i,u,d+1,1,n);if(h)return h}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?fd(new k(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 Sp(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 k(1,1,t.lineNumber,t.column),i,n,10*jY);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 U(o,e.getLineMaxColumn(o)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,o,n);if(l)return l;for(let c=1;c<=s;c++){const d=(s+o-c-1)%s,u=e.getLineContent(d+1),h=this._findLastMatchInLine(i,u,d+1,n);if(h)return h}return null}static _findLastMatchInLine(e,t,i,n){let s=null,o;for(e.reset(0);o=e.next(t);)s=fd(new k(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function KY(r,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(r.get(s)!==0||s===13||s===10)return!0;if(n>0){const o=e.charCodeAt(i);if(r.get(o)!==0)return!0}return!1}function YY(r,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(r.get(s)!==0||s===13||s===10)return!0;if(n>0){const o=e.charCodeAt(i+n-1);if(r.get(o)!==0)return!0}return!1}function cA(r,e,t,i,n){return KY(r,e,t,i,n)&&YY(r,e,t,i,n)}class Sp{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||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Pa(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||cA(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const xa=65535;function RW(r){let e;return r[r.length-1]<65536?e=new Uint16Array(r.length):e=new Uint32Array(r.length),e.set(r,0),e}class ZY{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Aa(r,e=!0){let t=[0],i=1;for(let n=0,s=r.length;n<s;n++){const o=r.charCodeAt(n);o===13?n+1<s&&r.charCodeAt(n+1)===10?(t[i++]=n+2,n++):t[i++]=n+1:o===10&&(t[i++]=n+1)}return e?RW(t):t}function XY(r,e){r.length=0,r[0]=0;let t=1,i=0,n=0,s=0,o=!0;for(let l=0,c=e.length;l<c;l++){const d=e.charCodeAt(l);d===13?l+1<c&&e.charCodeAt(l+1)===10?(s++,r[t++]=l+2,l++):(i++,r[t++]=l+1):d===10?(n++,r[t++]=l+1):o&&d!==9&&(d<32||d>126)&&(o=!1)}const a=new ZY(RW(r),i,n,s,o);return r.length=0,a}class ar{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class gd{constructor(e,t){this.buffer=e,this.lineStarts=t}}class QY{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Me&&e.iterate(e.root,i=>(i!==Me&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class JY{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let 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--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n<i.length;n++){let s=i[n];if(s.node.parent===null||s.nodeStartOffset>=e){i[n]=null,t=!0;continue}}if(t){let n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class eZ{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new gd("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Me,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;s<o;s++)if(e[s].buffer.length>0){e[s].lineStarts||(e[s].lineStarts=Aa(e[s].buffer));let a=new ar(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,a)}this._searchCache=new JY(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=xa,i=t-Math.floor(t/3),n=i*2,s="",o=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),d=c.length;if(o<=i||o+d<n)return s+=c,o+=d,!0;let u=s.replace(/\r\n|\r|\n/g,e);return a.push(new gd(u,Aa(u))),s=c,o=d,!0}),o>0){let l=s.replace(/\r\n|\r|\n/g,e);a.push(new gd(l,Aa(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new QY(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Me;)if(n.left!==Me&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,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,n=e;for(;t!==Me;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){let o=this.getOffsetAt(i+1,1),a=n-o;return new U(i+1,a+1)}return new U(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Me){let s=this.getOffsetAt(i+1,1),o=n-e-s;return new U(i+1,o+1)}else t=t.right;return new U(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let 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?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Me;){let a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=a.substring(l,l+t.remainder);break}else o+=a.substr(l,i.piece.length);i=i.next()}return o}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===Me)return!0;const o=s.piece;let a=o.length;if(a===0)return!0;const l=this._buffers[o.bufferIndex].buffer,c=this._buffers[o.bufferIndex].lineStarts,d=o.start.line,u=o.end.line;let h=c[d]+o.start.column;if(n&&(l.charCodeAt(h)===10&&(h++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(d===u)return!this._EOLNormalized&&l.charCodeAt(h+a-1)===13?(n=!0,i+=l.substr(h,a-1)):i+=l.substr(h,a),!0;i+=this._EOLNormalized?l.substring(h,Math.max(h,c[d+1]-this._EOLLength)):l.substring(h,c[d+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let f=d+1;f<u;f++)i=this._EOLNormalized?l.substring(c[f],c[f+1]-this._EOLLength):l.substring(c[f],c[f+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return!this._EOLNormalized&&l.charCodeAt(c[u]+o.end.column-1)===13?(n=!0,o.end.column===0?t--:i=l.substr(c[u],o.end.column-1)):i=l.substr(c[u],o.end.column),!0}),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}else{let t=this._buffers[e.node.piece.bufferIndex],n=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(n)}}getLineCharCode(e,t){let i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,s,o,a,l,c,d,u){let h=this._buffers[e.piece.bufferIndex],f=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,s),p=this.offsetInBuffer(e.piece.bufferIndex,o),_,v={line:0,column:0},b,C;t._wordSeparators?(b=h.buffer.substring(g,p),C=y=>y+g,t.reset(0)):(b=h.buffer,C=y=>y,t.reset(g));do if(_=t.next(b),_){if(C(_.index)>=p)return d;this.positionInBuffer(e,C(_.index)-f,v);let y=this.getLineFeedCnt(e.piece.bufferIndex,s,v),E=v.line===s.line?v.column-s.column+n:v.column+1,S=E+_[0].length;if(u[d++]=fd(new k(i+y,E,i+y,S),_,l),C(_.index)+_[0].length>=p||d>=c)return d}while(_);return d}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const a=new Sp(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let d=this.positionInBuffer(l.node,l.remainder),u=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,d,u,t,i,n,o,s),s;let h=e.startLineNumber,f=l.node;for(;f!==c.node;){let p=this.getLineFeedCnt(f.piece.bufferIndex,d,f.piece.end);if(p>=1){let v=this._buffers[f.piece.bufferIndex].lineStarts,b=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),C=v[d.line+p],y=h===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(f,a,h,y,d,this.positionInBuffer(f,C-b),t,i,n,o,s),o>=n)return s;h+=p}let _=h===e.startLineNumber?e.startColumn-1:0;if(h===e.endLineNumber){const v=this.getLineContent(h).substring(_,e.endColumn-1);return o=this._findMatchesInLine(t,a,v,e.endLineNumber,_,o,s,i,n),s}if(o=this._findMatchesInLine(t,a,this.getLineContent(h).substr(_),h,_,o,s,i,n),o>=n)return s;h++,l=this.nodeAt2(h,1),f=l.node,d=this.positionInBuffer(l.node,l.remainder)}if(h===e.endLineNumber){let p=h===e.startLineNumber?e.startColumn-1:0;const _=this.getLineContent(h).substring(p,e.endColumn-1);return o=this._findMatchesInLine(t,a,_,e.endLineNumber,p,o,s,i,n),s}let g=h===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(c.node,a,h,g,d,u,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,a,l,c){const d=e.wordSeparators;if(!l&&e.simpleSearch){const h=e.simpleSearch,f=h.length,g=i.length;let p=-f;for(;(p=i.indexOf(h,p+f))!==-1;)if((!d||cA(d,i,g,p,f))&&(a[o++]=new wm(new k(n,p+1+s,n,p+1+f+s),null),o>=c))return o;return o}let u;t.reset(0);do if(u=t.next(i),u&&(a[o++]=fd(new k(n,u.index+1+s,n,u.index+1+u[0].length+s),u,l),o>=c))return o;while(u);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Me){let{node:n,remainder:s,nodeStartOffset:o}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,c=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&o+a.length===e&&t.length<xa){this.appendToNode(n,t),this.computeBufferMetadata();return}if(o===e)this.insertContentToNodeLeft(t,n),this._searchCache.validate(e);else if(o+n.piece.length>e){let d=[],u=new ar(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){let p={line:u.start.line+1,column:0};u=new ar(u.bufferIndex,p,u.end,this.getLineFeedCnt(u.bufferIndex,p,u.end),u.length-1),t+=` +`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){let p=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,p),t="\r"+t,n.piece.length===0&&d.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);let h=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let f=n;for(let g=0;g<h.length;g++)f=this.rbInsertRight(f,h[g]);this.deleteNodes(d)}else this.insertContentToNodeRight(t,n)}else{let n=this.createNewPieces(t),s=this.rbInsertLeft(null,n[0]);for(let o=1;o<n.length;o++)s=this.rbInsertRight(s,n[o])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===Me)return;let i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,o=n.node;if(s===o){let h=this.positionInBuffer(s,i.remainder),f=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){let g=s.next();Bb(this,s),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(s,f),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,h),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,h,f),this.computeBufferMetadata();return}let a=[],l=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,l),this._searchCache.validate(e),s.piece.length===0&&a.push(s);let c=this.positionInBuffer(o,n.remainder);this.deleteNodeHead(o,c),o.piece.length===0&&a.push(o);let d=s.next();for(let h=d;h!==Me&&h!==o;h=h.next())a.push(h);let u=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(u),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let o=t.piece,a={line:o.start.line+1,column:0},l=new ar(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),o.length-1);t.piece=l,e+=` +`,Da(this,t,-1,-1),t.piece.length===0&&i.push(t)}let n=this.createNewPieces(e),s=this.rbInsertLeft(t,n[n.length-1]);for(let o=n.length-2;o>=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` +`);let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),s=n;for(let o=1;o<i.length;o++)s=this.rbInsertRight(s,i[o]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){let n=e.piece,s=e.piece.bufferIndex,o=this._buffers[s].lineStarts,l=o[n.start.line]+n.start.column+t,c=n.start.line,d=n.end.line,u=0,h=0,f=0;for(;c<=d&&(u=c+(d-c)/2|0,f=o[u],u!==d);)if(h=o[u+1],l<f)d=u-1;else if(l>=h)c=u+1;else break;return i?(i.line=u,i.column=l-f,null):{line:u,column:l-f}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;let a=o-1;return this._buffers[e].buffer.charCodeAt(a)===13?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;t<e.length;t++)Bb(this,e[t])}createNewPieces(e){if(e.length>xa){let d=[];for(;e.length>xa;){const h=e.charCodeAt(xa-1);let f;h===13||h>=55296&&h<=56319?(f=e.substring(0,xa-1),e=e.substring(xa-1)):(f=e.substring(0,xa),e=e.substring(xa));let g=Aa(f);d.push(new ar(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new gd(f,g))}let u=Aa(e);return d.push(new ar(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new gd(e,u)),d}let t=this._buffers[0].buffer.length;const i=Aa(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&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 d=0;d<i.length;d++)i[d]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let d=0;d<i.length;d++)i[d]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length;let o=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[o],l={line:o,column:a},c=new ar(0,n,l,this.getLineFeedCnt(0,n,l),s-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="",s=this._searchCache.get2(e);if(s){i=s.node;let o=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+o,l+i.piece.length);else{let c=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(l+o,l+c-t)}}else{let o=0;const a=e;for(;i!==Me;)if(i.left!==Me&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),d=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:a-(e-1-i.lf_left)}),d.substring(u+l,u+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,d=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(d+l,d+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Me;){let o=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=o.substring(l,l+a-t),n}else{let a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=o.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Me;)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){let 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){let o=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(o!==s)return{index:o,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let 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,a=this.offsetInBuffer(i.bufferIndex,o),l=this.getLineFeedCnt(i.bufferIndex,i.start,o),c=l-n,d=a-s,u=i.length+d;e.piece=new ar(i.bufferIndex,i.start,o,l,u),Da(this,e,d,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,a=this.getLineFeedCnt(i.bufferIndex,o,i.end),l=this.offsetInBuffer(i.bufferIndex,o),c=a-n,d=s-l,u=i.length+d;e.piece=new ar(i.bufferIndex,o,i.end,a,u),Da(this,e,d,c)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,a=n.length,l=n.lineFeedCnt,c=t,d=this.getLineFeedCnt(n.bufferIndex,n.start,c),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new ar(n.bufferIndex,n.start,c,d,u),Da(this,e,u-a,d-l);let h=new ar(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),f=this.rbInsertRight(e,h);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` +`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Aa(t,!1);for(let f=0;f<s.length;f++)s[f]+=n;if(i){let f=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-f}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const o=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[o],l={line:o,column:a},c=e.piece.length+t.length,d=e.piece.lineFeedCnt,u=this.getLineFeedCnt(0,e.piece.start,l),h=u-d;e.piece=new ar(e.piece.bufferIndex,e.piece.start,l,u,c),this._lastChangeBufferPos=l,Da(this,e,t.length,h)}nodeAt(e){let t=this.root,i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==Me;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;let s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else 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!==Me;)if(i.left!==Me&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let 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}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let 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}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Me;){if(i.piece.lineFeedCnt>0){let s=this.getAccumulatedValue(i,0),o=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:o}}else if(i.piece.length>=t-1){let s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let 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&&this._EOL===` +`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Me||e.piece.lineFeedCnt===0)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Me||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i=[],n=this._buffers[e.piece.bufferIndex].lineStarts,s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new ar(e.piece.bufferIndex,e.piece.start,s,a,o),Da(this,e,-1,-1),e.piece.length===0&&i.push(e);let l={line:t.piece.start.line+1,column:0};const c=t.piece.length-1,d=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new ar(t.piece.bufferIndex,l,t.piece.end,d,c),Da(this,t,-1,-1),t.piece.length===0&&i.push(t);let u=this.createNewPieces(`\r +`);this.rbInsertRight(e,u[0]);for(let h=0;h<i.length;h++)Bb(this,i[h])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let i=t.next();if(this.startWithLF(i)){if(e+=` +`,i.piece.length===1)Bb(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},o=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new ar(n.bufferIndex,s,n.end,a,o),Da(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===Me)return t(Me);let i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===Me)return"";let t=this._buffers[e.piece.bufferIndex],i,n=e.piece,s=this.offsetInBuffer(n.bufferIndex,n.start),o=this.offsetInBuffer(n.bufferIndex,n.end);return i=t.buffer.substring(s,o),i}getPieceContent(e){let t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){let i=new lL(t,1);if(i.left=Me,i.right=Me,i.parent=Me,i.size_left=0,i.lf_left=0,this.root===Me)this.root=i,i.color=0;else if(e.right===Me)e.right=i,i.parent=e;else{let s=oA(e.right);s.left=i,i.parent=s}return KO(this,i),i}rbInsertLeft(e,t){let i=new lL(t,1);if(i.left=Me,i.right=Me,i.parent=Me,i.size_left=0,i.lf_left=0,this.root===Me)this.root=i,i.color=0;else if(e.left===Me)e.left=i,i.parent=e;else{let n=NW(e.left);n.right=i,i.parent=n}return KO(this,i),i}}function Hf(r){let e=0,t=0,i=0,n=0;for(let s=0,o=r.length;s<o;s++){const a=r.charCodeAt(s);a===13?(e===0&&(t=s),e++,s+1<o&&r.charCodeAt(s+1)===10?(n|=2,s++):n|=3,i=s+1):a===10&&(n|=1,e===0&&(t=s),e++,i=s+1)}return e===0&&(t=r.length),[e,t,r.length-i,n]}function ZO(r){return(r<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const Ea=new Uint32Array(0).buffer;class A1{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1];if(i.startLineNumber+i.tokens.length-1+1===e){i.tokens.push(t);return}}this.tokens.push(new tZ(e,[t]))}}class Ew{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return e===0?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(e===0)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new k(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),s=this._getDeltaLine(n);if(s<e)t=n+1;else if(s>e)i=n-1;else{let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let a=n;for(;a<i&&this._getDeltaLine(a+1)===e;)a++;return new XO(this._tokens.subarray(4*o,4*a+4))}}return this._getDeltaLine(t)===e?new XO(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const s=this._tokens,o=this._tokenCount;let a=0,l=!1,c=0;for(let d=0;d<o;d++){const u=4*d,h=s[u],f=s[u+1],g=s[u+2],p=s[u+3];if((h>e||h===e&&g>=t)&&(h<i||h===i&&f<=n))l=!0;else{if(a===0&&(c=h),l){const _=4*a;s[_]=h-c,s[_+1]=f,s[_+2]=g,s[_+3]=p}a++}}return this._tokenCount=a,c}split(e,t,i,n){const s=this._tokens,o=this._tokenCount;let a=[],l=[],c=a,d=0,u=0;for(let h=0;h<o;h++){const f=4*h,g=s[f],p=s[f+1],_=s[f+2],v=s[f+3];if(g>e||g===e&&_>=t){if(g<i||g===i&&p<=n)continue;c!==l&&(c=l,d=0,u=g)}c[d++]=g-u,c[d++]=p,c[d++]=_,c[d++]=v}return[new Ew(new Uint32Array(a)),new Ew(new Uint32Array(l)),u]}acceptDeleteRange(e,t,i,n,s){const o=this._tokens,a=this._tokenCount,l=n-t;let c=0,d=!1;for(let u=0;u<a;u++){const h=4*u;let f=o[h],g=o[h+1],p=o[h+2];const _=o[h+3];if(f<t||f===t&&p<=i){c++;continue}else if(f===t&&g<i)f===n&&p>s?p-=s-i:p=i;else if(f===t&&g===i)if(f===n&&p>s)p-=s-i;else{d=!0;continue}else if(f<n||f===n&&g<s)if(f===n&&p>s)f===t?(g=i,p=g+(p-s)):(g=0,p=g+(p-s));else{d=!0;continue}else if(f>n){if(l===0&&!d){c=a;break}f-=l}else if(f===n&&g>=s)e&&f===0&&(g+=e,p+=e),f-=l,g-=s-i,p-=s-i;else throw new Error("Not possible!");const v=4*c;o[v]=f,o[v+1]=g,o[v+2]=p,o[v+3]=_,c++}this._tokenCount=c}acceptInsertText(e,t,i,n,s,o){const a=i===0&&n===1&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),l=this._tokens,c=this._tokenCount;for(let d=0;d<c;d++){const u=4*d;let h=l[u],f=l[u+1],g=l[u+2];if(!(h<e||h===e&&g<t)){if(h===e&&g===t)if(a)g+=1;else continue;else if(h===e&&f<t&&t<g)i===0?g+=n:g=t;else{if(h===e&&f===t&&a)continue;if(h===e)if(h+=i,i===0)f+=n,g+=n;else{const p=g-f;f=s+(f-t),g=f+p}else h+=i}l[u]=h,l[u+1]=f,l[u+2]=g}}}}class XO{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class kw{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 k(this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn)}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 kw(this.startLineNumber,n),new kw(this.startLineNumber+o,s)]}applyEdit(e,t){const[i,n,s]=Hf(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 U(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 s=i-t;this.startLineNumber-=s;return}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this.startLineNumber=0,this.tokens.clear();return}if(t<0){const s=-t;this.startLineNumber-=s,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(t===0&&i===0)return;const o=e.lineNumber-this.startLineNumber;if(o<0){this.startLineNumber+=t;return}const a=this.tokens.getMaxDeltaLine();o>=a+1||this.tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class tZ{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function ka(r){return r instanceof Uint32Array?r:new Uint32Array(r)}class dA{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),o=t[t.length-1].getRange();if(!s||!o)return e;i=e.plusRange(s).plusRange(o)}let n=null;for(let s=0,o=this._pieces.length;s<o;s++){const a=this._pieces[s];if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,o--;continue}if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){n=n||{index:s};continue}const[l,c]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,o++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Lm(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(i.length===0)return t;const n=dA._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const o=t.getCount(),a=s.getCount();let l=0,c=[],d=0,u=0;const h=(f,g)=>{f!==u&&(u=f,c[d++]=f,c[d++]=g)};for(let f=0;f<a;f++){const g=s.getStartCharacter(f),p=s.getEndCharacter(f),_=s.getMetadata(f),v=((_&1?2048:0)|(_&2?4096:0)|(_&4?8192:0)|(_&8?8372224:0)|(_&16?4286578688:0))>>>0,b=~v>>>0;for(;l<o&&t.getEndOffset(l)<=g;)h(t.getEndOffset(l),t.getMetadata(l)),l++;for(l<o&&t.getStartOffset(l)<g&&h(g,t.getMetadata(l));l<o&&t.getEndOffset(l)<p;)h(t.getEndOffset(l),t.getMetadata(l)&b|_&v),l++;if(l<o)h(p,t.getMetadata(l)&b|_&v),t.getEndOffset(l)===p&&l++;else{const C=Math.min(Math.max(0,l-1),o-1);h(p,t.getMetadata(C)&b|_&v)}}for(;l<o;)h(t.getEndOffset(l),t.getMetadata(l)),l++;return new Gi(new Uint32Array(c),t.getLineContent())}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let s=i+Math.floor((n-i)/2);if(e[s].endLineNumber<t)i=s+1;else if(e[s].startLineNumber>t)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}class Ur{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),n!==null&&n!==Ea)return new Gi(ka(n),i);let s=new Uint32Array(2);return s[0]=i.length,s[1]=ZO(e),new Gi(s,i)}static _massageTokens(e,t,i){const n=i?ka(i):null;if(t===0){let s=!1;if(n&&n.length>1&&(s=kn.getLanguageId(n[1])!==e),!s)return Ea}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=ZO(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let i=[];for(let n=0;n<t;n++)i[n]=null;this._lineTokens=Lm(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,s){const o=Ur._massageTokens(e,i,n);this._ensureLine(t);const a=this._lineTokens[t];return this._lineTokens[t]=o,s?!Ur._equals(a,o):!1}static _equals(e,t){if(!e||!t)return!e&&!t;const i=ka(e),n=ka(t);if(i.length!==n.length)return!1;for(let s=0,o=i.length;s<o;s++)if(i[s]!==n[s])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new U(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=Ur._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=Ur._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=Ur._deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=Ur._append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(t===0&&i===0)return;const n=e.lineNumber-1;if(!(n>=this._len)){if(t===0){this._lineTokens[n]=Ur._insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=Ur._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=Ur._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}static _deleteBeginning(e,t){return e===null||e===Ea?e:Ur._delete(e,0,t)}static _deleteEnding(e,t){if(e===null||e===Ea)return e;const i=ka(e),n=i[i.length-2];return Ur._delete(e,t,n)}static _delete(e,t,i){if(e===null||e===Ea||t===i)return e;const n=ka(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return Ea;const o=Gi.findIndexInTokensArray(n,t),a=o>0?n[o-1<<1]:0,l=n[o<<1];if(i<l){const f=i-t;for(let g=o;g<s;g++)n[g<<1]-=f;return e}let c,d;a!==t?(n[o<<1]=t,c=o+1<<1,d=t):(c=o<<1,d=a);const u=i-t;for(let f=o+1;f<s;f++){const g=n[f<<1]-u;g>d&&(n[c++]=g,n[c++]=n[(f<<1)+1],d=g)}if(c===n.length)return e;let h=new Uint32Array(c);return h.set(n.subarray(0,c),0),h.buffer}static _append(e,t){if(t===Ea)return e;if(e===Ea)return t;if(e===null)return e;if(t===null)return null;const i=ka(e),n=ka(t),s=n.length>>>1;let o=new Uint32Array(i.length+n.length);o.set(i,0);let a=i.length;const l=i[i.length-2];for(let c=0;c<s;c++)o[a++]=n[c<<1]+l,o[a++]=n[(c<<1)+1];return o.buffer}static _insert(e,t,i){if(e===null||e===Ea)return e;const n=ka(e),s=n.length>>>1;let o=Gi.findIndexInTokensArray(n,t);o>0&&n[o-1<<1]===t&&o--;for(let a=o;a<s;a++)n[a<<1]+=i;return e}}class Cf extends Z{constructor(e,t,i,n,s,o,a){super();this._onDidChangeContent=this._register(new H),this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new eZ(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t;const n=this.getPositionAt(e),s=this.getPositionAt(i);return new k(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let o=n;o<=s;o++){const a=this.getLineContent(o),l=o===n?e.startColumn-1:0,c=o===s?e.endColumn-1:a.length;for(let d=l;d<c;d++)qi(a.charCodeAt(d))?(i=i+1,d=d+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=pr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Jo(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return` +`;case 2:return`\r +`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,o=this._mightContainNonBasicASCII,a=!0,l=[];for(let p=0;p<e.length;p++){let _=e[p];a&&_._isTracked&&(a=!1);let v=_.range;if(_.text){let S=!0;o||(S=!yD(_.text),o=S),!n&&S&&(n=Gy(_.text)),!s&&S&&(s=m3(_.text))}let b="",C=0,y=0,E=0;if(_.text){let S;[C,y,E,S]=Hf(_.text);const w=this.getEOL();S===0||S===(w===`\r +`?2:1)?b=_.text:b=_.text.replace(/\r\n|\r|\n/g,w)}l[p]={sortIndex:p,identifier:_.identifier||null,range:v,rangeOffset:this.getOffsetAt(v.startLineNumber,v.startColumn),rangeLength:this.getValueLengthInRange(v),text:b,eolCount:C,firstLineLength:y,lastLineLength:E,forceMoveMarkers:Boolean(_.forceMoveMarkers),isAutoWhitespaceEdit:_.isAutoWhitespaceEdit||!1}}l.sort(Cf._sortOpsAscending);let c=!1;for(let p=0,_=l.length-1;p<_;p++){let v=l[p].range.getEndPosition(),b=l[p+1].range.getStartPosition();if(b.isBeforeOrEqual(v)){if(b.isBefore(v))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));let d=i||t?Cf._getInverseEditRanges(l):[],u=[];if(t)for(let p=0;p<l.length;p++){let _=l[p],v=d[p];if(_.isAutoWhitespaceEdit&&_.range.isEmpty())for(let b=v.startLineNumber;b<=v.endLineNumber;b++){let C="";b===v.startLineNumber&&(C=this.getLineContent(_.range.startLineNumber),pr(C)!==-1)||u.push({lineNumber:b,oldContent:C})}}let h=null;if(i){let p=0;h=[];for(let _=0;_<l.length;_++){const v=l[_],b=d[_],C=this.getValueInRange(v.range),y=v.rangeOffset+p;p+=v.text.length-C.length,h[_]={sortIndex:v.sortIndex,identifier:v.identifier,range:b,text:C,textChange:new nn(v.rangeOffset,C,y,v.text)}}c||h.sort((_,v)=>_.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const f=this._doApplyEdits(l);let g=null;if(t&&u.length>0){u.sort((p,_)=>_.lineNumber-p.lineNumber),g=[];for(let p=0,_=u.length;p<_;p++){let v=u[p].lineNumber;if(p>0&&u[p-1].lineNumber===v)continue;let b=u[p].oldContent,C=this.getLineContent(v);C.length===0||C===b||pr(C)!==-1||g.push(v)}}return this._onDidChangeContent.fire(),new dq(h,f,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 k(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,a=i.startColumn;const l=[];for(let f=0,g=e.length;f<g;f++){const p=e[f],_=p.range;t=t||p.forceMoveMarkers,l.push(this.getValueInRange(new k(o,a,_.startLineNumber,_.startColumn))),p.text.length>0&&l.push(p.text),o=_.endLineNumber,a=_.endColumn}const c=l.join(""),[d,u,h]=Hf(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:d,firstLineLength:u,lastLineLength:h,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(Cf._sortOpsDescending);let t=[];for(let i=0;i<e.length;i++){let n=e[i];const s=n.range.startLineNumber,o=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(s===a&&o===l&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new k(s,o,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){let t=[],i=0,n=0,s=null;for(let o=0,a=e.length;o<a;o++){let l=e[o],c,d;s?s.range.endLineNumber===l.range.startLineNumber?(c=i,d=n+(l.range.startColumn-s.range.endColumn)):(c=i+(l.range.startLineNumber-s.range.endLineNumber),d=l.range.startColumn):(c=l.range.startLineNumber,d=l.range.startColumn);let u;if(l.text.length>0){const h=l.eolCount+1;h===1?u=new k(c,d,c,d+l.firstLineLength):u=new k(c,d,c+h-1,l.lastLineLength+1)}else u=new k(c,d,c,d);i=u.endLineNumber,n=u.endColumn,t.push(u),s=l}return t}static _sortOpsAscending(e,t){let i=k.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=k.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class iZ{constructor(e,t,i,n,s,o,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` +`:`\r +`:i>t/2?`\r +`:` +`}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&(t===`\r +`&&(this._cr>0||this._lf>0)||t===` +`&&(this._cr>0||this._crlf>0)))for(let s=0,o=i.length;s<o;s++){let a=i[s].buffer.replace(/\r\n|\r|\n/g,t),l=Aa(a);i[s]=new gd(a,l)}const n=new Cf(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class nZ{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&SD(e)&&(this.BOM=Dj,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=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&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=XY(this._tmpLineStarts,e);this.chunks.push(new gd(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=Gy(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=m3(e))}finish(e=!0){return this._finish(),new iZ(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=Aa(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class rZ{constructor(){this.changeType=1}}class fo{constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}static applyInjectedText(e,t){if(!t||t.length===0)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 fo(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new fo(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}}class QO{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class sZ{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class oZ{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class aZ{constructor(){this.changeType=5}}class Bd{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<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,s=e.isUndoing||t.isUndoing,o=e.isRedoing||t.isRedoing;return new Bd(i,n,s,o)}}class OW{constructor(e){this.changes=e}}class Lw{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=Bd.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=Lw._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new Lw(t,i)}static _mergeChangeEvents(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.eol,s=t.versionId,o=e.isUndoing||t.isUndoing,a=e.isRedoing||t.isRedoing,l=e.isFlush||t.isFlush;return{changes:i,eol:n,versionId:s,isUndoing:o,isRedoing:a,isFlush:l}}}class lZ{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len?this._valid[e]:!1}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){for(;e>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let i=[],n=[];for(let s=0;s<t;s++)i[s]=null,n[s]=!1;this._beginState=Lm(this._beginState,e,i),this._valid=Lm(this._valid,e,n),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,i){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const n=this.getBeginState(t+1);if(n===null||!i.equals(n)){this._setBeginState(t+1,i),this._invalidateLine(t+1);return}let s=t+1;for(;s<e&&this._isValid(s);)s++;this._invalidLineStartIndex=s}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const i=e.endLineNumber-e.startLineNumber,s=Math.min(i,t);for(let o=s;o>=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new U(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class cZ extends Z{constructor(e){super();this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new lZ,this._tokenizationSupport=null,this._register(Qt.onDidChange(t=>{const i=this._textModel.getLanguageIdentifier();t.changedLanguages.indexOf(i.language)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeContentFast(t=>{if(t.isFlush){this._resetTokenizationState();return}for(let i=0,n=t.changes.length;i<n;i++){const s=t.changes[i],[o]=Hf(s.text);this._tokenizationStateStore.applyEdits(s.range,o)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=dZ(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&RE(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(){const e=this._textModel.getLineCount(),t=1,i=new A1,n=sa.create(!1);let s=-1;for(;this._hasLinesToTokenize()&&!(n.elapsed()>t||(s=this._tokenizeOneInvalidLine(i),s>=e)););this._beginBackgroundTokenization(),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new A1;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new A1;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return e>t?!1:e<t||this._textModel.getLineLength(e)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageIdentifier(),n=this._textModel.getLineCount(),s=t-1;for(let o=this._tokenizationStateStore.invalidLineStartIndex;o<=s;o++){const a=this._textModel.getLineContent(o+1),l=this._tokenizationStateStore.getBeginState(o),c=N1(i,this._tokenizationSupport,a,!0,l);e.add(o+1,c.tokens),this._tokenizationStateStore.setEndState(n,o,c.endState),o=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationSupport||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t),s=[],o=null;for(let c=t-1;n>0&&c>=1;c--){let d=this._textModel.getLineFirstNonWhitespaceColumn(c);if(d!==0&&d<n){if(o=this._tokenizationStateStore.getBeginState(c-1),o)break;s.push(this._textModel.getLineContent(c)),n=d}}o||(o=this._tokenizationSupport.getInitialState());const a=this._textModel.getLanguageIdentifier();let l=o;for(let c=s.length-1;c>=0;c--)l=N1(a,this._tokenizationSupport,s[c],!1,l).endState;for(let c=t;c<=i;c++){let d=this._textModel.getLineContent(c),u=N1(a,this._tokenizationSupport,d,!0,l);e.add(c,u.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=u.endState}}}function dZ(r){const e=r.getLanguageIdentifier();let t=r.isTooLargeForTokenization()?null:Qt.get(e.language),i=null;if(t)try{i=t.getInitialState()}catch(n){Fe(n),t=null}return[t,i]}function N1(r,e,t,i,n){let s=null;if(e)try{s=e.tokenize2(t,i,n.clone(),0)}catch(o){Fe(o)}return s||(s=OD(r.id,t,n,0)),Gi.convertToEndOffset(s.tokens,t.length),s}function ac(r,e){const t=Math.pow(10,e);return Math.round(r*t)/t}class Je{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=ac(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 Ys{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=ac(Math.max(Math.min(1,t),0),3),this.l=ac(Math.max(Math.min(1,i),0),3),this.a=ac(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),a=Math.min(t,i,n);let l=0,c=0;const d=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(d<=.5?u/(2*d):u/(2-2*d),1),o){case t:l=(i-n)/u+(i<n?6:0);break;case i:l=(n-t)/u+2;break;case n:l=(t-i)/u+4;break}l*=60,l=Math.round(l)}return new Ys(l,c,d,s)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?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,a,l;if(i===0)o=a=l=n;else{const c=n<.5?n*(1+i):n+i-n*i,d=2*n-c;o=Ys._hue2rgb(d,c,t+1/3),a=Ys._hue2rgb(d,c,t),l=Ys._hue2rgb(d,c,t-1/3)}return new Je(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}}class Yo{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=ac(Math.max(Math.min(1,t),0),3),this.v=ac(Math.max(Math.min(1,i),0),3),this.a=ac(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=Math.min(t,i,n),a=s-o,l=s===0?0:a/s;let c;return a===0?c=0:s===t?c=((i-n)/a%6+6)%6:s===i?c=(n-t)/a+2:c=(t-i)/a+4,new Yo(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,o=n*i,a=o*(1-Math.abs(t/60%2-1)),l=n-o;let[c,d,u]=[0,0,0];return t<60?(c=o,d=a):t<120?(c=a,d=o):t<180?(d=o,u=a):t<240?(d=a,u=o):t<300?(c=a,u=o):t<=360&&(c=o,u=a),c=Math.round((c+l)*255),d=Math.round((d+l)*255),u=Math.round((u+l)*255),new Je(c,d,u,s)}}class q{constructor(e){if(e)if(e instanceof Je)this.rgba=e;else if(e instanceof Ys)this._hsla=e,this.rgba=Ys.toRGBA(e);else if(e instanceof Yo)this._hsva=e,this.rgba=Yo.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(e){return q.Format.CSS.parseHex(e)||q.red}get hsla(){return this._hsla?this._hsla:Ys.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Yo.fromRGBA(this.rgba)}equals(e){return!!e&&Je.equals(this.rgba,e.rgba)&&Ys.equals(this.hsla,e.hsla)&&Yo.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=q._relativeLuminanceForComponent(this.rgba.r),t=q._relativeLuminanceForComponent(this.rgba.g),i=q._relativeLuminanceForComponent(this.rgba.b),n=.2126*e+.7152*t+.0722*i;return ac(n,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t<i}lighten(e){return new q(new Ys(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new q(new Ys(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:s}=this.rgba;return new q(new Je(t,i,n,s*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new q(new Je(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=q.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(n-s)/n,e.darken(i)}}q.white=new q(new Je(255,255,255,1));q.black=new q(new Je(0,0,0,1));q.red=new q(new Je(255,0,0,1));q.blue=new q(new Je(0,0,255,1));q.cyan=new q(new Je(0,255,255,1));q.lightgrey=new q(new Je(211,211,211,1));q.transparent=new q(new Je(0,0,0,0));(function(r){(function(e){(function(t){function i(f){return f.rgba.a===1?`rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})`:r.Format.CSS.formatRGBA(f)}t.formatRGB=i;function n(f){return`rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`}t.formatRGBA=n;function s(f){return f.hsla.a===1?`hsl(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%)`:r.Format.CSS.formatHSLA(f)}t.formatHSL=s;function o(f){return`hsla(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`}t.formatHSLA=o;function a(f){const g=f.toString(16);return g.length!==2?"0"+g:g}function l(f){return`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}`}t.formatHex=l;function c(f,g=!1){return g&&f.rgba.a===1?r.Format.CSS.formatHex(f):`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}${a(Math.round(f.rgba.a*255))}`}t.formatHexA=c;function d(f){return f.isOpaque()?r.Format.CSS.formatHex(f):r.Format.CSS.formatRGBA(f)}t.format=d;function u(f){const g=f.length;if(g===0||f.charCodeAt(0)!==35)return null;if(g===7){const p=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),_=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),v=16*h(f.charCodeAt(5))+h(f.charCodeAt(6));return new r(new Je(p,_,v,1))}if(g===9){const p=16*h(f.charCodeAt(1))+h(f.charCodeAt(2)),_=16*h(f.charCodeAt(3))+h(f.charCodeAt(4)),v=16*h(f.charCodeAt(5))+h(f.charCodeAt(6)),b=16*h(f.charCodeAt(7))+h(f.charCodeAt(8));return new r(new Je(p,_,v,b/255))}if(g===4){const p=h(f.charCodeAt(1)),_=h(f.charCodeAt(2)),v=h(f.charCodeAt(3));return new r(new Je(16*p+p,16*_+_,16*v+v))}if(g===5){const p=h(f.charCodeAt(1)),_=h(f.charCodeAt(2)),v=h(f.charCodeAt(3)),b=h(f.charCodeAt(4));return new r(new Je(16*p+p,16*_+_,16*v+v,(16*b+b)/255))}return null}t.parseHex=u;function h(f){switch(f){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(r.Format||(r.Format={}))})(q||(q={}));const Xv=new Array;class wi{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&t.length===0){let i=wi.cache[e];return i||(i=new wi(e,t),wi.cache[e]=i),i}return new wi(e,t)}static getEmpty(){return this.empty}add(e,t){const i=t.getKey(e);let n=i>>5;if(n===0){const o=1<<i|this.items;return o===this.items?this:wi.create(o,this.additionalItems)}n--;const s=this.additionalItems.slice(0);for(;s.length<n;)s.push(0);return s[n]|=1<<(i&31),wi.create(this.items,s)}merge(e){const t=this.items|e.items;if(this.additionalItems===Xv&&e.additionalItems===Xv)return t===this.items?this:t===e.items?e:wi.create(t,Xv);const i=new Array;for(let n=0;n<Math.max(this.additionalItems.length,e.additionalItems.length);n++){const s=this.additionalItems[n]||0,o=e.additionalItems[n]||0;i.push(s|o)}return wi.create(t,i)}intersects(e){if((this.items&e.items)!==0)return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if((this.additionalItems[t]&e.additionalItems[t])!==0)return!0;return!1}}wi.cache=new Array(129);wi.empty=wi.create(0,Xv);const JO={getKey(r){return r}};class uZ{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return t===void 0&&(t=this.items.size,this.items.set(e,t)),t}}const MW={ColorContribution:"base.contributions.colors"};class hZ{constructor(){this._onDidChangeSchema=new H,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){let o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;let a={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(a.deprecationMessage=s),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const n=i.defaults[t.type];return Na(n,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,i)=>{let n=t.indexOf(".")===-1?0:1,s=i.indexOf(".")===-1?0:1;return n!==s?n-s:t.localeCompare(i)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` +`)}}const C0=new hZ;_i.add(MW.ColorContribution,C0);function V(r,e,t,i,n){return C0.registerColor(r,e,t,i,n)}const Ae=V("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},m("foreground","Overall foreground color. This color is only used if not overridden by a component.")),fZ=V("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},m("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),R1=V("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},m("iconForeground","The default color for icons in the workbench.")),yc=V("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},m("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),gi=V("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},m("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),Tn=V("contrastActiveBorder",{light:null,dark:null,hc:yc},m("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),Z_=V("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkForeground","Foreground color for links in text.")),X_=V("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),uA=V("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:q.black},m("textCodeBlockBackground","Background color for code blocks in text.")),Sc=V("widget.shadow",{dark:Ut(q.black,.36),light:Ut(q.black,.16),hc:null},m("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),hA=V("input.background",{dark:"#3C3C3C",light:q.white,hc:q.black},m("inputBoxBackground","Input box background.")),fA=V("input.foreground",{dark:Ae,light:Ae,hc:Ae},m("inputBoxForeground","Input box foreground.")),gA=V("input.border",{dark:null,light:null,hc:gi},m("inputBoxBorder","Input box border.")),cL=V("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:gi},m("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),dL=V("inputOption.activeBackground",{dark:Ut(yc,.4),light:Ut(yc,.2),hc:q.transparent},m("inputOption.activeBackground","Background color of activated options in input fields.")),uL=V("inputOption.activeForeground",{dark:q.white,light:q.black,hc:null},m("inputOption.activeForeground","Foreground color of activated options in input fields.")),pA=V("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:q.black},m("inputValidationInfoBackground","Input validation background color for information severity.")),mA=V("inputValidation.infoForeground",{dark:null,light:null,hc:null},m("inputValidationInfoForeground","Input validation foreground color for information severity.")),_A=V("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:gi},m("inputValidationInfoBorder","Input validation border color for information severity.")),PW=V("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:q.black},m("inputValidationWarningBackground","Input validation background color for warning severity.")),FW=V("inputValidation.warningForeground",{dark:null,light:null,hc:null},m("inputValidationWarningForeground","Input validation foreground color for warning severity.")),BW=V("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:gi},m("inputValidationWarningBorder","Input validation border color for warning severity.")),WW=V("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:q.black},m("inputValidationErrorBackground","Input validation background color for error severity.")),VW=V("inputValidation.errorForeground",{dark:null,light:null,hc:null},m("inputValidationErrorForeground","Input validation foreground color for error severity.")),HW=V("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:gi},m("inputValidationErrorBorder","Input validation border color for error severity.")),O1=V("dropdown.background",{dark:"#3C3C3C",light:q.white,hc:q.black},m("dropdownBackground","Dropdown background.")),eM=V("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:q.white},m("dropdownForeground","Dropdown foreground.")),gZ=V("button.foreground",{dark:q.white,light:q.white,hc:q.white},m("buttonForeground","Button foreground color.")),hL=V("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},m("buttonBackground","Button background color.")),pZ=V("button.hoverBackground",{dark:KW(hL,.2),light:GW(hL,.2),hc:null},m("buttonHoverBackground","Button background color when hovering.")),Yp=V("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:q.black},m("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Zp=V("badge.foreground",{dark:q.white,light:"#333",hc:q.white},m("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),w0=V("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},m("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),Qv=V("scrollbarSlider.background",{dark:q.fromHex("#797979").transparent(.4),light:q.fromHex("#646464").transparent(.4),hc:Ut(gi,.6)},m("scrollbarSliderBackground","Scrollbar slider background color.")),Jv=V("scrollbarSlider.hoverBackground",{dark:q.fromHex("#646464").transparent(.7),light:q.fromHex("#646464").transparent(.7),hc:Ut(gi,.8)},m("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),eC=V("scrollbarSlider.activeBackground",{dark:q.fromHex("#BFBFBF").transparent(.4),light:q.fromHex("#000000").transparent(.6),hc:gi},m("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),mZ=V("progressBar.background",{dark:q.fromHex("#0E70C0"),light:q.fromHex("#0E70C0"),hc:gi},m("progressBarBackground","Background color of the progress bar that can show for long running operations.")),_Z=V("editorError.background",{dark:null,light:null,hc:null},m("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Xp=V("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},m("editorError.foreground","Foreground color of error squigglies in the editor.")),$W=V("editorError.border",{dark:null,light:null,hc:q.fromHex("#E47777").transparent(.8)},m("errorBorder","Border color of error boxes in the editor.")),bZ=V("editorWarning.background",{dark:null,light:null,hc:null},m("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),il=V("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},m("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),y0=V("editorWarning.border",{dark:null,light:null,hc:q.fromHex("#FFCC00").transparent(.8)},m("warningBorder","Border color of warning boxes in the editor.")),vZ=V("editorInfo.background",{dark:null,light:null,hc:null},m("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),so=V("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},m("editorInfo.foreground","Foreground color of info squigglies in the editor.")),bA=V("editorInfo.border",{dark:null,light:null,hc:q.fromHex("#3794FF").transparent(.8)},m("infoBorder","Border color of info boxes in the editor.")),CZ=V("editorHint.foreground",{dark:q.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},m("editorHint.foreground","Foreground color of hint squigglies in the editor.")),wZ=V("editorHint.border",{dark:null,light:null,hc:q.fromHex("#eeeeee").transparent(.8)},m("hintBorder","Border color of hint boxes in the editor.")),ts=V("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:q.black},m("editorBackground","Editor background color.")),lc=V("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:q.white},m("editorForeground","Editor default foreground color.")),Mr=V("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},m("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),nl=V("editorWidget.foreground",{dark:Ae,light:Ae,hc:Ae},m("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Wd=V("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:gi},m("editorWidgetBorder","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.")),yZ=V("editorWidget.resizeBorder",{light:null,dark:null,hc:null},m("editorWidgetResizeBorder","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.")),tM=V("quickInput.background",{dark:Mr,light:Mr,hc:Mr},m("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),SZ=V("quickInput.foreground",{dark:nl,light:nl,hc:nl},m("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),xZ=V("quickInputTitle.background",{dark:new q(new Je(255,255,255,.105)),light:new q(new Je(0,0,0,.06)),hc:"#000000"},m("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),EZ=V("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:q.white},m("pickerGroupForeground","Quick picker color for grouping labels.")),kZ=V("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:q.white},m("pickerGroupBorder","Quick picker color for grouping borders.")),LZ=V("keybindingLabel.background",{dark:new q(new Je(128,128,128,.17)),light:new q(new Je(221,221,221,.4)),hc:q.transparent},m("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),TZ=V("keybindingLabel.foreground",{dark:q.fromHex("#CCCCCC"),light:q.fromHex("#555555"),hc:q.white},m("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),IZ=V("keybindingLabel.border",{dark:new q(new Je(51,51,51,.6)),light:new q(new Je(204,204,204,.4)),hc:new q(new Je(111,195,223))},m("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),DZ=V("keybindingLabel.bottomBorder",{dark:new q(new Je(68,68,68,.6)),light:new q(new Je(187,187,187,.4)),hc:new q(new Je(111,195,223))},m("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),cc=V("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},m("editorSelectionBackground","Color of the editor selection.")),AZ=V("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},m("editorSelectionForeground","Color of the selected text for high contrast.")),vA=V("editor.inactiveSelectionBackground",{light:Ut(cc,.5),dark:Ut(cc,.5),hc:Ut(cc,.5)},m("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),CA=V("editor.selectionHighlightBackground",{light:rM(cc,ts,.3,.6),dark:rM(cc,ts,.3,.6),hc:null},m("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),NZ=V("editor.selectionHighlightBorder",{light:null,dark:null,hc:Tn},m("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),RZ=V("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},m("editorFindMatch","Color of the current search match.")),fL=V("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},m("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),OZ=V("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},m("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),MZ=V("editor.findMatchBorder",{light:null,dark:null,hc:Tn},m("editorFindMatchBorder","Border color of the current search match.")),PZ=V("editor.findMatchHighlightBorder",{light:null,dark:null,hc:Tn},m("findMatchHighlightBorder","Border color of the other search matches.")),FZ=V("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Ut(Tn,.4)},m("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),BZ=V("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},m("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),su=V("editorHoverWidget.background",{light:Mr,dark:Mr,hc:Mr},m("hoverBackground","Background color of the editor hover.")),wA=V("editorHoverWidget.foreground",{light:nl,dark:nl,hc:nl},m("hoverForeground","Foreground color of the editor hover.")),yA=V("editorHoverWidget.border",{light:Wd,dark:Wd,hc:Wd},m("hoverBorder","Border color of the editor hover.")),WZ=V("editorHoverWidget.statusBarBackground",{dark:KW(su,.2),light:GW(su,.05),hc:Mr},m("statusBarBackground","Background color of the editor hover status bar.")),SA=V("editorLink.activeForeground",{dark:"#4E94CE",light:q.blue,hc:q.cyan},m("activeLinkForeground","Color of active links.")),Vd=V("editorInlayHint.foreground",{dark:Ut(Zp,.8),light:Ut(Zp,.8),hc:Zp},m("editorInlayHintForeground","Foreground color of inline hints")),Hd=V("editorInlayHint.background",{dark:Ut(Yp,.6),light:Ut(Yp,.3),hc:Yp},m("editorInlayHintBackground","Background color of inline hints")),VZ=V("editorInlayHint.typeForeground",{dark:Vd,light:Vd,hc:Vd},m("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),HZ=V("editorInlayHint.typeBackground",{dark:Hd,light:Hd,hc:Hd},m("editorInlayHintBackgroundTypes","Background color of inline hints for types")),$Z=V("editorInlayHint.parameterForeground",{dark:Vd,light:Vd,hc:Vd},m("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),UZ=V("editorInlayHint.parameterBackground",{dark:Hd,light:Hd,hc:Hd},m("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),zZ=V("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},m("editorLightBulbForeground","The color used for the lightbulb actions icon.")),jZ=V("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),gL=new q(new Je(155,185,85,.2)),pL=new q(new Je(255,0,0,.2)),UW=V("diffEditor.insertedTextBackground",{dark:gL,light:gL,hc:null},m("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),zW=V("diffEditor.removedTextBackground",{dark:pL,light:pL,hc:null},m("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),qZ=V("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},m("diffEditorInsertedOutline","Outline color for the text that got inserted.")),GZ=V("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},m("diffEditorRemovedOutline","Outline color for text that got removed.")),KZ=V("diffEditor.border",{dark:null,light:null,hc:gi},m("diffEditorBorder","Border color between the two text editors.")),YZ=V("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},m("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),ZZ=V("list.focusBackground",{dark:null,light:null,hc:null},m("listFocusBackground","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.")),XZ=V("list.focusForeground",{dark:null,light:null,hc:null},m("listFocusForeground","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.")),QZ=V("list.focusOutline",{dark:yc,light:yc,hc:Tn},m("listFocusOutline","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.")),dc=V("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},m("listActiveSelectionBackground","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.")),uc=V("list.activeSelectionForeground",{dark:q.white,light:q.white,hc:null},m("listActiveSelectionForeground","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.")),tC=V("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},m("listActiveSelectionIconForeground","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.")),JZ=V("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},m("listInactiveSelectionBackground","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.")),eX=V("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionForeground","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.")),tX=V("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionIconForeground","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.")),iX=V("list.inactiveFocusBackground",{dark:null,light:null,hc:null},m("listInactiveFocusBackground","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.")),nX=V("list.inactiveFocusOutline",{dark:null,light:null,hc:null},m("listInactiveFocusOutline","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.")),rX=V("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},m("listHoverBackground","List/Tree background when hovering over items using the mouse.")),sX=V("list.hoverForeground",{dark:null,light:null,hc:null},m("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),oX=V("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},m("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),wf=V("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:yc},m("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),M1=V("list.focusHighlightForeground",{dark:wf,light:MX(dc,wf,"#9DDDFF"),hc:wf},m("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),aX=V("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:q.black},m("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),lX=V("listFilterWidget.outline",{dark:q.transparent,light:q.transparent,hc:"#f38518"},m("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),cX=V("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:gi},m("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),dX=V("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),uX=V("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),iM=V("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,m("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),iC=V("quickInputList.focusForeground",{dark:uc,light:uc,hc:uc},m("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),nC=V("quickInputList.focusIconForeground",{dark:tC,light:tC,hc:tC},m("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),rC=V("quickInputList.focusBackground",{dark:Nm(iM,dc),light:Nm(iM,dc),hc:null},m("quickInput.listFocusBackground","Quick picker background color for the focused item.")),hX=V("menu.border",{dark:null,light:null,hc:gi},m("menuBorder","Border color of menus.")),fX=V("menu.foreground",{dark:eM,light:Ae,hc:eM},m("menuForeground","Foreground color of menu items.")),gX=V("menu.background",{dark:O1,light:O1,hc:O1},m("menuBackground","Background color of menu items.")),pX=V("menu.selectionForeground",{dark:uc,light:uc,hc:uc},m("menuSelectionForeground","Foreground color of the selected menu item in menus.")),mX=V("menu.selectionBackground",{dark:dc,light:dc,hc:dc},m("menuSelectionBackground","Background color of the selected menu item in menus.")),_X=V("menu.selectionBorder",{dark:null,light:null,hc:Tn},m("menuSelectionBorder","Border color of the selected menu item in menus.")),bX=V("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:gi},m("menuSeparatorBackground","Color of a separator menu item in menus.")),vX=V("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},m("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),CX=V("editor.snippetTabstopHighlightBackground",{dark:new q(new Je(124,124,124,.3)),light:new q(new Je(10,50,100,.2)),hc:new q(new Je(124,124,124,.3))},m("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),wX=V("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},m("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),yX=V("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},m("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),SX=V("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new q(new Je(10,50,100,.5)),hc:"#525252"},m("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),xA=V("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},m("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),jW=V("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),qW=V("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},m("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),S0=V("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},m("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),nM=V("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},m("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),xX=V("minimap.errorHighlight",{dark:new q(new Je(255,18,18,.7)),light:new q(new Je(255,18,18,.7)),hc:new q(new Je(255,50,50,1))},m("minimapError","Minimap marker color for errors.")),EX=V("minimap.warningHighlight",{dark:il,light:il,hc:y0},m("overviewRuleWarning","Minimap marker color for warnings.")),kX=V("minimap.background",{dark:null,light:null,hc:null},m("minimapBackground","Minimap background color.")),LX=V("minimap.foregroundOpacity",{dark:q.fromHex("#000f"),light:q.fromHex("#000f"),hc:q.fromHex("#000f")},m("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),TX=V("minimapSlider.background",{light:Ut(Qv,.5),dark:Ut(Qv,.5),hc:Ut(Qv,.5)},m("minimapSliderBackground","Minimap slider background color.")),IX=V("minimapSlider.hoverBackground",{light:Ut(Jv,.5),dark:Ut(Jv,.5),hc:Ut(Jv,.5)},m("minimapSliderHoverBackground","Minimap slider background color when hovering.")),DX=V("minimapSlider.activeBackground",{light:Ut(eC,.5),dark:Ut(eC,.5),hc:Ut(eC,.5)},m("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),AX=V("problemsErrorIcon.foreground",{dark:Xp,light:Xp,hc:Xp},m("problemsErrorIconForeground","The color used for the problems error icon.")),NX=V("problemsWarningIcon.foreground",{dark:il,light:il,hc:il},m("problemsWarningIconForeground","The color used for the problems warning icon.")),RX=V("problemsInfoIcon.foreground",{dark:so,light:so,hc:so},m("problemsInfoIconForeground","The color used for the problems info icon."));function OX(r,e){var t,i,n;switch(r.op){case 0:return(t=Na(r.value,e))===null||t===void 0?void 0:t.darken(r.factor);case 1:return(i=Na(r.value,e))===null||i===void 0?void 0:i.lighten(r.factor);case 2:return(n=Na(r.value,e))===null||n===void 0?void 0:n.transparent(r.factor);case 3:for(const a of r.values){const l=Na(a,e);if(l)return l}return;case 5:return Na(e.defines(r.if)?r.then:r.else,e);case 4:const s=Na(r.value,e);if(!s)return;const o=Na(r.background,e);return o?s.isDarkerThan(o)?q.getLighterColor(s,o,r.factor).transparent(r.transparency):q.getDarkerColor(s,o,r.factor).transparent(r.transparency):s.transparent(r.factor*r.transparency);default:throw eq()}}function GW(r,e){return{op:0,value:r,factor:e}}function KW(r,e){return{op:1,value:r,factor:e}}function Ut(r,e){return{op:2,value:r,factor:e}}function Nm(...r){return{op:3,values:r}}function MX(r,e,t){return{op:5,if:r,then:e,else:t}}function rM(r,e,t,i){return{op:4,value:r,background:e,factor:t,transparency:i}}function Na(r,e){if(r!==null){if(typeof r=="string")return r[0]==="#"?q.fromHex(r):e.getColor(r);if(r instanceof q)return r;if(typeof r=="object")return OX(r,e)}}const YW="vscode://schemas/workbench-colors";let ZW=_i.as(s0.JSONContribution);ZW.registerSchema(YW,C0.getColorSchema());const sM=new $t(()=>ZW.notifySchemaChanged(YW),200);C0.onDidChangeSchema(()=>{sM.isScheduled()||sM.schedule()});const PX=V("editor.lineHighlightBackground",{dark:null,light:null,hc:null},m("lineHighlight","Background color for the highlight of line at the cursor position.")),oM=V("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},m("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),FX=V("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},m("rangeHighlight","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),BX=V("editor.rangeHighlightBorder",{dark:null,light:null,hc:Tn},m("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),WX=V("editor.symbolHighlightBackground",{dark:fL,light:fL,hc:null},m("symbolHighlight","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),VX=V("editor.symbolHighlightBorder",{dark:null,light:null,hc:Tn},m("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),XW=V("editorCursor.foreground",{dark:"#AEAFAD",light:q.black,hc:q.white},m("caret","Color of the editor cursor.")),HX=V("editorCursor.background",null,m("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),$d=V("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},m("editorWhitespaces","Color of whitespace characters in the editor.")),x0=V("editorIndentGuide.background",{dark:$d,light:$d,hc:$d},m("editorIndentGuides","Color of the editor indentation guides.")),E0=V("editorIndentGuide.activeBackground",{dark:$d,light:$d,hc:$d},m("editorActiveIndentGuide","Color of the active editor indentation guides.")),QW=V("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:q.white},m("editorLineNumbers","Color of editor line numbers.")),P1=V("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:Tn},m("editorActiveLineNumber","Color of editor active line number"),!1,m("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),$X=V("editorLineNumber.activeForeground",{dark:P1,light:P1,hc:P1},m("editorActiveLineNumber","Color of editor active line number")),UX=V("editorRuler.foreground",{dark:"#5A5A5A",light:q.lightgrey,hc:q.white},m("editorRuler","Color of the editor rulers.")),zX=V("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},m("editorCodeLensForeground","Foreground color of editor CodeLens")),jX=V("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},m("editorBracketMatchBackground","Background color behind matching brackets")),JW=V("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:gi},m("editorBracketMatchBorder","Color for matching brackets boxes")),qX=V("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},m("editorOverviewRulerBorder","Color of the overview ruler border.")),GX=V("editorOverviewRuler.background",null,m("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),KX=V("editorGutter.background",{dark:ts,light:ts,hc:ts},m("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),YX=V("editorUnnecessaryCode.border",{dark:null,light:null,hc:q.fromHex("#fff").transparent(.8)},m("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),ZX=V("editorUnnecessaryCode.opacity",{dark:q.fromHex("#000a"),light:q.fromHex("#0007"),hc:null},m("unnecessaryCodeOpacity",`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.`)),e8=V("editorGhostText.border",{dark:null,light:null,hc:q.fromHex("#fff").transparent(.8)},m("editorGhostTextBorder","Border color of ghost text in the editor.")),t8=V("editorGhostText.foreground",{dark:q.fromHex("#ffffff56"),light:q.fromHex("#0007"),hc:null},m("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),F1=new q(new Je(0,122,204,.6)),XX=V("editorOverviewRuler.rangeHighlightForeground",{dark:F1,light:F1,hc:F1},m("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),QX=V("editorOverviewRuler.errorForeground",{dark:new q(new Je(255,18,18,.7)),light:new q(new Je(255,18,18,.7)),hc:new q(new Je(255,50,50,1))},m("overviewRuleError","Overview ruler marker color for errors.")),JX=V("editorOverviewRuler.warningForeground",{dark:il,light:il,hc:y0},m("overviewRuleWarning","Overview ruler marker color for warnings.")),eQ=V("editorOverviewRuler.infoForeground",{dark:so,light:so,hc:bA},m("overviewRuleInfo","Overview ruler marker color for infos.")),i8=V("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},m("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),n8=V("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},m("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),r8=V("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},m("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),s8=V("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),o8=V("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),a8=V("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),tQ=V("editorBracketHighlight.unexpectedBracket.foreground",{dark:new q(new Je(255,18,18,.8)),light:new q(new Je(255,18,18,.8)),hc:new q(new Je(255,50,50,1))},m("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));Et((r,e)=>{const t=r.getColor(ts);t&&e.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${t}; }`);const i=r.getColor(lc);i&&e.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const n=r.getColor(KX);n&&e.addRule(`.monaco-editor .margin { background-color: ${n}; }`);const s=r.getColor(FX);s&&e.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const o=r.getColor(BX);o&&e.addRule(`.monaco-editor .rangeHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${o}; }`);const a=r.getColor(WX);a&&e.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=r.getColor(VX);l&&e.addRule(`.monaco-editor .symbolHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${l}; }`);const c=r.getColor($d);c&&(e.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),e.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))});class iQ{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function nQ(r,e,t,i){return r!==t?oi(t-r,i):oi(0,i-e)}const hl=0;function rQ(r){return r===0}const Rr=Math.pow(2,26);function oi(r,e){return r*Rr+e}function Ud(r){const e=r,t=Math.floor(e/Rr),i=e-t*Rr;return new iQ(t,i)}function aM(r){return Math.floor(r/Rr)}function Fn(r,e){return e<Rr?r+e:r-r%Rr+e}function sQ(r,e){const t=r,i=e;if(i-t<=0)return hl;const s=Math.floor(t/Rr),o=Math.floor(i/Rr),a=i-o*Rr;if(s===o){const l=t-s*Rr;return oi(0,a-l)}else return oi(o-s,a)}function B1(r,e){return r<e}function Ql(r,e){return r<=e}function Vb(r,e){return r>=e}function Hb(r){return oi(r.lineNumber-1,r.column-1)}function Qp(r,e){const t=r,i=Math.floor(t/Rr),n=t-i*Rr,s=e,o=Math.floor(s/Rr),a=s-o*Rr;return new k(i+1,n+1,o+1,a+1)}function oQ(r){const e=aa(r);return oi(e.length-1,e[e.length-1].length)}class lM{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class aQ{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>EA.from(i))}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):this.documentLength;return sQ(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?oi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):oi(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Ud(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?oi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):oi(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(Ql(i,e)){this.nextEditIdx++;const n=Ud(i),s=Ud(this.translateOldToCur(t.endOffsetBeforeObj)),o=n.lineCount-s.lineCount;this.deltaOldToNewLineCount+=o;const a=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,l=n.columnCount-s.columnCount;this.deltaOldToNewColumnCount=a+l,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}else break}}}class EA{constructor(e,t,i){this.endOffsetBeforeObj=Ud(t),this.endOffsetAfterObj=Ud(Fn(e,i)),this.offsetObj=Ud(e)}static from(e){return new EA(e.startOffset,e.endOffset,e.newLength)}}class kA{constructor(e){this._length=e}get length(){return this._length}}class Rm extends kA{constructor(e,t,i,n,s){super(e);this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}static create(e,t,i){let n=e.length;return t&&(n=Fn(n,t.length)),i&&(n=Fn(n,i.length)),new Rm(n,e,t,i,t?t.missingOpeningBracketIds:wi.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=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e,t){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new Rm(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}}class da extends kA{constructor(e,t,i){super(e);this.listHeight=t,this._missingOpeningBracketIds=i}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=Fn(s,t.length),o=o.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=Fn(s,i.length),o=o.merge(i.missingOpeningBracketIds)}return n?new lQ(s,e.listHeight+1,e,t,i,o):new Om(s,e.listHeight+1,e,t,i,o)}static getEmpty(){return new cQ(hl,0,[],wi.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(e===0)return;const t=this.getChild(e-1),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const t=this.getChild(0),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e,t){if(e.intersects(this.missingOpeningBracketIds))return!1;let i=this,n;for(;i.kind===4&&(n=i.childrenLength)>0;)i=i.getChild(n-1);return i.canBeReused(e,t)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){const s=this.getChild(n);t=Fn(t,s.length),i=i.merge(s.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i}}class Om extends da{constructor(e,t,i,n,s,o){super(e,t,o);this._item1=i,this._item2=n,this._item3=s}get childrenLength(){return this._item3!==null?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:this._item1=t;return;case 1:this._item2=t;return;case 2:this._item3=t;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new Om(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class lQ extends Om{toMutable(){return new Om(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class Tw extends da{constructor(e,t,i,n){super(e,t,n);this._children=i}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new Tw(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class cQ extends Tw{toMutable(){return new Tw(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const dQ=[];class LA extends kA{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return dQ}deepClone(){return this}}class Wh extends LA{get kind(){return 0}get missingOpeningBracketIds(){return wi.getEmpty()}canBeReused(e,t){return!t}}class zd extends LA{constructor(e){super(e)}static create(e){const t=e,i=zd.cacheByLength.get(t);if(i)return i;const n=new zd(e);return zd.cacheByLength.set(t,n),n}get kind(){return 1}get missingOpeningBracketIds(){return wi.getEmpty()}canBeReused(e,t){return!1}}zd.cacheByLength=new Map;class uQ extends LA{constructor(e,t){super(t);this.missingOpeningBracketIds=e}get kind(){return 3}canBeReused(e,t){return!e.intersects(this.missingOpeningBracketIds)}}class Kl{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class hQ{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new fQ(this.textModel,this.bracketTokens),this._offset=hl,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return oi(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Fn(this._offset,e);const t=Ud(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=Fn(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class fQ{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,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const s=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=s.length,s}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;i<1e3;){const s=this.lineTokens,o=s.getCount();let a=null;if(this.lineTokenOffset<o){const l=s.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&l===s.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const c=kn.getTokenType(l)===0,d=s.getEndOffset(this.lineTokenOffset);if(c&&d!==this.lineCharOffset){const u=s.getLanguageId(this.lineTokenOffset),h=this.line.substring(this.lineCharOffset,d),f=this.bracketTokens.getSingleLanguageBracketTokens(u),g=f.regExpGlobal;if(g){g.lastIndex=0;const p=g.exec(h);p&&(a=f.getToken(p[0]),a&&(this.lineCharOffset+=p.index))}}if(i+=d-this.lineCharOffset,a)if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=a;break}else return this.lineCharOffset+=a.length,a;else this.lineTokenOffset++,this.lineCharOffset=d}else{if(this.lineIdx===this.textBufferLineCount-1)break;this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i++}}const n=nQ(e,t,this.lineIdx,this.lineCharOffset);return new Kl(n,0,-1,wi.getEmpty(),new Wh(n))}}class gQ{constructor(e,t){this.text=e,this._offset=hl,this.idx=0;const n=t.getRegExpStr()?new RegExp(t.getRegExpStr()+`| +`,"g"):null,s=[];let o,a=0,l=0,c=0,d=0;const u=new Array;for(let g=0;g<60;g++)u.push(new Kl(oi(0,g),0,-1,wi.getEmpty(),new Wh(oi(0,g))));const h=new Array;for(let g=0;g<60;g++)h.push(new Kl(oi(1,g),0,-1,wi.getEmpty(),new Wh(oi(1,g))));if(n)for(n.lastIndex=0;(o=n.exec(e))!==null;){const g=o.index,p=o[0];if(p===` +`)a++,l=g+1;else{if(c!==g){let _;if(d===a){const v=g-c;if(v<u.length)_=u[v];else{const b=oi(0,v);_=new Kl(b,0,-1,wi.getEmpty(),new Wh(b))}}else{const v=a-d,b=g-l;if(v===1&&b<h.length)_=h[b];else{const C=oi(v,b);_=new Kl(C,0,-1,wi.getEmpty(),new Wh(C))}}s.push(_)}s.push(t.getToken(p)),c=g+p.length,d=a}}const f=e.length;if(c!==f){const g=d===a?oi(0,f-c):oi(a-d,f-l);s.push(new Kl(g,0,-1,wi.getEmpty(),new Wh(g)))}this.length=oi(a,f-l),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new mz}}class Iw{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(l,c){return t.getKey(`${l}:::${c}`)}const n=[...Ue.getColorizedBracketPairs(e)],s=new Map,o=new Set;for(const[l,c]of n){o.add(l);let d=s.get(c);const u=i(e,l);d||(d={openingBrackets:wi.getEmpty(),first:u},s.set(c,d)),d.openingBrackets=d.openingBrackets.add(u,JO)}const a=new Map;for(const[l,c]of s){const d=oi(0,l.length);a.set(l,new Kl(d,2,c.first,c.openingBrackets,zd.create(d)))}for(const l of o){const c=oi(0,l.length),d=i(e,l);a.set(l,new Kl(c,1,d,wi.getEmpty().add(d,JO),zd.create(c)))}return new Iw(a)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>Ns(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}get isEmpty(){return this.map.size===0}}class pQ{constructor(e){this.denseKeyProvider=e,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=Iw.createFromLanguage(e,this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=Iw.createFromLanguage(e,this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function mQ(r){if(r.length===0)return null;if(r.length===1)return r[0];let e=0;function t(){if(e>=r.length)return null;const o=e,a=r[o].listHeight;for(e++;e<r.length&&r[e].listHeight===a;)e++;return e-o>=2?l8(o===0&&e===r.length?r:r.slice(o,e),!1):r[o]}let i=t(),n=t();if(!n)return i;for(let o=t();o;o=t())cM(i,n)<=cM(n,o)?(i=W1(i,n),n=o):n=W1(n,o);return W1(i,n)}function l8(r,e=!1){if(r.length===0)return null;if(r.length===1)return r[0];let t=r.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;r[n]=da.create23(r[s],r[s+1],s+3===t?r[s+2]:null,e)}t=i}return da.create23(r[0],r[1],t>=3?r[2]:null,e)}function cM(r,e){return Math.abs(r.listHeight-e.listHeight)}function W1(r,e){return r.listHeight===e.listHeight?da.create23(r,e,null,!1):r.listHeight>e.listHeight?_Q(r,e):bQ(e,r)}function _Q(r,e){r=r.toMutable();let t=r;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=da.create23(o.unappendChild(),n,null,!1):(o.appendChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?da.create23(r,n,null,!1):r}function bQ(r,e){r=r.toMutable();let t=r;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=da.create23(n,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?da.create23(n,r,null,!1):r}class vQ{constructor(e){this.lastOffset=hl,this.nextNodes=[e],this.offsets=[hl],this.idxs=[]}readLongestNodeAt(e,t){if(B1(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=Gg(this.nextNodes);if(!i)return;const n=Gg(this.offsets);if(B1(e,n))return;if(B1(n,e))if(Fn(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=V1(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=V1(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=Gg(this.offsets),t=Gg(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=Gg(this.nextNodes),n=V1(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Fn(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function V1(r,e=-1){for(;;){if(e++,e>=r.childrenLength)return-1;if(r.getChild(e))return e}}function Gg(r){return r.length>0?r[r.length-1]:void 0}function dM(r,e,t,i){return new CQ(r,e,t,i).parseDocument()}class CQ{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 vQ(i):void 0,this.positionMapper=new aQ(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(wi.getEmpty());return e||(e=da.getEmpty()),e}parseList(e){const t=new Array;for(;;){const n=this.tokenizer.peek();if(!n||n.kind===2&&n.bracketIds.intersects(e))break;const s=this.parseChild(e);s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?mQ(t):l8(t,this.createImmutableLists)}parseChild(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!rQ(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>{if(!Ql(s.length,i))return!1;const o=aM(s.length)===aM(i);return s.canBeReused(e,o)});if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new uQ(t.bracketIds,t.length);case 0:return t.astNode;case 1:const i=e.merge(t.bracketIds),n=this.parseList(i),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),Rm.create(t.astNode,n,s.astNode)):Rm.create(t.astNode,n,null);default:throw new Error("unexpected")}}}class wQ extends Z{constructor(e){super();this.textModel=e,this.didChangeDecorationsEmitter=new H,this.cache=this._register(new Un),this.bracketsRequested=!1,this.options=e.getOptions().bracketPairColorizationOptions,this._register(Ue.onDidChange(t=>{var i;!((i=this.cache.value)===null||i===void 0)&&i.object.didLanguageChange(t.languageIdentifier.id)&&(this.cache.clear(),this.updateCache())})),this._register(e.onDidChangeOptions(t=>{this.options=e.getOptions().bracketPairColorizationOptions,this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeLanguage(t=>{this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeAttached(()=>{this.updateCache()}))}get isDocumentSupported(){return this.textModel.getValueLength()<=5e6}updateCache(){if(this.bracketsRequested||this.textModel.isAttachedToEditor()&&this.isDocumentSupported&&this.options.enabled){if(!this.cache.value){const e=new ue;this.cache.value=yQ(e.add(new SQ(this.textModel)),e),e.add(this.cache.value.object.onDidChangeDecorations(t=>this.didChangeDecorationsEmitter.fire(t))),this.didChangeDecorationsEmitter.fire()}}else this.cache.clear(),this.didChangeDecorationsEmitter.fire()}handleContentChanged(e){var t;(t=this.cache.value)===null||t===void 0||t.object.handleContentChanged(e)}getDecorationsInRange(e,t,i){var n;return t===void 0?[]:this.options.enabled?((n=this.cache.value)===null||n===void 0?void 0:n.object.getDecorationsInRange(e,t,i))||[]:[]}getAllDecorations(e,t){var i;return e===void 0?[]:this.options.enabled?((i=this.cache.value)===null||i===void 0?void 0:i.object.getAllDecorations(e,t))||[]:[]}onDidChangeDecorations(e){return this.didChangeDecorationsEmitter.event(e)}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateCache(),((t=this.cache.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e))||[]}}function yQ(r,e){return{object:r,dispose:()=>e==null?void 0:e.dispose()}}class SQ extends Z{constructor(e){super();if(this.textModel=e,this.didChangeDecorationsEmitter=new H,this.colorProvider=new d8,this.denseKeyProvider=new uZ,this.brackets=new pQ(this.denseKeyProvider),this.onDidChangeDecorations=this.didChangeDecorationsEmitter.event,this._register(e.onBackgroundTokenizationStateChanged(()=>{if(e.backgroundTokenizationState===2){const t=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,t||this.didChangeDecorationsEmitter.fire()}})),this._register(e.onDidChangeTokens(({ranges:t})=>{const i=t.map(n=>new lM(oi(n.fromLineNumber-1,0),oi(n.toLineNumber,0),oi(n.toLineNumber-n.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(i,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeDecorationsEmitter.fire()})),e.backgroundTokenizationState===0){const t=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageIdentifier().id),i=new gQ(this.textModel.getValue(),t);this.initialAstWithoutTokens=dM(i,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else e.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):e.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleContentChanged(e){const t=e.changes.map(i=>{const n=k.lift(i.range);return new lM(Hb(n.getStartPosition()),Hb(n.getEndPosition()),oQ(i.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new hQ(this.textModel,this.brackets);return dM(s,e,n,i)}getBracketsInRange(e){const t=oi(e.startLineNumber-1,e.startColumn-1),i=oi(e.endLineNumber-1,e.endColumn-1),n=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return xp(s,hl,s.length,t,i,n),n}getDecorationsInRange(e,t,i){const n=new Array,s=this.getBracketsInRange(e);for(const o of s)n.push({id:`bracket${o.hash()}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(o)},ownerId:0,range:o.range});return n}getAllDecorations(e,t){return this.getDecorationsInRange(new k(1,1,this.textModel.getLineCount(),1),e,t)}getBracketPairsInRange(e){const t=new Array,i=Hb(e.getStartPosition()),n=Hb(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens;return c8(s,hl,s.length,i,n,t),t}}function xp(r,e,t,i,n,s,o=0){if(r.kind===1){const a=Qp(e,t);s.push(new uM(a,o-1,!1))}else if(r.kind===3){const a=Qp(e,t);s.push(new uM(a,o-1,!0))}else if(r.kind===4)for(const a of r.children)t=Fn(e,a.length),Ql(e,n)&&Vb(t,i)&&xp(a,e,t,i,n,s,o),e=t;else if(r.kind===2){o++;{const a=r.openingBracket;t=Fn(e,a.length),Ql(e,n)&&Vb(t,i)&&xp(a,e,t,i,n,s,o),e=t}if(r.child){const a=r.child;t=Fn(e,a.length),Ql(e,n)&&Vb(t,i)&&xp(a,e,t,i,n,s,o),e=t}if(r.closingBracket){const a=r.closingBracket;t=Fn(e,a.length),Ql(e,n)&&Vb(t,i)&&xp(a,e,t,i,n,s,o),e=t}}}function c8(r,e,t,i,n,s,o=0){var a;if(r.kind===2){const c=Fn(e,r.openingBracket.length);s.push(new cq(Qp(e,t),Qp(e,c),r.closingBracket?Qp(Fn(c,((a=r.child)===null||a===void 0?void 0:a.length)||hl),t):void 0,o)),o++}let l=e;for(const c of r.children){const d=l;l=Fn(l,c.length),Ql(d,n)&&Ql(i,l)&&c8(c,d,l,i,n,s,o)}}class uM{constructor(e,t,i){this.range=e,this.level=t,this.isInvalid=i}hash(){return`${this.range.toString()}-${this.level}`}}class d8{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.level)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Et((r,e)=>{const t=[i8,n8,r8,s8,o8,a8],i=new d8;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${r.getColor(tQ)}; }`);let n=t.map(s=>r.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const o=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${o}; }`)}});class Pt{static visibleColumnFromColumn(e,t,i){const n=e.length,s=t-1<n?t-1:n;let o=0,a=0;for(;a<s;){const l=Pa(e,s,a);if(a+=l>=65536?2:1,l===9)o=Pt.nextRenderTabStop(o,i);else{let c=hh(l);for(;a<s;){const d=Pa(e,s,a),u=hh(d);if(Pp(c,u))break;a+=d>=65536?2:1,c=u}no(l)||Mp(l)?o=o+2:o=o+1}}return o}static visibleColumnsByColumns(e,t){const i=e.length;let n=new Array;n.push(-1);let s=0,o=0;for(;o<i;){const a=Pa(e,i,o);if(o+=a>=65536?2:1,n.push(s),a>=65536&&n.push(s),a===9)s=Pt.nextRenderTabStop(s,t);else{let l=hh(a);for(;o<i;){const c=Pa(e,i,o),d=hh(c);if(Pp(l,d))break;o+=c>=65536?2:1,n.push(s),a>=65536&&n.push(s),l=d}no(a)||Mp(a)?s=s+2:s=s+1}}return n.push(s),n}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let s=0,o=1,a=0;for(;a<n;){const l=Pa(e,n,a);a+=l>=65536?2:1;let c;if(l===9)c=Pt.nextRenderTabStop(s,i);else{let u=hh(l);for(;a<n;){const h=Pa(e,n,a),f=hh(h);if(Pp(u,f))break;a+=h>=65536?2:1,u=f}no(l)||Mp(l)?c=s+2:c=s+1}const d=a+1;if(c>=t){const u=t-s;return c-t<u?d:o}s=c,o=d}return n+1}static columnFromVisibleColumn2(e,t,i,n){let s=this.columnFromVisibleColumn(t.getLineContent(i),n,e.tabSize),o=t.getLineMinColumn(i);if(s<o)return o;let a=t.getLineMaxColumn(i);return s>a?a:s}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function xQ(){return new nZ}function EQ(r){const e=xQ();return e.acceptChunk(r),e.finish()}function hM(r,e){return(typeof r=="string"?EQ(r):r).create(e)}let $b=0;const kQ=999,LQ=1e4;class TQ{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;do{let n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const Kg=()=>{throw new Error("Invalid change accessor")};class Wa{constructor(){this._searchCanceledBrand=void 0}}Wa.INSTANCE=new Wa;function Ub(r){return r instanceof Wa?null:r}class Ti extends Z{constructor(e,t,i,n=null,s){super();this._onWillDispose=this._register(new H),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new NQ(d=>this.handleBeforeFireDecorationsChangedEvent(d))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new H),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new H),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new H),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new H),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new H),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new H),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new RQ),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new H),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(d=>{this._onDidChangeContentOrInjectedText.fire(d.rawContentChangedEvent)})),$b++,this.id="$model"+$b,this.isForSimpleWidget=t.isForSimpleWidget,typeof n=="undefined"||n===null?this._associatedResource=De.parse("inmemory://model/"+$b):this._associatedResource=n,this._undoRedoService=s,this._attachedEditorCount=0;const{textBuffer:o,disposable:a}=hM(e,t.defaultEOL);this._buffer=o,this._bufferDisposable=a,this._options=Ti.resolveOptions(this._buffer,t);const l=this._buffer.getLineCount(),c=this._buffer.getValueLengthInRange(new k(1,1,l,this._buffer.getLineLength(l)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=c>Ti.LARGE_FILE_SIZE_THRESHOLD||l>Ti.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=c>Ti.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||rw,this._languageRegistryListener=Ue.onDidChange(d=>{d.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=_3($b),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new fM,this._commandManager=new sA(this,s),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new Ur,this._tokens2=new dA,this._tokenization=new cZ(this),this._bracketPairColorizer=this._register(new wQ(this)),this._decorationProvider=this._bracketPairColorizer,this._register(this._decorationProvider.onDidChangeDecorations(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const i=$O(e,t.tabSize,t.insertSpaces);return new qv({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new qv({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new Cf([],"",` +`,!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._bracketPairColorizer.handleContentChanged(t),!this._isDisposing&&this._eventEmitter.fire(new Lw(e,t))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:i}=hM(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:a}}_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._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new fM,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Bd([new rZ],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,o),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r +`:` +`;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 Bd([new aZ],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,o),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const s=t[i],o=s.range,a=s.cachedAbsoluteStart-s.start,l=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),c=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);s.cachedAbsoluteStart=l,s.cachedAbsoluteEnd=c,s.cachedVersionId=e,s.start=l-a,s.end=c-a,wc(s)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}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 s=this._buffer.getLineLength(n);s>=LQ?t+=s:e+=s}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();let t=typeof e.tabSize!="undefined"?e.tabSize:this._options.tabSize,i=typeof e.indentSize!="undefined"?e.indentSize:this._options.indentSize,n=typeof e.insertSpaces!="undefined"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace!="undefined"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions!="undefined"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new qv({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let i=$O(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let o=0;o<e.length;o++)e.charAt(o)===" "?n+=t:n++;let s="";if(!i){let o=Math.floor(n/t);n=n%t;for(let a=0;a<o;a++)s+=" "}for(let o=0;o<n;o++)s+=" ";return s}static normalizeIndentation(e,t,i){let n=pr(e);return n===-1&&(n=e.length),Ti._normalizeIndentationFromWhitespace(e.substring(0,n),t,i)+e.substring(n)}normalizeIndentation(e){return this._assertNotDisposed(),Ti.normalizeIndentation(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(p3.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.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();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let 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){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new TQ(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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` +`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("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(typeof i=="number"&&!isNaN(i)?i:1),o=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);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 u=this.getLineMaxColumn(s);o>=u&&(o=u)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),d=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,d=1;else if(c>t)c=t,d=this.getLineMaxColumn(c);else if(d<=1)d=1;else{const u=this.getLineMaxColumn(c);d>=u&&(d=u)}return i===s&&n===o&&a===c&&l===d&&e instanceof k&&!(e instanceof _e)?e:new k(s,o,c,d)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const o=this._buffer.getLineCharCode(e,t-2);if(qi(o))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),o=this._buffer.getLineCount();if(n<1)return new U(1,1);if(n>o)return new U(o,this.getLineMaxColumn(o));if(s<=1)return new U(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new U(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(qi(l))return new U(n,s-1)}return new U(n,s)}validatePosition(e){return this._assertNotDisposed(),e instanceof U&&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)||!this._isValidPosition(s,o,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,c=qi(a),d=qi(l);return!c&&!d}return!0}validateRange(e){if(this._assertNotDisposed(),e instanceof k&&!(e instanceof _e)&&this._isValidRange(e,1))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,o=i.column,a=n.lineNumber,l=n.column;{const c=o>1?this._buffer.getLineCharCode(s,o-2):0,d=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=qi(c),h=qi(d);return!u&&!h?new k(s,o,a,l):s===a&&o===l?new k(s,o-1,a,l-1):u&&h?new k(s,o-1,a,l+1):u?new k(s,o-1,a,l):new k(s,o,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();let 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 k(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,a=kQ){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>k.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,h)=>u.startLineNumber-h.startLineNumber||u.startColumn-h.startColumn);const c=[];c.push(l.reduce((u,h)=>k.areIntersecting(u,h)?u.plusRange(h):(c.push(u),h)));let d;if(!i&&e.indexOf(` +`)<0){const h=new ad(e,i,n,s).parseSearchRequest();if(!h)return[];d=f=>this.findMatchesLineByLine(f,h,o,a)}else d=u=>Wb.findMatches(this,new ad(e,i,n,s),u,o,a);return c.map(d).reduce((u,h)=>u.concat(h),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(` +`)<0){const c=new ad(e,i,n,s).parseSearchRequest();if(!c)return null;const d=this.getLineCount();let u=new k(a.lineNumber,a.column,d,this.getLineMaxColumn(d)),h=this.findMatchesLineByLine(u,c,o,1);return Wb.findNextMatch(this,new ad(e,i,n,s),a,o),h.length>0||(u=new k(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),h=this.findMatchesLineByLine(u,c,o,1),h.length>0)?h[0]:null}return Wb.findNextMatch(this,new ad(e,i,n,s),a,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);return Wb.findPreviousMatch(this,new ad(e,i,n,s),a,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` +`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof c1?e:new c1(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<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let n=t.map(o=>({range:this.validateRange(o.range),text:o.text})),s=!0;if(e)for(let o=0,a=e.length;o<a;o++){let l=e[o],c=!1;for(let d=0,u=n.length;d<u;d++){let h=n[d].range,f=h.startLineNumber>l.endLineNumber,g=l.startLineNumber>h.endLineNumber;if(!f&&!g){c=!0;break}}if(!c){s=!1;break}}if(s)for(let o=0,a=this._trimAutoWhitespaceLines.length;o<a;o++){let l=this._trimAutoWhitespaceLines[o],c=this.getLineMaxColumn(l),d=!0;for(let u=0,h=n.length;u<h;u++){let f=n[u].range,g=n[u].text;if(!(l<f.startLineNumber||l>f.endLineNumber)&&!(l===f.startLineNumber&&f.startColumn===c&&f.isEmpty()&&g&&g.length>0&&g.charAt(0)===` +`)&&!(l===f.startLineNumber&&f.startColumn===1&&f.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===` +`)){d=!1;break}}if(d){const u=new k(l,1,l,c);t.push(new c1(null,u,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:o.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,o.length!==0){for(let c=0,d=o.length;c<d;c++){const u=o[c],[h,f,g]=Hf(u.text);this._tokens.acceptEdit(u.range,h,f),this._tokens2.acceptEdit(u.range,h,f,g,u.text.length>0?u.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(u.rangeOffset,u.rangeLength,u.text.length,u.forceMoveMarkers)}let a=[];this._increaseVersionId();let l=i;for(let c=0,d=o.length;c<d;c++){const u=o[c],[h]=Hf(u.text);this._onDidChangeDecorations.fire();const f=u.range.startLineNumber,g=u.range.endLineNumber,p=g-f,_=h,v=Math.min(p,_),b=_-p,C=s-l-b+f,y=C,E=C+_,S=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new U(y,1)),this.getOffsetAt(new U(E,this.getLineMaxColumn(E))),0),w=fo.fromDecorations(S),x=new Vp(w);for(let D=v;D>=0;D--){const M=f+D,B=C+D;x.takeFromEndWhile(j=>j.lineNumber>B);const z=x.takeFromEndWhile(j=>j.lineNumber===B);a.push(new QO(M,this.getLineContent(B),z))}if(v<p){const D=f+v;a.push(new sZ(D+1,g))}if(v<_){const D=new Vp(w),M=f+v,B=_-v,z=s-l-B+M+1;let j=[],re=[];for(let te=0;te<B;te++){let N=z+te;re[te]=this.getLineContent(N),D.takeWhile(L=>L.lineNumber<N),j[te]=D.takeWhile(L=>L.lineNumber===N)}a.push(new oZ(M+1,f+_,re,j))}l+=b}this._emitContentChangedEvent(new Bd(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?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(e===null||e.size===0)return;const i=[...e].map(n=>new QO(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeContentOrInjectedText.fire(new OW(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(s,o)=>this._deltaDecorationsImpl(e,[],[{range:s,options:o}])[0],changeDecoration:(s,o)=>{this._changeDecorationImpl(s,o)},changeDecorationOptions:(s,o)=>{this._changeDecorationOptionsImpl(s,pM(o))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,o)=>s.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,s,o)},n=null;try{n=t(i)}catch(s){Fe(s)}return i.addDecoration=Kg,i.changeDecoration=Kg,i.changeDecorationOptions=Kg,i.removeDecoration=Kg,i.deltaDecorations=Kg,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_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:gM[i]}])[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),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,a,s),n.setOptions(gM[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;i<n;i++){const s=t[i];this._decorationsTree.delete(s),delete this._decorations[s.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let s=this.getLineCount(),o=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a);const c=new k(o,1,a,l),d=this._getDecorationsInRange(c,i,n);return d.push(...this._decorationProvider.getDecorationsInRange(c,i,n)),d}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);const s=this._getDecorationsInRange(n,t,i);return s.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),s}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}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 fo.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,s,t,i)}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 a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.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 o=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(i.options.before||t.before){const o=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),s=t.length;let o=0;const a=i.length;let l=0,c=new Array(a);for(;o<s||l<a;){let d=null;if(o<s){do d=this._decorations[t[o++]];while(!d&&o<s);if(d){if(d.options.after){const u=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.endLineNumber)}if(d.options.before){const u=this._decorationsTree.getNodeRange(this,d);this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.startLineNumber)}this._decorationsTree.delete(d),this._onDidChangeDecorations.checkAffectedAndFire(d.options)}}if(l<a){if(!d){const _=++this._lastDecorationId,v=`${this._instanceId};${_}`;d=new DW(v,0,0),this._decorations[v]=d}const u=i[l],h=this._validateRangeRelaxedNoAllocations(u.range),f=pM(u.options),g=this._buffer.getOffsetAt(h.startLineNumber,h.startColumn),p=this._buffer.getOffsetAt(h.endLineNumber,h.endColumn);d.ownerId=e,d.reset(n,g,p,h),d.setOptions(f),d.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.endLineNumber),d.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(h.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(f),this._decorationsTree.insert(d),c[l]=d.id,l++}else d&&delete this._decorations[d.id]}return c}setTokens(e,t=!1){if(e.length!==0){let i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];let a=0,l=0,c=!1;for(let d=0,u=o.tokens.length;d<u;d++){const h=o.startLineNumber+d;c?(this._tokens.setTokens(this._languageIdentifier.id,h-1,this._buffer.getLineLength(h),o.tokens[d],!1),l=h):this._tokens.setTokens(this._languageIdentifier.id,h-1,this._buffer.getLineLength(h),o.tokens[d],!0)&&(c=!0,a=h,l=h)}c&&i.push({fromLineNumber:a,toLineNumber:l})}i.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:i})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new U(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,a]=Ti._findLanguageBoundaries(n,s),l=MC(t.column,Ue.getWordDefinition(n.getLanguageId(s)),i.substring(o,a),o);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&o===t.column-1){const[c,d]=Ti._findLanguageBoundaries(n,s-1),u=MC(t.column,Ue.getWordDefinition(n.getLanguageId(s-1)),i.substring(c,d),c);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}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,a=e.getCount();o<a&&e.getLanguageId(o)===i;o++)s=e.getEndOffset(o);return[n,s]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let i=e.toLowerCase(),n=this.validatePosition(t),s=this._getLineTokens(n.lineNumber),o=s.getLanguageId(s.findTokenIndexAtOffset(n.column-1)),a=Ue.getBracketsSupport(o);if(!a)return null;let l=a.textIsBracket[i];return l?Ub(this._findMatchingBracketUp(l,n,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=n-1;c>=0;c--){const d=t.getEndOffset(c);if(d<=a)break;if(Io(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){a=d;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=n+1;c<s;c++){const d=t.getStartOffset(c);if(d>=l)break;if(Io(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){l=d;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=this._buffer.getLineContent(t),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=Ue.getBracketsSupport(i.getLanguageId(s));if(o&&!Io(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),c=null;for(;;){const d=gs.findNextBracketInRange(o.forwardRegex,t,n,a,l);if(!d)break;if(d.startColumn<=e.column&&e.column<=d.endColumn){const u=n.substring(d.startColumn-1,d.endColumn-1).toLowerCase(),h=this._matchFoundBracket(d,o.textIsBracket[u],o.textIsOpenBracket[u],null);if(h){if(h instanceof Wa)return null;c=h}}a=d.endColumn-1}if(c)return c}if(s>0&&i.getStartOffset(s)===e.column-1){const a=s-1,l=Ue.getBracketsSupport(i.getLanguageId(a));if(l&&!Io(i.getStandardTokenType(a))){let{searchStartOffset:c,searchEndOffset:d}=this._establishBracketSearchOffsets(e,i,l,a);const u=gs.findPrevBracketInRange(l.reversedRegex,t,n,c,d);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){const h=n.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,l.textIsBracket[h],l.textIsOpenBracket[h],null);if(f)return f instanceof Wa?null:f}}}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 Wa?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,s=e.reversedRegex;let o=-1,a=0;const l=(c,d,u,h)=>{for(;;){if(i&&++a%100===0&&!i())return Wa.INSTANCE;const f=gs.findPrevBracketInRange(s,c,d,u,h);if(!f)break;const g=d.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(g)?o++:e.isClose(g)&&o--,o===0)return f;h=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const d=this._getLineTokens(c),u=d.getCount(),h=this._buffer.getLineContent(c);let f=u-1,g=h.length,p=h.length;c===t.lineNumber&&(f=d.findTokenIndexAtOffset(t.column-1),g=t.column-1,p=t.column-1);let _=!0;for(;f>=0;f--){const v=d.getLanguageId(f)===n&&!Io(d.getStandardTokenType(f));if(v)_?g=d.getStartOffset(f):(g=d.getStartOffset(f),p=d.getEndOffset(f));else if(_&&g!==p){const b=l(c,h,g,p);if(b)return b}_=v}if(_&&g!==p){const v=l(c,h,g,p);if(v)return v}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,s=e.forwardRegex;let o=1,a=0;const l=(d,u,h,f)=>{for(;;){if(i&&++a%100===0&&!i())return Wa.INSTANCE;const g=gs.findNextBracketInRange(s,d,u,h,f);if(!g)break;const p=u.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(p)?o++:e.isClose(p)&&o--,o===0)return g;h=g.endColumn-1}return null},c=this.getLineCount();for(let d=t.lineNumber;d<=c;d++){const u=this._getLineTokens(d),h=u.getCount(),f=this._buffer.getLineContent(d);let g=0,p=0,_=0;d===t.lineNumber&&(g=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,_=t.column-1);let v=!0;for(;g<h;g++){const b=u.getLanguageId(g)===n&&!Io(u.getStandardTokenType(g));if(b)v||(p=u.getStartOffset(g)),_=u.getEndOffset(g);else if(v&&p!==_){const C=l(d,f,p,_);if(C)return C}v=b}if(v&&p!==_){const b=l(d,f,p,_);if(b)return b}}return null}findPrevBracket(e){const t=this.validatePosition(e);let i=-1,n=null;for(let s=t.lineNumber;s>=1;s--){const o=this._getLineTokens(s),a=o.getCount(),l=this._buffer.getLineContent(s);let c=a-1,d=l.length,u=l.length;if(s===t.lineNumber){c=o.findTokenIndexAtOffset(t.column-1),d=t.column-1,u=t.column-1;const f=o.getLanguageId(c);i!==f&&(i=f,n=Ue.getBracketsSupport(i))}let h=!0;for(;c>=0;c--){const f=o.getLanguageId(c);if(i!==f){if(n&&h&&d!==u){const p=gs.findPrevBracketInRange(n.reversedRegex,s,l,d,u);if(p)return this._toFoundBracket(n,p);h=!1}i=f,n=Ue.getBracketsSupport(i)}const g=!!n&&!Io(o.getStandardTokenType(c));if(g)h?d=o.getStartOffset(c):(d=o.getStartOffset(c),u=o.getEndOffset(c));else if(n&&h&&d!==u){const p=gs.findPrevBracketInRange(n.reversedRegex,s,l,d,u);if(p)return this._toFoundBracket(n,p)}h=g}if(n&&h&&d!==u){const f=gs.findPrevBracketInRange(n.reversedRegex,s,l,d,u);if(f)return this._toFoundBracket(n,f)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,s=null;for(let o=t.lineNumber;o<=i;o++){const a=this._getLineTokens(o),l=a.getCount(),c=this._buffer.getLineContent(o);let d=0,u=0,h=0;if(o===t.lineNumber){d=a.findTokenIndexAtOffset(t.column-1),u=t.column-1,h=t.column-1;const g=a.getLanguageId(d);n!==g&&(n=g,s=Ue.getBracketsSupport(n))}let f=!0;for(;d<l;d++){const g=a.getLanguageId(d);if(n!==g){if(s&&f&&u!==h){const _=gs.findNextBracketInRange(s.forwardRegex,o,c,u,h);if(_)return this._toFoundBracket(s,_);f=!1}n=g,s=Ue.getBracketsSupport(n)}const p=!!s&&!Io(a.getStandardTokenType(d));if(p)f||(u=a.getStartOffset(d)),h=a.getEndOffset(d);else if(s&&f&&u!==h){const _=gs.findNextBracketInRange(s.forwardRegex,o,c,u,h);if(_)return this._toFoundBracket(s,_)}f=p}if(s&&f&&u!==h){const g=gs.findNextBracketInRange(s.forwardRegex,o,c,u,h);if(g)return this._toFoundBracket(s,g)}}return null}findEnclosingBrackets(e,t){let i;if(typeof t=="undefined")i=null;else{const f=Date.now();i=()=>Date.now()-f<=t}const n=this.validatePosition(e),s=this.getLineCount(),o=new Map;let a=[];const l=(f,g)=>{if(!o.has(f)){let p=[];for(let _=0,v=g?g.brackets.length:0;_<v;_++)p[_]=0;o.set(f,p)}a=o.get(f)};let c=0;const d=(f,g,p,_,v)=>{for(;;){if(i&&++c%100===0&&!i())return Wa.INSTANCE;const b=gs.findNextBracketInRange(f.forwardRegex,g,p,_,v);if(!b)break;const C=p.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),y=f.textIsBracket[C];if(y&&(y.isOpen(C)?a[y.index]++:y.isClose(C)&&a[y.index]--,a[y.index]===-1))return this._matchFoundBracket(b,y,!1,i);_=b.endColumn-1}return null};let u=-1,h=null;for(let f=n.lineNumber;f<=s;f++){const g=this._getLineTokens(f),p=g.getCount(),_=this._buffer.getLineContent(f);let v=0,b=0,C=0;if(f===n.lineNumber){v=g.findTokenIndexAtOffset(n.column-1),b=n.column-1,C=n.column-1;const E=g.getLanguageId(v);u!==E&&(u=E,h=Ue.getBracketsSupport(u),l(u,h))}let y=!0;for(;v<p;v++){const E=g.getLanguageId(v);if(u!==E){if(h&&y&&b!==C){const w=d(h,f,_,b,C);if(w)return Ub(w);y=!1}u=E,h=Ue.getBracketsSupport(u),l(u,h)}const S=!!h&&!Io(g.getStandardTokenType(v));if(S)y||(b=g.getStartOffset(v)),C=g.getEndOffset(v);else if(h&&y&&b!==C){const w=d(h,f,_,b,C);if(w)return Ub(w)}y=S}if(h&&y&&b!==C){const E=d(h,f,_,b,C);if(E)return Ub(E)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.getValueInRange(t);i=i.toLowerCase();let n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}static computeIndentLevel(e,t){let i=0,n=0,s=e.length;for(;n<s;){let o=e.charCodeAt(n);if(o===32)i++;else if(o===9)i=i-i%t+t;else break;n++}return n===s?-1:i}_computeIndentLevel(e){return Ti.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)}getActiveIndentGuide(e,t,i){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const s=Ue.getFoldingRules(this._languageIdentifier.id),o=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,d=-1;const u=w=>{if(a!==-1&&(a===-2||a>w-1)){a=-1,l=-1;for(let x=w-2;x>=0;x--){let D=this._computeIndentLevel(x);if(D>=0){a=x,l=D;break}}}if(c===-2){c=-1,d=-1;for(let x=w;x<n;x++){let D=this._computeIndentLevel(x);if(D>=0){c=x,d=D;break}}}};let h=-2,f=-1,g=-2,p=-1;const _=w=>{if(h===-2){h=-1,f=-1;for(let x=w-2;x>=0;x--){let D=this._computeIndentLevel(x);if(D>=0){h=x,f=D;break}}}if(g!==-1&&(g===-2||g<w-1)){g=-1,p=-1;for(let x=w;x<n;x++){let D=this._computeIndentLevel(x);if(D>=0){g=x,p=D;break}}}};let v=0,b=!0,C=0,y=!0,E=0,S=0;for(let w=0;b||y;w++){const x=e-w,D=e+w;w>1&&(x<1||x<t)&&(b=!1),w>1&&(D>n||D>i)&&(y=!1),w>5e4&&(b=!1,y=!1);let M=-1;if(b){const z=this._computeIndentLevel(x-1);z>=0?(c=x-1,d=z,M=Math.ceil(z/this._options.indentSize)):(u(x),M=this._getIndentLevelForWhitespaceLine(o,l,d))}let B=-1;if(y){const z=this._computeIndentLevel(D-1);z>=0?(h=D-1,f=z,B=Math.ceil(z/this._options.indentSize)):(_(D),B=this._getIndentLevelForWhitespaceLine(o,f,p))}if(w===0){S=M;continue}if(w===1){if(D<=n&&B>=0&&S+1===B){b=!1,v=D,C=D,E=B;continue}if(x>=1&&M>=0&&M-1===S){y=!1,v=x,C=x,E=M;continue}if(v=e,C=e,E=S,E===0)return{startLineNumber:v,endLineNumber:C,indent:E}}b&&(M>=E?v=x:b=!1),y&&(B>=E?C=D:y=!1)}return{startLineNumber:v,endLineNumber:C,indent:E}}getLinesBracketGuides(e,t,i,n,s){var o,a,l;const c=[],d=this._bracketPairColorizer.getBracketPairsInRange(new k(e,1,t,this.getLineMaxColumn(t)));let u;if(i&&d.length>0){const p=e<=i.lineNumber&&i.lineNumber<=t?d.filter(_=>_.range.containsPosition(i)):this._bracketPairColorizer.getBracketPairsInRange(k.fromPositions(i));u=(o=SG(p,_=>_.range.startLineNumber!==_.range.endLineNumber))===null||o===void 0?void 0:o.range}const h=new Vp(d),f=new Array,g=new u8;for(let p=e;p<=t;p++){const _=new Array;c.push(_);for(const b of h.takeWhile(C=>C.openingBracketRange.startLineNumber<p)||[])f[b.nestingLevel]=b;let v=Number.MAX_SAFE_INTEGER;for(let b=f.length-1;b>=0;b--){const C=f[b];if(C.range.endLineNumber<=p)continue;const y=Math.min(this.getVisibleColumnFromPosition(C.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((l=(a=C.closingBracketRange)===null||a===void 0?void 0:a.getStartPosition())!==null&&l!==void 0?l:C.range.getEndPosition()));if(y>v)continue;v=y;const E=n&&u&&C.range.equalsRange(u),S=g.getInlineClassNameOfLevel(C.nestingLevel)+(E?" "+g.activeClassName:"");(E||s)&&_.push(new E3(y,S))}_.reverse()}return c}getVisibleColumnFromPosition(e){return Pt.visibleColumnFromColumn(this.getLineContent(e.lineNumber),e.column,this._options.tabSize)+1}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.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=Ue.getFoldingRules(this._languageIdentifier.id),s=Boolean(n&&n.offSide);let o=new Array(t-e+1),a=-2,l=-1,c=-2,d=-1;for(let u=e;u<=t;u++){let h=u-e;const f=this._computeIndentLevel(u-1);if(f>=0){a=u-1,l=f,o[h]=Math.ceil(f/this._options.indentSize);continue}if(a===-2){a=-1,l=-1;for(let g=u-2;g>=0;g--){let p=this._computeIndentLevel(g);if(p>=0){a=g,l=p;break}}}if(c!==-1&&(c===-2||c<u-1)){c=-1,d=-1;for(let g=u;g<i;g++){let p=this._computeIndentLevel(g);if(p>=0){c=g,d=p;break}}}o[h]=this._getIndentLevelForWhitespaceLine(s,l,d)}return o}_getIndentLevelForWhitespaceLine(e,t,i){return t===-1||i===-1?0:t<i?1+Math.floor(t/this._options.indentSize):t===i?Math.ceil(i/this._options.indentSize):e?Math.ceil(i/this._options.indentSize):1+Math.floor(i/this._options.indentSize)}normalizePosition(e,t){return e}getLineIndentColumn(e){return IQ(this.getLineContent(e))+1}}Ti.MODEL_SYNC_LIMIT=50*1024*1024;Ti.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Ti.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Ti.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:xn.tabSize,indentSize:xn.indentSize,insertSpaces:xn.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:xn.trimAutoWhitespace,largeFileOptimizations:xn.largeFileOptimizations,bracketPairColorizationOptions:xn.bracketPairColorizationOptions};function IQ(r){let e=0;for(const t of r)if(t===" "||t===" ")e++;else break;return e}class u8{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}function H1(r){return!!(r.options.overviewRuler&&r.options.overviewRuler.color)}function $1(r){return!!r.options.after||!!r.options.before}class fM{constructor(){this._decorationsTree0=new T1,this._decorationsTree1=new T1,this._injectedTextDecorationsTree=new T1}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s){const o=e.getVersionId(),a=this._intervalSearch(t,i,n,s,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s){const o=this._decorationsTree0.intervalSearch(e,t,i,n,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s);return this._ensureNodesHaveRanges(e,o).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n){const s=e.getVersionId(),o=this._search(t,i,n,s);return this._ensureNodesHaveRanges(e,o)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const s=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),a=this._injectedTextDecorationsTree.search(e,t,n);return s.concat(o).concat(a)}}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){$1(e)?this._injectedTextDecorationsTree.insert(e):H1(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){$1(e)?this._injectedTextDecorationsTree.delete(e):H1(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){$1(e)?this._injectedTextDecorationsTree.resolveNode(e,t):H1(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 kl(r){return r.replace(/[^a-z0-9\-_]/gi," ")}class h8{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class DQ extends h8{constructor(e){super(e);this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Fr.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&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(typeof e=="string")return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class AQ extends h8{constructor(e){super(e);this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&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 typeof e=="string"?q.fromHex(e):t.getColor(e.id)}}class Mm{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1}static from(e){return e instanceof Mm?e:new Mm(e)}}class qe{constructor(e){this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?kl(e.className):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 DQ(e.overviewRuler):null,this.minimap=e.minimap?new AQ(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?kl(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?kl(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?kl(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?kl(e.marginClassName):null,this.inlineClassName=e.inlineClassName?kl(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?kl(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?kl(e.afterContentClassName):null,this.after=e.after?Mm.from(e.after):null,this.before=e.before?Mm.from(e.before):null}static register(e){return new qe(e)}static createDynamic(e){return new qe(e)}}qe.EMPTY=qe.register({description:"empty"});const gM=[qe.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),qe.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),qe.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),qe.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function pM(r){return r instanceof qe?r:qe.createDynamic(r)}class NQ extends Z{constructor(e){super();this.handleBeforeFire=e,this._actual=this._register(new H),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const t={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(t)}(e=this._affectedInjectedTextLines)===null||e===void 0||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._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class RQ extends Z{constructor(){super();this._fastEmitter=this._register(new H),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new H),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}const OQ=()=>!0,mM=()=>!1,MQ=r=>r===" "||r===" ";class vs{constructor(e,t,i){this._cursorMoveConfigurationBrand=void 0,this._languageIdentifier=e;const n=i.options,s=n.get(129);this.readOnly=n.get(80),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(103),this.lineHeight=n.get(58),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=n.get(114),this.wordSeparators=n.get(115),this.emptySelectionClipboard=n.get(32),this.copyWithSyntaxHighlighting=n.get(21),this.multiCursorMergeOverlapping=n.get(68),this.multiCursorPaste=n.get(70),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(8),this.autoClosingDelete=n.get(6),this.autoClosingOvertype=n.get(7),this.autoSurround=n.get(11),this.autoIndent=n.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:vs._getShouldAutoClose(e,this.autoClosingQuotes),bracket:vs._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=Ue.getAutoClosingPairs(e.id);let o=vs._getSurroundingPairs(e);if(o)for(const a of o)this.surroundingPairs[a.open]=a.close}static shouldRecreate(e){return e.hasChanged(129)||e.hasChanged(115)||e.hasChanged(32)||e.hasChanged(68)||e.hasChanged(70)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(114)||e.hasChanged(58)||e.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=vs._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return Ti.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return Ue.getElectricCharacters(e.id)}catch(t){return Fe(t),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return MQ;case"languageDefined":return vs._getLanguageDefinedShouldAutoClose(e);case"always":return OQ;case"never":return mM}}static _getLanguageDefinedShouldAutoClose(e){try{const t=Ue.getAutoCloseBeforeSet(e.id);return i=>t.indexOf(i)!==-1}catch(t){return Fe(t),mM}}static _getSurroundingPairs(e){try{return Ue.getSurroundingPairs(e.id)}catch(t){return Fe(t),null}}}class zi{constructor(e,t,i,n){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=zi._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new zi(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new U(t,i),n):new zi(new k(t,i,t,i),n,new U(t,i),n)}static _computeSelection(e,t){let i,n,s,o;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,s=t.lineNumber,o=t.column):(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column),new _e(i,n,s,o)}}class _M{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class PQ{constructor(e){this.modelState=e,this.viewState=null}}class FQ{constructor(e){this.modelState=null,this.viewState=e}}class Ge{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new PQ(e)}static fromViewState(e){return new FQ(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,s=e.positionColumn,o=new zi(new k(t,i,t,i),0,new U(n,s),0);return Ge.fromModelState(o)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class lr{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function Vh(r){return r==="'"||r==='"'||r==="`"}class Pm{static whitespaceVisibleColumn(e,t,i){const n=e.length;let s=0,o=-1,a=-1;for(let l=0;l<n;l++){if(l===t)return[o,a,s];switch(s%i===0&&(o=l,a=s),e.charCodeAt(l)){case 32:s+=1;break;case 9:s=Pt.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===n?[o,a,s]:[-1,-1,-1]}static atomicPosition(e,t,i,n){const s=e.length,[o,a,l]=Pm.whitespaceVisibleColumn(e,t,i);if(l===-1)return-1;let c;switch(n){case 0:c=!0;break;case 1:c=!1;break;case 2:if(l%i===0)return t;c=l%i<=i/2;break}if(c){if(o===-1)return-1;let h=a;for(let f=o;f<s;++f){if(h===a+i)return o;switch(e.charCodeAt(f)){case 32:h+=1;break;case 9:h=Pt.nextRenderTabStop(h,i);break;default:return-1}}return h===a+i?o:-1}const d=Pt.nextRenderTabStop(l,i);let u=l;for(let h=t;h<s;h++){if(u===d)return h;switch(e.charCodeAt(h)){case 32:u+=1;break;case 9:u=Pt.nextRenderTabStop(u,i);break;default:return-1}}return u===d?s:-1}}class Fl{constructor(e=null){this.hitTarget=e,this.type=0}}class mL{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}var pd;(function(r){function e(t,i,n){const s=t.getPositionFromDOMInfo(i,n);return s?new mL(s,i,null):new Fl(i)}r.createFromDOMInfo=e})(pd||(pd={}));class BQ{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class zs{constructor(e,t,i=0,n=null,s=null,o=null){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,!s&&n&&(s=new k(n.lineNumber,n.column,n.lineNumber,n.column)),this.range=s,this.detail=o}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return zs.toString(this)}}class hs{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===6}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class $f{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(129),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(58),this.stickyTabStops=n.get(103),this.typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return $f.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.model.getLineCount();let o=null,a,l=null;return i.afterLineNumber!==s&&(l=new U(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(o=new U(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),l===null?a=o:o===null?a=l:t<n?a=o:a=l,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:o,positionAfter:l,position:a}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const n=this._context.model.getLineCount(),s=this._context.model.getLineMaxColumn(n);return{range:new k(n,s,n,s),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(t);return{range:new k(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return $f._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class WQ{constructor(e,t,i){this.editorPos=t,this.pos=i,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+i.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+i.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=i.x-t.x<e.layoutInfo.contentLeft&&i.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,pn._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class TA extends WQ{constructor(e,t,i,n){super(e,t,i);this._ctx=e,n?(this.target=n,this.targetPath=ca.collect(n,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}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} + target: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let s=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(s=Pt.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new zs(this.target,e,s,t,i,n)}withTarget(e){return new TA(this._ctx,this.editorPos,this.pos,e)}}const bM={isAfterLines:!0};function U1(r){return{isAfterLines:!1,horizontalDistanceToText:r}}class pn{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=ca.collect(t,this._viewHelper.viewDomNode);return!!(hs.isChildOfContentWidgets(i)||hs.isChildOfOverflowingContentWidgets(i)||hs.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n){const s=new $f(this._context,this._viewHelper,e),o=new TA(s,t,i,n);try{return pn._createMouseTarget(s,o,!1)}catch{return o.fulfill(0)}}static _createMouseTarget(e,t,i){if(t.target===null){if(i)return t.fulfill(0);const o=pn._doHitTest(e,t);return o.type===1?pn.createMouseTargetFromHitTestPosition(e,t,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,t.withTarget(o.hitTarget),!0)}const n=t;let s=null;return s=s||pn._hitTestContentWidget(e,n),s=s||pn._hitTestOverlayWidget(e,n),s=s||pn._hitTestMinimap(e,n),s=s||pn._hitTestScrollbarSlider(e,n),s=s||pn._hitTestViewZone(e,n),s=s||pn._hitTestMargin(e,n),s=s||pn._hitTestViewCursor(e,n),s=s||pn._hitTestTextArea(e,n),s=s||pn._hitTestViewLines(e,n,i),s=s||pn._hitTestScrollbar(e,n),s||t.fulfill(0)}static _hitTestContentWidget(e,t){if(hs.isChildOfContentWidgets(t.targetPath)||hs.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(9,null,null,i):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if(hs.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(12,null,null,i):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfill(6,n.position,null,{mightBeForeignElement:!1})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;const a=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(a<=s&&s<=a+o.height)return t.fulfill(6,o.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfill(n,i.position,null,i)}return null}static _hitTestTextArea(e,t){return hs.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.pos.x-t.editorPos.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.fulfill(2,n,i.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!hs.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new U(1,1),null,bM);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.model.getLineCount(),o=e.model.getLineMaxColumn(s);return t.fulfill(7,new U(s,o),null,bM)}if(i){if(hs.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.model.getLineLength(s)===0){const a=e.getLineWidth(s),l=U1(t.mouseContentHorizontalOffset-a);return t.fulfill(7,new U(s,1),null,l)}const o=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>=o){const a=U1(t.mouseContentHorizontalOffset-o),l=new U(s,e.model.getLineMaxColumn(s));return t.fulfill(7,l,null,a)}}return t.fulfill(0)}const n=pn._doHitTest(e,t);return n.type===1?pn.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(hs.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new U(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(hs.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.model.getLineMaxColumn(n);return t.fulfill(11,new U(n,s))}}return null}static _hitTestScrollbar(e,t){if(hs.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new U(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(129),s=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return pn._getMouseColumn(s,i.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,a=n.column,l=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>l){const _=U1(t.mouseContentHorizontalOffset-l);return t.fulfill(7,n,null,_)}const c=e.visibleRangeForPosition(o,a);if(!c)return t.fulfill(0,n);const d=c.left;if(t.mouseContentHorizontalOffset===d)return t.fulfill(6,n,null,{mightBeForeignElement:!!s});const u=[];if(u.push({offset:c.left,column:a}),a>1){const _=e.visibleRangeForPosition(o,a-1);_&&u.push({offset:_.left,column:a-1})}const h=e.model.getLineMaxColumn(o);if(a<h){const _=e.visibleRangeForPosition(o,a+1);_&&u.push({offset:_.left,column:a+1})}u.sort((_,v)=>_.offset-v.offset);const f=t.pos.toClientCoordinates(),g=i.getBoundingClientRect(),p=g.left<=f.clientX&&f.clientX<=g.right;for(let _=1;_<u.length;_++){const v=u[_-1],b=u[_];if(v.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=b.offset){const C=new k(o,v.column,o,b.column);return t.fulfill(6,n,C,{mightBeForeignElement:!p||!!s})}}return t.fulfill(6,n,null,{mightBeForeignElement:!p||!!s})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.getVerticalOffsetForLineNumber(i)+Math.floor(e.lineHeight/2);let o=t.pos.y+(s-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const a=new rA(t.pos.x,o),l=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return l.type===1?l:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=Ru(e.viewDomNode);let n;if(i?typeof i.caretRangeFromPoint=="undefined"?n=VQ(i,t.clientX,t.clientY):n=i.caretRangeFromPoint(t.clientX,t.clientY):n=document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new Fl;const s=n.startContainer;if(s.nodeType===s.TEXT_NODE){const o=s.parentNode,a=o?o.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===zo.CLASS_NAME?pd.createFromDOMInfo(e,o,n.startOffset):new Fl(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){const o=s.parentNode,a=o?o.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===zo.CLASS_NAME?pd.createFromDOMInfo(e,s,s.textContent.length):new Fl(s)}return new Fl}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const n=i.offsetNode.parentNode,s=n?n.parentNode:null,o=s?s.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===zo.CLASS_NAME?pd.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new Fl(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const n=i.offsetNode.parentNode,s=n&&n.nodeType===n.ELEMENT_NODE?n.className:null,o=n?n.parentNode:null,a=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(s===zo.CLASS_NAME){const l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return pd.createFromDOMInfo(e,l,0)}else if(a===zo.CLASS_NAME)return pd.createFromDOMInfo(e,i.offsetNode,0)}return new Fl(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.getTextModelOptions(),s=Pm.atomicPosition(i,e.column-1,n,2);return s!==-1?new U(e.lineNumber,s+1):e}static _doHitTest(e,t){let i=new Fl;if(typeof document.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),i.type===1){const n=e.model.getInjectedTextAt(i.position),s=e.model.normalizePosition(i.position,2);(n||!s.equals(i.position))&&(i=new mL(s,i.spanNode,n))}return i.type===1&&e.stickyTabStops&&(i=new mL(this._snapToSoftTabBoundary(i.position,e.model),i.spanNode,i.injectedText)),i}}function VQ(r,e,t){const i=document.createRange();let n=r.elementFromPoint(e,t);if(n!==null){for(;n&&n.firstChild&&n.firstChild.nodeType!==n.firstChild.TEXT_NODE&&n.lastChild&&n.lastChild.firstChild;)n=n.lastChild;const s=n.getBoundingClientRect(),o=window.getComputedStyle(n,null).getPropertyValue("font"),a=n.innerText;let l=s.left,c=0,d;if(e>s.left+s.width)c=a.length;else{const u=kd.getInstance();for(let h=0;h<a.length+1;h++){if(d=u.getCharWidth(a.charAt(h),o)/2,l+=d,e<l){c=h;break}l+=d}}i.setStart(n.firstChild,c),i.setEnd(n.firstChild,c)}return i}class kd{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return kd._INSTANCE||(kd._INSTANCE=new kd),kd._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}kd._INSTANCE=null;function Dw(r){return function(e,t){let i=!1;return r&&(i=r.mouseTargetIsWidget(t)),i||t.preventDefault(),t}}class ou extends Y_{constructor(e,t,i){super();this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new pn(this._context,i),this._mouseDownOperation=this._register(new HQ(this._context,this.viewController,this.viewHelper,(o,a)=>this._createMouseTarget(o,a),o=>this._getMouseColumn(o))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const n=new gY(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,o=>this._onContextMenu(o,!0))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),Dw(this.mouseTargetFactory),ou.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)));const s=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(67))return;const a=new Nf(o);if(tt?(o.metaKey||o.ctrlKey)&&!o.shiftKey&&!o.altKey:o.ctrlKey&&!o.metaKey&&!o.shiftKey&&!o.altKey){const c=ul.getZoomLevel(),d=a.deltaY>0?1:-1;ul.setZoomLevel(c+d),a.preventDefault(),a.stopPropagation()}};this._register(J(this.viewHelper.viewDomNode,Te.MOUSE_WHEEL,s,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(129)){const t=this._context.configuration.options.get(129).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const n=new xW(e,t).toPageCoordinates(),s=EW(this.viewHelper.viewDomNode);return n.y<s.y||n.y>s.y+s.height||n.x<s.x||n.x>s.x+s.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const n=Ru(this.viewHelper.viewDomNode);n&&(i=n.elementsFromPoint(e.posx,e.posy).find(s=>this.viewHelper.viewDomNode.contains(s)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=t.type===6||t.type===7,n=t.type===2||t.type===3||t.type===4,s=t.type===3,o=this._context.configuration.options.get(97),a=t.type===8||t.type===5,l=t.type===9;let c=e.leftButton||e.middleButton;tt&&e.leftButton&&e.ctrlKey&&(c=!1);const d=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||s&&o))d(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(a){const u=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(u.viewZoneId)&&(d(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(d(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}ou.MOUSE_MOVE_MINIMUM_TIME=100;class HQ extends Z{constructor(e,t,i,n,s){super();this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new mY(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new rr),this._mouseState=new k0,this._currentSelection=new _e(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,!0);!t||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(80)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&i.type===6&&i.position&&this._currentSelection.containsPosition(i.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Dw(null),s=>this._onMouseDownThenMove(s),s=>{const o=this._findMousePosition(this._lastMouseEvent,!0);s&&s instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:o?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,Dw(null),s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);!e||this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0)},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){const a=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),l=$f.getZoneAtCoord(this._context,a);if(l){const d=this._helpPositionJumpOverViewZone(l);if(d)return new zs(null,13,s,d)}const c=n.getLineNumberAtVerticalOffset(a);return new zs(null,13,s,new U(c,1))}if(e.posy>t.y+t.height){const a=n.getCurrentScrollTop()+(e.posy-t.y),l=$f.getZoneAtCoord(this._context,a);if(l){const d=this._helpPositionJumpOverViewZone(l);if(d)return new zs(null,13,s,d)}const c=n.getLineNumberAtVerticalOffset(a);return new zs(null,13,s,new U(c,i.getLineMaxColumn(c)))}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new zs(null,13,s,new U(o,1)):e.posx>t.x+t.width?new zs(null,13,s,new U(o,i.getLineMaxColumn(o))):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(n.type===8||n.type===5){const o=this._helpPositionJumpOverViewZone(n.detail);if(o)return new zs(n.element,n.type,n.mouseColumn,o,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new U(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){!e.position||this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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})}}class k0{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 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}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>k0.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)}}k0.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var ws;(function(r){r.text="text/plain",r.binary="application/octet-stream",r.unknown="application/unknown",r.markdown="text/markdown",r.latex="text/latex"})(ws||(ws={}));let Aw=[],f8=[],g8=[];function zb(r,e=!1){const t=$Q(r);Aw.push(t),t.userConfigured?g8.push(t):f8.push(t),e&&!t.userConfigured&&Aw.forEach(i=>{i.mime===t.mime||i.userConfigured||(t.extension&&i.extension===t.extension&&console.warn(`Overwriting extension <<${t.extension}>> to now point to mime <<${t.mime}>>`),t.filename&&i.filename===t.filename&&console.warn(`Overwriting filename <<${t.filename}>> to now point to mime <<${t.mime}>>`),t.filepattern&&i.filepattern===t.filepattern&&console.warn(`Overwriting filepattern <<${t.filepattern}>> to now point to mime <<${t.mime}>>`),t.firstline&&i.firstline===t.firstline&&console.warn(`Overwriting firstline <<${t.firstline}>> to now point to mime <<${t.mime}>>`))})}function $Q(r){return{id:r.id,mime:r.mime,filename:r.filename,extension:r.extension,filepattern:r.filepattern,firstline:r.firstline,userConfigured:r.userConfigured,filenameLowercase:r.filename?r.filename.toLowerCase():void 0,extensionLowercase:r.extension?r.extension.toLowerCase():void 0,filepatternLowercase:r.filepattern?L3(r.filepattern.toLowerCase()):void 0,filepatternOnPath:r.filepattern?r.filepattern.indexOf(Ii.sep)>=0:!1}}function UQ(r,e){let t;if(r)switch(r.scheme){case Ye.file:t=r.fsPath;break;case Ye.data:t=bc.parseMetaData(r).get(bc.META_DATA_LABEL);break;default:t=r.path}if(!t)return[ws.unknown];t=t.toLowerCase();const i=Rd(t),n=vM(t,i,g8);if(n)return[n,ws.text];const s=vM(t,i,f8);if(s)return[s,ws.text];if(e){const o=zQ(e);if(o)return[o,ws.text]}return[ws.unknown]}function vM(r,e,t){var i;let n=null,s=null,o=null;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?r:e;!((i=l.filepatternLowercase)===null||i===void 0)&&i.call(l,c)&&(s=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}return n?n.mime:s?s.mime:o?o.mime:null}function zQ(r){if(SD(r)&&(r=r.substr(1)),r.length>0)for(let e=Aw.length-1;e>=0;e--){const t=Aw[e];if(!t.firstline)continue;const i=r.match(t.firstline);if(i&&i.length>0)return t.mime}return null}class Mi{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=s}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new Mi(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Mi(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,n,-1)}if(e>=this.selectionEnd){const n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,1)}const t=this.value.substring(this.selectionStart,e);if(t.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(` +`,s+1))!==-1;)n++;return[e,i*t.length,n]}static selectedText(e){return new Mi(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=e.value,s=e.selectionStart,o=e.selectionEnd,a=t.value,l=t.selectionStart,c=t.selectionEnd;const d=n.substring(o),u=a.substring(c),h=UC(d,u);a=a.substring(0,a.length-h),n=n.substring(0,n.length-h);const f=n.substring(0,s),g=a.substring(0,l),p=Of(f,g);if(a=a.substring(p),n=n.substring(p),l-=p,s-=p,c-=p,o-=p,i&&l===c&&n.length>0){let v=null;if(l===a.length?a.startsWith(n)&&(v=a.substring(n.length)):a.endsWith(n)&&(v=a.substring(0,a.length-n.length)),v!==null&&v.length>0&&(/\uFE0F/.test(v)||Lj(v)))return{text:v,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(l===c){if(n===a&&s===0&&o===n.length&&l===a.length&&a.indexOf(` +`)===-1&&Ij(a))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const v=f.length-p;return{text:a,replacePrevCharCnt:v,replaceNextCharCnt:0,positionDelta:0}}const _=o-s;return{text:a,replacePrevCharCnt:_,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(Of(e.value,t.value),e.selectionEnd),n=Math.min(UC(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);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:o,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-o.length}}}Mi.EMPTY=new Mi("",0,0,null,null);class Yh{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new k(n,1,s+1,1)}static fromEditorSelection(e,t,i,n,s){const o=Yh._getPageOfLine(i.startLineNumber,n),a=Yh._getRangeForPage(o,n),l=Yh._getPageOfLine(i.endLineNumber,n),c=Yh._getRangeForPage(l,n),d=a.intersectRanges(new k(1,1,i.startLineNumber,i.startColumn));let u=t.getValueInRange(d,1);const h=t.getLineCount(),f=t.getLineMaxColumn(h),g=c.intersectRanges(new k(i.endLineNumber,i.endColumn,h,f));let p=t.getValueInRange(g,1),_;if(o===l||o+1===l)_=t.getValueInRange(i,1);else{const v=a.intersectRanges(i),b=c.intersectRanges(i);_=t.getValueInRange(v,1)+String.fromCharCode(8230)+t.getValueInRange(b,1)}return s&&(u.length>500&&(u=u.substring(u.length-500,u.length)),p.length>500&&(p=p.substring(0,500)),_.length>2*500&&(_=_.substring(0,500)+String.fromCharCode(8230)+_.substring(_.length-500,_.length))),new Mi(u+_+p,u.length,u.length+_.length,new U(i.startLineNumber,i.startColumn),new U(i.endLineNumber,i.endColumn))}}var Nw;(function(r){r.Tap="-monaco-textarea-synthetic-tap"})(Nw||(Nw={}));const _L={forceCopyWithSyntaxHighlighting:!1};class Fm{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)}}Fm.INSTANCE=new Fm;class jQ extends Z{constructor(e,t){super();this.textArea=t,this._onFocus=this._register(new H),this.onFocus=this._onFocus.event,this._onBlur=this._register(new H),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new H),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new H),this.onCut=this._onCut.event,this._onPaste=this._register(new H),this.onPaste=this._onPaste.event,this._onType=this._register(new H),this.onType=this._onType.event,this._onCompositionStart=this._register(new H),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new H),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new H),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new H),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new qQ(t)),this._asyncTriggerCut=this._register(new $t(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new $t(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Mi.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(Ei(t.domNode,"keydown",a=>{(a.keyCode===109||this._isDoingComposition&&a.keyCode===1)&&a.stopPropagation(),a.equals(9)&&a.preventDefault(),i=a,this._onKeyDown.fire(a)})),this._register(Ei(t.domNode,"keyup",a=>{this._onKeyUp.fire(a)})),this._register(J(t.domNode,"compositionstart",a=>{if(!this._isDoingComposition){if(this._isDoingComposition=!0,tt&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===a.data&&(i&&i.equals(109)&&(i.code==="ArrowRight"||i.code==="ArrowLeft")||Bn)){this._textAreaState=new Mi(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new U(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}if(vp){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",Mi.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}}));const n=a=>{const l=this._textAreaState,c=Mi.readFromTextArea(this._textArea);return[c,Mi.deduceInput(l,c,a)]},s=()=>{const a=this._textAreaState,l=Mi.readFromTextArea(this._textArea);return[l,Mi.deduceAndroidCompositionInput(a,l)]},o=a=>{const l=this._textAreaState,c=Mi.selectedText(a),d={text:c.value,replacePrevCharCnt:l.selectionEnd-l.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[c,d]};this._register(J(t.domNode,"compositionupdate",a=>{if(vp){const[d,u]=s();this._textAreaState=d,this._onType.fire(u),this._onCompositionUpdate.fire(a);return}const[l,c]=o(a.data||"");this._textAreaState=l,this._onType.fire(c),this._onCompositionUpdate.fire(a)})),this._register(J(t.domNode,"compositionend",a=>{if(!this._isDoingComposition)return;if(this._isDoingComposition=!1,vp){const[d,u]=s();this._textAreaState=d,this._onType.fire(u),this._onCompositionEnd.fire();return}const[l,c]=o(a.data||"");this._textAreaState=l,this._onType.fire(c),(VC||Bn)&&(this._textAreaState=Mi.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(J(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[a,l]=n(tt);l.replacePrevCharCnt===0&&l.text.length===1&&qi(l.text.charCodeAt(0))||(this._textAreaState=a,this._nextCommand===0?(l.text!==""||l.replacePrevCharCnt!==0)&&this._onType.fire(l):((l.text!==""||l.replacePrevCharCnt!==0)&&this._firePaste(l.text,null),this._nextCommand=0))})),this._register(J(t.domNode,"cut",a=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(a),this._asyncTriggerCut.schedule()})),this._register(J(t.domNode,"copy",a=>{this._ensureClipboardGetsEditorSelection(a)})),this._register(J(t.domNode,"paste",a=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),Yg.canUseTextData(a)){const[l,c]=Yg.getTextData(a);l!==""&&this._firePaste(l,c)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",Mi.EMPTY),this._nextCommand=1})),this._register(J(t.domNode,"focus",()=>{const a=this._hasFocus;this._setHasFocus(!0),Ko&&!a&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(J(t.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(J(t.domNode,Nw.Tap,()=>{vp&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return J(document,"selectionchange",t=>{if(!this._hasFocus||this._isDoingComposition||!VC)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||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),d=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),h=this._host.deduceModelPosition(u[0],u[1],u[2]),f=new _e(d.lineNumber,d.column,h.lineNumber,h.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=Ru(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):uD(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_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._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(Yg.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};if(Fm.INSTANCE.set(Bn?t.text.replace(/\r\n/g,` +`):t.text,i),!Yg.canUseTextData(e)){this._setAndWriteTextAreaState("copy or cut",Mi.selectedText(t.text));return}Yg.setTextData(e,t.text,t.html,i)}_firePaste(e,t){t||(t=Fm.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class Yg{static canUseTextData(e){return!!e.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData(ws.text);let i=null;const n=e.clipboardData.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return[t,i]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData){e.clipboardData.setData(ws.text,t),typeof i=="string"&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),e.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class qQ extends Z{constructor(e){super();this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let s=null;const o=Ru(n);o?s=o.activeElement:s=document.activeElement;const a=s===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i){Bn&&window.parent!==window&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),Bn&&window.parent!==window&&n.focus();return}try{const d=uj(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),hj(n,d)}catch{}}}class GQ extends ou{constructor(e,t,i){super(e,t,i);this._register(Lt.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,Vt.Tap,s=>this.onTap(s))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Change,s=>this.onChange(s))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Contextmenu,s=>this._onContextMenu(new ru(s,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(J(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const o=s.pointerType;if(o==="mouse"){this._lastPointerType="mouse";return}else o==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new pY(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,s=>this._onMouseMove(s),Dw(this.mouseTargetFactory),ou.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new ru(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e)}}class KQ extends ou{constructor(e,t,i){super(e,t,i);this._register(Lt.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,Vt.Tap,n=>this.onTap(n))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Change,n=>this.onChange(n))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Contextmenu,n=>this._onContextMenu(new ru(n,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new ru(e,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(Nw.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class YQ extends Z{constructor(e,t,i){super();ra&&zy.pointerEvents?this.handler=this._register(new GQ(e,t,i)):window.TouchEvent?this.handler=this._register(new KQ(e,t,i)):this.handler=this._register(new ou(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class Sg extends Y_{}class Uf extends Sg{constructor(e){super();this._context=e,this._readConfig(),this._lastCursorModelPosition=new U(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(58);const t=e.get(59);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(83);const i=e.get(129);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.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(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.model.coordinatesConverter.convertViewPositionToModelPosition(new U(e,1));if(t.column!==1)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?'<span class="relative-current-line-number">'+i+"</span>":String(n)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===i||i%10===0?String(i):"":String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=ir?this._lineHeight%2===0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s='<div class="'+Uf.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',o=this._context.model.getLineCount(),a=[];for(let l=i;l<=n;l++){const c=l-i;if(!this._renderFinalNewline&&l===o&&this._context.model.getLineLength(l)===0){a[c]="";continue}const d=this._getLineRenderLineNumber(l);d?l===this._activeLineNumber?a[c]='<div class="active-line-number '+Uf.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+d+"</div>":a[c]=s+d+"</div>":a[c]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Uf.CLASS_NAME="line-numbers";Et((r,e)=>{const t=r.getColor(QW);t&&e.addRule(`.monaco-editor .line-numbers { color: ${t}; }`);const i=r.getColor($X);i&&e.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${i}; }`)});class au extends as{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=ht(document.createElement("div")),this._domNode.setClassName(au.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=ht(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(au.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(129);return this._canUseLayerHinting=!t.get(28),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)}}au.CLASS_NAME="glyph-margin";au.OUTER_CLASS_NAME="margin";const jd="monaco-mouse-cursor-text";class IA{constructor(e,t,i){this._visibleTextAreaBrand=void 0,this.top=e,this.left=t,this.width=i}setWidth(e){return new IA(this.top,this.left,e)}}const Zg=Bn;class ZQ extends as{constructor(e,t,i){super(e);this._primaryCursorPosition=new U(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,s=n.get(129);this._setAccessibilityOptions(n),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=n.get(43),this._lineHeight=n.get(58),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new _e(1,1,1,1)],this._modelSelections=[new _e(1,1,1,1)],this._lastRenderPosition=null,this.textArea=ht(document.createElement("textarea")),ca.write(this.textArea,6),this.textArea.setClassName(`inputarea ${jd}`),this.textArea.setAttribute("wrap","off"),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(n)),this.textArea.setAttribute("tabindex",String(n.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",m("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=ht(document.createElement("div")),this.textAreaCover.setPosition("absolute");const o={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:l=>this._context.model.getLineMaxColumn(l),getValueInRange:(l,c)=>this._context.model.getValueInRange(l,c)},a={getDataToCopy:l=>{const c=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,an),d=this._context.model.getEOL(),u=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),h=Array.isArray(c)?c:null,f=Array.isArray(c)?c.join(d):c;let g,p=null;if(l&&(_L.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&f.length<65536)){const _=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);_&&(g=_.html,p=_.mode)}return{isFromEmptySelection:u,multicursorText:h,text:f,html:g,mode:p}},getScreenReaderContent:l=>{if(this._accessibilitySupport===1){if(tt){const c=this._selections[0];if(c.isEmpty()){const d=c.getStartPosition();let u=this._getWordBeforePosition(d);if(u.length===0&&(u=this._getCharacterBeforePosition(d)),u.length>0)return new Mi(u,u.length,u.length,d,d)}}return Mi.EMPTY}if(vp){const c=this._selections[0];if(c.isEmpty()){const d=c.getStartPosition(),[u,h]=this._getAndroidWordAtPosition(d);if(u.length>0)return new Mi(u,h,h,d,d)}return Mi.EMPTY}return Yh.fromEditorSelection(l,o,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(l,c,d)=>this._context.model.deduceModelPositionRelativeToViewPosition(l,c,d)};this._textAreaInput=this._register(new jQ(a,this.textArea)),this._register(this._textAreaInput.onKeyDown(l=>{this._viewController.emitKeyDown(l)})),this._register(this._textAreaInput.onKeyUp(l=>{this._viewController.emitKeyUp(l)})),this._register(this._textAreaInput.onPaste(l=>{let c=!1,d=null,u=null;l.metadata&&(c=this._emptySelectionClipboard&&!!l.metadata.isFromEmptySelection,d=typeof l.metadata.multicursorText!="undefined"?l.metadata.multicursorText:null,u=l.metadata.mode),this._viewController.paste(l.text,c,d,u)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(l=>{l.replacePrevCharCnt||l.replaceNextCharCnt||l.positionDelta?this._viewController.compositionType(l.text,l.replacePrevCharCnt,l.replaceNextCharCnt,l.positionDelta):this._viewController.type(l.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(l=>{this._viewController.setSelection(l)})),this._register(this._textAreaInput.onCompositionStart(l=>{const c=this._selections[0].startLineNumber,d=this._selections[0].startColumn+l.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new k(c,d,c,d),0,1);const u=this._viewHelper.visibleRangeForPositionRelativeToEditor(c,d);u&&(this._visibleTextArea=new IA(this._context.viewLayout.getVerticalOffsetForLineNumber(c),u.left,Zg?0:1),this._render()),this.textArea.setClassName(`inputarea ${jd} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(l=>{!this._visibleTextArea||(this._visibleTextArea=this._visibleTextArea.setWidth(XQ(l.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${jd}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.model.getLineContent(e.lineNumber),n=os(t);let s=!0,o=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&o<=1&&(s=!1),s){const d=i.charCodeAt(o-2);n.get(d)!==0?s=!1:o--}if(a&&l>i.length&&(a=!1),a){const d=i.charCodeAt(l-1);n.get(d)!==0?a=!1:l++}c++}return[i.substring(o-1,l-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=os(this._context.configuration.options.get(115));let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(i.get(o)!==0||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 i=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!qi(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){return e.get(2)===1?m("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",ir?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===mo.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(43),this._lineHeight=t.get(58),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(111))),(e.hasChanged(30)||e.hasChanged(80))&&(t.get(30)&&t.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),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)}prepareRender(e){this._primaryCursorPosition=new U(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(tt){this._renderInsideEditor(this._primaryCursorPosition,t,e,Zg?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,t,e,Zg?0:1,Zg?0:1)}_renderInsideEditor(e,t,i,n,s){this._lastRenderPosition=e;const o=this.textArea,a=this.textAreaCover;Ln.applyFontInfo(o,this._fontInfo),o.setTop(t),o.setLeft(i),o.setWidth(n),o.setHeight(s),a.setTop(0),a.setLeft(0),a.setWidth(0),a.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(Ln.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),Zg){e.setWidth(0),e.setHeight(0),t.setWidth(0),t.setHeight(0);return}e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(49)?t.setClassName("monaco-editor-background textAreaCover "+au.OUTER_CLASS_NAME):i.get(59).renderType!==0?t.setClassName("monaco-editor-background textAreaCover "+Uf.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}function XQ(r,e){const i=document.createElement("canvas").getContext("2d");i.font=QQ(e);const n=i.measureText(r);return Bn?n.width+2:n.width}function QQ(r){return JQ("normal",r.fontWeight,r.fontSize,r.lineHeight,r.fontFamily)}function JQ(r,e,t,i,n){return`${r} normal ${e} ${t}px / ${i}px ${n}`}class md{static columnSelect(e,t,i,n,s,o){let a=Math.abs(s-i)+1,l=i>s,c=n>o,d=n<o,u=[];for(let h=0;h<a;h++){let f=i+(l?-h:h),g=Pt.columnFromVisibleColumn2(e,t,f,n),p=Pt.columnFromVisibleColumn2(e,t,f,o),_=Pt.visibleColumnFromColumn2(e,t,new U(f,g)),v=Pt.visibleColumnFromColumn2(e,t,new U(f,p));d&&(_>o||v<n)||c&&(v>n||_<o)||u.push(new zi(new k(f,g,f,g),0,new U(f,p),0))}if(u.length===0)for(let h=0;h<a;h++){const f=i+(l?-h:h),g=t.getLineMaxColumn(f);u.push(new zi(new k(f,g,f,g),0,new U(f,g),0))}return{viewStates:u,reversed:l,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,md.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 l=s;l<=o;l++){const c=t.getLineMaxColumn(l),d=Pt.visibleColumnFromColumn2(e,t,new U(l,c));n=Math.max(n,d)}let a=i.toViewVisualColumn;return a<n&&a++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,a)}static columnSelectUp(e,t,i,n){const s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}class tn{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new _e(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}class eJ{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return new _e(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}class jb{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new _e(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}class sC{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new _e(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}class DA{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class z1{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class _t{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-xj(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new U(i,e.getLineMaxColumn(i))}else 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=Pm.atomicPosition(s,t.column-1,i,0);if(o!==-1&&o+1>=n)return new U(t.lineNumber,o+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?_t.leftPositionAtomicSoftTabs(t,i,e.tabSize):_t.leftPosition(t,i);return new z1(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,a;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,a=i.selection.startColumn;else{const l=i.position.delta(void 0,-(s-1)),c=t.normalizePosition(_t.clipPositionColumn(l,t),0),d=_t.left(e,t,c);o=d.lineNumber,a=d.column}return i.move(n,o,a,0)}static clipPositionColumn(e,t){return new U(e.lineNumber,_t.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i=i+zC(e.getLineContent(t),i-1):t<e.getLineCount()&&(t=t+1,i=e.getLineMinColumn(t)),new U(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,s){if(i<e.getLineIndentColumn(t)){const o=e.getLineContent(t),a=Pm.atomicPosition(o,i-1,n,1);if(a!==-1)return new U(t,a+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?_t.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):_t.rightPosition(t,i.lineNumber,i.column);return new z1(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,s){let o,a;if(i.hasSelection()&&!n)o=i.selection.endLineNumber,a=i.selection.endColumn;else{const l=i.position.delta(void 0,s-1),c=t.normalizePosition(_t.clipPositionColumn(l,t),1),d=_t.right(e,t,c);o=d.lineNumber,a=d.column}return i.move(n,o,a,0)}static vertical(e,t,i,n,s,o,a){const l=Pt.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+s,c=t.getLineCount(),d=i===1&&n===1,u=i===c&&n===t.getLineMaxColumn(i),h=o<i?d:u;return i=o,i<1?(i=1,a?n=t.getLineMinColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):i>c?(i=c,a?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=Pt.columnFromVisibleColumn2(e,t,i,l),h?s=0:s=l-Pt.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new z1(i,n,s)}static down(e,t,i,n,s,o,a){return this.vertical(e,t,i,n,s,i+o,a)}static moveDown(e,t,i,n,s){let o,a;i.hasSelection()&&!n?(o=i.selection.endLineNumber,a=i.selection.endColumn):(o=i.position.lineNumber,a=i.position.column);let l=_t.down(e,t,o,a,i.leftoverVisibleColumns,s,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,i){let n=i.selection,s=_t.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=_t.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new zi(new k(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new U(o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(e,t,i,n,s,o,a){return this.vertical(e,t,i,n,s,i-o,a)}static moveUp(e,t,i,n,s){let o,a;i.hasSelection()&&!n?(o=i.selection.startLineNumber,a=i.selection.startColumn):(o=i.position.lineNumber,a=i.position.column);let l=_t.up(e,t,o,a,i.leftoverVisibleColumns,s,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,t,i){let n=i.selection,s=_t.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=_t.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new zi(new k(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new U(o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(e,t){return e.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(e,t,i,n){let s=i.position.lineNumber;for(;s>1&&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<s&&this._isBlankLine(t,o);)o++;for(;o<s&&!this._isBlankLine(t,o);)o++;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToBeginningOfLine(e,t,i,n){let s=i.position.lineNumber,o=t.getLineMinColumn(s),a=t.getLineFirstNonWhitespaceColumn(s)||o,l;return i.position.column===a?l=o:l=a,i.move(n,s,l,0)}static moveToEndOfLine(e,t,i,n,s){let o=i.position.lineNumber,a=t.getLineMaxColumn(o);return i.move(n,o,a,s?1073741824-a:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let s=t.getLineCount(),o=t.getLineMaxColumn(s);return i.move(n,s,o,0)}}class lu{static deleteRight(e,t,i,n){let s=[],o=e!==3;for(let a=0,l=n.length;a<l;a++){const c=n[a];let d=c;if(d.isEmpty()){let u=c.getPosition(),h=_t.right(t,i,u);d=new k(h.lineNumber,h.column,u.lineNumber,u.column)}if(d.isEmpty()){s[a]=null;continue}d.startLineNumber!==d.endLineNumber&&(o=!0),s[a]=new tn(d,"")}return[o,s]}static isAutoClosingPairDelete(e,t,i,n,s,o,a){if(t==="never"&&i==="never"||e==="never")return!1;for(let l=0,c=o.length;l<c;l++){const d=o[l],u=d.getPosition();if(!d.isEmpty())return!1;const h=s.getLineContent(u.lineNumber);if(u.column<2||u.column>=h.length+1)return!1;const f=h.charAt(u.column-2),g=n.get(f);if(!g)return!1;if(Vh(f)){if(i==="never")return!1}else if(t==="never")return!1;const p=h.charAt(u.column-1);let _=!1;for(const v of g)v.open===f&&v.close===p&&(_=!0);if(!_)return!1;if(e==="auto"){let v=!1;for(let b=0,C=a.length;b<C;b++){const y=a[b];if(u.lineNumber===y.startLineNumber&&u.column===y.startColumn){v=!0;break}}if(!v)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s].getPosition(),l=new k(a.lineNumber,a.column-1,a.lineNumber,a.column+1);n[s]=new tn(l,"")}return[!0,n]}static deleteLeft(e,t,i,n,s){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,s))return this._runAutoClosingPairDelete(t,i,n);const o=[];let a=e!==2;for(let l=0,c=n.length;l<c;l++){let d=lu.getDeleteRange(n[l],i,t);if(d.isEmpty()){o[l]=null;continue}d.startLineNumber!==d.endLineNumber&&(a=!0),o[l]=new tn(d,"")}return[a,o]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const n=e.getPosition();if(i.useTabStops&&n.column>1){const s=t.getLineContent(n.lineNumber),o=pr(s),a=o===-1?s.length+1:o+1;if(n.column<=a){const l=Pt.visibleColumnFromColumn2(i,t,n),c=Pt.prevIndentTabStop(l,i.indentSize),d=Pt.columnFromVisibleColumn2(i,t,n.lineNumber,c);return new k(n.lineNumber,d,n.lineNumber,n.column)}}return k.fromPositions(lu.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=Rj(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){const i=e.lineNumber-1;return new U(i,t.getLineMaxColumn(i))}else return e}static cut(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s];if(a.isEmpty())if(e.emptySelectionClipboard){let l=a.getPosition(),c,d,u,h;l.lineNumber<t.getLineCount()?(c=l.lineNumber,d=1,u=l.lineNumber+1,h=1):l.lineNumber>1?(c=l.lineNumber-1,d=t.getLineMaxColumn(l.lineNumber-1),u=l.lineNumber,h=t.getLineMaxColumn(l.lineNumber)):(c=l.lineNumber,d=1,u=l.lineNumber,h=t.getLineMaxColumn(l.lineNumber));let f=new k(c,d,u,h);f.isEmpty()?n[s]=null:n[s]=new tn(f,"")}else n[s]=null;else n[s]=new tn(a,"")}return new lr(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class ut{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let 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--){let o=e.charCodeAt(s),a=t.get(o);if(a===0){if(n===2)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(a===2){if(n===1)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(a===1&&n!==0)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1))}return n!==0?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let s=e.length;for(let o=n;o<s;o++){let a=e.charCodeAt(o),l=t.get(a);if(l===1||i===1&&l===2||i===2&&l===0)return o}return s}static _findNextWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0,s=e.length;for(let o=i.column-1;o<s;o++){let a=e.charCodeAt(o),l=t.get(a);if(l===0){if(n===2)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o);n=1}else if(l===2){if(n===1)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o);n=2}else if(l===1&&n!==0)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o)}return n!==0?this._createWord(e,n,1,this._findStartOfWord(e,t,n,s-1),s):null}static _findStartOfWord(e,t,i,n){for(let s=n;s>=0;s--){let o=e.charCodeAt(s),a=t.get(o);if(a===1||i===1&&a===2||i===2&&a===0)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,o=i.column;o===1&&s>1&&(s=s-1,o=t.getLineMaxColumn(s));let a=ut._findPreviousWordOnLine(e,t,new U(s,o));if(n===0)return new U(s,a?a.start+1:1);if(n===1)return a&&a.wordType===2&&a.end-a.start===1&&a.nextCharClass===0&&(a=ut._findPreviousWordOnLine(e,t,new U(s,a.start+1))),new U(s,a?a.start+1:1);if(n===3){for(;a&&a.wordType===2;)a=ut._findPreviousWordOnLine(e,t,new U(s,a.start+1));return new U(s,a?a.start+1:1)}return a&&o<=a.end+1&&(a=ut._findPreviousWordOnLine(e,t,new U(s,a.start+1))),new U(s,a?a.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===1)return i>1?new U(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let o=t.column-1;o>1;o--){const a=s.charCodeAt(o-2),l=s.charCodeAt(o-1);if(a===95&&l!==95)return new U(i,o);if(Ka(a)&&Ks(l))return new U(i,o);if(Ks(a)&&Ks(l)&&o+1<n){const c=s.charCodeAt(o);if(Ka(c))return new U(i,o)}}return new U(i,1)}static moveWordRight(e,t,i,n){let s=i.lineNumber,o=i.column,a=!1;o===t.getLineMaxColumn(s)&&s<t.getLineCount()&&(a=!0,s=s+1,o=1);let l=ut._findNextWordOnLine(e,t,new U(s,o));if(n===2)l&&l.wordType===2&&l.end-l.start===1&&l.nextCharClass===0&&(l=ut._findNextWordOnLine(e,t,new U(s,l.end+1))),l?o=l.end+1:o=t.getLineMaxColumn(s);else if(n===3){for(a&&(o=0);l&&(l.wordType===2||l.start+1<=o);)l=ut._findNextWordOnLine(e,t,new U(s,l.end+1));l?o=l.start+1:o=t.getLineMaxColumn(s)}else l&&!a&&o>=l.start+1&&(l=ut._findNextWordOnLine(e,t,new U(s,l.end+1))),l?o=l.start+1:o=t.getLineMaxColumn(s);return new U(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i<e.getLineCount()?new U(i+1,1):t;const s=e.getLineContent(i);for(let o=t.column+1;o<n;o++){const a=s.charCodeAt(o-2),l=s.charCodeAt(o-1);if(a!==95&&l===95)return new U(i,o);if(Ka(a)&&Ks(l))return new U(i,o);if(Ks(a)&&Ks(l)&&o+1<n){const c=s.charCodeAt(o);if(Ka(c))return new U(i,o)}}return new U(i,n)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-2,s=Jo(i,n);return s+1<n?new k(t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;if(lu.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const u=e.selection.getPosition();return new k(u.lineNumber,u.column-1,u.lineNumber,u.column+1)}const a=new U(s.positionLineNumber,s.positionColumn);let l=a.lineNumber,c=a.column;if(l===1&&c===1)return null;if(o){let u=this._deleteWordLeftWhitespace(n,a);if(u)return u}let d=ut._findPreviousWordOnLine(i,n,a);return t===0?d?c=d.start+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l)):(d&&c<=d.end+1&&(d=ut._findPreviousWordOnLine(i,n,new U(l,d.start+1))),d?c=d.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new k(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new U(i.positionLineNumber,i.positionColumn);let s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return i===32||i===9}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(n===0)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+1<n&&this._charAtIsWhitespace(i,o+1);)o++;return new k(t.lineNumber,s+1,t.lineNumber,o+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),s=n.length;if(s===0)return i.lineNumber>1?new k(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new k(i.lineNumber,1,i.lineNumber+1,1):new k(i.lineNumber,1,i.lineNumber,1);const o=u=>u.start+1<=i.column&&i.column<=u.end+1,a=(u,h)=>(u=Math.min(u,i.column),h=Math.max(h,i.column),new k(i.lineNumber,u,i.lineNumber,h)),l=u=>{let h=u.start+1,f=u.end+1,g=!1;for(;f-1<s&&this._charAtIsWhitespace(n,f-1);)g=!0,f++;if(!g)for(;h>1&&this._charAtIsWhitespace(n,h-2);)h--;return a(h,f)},c=ut._findPreviousWordOnLine(e,t,i);if(c&&o(c))return l(c);const d=ut._findNextWordOnLine(e,t,i);return d&&o(d)?l(d):c&&d?a(c.end+1,d.start+1):c?a(c.start+1,c.end+1):d?a(d.start+1,d.end+1):a(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ut._moveWordPartLeft(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n<i;n++){let s=e.charAt(n);if(s!==" "&&s!==" ")return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,s=this._findFirstNonWhitespaceChar(i,n);return n+1<s?new k(t.lineNumber,t.column,t.lineNumber,s+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;const a=new U(s.positionLineNumber,s.positionColumn);let l=a.lineNumber,c=a.column;const d=n.getLineCount(),u=n.getLineMaxColumn(l);if(l===d&&c===u)return null;if(o){let f=this._deleteWordRightWhitespace(n,a);if(f)return f}let h=ut._findNextWordOnLine(i,n,a);return t===2?h?c=h.end+1:c<u||l===d?c=u:(l++,h=ut._findNextWordOnLine(i,n,new U(l,1)),h?c=h.start+1:c=n.getLineMaxColumn(l)):(h&&c>=h.start+1&&(h=ut._findNextWordOnLine(i,n,new U(l,h.end+1))),h?c=h.start+1:c<u||l===d?c=u:(l++,h=ut._findNextWordOnLine(i,n,new U(l,1)),h?c=h.start+1:c=n.getLineMaxColumn(l))),new k(l,c,a.lineNumber,a.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ut._moveWordPartRight(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new k(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=os(t),s=ut._findPreviousWordOnLine(n,e,i);if(s&&s.wordType===1&&s.start<=i.column-1&&i.column-1<=s.end)return ut._createWordAtPosition(e,i.lineNumber,s);const o=ut._findNextWordOnLine(n,e,i);return o&&o.wordType===1&&o.start<=i.column-1&&i.column-1<=o.end?ut._createWordAtPosition(e,i.lineNumber,o):null}static word(e,t,i,n,s){const o=os(e.wordSeparators);let a=ut._findPreviousWordOnLine(o,t,s),l=ut._findNextWordOnLine(o,t,s);if(!n){let f,g;return a&&a.wordType===1&&a.start<=s.column-1&&s.column-1<=a.end?(f=a.start+1,g=a.end+1):l&&l.wordType===1&&l.start<=s.column-1&&s.column-1<=l.end?(f=l.start+1,g=l.end+1):(a?f=a.end+1:f=1,l?g=l.start+1:g=t.getLineMaxColumn(s.lineNumber)),new zi(new k(s.lineNumber,f,s.lineNumber,g),0,new U(s.lineNumber,g),0)}let c,d;a&&a.wordType===1&&a.start<s.column-1&&s.column-1<a.end?(c=a.start+1,d=a.end+1):l&&l.wordType===1&&l.start<s.column-1&&s.column-1<l.end?(c=l.start+1,d=l.end+1):(c=s.column,d=s.column);let u=s.lineNumber,h;if(i.selectionStart.containsPosition(s))h=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){h=c;let f=new U(u,h);i.selectionStart.containsPosition(f)&&(h=i.selectionStart.endColumn)}else{h=d;let f=new U(u,h);i.selectionStart.containsPosition(f)&&(h=i.selectionStart.startColumn)}return i.move(!0,u,h,0)}}class L0 extends ut{static deleteWordPartLeft(e){const t=qb([ut.deleteWordLeft(e,0),ut.deleteWordLeft(e,2),ut._deleteWordPartLeft(e.model,e.selection)]);return t.sort(k.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=qb([ut.deleteWordRight(e,0),ut.deleteWordRight(e,2),ut._deleteWordPartRight(e.model,e.selection)]);return t.sort(k.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=qb([ut.moveWordLeft(e,t,i,0),ut.moveWordLeft(e,t,i,2),ut._moveWordPartLeft(t,i)]);return n.sort(U.compare),n[2]}static moveWordPartRight(e,t,i){const n=qb([ut.moveWordRight(e,t,i,0),ut.moveWordRight(e,t,i,2),ut._moveWordPartRight(t,i)]);return n.sort(U.compare),n[0]}}function qb(r){return r.filter(e=>Boolean(e))}class $i{static addCursorDown(e,t,i){let n=[],s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];n[s++]=new Ge(l.modelState,l.viewState),i?n[s++]=Ge.fromModelState(_t.translateDown(e.cursorConfig,e.model,l.modelState)):n[s++]=Ge.fromViewState(_t.translateDown(e.cursorConfig,e,l.viewState))}return n}static addCursorUp(e,t,i){let n=[],s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];n[s++]=new Ge(l.modelState,l.viewState),i?n[s++]=Ge.fromModelState(_t.translateUp(e.cursorConfig,e.model,l.modelState)):n[s++]=Ge.fromViewState(_t.translateUp(e.cursorConfig,e,l.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=this._moveToLineStart(e,a,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,s=t.modelState.position.column,o=n===s,a=t.viewState.position.lineNumber,l=e.getLineFirstNonWhitespaceColumn(a);return!o&&!(n===l)?this._moveToLineStartByView(e,t,i):this._moveToLineStartByModel(e,t,i)}static _moveToLineStartByView(e,t,i){return Ge.fromViewState(_t.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return Ge.fromModelState(_t.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=this._moveToLineEnd(e,l,i,n)}return s}static _moveToLineEnd(e,t,i,n){const s=t.viewState.position,o=e.getLineMaxColumn(s.lineNumber),a=s.column===o,l=t.modelState.position,c=e.model.getLineMaxColumn(l.lineNumber),d=o-s.column===c-l.column;return a||d?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return Ge.fromViewState(_t.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return Ge.fromModelState(_t.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const o=t[n],a=o.modelState.selection.startLineNumber,l=e.model.getLineCount();let c=o.modelState.selection.endLineNumber,d;c===l?d=e.model.getLineMaxColumn(l):(c++,d=1),i[n]=Ge.fromModelState(new zi(new k(a,1,a,1),0,new U(c,d),0))}return i}static moveToBeginningOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=Ge.fromModelState(_t.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=Ge.fromModelState(_t.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return Ge.fromModelState(new zi(new k(1,1,1,1),0,new U(i,n),0))}static line(e,t,i,n,s){const o=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new U(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);if(!i||!t.modelState.hasSelection()){const c=e.model.getLineCount();let d=o.lineNumber+1,u=1;return d>c&&(d=c,u=e.model.getLineMaxColumn(d)),Ge.fromModelState(new zi(new k(o.lineNumber,1,d,u),0,new U(d,u),0))}const l=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber<l)return Ge.fromViewState(t.viewState.move(t.modelState.hasSelection(),a.lineNumber,1,0));if(o.lineNumber>l){const c=e.getLineCount();let d=a.lineNumber+1,u=1;return d>c&&(d=c,u=e.getLineMaxColumn(d)),Ge.fromViewState(t.viewState.move(t.modelState.hasSelection(),d,u,0))}else{const c=t.modelState.selectionStart.getEndPosition();return Ge.fromModelState(t.modelState.move(t.modelState.hasSelection(),c.lineNumber,c.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return Ge.fromModelState(ut.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new Ge(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return Ge.fromViewState(new zi(new k(i,n,i,n),0,new U(i,n),0))}static moveTo(e,t,i,n,s){const o=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new U(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return Ge.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,o){switch(i){case 0:return o===4?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return o===4?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return o===2?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return o===2?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return o===2?t.map(a=>Ge.fromViewState(_t.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Ge.fromModelState(_t.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 5:return o===2?t.map(a=>Ge.fromViewState(_t.moveToNextBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>Ge.fromModelState(_t.moveToNextBlankLine(e.cursorConfig,e.model,a.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(),a=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const l=this._firstLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 14:{let l=[];for(let c=0,d=t.length;c<d;c++){const u=t[c];l[c]=this.findPositionInViewportIfOutside(e,u,o,n)}return l}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){let s=t.viewState.position.lineNumber;if(i.startLineNumber<=s&&s<=i.endLineNumber-1)return new Ge(t.modelState,t.viewState);{let o;s>i.endLineNumber-1?o=i.endLineNumber-1:s<i.startLineNumber?o=i.startLineNumber:o=s;const a=_t.vertical(e.cursorConfig,e,s,t.viewState.position.column,t.viewState.leftoverVisibleColumns,o,!1);return Ge.fromViewState(t.viewState.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map(s=>Ge.fromViewState(_t.moveLeft(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[s]=Ge.fromViewState(_t.moveLeft(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveRight(e,t,i,n){return t.map(s=>Ge.fromViewState(_t.moveRight(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineRight(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[s]=Ge.fromViewState(_t.moveRight(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveDownByViewLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=Ge.fromViewState(_t.moveDown(e.cursorConfig,e,l.viewState,i,n))}return s}static _moveDownByModelLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=Ge.fromModelState(_t.moveDown(e.cursorConfig,e.model,l.modelState,i,n))}return s}static _moveUpByViewLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=Ge.fromViewState(_t.moveUp(e.cursorConfig,e,l.viewState,i,n))}return s}static _moveUpByModelLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=Ge.fromModelState(_t.moveUp(e.cursorConfig,e.model,l.modelState,i,n))}return s}static _moveToViewPosition(e,t,i,n,s){return Ge.fromViewState(t.viewState.move(i,n,s,0))}static _moveToModelPosition(e,t,i,n,s){return Ge.fromModelState(t.modelState.move(i,n,s,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineMinColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineFirstNonWhitespaceColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewCenterColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round((e.getLineMaxColumn(l)+e.getLineMinColumn(l))/2);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewMaxColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineMaxColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineLastNonWhitespaceColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}}var Rw;(function(r){const e=function(i){if(!er(i))return!1;let n=i;return!(!Os(n.to)||!Pn(n.select)&&!y3(n.select)||!Pn(n.by)&&!Os(n.by)||!Pn(n.value)&&!Jd(n.value))};r.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: + * 'to': A mandatory logical position value providing where to move the cursor. + \`\`\` + 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', + 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' + 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' + 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' + \`\`\` + * 'by': Unit to move. Default is computed based on 'to' value. + \`\`\` + 'line', 'wrappedLine', 'character', 'halfLine' + \`\`\` + * 'value': Number of units to move. Default is '1'. + * 'select': If 'true' makes the selection. Default is 'false'. + `,constraint:e,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}}}}]},r.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"},r.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case r.RawDirection.Left:n=0;break;case r.RawDirection.Right:n=1;break;case r.RawDirection.Up:n=2;break;case r.RawDirection.Down:n=3;break;case r.RawDirection.PrevBlankLine:n=4;break;case r.RawDirection.NextBlankLine:n=5;break;case r.RawDirection.WrappedLineStart:n=6;break;case r.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case r.RawDirection.WrappedLineColumnCenter:n=8;break;case r.RawDirection.WrappedLineEnd:n=9;break;case r.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case r.RawDirection.ViewPortTop:n=11;break;case r.RawDirection.ViewPortBottom:n=13;break;case r.RawDirection.ViewPortCenter:n=12;break;case r.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case r.RawUnit.Line:s=1;break;case r.RawUnit.WrappedLine:s=2;break;case r.RawUnit.Character:s=3;break;case r.RawUnit.HalfLine:s=4;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1}}r.parse=t})(Rw||(Rw={}));const j1=Object.create(null);function Qc(r,e){if(e<=0)return"";j1[r]||(j1[r]=["",r]);const t=j1[r];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+r;return t[e]}class Ir{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,s){const o=Pt.visibleColumnFromColumn(e,t,i);if(s){const a=Qc(" ",n),c=Pt.prevIndentTabStop(o,n)/n;return Qc(a,c)}else{const a=" ",c=Pt.prevRenderTabStop(o,i)/i;return Qc(a,c)}}static shiftIndent(e,t,i,n,s){const o=Pt.visibleColumnFromColumn(e,t,i);if(s){const a=Qc(" ",n),c=Pt.nextIndentTabStop(o,n)/n;return Qc(a,c)}else{const a=" ",c=Pt.nextRenderTabStop(o,i)/i;return Qc(a,c)}}_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;this._selection.endColumn===1&&i!==n&&(n=n-1);const{tabSize:s,indentSize:o,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,d=0;for(let u=i;u<=n;u++,c=d){d=0;let h=e.getLineContent(u),f=pr(h);if(this._opts.isUnshift&&(h.length===0||f===0)||!l&&!this._opts.isUnshift&&h.length===0)continue;if(f===-1&&(f=h.length),u>1&&Pt.visibleColumnFromColumn(h,f+1,s)%o!==0&&e.isCheapToTokenize(u-1)){let _=Ue.getEnterAction(this._opts.autoIndent,e,new k(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)));if(_){if(d=c,_.appendText)for(let v=0,b=_.appendText.length;v<b&&d<o&&_.appendText.charCodeAt(v)===32;v++)d++;_.removeText&&(d=Math.max(0,d-_.removeText));for(let v=0;v<d&&!(f===0||h.charCodeAt(f-1)!==32);v++)f--}}if(this._opts.isUnshift&&f===0)continue;let g;this._opts.isUnshift?g=Ir.unshiftIndent(h,f+1,s,o,a):g=Ir.shiftIndent(h,f+1,s,o,a),this._addEditOperation(t,new k(u,1,u,f+1),g),u===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&e.getLineLength(i)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const c=a?Qc(" ",o):" ";for(let d=i;d<=n;d++){const u=e.getLineContent(d);let h=pr(u);if(!(this._opts.isUnshift&&(u.length===0||h===0))&&!(!l&&!this._opts.isUnshift&&u.length===0)&&(h===-1&&(h=u.length),!(this._opts.isUnshift&&h===0)))if(this._opts.isUnshift){h=Math.min(h,o);for(let f=0;f<h;f++)if(u.charCodeAt(f)===9){h=f+1;break}this._addEditOperation(t,new k(d,1,d,h+1),"")}else this._addEditOperation(t,new k(d,1,d,1),c),d===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let n=t.getInverseEditOperations()[0];return new _e(n.range.endLineNumber,n.range.endColumn,n.range.endLineNumber,n.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let n=this._selection.startColumn;return i.startColumn<=n?i:i.getDirection()===0?new _e(i.startLineNumber,n,i.endLineNumber,i.endColumn):new _e(i.endLineNumber,i.endColumn,i.startLineNumber,n)}return i}}class tJ{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new k(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new k(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new _e(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}class Yt{static indent(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new Ir(i[s],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new Ir(i[s],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,Ir.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,Ir.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){let s=[];for(let o=0,a=i.length;o<a;o++)s[o]=new tn(i[o],n[o]);return new lr(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){let o=[];for(let a=0,l=i.length;a<l;a++){const c=i[a];let d=c.getPosition();if(s&&!c.isEmpty()&&(s=!1),s&&n.indexOf(` +`)!==n.length-1&&(s=!1),s){let u=new k(d.lineNumber,1,d.lineNumber,1);o[a]=new DA(u,n,c,!0)}else o[a]=new tn(c,n)}return new lr(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n||t.length===1)return null;if(s&&s.length===t.length)return s;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substr(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substr(0,i.length-1));let o=aa(i);if(o.length===t.length)return o}return null}static paste(e,t,i,n,s,o){const a=this._distributePasteToCursors(e,i,n,s,o);return a?(i=i.sort(k.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _goodIndentForLine(e,t,i){let n=null,s="";const o=Ue.getInheritIndentForLine(e.autoIndent,t,i,!1);if(o)n=o.action,s=o.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const d=t.getLineContent(a);if(Jo(d)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=Ue.getEnterAction(e.autoIndent,t,new k(a,l,a,l));c&&(s=c.indentation+c.appendText)}return n&&(n===fi.Indent&&(s=Yt.shiftIndent(e,s)),n===fi.Outdent&&(s=Yt.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="",o=i.getStartPosition();if(e.insertSpaces){let a=Pt.visibleColumnFromColumn2(e,t,o),l=e.indentSize,c=l-a%l;for(let d=0;d<c;d++)s+=" "}else s=" ";return new tn(i,s,n)}static tab(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s];if(a.isEmpty()){let l=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&t.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,t,a.startLineNumber);c=c||" ";let d=e.normalizeIndentation(c);if(!l.startsWith(d)){n[s]=new tn(new k(a.startLineNumber,1,a.startLineNumber,l.length+1),d,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){let l=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new Ir(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static compositionType(e,t,i,n,s,o,a,l){const c=n.map(d=>this._compositionType(i,d,s,o,a,l));return new lr(4,c,{shouldPushStackElementBefore:Gb(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),d=new k(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(d)===i&&o===0?null:new sC(d,i,0,o)}static _typeCommand(e,t,i){return i?new jb(e,t,!0):new tn(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return Yt._typeCommand(n,` +`,i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){let l=t.getLineContent(n.startLineNumber),c=Tt(l).substring(0,n.startColumn-1);return Yt._typeCommand(n,` +`+e.normalizeIndentation(c),i)}const s=Ue.getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===fi.None)return Yt._typeCommand(n,` +`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===fi.Indent)return Yt._typeCommand(n,` +`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===fi.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),d=` +`+c+` +`+l;return i?new jb(n,d,!0):new sC(n,d,-1,c.length-l.length,!0)}else if(s.indentAction===fi.Outdent){const l=Yt.unshiftIndent(e,s.indentation);return Yt._typeCommand(n,` +`+e.normalizeIndentation(l+s.appendText),i)}}const o=t.getLineContent(n.startLineNumber),a=Tt(o).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=Ue.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:c=>Yt.unshiftIndent(e,c),shiftIndent:c=>Yt.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)});if(l){let c=Pt.visibleColumnFromColumn2(e,t,n.getEndPosition());const d=n.endColumn,u=t.getLineContent(n.endLineNumber),h=pr(u);if(h>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,h+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new jb(n,` +`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return d<=h+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new sC(n,` +`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return Yt._typeCommand(n,` +`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;n<s;n++)if(!t.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const s=Ue.getIndentationAtPosition(t,i.startLineNumber,i.startColumn),o=Ue.getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:a=>Yt.shiftIndent(e,a),unshiftIndent:a=>Yt.unshiftIndent(e,a)});if(o===null)return null;if(o!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?Yt._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):Yt._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,a=i.length;o<a;o++){const l=i[o];if(!l.isEmpty())return!1;const c=l.getPosition(),d=t.getLineContent(c.lineNumber);if(d.charAt(c.column-1)!==s)return!1;const h=Vh(s);if((c.column>2?d.charCodeAt(c.column-2):0)===92&&h)return!1;if(e.autoClosingOvertype==="auto"){let g=!1;for(let p=0,_=n.length;p<_;p++){const v=n[p];if(c.lineNumber===v.startLineNumber&&c.column===v.startColumn){g=!0;break}}if(!g)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,s){let o=[];for(let a=0,l=n.length;a<l;a++){const d=n[a].getPosition(),u=new k(d.lineNumber,d.column,d.lineNumber,d.column+1);o[a]=new tn(u,s)}return new lr(4,o,{shouldPushStackElementBefore:Gb(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(l=>t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!o&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const a of s)if(o===null||a.open.length>o.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new k(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(o=a)}return o}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";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?s.close:""}static _getAutoClosingPairClose(e,t,i,n,s){const o=Vh(n),a=o?e.autoClosingQuotes:e.autoClosingBrackets;if(a==="never")return null;const l=this._findAutoClosingPairOpen(e,t,i.map(h=>h.getPosition()),n);if(!l)return null;const c=this._findSubAutoClosingPairClose(e,l);let d=!0;const u=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let h=0,f=i.length;h<f;h++){const g=i[h];if(!g.isEmpty())return null;const p=g.getPosition(),_=t.getLineContent(p.lineNumber),v=_.substring(p.column-1);if(v.startsWith(c)||(d=!1),_.length>p.column-1){const y=_.charAt(p.column-1);if(!Yt._isBeforeClosingBrace(e,v)&&!u(y))return null}if(!t.isCheapToTokenize(p.lineNumber))return null;if(l.open.length===1&&o&&a!=="always"){const y=os(e.wordSeparators);if(s&&p.column>1&&y.get(_.charCodeAt(p.column-2))===0||!s&&p.column>2&&y.get(_.charCodeAt(p.column-3))===0)return null}t.forceTokenization(p.lineNumber);const b=t.getLineTokens(p.lineNumber);let C=!1;try{C=Ue.shouldAutoClosePair(l,b,s?p.column:p.column-1)}catch(y){Fe(y)}if(!C)return null}return d?l.close.substring(0,l.close.length-c.length):l.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,a){let l=[];for(let c=0,d=n.length;c<d;c++){const u=n[c];l[c]=new p8(u,s,o,a)}return new lr(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return Vh(t)?e.autoSurround==="quotes"||e.autoSurround==="languageDefined":e.autoSurround==="brackets"||e.autoSurround==="languageDefined"}static _isSurroundSelectionType(e,t,i,n){if(!Yt._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const s=Vh(n);for(let o=0,a=i.length;o<a;o++){const l=i[o];if(l.isEmpty())return!1;let c=!0;for(let d=l.startLineNumber;d<=l.endLineNumber;d++){const u=t.getLineContent(d),h=d===l.startLineNumber?l.startColumn-1:0,f=d===l.endLineNumber?l.endColumn-1:u.length,g=u.substring(h,f);if(/[^ \t]/.test(g)){c=!1;break}}if(c)return!1;if(s&&l.startLineNumber===l.endLineNumber&&l.startColumn+1===l.endColumn){const d=t.getValueInRange(l);if(Vh(d))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,s){let o=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],d=t.surroundingPairs[s];o[a]=new tJ(c,s,d)}return new lr(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!!(i.length===1&&t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,n,s){if(!t.electricChars.hasOwnProperty(s)||!n.isEmpty())return null;let o=n.getPosition();i.forceTokenization(o.lineNumber);let a=i.getLineTokens(o.lineNumber),l;try{l=Ue.onElectricCharacter(s,a,o.column)}catch(c){return Fe(c),null}if(!l)return null;if(l.matchOpenBracket){let c=(a.getLineContent()+s).lastIndexOf(l.matchOpenBracket)+1,d=i.findMatchingBracketUp(l.matchOpenBracket,{lineNumber:o.lineNumber,column:c});if(d){if(d.startLineNumber===o.lineNumber)return null;let u=i.getLineContent(d.startLineNumber),h=Tt(u),f=t.normalizeIndentation(h),g=i.getLineContent(o.lineNumber),p=i.getLineFirstNonWhitespaceColumn(o.lineNumber)||o.column,_=g.substring(p-1,o.column-1),v=f+_+s,b=new k(o.lineNumber,1,o.lineNumber,o.column);const C=new tn(b,v);return new lr(q1(v,e),[C],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,s,o){if(!n||_e.selectionsArrEqual(n,s))return null;let a=null;for(const c of s){if(!c.isEmpty())return null;const d=c.getPosition(),u=i.getValueInRange(new k(d.lineNumber,d.column-1,d.lineNumber,d.column));if(a===null)a=u;else if(a!==u)return null}if(!a)return null;if(this._isAutoClosingOvertype(t,i,s,o,a)){const c=s.map(d=>new tn(new k(d.positionLineNumber,d.positionColumn,d.positionLineNumber,d.positionColumn+1),"",!1));return new lr(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const l=this._getAutoClosingPairClose(t,i,s,a,!1);return l!==null?this._runAutoClosingOpenCharType(e,t,i,s,a,!1,l):null}static typeWithInterceptors(e,t,i,n,s,o,a){if(!e&&a===` +`){let d=[];for(let u=0,h=s.length;u<h;u++)d[u]=Yt._enter(i,n,!1,s[u]);return new lr(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,s)){let d=[],u=!1;for(let h=0,f=s.length;h<f;h++)if(d[h]=this._runAutoIndentType(i,n,s[h],a),!d[h]){u=!0;break}if(!u)return new lr(4,d,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,s,o,a))return this._runAutoClosingOvertype(t,i,n,s,a);if(!e){const d=this._getAutoClosingPairClose(i,n,s,a,!0);if(d)return this._runAutoClosingOpenCharType(t,i,n,s,a,!0,d)}if(this._isSurroundSelectionType(i,n,s,a))return this._runSurroundSelectionType(t,i,n,s,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,s)){const d=this._typeInterceptorElectricChar(t,i,n,s[0],a);if(d)return d}let l=[];for(let d=0,u=s.length;d<u;d++)l[d]=new tn(s[d],a);const c=q1(a,t);return new lr(c,l,{shouldPushStackElementBefore:Gb(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,s){let o=[];for(let l=0,c=n.length;l<c;l++)o[l]=new tn(n[l],s);const a=q1(s,e);return new lr(a,o,{shouldPushStackElementBefore:Gb(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new jb(new k(1,1,1,1),` +`);else{a--;let l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s].positionLineNumber;let l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}return n}static lineBreakInsert(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class p8 extends sC{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length);this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new k(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new k(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}function q1(r,e){return r===" "?e===5||e===6?6:5:4}function Gb(r,e){return wM(r)&&!wM(e)?!0:r===5?!1:CM(r)!==CM(e)}function CM(r){return r===6||r===5?"space":r}function wM(r){return r===4||r===5||r===6}var R;(function(r){r.editorSimpleInput=new xe("editorSimpleInput",!1,!0),r.editorTextFocus=new xe("editorTextFocus",!1,m("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),r.focus=new xe("editorFocus",!1,m("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),r.textInputFocus=new xe("textInputFocus",!1,m("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),r.readOnly=new xe("editorReadonly",!1,m("editorReadonly","Whether the editor is read only")),r.inDiffEditor=new xe("inDiffEditor",!1,m("inDiffEditor","Whether the context is a diff editor")),r.columnSelection=new xe("editorColumnSelection",!1,m("editorColumnSelection","Whether `editor.columnSelection` is enabled")),r.writable=r.readOnly.toNegated(),r.hasNonEmptySelection=new xe("editorHasSelection",!1,m("editorHasSelection","Whether the editor has text selected")),r.hasOnlyEmptySelection=r.hasNonEmptySelection.toNegated(),r.hasMultipleSelections=new xe("editorHasMultipleSelections",!1,m("editorHasMultipleSelections","Whether the editor has multiple selections")),r.hasSingleSelection=r.hasMultipleSelections.toNegated(),r.tabMovesFocus=new xe("editorTabMovesFocus",!1,m("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),r.tabDoesNotMoveFocus=r.tabMovesFocus.toNegated(),r.isInWalkThroughSnippet=new xe("isInEmbeddedEditor",!1,!0),r.canUndo=new xe("canUndo",!1,!0),r.canRedo=new xe("canRedo",!1,!0),r.hoverVisible=new xe("editorHoverVisible",!1,m("editorHoverVisible","Whether the editor hover is visible")),r.inCompositeEditor=new xe("inCompositeEditor",void 0,m("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),r.notInCompositeEditor=r.inCompositeEditor.toNegated(),r.languageId=new xe("editorLangId","",m("editorLangId","The language identifier of the editor")),r.hasCompletionItemProvider=new xe("editorHasCompletionItemProvider",!1,m("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),r.hasCodeActionsProvider=new xe("editorHasCodeActionsProvider",!1,m("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),r.hasCodeLensProvider=new xe("editorHasCodeLensProvider",!1,m("editorHasCodeLensProvider","Whether the editor has a code lens provider")),r.hasDefinitionProvider=new xe("editorHasDefinitionProvider",!1,m("editorHasDefinitionProvider","Whether the editor has a definition provider")),r.hasDeclarationProvider=new xe("editorHasDeclarationProvider",!1,m("editorHasDeclarationProvider","Whether the editor has a declaration provider")),r.hasImplementationProvider=new xe("editorHasImplementationProvider",!1,m("editorHasImplementationProvider","Whether the editor has an implementation provider")),r.hasTypeDefinitionProvider=new xe("editorHasTypeDefinitionProvider",!1,m("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),r.hasHoverProvider=new xe("editorHasHoverProvider",!1,m("editorHasHoverProvider","Whether the editor has a hover provider")),r.hasDocumentHighlightProvider=new xe("editorHasDocumentHighlightProvider",!1,m("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),r.hasDocumentSymbolProvider=new xe("editorHasDocumentSymbolProvider",!1,m("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),r.hasReferenceProvider=new xe("editorHasReferenceProvider",!1,m("editorHasReferenceProvider","Whether the editor has a reference provider")),r.hasRenameProvider=new xe("editorHasRenameProvider",!1,m("editorHasRenameProvider","Whether the editor has a rename provider")),r.hasSignatureHelpProvider=new xe("editorHasSignatureHelpProvider",!1,m("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),r.hasInlayHintsProvider=new xe("editorHasInlayHintsProvider",!1,m("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),r.hasDocumentFormattingProvider=new xe("editorHasDocumentFormattingProvider",!1,m("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),r.hasDocumentSelectionFormattingProvider=new xe("editorHasDocumentSelectionFormattingProvider",!1,m("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),r.hasMultipleDocumentFormattingProvider=new xe("editorHasMultipleDocumentFormattingProvider",!1,m("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),r.hasMultipleDocumentSelectionFormattingProvider=new xe("editorHasMultipleDocumentSelectionFormattingProvider",!1,m("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(R||(R={}));const mt=0;class ui extends dn{runEditorCommand(e,t,i){const n=t._getViewModel();!n||this.runCoreEditorCommand(n,i||{})}}var Ow;(function(r){const e=function(i){if(!er(i))return!1;const n=i;return!(!Os(n.to)||!Pn(n.by)&&!Os(n.by)||!Pn(n.value)&&!Jd(n.value)||!Pn(n.revealCursor)&&!y3(n.revealCursor))};r.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},r.RawDirection={Up:"up",Down:"down"},r.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function t(i){let n;switch(i.to){case r.RawDirection.Up:n=1;break;case r.RawDirection.Down:n=2;break;default:return null}let s;switch(i.by){case r.RawUnit.Line:s=1;break;case r.RawUnit.WrappedLine:s=2;break;case r.RawUnit.Page:s=3;break;case r.RawUnit.HalfPage:s=4;break;default:s=2}const o=Math.floor(i.value||1),a=!!i.revealCursor;return{direction:n,unit:s,value:o,revealCursor:a,select:!!i.select}}r.parse=t})(Ow||(Ow={}));var Zh;(function(r){const e=function(t){if(!er(t))return!1;const i=t;return!(!Jd(i.lineNumber)&&!Os(i.lineNumber)||!Pn(i.at)&&!Os(i.at))};r.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},r.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(Zh||(Zh={}));class bL{constructor(e){e.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ct).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=document.activeElement;return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(Ct).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Ni;(function(r){class e extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[$i.moveTo(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)]),b.revealPrimaryCursor(C.source,!0)}}r.MoveTo=fe(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),r.MoveToSelect=fe(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends ui{runCoreEditorCommand(b,C){b.model.pushStackElement();const y=this._getColumnSelectResult(b,b.getPrimaryCursorState(),b.getCursorColumnSelectData(),C);b.setCursorStates(C.source,3,y.viewStates.map(E=>Ge.fromViewState(E))),b.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:y.fromLineNumber,fromViewVisualColumn:y.fromVisualColumn,toViewLineNumber:y.toLineNumber,toViewVisualColumn:y.toVisualColumn}),y.reversed?b.revealTopMostCursor(C.source):b.revealBottomMostCursor(C.source)}}r.ColumnSelect=fe(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(v,b,C,y){const E=v.model.validatePosition(y.position),S=v.coordinatesConverter.validateViewPosition(new U(y.viewPosition.lineNumber,y.viewPosition.column),E);let w=y.doColumnSelect?C.fromViewLineNumber:S.lineNumber,x=y.doColumnSelect?C.fromViewVisualColumn:y.mouseColumn-1;return md.columnSelect(v.cursorConfig,v,w,x,S.lineNumber,y.mouseColumn-1)}}),r.CursorColumnSelectLeft=fe(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3599,linux:{primary:0}}})}_getColumnSelectResult(v,b,C,y){return md.columnSelectLeft(v.cursorConfig,v,C)}}),r.CursorColumnSelectRight=fe(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3601,linux:{primary:0}}})}_getColumnSelectResult(v,b,C,y){return md.columnSelectRight(v.cursorConfig,v,C)}});class i extends t{constructor(b){super(b);this._isPaged=b.isPaged}_getColumnSelectResult(b,C,y,E){return md.columnSelectUp(b.cursorConfig,b,y,this._isPaged)}}r.CursorColumnSelectUp=fe(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3600,linux:{primary:0}}})),r.CursorColumnSelectPageUp=fe(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3595,linux:{primary:0}}}));class n extends t{constructor(b){super(b);this._isPaged=b.isPaged}_getColumnSelectResult(b,C,y,E){return md.columnSelectDown(b.cursorConfig,b,y,this._isPaged)}}r.CursorColumnSelectDown=fe(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3602,linux:{primary:0}}})),r.CursorColumnSelectPageDown=fe(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3596,linux:{primary:0}}}));class s extends ui{constructor(){super({id:"cursorMove",precondition:void 0,description:Rw.description})}runCoreEditorCommand(b,C){const y=Rw.parse(C);!y||this._runCursorMove(b,C.source,y)}_runCursorMove(b,C,y){b.model.pushStackElement(),b.setCursorStates(C,3,s._move(b,b.getCursorStates(),y)),b.revealPrimaryCursor(C,!0)}static _move(b,C,y){const E=y.select,S=y.value;switch(y.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return $i.simpleMove(b,C,y.direction,E,S,y.unit);case 11:case 13:case 12:case 14:return $i.viewportMove(b,C,y.direction,E,S);default:return null}}}r.CursorMoveImpl=s,r.CursorMove=fe(new s);class o extends ui{constructor(b){super(b);this._staticArgs=b.args}runCoreEditorCommand(b,C){let y=this._staticArgs;this._staticArgs.value===-1&&(y={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:b.cursorConfig.pageSize}),b.model.pushStackElement(),b.setCursorStates(C.source,3,$i.simpleMove(b,b.getCursorStates(),y.direction,y.select,y.value,y.unit)),b.revealPrimaryCursor(C.source,!0)}}r.CursorLeft=fe(new o({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:15,mac:{primary:15,secondary:[288]}}})),r.CursorLeftSelect=fe(new o({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1039}})),r.CursorRight=fe(new o({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:17,mac:{primary:17,secondary:[292]}}})),r.CursorRightSelect=fe(new o({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1041}})),r.CursorUp=fe(new o({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:16,mac:{primary:16,secondary:[302]}}})),r.CursorUpSelect=fe(new o({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1040,secondary:[3088],mac:{primary:1040},linux:{primary:1040}}})),r.CursorPageUp=fe(new o({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:11}})),r.CursorPageUpSelect=fe(new o({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1035}})),r.CursorDown=fe(new o({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:18,mac:{primary:18,secondary:[300]}}})),r.CursorDownSelect=fe(new o({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1042,secondary:[3090],mac:{primary:1042},linux:{primary:1042}}})),r.CursorPageDown=fe(new o({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:12}})),r.CursorPageDownSelect=fe(new o({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1036}})),r.CreateCursor=fe(new class extends ui{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(v,b){let C;b.wholeLine?C=$i.line(v,v.getPrimaryCursorState(),!1,b.position,b.viewPosition):C=$i.moveTo(v,v.getPrimaryCursorState(),!1,b.position,b.viewPosition);const y=v.getCursorStates();if(y.length>1){const E=C.modelState?C.modelState.position:null,S=C.viewState?C.viewState.position:null;for(let w=0,x=y.length;w<x;w++){const D=y[w];if(!(E&&!D.modelState.selection.containsPosition(E))&&!(S&&!D.viewState.selection.containsPosition(S))){y.splice(w,1),v.model.pushStackElement(),v.setCursorStates(b.source,3,y);return}}}y.push(C),v.model.pushStackElement(),v.setCursorStates(b.source,3,y)}}),r.LastCursorMoveToSelect=fe(new class extends ui{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(v,b){const C=v.getLastAddedCursorIndex(),y=v.getCursorStates(),E=y.slice(0);E[C]=$i.moveTo(v,y[C],!0,b.position,b.viewPosition),v.model.pushStackElement(),v.setCursorStates(b.source,3,E)}});class a extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,$i.moveToBeginningOfLine(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorHome=fe(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:14,mac:{primary:14,secondary:[2063]}}})),r.CursorHomeSelect=fe(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1038,mac:{primary:1038,secondary:[3087]}}}));class l extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,this._exec(b.getCursorStates())),b.revealPrimaryCursor(C.source,!0)}_exec(b){const C=[];for(let y=0,E=b.length;y<E;y++){const S=b[y],w=S.modelState.position.lineNumber;C[y]=Ge.fromModelState(S.modelState.move(this._inSelectionMode,w,1,0))}return C}}r.CursorLineStart=fe(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:0,mac:{primary:287}}})),r.CursorLineStartSelect=fe(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:0,mac:{primary:1311}}}));class c extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,$i.moveToEndOfLine(b,b.getCursorStates(),this._inSelectionMode,C.sticky||!1)),b.revealPrimaryCursor(C.source,!0)}}r.CursorEnd=fe(new c({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:mt,kbExpr:R.textInputFocus,primary:13,mac:{primary:13,secondary:[2065]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),r.CursorEndSelect=fe(new c({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:mt,kbExpr:R.textInputFocus,primary:1037,mac:{primary:1037,secondary:[3089]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class d extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,this._exec(b,b.getCursorStates())),b.revealPrimaryCursor(C.source,!0)}_exec(b,C){const y=[];for(let E=0,S=C.length;E<S;E++){const w=C[E],x=w.modelState.position.lineNumber,D=b.model.getLineMaxColumn(x);y[E]=Ge.fromModelState(w.modelState.move(this._inSelectionMode,x,D,0))}return y}}r.CursorLineEnd=fe(new d({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:0,mac:{primary:291}}})),r.CursorLineEndSelect=fe(new d({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:0,mac:{primary:1315}}}));class u extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,$i.moveToBeginningOfBuffer(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorTop=fe(new u({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2062,mac:{primary:2064}}})),r.CursorTopSelect=fe(new u({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3086,mac:{primary:3088}}}));class h extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,$i.moveToEndOfBuffer(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorBottom=fe(new h({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2061,mac:{primary:2066}}})),r.CursorBottomSelect=fe(new h({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:3085,mac:{primary:3090}}}));class f extends ui{constructor(){super({id:"editorScroll",precondition:void 0,description:Ow.description})}runCoreEditorCommand(b,C){const y=Ow.parse(C);!y||this._runEditorScroll(b,C.source,y)}_runEditorScroll(b,C,y){const E=this._computeDesiredScrollTop(b,y);if(y.revealCursor){const S=b.getCompletelyVisibleViewRangeAtScrollTop(E);b.setCursorStates(C,3,[$i.findPositionInViewportIfOutside(b,b.getPrimaryCursorState(),S,y.select)])}b.setScrollTop(E,0)}_computeDesiredScrollTop(b,C){if(C.unit===1){const S=b.getCompletelyVisibleViewRange(),w=b.coordinatesConverter.convertViewRangeToModelRange(S);let x;C.direction===1?x=Math.max(1,w.startLineNumber-C.value):x=Math.min(b.model.getLineCount(),w.startLineNumber+C.value);const D=b.coordinatesConverter.convertModelPositionToViewPosition(new U(x,1));return b.getVerticalOffsetForLineNumber(D.lineNumber)}let y;C.unit===3?y=b.cursorConfig.pageSize*C.value:C.unit===4?y=Math.round(b.cursorConfig.pageSize/2)*C.value:y=C.value;const E=(C.direction===1?-1:1)*y;return b.getScrollTop()+E*b.cursorConfig.lineHeight}}r.EditorScrollImpl=f,r.EditorScroll=fe(new f),r.ScrollLineUp=fe(new class extends ui{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2064,mac:{primary:267}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),r.ScrollPageUp=fe(new class extends ui{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2059,win:{primary:523},linux:{primary:523}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),r.ScrollLineDown=fe(new class extends ui{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2066,mac:{primary:268}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),r.ScrollPageDown=fe(new class extends ui{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2060,win:{primary:524},linux:{primary:524}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class g extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[$i.word(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position)]),b.revealPrimaryCursor(C.source,!0)}}r.WordSelect=fe(new g({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),r.WordSelectDrag=fe(new g({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),r.LastCursorWordSelect=fe(new class extends ui{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(v,b){const C=v.getLastAddedCursorIndex(),y=v.getCursorStates(),E=y.slice(0),S=y[C];E[C]=$i.word(v,S,S.modelState.hasSelection(),b.position),v.model.pushStackElement(),v.setCursorStates(b.source,3,E)}});class p extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[$i.line(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)]),b.revealPrimaryCursor(C.source,!1)}}r.LineSelect=fe(new p({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),r.LineSelectDrag=fe(new p({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class _ extends ui{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){const y=b.getLastAddedCursorIndex(),E=b.getCursorStates(),S=E.slice(0);S[y]=$i.line(b,E[y],this._inSelectionMode,C.position,C.viewPosition),b.model.pushStackElement(),b.setCursorStates(C.source,3,S)}}r.LastCursorLineSelect=fe(new _({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),r.LastCursorLineSelectDrag=fe(new _({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),r.ExpandLineSelection=fe(new class extends ui{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:2090}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,$i.expandLineSelection(v,v.getCursorStates())),v.revealPrimaryCursor(b.source,!0)}}),r.CancelSelection=fe(new class extends ui{constructor(){super({id:"cancelSelection",precondition:R.hasNonEmptySelection,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[$i.cancelSelection(v,v.getPrimaryCursorState())]),v.revealPrimaryCursor(b.source,!0)}}),r.RemoveSecondaryCursors=fe(new class extends ui{constructor(){super({id:"removeSecondaryCursors",precondition:R.hasMultipleSelections,kbOpts:{weight:mt+1,kbExpr:R.textInputFocus,primary:9,secondary:[1033]}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[v.getPrimaryCursorState()]),v.revealPrimaryCursor(b.source,!0),ww(m("removedCursor","Removed secondary cursors"))}}),r.RevealLine=fe(new class extends ui{constructor(){super({id:"revealLine",precondition:void 0,description:Zh.description})}runCoreEditorCommand(v,b){const C=b,y=C.lineNumber||0;let E=typeof y=="number"?y+1:parseInt(y)+1;E<1&&(E=1);const S=v.model.getLineCount();E>S&&(E=S);const w=new k(E,1,E,v.model.getLineMaxColumn(E));let x=0;if(C.at)switch(C.at){case Zh.RawAtArgument.Top:x=3;break;case Zh.RawAtArgument.Center:x=1;break;case Zh.RawAtArgument.Bottom:x=4;break}const D=v.coordinatesConverter.convertModelRangeToViewRange(w);v.revealRange(b.source,!1,D,x,0)}}),r.SelectAll=new class extends bL{constructor(){super(oY)}runDOMCommand(){Bn&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(v,b,C){const y=b._getViewModel();!y||this.runCoreEditorCommand(y,C)}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates("keyboard",3,[$i.selectAll(v,v.getPrimaryCursorState())])}},r.SetSelection=fe(new class extends ui{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[Ge.fromModelSelection(b.selection)])}})})(Ni||(Ni={}));const iJ=me.and(R.textInputFocus,R.columnSelection);function xg(r,e){zn.registerKeybindingRule({id:r,primary:e,when:iJ,weight:mt+1})}xg(Ni.CursorColumnSelectLeft.id,1039);xg(Ni.CursorColumnSelectRight.id,1041);xg(Ni.CursorColumnSelectUp.id,1040);xg(Ni.CursorColumnSelectPageUp.id,1035);xg(Ni.CursorColumnSelectDown.id,1042);xg(Ni.CursorColumnSelectPageDown.id,1036);function yM(r){return r.register(),r}var yf;(function(r){class e extends dn{runEditorCommand(i,n,s){const o=n._getViewModel();!o||this.runCoreEditingCommand(n,o,s||{})}}r.CoreEditingCommand=e,r.LineBreakInsert=fe(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:R.writable,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:0,mac:{primary:301}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Yt.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),r.Outdent=fe(new class extends e{constructor(){super({id:"outdent",precondition:R.writable,kbOpts:{weight:mt,kbExpr:me.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:1026}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Yt.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),r.Tab=fe(new class extends e{constructor(){super({id:"tab",precondition:R.writable,kbOpts:{weight:mt,kbExpr:me.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Yt.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),r.DeleteLeft=fe(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:1,secondary:[1025],mac:{primary:1,secondary:[1025,294,257]}}})}runCoreEditingCommand(t,i,n){const[s,o]=lu.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,o),i.setPrevEditOperationType(2)}}),r.DeleteRight=fe(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:mt,kbExpr:R.textInputFocus,primary:20,mac:{primary:20,secondary:[290,276]}}})}runCoreEditingCommand(t,i,n){const[s,o]=lu.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,o),i.setPrevEditOperationType(3)}}),r.Undo=new class extends bL{constructor(){super(tA)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(80)===!0))return i.getModel().undo()}},r.Redo=new class extends bL{constructor(){super(iA)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(80)===!0))return i.getModel().redo()}}})(yf||(yf={}));class SM extends b0{constructor(e,t,i){super({id:e,precondition:void 0,description:i});this._handlerId=t}runCommand(e,t){const i=e.get(Ct).getFocusedCodeEditor();!i||i.trigger("keyboard",this._handlerId,t)}}function Vu(r,e){yM(new SM("default:"+r,r)),yM(new SM(r,r,e))}Vu("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});Vu("replacePreviousChar");Vu("compositionType");Vu("compositionStart");Vu("compositionEnd");Vu("paste");Vu("cut");class nJ{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){Ni.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new U(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=ir&&t.get(95),n=t.get(18);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Ni.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Ni.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Ni.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Ni.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Ni.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Ni.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Ni.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Ni.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Ni.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Ni.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Ni.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Ni.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Ni.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 T0{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){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return T0.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new rJ(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class rJ{constructor(e,t,i,n,s,o){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=s,this.detail=o}toString(){return zs.toString(this)}}var G1;class m8{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 Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const l=t-e+1;return this._rendLineNumberStart-=l,null}if(e>n)return null;let s=0,o=0;for(let l=i;l<=n;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=t&&(o===0?(s=c,o=1):o++)}if(e<i){let l=0;t<i?l=t-e+1:l=i-e,this._rendLineNumberStart-=l}return this._lines.splice(s,o)}onLinesChanged(e,t){if(this.getCount()===0)return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let s=!1;for(let o=e;o<=t;o++)o>=i&&o<=n&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)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 u=0;u<i;u++)o[u]=this._createLine();const a=e-this._rendLineNumberStart,l=this._lines.slice(0,a),c=this._lines.slice(a,this._lines.length-i),d=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=l.concat(o).concat(c),d}onTokensChanged(e){if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let s=0,o=e.length;s<o;s++){const a=e[s];if(a.toLineNumber<t||a.fromLineNumber>i)continue;const l=Math.max(t,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let d=l;d<=c;d++){const u=d-this._rendLineNumberStart;this._lines[u].onTokensChanged(),n=!0}}return n}}class _8{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new m8(()=>this._host.createVisibleLine())}_createDomNode(){const e=ht(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(129)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const s=t[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const s=t[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new ja(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class ja{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let o=t;o<=i;o++)s.lines[o-t]=this.host.createVisibleLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){const o=t,a=Math.min(i,s.rendLineNumberStart-1);o<=a&&(this._insertLinesBefore(s,o,a,n,t),s.linesLength+=a-o+1)}else if(s.rendLineNumberStart<t){const o=Math.min(s.linesLength,t-s.rendLineNumberStart);o>0&&(this._removeLinesBefore(s,o),s.linesLength-=o)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){const o=s.rendLineNumberStart+s.linesLength,a=i;o<=a&&(this._insertLinesAfter(s,o,a,n,t),s.linesLength+=a-o+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){const o=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-o+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const c=o+l;a[l].layoutLine(c,n[c-s])}}_insertLinesBefore(e,t,i,n,s){const o=[];let a=0;for(let l=t;l<=i;l++)o[a++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const n=e.lines[i].getDomNode();n&&this.domNode.removeChild(n)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){const o=[];let a=0;for(let l=t;l<=i;l++)o[a++]=this.host.createVisibleLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const s=e.lines[i+n].getDomNode();s&&this.domNode.removeChild(s)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){ja._ttPolicy&&(i=ja._ttPolicy.createHTML(i));const s=this.domNode.lastChild;t||!s?this.domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this.domNode.lastChild;for(let a=e.linesLength-1;a>=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");ja._ttPolicy&&(t=ja._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;s<e.linesLength;s++){const o=e.lines[s];if(i[s]){const a=n.firstChild,l=o.getDomNode();l.parentNode.replaceChild(a,l),o.setDomNode(a)}}}_finishRendering(e,t,i){const n=ja._sb,s=e.linesLength,o=e.lines,a=e.rendLineNumberStart,l=[];{n.reset();let c=!1;for(let d=0;d<s;d++){const u=o[d];l[d]=!1,!(u.getDomNode()||!u.renderLine(d+a,i[d],this.viewportData,n))&&(l[d]=!0,c=!0)}c&&this._finishRenderingNewLines(e,t,n.build(),l)}{n.reset();let c=!1;const d=[];for(let u=0;u<s;u++){const h=o[u];d[u]=!1,!(l[u]||!h.renderLine(u+a,i[u],this.viewportData,n))&&(d[u]=!0,c=!0)}c&&this._finishRenderingInvalidLines(e,n.build(),d)}}}ja._ttPolicy=(G1=window.trustedTypes)===null||G1===void 0?void 0:G1.createPolicy("editorViewLayer",{createHTML:r=>r});ja._sb=eu(1e5);class b8 extends as{constructor(e){super(e);this._visibleLines=new _8(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new sJ(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,n=t.length;i<n;i++){const s=t[i];s.prepareRender(e),s.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class sJ{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=ht(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(58)}renderLine(e,t,i,n){let s="";for(let o=0,a=this._dynamicOverlays.length;o<a;o++)s+=this._dynamicOverlays[o].render(i.startLineNumber,e);return this._renderedContent===s?!1:(this._renderedContent=s,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(s),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class oJ extends b8{constructor(e){super(e);const i=this._context.configuration.options.get(129);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._contentWidth=i.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 aJ extends b8{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Ln.applyFontInfo(this.domNode,t.get(43))}onConfigurationChanged(e){const t=this._context.configuration.options;Ln.applyFontInfo(this.domNode,t.get(43));const i=t.get(129);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 Xg{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class lJ extends as{constructor(e,t){super(e);this._viewDomNode=t,this._widgets={},this.domNode=ht(document.createElement("div")),ca.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=ht(document.createElement("div")),ca.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){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new cJ(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){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}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 cJ{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=ht(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(129);this._fixedOverflowWidgets=n.get(36),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),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(58),e.hasChanged(129)){const i=t.get(129);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const t=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,s){const o=e.top,a=o,l=t.top+this._lineHeight,c=s.viewportHeight-l,d=o-n,u=a>=n,h=l,f=c>=n;let g=e.left,p=t.left;return g+i>s.scrollLeft+s.viewportWidth&&(g=s.scrollLeft+s.viewportWidth-i),p+i>s.scrollLeft+s.viewportWidth&&(p=s.scrollLeft+s.viewportWidth-i),g<s.scrollLeft&&(g=s.scrollLeft),p<s.scrollLeft&&(p=s.scrollLeft),{fitsAbove:u,aboveTop:d,aboveLeft:g,fitsBelow:f,belowTop:h,belowLeft:p}}_layoutHorizontalSegmentInPage(e,t,i,n){const s=Math.max(0,t.left-n),o=Math.min(t.left+t.width+n,e.width);let a=t.left+i-tl.scrollX;if(a+n>o){const l=a-(o-n);a-=l,i-=l}if(a<s){const l=a-s;a-=l,i-=l}return[i,a]}_layoutBoxInPage(e,t,i,n,s){const o=e.top-n,a=t.top+this._lineHeight,l=rn(this._viewDomNode.domNode),c=l.top+o-tl.scrollY,d=l.top+a-tl.scrollY,u=jy(document.body),[h,f]=this._layoutHorizontalSegmentInPage(u,l,e.left-s.scrollLeft+this._contentLeft,i),[g,p]=this._layoutHorizontalSegmentInPage(u,l,t.left-s.scrollLeft+this._contentLeft,i),_=22,v=22,b=c>=_,C=d+n<=u.height-v;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(c,_),aboveLeft:f,fitsBelow:C,belowTop:d,belowLeft:p}:{fitsAbove:b,aboveTop:o,aboveLeft:h,fitsBelow:C,belowTop:a,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new Xg(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const u of t)u.lineNumber<i.lineNumber&&(i=u),u.lineNumber>n.lineNumber&&(n=u);let s=1073741824;for(const u of i.ranges)u.left<s&&(s=u.left);let o=1073741824;for(const u of n.ranges)u.left<o&&(o=u.left);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,l=new Xg(a,s),c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,d=new Xg(c,o);return[l,d]}_prepareRenderWidget(e){const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let s=null;if(typeof this._actual.beforeRender=="function"&&(s=K1(this._actual.beforeRender,this._actual)),s)this._cachedDomNodeClientWidth=s.width,this._cachedDomNodeClientHeight=s.height;else{const o=this.domNode.domNode;this._cachedDomNodeClientWidth=o.clientWidth,this._cachedDomNodeClientHeight=o.clientHeight}}let n;if(this.allowEditorOverflow?n=this._layoutBoxInPage(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):n=this._layoutBoxInViewport(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let s=1;s<=2;s++)for(const o of this._preference)if(o===1){if(!n)return null;if(s===2||n.fitsAbove)return{coordinate:new Xg(n.aboveTop,n.aboveLeft),position:1}}else if(o===2){if(!n)return null;if(s===2||n.fitsBelow)return{coordinate:new Xg(n.belowTop,n.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};return null}onBeforeRender(e){!this._viewRange||!this._preference||this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&K1(this._actual.afterRender,this._actual,null);return}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),typeof this._actual.afterRender=="function"&&K1(this._actual.afterRender,this._actual,this._renderData.position)}}function K1(r,e,...t){try{return r.call(e,...t)}catch{return null}}let vL=!0;class v8 extends Sg{constructor(e){super();this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new _e(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=vL?this._selections.slice(0,1):this._selections,i=t.map(s=>s.positionLineNumber);i.sort((s,o)=>s-o),Ls(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every(s=>s.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),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):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const a=[];for(let l=i;l<=n;l++){const c=l-i;for(;o<s&&this._cursorLineNumbers[o]<l;)o++;o<s&&this._cursorLineNumbers[o]===l?a[c]=t:a[c]=""}this._renderData=a}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}}class dJ extends v8{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class uJ extends v8{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Et((r,e)=>{vL=!1;const t=r.getColor(PX);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||r.defines(oM)){const i=r.getColor(oM);i&&(vL=!0,e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),r.type==="hc"&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class hJ extends Sg{constructor(e){super();this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).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(58),this._typicalHalfwidthCharacterWidth=t.get(43).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 l=0,c=t.length;l<c;l++){const d=t[l];d.options.className&&(i[n++]=d)}i=i.sort((l,c)=>{if(l.options.zIndex<c.options.zIndex)return-1;if(l.options.zIndex>c.options.zIndex)return 1;const d=l.options.className,u=c.options.className;return d<u?-1:d>u?1:k.compareRangesUsingStarts(l.range,c.range)});const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=o;l++){const c=l-s;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a<l;a++){const c=t[a];if(!c.options.isWholeLine)continue;const d='<div class="cdr '+c.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',u=Math.max(c.range.startLineNumber,s),h=Math.min(c.range.endLineNumber,o);for(let f=u;f<=h;f++){const g=f-s;i[g]+=d}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber;let o=null,a=!1,l=null;for(let c=0,d=t.length;c<d;c++){const u=t[c];if(u.options.isWholeLine)continue;const h=u.options.className,f=Boolean(u.options.showIfCollapsed);let g=u.range;if(f&&g.endColumn===1&&g.endLineNumber!==g.startLineNumber&&(g=new k(g.startLineNumber,g.startColumn,g.endLineNumber-1,this._context.model.getLineMaxColumn(g.endLineNumber-1))),o===h&&a===f&&k.areIntersectingOrTouching(l,g)){l=k.plusRange(l,g);continue}o!==null&&this._renderNormalDecoration(e,l,o,a,n,s,i),o=h,a=f,l=g}o!==null&&this._renderNormalDecoration(e,l,o,a,n,s,i)}_renderNormalDecoration(e,t,i,n,s,o,a){const l=e.linesVisibleRangesForRange(t,i==="findMatch");if(!!l)for(let c=0,d=l.length;c<d;c++){const u=l[c];if(u.outsideRenderedLine)continue;const h=u.lineNumber-o;if(n&&u.ranges.length===1){const f=u.ranges[0];f.width===0&&(u.ranges[0]=new v0(f.left,this._typicalHalfwidthCharacterWidth))}for(let f=0,g=u.ranges.length;f<g;f++){const p=u.ranges[f],_='<div class="cdr '+i+'" style="left:'+String(p.left)+"px;width:"+String(p.width)+"px;height:"+s+'px;"></div>';a[h]+=_}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Hr extends Z{onclick(e,t){this._register(J(e,Te.CLICK,i=>t(new Zr(i))))}onmousedown(e,t){this._register(J(e,Te.MOUSE_DOWN,i=>t(new Zr(i))))}onmouseover(e,t){this._register(J(e,Te.MOUSE_OVER,i=>t(new Zr(i))))}onnonbubblingmouseout(e,t){this._register(fD(e,i=>t(new Zr(i))))}onkeydown(e,t){this._register(J(e,Te.KEY_DOWN,i=>t(new ei(i))))}onkeyup(e,t){this._register(J(e,Te.KEY_UP,i=>t(new ei(i))))}oninput(e,t){this._register(J(e,Te.INPUT,t))}onblur(e,t){this._register(J(e,Te.BLUR,t))}onfocus(e,t){this._register(J(e,Te.FOCUS,t))}ignoreGesture(e){Lt.ignoreTarget(e)}}const zf=11;class fJ extends Hr{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",typeof e.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof e.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof e.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof e.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=zf+"px",this.domNode.style.height=zf+"px",typeof e.top!="undefined"&&(this.domNode.style.top=e.top+"px"),typeof e.left!="undefined"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom!="undefined"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right!="undefined"&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new Wu),this.onmousedown(this.bgDomNode,t=>this._arrowMouseDown(t)),this.onmousedown(this.domNode,t=>this._arrowMouseDown(t)),this._mousedownRepeatTimer=this._register(new j_),this._mousedownScheduleRepeatTimer=this._register(new rr)}_arrowMouseDown(e){const t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),41.666666666666664)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,yg,i=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class gJ extends Z{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 rr)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0: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(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}const pJ=140;class C8 extends Hr{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 gJ(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Wu),this._shouldRender=!0,this.domNode=ht(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,t=>this._domNodeMouseDown(t))}_createArrow(e){const t=this._register(new fJ(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=ht(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,s=>{s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{}))}),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.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()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(e);i<=s&&s<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.browserEvent.offsetX=="number"&&typeof e.browserEvent.offsetY=="number")t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const s=rn(this.domNode.domNode);t=e.posx-s.left,i=e.posy-s.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,yg,o=>{const a=this._sliderOrthogonalMousePosition(o),l=Math.abs(a-n);if(an&&l>pJ){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const d=this._sliderMousePosition(o)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(d))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),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()}}const mJ=20;class Bm{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 Bm(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):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}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),a=Math.max(0,o-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(mJ,Math.floor(i*a/n))),d=(a-c)/(n-i),u=s*d;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:d,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=Bm._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 t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}const _J=Ms("scrollbar-button-left",be.triangleLeft),bJ=Ms("scrollbar-button-right",be.triangleRight);class vJ extends C8{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bm(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage});if(t.horizontalHasArrows){const o=(t.arrowSize-zf)/2,a=(t.horizontalScrollbarSize-zf)/2;this._createArrow({className:"scra",icon:_J,top:a,left:o,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Nf(null,1,0))}),this._createArrow({className:"scra",icon:bJ,top:a,left:void 0,bottom:void 0,right:o,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Nf(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}const CJ=Ms("scrollbar-button-up",be.triangleUp),wJ=Ms("scrollbar-button-down",be.triangleDown);class yJ extends C8{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();super({lazyRender:t.lazyRender,host:i,scrollbarState:new Bm(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage});if(t.verticalHasArrows){const o=(t.arrowSize-zf)/2,a=(t.verticalScrollbarSize-zf)/2;this._createArrow({className:"scra",icon:CJ,top:o,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Nf(null,0,1))}),this._createArrow({className:"scra",icon:wJ,top:void 0,left:a,bottom:o,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Nf(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Mw{constructor(e,t,i,n,s,o){this._scrollStateBrand=void 0,e=e|0,t=t|0,i=i|0,n=n|0,s=s|0,o=o|0,this.rawScrollLeft=i,this.rawScrollTop=o,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),o+n>s&&(o=s-n),o<0&&(o=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=s,this.scrollTop=o}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 Mw(typeof e.width!="undefined"?e.width:this.width,typeof e.scrollWidth!="undefined"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height!="undefined"?e.height:this.height,typeof e.scrollHeight!="undefined"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Mw(this.width,this.scrollWidth,typeof e.scrollLeft!="undefined"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop!="undefined"?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,a=this.scrollHeight!==e.scrollHeight,l=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:a,scrollTopChanged:l}}}class I0 extends Z{constructor(e,t){super();this._scrollableBrand=void 0,this._onScroll=this._register(new H),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new Mw(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){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.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(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop=="undefined"?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;t?n=new Wm(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=Wm.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class xM{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function Y1(r,e){const t=e-r;return function(i){return r+t*EJ(i)}}function SJ(r,e,t){return function(i){return i<t?r(i/t):e((i-t)/(1-t))}}class Wm{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 s,o;return e<t?(s=e+.75*i,o=t-.75*i):(s=e-.75*i,o=t+.75*i),SJ(Y1(e,s),Y1(o,t),.33)}return Y1(e,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const i=this.scrollLeft(t),n=this.scrollTop(t);return new xM(i,n,!1)}return new xM(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return Wm.start(e,t,i)}static start(e,t,i){i=i+10;const n=Date.now()-10;return new Wm(e,t,n,i)}}function xJ(r){return Math.pow(r,3)}function EJ(r){return 1-xJ(1-r)}const kJ=500,EM=50;class LJ{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class CL{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,i=1,n=this._rear;do{const s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(!0);return t<=.5}accept(e,t,i){const n=new LJ(e,t,i);n.score=this._computeScore(n),this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!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}}CL.INSTANCE=new CL;class w8 extends Hr{constructor(e,t,i){super();this._onScroll=this._register(new H),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new H),e.style.overflow="hidden",this._options=TJ(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new yJ(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new vJ(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=ht(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=ht(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=ht(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,s=>this._onMouseOver(s)),this.onnonbubblingmouseout(this._listenOnDomNode,s=>this._onMouseOut(s)),this._hideTimeout=this._register(new rr),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=ft(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,tt&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal!="undefined"&&(this._options.horizontal=e.horizontal),typeof e.vertical!="undefined"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage!="undefined"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=ft(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new Nf(n))};this._mouseWheelToDispose.push(J(this._listenOnDomNode,Te.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){const t=CL.INSTANCE;{const s=window.devicePixelRatio/Hz();an||ir?t.accept(Date.now(),e.deltaX/s,e.deltaY/s):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(o)?o=0:s=0),this._options.flipAxes&&([s,o]=[o,s]);const a=!tt&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!o&&(o=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(s){const d=EM*s,u=l.scrollTop-(d<0?Math.floor(d):Math.ceil(d));this._verticalScrollbar.writeScrollPosition(c,u)}if(o){const d=EM*o,u=l.scrollLeft-(d<0?Math.floor(d):Math.ceil(d));this._horizontalScrollbar.writeScrollPosition(c,u)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(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()}_onMouseOut(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(),kJ)}}class AA extends w8{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new I0(0,n=>oa(n));super(e,t,i);this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class NA extends w8{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 Q_ extends AA{constructor(e,t){super(e,t);this._element=e,this.onScroll(i=>{i.scrollTopChanged&&(this._element.scrollTop=i.scrollTop),i.scrollLeftChanged&&(this._element.scrollLeft=i.scrollLeft)}),this.scanDomNode()}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})}}function TJ(r){const e={lazyRender:typeof r.lazyRender!="undefined"?r.lazyRender:!1,className:typeof r.className!="undefined"?r.className:"",useShadows:typeof r.useShadows!="undefined"?r.useShadows:!0,handleMouseWheel:typeof r.handleMouseWheel!="undefined"?r.handleMouseWheel:!0,flipAxes:typeof r.flipAxes!="undefined"?r.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof r.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?r.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof r.alwaysConsumeMouseWheel!="undefined"?r.alwaysConsumeMouseWheel:!1,scrollYToX:typeof r.scrollYToX!="undefined"?r.scrollYToX:!1,mouseWheelScrollSensitivity:typeof r.mouseWheelScrollSensitivity!="undefined"?r.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof r.fastScrollSensitivity!="undefined"?r.fastScrollSensitivity:5,scrollPredominantAxis:typeof r.scrollPredominantAxis!="undefined"?r.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof r.mouseWheelSmoothScroll!="undefined"?r.mouseWheelSmoothScroll:!0,arrowSize:typeof r.arrowSize!="undefined"?r.arrowSize:11,listenOnDomNode:typeof r.listenOnDomNode!="undefined"?r.listenOnDomNode:null,horizontal:typeof r.horizontal!="undefined"?r.horizontal:1,horizontalScrollbarSize:typeof r.horizontalScrollbarSize!="undefined"?r.horizontalScrollbarSize:10,horizontalSliderSize:typeof r.horizontalSliderSize!="undefined"?r.horizontalSliderSize:0,horizontalHasArrows:typeof r.horizontalHasArrows!="undefined"?r.horizontalHasArrows:!1,vertical:typeof r.vertical!="undefined"?r.vertical:1,verticalScrollbarSize:typeof r.verticalScrollbarSize!="undefined"?r.verticalScrollbarSize:10,verticalHasArrows:typeof r.verticalHasArrows!="undefined"?r.verticalHasArrows:!1,verticalSliderSize:typeof r.verticalSliderSize!="undefined"?r.verticalSliderSize:0,scrollByPage:typeof r.scrollByPage!="undefined"?r.scrollByPage:!1};return e.horizontalSliderSize=typeof r.horizontalSliderSize!="undefined"?r.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof r.verticalSliderSize!="undefined"?r.verticalSliderSize:e.verticalScrollbarSize,tt&&(e.className+=" mac"),e}class IJ extends as{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(91),a=s.get(66),l=s.get(34),c=s.get(94),d={listenOnDomNode:i.domNode,className:"editor-scrollable "+xw(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:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new NA(t.domNode,d,this._context.viewLayout.getScrollable())),ca.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=ht(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(h,f,g)=>{const p={};if(f){const _=h.scrollTop;_&&(p.scrollTop=this._context.viewLayout.getCurrentScrollTop()+_,h.scrollTop=0)}if(g){const _=h.scrollLeft;_&&(p.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+_,h.scrollLeft=0)}this._context.model.setScrollPosition(p,1)};this._register(J(i.domNode,"scroll",h=>u(i.domNode,!0,!0))),this._register(J(t.domNode,"scroll",h=>u(t.domNode,!0,!1))),this._register(J(n.domNode,"scroll",h=>u(n.domNode,!0,!1))),this._register(J(this.scrollbarDomNode.domNode,"scroll",h=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(129);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(64).side==="right"?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}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(91)||e.hasChanged(66)||e.hasChanged(34)){const t=this._context.configuration.options,i=t.get(91),n=t.get(66),s=t.get(34),o=t.get(94),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:o};this.scrollbar.updateOptions(a)}return e.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+xw(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class Pw{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class RA extends Sg{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className<l.className?-1:1);let s=null,o=0;for(let a=0,l=i.length;a<l;a++){const c=i[a],d=c.className;let u=Math.max(c.startLineNumber,e)-e;const h=Math.min(c.endLineNumber,t)-e;s===d?(u=Math.max(o+1,u),o=Math.max(o,h)):(s=d,o=h);for(let f=u;f<=o;f++)n[f].push(s)}return n}}class DJ extends RA{constructor(e){super();this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,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(129);return this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.glyphMarginClassName;l&&(i[n++]=new Pw(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){if(!this._glyphMargin){this._renderResult=null;return}const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._lineHeight.toString(),o=this._glyphMarginLeft.toString(),a=this._glyphMarginWidth.toString(),l='" style="left:'+o+"px;width:"+a+"px;height:"+s+'px;"></div>',c=[];for(let d=t;d<=i;d++){const u=d-t,h=n[u];h.length===0?c[u]="":c[u]='<div class="cgmr codicon '+h.join(" ")+l}this._renderResult=c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class AJ extends Sg{constructor(e){super();this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(130),n=t.get(43);this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),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(130),n=t.get(43);return this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const n=e.selections[0].getPosition();return!((t=this._primaryPosition)===null||t===void 0)&&t.equals(n)?!1:(this._primaryPosition=n,!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;if(!this._bracketPairGuideOptions.indentation&&!this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,o=e.scrollWidth,a=this._lineHeight,l=this._primaryPosition,c=this.getGuidesByLine(n,s,l),d=[];for(let u=n;u<=s;u++){const h=u-n,f=c[h];let g="";const p=(i=(t=e.visibleRangeForPosition(new U(u,1)))===null||t===void 0?void 0:t.left)!==null&&i!==void 0?i:0;for(const _ of f){const v=p+(_.visibleColumn-1)*this._spaceWidth;if(v>o||this._maxIndentLeft>0&&v>this._maxIndentLeft)break;g+=`<div class="core-guide ${_.className}" style="left:${v}px;height:${a}px;width:${this._spaceWidth}px"></div>`}d[h]=g}this._renderResult=d}getGuidesByLine(e,t,i){var n;const s=this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,i,!0,!0):null,o=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let a=0,l=0,c=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const h=this._context.model.getActiveIndentGuide(i.lineNumber,e,t);a=h.startLineNumber,l=h.endLineNumber,c=h.indent}const{indentSize:d}=this._context.model.getTextModelOptions(),u=[];for(let h=e;h<=t;h++){const f=new Array;u.push(f);const g=s?s[h-e]:[],p=new Vp(g),_=o?o[h-e]:[];for(let v=1;v<=_;v++){const b=(v-1)*d+1,C=g.length===0&&a<=h&&h<=l&&v===c;f.push(...p.takeWhile(y=>y.visibleColumn<b)||[]),((n=p.peek())===null||n===void 0?void 0:n.visibleColumn)!==b&&f.push(new E3(b,C?"core-guide-indent-active":"core-guide-indent"))}f.push(...p.takeWhile(v=>!0)||[])}return u}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Et((r,e)=>{const t=r.getColor(x0);t&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${t} inset; }`);const i=r.getColor(E0)||t;i&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=[i8,n8,r8,s8,o8,a8],s=new u8;let o=n.map(a=>r.getColor(a)).filter(a=>!!a).filter(a=>!a.isTransparent());for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { opacity: 0.3; box-shadow: 1px 0 0 0 ${l} inset; }`)}e.addRule(`.monaco-editor .${s.activeClassName} { opacity: 1 !important; }`)});class NJ{constructor(){this._currentVisibleRange=new k(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class RJ{constructor(e,t,i,n,s,o){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=o,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class OJ{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let s=e[0].startLineNumber,o=e[0].endLineNumber;for(let a=1,l=e.length;a<l;a++){const c=e[a];s=Math.min(s,c.startLineNumber),o=Math.max(o,c.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=o}}class D0 extends as{constructor(e,t){super(e);this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new _8(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,s=n.get(43),o=n.get(130);this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=n.get(88),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),this._viewLineOptions=new HO(i,this._context.theme.type),ca.write(this.domNode,7),this.domNode.setClassName(`view-lines ${jd}`),Ln.applyFontInfo(this.domNode,s),this._maxLineWidth=0,this._asyncUpdateLineWidths=new $t(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new $t(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new NJ,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new zo(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(130)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(43),n=t.get(130);return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),Ln.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new HO(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).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 t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).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.range,e.selections,e.verticalType);if(t===-1)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 RJ(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 OJ(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,s),!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.scrollTop<t||e.scrollTop>i)&&(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.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(n)===1)return new U(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const l=this._context.model.getLineMinColumn(n);return a<l&&(a=l),new U(n,a)}_getViewLineDomNode(e){for(;e&&e.nodeType===1;){if(e.className===zo.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const s=this._visibleLines.getVisibleLine(n);if(e===s.getDomNode())return n}return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=k.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0;const a=new VO(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new U(n.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),d=this._visibleLines.getEndLineNumber();for(let u=n.startLineNumber;u<=n.endLineNumber;u++){if(u<c||u>d)continue;const h=u===n.startLineNumber?n.startColumn:1,f=u===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(u),g=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,h,f,a);if(!!g){if(t&&u<i){const p=l;l=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new U(u+1,1)).lineNumber,p!==l&&(g.ranges[g.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}s[o++]=new vY(g.outsideRenderedLine,u,v0.from(g.ranges))}}return o===0?null:s}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new VO(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new CY(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const a=this._visibleLines.getVisibleLine(o);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth())}return s&&t===1&&i===this._context.model.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 o=this._visibleLines.getVisibleLine(s);if(o.needsMonospaceFontCheck()){const a=o.getWidth();a>t&&(t=a,e=s)}}if(e!==-1&&!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 i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),ir&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).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._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s){const o=e.top,a=e.height,l=o+a;let c,d,u;if(n&&n.length>0){let g=n[0].startLineNumber,p=n[0].endLineNumber;for(let _=1,v=n.length;_<v;_++){const b=n[_];g=Math.min(g,b.startLineNumber),p=Math.max(p,b.endLineNumber)}c=!1,d=this._context.viewLayout.getVerticalOffsetForLineNumber(g),u=this._context.viewLayout.getVerticalOffsetForLineNumber(p)+this._lineHeight}else if(i)c=!0,d=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),u=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight;else return-1;if(!(t==="mouse"&&this._cursorSurroundingLinesStyle==="default")){const g=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);d-=g*this._lineHeight,u+=Math.max(0,g-1)*this._lineHeight}(s===0||s===4)&&(u+=this._lineHeight);let f;if(u-d>a){if(!c)return-1;f=d}else if(s===5||s===6)if(s===6&&o<=d&&u<=l)f=o;else{const g=Math.max(5*this._lineHeight,a*.2),p=d-g,_=u-a;f=Math.max(_,p)}else if(s===1||s===2)if(s===2&&o<=d&&u<=l)f=o;else{const g=(d+u)/2;f=Math.max(0,g-a/2)}else f=this._computeMinimumScrolling(o,l,d,u,s===3,s===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let s=1073741824,o=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)s=Math.min(s,Math.round(c.left)),o=Math.max(o,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const d of c.ranges)s=Math.min(s,Math.round(d.left)),o=Math.max(o,Math.round(d.left+d.width))}return s=Math.max(0,s-D0.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding,e.type==="selections"&&o-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,s,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,i,n,s,o){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,o=!!o;const a=t-e;if(n-i<a){if(s)return i;if(o)return Math.max(0,n-a);if(i<e)return i;if(n>t)return Math.max(0,n-a)}else return i;return e}}D0.HORIZONTAL_EXTRA_PX=30;class MJ extends RA{constructor(e){super();this._context=e;const i=this._context.configuration.options.get(129);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.linesDecorationsClassName;l&&(i[n++]=new Pw(a.range.startLineNumber,a.range.endLineNumber,l));const c=a.options.firstLineDecorationClassName;c&&(i[n++]=new Pw(a.range.startLineNumber,a.range.startLineNumber,c))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._decorationsLeft.toString(),o=this._decorationsWidth.toString(),a='" style="left:'+s+"px;width:"+o+'px;"></div>',l=[];for(let c=t;c<=i;c++){const d=c-t,u=n[d];let h="";for(let f=0,g=u.length;f<g;f++)h+='<div class="cldr '+u[f]+a;l[d]=h}this._renderResult=l}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class PJ extends RA{constructor(e){super();this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.marginClassName;l&&(i[n++]=new Pw(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let o=t;o<=i;o++){const a=o-t,l=n[a];let c="";for(let d=0,u=l.length;d<u;d++)c+='<div class="cmdr '+l[d]+'" style=""></div>';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class Xr{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=Xr._clamp(e),this.g=Xr._clamp(t),this.b=Xr._clamp(i),this.a=Xr._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:e|0}}Xr.Empty=new Xr(0,0,0,0);class J_ extends Z{constructor(){super();this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(Qt.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=new J_),this._INSTANCE}_updateColorMap(){const e=Qt.getColorMap();if(!e){this._colors=[Xr.Empty],this._backgroundIsLight=!0;return}this._colors=[Xr.Empty];for(let i=1;i<e.length;i++){const n=e[i].rgba;this._colors[i]=new Xr(n.r,n.g,n.b,Math.round(n.a*255))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}J_._INSTANCE=null;const FJ=(()=>{const r=[];for(let e=32;e<=126;e++)r.push(e);return r.push(65533),r})(),BJ=(r,e)=>(r-=32,r<0||r>96?e<=2?(r+96)%96:96-1:r);class Vm{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=Vm.soften(e,12/15),this.charDataLight=Vm.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=ow(e[n]*t);return i}renderChar(e,t,i,n,s,o,a,l,c,d,u){const h=1*this.scale,f=2*this.scale,g=u?1:f;if(t+h>e.width||i+g>e.height){console.warn("bad render request outside image data");return}const p=d?this.charDataLight:this.charDataNormal,_=BJ(n,c),v=e.width*4,b=a.r,C=a.g,y=a.b,E=s.r-b,S=s.g-C,w=s.b-y,x=Math.max(o,l),D=e.data;let M=_*h*f,B=i*v+t*4;for(let z=0;z<g;z++){let j=B;for(let re=0;re<h;re++){const te=p[M++]/255*(o/255);D[j++]=b+E*te,D[j++]=C+S*te,D[j++]=y+w*te,D[j++]=x}B+=v}}blockRenderChar(e,t,i,n,s,o,a,l){const c=1*this.scale,d=2*this.scale,u=l?1:d;if(t+c>e.width||i+u>e.height){console.warn("bad render request outside image data");return}const h=e.width*4,f=.5*(s/255),g=o.r,p=o.g,_=o.b,v=n.r-g,b=n.g-p,C=n.b-_,y=g+v*f,E=p+b*f,S=_+C*f,w=Math.max(s,a),x=e.data;let D=i*h+t*4;for(let M=0;M<u;M++){let B=D;for(let z=0;z<c;z++)x[B++]=y,x[B++]=E,x[B++]=S,x[B++]=w;D+=h}}}const kM={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},LM=r=>{const e=new Uint8ClampedArray(r.length/2);for(let t=0;t<r.length;t+=2)e[t>>1]=kM[r[t]]<<4|kM[r[t+1]]&15;return e},TM={1:ll(()=>LM("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:ll(()=>LM("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class Jp{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return TM[e]?i=new Vm(TM[e](),e):i=Jp.createFromSampleData(Jp.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=`${16}px`,t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold ${16}px ${e}`,i.textBaseline="middle";let n=0;for(const s of FJ)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){if(e.length!==61440)throw new Error("Unexpected source in MinimapCharRenderer");let n=Jp._downsample(e,t);return new Vm(n,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,a=2*s;let l=n,c=0;for(let d=0;d<a;d++){const u=d/a*16,h=(d+1)/a*16;for(let f=0;f<o;f++){const g=f/o*10,p=(f+1)/o*10;let _=0,v=0;for(let C=u;C<h;C++){const y=t+Math.floor(C)*3840,E=1-(C-Math.floor(C));for(let S=g;S<p;S++){const w=1-(S-Math.floor(S)),x=y+Math.floor(S)*4,D=w*E;v+=D,_+=e[x]*e[x+3]/255*D}}const b=_/v;c=Math.max(c,b),i[l++]=ow(b)}}return c}static _downsample(e,t){const i=2*t*1*t,n=i*96,s=new Uint8ClampedArray(n);let o=0,a=0,l=0;for(let c=0;c<96;c++)l=Math.max(l,this._downsampleChar(e,a,s,o,t)),o+=i,a+=10*4;if(l>0){const c=255/l;for(let d=0;d<n;d++)s[d]*=c}return s}}const WJ=140,VJ=2;class Hm{constructor(e,t,i){const n=e.options,s=n.get(127),o=n.get(129),a=o.minimap,l=n.get(43),c=n.get(64);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(93),this.showSlider=c.showSlider,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(58),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=o.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=ll(()=>Jp.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=Hm._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=Hm._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(kX);return i?new Xr(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(LX);return t?Xr._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.showSlider===e.showSlider&&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 em{constructor(e,t,i,n,s,o,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,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)}static create(e,t,i,n,s,o,a,l,c,d,u){const h=e.pixelRatio,f=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/f),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const E=l*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),S=Math.max(1,Math.floor(s*s/E)),w=Math.max(0,e.minimapHeight-S),x=w/(d-s),D=c*x,M=w>0,B=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new em(c,d,M,x,D,S,1,Math.min(a,B))}let _;if(o&&i!==a){const E=i-t+1;_=Math.floor(E*f/h)}else{const E=s/p;_=Math.floor(E*f/h)}let v;e.scrollBeyondLastLine?v=(a-1)*f/h:v=Math.max(0,a*f/h-_),v=Math.min(e.minimapHeight-_,v);const b=v/(d-s),C=c*b;let y=0;if(e.scrollBeyondLastLine&&(y=s/p-1),g>=a+y){const S=a,w=v>0;return new em(c,d,w,b,C,_,1,S)}else{let E=Math.max(1,Math.floor(t-C*h/f));u&&u.scrollHeight===d&&(u.scrollTop>c&&(E=Math.min(E,u.startLineNumber)),u.scrollTop<c&&(E=Math.max(E,u.startLineNumber)));const S=Math.min(a,E+g-1),w=(c-n)/p,x=(t-E+w)*f/h;return new em(c,d,!0,b,x,_,E,S)}}}class Fw{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Fw.INVALID=new Fw(-1);class IM{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new m8(()=>Fw.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n<s;n++)if(i[n].dy===-1)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class OA{constructor(e,t,i,n){this._backgroundFillData=OA._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,s=i.g,o=i.b,a=i.a,l=new Uint8ClampedArray(e*t*4);let c=0;for(let d=0;d<t;d++)for(let u=0;u<e;u++)l[c]=n,l[c+1]=s,l[c+2]=o,l[c+3]=a,c+=4;return l}}class $m{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(e.renderMinimap===0||!e.isSampling)return[null,[]];const n=e.pixelRatio,s=e.lineHeight,o=e.scrollBeyondLastLine,{minimapLineCount:a}=lf.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:o,height:e.editorHeight,lineHeight:s,pixelRatio:n}),l=t/a,c=l/2;if(!i||i.minimapLines.length===0){let C=[];if(C[0]=1,a>1){for(let y=0,E=a-1;y<E;y++)C[y]=Math.round(y*l+c);C[a-1]=t}return[new $m(l,C),[]]}const d=i.minimapLines,u=d.length;let h=[],f=0,g=0,p=1;const _=10;let v=[],b=null;for(let C=0;C<a;C++){const y=Math.max(p,Math.round(C*l)),E=Math.max(y,Math.round((C+1)*l));for(;f<u&&d[f]<y;){if(v.length<_){const w=f+1+g;b&&b.type==="deleted"&&b._oldIndex===f-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:f,deleteFromLineNumber:w,deleteToLineNumber:w},v.push(b)),g--}f++}let S;if(f<u&&d[f]<=E)S=d[f],f++;else if(C===0?S=1:C+1===a?S=t:S=Math.round(C*l+c),v.length<_){const w=f+1+g;b&&b.type==="inserted"&&b._i===C-1?b.insertToLineNumber++:(b={type:"inserted",_i:C,insertFromLineNumber:w,insertToLineNumber:w},v.push(b)),g++}h[C]=S,p=S}if(v.length<_)for(;f<u;){const C=f+1+g;b&&b.type==="deleted"&&b._oldIndex===f-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:f,deleteFromLineNumber:C,deleteToLineNumber:C},v.push(b)),g--,f++}else v=[{type:"flush"}];return[new $m(l,h),v]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const s=this.minimapLines[i];if(s<e||s>t)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]<e.fromLineNumber);s--)this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class HJ extends as{constructor(e){super(e);this.tokensColorTracker=J_.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new Hm(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=$m.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new Bw(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new Hm(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(e)?!1:(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return e.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return t?this._actual.onLinesChanged(t[0],t[1]):!1}else return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const i of e.ranges){const n=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);n&&t.push({fromLineNumber:n[0],toLineNumber:n[1]})}return t.length?this._actual.onTokensChanged(t):!1}else return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>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]=$m.compute(this.options,this._context.model.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();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.model.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.model.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new _e(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const s=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new k(s,1,o,this._context.model.getLineMaxColumn(o))}else i=new k(e,1,t,this._context.model.getLineMaxColumn(t));const n=this._context.model.getDecorationsInViewport(i);if(this._samplingState){let s=[];for(const o of n){if(!o.options.minimap)continue;const a=o.range,l=this._samplingState.modelLineToMinimapLine(a.startLineNumber),c=this._samplingState.modelLineToMinimapLine(a.endLineNumber);s.push(new Y3(new k(l,a.startColumn,c,a.endColumn),o.options))}return s}return n}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new k(e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class Bw extends Z{constructor(e,t){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(nM),this._domNode=ht(document.createElement("div")),ca.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=ht(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=ht(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=ht(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=ht(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=ht(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=Ei(this._domNode.domNode,"mousedown",i=>{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.leftButton&&this._lastRenderData){const c=rn(this._slider.domNode),d=c.top+c.height/2;this._startSliderDragging(i.buttons,i.posx,d,i.posy,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,o=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.browserEvent.offsetY;let l=Math.floor(o/s)+this._lastRenderData.renderedLayout.startLineNumber;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderMouseMoveMonitor=new Wu,this._sliderMouseDownListener=Ei(this._slider.domNode,"mousedown",i=>{i.preventDefault(),i.stopPropagation(),i.leftButton&&this._lastRenderData&&this._startSliderDragging(i.buttons,i.posx,i.posy,i.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Lt.addTarget(this._domNode.domNode),this._sliderTouchStartListener=J(this._domNode.domNode,Vt.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=J(this._domNode.domNode,Vt.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=Ei(this._domNode.domNode,Vt.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i,n,s){this._slider.toggleClassName("active",!0);const o=(a,l)=>{const c=Math.abs(l-t);if(an&&c>WJ){this._model.setScrollTop(s.scrollTop);return}const d=a-i;this._model.setScrollTop(s.getDesiredScrollTopFromDelta(d))};n!==i&&o(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,yg,a=>o(a.posy,a.posx),()=>{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._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}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 OA(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):!1}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(nM),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=em.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(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,s=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(s),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-s),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(k.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((h,f)=>(h.options.zIndex||0)-(f.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,n,s);const d=new DM(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,d,e,o),this._renderDecorationsLineHighlights(c,i,d,e,o);const u=new DM(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,u,e,o,l,a,n),this._renderDecorationsHighlights(c,i,u,e,o,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,a=0;for(const l of t){const c=Math.max(n.startLineNumber,l.startLineNumber),d=Math.min(n.endLineNumber,l.endLineNumber);if(c>d)continue;for(let f=c;f<=d;f++)i.set(f,!0);const u=(c-n.startLineNumber)*s,h=(d-n.startLineNumber)*s+s;a>=u||(a>o&&e.fillRect(Ol,o,e.canvas.width,a-o),o=u),a=h}a>o&&e.fillRect(Ol,o,e.canvas.width,a-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==Qr.Inline)continue;const d=Math.max(n.startLineNumber,l.range.startLineNumber),u=Math.min(n.endLineNumber,l.range.endLineNumber);if(d>u)continue;const h=c.getColor(this._theme);if(!h||h.isTransparent())continue;let f=o.get(h.toString());f||(f=h.transparent(.5).toString(),o.set(h.toString(),f)),e.fillStyle=f;for(let g=d;g<=u;g++){if(i.has(g))continue;i.set(g,!0);const p=(d-n.startLineNumber)*s;e.fillRect(Ol,p,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const d=Math.max(n.startLineNumber,c.startLineNumber),u=Math.min(n.endLineNumber,c.endLineNumber);if(!(d>u))for(let h=d;h<=u;h++)this.renderDecorationOnLine(e,i,c,this._selectionColor,n,h,s,s,o,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,o,a,l){for(const c of t){const d=c.options.minimap;if(!d)continue;const u=Math.max(n.startLineNumber,c.range.startLineNumber),h=Math.min(n.endLineNumber,c.range.endLineNumber);if(u>h)continue;const f=d.getColor(this._theme);if(!(!f||f.isTransparent()))for(let g=u;g<=h;g++)switch(d.position){case Qr.Inline:this.renderDecorationOnLine(e,i,c.range,f,n,g,s,s,o,a,l);continue;case Qr.Gutter:const p=(g-n.startLineNumber)*s,_=2;this.renderDecoration(e,f,_,p,VJ,s);continue}}}renderDecorationOnLine(e,t,i,n,s,o,a,l,c,d,u){const h=(o-s.startLineNumber)*l;if(h+a<0||h>this._model.options.canvasInnerHeight)return;const{startLineNumber:f,endLineNumber:g}=i,p=f===o?i.startColumn:1,_=g===o?i.endColumn:this._model.getLineMaxColumn(o),v=this.getXOffsetForPosition(t,o,p,c,d,u),b=this.getXOffsetForPosition(t,o,_,c,d,u);this.renderDecoration(e,n,v,h,b-v,a)}getXOffsetForPosition(e,t,i,n,s,o){if(i===1)return Ol;if((i-1)*s>=o)return o;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[Ol];let d=Ol;for(let u=1;u<c.length+1;u++){const h=c.charCodeAt(u-1),f=h===9?n*s:no(h)?2*s:s,g=d+f;if(g>=o){l[u]=o;break}l[u]=g,d=g}e.set(t,l)}return i-1<l.length?l[i-1]:o}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const te=this._lastRenderData._get();return new IM(e,te.imageData,te.lines)}const s=this._getBuffer();if(!s)return null;let[o,a,l]=Bw._renderUntouchedLines(s,t,i,n,this._lastRenderData);const c=this._model.getMinimapLinesRenderingData(t,i,l),d=this._model.getOptions().tabSize,u=this._model.options.defaultBackgroundColor,h=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),_=this._model.options.renderMinimap,v=this._model.options.charRenderer(),b=this._model.options.fontScale,C=this._model.options.minimapCharWidth,E=(_===1?2:2+1)*b,S=n>E?Math.floor((n-E)/2):0,w=h.a/255,x=new Xr(Math.round((h.r-u.r)*w+u.r),Math.round((h.g-u.g)*w+u.g),Math.round((h.b-u.b)*w+u.b),255);let D=0;const M=[];for(let te=0,N=i-t+1;te<N;te++)l[te]&&Bw._renderLine(s,x,h.a,p,_,C,g,f,v,D,S,d,c[te],b,n),M[te]=new Fw(D),D+=n;const B=o===-1?0:o,j=(a===-1?s.height:a)-B;return this._canvas.domNode.getContext("2d").putImageData(s,0,0,0,B,s.width,j),new IM(e,s,M)}static _renderUntouchedLines(e,t,i,n,s){const o=[];if(!s){for(let x=0,D=i-t+1;x<D;x++)o[x]=!0;return[-1,-1,o]}const a=s._get(),l=a.imageData.data,c=a.rendLineNumberStart,d=a.lines,u=d.length,h=e.width,f=e.data,g=(i-t+1)*n*h*4;let p=-1,_=-1,v=-1,b=-1,C=-1,y=-1,E=0;for(let x=t;x<=i;x++){const D=x-t,M=x-c,B=M>=0&&M<u?d[M].dy:-1;if(B===-1){o[D]=!0,E+=n;continue}const z=B*h*4,j=(B+n)*h*4,re=E*h*4,te=(E+n)*h*4;b===z&&y===re?(b=j,y=te):(v!==-1&&(f.set(l.subarray(v,b),C),p===-1&&v===0&&v===C&&(p=b),_===-1&&b===g&&v===C&&(_=v)),v=z,b=j,C=re,y=te),o[D]=!1,E+=n}v!==-1&&(f.set(l.subarray(v,b),C),p===-1&&v===0&&v===C&&(p=b),_===-1&&b===g&&v===C&&(_=v));const S=p===-1?-1:p/(h*4),w=_===-1?-1:_/(h*4);return[S,w,o]}static _renderLine(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p){const _=f.content,v=f.tokens,b=e.width-o,C=p===1;let y=Ol,E=0,S=0;for(let w=0,x=v.getCount();w<x;w++){const D=v.getEndOffset(w),M=v.getForeground(w),B=a.getColor(M);for(;E<D;E++){if(y>b)return;const z=_.charCodeAt(E);if(z===9){const j=h-(E+S)%h;S+=j-1,y+=j*o}else if(z===32)y+=o;else{const j=no(z)?2:1;for(let re=0;re<j;re++)if(s===2?c.blockRenderChar(e,y,d+u,B,l,t,i,C):c.renderChar(e,y,d+u,z,B,l,t,i,g,n,C),y+=o,y>b)return}}}}}class DM{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;n<s;n++)this._values[n]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}Et((r,e)=>{const t=r.getColor(TX);t&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${t}; }`);const i=r.getColor(IX);i&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${i}; }`);const n=r.getColor(DX);n&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${n}; }`);const s=r.getColor(w0);s&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});class $J extends as{constructor(e){super(e);const i=this._context.configuration.options.get(129);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=ht(document.createElement("div")),ca.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=ht(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()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?!1:(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(e.preference===null){t.unsetTop();return}if(e.preference===0)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===1){const i=t.domNode.clientHeight;t.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===2&&(t.setTop(0),t.domNode.style.right="50%")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){const s=t[i];this._renderWidget(this._widgets[s])}}}class UJ{constructor(e,t){const i=e.options;this.lineHeight=i.get(58),this.pixelRatio=i.get(127),this.overviewRulerLanes=i.get(73),this.renderBorder=i.get(72);const n=t.getColor(qX);this.borderColor=n?n.toString():null,this.hideCursor=i.get(51);const s=t.getColor(XW);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=t.type;const o=i.get(64),a=o.enabled,l=o.side,c=a?t.getColor(GX)||Qt.getDefaultBackground():null;c===null||l==="left"?this.backgroundColor=null:this.backgroundColor=q.Format.CSS.formatHex(c);const u=i.get(129).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[h,f]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=h,this.w=f}_initLanes(e,t,i){const n=t-e;if(i>=3){const s=Math.floor(n/3),o=Math.floor(n/3),a=n-s-o,l=e,c=l+s,d=l+s+a;return[[0,l,c,l,d,l,c,l],[0,s,a,s+a,o,s+a+o,a+o,s+a+o]]}else if(i===2){const s=Math.floor(n/2),o=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,o,s+o,s+o,s+o]]}else{const s=e,o=n;return[[0,s,s,s,s,s,s,s],[0,o,o,o,o,o,o,o]]}}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&&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 zJ extends as{constructor(e){super(e);this._domNode=ht(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=Qt.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new UJ(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(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)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort(U.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,s=this._context.viewLayout.getScrollHeight(),o=t/s,a=this._context.model.getAllOverviewRulerDecorations(this._context.theme),l=6*this._settings.pixelRatio|0,c=l/2|0,d=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?d.clearRect(0,0,e,t):(d.fillStyle=this._settings.backgroundColor,d.fillRect(0,0,e,t));const u=this._settings.x,h=this._settings.w,f=Object.keys(a);f.sort();for(let g=0,p=f.length;g<p;g++){const _=f[g],v=a[_];d.fillStyle=_;let b=0,C=0,y=0;for(let E=0,S=v.length;E<S;E++){const w=v[3*E],x=v[3*E+1],D=v[3*E+2];let M=n.getVerticalOffsetForLineNumber(x)*o|0,B=(n.getVerticalOffsetForLineNumber(D)+i)*o|0;if(B-M<l){let j=(M+B)/2|0;j<c?j=c:j+c>t&&(j=t-c),M=j-c,B=j+c}M>y+1||w!==b?(E!==0&&d.fillRect(u[b],C,h[b],y-C),b=w,C=M,y=B):B>y&&(y=B)}d.fillRect(u[b],C,h[b],y-C)}if(!this._settings.hideCursor&&this._settings.cursorColor){const g=2*this._settings.pixelRatio|0,p=g/2|0,_=this._settings.x[7],v=this._settings.w[7];d.fillStyle=this._settings.cursorColor;let b=-100,C=-100;for(let y=0,E=this._cursorPositions.length;y<E;y++){const S=this._cursorPositions[y];let w=n.getVerticalOffsetForLineNumber(S.lineNumber)*o|0;w<p?w=p:w+p>t&&(w=t-p);const x=w-p,D=x+g;x>C+1?(y!==0&&d.fillRect(_,b,v,C-b),b=x,C=D):D>C&&(C=D)}d.fillRect(_,b,v,C-b)}this._settings.renderBorder&&this._settings.borderColor&&this._settings.overviewRulerLanes>0&&(d.beginPath(),d.lineWidth=1,d.strokeStyle=this._settings.borderColor,d.moveTo(0,0),d.lineTo(0,t),d.stroke(),d.moveTo(0,0),d.lineTo(e,0),d.stroke())}}class AM{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}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 Um{constructor(e,t,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class jJ{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(Um.compare)}setLineHeight(e){return this._lineHeight===e?!1:(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth===e?!1:(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight===e?!1:(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight===e?!1:(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),n=Math.floor(this._outerHeight),s=i/n,o=Math.floor(4*this._pixelRatio/2);let a=[];for(let l=0,c=this._zones.length;l<c;l++){const d=this._zones[l];if(!e){const b=d.getColorZones();if(b){a.push(b);continue}}const u=Math.floor(s*this._getVerticalOffsetForLine(d.startLineNumber)),h=Math.floor(s*(this._getVerticalOffsetForLine(d.endLineNumber)+t));let f=Math.floor((u+h)/2),g=h-f;g<o&&(g=o),f-g<0&&(f=g),f+g>i&&(f=i-g);const p=d.color;let _=this._color2Id[p];_||(_=++this._lastAssignedId,this._color2Id[p]=_,this._id2Color[_]=p);const v=new AM(f-g,f+g,_);d.setColorZone(v),a.push(v)}return this._colorZonesInvalid=!1,a.sort(AM.compare),a}}class qJ extends Y_{constructor(e,t){super();this._context=e;const i=this._context.configuration.options;this._domNode=ht(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new jJ(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(58)),this._zoneManager.setPixelRatio(i.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(58)&&(this._zoneManager.setLineHeight(t.get(58)),this._render()),e.hasChanged(127)&&(this._zoneManager.setPixelRatio(t.get(127)),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(this._zoneManager.getOuterHeight()===0)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,a=0;for(const l of t){const c=l.colorId,d=l.from,u=l.to;c!==s?(e.fillRect(0,o,n,a-o),s=c,e.fillStyle=i[s],o=d,a=u):a>=d?a=Math.max(a,u):(e.fillRect(0,o,n,a-o),o=d,a=u)}e.fillRect(0,o,n,a-o)}}class GJ extends as{constructor(e){super(e);this.domNode=ht(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(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:n}=this._context.model.getTextModelOptions(),s=n;let o=t-e;for(;o>0;){const a=ht(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),o--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const n=this._renderedRulers[t],s=this._rulers[t];n.setBoxShadow(s.color?`1px 0 0 0 ${s.color} inset`:""),n.setHeight(Math.min(e.scrollHeight,1e6)),n.setLeft(s.column*this._typicalHalfwidthCharacterWidth)}}}Et((r,e)=>{const t=r.getColor(UX);t&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${t} inset; }`)});class KJ extends as{constructor(e){super(e);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const i=this._context.configuration.options.get(91);this._useShadows=i.useShadows,this._domNode=ht(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(129);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(91);return this._useShadows=i.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":"")}}Et((r,e)=>{const t=r.getColor(w0);t&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${t} 0 6px 6px -6px inset; }`)});class YJ{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class ZJ{constructor(e,t){this.lineNumber=e,this.ranges=t}}function XJ(r){return new YJ(r)}function QJ(r){return new ZJ(r.lineNumber,r.ranges.map(XJ))}class ii extends Sg{constructor(e){super();this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).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(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).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;t<i;t++)if(e[t].ranges.length>1)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 a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c<i.length;c++)i[c].lineNumber===a&&(s=i[c].ranges[0]);const l=t[t.length-1].lineNumber;if(l===e.endLineNumber)for(let c=i.length-1;!o&&c>=0;c--)i[c].lineNumber===l&&(o=i[c].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let a=0,l=t.length;a<l;a++){const c=t[a].ranges[0],d=c.left,u=c.left+c.width,h={top:0,bottom:0},f={top:0,bottom:0};if(a>0){const g=t[a-1].ranges[0].left,p=t[a-1].ranges[0].left+t[a-1].ranges[0].width;Kb(d-g)<n?h.top=2:d>g&&(h.top=1),Kb(u-p)<n?f.top=2:g<u&&u<p&&(f.top=1)}else s&&(h.top=s.startStyle.top,f.top=s.endStyle.top);if(a+1<l){const g=t[a+1].ranges[0].left,p=t[a+1].ranges[0].left+t[a+1].ranges[0].width;Kb(d-g)<n?h.bottom=2:g<d&&d<p&&(h.bottom=1),Kb(u-p)<n?f.bottom=2:u<p&&(f.bottom=1)}else o&&(h.bottom=o.startStyle.bottom,f.bottom=o.endStyle.bottom);c.startStyle=h,c.endStyle=f}}_getVisibleRangesWithStyle(e,t,i){const s=(t.linesVisibleRangesForRange(e,!0)||[]).map(QJ);return!this._visibleRangesHaveGaps(s)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,s,i),s}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,c=n[n.length-1].lineNumber;for(let d=0,u=n.length;d<u;d++){const h=n[d],f=h.lineNumber,g=f-t,p=i&&(f===c||f===l)?a:o,_=i&&f===l?1:0;let v="",b="";for(let C=0,y=h.ranges.length;C<y;C++){const E=h.ranges[C];if(s){const w=E.startStyle,x=E.endStyle;if(w.top===1||w.bottom===1){v+=this._createSelectionPiece(_,p,ii.SELECTION_CLASS_NAME,E.left-ii.ROUNDED_PIECE_WIDTH,ii.ROUNDED_PIECE_WIDTH);let D=ii.EDITOR_BACKGROUND_CLASS_NAME;w.top===1&&(D+=" "+ii.SELECTION_TOP_RIGHT),w.bottom===1&&(D+=" "+ii.SELECTION_BOTTOM_RIGHT),v+=this._createSelectionPiece(_,p,D,E.left-ii.ROUNDED_PIECE_WIDTH,ii.ROUNDED_PIECE_WIDTH)}if(x.top===1||x.bottom===1){v+=this._createSelectionPiece(_,p,ii.SELECTION_CLASS_NAME,E.left+E.width,ii.ROUNDED_PIECE_WIDTH);let D=ii.EDITOR_BACKGROUND_CLASS_NAME;x.top===1&&(D+=" "+ii.SELECTION_TOP_LEFT),x.bottom===1&&(D+=" "+ii.SELECTION_BOTTOM_LEFT),v+=this._createSelectionPiece(_,p,D,E.left+E.width,ii.ROUNDED_PIECE_WIDTH)}}let S=ii.SELECTION_CLASS_NAME;if(s){const w=E.startStyle,x=E.endStyle;w.top===0&&(S+=" "+ii.SELECTION_TOP_LEFT),w.bottom===0&&(S+=" "+ii.SELECTION_BOTTOM_LEFT),x.top===0&&(S+=" "+ii.SELECTION_TOP_RIGHT),x.bottom===0&&(S+=" "+ii.SELECTION_BOTTOM_RIGHT)}b+=this._createSelectionPiece(_,p,S,E.left,E.width)}e[g][0]+=v,e[g][1]+=b}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let o=i;o<=n;o++){const a=o-i;t[a]=["",""]}const s=[];for(let o=0,a=this._selections.length;o<a;o++){const l=this._selections[o];if(l.isEmpty()){s[o]=null;continue}const c=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[o]);s[o]=c,this._actualRenderOneSelection(t,i,this._selections.length>1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([o,a])=>o+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}ii.SELECTION_CLASS_NAME="selected-text";ii.SELECTION_TOP_LEFT="top-left-radius";ii.SELECTION_BOTTOM_LEFT="bottom-left-radius";ii.SELECTION_TOP_RIGHT="top-right-radius";ii.SELECTION_BOTTOM_RIGHT="bottom-right-radius";ii.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";ii.ROUNDED_PIECE_WIDTH=10;Et((r,e)=>{const t=r.getColor(cc);t&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${t}; }`);const i=r.getColor(vA);i&&e.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const n=r.getColor(AZ);n&&!n.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function Kb(r){return r<0?-r:r}class NM{constructor(e,t,i,n,s,o){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=o}}class RM{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(43);this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=ht(document.createElement("div")),this._domNode.setClassName(`cursor ${jd}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Ln.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new U(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(43);return this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),Ln.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===ji.Line||this._cursorStyle===ji.LineThin){const h=e.visibleRangeForPosition(this._position);if(!h||h.outsideRenderedLine)return null;let f;if(this._cursorStyle===ji.Line){if(f=$R(this._lineCursorWidth>0?this._lineCursorWidth:2),f>2){const _=this._context.model.getLineContent(this._position.lineNumber),v=zC(_,this._position.column-1);t=_.substr(this._position.column-1,v)}}else f=$R(1);let g=h.left;f>=2&&g>=1&&(g-=1);const p=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new NM(p,g,f,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=zC(i,this._position.column-1),s=e.linesVisibleRangesForRange(new k(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!s||s.length===0)return null;const o=s[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const a=o.ranges[0],l=a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===ji.Block){const h=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const f=h.tokens.findTokenIndexAtOffset(this._position.column-1);c=h.tokens.getClassName(f)}let d=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===ji.Underline||this._cursorStyle===ji.UnderlineThin)&&(d+=this._lineHeight-2,u=2),new NM(d,a.left,l,u,t,c)}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 ${jd} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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 zm extends as{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new RM(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=ht(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 rr,this._cursorFlatBlinkInterval=new j_,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(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const i=t.length-this._secondaryCursors.length;for(let n=0;n<i;n++){const s=new RM(this._context);this._domNode.domNode.insertBefore(s.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(s)}}else if(this._secondaryCursors.length>t.length){const i=this._secondaryCursors.length-t.length;for(let n=0;n<i;n++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])}onCursorStateChanged(e){const t=[];for(let n=0,s=e.selections.length;n<s;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=i=>{for(let n=0,s=e.ranges.length;n<s;n++)if(e.ranges[n].fromLineNumber<=i.lineNumber&&i.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(t(i.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=e===0,i=e===5;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!t&&!i&&(e===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},zm.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},zm.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case ji.Line:e+=" cursor-line-style";break;case ji.Block:e+=" cursor-block-style";break;case ji.Underline:e+=" cursor-underline-style";break;case ji.LineThin:e+=" cursor-line-thin-style";break;case ji.BlockOutline:e+=" cursor-block-outline-style";break;case ji.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;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let s=0,o=this._secondaryCursors.length;s<o;s++){const a=this._secondaryCursors[s].render(e);a&&(t[i++]=a)}this._renderData=t}getLastRenderData(){return this._renderData}}zm.BLINK_INTERVAL=500;Et((r,e)=>{const t=r.getColor(XW);if(t){let i=r.getColor(HX);i||(i=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),r.type==="hc"&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const Z1=()=>{throw new Error("Invalid change accessor")};class JJ extends as{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=ht(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=ht(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.model.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let o=0,a=s.length;o<a;o++){const l=s[o],c=this._zones[l],d=this._computeWhitespaceProps(c.delegate),u=t.get(l);u&&(u.afterLineNumber!==d.afterViewLineNumber||u.height!==d.heightInPx)&&(n.changeOneWhitespace(l,d.afterViewLineNumber,d.heightInPx),this._safeCallOnComputedHeight(c.delegate,d.heightInPx),i=!0)}}),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return typeof e.afterColumn!="undefined"?e.afterColumn:1e4}_computeWhitespaceProps(e){if(e.afterLineNumber===0)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t;if(typeof e.afterColumn!="undefined")t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const o=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new U(o,this._context.model.getModelLineMaxColumn(o))}let i;t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?i=this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):i=this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),s=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace(i=>{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{!s||(t=this._removeZone(i,s)||t)},layoutZone:s=>{!s||(t=this._layoutZone(i,s)||t)}};eee(e,n),n.addZone=Z1,n.removeZone=Z1,n.layoutZone=Z1}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isVisible:!1,domNode:ht(t.domNode),marginDomNode:t.marginDomNode?ht(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.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 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 typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){Fe(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){Fe(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let o=0,a=t.length;o<a;o++)i[t[o].id]=t[o],n=!0;const s=Object.keys(this._zones);for(let o=0,a=s.length;o<a;o++){const l=s[o],c=this._zones[l];let d=0,u=0,h="none";i.hasOwnProperty(l)?(d=i[l].verticalOffset-e.bigNumbersDelta,u=i[l].height,h="block",c.isVisible||(c.domNode.setAttribute("monaco-visible-view-zone","true"),c.isVisible=!0),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(i[l].verticalOffset))):(c.isVisible&&(c.domNode.removeAttribute("monaco-visible-view-zone"),c.isVisible=!1),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),c.domNode.setTop(d),c.domNode.setHeight(u),c.domNode.setDisplay(h),c.marginDomNode&&(c.marginDomNode.setTop(d),c.marginDomNode.setHeight(u),c.marginDomNode.setDisplay(h))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function eee(r,e){try{return r(e)}catch(t){Fe(t)}}class tee{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class iee{constructor(e,t,i){this.configuration=e,this.theme=new tee(t),this.model=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class nee{constructor(e,t,i,n){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new k(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class ree extends Y_{constructor(e,t,i,n,s,o){super();this._selections=[new _e(1,1,1,1)],this._renderAnimationFrame=null;const a=new nJ(t,n,s,e);this._context=new iee(t,i.getColorTheme(),n),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange(p=>{this._context.theme.update(p),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new ZQ(this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=ht(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=ht(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=ht(document.createElement("div")),ca.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new IJ(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new D0(this._context,this._linesContent),this._viewZones=new JJ(this._context),this._viewParts.push(this._viewZones);const l=new zJ(this._context);this._viewParts.push(l);const c=new KJ(this._context);this._viewParts.push(c);const d=new oJ(this._context);this._viewParts.push(d),d.addDynamicOverlay(new dJ(this._context)),d.addDynamicOverlay(new ii(this._context)),d.addDynamicOverlay(new AJ(this._context)),d.addDynamicOverlay(new hJ(this._context));const u=new aJ(this._context);this._viewParts.push(u),u.addDynamicOverlay(new uJ(this._context)),u.addDynamicOverlay(new DJ(this._context)),u.addDynamicOverlay(new PJ(this._context)),u.addDynamicOverlay(new MJ(this._context)),u.addDynamicOverlay(new Uf(this._context));const h=new au(this._context);h.getDomNode().appendChild(this._viewZones.marginDomNode),h.getDomNode().appendChild(u.getDomNode()),this._viewParts.push(h),this._contentWidgets=new lJ(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new zm(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new $J(this._context),this._viewParts.push(this._overlayWidgets);const f=new GJ(this._context);this._viewParts.push(f);const g=new HJ(this._context);if(this._viewParts.push(g),l){const p=this._scrollbar.getOverviewRulerLayoutInfo();p.parent.insertBefore(l.getDomNode(),p.insertBefore)}this._linesContent.appendChild(d.getDomNode()),this._linesContent.appendChild(f.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(h.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),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 YQ(this._context,a,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new BQ(e,t)},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 U(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new U(e,t)))}}_applyLayout(){const t=this._context.configuration.options.get(129);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+xw(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(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(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=n3(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){see(()=>this._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!uD(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new nee(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new bY(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender();Math.abs(WC()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new U(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?T0.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new qJ(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}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){let t=e.position&&e.position.range||null;if(t===null){const n=e.position?e.position.position:null;n!==null&&(t=new k(n.lineNumber,n.column,n.lineNumber,n.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),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()}}function see(r){try{return r()}catch(e){Fe(e)}}class Ww{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new zi(new k(1,1,1,1),0,new U(1,1),0),new zi(new k(1,1,1,1),0,new U(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 Ge(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new _e(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new _e(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}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),a=this._validatePositionWithCache(e,n,i,o),l=this._validatePositionWithCache(e,s,n,a);return i.equals(o)&&n.equals(a)&&s.equals(l)?t:new zi(k.fromPositions(a,l),t.selectionStartLeftoverVisibleColumns+n.column-a.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=Ww._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),a=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new zi(n,s,o,a)}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 zi(n,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 zi(n,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new U(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new U(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new k(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new zi(o,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class OM{constructor(e){this.context=e,this.primaryCursor=new Ww(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const n=this.secondaryCursors[t].viewState.position;n.isBefore(e)&&(e=n)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const n=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(n)&&(e=n)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(Ge.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){e!==null&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,i=e.length;if(t<i){let n=i-t;for(let s=0;s<n;s++)this._addSecondaryCursor()}else if(t>i){let n=t-i;for(let s=0;s<n;s++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let n=0;n<i;n++)this.secondaryCursors[n].setState(this.context,e[n].modelState,e[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new Ww(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(this.secondaryCursors.length===0)return;let e=this._getAll(),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((i,n)=>i.selection.startLineNumber===n.selection.startLineNumber?i.selection.startColumn-n.selection.startColumn:i.selection.startLineNumber-n.selection.startLineNumber);for(let i=0;i<t.length-1;i++){const n=t[i],s=t[i+1],o=n.selection,a=s.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let l;if(a.isEmpty()||o.isEmpty()?l=a.getStartPosition().isBeforeOrEqual(o.getEndPosition()):l=a.getStartPosition().isBefore(o.getEndPosition()),l){const c=n.index<s.index?i:i+1,d=n.index<s.index?i+1:i,u=t[d].index,h=t[c].index,f=t[d].selection,g=t[c].selection;if(!f.equalsSelection(g)){const p=f.plusRange(g),_=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn,v=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn;let b;u===this.lastAddedCursorIndex?(b=_,this.lastAddedCursorIndex=h):b=v;let C;b?C=new _e(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn):C=new _e(p.endLineNumber,p.endColumn,p.startLineNumber,p.startColumn),t[c].selection=C;const y=Ge.fromModelSelection(C);e[h].setState(this.context,y.modelState,y.viewState)}for(const p of t)p.index>u&&p.index--;e.splice(u,1),t.splice(d,1),this._removeSecondaryCursor(u-1),i--}}}}class oee{constructor(){this.type=0}}class aee{constructor(){this.type=1}}class lee{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class cee{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class vh{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Yb{constructor(){this.type=5}}class dee{constructor(e){this.type=6,this.isFocused=e}}class uee{constructor(){this.type=7}}class Zb{constructor(){this.type=8}}class y8{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class wL{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class yL{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class oC{constructor(e,t,i,n,s,o){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=s,this.scrollType=o}}class hee{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 fee{constructor(){this.type=14}}class gee{constructor(e){this.type=15,this.ranges=e}}class pee{constructor(){this.type=16}}class mee{constructor(){this.type=17}}class _ee extends Z{constructor(){super();this._onEvent=this._register(new H),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;t<i;t++)if(this._outgoingEvents[t].kind===e.kind){this._outgoingEvents[t]=this._outgoingEvents[t].merge(e);return}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){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;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new bee),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const i of e)this._addOutgoingEvent(i);t.length>0&&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 bee{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class MA{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}merge(e){return e.kind!==0?this:new MA(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class PA{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return e.kind!==1?this:new PA(this.oldHasFocus,e.hasFocus)}}class FA{constructor(e,t,i,n,s,o,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=a,this.scrollTop=l,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}merge(e){return e.kind!==2?this:new FA(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class vee{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Vw{constructor(e,t,i,n,s,o,a){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!e[s].equalsSelection(t[s]))return!1;return!0}isNoOp(){return Vw._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return e.kind!==5?this:new Vw(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class Cee{constructor(){this.kind=4}isNoOp(){return!1}merge(e){return this}}class X1{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class MM{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(t.push(n),n.startLineNumber!==n.endLineNumber))return!1}t.sort(k.compareRangesUsingStarts),e.sort(k.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class jf extends Z{constructor(e,t,i,n){super();this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new _M(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new OM(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=ft(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new _M(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let s=!1;n!==null&&n.length>jf.MAX_CURSOR_COUNT&&(n=n.slice(0,jf.MAX_CURSOR_COUNT),s=!0);const o=new X1(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,o,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const s=this._cursors.getViewPositions();if(s.length>1){this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);return}else{const o=s[0],a=new k(o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,a,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,s){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,s);else{const a=o[0],l=new k(a.lineNumber,a.column,a.lineNumber,a.column);this._emitCursorRevealRange(e,t,l,null,i,n,s)}}_emitCursorRevealRange(e,t,i,n,s,o,a){e.emitViewEvent(new oC(t,i,n,s,o,a))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push({inSelectionMode:!s.isEmpty(),selectionStart:{lineNumber:s.selectionStartLineNumber,column:s.selectionStartColumn},position:{lineNumber:s.positionLineNumber,column:s.positionColumn}})}return e}restoreState(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];let a=1,l=1;o.position&&o.position.lineNumber&&(a=o.position.lineNumber),o.position&&o.position.column&&(l=o.position.column);let c=a,d=l;o.selectionStart&&o.selectionStart.lineNumber&&(c=o.selectionStart.lineNumber),o.selectionStart&&o.selectionStart.column&&(d=o.selectionStart.column),i.push({selectionStartLineNumber:c,selectionStartColumn:d,positionLineNumber:a,positionColumn:l})}this.setStates(e,"restoreState",0,Ge.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(t instanceof OW){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new OM(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const n=Ge.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,n)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const n=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,Ge.fromModelSelections(n))}}}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:Pt.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:Pt.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,Ge.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let a=0,l=e.length;a<l;a++)i.push({range:e[a],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[a],options:{description:"auto-closed-enclosing",stickiness:1}});const s=this._model.deltaDecorations([],i),o=this._model.deltaDecorations([],n);this._autoClosedActions.push(new MM(this._model,s,o))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=wee.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let s=0;s<e.commands.length;s++){const o=e.commands[s];o instanceof p8&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=new X1(this._model,this);if(o.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new cee(l,a)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some((c,d)=>!c.modelState.equals(n.cursorState[d].modelState))){const c=n?n.cursorState.map(u=>u.modelState.selection):null,d=n?n.modelVersionId:0;e.emitOutgoingEvent(new Vw(c,a,d,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){const s=e[i];if(!s.text||s.text.indexOf(` +`)>=0)return null;const o=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,d=s.text.length-o[2].length-1,u=s.text.lastIndexOf(c,d-1);if(u===-1)return null;t.push([u,d])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);let o=[],a=[];const l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let u=0,h=s.length;u<h;u++){const[f,g]=s[u],p=c[u],_=p.range.startLineNumber,v=p.range.startColumn-1+f,b=p.range.startColumn-1+g;o.push(new k(_,b+1,_,b+2)),a.push(new k(_,v+1,_,b+2))}const d=n(c);return d&&(this._isHandling=!0),d});l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),o.length>0&&this._pushAutoClosedAction(o,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=new X1(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Fe(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return MM.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{t==="keyboard"&&(this._executeEditOperation(Yt.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s<n;){const o=zC(t,s),a=t.substr(s,o);this._executeEditOperation(Yt.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),s+=o}}else this._executeEditOperation(Yt.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,s,o){if(t.length===0&&i===0&&n===0){if(s!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new _e(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,o,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Yt.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,o)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Yt.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(lu.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new lr(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new lr(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}jf.MAX_CURSOR_COUNT=1e4;class wee{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let o=0,a=n.trackedRanges.length;o<a;o++)n.model._setTrackedRange(n.trackedRanges[o],null,0);return s}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(i.operations.length===0)return null;const n=i.operations,s=this._getLoserCursorMap(n);if(s.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let o=[];for(let c=0,d=n.length;c<d;c++)s.hasOwnProperty(n[c].identifier.major.toString())||o.push(n[c]);i.hadTrackedEditOperation&&o.length>0&&(o[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,o,c=>{let d=[];for(let f=0;f<e.selectionsBefore.length;f++)d[f]=[];for(const f of c)!f.identifier||d[f.identifier.major].push(f);const u=(f,g)=>f.identifier.minor-g.identifier.minor;let h=[];for(let f=0;f<e.selectionsBefore.length;f++)d[f].length>0?(d[f].sort(u),h[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>d[f],getTrackedSelection:g=>{const p=parseInt(g,10),_=e.model._getTrackedRange(e.trackedRanges[p]);return e.trackedRangesDirection[p]===0?new _e(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn):new _e(_.endLineNumber,_.endColumn,_.startLineNumber,_.startColumn)}})):h[f]=e.selectionsBefore[f];return h});a||(a=e.selectionsBefore);let l=[];for(let c in s)s.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,d)=>d-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a){const l=this._getEditOperationsFromCommand(e,s,a);i=i.concat(l.operations),n=n||l.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],s=0;const o=(u,h,f=!1)=>{k.isEmpty(u)&&h===""||n.push({identifier:{major:t,minor:s++},range:u,text:h,forceMoveMarkers:f,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const d={addEditOperation:o,addTrackedEditOperation:(u,h,f)=>{a=!0,o(u,h,f)},trackSelection:(u,h)=>{const f=_e.liftSelection(u);let g;if(f.isEmpty())if(typeof h=="boolean")h?g=2:g=3;else{const v=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===v?g=2:g=3}else g=1;const p=e.trackedRanges.length,_=e.model._setTrackedRange(null,f,g);return e.trackedRanges[p]=_,e.trackedRangesDirection[p]=f.getDirection(),p.toString()}};try{i.getEditOperations(e.model,d)}catch(u){return Fe(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-k.compareRangesUsingEnds(i.range,n.range));let t={};for(let i=1;i<e.length;i++){const n=e[i-1],s=e[i];if(k.getStartPosition(n.range).isBefore(k.getEndPosition(s.range))){let o;n.identifier.major>s.identifier.major?o=n.identifier.major:o=s.identifier.major,t[o.toString()]=!0;for(let a=0;a<e.length;a++)e[a].identifier.major===o&&(e.splice(a,1),a<i&&i--,a--);i>0&&i--}}return t}}class S8{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(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const PM={getInitialState:()=>G_,tokenize2:(r,e,t,i)=>OD(0,r,t,i)};function x8(r,e=PM){return See(r,e||PM)}function yee(r,e,t,i,n,s,o){let a="<div>",l=i,c=0,d=!0;for(let u=0,h=e.getCount();u<h;u++){const f=e.getEndOffset(u);if(f<=i)continue;let g="";for(;l<f&&l<n;l++){const p=r.charCodeAt(l);switch(p){case 9:let _=s-(l+c)%s;for(c+=_-1;_>0;)o&&d?(g+=" ",d=!1):(g+=" ",d=!0),_--;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:o&&d?(g+=" ",d=!1):(g+=" ",d=!0);break;default:g+=String.fromCharCode(p),d=!1}}if(a+=`<span style="${e.getInlineStyle(u,t)}">${g}</span>`,f>n||l>=n)break}return a+="</div>",a}function See(r,e){let t='<div class="monaco-tokenized-source">',i=aa(r),n=e.getInitialState();for(let s=0,o=i.length;s<o;s++){let a=i[s];s>0&&(t+="<br/>");let l=e.tokenize2(a,!0,n,0);Gi.convertToEndOffset(l.tokens,a.length);let d=new Gi(l.tokens,a).inflate(),u=0;for(let h=0,f=d.getCount();h<f;h++){const g=d.getClassName(h),p=d.getEndOffset(h);t+=`<span class="${g}">${mD(a.substring(u,p))}</span>`,u=p}n=l.endState}return t+="</div>",t}class xee{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class Eee{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class jm{constructor(e,t,i,n){this._instanceId=_3(++jm.INSTANCE_COUNT),this._pendingChanges=new xee,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n<s;){const o=n+s>>>1;t===e[o].afterLineNumber?i<e[o].ordinal?s=o:n=o+1:t<e[o].afterLineNumber?s=o:n=o+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(n,s,o,a)=>{t=!0,n=n|0,s=s|0,o=o|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new Eee(l,n,s,o,a)),l},changeOneWhitespace:(n,s,o)=>{t=!0,s=s|0,o=o|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:o})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}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 l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const o=l=>{let c=[];for(const d of l)if(!n.has(d.id)){if(s.has(d.id)){const u=s.get(d.id);d.afterLineNumber=u.newAfterLineNumber,d.height=u.newHeight}c.push(d)}return c},a=o(this._arr).concat(o(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=jm.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;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(n!==-1&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const s=this._arr[n];this._removeWhitespace(n),s.afterLineNumber=t,this._insertWhitespace(s)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const s=this._arr[i].afterLineNumber;e<=s&&s<=t?this._arr[i].afterLineNumber=e-1:s>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const s=this._arr[i].afterLineNumber;e<=s&&(this._arr[i].afterLineNumber+=t-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e=e|0;let t=Math.max(0,this._prefixSumValidIndex+1);t===0&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e=e|0;const t=this._findLastWhitespaceBeforeLineNumber(e);return t===-1?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e=e|0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=(n-i|0)/2|0,a=i+o|0;if(t[a].afterLineNumber<e){if(a+1>=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e=e|0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){this._checkPendingChanges(),e=e|0;let t;e>1?t=this._lineHeight*(e-1):t=0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>t}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n<s;){const o=(n+s)/2|0,a=this.getVerticalOffsetForLineNumber(o)|0;if(e>=a+i)n=o+1;else{if(e>=a)return o;s=o}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let o=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let c,d;a===-1?(a=l,d=o+1,c=0):(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let u=s,h=u;const f=5e5;let g=0;s>=f&&(g=Math.floor(s/f)*f,g=Math.floor(g/i)*i,h-=g);const p=[],_=e+(t-e)/2;let v=-1;for(let E=n;E<=o;E++){if(v===-1){const S=u,w=u+i;(S<=_&&_<w||S>_)&&(v=E)}for(u+=i,p[E-n]=h,h+=i;d===E;)h+=c,u+=c,a++,a>=l?d=o+1:(d=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){o=E;break}}v===-1&&(v=o);const b=this.getVerticalOffsetForLineNumber(o)|0;let C=n,y=o;return C<y&&s<e&&C++,C<y&&b+i>t&&y--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:v,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:y}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t<i;){const o=Math.floor((t+i)/2),a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(e>=a+l)t=o+1;else{if(e>=a)return o;i=o}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),o=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:o,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let s=[];for(let o=i;o<=n;o++){const a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}jm.INSTANCE_COUNT=0;const kee=125;class Ep{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<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 Lee extends Z{constructor(e,t){super();this._onDidContentSizeChange=this._register(new H),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Ep(0,0,0,0),this._scrollable=this._register(new I0(e,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 MA(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)}}class Tee extends Z{constructor(e,t,i){super();this._configuration=e;const n=this._configuration.options,s=n.get(129),o=n.get(74);this._linesLayout=new jm(t,n.get(58),o.top,o.bottom),this._scrollable=this._register(new Lee(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Ep(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(102)?kee:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(58)&&this._linesLayout.setLineHeight(t.get(58)),e.hasChanged(74)){const i=t.get(74);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(129)){const i=t.get(129),n=i.contentWidth,s=i.height,o=this._scrollable.getScrollDimensions(),a=o.contentWidth;this._scrollable.setScrollDimensions(new Ep(n,o.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(102)&&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 n=this._configuration.options.get(91);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(93)?s+=Math.max(0,t-n.get(58)-n.get(74).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 Ep(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new wO(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new wO(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(130),n=t.get(43);if(i.isViewportWrapping){const s=t.get(129),o=t.get(64);return e>s.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?e+s.verticalScrollbarWidth:e}else{const s=t.get(92)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Ep(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}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){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class Iee{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){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}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)}}class Dee{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_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._counts.length;e<t;e++){const i=this._counts[e],n=e>0?this._modelToView[e-1]:0;this._modelToView[e]=n+i;for(let s=0;s<i;s++)this._viewToModel[n+s]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=Lm(this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],i=t>0?this._modelToView[t-1]:0;return new H3(t,e-i)}}class Aee{constructor(e,t,i,n,s,o,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new Iee(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),a=new Vp(fo.fromDecorations(n));for(let p=0;p<s;p++){const _=a.takeWhile(v=>v.lineNumber===p+1);o.addRequest(i[p],_,t?t[p]:null)}const l=o.finalize();let c=[],d=this.hiddenAreasIds.map(p=>this.model.getDecorationRange(p)).sort(k.compareRangesUsingStarts),u=1,h=0,f=-1,g=f+1<d.length?h+1:s+2;for(let p=0;p<s;p++){let _=p+1;_===g&&(f++,u=d[f].startLineNumber,h=d[f].endLineNumber,g=f+1<d.length?h+1:s+2);let v=_>=u&&_<=h,b=J1(l[p],!v);c[p]=b.getViewLineCount(),this.lines[p]=b}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Dee(c)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(e.length===0)return[];let t=e.map(o=>this.model.validateRange(o)).sort(k.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,s=t[0].endLineNumber;for(let o=1,a=t.length;o<a;o++){let l=t[o];l.startLineNumber>s+1?(i.push(new k(n,1,s,1)),n=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return i.push(new k(n,1,s,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map(u=>this.model.getDecorationRange(u)).sort(k.compareRangesUsingStarts);if(t.length===i.length){let u=!1;for(let h=0;h<t.length;h++)if(!t[h].equalsRange(i[h])){u=!0;break}if(!u)return!1}let n=[];for(const u of t)n.push({range:u,options:qe.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,n);let s=t,o=1,a=0,l=-1,c=l+1<s.length?a+1:this.lines.length+2,d=!1;for(let u=0;u<this.lines.length;u++){let h=u+1;h===c&&(l++,o=s[l].startLineNumber,a=s[l].endLineNumber,c=l+1<s.length?a+1:this.lines.length+2);let f=!1;if(h>=o&&h<=a?this.lines[u].isVisible()&&(this.lines[u]=this.lines[u].setVisible(!1),f=!0):(d=!0,this.lines[u].isVisible()||(this.lines[u]=this.lines[u].setVisible(!0),f=!0)),f){let g=this.lines[u].getViewLineCount();this.prefixSumComputer.changeValue(u,g)}}return d||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.lines.length?!1:this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const s=this.fontInfo.equals(e),o=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n;if(s&&o&&a&&l)return!1;const c=s&&o&&!a&&l;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let d=null;if(c){d=[];for(let u=0,h=this.lines.length;u<h;u++)d[u]=this.lines[u].getLineBreakData()}return this._constructLines(!1,d),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;let n=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=this.prefixSumComputer.getAccumulatedValue(i-1);return this.lines.splice(t-1,i-t+1),this.prefixSumComputer.removeValues(t-1,i-t+1),new wL(n,s)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const s=t>2&&!this.lines[t-2].isVisible();let o=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,a=0,l=[],c=[];for(let d=0,u=n.length;d<u;d++){let h=J1(n[d],!s);l.push(h);let f=h.getViewLineCount();a+=f,c[d]=f}return this.lines=this.lines.slice(0,t-1).concat(l).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,c),new yL(o,o+a-1)}onModelLineChanged(e,t,i){if(e!==null&&e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,s=this.lines[n].getViewLineCount(),o=this.lines[n].isVisible(),a=J1(i,o);this.lines[n]=a;let l=this.lines[n].getViewLineCount(),c=!1,d=0,u=-1,h=0,f=-1,g=0,p=-1;s>l?(d=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=d+l-1,g=u+1,p=g+(s-l)-1,c=!0):s<l?(d=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=d+s-1,h=u+1,f=h+(l-s)-1,c=!0):(d=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=d+l-1),this.prefixSumComputer.changeValue(n,l);const _=d<=u?new y8(d,u):null,v=h<=f?new yL(h,f):null,b=g<=p?new wL(g,p):null;return[c,_,v,b]}acceptVersionId(e){this._validModelVersionId=e,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:e|0}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)),a=this.model.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return new FM(i+1,n)}getMinColumnOfViewLine(e){return this.lines[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new U(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new U(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const c=this.lines[l-1];if(c.isVisible()){let d=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,u=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let h=d;h<u;h++)a.push(new FM(l,h))}if(!c.isVisible()&&o){const d=new U(l-1,this.model.getLineMaxColumn(l-1)+1),u=k.fromPositions(o,d);s.push(new BM(u,a)),a=[],o=null}else c.isVisible()&&!o&&(o=new U(l,1))}if(o){const l=k.fromPositions(o,this.getModelEndPositionOfViewLine(n));s.push(new BM(l,a))}return s}getViewLinesBracketGuides(e,t,i,n,s){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,a=[];for(const l of this.getViewLineInfosGroupedByModelRanges(e,t)){const c=l.modelRange.startLineNumber,d=this.model.getLinesBracketGuides(c,l.modelRange.endLineNumber,o,n,s);for(const u of l.viewLines)if(u.isWrappedLineContinuation&&this.getMinColumnOfViewLine(u)===1)a.push([]);else{const h=d[u.modelLineNumber-c];a.push(h)}}return a}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=[],o=[],a=[];const l=i.lineNumber-1,c=n.lineNumber-1;let d=null;for(let g=l;g<=c;g++){const p=this.lines[g];if(p.isVisible()){let _=p.getViewLineNumberOfModelPosition(0,g===l?i.column:1),v=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),b=v-_+1,C=0;b>1&&p.getViewLineMinColumn(this.model,g+1,v)===1&&(C=_===0?1:2),o.push(b),a.push(C),d===null&&(d=new U(g+1,0))}else d!==null&&(s=s.concat(this.model.getLinesIndentGuides(d.lineNumber,g)),d=null)}d!==null&&(s=s.concat(this.model.getLinesIndentGuides(d.lineNumber,n.lineNumber)),d=null);const u=t-e+1;let h=new Array(u),f=0;for(let g=0,p=s.length;g<p;g++){let _=s[g],v=Math.min(u-f,o[g]),b=a[g],C;b===2?C=0:b===1?C=1:C=v;for(let y=0;y<v;y++)y===C&&(_=0),h[f++]=_}return h}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineContent(this.model,i+1,n)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineLength(this.model,i+1,n)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMinColumn(this.model,i+1,n)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMaxColumn(this.model,i+1,n)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineData(this.model,i+1,n)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.prefixSumComputer.getIndexOf(e-1),s=e,o=n.index,a=n.remainder,l=[];for(let c=o,d=this.model.getLineCount();c<d;c++){let u=this.lines[c];if(!u.isVisible())continue;let h=c===o?a:0,f=u.getViewLineCount()-h,g=!1;s+f>t&&(g=!0,f=t-s+1);let p=h+f;if(u.getViewLinesData(this.model,c+1,h,p,s-e,i,l),s+=f,g)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),s=n.index,o=n.remainder,a=this.lines[s],l=a.getViewLineMinColumn(this.model,s+1,o),c=a.getViewLineMaxColumn(this.model,s+1,o);t<l&&(t=l),t>c&&(t=c);let d=a.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new U(s+1,d)).equals(i)?new U(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 k(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,s=i.remainder,o=this.lines[n].getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new U(n+1,o))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new k(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new U(e,t)),s=n.lineNumber,o=n.column;let a=s-1,l=!1;for(;a>0&&!this.lines[a].isVisible();)a--,l=!0;if(a===0&&!this.lines[a].isVisible())return new U(1,1);const c=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));let d;return l?d=this.lines[a].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(a+1),i):d=this.lines[s-1].getViewPositionOfModelPosition(c,o,i),d}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return k.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const s=1+(i===0?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(i===0&&!this.lines[i].isVisible())return 1;const n=1+(i===0?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new E8;for(const o of n){const a=o.options.overviewRuler,l=a?a.position:0;if(l===0)continue;const c=a.getColor(i),d=this._getViewLineNumberForModelPosition(o.range.startLineNumber,o.range.startColumn),u=this._getViewLineNumberForModelPosition(o.range.endLineNumber,o.range.endColumn);s.accept(c,d,u,l)}return s.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new k(n.lineNumber,1,s.lineNumber,s.column),t,i);let o=[];const a=n.lineNumber-1,l=s.lineNumber-1;let c=null;for(let f=a;f<=l;f++)if(this.lines[f].isVisible())c===null&&(c=new U(f+1,f===a?n.column:1));else if(c!==null){const p=this.model.getLineMaxColumn(f);o=o.concat(this.model.getDecorationsInRange(new k(c.lineNumber,c.column,f,p),t,i)),c=null}c!==null&&(o=o.concat(this.model.getDecorationsInRange(new k(c.lineNumber,c.column,s.lineNumber,s.column),t,i)),c=null),o.sort((f,g)=>{const p=k.compareRangesUsingStarts(f.range,g.range);return p===0?f.id<g.id?-1:f.id>g.id?1:0:p});let d=[],u=0,h=null;for(const f of o){const g=f.id;h!==g&&(h=g,d[u++]=f)}return d}getInjectedTextAt(e){const t=this._toValidViewLineNumber(e.lineNumber),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index,s=i.remainder;return this.lines[n].getInjectedTextAt(s,e.column)}normalizePosition(e,t){const i=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(i-1),s=n.index,o=n.remainder;return this.lines[s].normalizePosition(this.model,s+1,o,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index;return i.remainder===0?this.model.getLineIndentColumn(n+1):0}}class FM{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class BM{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Hw{constructor(){}isVisible(){return!0}setVisible(e){return e?this:$w.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),s=n.getLineContent();return new UD(s,!1,1,s.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,s,o,a){if(!o[s]){a[s]=null;return}a[s]=this.getViewLineData(e,t,0)}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new U(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i,n,s){return n}getInjectedTextAt(e,t){return null}}Hw.INSTANCE=new Hw;class $w{constructor(){}isVisible(){return!1}setVisible(e){return e?Hw.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,s,o,a){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i,n,s){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}$w.INSTANCE=new $w;class Nee{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return this._lineBreakData.getInputOffsetOfOutputPosition(e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:this._lineBreakData.getInputOffsetOfOutputPosition(i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0,s=i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let o;if(this._lineBreakData.injectionOffsets!==null){const a=this._lineBreakData.injectionOffsets.map((l,c)=>new fo(0,0,l+1,this._lineBreakData.injectionOptions[c],0));o=fo.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=WM(this._lineBreakData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0;let o=(i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1])-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(i)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,i)+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=this._lineBreakData,s=i>0?n.wrappedTextIndentLength:0,o=n.injectionOffsets,a=n.injectionOptions;let l,c,d;if(o){const p=e.getLineTokens(t).withInserted(o.map((C,y)=>({offset:C,text:a[y].content,tokenMetadata:Gi.defaultTokenMetadata}))),_=i>0?n.breakOffsets[i-1]:0,v=n.breakOffsets[i];l=p.getLineContent().substring(_,v),c=p.sliceAndInflate(_,v,s),d=new Array;let b=0;for(let C=0;C<o.length;C++){const y=a[C].content.length,E=o[C]+b,S=o[C]+b+y;if(E>v)break;if(_<S){const w=a[C];if(w.inlineClassName){const x=i>0?n.wrappedTextIndentLength:0,D=x+Math.max(E-_,0),M=x+Math.min(S-_,v);D!==M&&d.push(new KG(D,M,w.inlineClassName,w.inlineClassNameAffectsLetterSpacing))}}b+=y}}else{const p=this.getInputStartOffsetOfOutputLineIndex(i),_=this.getInputEndOffsetOfOutputLineIndex(e,t,i),v=e.getLineTokens(t);l=e.getValueInRange({startLineNumber:t,startColumn:p+1,endLineNumber:t,endColumn:_+1}),c=v.sliceAndInflate(p,_,s),d=null}i>0&&(l=WM(n.wrappedTextIndentLength)+l);const u=i>0?n.wrappedTextIndentLength+1:1,h=l.length+1,f=i+1<this.getViewLineCount(),g=i===0?0:n.breakOffsetsVisibleColumn[i-1];return new UD(l,f,u,h,g,c,d)}getViewLinesData(e,t,i,n,s,o,a){if(!this._isVisible)throw new Error("Not supported");for(let l=i;l<n;l++){let c=s+l-i;if(!o[c]){a[c]=null;continue}a[c]=this.getViewLineData(e,t,l)}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=t-1;return e>0&&(i<this._lineBreakData.wrappedTextIndentLength?i=0:i-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(e,i)+1}getViewPositionOfModelPosition(e,t,i=2){if(!this._isVisible)throw new Error("Not supported");let n=this._lineBreakData.getOutputPositionOfInputOffset(t-1,i),s=n.outputLineIndex,o=n.outputOffset+1;return s>0&&(o+=this._lineBreakData.wrappedTextIndentLength),new U(e+s,o)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");const i=this._lineBreakData.getOutputPositionOfInputOffset(t-1);return e+i.outputLineIndex}normalizePosition(e,t,i,n,s){if(this._lineBreakData.injectionOffsets!==null){const o=n.lineNumber-i,a=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(i,n.column-1),l=this._lineBreakData.normalizeOffsetAroundInjections(a,s);if(l!==a)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(l,s).toPosition(o,this._lineBreakData.wrappedTextIndentLength)}if(s===0){if(i>0&&n.column===this._getViewLineMinColumn(i))return new U(n.lineNumber-1,this.getViewLineMaxColumn(e,t,i-1))}else if(s===1){const o=this.getViewLineCount()-1;if(i<o&&n.column===this.getViewLineMaxColumn(e,t,i))return new U(n.lineNumber+1,this._getViewLineMinColumn(i+1))}return n}getInjectedTextAt(e,t){return this._lineBreakData.getInjectedText(e,t-1)}}let Q1=[""];function WM(r){if(r>=Q1.length)for(let e=1;e<=r;e++)Q1[e]=Ree(e);return Q1[r]}function Ree(r){return new Array(r+1).join(" ")}function J1(r,e){return r===null?e?Hw.INSTANCE:$w.INSTANCE:new Nee(r,e)}class Oee{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class Mee{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new Oee(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new wL(t,i)}onModelLinesInserted(e,t,i,n){return new yL(t,i)}onModelLineChanged(e,t,i){return[!1,new y8(t,t),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;let n=new Array(i);for(let s=0;s<i;s++)n[s]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),i=t.getLineContent();return new UD(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let s=[];for(let o=e;o<=t;o++){let a=o-e;i[a]||(s[a]=null),s[a]=this.getViewLineData(o)}return s}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new E8;for(const o of n){const a=o.options.overviewRuler,l=a?a.position:0;if(l===0)continue;const c=a.getColor(i),d=o.range.startLineNumber,u=o.range.endLineNumber;s.accept(c,d,u,l)}return s.result}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class E8{constructor(){this.result=Object.create(null)}accept(e,t,i,n){let s=this.result[e];if(s){const o=s[s.length-3],a=s[s.length-1];if(o===n&&a+1>=t){i>a&&(s[s.length-1]=i);return}s.push(n,t,i)}else this.result[e]=[n,t,i]}}class Pee{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 a=this._coordinatesConverter.convertModelPositionToViewPosition(new U(n.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new U(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);o=new k(a.lineNumber,a.column,l.lineNumber,l.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new Y3(o,s),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,rD(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let s=[],o=0,a=[];for(let l=i;l<=n;l++)a[l-i]=[];for(let l=0,c=t.length;l<c;l++){let d=t[l],u=d.options,h=this._getOrCreateViewModelDecoration(d),f=h.range;if(s[o++]=h,u.inlineClassName){let g=new $p(f,u.inlineClassName,u.inlineClassNameAffectsLetterSpacing?3:0),p=Math.max(i,f.startLineNumber),_=Math.min(n,f.endLineNumber);for(let v=p;v<=_;v++)a[v-i].push(g)}if(u.beforeContentClassName&&i<=f.startLineNumber&&f.startLineNumber<=n){let g=new $p(new k(f.startLineNumber,f.startColumn,f.startLineNumber,f.startColumn),u.beforeContentClassName,1);a[f.startLineNumber-i].push(g)}if(u.afterContentClassName&&i<=f.endLineNumber&&f.endLineNumber<=n){let g=new $p(new k(f.endLineNumber,f.endColumn,f.endLineNumber,f.endColumn),u.afterContentClassName,2);a[f.endLineNumber-i].push(g)}}return{decorations:s,inlineDecorations:a}}}class Fee extends Z{constructor(e,t,i,n,s,o){super();if(this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new _ee,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new vs(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new $t(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new $t(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new Mee(this.model);else{const a=this._configuration.options,l=a.get(43),c=a.get(123),d=a.get(130),u=a.get(122);this._lines=new Aee(this._editorId,this.model,n,s,l,this.model.getOptions().tabSize,c,d.wrappingColumn,u)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new jf(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Tee(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll(a=>{a.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new hee(a)),this._eventDispatcher.emitOutgoingEvent(new FA(a.oldScrollWidth,a.oldScrollLeft,a.oldScrollHeight,a.oldScrollTop,a.scrollWidth,a.scrollLeft,a.scrollHeight,a.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(a=>{this._eventDispatcher.emitOutgoingEvent(a)})),this._decorations=new Pee(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(a=>{try{const l=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(l,a)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(J_.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new pee)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),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())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new U(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new U(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new dee(e)),this._eventDispatcher.emitOutgoingEvent(new PA(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new oee)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new aee)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new fee)}_onConfigurationChanged(e,t){let i=null;if(this._viewportStartLine!==-1){let d=new U(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(d)}let n=!1;const s=this._configuration.options,o=s.get(43),a=s.get(123),l=s.get(130),c=s.get(122);if(this._lines.setWrappingSettings(o,a,l.wrappingColumn,c)&&(e.emitViewEvent(new Yb),e.emitViewEvent(new Zb),e.emitViewEvent(new vh(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(80)&&(this._decorations.reset(),e.emitViewEvent(new vh(null))),e.emitViewEvent(new lee(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const d=this.coordinatesConverter.convertModelPositionToViewPosition(i),u=this.viewLayout.getVerticalOffsetForLineNumber(d.lineNumber);this.viewLayout.setScrollPosition({scrollTop:u+this._viewportStartLineDelta},1)}vs.shouldRecreate(t)&&(this.cursorConfig=new vs(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),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.changes,o=e instanceof Bd?e.versionId:null,a=this._lines.createLineBreaksComputer();for(const d of s)switch(d.changeType){case 4:{for(let u=0;u<d.detail.length;u++){const h=d.detail[u];let f=d.injectedTexts[u];f&&(f=f.filter(g=>!g.ownerId||g.ownerId===this._editorId)),a.addRequest(h,f,null)}break}case 2:{let u=null;d.injectedText&&(u=d.injectedText.filter(h=>!h.ownerId||h.ownerId===this._editorId)),a.addRequest(d.detail,u,null);break}}const l=a.finalize();let c=0;for(const d of s)switch(d.changeType){case 1:{this._lines.onModelFlushed(),t.emitViewEvent(new Yb),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break}case 3:{const u=this._lines.onModelLinesDeleted(o,d.fromLineNumber,d.toLineNumber);u!==null&&(t.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber)),i=!0;break}case 4:{const u=l.slice(c,c+d.detail.length);c+=d.detail.length;const h=this._lines.onModelLinesInserted(o,d.fromLineNumber,d.toLineNumber,u);h!==null&&(t.emitViewEvent(h),this.viewLayout.onLinesInserted(h.fromLineNumber,h.toLineNumber)),i=!0;break}case 2:{const u=l[c];c++;const[h,f,g,p]=this._lines.onModelLineChanged(o,d.lineNumber,u);n=h,f&&t.emitViewEvent(f),g&&(t.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),p&&(t.emitViewEvent(p),this.viewLayout.onLinesDeleted(p.fromLineNumber,p.toLineNumber));break}case 5:break}o!==null&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Zb),t.emitViewEvent(new vh(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const t=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(t){const i=this.coordinatesConverter.convertModelPositionToViewPosition(t.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){const s=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new U(s.fromLineNumber,1)).lineNumber,a=this.coordinatesConverter.convertModelPositionToViewPosition(new U(s.toLineNumber,this.model.getLineMaxColumn(s.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:a}}this._eventDispatcher.emitSingleViewEvent(new gee(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new uee),this.cursorConfig=new vs(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new vs(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new Yb),t.emitViewEvent(new Zb),t.emitViewEvent(new vh(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new vs(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new vh(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new Yb),t.emitViewEvent(new Zb),t.emitViewEvent(new vh(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(129),t=this._configuration.options.get(58),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 k(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];let n=[],s=0,o=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let d=0,u=i.length;d<u;d++){const h=i[d].startLineNumber,f=i[d].endLineNumber;f<o||h>l||(o<h&&(n[s++]=new k(o,a,h-1,this.model.getLineMaxColumn(h-1))),o=f+1,a=1)}return(o<l||o===l&&a<c)&&(n[s++]=new k(o,a,l,c)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new k(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new k(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new U(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if(typeof e.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;let n=this.coordinatesConverter.convertViewPositionToModelPosition(new U(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new k(n.lineNumber,n.column,n.lineNumber,n.column),1);const s=this.viewLayout.getVerticalOffsetForLineNumber(e),o=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=o-s}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n,s){return this._lines.getViewLinesBracketGuides(e,t,i,n,s)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=pr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Jo(this.getLineContent(e));return t===-1?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){let i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),o=this._lines.getViewLineData(t),l=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return o.inlineDecorations&&(l=[...l,...o.inlineDecorations.map(c=>c.toInlineDecoration(t))]),new Br(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,l,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new GG(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,rD(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i&&i.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const i=t.options.minimap;i&&i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?`\r +`:this.model.getEOL();e=e.slice(0),e.sort(k.compareRangesUsingStarts);let s=!1,o=!1;for(const l of e)l.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const l=e.map(d=>d.startLineNumber);let c="";for(let d=0;d<l.length;d++)d>0&&l[d-1]===l[d]||(c+=this.model.getLineContent(l[d])+n);return c}if(s&&t){let l=[],c=0;for(const d of e){const u=d.startLineNumber;d.isEmpty()?u!==c&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(d,i?2:0)),c=u}return l.length===1?l[0]:l}let a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(i.id===1||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const d=n.startLineNumber;n=new k(d,this.model.getLineMinColumn(d),d,this.model.getLineMaxColumn(d))}const s=this._configuration.options.get(43),o=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===gr.fontFamily;let c;return l?c=gr.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${gr.fontFamily}`),{mode:i.language,html:`<div style="color: ${o[1]};background-color: ${o[2]};font-family: ${c};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,o)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const d=this.model.getLineTokens(c),u=d.getLineContent(),h=c===i?n-1:0,f=c===s?o-1:u.length;u===""?l+="<br>":l+=yee(u,d.inflate(),t,h,f,a,an)}return l}_getColorMap(){let e=Qt.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=q.Format.CSS.formatHex(e[i]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){this._withViewEventsCollector(n=>this._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){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Cee);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),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){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new oC(e,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new oC(e,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(o=>o.emitViewEvent(new oC(e,i,null,n,t,s)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new mee),this._eventDispatcher.emitOutgoingEvent(new vee))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class qm{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}const Cr=bt("accessibilityService"),eb=new xe("accessibilityModeEnabled",!1);class Bee extends Cg{constructor(e,t){super(0);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),1);for(let i=0;i<t.length;i++)this.set(t.charCodeAt(i),2)}get(e){return 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 SL=[],xL=[];class BA{constructor(e,t){this.classifier=new Bee(e,t)}static create(e){return new BA(e.get(118),e.get(117))}createLineBreaksComputer(e,t,i,n){t=t|0,i=+i;const s=[],o=[],a=[];return{addRequest:(l,c,d)=>{s.push(l),o.push(c),a.push(d)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let c=[];for(let d=0,u=s.length;d<u;d++){const h=o[d],f=a[d];f&&!f.injectionOptions&&!h?c[d]=Wee(this.classifier,f,s[d],t,i,l,n):c[d]=Vee(this.classifier,s[d],h,t,i,l,n)}return SL.length=0,xL.length=0,c}}}}function Wee(r,e,t,i,n,s,o){if(n===-1)return null;const a=t.length;if(a<=1)return null;const l=e.breakOffsets,c=e.breakOffsetsVisibleColumn,d=k8(t,i,n,s,o),u=n-d;let h=SL,f=xL,g=0,p=0,_=0,v=n;const b=l.length;let C=0;if(C>=0){let y=Math.abs(c[C]-v);for(;C+1<b;){const E=Math.abs(c[C+1]-v);if(E>=y)break;y=E,C++}}for(;C<b;){let y=C<0?0:l[C],E=C<0?0:c[C];p>y&&(y=p,E=_);let S=0,w=0,x=0,D=0;if(E<=v){let B=E,z=y===0?0:t.charCodeAt(y-1),j=y===0?0:r.get(z),re=!0;for(let te=y;te<a;te++){const N=te,L=t.charCodeAt(te);let O,W;if(qi(L)?(te++,O=0,W=2):(O=r.get(L),W=tm(L,B,i,s)),N>p&&EL(z,j,L,O)&&(S=N,w=B),B+=W,B>v){N>p?(x=N,D=B-W):(x=te+1,D=B),B-w>u&&(S=0),re=!1;break}z=L,j=O}if(re){g>0&&(h[g]=l[l.length-1],f[g]=c[l.length-1],g++);break}}if(S===0){let B=E,z=t.charCodeAt(y),j=r.get(z),re=!1;for(let te=y-1;te>=p;te--){const N=te+1,L=t.charCodeAt(te);if(L===9){re=!0;break}let O,W;if(Mf(L)?(te--,O=0,W=2):(O=r.get(L),W=no(L)?s:1),B<=v){if(x===0&&(x=N,D=B),B<=v-u)break;if(EL(L,O,z,j)){S=N,w=B;break}}B-=W,z=L,j=O}if(S!==0){const te=u-(D-w);if(te<=i){const N=t.charCodeAt(x);let L;qi(N)?L=2:L=tm(N,D,i,s),te-L<0&&(S=0)}}if(re){C--;continue}}if(S===0&&(S=x,w=D),S<=p){const B=t.charCodeAt(p);qi(B)?(S=p+2,w=_+2):(S=p+1,w=_+tm(B,_,i,s))}for(p=S,h[g]=S,_=w,f[g]=w,g++,v=w+u;C<0||C<b&&c[C]<w;)C++;let M=Math.abs(c[C]-v);for(;C+1<b;){const B=Math.abs(c[C+1]-v);if(B>=M)break;M=B,C++}}return g===0?null:(h.length=g,f.length=g,SL=e.breakOffsets,xL=e.breakOffsetsVisibleColumn,e.breakOffsets=h,e.breakOffsetsVisibleColumn=f,e.wrappedTextIndentLength=d,e)}function Vee(r,e,t,i,n,s,o){const a=fo.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(w=>w.options),c=t.map(w=>w.column-1)):(l=null,c=null),n===-1)return l?new Hp([a.length],[],0,c,l):null;const d=a.length;if(d<=1)return l?new Hp([a.length],[],0,c,l):null;const u=k8(a,i,n,s,o),h=n-u;let f=[],g=[],p=0,_=0,v=0,b=n,C=a.charCodeAt(0),y=r.get(C),E=tm(C,0,i,s),S=1;qi(C)&&(E+=1,C=a.charCodeAt(1),y=r.get(C),S++);for(let w=S;w<d;w++){const x=w,D=a.charCodeAt(w);let M,B;qi(D)?(w++,M=0,B=2):(M=r.get(D),B=tm(D,E,i,s)),EL(C,y,D,M)&&(_=x,v=E),E+=B,E>b&&((_===0||E-v>h)&&(_=x,v=E-B),f[p]=_,g[p]=v,p++,b=v+h,_=0),C=D,y=M}return p===0&&(!t||t.length===0)?null:(f[p]=d,g[p]=E,new Hp(f,g,u,c,l))}function tm(r,e,t,i){return r===9?t-e%t:no(r)||r<32?i:1}function VM(r,e){return e-r%e}function EL(r,e,t,i){return t!==32&&(e===2||e===3&&i!==2||i===1||i===3&&e!==1)}function k8(r,e,t,i,n){let s=0;if(n!==0){const o=pr(r);if(o!==-1){for(let l=0;l<o;l++)s+=r.charCodeAt(l)===9?VM(s,e):1;const a=n===3?2:n===2?1:0;for(let l=0;l<a;l++)s+=VM(s,e);s+i>t&&(s=0)}}return s}var ex;const tx=(ex=window.trustedTypes)===null||ex===void 0?void 0:ex.createPolicy("domLineBreaksComputer",{createHTML:r=>r});class WA{static create(){return new WA}constructor(){}createLineBreaksComputer(e,t,i,n){t=t|0,i=+i;let s=[],o=[];return{addRequest:(a,l,c)=>{s.push(a),o.push(l)},finalize:()=>Hee(s,e,t,i,n,o)}}}function Hee(r,e,t,i,n,s){var o;function a(E){const S=s[E];if(S){const w=fo.applyInjectedText(r[E],S),x=S.map(M=>M.options),D=S.map(M=>M.column-1);return new Hp([w.length],[],0,D,x)}else return null}if(i===-1){const E=[];for(let S=0,w=r.length;S<w;S++)E[S]=a(S);return E}const l=Math.round(i*e.typicalHalfwidthCharacterWidth);(n===2||n===3)&&(n=1);const c=document.createElement("div");Ln.applyFontInfoSlow(c,e);const d=eu(1e4),u=[],h=[],f=[],g=[],p=[];for(let E=0;E<r.length;E++){const S=fo.applyInjectedText(r[E],s[E]);let w=0,x=0,D=l;if(n!==0)if(w=pr(S),w===-1)w=0;else{for(let j=0;j<w;j++)x+=S.charCodeAt(j)===9?t-x%t:1;const z=Math.ceil(e.spaceWidth*x);z+e.typicalFullwidthCharacterWidth>l?(w=0,x=0):D=l-z}const M=S.substr(w),B=$ee(M,x,t,D,d);u[E]=w,h[E]=x,f[E]=M,g[E]=B[0],p[E]=B[1]}const _=d.build(),v=(o=tx==null?void 0:tx.createHTML(_))!==null&&o!==void 0?o:_;c.innerHTML=v,c.style.position="absolute",c.style.top="10000",c.style.wordWrap="break-word",document.body.appendChild(c);let b=document.createRange();const C=Array.prototype.slice.call(c.children,0);let y=[];for(let E=0;E<r.length;E++){const S=C[E],w=Uee(b,S,f[E],g[E]);if(w===null){y[E]=a(E);continue}const x=u[E],D=h[E],M=p[E],B=[];for(let te=0,N=w.length;te<N;te++)B[te]=M[w[te]];if(x!==0)for(let te=0,N=w.length;te<N;te++)w[te]+=x;let z,j;const re=s[E];re?(z=re.map(te=>te.options),j=re.map(te=>te.column-1)):(z=null,j=null),y[E]=new Hp(w,B,D,j,z)}return document.body.removeChild(c),y}function $ee(r,e,t,i,n){n.appendASCIIString('<div style="width:'),n.appendASCIIString(String(i)),n.appendASCIIString('px;">');const s=r.length;let o=e,a=0,l=[],c=[],d=0<s?r.charCodeAt(0):0;n.appendASCIIString("<span>");for(let u=0;u<s;u++){u!==0&&u%16384===0&&n.appendASCIIString("</span><span>"),l[u]=a,c[u]=o;const h=d;d=u+1<s?r.charCodeAt(u+1):0;let f=1,g=1;switch(h){case 9:f=t-o%t,g=f;for(let p=1;p<=f;p++)p<f?n.write1(160):n.appendASCII(32);break;case 32:d===32?n.write1(160):n.appendASCII(32);break;case 60:n.appendASCIIString("<");break;case 62:n.appendASCIIString(">");break;case 38:n.appendASCIIString("&");break;case 0:n.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:n.write1(65533);break;default:no(h)&&g++,h<32?n.write1(9216+h):n.write1(h)}a+=f,o+=g}return n.appendASCIIString("</span>"),l[r.length]=a,c[r.length]=o,n.appendASCIIString("</div>"),[l,c]}function Uee(r,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{kL(r,n,i,0,null,t.length-1,null,s)}catch(o){return console.log(o),null}return s.length===0?null:(s.push(t.length),s)}function kL(r,e,t,i,n,s,o,a){if(i===s||(n=n||ix(r,e,t[i],t[i+1]),o=o||ix(r,e,t[s],t[s+1]),Math.abs(n[0].top-o[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,c=ix(r,e,t[l],t[l+1]);kL(r,e,t,i,n,l,c,a),kL(r,e,t,l,c,s,o,a)}function ix(r,e,t,i){return r.setStart(e[t/16384|0].firstChild,t%16384),r.setEnd(e[i/16384|0].firstChild,i%16384),r.getClientRects()}var zee=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jc=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let jee=0;class qee{constructor(e,t,i,n,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){ft(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Gm=class aC extends Z{constructor(e,t,i,n,s,o,a,l,c,d){super();this._onDidDispose=this._register(new H),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new H),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new H),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new H),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new H),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new H),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new H),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new H),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new H),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new H),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new H),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new H),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new HM),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new HM),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new H),this.onWillType=this._onWillType.event,this._onDidType=this._register(new H),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new H),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new H),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new H),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new H),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new H),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new H),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new H),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new H),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new H),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new H),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new H),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new H),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new H),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new H),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new H),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new H),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const u=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=u.overflowWidgetsDomNode,delete u.overflowWidgetsDomNode,this._id=++jee,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(u,d)),this._register(this._configuration.onDidChange(f=>{this._onDidChangeConfiguration.fire(f);const g=this._configuration.options;if(f.hasChanged(129)){const p=g.get(129);this._onDidLayoutChange.fire(p)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=s,this._commandService=o,this._themeService=l,this._register(new Gee(this,this._contextKeyService)),this._register(new Kee(this,this._contextKeyService)),this._instantiationService=n.createChild(new qm([Be,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new Yee(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let h;Array.isArray(i.contributions)?h=i.contributions:h=_f.getEditorContributions();for(const f of h){if(this._contributions[f.id]){Fe(new Error(`Cannot have two contributions with the same id ${f.id}`));continue}try{const g=this._instantiationService.createInstance(f.ctor,this);this._contributions[f.id]=g}catch(g){Fe(g)}}_f.getEditorActions().forEach(f=>{if(this._actions[f.id]){Fe(new Error(`Cannot have two actions with the same id ${f.id}`));return}const g=new S8(f.id,f.label,f.alias,Ar(f.precondition),()=>this._instantiationService.invokeFunction(p=>Promise.resolve(f.runEditorCommand(p,this,null))),this._contextKeyService);this._actions[g.id]=g}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new Ln(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return q_.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const n=e[t];this._contributions[n].dispose()}this._contributions={},this._actions={},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?ut.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===` +`?i=1:e&&e.lineEnding&&e.lineEnding===`\r +`&&(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(this._modelData===null&&t===null||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)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let 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 _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber)}getTopForLineNumber(e){return this._modelData?aC._getVerticalOffsetForPosition(this._modelData,e,1):-1}getTopForPosition(e,t){return this._modelData?aC._getVerticalOffsetForPosition(this._modelData,e,t):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(t=>k.lift(t)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Pt.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(!!this._modelData){if(!U.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!k.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(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(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(!U.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new k(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){const t=_e.isISelection(e),i=k.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const n={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(n)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new _e(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}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(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(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(!k.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(k.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(!!this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n<s;n++)if(!_e.isISelection(e[n]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(!!this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(!!this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){!this._modelData||this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const s of t){const o=this._contributions[s];typeof o.saveViewState=="function"&&(e[s]=o.saveViewState())}const i=this._modelData.viewModel.saveCursorState(),n=this._modelData.viewModel.saveState();return{cursorState:i,viewState:n,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const i=t.cursorState;Array.isArray(i)?this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]);const n=t.contributionsState||{},s=Object.keys(this._contributions);for(let a=0,l=s.length;a<l;a++){const c=s[a],d=this._contributions[c];typeof d.restoreViewState=="function"&&d.restoreViewState(n[c])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._actions[s])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run()).then(void 0,Fe);return}!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||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&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||t.length===0)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const a=this._modelData.viewModel.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new k(o.lineNumber,o.column,a.lineNumber,a.column),mode:s})}_cut(e){!this._modelData||this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=_f.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,Fe)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(80))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>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)}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,rD(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(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(129)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1: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 i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}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 i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(129),s=aC._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),o=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:o,height:i.get(58)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}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){Ln.applyFontInfoSlow(e,this._configuration.options.get(43))}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new Fee(this._id,this._configuration,e,WA.create(),BA.create(this._configuration.options),o=>oa(o));t.push(e.onDidChangeDecorations(o=>this._onDidChangeModelDecorations.fire(o))),t.push(e.onDidChangeLanguage(o=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(o)})),t.push(e.onDidChangeLanguageConfiguration(o=>this._onDidChangeModelLanguageConfiguration.fire(o))),t.push(e.onDidChangeContent(o=>this._onDidChangeModelContent.fire(o))),t.push(e.onDidChangeOptions(o=>this._onDidChangeModelOptions.fire(o))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(o=>{switch(o.kind){case 0:this._onDidContentSizeChange.fire(o);break;case 1:this._editorTextFocus.setValue(o.hasFocus);break;case 2:this._onDidScrollChange.fire(o);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{o.reachedMaxCursorCount&&this._notificationService.warn(m("cursors.maximum","The number of cursors has been limited to {0}.",jf.MAX_CURSOR_COUNT));const a=[];for(let d=0,u=o.selections.length;d<u;d++)a[d]=o.selections[d].getPosition();const l={position:a[0],secondaryPositions:a.slice(1),reason:o.reason,source:o.source};this._onDidChangeCursorPosition.fire(l);const c={selection:o.selections[0],secondarySelections:o.selections.slice(1),modelVersionId:o.modelVersionId,oldSelections:o.oldSelections,oldModelVersionId:o.oldModelVersionId,source:o.source,reason:o.reason};this._onDidChangeCursorSelection.fire(c);break}}}));const[n,s]=this._createView(i);if(s){this._domElement.appendChild(n.domNode.domNode);let o=Object.keys(this._contentWidgets);for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addContentWidget(this._contentWidgets[c])}o=Object.keys(this._overlayWidgets);for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addOverlayWidget(this._overlayWidgets[c])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new qee(e,i,n,s,t)}_createView(e){let t;this.isSimpleWidget?t={paste:(s,o,a,l)=>{this._paste("keyboard",s,o,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,o,a,l)=>{this._compositionType("keyboard",s,o,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,o,a,l)=>{const c={text:s,pasteOnNewLine:o,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{const o={text:s};this._commandService.executeCommand("type",o)},compositionType:(s,o,a,l)=>{if(a||l){const c={text:s,replacePrevCharCnt:o,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:s,replaceCharCnt:o};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new T0(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new ree(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){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),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}};Gm=zee([Jc(3,gt),Jc(4,Ct),Jc(5,pi),Jc(6,Be),Jc(7,Gt),Jc(8,ki),Jc(9,Cr)],Gm);class HM extends Z{constructor(){super();this._onDidChangeToTrue=this._register(new H),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new H),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class Gee extends Z{constructor(e,t){super();this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=R.editorSimpleInput.bindTo(t),this._editorFocus=R.focus.bindTo(t),this._textInputFocus=R.textInputFocus.bindTo(t),this._editorTextFocus=R.editorTextFocus.bindTo(t),this._editorTabMovesFocus=R.tabMovesFocus.bindTo(t),this._editorReadonly=R.readOnly.bindTo(t),this._inDiffEditor=R.inDiffEditor.bindTo(t),this._editorColumnSelection=R.columnSelection.bindTo(t),this._hasMultipleSelections=R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=R.hasNonEmptySelection.bindTo(t),this._canUndo=R.canUndo.bindTo(t),this._canRedo=R.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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(128)),this._editorReadonly.set(e.get(80)),this._inDiffEditor.set(e.get(53)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.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 Kee extends Z{constructor(e,t){super();this._editor=e,this._contextKeyService=t,this._langId=R.languageId.bindTo(t),this._hasCompletionItemProvider=R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=R.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(Zs.onDidChange(i)),this._register(ia.onDidChange(i)),this._register(za.onDidChange(i)),this._register(xm.onDidChange(i)),this._register(JC.onDidChange(i)),this._register(ew.onDidChange(i)),this._register(tw.onDidChange(i)),this._register(Sm.onDidChange(i)),this._register(Pf.onDidChange(i)),this._register(Es.onDidChange(i)),this._register(ZC.onDidChange(i)),this._register(XC.onDidChange(i)),this._register(Bp.onDidChange(i)),this._register(Xs.onDidChange(i)),this._register(Fd.onDidChange(i)),this._register(Zl.onDidChange(i)),i()}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();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(Zs.has(e)),this._hasCodeActionsProvider.set(ia.has(e)),this._hasCodeLensProvider.set(za.has(e)),this._hasDefinitionProvider.set(xm.has(e)),this._hasDeclarationProvider.set(JC.has(e)),this._hasImplementationProvider.set(ew.has(e)),this._hasTypeDefinitionProvider.set(tw.has(e)),this._hasHoverProvider.set(Sm.has(e)),this._hasDocumentHighlightProvider.set(Pf.has(e)),this._hasDocumentSymbolProvider.set(Es.has(e)),this._hasReferenceProvider.set(ZC.has(e)),this._hasRenameProvider.set(XC.has(e)),this._hasSignatureHelpProvider.set(Fd.has(e)),this._hasInlayHintsProvider.set(Zl.has(e)),this._hasDocumentFormattingProvider.set(Bp.has(e)||Xs.has(e)),this._hasDocumentSelectionFormattingProvider.set(Xs.has(e)),this._hasMultipleDocumentFormattingProvider.set(Bp.all(e).length+Xs.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(Xs.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Ye.walkThroughSnippet)})}}class Yee extends Z{constructor(e){super();this._onChange=this._register(new H),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Rf(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}}const Zee=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),Xee=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function nx(r){return Zee+encodeURIComponent(r.toString())+Xee}const Qee=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),Jee=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function ete(r){return Qee+encodeURIComponent(r.toString())+Jee}Et((r,e)=>{const t=r.getColor($W);t&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${t}; }`);const i=r.getColor(Xp);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${nx(i)}") repeat-x bottom left; }`);const n=r.getColor(_Z);n&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${n}; }`);const s=r.getColor(y0);s&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const o=r.getColor(il);o&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${nx(o)}") repeat-x bottom left; }`);const a=r.getColor(bZ);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=r.getColor(bA);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=r.getColor(so);c&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${nx(c)}") repeat-x bottom left; }`);const d=r.getColor(vZ);d&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${d}; }`);const u=r.getColor(wZ);u&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${u}; }`);const h=r.getColor(CZ);h&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${ete(h)}") no-repeat bottom left; }`);const f=r.getColor(ZX);f&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${f.rgba.a}; }`);const g=r.getColor(YX);g&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${g}; }`);const p=r.getColor(lc)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)});class Mt{constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new H({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function $M(r){return r.preventDefault(),r.stopPropagation(),r}var Eg=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};let tte=!1;var Uw;(function(r){r.North="north",r.South="south",r.East="east",r.West="west"})(Uw||(Uw={}));let ite=4;const nte=new H;let rte=300;const ste=new H;class VA{constructor(){this.disposables=new ue}get onPointerMove(){return this.disposables.add(new Mt(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Mt(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Eg([Li],VA.prototype,"onPointerMove",null);Eg([Li],VA.prototype,"onPointerUp",null);class HA{constructor(e){this.el=e,this.disposables=new ue}get onPointerMove(){return this.disposables.add(new Mt(this.el,Vt.Change)).event}get onPointerUp(){return this.disposables.add(new Mt(this.el,Vt.End)).event}dispose(){this.disposables.dispose()}}Eg([Li],HA.prototype,"onPointerMove",null);Eg([Li],HA.prototype,"onPointerUp",null);class zw{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Eg([Li],zw.prototype,"onPointerMove",null);Eg([Li],zw.prototype,"onPointerUp",null);class _n extends Z{constructor(e,t,i){super();this.hoverDelay=rte,this.hoverDelayer=this._register(new cl(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new H),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new H),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new H),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new H),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new ue),this.orthogonalStartDragHandleDisposables=this._register(new ue),this.orthogonalEndSashDisposables=this._register(new ue),this.orthogonalEndDragHandleDisposables=this._register(new ue),this.el=X(e,oe(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),tt&&this.el.classList.add("mac");const n=this._register(new Mt(this.el,"mousedown")).event;this._register(n(u=>this.onPointerStart(u,new VA),this));const s=this._register(new Mt(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const o=this._register(new Mt(this.el,"mouseenter")).event;this._register(o(()=>_n.onMouseEnter(this)));const a=this._register(new Mt(this.el,"mouseleave")).event;this._register(a(()=>_n.onMouseLeave(this))),this._register(Lt.addTarget(this.el));const l=ke.map(this._register(new Mt(this.el,Vt.Start)).event,u=>{var h;return Object.assign(Object.assign({},u),{target:(h=u.initialTarget)!==null&&h!==void 0?h:null})});this._register(l(u=>this.onPointerStart(u,new HA(this.el)),this));const c=this._register(new Mt(this.el,Vt.Tap)).event,d=ke.map(ke.filter(ke.debounce(c,(u,h)=>{var f;return{event:h,count:((f=u==null?void 0:u.count)!==null&&f!==void 0?f:0)+1}},250),({count:u})=>u===2),({event:u})=>{var h;return Object.assign(Object.assign({},u),{target:(h=u.initialTarget)!==null&&h!==void 0?h:null})});this._register(d(this.onPointerDoublePress,this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=ite,this._register(nte.event(u=>{this.size=u,this.layout()}))),this._register(ste.event(u=>this.hoverDelay=u)),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(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",tte),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=X(this.el,oe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Xe(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Mt(this._orthogonalStartDragHandle,"mouseenter")).event(()=>_n.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Mt(this._orthogonalStartDragHandle,"mouseleave")).event(()=>_n.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=X(this.el,oe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Xe(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Mt(this._orthogonalEndDragHandle,"mouseenter")).event(()=>_n.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Mt(this._orthogonalEndDragHandle,"mouseleave")).event(()=>_n.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){xt.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const g=this.getOrthogonalSash(e);g&&(i=!0,e.__orthogonalSashEvent=!0,g.onPointerStart(e,new zw(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new zw(t))),!this.state)return;const n=mj("iframe");for(const g of n)g.style.pointerEvents="none";const s=e.pageX,o=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:o,currentY:o,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Pr(this.el),d=()=>{let g="";i?g="all-scroll":this.orientation===1?this.state===1?g="s-resize":this.state===2?g="n-resize":g=tt?"row-resize":"ns-resize":this.state===1?g="e-resize":this.state===2?g="w-resize":g=tt?"col-resize":"ew-resize",c.textContent=`* { cursor: ${g} !important; }`},u=new ue;d(),i||this.onDidEnablementChange(d,null,u);const h=g=>{xt.stop(g,!1);const p={startX:s,currentX:g.pageX,startY:o,currentY:g.pageY,altKey:a};this._onDidChange.fire(p)},f=g=>{xt.stop(g,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(const p of n)p.style.pointerEvents="auto"};t.onPointerMove(h,null,u),t.onPointerUp(f,null,u),u.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&&_n.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&_n.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){_n.onMouseLeave(this)}layout(){if(this.orientation===0){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")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class Vl{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const L8=[];function Hu(r,e,t){e instanceof Vl||(e=new Vl(e,[],t)),L8.push([r,e])}function ote(){return L8}const $A=bt("IEditorCancelService"),T8=new xe("cancellableOperation",!1,m("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));Hu($A,class{constructor(){this._tokens=new WeakMap}add(r,e){let t=this._tokens.get(r);t||(t=r.invokeWithinContext(n=>{const s=T8.bindTo(n.get(Be)),o=new Dr;return{key:s,tokens:o}}),this._tokens.set(r,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(r){const e=this._tokens.get(r);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},!0);class ate extends Hn{constructor(e,t){super(t);this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get($A).add(e,this))}dispose(){this._unregister(),super.dispose()}}fe(new class extends dn{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:T8})}runEditorCommand(r,e){r.get($A).cancel(e)}});class Km{constructor(e,t){if(this.flags=t,(this.flags&1)!==0){const i=e.getModel();this.modelVersionId=i?bn("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!==0?this.position=e.getPosition():this.position=null,(this.flags&2)!==0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!==0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof Km))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 Km(e,this.flags))}}class Ym extends ate{constructor(e,t,i,n){super(e,n);this._listener=new ue,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!k.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!k.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class UA extends Hn{constructor(e,t){super(t);this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class xc{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(e.getScrollTop()!==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 xc(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){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)}}const I8={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:ws.text,TERMINALS:"Terminals"};class lte{constructor(e){this.data=e}update(){}getData(){return this.data}}const Ra={CurrentDragAndDropData:void 0};class qd extends Z{constructor(e,t,i={}){super();this.options=i,this._context=e||this,this._action=t,t instanceof Ts&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new Vf)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Lt.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Bn&&this._register(J(e,Te.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(I8.TEXT,this._action.label)}))),this._register(J(t,Vt.Tap,n=>this.onClick(n,!0))),this._register(J(t,Te.MOUSE_DOWN,n=>{i||xt.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),tt&&this._register(J(t,Te.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(J(t,Te.CLICK,n=>{xt.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(J(t,Te.DBLCLICK,n=>{xt.stop(n,!0)})),[Te.MOUSE_UP,Te.MOUSE_OUT].forEach(n=>{this._register(J(t,n,s=>{xt.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;xt.stop(e,!0);const n=qr(this._context)?!((i=this.options)===null||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(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class Zm extends qd{constructor(e,t,i={}){super(e,t,i);this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=X(this.element,oe("a.action-label"))),this.label&&(this._action.id===Is.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(X(this.element,oe("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}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.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var cte=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class fl extends Z{constructor(e,t={}){var i,n,s,o,a,l;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new H),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new H({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new H),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new H),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(o=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&o!==void 0?o:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new Vf,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._register(this._actionRunner.onBeforeRun(u=>this._onBeforeRun.fire(u))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,d;switch(this._orientation){case 0:c=[15],d=[17];break;case 1:c=[16],d=[18],this.domNode.className+=" vertical";break}this._register(J(this.domNode,Te.KEY_DOWN,u=>{const h=new ei(u);let f=!0;const g=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(h.equals(c[0])||h.equals(c[1]))?f=this.focusPrevious():d&&(h.equals(d[0])||h.equals(d[1]))?f=this.focusNext():h.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():h.equals(14)?f=this.focusFirst():h.equals(13)?f=this.focusLast():h.equals(2)&&g instanceof qd&&g.trapsArrowNavigation?f=this.focusNext():this.isTriggerKeyEvent(h)?this._triggerKeys.keyDown?this.doTrigger(h):this.triggerKeyDown=!0:f=!1,f&&(h.preventDefault(),h.stopPropagation())})),this._register(J(this.domNode,Te.KEY_UP,u=>{const h=new ei(u);this.isTriggerKeyEvent(h)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(h)),h.preventDefault(),h.stopPropagation()):(h.equals(2)||h.equals(1026))&&this.updateFocusedItem()})),this.focusTracker=this._register(Rf(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(uf()===this.domNode||!Qo(uf(),this.domNode))&&(this._onDidBlur.fire(),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.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(Qo(uf(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=Jd(t.index)?t.index:null;i.forEach(s=>{const o=document.createElement("li");o.className="action-item",o.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(J(o,Te.CONTEXT_MENU,l=>{xt.stop(l,!0)}));let a;this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s)),a||(a=new Zm(this.context,s,t)),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(o),this.focusable&&a instanceof qd&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(o),this.viewItems.push(a),this._actionIds.push(s.id)):(this.actionsList.insertBefore(o,this.actionsList.children[n]),this.viewItems.splice(n,0,a),this._actionIds.splice(n,0,s.id),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){ft(this.viewItems),this.viewItems=[],this._actionIds=[],Ki(this.actionsList)}length(){return this.viewItems.length}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem=="undefined"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus()}else i!==void 0&&(this.focusedItem=i),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:t});for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],s=n;if(i===this.focusedItem){let o=!0;Fp(s.focus)||(o=!1),this.options.focusOnlyEnabledItems&&Fp(n.isEnabled)&&!n.isEnabled()&&(o=!1),o?s.focus(e):this.actionsList.focus({preventScroll:t})}else Fp(s.blur)&&s.blur()}}doTrigger(e){if(typeof this.focusedItem=="undefined")return;const t=this.viewItems[this.focusedItem];if(t instanceof qd){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}run(e,t){return cte(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){ft(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const dte={IconContribution:"base.contributions.icons"};class ute{constructor(){this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:m("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:m("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${hr.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 l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}let o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;let a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,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}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(s,o)=>s.id.localeCompare(o.id),t=s=>{for(;qt.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(o=>!!o.description).sort(e))i.push(`|<i class="${t(s)}"></i>|${s.id}|${qt.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(o=>!qt.isThemeIcon(o.defaults)).sort(e))i.push(`|<i class="${t(s)}"></i>|${s.id}|`);return i.join(` +`)}}const cu=new ute;_i.add(dte.IconContribution,cu);function un(r,e,t,i){return cu.registerIcon(r,e,t,i)}function hte(){return cu}function fte(){for(const r of KC.all)cu.registerIcon(r.id,r.definition,r.description);KC.onDidRegister(r=>cu.registerIcon(r.id,r.definition,r.description))}fte();const D8="vscode://schemas/icons";let A8=_i.as(s0.JSONContribution);A8.registerSchema(D8,cu.getIconSchema());const UM=new $t(()=>A8.notifySchemaChanged(D8),200);cu.onDidChange(()=>{UM.isScheduled()||UM.schedule()});const gte=un("widget-close",be.close,m("widgetClose","Icon for the close action in widgets."));var pte=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},rx;const Xb=3;class Qg{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class sx{constructor(e){this.entries=e}}const mte=un("diff-review-insert",be.add,m("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),_te=un("diff-review-remove",be.remove,m("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),bte=un("diff-review-close",be.close,m("diffReviewCloseIcon","Icon for 'Close' in diff review."));class Va extends Z{constructor(e){super();this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=ht(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=ht(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new fl(this.actionBarContainer.domNode)),this._actionBar.push(new Ts("diffreview.close",m("label.close","Close"),"close-diff-review "+qt.asClassName(bte),!0,()=>pte(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=ht(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=ht(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new Q_(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(Ei(this.domNode.domNode,"click",t=>{t.preventDefault();let i=s3(t.target,"diff-review-row");i&&this._goToRow(i)})),this._register(Ei(this.domNode.domNode,"keydown",t=>{(t.equals(18)||t.equals(2066)||t.equals(530))&&(t.preventDefault(),this._goToRow(this._getNextRow())),(t.equals(16)||t.equals(2064)||t.equals(528))&&(t.preventDefault(),this._goToRow(this._getPrevRow())),(t.equals(9)||t.equals(2057)||t.equals(521)||t.equals(1033))&&(t.preventDefault(),this.hide()),(t.equals(10)||t.equals(3))&&(t.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=this._diffs.length+i-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new U(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=i+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new U(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),e!==-1&&(this._diffEditor.setPosition(new U(e,1)),this._diffEditor.revealPosition(new U(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||e.length===0)return[];const t=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return!t||!i?[]:Va._mergeAdjacent(e,t.getLineCount(),i.getLineCount())}static _mergeAdjacent(e,t,i){if(!e||e.length===0)return[];let n=[],s=0;for(let c=0,d=e.length;c<d;c++){const u=e[c],h=u.originalStartLineNumber,f=u.originalEndLineNumber,g=u.modifiedStartLineNumber,p=u.modifiedEndLineNumber;let _=[],v=0;{const b=f===0?h:h-1,C=p===0?g:g-1;let y=1,E=1;if(c>0){const x=e[c-1];x.originalEndLineNumber===0?y=x.originalStartLineNumber+1:y=x.originalEndLineNumber+1,x.modifiedEndLineNumber===0?E=x.modifiedStartLineNumber+1:E=x.modifiedEndLineNumber+1}let S=b-Xb+1,w=C-Xb+1;if(S<y){const x=y-S;S=S+x,w=w+x}if(w<E){const x=E-w;S=S+x,w=w+x}_[v++]=new Qg(S,b,w,C)}f!==0&&(_[v++]=new Qg(h,f,0,0)),p!==0&&(_[v++]=new Qg(0,0,g,p));{const b=f===0?h+1:f+1,C=p===0?g+1:p+1;let y=t,E=i;if(c+1<d){const x=e[c+1];x.originalEndLineNumber===0?y=x.originalStartLineNumber:y=x.originalStartLineNumber-1,x.modifiedEndLineNumber===0?E=x.modifiedStartLineNumber:E=x.modifiedStartLineNumber-1}let S=b+Xb-1,w=C+Xb-1;if(S>y){const x=y-S;S=S+x,w=w+x}if(w>E){const x=E-w;S=S+x,w=w+x}_[v++]=new Qg(b,S,C,w)}n[s++]=new sx(_)}let o=n[0].entries,a=[],l=0;for(let c=1,d=n.length;c<d;c++){const u=n[c].entries,h=o[o.length-1],f=u[0];if(h.getType()===0&&f.getType()===0&&f.originalLineStart<=h.originalLineEnd){o[o.length-1]=new Qg(h.originalLineStart,f.originalLineEnd,h.modifiedLineStart,f.modifiedLineEnd),o=o.concat(u.slice(1));continue}a[l++]=new sx(o),o=u}return a[l++]=new sx(o),a}_findDiffIndex(e){const t=e.lineNumber;for(let i=0,n=this._diffs.length;i<n;i++){const s=this._diffs[i].entries,o=s[s.length-1].modifiedLineEnd;if(t<=o)return i}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel(),s=i.getOptions(),o=n.getOptions();if(!this._isVisible||!i||!n){Ki(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries;let c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),c.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Ln.applyFontInfoSlow(c,t.get(43));let d=0,u=0,h=0,f=0;for(let w=0,x=l.length;w<x;w++){const D=l[w],M=D.originalLineStart,B=D.originalLineEnd,z=D.modifiedLineStart,j=D.modifiedLineEnd;M!==0&&(d===0||M<d)&&(d=M),B!==0&&(u===0||B>u)&&(u=B),z!==0&&(h===0||z<h)&&(h=z),j!==0&&(f===0||j>f)&&(f=j)}let g=document.createElement("div");g.className="diff-review-row";let p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const _=u-d+1,v=f-h+1;p.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${d},${_} +${h},${v} @@`)),g.setAttribute("data-line",String(h));const b=w=>w===0?m("no_lines_changed","no lines changed"):w===1?m("one_line_changed","1 line changed"):m("more_lines_changed","{0} lines changed",w),C=b(_),y=b(v);g.setAttribute("aria-label",m({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,d,C,h,y)),g.appendChild(p),g.setAttribute("role","listitem"),c.appendChild(g);const E=t.get(58);let S=h;for(let w=0,x=l.length;w<x;w++){const D=l[w];Va._renderSection(c,D,S,E,this._width,e,i,s,t,n,o),D.modifiedLineStart!==0&&(S=D.modifiedLineEnd)}Ki(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}static _renderSection(e,t,i,n,s,o,a,l,c,d,u){const h=t.getType();let f="diff-review-row",g="";const p="diff-review-spacer";let _=null;switch(h){case 1:f="diff-review-row line-insert",g=" char-insert",_=mte;break;case 2:f="diff-review-row line-delete",g=" char-delete",_=_te;break}const v=t.originalLineStart,b=t.originalLineEnd,C=t.modifiedLineStart,y=t.modifiedLineEnd,E=Math.max(y-C,b-v),S=o.get(129),w=S.glyphMarginWidth+S.lineNumbersWidth,x=c.get(129),D=10+x.glyphMarginWidth+x.lineNumbersWidth;for(let M=0;M<=E;M++){const B=v===0?0:v+M,z=C===0?0:C+M,j=document.createElement("div");j.style.minWidth=s+"px",j.className=f,j.setAttribute("role","listitem"),z!==0&&(i=z),j.setAttribute("data-line",String(i));let re=document.createElement("div");re.className="diff-review-cell",re.style.height=`${n}px`,j.appendChild(re);const te=document.createElement("span");te.style.width=w+"px",te.style.minWidth=w+"px",te.className="diff-review-line-number"+g,B!==0?te.appendChild(document.createTextNode(String(B))):te.innerText="\xA0",re.appendChild(te);const N=document.createElement("span");N.style.width=D+"px",N.style.minWidth=D+"px",N.style.paddingRight="10px",N.className="diff-review-line-number"+g,z!==0?N.appendChild(document.createTextNode(String(z))):N.innerText="\xA0",re.appendChild(N);const L=document.createElement("span");if(L.className=p,_){const ge=document.createElement("span");ge.className=qt.asClassName(_),ge.innerText="\xA0\xA0",L.appendChild(ge)}else L.innerText="\xA0\xA0";re.appendChild(L);let O;if(z!==0){let ge=this._renderLine(d,c,u.tabSize,z);Va._ttPolicy&&(ge=Va._ttPolicy.createHTML(ge)),re.insertAdjacentHTML("beforeend",ge),O=d.getLineContent(z)}else{let ge=this._renderLine(a,o,l.tabSize,B);Va._ttPolicy&&(ge=Va._ttPolicy.createHTML(ge)),re.insertAdjacentHTML("beforeend",ge),O=a.getLineContent(B)}O.length===0&&(O=m("blankLine","blank"));let W="";switch(h){case 0:B===z?W=m({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",O,B):W=m("equalLine","{0} original line {1} modified line {2}",O,B,z);break;case 1:W=m("insertLine","+ {0} modified line {1}",O,z);break;case 2:W=m("deleteLine","- {0} original line {1}",O,B);break}j.setAttribute("aria-label",W),e.appendChild(j)}}static _renderLine(e,t,i,n){const s=e.getLineContent(n),o=t.get(43),a=Gi.createEmpty(s),l=Br.isBasicASCII(s,e.mightContainNonBasicASCII()),c=Br.containsRTL(s,l,e.mightContainRTL());return i0(new Mu(o.isMonospace&&!t.get(29),o.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,a,[],i,0,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,t.get(104),t.get(87),t.get(82),t.get(44)!==Lr.OFF,null)).html}}Va._ttPolicy=(rx=window.trustedTypes)===null||rx===void 0?void 0:rx.createPolicy("diffReview",{createHTML:r=>r});Et((r,e)=>{const t=r.getColor(QW);t&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${t}; }`);const i=r.getColor(w0);i&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class vte extends Se{constructor(){super({id:"editor.action.diffReview.next",label:m("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:me.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=N8(e);i&&i.diffReviewNext()}}class Cte extends Se{constructor(){super({id:"editor.action.diffReview.prev",label:m("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:me.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1089,weight:100}})}run(e,t){const i=N8(e);i&&i.diffReviewPrev()}}function N8(r){const e=r.get(Ct),t=e.listDiffEditors(),i=e.getActiveCodeEditor();if(!i)return null;for(let n=0,s=t.length;n<s;n++){const o=t[n];if(o.getModifiedEditor().getId()===i.getId()||o.getOriginalEditor().getId()===i.getId())return o}return null}pe(vte);pe(Cte);const Vc=bt("contextViewService"),Hc=bt("contextMenuService");var ox=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class wte extends Z{constructor(e,t,i,n,s,o){super();this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=s,this._clipboardService=o,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=be.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const a=i.getOption(58),l=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${a}px`,this._diffActions.style.lineHeight=`${a}px`,this._marginDomNode.appendChild(this._diffActions);const c=[];c.push(new Ts("diff.clipboard.copyDeletedContent",n.originalEndLineNumber>n.modifiedStartLineNumber?m("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):m("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>ox(this,void 0,void 0,function*(){const g=new k(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),p=n.originalModel.getValueInRange(g);yield this._clipboardService.writeText(p)})));let d=0,u;n.originalEndLineNumber>n.modifiedStartLineNumber&&(u=new Ts("diff.clipboard.copyDeletedLineContent",m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,()=>ox(this,void 0,void 0,function*(){const g=n.originalModel.getLineContent(n.originalStartLineNumber+d);yield this._clipboardService.writeText(g)})),c.push(u)),i.getOption(80)||c.push(new Ts("diff.inline.revertChange",m("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>ox(this,void 0,void 0,function*(){const g=new k(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),p=n.originalModel.getValueInRange(g);if(n.modifiedEndLineNumber===0){const _=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new k(n.modifiedStartLineNumber,_,n.modifiedStartLineNumber,_),text:l+p}])}else{const _=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new k(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,_),text:p}])}})));const f=(g,p)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:g,y:p}),getActions:()=>(u&&(u.label=m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+d)),c),autoSelectFirstItem:!0})};this._register(Ei(this._diffActions,"mousedown",g=>{const{top:p,height:_}=rn(this._diffActions);let v=Math.floor(a/3);g.preventDefault(),f(g.posx,p+_+v)})),this._register(i.onMouseMove(g=>{g.target.type===8||g.target.type===5?g.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,d=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(g=>{!g.event.rightButton||(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._viewZoneId&&(g.event.preventDefault(),d=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,a),f(g.event.posx,g.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=rn(e),s=t-n,o=Math.floor(s/i),a=o*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(l+=this.diff.viewLineCounts[c],o<l)return c}return o}}const $c=bt("clipboardService");class $u{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}$u.None=Object.freeze({report(){}});const bl=bt("editorProgressService");var yte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},La=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},ax;class zM{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const s=n?xc.capture(e):null;e.changeViewZones(o=>{for(const a of this._zones)o.removeZone(a);for(const a of this._inlineDiffMargins)a.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let a=0,l=i.zones.length;a<l;a++){const c=i.zones[a];c.suppressMouseDown=!0;const d=o.addZone(c);this._zones.push(d),this._zonesMap[String(d)]=!0,i.zones[a].diff&&c.marginDomNode&&(c.suppressMouseDown=!1,this._inlineDiffMargins.push(new wte(d,c.marginDomNode,e,i.zones[a].diff,this._contextMenuService,this._clipboardService)))}}),s&&s.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let Ste=0;const xte=un("diff-insert",be.add,m("diffInsertIcon","Line decoration for inserts in the diff editor.")),R8=un("diff-remove",be.remove,m("diffRemoveIcon","Line decoration for removals in the diff editor.")),jM=(ax=window.trustedTypes)===null||ax===void 0?void 0:ax.createPolicy("diffEditorWidget",{createHTML:r=>r});let Ec=class gn extends Z{constructor(e,t,i,n,s,o,a,l,c,d,u,h){super();this._editorProgressService=h,this._onDidDispose=this._register(new H),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new H),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new H),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(o.createScoped(e)),this._instantiationService=a.createChild(new qm([Be,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=d,this._id=++Ste,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=KM(t,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof t.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",t.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new $t(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=gn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=ht(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(Ei(this._overviewDomElement,"mousedown",g=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(g)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new zM(u,n),this._modifiedEditorState=new zM(u,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new yW(this._containerDomElement,t.dimension,()=>this._onDidContainerSizeChanged())),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new Va(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new qa(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new GM(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(g=>{this._strategy&&this._strategy.applyColors(g)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=gn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const f=_f.getDiffEditorContributions();for(const g of f)try{this._register(a.createInstance(g.ctor,this))}catch(p){Fe(p)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=xw(e.type),i}_recreateOverviewRulers(){!this._options.renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(43)&&this._updateDecorationsRunner.schedule(),s.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const n=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+gn.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createRightHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(43)&&this._updateDecorationsRunner.schedule(),s.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(i.onDidChangeModelOptions(s=>{s.tabSize&&this._updateDecorationsRunner.schedule()}));const n=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+gn.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createInnerEditor(e,t,i,n){return e.createInstance(Gm,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return q_.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const t=KM(e,this._options),i=Tte(this._options,t);this._options=t;const n=i.ignoreTrimWhitespace||i.renderIndicators,s=this._isVisible&&(i.maxComputationTime||i.maxFileSize);n?this._beginUpdateDecorations():s&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),i.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new qa(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new GM(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=gn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),i.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const e=this._originalEditor.saveViewState(),t=this._modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),i=gn.ENTIRE_DIFF_OVERVIEW_WIDTH-2*gn.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:gn.ONE_OVERVIEW_WIDTH,right:i+gn.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:gn.ONE_OVERVIEW_WIDTH,height:e-t}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),gn.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t?!0:!e||!t?!1:e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const i=this._diffComputationToken,n=this._options.maxFileSize*1024*1024,s=o=>{const a=o.getValueLength();return n===0||a<=n};if(!s(e)||!s(t)){(!gn._equals(e.uri,this._lastOriginalWarning)||!gn._equals(t.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(m("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,t.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(o=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=o,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},o=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);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,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=mo.revealHorizontalRightPadding.defaultValue+gn.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=this._strategy.layout();this._originalDomNode.style.width=n+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-n+"px",this._modifiedDomNode.style.left=n+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-i+"px",this._overviewDomElement.style.width=gn.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-gn.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(gn.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:n,height:t-i}),this._modifiedEditor.layout({width:e-n-(this._options.renderOverviewRuler?gn.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-i,e,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),s=Math.max(0,n-2*0),o=i>0?s/i:0,a=Math.max(0,Math.floor(e.height*o)),l=Math.floor(t*o);return{height:a,top:l}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(i.length===0||e<t(i[0]))return null;let n=0,s=i.length-1;for(;n<s;){const o=Math.floor((n+s)/2),a=t(i[o]),l=o+1<=s?t(i[o+1]):1073741824;e<a?s=o-1:e>=l?n=o+1:(n=o,s=o)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-i;return a<=s?n+Math.min(a,o):n+o-s+a}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=o?i+Math.min(a,s):i+s-o+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};Ec.ONE_OVERVIEW_WIDTH=15;Ec.ENTIRE_DIFF_OVERVIEW_WIDTH=30;Ec.UPDATE_DIFF_DECORATIONS_DELAY=200;Ec=yte([La(3,$c),La(4,Ps),La(5,Be),La(6,gt),La(7,Ct),La(8,Gt),La(9,ki),La(10,Hc),La(11,bl)],Ec);class O8 extends Z{constructor(e){super();this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(UW)||gL).transparent(2),i=(e.getColor(zW)||pL).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,s){s=s.sort((c,d)=>c.afterLineNumber-d.afterLineNumber),n=n.sort((c,d)=>c.afterLineNumber-d.afterLineNumber);const o=this._getViewZones(e,n,s,i),a=this._getOriginalEditorDecorations(e,t,i),l=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:o.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:o.modified}}}}class qM{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class Ld{constructor(e,t,i,n,s){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=s}static _getViewLineCount(e,t,i){const n=e.getModel(),s=e._getViewModel();if(n&&s){const o=Xm(n,s,t,i);return o.endLineNumber-o.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(58),t=this._modifiedEditor.getOption(58),i=this._originalEditor.getOption(130).wrappingColumn!==-1,n=this._modifiedEditor.getOption(130).wrappingColumn!==-1,s=i||n,o=this._originalEditor.getModel(),a=this._originalEditor._getViewModel().coordinatesConverter,l=this._modifiedEditor._getViewModel().coordinatesConverter,c={original:[],modified:[]};let d=0,u=0,h=0,f=0,g=0,p=0;const _=(S,w)=>S.afterLineNumber-w.afterLineNumber,v=(S,w)=>{if(w.domNode===null&&S.length>0){const x=S[S.length-1];if(x.afterLineNumber===w.afterLineNumber&&x.domNode===null){x.heightInLines+=w.heightInLines;return}}S.push(w)},b=new qM(this._modifiedForeignVZ),C=new qM(this._originalForeignVZ);let y=1,E=1;for(let S=0,w=this._lineChanges.length;S<=w;S++){const x=S<w?this._lineChanges[S]:null;x!==null?(h=x.originalStartLineNumber+(x.originalEndLineNumber>0?-1:0),f=x.modifiedStartLineNumber+(x.modifiedEndLineNumber>0?-1:0),u=x.originalEndLineNumber>0?Ld._getViewLineCount(this._originalEditor,x.originalStartLineNumber,x.originalEndLineNumber):0,d=x.modifiedEndLineNumber>0?Ld._getViewLineCount(this._modifiedEditor,x.modifiedStartLineNumber,x.modifiedEndLineNumber):0,g=Math.max(x.originalStartLineNumber,x.originalEndLineNumber),p=Math.max(x.modifiedStartLineNumber,x.modifiedEndLineNumber)):(h+=1e7+u,f+=1e7+d,g=h,p=f);let D=[],M=[];if(s){let j;x?x.originalEndLineNumber>0?j=x.originalStartLineNumber-y:j=x.modifiedStartLineNumber-E:j=o.getLineCount()-y;for(let re=0;re<j;re++){const te=y+re,N=E+re,L=a.getModelLineViewLineCount(te),O=l.getModelLineViewLineCount(N);L<O?D.push({afterLineNumber:te,heightInLines:O-L,domNode:null,marginDomNode:null}):L>O&&M.push({afterLineNumber:N,heightInLines:L-O,domNode:null,marginDomNode:null})}x&&(y=(x.originalEndLineNumber>0?x.originalEndLineNumber:x.originalStartLineNumber)+1,E=(x.modifiedEndLineNumber>0?x.modifiedEndLineNumber:x.modifiedStartLineNumber)+1)}for(;b.current&&b.current.afterLineNumber<=p;){let j;b.current.afterLineNumber<=f?j=h-f+b.current.afterLineNumber:j=g;let re=null;x&&x.modifiedStartLineNumber<=b.current.afterLineNumber&&b.current.afterLineNumber<=x.modifiedEndLineNumber&&(re=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),D.push({afterLineNumber:j,heightInLines:b.current.height/t,domNode:null,marginDomNode:re}),b.advance()}for(;C.current&&C.current.afterLineNumber<=g;){let j;C.current.afterLineNumber<=h?j=f-h+C.current.afterLineNumber:j=p,M.push({afterLineNumber:j,heightInLines:C.current.height/e,domNode:null}),C.advance()}if(x!==null&&Sf(x)){const j=this._produceOriginalFromDiff(x,u,d);j&&D.push(j)}if(x!==null&&xf(x)){const j=this._produceModifiedFromDiff(x,u,d);j&&M.push(j)}let B=0,z=0;for(D=D.sort(_),M=M.sort(_);B<D.length&&z<M.length;){const j=D[B],re=M[z],te=j.afterLineNumber-h,N=re.afterLineNumber-f;te<N?(v(c.original,j),B++):N<te?(v(c.modified,re),z++):j.shouldNotShrink?(v(c.original,j),B++):re.shouldNotShrink?(v(c.modified,re),z++):j.heightInLines>=re.heightInLines?(j.heightInLines-=re.heightInLines,z++):(re.heightInLines-=j.heightInLines,B++)}for(;B<D.length;)v(c.original,D[B]),B++;for(;z<M.length;)v(c.modified,M[z]),z++}return{original:Ld._ensureDomNodes(c.original),modified:Ld._ensureDomNodes(c.modified)}}static _ensureDomNodes(e){return e.map(t=>(t.domNode||(t.domNode=M8()),t))}}function Ha(r,e,t,i,n){return{range:new k(r,e,t,i),options:n}}const Kn={charDelete:qe.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:qe.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:qe.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:qe.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:qe.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:qe.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+qt.asClassName(xte),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:qe.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:qe.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+qt.asClassName(R8),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:qe.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class qa extends O8{constructor(e,t){super(e);this._disableSash=t===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new _n(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(i=>this._onSashDrag(i)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ec.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>qa.MINIMUM_EDITOR_WIDTH*2?(n<qa.MINIMUM_EDITOR_WIDTH&&(n=qa.MINIMUM_EDITOR_WIDTH),n>i-qa.MINIMUM_EDITOR_WIDTH&&(n=i-qa.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?Ec.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new Ete(e,t,i,n,s).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),s=String(this._removeColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(xf(c)){o.decorations.push({range:new k(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:i?Kn.lineDeleteWithSign:Kn.lineDelete}),(!Sf(c)||!c.charChanges)&&o.decorations.push(Ha(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824,Kn.charDeleteWholeLine));const d=Xm(a,l,c.originalStartLineNumber,c.originalEndLineNumber);if(o.overviewZones.push(new Um(d.startLineNumber,d.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(xf(u))if(t)for(let h=u.originalStartLineNumber;h<=u.originalEndLineNumber;h++){let f,g;h===u.originalStartLineNumber?f=u.originalStartColumn:f=a.getLineFirstNonWhitespaceColumn(h),h===u.originalEndLineNumber?g=u.originalEndColumn:g=a.getLineLastNonWhitespaceColumn(h),o.decorations.push(Ha(h,f,h,g,Kn.charDelete))}else o.decorations.push(Ha(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,Kn.charDelete))}}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(Sf(c)){o.decorations.push({range:new k(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:i?Kn.lineInsertWithSign:Kn.lineInsert}),(!xf(c)||!c.charChanges)&&o.decorations.push(Ha(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,Kn.charInsertWholeLine));const d=Xm(a,l,c.modifiedStartLineNumber,c.modifiedEndLineNumber);if(o.overviewZones.push(new Um(d.startLineNumber,d.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(Sf(u))if(t)for(let h=u.modifiedStartLineNumber;h<=u.modifiedEndLineNumber;h++){let f,g;h===u.modifiedStartLineNumber?f=u.modifiedStartColumn:f=a.getLineFirstNonWhitespaceColumn(h),h===u.modifiedEndLineNumber?g=u.modifiedEndColumn:g=a.getLineLastNonWhitespaceColumn(h),o.decorations.push(Ha(h,f,h,g,Kn.charInsert))}else o.decorations.push(Ha(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn,Kn.charInsert))}}return o}}qa.MINIMUM_EDITOR_WIDTH=100;class Ete extends Ld{constructor(e,t,i,n,s){super(e,t,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class GM extends O8{constructor(e,t){super(e);this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(i=>{this._decorationsLeft!==i.decorationsLeft&&(this._decorationsLeft=i.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const s=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new kte(e,t,i,s,o,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),s={decorations:[],overviewZones:[]},o=this._dataSource.getOriginalEditor(),a=o.getModel(),l=o._getViewModel();for(const c of e)if(xf(c)){s.decorations.push({range:new k(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:Kn.lineDeleteMargin});const d=Xm(a,l,c.originalStartLineNumber,c.originalEndLineNumber);s.overviewZones.push(new Um(d.startLineNumber,d.endLineNumber,n))}return s}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(Sf(c)){o.decorations.push({range:new k(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:i?Kn.lineInsertWithSign:Kn.lineInsert});const d=Xm(a,l,c.modifiedStartLineNumber,c.modifiedEndLineNumber);if(o.overviewZones.push(new Um(d.startLineNumber,d.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(Sf(u))if(t)for(let h=u.modifiedStartLineNumber;h<=u.modifiedEndLineNumber;h++){let f,g;h===u.modifiedStartLineNumber?f=u.modifiedStartColumn:f=a.getLineFirstNonWhitespaceColumn(h),h===u.modifiedEndLineNumber?g=u.modifiedEndColumn:g=a.getLineLastNonWhitespaceColumn(h),o.decorations.push(Ha(h,f,h,g,Kn.charInsert))}else o.decorations.push(Ha(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn,Kn.charInsert))}else o.decorations.push(Ha(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,Kn.charInsertWholeLine))}return o}layout(){return Math.max(5,this._decorationsLeft)}}class kte extends Ld{constructor(e,t,i,n,s,o){super(e,t,i,n,s);this._originalModel=n.getModel(),this._renderIndicators=o,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${jd}`;const s=document.createElement("div");s.className="inline-deleted-margin-view-zone";const o={shouldNotShrink:!0,afterLineNumber:e.modifiedEndLineNumber===0?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:s,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let a=e.originalStartLineNumber;a<=e.originalEndLineNumber;a++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(a),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(o),o}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(43),s=t.get(29),o=n.typicalHalfwidthCharacterWidth,a=t.get(92),l=this._originalModel.mightContainNonBasicASCII(),c=this._originalModel.mightContainRTL(),d=t.get(58),h=t.get(129).decorationsWidth,f=t.get(104),g=t.get(87),p=t.get(82),_=t.get(44),v=this._lineBreaksComputer.finalize();let b=0;for(let C=0;C<this._pendingLineChange.length;C++){const y=this._pendingLineChange[C],E=this._pendingViewZones[C],S=E.domNode;Ln.applyFontInfoSlow(S,n);const w=E.marginDomNode;Ln.applyFontInfoSlow(w,n);const x=[];if(y.charChanges)for(const N of y.charChanges)xf(N)&&x.push(new $p(new k(N.originalStartLineNumber,N.originalStartColumn,N.originalEndLineNumber,N.originalEndColumn),"char-delete",0));const D=x.length>0,M=eu(1e4);let B=0,z=0,j=null;for(let N=y.originalStartLineNumber;N<=y.originalEndLineNumber;N++){const L=N-y.originalStartLineNumber,O=this._originalModel.getLineTokens(N),W=O.getLineContent(),ge=v[b++],se=Nr.filter(x,N,1,W.length+1);if(ge){let ae=0;for(const Le of ge.breakOffsets){const ct=O.sliceAndInflate(ae,Le,0),bi=W.substring(ae,Le);B=Math.max(B,this._renderOriginalLine(z++,bi,ct,Nr.extractWrapped(se,ae,Le),D,l,c,n,s,d,h,f,g,p,_,i,M,w)),ae=Le}for(j||(j=[]);j.length<L;)j[j.length]=1;j[L]=ge.breakOffsets.length,E.heightInLines+=ge.breakOffsets.length-1;const Ce=document.createElement("div");Ce.className="line-delete",e.original.push({afterLineNumber:N,afterColumn:0,heightInLines:ge.breakOffsets.length-1,domNode:M8(),marginDomNode:Ce})}else B=Math.max(B,this._renderOriginalLine(z++,W,O,se,D,l,c,n,s,d,h,f,g,p,_,i,M,w))}B+=a;const re=M.build(),te=jM?jM.createHTML(re):re;if(S.innerHTML=te,E.minWidthInPx=B*o,j){const N=y.originalEndLineNumber-y.originalStartLineNumber;for(;j.length<=N;)j[j.length]=1}E.diff.viewLineCounts=j}e.original.sort((C,y)=>C.afterLineNumber-y.afterLineNumber)}_renderOriginalLine(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p,_,v,b){v.appendASCIIString('<div class="view-line'),s||v.appendASCIIString(" char-delete"),v.appendASCIIString('" style="top:'),v.appendASCIIString(String(e*d)),v.appendASCIIString('px;width:1000000px;">');const C=Br.isBasicASCII(t,o),y=Br.containsRTL(t,C,a),E=t0(new Mu(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,C,y,0,i,n,_,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,h,f,g,p!==Lr.OFF,null),v);if(v.appendASCIIString("</div>"),this._renderIndicators){const S=document.createElement("div");S.className=`delete-sign ${qt.asClassName(R8)}`,S.setAttribute("style",`position:absolute;top:${e*d}px;width:${u}px;height:${d}px;right:0;`),b.appendChild(S)}return E.characterMapping.getAbsoluteOffset(E.characterMapping.length)}}function Lte(r,e){return Yn(r,e,["off","on","inherit"])}function Sf(r){return r.modifiedEndLineNumber>0}function xf(r){return r.originalEndLineNumber>0}function M8(){const r=document.createElement("div");return r.className="diagonal-fill",r}function Xm(r,e,t,i){const n=r.getLineCount();return t=Math.min(n,Math.max(1,t)),i=Math.min(n,Math.max(1,i)),e.coordinatesConverter.convertModelRangeToViewRange(new k(t,r.getLineMinColumn(t),i,r.getLineMaxColumn(i)))}function KM(r,e){return{enableSplitViewResizing:Ne(r.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:Ne(r.renderSideBySide,e.renderSideBySide),maxComputationTime:ME(r.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:ME(r.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Ne(r.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Ne(r.renderIndicators,e.renderIndicators),originalEditable:Ne(r.originalEditable,e.originalEditable),diffCodeLens:Ne(r.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Ne(r.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:Lte(r.diffWordWrap,e.diffWordWrap)}}function Tte(r,e){return{enableSplitViewResizing:r.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:r.renderSideBySide!==e.renderSideBySide,maxComputationTime:r.maxComputationTime!==e.maxComputationTime,maxFileSize:r.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:r.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:r.renderIndicators!==e.renderIndicators,originalEditable:r.originalEditable!==e.originalEditable,diffCodeLens:r.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:r.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:r.diffWordWrap!==e.diffWordWrap}}Et((r,e)=>{const t=r.getColor(UW);t&&(e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${t}; }`),e.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${t}; }`),e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${t}; }`));const i=r.getColor(zW);i&&(e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${i}; }`),e.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${i}; }`),e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${i}; }`));const n=r.getColor(qZ);n&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${r.type==="hc"?"dashed":"solid"} ${n}; }`);const s=r.getColor(GZ);s&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${r.type==="hc"?"dashed":"solid"} ${s}; }`);const o=r.getColor(w0);o&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${o}; }`);const a=r.getColor(KZ);a&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=r.getColor(Qv);l&&e.addRule(` + .monaco-diff-editor .diffViewport { + background: ${l}; + } + `);const c=r.getColor(Jv);c&&e.addRule(` + .monaco-diff-editor .diffViewport:hover { + background: ${c}; + } + `);const d=r.getColor(eC);d&&e.addRule(` + .monaco-diff-editor .diffViewport:active { + background: ${d}; + } + `);const u=r.getColor(YZ);e.addRule(` + .monaco-editor .diagonal-fill { + background-image: linear-gradient( + -45deg, + ${u} 12.5%, + #0000 12.5%, #0000 50%, + ${u} 50%, ${u} 62.5%, + #0000 62.5%, #0000 100% + ); + background-size: 8px 8px; + } + `)});const Uu=bt("themeService"),Zt=bt("keybindingService");class Ite extends Z{constructor(){super();this._onCodeEditorAdd=this._register(new H),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new H),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new H),this._onDiffEditorRemove=this._register(new H),this._onDecorationTypeRegistered=this._register(new H),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}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])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.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}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)}}var Dte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ate=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Nte{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,this._refCount===0&&((e=this._styleSheet.parentNode)===null||e===void 0||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){$C(e,this._styleSheet)}}class Rte{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){$C(e,this._styleSheet)}}let LL=class extends Ite{constructor(e,t){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new Rte(Pr())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!qy(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const n=new Nte(this,i,Pr(t));this._editorStyleSheets.set(i,n)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n,s){let o=this._decorationOptionProviders.get(t);if(!o){const a=this._getOrCreateStyleSheet(s),l={styleSheet:a,key:t,parentTypeKey:n,options:i||Object.create(null)};n?o=new Ote(this._themeService,a,l):o=new Mte(e,this._themeService,a,l),this._decorationOptionProviders.set(t,o),this._onDecorationTypeRegistered.fire(t)}o.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorations(e))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};LL=Dte([Ate(1,Gt)],LL);class Ote{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new jw(3,i,e),this._afterContentRules=new jw(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class Mte{constructor(e,t,i,n){this._disposables=new ue,this.description=e,this._styleSheet=i,this._styleSheet.ref(),this.refCount=0;const s=u=>{const h=new jw(u,n,t);if(this._disposables.add(h),h.hasContent)return h.className},o=u=>{const h=new jw(u,n,t);return this._disposables.add(h),h.hasContent?{className:h.className,hasLetterSpacing:h.hasLetterSpacing}:null};this.className=s(0);const a=o(1);if(a&&(this.inlineClassName=a.className,this.inlineClassNameAffectsLetterSpacing=a.hasLetterSpacing),this.beforeContentClassName=s(3),this.afterContentClassName=s(4),n.options.beforeInjectedText&&n.options.beforeInjectedText.contentText){const u=o(5);this.beforeInjectedText={content:n.options.beforeInjectedText.contentText,inlineClassName:u==null?void 0:u.className,inlineClassNameAffectsLetterSpacing:(u==null?void 0:u.hasLetterSpacing)||n.options.beforeInjectedText.affectsLetterSpacing}}if(n.options.afterInjectedText&&n.options.afterInjectedText.contentText){const u=o(6);this.afterInjectedText={content:n.options.afterInjectedText.contentText,inlineClassName:u==null?void 0:u.className,inlineClassNameAffectsLetterSpacing:(u==null?void 0:u.hasLetterSpacing)||n.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=s(2);const l=n.options;this.isWholeLine=Boolean(l.isWholeLine),this.stickiness=l.rangeBehavior;const c=l.light&&l.light.overviewRulerColor||l.overviewRulerColor,d=l.dark&&l.dark.overviewRulerColor||l.overviewRulerColor;(typeof c!="undefined"||typeof d!="undefined")&&(this.overviewRuler={color:c||d,darkColor:d||c,position:l.overviewRulerLane||Fr.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const Jg={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class jw{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=lx.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+lx.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=lx.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange(s=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:t=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:t=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const s=this._providerArgs.styleSheet;let o=!1;t.length>0&&(s.insertRule(`${this._unThemedSelector} {${t}}`,0),o=!0),i.length>0&&(s.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),o=!0),n.length>0&&(s.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),o=!0),this._hasContent=o}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(typeof e!="undefined"){if(this.collectBorderSettingsCSSText(e,t),typeof e.contentIconPath!="undefined"&&t.push(bn(Jg.contentIconPath,dl(De.revive(e.contentIconPath)))),typeof e.contentText=="string"){const n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(bn(Jg.contentText,n))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return typeof e.gutterIconPath!="undefined"&&(t.push(bn(Jg.gutterIconPath,dl(De.revive(e.gutterIconPath)))),typeof e.gutterIconSize!="undefined"&&t.push(bn(Jg.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)?(t.push(bn("box-sizing: border-box;")),!0):!1}collectCSSText(e,t,i){const n=i.length;for(let s of t){const o=this.resolveValue(e[s]);typeof o=="string"&&i.push(bn(Jg[s],o))}return i.length!==n}resolveValue(e){if(lq(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class lx{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),i===3?n+="::before":i===4&&(n+="::after"),n}}var Pte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},YM=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let qw=class extends LL{constructor(e,t,i){super(e,i);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=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}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===Ye.http||s===Ye.https)return d3(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};qw=Pte([YM(1,Be),YM(2,Gt)],qw);var zA=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jt=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Fte=0,ZM=!1;function Bte(r){if(!r){if(ZM)return;ZM=!0}eY(r||document.body)}let Gw=class extends Gm{constructor(e,t,i,n,s,o,a,l,c,d){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||vw.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+vw.accessibilityHelpMessage;super(e,u,{},i,n,s,o,l,c,d);a instanceof fW?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,Bte(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;let n="DYNAMIC_"+ ++Fte,s=me.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")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"),Z.None;const t=e.id,i=e.label,n=me.and(me.equals("editorId",this.getId()),me.deserialize(e.precondition)),s=e.keybindings,o=me.and(n,me.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...g)=>Promise.resolve(e.run(this,...g)),d=new ue,u=this.getId()+":"+t;if(d.add(lt.registerCommand(u,c)),a){let f={command:{id:u,title:i},when:n,group:a,order:l};d.add(es.appendMenuItem(Ee.EditorContext,f))}if(Array.isArray(s))for(const f of s)d.add(this._standaloneKeybindingService.addDynamicKeybinding(u,f,c,o));let h=new S8(u,i,i,n,c,this._contextKeyService);return this._actions[t]=h,d.add(Xe(()=>{delete this._actions[t]})),d}_triggerCommand(e,t){if(this._codeEditorService instanceof qw)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Gw=zA([jt(2,gt),jt(3,Ct),jt(4,pi),jt(5,Be),jt(6,Zt),jt(7,Gt),jt(8,ki),jt(9,Cr)],Gw);let TL=class extends Gw{constructor(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p){const _=Object.assign({},t);Cw(h,_,!1);const v=d.registerEditorContainer(e);typeof _.theme=="string"&&d.setTheme(_.theme),typeof _.autoDetectHighContrast!="undefined"&&d.setAutoDetectHighContrast(Boolean(_.autoDetectHighContrast));let b=_.model;delete _.model;super(e,_,n,s,o,a,l,d,u,f);this._contextViewService=c,this._configurationService=h,this._standaloneThemeService=d,this._register(i),this._register(v);let C;if(typeof b=="undefined"?(C=P8(g,p,_.value||"",_.language||ws.text,void 0),this._ownsModel=!0):(C=b,this._ownsModel=!1),this._attachModel(C),C){let y={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(y)}}dispose(){super.dispose()}updateOptions(e){Cw(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};TL=zA([jt(3,gt),jt(4,Ct),jt(5,pi),jt(6,Be),jt(7,Zt),jt(8,Vc),jt(9,Uu),jt(10,ki),jt(11,di),jt(12,Cr),jt(13,mi),jt(14,Fs)],TL);let IL=class extends Ec{constructor(e,t,i,n,s,o,a,l,c,d,u,h,f,g,p){const _=Object.assign({},t);Cw(h,_,!0);const v=d.registerEditorContainer(e);typeof _.theme=="string"&&d.setTheme(_.theme),typeof _.autoDetectHighContrast!="undefined"&&d.setAutoDetectHighContrast(Boolean(_.autoDetectHighContrast));super(e,_,{},p,l,s,n,c,d,u,f,g);this._contextViewService=a,this._configurationService=h,this._standaloneThemeService=d,this._register(i),this._register(v),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){Cw(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Gw,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)}};IL=zA([jt(3,gt),jt(4,Be),jt(5,Zt),jt(6,Vc),jt(7,Ps),jt(8,Ct),jt(9,Uu),jt(10,ki),jt(11,di),jt(12,Hc),jt(13,bl),jt(14,$c)],IL);function P8(r,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` +`);let o=t;return s!==-1&&(o=t.substring(0,s)),XM(r,t,e.createByFilepathOrFirstLine(n||null,o),n)}return XM(r,t,e.create(i),n)}function XM(r,e,t,i){return r.createModel(e,t,i)}const Wte={ModesRegistry:"editor.modesRegistry"};class Vte{constructor(){this._onDidChangeLanguages=new H,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e){this._languages.splice(t,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const Gd=new Vte;_i.add(Wte.ModesRegistry,Gd);const jA="plaintext",Hte=".txt",F8=new DD(jA,1);Gd.registerLanguage({id:jA,extensions:[Hte],aliases:[m("plainText.alias","Plain Text"),"text"],mimetypes:[ws.text]});Ue.register(F8,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0);const ed=Object.prototype.hasOwnProperty;class $te extends Z{constructor(e=!0,t=!1){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(Gd.onDidChangeLanguages(i=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=Gd.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),_i.as(Pu.Configuration).registerOverrideIdentifiers(Gd.getLanguages().map(t=>t.id)),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(ed.call(this._languages,t))i=this._languages[t];else{const n=this._getLanguageId(t);i={identifier:new DD(t,n),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},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(let a of t.extensions)zb({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)zb({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)zb({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);Sj(l)||zb({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){Fe(l)}}e.aliases.push(i);let s=null;if(typeof t.aliases!="undefined"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);let o=s!==null&&s.length>0;if(!(o&&s[0]===null)){let a=(o?s[0]:null)||i;(o||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return ed.call(this._mimeTypesMap,e)?!0:ed.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return ed.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map(t=>t.trim()).map(t=>ed.call(this._mimeTypesMap,t)?this._mimeTypesMap[t].language:t).filter(t=>ed.call(this._languages,t)):[]}getLanguageIdentifier(e){if(e===RD||e===0)return rw;let t;if(typeof e=="string")t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return ed.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=UQ(e,t);return this.extractModeIds(i.join(","))}}class QM{constructor(e,t){this._selector=t,this.languageIdentifier=this._selector();let i;this._onDidChange=new H({onFirstListenerAdd:()=>{i=e(()=>this._evaluate())},onLastListenerRemove:()=>{i.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class Ute extends Z{constructor(e=!1){super();this._onDidEncounterLanguage=this._register(new H),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new H({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._encounteredLanguages=new Set,this._registry=this._register(new $te(!0,e)),this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return Kk(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return Kk(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new QM(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new QM(this.onLanguagesMaybeChanged,()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||rw;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const t=this.getLanguageIdentifier(e)||rw;this._onDidEncounterLanguage.fire(t)}}}const A0=bt("undoRedoService");class B8{constructor(e,t){this.resource=e,this.elements=t}}class qf{constructor(){this.id=qf._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}qf._ID=0;qf.None=new qf;class jo{constructor(){this.id=jo._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}jo._ID=0;jo.None=new jo;class zte{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new $a,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._hashTable.get(e,t,i.id);let s;if(n)s=n.metadata,this._logService.getLevel()===eo.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${kn.getForeground(s)}, fontStyle ${kn.getFontStyle(s).toString(2)}`);else{let o=this._legend.tokenTypes[e];const a=[];if(o){let l=t;for(let d=0;l>0&&d<this._legend.tokenModifiers.length;d++)l&1&&a.push(this._legend.tokenModifiers[d]),l=l>>1;l>0&&this._logService.getLevel()===eo.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(o,a,i.language);typeof c=="undefined"?s=2147483647:(s=0,typeof c.italic!="undefined"&&(s|=(c.italic?1:0)<<11|1),typeof c.bold!="undefined"&&(s|=(c.bold?2:0)<<11|2),typeof c.underline!="undefined"&&(s|=(c.underline?4:0)<<11|4),c.foreground&&(s|=c.foreground<<14|8),s===0&&(s=2147483647))}else this._logService.getLevel()===eo.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,i.id,s),this._logService.getLevel()===eo.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${a.join(" ")}): foreground ${kn.getForeground(s)}, fontStyle ${kn.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function W8(r,e,t){const i=r.data,n=r.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),o=[];let a=0,l=1,c=0;for(;a<n;){const d=a;let u=Math.min(d+s,n);if(u<n){let C=u;for(;C-1>d&&i[5*C]===0;)C--;if(C-1===d){let y=u;for(;y+1<n&&i[5*y]===0;)y++;u=y}else u=C}let h=new Uint32Array((u-d)*4),f=0,g=0,p=0,_=0,v=0;for(;a<u;){const C=5*a,y=i[C],E=i[C+1],S=l+y,w=y===0?c+E:E,x=i[C+2],D=i[C+3],M=i[C+4],B=e.getMetadata(D,M,t);B!==2147483647&&(g===0&&(g=S),p===S&&v>w&&(e.warnOverlappingSemanticTokens(S,w+1),_<w?h[f-4+2]=w:f-=4),h[f]=S-g,h[f+1]=w,h[f+2]=w+x,h[f+3]=B,f+=4,p=S,_=w,v=w+x),l=S,c=w,a++}f!==h.length&&(h=h.subarray(0,f));const b=new kw(g,new Ew(h));o.push(b)}return o}class jte{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class $a{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=$a._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<$a._SIZES.length?2/3*this._currentLength:0),this._elements=[],$a._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let s=this._elements[n];for(;s;){if(s.tokenTypeIndex===e&&s.tokenModifierSet===t&&s.languageId===i)return s;s=s.next}return null}add(e,t,i,n){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=$a._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<$a._SIZES.length?2/3*this._currentLength:0),this._elements=[],$a._nullOutEntries(this._elements,this._currentLength);for(const o of s){let a=o;for(;a;){const l=a.next;a.next=null,this._add(a),a=l}}}this._add(new jte(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}$a._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];function qte(r){for(let e=0,t=r.length;e<t;e+=4){const i=r[e+0],n=r[e+1],s=r[e+2],o=r[e+3];r[e+0]=o,r[e+1]=s,r[e+2]=n,r[e+3]=i}}function Gte(r){const e=new Uint8Array(r.buffer,r.byteOffset,r.length*4);return OB()||qte(e),Ky.wrap(e)}function V8(r){const e=new Uint32Array(Kte(r));let t=0;if(e[t++]=r.id,r.type==="full")e[t++]=1,e[t++]=r.data.length,e.set(r.data,t),t+=r.data.length;else{e[t++]=2,e[t++]=r.deltas.length;for(const i of r.deltas)e[t++]=i.start,e[t++]=i.deleteCount,i.data?(e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length):e[t++]=0}return Gte(e)}function Kte(r){let e=0;if(e+=1+1,r.type==="full")e+=1+r.data.length;else{e+=1,e+=(1+1+1)*r.deltas.length;for(const t of r.deltas)t.data&&(e+=t.data.length)}return e}var N0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function qA(r){return r&&!!r.data}function Yte(r){return r&&Array.isArray(r.edits)}function H8(r,e,t){const i=$8(r);return i?{provider:i,request:Promise.resolve(i.provideDocumentSemanticTokens(r,e,t))}:null}function $8(r){const e=nw.ordered(r);return e.length>0?e[0]:null}function GA(r){const e=ND.ordered(r);return e.length>0?e[0]:null}lt.registerCommand("_provideDocumentSemanticTokensLegend",(r,...e)=>N0(void 0,void 0,void 0,function*(){const[t]=e;Dt(t instanceof De);const i=r.get(mi).getModel(t);if(!i)return;const n=$8(i);return n?n.getLegend():r.get(pi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));lt.registerCommand("_provideDocumentSemanticTokens",(r,...e)=>N0(void 0,void 0,void 0,function*(){const[t]=e;Dt(t instanceof De);const i=r.get(mi).getModel(t);if(!i)return;const n=H8(i,null,it.None);if(!n)return r.get(pi).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const{provider:s,request:o}=n;let a;try{a=yield o}catch(c){Yi(c);return}if(!a||!qA(a))return;const l=V8({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));lt.registerCommand("_provideDocumentRangeSemanticTokensLegend",(r,...e)=>N0(void 0,void 0,void 0,function*(){const[t]=e;Dt(t instanceof De);const i=r.get(mi).getModel(t);if(!i)return;const n=GA(i);if(!!n)return n.getLegend()}));lt.registerCommand("_provideDocumentRangeSemanticTokens",(r,...e)=>N0(void 0,void 0,void 0,function*(){const[t,i]=e;Dt(t instanceof De),Dt(k.isIRange(i));const n=r.get(mi).getModel(t);if(!n)return;const s=GA(n);if(!s)return;let o;try{o=yield s.provideDocumentRangeSemanticTokens(n,k.lift(i),it.None)}catch(a){Yi(a);return}if(!(!o||!qA(o)))return V8({id:0,type:"full",data:o.data})}));var Zte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ep=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function Ll(r){return r.toString()}function JM(r){const e=new Zy,t=r.createSnapshot();let i;for(;i=t.read();)e.update(i);return e.digest()}class Xte{constructor(e,t,i){this._modelEventListeners=new ue,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const Qte=ir||tt?1:2;class Jte{constructor(e,t,i,n,s,o,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=a,this.alternativeVersionId=l}}let Kw=class kp extends Z{constructor(e,t,i,n,s){super();this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=s,this._onModelAdded=this._register(new H),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new H),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new H),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new tie(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new eie(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){var i;let n=xn.tabSize;if(e.editor&&typeof e.editor.tabSize!="undefined"){const f=parseInt(e.editor.tabSize,10);isNaN(f)||(n=f),n<1&&(n=1)}let s=n;if(e.editor&&typeof e.editor.indentSize!="undefined"&&e.editor.indentSize!=="tabSize"){const f=parseInt(e.editor.indentSize,10);isNaN(f)||(s=f),s<1&&(s=1)}let o=xn.insertSpaces;e.editor&&typeof e.editor.insertSpaces!="undefined"&&(o=e.editor.insertSpaces==="false"?!1:Boolean(e.editor.insertSpaces));let a=Qte;const l=e.eol;l===`\r +`?a=2:l===` +`&&(a=1);let c=xn.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace!="undefined"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let d=xn.detectIndentation;e.editor&&typeof e.editor.detectIndentation!="undefined"&&(d=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let u=xn.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations!="undefined"&&(u=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let h=xn.bracketPairColorizationOptions;return((i=e.editor)===null||i===void 0?void 0:i.bracketPairColorization)&&typeof e.editor.bracketPairColorization=="object"&&(h={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:o,detectIndentation:d,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:u,bracketPairColorizationOptions:h}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:Cs===3||Cs===2?` +`:`\r +`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),o=this._getEOL(t,e);n=kp._readModelOptions({editor:s,eol:o},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i],o=this._models[s],a=o.model.getLanguageIdentifier().language,l=o.model.uri,c=e[a+l],d=this.getCreationOptions(a,l,o.model.isForSimpleWidget);kp._setModelOptionsForModel(o.model,d,c)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&ro(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(Ll(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(Ll(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(Ll(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t.language,i,n),o=new Ti(e,s,t,i,this._undoRedoService);if(i&&this._disposedModels.has(Ll(i))){const c=this._removeDisposedModel(i),d=this._undoRedoService.getElements(i),u=JM(o)===c.sha1;if(u||c.sharesUndoRedoStack){for(const h of d.past)Ba(h)&&h.matchesResource(i)&&h.setModel(o);for(const h of d.future)Ba(h)&&h.matchesResource(i)&&h.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,h=>Ba(h)&&h.matchesResource(i)),u&&(o._overwriteVersionId(c.versionId),o._overwriteAlternativeVersionId(c.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=Ll(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new Xte(o,c=>this._onWillDispose(c),(c,d)=>this._onDidChangeLanguage(c,d));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(s.model,t)):s=this._createModelData(e,F8,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[Ll(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=Ll(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ye.file||e.scheme===Ye.vscodeRemote||e.scheme===Ye.userData||e.scheme===Ye.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=Ll(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let s=!1,o=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const l=this._undoRedoService.getElements(e.uri);if(l.past.length>0||l.future.length>0){for(const c of l.past)Ba(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)Ba(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=kp.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!n&&o>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>Ba(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new Jte(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,o,JM(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageIdentifier().language,s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);kp._setModelOptionsForModel(e,o,s),this._onModelModeChanged.fire({model:e,oldModeId:i})}};Kw.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;Kw=Zte([ep(0,di),ep(1,$3),ep(2,Gt),ep(3,_l),ep(4,A0)],Kw);const KA="editor.semanticHighlighting";function DL(r,e,t){var i;const n=(i=t.getValue(KA,{overrideIdentifier:r.getLanguageIdentifier().language,resource:r.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}class eie extends Z{constructor(e,t,i,n){super();this._watchers=Object.create(null),this._semanticStyling=n;const s=l=>{this._watchers[l.uri.toString()]=new Td(l,t,this._semanticStyling)},o=(l,c)=>{c.dispose(),delete this._watchers[l.uri.toString()]},a=()=>{for(let l of e.getModels()){const c=this._watchers[l.uri.toString()];DL(l,t,i)?c||s(l):c&&o(l,c)}};this._register(e.onModelAdded(l=>{DL(l,t,i)&&s(l)})),this._register(e.onModelRemoved(l=>{const c=this._watchers[l.uri.toString()];c&&o(l,c)})),this._register(i.onDidChangeConfiguration(l=>{l.affectsConfiguration(KA)&&a()})),this._register(t.onDidColorThemeChange(a))}}class tie extends Z{constructor(e,t){super();this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new zte(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class iie{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class Td extends Z{constructor(e,t,i){super();this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new $t(()=>this._fetchDocumentSemanticTokensNow(),Td.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),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 n=()=>{ft(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const s of nw.all(e))typeof s.onDidChange=="function"&&this._documentProvidersChangeListeners.push(s.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};n(),this._register(nw.onDidChange(()=>{n(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(s=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new Hn,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=H8(this._model,t,e.token);if(!i){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const{provider:n,request:s}=i;this._currentDocumentRequestCancellationTokenSource=e;const o=[],a=this._model.onDidChangeContent(c=>{o.push(c)}),l=this._semanticStyling.get(n);s.then(c=>{this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),this._setDocumentSemanticTokens(n,c||null,l,o)},c=>{c&&(ga(c)||typeof c.message=="string"&&c.message.indexOf("busy")!==-1)||Fe(c),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){const s=this._currentDocumentResponse,o=()=>{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.setSemanticTokens(null,!1);return}if(!t){this._model.setSemanticTokens(null,!0),o();return}if(Yte(t)){if(!s){this._model.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const h of t.edits)a+=(h.data?h.data.length:0)-h.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let d=l.length,u=c.length;for(let h=t.edits.length-1;h>=0;h--){const f=t.edits[h],g=d-(f.start+f.deleteCount);g>0&&(Td._copy(l,d-g,c,u-g,g),u-=g),f.data&&(Td._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),d=f.start}d>0&&Td._copy(l,0,c,0,d),t={resultId:t.resultId,data:c}}}if(qA(t)){this._currentDocumentResponse=new iie(e,t.resultId,t.data);const a=W8(t,i,this._model.getLanguageIdentifier());if(n.length>0)for(const l of n)for(const c of a)for(const d of l.changes)c.applyEdit(d.range,d.text);this._model.setSemanticTokens(a,!0)}else this._model.setSemanticTokens(null,!0);o()}}Td.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;class nie{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}}function rie(r){if(!r||!Array.isArray(r))return[];let e=[],t=0;for(let i=0,n=r.length;i<n;i++){let s=r[i],o=-1;if(typeof s.fontStyle=="string"){o=0;let c=s.fontStyle.split(" ");for(let d=0,u=c.length;d<u;d++)switch(c[d]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break}}let a=null;typeof s.foreground=="string"&&(a=s.foreground);let l=null;typeof s.background=="string"&&(l=s.background),e[t++]=new nie(s.token||"",i,o,a,l)}return e}function sie(r,e){r.sort((d,u)=>{let h=die(d.token,u.token);return h!==0?h:d.index-u.index});let t=0,i="000000",n="ffffff";for(;r.length>=1&&r[0].token==="";){let d=r.shift();d.fontStyle!==-1&&(t=d.fontStyle),d.foreground!==null&&(i=d.foreground),d.background!==null&&(n=d.background)}let s=new aie;for(let d of e)s.getId(d);let o=s.getId(i),a=s.getId(n),l=new YA(t,o,a),c=new ZA(l);for(let d=0,u=r.length;d<u;d++){let h=r[d];c.insert(h.token,h.fontStyle,s.getId(h.foreground),s.getId(h.background))}return new U8(s,c)}const oie=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class aie{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const t=e.match(oie);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]=q.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class U8{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(rie(e),t)}static createFromParsedTokenTheme(e,t){return sie(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(typeof i=="undefined"){let n=this._match(t),s=cie(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const lie=/\b(comment|string|regex|regexp)\b/;function cie(r){let e=r.match(lie);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function die(r,e){return r<e?-1:r>e?1:0}class YA{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new YA(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class ZA{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));let s=this._children.get(i);return typeof s!="undefined"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}let s=e.indexOf("."),o,a;s===-1?(o=e,a=""):(o=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(o);typeof l=="undefined"&&(l=new ZA(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,t,i,n)}}function uie(r){let e=[];for(let t=1,i=r.length;t<i;t++){let n=r[t];e[t]=`.mtk${t} { color: ${n}; }`}return e.push(".mtki { font-style: italic; }"),e.push(".mtkb { font-weight: bold; }"),e.push(".mtku { text-decoration: underline; text-underline-position: under; }"),e.join(` +`)}const hie={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:{[ts]:"#FFFFFE",[lc]:"#000000",[vA]:"#E5EBF1",[x0]:"#D3D3D3",[E0]:"#939393",[CA]:"#ADD6FF4D"}},fie={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:{[ts]:"#1E1E1E",[lc]:"#D4D4D4",[vA]:"#3A3D41",[x0]:"#404040",[E0]:"#707070",[CA]:"#ADD6FF26"}},gie={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:{[ts]:"#000000",[lc]:"#FFFFFF",[x0]:"#FFFFFF",[E0]:"#FFFFFF"}};function pie(){const r=new H,e=hte();return e.onDidChange(()=>r.fire()),{onDidChange:r.event,getCSS(){const t={},i=s=>{let o=s.defaults;for(;qt.isThemeIcon(o);){const l=e.getIcon(o.id);if(!l)return;o=l.defaults}const a=o.fontId;if(a){const l=e.getIconFont(a);if(l)return t[a]=l,`.codicon-${s.id}:before { content: '${o.fontCharacter}'; font-family: ${UR(a)}; }`}return`.codicon-${s.id}:before { content: '${o.fontCharacter}'; }`},n=[];for(let s of e.getIcons()){const o=i(s);o&&n.push(o)}for(let s in t){const a=t[s].definition.src.map(l=>`${dl(l.location)} format('${l.format}')`).join(", ");n.push(`@font-face { src: ${a}; font-family: ${UR(s)}; font-display: block; }`)}return n.join(` +`)}}}const Id="vs",Yw="vs-dark",Ef="hc-black",mie=_i.as(MW.ColorContribution),_ie=_i.as(pW.ThemingContribution);class z8{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(lC(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(let t in this.themeData.colors)e.set(t,q.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=AL(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,q.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=mie.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case Id:return Jr.LIGHT;case Ef:return Jr.HIGH_CONTRAST;default:return Jr.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=AL(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=U8.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=kn.getForeground(s),a=kn.getFontStyle(s);return{foreground:o,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4)}}}function lC(r){return r===Id||r===Yw||r===Ef}function AL(r){switch(r){case Id:return hie;case Yw:return fie;case Ef:return gie}}function cx(r){let e=AL(r);return new z8(r,e)}class bie extends Z{constructor(){super();this._onColorThemeChange=this._register(new H),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(Id,cx(Id)),this._knownThemes.set(Yw,cx(Yw)),this._knownThemes.set(Ef,cx(Ef));const e=pie();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(Id),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),bj("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return qy(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Pr(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Z.None}_registerShadowDomContainer(e){const t=Pr(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!lC(t.base)&&!lC(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new z8(e,t)),lC(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(Id),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Ef):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};_ie.getThemingParticipants().forEach(s=>s(this._theme,i,this._environment));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(uie(n)),this._themeCSS=e.join(` +`),this._updateCSS(),Qt.setColorMap(n),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} +${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var vie=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Cie=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const im="data-keybinding-context";class XA{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t=="undefined"&&this._parent?this._parent.getValue(e):t}}class Gf extends XA{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Gf.INSTANCE=new Gf;class Qm extends XA{constructor(e,t,i){super(e,null);this._configurationService=t,this._values=ff.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===6){const s=Array.from(at.map(this._values,([o])=>o));this._values.clear(),i.fire(new tP(s))}else{const s=[];for(const o of n.affectedKeys){const a=`config.${o}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...at.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new tP(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Qm._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Qm._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Qm._keyPrefix="config.";class wie{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class eP{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class tP{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class yie{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class j8{constructor(e){this._onDidChangeContext=new PC({merge:t=>new yie(t)}),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 wie(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 Sie(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return mf.contextMatchesRules(t,e)}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 eP(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new eP(e))}getContext(e){return this._isDisposed?Gf.INSTANCE:this.getContextValuesContainer(xie(e))}}let NL=class extends j8{constructor(e){super(0);this._contexts=new Map,this._toDispose=new ue,this._lastContextId=0;const t=new Qm(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Gf.INSTANCE:this._contexts.get(e)||Gf.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new XA(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};NL=vie([Cie(0,di)],NL);class Sie extends j8{constructor(e,t){super(e.createChildContext());if(this._parentChangeListener=new Un,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(im)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(im,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(im),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Gf.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)}}function xie(r){for(;r;){if(r.hasAttribute(im)){const e=r.getAttribute(im);return e?parseInt(e,10):NaN}r=r.parentElement}return 0}lt.registerCommand(PK,function(r,e,t){r.get(Be).createKey(String(e),t)});lt.registerCommand({id:"getContextKeyInfo",handler(){return[...xe.all()].sort((r,e)=>r.key.localeCompare(e.key))},description:{description:m("getContextKeyInfo","A command that returns information about context keys"),args:[]}});lt.registerCommand("_generateContextKeyInfo",function(){const r=[],e=new Set;for(let t of xe.all())e.has(t.key)||(e.add(t.key),r.push(t));r.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(r,void 0,2))});function iP(r){let e=r.definition;for(;e instanceof be;)e=e.definition;return`.codicon-${r.id}:before { content: '${e.fontCharacter}'; }`}var mn;(function(r){function e(s,o){if(s.start>=o.end||o.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,o.start),l=Math.min(s.end,o.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}r.intersect=e;function t(s){return s.end-s.start<=0}r.isEmpty=t;function i(s,o){return!t(e(s,o))}r.intersects=i;function n(s,o){const a=[],l={start:s.start,end:Math.min(o.start,s.end)},c={start:Math.max(o.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}r.relativeComplement=n})(mn||(mn={}));var Jl;(function(r){r[r.AVOID=0]="AVOID",r[r.ALIGN=1]="ALIGN"})(Jl||(Jl={}));function Xh(r,e,t){const i=t.mode===Jl.ALIGN?t.offset:t.offset+t.size,n=t.mode===Jl.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=r-i?i:e<=n?n-e:Math.max(r-e,0):e<=n?n-e:e<=r-i?i:0}class Kf extends Z{constructor(e,t){super();this.container=null,this.delegate=null,this.toDisposeOnClean=Z.None,this.toDisposeOnSetContainer=Z.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=oe(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Zn(this.view),this.setContainer(e,t),this._register(Xe(()=>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,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=oe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=Eie,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(oe("slot"))}else this.container.appendChild(this.view);const n=new ue;Kf.BUBBLE_UP_EVENTS.forEach(s=>{n.add(Ei(this.container,s,o=>{this.onDOMEvent(o,!1)}))}),Kf.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(Ei(this.container,s,o=>{this.onDOMEvent(o,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),Ki(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Tr(this.view),this.toDisposeOnClean=e.render(this.view)||Z.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(ra&&zy.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(l3(e)){let u=rn(e);t={top:u.top,left:u.left,width:u.width,height:u.height}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const i=ps(this.view),n=Dk(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;if(a===0){const u={offset:t.top-window.pageYOffset,size:t.height,position:s===0?0:1},h={offset:t.left,size:t.width,position:o===0?0:1,mode:Jl.ALIGN};l=Xh(window.innerHeight,n,u)+window.pageYOffset,mn.intersects({start:l,end:l+n},{start:u.offset,end:u.offset+u.size})&&(h.mode=Jl.AVOID),c=Xh(window.innerWidth,i,h)}else{const u={offset:t.left,size:t.width,position:o===0?0:1},h={offset:t.top,size:t.height,position:s===0?0:1,mode:Jl.ALIGN};c=Xh(window.innerWidth,i,u),mn.intersects({start:c,end:c+i},{start:u.offset,end:u.offset+u.size})&&(h.mode=Jl.AVOID),l=Xh(window.innerHeight,n,h)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const d=rn(this.container);this.view.style.top=`${l-(this.useFixedPosition?rn(this.view).top:d.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?rn(this.view).left:d.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,t!=null&&t.onHide&&t.onHide(e),this.toDisposeOnClean.dispose(),Zn(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Qo(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Kf.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];Kf.BUBBLE_DOWN_EVENTS=["click"];let Eie=` + :host { + all: initial; /* 1st rule so subsequent properties are reset. */ + } + + @font-face { + font-family: "codicon"; + font-display: block; + src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); + } + + .codicon[class*='codicon-'] { + font: normal normal normal 16px/1 codicon; + display: inline-block; + text-decoration: none; + text-rendering: auto; + text-align: center; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + user-select: none; + -webkit-user-select: none; + -ms-user-select: none; + } + + :host { + font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; + } + + :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } + :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } + :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } + :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } + :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } + + :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } + :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } + :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } + :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } + :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } + + :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } + :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; } + :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; } + :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; } + :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; } +`;function QA(...r){return function(e,t){for(let i=0,n=r.length;i<n;i++){const s=r[i](e,t);if(s)return s}return null}}const R0=kie.bind(void 0,!0);function kie(r,e,t){if(!t||t.length<e.length)return null;let i;return r?i=CD(t,e):i=t.indexOf(e)===0,i?e.length>0?[{start:0,end:e.length}]:[]:null}function q8(r,e){const t=e.toLowerCase().indexOf(r.toLowerCase());return t===-1?null:[{start:t,end:t+r.length}]}function Lie(r,e){return RL(r.toLowerCase(),e.toLowerCase(),0,0)}function RL(r,e,t,i){if(t===r.length)return[];if(i===e.length)return null;if(r[t]===e[i]){let n=null;return(n=RL(r,e,t+1,i+1))?tN({start:i,end:i+1},n):null}return RL(r,e,t,i+1)}function JA(r){return 97<=r&&r<=122}function O0(r){return 65<=r&&r<=90}function eN(r){return 48<=r&&r<=57}function G8(r){return r===32||r===9||r===10||r===13}const K8=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(r=>K8.add(r.charCodeAt(0)));function Zw(r){return G8(r)||K8.has(r)}function Tie(r,e){return r===e||Zw(r)&&Zw(e)}function Y8(r){return JA(r)||O0(r)||eN(r)}function tN(r,e){return e.length===0?e=[r]:r.end===e[0].start?e[0].start=r.start:e.unshift(r),e}function Z8(r,e){for(let t=e;t<r.length;t++){const i=r.charCodeAt(t);if(O0(i)||eN(i)||t>0&&!Y8(r.charCodeAt(t-1)))return t}return r.length}function OL(r,e,t,i){if(t===r.length)return[];if(i===e.length)return null;if(r[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=OL(r,e,t+1,i+1);!n&&(s=Z8(e,s))<e.length;)n=OL(r,e,t+1,s),s++;return n===null?null:tN({start:i,end:i+1},n)}}function Iie(r){let e=0,t=0,i=0,n=0,s=0;for(let d=0;d<r.length;d++)s=r.charCodeAt(d),O0(s)&&e++,JA(s)&&t++,Y8(s)&&i++,eN(s)&&n++;const o=e/r.length,a=t/r.length,l=i/r.length,c=n/r.length;return{upperPercent:o,lowerPercent:a,alphaPercent:l,numericPercent:c}}function Die(r){const{upperPercent:e,lowerPercent:t}=r;return t===0&&e>.6}function Aie(r){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=r;return t>.2&&e<.8&&i>.6&&n<.2}function Nie(r){let e=0,t=0,i=0,n=0;for(let s=0;s<r.length;s++)i=r.charCodeAt(s),O0(i)&&e++,JA(i)&&t++,G8(i)&&n++;return(e===0||t===0)&&n===0?r.length<=30:e<=5}function X8(r,e){if(!e||(e=e.trim(),e.length===0)||!Nie(r)||e.length>60)return null;const t=Iie(e);if(!Aie(t)){if(!Die(t))return null;e=e.toLowerCase()}let i=null,n=0;for(r=r.toLowerCase();n<e.length&&(i=OL(r,e,0,n))===null;)n=Z8(e,n+1);return i}function Rie(r,e,t=!1){if(!e||e.length===0)return null;let i=null,n=0;for(r=r.toLowerCase(),e=e.toLowerCase();n<e.length&&(i=ML(r,e,0,n,t))===null;)n=Q8(e,n+1);return i}function ML(r,e,t,i,n){if(t===r.length)return[];if(i===e.length)return null;if(Tie(r.charCodeAt(t),e.charCodeAt(i))){let s=null,o=i+1;if(s=ML(r,e,t+1,i+1,n),!n)for(;!s&&(o=Q8(e,o))<e.length;)s=ML(r,e,t+1,o,n),o++;return s===null?null:tN({start:i,end:i+1},s)}else return null}function Q8(r,e){for(let t=e;t<r.length;t++)if(Zw(r.charCodeAt(t))||t>0&&Zw(r.charCodeAt(t-1)))return t;return r.length}const Oie=QA(R0,X8,q8),Mie=QA(R0,X8,Lie),nP=new Bc(1e4);function rP(r,e,t=!1){if(typeof r!="string"||typeof e!="string")return null;let i=nP.get(r);i||(i=new RegExp(wj(r),"i"),nP.set(r,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?Mie(r,e):Oie(r,e)}function Pie(r,e,t,i,n,s){const o=Math.min(13,r.length);for(;t<o;t++){const a=Yf(r,e,t,i,n,s,!1);if(a)return a}return[0,s]}function M0(r){if(typeof r=="undefined")return[];const e=[],t=r[1];for(let i=r.length-1;i>1;i--){const n=r[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const ec=128;function iN(){const r=[],e=[];for(let t=0;t<=ec;t++)e[t]=0;for(let t=0;t<=ec;t++)r.push(e.slice(0));return r}function J8(r){const e=[];for(let t=0;t<=r;t++)e[t]=0;return e}const e6=J8(2*ec),PL=J8(2*ec),Ta=iN(),td=iN(),Qb=iN();function Jb(r,e){if(e<0||e>=r.length)return!1;const t=r.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!Mp(t)}}function sP(r,e){if(e<0||e>=r.length)return!1;switch(r.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function cC(r,e,t){return e[r]!==t[r]}function Fie(r,e,t,i,n,s,o=!1){for(;e<t&&n<s;)r[e]===i[n]&&(o&&(e6[e]=n),e+=1),n+=1;return e===t}var oo;(function(r){r.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}r.isDefault=e})(oo||(oo={}));function Yf(r,e,t,i,n,s,o){const a=r.length>ec?ec:r.length,l=i.length>ec?ec:i.length;if(t>=a||s>=l||a-t>l-s||!Fie(e,t,a,n,s,l,!0))return;Bie(a,l,t,s,e,n);let c=1,d=1,u=t,h=s;const f=[!1];for(c=1,u=t;u<a;c++,u++){const b=e6[u],C=PL[u],y=u+1<a?PL[u+1]:l;for(d=b-s+1,h=b;h<y;d++,h++){let E=Number.MIN_SAFE_INTEGER,S=!1;h<=C&&(E=Wie(r,e,u,t,i,n,h,l,s,Ta[c-1][d-1]===0,f));let w=0;E!==Number.MAX_SAFE_INTEGER&&(S=!0,w=E+td[c-1][d-1]);const x=h>b,D=x?td[c][d-1]+(Ta[c][d-1]>0?-5:0):0,M=h>b+1&&Ta[c][d-1]>0,B=M?td[c][d-2]+(Ta[c][d-2]>0?-5:0):0;if(M&&(!x||B>=D)&&(!S||B>=w))td[c][d]=B,Qb[c][d]=3,Ta[c][d]=0;else if(x&&(!S||D>=w))td[c][d]=D,Qb[c][d]=2,Ta[c][d]=0;else if(S)td[c][d]=w,Qb[c][d]=1,Ta[c][d]=Ta[c-1][d-1]+1;else throw new Error("not possible")}}if(!f[0]&&!o)return;c--,d--;const g=[td[c][d],s];let p=0,_=0;for(;c>=1;){let b=d;do{const C=Qb[c][b];if(C===3)b=b-2;else if(C===2)b=b-1;else break}while(b>=1);p>1&&e[t+c-1]===n[s+d-1]&&!cC(b+s-1,i,n)&&p+1>Ta[c][b]&&(b=d),b===d?p++:p=1,_||(_=b),c--,d=b-1,g.push(d)}l===a&&(g[0]+=2);const v=_-a;return g[0]-=v,g}function Bie(r,e,t,i,n,s){let o=r-1,a=e-1;for(;o>=t&&a>=i;)n[o]===s[a]&&(PL[o]=a,o--),a--}function Wie(r,e,t,i,n,s,o,a,l,c,d){if(e[t]!==s[o])return Number.MIN_SAFE_INTEGER;let u=1,h=!1;return o===t-i?u=r[t]===n[o]?7:5:cC(o,n,s)&&(o===0||!cC(o-1,n,s))?(u=r[t]===n[o]?7:5,h=!0):Jb(s,o)&&(o===0||!Jb(s,o-1))?u=5:(Jb(s,o-1)||sP(s,o-1))&&(u=5,h=!0),u>1&&t===i&&(d[0]=!0),h||(h=cC(o,n,s)||Jb(s,o-1)||sP(s,o-1)),t===i?o>l&&(u-=h?3:5):c?u+=h?2:0:u+=h?0:1,o+1===a&&(u-=h?3:5),u}function Vie(r,e,t,i,n,s,o){return Hie(r,e,t,i,n,s,!0,o)}function Hie(r,e,t,i,n,s,o,a){let l=Yf(r,e,t,i,n,s,a);if(l&&!o)return l;if(r.length>=3){const c=Math.min(7,r.length-1);for(let d=t+1;d<c;d++){const u=$ie(r,d);if(u){const h=Yf(u,u.toLowerCase(),t,i,n,s,a);h&&(h[0]-=3,(!l||h[0]>l[0])&&(l=h))}}}return l}function $ie(r,e){if(e+1>=r.length)return;const t=r[e],i=r[e+1];if(t!==i)return r.slice(0,e)+i+t+r.slice(e+2)}const nm="$(",nN=new RegExp(`\\$\\(${hr.iconNameExpression}(?:${hr.iconModifierExpression})?\\)`,"g"),Uie=new RegExp(`(\\\\)?${nN.source}`,"g");function zie(r){return r.replace(Uie,(e,t)=>t?e:`\\${e}`)}const jie=new RegExp(`\\\\${nN.source}`,"g");function qie(r){return r.replace(jie,e=>`\\${e}`)}const Gie=new RegExp(`(\\s)?(\\\\)?${nN.source}(\\s)?`,"g");function t6(r){return r.indexOf(nm)===-1?r:r.replace(Gie,(e,t,i,n)=>i?e:t||n||"")}function ev(r){const e=r.indexOf(nm);return e===-1?{text:r}:Kie(r,e)}function Kie(r,e){const t=[];let i="";function n(h){if(h){i+=h;for(const f of h)t.push(a)}}let s=-1,o="",a=0,l,c,d=e;const u=r.length;for(n(r.substr(0,e));d<u;)l=r[d],c=r[d+1],l===nm[0]&&c===nm[1]?(s=d,n(o),o=nm,d++):l===")"&&s!==-1?(a+=d-s+1,s=-1,o=""):s!==-1?/^[a-z0-9\-]$/i.test(l)?o+=l:(n(o),s=-1,o=""):n(l),d++;return n(o),{text:i,iconOffsets:t}}function tv(r,e,t=!1){const{text:i,iconOffsets:n}=e;if(!n||n.length===0)return rP(r,i,t);const s=_D(i," "),o=i.length-s.length,a=rP(r,s,t);if(a)for(const l of a){const c=n[l.start+o]+o;l.start+=c,l.end+=c}return a}const FL=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,dx=/(&)?(&)([^\s&])/g,i6=Ms("menu-selection",be.check),n6=Ms("menu-submenu",be.chevronRight);var Xw;(function(r){r[r.Right=0]="Right",r[r.Left=1]="Left"})(Xw||(Xw={}));class Dd extends fl{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation");super(n,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...tt||ir?[10]:[]],keyDown:!0}});this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new ue),this.initializeStyleSheet(e),this._register(Lt.addTarget(n)),J(n,Te.KEY_DOWN,a=>{new ei(a).equals(2)&&a.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(J(n,Te.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){xt.stop(a,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof oP&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1){const d=c.shift();d&&d.container&&(this.focusItemByElement(d.container),c.push(d)),this.mnemonics.set(l,c)}}})),ir&&this._register(J(n,Te.KEY_DOWN,a=>{const l=new ei(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),xt.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),xt.stop(a,!0))})),this._register(J(this.domNode,Te.MOUSE_OUT,a=>{let l=a.relatedTarget;Qo(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(J(this.actionsList,Te.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!Qo(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(Lt.addTarget(this.actionsList)),this._register(J(this.actionsList,Vt.Tap,a=>{let l=a.initialTarget;if(!(!l||!Qo(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new Q_(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(J(n,Vt.Change,a=>{xt.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(J(o,Te.MOUSE_UP,a=>{a.preventDefault()})),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(a=>{var l;return!((l=i.submenuIds)===null||l===void 0)&&l.has(a.id)?(console.warn(`Found submenu cycle: ${a.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof ux)).forEach((a,l,c)=>{a.updatePositionInSet(l+1,c.length)})}initializeStyleSheet(e){qy(e)?(this.styleSheet=Pr(e),this.styleSheet.textContent=aP):(Dd.globalStyleSheet||(Dd.globalStyleSheet=Pr(),Dd.globalStyleSheet.textContent=aP),this.styleSheet=Dd.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",s=e.borderColor?`1px solid ${e.borderColor}`:"",o=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=s,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(a=>{(a instanceof BL||a instanceof ux)&&a.style(e)})}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.actionsList.children.length;t++){let i=this.actionsList.children[t];if(e===i){this.focusedItem=t;break}}}updateFocus(e){super.updateFocus(e,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof Is)return new ux(t.context,e,{icon:!0});if(e instanceof m0){const n=new oP(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const s=n.getMnemonic();if(s&&n.isEnabled()){let o=[];this.mnemonics.has(s)&&(o=this.mnemonics.get(s)),o.push(n),this.mnemonics.set(s,o)}}return n}else{const n={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const o=t.getKeyBinding(e);if(o){const a=o.getLabel();a&&(n.keybinding=a)}}const s=new BL(t.context,e,n);if(t.enableMnemonics){const o=s.getMnemonic();if(o&&s.isEnabled()){let a=[];this.mnemonics.has(o)&&(a=this.mnemonics.get(o)),a.push(s),this.mnemonics.set(o,a)}}return s}}}class BL extends qd{constructor(e,t,i={}){i.isMenu=!0;super(t,t,i);if(this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass="",this.options.label&&i.enableMnemonics){let n=this.getAction().label;if(n){let s=FL.exec(n);s&&(this.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new $t(()=>{!this.element||(this._register(J(this.element,Te.MOUSE_UP,n=>{if(xt.stop(n,!0),Bn){if(new Zr(n).rightButton)return;this.onClick(n)}else setTimeout(()=>{this.onClick(n)},0)})),this._register(J(this.element,Te.CONTEXT_MENU,n=>{xt.stop(n,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),this.element&&(this.container=e,this.item=X(this.element,oe("a.action-menu-item")),this._action.id===Is.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=X(this.item,oe("span.menu-item-check"+i6.cssSelector)),this.check.setAttribute("role","none"),this.label=X(this.item,oe("span.action-label")),this.options.label&&this.options.keybinding&&(X(this.item,oe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(!!this.label&&this.options.label){Ki(this.label);let e=t6(this.getAction().label);if(e){const t=Yie(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=FL.exec(e);if(i){e=mD(e),dx.lastIndex=0;let n=dx.exec(e);for(;n&&n[1];)n=dx.exec(e);const s=o=>o.replace(/&&/g,"&");n?this.label.append(_D(s(e.substr(0,n.index))," "),oe("u",{"aria-hidden":"true"},n[3]),h3(s(e.substr(n.index+n[0].length))," ")):this.label.innerText=s(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().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.getAction().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(){!this.item||(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;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?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class oP extends BL{constructor(e,t,i,n){super(e,e,n);this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new ue),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:Xw.Right,this.showScheduler=new $t(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new $t(()=>{this.element&&!Qo(uf(),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=X(this.item,oe("span.submenu-indicator"+n6.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(J(this.element,Te.KEY_UP,t=>{let i=new ei(t);(i.equals(17)||i.equals(3))&&(xt.stop(t,!0),this.createSubmenu(!0))})),this._register(J(this.element,Te.KEY_DOWN,t=>{let i=new ei(t);uf()===this.item&&(i.equals(17)||i.equals(3))&&xt.stop(t,!0)})),this._register(J(this.element,Te.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(J(this.element,Te.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(J(this.element,Te.FOCUS_OUT,t=>{this.element&&!Qo(uf(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(e){xt.stop(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{}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=Xh(e.width,t.width,{position:n===Xw.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(s.left=i.left+10),i.top+=10,i.height=0),s.top=Xh(e.height,t.height,{position:0,offset:i.top,size:0}),s.top+t.height===i.top&&s.top+i.height+t.height<=e.height&&(s.top+=i.height),s}createSubmenu(e=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=X(this.element,oe("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new Dd(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new _0],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),s={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},o=this.submenuContainer.getBoundingClientRect(),{top:a,left:l}=this.calculateSubmenuMenuLayout(new Ht(window.innerWidth,window.innerHeight),Ht.lift(o),s,this.expandDirection);this.submenuContainer.style.left=`${l-o.left}px`,this.submenuContainer.style.top=`${a-o.top}px`,this.submenuDisposables.add(J(this.submenuContainer,Te.KEY_UP,c=>{new ei(c).equals(15)&&(xt.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(J(this.submenuContainer,Te.KEY_DOWN,c=>{new ei(c).equals(15)&&xt.stop(c,!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&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?`${t}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class ux extends Zm{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function Yie(r){const e=FL,t=e.exec(r);if(!t)return r;const i=!t[1];return r.replace(e,i?"$2$3":"").trim()}let aP=` +.monaco-menu { + font-size: 13px; + +} + +${iP(i6)} +${iP(n6)} + +.monaco-menu .monaco-action-bar { + text-align: right; + overflow: hidden; + white-space: nowrap; +} + +.monaco-menu .monaco-action-bar .actions-container { + display: flex; + margin: 0 auto; + padding: 0; + width: 100%; + justify-content: flex-end; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: inline-block; +} + +.monaco-menu .monaco-action-bar.reverse .actions-container { + flex-direction: row-reverse; +} + +.monaco-menu .monaco-action-bar .action-item { + cursor: pointer; + display: inline-block; + transition: transform 50ms ease; + position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ +} + +.monaco-menu .monaco-action-bar .action-item.disabled { + cursor: default; +} + +.monaco-menu .monaco-action-bar.animated .action-item.active { + transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ +} + +.monaco-menu .monaco-action-bar .action-item .icon, +.monaco-menu .monaco-action-bar .action-item .codicon { + display: inline-block; +} + +.monaco-menu .monaco-action-bar .action-item .codicon { + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar .action-label { + font-size: 11px; + margin-right: 4px; +} + +.monaco-menu .monaco-action-bar .action-item.disabled .action-label, +.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { + opacity: 0.4; +} + +/* Vertical actions */ + +.monaco-menu .monaco-action-bar.vertical { + text-align: left; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + display: block; + border-bottom: 1px solid #bbb; + padding-top: 1px; + margin-left: .8em; + margin-right: .8em; +} + +.monaco-menu .secondary-actions .monaco-action-bar .action-label { + margin-left: 6px; +} + +/* Action Items */ +.monaco-menu .monaco-action-bar .action-item.select-container { + overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ + flex: 1; + max-width: 170px; + min-width: 60px; + display: flex; + align-items: center; + justify-content: center; + margin-right: 10px; +} + +.monaco-menu .monaco-action-bar.vertical { + margin-left: 0; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .actions-container { + display: block; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + padding: 0; + transform: none; + display: flex; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.active { + transform: none; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + flex: 1 1 auto; + display: flex; + height: 2em; + align-items: center; + position: relative; +} + +.monaco-menu .monaco-action-bar.vertical .action-label { + flex: 1 1 auto; + text-decoration: none; + padding: 0 1em; + background: none; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .keybinding, +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + display: inline-block; + flex: 2 1 auto; + padding: 0 1em; + text-align: right; + font-size: 12px; + line-height: 1; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { + font-size: 16px !important; + display: flex; + align-items: center; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { + margin-left: auto; + margin-right: -20px; +} + +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, +.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { + opacity: 0.4; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { + display: inline-block; + box-sizing: border-box; + margin: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + position: static; + overflow: visible; +} + +.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { + position: absolute; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + padding: 0.5em 0 0 0; + margin-bottom: 0.5em; + width: 100%; + height: 0px !important; + margin-left: .8em !important; + margin-right: .8em !important; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { + padding: 0.7em 1em 0.1em 1em; + font-weight: bold; + opacity: 1; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:hover { + color: inherit; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + position: absolute; + visibility: hidden; + width: 1em; + height: 100%; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { + visibility: visible; + display: flex; + align-items: center; + justify-content: center; +} + +/* Context Menu */ + +.context-view.monaco-menu-container { + outline: 0; + border: none; + animation: fadeIn 0.083s linear; + -webkit-app-region: no-drag; +} + +.context-view.monaco-menu-container :focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, +.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { + outline: 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-item { + border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ +} + + +/* High Contrast Theming */ +:host-context(.hc-black) .context-view.monaco-menu-container { + box-shadow: none; +} + +:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused { + background: none; +} + +/* Vertical Action Bar Styles */ + +.monaco-menu .monaco-action-bar.vertical { + padding: .5em 0; +} + +.monaco-menu .monaco-action-bar.vertical .action-menu-item { + height: 1.8em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), +.monaco-menu .monaco-action-bar.vertical .keybinding { + font-size: inherit; + padding: 0 2em; +} + +.monaco-menu .monaco-action-bar.vertical .menu-item-check { + font-size: inherit; + width: 2em; +} + +.monaco-menu .monaco-action-bar.vertical .action-label.separator { + font-size: inherit; + padding: 0.2em 0 0 0; + margin-bottom: 0.2em; +} + +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { + margin-left: 0; + margin-right: 0; +} + +.monaco-menu .monaco-action-bar.vertical .submenu-indicator { + font-size: 60%; + padding: 0 1.8em; +} + +:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { + height: 100%; + mask-size: 10px 10px; + -webkit-mask-size: 10px 10px; +} + +.monaco-menu .action-item { + cursor: default; +} + +/* Arrows */ +.monaco-scrollable-element > .scrollbar > .scra { + cursor: pointer; + font-size: 11px !important; +} + +.monaco-scrollable-element > .visible { + opacity: 1; + + /* Background rule added for IE9 - to allow clicks on dom node */ + background:rgba(0,0,0,0); + + transition: opacity 100ms linear; +} +.monaco-scrollable-element > .invisible { + opacity: 0; + pointer-events: none; +} +.monaco-scrollable-element > .invisible.fade { + transition: opacity 800ms linear; +} + +/* Scrollable Content Inset Shadow */ +.monaco-scrollable-element > .shadow { + position: absolute; + display: none; +} +.monaco-scrollable-element > .shadow.top { + display: block; + top: 0; + left: 3px; + height: 3px; + width: 100%; + box-shadow: #DDD 0 6px 6px -6px inset; +} +.monaco-scrollable-element > .shadow.left { + display: block; + top: 3px; + left: 0; + height: 100%; + width: 3px; + box-shadow: #DDD 6px 0 6px -6px inset; +} +.monaco-scrollable-element > .shadow.top-left-corner { + display: block; + top: 0; + left: 0; + height: 3px; + width: 3px; +} +.monaco-scrollable-element > .shadow.top.left { + box-shadow: #DDD 6px 6px 6px -6px inset; +} + +/* ---------- Default Style ---------- */ + +:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(100, 100, 100, .4); +} +:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(121, 121, 121, .4); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider { + background: rgba(111, 195, 223, .6); +} + +.monaco-scrollable-element > .scrollbar > .slider:hover { + background: rgba(100, 100, 100, .7); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover { + background: rgba(111, 195, 223, .8); +} + +.monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(0, 0, 0, .6); +} +:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(191, 191, 191, .4); +} +:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active { + background: rgba(111, 195, 223, 1); +} + +:host-context(.vs-dark) .monaco-scrollable-element .shadow.top { + box-shadow: none; +} + +:host-context(.vs-dark) .monaco-scrollable-element .shadow.left { + box-shadow: #000 6px 0 6px -6px inset; +} + +:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left { + box-shadow: #000 6px 6px 6px -6px inset; +} + +:host-context(.hc-black) .monaco-scrollable-element .shadow.top { + box-shadow: none; +} + +:host-context(.hc-black) .monaco-scrollable-element .shadow.left { + box-shadow: none; +} + +:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left { + box-shadow: none; +} +`;function js(r,e){const t=Object.create(null);for(let i in e){const n=e[i];n&&(t[i]=Na(n,r))}return t}function rN(r,e,t){function i(){const n=js(r.getColorTheme(),e);typeof t=="function"?t(n):t.style(n)}return i(),r.onDidColorThemeChange(i)}function Zie(r,e,t){return rN(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||Yp,badgeForeground:(t==null?void 0:t.badgeForeground)||Zp,badgeBorder:gi},r)}function du(r,e,t){return rN(e,Object.assign(Object.assign({},P0),t||{}),r)}const P0={listFocusBackground:ZZ,listFocusForeground:XZ,listFocusOutline:QZ,listActiveSelectionBackground:dc,listActiveSelectionForeground:uc,listActiveSelectionIconForeground:tC,listFocusAndSelectionBackground:dc,listFocusAndSelectionForeground:uc,listInactiveSelectionBackground:JZ,listInactiveSelectionIconForeground:tX,listInactiveSelectionForeground:eX,listInactiveFocusBackground:iX,listInactiveFocusOutline:nX,listHoverBackground:rX,listHoverForeground:sX,listDropBackground:oX,listSelectionOutline:Tn,listHoverOutline:Tn,listFilterWidgetBackground:aX,listFilterWidgetOutline:lX,listFilterWidgetNoMatchesOutline:cX,listMatchesShadow:Sc,treeIndentGuidesStroke:dX,tableColumnsBorder:uX},Xie={shadowColor:Sc,borderColor:hX,foregroundColor:fX,backgroundColor:gX,selectionForegroundColor:pX,selectionBackgroundColor:mX,selectionBorderColor:_X,separatorColor:bX};function Qie(r,e,t){return rN(e,Object.assign(Object.assign({},Xie),t),r)}class Jie{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i,n=l3(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(s.className+=" "+o),this.options.blockMouse&&(this.block=s.appendChild(oe(".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",J(this.block,Te.MOUSE_DOWN,c=>c.stopPropagation()));const a=new ue,l=e.actionRunner||new Vf;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new Dd(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(Qie(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(J(window,Te.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(J(window,Te.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;let d=new Zr(c),u=d.target;if(!d.rightButton){for(;u;){if(u===s)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),rc(a,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide&&e.onHide(!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!ga(e.error)&&this.notificationService.error(e.error)}}var ene=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tp=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let WL=class extends Z{constructor(e,t,i,n,s){super();this.contextMenuHandler=new Jie(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),Ed.getInstance().resetKeyStatus()}};WL=ene([tp(0,Wc),tp(1,ki),tp(2,Vc),tp(3,Zt),tp(4,Gt)],WL);const F0=bt("layoutService");var tne=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ine=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let VL=class extends Z{constructor(e){super();this.layoutService=e,this.currentViewDisposable=Z.None,this.container=e.container,this.contextView=this._register(new Kf(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.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=Xe(()=>{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)}};VL=tne([ine(0,F0)],VL);const tb=bt("dialogService");class nne{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class rne{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let 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 nne(e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join(` +`)}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}class lP extends Error{constructor(e){var t;super("cyclic dependency between services");this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: +${e.toString()}`}}class Qw{constructor(e=new qm,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(gt,this)}createChild(e){return new Qw(e,this._strict,this)}invokeFunction(e,...t){let i=ys.traceInvocation(e),n=!1;try{return e({get:(o,a)=>{if(n)throw pz("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(o,i);if(!l&&a!==Wz)throw new Error(`[invokeFunction] unknown service '${o}'`);return l}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof Vl?(i=ys.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=ys.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Js.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){let l=this._getOrCreateServiceInstance(a.id,i);if(!l&&this._strict&&!a.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`);s.push(l)}let o=n.length>0?n[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let a=o-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,o)}return new e(...[...t,...s])}_setServiceInstance(e,t){if(this._services.get(e)instanceof Vl)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof Vl?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){const n=new rne(a=>a.id.toString());let s=0;const o=[{id:e,desc:t,_trace:i}];for(;o.length;){const a=o.pop();if(n.lookupOrInsertNode(a),s++>1e3)throw new lP(n);for(let l of Js.getServiceDependencies(a.desc.ctor)){let c=this._getServiceInstanceOrDescriptor(l.id);if(!c&&!l.optional&&console.warn(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`),c instanceof Vl){const d={id:l.id,desc:c,_trace:a._trace.branch(l.id,!0)};n.insertEdge(a,d),o.push(d)}}}for(;;){const a=n.roots();if(a.length===0){if(!n.isEmpty())throw new lP(n);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof Vl){const d=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,d)}n.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof Vl)return this._createServiceInstance(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){if(i){const s=new df(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let l=s.value,c=l[a];return typeof c!="function"||(c=c.bind(l),o[a]=c),c},set(o,a,l){return s.value[a]=l,!0}})}else return this._createInstance(e,t,n)}}class ys{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return ys._None}static traceCreation(e){return ys._None}branch(e,t){let i=new ys(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;ys._totals+=e;let t=!1;function i(s,o){let a=[],l=new Array(s+1).join(" ");for(const[c,d,u]of o._dep)if(d&&u){t=!0,a.push(`${l}CREATES -> ${c}`);let h=i(s+1,u);h&&a.push(h)}else a.push(`${l}uses -> ${c}`);return a.join(` +`)}let n=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${ys._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join(` +`))}}ys._None=new class extends ys{constructor(){super(-1,null)}stop(){}branch(){return this}};ys._totals=0;const ib=bt("labelService");class sne{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class id extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function cP(r,e){const t=[];for(let i of e){if(r.start>=i.range.end)continue;if(r.end<i.range.start)break;const n=mn.intersect(r,i.range);mn.isEmpty(n)||t.push({range:n,size:i.size})}return t}function HL({start:r,end:e},t){return{start:r+t,end:e+t}}function one(r){const e=[];let t=null;for(let i of r){const n=i.range.start,s=i.range.end,o=i.size;if(t&&o===t.size){t.range.end=s;continue}t={range:{start:n,end:s},size:o},e.push(t)}return e}function ane(...r){return one(r.reduce((e,t)=>e.concat(t),[]))}class dP{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,s=cP({start:0,end:e},this.groups),o=cP({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:HL(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=ane(s,a,o),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.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;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s*n.size;if(e<o)return t+Math.floor((e-i)/n.size);t+=s,i=o}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s;if(e<o)return t+(e-i)*n.size;t+=s*n.size,i=o}return-1}}function lne(r){try{r.parentElement&&r.parentElement.removeChild(r)}catch{}}class cne{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=oe(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(i);t={domNode:i,templateId:e,templateData:s}}return t}release(e){!e||this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),lne(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var zu=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const Eo={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(r){return[r]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class nb{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class dne{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class une{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;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function hne(r,e){return Array.isArray(r)&&Array.isArray(e)?Ls(r,e):r===e}class fne{constructor(e){e!=null&&e.getSetSize?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(t,i,n)=>n,e!=null&&e.getPosInSet?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,e!=null&&e.getRole?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",e!=null&&e.isChecked?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class bo{constructor(e,t,i,n=Eo){if(this.virtualDelegate=t,this.domId=`list_id_${++bo.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new cl(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Z.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Z.None,this.onDragLeaveTimeout=Z.None,this.disposables=new ue,this._onDidChangeContentHeight=new H,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 dP;for(const o of i)this.renderers.set(o.templateId,o);this.cache=this.disposables.add(new cne(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",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=xo(n,o=>o.horizontalScrolling,Eo.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof n.additionalScrollHeight=="undefined"?0:n.additionalScrollHeight,this.accessibilityProvider=new fne(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",xo(n,o=>o.transformOptimization,Eo.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(Lt.addTarget(this.rowsContainer)),this.scrollable=new I0(xo(n,o=>o.smoothScrolling,!1)?125:0,o=>oa(o)),this.scrollableElement=this.disposables.add(new NA(this.rowsContainer,{alwaysConsumeMouseWheel:xo(n,o=>o.alwaysConsumeMouseWheel,Eo.alwaysConsumeMouseWheel),horizontal:1,vertical:xo(n,o=>o.verticalScrollMode,Eo.verticalScrollMode),useShadows:xo(n,o=>o.useShadows,Eo.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(J(this.rowsContainer,Vt.Change,o=>this.onTouchChange(o))),this.disposables.add(J(this.scrollableElement.getDomNode(),"scroll",o=>o.target.scrollTop=0)),this.disposables.add(J(this.domNode,"dragover",o=>this.onDragOver(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"drop",o=>this.onDrop(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"dragleave",o=>this.onDragLeave(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"dragend",o=>this.onDragEnd(o))),this.setRowLineHeight=xo(n,o=>o.setRowLineHeight,Eo.setRowLineHeight),this.setRowHeight=xo(n,o=>o.setRowHeight,Eo.setRowHeight),this.supportDynamicHeights=xo(n,o=>o.supportDynamicHeights,Eo.supportDynamicHeights),this.dnd=xo(n,o=>o.dnd,Eo.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}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 t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:r1(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=""}}updateOptions(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}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=mn.intersect(n,s),a=new Map;for(let S=o.start;S<o.end;S++){const w=this.items[S];if(w.dragStartDisposable.dispose(),w.row){let x=a.get(w.templateId);x||(x=[],a.set(w.templateId,x));const D=this.renderers.get(w.templateId);D&&D.disposeElement&&D.disposeElement(w.element,S,w.row.templateData,w.size),x.push(w.row)}w.row=null}const l={start:e+t,end:this.items.length},c=mn.intersect(l,n),d=mn.relativeComplement(l,n),u=i.map(S=>({id:String(this.itemId++),element:S,templateId:this.virtualDelegate.getTemplateId(S),size:this.virtualDelegate.getHeight(S),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(S),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Z.None}));let h;e===0&&t>=this.items.length?(this.rangeMap=new dP,this.rangeMap.splice(0,0,u),h=this.items,this.items=u):(this.rangeMap.splice(e,t,u),h=this.items.splice(e,t,...u));const f=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=HL(c,f),_=mn.intersect(g,p);for(let S=_.start;S<_.end;S++)this.updateItemInDOM(this.items[S],S);const v=mn.relativeComplement(p,g);for(const S of v)for(let w=S.start;w<S.end;w++)this.removeItemFromDOM(w);const b=d.map(S=>HL(S,f)),y=[{start:e,end:e+i.length},...b].map(S=>mn.intersect(g,S)),E=this.getNextToLastElement(y);for(const S of y)for(let w=S.start;w<S.end;w++){const x=this.items[w],D=a.get(x.templateId),M=D==null?void 0:D.pop();this.insertItemInDOM(w,E,M)}for(const S of a.values())for(const w of S)this.cache.release(w);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),h.map(S=>S.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=oa(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width!="undefined"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10})}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}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:typeof e=="number"?e:cj(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t!="undefined"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:r1(this.domNode)})}render(e,t,i,n,s,o=!1){const a=this.getRenderRange(t,i),l=mn.relativeComplement(a,e),c=mn.relativeComplement(e,a),d=this.getNextToLastElement(l);if(o){const u=mn.intersect(e,a);for(let h=u.start;h<u.end;h++)this.updateItemInDOM(this.items[h],h)}for(const u of l)for(let h=u.start;h<u.end;h++)this.insertItemInDOM(h,d);for(const u of c)for(let h=u.start;h<u.end;h++)this.removeItemFromDOM(h);n!==void 0&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&s!==void 0&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];n.row||(n.row=i!=null?i:this.cache.alloc(n.templateId));const s=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",s);const o=this.accessibilityProvider.isChecked(n.element);typeof o!="undefined"&&n.row.domNode.setAttribute("aria-checked",String(!!o)),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}`);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=J(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Bn?"-moz-fit-content":"fit-content",e.width=r1(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.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.additionalScrollHeight}get onMouseClick(){return ke.map(this.disposables.add(new Mt(this.domNode,"click")).event,e=>this.toMouseEvent(e))}get onMouseDblClick(){return ke.map(this.disposables.add(new Mt(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return ke.filter(ke.map(this.disposables.add(new Mt(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e)),e=>e.browserEvent.button===1)}get onMouseDown(){return ke.map(this.disposables.add(new Mt(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e))}get onContextMenu(){return ke.any(ke.map(this.disposables.add(new Mt(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e)),ke.map(this.disposables.add(new Mt(this.domNode,Vt.Contextmenu)).event,e=>this.toGestureEvent(e)))}get onTouchStart(){return ke.map(this.disposables.add(new Mt(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e))}get onTap(){return ke.map(this.disposables.add(new Mt(this.rowsContainer,Vt.Tap)).event,e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}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){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(I8.TEXT,t),i.dataTransfer.setDragImage){let s;this.dnd.getDragLabel&&(s=this.dnd.getDragLabel(n,i)),typeof s=="undefined"&&(s=String(n.length));const o=oe(".monaco-drag-image");o.textContent=s,document.body.appendChild(o),i.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>document.body.removeChild(o),0)}this.currentDragData=new nb(n),Ra.CurrentDragAndDropData=new dne(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),Ra.CurrentDragAndDropData&&Ra.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(Ra.CurrentDragAndDropData)this.currentDragData=Ra.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new une}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect===0?"copy":"move";let i;if(typeof t!="boolean"&&t.feedback?i=t.feedback:typeof e.index=="undefined"?i=[-1]:i=[e.index],i=j3(i).filter(n=>n>=-1&&n<this.length).sort((n,s)=>n-s),i=i[0]===-1?[-1]:i,hne(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Xe(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const n of i){const s=this.items[n];s.dropTarget=!0,s.row&&s.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Xe(()=>{for(const n of i){const s=this.items[n];s.dropTarget=!1,s.row&&s.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=Qd(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||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.currentDragData=void 0,Ra.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){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,Ra.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Z.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=r3(this.domNode).top;this.dragOverAnimationDisposable=_j(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=Qd(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)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 n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}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 a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let d=l.start;d<l.end;d++){const u=this.probeDynamicHeight(d);u!==0&&this.rangeMap.splice(d,1,[this.items[d]]),a+=u,c=c||u!==0}if(!c){a!==0&&this.eventuallyUpdateScrollDimensions();const d=mn.relativeComplement(n,l);for(const h of d)for(let f=h.start;f<h.end;f++)this.items[f].row&&this.removeItemFromDOM(f);const u=mn.relativeComplement(l,n);for(const h of u)for(let f=h.start;f<h.end;f++){const g=f+1,p=g<this.items.length?this.items[g].row:null,_=p?p.domNode:null;this.insertItemInDOM(f,_)}for(let h=l.start;h<l.end;h++)this.items[h].row&&this.updateItemInDOM(this.items[h],h);if(typeof s=="number"){const h=this.scrollable.getFutureScrollPosition().scrollTop-e,f=this.elementTop(s)-o+h;this.setScrollTop(f,i)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){const t=this.items[e];if(this.virtualDelegate.getDynamicHeight){const o=this.virtualDelegate.getDynamicHeight(t.element);if(o!==null){const a=t.size;return t.size=o,t.lastDynamicHeightWidth=this.renderWidth,o-a}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row){let o=t.row.domNode.offsetHeight;return t.size=o,t.lastDynamicHeightWidth=this.renderWidth,o-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const s=this.renderers.get(t.templateId);return s&&(s.renderElement(t.element,e,n.templateData,void 0),s.disposeElement&&s.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return!i||!i.row?null:i.row.domNode}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),ft(this.disposables)}}bo.InstanceCount=0;zu([Li],bo.prototype,"onMouseClick",null);zu([Li],bo.prototype,"onMouseDblClick",null);zu([Li],bo.prototype,"onMouseMiddleClick",null);zu([Li],bo.prototype,"onMouseDown",null);zu([Li],bo.prototype,"onContextMenu",null);zu([Li],bo.prototype,"onTouchStart",null);zu([Li],bo.prototype,"onTap",null);var ju=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},uP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class gne{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index<e?n.push(s):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(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}class Jw{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new H,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new gne(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,o=e+t,a=[...this.sortedIndexes.filter(c=>c<e),...i.map((c,d)=>c?d+e:-1).filter(c=>c!==-1),...this.sortedIndexes.filter(c=>c>=o).map(c=>c+s)],l=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&l>0){const c=(n=this.sortedIndexes.find(d=>d>=e))!==null&&n!==void 0?n:l-1;a.push(Math.min(c,l-1))}this.renderer.splice(e,t,i.length),this._set(a,a),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(fP),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=$L(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return BD(this.sortedIndexes,e,fP)>=0}dispose(){ft(this._onChange)}}ju([Li],Jw.prototype,"renderer",null);class pne extends Jw{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 hx{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,i.map(()=>!1));const n=this.trait.get().map(o=>this.identityProvider.getId(this.view.element(o)).toString()),s=i.map(o=>n.indexOf(this.identityProvider.getId(o).toString())>-1);this.trait.splice(e,t,s)}}function kc(r){return r.tagName==="INPUT"||r.tagName==="TEXTAREA"}function Qh(r){return r.classList.contains("monaco-editor")?!0:r.classList.contains("monaco-list")||!r.parentElement?!1:Qh(r.parentElement)}class r6{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new ue,this.multipleSelectionDisposables=new ue,this.onKeyDown.filter(n=>n.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===9).on(this.onEscape,this,this.disposables),i.multipleSelectionSupport!==!1&&this.onKeyDown.filter(n=>(tt?n.metaKey:n.ctrlKey)&&n.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return ke.chain(this.disposables.add(new Mt(this.view.domNode,"keydown")).event).filter(e=>!kc(e.target)).map(e=>new ei(e))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(t=>(tt?t.metaKey:t.ctrlKey)&&t.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}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(Nn(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()}}ju([Li],r6.prototype,"onKeyDown",null);var Jh;(function(r){r[r.Idle=0]="Idle",r[r.Typing=1]="Typing"})(Jh||(Jh={}));const s6=new class{mightProducePrintableCharacter(r){return r.ctrlKey||r.metaKey||r.altKey?!1:r.keyCode>=31&&r.keyCode<=56||r.keyCode>=21&&r.keyCode<=30||r.keyCode>=93&&r.keyCode<=102||r.keyCode>=80&&r.keyCode<=90}};class mne{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=Jh.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new ue,this.disposables=new ue,this.updateOptions(e.options)}updateOptions(e){(typeof e.enableKeyboardNavigation=="undefined"?!0:!!e.enableKeyboardNavigation)?this.enable():this.disable(),typeof e.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=ke.chain(this.enabledDisposables.add(new Mt(this.view.domNode,"keydown")).event).filter(n=>!kc(n.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(n=>new ei(n)).filter(n=>this.delegate.mightProducePrintableCharacter(n)).forEach(n=>{n.stopPropagation(),n.preventDefault()}).map(n=>n.browserEvent.key).event,t=ke.debounce(e,()=>null,800);ke.reduce(ke.any(e,t),(n,s)=>s===null?null:(n||"")+s)(this.onInput,this,this.enabledDisposables),t(this.onClear,this,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=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&sn(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Jh.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Jh.Idle?1:0;this.state=Jh.Typing;for(let s=0;s<this.list.length;s++){const o=(i+s+n)%this.list.length,a=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),l=a&&a.toString();if(typeof l=="undefined"||R0(e,l)){this.previouslyFocused=i,this.list.setFocus([o]),this.list.reveal(o);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class _ne{constructor(e,t){this.list=e,this.view=t,this.disposables=new ue,ke.chain(this.disposables.add(new Mt(t.domNode,"keydown")).event).filter(n=>!kc(n.target)).map(n=>new ei(n)).filter(n=>n.keyCode===2&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey&&!n.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=window.getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function o6(r){return tt?r.browserEvent.metaKey:r.browserEvent.ctrlKey}function a6(r){return r.browserEvent.shiftKey}function bne(r){return r instanceof MouseEvent&&r.button===2}const hP={isSelectionSingleChangeEvent:o6,isSelectionRangeChangeEvent:a6};class l6{constructor(e){this.list=e,this.disposables=new ue,this._onPointer=new H,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hP),this.mouseSupport=typeof e.options.mouseSupport=="undefined"||!!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(Lt.addTarget(e.getHTMLElement()))),ke.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||hP))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){Qh(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Qh(e.browserEvent.target))return;const t=typeof e.index=="undefined"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||kc(e.browserEvent.target)||Qh(e.browserEvent.target))return;const t=e.index;if(typeof t=="undefined"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(e))return this.changeSelection(e);if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),bne(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(kc(e.browserEvent.target)||Qh(e.browserEvent.target)||this.isSelectionChangeEvent(e))return;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(typeof i=="undefined"){const d=this.list.getFocus()[0];i=d!=null?d:t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),o=Nn(n,s+1),a=this.list.getSelection(),l=wne($L(a,[i]),i);if(l.length===0)return;const c=$L(o,yne(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(o=>o!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class c6{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):tt||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } + `),e.listFocusAndSelectionForeground&&i.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } + `),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(` + .monaco-drag-image, + .monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } + `),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(` + .monaco-list${t}.drop-target, + .monaco-list${t} .monaco-list-rows.drop-target, + .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; } + `),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(` + .monaco-table:hover > .monaco-split-view2, + .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { + border-color: ${e.tableColumnsBorder}; + }`),this.styleElement.textContent=i.join(` +`)}}const vne={listFocusBackground:q.fromHex("#7FB0D0"),listActiveSelectionBackground:q.fromHex("#0E639C"),listActiveSelectionForeground:q.fromHex("#FFFFFF"),listActiveSelectionIconForeground:q.fromHex("#FFFFFF"),listFocusAndSelectionBackground:q.fromHex("#094771"),listFocusAndSelectionForeground:q.fromHex("#FFFFFF"),listInactiveSelectionBackground:q.fromHex("#3F3F46"),listInactiveSelectionIconForeground:q.fromHex("#FFFFFF"),listHoverBackground:q.fromHex("#2A2D2E"),listDropBackground:q.fromHex("#383B3D"),treeIndentGuidesStroke:q.fromHex("#a9a9a9"),tableColumnsBorder:q.fromHex("#cccccc").transparent(.2)},Cne={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function wne(r,e){const t=r.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&r[n]===e-(t-n);)i.push(r[n--]);for(i.reverse(),n=t;n<r.length&&r[n]===e+(n-t);)i.push(r[n++]);return i}function $L(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){t.push(r[i]),i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):t.push(e[n++]);return t}function yne(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):n++;return t}const fP=(r,e)=>r-e;class Sne{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){let s=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class xne{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);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class Ene{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){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,o;(o=(s=this.dnd).onDragLeave)===null||o===void 0||o.call(s,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class ma{constructor(e,t,i,n,s=Cne){var o;this.user=e,this._options=s,this.focus=new Jw("focused"),this.anchor=new Jw("anchor"),this.eventBufferer=new oD,this._ariaLabel="",this.disposables=new ue,this._onDidDispose=new H,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(o=this._options.accessibilityProvider)===null||o===void 0?void 0:o.getWidgetRole():"list";this.selection=new pne(a!=="listbox"),_o(s,vne,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(l.push(new xne(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(d=>new Sne(d.templateId,[...l,d]));const c=Object.assign(Object.assign({},s),{dnd:s.dnd&&new Ene(this,s.dnd)});if(this.view=new bo(t,i,n,c),this.view.domNode.setAttribute("role",a),s.styleController)this.styleController=s.styleController(this.view.domId);else{const d=Pr(this.view.domNode);this.styleController=new c6(d,this.view.domId)}if(this.spliceable=new sne([new hx(this.focus,this.view,s.identityProvider),new hx(this.selection,this.view,s.identityProvider),new hx(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 _ne(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new r6(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const d=s.keyboardNavigationDelegate||s6;this.typeLabelController=new mne(this,this.view,s.keyboardNavigationLabelProvider,d),this.disposables.add(this.typeLabelController)}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()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return ke.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return ke.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ke.chain(this.disposables.add(new Mt(this.view.domNode,"keydown")).event).map(s=>new ei(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map($M).filter(()=>!1).event,i=ke.chain(this.disposables.add(new Mt(this.view.domNode,"keyup")).event).forEach(()=>e=!1).map(s=>new ei(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map($M).map(({browserEvent:s})=>{const o=this.getFocus(),a=o.length?o[0]:void 0,l=typeof a!="undefined"?this.view.element(a):void 0,c=typeof a!="undefined"?this.view.domElement(a):this.view.domNode;return{index:a,element:l,anchor:c,browserEvent:s}}).event,n=ke.chain(this.view.onContextMenu).filter(s=>!e).map(({element:s,index:o,browserEvent:a})=>({element:s,index:o,anchor:{x:a.pageX+1,y:a.pageY},browserEvent:a})).event;return ke.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Mt(this.view.domNode,"keydown")).event}get onDidFocus(){return ke.signal(this.disposables.add(new Mt(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new l6(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(t=this.keyboardController)===null||t===void 0||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new id(this.user,`Invalid start index: ${e}`);if(t<0)throw new id(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||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 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 id(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(typeof e=="undefined"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new id(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return Kk(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e=="undefined"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new id(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)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(this.length===0)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 uP(this,void 0,void 0,function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.view.element(i),s=this.getFocusedElements()[0];if(s!==n){const o=this.findPreviousIndex(i,!1,t);o>-1&&s!==this.view.element(o)?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();this.view.setScrollTop(o+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==o&&(this.setFocus([]),yield mc(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return uP(this,void 0,void 0,function*(){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.view.element(i),o=this.getFocusedElements()[0];if(o!==s){const a=this.findNextIndex(i,!1,t);a>-1&&o!==this.view.element(a)?this.setFocus([a],e):this.setFocus([i],e)}else{const a=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==a&&(this.setFocus([]),yield mc(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)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(this.length===0)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;n++){if(e>=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new id(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(Jd(t)){const o=s-this.view.renderHeight;this.view.setScrollTop(o*bs(t,0,1)+n)}else{const o=n+s,a=i+this.view.renderHeight;n<i&&o>=a||(n<i||o>=a&&s>=this.view.renderHeight?this.view.setScrollTop(n):o>=a&&this.view.setScrollTop(o-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new id(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+this.view.renderHeight)return null;const s=n-this.view.renderHeight;return Math.abs((t-i)/s)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),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;!((e=this.accessibilityProvider)===null||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",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}ju([Li],ma.prototype,"onDidChangeFocus",null);ju([Li],ma.prototype,"onDidChangeSelection",null);ju([Li],ma.prototype,"onContextMenu",null);ju([Li],ma.prototype,"onKeyDown",null);ju([Li],ma.prototype,"onDidFocus",null);class kne{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Z.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const o=new Hn,a=s.resolve(e,o.token);i.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(l=>this.renderer.renderElement(l,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 Lne{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}}function Tne(r,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new Lne(r,e.accessibilityProvider)})}class Ine{constructor(e,t,i,n,s={}){const o=()=>this.model,a=n.map(l=>new kne(l,o));this.list=new ma(e,t,i,a,Tne(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ke.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ke.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ke.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Nn(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 Dne={separatorBorder:q.transparent};class d6{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(e,t){e!==this.visible&&(e?(this.size=bs(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(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 snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class Ane extends d6{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Nne extends d6{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var Oa;(function(r){r[r.Idle=0]="Idle",r[r.Busy=1]="Busy"})(Oa||(Oa={}));var ey;(function(r){r.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}r.Split=e;function t(i){return{type:"invisible",cachedVisibleSize:i}}r.Invisible=t})(ey||(ey={}));class u6 extends Z{constructor(e,t={}){var i,n;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=Oa.Idle,this._onDidSashChange=this._register(new H),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new H),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=Pn(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=Pn(t.proportionalLayout)?!0:!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=X(this.el,oe(".sash-container")),this.viewContainer=oe(".split-view-container"),this.scrollable=new I0(125,oa),this.scrollableElement=this._register(new NA(this.viewContainer,{vertical:this.orientation===0?(i=t.scrollbarVisibility)!==null&&i!==void 0?i:1:2,horizontal:this.orientation===1?(n=t.scrollbarVisibility)!==null&&n!==void 0?n:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(s=>{this.viewContainer.scrollTop=s.scrollTop,this.viewContainer.scrollLeft=s.scrollLeft})),X(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||Dne),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((s,o)=>{const a=Pn(s.visible)||s.visible?s.size:{type:"invisible",cachedVisibleSize:s.size},l=s.view;this.doAddView(l,a,o,!0)}),this.contentSize=this.viewItems.reduce((s,o)=>s+o.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}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)for(let n=0;n<this.viewItems.length;n++){const s=this.viewItems[n];s.size=bs(Math.round(this.proportions[n]*e),s.minimumSize,s.maximumSize)}else{const n=Nn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=rc(J(document.body,"keydown",a=>o(this.sashDragState.current,a.altKey)),J(document.body,"keyup",()=>o(this.sashDragState.current,!1))),o=(a,l)=>{const c=this.viewItems.map(g=>g.size);let d=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const p=this.viewItems[n];d=(p.minimumSize-p.size)/2,u=(p.maximumSize-p.size)/2}else{const p=this.viewItems[n+1];d=(p.size-p.maximumSize)/2,u=(p.size-p.minimumSize)/2}let h,f;if(!l){const g=Nn(n,-1),p=Nn(n+1,this.viewItems.length),_=g.reduce((x,D)=>x+(this.viewItems[D].minimumSize-c[D]),0),v=g.reduce((x,D)=>x+(this.viewItems[D].viewMaximumSize-c[D]),0),b=p.length===0?Number.POSITIVE_INFINITY:p.reduce((x,D)=>x+(c[D]-this.viewItems[D].minimumSize),0),C=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((x,D)=>x+(c[D]-this.viewItems[D].viewMaximumSize),0),y=Math.max(_,C),E=Math.min(b,v),S=this.findFirstSnapIndex(g),w=this.findFirstSnapIndex(p);if(typeof S=="number"){const x=this.viewItems[S],D=Math.floor(x.viewMinimumSize/2);h={index:S,limitDelta:x.visible?y-D:y+D,size:x.size}}if(typeof w=="number"){const x=this.viewItems[w],D=Math.floor(x.viewMinimumSize/2);f={index:w,limitDelta:x.visible?E+D:E-D,size:x.size}}}this.sashDragState={start:a,current:a,index:n,sizes:c,minDelta:d,maxDelta:u,alt:l,snapBefore:h,snapAfter:f,disposable:s}};o(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const d=e-i,u=this.resize(t,d,n,void 0,void 0,o,a,l,c);if(s){const h=t===this.sashItems.length-1,f=this.viewItems.map(C=>C.size),g=h?t:t+1,p=this.viewItems[g],_=p.size-p.maximumSize,v=p.size-p.minimumSize,b=h?t-1:t+1;this.resize(b,-u,f,void 0,void 0,_,v)}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=typeof t=="number"?t:e.size,t=bs(t,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!==Oa.Idle)throw new Error("Cant modify splitview");if(this.state=Oa.Busy,e<0||e>=this.viewItems.length)return;const i=Nn(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),o=this.viewItems[e];t=Math.round(t),t=bs(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s),this.state=Oa.Idle}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=bs(i,a.minimumSize,a.maximumSize);const n=Nn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);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!==Oa.Idle)throw new Error("Cant modify splitview");this.state=Oa.Busy;const s=oe(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const o=e.onDidChange(h=>this.onViewChange(d,h)),a=Xe(()=>this.viewContainer.removeChild(s)),l=rc(o,a);let c;typeof t=="number"?c=t:t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize;const d=this.orientation===0?new Ane(s,e,c,l):new Nne(s,e,c,l);if(this.viewItems.splice(i,0,d),this.viewItems.length>1){let h={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const f=this.orientation===0?new _n(this.sashContainer,{getHorizontalSashTop:x=>this.getSashPosition(x),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:1})):new _n(this.sashContainer,{getVerticalSashLeft:x=>this.getSashPosition(x),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},h),{orientation:0})),g=this.orientation===0?x=>({sash:f,start:x.startY,current:x.currentY,alt:x.altKey}):x=>({sash:f,start:x.startX,current:x.currentX,alt:x.altKey}),_=ke.map(f.onDidStart,g)(this.onSashStart,this),b=ke.map(f.onDidChange,g)(this.onSashChange,this),y=ke.map(f.onDidEnd,()=>this.sashItems.findIndex(x=>x.sash===f))(this.onSashEnd,this),E=f.onDidReset(()=>{const x=this.sashItems.findIndex(j=>j.sash===f),D=Nn(x,-1),M=Nn(x+1,this.viewItems.length),B=this.findFirstSnapIndex(D),z=this.findFirstSnapIndex(M);typeof B=="number"&&!this.viewItems[B].visible||typeof z=="number"&&!this.viewItems[z].visible||this._onDidSashReset.fire(x)}),S=rc(_,b,y,E,f),w={sash:f,disposable:S};this.sashItems.splice(i-1,0,w)}s.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),n||this.relayout([i],u),this.state=Oa.Idle,!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.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(d=>d.size),n,s,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const d=Nn(e,-1),u=Nn(e+1,this.viewItems.length);if(s)for(const w of s)v1(d,w),v1(u,w);if(n)for(const w of n)Rb(d,w),Rb(u,w);const h=d.map(w=>this.viewItems[w]),f=d.map(w=>i[w]),g=u.map(w=>this.viewItems[w]),p=u.map(w=>i[w]),_=d.reduce((w,x)=>w+(this.viewItems[x].minimumSize-i[x]),0),v=d.reduce((w,x)=>w+(this.viewItems[x].maximumSize-i[x]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((w,x)=>w+(i[x]-this.viewItems[x].minimumSize),0),C=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((w,x)=>w+(i[x]-this.viewItems[x].maximumSize),0),y=Math.max(_,C,o),E=Math.min(b,v,a);let S=!1;if(l){const w=this.viewItems[l.index],x=t>=l.limitDelta;S=x!==w.visible,w.setVisible(x,l.size)}if(!S&&c){const w=this.viewItems[c.index],x=t<c.limitDelta;S=x!==w.visible,w.setVisible(x,c.size)}if(S)return this.resize(e,t,i,n,s,o,a);t=bs(t,y,E);for(let w=0,x=t;w<h.length;w++){const D=h[w],M=bs(f[w]+x,D.minimumSize,D.maximumSize);x-=M-f[w],D.size=M}for(let w=0,x=t;w<g.length;w++){const D=g[w],M=bs(p[w]-x,D.minimumSize,D.maximumSize);x+=M-p[w],D.size=M}return t}distributeEmptySpace(e){const t=this.viewItems.reduce((a,l)=>a+l.size,0);let i=this.size-t;const n=Nn(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);for(const a of o)v1(n,a);for(const a of s)Rb(n,a);typeof e=="number"&&Rb(n,e);for(let a=0;i!==0&&a<n.length;a++){const l=this.viewItems[n[a]],c=bs(l.size+i,l.minimumSize,l.maximumSize);i-=c-l.size,l.size=c}}layoutViews(){this.contentSize=this.viewItems.reduce((t,i)=>t+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?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(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const o=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l<this.sashItems.length;l++){const{sash:c}=this.sashItems[l];a+=this.viewItems[l].size;const u=!(t[l]&&o[l+1]),h=!(i[l]&&s[l+1]);if(u&&h){const f=Nn(l,-1),g=Nn(l+1,this.viewItems.length),p=this.findFirstSnapIndex(f),_=this.findFirstSnapIndex(g),v=typeof p=="number"&&!this.viewItems[p].visible,b=typeof _=="number"&&!this.viewItems[_].visible;v&&s[l]&&(a>0||this.startSnappingEnabled)?c.state=1:b&&t[l]&&(a<this.contentSize||this.endSnappingEnabled)?c.state=2:c.state=0}else u&&!h?c.state=1:!u&&h?c.state=2:c.state=3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const i=this.viewItems[t];if(!!i.visible&&i.snap)return t}for(const t of e){const i=this.viewItems[t];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}class rb{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=rb.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const o=n.get(s.templateId);if(!o)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(o)}}renderTemplate(e){const t=X(e,oe(".monaco-table-tr")),i=[],n=[];for(let o=0;o<this.columns.length;o++){const a=this.renderers[o],l=X(t,oe(".monaco-table-td",{"data-col-index":o}));l.style.width=`${this.getColumnSize(o)}px`,i.push(l),n.push(a.renderTemplate(l))}const s={container:e,cellContainers:i,cellTemplateData:n};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const a=this.columns[s].project(e);this.renderers[s].renderElement(a,t,i.cellTemplateData[s],n)}}disposeElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const o=this.renderers[s];if(o.disposeElement){const l=this.columns[s].project(e);o.disposeElement(l,t,i.cellTemplateData[s],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);Ki(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}rb.TemplateId="row";function Rne(r){return{getHeight(e){return r.getHeight(e)},getTemplateId(){return rb.TemplateId}}}class One{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new H,this.onDidLayout=this._onDidLayout.event,this.element=oe(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return(e=this.column.minimumWidth)!==null&&e!==void 0?e:120}get maximumSize(){var e;return(e=this.column.maximumWidth)!==null&&e!==void 0?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return(e=this.column.onDidChangeWidthConstraints)!==null&&e!==void 0?e:ke.None}layout(e){this._onDidLayout.fire([this.index,e])}}class B0{constructor(e,t,i,n,s,o){this.virtualDelegate=i,this.domId=`table_id_${++B0.InstanceCount}`,this.cachedHeight=0,this.domNode=X(t,oe(`.monaco-table.${this.domId}`));const a=n.map((d,u)=>new One(d,u)),l={size:a.reduce((d,u)=>d+u.column.weight,0),views:a.map(d=>({size:d.column.weight,view:d}))};this.splitview=new u6(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l}),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new rb(n,s,d=>this.splitview.getViewSize(d));this.list=new ma(e,this.domNode,Rne(i),[c],o),this.columnLayoutDisposable=ke.any(...a.map(d=>d.onDidLayout))(([d,u])=>c.layoutColumn(d,u)),this.styleElement=Pr(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}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 { + top: ${this.virtualDelegate.headerRowHeight+1}px; + height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); + }`),this.styleElement.textContent=t.join(` +`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}B0.InstanceCount=0;var rm;(function(r){r[r.Unknown=0]="Unknown",r[r.Twistie=1]="Twistie",r[r.Element=2]="Element"})(rm||(rm={}));class Yr extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class sN{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 oN(r){return typeof r=="object"&&"visibility"in r&&"data"in r}function Jm(r){switch(r){case!0:return 1;case!1:return 0;default:return r}}function fx(r){return typeof r.collapsible=="boolean"}class Mne{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new oD,this._onDidChangeCollapseState=new H,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new H,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new H,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof n.collapseByDefault=="undefined"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren=="undefined"?!1: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=at.empty(),n={}){if(e.length===0)throw new Yr(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 a;n===void 0&&(n=at.empty()),o===void 0&&(o=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t),c=[...n],d=t[t.length-1],u=new Uo({getElements:()=>l.children.map(_=>e.getId(_.element).toString())},{getElements:()=>[...l.children.slice(0,d),...c,...l.children.slice(d+i)].map(_=>e.getId(_.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return this.spliceSimple(t,i,c,s);const h=t.slice(0,-1),f=(_,v,b)=>{if(o>0)for(let C=0;C<b;C++)_--,v--,this.spliceSmart(e,[...h,_,0],Number.MAX_SAFE_INTEGER,c[v].children,s,o-1)};let g=Math.min(l.children.length,d+i),p=c.length;for(const _ of u.changes.sort((v,b)=>b.originalStart-v.originalStart))f(g,p,g-(_.originalStart+_.originalLength)),g=_.originalStart,p=_.modifiedStart-d,this.spliceSimple([...h,g],_.originalLength,at.slice(c,p,p+_.modifiedLength),s);f(g,p,g)}spliceSimple(e,t,i=at.empty(),{onDidCreateNode:n,onDidDeleteNode:s}){const{parentNode:o,listIndex:a,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),d=[],u=at.map(i,S=>this.createTreeNode(S,o,o.visible?1:0,l,d,n)),h=e[e.length-1],f=o.children.length>0;let g=0;for(let S=h;S>=0&&S<o.children.length;S--){const w=o.children[S];if(w.visible){g=w.visibleChildIndex;break}}const p=[];let _=0,v=0;for(const S of u)p.push(S),v+=S.renderNodeCount,S.visible&&(S.visibleChildIndex=g+_++);const b=kG(o.children,h,t,p);let C=0;for(const S of b)S.visible&&C++;if(C!==0)for(let S=h+p.length;S<o.children.length;S++){const w=o.children[S];w.visible&&(w.visibleChildIndex-=C)}if(o.visibleChildrenCount+=_-C,l&&c){const S=b.reduce((w,x)=>w+(x.visible?x.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,v-S),this.list.splice(a,S,d)}if(b.length>0&&s){const S=w=>{s(w),w.children.forEach(S)};b.forEach(S)}const y=o.children.length>0;f!==y&&this.setCollapsible(e.slice(0,-1),y),this._onDidSplice.fire({insertedNodes:p,deletedNodes:b});let E=o;for(;E;){if(E.visibility===2){this.refilter();break}E=E.parent}}rerender(e){if(e.length===0)throw new Yr(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);typeof t=="undefined"&&(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);typeof t=="undefined"&&(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&&!fx(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l<i.children.length;l++)if(i.children[l].visible)if(a>-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],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,a=this.updateNodeAfterCollapseChange(e),l=o-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(fx(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})),!fx(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)}createTreeNode(e,t,i,n,s,o){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed!="undefined",collapsed:typeof e.collapsed=="undefined"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const c=e.children||at.empty(),d=n&&l!==0&&!a.collapsed,u=at.map(c,g=>this.createTreeNode(g,a,l,d,s,o));let h=0,f=1;for(const g of u)a.children.push(g),f+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=h++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=h,a.visible=l===2?h>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=f):(a.renderNodeCount=0,n&&s.pop()),o&&o(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)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),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,s,i,n&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1),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(t!==0)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 typeof i=="boolean"?(e.filterData=void 0,i?1:0):oN(i)?(e.filterData=i.data,Jm(i.visibility)):(e.filterData=void 0,Jm(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new Yr(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)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 Yr(this.user,"Invalid tree location");const a=t.children[o];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[o,...a]=e;if(o<0||o>t.children.length)throw new Yr(this.user,"Invalid tree location");for(let l=0;l<o;l++)i+=t.children[l].renderNodeCount;return n=n&&!t.collapsed,s=s&&t.visible,a.length===0?{parentNode:t,listIndex:i,revealed:n,visible:s}:this.getParentNodeWithListIndex(a,t.children[o],i+1,n,s)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){if(e.length!==0)return e.length===1?[]:yG(e)[0]}}const gP=Ms("tree-item-expanded",be.chevronDown),pP=Ms("tree-filter-on-type-on",be.listFilter),mP=Ms("tree-filter-on-type-off",be.listSelection),Pne=Ms("tree-filter-clear",be.close),ty=Ms("tree-item-loading",be.loading);class Fne extends nb{constructor(e){super(e.elements.map(t=>t.element));this.data=e}}function gx(r){return r instanceof nb?new Fne(r):r}class Bne{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Z.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(gx(e),t)}onDragOver(e,t,i,n,s=!0){const o=this.dnd.onDragOver(gx(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t=="undefined")return o;if(a&&typeof o!="boolean"&&o.autoExpand&&(this.autoExpandDisposable=Qd(()=>{const h=this.modelProvider(),f=h.getNodeLocation(t);h.isCollapsed(f)&&h.setCollapsed(f,!1),this.autoExpandNode=void 0},500)),typeof o=="boolean"||!o.accept||typeof o.bubble=="undefined"||o.feedback){if(!s){const h=typeof o=="boolean"?o:o.accept,f=typeof o=="boolean"?void 0:o.effect;return{accept:h,effect:f,feedback:[i]}}return o}if(o.bubble===1){const h=this.modelProvider(),f=h.getNodeLocation(t),g=h.getParentNodeLocation(f),p=h.getNode(g),_=g&&h.getListIndex(g);return this.onDragOver(e,p,_,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),d=l.getListIndex(c),u=l.getListRenderCount(c);return Object.assign(Object.assign({},o),{feedback:Nn(d,d+u)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(gx(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function Wne(r,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new Bne(r,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const i=r(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),enableKeyboardNavigation:e.simpleKeyboardNavigation})}class aN{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){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var e_;(function(r){r.None="none",r.OnHover="onHover",r.Always="always"})(e_||(e_={}));class Vne{constructor(e,t=[]){this._elements=t,this.onDidChange=ke.forEach(e,i=>this._elements=i)}get elements(){return this._elements}}class t_{constructor(e,t,i,n,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=t_.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new _K,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Z.None,this.disposables=new ue,this.templateId=e.templateId,this.updateOptions(s),ke.map(i,o=>o.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent!="undefined"&&(this.indent=bs(e.indent,0,40)),typeof e.renderIndentGuides!="undefined"){const t=e.renderIndentGuides!==e_.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const i=new ue;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof e.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=X(e,oe(".monaco-tl-row")),i=X(t,oe(".monaco-tl-indent")),n=X(t,oe(".monaco-tl-twistie")),s=X(t,oe(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Z.None,templateData:o}}renderElement(e,t,i,n){typeof n=="number"&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const s=t_.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${s}px`,i.indent.style.width=`${s+this.indent-16}px`,this.renderTwistie(e,i),typeof n=="number"&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),typeof n=="number"&&(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.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...gP.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...gP.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Ki(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new ue,n=this.modelProvider();let s=e;for(;;){const o=n.getNodeLocation(s),a=n.getParentNodeLocation(o);if(!a)break;const l=n.getNode(a),c=oe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add(Xe(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const o=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):o&&t.add(i.getNode(o))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),ft(this.disposables)}}t_.DefaultIndent=8;class Hne{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 ue,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const s=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return s;let o;if(typeof s=="boolean"?o=s?1:0:oN(s)?o=Jm(s.visibility):o=s,o===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:oo.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const s of n){const o=s&&s.toString();if(typeof o=="undefined")return{data:oo.Default,visibility:!0};const a=Yf(this._pattern,this._lowercasePattern,0,o,o.toLowerCase(),0,!0);if(a)return this._matchCount++,n.length===1?{data:a,visibility:!0}:{data:{label:o,score:a},visibility:!0}}return this.tree.options.filterOnType?2:{data:oo.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){ft(this.disposables)}}class $ne{constructor(e,t,i,n,s){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new H,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new H,this.enabledDisposables=new ue,this.disposables=new ue,this.domNode=oe(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(J(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=X(i.getHTMLElement(),oe(".monaco-list-type-filter-message")),this.labelDomNode=X(this.domNode,oe("span.label"));const o=X(this.domNode,oe(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=X(o,oe("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(J(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=X(o,oe("button.clear"+Pne.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=m("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),typeof e.filterOnType!="undefined"&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof e.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new Mt(this.view.getHTMLElement(),"keydown")),t=ke.chain(e.event).filter(n=>!kc(n.target)||n.target===this.filterOnTypeDomNode).filter(n=>n.key!=="Dead"&&!/^Media/.test(n.key)).map(n=>new ei(n)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(n=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(n)&&!(n.keyCode===18||n.keyCode===16||n.keyCode===15||n.keyCode===17)||(this.pattern.length>0||this.triggered)&&(n.keyCode===9||n.keyCode===1)&&!n.altKey&&!n.ctrlKey&&!n.metaKey||n.keyCode===1&&(tt?n.altKey&&!n.metaKey:n.ctrlKey)&&!n.shiftKey).forEach(n=>{n.stopPropagation(),n.preventDefault()}).event,i=this.enabledDisposables.add(new Mt(this.clearDomNode,"click"));ke.chain(ke.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){typeof e=="string"?this.onInput(e):e instanceof MouseEvent||e.keyCode===9||e.keyCode===1&&(tt?e.altKey:e.ctrlKey)?this.onInput(""):e.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,n=>!oo.isDefault(n.filterData));const i=this.tree.getFocus();if(i.length>0){const n=i[0];this.tree.getRelativeTop(n)===null&&this.tree.reveal(n,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=rn(e),i=e.clientWidth,n=i/2,s=this.domNode.clientWidth,o=new ue;let a=this.positionClassName;const l=()=>{switch(a){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${i-s-6}px`;break}},c=u=>{u.preventDefault();const h=u.clientX-t;u.dataTransfer&&(u.dataTransfer.dropEffect="none"),h<n?a="nw":a="ne",l()},d=()=>{this.positionClassName=a,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",ft(o)};l(),this.domNode.classList.remove(a),this.domNode.classList.add("dragging"),o.add(Xe(()=>this.domNode.classList.remove("dragging"))),o.add(J(document,"dragover",u=>c(u))),o.add(J(this.domNode,"dragend",()=>d())),Ra.CurrentDragAndDropData=new lte("vscode-ui"),o.add(Xe(()=>Ra.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...mP.classNamesArray),this.filterOnTypeDomNode.classList.add(...pP.classNamesArray),this.filterOnTypeDomNode.title=m("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...pP.classNamesArray),this.filterOnTypeDomNode.classList.add(...mP.classNamesArray),this.filterOnTypeDomNode.title=m("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=m("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=m("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!oo.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),ft(this.disposables)}}function _P(r){let e=rm.Unknown;return HR(r.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=rm.Twistie:HR(r.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(e=rm.Element),{browserEvent:r.browserEvent,element:r.element?r.element.element:null,target:e}}function dC(r,e){e(r),r.children.forEach(t=>dC(t,e))}class px{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new H,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!(!((i=t)===null||i===void 0)&&i.__forceEvent)&&Ls(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 n=this;this._onDidChange.fire({get elements(){return n.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 l=this.createNodeSet(),c=d=>l.delete(d);t.forEach(d=>dC(d,c)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>dC(l,n));const s=new Map,o=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>dC(l,o));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{const u=s.get(c);u&&a.push(u)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class Une extends l6{constructor(e,t){super(e);this.tree=t}onViewPointer(e){if(kc(e.browserEvent.target)||Qh(e.browserEvent.target))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(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const o=this.tree.model,a=o.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),o.setCollapsed(a,void 0,l),s&&n)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(e)}}class zne extends ma{constructor(e,t,i,n,s,o,a,l){super(e,t,i,n,l);this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=a}createMouseController(e){return new Une(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let o;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(o=e+l)}),n.length>0&&super.setFocus(mO([...super.getFocus(),...n])),s.length>0&&super.setSelection(mO([...super.getSelection(),...s])),typeof o=="number"&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class h6{constructor(e,t,i,n,s={}){this._options=s,this.eventBufferer=new oD,this.disposables=new ue,this._onWillRefilter=new H,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new H;const o=new aN(i),a=new FR,l=new FR,c=new Vne(l.event);this.renderers=n.map(h=>new t_(h,()=>this.model,a.event,c,s));for(let h of this.renderers)this.disposables.add(h);let d;s.keyboardNavigationLabelProvider&&(d=new Hne(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:d}),this.disposables.add(d)),this.focus=new px(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new px(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new px(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new zne(e,t,o,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},Wne(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const u=ke.forEach(this.model.onDidSplice,h=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(h),this.selection.onDidModelSplice(h)})});if(u(()=>null,null,this.disposables),l.input=ke.chain(ke.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const h=new Set;for(const f of this.focus.getNodes())h.add(f);for(const f of this.selection.getNodes())h.add(f);return[...h.values()]}).event,s.keyboardSupport!==!1){const h=ke.chain(this.view.onKeyDown).filter(f=>!kc(f.target)).map(f=>new ei(f));h.filter(f=>f.keyCode===15).on(this.onLeftArrow,this,this.disposables),h.filter(f=>f.keyCode===17).on(this.onRightArrow,this,this.disposables),h.filter(f=>f.keyCode===10).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const h=s.keyboardNavigationDelegate||s6;this.typeFilterController=new $ne(this,this.model,this.view,d,h),this.focusNavigationFilter=f=>this.typeFilterController.shouldAllowFocus(f),this.disposables.add(this.typeFilterController)}this.styleElement=Pr(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===e_.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ke.map(this.view.onMouseDblClick,_P)}get onPointer(){return ke.map(this.view.onPointer,_P)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===e_.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,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.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join(` +`),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,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(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return t===-1?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const o=this.model.getParentNodeLocation(n);if(!o)return;const a=this.model.getListIndex(o);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[o]=this.view.getFocus(),a=o+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){ft(this.disposables),this.view.dispose()}}class lN{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new Mne(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=at.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=at.empty(),i){const n=new Set,s=new Set,o=l=>{var c;if(l.element===null)return;const d=l;if(n.add(d.element),this.nodes.set(d.element,d),this.identityProvider){const u=this.identityProvider.getId(d.element).toString();s.add(u),this.nodesByIdentity.set(u,d)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,d)},a=l=>{var c;if(l.element===null)return;const d=l;if(n.has(d.element)||this.nodes.delete(d.element),this.identityProvider){const u=this.identityProvider.getId(d.element).toString();s.has(u)||this.nodesByIdentity.delete(u)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,d)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:o,onDidDeleteNode:a}))}preserveCollapseState(e=at.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),at.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const o=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(o)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed!="undefined"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(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(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new Yr(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new Yr(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new Yr(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(e===null)return[];const t=this.nodes.get(e);if(!t)throw new Yr(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function uC(r){const e=[r.element],t=r.incompressible||!1;return{element:{elements:e,incompressible:t},children:at.map(at.from(r.children),uC),collapsible:r.collapsible,collapsed:r.collapsed}}function hC(r){const e=[r.element],t=r.incompressible||!1;let i,n;for(;[n,i]=at.consume(at.from(r.children),2),!(n.length!==1||n[0].incompressible);)r=n[0],e.push(r.element);return{element:{elements:e,incompressible:t},children:at.map(at.concat(n,i),hC),collapsible:r.collapsible,collapsed:r.collapsed}}function UL(r,e=0){let t;return e<r.element.elements.length-1?t=[UL(r,e+1)]:t=at.map(at.from(r.children),i=>UL(i,0)),e===0&&r.element.incompressible?{element:r.element.elements[e],children:t,incompressible:!0,collapsible:r.collapsible,collapsed:r.collapsed}:{element:r.element.elements[e],children:t,collapsible:r.collapsible,collapsed:r.collapsed}}function bP(r){return UL(r,0)}function f6(r,e,t){return r.element===e?Object.assign(Object.assign({},r),{children:t}):Object.assign(Object.assign({},r),{children:at.map(at.from(r.children),i=>f6(i,e,t))})}const jne=r=>({getId(e){return e.elements.map(t=>r.getId(t).toString()).join("\0")}});class qne{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new lN(e,t,i),this.enabled=typeof i.compressionEnabled=="undefined"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=at.empty(),i){const n=i.diffIdentityProvider&&jne(i.diffIdentityProvider);if(e===null){const f=at.map(t,this.enabled?hC:uC);this._setChildren(null,f,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const o=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=bP(o),d=f6(c,e,t),u=(this.enabled?hC:uC)(d),h=l.children.map(f=>f===o?u:f);this._setChildren(l.element,h,{diffIdentityProvider:n,diffDepth:o.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=at.map(i,bP),s=at.map(n,e?hC:uC);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},o=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:o}))}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(typeof e=="undefined")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}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(e===null)return null;const t=this.nodes.get(e);if(!t)throw new Yr(this.user,`Tree element not found: ${e}`);return t}}const Gne=r=>r[r.length-1];class cN{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new cN(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}}function Kne(r,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>r.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function Yne(r,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(r(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(r(t),i)}}})}class Zne{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||Gne;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new sN(s=>new cN(n,s)),this.model=new qne(e,Kne(this.nodeMapper,t),Yne(n,i))}get onDidSplice(){return ke.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ke.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ke.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=at.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)}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 Xne=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class dN extends h6{constructor(e,t,i,n,s={}){super(e,t,i,n,s)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=at.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new lN(e,t,i)}}class g6{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(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){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}Xne([Li],g6.prototype,"compressedTreeNodeProvider",null);function Qne(r,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=r().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}class p6 extends dN{constructor(e,t,i,n,s={}){const o=()=>this,a=n.map(l=>new g6(o,l));super(e,t,i,a,Qne(o,s))}setChildren(e,t=at.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new Zne(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Tl=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function mx(r){return Object.assign(Object.assign({},r),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function zL(r,e){return e.parent?e.parent===r?!0:zL(r,e.parent):!1}function Jne(r,e){return r===e||zL(r,e)||zL(e,r)}class uN{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new uN(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}}class ere{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(...ty.classNamesArray),!0):(t.classList.remove(...ty.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function vP(r){return{browserEvent:r.browserEvent,elements:r.elements.map(e=>e.element)}}function CP(r){return{browserEvent:r.browserEvent,element:r.element&&r.element.element,target:r.target}}class tre extends nb{constructor(e){super(e.elements.map(t=>t.element));this.data=e}}function _x(r){return r instanceof nb?new tre(r):r}class ire{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(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(_x(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(_x(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(_x(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function m6(r){return r&&Object.assign(Object.assign({},r),{collapseByDefault:!0,identityProvider:r.identityProvider&&{getId(e){return r.identityProvider.getId(e.element)}},dnd:r.dnd&&new ire(r.dnd),multipleSelectionController:r.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return r.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return r.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:r.accessibilityProvider&&Object.assign(Object.assign({},r.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:r.accessibilityProvider.getRole?e=>r.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:r.accessibilityProvider.isChecked?e=>{var t;return!!(!((t=r.accessibilityProvider)===null||t===void 0)&&t.isChecked(e.element))}:void 0,getAriaLabel(e){return r.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return r.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:r.accessibilityProvider.getWidgetRole?()=>r.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:r.accessibilityProvider.getAriaLevel&&(e=>r.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:r.accessibilityProvider.getActiveDescendantId&&(e=>r.accessibilityProvider.getActiveDescendantId(e.element))}),filter:r.filter&&{filter(e,t){return r.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:r.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},r.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return r.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof r.expandOnlyOnTwistieClick=="undefined"?void 0:typeof r.expandOnlyOnTwistieClick!="function"?r.expandOnlyOnTwistieClick:e=>r.expandOnlyOnTwistieClick(e.element),additionalScrollHeight:r.additionalScrollHeight})}function jL(r,e){e(r),r.children.forEach(t=>jL(t,e))}class _6{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 H,this._onDidChangeNodeSlowState=new H,this.nodeMapper=new sN(a=>new uN(a)),this.disposables=new ue,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren=="undefined"?!1:o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,i,n,o),this.root=mx({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)}get onDidChangeFocus(){return ke.map(this.tree.onDidChangeFocus,vP)}get onDidChangeSelection(){return ke.map(this.tree.onDidChangeSelection,vP)}get onMouseDblClick(){return ke.map(this.tree.onMouseDblClick,CP)}get onPointer(){return ke.map(this.tree.onPointer,CP)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,s){const o=new aN(i),a=n.map(c=>new ere(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=m6(s)||{};return new dN(e,t,o,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}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 Tl(this,void 0,void 0,function*(){this.refreshPromises.forEach(n=>n.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&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return Tl(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new Yr(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ke.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return Tl(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new Yr(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ke.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield ke.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 ke.toPromise(this._onDidRender.event)),n})}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new Yr(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return Tl(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return Tl(this,void 0,void 0,function*(){let n;return this.subTreeRefreshPromises.forEach((s,o)=>{!n&&Jne(o,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n||this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return Tl(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,i);e.stale=!1,yield Ik.settled(s.map(o=>this.doRefreshSubTree(o,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return Tl(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(at.empty());else{const s=mc(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},o=>null),n=this.doGetChildren(e).finally(()=>s.cancel())}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),ga(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=Pi(()=>Tl(this,void 0,void 0,function*(){const i=yield this.dataSource.getChildren(e.element);return this.processChildren(i)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Fe))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const o=new Map,a=new Map;for(const d of e.children)if(o.set(d.element,d),this.identityProvider){const u=this.tree.isCollapsed(d);a.set(d.id,{node:d,collapsed:u})}const l=[],c=s.map(d=>{const u=!!this.dataSource.hasChildren(d);if(!this.identityProvider){const p=mx({element:d,parent:e,hasChildren:u});return u&&this.collapseByDefault&&!this.collapseByDefault(d)&&(p.collapsedByDefault=!1,l.push(p)),p}const h=this.identityProvider.getId(d).toString(),f=a.get(h);if(f){const p=f.node;return o.delete(p.element),this.nodes.delete(p.element),this.nodes.set(d,p),p.element=d,p.hasChildren=u,i?f.collapsed?(p.children.forEach(_=>jL(_,v=>this.nodes.delete(v.element))),p.children.splice(0,p.children.length),p.stale=!0):l.push(p):u&&this.collapseByDefault&&!this.collapseByDefault(d)&&(p.collapsedByDefault=!1,l.push(p)),p}const g=mx({element:d,parent:e,id:h,hasChildren:u});return n&&n.viewState.focus&&n.viewState.focus.indexOf(h)>-1&&n.focus.push(g),n&&n.viewState.selection&&n.viewState.selection.indexOf(h)>-1&&n.selection.push(g),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(h)>-1?l.push(g):u&&this.collapseByDefault&&!this.collapseByDefault(d)&&(g.collapsedByDefault=!1,l.push(g)),g});for(const d of o.values())jL(d,u=>this.nodes.delete(u.element));for(const d of c)this.nodes.set(d.element,d);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].collapsedByDefault=!1,l.push(c[0])),l}render(e,t,i){const n=e.children.map(o=>this.asTreeElement(o,t)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(o){return i.diffIdentityProvider.getId(o.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 t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:i=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?at.map(e.children,n=>this.asTreeElement(n,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()}}class hN{constructor(e){this.node=e}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 hN(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}}class nre{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(...ty.classNamesArray),!0):(t.classList.remove(...ty.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=ft(this.disposables)}}function rre(r){const e=r&&m6(r);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return r.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}})})}class sre extends _6{constructor(e,t,i,n,s,o,a={}){super(e,t,i,s,o,a);this.compressionDelegate=n,this.compressibleNodeMapper=new sN(l=>new hN(l)),this.filter=a.filter}createTree(e,t,i,n,s){const o=new aN(i),a=n.map(c=>new nre(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=rre(s)||{};return new p6(e,t,o,a,l)}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=h=>this.identityProvider.getId(h).toString(),n=h=>{const f=new Set;for(const g of h){const p=this.tree.getCompressedTreeNode(g===this.root?null:g);if(!!p.element)for(const _ of p.element.elements)f.add(i(_.element))}return f},s=n(this.tree.getSelection()),o=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const c=this.getFocus();let d=!1;const u=h=>{const f=h.element;if(f)for(let g=0;g<f.elements.length;g++){const p=i(f.elements[g].element),_=f.elements[f.elements.length-1].element;s.has(p)&&a.indexOf(_)===-1&&(a.push(_),l=!0),o.has(p)&&c.indexOf(_)===-1&&(c.push(_),d=!0)}h.children.forEach(u)};u(this.tree.getCompressedTreeNode(e===this.root?null:e)),l&&this.setSelection(a),d&&this.setFocus(c)}processChildren(e){return this.filter&&(e=at.filter(e,t=>{const i=this.filter.filter(t,1),n=ore(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function ore(r){return typeof r=="boolean"?r?1:0:oN(r)?Jm(r.visibility):Jm(r)}class are extends h6{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 lN(e,t,i)}}const W0=new xe("isWindows",an,m("isWindows","Whether the operating system is Windows")),lre="inputFocus";var _a=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ze=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const ls=bt("listService");let qL=class{constructor(e){this._themeService=e,this.disposables=new ue,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const n=new c6(Pr(),"");this.disposables.add(du(n,this._themeService))}if(this.lists.some(n=>n.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._lastFocusedWidget=e),rc(e.onDidFocus(()=>this._lastFocusedWidget=e),Xe(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};qL=_a([Ze(0,Gt)],qL);const b6=new xe("listFocus",!0),V0=new xe("listSupportsMultiselect",!0),v6=me.and(b6,me.not(lre)),fN=new xe("listHasSelectionOrFocus",!1),gN=new xe("listDoubleSelection",!1),pN=new xe("listMultiSelection",!1),H0=new xe("listSelectionNavigation",!1),C6="listAutomaticKeyboardNavigation";function $0(r,e){const t=r.createScoped(e.getHTMLElement());return b6.bindTo(t),t}const qu="workbench.list.multiSelectModifier",GL="workbench.list.openMode",is="workbench.list.horizontalScrolling",iy="workbench.list.keyboardNavigation",mN="workbench.list.automaticKeyboardNavigation",i_="workbench.tree.indent",ny="workbench.tree.renderIndentGuides",go="workbench.list.smoothScrolling",ua="workbench.list.mouseWheelScrollSensitivity",ha="workbench.list.fastScrollSensitivity",ry="workbench.tree.expandMode";function fa(r){return r.getValue(qu)==="alt"}class cre extends Z{constructor(e){super();this.configurationService=e,this.useAltAsMultipleSelectionModifier=fa(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(qu)&&(this.useAltAsMultipleSelectionModifier=fa(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:o6(e)}isSelectionRangeChangeEvent(e){return a6(e)}}function U0(r,e,t){var i;const n=new ue;return[Object.assign(Object.assign({},r),{keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return t.mightProducePrintableCharacter(o)}},smoothScrolling:Boolean(e.getValue(go)),mouseWheelScrollSensitivity:e.getValue(ua),fastScrollSensitivity:e.getValue(ha),multipleSelectionController:(i=r.multipleSelectionController)!==null&&i!==void 0?i:n.add(new cre(e))}),n]}let KL=class extends ma{constructor(e,t,i,n,s,o,a,l,c,d){const u=typeof s.horizontalScrolling!="undefined"?s.horizontalScrolling:Boolean(c.getValue(is)),[h,f]=U0(s,c,d);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},js(l.getColorTheme(),P0)),h),{horizontalScrolling:u}));this.disposables.add(f),this.contextKeyService=$0(o,this),this.themeService=l,this.listSupportsMultiSelect=V0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),H0.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=fN.bindTo(this.contextKeyService),this.listDoubleSelection=gN.bindTo(this.contextKeyService),this.listMultiSelection=pN.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=fa(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const p=this.getSelection(),_=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||_.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const p=this.getSelection(),_=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||_.length>0)})),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(qu)&&(this._useAltAsMultipleSelectionModifier=fa(c));let _={};if(p.affectsConfiguration(is)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(is));_=Object.assign(Object.assign({},_),{horizontalScrolling:v})}if(p.affectsConfiguration(go)){const v=Boolean(c.getValue(go));_=Object.assign(Object.assign({},_),{smoothScrolling:v})}if(p.affectsConfiguration(ua)){const v=c.getValue(ua);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:v})}if(p.affectsConfiguration(ha)){const v=c.getValue(ha);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:v})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new w6(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=du(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};KL=_a([Ze(5,Be),Ze(6,ls),Ze(7,Gt),Ze(8,di),Ze(9,Zt)],KL);let wP=class extends Ine{constructor(e,t,i,n,s,o,a,l,c,d){const u=typeof s.horizontalScrolling!="undefined"?s.horizontalScrolling:Boolean(c.getValue(is)),[h,f]=U0(s,c,d);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},js(l.getColorTheme(),P0)),h),{horizontalScrolling:u}));this.disposables=new ue,this.disposables.add(f),this.contextKeyService=$0(o,this),this.themeService=l,this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=V0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),H0.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=fa(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(du(this,l,s.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(qu)&&(this._useAltAsMultipleSelectionModifier=fa(c));let _={};if(p.affectsConfiguration(is)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(is));_=Object.assign(Object.assign({},_),{horizontalScrolling:v})}if(p.affectsConfiguration(go)){const v=Boolean(c.getValue(go));_=Object.assign(Object.assign({},_),{smoothScrolling:v})}if(p.affectsConfiguration(ua)){const v=c.getValue(ua);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:v})}if(p.affectsConfiguration(ha)){const v=c.getValue(ha);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:v})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new w6(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=du(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};wP=_a([Ze(5,Be),Ze(6,ls),Ze(7,Gt),Ze(8,di),Ze(9,Zt)],wP);let yP=class extends B0{constructor(e,t,i,n,s,o,a,l,c,d,u){const h=typeof o.horizontalScrolling!="undefined"?o.horizontalScrolling:Boolean(d.getValue(is)),[f,g]=U0(o,d,u);super(e,t,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},js(c.getColorTheme(),P0)),f),{horizontalScrolling:h}));this.disposables=new ue,this.disposables.add(g),this.contextKeyService=$0(a,this),this.themeService=c,this.listSupportsMultiSelect=V0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),H0.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=fN.bindTo(this.contextKeyService),this.listDoubleSelection=gN.bindTo(this.contextKeyService),this.listMultiSelection=pN.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=fa(d),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_.length>0||v.length>0),this.listMultiSelection.set(_.length>1),this.listDoubleSelection.set(_.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(_.length>0||v.length>0)})),this.disposables.add(d.onDidChangeConfiguration(_=>{_.affectsConfiguration(qu)&&(this._useAltAsMultipleSelectionModifier=fa(d));let v={};if(_.affectsConfiguration(is)&&this.horizontalScrolling===void 0){const b=Boolean(d.getValue(is));v=Object.assign(Object.assign({},v),{horizontalScrolling:b})}if(_.affectsConfiguration(go)){const b=Boolean(d.getValue(go));v=Object.assign(Object.assign({},v),{smoothScrolling:b})}if(_.affectsConfiguration(ua)){const b=d.getValue(ua);v=Object.assign(Object.assign({},v),{mouseWheelScrollSensitivity:b})}if(_.affectsConfiguration(ha)){const b=d.getValue(ha);v=Object.assign(Object.assign({},v),{fastScrollSensitivity:b})}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new dre(this,Object.assign({configurationService:d},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=du(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};yP=_a([Ze(6,Be),Ze(7,ls),Ze(8,Gt),Ze(9,di),Ze(10,Zt)],yP);class _N extends Z{constructor(e,t){var i;super();this.widget=e,this._onDidOpen=this._register(new H),this.onDidOpen=this._onDidOpen.event,this._register(ke.filter(this.widget.onDidChangeSelection,n=>n.browserEvent instanceof KeyboardEvent)(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t==null?void 0:t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(GL))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(GL))!=="doubleClick"}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i,s=!1;this._open(this.getSelectedElement(),i,n,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,o=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,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 s=!1,o=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,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 w6 extends _N{constructor(e,t){super(e,t);this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class dre extends _N{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class ure extends _N{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function hre(r,e){let t=!1;return i=>{if(t)return t=!1,!1;const n=e.softDispatch(i,r);return n&&n.enterChord?(t=!0,!1):(t=!1,!0)}}let SP=class extends dN{constructor(e,t,i,n,s,o,a,l,c,d,u){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=sb(t,s,o,c,d,u);super(e,t,i,n,h);this.disposables.add(g),this.internals=new uu(this,s,f,s.overrideStyles,o,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};SP=_a([Ze(5,Be),Ze(6,ls),Ze(7,Gt),Ze(8,di),Ze(9,Zt),Ze(10,Cr)],SP);let xP=class extends p6{constructor(e,t,i,n,s,o,a,l,c,d,u){const{options:h,getAutomaticKeyboardNavigation:f,disposable:g}=sb(t,s,o,c,d,u);super(e,t,i,n,h);this.disposables.add(g),this.internals=new uu(this,s,f,s.overrideStyles,o,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};xP=_a([Ze(5,Be),Ze(6,ls),Ze(7,Gt),Ze(8,di),Ze(9,Zt),Ze(10,Cr)],xP);let EP=class extends are{constructor(e,t,i,n,s,o,a,l,c,d,u,h){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=sb(t,o,a,d,u,h);super(e,t,i,n,s,f);this.disposables.add(p),this.internals=new uu(this,o,g,o.overrideStyles,a,l,c,d,h),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};EP=_a([Ze(6,Be),Ze(7,ls),Ze(8,Gt),Ze(9,di),Ze(10,Zt),Ze(11,Cr)],EP);let YL=class extends _6{constructor(e,t,i,n,s,o,a,l,c,d,u,h){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=sb(t,o,a,d,u,h);super(e,t,i,n,s,f);this.disposables.add(p),this.internals=new uu(this,o,g,o.overrideStyles,a,l,c,d,h),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};YL=_a([Ze(6,Be),Ze(7,ls),Ze(8,Gt),Ze(9,di),Ze(10,Zt),Ze(11,Cr)],YL);let kP=class extends sre{constructor(e,t,i,n,s,o,a,l,c,d,u,h,f){const{options:g,getAutomaticKeyboardNavigation:p,disposable:_}=sb(t,a,l,u,h,f);super(e,t,i,n,s,o,g);this.disposables.add(_),this.internals=new uu(this,a,p,a.overrideStyles,l,c,d,u,f),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};kP=_a([Ze(7,Be),Ze(8,ls),Ze(9,Gt),Ze(10,di),Ze(11,Zt),Ze(12,Cr)],kP);function sb(r,e,t,i,n,s){var o;const a=()=>{let g=Boolean(t.getContextKeyValue(C6));return g&&(g=Boolean(i.getValue(mN))),g},l=s.isScreenReaderOptimized(),c=e.simpleKeyboardNavigation||l?"simple":i.getValue(iy),d=e.horizontalScrolling!==void 0?e.horizontalScrolling:Boolean(i.getValue(is)),[u,h]=U0(e,i,n),f=e.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:h,options:Object.assign(Object.assign({keyboardSupport:!1},u),{indent:typeof i.getValue(i_)=="number"?i.getValue(i_):void 0,renderIndentGuides:i.getValue(ny),smoothScrolling:Boolean(i.getValue(go)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:c==="simple",filterOnType:c==="filter",horizontalScrolling:d,keyboardNavigationEventFilter:hre(r,n),additionalScrollHeight:f,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(o=e.expandOnlyOnTwistieClick)!==null&&o!==void 0?o:i.getValue(ry)==="doubleClick"})}}let uu=class{constructor(e,t,i,n,s,o,a,l,c){this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=$0(s,e),this.listSupportsMultiSelect=V0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),H0.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=fN.bindTo(this.contextKeyService),this.hasDoubleSelection=gN.bindTo(this.contextKeyService),this.hasMultiSelection=pN.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=fa(l);const u=new Set;u.add(C6);const h=()=>{const g=c.isScreenReaderOptimized()?"simple":l.getValue(iy);e.updateOptions({simpleKeyboardNavigation:g==="simple",filterOnType:g==="filter"})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const f=e.getSelection(),g=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(f.length>0||g.length>0),this.hasMultiSelection.set(f.length>1),this.hasDoubleSelection.set(f.length===2)})}),e.onDidChangeFocus(()=>{const f=e.getSelection(),g=e.getFocus();this.hasSelectionOrFocus.set(f.length>0||g.length>0)}),l.onDidChangeConfiguration(f=>{let g={};if(f.affectsConfiguration(qu)&&(this._useAltAsMultipleSelectionModifier=fa(l)),f.affectsConfiguration(i_)){const p=l.getValue(i_);g=Object.assign(Object.assign({},g),{indent:p})}if(f.affectsConfiguration(ny)){const p=l.getValue(ny);g=Object.assign(Object.assign({},g),{renderIndentGuides:p})}if(f.affectsConfiguration(go)){const p=Boolean(l.getValue(go));g=Object.assign(Object.assign({},g),{smoothScrolling:p})}if(f.affectsConfiguration(iy)&&h(),f.affectsConfiguration(mN)&&(g=Object.assign(Object.assign({},g),{automaticKeyboardNavigation:i()})),f.affectsConfiguration(is)&&t.horizontalScrolling===void 0){const p=Boolean(l.getValue(is));g=Object.assign(Object.assign({},g),{horizontalScrolling:p})}if(f.affectsConfiguration(ry)&&t.expandOnlyOnTwistieClick===void 0&&(g=Object.assign(Object.assign({},g),{expandOnlyOnTwistieClick:l.getValue(ry)==="doubleClick"})),f.affectsConfiguration(ua)){const p=l.getValue(ua);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:p})}if(f.affectsConfiguration(ha)){const p=l.getValue(ha);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:p})}Object.keys(g).length>0&&e.updateOptions(g)}),this.contextKeyService.onDidChangeContext(f=>{f.affectsSome(u)&&e.updateOptions({automaticKeyboardNavigation:i()})}),c.onDidChangeScreenReaderOptimized(()=>h())),this.navigator=new ure(e,Object.assign({configurationService:l},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){ft(this.styler),this.styler=e?du(this.tree,this.themeService,e):Z.None}dispose(){this.disposables=ft(this.disposables),ft(this.styler),this.styler=void 0}};uu=_a([Ze(4,Be),Ze(5,ls),Ze(6,Gt),Ze(7,di),Ze(8,Cr)],uu);const fre=_i.as(Pu.Configuration);fre.registerConfiguration({id:"workbench",order:7,title:m("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[qu]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[m("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:m({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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.")},[GL]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"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.")},[is]:{type:"boolean",default:!1,description:m("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[i_]:{type:"number",default:8,minimum:0,maximum:40,description:m("tree indent setting","Controls tree indentation in pixels.")},[ny]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:m("render tree indent guides","Controls whether the tree should render indent guides.")},[go]:{type:"boolean",default:!1,description:m("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[ua]:{type:"number",default:1,description:m("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[ha]:{type:"number",default:5,description:m("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[iy]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[m("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),m("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),m("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:m("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[mN]:{type:"boolean",default:!0,markdownDescription:m("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[ry]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m("expand mode","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.")}}});var Jt;(function(r){r[r.Hint=1]="Hint",r[r.Info=2]="Info",r[r.Warning=4]="Warning",r[r.Error=8]="Error"})(Jt||(Jt={}));(function(r){function e(o,a){return a-o}r.compare=e;const t=Object.create(null);t[r.Error]=m("sev.error","Error"),t[r.Warning]=m("sev.warning","Warning"),t[r.Info]=m("sev.info","Info");function i(o){return t[o]||""}r.toString=i;function n(o){switch(o){case ri.Error:return r.Error;case ri.Warning:return r.Warning;case ri.Info:return r.Info;case ri.Ignore:return r.Hint}}r.fromSeverity=n;function s(o){switch(o){case r.Error:return ri.Error;case r.Warning:return ri.Warning;case r.Info:return ri.Info;case r.Hint:return ri.Ignore}}r.toSeverity=s})(Jt||(Jt={}));var sy;(function(r){const e="";function t(n){return i(n,!0)}r.makeKey=t;function i(n,s){let o=[e];return n.source?o.push(n.source.replace("\xA6","\\\xA6")):o.push(e),n.code?typeof n.code=="string"?o.push(n.code.replace("\xA6","\\\xA6")):o.push(n.code.value.replace("\xA6","\\\xA6")):o.push(e),n.severity!==void 0&&n.severity!==null?o.push(Jt.toString(n.severity)):o.push(e),n.message&&s?o.push(n.message.replace("\xA6","\\\xA6")):o.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?o.push(n.startLineNumber.toString()):o.push(e),n.startColumn!==void 0&&n.startColumn!==null?o.push(n.startColumn.toString()):o.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?o.push(n.endLineNumber.toString()):o.push(e),n.endColumn!==void 0&&n.endColumn!==null?o.push(n.endColumn.toString()):o.push(e),o.push(e),o.join("\xA6")}r.makeKeyOptionalMessage=i})(sy||(sy={}));const ob=bt("markerService");class gre{constructor(){this._byResource=new Mn,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 Mn,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){let i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,s=this._byResource.get(e);s&&(i=s.delete(t));let 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 typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:at.empty():De.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:at.empty():at.map(at.concat(...this._byOwner.values()),o=>o[1])}}class pre{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Mn,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Ye.inMemory||e.scheme===Ye.walkThrough||e.scheme===Ye.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===Jt.Error?t.errors+=1:i===Jt.Warning?t.warnings+=1:i===Jt.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 _d{constructor(){this._onMarkerChanged=new Cz({delay:0,merge:_d._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new gre,this._stats=new pre(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(z3(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const o=_d._toMarker(e,t,s);o&&n.push(o)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}=i;if(!!o)return l=l>0?l:1,c=c>0?c:1,d=d>=l?d:l,u=u>0?u:c,{resource:t,owner:e,code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:d,endColumn:u,relatedInformation:h,tags:f}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const o=this._data.get(i,t);if(o){const a=[];for(const l of o)if(_d._accept(l,n)){const c=a.push(l);if(s>0&&c===s)break}return a}else return[]}else if(!t&&!i){const o=[];for(let a of this._data.values())for(let l of a)if(_d._accept(l,n)){const c=o.push(l);if(s>0&&c===s)return o}return o}else{const o=this._data.values(i!=null?i:t),a=[];for(const l of o)for(const c of l)if(_d._accept(c,n)){const d=a.push(c);if(s>0&&d===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Mn;for(let i of e)for(let n of i)t.set(n,!0);return Array.from(t.keys())}}var fC=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},ef;(function(r){r[r.None=0]="None",r[r.Initialized=1]="Initialized",r[r.Closed=2]="Closed"})(ef||(ef={}));class n_ extends Z{constructor(e,t=Object.create(null)){super();this.database=e,this.options=t,this._onDidChangeStorage=this._register(new H),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=ef.None,this.cache=new Map,this.flushDelayer=new Qz(n_.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;(t=e.changed)===null||t===void 0||t.forEach((n,s)=>this.accept(s,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.accept(n,void 0))}accept(e,t){if(this.state===ef.Closed)return;let i=!1;qr(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return qr(i)?t:i}getBoolean(e,t){const i=this.get(e);return qr(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return qr(i)?t:parseInt(i,10)}set(e,t){return fC(this,void 0,void 0,function*(){if(this.state===ef.Closed)return;if(qr(t))return this.delete(e);const i=String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())})}delete(e){return fC(this,void 0,void 0,function*(){if(!(this.state===ef.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return fC(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 t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}dispose(){this.flushDelayer.dispose(),super.dispose()}}n_.DEFAULT_FLUSH_DELAY=100;class LP{constructor(){this.onDidChangeItemsExternal=ke.None,this.items=new Map}updateItems(e){return fC(this,void 0,void 0,function*(){e.insert&&e.insert.forEach((t,i)=>this.items.set(i,t)),e.delete&&e.delete.forEach(t=>this.items.delete(t))})}}const iv="__$__targetStorageMarker",ba=bt("storageService");var oy;(function(r){r[r.NONE=0]="NONE",r[r.SHUTDOWN=1]="SHUTDOWN"})(oy||(oy={}));class z0 extends Z{constructor(e={flushInterval:z0.DEFAULT_FLUSH_INTERVAL}){super();this.options=e,this._onDidChangeValue=this._register(new PC),this._onDidChangeTarget=this._register(new PC),this._onWillSaveState=this._register(new H),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===iv?(e===0?this._globalKeyTargets=void 0:e===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getNumber(e,i)}store(e,t,i,n){if(qr(t)){this.remove(e,i);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,n),(s=this.getStorage(i))===null||s===void 0||s.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),(i=this.getStorage(t))===null||i===void 0||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,s;const o=this.getKeyTargets(t);typeof i=="number"?o[e]!==i&&(o[e]=i,(n=this.getStorage(t))===null||n===void 0||n.set(iv,JSON.stringify(o))):typeof o[e]=="number"&&(delete o[e],(s=this.getStorage(t))===null||s===void 0||s.set(iv,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return e===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(iv,e);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}}z0.DEFAULT_FLUSH_INTERVAL=60*1e3;class mre extends z0{constructor(){super();this.globalStorage=this._register(new n_(new LP)),this.workspaceStorage=this._register(new n_(new LP)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.globalStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e)))}getStorage(e){return e===0?this.globalStorage:this.workspaceStorage}}var y6=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gC=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let ZL=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new XL(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};ZL=y6([gC(0,pi)],ZL);let XL=class Hh{constructor(e,t,i,n,s){this._id=e,this._options=t,this._commandService=i,this._contextKeyService=n,this._menuService=s,this._disposables=new ue,this._menuGroups=[],this._contextKeys=new Set,this._build();const o=new $t(()=>{this._build(),this._onDidChange.fire(this)},t.eventDebounceDelay);this._disposables.add(o),this._disposables.add(es.onDidChangeMenu(c=>{c.has(e)&&o.schedule()}));const a=this._disposables.add(new ue),l=()=>{const c=new $t(()=>this._onDidChange.fire(this),t.eventDebounceDelay);a.add(c),a.add(n.onDidChangeContext(d=>{d.affectsSome(this._contextKeys)&&c.schedule()}))};this._onDidChange=new H({onFirstListenerAdd:l,onLastListenerRemove:a.clear.bind(a)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const e=es.getMenuItems(this._id);let t;e.sort(Hh._compareMenuItems);for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(Hh._fillInKbExprKeys(e.when,this._contextKeys),wp(e)){if(e.command.precondition&&Hh._fillInKbExprKeys(e.command.precondition,this._contextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;Hh._fillInKbExprKeys(t,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&es.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,s]=i,o=[];for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const l=wp(a)?new Cc(a.command,a.alt,e,this._contextKeyService,this._commandService):new eA(a,this._menuService,this._contextKeyService,e);o.push(l)}o.length>0&&t.push([n,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;let a=i.localeCompare(n);if(a!==0)return a}let s=e.order||0,o=t.order||0;return s<o?-1:s>o?1:Hh._compareTitles(wp(e)?e.command.title:e.title,wp(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};XL=y6([gC(2,pi),gC(3,Be),gC(4,Bu)],XL);var _re=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},TP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class bre extends Z{constructor(e){super();this.model=e,this._markersData=new Map,this._register(Xe(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let s=0;s<n.length;s++)this._markersData.set(n[s],e[s]);return i.length!==0||n.length!==0}getMarker(e){return this._markersData.get(e.id)}}let QL=class extends Z{constructor(e,t){super();this._markerService=t,this._onDidChangeMarker=this._register(new H),this._markerDecorations=new Mn,e.getModels().forEach(i=>this._onModelAdded(i)),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(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new bre(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ye.inMemory||e.uri.scheme===Ye.internal||e.uri.scheme===Ye.vscode)&&this._markerService&&this._markerService.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map(n=>({range:this._createDecorationRange(e.model,n),options:this._createDecorationOption(n)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=k.lift(t);if(t.severity===Jt.Hint&&!this._hasMarkerTag(t,1)&&!this._hasMarkerTag(t,2)&&(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let n=e.getWordAtPosition(i.getStartPosition());if(n)i=new k(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn);else{let s=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);s===1||(i.endColumn>=s?i=new k(i.startLineNumber,s-1,i.endLineNumber,s):i=new k(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new k(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,s,o;switch(e.severity){case Jt.Hint:this._hasMarkerTag(e,2)?t=void 0:this._hasMarkerTag(e,1)?t="squiggly-unnecessary":t="squiggly-hint",n=0;break;case Jt.Warning:t="squiggly-warning",i=li(JX),n=20,o={color:li(EX),position:Qr.Inline};break;case Jt.Info:t="squiggly-info",i=li(eQ),n=10;break;case Jt.Error:default:t="squiggly-error",i=li(QX),n=30,o={color:li(xX),position:Qr.Inline};break}return e.tags&&(e.tags.indexOf(1)!==-1&&(s="squiggly-inline-unnecessary"),e.tags.indexOf(2)!==-1&&(s="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:Fr.Right},minimap:o,zIndex:n,inlineClassName:s}}_hasMarkerTag(e,t){return e.tags?e.tags.indexOf(t)>=0:!1}};QL=_re([TP(0,mi),TP(1,ob)],QL);var vre=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},IP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let JL=class extends Z{constructor(e,t){super();this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new H,this._accessibilityModeEnabledContext=eb.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())})),i(),this.onDidChangeScreenReaderOptimized(()=>i())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};JL=vre([IP(0,Be),IP(1,di)],JL);var nv=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Cre{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return nv(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,e);return}try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(oe("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 nv(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 nv(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return nv(this,void 0,void 0,function*(){this.findText=e})}}var wre=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},DP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},rv=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function sv(r){return r.scheme===Ye.file?r.fsPath:r.path}let S6=0;class ov{constructor(e,t,i,n,s,o,a){this.id=++S6,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=a,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 AP{constructor(e,t){this.resourceLabel=e,this.reason=t}}class NP{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);let i=[];return e.length>0&&i.push(m({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(m({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` +`)}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 yre{constructor(e,t,i,n,s,o,a){this.id=++S6,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=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new NP),this.removedResources.has(t)||this.removedResources.set(t,new AP(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new NP),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new AP(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class x6{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)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` +`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?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)t.type===1&&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<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new B8(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a<l;a++,n++){const c=this._past[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,o=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),o!==-1&&(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 this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?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 bx{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const E6=new x6("","");E6.locked=!0;let ay=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(` +`))}pushElement(e,t=qf.None,i=jo.None){if(e.type===0){const n=sv(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new ov(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],o=[];for(const a of e.resources){const l=sv(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),s.push(l),o.push(c))}s.length===1?this._pushElement(new ov(e,s[0],o[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new yre(e,s,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],s=e.strResources[t];let o;this._editStacks.has(s)?o=this._editStacks.get(s):(o=new x6(n,s),this._editStacks.set(s,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const o=sv(s.resource),a=this.getUriComparisonKey(s.resource),l=new ov(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const o=sv(s.resource),a=this.getUriComparisonKey(s.resource),l=new ov(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new B8(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();!o||o.sourceId===e&&(!t||o.sourceOrder>t.sourceOrder)&&(t=o,i=n)}return[t,i]}canUndo(e){if(e instanceof jo){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Fe(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 a;try{a=t()}catch(l){return o(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),n.dispose(),s()),l=>(o(),n.dispose(),this._onError(l,e))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return rv(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo=="undefined")return Z.None;const t=e.actual.prepareUndoRedo();return typeof t=="undefined"?Z.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo=="undefined")return t(Z.None);const i=e.actual.prepareUndoRedo();return i?sD(i)?t(i):i.then(n=>t(n)):t(Z.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||E6);return new bx(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new av(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new av}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const a of i.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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,m({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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 n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return rv(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const a=yield this._dialogService.show(ri.Info,m("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[m({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),m("nok","Undo this File"),m("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;if(a.choice===1)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,i,!1);if(l)return l.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))})}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=m({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new bx([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_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);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof jo){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?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[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}_confirmAndContinueUndo(e,t,i){return rv(this,void 0,void 0,function*(){if((yield this._dialogService.show(ri.Info,m("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[m("confirmDifferentSource.yes","Yes"),m("cancel","Cancel")],{cancelId:1})).choice!==1)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.sourceOrder<t.sourceOrder)&&(t=o,i=n)}return[t,i]}canRedo(e){if(e instanceof jo){const[,i]=this._findClosestRedoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasFutureElements():!1}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new av(this._redo(e));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new av}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestFutureElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const a of i.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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,m({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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 rv(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 o of i.editStacks)o.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=m({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new bx([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_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<t.groupOrder)&&(t=o,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);if(t)return this._redo(t)}redo(e){if(e instanceof jo){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return typeof e=="string"?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(!!i){if(i.groupId){const[n,s]=this._findClosestRedoElementInGroup(i.groupId);if(i!==n&&s)return this._redo(s)}try{return i.type===1?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};ay=wre([DP(0,tb),DP(1,ki)],ay);class av{constructor(e){this.returnValue=e}}Hu(A0,ay);const Sre=new RegExp(`(\\\\)?\\$\\((${hr.iconNameExpression}(?:${hr.iconModifierExpression})?)\\)`,"g");function Kd(r){const e=new Array;let t,i=0,n=0;for(;(t=Sre.exec(r))!==null;){n=t.index||0,e.push(r.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,o]=t;e.push(s?`$(${o})`:xre({id:o}))}return i<r.length&&e.push(r.substring(i)),e}function xre(r){const e=oe("span");return e.classList.add(...hr.asClassNameArray(r)),e}const Ere={buttonBackground:q.fromHex("#0E639C"),buttonHoverBackground:q.fromHex("#006BB3"),buttonForeground:q.white};class RP extends Z{constructor(e,t){super();this._onDidClick=this._register(new H),this.options=t||Object.create(null),_o(this.options,Ere,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Lt.addTarget(this._element)),[Te.CLICK,Vt.Tap].forEach(i=>{this._register(J(this._element,i,n=>{if(!this.enabled){xt.stop(n);return}this._onDidClick.fire(n)}))}),this._register(J(this._element,Te.KEY_DOWN,i=>{const n=new ei(i);let s=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),s=!0):n.equals(9)&&(this._element.blur(),s=!0),s&&xt.stop(n,!0)})),this._register(J(this._element,Te.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(J(this._element,Te.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(Rf(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?_c(this._element,...Kd(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}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")}}const kre={badgeBackground:q.fromHex("#4D4D4D"),badgeForeground:q.fromHex("#FFFFFF")};class eT{constructor(e,t){this.count=0,this.options=t||Object.create(null),_o(this.options,kre,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=X(e,oe(".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(){this.element.textContent=bn(this.countFormat,this.count),this.element.title=bn(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const OP="done",MP="active",vx="infinite",PP="discrete",Lre={progressBarBackground:q.fromHex("#0E70C0")};class Tre extends Z{constructor(e,t){super();this.options=t||Object.create(null),_o(this.options,Lre,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new $t(()=>Tr(this.element),0)),this.create(e)}create(e){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.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(MP,vx,PP),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(OP),this.element.classList.contains(vx)?(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(PP,OP),this.element.classList.add(MP,vx),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}class bN{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const k6=new bN("id#");const Cx={},Ire=new bN("quick-input-button-icon-");function tT(r){if(!r)return;let e;const t=r.dark.toString();return Cx[t]?e=Cx[t]:(e=Ire.nextId(),Ak(`.${e}`,`background-image: ${dl(r.light||r.dark)}`),Ak(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${dl(r.dark)}`),Cx[t]=e),e}const Dre={ctrlCmd:!1,alt:!1};var r_;(function(r){r[r.Blur=1]="Blur",r[r.Gesture=2]="Gesture",r[r.Other=3]="Other"})(r_||(r_={}));var Us;(function(r){r[r.NONE=0]="NONE",r[r.FIRST=1]="FIRST",r[r.SECOND=2]="SECOND",r[r.LAST=3]="LAST"})(Us||(Us={}));function Are(r,e={}){const t=vN(e);return t.textContent=r,t}function L6(r,e={}){const t=vN(e);return T6(t,Rre(r,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function vN(r){const e=r.inline?"span":"div",t=document.createElement(e);return r.className&&(t.className=r.className),t}class Nre{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 T6(r,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");s.href="#",t.disposables.add(Ei(s,"click",o=>{t.callback(String(e.index),o)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=r);n&&r!==n&&r.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{T6(n,s,t,i)})}function Rre(r,e){const t={type:1,children:[]};let i=0,n=t;const s=[],o=new Nre(r);for(;!o.eos();){let a=o.next();const l=a==="\\"&&iT(o.peek(),e)!==0;if(l&&(a=o.next()),!l&&Ore(a,e)&&a===o.peek()){o.advance(),n.type===2&&(n=s.pop());const c=iT(a,e);if(n.type===c||n.type===5&&c===6)n=s.pop();else{const d={type:c,children:[]};c===5&&(d.index=i,i++),n.children.push(d),s.push(n),n=d}}else if(a===` +`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function Ore(r,e){return iT(r,e)!==0}function iT(r,e){switch(r){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class Mre{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 Pre{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._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new Mre(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 ip=oe,Fre={inputBackground:q.fromHex("#3C3C3C"),inputForeground:q.fromHex("#CCCCCC"),inputValidationInfoBorder:q.fromHex("#55AAFF"),inputValidationInfoBackground:q.fromHex("#063B49"),inputValidationWarningBorder:q.fromHex("#B89500"),inputValidationWarningBackground:q.fromHex("#352A05"),inputValidationErrorBorder:q.fromHex("#BE1100"),inputValidationErrorBackground:q.fromHex("#5A1D1D")};class I6 extends Hr{constructor(e,t,i){var n;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new H),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),_o(this.options,Fre,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=X(e,ip(".monaco-inputbox.idle"));let s=this.options.flexibleHeight?"textarea":"input",o=X(this.element,ip(".ibwrapper"));if(this.input=X(o,ip(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=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=X(o,ip("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new AA(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),X(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new Mt(document,"selectionchange")),l=ke.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===o});this._register(l(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.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new fl(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}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}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 typeof this.cachedHeight=="number"?this.cachedHeight:Dk(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()}get width(){return ps(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const i=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=i+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!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){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=i.border?`1px solid ${i.border}`:"",(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())),e==null?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.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,t=()=>e.style.width=ps(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=X(n,ip(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?L6(this.message.content,s):Are(this.message.content,s);o.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return o.style.backgroundColor=a.background?a.background.toString():"",o.style.color=a.foreground?a.foreground.toString():"",o.style.border=a.border?`1px solid ${a.border}`:"",X(e,o),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=m("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=m("alertWarningMessage","Warning: {0}",this.message.content):i=m("alertInfoMessage","Info: {0}",this.message.content),sn(i),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=Dk(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;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class D6 extends I6{constructor(e,t,i){const n=m({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),s=` or \u21C5 ${n}`,o=` (\u21C5 ${n})`;super(e,t,i);this.history=new Pre(i.history,100);const a=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const l=this.placeholder.endsWith(")")?s:o,c=this.placeholder+l;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((l,c)=>{l.forEach(d=>{d.target.textContent||a()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>a()),this.onblur(this.input,()=>{const l=c=>{if(this.placeholder.endsWith(c)){const d=this.placeholder.slice(0,this.placeholder.length-c.length);return i.showPlaceholderOnFocus?this.placeholder=d:this.setPlaceHolder(d),!0}else return!1};l(o)||l(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,ww(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,ww(this.value))}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()||this.history.last()}}const Bre=oe;class Wre extends Z{constructor(e){super();this.parent=e,this.onKeyDown=t=>J(this.inputBox.inputElement,Te.KEY_DOWN,i=>{t(new ei(i))}),this.onMouseDown=t=>J(this.inputBox.inputElement,Te.MOUSE_DOWN,i=>{t(new Zr(i))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=X(this.parent,Bre(".quick-input-box")),this.inputBox=this._register(new I6(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===ri.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===ri.Info?1:e===ri.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===ri.Info?1:e===ri.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class Lc{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=Lc.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&ro(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<i.start){const o=this.text.substring(t,i.start);e.push(oe("span",void 0,...this.supportIcons?Kd(o):[o])),t=i.end}const n=this.text.substring(i.start,i.end),s=oe("span.highlight",void 0,...this.supportIcons?Kd(n):[n]);i.extraClasses&&s.classList.add(i.extraClasses),e.push(s),t=i.end}if(t<this.text.length){const i=this.text.substring(t);e.push(oe("span",void 0,...this.supportIcons?Kd(i):[i]))}_c(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,(s,o)=>{n=s===`\r +`?-1:0,o+=i;for(const a of t)a.end<=o||(a.start>=o&&(a.start+=n),a.end>=o&&(a.end+=n));return i+=n,"\u23CE"})}}class gl{constructor(e="",t=!1){var i,n,s;if(this.value=e,typeof this.value!="string")throw Or("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(i=t.isTrusted)!==null&&i!==void 0?i:void 0,this.supportThemeIcons=(n=t.supportThemeIcons)!==null&&n!==void 0?n:!1,this.supportHtml=(s=t.supportHtml)!==null&&s!==void 0?s:!1)}appendText(e,t=0){return this.value+=Vre(this.supportThemeIcons?zie(e):e).replace(/([ \t]+)/g,(i,n)=>" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ +`:` + +`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` +`,this.value+=t,this.value+="\n```\n",this}}function sm(r){return A6(r)?!r.value:Array.isArray(r)?r.every(sm):!0}function A6(r){return r instanceof gl?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}function Vre(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function wx(r){return r&&r.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function Hre(r){const e=[],t=r.split("|").map(n=>n.trim());r=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),o=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(o));l&&e.push(`width="${a}"`),c&&e.push(`height="${o}"`)}return{href:r,dimensions:e}}var nT=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function $re(r,e){Os(e)?r.title=e:e!=null&&e.markdownNotSupportedFallback?r.title=e.markdownNotSupportedFallback:r.removeAttribute("title")}class Ure{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return nT(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(e===void 0||Os(e)||e instanceof HTMLElement)n=e;else if(!Fp(e.markdown))n=(i=e.markdown)!==null&&i!==void 0?i:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(m("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Hn;const s=this._cancellationTokenSource.token;if(n=yield e.markdown(s),this.isDisposed||s.isCancellationRequested)return}this.show(n,t)})}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}i==null||i.dispose()}hasContent(e){return e?A6(e)?this.hasContent(e.value):!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function zre(r,e,t){let i,n;const s=(c,d)=>{var u;c&&(n==null||n.dispose(),n=void 0),d&&(i==null||i.dispose(),i=void 0),(u=r.onDidHideHover)===null||u===void 0||u.call(r)},o=(c,d)=>{if(i)return;const u=b=>{const C=b.type===Te.MOUSE_DOWN;s(C,C||b.fromElement===e)},h=J(e,Te.MOUSE_LEAVE,u,!0),f=J(e,Te.MOUSE_DOWN,u,!0),g={targetElements:[e],dispose:()=>{}};let p;if(r.placement===void 0||r.placement==="mouse"){const b=C=>g.x=C.x+10;p=J(e,Te.MOUSE_MOVE,b,!0)}const _=()=>nT(this,void 0,void 0,function*(){i&&(!n||n.isDisposed)&&(n=new Ure(r,g,c>0),yield n.update(t,d)),p==null||p.dispose()}),v=new $t(_,c);v.schedule(),i=Xe(()=>{v.dispose(),p==null||p.dispose(),f.dispose(),h.dispose()})},a=J(e,Te.MOUSE_OVER,()=>o(r.delay),!0);return{show:c=>{o(0,c)},hide:()=>{s(!0,!0)},update:c=>nT(this,void 0,void 0,function*(){t=c,yield n==null?void 0:n.update(t)}),dispose:()=>{a.dispose(),s(!0,!0)}}}class yx{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 CN extends Z{constructor(e,t){super();this.customHovers=new Map,this.domNode=this._register(new yx(X(e,oe(".monaco-icon-label")))),this.labelContainer=X(this.domNode.element,oe(".monaco-icon-label-container"));const i=X(this.labelContainer,oe("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new yx(X(this.labelContainer,oe("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new Gre(i,!!t.supportIcons):this.nameNode=new jre(i),t!=null&&t.supportDescriptionHighlights?this.descriptionNodeFactory=()=>new Lc(X(this.descriptionContainer.element,oe("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new yx(X(this.descriptionContainer.element,oe("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover(i!=null&&i.descriptionTitle?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof Lc?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)$re(e,t);else{const n=zre(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class jre{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&ro(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=X(this.container,oe("a.label-name",{id:t==null?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<e.length;i++){const n=e[i],s=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;X(this.container,oe("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&X(this.container,oe("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function qre(r,e,t){if(!t)return;let i=0;return r.map(n=>{const s={start:i,end:i+n.length},o=t.map(a=>mn.intersect(s,a)).filter(a=>!mn.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,o})}class Gre{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&ro(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new Lc(X(this.container,oe("a.label-name",{id:t==null?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=qre(e,i,t==null?void 0:t.matches);for(let s=0;s<e.length;s++){const o=e[s],a=n?n[s]:void 0,l=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${s}`,c=oe("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":s,role:"treeitem"});new Lc(X(this.container,c),this.supportIcons).set(o,a,void 0,t==null?void 0:t.labelEscapeNewLines),s<e.length-1&&X(c,oe("span.label-separator",void 0,i))}}}}const lv=oe;class wN{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=X(e,lv(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&wN.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(X(this.domNode,lv("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Ki(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=QD.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(i==null?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(i==null?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(i==null?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(i==null?void 0:i.metaKey),n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,Boolean(i==null?void 0:i.keyCode),"")}renderKey(e,t,i,n){X(e,this.createKeyElement(t,i?".highlight":"")),n&&X(e,lv("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){X(e,this.createKeyElement(m("unbound","Unbound")))}createKeyElement(e,t=""){const i=lv("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t?!0:!!e&&!!t&&ro(e.firstPart,t.firstPart)&&ro(e.chordPart,t.chordPart)}}const FP=new df(()=>{const r=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:r,collatorIsNumeric:r.resolvedOptions().numeric}});function Kre(r,e,t=!1){const i=r||"",n=e||"",s=FP.value.collator.compare(i,n);return FP.value.collatorIsNumeric&&s===0&&i!==n?i<n?-1:1:s}function Yre(r,e,t){const i=r.toLowerCase(),n=e.toLowerCase(),s=Zre(r,e,t);if(s)return s;const o=i.endsWith(t),a=n.endsWith(t);if(o!==a)return o?-1:1;const l=Kre(i,n);return l!==0?l:i.localeCompare(n)}function Zre(r,e,t){const i=r.toLowerCase(),n=e.toLowerCase(),s=i.startsWith(t),o=n.startsWith(t);if(s!==o)return s?-1:1;if(s&&o){if(i.length<n.length)return-1;if(i.length>n.length)return 1}return 0}var N6=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xre=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Do=oe;class Qre{constructor(e){this.hidden=!1,this._onChecked=new H,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class ab{get templateId(){return ab.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=X(e,Do(".quick-input-list-entry"));const i=X(t.entry,Do("label.quick-input-list-label"));t.toDisposeTemplate.push(Ei(i,Te.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=X(i,Do("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(Ei(t.checkbox,Te.CHANGE,c=>{t.element.checked=t.checkbox.checked}));const n=X(i,Do(".quick-input-list-rows")),s=X(n,Do(".quick-input-list-row")),o=X(n,Do(".quick-input-list-row"));t.label=new CN(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=X(s,Do(".quick-input-list-entry-keybinding"));t.keybinding=new wN(a,Cs);const l=X(o,Do(".quick-input-list-label-meta"));return t.detail=new Lc(l,!0),t.separator=X(t.entry,Do(".quick-input-list-separator")),t.actionBar=new fl(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=ft(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(c=>i.checkbox.checked=c));const{labelHighlights:n,descriptionHighlights:s,detailHighlights:o}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,o),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),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((c,d)=>{let u=c.iconClass||(c.iconPath?tT(c.iconPath):void 0);c.alwaysVisible&&(u=u?`${u} always-visible`:"always-visible");const h=new Ts(`id-${d}`,"",u,!0,()=>Xre(this,void 0,void 0,function*(){e.fireButtonTriggered({button:c,item:e.item})}));return h.tooltip=c.tooltip||"",h}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=ft(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=ft(e.toDisposeElement),e.toDisposeTemplate=ft(e.toDisposeTemplate)}}ab.ID="listelement";class Jre{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return ab.ID}}var hi;(function(r){r[r.First=1]="First",r[r.Second=2]="Second",r[r.Last=3]="Last",r[r.Next=4]="Next",r[r.Previous=5]="Previous",r[r.NextPage=6]="NextPage",r[r.PreviousPage=7]="PreviousPage"})(hi||(hi={}));class yN{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new H,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new H,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new H,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new H,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new H,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new H,this.onKeyDown=this._onKeyDown.event,this._onLeave=new H,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=X(this.parent,Do(".quick-input-list"));const n=new Jre,s=new tse;this.list=i.createList("QuickInput",this.container,n,[new ab],{identityProvider:{getId:o=>o.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(o=>{const a=new ei(o);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(tt?o.metaKey:o.ctrlKey)&&this.list.setFocus(Nn(this.list.length));break;case 16:const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break;case 18:const c=this.list.getFocus();c.length===1&&c[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(o=>{o.browserEvent.button!==2&&o.browserEvent.preventDefault()})),this.disposables.push(J(this.container,Te.CLICK,o=>{(o.x||o.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(o=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(o=>{typeof o.index=="number"&&(o.browserEvent.preventDefault(),this.list.setSelection([o.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ke.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ke.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const s=e[i];if(!s.hidden)if(s.checked)t=!0;else return!1}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=ft(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,s)=>{var o,a,l;if(n.type!=="separator"){const c=s&&e[s-1],d=n.label&&n.label.replace(/\r?\n/g," "),u=n.meta&&n.meta.replace(/\r?\n/g," "),h=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[d,h,f].map(p=>Mq(p)).filter(p=>!!p).join(", ");i.push(new Qre({index:s,item:n,saneLabel:d,saneMeta:u,saneAriaLabel:g,saneDescription:h,saneDetail:f,labelHighlights:(o=n.highlights)===null||o===void 0?void 0:o.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:c&&c.type==="separator"?c:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),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(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.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===hi.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=hi.First),e===hi.Previous&&this.list.getFocus()[0]===0&&(e=hi.Last),e===hi.Second&&this.list.length<2&&(e=hi.First),e){case hi.First:this.list.focusFirst();break;case hi.Second:this.list.focusNth(1);break;case hi.Last:this.list.focusLast();break;case hi.Next:this.list.focusNext();break;case hi.Previous:this.list.focusPrevious();break;case hi.NextPage:this.list.focusNextPage();break;case hi.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this.inputElements[i.index-1];i.separator=n&&n.type==="separator"?n:void 0});else{let i;this.elements.forEach(n=>{const s=this.matchOnLabel?Ar(tv(e,ev(n.saneLabel))):void 0,o=this.matchOnDescription?Ar(tv(e,ev(n.saneDescription||""))):void 0,a=this.matchOnDetail?Ar(tv(e,ev(n.saneDetail||""))):void 0,l=this.matchOnMeta?Ar(tv(e,ev(n.saneMeta||""))):void 0;if(s||o||a||l?(n.labelHighlights=s,n.descriptionHighlights=o,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const c=n.index&&this.inputElements[n.index-1];i=c&&c.type==="separator"?c:i,i&&!n.hidden&&(n.separator=i,i=void 0)}})}const t=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((n,s)=>ese(n,s,i))}return this.elementsToIndexes=t.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.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 this.container.style.display!=="none"}dispose(){this.elementDisposables=ft(this.elementDisposables),this.disposables=ft(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)}style(e){this.list.style(e)}}N6([Li],yN.prototype,"onDidChangeFocus",null);N6([Li],yN.prototype,"onDidChangeSelection",null);function ese(r,e,t){const i=r.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:Yre(r.saneLabel,e.saneLabel,t)}class tse{getWidgetAriaLabel(){return m("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var BP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const yr=oe,ise=Ms("quick-input-back",be.arrowLeft),rT={iconClass:ise.classNames,tooltip:m("quickInput.back","Back"),handle:-1};class j0 extends Z{constructor(e){super();this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=j0.noPromptMessage,this._severity=ri.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new H),this.onDidHideEmitter=this._register(new H),this.onDisposeEmitter=this._register(new H),this.visibleDisposables=this._register(new ue),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&&!ra;this._ignoreFocusOut=e&&!ra,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!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=>{this.buttons.indexOf(e)!==-1&&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.update())}hide(){!this.visible||this.ui.hide()}didHide(e=r_.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new rr,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 n=this.buttons.filter(o=>o===rT);this.ui.leftActionBar.push(n.map((o,a)=>{const l=new Ts(`id-${a}`,"",o.iconClass||tT(o.iconPath),!0,()=>BP(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this.buttons.filter(o=>o!==rT);this.ui.rightActionBar.push(s.map((o,a)=>{const l=new Ts(`id-${a}`,"",o.iconClass||tT(o.iconPath),!0,()=>BP(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,_c(this.ui.message,...Kd(i))),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?m("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==ri.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.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}j0.noPromptMessage=m("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class s_ extends j0{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new H),this.onWillAcceptEmitter=this._register(new H),this.onDidAcceptEmitter=this._register(new H),this.onDidCustomEmitter=this._register(new H),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?Us.NONE:Us.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new H),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new H),this.onDidTriggerItemButtonEmitter=this._register(new H),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}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),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 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?Dre: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(hi.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),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(hi.Next),this.canSelectMany&&this.ui.list.domFocus(),xt.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(hi.Previous):this.ui.list.focus(hi.Last),this.canSelectMany&&this.ui.list.domFocus(),xt.stop(e,!0);break;case 12:this.ui.list.focus(hi.NextPage),this.canSelectMany&&this.ui.list.domFocus(),xt.stop(e,!0);break;case 11:this.ui.list.focus(hi.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),xt.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!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(hi.First),xt.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(hi.Last),xt.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&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&&Ls(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Ls(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&Ls(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.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 J(this.ui.container,Te.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ei(e),i=t.keyCode;this._quickNavigate.keybindings.some(o=>{const[a,l]=o.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(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._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?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||"");const n=this.ariaLabel||this.placeholder||s_.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,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 Us.NONE:this._itemActivation=Us.FIRST;break;case Us.SECOND:this.ui.list.focus(hi.Second),this._itemActivation=Us.FIRST;break;case Us.LAST:this.ui.list.focus(hi.Last),this._itemActivation=Us.FIRST;break;default:this.trySelectFirst();break}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||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(hi.First)),this.keepScrollPosition&&(this.scrollTop=e)}}s_.DEFAULT_ARIA_LABEL=m("quickInputBox.ariaLabel","Type to narrow down results.");class q0 extends Z{constructor(e){super();this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new H),this.onDidCustomEmitter=this._register(new H),this.onDidTriggerButtonEmitter=this._register(new H),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new H),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new H),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(J(window,Te.KEY_DOWN,e,!0)),this._register(J(window,Te.KEY_UP,e,!0)),this._register(J(window,Te.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=X(this.parentElement,yr(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Pr(e),i=X(e,yr(".quick-input-titlebar")),n=this._register(new fl(i));n.domNode.classList.add("quick-input-left-action-bar");const s=X(i,yr(".quick-input-title")),o=this._register(new fl(i));o.domNode.classList.add("quick-input-right-action-bar");const a=X(e,yr(".quick-input-description")),l=X(e,yr(".quick-input-header")),c=X(l,yr("input.quick-input-check-all"));c.type="checkbox",this._register(Ei(c,Te.CHANGE,M=>{const B=c.checked;w.setAllVisibleChecked(B)})),this._register(J(c,Te.CLICK,M=>{(M.x||M.y)&&f.setFocus()}));const d=X(l,yr(".quick-input-description")),u=X(l,yr(".quick-input-and-message")),h=X(u,yr(".quick-input-filter")),f=this._register(new Wre(h));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=X(h,yr(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new eT(g,{countFormat:m({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),_=X(h,yr(".quick-input-count"));_.setAttribute("aria-live","polite");const v=new eT(_,{countFormat:m({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),b=X(l,yr(".quick-input-action")),C=new RP(b);C.label=m("ok","OK"),this._register(C.onDidClick(M=>{this.onDidAcceptEmitter.fire()}));const y=X(l,yr(".quick-input-action")),E=new RP(y);E.label=m("custom","Custom"),this._register(E.onDidClick(M=>{this.onDidCustomEmitter.fire()}));const S=X(u,yr(`#${this.idPrefix}message.quick-input-message`)),w=this._register(new yN(e,this.idPrefix+"list",this.options));this._register(w.onChangedAllVisibleChecked(M=>{c.checked=M})),this._register(w.onChangedVisibleCount(M=>{p.setCount(M)})),this._register(w.onChangedCheckedCount(M=>{v.setCount(M)})),this._register(w.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof s_&&this.controller.canSelectMany&&w.clearFocus()},0)})),this._register(w.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const x=new Tre(e);x.getContainer().classList.add("quick-input-progress");const D=Rf(e);return this._register(D),this._register(J(e,Te.FOCUS,M=>{this.previousFocusElement=M.relatedTarget instanceof HTMLElement?M.relatedTarget:void 0},!0)),this._register(D.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(r_.Blur),this.previousFocusElement=void 0})),this._register(J(e,Te.FOCUS,M=>{f.setFocus()})),this._register(J(e,Te.KEY_DOWN,M=>{const B=new ei(M);switch(B.keyCode){case 3:xt.stop(M,!0),this.onDidAcceptEmitter.fire();break;case 9:xt.stop(M,!0),this.hide(r_.Gesture);break;case 2:if(!B.altKey&&!B.ctrlKey&&!B.metaKey){const z=[".action-label.codicon"];e.classList.contains("show-checkboxes")?z.push("input"):z.push("input[type=text]"),this.getUI().list.isDisplayed()&&z.push(".monaco-list");const j=e.querySelectorAll(z.join(", "));B.shiftKey&&B.target===j[0]?(xt.stop(M,!0),j[j.length-1].focus()):!B.shiftKey&&B.target===j[j.length-1]&&(xt.stop(M,!0),j[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:s,description1:a,description2:d,rightActionBar:o,checkAll:c,filterContainer:h,inputBox:f,visibleCountContainer:g,visibleCount:p,countContainer:_,count:v,okContainer:b,ok:C,message:S,customButtonContainer:y,customButton:E,list:w,progressBar:x,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:M=>this.show(M),hide:()=>this.hide(),setVisibilities:M=>this.setVisibilities(M),setComboboxAccessibility:M=>this.setComboboxAccessibility(M),setEnabled:M=>this.setEnabled(M),setContextKey:M=>this.options.setContextKey(M)},this.updateStyles(),this.ui}pick(e,t={},i=it.None){return new Promise((n,s)=>{let o=d=>{o=n,t.onKeyMods&&t.onKeyMods(a.keyMods),n(d)};if(i.isCancellationRequested){o(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)o(a.selectedItems.slice()),a.hide();else{const d=a.activeItems[0];d&&(o(d),a.hide())}}),a.onDidChangeActive(d=>{const u=d[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(d=>{if(!a.canSelectMany){const u=d[0];u&&(o(u),a.hide())}}),a.onDidTriggerItemButton(d=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},d),{removeItem:()=>{const u=a.items.indexOf(d.item);if(u!==-1){const h=a.items.slice(),f=h.splice(u,1),g=a.activeItems.filter(_=>_!==f[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=h,g&&(a.activeItems=g),a.keepScrollPosition=p}}}))),a.onDidChangeValue(d=>{l&&!d&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{ft(c),o(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([d,u])=>{l=u,a.busy=!1,a.items=d,a.canSelectMany&&(a.selectedItems=d.filter(h=>h.type!=="separator"&&h.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,d=>{s(d),a.hide()})})}createQuickPick(){const e=this.getUI();return new s_(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(ri.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),_c(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,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();rT.tooltip=n?m("quickInput.backWithKeybinding","Back ({0})",n):m("quickInput.back","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.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[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!(!((t=this.ui)===null||t===void 0)&&t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,q0.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const o=[];this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(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 a=o.join(` +`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}q0.MAX_WIDTH=600;var sT;(function(r){r[r.PRESERVE=0]="PRESERVE",r[r.LAST=1]="LAST"})(sT||(sT={}));const Gu={Quickaccess:"workbench.contributions.quickaccess"};class nse{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Xe(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return Ou([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}_i.add(Gu.Quickaccess,new nse);const Uc=bt("quickInputService");var rse=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let oT=class extends Z{constructor(e,t){super();this.quickInputService=e,this.instantiationService=t,this.registry=_i.as(Gu.Quickaccess),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),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&o&&l===o){e!==o.prefix&&!(i!=null&&i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,o,i);return}if(o&&!(i!=null&&i.preserveValue)){let g;if(a&&l&&l!==o){const p=a.value.substr(l.prefix.length);p&&(g=`${o.prefix}${p}`)}if(!g){const p=s==null?void 0:s.defaultFilterValue;p===sT.LAST?g=this.lastAcceptedPickerValues.get(o):typeof p=="string"&&(g=`${o.prefix}${p}`)}typeof g=="string"&&(e=g)}const c=new ue,d=c.add(this.quickInputService.createQuickPick());d.value=e,this.adjustValueSelection(d,o,i),d.placeholder=o==null?void 0:o.placeholder,d.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,d.hideInput=!!d.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(d.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:Us.SECOND),d.contextKey=o==null?void 0:o.contextKey,d.filterValue=g=>g.substring(o?o.prefix.length:0),o!=null&&o.placeholder&&(d.ariaLabel=o==null?void 0:o.placeholder);let u,h;t&&(u=new Promise(g=>h=g),c.add(ll(d.onWillAccept)(g=>{g.veto(),d.hide()}))),c.add(this.registerPickerListeners(d,s,o,e));const f=c.add(new Hn);if(s&&c.add(s.provide(d,f.token)),ll(d.onDidHide)(()=>{d.selectedItems.length===0&&f.cancel(),c.dispose(),h==null||h(d.selectedItems)}),d.show(),t)return u}adjustValueSelection(e,t,i){var n;let s;i!=null&&i.preserveValue?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n){const s=new ue,o=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(Xe(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):o.value=a})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}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]}};oT=rse([WP(0,Uc),WP(1,gt)],oT);var sse=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},np=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let aT=class extends iY{constructor(e,t,i,n,s){super(i);this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(oT))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const s={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,c,d,u)=>this.instantiationService.createInstance(KL,a,l,c,d,u),styles:this.computeStyles()},o=this._register(new q0(Object.assign(Object.assign({},s),t)));return o.layout(e.dimension,(n=(i=e.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0),this._register(e.onDidLayout(a=>{var l,c;return o.layout(a,(c=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&c!==void 0?c:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new xe(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=it.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},js(this.theme,{quickInputBackground:tM,quickInputForeground:SZ,quickInputTitleBackground:xZ,contrastBorder:gi,widgetShadow:Sc})),inputBox:js(this.theme,{inputForeground:fA,inputBackground:hA,inputBorder:gA,inputValidationInfoBackground:pA,inputValidationInfoForeground:mA,inputValidationInfoBorder:_A,inputValidationWarningBackground:PW,inputValidationWarningForeground:FW,inputValidationWarningBorder:BW,inputValidationErrorBackground:WW,inputValidationErrorForeground:VW,inputValidationErrorBorder:HW}),countBadge:js(this.theme,{badgeBackground:Yp,badgeForeground:Zp,badgeBorder:gi}),button:js(this.theme,{buttonForeground:gZ,buttonBackground:hL,buttonHoverBackground:pZ,buttonBorder:gi}),progressBar:js(this.theme,{progressBarBackground:mZ}),keybindingLabel:js(this.theme,{keybindingLabelBackground:LZ,keybindingLabelForeground:TZ,keybindingLabelBorder:IZ,keybindingLabelBottomBorder:DZ,keybindingLabelShadow:Sc}),list:js(this.theme,{listBackground:tM,listInactiveFocusForeground:iC,listInactiveSelectionIconForeground:nC,listInactiveFocusBackground:rC,listFocusOutline:Tn,listInactiveFocusOutline:Tn,pickerGroupBorder:kZ,pickerGroupForeground:EZ})}}};aT=sse([np(0,gt),np(1,Be),np(2,Gt),np(3,Cr),np(4,F0)],aT);var R6=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bd=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let lT=class extends aT{constructor(e,t,i,n,s,o){super(t,i,n,s,o);this.host=void 0;const a=Zf.get(e);this.host={_serviceBrand:void 0,get container(){return a.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};lT=R6([bd(1,gt),bd(2,Be),bd(3,Gt),bd(4,Cr),bd(5,F0)],lT);let cT=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}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(lT,e);this.mapEditorToService.set(e,t),ll(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=it.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};cT=R6([bd(0,gt),bd(1,Ct)],cT);class Zf{constructor(e){this.editor=e,this.widget=new G0(this.editor)}static get(e){return e.getContribution(Zf.ID)}dispose(){this.widget.dispose()}}Zf.ID="editor.controller.quickInput";class G0{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return G0.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}G0.ID="editor.contrib.quickInputWidget";wt(Zf.ID,Zf);var yt;(function(r){const e=new qm;class t{constructor(l,c){this._serviceId=l,this._factory=c,this._value=null}get id(){return this._serviceId}get(l){if(!this._value){if(l&&(this._value=l[this._serviceId.toString()]),this._value||(this._value=this._factory(l)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");e.set(this._serviceId,this._value)}return this._value}}r.LazyStaticService=t;let i=[];function n(a,l){let c=new t(a,l);return i.push(c),c}function s(a){let l=new qm;for(const[d,u]of ote())l.set(d,u);for(let d in a)a.hasOwnProperty(d)&&l.set(bt(d),a[d]);i.forEach(d=>l.set(d.id,d.get(a)));let c=new Qw(l,!0);return l.set(gt,c),[l,c]}r.init=s,r.instantiationService=n(gt,()=>new Qw(e,!0));const o=new gW;r.configurationService=n(di,()=>o),r.resourceConfigurationService=n(FD,()=>new YK(o)),r.resourcePropertiesService=n($3,()=>new nL(o)),r.contextService=n(cW,()=>new p0),r.labelService=n(ib,()=>new QK),r.telemetryService=n(Wc,()=>new ZK),r.dialogService=n(tb,()=>new GK),r.notificationService=n(ki,()=>new g0),r.markerService=n(ob,()=>new _d),r.modeService=n(Fs,a=>new Ute),r.standaloneThemeService=n(Uu,()=>new bie),r.logService=n(_l,()=>new IG(new TG)),r.undoRedoService=n(A0,a=>new ay(r.dialogService.get(a),r.notificationService.get(a))),r.modelService=n(mi,a=>new Kw(r.configurationService.get(a),r.resourcePropertiesService.get(a),r.standaloneThemeService.get(a),r.logService.get(a),r.undoRedoService.get(a))),r.markerDecorationsService=n(JD,a=>new QL(r.modelService.get(a),r.markerService.get(a))),r.contextKeyService=n(Be,a=>new NL(r.configurationService.get(a))),r.codeEditorService=n(Ct,a=>new qw(null,r.contextKeyService.get(a),r.standaloneThemeService.get(a))),r.editorProgressService=n(bl,()=>new f0),r.storageService=n(ba,()=>new mre),r.editorWorkerService=n(Ps,a=>new Zk(r.modelService.get(a),r.resourceConfigurationService.get(a),r.logService.get(a)))})(yt||(yt={}));class ose extends Z{constructor(e,t){super();const[i,n]=yt.init(t);this._serviceCollection=i,this._instantiationService=n;const s=this.get(di),o=this.get(ki),a=this.get(Wc),l=this.get(Gt),c=this.get(_l),d=this.get(Be);let u=(_,v)=>{let b=null;return t&&(b=t[_.toString()]),b||(b=v()),this._serviceCollection.set(_,b),b};u(Cr,()=>new JL(d,s)),u(ls,()=>new qL(l));let h=u(pi,()=>new KK(this._instantiationService)),f=u(Zt,()=>this._register(new fW(d,h,a,o,c,e))),g=u(F0,()=>new JK(yt.codeEditorService.get(Ct),e));u(Uc,()=>new cT(n,yt.codeEditorService.get(Ct)));let p=u(Vc,()=>this._register(new VL(g)));u($c,()=>new Cre),u(Hc,()=>{const _=new WL(a,o,p,f,l);return _.configure({blockMouse:!1}),this._register(_)}),u(Bu,()=>new ZL(h)),u(jD,()=>new XK(yt.modelService.get(mi)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function O6(r,e,t){let i=new ose(r,e),n=null;i.has(ho)||(n=new iL(yt.modelService.get()),i.set(ho,n)),i.has(co)||i.set(co,new Fk(i.get(Ct),i.get(pi)));let s=t(i);return n&&n.setEditor(s),s}function ase(r,e,t){return O6(r,t||{},i=>new TL(r,e,i,i.get(gt),i.get(Ct),i.get(pi),i.get(Be),i.get(Zt),i.get(Vc),i.get(Uu),i.get(ki),i.get(di),i.get(Cr),i.get(mi),i.get(Fs)))}function lse(r){return yt.codeEditorService.get().onCodeEditorAdd(e=>{r(e)})}function cse(r,e,t){return O6(r,t||{},i=>new IL(r,e,i,i.get(gt),i.get(Be),i.get(Zt),i.get(Vc),i.get(Ps),i.get(Ct),i.get(Uu),i.get(ki),i.get(di),i.get(Hc),i.get(bl),i.get($c)))}function dse(r,e){return new sq(r,e)}function use(r,e,t){return P8(yt.modelService.get(),yt.modeService.get(),r,e,t)}function hse(r,e){yt.modelService.get().setMode(r,yt.modeService.get().create(e))}function fse(r,e,t){r&&yt.markerService.get().changeOne(e,r.uri,t)}function gse(r){return yt.markerService.get().read(r)}function pse(r){return yt.markerService.get().onMarkerChanged(r)}function mse(r){return yt.modelService.get().getModel(r)}function _se(){return yt.modelService.get().getModels()}function bse(r){return yt.modelService.get().onModelAdded(r)}function vse(r){return yt.modelService.get().onModelRemoved(r)}function Cse(r){return yt.modelService.get().onModelModeChanged(e=>{r({model:e.model,oldLanguage:e.oldModeId})})}function wse(r){return OG(yt.modelService.get(),r)}function yse(r,e){const t=yt.standaloneThemeService.get();return t.registerEditorContainer(r),zD.colorizeElement(t,yt.modeService.get(),r,e)}function Sse(r,e,t){return yt.standaloneThemeService.get().registerEditorContainer(document.body),zD.colorize(yt.modeService.get(),r,e,t)}function xse(r,e,t=4){return yt.standaloneThemeService.get().registerEditorContainer(document.body),zD.colorizeModelLine(r,e,t)}function Ese(r){let e=Qt.get(r);return e||{getInitialState:()=>G_,tokenize:(t,i,n,s)=>R3(r,t,n,s)}}function kse(r,e){yt.modeService.get().triggerMode(e);let i=Ese(e),n=aa(r),s=[],o=i.getInitialState();for(let a=0,l=n.length;a<l;a++){let c=n[a],d=i.tokenize(c,!0,o,0);s[a]=d.tokens,o=d.endState}return s}function Lse(r,e){yt.standaloneThemeService.get().defineTheme(r,e)}function Tse(r){yt.standaloneThemeService.get().setTheme(r)}function Ise(){uY()}function Dse(r,e){return lt.registerCommand({id:r,handler:e})}function Ase(){return{create:ase,onDidCreateEditor:lse,createDiffEditor:cse,createDiffNavigator:dse,createModel:use,setModelLanguage:hse,setModelMarkers:fse,getModelMarkers:gse,onDidChangeMarkers:pse,getModels:_se,getModel:mse,onDidCreateModel:bse,onWillDisposeModel:vse,onDidChangeModelLanguage:Cse,createWebWorker:wse,colorizeElement:yse,colorize:Sse,colorizeModelLine:xse,tokenize:kse,defineTheme:Lse,setTheme:Tse,remeasureFonts:Ise,registerCommand:Dse,AccessibilitySupport:jE,ContentWidgetPositionPreference:ZE,CursorChangeReason:XE,DefaultEndOfLine:QE,EditorAutoIndentStrategy:ek,EditorOption:tk,EndOfLinePreference:ik,EndOfLineSequence:nk,MinimapPosition:dk,MouseTargetType:uk,OverlayWidgetPositionPreference:hk,OverviewRulerLane:fk,RenderLineNumbersType:gk,RenderMinimap:pk,ScrollbarVisibility:_k,ScrollType:mk,TextEditorCursorBlinkingStyle:yk,TextEditorCursorStyle:Sk,TrackedRangeStickiness:xk,WrappingIndent:Ek,ConfigurationChangedEvent:FB,BareFontInfo:Pd,FontInfo:Wk,TextModelResolvedOptions:qv,FindMatch:wm,EditorType:q_,EditorOptions:mo}}function Nse(r,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!r(t))return!1;return!0}function cv(r,e){return typeof r=="boolean"?r:e}function VP(r,e){return typeof r=="string"?r:e}function Rse(r){const e={};for(const t of r)e[t]=!0;return e}function HP(r,e=!1){e&&(r=r.map(function(i){return i.toLowerCase()}));const t=Rse(r);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function dT(r,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,o){i=!0;let a="";if(typeof r[o]=="string")a=r[o];else if(r[o]&&r[o]instanceof RegExp)a=r[o].source;else throw r[o]===void 0?Ot(r,"language definition does not contain attribute '"+o+"', used at: "+e):Ot(r,"attribute reference '"+o+"' must be a string, used at: "+e);return Bh(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");let n=(r.ignoreCase?"i":"")+(r.unicode?"u":"");return new RegExp(e,n)}function Ose(r,e,t,i){if(i<0)return r;if(i<e.length)return e[i];if(i>=100){i=i-100;let n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function Mse(r,e,t,i){let n=-1,s=t,o=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);o&&(o[3]&&(n=parseInt(o[3]),o[2]&&(n=n+100)),s=o[4]);let a="~",l=s;!s||s.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(o=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),o&&(a=o[1],l=o[2]));let c;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){let d=HP(l.split("|"),r.ignoreCase);c=function(u){return a==="~"?d(u):!d(u)}}else if(a==="@"||a==="!@"){let d=r[l];if(!d)throw Ot(r,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!Nse(function(h){return typeof h=="string"},d))throw Ot(r,"the @ match target '"+l+"' must be an array of strings, in rule: "+e);let u=HP(d,r.ignoreCase);c=function(h){return a==="@"?u(h):!u(h)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){let d=dT(r,"^"+l+"$");c=function(u){return a==="~"?d.test(u):!d.test(u)}}else c=function(d,u,h,f){return dT(r,"^"+ql(r,l,u,h,f)+"$").test(d)};else if(l.indexOf("$")<0){let d=oc(r,l);c=function(u){return a==="=="?u===d:u!==d}}else{let d=oc(r,l);c=function(u,h,f,g,p){let _=ql(r,d,h,f,g);return a==="=="?u===_:u!==_}}return n===-1?{name:t,value:i,test:function(d,u,h,f){return c(d,d,u,h,f)}}:{name:t,value:i,test:function(d,u,h,f){let g=Ose(d,u,h,n);return c(g||"",d,u,h,f)}}}function uT(r,e,t){if(t){if(typeof t=="string")return t;if(t.token||t.token===""){if(typeof t.token!="string")throw Ot(r,"a 'token' attribute must be of type string, in rule: "+e);{let i={token:t.token};if(t.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw Ot(r,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Ot(r,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!QG(r,ql(r,n,"",[],""))))throw Ot(r,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,r.usesEmbedded=!0),i}}else if(Array.isArray(t)){let i=[];for(let n=0,s=t.length;n<s;n++)i[n]=uT(r,e,t[n]);return{group:i}}else if(t.cases){let i=[];for(let s in t.cases)if(t.cases.hasOwnProperty(s)){const o=uT(r,e,t.cases[s]);s==="@default"||s==="@"||s===""?i.push({test:void 0,value:o,name:s}):s==="@eos"?i.push({test:function(a,l,c,d){return d},value:o,name:s}):i.push(Mse(r,e,s,o))}const n=r.defaultToken;return{test:function(s,o,a,l){for(const c of i)if(!c.test||c.test(s,o,a,l))return c.value;return n}}}else throw Ot(r,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class Pse{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if(typeof t=="string")i=t;else if(t instanceof RegExp)i=t.source;else throw Ot(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=dT(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=uT(e,this.name,t)}}function Fse(r,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");let t={};t.languageId=r,t.includeLF=cv(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=cv(e.ignoreCase,!1),t.unicode=cv(e.unicode,!1),t.tokenPostfix=VP(e.tokenPostfix,"."+t.languageId),t.defaultToken=VP(e.defaultToken,"source"),t.usesEmbedded=!1;let i=e;i.languageId=r,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(o,a,l){for(const c of l){let d=c.include;if(d){if(typeof d!="string")throw Ot(t,"an 'include' attribute must be a string at: "+o);if(d[0]==="@"&&(d=d.substr(1)),!e.tokenizer[d])throw Ot(t,"include target '"+d+"' is not defined at: "+o);n(o+"."+d,a,e.tokenizer[d])}else{const u=new Pse(o);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(u.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")u.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const h=c[1];h.next=c[2],u.setAction(i,h)}else throw Ot(t,"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: "+o);else u.setAction(i,c[1]);else{if(!c.regex)throw Ot(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);c.name&&typeof c.name=="string"&&(u.name=c.name),c.matchOnlyAtStart&&(u.matchOnlyAtLineStart=cv(c.matchOnlyAtLineStart,!1)),u.setRegex(i,c.regex),u.setAction(i,c.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Ot(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){t.start||(t.start=o);const a=e.tokenizer[o];t.tokenizer[o]=new Array,n("tokenizer."+o,t.tokenizer[o],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Ot(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let s=[];for(let o of e.brackets){let a=o;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Ot(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` + hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:oc(t,a.open),close:oc(t,a.close)});else throw Ot(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function Bse(r){Gd.registerLanguage(r)}function Wse(){let r=[];return r=r.concat(Gd.getLanguages()),r}function Vse(r){let e=yt.modeService.get().getLanguageIdentifier(r);return e?e.id:0}function Hse(r,e){let t=yt.modeService.get().onDidEncounterLanguage(i=>{i.language===r&&(t.dispose(),e())});return t}function $se(r,e){let t=yt.modeService.get().getLanguageIdentifier(r);if(!t)throw new Error(`Cannot set configuration for unknown language ${r}`);return Ue.register(t,e,100)}class Use{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return o_.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new Uy(n.tokens,n.endState)}}class o_{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],s=0;for(let o=0,a=e.length;o<a;o++){const l=e[o];let c=l.startIndex;o===0?c=0:c<s&&(c=s),n[o]=new $y(c+i,l.scopes,t),s=c}return n}static adaptTokenize(e,t,i,n,s){let o=t.tokenize(i,n),a=o_._toClassicTokens(o.tokens,e,s),l;return o.endState.equals(n)?l=n:l=o.endState,new cD(a,l)}tokenize(e,t,i,n){return o_.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let s=[],o=0,a=0;for(let c=0,d=e.length;c<d;c++){const u=e[c],h=n.match(i,u.scopes);if(o>0&&s[o-1]===h)continue;let f=u.startIndex;c===0?f=0:f<a&&(f=a),s[o++]=f+t,s[o++]=h,a=f}let l=new Uint32Array(o);for(let c=0;c<o;c++)l[c]=s[c];return l}tokenize2(e,t,i,n){let s=this._actual.tokenize(e,i),o=this._toBinaryTokens(s.tokens,n),a;return s.endState.equals(i)?a=i:a=s.endState,new Uy(o,a)}}function zse(r){return"tokenizeEncoded"in r}function M6(r){return r&&typeof r.then=="function"}function jse(r){if(r){const e=[null];for(let t=1,i=r.length;t<i;t++)e[t]=q.fromHex(r[t]);yt.standaloneThemeService.get().setColorMapOverride(e)}else yt.standaloneThemeService.get().setColorMapOverride(null)}function qse(r,e){let t=yt.modeService.get().getLanguageIdentifier(r);if(!t)throw new Error(`Cannot set tokens provider for unknown language ${r}`);const i=n=>zse(n)?new Use(t,n):new o_(yt.standaloneThemeService.get(),t,n);return M6(e)?Qt.registerPromise(r,e.then(n=>i(n))):Qt.register(r,i(e))}function Gse(r,e){const t=i=>tK(yt.modeService.get(),yt.standaloneThemeService.get(),r,Fse(r,i));return M6(e)?Qt.registerPromise(r,e.then(i=>t(i))):Qt.register(r,t(e))}function Kse(r,e){return ZC.register(r,e)}function Yse(r,e){return XC.register(r,e)}function Zse(r,e){return Fd.register(r,e)}function Xse(r,e){return Sm.register(r,{provideHover:(t,i,n)=>{let s=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(o=>{if(!!o)return!o.range&&s&&(o.range=new k(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),o.range||(o.range=new k(i.lineNumber,i.column,i.lineNumber,i.column)),o})}})}function Qse(r,e){return Es.register(r,e)}function Jse(r,e){return Pf.register(r,e)}function eoe(r,e){return QC.register(r,e)}function toe(r,e){return xm.register(r,e)}function ioe(r,e){return ew.register(r,e)}function noe(r,e){return tw.register(r,e)}function roe(r,e){return za.register(r,e)}function soe(r,e,t){return ia.register(r,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,provideCodeActions:(i,n,s,o)=>{let a=yt.markerService.get().read({resource:i.uri}).filter(l=>k.areIntersectingOrTouching(l,n));return e.provideCodeActions(i,n,{markers:a,only:s.only},o)},resolveCodeAction:e.resolveCodeAction})}function ooe(r,e){return Bp.register(r,e)}function aoe(r,e){return Xs.register(r,e)}function loe(r,e){return iw.register(r,e)}function coe(r,e){return Em.register(r,e)}function doe(r,e){return Zs.register(r,e)}function uoe(r,e){return Ff.register(r,e)}function hoe(r,e){return Hk.register(r,e)}function foe(r,e){return JC.register(r,e)}function goe(r,e){return Xy.register(r,e)}function poe(r,e){return nw.register(r,e)}function moe(r,e){return ND.register(r,e)}function _oe(r,e){return AD.register(r,e)}function boe(r,e){return Zl.register(r,e)}function voe(){return{register:Bse,getLanguages:Wse,onLanguage:Hse,getEncodedLanguageId:Vse,setLanguageConfiguration:$se,setColorMap:jse,setTokensProvider:qse,setMonarchTokensProvider:Gse,registerReferenceProvider:Kse,registerRenameProvider:Yse,registerCompletionItemProvider:doe,registerSignatureHelpProvider:Zse,registerHoverProvider:Xse,registerDocumentSymbolProvider:Qse,registerDocumentHighlightProvider:Jse,registerLinkedEditingRangeProvider:eoe,registerDefinitionProvider:toe,registerImplementationProvider:ioe,registerTypeDefinitionProvider:noe,registerCodeLensProvider:roe,registerCodeActionProvider:soe,registerDocumentFormattingEditProvider:ooe,registerDocumentRangeFormattingEditProvider:aoe,registerOnTypeFormattingEditProvider:loe,registerLinkProvider:coe,registerColorProvider:uoe,registerFoldingRangeProvider:hoe,registerDeclarationProvider:foe,registerSelectionRangeProvider:goe,registerDocumentSemanticTokensProvider:poe,registerDocumentRangeSemanticTokensProvider:moe,registerInlineCompletionsProvider:_oe,registerInlayHintsProvider:boe,DocumentHighlightKind:JE,CompletionItemKind:GE,CompletionItemTag:KE,CompletionItemInsertTextRule:qE,SymbolKind:Ck,SymbolTag:wk,IndentAction:rk,CompletionTriggerKind:YE,SignatureHelpTriggerKind:vk,InlayHintKind:sk,InlineCompletionTriggerKind:ok,FoldingRangeKind:uo}}class Xf{static _handleEolEdits(e,t){let i,n=[];for(let s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=Xf._handleEolEdits(e,t);n.length===1&&Xf._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(s=>ai.replace(k.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",n.map(s=>ai.replaceMove(k.lift(s.range),s.text))),i&&e.pushUndoStop()}}class Sx{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var Tc=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function SN(r){if(r=r.filter(n=>n.range),!r.length)return;let{range:e}=r[0];for(let n=1;n<r.length;n++)e=k.plusRange(e,r[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?r.length===1?sn(m("hint11","Made 1 formatting edit on line {0}",t)):sn(m("hintn1","Made {0} formatting edits on line {1}",r.length,t)):r.length===1?sn(m("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):sn(m("hintnn","Made {0} formatting edits between lines {1} and {2}",r.length,t,i))}function P6(r){const e=[],t=new Set,i=Bp.ordered(r);for(const s of i)e.push(s),s.extensionId&&t.add(Sx.toKey(s.extensionId));const n=Xs.ordered(r);for(const s of n){if(s.extensionId){if(t.has(Sx.toKey(s.extensionId)))continue;t.add(Sx.toKey(s.extensionId))}e.push({displayName:s.displayName,extensionId:s.extensionId,provideDocumentFormattingEdits(o,a,l){return s.provideDocumentRangeFormattingEdits(o,o.getFullModelRange(),a,l)}})}return e}class hu{static setFormatterSelector(e){return{dispose:hu._selectors.unshift(e)}}static select(e,t,i){return Tc(this,void 0,void 0,function*(){if(e.length===0)return;const n=at.first(hu._selectors);if(n)return yield n(e,t,i)})}}hu._selectors=new Dr;function F6(r,e,t,i,n,s){return Tc(this,void 0,void 0,function*(){const o=r.get(gt),a=la(e)?e.getModel():e,l=Xs.ordered(a),c=yield hu.select(l,a,i);c&&(n.report(c),yield o.invokeFunction(Coe,c,e,t,s))})}function Coe(r,e,t,i,n){return Tc(this,void 0,void 0,function*(){const s=r.get(Ps);let o,a;la(t)?(o=t.getModel(),a=new Ym(t,5,void 0,n)):(o=t,a=new UA(t,n));let l=[],c=0;for(let g of VD(i).sort(k.compareRangesUsingStarts))c>0&&k.areIntersectingOrTouching(l[c-1],g)?l[c-1]=k.fromPositions(l[c-1].getStartPosition(),g.getEndPosition()):c=l.push(g);const d=g=>Tc(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(o,g,o.getFormattingOptions(),a.token))||[]}),u=(g,p)=>{if(!g.length||!p.length)return!1;const _=g.reduce((v,b)=>k.plusRange(v,b.range),g[0].range);if(!p.some(v=>k.intersectRanges(_,v.range)))return!1;for(let v of g)for(let b of p)if(k.intersectRanges(v.range,b.range))return!0;return!1},h=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield d(g))}for(let g=0;g<l.length;++g)for(let p=g+1;p<l.length;++p){if(a.token.isCancellationRequested)return!0;if(u(f[g],f[p])){const _=k.plusRange(l[g],l[p]),v=yield d(_);l.splice(p,1),l.splice(g,1),l.push(_),f.splice(p,1),f.splice(g,1),f.push(v),g=0,p=0}}for(let g of f){if(a.token.isCancellationRequested)return!0;const p=yield s.computeMoreMinimalEdits(o.uri,g);p&&h.push(...p)}}finally{a.dispose()}if(h.length===0)return!1;if(la(t))Xf.execute(t,h,!0),SN(h),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:g}]=h,p=new _e(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn);o.pushEditOperations([p],h.map(_=>({text:_.text,range:k.lift(_.range),forceMoveMarkers:!0})),_=>{for(const{range:v}of _)if(k.areIntersectingOrTouching(v,p))return[new _e(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn)];return null})}return!0})}function woe(r,e,t,i,n){return Tc(this,void 0,void 0,function*(){const s=r.get(gt),o=la(e)?e.getModel():e,a=P6(o),l=yield hu.select(a,o,t);l&&(i.report(l),yield s.invokeFunction(yoe,l,e,t,n))})}function yoe(r,e,t,i,n){return Tc(this,void 0,void 0,function*(){const s=r.get(Ps);let o,a;la(t)?(o=t.getModel(),a=new Ym(t,5,void 0,n)):(o=t,a=new UA(t,n));let l;try{const c=yield e.provideDocumentFormattingEdits(o,o.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(o.uri,c),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(la(t))Xf.execute(t,l,i!==2),i!==2&&(SN(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:c}]=l,d=new _e(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn);o.pushEditOperations([d],l.map(u=>({text:u.text,range:k.lift(u.range),forceMoveMarkers:!0})),u=>{for(const{range:h}of u)if(k.areIntersectingOrTouching(h,d))return[new _e(h.startLineNumber,h.startColumn,h.endLineNumber,h.endColumn)];return null})}return!0})}function Soe(r,e,t,i,n){return Tc(this,void 0,void 0,function*(){const s=Xs.ordered(e);for(const o of s){let a=yield Promise.resolve(o.provideDocumentRangeFormattingEdits(e,t,i,n)).catch(Yi);if(mr(a))return yield r.computeMoreMinimalEdits(e.uri,a)}})}function xoe(r,e,t,i){return Tc(this,void 0,void 0,function*(){const n=P6(e);for(const s of n){let o=yield Promise.resolve(s.provideDocumentFormattingEdits(e,t,i)).catch(Yi);if(mr(o))return yield r.computeMoreMinimalEdits(e.uri,o)}})}function B6(r,e,t,i,n){const s=iw.ordered(e);return s.length===0||s[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(s[0].provideOnTypeFormattingEdits(e,t,i,n,it.None)).catch(Yi).then(o=>r.computeMoreMinimalEdits(e.uri,o))}lt.registerCommand("_executeFormatRangeProvider",function(r,...e){const[t,i,n]=e;Dt(De.isUri(t)),Dt(k.isIRange(i));const s=r.get(mi).getModel(t);if(!s)throw Or("resource");return Soe(r.get(Ps),s,k.lift(i),n,it.None)});lt.registerCommand("_executeFormatDocumentProvider",function(r,...e){const[t,i]=e;Dt(De.isUri(t));const n=r.get(mi).getModel(t);if(!n)throw Or("resource");return xoe(r.get(Ps),n,i,it.None)});lt.registerCommand("_executeFormatOnTypeProvider",function(r,...e){const[t,i,n,s]=e;Dt(De.isUri(t)),Dt(U.isIPosition(i)),Dt(typeof n=="string");const o=r.get(mi).getModel(t);if(!o)throw Or("resource");return B6(r.get(Ps),o,U.lift(i),n,s)});var xx;mo.wrappingIndent.defaultValue=0;mo.glyphMargin.defaultValue=!1;mo.autoIndent.defaultValue=3;mo.overviewRulerLanes.defaultValue=2;hu.setFormatterSelector((r,e,t)=>Promise.resolve(r[0]));const jn=GB();jn.editor=Ase();jn.languages=voe();const Eoe=jn.CancellationTokenSource,K0=jn.Emitter,koe=jn.KeyCode,Loe=jn.KeyMod,Toe=jn.Position,Ku=jn.Range,Ioe=jn.Selection,Doe=jn.SelectionDirection,Qs=jn.MarkerSeverity,Aoe=jn.MarkerTag,Y0=jn.Uri,Noe=jn.Token,Ui=jn.editor,we=jn.languages;(((xx=yi.MonacoEnvironment)===null||xx===void 0?void 0:xx.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=jn);typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.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 xN=function(){function r(e,t,i){this._onDidChange=new K0,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),r.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),EN={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},kN={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},W6=new xN("css",EN,kN),V6=new xN("scss",EN,kN),H6=new xN("less",EN,kN);we.css={cssDefaults:W6,lessDefaults:H6,scssDefaults:V6};function LN(){return Promise.resolve().then(function(){return sve})}we.onLanguage("less",function(){LN().then(function(r){return r.setupMode(H6)})});we.onLanguage("scss",function(){LN().then(function(r){return r.setupMode(V6)})});we.onLanguage("css",function(){LN().then(function(r){return r.setupMode(W6)})});var Roe=function(){function r(e,t,i){this._onDidChange=new K0,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),r.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),Ooe={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},Moe={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},$6=new Roe("json",Ooe,Moe);we.json={jsonDefaults:$6};function Poe(){return Promise.resolve().then(function(){return lCe})}we.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});we.onLanguage("json",function(){Poe().then(function(r){return r.setupMode($6)})});var Foe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Boe=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Woe=function(){function r(e,t,i){this._onDidChange=new K0,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),r.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),Voe={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},Z0={format:Voe,suggest:{},data:{useDefaultDataProvider:!0}};function X0(r){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:r===om,documentFormattingEdits:r===om,documentRangeFormattingEdits:r===om}}var om="html",$P="handlebars",UP="razor",U6=Q0(om,Z0,X0(om)),Hoe=U6.defaults,z6=Q0($P,Z0,X0($P)),$oe=z6.defaults,j6=Q0(UP,Z0,X0(UP)),Uoe=j6.defaults;we.html={htmlDefaults:Hoe,razorDefaults:Uoe,handlebarDefaults:$oe,htmlLanguageService:U6,handlebarLanguageService:z6,razorLanguageService:j6,registerHTMLLanguageService:Q0};function zoe(){return Promise.resolve().then(function(){return xCe})}function Q0(r,e,t){var i=this;e===void 0&&(e=Z0),t===void 0&&(t=X0(r));var n=new Woe(r,e,t),s,o=we.onLanguage(r,function(){return Foe(i,void 0,void 0,function(){return Boe(this,function(a){switch(a.label){case 0:return[4,zoe()];case 1:return s=a.sent().setupMode(n),[2]}})})});return{defaults:n,dispose:function(){o.dispose(),s==null||s.dispose(),s=void 0}}}var q6={},Ex={},joe=function(){function r(e){var t=this;this._languageId=e,this._loadingTriggered=!1,this._lazyLoadPromise=new Promise(function(i,n){t._lazyLoadPromiseResolve=i,t._lazyLoadPromiseReject=n})}return r.getOrCreate=function(e){return Ex[e]||(Ex[e]=new r(e)),Ex[e]},r.prototype.whenLoaded=function(){return this._lazyLoadPromise},r.prototype.load=function(){var e=this;return this._loadingTriggered||(this._loadingTriggered=!0,q6[this._languageId].loader().then(function(t){return e._lazyLoadPromiseResolve(t)},function(t){return e._lazyLoadPromiseReject(t)})),this._lazyLoadPromise},r}();function Ie(r){var e=r.id;q6[e]=r,we.register(r);var t=joe.getOrCreate(e);we.setMonarchTokensProvider(e,t.whenLoaded().then(function(i){return i.language})),we.onLanguage(e,function(){t.load().then(function(i){we.setLanguageConfiguration(e,i.conf)})})}Ie({id:"abap",extensions:[".abap"],aliases:["abap","ABAP"],loader:function(){return Promise.resolve().then(function(){return LCe})}});Ie({id:"apex",extensions:[".cls"],aliases:["Apex","apex"],mimetypes:["text/x-apex-source","text/x-apex"],loader:function(){return Promise.resolve().then(function(){return NCe})}});Ie({id:"azcli",extensions:[".azcli"],aliases:["Azure CLI","azcli"],loader:function(){return Promise.resolve().then(function(){return MCe})}});Ie({id:"bat",extensions:[".bat",".cmd"],aliases:["Batch","bat"],loader:function(){return Promise.resolve().then(function(){return BCe})}});Ie({id:"bicep",extensions:[".bicep"],aliases:["Bicep"],loader:function(){return Promise.resolve().then(function(){return YCe})}});Ie({id:"cameligo",extensions:[".mligo"],aliases:["Cameligo"],loader:function(){return Promise.resolve().then(function(){return QCe})}});Ie({id:"clojure",extensions:[".clj",".cljs",".cljc",".edn"],aliases:["clojure","Clojure"],loader:function(){return Promise.resolve().then(function(){return twe})}});Ie({id:"coffeescript",extensions:[".coffee"],aliases:["CoffeeScript","coffeescript","coffee"],mimetypes:["text/x-coffeescript","text/coffeescript"],loader:function(){return Promise.resolve().then(function(){return rwe})}});Ie({id:"c",extensions:[".c",".h"],aliases:["C","c"],loader:function(){return Promise.resolve().then(function(){return LH})}});Ie({id:"cpp",extensions:[".cpp",".cc",".cxx",".hpp",".hh",".hxx"],aliases:["C++","Cpp","cpp"],loader:function(){return Promise.resolve().then(function(){return LH})}});Ie({id:"csharp",extensions:[".cs",".csx",".cake"],aliases:["C#","csharp"],loader:function(){return Promise.resolve().then(function(){return cwe})}});Ie({id:"csp",extensions:[],aliases:["CSP","csp"],loader:function(){return Promise.resolve().then(function(){return hwe})}});Ie({id:"css",extensions:[".css"],aliases:["CSS","css"],mimetypes:["text/css"],loader:function(){return Promise.resolve().then(function(){return pwe})}});Ie({id:"dart",extensions:[".dart"],aliases:["Dart","dart"],mimetypes:["text/x-dart-source","text/x-dart"],loader:function(){return Promise.resolve().then(function(){return bwe})}});Ie({id:"dockerfile",extensions:[".dockerfile"],filenames:["Dockerfile"],aliases:["Dockerfile"],loader:function(){return Promise.resolve().then(function(){return wwe})}});Ie({id:"ecl",extensions:[".ecl"],aliases:["ECL","Ecl","ecl"],loader:function(){return Promise.resolve().then(function(){return xwe})}});Ie({id:"elixir",extensions:[".ex",".exs"],aliases:["Elixir","elixir","ex"],loader:function(){return Promise.resolve().then(function(){return Lwe})}});Ie({id:"flow9",extensions:[".flow"],aliases:["Flow9","Flow","flow9","flow"],loader:function(){return Promise.resolve().then(function(){return Dwe})}});Ie({id:"fsharp",extensions:[".fs",".fsi",".ml",".mli",".fsx",".fsscript"],aliases:["F#","FSharp","fsharp"],loader:function(){return Promise.resolve().then(function(){return Rwe})}});Ie({id:"go",extensions:[".go"],aliases:["Go"],loader:function(){return Promise.resolve().then(function(){return Pwe})}});Ie({id:"graphql",extensions:[".graphql",".gql"],aliases:["GraphQL","graphql","gql"],mimetypes:["application/graphql"],loader:function(){return Promise.resolve().then(function(){return Wwe})}});Ie({id:"handlebars",extensions:[".handlebars",".hbs"],aliases:["Handlebars","handlebars","hbs"],mimetypes:["text/x-handlebars-template"],loader:function(){return Promise.resolve().then(function(){return $we})}});Ie({id:"hcl",extensions:[".tf",".tfvars",".hcl"],aliases:["Terraform","tf","HCL","hcl"],loader:function(){return Promise.resolve().then(function(){return jwe})}});Ie({id:"html",extensions:[".html",".htm",".shtml",".xhtml",".mdoc",".jsp",".asp",".aspx",".jshtm"],aliases:["HTML","htm","html","xhtml"],mimetypes:["text/html","text/x-jshtm","text/template","text/ng-template"],loader:function(){return Promise.resolve().then(function(){return Kwe})}});Ie({id:"ini",extensions:[".ini",".properties",".gitconfig"],filenames:["config",".gitattributes",".gitconfig",".editorconfig"],aliases:["Ini","ini"],loader:function(){return Promise.resolve().then(function(){return Xwe})}});Ie({id:"java",extensions:[".java",".jav"],aliases:["Java","java"],mimetypes:["text/x-java-source","text/x-java"],loader:function(){return Promise.resolve().then(function(){return eye})}});Ie({id:"javascript",extensions:[".js",".es6",".jsx",".mjs"],firstLine:"^#!.*\\bnode",filenames:["jakefile"],aliases:["JavaScript","javascript","js"],mimetypes:["text/javascript"],loader:function(){return Promise.resolve().then(function(){return rye})}});Ie({id:"julia",extensions:[".jl"],aliases:["julia","Julia"],loader:function(){return Promise.resolve().then(function(){return aye})}});Ie({id:"kotlin",extensions:[".kt"],aliases:["Kotlin","kotlin"],mimetypes:["text/x-kotlin-source","text/x-kotlin"],loader:function(){return Promise.resolve().then(function(){return dye})}});Ie({id:"less",extensions:[".less"],aliases:["Less","less"],mimetypes:["text/x-less","text/less"],loader:function(){return Promise.resolve().then(function(){return fye})}});Ie({id:"lexon",extensions:[".lex"],aliases:["Lexon"],loader:function(){return Promise.resolve().then(function(){return mye})}});Ie({id:"lua",extensions:[".lua"],aliases:["Lua","lua"],loader:function(){return Promise.resolve().then(function(){return vye})}});Ie({id:"liquid",extensions:[".liquid",".html.liquid"],aliases:["Liquid","liquid"],mimetypes:["application/liquid"],loader:function(){return Promise.resolve().then(function(){return yye})}});Ie({id:"m3",extensions:[".m3",".i3",".mg",".ig"],aliases:["Modula-3","Modula3","modula3","m3"],loader:function(){return Promise.resolve().then(function(){return Eye})}});Ie({id:"markdown",extensions:[".md",".markdown",".mdown",".mkdn",".mkd",".mdwn",".mdtxt",".mdtext"],aliases:["Markdown","markdown"],loader:function(){return Promise.resolve().then(function(){return Tye})}});Ie({id:"mips",extensions:[".s"],aliases:["MIPS","MIPS-V"],mimetypes:["text/x-mips","text/mips","text/plaintext"],loader:function(){return Promise.resolve().then(function(){return Aye})}});Ie({id:"msdax",extensions:[".dax",".msdax"],aliases:["DAX","MSDAX"],loader:function(){return Promise.resolve().then(function(){return Oye})}});Ie({id:"mysql",extensions:[],aliases:["MySQL","mysql"],loader:function(){return Promise.resolve().then(function(){return Fye})}});Ie({id:"objective-c",extensions:[".m"],aliases:["Objective-C"],loader:function(){return Promise.resolve().then(function(){return Vye})}});Ie({id:"pascal",extensions:[".pas",".p",".pp"],aliases:["Pascal","pas"],mimetypes:["text/x-pascal-source","text/x-pascal"],loader:function(){return Promise.resolve().then(function(){return Uye})}});Ie({id:"pascaligo",extensions:[".ligo"],aliases:["Pascaligo","ligo"],loader:function(){return Promise.resolve().then(function(){return qye})}});Ie({id:"perl",extensions:[".pl"],aliases:["Perl","pl"],loader:function(){return Promise.resolve().then(function(){return Yye})}});Ie({id:"pgsql",extensions:[],aliases:["PostgreSQL","postgres","pg","postgre"],loader:function(){return Promise.resolve().then(function(){return Qye})}});Ie({id:"php",extensions:[".php",".php4",".php5",".phtml",".ctp"],aliases:["PHP","php"],mimetypes:["application/x-php"],loader:function(){return Promise.resolve().then(function(){return t0e})}});Ie({id:"pla",extensions:[".pla"],loader:function(){return Promise.resolve().then(function(){return r0e})}});Ie({id:"postiats",extensions:[".dats",".sats",".hats"],aliases:["ATS","ATS/Postiats"],loader:function(){return Promise.resolve().then(function(){return a0e})}});Ie({id:"powerquery",extensions:[".pq",".pqm"],aliases:["PQ","M","Power Query","Power Query M"],loader:function(){return Promise.resolve().then(function(){return d0e})}});Ie({id:"powershell",extensions:[".ps1",".psm1",".psd1"],aliases:["PowerShell","powershell","ps","ps1"],loader:function(){return Promise.resolve().then(function(){return f0e})}});Ie({id:"proto",extensions:[".proto"],aliases:["protobuf","Protocol Buffers"],loader:function(){return Promise.resolve().then(function(){return _0e})}});Ie({id:"pug",extensions:[".jade",".pug"],aliases:["Pug","Jade","jade"],loader:function(){return Promise.resolve().then(function(){return C0e})}});Ie({id:"python",extensions:[".py",".rpy",".pyw",".cpy",".gyp",".gypi"],aliases:["Python","py"],firstLine:"^#!/.*\\bpython[0-9.-]*\\b",loader:function(){return Promise.resolve().then(function(){return S0e})}});Ie({id:"qsharp",extensions:[".qs"],aliases:["Q#","qsharp"],loader:function(){return Promise.resolve().then(function(){return k0e})}});Ie({id:"r",extensions:[".r",".rhistory",".rmd",".rprofile",".rt"],aliases:["R","r"],loader:function(){return Promise.resolve().then(function(){return I0e})}});Ie({id:"razor",extensions:[".cshtml"],aliases:["Razor","razor"],mimetypes:["text/x-cshtml"],loader:function(){return Promise.resolve().then(function(){return N0e})}});Ie({id:"redis",extensions:[".redis"],aliases:["redis"],loader:function(){return Promise.resolve().then(function(){return M0e})}});Ie({id:"redshift",extensions:[],aliases:["Redshift","redshift"],loader:function(){return Promise.resolve().then(function(){return B0e})}});Ie({id:"restructuredtext",extensions:[".rst"],aliases:["reStructuredText","restructuredtext"],loader:function(){return Promise.resolve().then(function(){return H0e})}});Ie({id:"ruby",extensions:[".rb",".rbx",".rjs",".gemspec",".pp"],filenames:["rakefile","Gemfile"],aliases:["Ruby","rb"],loader:function(){return Promise.resolve().then(function(){return z0e})}});Ie({id:"rust",extensions:[".rs",".rlib"],aliases:["Rust","rust"],loader:function(){return Promise.resolve().then(function(){return G0e})}});Ie({id:"sb",extensions:[".sb"],aliases:["Small Basic","sb"],loader:function(){return Promise.resolve().then(function(){return Z0e})}});Ie({id:"scala",extensions:[".scala",".sc",".sbt"],aliases:["Scala","scala","SBT","Sbt","sbt","Dotty","dotty"],mimetypes:["text/x-scala-source","text/x-scala","text/x-sbt","text/x-dotty"],loader:function(){return Promise.resolve().then(function(){return J0e})}});Ie({id:"scheme",extensions:[".scm",".ss",".sch",".rkt"],aliases:["scheme","Scheme"],loader:function(){return Promise.resolve().then(function(){return iSe})}});Ie({id:"scss",extensions:[".scss"],aliases:["Sass","sass","scss"],mimetypes:["text/x-scss","text/scss"],loader:function(){return Promise.resolve().then(function(){return sSe})}});Ie({id:"shell",extensions:[".sh",".bash"],aliases:["Shell","sh"],loader:function(){return Promise.resolve().then(function(){return lSe})}});Ie({id:"sol",extensions:[".sol"],aliases:["sol","solidity","Solidity"],loader:function(){return Promise.resolve().then(function(){return uSe})}});Ie({id:"aes",extensions:[".aes"],aliases:["aes","sophia","Sophia"],loader:function(){return Promise.resolve().then(function(){return gSe})}});Ie({id:"sparql",extensions:[".rq"],aliases:["sparql","SPARQL"],loader:function(){return Promise.resolve().then(function(){return _Se})}});Ie({id:"sql",extensions:[".sql"],aliases:["SQL"],loader:function(){return Promise.resolve().then(function(){return CSe})}});Ie({id:"st",extensions:[".st",".iecst",".iecplc",".lc3lib"],aliases:["StructuredText","scl","stl"],loader:function(){return Promise.resolve().then(function(){return SSe})}});Ie({id:"swift",aliases:["Swift","swift"],extensions:[".swift"],mimetypes:["text/swift"],loader:function(){return Promise.resolve().then(function(){return kSe})}});Ie({id:"systemverilog",extensions:[".sv",".svh"],aliases:["SV","sv","SystemVerilog","systemverilog"],loader:function(){return Promise.resolve().then(function(){return IH})}});Ie({id:"verilog",extensions:[".v",".vh"],aliases:["V","v","Verilog","verilog"],loader:function(){return Promise.resolve().then(function(){return IH})}});Ie({id:"tcl",extensions:[".tcl"],aliases:["tcl","Tcl","tcltk","TclTk","tcl/tk","Tcl/Tk"],loader:function(){return Promise.resolve().then(function(){return ASe})}});Ie({id:"twig",extensions:[".twig"],aliases:["Twig","twig"],mimetypes:["text/x-twig"],loader:function(){return Promise.resolve().then(function(){return OSe})}});Ie({id:"typescript",extensions:[".ts",".tsx"],aliases:["TypeScript","ts","typescript"],mimetypes:["text/typescript"],loader:function(){return Promise.resolve().then(function(){return tye})}});Ie({id:"vb",extensions:[".vb"],aliases:["Visual Basic","vb"],loader:function(){return Promise.resolve().then(function(){return FSe})}});Ie({id:"xml",extensions:[".xml",".dtd",".ascx",".csproj",".config",".wxi",".wxl",".wxs",".xaml",".svg",".svgz",".opf",".xsl"],firstLine:"(\\<\\?xml.*)|(\\<svg)|(\\<\\!doctype\\s+svg)",aliases:["XML","xml"],mimetypes:["text/xml","application/xml","application/xaml+xml","application/xml-dtd"],loader:function(){return Promise.resolve().then(function(){return VSe})}});Ie({id:"yaml",extensions:[".yaml",".yml"],aliases:["YAML","yaml","YML","yml"],mimetypes:["application/x-yaml","text/x-yaml"],loader:function(){return Promise.resolve().then(function(){return USe})}});var qoe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Goe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},J0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const eS=new xe("selectionAnchorSet",!1);let pl=class G6{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=eS.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(G6.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:_e.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:new gl().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),sn(m("anchorSet","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(_e.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};pl.ID="editor.contrib.selectionAnchorController";pl=qoe([Goe(1,Be)],pl);class Koe extends Se{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2080),weight:100}})}run(e,t){return J0(this,void 0,void 0,function*(){pl.get(t).setSelectionAnchor()})}}class Yoe extends Se{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:eS})}run(e,t){return J0(this,void 0,void 0,function*(){pl.get(t).goToSelectionAnchor()})}}class Zoe extends Se{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:eS,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2089),weight:100}})}run(e,t){return J0(this,void 0,void 0,function*(){pl.get(t).selectFromAnchorToCursor()})}}class Xoe extends Se{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:eS,kbOpts:{kbExpr:R.editorTextFocus,primary:9,weight:100}})}run(e,t){return J0(this,void 0,void 0,function*(){pl.get(t).cancelSelectionAnchor()})}}wt(pl.ID,pl);pe(Koe);pe(Yoe);pe(Zoe);pe(Xoe);const Qoe=V("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class Joe extends Se{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:3160,weight:100}})}run(e,t){let i=ao.get(t);!i||i.jumpToBracket()}}class eae extends Se{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=ao.get(t);if(!n)return;let s=!0;i&&i.selectBrackets===!1&&(s=!1),n.selectToBracket(s)}}class tae{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class ao extends Z{constructor(e){super();this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new $t(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))}static get(e){return e.getContribution(ao.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.matchBracket(n);let o=null;if(s)s[0].containsPosition(n)?o=s[1].getStartPosition():s[1].containsPosition(n)&&(o=s[0].getStartPosition());else{const a=e.findEnclosingBrackets(n);if(a)o=a[0].getStartPosition();else{const l=e.findNextBracket(n);l&&l.range&&(o=l.range.getStartPosition())}}return o?new _e(o.lineNumber,o.column,o.lineNumber,o.column):new _e(n.lineNumber,n.column,n.lineNumber,n.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.matchBracket(s);if(!o&&(o=t.findEnclosingBrackets(s),!o)){const c=t.findNextBracket(s);c&&c.range&&(o=t.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(o){o.sort(k.compareRangesUsingStarts);const[c,d]=o;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?d.getEndPosition():d.getStartPosition(),d.containsPosition(s)){const u=a;a=l,l=u}}a&&l&&i.push(new _e(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let s=[],o=0;for(let u=0,h=e.length;u<h;u++){let f=e[u];f.isEmpty()&&(s[o++]=f.getStartPosition())}s.length>1&&s.sort(U.compare);let a=[],l=0,c=0,d=n.length;for(let u=0,h=s.length;u<h;u++){let f=s[u];for(;c<d&&n[c].position.isBefore(f);)c++;if(c<d&&n[c].position.equals(f))a[l++]=n[c];else{let g=t.matchBracket(f),p=ao._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!g&&this._matchBrackets==="always"&&(g=t.findEnclosingBrackets(f,20),p=ao._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new tae(f,g,p)}}this._lastBracketsData=a,this._lastVersionId=i}}ao.ID="editor.contrib.bracketMatchingController";ao._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=qe.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:li(Qoe),position:Fr.Center}});ao._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=qe.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});wt(ao.ID,ao);pe(eae);pe(Joe);Et((r,e)=>{const t=r.getColor(jX);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=r.getColor(JW);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});es.appendMenuItem(Ee.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class iae{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&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new k(i,n-1,i,n),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new k(i,s,i,s),a)}else{const o=new k(i,s,i,s+1),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new k(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new _e(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new _e(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class K6 extends Se{constructor(e,t){super(t);this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const s of n)i.push(new iae(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class nae extends K6{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:R.writable})}}class rae extends K6{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:R.writable})}}pe(nae);pe(rae);class sae extends Se{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:306},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],s=t.getSelections();for(let o of s){if(!o.isEmpty())continue;let a=o.startLineNumber,l=o.startColumn,c=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let d=l===c?o.getPosition():_t.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),u=_t.leftPosition(i,d),h=_t.leftPosition(i,u),f=i.getValueInRange(k.fromPositions(h,u)),g=i.getValueInRange(k.fromPositions(u,d)),p=k.fromPositions(h,d);n.push(new tn(p,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}pe(sae);var oae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const fu="9_cutcopypaste",aae=io||document.queryCommandSupported("cut"),Y6=io||document.queryCommandSupported("copy"),lae=typeof navigator.clipboard=="undefined"||Bn?document.queryCommandSupported("paste"):!0;function TN(r){return r.register(),r}const cae=aae?TN(new wg({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:io?{primary:2102,win:{primary:2102,secondary:[1044]},weight:100}:void 0,menuOpts:[{menuId:Ee.MenubarEditMenu,group:"2_ccp",title:m({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:Ee.EditorContext,group:fu,title:m("actions.clipboard.cutLabel","Cut"),when:R.writable,order:1},{menuId:Ee.CommandPalette,group:"",title:m("actions.clipboard.cutLabel","Cut"),order:1},{menuId:Ee.SimpleEditorContext,group:fu,title:m("actions.clipboard.cutLabel","Cut"),when:R.writable,order:1}]})):void 0,dae=Y6?TN(new wg({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:io?{primary:2081,win:{primary:2081,secondary:[2067]},weight:100}:void 0,menuOpts:[{menuId:Ee.MenubarEditMenu,group:"2_ccp",title:m({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:Ee.EditorContext,group:fu,title:m("actions.clipboard.copyLabel","Copy"),order:2},{menuId:Ee.CommandPalette,group:"",title:m("actions.clipboard.copyLabel","Copy"),order:1},{menuId:Ee.SimpleEditorContext,group:fu,title:m("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;es.appendMenuItem(Ee.MenubarEditMenu,{submenu:Ee.MenubarCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});es.appendMenuItem(Ee.EditorContext,{submenu:Ee.EditorContextCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:fu,order:3});const kx=lae?TN(new wg({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:io?{primary:2100,win:{primary:2100,secondary:[1043]},linux:{primary:2100,secondary:[1043]},weight:100}:void 0,menuOpts:[{menuId:Ee.MenubarEditMenu,group:"2_ccp",title:m({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:Ee.EditorContext,group:fu,title:m("actions.clipboard.pasteLabel","Paste"),when:R.writable,order:4},{menuId:Ee.CommandPalette,group:"",title:m("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:Ee.SimpleEditorContext,group:fu,title:m("actions.clipboard.pasteLabel","Paste"),when:R.writable,order:4}]})):void 0;class uae extends Se{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:m("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(32)&&t.getSelection().isEmpty()||(_L.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),_L.forceCopyWithSyntaxHighlighting=!1)}}function Z6(r,e){!r||(r.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ct).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(32),o=n.getSelection();return o&&o.isEmpty()&&!s||document.execCommand(e),!0}return!1}),r.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}Z6(cae,"cut");Z6(dae,"copy");kx&&(kx.addImplementation(1e4,"code-editor",(r,e)=>{const t=r.get(Ct),i=r.get($c),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&_g?(()=>oae(void 0,void 0,void 0,function*(){const o=yield i.readText();if(o!==""){const a=Fm.INSTANCE.get(o);let l=!1,c=null,d=null;a&&(l=n.getOption(32)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,d=a.mode),n.trigger("keyboard","paste",{text:o,pasteOnNewLine:l,multicursorText:c,mode:d})}}))():!0:!1}),kx.addImplementation(0,"generic-dom",(r,e)=>(document.execCommand("paste"),!0)));Y6&&pe(uae);class ly{constructor(e){this.executor=e,this._didRun=!1}getValue(){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}}class et{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+et.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new et(this.value+et.sep+e)}}et.sep=".";et.None=new et("@@none@@");et.Empty=new et("");et.QuickFix=new et("quickfix");et.Refactor=new et("refactor");et.Source=new et("source");et.SourceOrganizeImports=et.Source.append("organizeImports");et.SourceFixAll=et.Source.append("fixAll");function hae(r,e){return!(r.include&&!r.include.intersects(e)||r.excludes&&r.excludes.some(t=>X6(e,t,r.include))||!r.includeSourceActions&&et.Source.contains(e))}function fae(r,e){const t=e.kind?new et(e.kind):void 0;return!(r.include&&(!t||!r.include.contains(t))||r.excludes&&t&&r.excludes.some(i=>X6(t,i,r.include))||!r.includeSourceActions&&t&&et.Source.contains(t)||r.onlyIncludePreferredActions&&!e.isPreferred)}function X6(r,e,t){return!(!e.contains(r)||t&&e.contains(t))}class qo{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new qo(t.kind,t.apply,!1):new qo(qo.getKindFromUser(e,t.kind),qo.getApplyFromUser(e,t.apply),qo.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new et(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var IN=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Q6="editor.action.codeAction",J6="editor.action.refactor",eV="editor.action.sourceAction",DN="editor.action.organizeImports",AN="editor.action.fixAll";class tV{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return IN(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){Yi(n)}i&&(this.action.edit=i.edit)}return this})}}class NN extends Z{constructor(e,t,i){super();this.documentation=t,this._register(i),this.allActions=[...e].sort(NN.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:mr(e.diagnostics)?mr(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:mr(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&et.QuickFix.contains(new et(e.kind))&&!!e.isPreferred)}}const zP={actions:[],documentation:void 0};function RN(r,e,t,i,n){var s;const o=t.filter||{},a={only:(s=o.include)===null||s===void 0?void 0:s.value,trigger:t.type},l=new UA(r,n),c=gae(r,o),d=new ue,u=c.map(f=>IN(this,void 0,void 0,function*(){try{i.report(f);const g=yield f.provideCodeActions(r,e,a,l.token);if(g&&d.add(g),l.token.isCancellationRequested)return zP;const p=((g==null?void 0:g.actions)||[]).filter(v=>v&&fae(o,v)),_=pae(f,p,o.include);return{actions:p.map(v=>new tV(v,f)),documentation:_}}catch(g){if(ga(g))throw g;return Yi(g),zP}})),h=ia.onDidChange(()=>{const f=ia.all(r);Ls(f,c)||l.cancel()});return Promise.all(u).then(f=>{const g=WD(f.map(_=>_.actions)),p=Ou(f.map(_=>_.documentation));return new NN(g,p,d)}).finally(()=>{h.dispose(),l.dispose()})}function gae(r,e){return ia.all(r).filter(t=>t.providedCodeActionKinds?t.providedCodeActionKinds.some(i=>hae(e,new et(i))):!0)}function pae(r,e,t){if(!r.documentation)return;const i=r.documentation.map(n=>({kind:new et(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(!!n.kind){for(const s of i)if(s.kind.contains(new et(n.kind)))return s.command}}lt.registerCommand("_executeCodeActionProvider",function(r,e,t,i,n){return IN(this,void 0,void 0,function*(){if(!(e instanceof De))throw Or();const s=r.get(mi).getModel(e);if(!s)throw Or();const o=_e.isISelection(t)?_e.liftSelection(t):k.isIRange(t)?s.validateRange(t):void 0;if(!o)throw Or();const a=typeof i=="string"?new et(i):void 0,l=yield RN(s,o,{type:1,filter:{includeSourceActions:!0,include:a}},$u.None,it.None),c=[],d=Math.min(l.validActions.length,typeof n=="number"?n:0);for(let u=0;u<d;u++)c.push(l.validActions[u].resolve(it.None));try{return yield Promise.all(c),l.validActions.map(u=>u.action)}finally{setTimeout(()=>l.dispose(),100)}})});var mae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_ae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Wr=class hT{constructor(e,t){this._messageWidget=new Un,this._messageListeners=new ue,this._editor=e,this._visible=hT.MESSAGE_VISIBLE.bindTo(t),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(e){return e.getContribution(hT.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){sn(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new jP(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>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(new rr(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{!n.target.position||(i?i.containsPosition(n.target.position)||this.closeMessage():i=new k(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(jP.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(m("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};Wr.ID="editor.contrib.messageController";Wr.MESSAGE_VISIBLE=new xe("messageVisible",!1,m("messageVisible","Whether the editor is currently showing an inline message"));Wr=mae([_ae(1,Be)],Wr);const bae=dn.bindToContribution(Wr.get);fe(new bae({id:"leaveEditorMessage",precondition:Wr.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class jP{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-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");o.classList.add("message"),o.textContent=n,this._domNode.appendChild(o);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",e===2)}}wt(Wr.ID,Wr);Et((r,e)=>{const t=r.getColor(_A);if(t){let s=r.type===Jr.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${s}px solid ${t}; }`)}const i=r.getColor(pA);i&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const n=r.getColor(mA);n&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${n}; }`)});var vae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Cae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class GP extends Ts{constructor(e,t){super(e.command?e.command.id:e.title,wae(e.title),void 0,!e.disabled,t);this.action=e}}function wae(r){return r.replace(/\r\n|\r|\n/g," ")}let fT=class extends Z{constructor(e,t,i,n){super();this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new Un),this._keybindingResolver=new tS({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return Cae(this,void 0,void 0,function*(){const s=n.includeDisabledActions?t.allActions:t.validActions;if(!s.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,vg();this._visible=!0,this._showingActions.value=t;const o=this.getMenuActions(e,s,t.documentation),a=U.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),c=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>o,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:d=>d instanceof GP?l(d.action):void 0})})}getMenuActions(e,t,i){var n,s;const o=d=>new GP(d.action,()=>this._delegate.onSelectCodeAction(d)),a=t.map(o),l=[...i],c=this._editor.getModel();if(c&&a.length)for(const d of ia.all(c))d._getAdditionalMenuItems&&l.push(...d._getAdditionalMenuItems({trigger:e.type,only:(s=(n=e.filter)===null||n===void 0?void 0:n.include)===null||s===void 0?void 0:s.value},t.map(u=>u.action)));return l.length&&a.push(new Is,...l.map(d=>o(new tV({title:d.title,command:d},void 0)))),a}_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=rn(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}};fT=vae([qP(2,Hc),qP(3,Zt)],fT);class tS{constructor(e){this._keybindingProvider=e}getResolver(){const e=new ly(()=>this._keybindingProvider.getKeybindings().filter(t=>tS.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===DN?i={kind:et.SourceOrganizeImports.value}:t.command===AN&&(i={kind:et.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},qo.fromUser(i,{kind:et.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new et(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}}tS.codeActionCommands=[J6,Q6,eV,DN,AN];var yae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},am;(function(r){r.Hidden={type:0};class e{constructor(i,n,s,o){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=o,this.type=1}}r.Showing=e})(am||(am={}));let cy=class iV extends Z{constructor(e,t,i,n){super();this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new H),this.onClick=this._onClick.event,this._state=am.Hidden,this._domNode=document.createElement("div"),this._domNode.className=be.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const o=this._editor.getModel();(this.state.type!==1||!o||this.state.editorPosition.lineNumber>=o.getLineCount())&&this.hide()})),Lt.ignoreTarget(this._domNode),this._register(ij(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:o,height:a}=rn(this._domNode),l=this._editor.getOption(58);let c=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(c+=l),this._onClick.fire({x:s.posx,y:o+a+c,actions:this.state.actions,trigger:this.state.trigger})})),this._register(J(this._domNode,"mouseenter",s=>{if((s.buttons&1)!==1)return;this.hide();const o=new Wu;o.startMonitoring(s.target,s.buttons,yg,()=>{},()=>{o.dispose()})})),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(56).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:o,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,c=n.get(43),d=s.getLineContent(o),u=Ti.computeIndentLevel(d,l),h=c.spaceWidth*u>22,f=p=>p>2&&this._editor.getTopForLineNumber(p)===this._editor.getTopForLineNumber(p-1);let g=o;if(!h){if(o>1&&!f(o-1))g-=1;else if(!f(o+1))g+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new am.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:iV._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=am.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...be.lightBulb.classNamesArray),this._domNode.classList.add(...be.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=m("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...be.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...be.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=m("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=m("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};cy._posPref=[0];cy=yae([Sae(3,Zt)],cy);Et((r,e)=>{var t;const i=(t=r.getColor(ts))===null||t===void 0?void 0:t.transparent(.7),n=r.getColor(zZ);n&&e.addRule(` + .monaco-editor .contentWidgets ${be.lightBulb.cssSelector} { + color: ${n}; + background-color: ${i}; + }`);const s=r.getColor(jZ);s&&e.addRule(` + .monaco-editor .contentWidgets ${be.lightbulbAutofix.cssSelector} { + color: ${s}; + background-color: ${i}; + }`)});var xae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Eae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Lx=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},kae=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Lae=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},pC;let gT=class extends Z{constructor(e,t,i,n,s){super();this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new Un),pC.set(this,!1),this._codeActionWidget=new ly(()=>this._register(s.createInstance(fT,this._editor,{onSelectCodeAction:o=>Lx(this,void 0,void 0,function*(){this.delegate.applyCodeAction(o,!0)})}))),this._lightBulbWidget=new ly(()=>{const o=this._register(s.createInstance(cy,this._editor,t,i));return this._register(o.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1}))),o})}dispose(){kae(this,pC,!0,"f"),super.dispose()}update(e){var t,i,n;return Lx(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let s;try{s=yield e.actions}catch(o){Fe(o);return}if(!Lae(this,pC,"f"))if(this._lightBulbWidget.getValue().update(s,e.trigger,e.position),e.trigger.type===1){if(!((i=e.trigger.filter)===null||i===void 0)&&i.include){const a=this.tryGetValidActionToApply(e.trigger,s);if(a){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(a,!1)}finally{s.dispose()}return}if(e.trigger.context){const l=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,s);if(l&&l.action.disabled){Wr.get(this._editor).showMessage(l.action.disabled,e.trigger.context.position),s.dispose();return}}}const o=!!(!((n=e.trigger.filter)===null||n===void 0)&&n.include);if(e.trigger.context&&(!s.allActions.length||!o&&!s.validActions.length)){Wr.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=s,s.dispose();return}this._activeCodeActions.value=s,this._codeActionWidget.getValue().show(e.trigger,s,e.position,{includeDisabledActions:o})}else this._codeActionWidget.getValue().isVisible?s.dispose():this._activeCodeActions.value=s})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return Lx(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};pC=new WeakMap;gT=xae([Eae(4,gt)],gT);var Tx=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Tae=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},$h;const nV=new xe("supportedCodeAction","");class Iae extends Z{constructor(e,t,i,n=250){super();this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new rr),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();!t||e.some(i=>v3(i,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(!!t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(k.intersectRanges(n,e))return k.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),o=t.getLineContent(n);if(o.length===0)return;if(s===1){if(/\s/.test(o[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[s-2])&&/\s/.test(o[s-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i){this._signalChange(void 0);return}const n=this._getRangeOfMarker(t),s=n?n.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:s};return this._signalChange(o),o}}var vd;(function(r){r.Empty={type:0};class e{constructor(i,n,s,o){this.trigger=i,this.rangeOrSelection=n,this.position=s,this._cancellablePromise=o,this.type=1,this.actions=o.catch(a=>{if(ga(a))return Dae;throw a})}cancel(){this._cancellablePromise.cancel()}}r.Triggered=e})(vd||(vd={}));const Dae={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class Aae extends Z{constructor(e,t,i,n){super();this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new Un),this._state=vd.Empty,this._onDidChangeState=this._register(new H),this.onDidChangeState=this._onDidChangeState.event,$h.set(this,!1),this._supportedCodeActions=nV.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register(ia.onDidChange(()=>this._update())),this._update()}dispose(){Tx(this,$h,"f")||(Tae(this,$h,!0,"f"),super.dispose(),this.setState(vd.Empty,!0))}_update(){if(Tx(this,$h,"f"))return;this._codeActionOracle.value=void 0,this.setState(vd.Empty);const e=this._editor.getModel();if(e&&ia.has(e)&&!this._editor.getOption(80)){const t=[];for(const i of ia.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Iae(this._editor,this._markerService,i=>{var n;if(!i){this.setState(vd.Empty);return}const s=Pi(o=>RN(e,i.selection,i.trigger,$u.None,o));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(s,250)),this.setState(new vd.Triggered(i.trigger,i.selection,i.position,s))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!Tx(this,$h,"f")&&this._onDidChangeState.fire(e))}}$h=new WeakMap;var Nae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dv=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},rV=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function lb(r){return me.regex(nV.keys()[0],new RegExp("(\\s|^)"+Ns(r.value)+"\\b"))}const ON={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:m("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:m("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[m("args.schema.apply.first","Always apply the first returned code action."),m("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),m("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:m("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let gu=class sV extends Z{constructor(e,t,i,n,s){super();this._instantiationService=s,this._editor=e,this._model=this._register(new Aae(this._editor,t,i,n)),this._register(this._model.onDidChangeState(o=>this.update(o))),this._ui=new ly(()=>this._register(new gT(e,kg.Id,cb.Id,{applyCodeAction:(o,a)=>rV(this,void 0,void 0,function*(){try{yield this._applyCodeAction(o)}finally{a&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(sV.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;Wr.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(Rae,e,this._editor)}};gu.ID="editor.contrib.quickFixController";gu=Nae([dv(1,ob),dv(2,Be),dv(3,bl),dv(4,gt)],gu);function Rae(r,e,t){return rV(this,void 0,void 0,function*(){const i=r.get(jD),n=r.get(pi),s=r.get(Wc),o=r.get(ki);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred}),yield e.resolve(it.None),e.action.edit&&(yield i.apply(r0.convert(e.action.edit),{editor:t,label:e.action.title})),e.action.command)try{yield n.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(a){const l=Oae(a);o.error(typeof l=="string"?l:m("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function Oae(r){return typeof r=="string"?r:r instanceof Error&&typeof r.message=="string"?r.message:void 0}function Yu(r,e,t,i){if(r.hasModel()){const n=gu.get(r);n&&n.manualTriggerAtCurrentPosition(e,t,i)}}class kg extends Se{constructor(){super({id:kg.Id,label:m("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:me.and(R.writable,R.hasCodeActionsProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:2132,weight:100}})}run(e,t){return Yu(t,m("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}kg.Id="editor.action.quickFix";class Mae extends dn{constructor(){super({id:Q6,precondition:me.and(R.writable,R.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:ON}]}})}runEditorCommand(e,t,i){const n=qo.fromUser(i,{kind:et.Empty,apply:"ifSingle"});return Yu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):m("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?m("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):m("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Pae extends Se{constructor(){super({id:J6,label:m("refactor.label","Refactor..."),alias:"Refactor...",precondition:me.and(R.writable,R.hasCodeActionsProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:3120,mac:{primary:1328},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:me.and(R.writable,lb(et.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:ON}]}})}run(e,t,i){const n=qo.fromUser(i,{kind:et.Refactor,apply:"never"});return Yu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):m("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?m("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):m("editor.action.refactor.noneMessage","No refactorings available"),{include:et.Refactor.contains(n.kind)?n.kind:et.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class Fae extends Se{constructor(){super({id:eV,label:m("source.label","Source Action..."),alias:"Source Action...",precondition:me.and(R.writable,R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:me.and(R.writable,lb(et.Source))},description:{description:"Source Action...",args:[{name:"args",schema:ON}]}})}run(e,t,i){const n=qo.fromUser(i,{kind:et.Source,apply:"never"});return Yu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):m("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?m("editor.action.source.noneMessage.preferred","No preferred source actions available"):m("editor.action.source.noneMessage","No source actions available"),{include:et.Source.contains(n.kind)?n.kind:et.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class Bae extends Se{constructor(){super({id:DN,label:m("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:me.and(R.writable,lb(et.SourceOrganizeImports)),kbOpts:{kbExpr:R.editorTextFocus,primary:1581,weight:100}})}run(e,t){return Yu(t,m("editor.action.organize.noneMessage","No organize imports action available"),{include:et.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class Wae extends Se{constructor(){super({id:AN,label:m("fixAll.label","Fix All"),alias:"Fix All",precondition:me.and(R.writable,lb(et.SourceFixAll))})}run(e,t){return Yu(t,m("fixAll.noneMessage","No fix all action available"),{include:et.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class cb extends Se{constructor(){super({id:cb.Id,label:m("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:me.and(R.writable,lb(et.QuickFix)),kbOpts:{kbExpr:R.editorTextFocus,primary:1620,mac:{primary:2644},weight:100}})}run(e,t){return Yu(t,m("editor.action.autoFix.noneMessage","No auto fixes available"),{include:et.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}cb.Id="editor.action.autoFix";wt(gu.ID,gu);pe(kg);pe(Pae);pe(Fae);pe(Bae);pe(cb);pe(Wae);fe(new Mae);var KP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class pT{constructor(){this.lenses=[],this._disposables=new ue}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function oV(r,e){return KP(this,void 0,void 0,function*(){const t=za.ordered(r),i=new Map,n=new pT,s=t.map((o,a)=>KP(this,void 0,void 0,function*(){i.set(o,a);try{const l=yield Promise.resolve(o.provideCodeLenses(r,e));l&&n.add(l,o)}catch(l){Yi(l)}}));return yield Promise.all(s),n.lenses=n.lenses.sort((o,a)=>o.symbol.range.startLineNumber<a.symbol.range.startLineNumber?-1:o.symbol.range.startLineNumber>a.symbol.range.startLineNumber?1:i.get(o.provider)<i.get(a.provider)?-1:i.get(o.provider)>i.get(a.provider)?1:o.symbol.range.startColumn<a.symbol.range.startColumn?-1:o.symbol.range.startColumn>a.symbol.range.startColumn?1:0),n})}lt.registerCommand("_executeCodeLensProvider",function(r,...e){let[t,i]=e;Dt(De.isUri(t)),Dt(typeof i=="number"||!i);const n=r.get(mi).getModel(t);if(!n)throw Or();const s=[],o=new ue;return oV(n,it.None).then(a=>{o.add(a);let l=[];for(const c of a.lenses)i==null||Boolean(c.symbol.command)?s.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(n,c.symbol,it.None)).then(d=>s.push(d||c.symbol)));return Promise.all(l)}).then(()=>s).finally(()=>{setTimeout(()=>o.dispose(),100)})});var Vae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Hae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const aV=bt("ICodeLensCache");class YP{constructor(e,t){this.lineCount=e,this.data=t}}let mT=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new Bc(20,.75);const t="codelens/cache";HC(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),ll(e.onWillSaveState)(s=>{s.reason===oy.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(o=>{var a;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(a=o.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new pT;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new YP(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 s of i.data.lenses)n.add(s.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 i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new k(a,1,a,11)});const o=new pT;o.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new YP(n.lineCount,o))}}catch{}}};mT=Vae([Hae(0,ba)],mT);Hu(aV,mT);class $ae{constructor(e,t,i){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class iS{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${iS._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let s=0;s<e.length;s++){const o=e[s];if(!!o&&(n=!0,o.command)){const a=Kd(o.command.title.trim());o.command.id?(i.push(oe("a",{id:String(s),title:o.command.tooltip},...a)),this._commands.set(String(s),o.command)):i.push(oe("span",{title:o.command.tooltip},...a)),s+1<e.length&&i.push(oe("span",void 0,"\xA0|\xA0"))}}n?(_c(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):_c(this._domNode,oe("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}iS._idPool=0;class Ix{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,n=t.length;i<n;i++)this._addDecorationsCallbacks[i](t[i])}}class ZP{constructor(e,t,i,n,s,o,a){this._isDisposed=!1,this._editor=t,this._className=i,this._data=e,this._decorationIds=[];let l,c=[];this._data.forEach((d,u)=>{d.symbol.command&&c.push(d.symbol),n.addDecoration({range:d.symbol.range,options:qe.EMPTY},h=>this._decorationIds[u]=h),l?l=k.plusRange(l,d.symbol.range):l=k.lift(d.symbol.range)}),this._viewZone=new $ae(l.startLineNumber-1,o,a),this._viewZoneId=s.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new iS(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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&&k.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:qe.EMPTY},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:n}=this._data[t];n.command=i.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}Et((r,e)=>{const t=r.getColor(zX);t&&(e.addRule(`.monaco-editor .codelens-decoration { color: ${t}; }`),e.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${t}; }`));const i=r.getColor(SA);i&&(e.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${i} !important; }`),e.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${i} !important; }`))});var Uae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dx=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},zae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let Qf=class{constructor(e,t,i,n){this._editor=e,this._commandService=t,this._notificationService=i,this._codeLensCache=n,this._disposables=new ue,this._localToDispose=new ue,this._lenses=[],this._getCodeLensModelDelays=new GC(za,250,2500),this._oldCodeLensModels=new ue,this._resolveCodeLensesDelays=new GC(za,250,2500),this._resolveCodeLensesScheduler=new $t(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(43)||s.hasChanged(16)||s.hasChanged(15))&&this._updateLensStyle(),s.hasChanged(14)&&this._onModelChange()})),this._disposables.add(za.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+LD(this._editor.getId()).toString(16),this._styleElement=Pr(qy(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e=this._editor.getOption(16),t;return!e||e<5?(e=this._editor.getOption(45)*.9|0,t=this._editor.getOption(58)):t=e*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:t,fontSize:e}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(43),s=`--codelens-font-family${this._styleClassName}`,o=`--codelens-font-features${this._styleClassName}`;let a=` + .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${o}) } + .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; } + `;i&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${s})}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(s,i!=null?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(o,n.fontFeatureSettings),this._editor.changeViewZones(l=>{for(let c of this._lenses)c.updateHeight(e,l)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!za.has(e)){t&&this._localToDispose.add(Qd(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of za.all(e))if(typeof n.onDidChange=="function"){let s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new $t(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Pi(o=>oV(e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);const a=this._getCodeLensModelDelays.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},Fe)},this._getCodeLensModelDelays.get(e));this._localToDispose.add(i),this._localToDispose.add(Xe(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(s=>{let o=[],a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?o.push(c):(c.update(s),a=c.getLineNumber())});let l=new Ix;o.forEach(c=>{c.dispose(l,s),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(n)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Xe(()=>{if(this._editor.getModel()){const n=xc.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(o=>{this._disposeAllLenses(s,o)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const o of this._lenses){let a=o.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new Ix;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;let t=this._editor.getModel().getLineCount(),i=[],n;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}const s=xc.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new Ix;let d=0,u=0;for(;u<i.length&&d<this._lenses.length;){let h=i[u][0].symbol.range.startLineNumber,f=this._lenses[d].getLineNumber();f<h?(this._lenses[d].dispose(c,l),this._lenses.splice(d,1)):f===h?(this._lenses[d].updateCodeLensSymbols(i[u],c),u++,d++):(this._lenses.splice(d,0,new ZP(i[u],this._editor,this._styleClassName,c,l,o.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),d++,u++)}for(;d<this._lenses.length;)this._lenses[d].dispose(c,l),this._lenses.splice(d,1);for(;u<i.length;)this._lenses.push(new ZP(i[u],this._editor,this._styleClassName,c,l,o.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),o=Pi(a=>{const l=i.map((c,d)=>{const u=new Array(c.length),h=c.map((f,g)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(p=>{u[g]=p},Yi):(u[g]=f.symbol,Promise.resolve(void 0)));return Promise.all(h).then(()=>{!a.isCancellationRequested&&!n[d].isDisposed()&&n[d].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDelays.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{Fe(a),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};Qf.ID="css.editor.codeLens";Qf=Uae([Dx(1,pi),Dx(2,ki),Dx(3,aV)],Qf);wt(Qf.ID,Qf);pe(class extends Se{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:R.hasCodeLensProvider,label:m("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return zae(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(Uc),n=e.get(pi),s=e.get(ki),o=t.getSelection().positionLineNumber,a=t.getContribution(Qf.ID),l=[];for(let d of a.getLenses())if(d.getLineNumber()===o)for(let u of d.getItems()){const{command:h}=u.symbol;h&&l.push({label:h.title,command:h})}if(l.length===0)return;const c=yield i.pick(l,{canPickMany:!1});if(!!c)try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(d){s.error(d)}})}});function jae(r,e){const t=[],n=Ff.ordered(r).reverse().map(s=>Promise.resolve(s.provideDocumentColors(r,e)).then(o=>{if(Array.isArray(o))for(let a of o)t.push({colorInfo:a,provider:s})}));return Promise.all(n).then(()=>t)}function XP(r,e,t,i){return Promise.resolve(t.provideColorPresentations(r,e,i))}lt.registerCommand("_executeDocumentColorProvider",function(r,...e){const[t]=e;if(!(t instanceof De))throw Or();const i=r.get(mi).getModel(t);if(!i)throw Or();const n=[],o=Ff.ordered(i).reverse().map(a=>Promise.resolve(a.provideDocumentColors(i,it.None)).then(l=>{if(Array.isArray(l))for(let c of l)n.push({range:c.range,color:[c.color.red,c.color.green,c.color.blue,c.color.alpha]})}));return Promise.all(o).then(()=>n)});lt.registerCommand("_executeColorPresentationProvider",function(r,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof De)||!Array.isArray(t)||t.length!==4||!k.isIRange(s))throw Or();const[o,a,l,c]=t,d=r.get(mi).getModel(n);if(!d)throw Or();const u={range:s,color:{red:o,green:a,blue:l,alpha:c}},h=[],g=Ff.ordered(d).reverse().map(p=>Promise.resolve(p.provideColorPresentations(d,u,it.None)).then(_=>{Array.isArray(_)&&h.push(..._)}));return Promise.all(g).then(()=>h)});var qae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},QP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Gae=500;let pu=class lV extends Z{constructor(e,t,i){super();this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new ue),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(Ff.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(()=>{let n=this._isEnabled;this._isEnabled=this.isEnabled(),n!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),i=this._configurationService.getValue(t.language);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!Ff.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new rr,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},lV.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=Pi(e=>{const t=this._editor.getModel();return t?jae(t,e):Promise.resolve([])}),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Fe)}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(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:qe.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,n)=>this._colorDatas.set(i,e[n]))}updateColorDecorators(e){let t=[],i={};for(let n=0;n<e.length&&t.length<Gae;n++){const{red:s,green:o,blue:a,alpha:l}=e[n].colorInfo.color,c=new Je(Math.round(s*255),Math.round(o*255),Math.round(a*255),l);let d=LD(`rgba(${c.r},${c.g},${c.b},${c.a})`).toString(16),u=`rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,h="colorBox-"+d;!this._decorationsTypes.has(h)&&!i[h]&&this._codeEditorService.registerDecorationType("color-detector-color",h,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:u},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),i[h]=!0,t.push({range:{startLineNumber:e[n].colorInfo.range.startLineNumber,startColumn:e[n].colorInfo.range.startColumn,endLineNumber:e[n].colorInfo.range.endLineNumber,endColumn:e[n].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(h,!0)})}this._decorationsTypes.forEach(n=>{i[n]||this._codeEditorService.removeDecorationType(n)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(e=>{this._codeEditorService.removeDecorationType(e)})}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(k.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}};pu.ID="editor.contrib.colorDetector";pu.RECOMPUTE_TIME=1e3;pu=qae([QP(1,Ct),QP(2,di)],pu);wt(pu.ID,pu);function _T(r,e){return!!r[e]}class Ax{constructor(e,t){this.target=e.target,this.hasTriggerModifier=_T(e.event,t.triggerModifier),this.hasSideBySideModifier=_T(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class JP{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=_T(e,t.triggerModifier)}}class uv{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 e2(r){return r==="altKey"?tt?new uv(57,"metaKey",6,"altKey"):new uv(5,"ctrlKey",6,"altKey"):tt?new uv(6,"altKey",57,"metaKey"):new uv(6,"altKey",5,"ctrlKey")}class cV extends Z{constructor(e){super();this._onMouseMoveOrRelevantKeyDown=this._register(new H),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new H),this.onExecute=this._onExecute.event,this._onCancel=this._register(new H),this.onCancel=this._onCancel.event,this._editor=e,this._opts=e2(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(t=>{if(t.hasChanged(69)){const i=e2(this._editor.getOption(69));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(t=>this._onEditorMouseMove(new Ax(t,this._opts)))),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(new Ax(t,this._opts)))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(new Ax(t,this._opts)))),this._register(this._editor.onKeyDown(t=>this._onEditorKeyDown(new JP(t,this._opts)))),this._register(this._editor.onKeyUp(t=>this._onEditorKeyUp(new JP(t,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(t=>this._onDidChangeCursorSelection(t))),this._register(this._editor.onDidChangeModel(t=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(t=>{(t.scrollTopChanged||t.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}var Kae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nd=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let mu=class extends Gm{constructor(e,t,i,n,s,o,a,l,c,d){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,s,o,a,l,c,d);this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(u=>this._onParentConfigurationChanged(u)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){_o(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};mu=Kae([nd(3,gt),nd(4,Ct),nd(5,pi),nd(6,Be),nd(7,Gt),nd(8,ki),nd(9,Cr)],mu);const t2=new q(new Je(0,122,204)),Yae={showArrow:!0,showFrame:!0,className:"",frameColor:t2,arrowColor:t2,keepEditorSelection:!1},Zae="vs.editor.contrib.zoneWidget";class Xae{constructor(e,t,i,n,s,o){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Qae{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class nS{constructor(e){this._editor=e,this._ruleName=nS._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),$C(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(){$C(this._ruleName),Ak(`.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){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:k.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}nS._IdGenerator=new bN(".arrow-decoration-");class Jae{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new ue,this.container=null,this._isShowing=!1,this.editor=e,this.options=jl(t),_o(this.options,Yae,!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(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 nS(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);if(!!i)return i.getStartPosition()}show(e,t){const i=k.isIRange(e)?k.lift(e):k.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:qe.EMPTY}])}hide(){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),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(58),t=0;if(this.options.showArrow){let i=Math.round(e/3);t+=2*i}if(this.options.showFrame){let i=Math.round(e/9);t+=2*i}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 a=this.editor.getOption(58),l=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,l);let c=0,d=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(a/3),this._arrow.height=c,this._arrow.show(i)),this.options.showFrame&&(d=Math.round(a/9)),this.editor.changeViewZones(f=>{this._viewZone&&f.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new Xae(o,i.lineNumber,i.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g)),this._viewZone.id=f.addZone(this._viewZone),this._overlayWidget=new Qae(Zae+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const f=this.options.frameWidth?this.options.frameWidth:d;this.container.style.borderTopWidth=f+"px",this.container.style.borderBottomWidth=f+"px"}let u=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,s),this.options.keepEditorSelection||this.editor.setSelection(e);const h=this.editor.getModel();if(h){const f=e.endLineNumber+1;f<=h.getLineCount()?this.revealLine(f,!1):this.revealLine(h.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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;this._resizeSash=this._disposables.add(new _n(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let e;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){let i=(t.currentY-e.startY)/this.editor.getOption(58),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(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}class ele extends Vf{constructor(e,t){super();this._onDidChangeVisibility=this._register(new H),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=X(e,oe(".monaco-dropdown")),this._label=X(this._element,oe(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[Te.CLICK,Te.MOUSE_DOWN,Vt.Tap])this._register(J(this.element,s,o=>xt.stop(o,!0)));for(const s of[Te.MOUSE_DOWN,Vt.Tap])this._register(J(this._label,s,o=>{o instanceof MouseEvent&&o.detail>1||(this.visible?this.hide():this.show())}));this._register(J(this._label,Te.KEY_UP,s=>{const o=new ei(s);(o.equals(3)||o.equals(10))&&(xt.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(Lt.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 tle extends ele{constructor(e,t){super(e,t);this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class dV extends qd{constructor(e,t,i,n=Object.create(null)){super(null,e,n);this.actionItem=null,this._onDidChangeVisibility=this._register(new H),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=X(s,oe("a.action-label"));let o=[];return typeof this.options.classNames=="string"?o=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(o=this.options.classNames),o.find(a=>a==="icon")||o.push("codicon"),this.element.classList.add(...o),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new tle(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var o;(o=this.element)===null||o===void 0||o.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return s.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}var MN=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bo=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},uV=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function ile(r,e,t,i,n,s,o){const a=r.getActions(e);return rle(a,t,!1,typeof i=="string"?c=>c===i:i,n,s,o),nle(a)}function nle(r){const e=new ue;for(const[,t]of r)for(const i of t)e.add(i);return e}function rle(r,e,t,i=a=>a==="navigation",n=Number.MAX_SAFE_INTEGER,s=()=>!1,o=!1){let a,l;Array.isArray(e)?(a=e,l=e):(a=e.primary,l=e.secondary);const c=new Set;for(const[d,u]of r){let h;i(d)?(h=a,h.length>0&&o&&h.push(new Is)):(h=l,h.length>0&&h.push(new Is));for(let f of u){t&&(f=f instanceof Cc&&f.alt?f.alt:f);const g=h.push(f);f instanceof m0&&c.add({group:d,action:f,index:g-1})}}for(const{group:d,action:u,index:h}of c){const f=i(d)?a:l,g=u.actions;(g.length<=1||f.length+g.length-2<=n)&&s(u,d,f.length)&&f.splice(h,1,...g)}if(a!==l&&a.length>n){const d=a.splice(n,a.length-n);l.unshift(...d,new Is)}}let Jf=class extends Zm{constructor(e,t,i,n,s){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable});this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new Un),this._altKey=Ed.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return uV(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){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(an||ir)&&this._altKey.keyStatus.shiftKey;const n=()=>{const s=t&&i;s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(s=>{i=s.altKey||(an||ir)&&s.shiftKey,n()})),this._register(J(e,"mouseleave",s=>{t=!1,n()})),this._register(J(e,"mouseenter",s=>{t=!0,n()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?m("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,o=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),a=o&&o.getLabel(),l=a?m("titleAndKb","{0} ({1})",s,a):s;n+=` +[${QD.modifierLabels[Cs].altKey}] ${l}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!s)if(qt.isThemeIcon(s)){const o=qt.asClassNameArray(s);n.classList.add(...o),this._itemClassDispose.value=Xe(()=>{n.classList.remove(...o)})}else s.light&&n.style.setProperty("--menu-entry-icon-light",dl(s.light)),s.dark&&n.style.setProperty("--menu-entry-icon-dark",dl(s.dark)),n.classList.add("icon"),this._itemClassDispose.value=Xe(()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")})}};Jf=MN([Bo(2,Zt),Bo(3,ki),Bo(4,Be)],Jf);let bT=class extends dV{constructor(e,t,i){var n,s;const o=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(n=t==null?void 0:t.menuAsChild)!==null&&n!==void 0?n:!0,classNames:(s=t==null?void 0:t.classNames)!==null&&s!==void 0?s:qt.isThemeIcon(e.item.icon)?qt.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,o)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!qt.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",dl(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",dl(t.dark)))}}};bT=MN([Bo(2,Hc)],bT);let vT=class extends qd{constructor(e,t,i,n,s,o,a,l){var c,d,u;super(null,e);this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=a,this._storageService=l,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let h,f=l.get(this._storageKey,1);f&&(h=e.actions.find(p=>f===p.id)),h||(h=e.actions[0]),this._defaultAction=this._instaService.createInstance(Jf,h,void 0);const g=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(d=t==null?void 0:t.classNames)!==null&&d!==void 0?d:["codicon","codicon-chevron-down"],actionRunner:(u=t==null?void 0:t.actionRunner)!==null&&u!==void 0?u:new Vf});this._dropdown=new dV(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun(p=>{p.action instanceof Cc&&this.update(p.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(Jf,e,void 0),this._defaultAction.actionRunner=new class extends Vf{runAction(t,i){return uV(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(gj(this._container,oe(".action-container")))}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=oe(".action-container");this._defaultAction.render(X(this._container,t)),this._register(J(t,Te.KEY_DOWN,n=>{const s=new ei(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=oe(".dropdown-action-container");this._dropdown.render(X(this._container,i)),this._register(J(i,Te.KEY_DOWN,n=>{var s;const o=new ei(n);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),o.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()}};vT=MN([Bo(2,Zt),Bo(3,ki),Bo(4,Hc),Bo(5,Bu),Bo(6,gt),Bo(7,ba)],vT);function sle(r,e,t){return e instanceof Cc?r.createInstance(Jf,e,void 0):e instanceof eA?e.item.rememberDefaultAction?r.createInstance(vT,e,t):r.createInstance(bT,e,t):void 0}var hV=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fV=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const gV=bt("IPeekViewService");Hu(gV,class{constructor(){this._widgets=new Map}addExclusiveWidget(r,e){const t=this._widgets.get(r);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(r);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(r))};this._widgets.set(r,{widget:e,listener:e.onDidClose(i)})}});var br;(function(r){r.inPeekEditor=new xe("inReferenceSearchEditor",!0,m("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),r.notInPeekEditor=r.inPeekEditor.toNegated()})(br||(br={}));let a_=class{constructor(e,t){e instanceof mu&&br.inPeekEditor.bindTo(t)}dispose(){}};a_.ID="editor.contrib.referenceController";a_=hV([fV(1,Be)],a_);wt(a_.ID,a_);function ole(r){let e=r.get(Ct).getFocusedCodeEditor();return e instanceof mu?e.getParentEditor():e}const ale={headerBackgroundColor:q.white,primaryHeadingColor:q.fromHex("#333333"),secondaryHeadingColor:q.fromHex("#6c6c6cb3")};let dy=class extends Jae{constructor(e,t,i){super(e,t);this.instantiationService=i,this._onDidClose=new H,this.onDidClose=this._onDidClose.event,_o(this.options,ale,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=oe(".head"),this._bodyElement=oe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=oe(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),Ei(i,"click",o=>this._onTitleClick(o))),X(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=oe("span.filename"),this._secondaryHeading=oe("span.dirname"),this._metaHeading=oe("span.meta"),X(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=oe(".peekview-actions");X(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new fl(n,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Ts("peekview.close",m("label.close","Close"),be.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:sle.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:Ki(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Tr(this._metaHeading)):Zn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(58)*1.2),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`)}};dy=hV([fV(2,gt)],dy);const lle=V("peekViewTitle.background",{dark:Ut(so,.1),light:Ut(so,.1),hc:null},m("peekViewTitleBackground","Background color of the peek view title area.")),pV=V("peekViewTitleLabel.foreground",{dark:q.white,light:q.black,hc:q.white},m("peekViewTitleForeground","Color of the peek view title.")),mV=V("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},m("peekViewTitleInfoForeground","Color of the peek view title info.")),cle=V("peekView.border",{dark:so,light:so,hc:gi},m("peekViewBorder","Color of the peek view borders and arrow.")),_V=V("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:q.black},m("peekViewResultsBackground","Background color of the peek view result list.")),dle=V("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:q.white},m("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),ule=V("peekViewResult.fileForeground",{dark:q.white,light:"#1E1E1E",hc:q.white},m("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),hle=V("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},m("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),fle=V("peekViewResult.selectionForeground",{dark:q.white,light:"#6C6C6C",hc:q.white},m("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),mC=V("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:q.black},m("peekViewEditorBackground","Background color of the peek view editor.")),gle=V("peekViewEditorGutter.background",{dark:mC,light:mC,hc:mC},m("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),ple=V("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},m("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),mle=V("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},m("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),_le=V("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:Tn},m("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var ble=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Ic{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=k6.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?m({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",Rs(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):m("aria.oneReference","symbol in {0} on line {1} at column {2}",Rs(this.uri),this.range.startLineNumber,this.range.startColumn)}}class vle{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:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),c=new k(n,l.startColumn,n,s),d=new k(o,a,o,1073741824),u=i.getValueInRange(c).replace(/^\s+/,""),h=i.getValueInRange(e),f=i.getValueInRange(d).replace(/\s+$/,"");return{value:u+h+f,highlight:{start:u.length,end:u.length+h.length}}}}class l_{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Mn}dispose(){ft(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?m("aria.fileReferences.1","1 symbol in {0}, full path {1}",Rs(this.uri),this.uri.fsPath):m("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,Rs(this.uri),this.uri.fsPath)}resolve(e){return ble(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new vle(i))}catch(i){Fe(i)}return this})}}class _r{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new H,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(_r._compareReferences);let n;for(let s of e)if((!n||!nr.isEqual(n.uri,s.uri,!0))&&(n=new l_(this,s.uri),this.groups.push(n)),n.children.length===0||_r._compareReferences(s,n.children[n.children.length-1])!==0){const o=new Ic(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(o),n.children.push(o)}}dispose(){ft(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new _r(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?m("aria.result.0","No results found"):this.references.length===1?m("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?m("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):m("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),s=i.children.length,o=i.parent.groups.length;return o===1||t&&n+1<s||!t&&n>0?(t?n=(n+1)%s:n=(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((n,s)=>({idx:s,prefixLen:Of(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLen<s.prefixLen?1:n.offsetDist<s.offsetDist?-1:n.offsetDist>s.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()&&k.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 nr.compare(e.uri,t.uri)||k.compareRangesUsingStarts(e.range,t.range)}}function bV(r){if(!r)return;typeof r=="string"&&(r=De.file(r));const e=Rs(r)||(r.scheme===Ye.file?r.fsPath:r.path);return an&&Gj(e)?CT(e):e}function CT(r){return b3(r)?r.charAt(0).toUpperCase()+r.slice(1):r}var rS=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},c_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let wT=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof _r||e instanceof l_}getChildren(e){if(e instanceof _r)return e.groups;if(e instanceof l_)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};wT=rS([c_(0,ho)],wT);class Cle{getHeight(){return 23}getTemplateId(e){return e instanceof l_?d_.id:db.id}}let yT=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Ic){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return Rs(e.uri)}};yT=rS([c_(0,Zt)],yT);class wle{getId(e){return e instanceof Ic?e.id:e.uri}}let ST=class extends Z{constructor(e,t,i){super();this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new CN(n,{supportHighlights:!0})),this.badge=new eT(X(n,oe(".count"))),this._register(Zie(this.badge,i)),e.appendChild(n)}set(e,t){let i=xD(e.uri);this.file.setLabel(bV(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(m("referencesCount","{0} references",n)):this.badge.setTitleFormat(m("referenceCount","{0} reference",n))}};ST=rS([c_(1,ib),c_(2,Gt)],ST);let d_=class vV{constructor(e){this._instantiationService=e,this.templateId=vV.id}renderTemplate(e){return this._instantiationService.createInstance(ST,e)}renderElement(e,t,i){i.set(e.element,M0(e.filterData))}disposeTemplate(e){e.dispose()}};d_.id="FileReferencesRenderer";d_=rS([c_(0,gt)],d_);class yle{constructor(e){this.label=new Lc(e,!1)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${Rs(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:o}=n;t&&!oo.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,M0(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[o]))}}}class db{constructor(){this.templateId=db.id}renderTemplate(e){return new yle(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}db.id="OneReferenceRenderer";class Sle{getWidgetAriaLabel(){return m("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var xle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rd=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},i2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class sS{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new ue,this._callOnModelChange=new ue,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(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let s=0,o=e.children.length;s<o;s++){let a=e.children[s];this._decorationIgnoreSet.has(a.id)||a.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:a.range,options:sS.DecorationOptions}),i.push(s))}const n=this._editor.deltaDecorations([],t);for(let s=0;s<n.length;s++)this._decorations.set(n[s],e.children[i[s]])}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(!!t){for(let[i,n]of this._decorations){const s=t.getDecorationRange(i);if(!s)continue;let o=!1;if(!k.equalsRange(s,n.range)){if(k.spansMultipleLines(s))o=!0;else{const a=n.range.endColumn-n.range.startColumn,l=s.endColumn-s.startColumn;a!==l&&(o=!0)}o?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=s}}for(let i=0,n=e.length;i<n;i++)this._decorations.delete(e[i]);this._editor.deltaDecorations(e,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}sS.DecorationOptions=qe.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class Ele{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch{}return{ratio:t||.7,heightInLines:i||18}}}class kle extends YL{}let xT=class extends dy{constructor(e,t,i,n,s,o,a,l,c,d){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},o);this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=o,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=d,this._disposeOnNewModel=new ue,this._callOnDispose=new ue,this._onDidSelectReference=new H,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Ht(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),ft(this._preview),ft(this._previewNotAvailableMessage),ft(this._tree),ft(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(cle)||q.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(lle)||q.transparent,primaryHeadingColor:e.getColor(pV),secondaryHeadingColor:e.getColor(mV)})}show(e){this.editor.revealRangeInCenterIfOutsideViewport(e,0),super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=X(e,oe("div.messages")),Zn(this._messageContainer),this._splitView=new u6(e,{orientation:1}),this._previewContainer=X(e,oe("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(mu,this._previewContainer,t,this.editor),Zn(this._previewContainer),this._previewNotAvailableMessage=new Ti(m("missingPreviewMessage","no preview available"),Ti.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService),this._treeContainer=X(e,oe("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new Sle,keyboardNavigationLabelProvider:this._instantiationService.createInstance(yT),identityProvider:new wle,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:_V}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(Ei(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(kle,"ReferencesWidget",this._treeContainer,new Cle,[this._instantiationService.createInstance(d_),this._instantiationService.createInstance(db)],this._instantiationService.createInstance(wT),i),this._splitView.addView({onDidChange:ke.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},ey.Distribute),this._splitView.addView({onDidChange:ke.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},ey.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(s,o)=>{s instanceof Ic&&(o==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:o,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Zn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Ht(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=m("noResults","No results"),Tr(this._messageContainer),Promise.resolve(void 0)):(Zn(this._messageContainer),this._decorationsManager=new sS(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(t.detail!==2)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"),Tr(this._treeContainer),Tr(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Ic)return e;if(e instanceof l_&&e.children.length>0)return e.children[0]}revealReference(e){return i2(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return i2(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ye.inMemory?this.setTitle(C3(e.uri),this._uriLabel.getUriLabel(xD(e.uri))):this.setTitle(m("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}ft(this._previewModelReference);const s=n.object;if(s){const o=this._preview.getModel()===s.textEditorModel?0:1,a=k.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,o)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};xT=xle([rd(3,Gt),rd(4,ho),rd(5,gt),rd(6,gV),rd(7,ib),rd(8,A0),rd(9,Zt)],xT);Et((r,e)=>{const t=r.getColor(ple);t&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${t}; }`);const i=r.getColor(mle);i&&e.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${i}; }`);const n=r.getColor(_le);n&&e.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${n}; box-sizing: border-box; }`);const s=r.getColor(Tn);s&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${s}; box-sizing: border-box; }`);const o=r.getColor(_V);o&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${o}; }`);const a=r.getColor(dle);a&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=r.getColor(ule);l&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=r.getColor(hle);c&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const d=r.getColor(fle);d&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${d} !important; }`);const u=r.getColor(mC);u&&e.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: ${u};}`);const h=r.getColor(gle);h&&e.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: ${h};}`)});var Lle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ch=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},n2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Zu=new xe("referenceSearchVisible",!1,m("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Dc=class ET{constructor(e,t,i,n,s,o,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=a,this._configurationService=l,this._disposables=new ue,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Zu.bindTo(i)}static get(e){return e.getContribution(ET.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||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=Ele.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(xT,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(m("labelLoading","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(l=>{let{element:c,kind:d}=l;if(!!c)switch(d){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":i?this._gotoReference(c):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(m("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let d=this._editor.getModel().uri,u=new U(e.startLineNumber,e.startColumn),h=this._model.nearestReference(d,u);if(h)return this._widget.setSelection(h).then(()=>{this._widget&&this._editor.getOption(76)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return n2(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),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()})}revealReference(e){return n2(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||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){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=k.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t}},this._editor).then(i=>{var n;if(this._ignoreModelChangeEvent=!1,!i||!this._widget){this.closeWidget();return}if(this._editor===i)this._widget.show(t),this._widget.focusOnReferenceTree();else{const s=ET.get(i),o=this._model.clone();this.closeWidget(),i.focus(),s.toggleWidget(t,Pi(a=>Promise.resolve(o)),(n=this._peekMode)!==null&&n!==void 0?n:!1)}},i=>{this._ignoreModelChangeEvent=!1,Fe(i)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,pinned:i}},this._editor,t)}};Dc.ID="editor.contrib.referencesController";Dc=Lle([Ch(2,Be),Ch(3,Ct),Ch(4,ki),Ch(5,gt),Ch(6,ba),Ch(7,di)],Dc);function Xu(r,e){const t=ole(r);if(!t)return;let i=Dc.get(t);i&&e(i)}zn.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Bi(2089,60),when:me.or(Zu,br.inPeekEditor),handler(r){Xu(r,e=>{e.changeFocusBetweenPreviewAndReferences()})}});zn.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:me.or(Zu,br.inPeekEditor),handler(r){Xu(r,e=>{e.goToNextOrPreviousReference(!0)})}});zn.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1086,secondary:[1094],when:me.or(Zu,br.inPeekEditor),handler(r){Xu(r,e=>{e.goToNextOrPreviousReference(!1)})}});lt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");lt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");lt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");lt.registerCommand("closeReferenceSearch",r=>Xu(r,e=>e.closeWidget()));zn.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1033],when:me.and(br.inPeekEditor,me.not("config.editor.stablePeek"))});zn.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1033],when:me.and(Zu,me.not("config.editor.stablePeek"))});zn.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2066]},when:me.and(Zu,v6),handler(r){var e;const i=(e=r.get(ls).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Xu(r,n=>n.revealReference(i[0]))}});zn.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2051,mac:{primary:259},when:me.and(Zu,v6),handler(r){var e;const i=(e=r.get(ls).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Xu(r,n=>n.openReference(i[0],!0,!0))}});lt.registerCommand("openReference",r=>{var e;const i=(e=r.get(ls).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Xu(r,n=>n.openReference(i[0],!1,!0))});var CV=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lp=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const PN=new xe("hasSymbols",!1,m("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),oS=bt("ISymbolNavigationService");let kT=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=PN.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new LT(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const o=this._editorService.getActiveCodeEditor();if(!o)return;const a=o.getModel(),l=o.getPosition();if(!a||!l)return;let c=!1,d=!1;for(const u of t.references)if(v3(u.uri,a.uri))c=!0,d=d||k.containsPosition(u.range,l);else if(c)break;(!c||!d)&&this.reset()});this._currentState=rc(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:k.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?m("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):m("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};kT=CV([Lp(0,Be),Lp(1,Ct),Lp(2,ki),Lp(3,Zt)],kT);Hu(oS,kT,!0);fe(new class extends dn{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:PN,kbOpts:{weight:100,primary:70}})}runEditorCommand(r,e){return r.get(oS).revealNext(e)}});zn.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:PN,primary:9,handler(r){r.get(oS).reset()}});let LT=class{constructor(e){this._listener=new Map,this._disposables=new ue,this._onDidChange=new H,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(),ft(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,rc(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};LT=CV([Lp(0,Ct)],LT);var wV=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function ub(r,e,t,i){const s=t.ordered(r).map(o=>Promise.resolve(i(o,r,e)).then(void 0,a=>{Yi(a)}));return Promise.all(s).then(o=>{const a=[];for(let l of o)Array.isArray(l)?a.push(...l):l&&a.push(l);return a})}function FN(r,e,t){return ub(r,e,xm,(i,n,s)=>i.provideDefinition(n,s,t))}function yV(r,e,t){return ub(r,e,JC,(i,n,s)=>i.provideDeclaration(n,s,t))}function SV(r,e,t){return ub(r,e,ew,(i,n,s)=>i.provideImplementation(n,s,t))}function xV(r,e,t){return ub(r,e,tw,(i,n,s)=>i.provideTypeDefinition(n,s,t))}function aS(r,e,t,i){return ub(r,e,ZC,(n,s,o)=>wV(this,void 0,void 0,function*(){const a=yield n.provideReferences(s,o,{includeDeclaration:!0},i);if(!t||!a||a.length!==2)return a;const l=yield n.provideReferences(s,o,{includeDeclaration:!1},i);return l&&l.length===1?l:a}))}function hb(r){return wV(this,void 0,void 0,function*(){const e=yield r(),t=new _r(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}pa("_executeDefinitionProvider",(r,e)=>hb(()=>FN(r,e,it.None)));pa("_executeDeclarationProvider",(r,e)=>hb(()=>yV(r,e,it.None)));pa("_executeImplementationProvider",(r,e)=>hb(()=>SV(r,e,it.None)));pa("_executeTypeDefinitionProvider",(r,e)=>hb(()=>xV(r,e,it.None)));pa("_executeReferenceProvider",(r,e)=>hb(()=>aS(r,e,!1,it.None)));var Ds=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Nx,Rx,Ox,Mx,Px,Fx,Bx,Wx;es.appendMenuItem(Ee.EditorContext,{submenu:Ee.EditorContextPeek,title:m("peek.submenu","Peek"),group:"navigation",order:100});const EV=new Set;function vo(r){const e=new r;return wW(e),EV.add(e.id),e}class Lg extends Se{constructor(e,t){super(t);this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const i=e.get(ki),n=e.get(Ct),s=e.get(bl),o=e.get(oS),a=t.getModel(),l=t.getPosition(),c=new Ym(t,5),d=dD(this._getLocationModel(a,l,c.token),c.token).then(u=>Ds(this,void 0,void 0,function*(){if(!u||c.token.isCancellationRequested)return;sn(u.ariaMessage);let h;if(u.referenceAt(a.uri,l)){const g=this._getAlternativeCommand(t);g!==this.id&&EV.has(g)&&(h=t.getAction(g))}const f=u.references.length;if(f===0){if(!this._configuration.muteMessage){const g=a.getWordAtPosition(l);Wr.get(t).showMessage(this._getNoResultFoundMessage(g),l)}}else if(f===1&&h)h.run();else return this._onResult(n,o,t,u)}),u=>{i.error(u)}).finally(()=>{c.dispose()});return s.showWhile(d,250),d}_onResult(e,t,i,n){return Ds(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof mu)&&(this._configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(i,n);else{const o=n.firstReference(),a=n.references.length>1&&s==="gotoAndPeek",l=yield this._openReference(i,e,o,this._configuration.openToSide,!a);a&&l?this._openInPeek(l,n):n.dispose(),s==="goto"&&t.put(o)}})}_openReference(e,t,i,n,s){return Ds(this,void 0,void 0,function*(){let o;if(Fq(i)&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:k.collapseToStart(o),selectionRevealType:3}},e,n);if(!!a){if(s){const l=a.getModel(),c=a.deltaDecorations([],[{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&a.deltaDecorations(c,[])},350)}return a}})}_openInPeek(e,t){let i=Dc.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Pi(n=>Promise.resolve(t)),this._configuration.openInPeek):t.dispose()}}class lS extends Lg{_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield FN(e,t,i),m("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?m("noResultWord","No definition found for '{0}'",e.word):m("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleDefinitions}}const kV=_g&&!ZB?2118:70;vo((Nx=class TT extends lS{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:TT.id,label:m("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:me.and(R.hasDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:kV,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});lt.registerCommandAlias("editor.action.goToDeclaration",TT.id)}},Nx.id="editor.action.revealDefinition",Nx));vo((Rx=class IT extends lS{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:IT.id,label:m("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:me.and(R.hasDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,kV),weight:100}});lt.registerCommandAlias("editor.action.openDeclarationToTheSide",IT.id)}},Rx.id="editor.action.revealDefinitionAside",Rx));vo((Ox=class DT extends lS{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:DT.id,label:m("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:me.and(R.hasDefinitionProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:582,linux:{primary:3140},weight:100},contextMenuOpts:{menuId:Ee.EditorContextPeek,group:"peek",order:2}});lt.registerCommandAlias("editor.action.previewDeclaration",DT.id)}},Ox.id="editor.action.peekDefinition",Ox));class LV extends Lg{_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield yV(e,t,i),m("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(50).multipleDeclarations}}vo((Mx=class TV extends LV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:TV.id,label:m("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:me.and(R.hasDeclarationProvider,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}},Mx.id="editor.action.revealDeclaration",Mx));vo(class extends LV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:m("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:me.and(R.hasDeclarationProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ee.EditorContextPeek,group:"peek",order:3}})}});class IV extends Lg{_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield xV(e,t,i),m("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?m("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):m("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleTypeDefinitions}}vo((Px=class DV extends IV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:DV.ID,label:m("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:me.and(R.hasTypeDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},Px.ID="editor.action.goToTypeDefinition",Px));vo((Fx=class AV extends IV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:AV.ID,label:m("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:me.and(R.hasTypeDefinitionProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ee.EditorContextPeek,group:"peek",order:4}})}},Fx.ID="editor.action.peekTypeDefinition",Fx));class NV extends Lg{_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield SV(e,t,i),m("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?m("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):m("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(50).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(50).multipleImplementations}}vo((Bx=class RV extends NV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:RV.ID,label:m("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:me.and(R.hasImplementationProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:2118,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},Bx.ID="editor.action.goToImplementation",Bx));vo((Wx=class OV extends NV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:OV.ID,label:m("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:me.and(R.hasImplementationProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:3142,weight:100},contextMenuOpts:{menuId:Ee.EditorContextPeek,group:"peek",order:5}})}},Wx.ID="editor.action.peekImplementation",Wx));class MV extends Lg{_getNoResultFoundMessage(e){return e?m("references.no","No references found for '{0}'",e.word):m("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(50).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(50).multipleReferences}}vo(class extends MV{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:m("goToReferences.label","Go to References"),alias:"Go to References",precondition:me.and(R.hasReferenceProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:1094,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield aS(e,t,!0,i),m("ref.title","References"))})}});vo(class extends MV{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:m("references.action.label","Peek References"),alias:"Peek References",precondition:me.and(R.hasReferenceProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:Ee.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(yield aS(e,t,!1,i),m("ref.title","References"))})}});class Tle extends Lg{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:m("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:me.and(br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated())});this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i){return Ds(this,void 0,void 0,function*(){return new _r(this._references,m("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&m("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}lt.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:De},{name:"position",description:"The position at which to start",constraint:U.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:(r,e,t,i,n,s,o)=>Ds(void 0,void 0,void 0,function*(){Dt(De.isUri(e)),Dt(U.isIPosition(t)),Dt(Array.isArray(i)),Dt(typeof n=="undefined"||typeof n=="string"),Dt(typeof o=="undefined"||typeof o=="boolean");const a=r.get(Ct),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(la(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const d=new class extends Tle{_getNoResultFoundMessage(u){return s||super._getNoResultFoundMessage(u)}}({muteMessage:!Boolean(s),openInPeek:Boolean(o),openToSide:!1},i,n);c.get(gt).invokeFunction(d.run.bind(d),l)})})});lt.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:De},{name:"position",description:"The position at which to start",constraint:U.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:(r,e,t,i,n)=>Ds(void 0,void 0,void 0,function*(){r.get(pi).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});lt.registerCommand({id:"editor.action.findReferences",handler:(r,e,t)=>{Dt(De.isUri(e)),Dt(U.isIPosition(t));const i=r.get(Ct);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(n=>{if(!la(n)||!n.hasModel())return;const s=Dc.get(n);if(!s)return;const o=Pi(l=>aS(n.getModel(),U.lift(t),!1,l).then(c=>new _r(c,m("ref.title","References")))),a=new k(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(a,o,!1))})}});lt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");es.appendMenuItems([{id:Ee.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:m({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:Ee.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:m({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:Ee.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:m({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:Ee.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:m({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:Ee.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:m({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var Ile=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r2=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let _u=class Tp{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new ue,this.toUnhookForKeyboard=new ue,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new cV(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown(([s,o])=>{this.startFindDefinitionFromMouse(s,Ar(o))})),this.toUnhook.add(n.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},o=>{this.removeLinkDecorations(),Fe(o)})})),this.toUnhook.add(n.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(Tp.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let n=new Km(this.editor,15);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Pi(s=>this.findDefinition(e,s)),this.previousPromise.then(s=>{if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}if(s.length>1)this.addDecoration(new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),new gl().appendText(m("multipleResults","Click to show {0} definitions.",s.length)));else{let o=s[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}const{object:{textEditorModel:l}}=a,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){a.dispose();return}const d=this.getPreviewValue(l,c,o);let u;o.originSelectionRange?u=k.lift(o.originSelectionRange):u=new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const h=this.modeService.getModeIdByFilepathOrFirstLine(l.uri);this.addDecoration(u,new gl().appendCodeblock(h||"",d)),a.dispose()})}}).then(void 0,Fe)}getPreviewValue(e,t,i){let n=i.targetSelectionRange?i.range:this.getPreviewRangeBasedOnBrackets(e,t);return n.endLineNumber-n.startLineNumber>=Tp.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);s=Math.min(s,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${s-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+Tp.MAX_SOURCE_PREVIEW_LINES);let s=t+1;for(;s<n;s++){let o=e.getLineFirstNonWhitespaceColumn(s);if(i===o)break}return new k(t,1,s+1,1)}getPreviewRangeBasedOnBrackets(e,t){const i=Math.min(e.getLineCount(),t+Tp.MAX_SOURCE_PREVIEW_LINES),n=[];let s=!0,o=e.findNextBracket(new U(t,1));for(;o!==null;){if(n.length===0)n.push(o);else{const d=n[n.length-1];if(d.open[0]===o.open[0]&&d.isOpen&&!o.isOpen?n.pop():n.push(o),n.length===0)if(s)s=!1;else return new k(t,1,o.range.endLineNumber+1,1)}const a=e.getLineMaxColumn(t);let l=o.range.endLineNumber,c=o.range.endColumn;if(a===o.range.endColumn&&(l++,c=1),l>i)return new k(t,1,i+1,1);o=e.findNextBracket(new U(l,c))}return new k(t,1,i+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&e.target.type===6&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&xm.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?FN(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const n=!t&&this.editor.getOption(77)&&!this.isInPeekEditor(i);return new lS({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(i,this.editor)})}isInPeekEditor(e){const t=e.get(Be);return br.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};_u.ID="editor.contrib.gotodefinitionatposition";_u.MAX_SOURCE_PREVIEW_LINES=8;_u=Ile([r2(1,ho),r2(2,Fs)],_u);wt(_u.ID,_u);Et((r,e)=>{const t=r.getColor(SA);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});const hv=oe;class PV extends Z{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 Q_(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class BN extends Z{constructor(e,t,i){super();this.actionContainer=X(e,hv("div.action-container")),this.action=X(this.actionContainer,hv("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),t.iconClass&&X(this.action,hv(`span.icon.${t.iconClass}`));const n=X(this.action,hv("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(J(this.actionContainer,Te.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this.setEnabled(!0)}static render(e,t,i){return new BN(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}class Dle{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new H,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new H,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let i=0;i<this.colorPresentations.length;i++)if(t.toLowerCase()===this.colorPresentations[i].label){this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}const na=oe;class Ale extends Z{constructor(e,t,i){super();this.model=t,this.domNode=na(".colorpicker-header"),X(e,this.domNode),this.pickedColorNode=X(this.domNode,na(".picked-color"));const n=X(this.domNode,na(".original-color"));n.style.backgroundColor=q.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(su)||q.white,this._register(Et((s,o)=>{this.backgroundColor=s.getColor(su)||q.white})),this._register(J(this.pickedColorNode,Te.CLICK,()=>this.model.selectNextColorPresentation())),this._register(J(n,Te.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=q.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=q.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class Nle extends Z{constructor(e,t,i){super();this.model=t,this.pixelRatio=i,this.domNode=na(".colorpicker-body"),X(e,this.domNode),this.saturationBox=new Rle(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 Ole(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new Mle(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new q(new Yo(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new q(new Yo(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new q(new Yo(i===360?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class Rle extends Z{constructor(e,t,i){super();this.model=t,this.pixelRatio=i,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this.domNode=na(".saturation-wrap"),X(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",X(this.domNode,this.canvas),this.selection=na(".saturation-selection"),X(this.domNode,this.selection),this.layout(),this._register(hD(this.domNode,n=>this.onMouseDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new Wu);const t=rn(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,yg,n=>this.onDidChangePosition(n.posx-t.left,n.posy-t.top),()=>null);const i=i3(document,()=>{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 q(new Yo(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=q.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(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class FV extends Z{constructor(e,t){super();this.model=t,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this.domNode=X(e,na(".strip")),this.overlay=X(this.domNode,na(".overlay")),this.slider=X(this.domNode,na(".slider")),this.slider.style.top="0px",this._register(hD(this.domNode,i=>this.onMouseDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new Wu),i=rn(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,yg,s=>this.onDidChangeTop(s.posy-i.top),()=>null);const n=i3(document,()=>{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 Ole extends FV{constructor(e,t){super(e,t);this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,s=new q(new Je(t,i,n,1)),o=new q(new Je(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class Mle extends FV{constructor(e,t){super(e,t);this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class Ple extends Hr{constructor(e,t,i,n){super();this.model=t,this.pixelRatio=i,this._register(YB(()=>this.layout()));const s=na(".colorpicker-widget");e.appendChild(s);const o=new Ale(s,this.model,n);this.body=new Nle(s,this.model,this.pixelRatio),this._register(o),this._register(this.body)}layout(){this.body.layout()}}var Fle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ble=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},s2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Wle{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let AT=class{constructor(e,t,i){this._editor=e,this._hover=t,this._themeService=i}computeSync(e,t){return[]}computeAsync(e,t,i){return s2(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const n=pu.get(this._editor);for(const s of t){const o=n.getColorData(s.range.getStartPosition());if(o)return[yield this._createColorHover(this._editor.getModel(),o.colorInfo,o.provider)]}return[]})}_createColorHover(e,t,i){return s2(this,void 0,void 0,function*(){const n=e.getValueInRange(t.range),{red:s,green:o,blue:a,alpha:l}=t.color,c=new Je(Math.round(s*255),Math.round(o*255),Math.round(a*255),l),d=new q(c),u=yield XP(e,t,i,it.None),h=new Dle(d,[],0);return h.colorPresentations=u||[],h.guessColorPresentation(d,n),new Wle(this,k.lift(t.range),h,i)})}renderHoverParts(e,t,i){if(e.length===0||!this._editor.hasModel())return Z.None;const n=new ue,s=e[0],o=this._editor.getModel(),a=s.model,l=n.add(new Ple(t,a,this._editor.getOption(127),this._themeService));let c=new k(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);const d=()=>{let h,f;if(a.presentation.textEdit){h=[a.presentation.textEdit],f=new k(a.presentation.textEdit.range.startLineNumber,a.presentation.textEdit.range.startColumn,a.presentation.textEdit.range.endLineNumber,a.presentation.textEdit.range.endColumn);const g=this._editor.getModel()._setTrackedRange(null,f,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",h),f=this._editor.getModel()._getTrackedRange(g)||f}else h=[{identifier:null,range:c,text:a.presentation.label,forceMoveMarkers:!1}],f=c.setEndPosition(c.endLineNumber,c.startColumn+a.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",h);a.presentation.additionalTextEdits&&(h=[...a.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",h),this._hover.hide()),this._editor.pushUndoStop(),c=f},u=h=>XP(o,{range:c,color:{red:h.rgba.r/255,green:h.rgba.g/255,blue:h.rgba.b/255,alpha:h.rgba.a}},s.provider,it.None).then(f=>{a.colorPresentations=f||[]});return n.add(a.onColorFlushed(h=>{u(h).then(d)})),n.add(a.onDidChangeColor(u)),this._hover.setColorPicker(l),n}};AT=Fle([Ble(2,Gt)],AT);class BV{constructor(e,t,i,n,s){this._computer=e,this._state=0,this._hoverTime=s,this._firstWaitScheduler=new $t(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new $t(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new $t(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=n}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Pi(e=>this._computer.computeAsync(e)),this._asyncComputationPromise.then(e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)},e=>this._onError(e))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):Fe(e)}_onProgress(e){this._progressCallback(e)}start(e){if(e===0)this._state===0&&(this._state=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();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}class o2{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class Vx{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function Vle(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Hle=Object.hasOwnProperty,a2=Object.setPrototypeOf,$le=Object.isFrozen,Ule=Object.getPrototypeOf,zle=Object.getOwnPropertyDescriptor,vr=Object.freeze,ml=Object.seal,jle=Object.create,WV=typeof Reflect!="undefined"&&Reflect,uy=WV.apply,NT=WV.construct;uy||(uy=function(e,t,i){return e.apply(t,i)});vr||(vr=function(e){return e});ml||(ml=function(e){return e});NT||(NT=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(Vle(t))))});var qle=po(Array.prototype.forEach),l2=po(Array.prototype.pop),rp=po(Array.prototype.push),ld=po(String.prototype.toLowerCase),c2=po(String.prototype.match),Il=po(String.prototype.replace),Gle=po(String.prototype.indexOf),Kle=po(String.prototype.trim),Ia=po(RegExp.prototype.test),d2=Yle(TypeError);function po(r){return function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return uy(r,e,i)}}function Yle(r){return function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return NT(r,t)}}function St(r,e){a2&&a2(r,null);for(var t=e.length;t--;){var i=e[t];if(typeof i=="string"){var n=ld(i);n!==i&&($le(e)||(e[t]=n),i=n)}r[i]=!0}return r}function sd(r){var e=jle(null),t=void 0;for(t in r)uy(Hle,r,[t])&&(e[t]=r[t]);return e}function fv(r,e){for(;r!==null;){var t=zle(r,e);if(t){if(t.get)return po(t.get);if(typeof t.value=="function")return po(t.value)}r=Ule(r)}function i(n){return console.warn("fallback value for",n),null}return i}var u2=vr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Hx=vr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),$x=vr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Zle=vr(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ux=vr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Xle=vr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),h2=vr(["#text"]),f2=vr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),zx=vr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),g2=vr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),gv=vr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Qle=ml(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Jle=ml(/<%[\s\S]*|[\s\S]*%>/gm),ece=ml(/^data-[\-\w.\u00B7-\uFFFF]/),tce=ml(/^aria-[\-\w]+$/),ice=ml(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),nce=ml(/^(?:\w+script|data):/i),rce=ml(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ip=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function ko(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var sce=function(){return typeof window=="undefined"?null:window},oce=function(e,t){if((typeof e=="undefined"?"undefined":Ip(e))!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function VV(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:sce(),e=function(T){return VV(T)};if(e.version="2.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,i=r.document,n=r.DocumentFragment,s=r.HTMLTemplateElement,o=r.Node,a=r.Element,l=r.NodeFilter,c=r.NamedNodeMap,d=c===void 0?r.NamedNodeMap||r.MozNamedAttrMap:c,u=r.Text,h=r.Comment,f=r.DOMParser,g=r.trustedTypes,p=a.prototype,_=fv(p,"cloneNode"),v=fv(p,"nextSibling"),b=fv(p,"childNodes"),C=fv(p,"parentNode");if(typeof s=="function"){var y=i.createElement("template");y.content&&y.content.ownerDocument&&(i=y.content.ownerDocument)}var E=oce(g,t),S=E&&Gc?E.createHTML(""):"",w=i,x=w.implementation,D=w.createNodeIterator,M=w.createDocumentFragment,B=w.getElementsByTagName,z=t.importNode,j={};try{j=sd(i).documentMode?i.documentMode:{}}catch{}var re={};e.isSupported=typeof C=="function"&&x&&typeof x.createHTMLDocument!="undefined"&&j!==9;var te=Qle,N=Jle,L=ece,O=tce,W=nce,ge=rce,se=ice,ae=null,Ce=St({},[].concat(ko(u2),ko(Hx),ko($x),ko(Ux),ko(h2))),Le=null,ct=St({},[].concat(ko(f2),ko(zx),ko(g2),ko(gv))),bi=null,Kt=null,Bs=!0,Xt=!0,wo=!1,Qe=!1,Oe=!1,ih=!1,Rg=!1,Cl=!1,ya=!1,wl=!0,Gc=!1,_b=!0,nh=!0,Kc=!1,yl={},Sa=null,Yc=St({},["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"]),Og=null,Mg=St({},["audio","video","img","source","image","track"]),rh=null,bb=St({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Pg="http://www.w3.org/1998/Math/MathML",Fg="http://www.w3.org/2000/svg",yo="http://www.w3.org/1999/xhtml",sh=yo,Bg=!1,ds=null,Zc=i.createElement("form"),oh=function(T){ds&&ds===T||((!T||(typeof T=="undefined"?"undefined":Ip(T))!=="object")&&(T={}),T=sd(T),ae="ALLOWED_TAGS"in T?St({},T.ALLOWED_TAGS):Ce,Le="ALLOWED_ATTR"in T?St({},T.ALLOWED_ATTR):ct,rh="ADD_URI_SAFE_ATTR"in T?St(sd(bb),T.ADD_URI_SAFE_ATTR):bb,Og="ADD_DATA_URI_TAGS"in T?St(sd(Mg),T.ADD_DATA_URI_TAGS):Mg,Sa="FORBID_CONTENTS"in T?St({},T.FORBID_CONTENTS):Yc,bi="FORBID_TAGS"in T?St({},T.FORBID_TAGS):{},Kt="FORBID_ATTR"in T?St({},T.FORBID_ATTR):{},yl="USE_PROFILES"in T?T.USE_PROFILES:!1,Bs=T.ALLOW_ARIA_ATTR!==!1,Xt=T.ALLOW_DATA_ATTR!==!1,wo=T.ALLOW_UNKNOWN_PROTOCOLS||!1,Qe=T.SAFE_FOR_TEMPLATES||!1,Oe=T.WHOLE_DOCUMENT||!1,Cl=T.RETURN_DOM||!1,ya=T.RETURN_DOM_FRAGMENT||!1,wl=T.RETURN_DOM_IMPORT!==!1,Gc=T.RETURN_TRUSTED_TYPE||!1,Rg=T.FORCE_BODY||!1,_b=T.SANITIZE_DOM!==!1,nh=T.KEEP_CONTENT!==!1,Kc=T.IN_PLACE||!1,se=T.ALLOWED_URI_REGEXP||se,sh=T.NAMESPACE||yo,Qe&&(Xt=!1),ya&&(Cl=!0),yl&&(ae=St({},[].concat(ko(h2))),Le=[],yl.html===!0&&(St(ae,u2),St(Le,f2)),yl.svg===!0&&(St(ae,Hx),St(Le,zx),St(Le,gv)),yl.svgFilters===!0&&(St(ae,$x),St(Le,zx),St(Le,gv)),yl.mathMl===!0&&(St(ae,Ux),St(Le,g2),St(Le,gv))),T.ADD_TAGS&&(ae===Ce&&(ae=sd(ae)),St(ae,T.ADD_TAGS)),T.ADD_ATTR&&(Le===ct&&(Le=sd(Le)),St(Le,T.ADD_ATTR)),T.ADD_URI_SAFE_ATTR&&St(rh,T.ADD_URI_SAFE_ATTR),T.FORBID_CONTENTS&&(Sa===Yc&&(Sa=sd(Sa)),St(Sa,T.FORBID_CONTENTS)),nh&&(ae["#text"]=!0),Oe&&St(ae,["html","head","body"]),ae.table&&(St(ae,["tbody"]),delete bi.tbody),vr&&vr(T),ds=T)},Wg=St({},["mi","mo","mn","ms","mtext"]),vb=St({},["foreignobject","desc","title","annotation-xml"]),ah=St({},Hx);St(ah,$x),St(ah,Zle);var Sl=St({},Ux);St(Sl,Xle);var Cb=function(T){var $=C(T);(!$||!$.tagName)&&($={namespaceURI:yo,tagName:"template"});var ie=ld(T.tagName),ne=ld($.tagName);if(T.namespaceURI===Fg)return $.namespaceURI===yo?ie==="svg":$.namespaceURI===Pg?ie==="svg"&&(ne==="annotation-xml"||Wg[ne]):Boolean(ah[ie]);if(T.namespaceURI===Pg)return $.namespaceURI===yo?ie==="math":$.namespaceURI===Fg?ie==="math"&&vb[ne]:Boolean(Sl[ie]);if(T.namespaceURI===yo){if($.namespaceURI===Fg&&!vb[ne]||$.namespaceURI===Pg&&!Wg[ne])return!1;var ye=St({},["title","style","font","a","script"]);return!Sl[ie]&&(ye[ie]||!ah[ie])}return!1},us=function(T){rp(e.removed,{element:T});try{T.parentNode.removeChild(T)}catch{try{T.outerHTML=S}catch{T.remove()}}},wb=function(T,$){try{rp(e.removed,{attribute:$.getAttributeNode(T),from:$})}catch{rp(e.removed,{attribute:null,from:$})}if($.removeAttribute(T),T==="is"&&!Le[T])if(Cl||ya)try{us($)}catch{}else try{$.setAttribute(T,"")}catch{}},yb=function(T){var $=void 0,ie=void 0;if(Rg)T="<remove></remove>"+T;else{var ne=c2(T,/^[\r\n\t ]+/);ie=ne&&ne[0]}var ye=E?E.createHTML(T):T;if(sh===yo)try{$=new f().parseFromString(ye,"text/html")}catch{}if(!$||!$.documentElement){$=x.createDocument(sh,"template",null);try{$.documentElement.innerHTML=Bg?"":ye}catch{}}var Ve=$.body||$.documentElement;return T&&ie&&Ve.insertBefore(i.createTextNode(ie),Ve.childNodes[0]||null),sh===yo?B.call($,Oe?"html":"body")[0]:Oe?$.documentElement:Ve},Sb=function(T){return D.call(T.ownerDocument||T,T,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},pt=function(T){return T instanceof u||T instanceof h?!1:typeof T.nodeName!="string"||typeof T.textContent!="string"||typeof T.removeChild!="function"||!(T.attributes instanceof d)||typeof T.removeAttribute!="function"||typeof T.setAttribute!="function"||typeof T.namespaceURI!="string"||typeof T.insertBefore!="function"},Xc=function(T){return(typeof o=="undefined"?"undefined":Ip(o))==="object"?T instanceof o:T&&(typeof T=="undefined"?"undefined":Ip(T))==="object"&&typeof T.nodeType=="number"&&typeof T.nodeName=="string"},Q=function(T,$,ie){!re[T]||qle(re[T],function(ne){ne.call(e,$,ie,ds)})},G=function(T){var $=void 0;if(Q("beforeSanitizeElements",T,null),pt(T)||c2(T.nodeName,/[\u0080-\uFFFF]/))return us(T),!0;var ie=ld(T.nodeName);if(Q("uponSanitizeElement",T,{tagName:ie,allowedTags:ae}),!Xc(T.firstElementChild)&&(!Xc(T.content)||!Xc(T.content.firstElementChild))&&Ia(/<[/\w]/g,T.innerHTML)&&Ia(/<[/\w]/g,T.textContent)||ie==="select"&&Ia(/<template/i,T.innerHTML))return us(T),!0;if(!ae[ie]||bi[ie]){if(nh&&!Sa[ie]){var ne=C(T)||T.parentNode,ye=b(T)||T.childNodes;if(ye&&ne)for(var Ve=ye.length,je=Ve-1;je>=0;--je)ne.insertBefore(_(ye[je],!0),v(T))}return us(T),!0}return T instanceof a&&!Cb(T)||(ie==="noscript"||ie==="noembed")&&Ia(/<\/no(script|embed)/i,T.innerHTML)?(us(T),!0):(Qe&&T.nodeType===3&&($=T.textContent,$=Il($,te," "),$=Il($,N," "),T.textContent!==$&&(rp(e.removed,{element:T.cloneNode()}),T.textContent=$)),Q("afterSanitizeElements",T,null),!1)},Y=function(T,$,ie){if(_b&&($==="id"||$==="name")&&(ie in i||ie in Zc))return!1;if(!(Xt&&!Kt[$]&&Ia(L,$))){if(!(Bs&&Ia(O,$))){if(!Le[$]||Kt[$])return!1;if(!rh[$]){if(!Ia(se,Il(ie,ge,""))){if(!(($==="src"||$==="xlink:href"||$==="href")&&T!=="script"&&Gle(ie,"data:")===0&&Og[T])){if(!(wo&&!Ia(W,Il(ie,ge,"")))){if(ie)return!1}}}}}}return!0},A=function(T){var $=void 0,ie=void 0,ne=void 0,ye=void 0;Q("beforeSanitizeAttributes",T,null);var Ve=T.attributes;if(!!Ve){var je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Le};for(ye=Ve.length;ye--;){$=Ve[ye];var Ke=$,nt=Ke.name,Pe=Ke.namespaceURI;if(ie=Kle($.value),ne=ld(nt),je.attrName=ne,je.attrValue=ie,je.keepAttr=!0,je.forceKeepAttr=void 0,Q("uponSanitizeAttribute",T,je),ie=je.attrValue,!je.forceKeepAttr&&(wb(nt,T),!!je.keepAttr)){if(Ia(/\/>/i,ie)){wb(nt,T);continue}Qe&&(ie=Il(ie,te," "),ie=Il(ie,N," "));var Wi=T.nodeName.toLowerCase();if(!!Y(Wi,ne,ie))try{Pe?T.setAttributeNS(Pe,nt,ie):T.setAttribute(nt,ie),l2(e.removed)}catch{}}}Q("afterSanitizeAttributes",T,null)}},P=function F(T){var $=void 0,ie=Sb(T);for(Q("beforeSanitizeShadowDOM",T,null);$=ie.nextNode();)Q("uponSanitizeShadowNode",$,null),!G($)&&($.content instanceof n&&F($.content),A($));Q("afterSanitizeShadowDOM",T,null)};return e.sanitize=function(F,T){var $=void 0,ie=void 0,ne=void 0,ye=void 0,Ve=void 0;if(Bg=!F,Bg&&(F="<!-->"),typeof F!="string"&&!Xc(F)){if(typeof F.toString!="function")throw d2("toString is not a function");if(F=F.toString(),typeof F!="string")throw d2("dirty is not a string, aborting")}if(!e.isSupported){if(Ip(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof F=="string")return r.toStaticHTML(F);if(Xc(F))return r.toStaticHTML(F.outerHTML)}return F}if(ih||oh(T),e.removed=[],typeof F=="string"&&(Kc=!1),!Kc)if(F instanceof o)$=yb("<!---->"),ie=$.ownerDocument.importNode(F,!0),ie.nodeType===1&&ie.nodeName==="BODY"||ie.nodeName==="HTML"?$=ie:$.appendChild(ie);else{if(!Cl&&!Qe&&!Oe&&F.indexOf("<")===-1)return E&&Gc?E.createHTML(F):F;if($=yb(F),!$)return Cl?null:S}$&&Rg&&us($.firstChild);for(var je=Sb(Kc?F:$);ne=je.nextNode();)ne.nodeType===3&&ne===ye||G(ne)||(ne.content instanceof n&&P(ne.content),A(ne),ye=ne);if(ye=null,Kc)return F;if(Cl){if(ya)for(Ve=M.call($.ownerDocument);$.firstChild;)Ve.appendChild($.firstChild);else Ve=$;return wl&&(Ve=z.call(t,Ve,!0)),Ve}var Ke=Oe?$.outerHTML:$.innerHTML;return Qe&&(Ke=Il(Ke,te," "),Ke=Il(Ke,N," ")),E&&Gc?E.createHTML(Ke):Ke},e.setConfig=function(F){oh(F),ih=!0},e.clearConfig=function(){ds=null,ih=!1},e.isValidAttribute=function(F,T,$){ds||oh({});var ie=ld(F),ne=ld(T);return Y(ie,ne,$)},e.addHook=function(F,T){typeof T=="function"&&(re[F]=re[F]||[],rp(re[F],T))},e.removeHook=function(F){re[F]&&l2(re[F])},e.removeHooks=function(F){re[F]&&(re[F]=[])},e.removeAllHooks=function(){re={}},e}var va=VV();va.version;va.isSupported;const ace=va.sanitize;va.setConfig;va.clearConfig;va.isValidAttribute;const p2=va.addHook,m2=va.removeHook;va.removeHooks;va.removeAllHooks;let Ca;(function(){function r(e){Ca=e()}r.amd=!0,function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof r=="function"&&r.amd?r(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.marked=t())}(this,function(){function e(Q,G){for(var Y=0;Y<G.length;Y++){var A=G[Y];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(Q,A.key,A)}}function t(Q,G,Y){return G&&e(Q.prototype,G),Y&&e(Q,Y),Q}function i(Q,G){if(!!Q){if(typeof Q=="string")return n(Q,G);var Y=Object.prototype.toString.call(Q).slice(8,-1);if(Y==="Object"&&Q.constructor&&(Y=Q.constructor.name),Y==="Map"||Y==="Set")return Array.from(Q);if(Y==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Y))return n(Q,G)}}function n(Q,G){(G==null||G>Q.length)&&(G=Q.length);for(var Y=0,A=new Array(G);Y<G;Y++)A[Y]=Q[Y];return A}function s(Q,G){var Y=typeof Symbol!="undefined"&&Q[Symbol.iterator]||Q["@@iterator"];if(Y)return(Y=Y.call(Q)).next.bind(Y);if(Array.isArray(Q)||(Y=i(Q))||G&&Q&&typeof Q.length=="number"){Y&&(Q=Y);var A=0;return function(){return A>=Q.length?{done:!0}:{done:!1,value:Q[A++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o={exports:{}};function a(){return{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}}function l(Q){o.exports.defaults=Q}o.exports={defaults:a(),getDefaults:a,changeDefaults:l};var c=/[&<>"']/,d=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,h=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(G){return f[G]};function p(Q,G){if(G){if(c.test(Q))return Q.replace(d,g)}else if(u.test(Q))return Q.replace(h,g);return Q}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(Q){return Q.replace(_,function(G,Y){return Y=Y.toLowerCase(),Y==="colon"?":":Y.charAt(0)==="#"?Y.charAt(1)==="x"?String.fromCharCode(parseInt(Y.substring(2),16)):String.fromCharCode(+Y.substring(1)):""})}var b=/(^|[^\[])\^/g;function C(Q,G){Q=Q.source||Q,G=G||"";var Y={replace:function(P,F){return F=F.source||F,F=F.replace(b,"$1"),Q=Q.replace(P,F),Y},getRegex:function(){return new RegExp(Q,G)}};return Y}var y=/[^\w:]/g,E=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(Q,G,Y){if(Q){var A;try{A=decodeURIComponent(v(Y)).replace(y,"").toLowerCase()}catch{return null}if(A.indexOf("javascript:")===0||A.indexOf("vbscript:")===0||A.indexOf("data:")===0)return null}G&&!E.test(Y)&&(Y=B(G,Y));try{Y=encodeURI(Y).replace(/%25/g,"%")}catch{return null}return Y}var w={},x=/^[^:]+:\/*[^/]*$/,D=/^([^:]+:)[\s\S]*$/,M=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(Q,G){w[" "+Q]||(x.test(Q)?w[" "+Q]=Q+"/":w[" "+Q]=te(Q,"/",!0)),Q=w[" "+Q];var Y=Q.indexOf(":")===-1;return G.substring(0,2)==="//"?Y?G:Q.replace(D,"$1")+G:G.charAt(0)==="/"?Y?G:Q.replace(M,"$1")+G:Q+G}var z={exec:function(){}};function j(Q){for(var G=1,Y,A;G<arguments.length;G++){Y=arguments[G];for(A in Y)Object.prototype.hasOwnProperty.call(Y,A)&&(Q[A]=Y[A])}return Q}function re(Q,G){var Y=Q.replace(/\|/g,function(F,T,$){for(var ie=!1,ne=T;--ne>=0&&$[ne]==="\\";)ie=!ie;return ie?"|":" |"}),A=Y.split(/ \|/),P=0;if(A[0].trim()||A.shift(),A[A.length-1].trim()||A.pop(),A.length>G)A.splice(G);else for(;A.length<G;)A.push("");for(;P<A.length;P++)A[P]=A[P].trim().replace(/\\\|/g,"|");return A}function te(Q,G,Y){var A=Q.length;if(A===0)return"";for(var P=0;P<A;){var F=Q.charAt(A-P-1);if(F===G&&!Y)P++;else if(F!==G&&Y)P++;else break}return Q.substr(0,A-P)}function N(Q,G){if(Q.indexOf(G[1])===-1)return-1;for(var Y=Q.length,A=0,P=0;P<Y;P++)if(Q[P]==="\\")P++;else if(Q[P]===G[0])A++;else if(Q[P]===G[1]&&(A--,A<0))return P;return-1}function L(Q){Q&&Q.sanitize&&!Q.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function O(Q,G){if(G<1)return"";for(var Y="";G>1;)G&1&&(Y+=Q),G>>=1,Q+=Q;return Y+Q}var W={escape:p,unescape:v,edit:C,cleanUrl:S,resolveUrl:B,noopTest:z,merge:j,splitCells:re,rtrim:te,findClosingBracket:N,checkSanitizeDeprecation:L,repeatString:O},ge=o.exports.defaults,se=W.rtrim,ae=W.splitCells,Ce=W.escape,Le=W.findClosingBracket;function ct(Q,G,Y,A){var P=G.href,F=G.title?Ce(G.title):null,T=Q[1].replace(/\\([\[\]])/g,"$1");if(Q[0].charAt(0)!=="!"){A.state.inLink=!0;var $={type:"link",raw:Y,href:P,title:F,text:T,tokens:A.inlineTokens(T,[])};return A.state.inLink=!1,$}else return{type:"image",raw:Y,href:P,title:F,text:Ce(T)}}function bi(Q,G){var Y=Q.match(/^(\s+)(?:```)/);if(Y===null)return G;var A=Y[1];return G.split(` +`).map(function(P){var F=P.match(/^\s+/);if(F===null)return P;var T=F[0];return T.length>=A.length?P.slice(A.length):P}).join(` +`)}var Kt=function(){function Q(Y){this.options=Y||ge}var G=Q.prototype;return G.space=function(A){var P=this.rules.block.newline.exec(A);if(P)return P[0].length>1?{type:"space",raw:P[0]}:{raw:` +`}},G.code=function(A){var P=this.rules.block.code.exec(A);if(P){var F=P[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:P[0],codeBlockStyle:"indented",text:this.options.pedantic?F:se(F,` +`)}}},G.fences=function(A){var P=this.rules.block.fences.exec(A);if(P){var F=P[0],T=bi(F,P[3]||"");return{type:"code",raw:F,lang:P[2]?P[2].trim():P[2],text:T}}},G.heading=function(A){var P=this.rules.block.heading.exec(A);if(P){var F=P[2].trim();if(/#$/.test(F)){var T=se(F,"#");(this.options.pedantic||!T||/ $/.test(T))&&(F=T.trim())}var $={type:"heading",raw:P[0],depth:P[1].length,text:F,tokens:[]};return this.lexer.inline($.text,$.tokens),$}},G.hr=function(A){var P=this.rules.block.hr.exec(A);if(P)return{type:"hr",raw:P[0]}},G.blockquote=function(A){var P=this.rules.block.blockquote.exec(A);if(P){var F=P[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:P[0],tokens:this.lexer.blockTokens(F,[]),text:F}}},G.list=function(A){var P=this.rules.block.list.exec(A);if(P){var F,T,$,ie,ne,ye,Ve,je,Ke,nt,Pe=P[1].trim(),Wi=Pe.length>1,kt={type:"list",raw:"",ordered:Wi,start:Wi?+Pe.slice(0,-1):"",loose:!1,items:[]};Pe=Wi?"\\d{1,9}\\"+Pe.slice(-1):"\\"+Pe,this.options.pedantic&&(Pe=Wi?Pe:"[*+-]");for(var or=new RegExp("^( {0,3}"+Pe+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");A&&!(this.rules.block.hr.test(A)||!(P=or.exec(A)));){Ke=P[2].split(` +`),this.options.pedantic?(ie=2,nt=Ke[0].trimLeft()):(ie=P[2].search(/[^ ]/),ie=P[1].length+(ie>4?1:ie),nt=Ke[0].slice(ie-P[1].length)),ye=!1,F=P[0],!Ke[0]&&/^ *$/.test(Ke[1])&&(F=P[1]+Ke.slice(0,2).join(` +`)+` +`,kt.loose=!0,Ke=[]);var lh=new RegExp("^ {0,"+Math.min(3,ie-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(ne=1;ne<Ke.length;ne++){if(je=Ke[ne],this.options.pedantic&&(je=je.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),lh.test(je)){F=P[1]+Ke.slice(0,ne).join(` +`)+` +`;break}if(!ye){je.trim()||(ye=!0),je.search(/[^ ]/)>=ie?nt+=` +`+je.slice(ie):nt+=` +`+je;continue}if(je.search(/[^ ]/)>=ie||!je.trim()){nt+=` +`+je.slice(ie);continue}else{F=P[1]+Ke.slice(0,ne).join(` +`)+` +`;break}}kt.loose||(Ve?kt.loose=!0:/\n *\n *$/.test(F)&&(Ve=!0)),this.options.gfm&&(T=/^\[[ xX]\] /.exec(nt),T&&($=T[0]!=="[ ] ",nt=nt.replace(/^\[[ xX]\] +/,""))),kt.items.push({type:"list_item",raw:F,task:!!T,checked:$,loose:!1,text:nt}),kt.raw+=F,A=A.slice(F.length)}kt.items[kt.items.length-1].raw=F.trimRight(),kt.items[kt.items.length-1].text=nt.trimRight(),kt.raw=kt.raw.trimRight();var In=kt.items.length;for(ne=0;ne<In;ne++)this.lexer.state.top=!1,kt.items[ne].tokens=this.lexer.blockTokens(kt.items[ne].text,[]),kt.items[ne].tokens.some(function(Vg){return Vg.type==="space"})&&(kt.loose=!0,kt.items[ne].loose=!0);return kt}},G.html=function(A){var P=this.rules.block.html.exec(A);if(P){var F={type:"html",raw:P[0],pre:!this.options.sanitizer&&(P[1]==="pre"||P[1]==="script"||P[1]==="style"),text:P[0]};return this.options.sanitize&&(F.type="paragraph",F.text=this.options.sanitizer?this.options.sanitizer(P[0]):Ce(P[0]),F.tokens=[],this.lexer.inline(F.text,F.tokens)),F}},G.def=function(A){var P=this.rules.block.def.exec(A);if(P){P[3]&&(P[3]=P[3].substring(1,P[3].length-1));var F=P[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:F,raw:P[0],href:P[2],title:P[3]}}},G.table=function(A){var P=this.rules.block.table.exec(A);if(P){var F={type:"table",header:ae(P[1]).map(function(Ve){return{text:Ve}}),align:P[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:P[3]?P[3].replace(/\n$/,"").split(` +`):[]};if(F.header.length===F.align.length){F.raw=P[0];var T=F.align.length,$,ie,ne,ye;for($=0;$<T;$++)/^ *-+: *$/.test(F.align[$])?F.align[$]="right":/^ *:-+: *$/.test(F.align[$])?F.align[$]="center":/^ *:-+ *$/.test(F.align[$])?F.align[$]="left":F.align[$]=null;for(T=F.rows.length,$=0;$<T;$++)F.rows[$]=ae(F.rows[$],F.header.length).map(function(Ve){return{text:Ve}});for(T=F.header.length,ie=0;ie<T;ie++)F.header[ie].tokens=[],this.lexer.inlineTokens(F.header[ie].text,F.header[ie].tokens);for(T=F.rows.length,ie=0;ie<T;ie++)for(ye=F.rows[ie],ne=0;ne<ye.length;ne++)ye[ne].tokens=[],this.lexer.inlineTokens(ye[ne].text,ye[ne].tokens);return F}}},G.lheading=function(A){var P=this.rules.block.lheading.exec(A);if(P){var F={type:"heading",raw:P[0],depth:P[2].charAt(0)==="="?1:2,text:P[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},G.paragraph=function(A){var P=this.rules.block.paragraph.exec(A);if(P){var F={type:"paragraph",raw:P[0],text:P[1].charAt(P[1].length-1)===` +`?P[1].slice(0,-1):P[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},G.text=function(A){var P=this.rules.block.text.exec(A);if(P){var F={type:"text",raw:P[0],text:P[0],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},G.escape=function(A){var P=this.rules.inline.escape.exec(A);if(P)return{type:"escape",raw:P[0],text:Ce(P[1])}},G.tag=function(A){var P=this.rules.inline.tag.exec(A);if(P)return!this.lexer.state.inLink&&/^<a /i.test(P[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(P[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(P[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(P[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:P[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(P[0]):Ce(P[0]):P[0]}},G.link=function(A){var P=this.rules.inline.link.exec(A);if(P){var F=P[2].trim();if(!this.options.pedantic&&/^</.test(F)){if(!/>$/.test(F))return;var T=se(F.slice(0,-1),"\\");if((F.length-T.length)%2===0)return}else{var $=Le(P[2],"()");if($>-1){var ie=P[0].indexOf("!")===0?5:4,ne=ie+P[1].length+$;P[2]=P[2].substring(0,$),P[0]=P[0].substring(0,ne).trim(),P[3]=""}}var ye=P[2],Ve="";if(this.options.pedantic){var je=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ye);je&&(ye=je[1],Ve=je[3])}else Ve=P[3]?P[3].slice(1,-1):"";return ye=ye.trim(),/^</.test(ye)&&(this.options.pedantic&&!/>$/.test(F)?ye=ye.slice(1):ye=ye.slice(1,-1)),ct(P,{href:ye&&ye.replace(this.rules.inline._escapes,"$1"),title:Ve&&Ve.replace(this.rules.inline._escapes,"$1")},P[0],this.lexer)}},G.reflink=function(A,P){var F;if((F=this.rules.inline.reflink.exec(A))||(F=this.rules.inline.nolink.exec(A))){var T=(F[2]||F[1]).replace(/\s+/g," ");if(T=P[T.toLowerCase()],!T||!T.href){var $=F[0].charAt(0);return{type:"text",raw:$,text:$}}return ct(F,T,F[0],this.lexer)}},G.emStrong=function(A,P,F){F===void 0&&(F="");var T=this.rules.inline.emStrong.lDelim.exec(A);if(!!T&&!(T[3]&&F.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\u08A0-\u08B4\u08B6-\u08C7\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\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\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-\u170C\u170E-\u1711\u1720-\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-\u1B4B\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\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\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\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\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\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]|\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\uDEC0-\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]|[\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\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]|\uD82C[\uDC00-\uDD1E\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\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-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var $=T[1]||T[2]||"";if(!$||$&&(F===""||this.rules.inline.punctuation.exec(F))){var ie=T[0].length-1,ne,ye,Ve=ie,je=0,Ke=T[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ke.lastIndex=0,P=P.slice(-1*A.length+ie);(T=Ke.exec(P))!=null;)if(ne=T[1]||T[2]||T[3]||T[4]||T[5]||T[6],!!ne){if(ye=ne.length,T[3]||T[4]){Ve+=ye;continue}else if((T[5]||T[6])&&ie%3&&!((ie+ye)%3)){je+=ye;continue}if(Ve-=ye,!(Ve>0)){if(ye=Math.min(ye,ye+Ve+je),Math.min(ie,ye)%2){var nt=A.slice(1,ie+T.index+ye);return{type:"em",raw:A.slice(0,ie+T.index+ye+1),text:nt,tokens:this.lexer.inlineTokens(nt,[])}}var Pe=A.slice(2,ie+T.index+ye-1);return{type:"strong",raw:A.slice(0,ie+T.index+ye+1),text:Pe,tokens:this.lexer.inlineTokens(Pe,[])}}}}}},G.codespan=function(A){var P=this.rules.inline.code.exec(A);if(P){var F=P[2].replace(/\n/g," "),T=/[^ ]/.test(F),$=/^ /.test(F)&&/ $/.test(F);return T&&$&&(F=F.substring(1,F.length-1)),F=Ce(F,!0),{type:"codespan",raw:P[0],text:F}}},G.br=function(A){var P=this.rules.inline.br.exec(A);if(P)return{type:"br",raw:P[0]}},G.del=function(A){var P=this.rules.inline.del.exec(A);if(P)return{type:"del",raw:P[0],text:P[2],tokens:this.lexer.inlineTokens(P[2],[])}},G.autolink=function(A,P){var F=this.rules.inline.autolink.exec(A);if(F){var T,$;return F[2]==="@"?(T=Ce(this.options.mangle?P(F[1]):F[1]),$="mailto:"+T):(T=Ce(F[1]),$=T),{type:"link",raw:F[0],text:T,href:$,tokens:[{type:"text",raw:T,text:T}]}}},G.url=function(A,P){var F;if(F=this.rules.inline.url.exec(A)){var T,$;if(F[2]==="@")T=Ce(this.options.mangle?P(F[0]):F[0]),$="mailto:"+T;else{var ie;do ie=F[0],F[0]=this.rules.inline._backpedal.exec(F[0])[0];while(ie!==F[0]);T=Ce(F[0]),F[1]==="www."?$="http://"+T:$=T}return{type:"link",raw:F[0],text:T,href:$,tokens:[{type:"text",raw:T,text:T}]}}},G.inlineText=function(A,P){var F=this.rules.inline.text.exec(A);if(F){var T;return this.lexer.state.inRawBlock?T=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(F[0]):Ce(F[0]):F[0]:T=Ce(this.options.smartypants?P(F[0]):F[0]),{type:"text",raw:F[0],text:T}}},Q}(),Bs=W.noopTest,Xt=W.edit,wo=W.merge,Qe={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}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:Bs,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Qe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Qe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Qe.def=Xt(Qe.def).replace("label",Qe._label).replace("title",Qe._title).getRegex(),Qe.bullet=/(?:[*+-]|\d{1,9}[.)])/,Qe.listItemStart=Xt(/^( *)(bull) */).replace("bull",Qe.bullet).getRegex(),Qe.list=Xt(Qe.list).replace(/bull/g,Qe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Qe.def.source+")").getRegex(),Qe._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",Qe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Qe.html=Xt(Qe.html,"i").replace("comment",Qe._comment).replace("tag",Qe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qe.paragraph=Xt(Qe._paragraph).replace("hr",Qe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qe._tag).getRegex(),Qe.blockquote=Xt(Qe.blockquote).replace("paragraph",Qe.paragraph).getRegex(),Qe.normal=wo({},Qe),Qe.gfm=wo({},Qe.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Qe.gfm.table=Xt(Qe.gfm.table).replace("hr",Qe.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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qe._tag).getRegex(),Qe.pedantic=wo({},Qe.normal,{html:Xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qe._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Bs,paragraph:Xt(Qe.normal._paragraph).replace("hr",Qe.hr).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",Qe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Oe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Bs,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,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:Bs,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Oe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Oe.punctuation=Xt(Oe.punctuation).replace(/punctuation/g,Oe._punctuation).getRegex(),Oe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Oe.escapedEmSt=/\\\*|\\_/g,Oe._comment=Xt(Qe._comment).replace("(?:-->|$)","-->").getRegex(),Oe.emStrong.lDelim=Xt(Oe.emStrong.lDelim).replace(/punct/g,Oe._punctuation).getRegex(),Oe.emStrong.rDelimAst=Xt(Oe.emStrong.rDelimAst,"g").replace(/punct/g,Oe._punctuation).getRegex(),Oe.emStrong.rDelimUnd=Xt(Oe.emStrong.rDelimUnd,"g").replace(/punct/g,Oe._punctuation).getRegex(),Oe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Oe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Oe._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])?)+(?![-_])/,Oe.autolink=Xt(Oe.autolink).replace("scheme",Oe._scheme).replace("email",Oe._email).getRegex(),Oe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Oe.tag=Xt(Oe.tag).replace("comment",Oe._comment).replace("attribute",Oe._attribute).getRegex(),Oe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Oe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Oe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Oe.link=Xt(Oe.link).replace("label",Oe._label).replace("href",Oe._href).replace("title",Oe._title).getRegex(),Oe.reflink=Xt(Oe.reflink).replace("label",Oe._label).getRegex(),Oe.reflinkSearch=Xt(Oe.reflinkSearch,"g").replace("reflink",Oe.reflink).replace("nolink",Oe.nolink).getRegex(),Oe.normal=wo({},Oe),Oe.pedantic=wo({},Oe.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:Xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Oe._label).getRegex(),reflink:Xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Oe._label).getRegex()}),Oe.gfm=wo({},Oe.normal,{escape:Xt(Oe.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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Oe.gfm.url=Xt(Oe.gfm.url,"i").replace("email",Oe.gfm._extended_email).getRegex(),Oe.breaks=wo({},Oe.gfm,{br:Xt(Oe.br).replace("{2,}","*").getRegex(),text:Xt(Oe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var ih={block:Qe,inline:Oe},Rg=Kt,Cl=o.exports.defaults,ya=ih.block,wl=ih.inline,Gc=W.repeatString;function _b(Q){return Q.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function nh(Q){var G="",Y,A,P=Q.length;for(Y=0;Y<P;Y++)A=Q.charCodeAt(Y),Math.random()>.5&&(A="x"+A.toString(16)),G+="&#"+A+";";return G}var Kc=function(){function Q(Y){this.tokens=[],this.tokens.links=Object.create(null),this.options=Y||Cl,this.options.tokenizer=this.options.tokenizer||new Rg,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var A={block:ya.normal,inline:wl.normal};this.options.pedantic?(A.block=ya.pedantic,A.inline=wl.pedantic):this.options.gfm&&(A.block=ya.gfm,this.options.breaks?A.inline=wl.breaks:A.inline=wl.gfm),this.tokenizer.rules=A}Q.lex=function(A,P){var F=new Q(P);return F.lex(A)},Q.lexInline=function(A,P){var F=new Q(P);return F.inlineTokens(A)};var G=Q.prototype;return G.lex=function(A){A=A.replace(/\r\n|\r/g,` +`).replace(/\t/g," "),this.blockTokens(A,this.tokens);for(var P;P=this.inlineQueue.shift();)this.inlineTokens(P.src,P.tokens);return this.tokens},G.blockTokens=function(A,P){var F=this;P===void 0&&(P=[]),this.options.pedantic&&(A=A.replace(/^ +$/gm,""));for(var T,$,ie,ne;A;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(Ve){return(T=Ve.call({lexer:F},A,P))?(A=A.substring(T.raw.length),P.push(T),!0):!1}))){if(T=this.tokenizer.space(A)){A=A.substring(T.raw.length),T.type&&P.push(T);continue}if(T=this.tokenizer.code(A)){A=A.substring(T.raw.length),$=P[P.length-1],$&&($.type==="paragraph"||$.type==="text")?($.raw+=` +`+T.raw,$.text+=` +`+T.text,this.inlineQueue[this.inlineQueue.length-1].src=$.text):P.push(T);continue}if(T=this.tokenizer.fences(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.heading(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.hr(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.blockquote(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.list(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.html(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.def(A)){A=A.substring(T.raw.length),$=P[P.length-1],$&&($.type==="paragraph"||$.type==="text")?($.raw+=` +`+T.raw,$.text+=` +`+T.raw,this.inlineQueue[this.inlineQueue.length-1].src=$.text):this.tokens.links[T.tag]||(this.tokens.links[T.tag]={href:T.href,title:T.title});continue}if(T=this.tokenizer.table(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.lheading(A)){A=A.substring(T.raw.length),P.push(T);continue}if(ie=A,this.options.extensions&&this.options.extensions.startBlock&&function(){var Ve=1/0,je=A.slice(1),Ke=void 0;F.options.extensions.startBlock.forEach(function(nt){Ke=nt.call({lexer:this},je),typeof Ke=="number"&&Ke>=0&&(Ve=Math.min(Ve,Ke))}),Ve<1/0&&Ve>=0&&(ie=A.substring(0,Ve+1))}(),this.state.top&&(T=this.tokenizer.paragraph(ie))){$=P[P.length-1],ne&&$.type==="paragraph"?($.raw+=` +`+T.raw,$.text+=` +`+T.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=$.text):P.push(T),ne=ie.length!==A.length,A=A.substring(T.raw.length);continue}if(T=this.tokenizer.text(A)){A=A.substring(T.raw.length),$=P[P.length-1],$&&$.type==="text"?($.raw+=` +`+T.raw,$.text+=` +`+T.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=$.text):P.push(T);continue}if(A){var ye="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(ye);break}else throw new Error(ye)}}return this.state.top=!0,P},G.inline=function(A,P){this.inlineQueue.push({src:A,tokens:P})},G.inlineTokens=function(A,P){var F=this;P===void 0&&(P=[]);var T,$,ie,ne=A,ye,Ve,je;if(this.tokens.links){var Ke=Object.keys(this.tokens.links);if(Ke.length>0)for(;(ye=this.tokenizer.rules.inline.reflinkSearch.exec(ne))!=null;)Ke.includes(ye[0].slice(ye[0].lastIndexOf("[")+1,-1))&&(ne=ne.slice(0,ye.index)+"["+Gc("a",ye[0].length-2)+"]"+ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ye=this.tokenizer.rules.inline.blockSkip.exec(ne))!=null;)ne=ne.slice(0,ye.index)+"["+Gc("a",ye[0].length-2)+"]"+ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ye=this.tokenizer.rules.inline.escapedEmSt.exec(ne))!=null;)ne=ne.slice(0,ye.index)+"++"+ne.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;A;)if(Ve||(je=""),Ve=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Pe){return(T=Pe.call({lexer:F},A,P))?(A=A.substring(T.raw.length),P.push(T),!0):!1}))){if(T=this.tokenizer.escape(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.tag(A)){A=A.substring(T.raw.length),$=P[P.length-1],$&&T.type==="text"&&$.type==="text"?($.raw+=T.raw,$.text+=T.text):P.push(T);continue}if(T=this.tokenizer.link(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.reflink(A,this.tokens.links)){A=A.substring(T.raw.length),$=P[P.length-1],$&&T.type==="text"&&$.type==="text"?($.raw+=T.raw,$.text+=T.text):P.push(T);continue}if(T=this.tokenizer.emStrong(A,ne,je)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.codespan(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.br(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.del(A)){A=A.substring(T.raw.length),P.push(T);continue}if(T=this.tokenizer.autolink(A,nh)){A=A.substring(T.raw.length),P.push(T);continue}if(!this.state.inLink&&(T=this.tokenizer.url(A,nh))){A=A.substring(T.raw.length),P.push(T);continue}if(ie=A,this.options.extensions&&this.options.extensions.startInline&&function(){var Pe=1/0,Wi=A.slice(1),kt=void 0;F.options.extensions.startInline.forEach(function(or){kt=or.call({lexer:this},Wi),typeof kt=="number"&&kt>=0&&(Pe=Math.min(Pe,kt))}),Pe<1/0&&Pe>=0&&(ie=A.substring(0,Pe+1))}(),T=this.tokenizer.inlineText(ie,_b)){A=A.substring(T.raw.length),T.raw.slice(-1)!=="_"&&(je=T.raw.slice(-1)),Ve=!0,$=P[P.length-1],$&&$.type==="text"?($.raw+=T.raw,$.text+=T.text):P.push(T);continue}if(A){var nt="Infinite loop on byte: "+A.charCodeAt(0);if(this.options.silent){console.error(nt);break}else throw new Error(nt)}}return P},t(Q,null,[{key:"rules",get:function(){return{block:ya,inline:wl}}}]),Q}(),yl=o.exports.defaults,Sa=W.cleanUrl,Yc=W.escape,Og=function(){function Q(Y){this.options=Y||yl}var G=Q.prototype;return G.code=function(A,P,F){var T=(P||"").match(/\S*/)[0];if(this.options.highlight){var $=this.options.highlight(A,T);$!=null&&$!==A&&(F=!0,A=$)}return A=A.replace(/\n$/,"")+` +`,T?'<pre><code class="'+this.options.langPrefix+Yc(T,!0)+'">'+(F?A:Yc(A,!0))+`</code></pre> +`:"<pre><code>"+(F?A:Yc(A,!0))+`</code></pre> +`},G.blockquote=function(A){return`<blockquote> +`+A+`</blockquote> +`},G.html=function(A){return A},G.heading=function(A,P,F,T){return this.options.headerIds?"<h"+P+' id="'+this.options.headerPrefix+T.slug(F)+'">'+A+"</h"+P+`> +`:"<h"+P+">"+A+"</h"+P+`> +`},G.hr=function(){return this.options.xhtml?`<hr/> +`:`<hr> +`},G.list=function(A,P,F){var T=P?"ol":"ul",$=P&&F!==1?' start="'+F+'"':"";return"<"+T+$+`> +`+A+"</"+T+`> +`},G.listitem=function(A){return"<li>"+A+`</li> +`},G.checkbox=function(A){return"<input "+(A?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},G.paragraph=function(A){return"<p>"+A+`</p> +`},G.table=function(A,P){return P&&(P="<tbody>"+P+"</tbody>"),`<table> +<thead> +`+A+`</thead> +`+P+`</table> +`},G.tablerow=function(A){return`<tr> +`+A+`</tr> +`},G.tablecell=function(A,P){var F=P.header?"th":"td",T=P.align?"<"+F+' align="'+P.align+'">':"<"+F+">";return T+A+"</"+F+`> +`},G.strong=function(A){return"<strong>"+A+"</strong>"},G.em=function(A){return"<em>"+A+"</em>"},G.codespan=function(A){return"<code>"+A+"</code>"},G.br=function(){return this.options.xhtml?"<br/>":"<br>"},G.del=function(A){return"<del>"+A+"</del>"},G.link=function(A,P,F){if(A=Sa(this.options.sanitize,this.options.baseUrl,A),A===null)return F;var T='<a href="'+Yc(A)+'"';return P&&(T+=' title="'+P+'"'),T+=">"+F+"</a>",T},G.image=function(A,P,F){if(A=Sa(this.options.sanitize,this.options.baseUrl,A),A===null)return F;var T='<img src="'+A+'" alt="'+F+'"';return P&&(T+=' title="'+P+'"'),T+=this.options.xhtml?"/>":">",T},G.text=function(A){return A},Q}(),Mg=function(){function Q(){}var G=Q.prototype;return G.strong=function(A){return A},G.em=function(A){return A},G.codespan=function(A){return A},G.del=function(A){return A},G.html=function(A){return A},G.text=function(A){return A},G.link=function(A,P,F){return""+F},G.image=function(A,P,F){return""+F},G.br=function(){return""},Q}(),rh=function(){function Q(){this.seen={}}var G=Q.prototype;return G.serialize=function(A){return A.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},G.getNextSafeSlug=function(A,P){var F=A,T=0;if(this.seen.hasOwnProperty(F)){T=this.seen[A];do T++,F=A+"-"+T;while(this.seen.hasOwnProperty(F))}return P||(this.seen[A]=T,this.seen[F]=0),F},G.slug=function(A,P){P===void 0&&(P={});var F=this.serialize(A);return this.getNextSafeSlug(F,P.dryrun)},Q}(),bb=Og,Pg=Mg,Fg=rh,yo=o.exports.defaults,sh=W.unescape,Bg=function(){function Q(Y){this.options=Y||yo,this.options.renderer=this.options.renderer||new bb,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Pg,this.slugger=new Fg}Q.parse=function(A,P){var F=new Q(P);return F.parse(A)},Q.parseInline=function(A,P){var F=new Q(P);return F.parseInline(A)};var G=Q.prototype;return G.parse=function(A,P){P===void 0&&(P=!0);var F="",T,$,ie,ne,ye,Ve,je,Ke,nt,Pe,Wi,kt,or,lh,In,Vg,_R,Hg,WS,bR=A.length;for(T=0;T<bR;T++){if(Pe=A[T],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Pe.type]&&(WS=this.options.extensions.renderers[Pe.type].call({parser:this},Pe),WS!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Pe.type))){F+=WS||"";continue}switch(Pe.type){case"space":continue;case"hr":{F+=this.renderer.hr();continue}case"heading":{F+=this.renderer.heading(this.parseInline(Pe.tokens),Pe.depth,sh(this.parseInline(Pe.tokens,this.textRenderer)),this.slugger);continue}case"code":{F+=this.renderer.code(Pe.text,Pe.lang,Pe.escaped);continue}case"table":{for(Ke="",je="",ne=Pe.header.length,$=0;$<ne;$++)je+=this.renderer.tablecell(this.parseInline(Pe.header[$].tokens),{header:!0,align:Pe.align[$]});for(Ke+=this.renderer.tablerow(je),nt="",ne=Pe.rows.length,$=0;$<ne;$++){for(Ve=Pe.rows[$],je="",ye=Ve.length,ie=0;ie<ye;ie++)je+=this.renderer.tablecell(this.parseInline(Ve[ie].tokens),{header:!1,align:Pe.align[ie]});nt+=this.renderer.tablerow(je)}F+=this.renderer.table(Ke,nt);continue}case"blockquote":{nt=this.parse(Pe.tokens),F+=this.renderer.blockquote(nt);continue}case"list":{for(Wi=Pe.ordered,kt=Pe.start,or=Pe.loose,ne=Pe.items.length,nt="",$=0;$<ne;$++)In=Pe.items[$],Vg=In.checked,_R=In.task,lh="",In.task&&(Hg=this.renderer.checkbox(Vg),or?In.tokens.length>0&&In.tokens[0].type==="paragraph"?(In.tokens[0].text=Hg+" "+In.tokens[0].text,In.tokens[0].tokens&&In.tokens[0].tokens.length>0&&In.tokens[0].tokens[0].type==="text"&&(In.tokens[0].tokens[0].text=Hg+" "+In.tokens[0].tokens[0].text)):In.tokens.unshift({type:"text",text:Hg}):lh+=Hg),lh+=this.parse(In.tokens,or),nt+=this.renderer.listitem(lh,_R,Vg);F+=this.renderer.list(nt,Wi,kt);continue}case"html":{F+=this.renderer.html(Pe.text);continue}case"paragraph":{F+=this.renderer.paragraph(this.parseInline(Pe.tokens));continue}case"text":{for(nt=Pe.tokens?this.parseInline(Pe.tokens):Pe.text;T+1<bR&&A[T+1].type==="text";)Pe=A[++T],nt+=` +`+(Pe.tokens?this.parseInline(Pe.tokens):Pe.text);F+=P?this.renderer.paragraph(nt):nt;continue}default:{var vR='Token with "'+Pe.type+'" type was not found.';if(this.options.silent){console.error(vR);return}else throw new Error(vR)}}}return F},G.parseInline=function(A,P){P=P||this.renderer;var F="",T,$,ie,ne=A.length;for(T=0;T<ne;T++){if($=A[T],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[$.type]&&(ie=this.options.extensions.renderers[$.type].call({parser:this},$),ie!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes($.type))){F+=ie||"";continue}switch($.type){case"escape":{F+=P.text($.text);break}case"html":{F+=P.html($.text);break}case"link":{F+=P.link($.href,$.title,this.parseInline($.tokens,P));break}case"image":{F+=P.image($.href,$.title,$.text);break}case"strong":{F+=P.strong(this.parseInline($.tokens,P));break}case"em":{F+=P.em(this.parseInline($.tokens,P));break}case"codespan":{F+=P.codespan($.text);break}case"br":{F+=P.br();break}case"del":{F+=P.del(this.parseInline($.tokens,P));break}case"text":{F+=P.text($.text);break}default:{var ye='Token with "'+$.type+'" type was not found.';if(this.options.silent){console.error(ye);return}else throw new Error(ye)}}}return F},Q}(),ds=Kc,Zc=Bg,oh=Kt,Wg=Og,vb=Mg,ah=rh,Sl=W.merge,Cb=W.checkSanitizeDeprecation,us=W.escape,wb=o.exports.getDefaults,yb=o.exports.changeDefaults,Sb=o.exports.defaults;function pt(Q,G,Y){if(typeof Q=="undefined"||Q===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Q!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Q)+", string expected");if(typeof G=="function"&&(Y=G,G=null),G=Sl({},pt.defaults,G||{}),Cb(G),Y){var A=G.highlight,P;try{P=ds.lex(Q,G)}catch(ie){return Y(ie)}var F=function(ne){var ye;if(!ne)try{G.walkTokens&&pt.walkTokens(P,G.walkTokens),ye=Zc.parse(P,G)}catch(Ve){ne=Ve}return G.highlight=A,ne?Y(ne):Y(null,ye)};if(!A||A.length<3||(delete G.highlight,!P.length))return F();var T=0;pt.walkTokens(P,function(ie){ie.type==="code"&&(T++,setTimeout(function(){A(ie.text,ie.lang,function(ne,ye){if(ne)return F(ne);ye!=null&&ye!==ie.text&&(ie.text=ye,ie.escaped=!0),T--,T===0&&F()})},0))}),T===0&&F();return}try{var $=ds.lex(Q,G);return G.walkTokens&&pt.walkTokens($,G.walkTokens),Zc.parse($,G)}catch(ie){if(ie.message+=` +Please report this to https://github.com/markedjs/marked.`,G.silent)return"<p>An error occurred:</p><pre>"+us(ie.message+"",!0)+"</pre>";throw ie}}pt.options=pt.setOptions=function(Q){return Sl(pt.defaults,Q),yb(pt.defaults),pt},pt.getDefaults=wb,pt.defaults=Sb,pt.use=function(){for(var Q=this,G=arguments.length,Y=new Array(G),A=0;A<G;A++)Y[A]=arguments[A];var P=Sl.apply(void 0,[{}].concat(Y)),F=pt.defaults.extensions||{renderers:{},childTokens:{}},T;Y.forEach(function($){if($.extensions&&(T=!0,$.extensions.forEach(function(ne){if(!ne.name)throw new Error("extension name required");if(ne.renderer){var ye=F.renderers?F.renderers[ne.name]:null;ye?F.renderers[ne.name]=function(){for(var Ve=arguments.length,je=new Array(Ve),Ke=0;Ke<Ve;Ke++)je[Ke]=arguments[Ke];var nt=ne.renderer.apply(this,je);return nt===!1&&(nt=ye.apply(this,je)),nt}:F.renderers[ne.name]=ne.renderer}if(ne.tokenizer){if(!ne.level||ne.level!=="block"&&ne.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");F[ne.level]?F[ne.level].unshift(ne.tokenizer):F[ne.level]=[ne.tokenizer],ne.start&&(ne.level==="block"?F.startBlock?F.startBlock.push(ne.start):F.startBlock=[ne.start]:ne.level==="inline"&&(F.startInline?F.startInline.push(ne.start):F.startInline=[ne.start]))}ne.childTokens&&(F.childTokens[ne.name]=ne.childTokens)})),$.renderer&&function(){var ne=pt.defaults.renderer||new Wg,ye=function(Ke){var nt=ne[Ke];ne[Ke]=function(){for(var Pe=arguments.length,Wi=new Array(Pe),kt=0;kt<Pe;kt++)Wi[kt]=arguments[kt];var or=$.renderer[Ke].apply(ne,Wi);return or===!1&&(or=nt.apply(ne,Wi)),or}};for(var Ve in $.renderer)ye(Ve);P.renderer=ne}(),$.tokenizer&&function(){var ne=pt.defaults.tokenizer||new oh,ye=function(Ke){var nt=ne[Ke];ne[Ke]=function(){for(var Pe=arguments.length,Wi=new Array(Pe),kt=0;kt<Pe;kt++)Wi[kt]=arguments[kt];var or=$.tokenizer[Ke].apply(ne,Wi);return or===!1&&(or=nt.apply(ne,Wi)),or}};for(var Ve in $.tokenizer)ye(Ve);P.tokenizer=ne}(),$.walkTokens){var ie=pt.defaults.walkTokens;P.walkTokens=function(ne){$.walkTokens.call(Q,ne),ie&&ie(ne)}}T&&(P.extensions=F),pt.setOptions(P)})},pt.walkTokens=function(Q,G){for(var Y=function(){var T=P.value;switch(G(T),T.type){case"table":{for(var $=s(T.header),ie;!(ie=$()).done;){var ne=ie.value;pt.walkTokens(ne.tokens,G)}for(var ye=s(T.rows),Ve;!(Ve=ye()).done;)for(var je=Ve.value,Ke=s(je),nt;!(nt=Ke()).done;){var Pe=nt.value;pt.walkTokens(Pe.tokens,G)}break}case"list":{pt.walkTokens(T.items,G);break}default:pt.defaults.extensions&&pt.defaults.extensions.childTokens&&pt.defaults.extensions.childTokens[T.type]?pt.defaults.extensions.childTokens[T.type].forEach(function(Wi){pt.walkTokens(T[Wi],G)}):T.tokens&&pt.walkTokens(T.tokens,G)}},A=s(Q),P;!(P=A()).done;)Y()},pt.parseInline=function(Q,G){if(typeof Q=="undefined"||Q===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Q!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Q)+", string expected");G=Sl({},pt.defaults,G||{}),Cb(G);try{var Y=ds.lexInline(Q,G);return G.walkTokens&&pt.walkTokens(Y,G.walkTokens),Zc.parseInline(Y,G)}catch(A){if(A.message+=` +Please report this to https://github.com/markedjs/marked.`,G.silent)return"<p>An error occurred:</p><pre>"+us(A.message+"",!0)+"</pre>";throw A}},pt.Parser=Zc,pt.parser=Zc.parse,pt.Renderer=Wg,pt.TextRenderer=vb,pt.Lexer=ds,pt.lexer=ds.lex,pt.Tokenizer=oh,pt.Slugger=ah,pt.parse=pt;var Xc=pt;return Xc})})();Ca.Parser;Ca.parser;var lce=Ca.Renderer;Ca.TextRenderer;Ca.Lexer;Ca.lexer;Ca.Tokenizer;Ca.Slugger;var cce=Ca.parse;function dce(r,e={},t={}){var i;const n=new ue;let s=!1;const o=n.add(new Hn),a=vN(e),l=function(p){let _;try{_=Rk(decodeURIComponent(p))}catch{}return _?(_=nq(_,v=>{if(r.uris&&r.uris[v])return De.revive(r.uris[v])}),encodeURIComponent(JSON.stringify(_))):p},c=function(p,_){const v=r.uris&&r.uris[p];if(!v)return p;let b=De.revive(v);return _?p.startsWith(Ye.data+":")?p:e3.asBrowserUri(b).toString(!0):De.parse(p).toString()===b.toString()?p:(b.query&&(b=b.with({query:l(b.query)})),b.toString())};let d;const u=new Promise(p=>d=p),h=new lce;if(h.image=(p,_,v)=>{let b=[],C=[];if(p){({href:p,dimensions:b}=Hre(p)),p=c(p,!0);try{const y=De.parse(p);e.baseUrl&&y.scheme===Ye.file&&(p=ZR(e.baseUrl,p).toString())}catch{}C.push(`src="${p}"`)}return v&&C.push(`alt="${v}"`),_&&C.push(`title="${_}"`),b.length&&(C=C.concat(b)),"<img "+C.join(" ")+">"},h.link=(p,_,v)=>(p===v&&(v=wx(v)),p=c(p,!1),e.baseUrl&&(/^\w[\w\d+.-]*:/.test(p)||(p=ZR(e.baseUrl,p).toString())),_=wx(_),p=wx(p),!p||p.match(/^data:|javascript:/i)||p.match(/^command:/i)&&!r.isTrusted||p.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?v:(p=p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="#" data-href="${p}" title="${_||p}">${v}</a>`)),h.paragraph=p=>(r.supportThemeIcons&&(p=Kd(p).map(v=>typeof v=="string"?v:v.outerHTML).join("")),`<p>${p}</p>`),e.codeBlockRenderer&&(h.code=(p,_)=>{const v=e.codeBlockRenderer(_,p),b=k6.nextId();return dD(Promise.all([v,u]),o.token).then(C=>{var y;if(!s&&C){const E=a.querySelector(`div[data-code="${b}"]`);E&&_c(E,C[0]),(y=e.asyncRenderCallback)===null||y===void 0||y.call(e)}}).catch(()=>{}),`<div class="code" data-code="${b}">${mD(p)}</div>`}),e.actionHandler){const p=e.actionHandler.disposables.add(new Mt(a,"click")),_=e.actionHandler.disposables.add(new Mt(a,"auxclick"));e.actionHandler.disposables.add(ke.any(p.event,_.event)(v=>{const b=new Zr(v);if(!b.leftButton&&!b.middleButton)return;let C=b.target;if(!(C.tagName!=="A"&&(C=C.parentElement,!C||C.tagName!=="A")))try{const y=C.dataset.href;y&&e.actionHandler.callback(y,b)}catch(y){Fe(y)}finally{b.preventDefault()}}))}r.supportHtml||(t.sanitizer=p=>(r.isTrusted?p.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?p:"",t.sanitize=!0,t.silent=!0),t.renderer=h;let f=(i=r.value)!==null&&i!==void 0?i:"";f.length>1e5&&(f=`${f.substr(0,1e5)}\u2026`),r.supportThemeIcons&&(f=qie(f));const g=cce(f,t);if(a.innerHTML=uce(r,g),d(),e.asyncRenderCallback)for(const p of a.getElementsByTagName("img")){const _=n.add(J(p,"load",()=>{_.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{s=!0,o.cancel(),n.dispose()}}}function uce(r,e){const{config:t,allowedSchemes:i}=hce(r);p2("uponSanitizeAttribute",(s,o)=>{if(o.attrName==="style"||o.attrName==="class"){if(s.tagName==="SPAN"){if(o.attrName==="style"){o.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(o.attrValue);return}else if(o.attrName==="class"){o.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(o.attrValue);return}}o.keepAttr=!1;return}});const n=document.createElement("a");p2("afterSanitizeAttributes",s=>{for(const o of["href","src"])s.hasAttribute(o)&&(n.href=s.getAttribute(o),i.includes(n.protocol.replace(/:$/,""))||s.removeAttribute(o))});try{return ace(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{m2("uponSanitizeAttribute"),m2("afterSanitizeAttributes")}}function hce(r){const e=[Ye.http,Ye.https,Ye.mailto,Ye.data,Ye.file,Ye.vscodeFileResource,Ye.vscodeRemote,Ye.vscodeRemoteResource];return r.isTrusted&&e.push(Ye.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}var fce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_2=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},gce=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},jx;let Ac=class HV{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new H,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new ue;return{element:n.add(dce(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(i,n)=>gce(this,void 0,void 0,function*(){var s,o,a,l;let c;i?c=this._modeService.getModeIdForLanguageName(i):this._options.editor&&(c=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageIdentifier().language),c||(c="plaintext"),this._modeService.triggerMode(c);const d=(o=yield Qt.getPromise(c))!==null&&o!==void 0?o:void 0,u=document.createElement("span");u.innerHTML=(l=(a=HV._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(n,d))!==null&&l!==void 0?l:x8(n,d);let h=this._options.codeBlockFontFamily;return this._options.editor&&(h=this._options.editor.getOption(43).fontFamily),h&&(u.style.fontFamily=h),u}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>this._openerService.open(i,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:e.isTrusted}).catch(Fe),disposables:t}}}};Ac._ttpTokenizer=(jx=window.trustedTypes)===null||jx===void 0?void 0:jx.createPolicy("tokenizeToString",{createHTML(r,e){return x8(r,e)}});Ac=fce([_2(1,Fs),_2(2,co)],Ac);function $V(r,e,t){const n=Sm.ordered(r).map(s=>Promise.resolve(s.provideHover(r,e,t)).then(o=>o&&pce(o)?o:void 0,o=>{Yi(o)}));return Promise.all(n).then(Ou)}pa("_executeHoverProvider",(r,e)=>$V(r,e,it.None));function pce(r){const e=typeof r.range!="undefined",t=typeof r.contents!="undefined"&&r.contents&&r.contents.length>0;return e&&t}var mce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qx=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},_ce=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const b2=oe;class pv{constructor(e,t,i){this.owner=e,this.range=t,this.contents=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let RT=class{constructor(e,t,i,n,s){this._editor=e,this._hover=t,this._modeService=i,this._openerService=n,this._configurationService=s}createLoadingMessage(e){return new pv(this,e.range,[new gl().appendText(m("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const c of t){const d=c.range.startLineNumber===n?c.range.startColumn:1,u=c.range.endLineNumber===n?c.range.endColumn:s,h=c.options.hoverMessage;if(!h||sm(h))continue;const f=new k(e.range.startLineNumber,d,e.range.startLineNumber,u);o.push(new pv(this,f,VD(h)))}const a=this._editor.getModel().getLineLength(n),l=this._configurationService.getValue("editor.maxTokenizationLineLength");return typeof l=="number"&&a>=l&&o.push(new pv(this,new k(n,1,n,a+1),[{value:m("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),o}computeAsync(e,t,i){return _ce(this,void 0,void 0,function*(){if(!this._editor.hasModel()||e.type!==1)return Promise.resolve([]);const n=this._editor.getModel();if(!Sm.has(n))return Promise.resolve([]);const s=yield $V(n,new U(e.range.startLineNumber,e.range.startColumn),i),o=[];for(const a of s){if(sm(a.contents))continue;const l=a.range?k.lift(a.range):e.range;o.push(new pv(this,l,a.contents))}return o})}renderHoverParts(e,t,i){const n=new ue;for(const s of e)for(const o of s.contents){if(sm(o))continue;const a=b2("div.hover-row.markdown-hover"),l=X(a,b2("div.hover-contents")),c=n.add(new Ac({editor:this._editor},this._modeService,this._openerService));n.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const d=n.add(c.render(o));l.appendChild(d.element),t.appendChild(a)}return n}};RT=mce([qx(2,Fs),qx(3,co),qx(4,di)],RT);var UV=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},zV=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class v2{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let OT=class jV{constructor(e,t){this._markerService=t,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._dispoables=new ue,this._markers=[],this._nextIdx=-1,De.isUri(e)?this._resourceFilter=n=>n.toString()===e.toString():e&&(this._resourceFilter=e);const i=()=>{this._markers=this._markerService.read({resource:De.isUri(e)?e:void 0,severities:Jt.Error|Jt.Warning|Jt.Info}),typeof e=="function"&&(this._markers=this._markers.filter(n=>this._resourceFilter(n.resource))),this._markers.sort(jV._compareMarker)};i(),this._dispoables.add(t.onMarkerChanged(n=>{(!this._resourceFilter||n.some(s=>this._resourceFilter(s)))&&(i(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new v2(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(o=>o.resource.toString()===e.uri.toString());s<0&&(s=BD(this._markers,{resource:e.uri},(o,a)=>Cm(o.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let o=s;o<this._markers.length;o++){let a=k.lift(this._markers[o]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new k(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=o,n=!0;break}if(this._markers[o].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(this._markers.length===0)return!1;let n=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(n=>n.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(k.containsPosition(this._markers[i],t))return new v2(this._markers[i],i+1,this._markers.length)}}static _compareMarker(e,t){let i=Cm(e.resource.toString(),t.resource.toString());return i===0&&(i=Jt.compare(e.severity,t.severity)),i===0&&(i=k.compareRangesUsingStarts(e,t)),i}};OT=UV([zV(1,ob)],OT);const qV=bt("IMarkerNavigationService");let MT=class{constructor(e){this._markerService=e,this._provider=new Dr}getMarkerList(e){for(let t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new OT(e,this._markerService)}};MT=UV([zV(0,ob)],MT);Hu(qV,MT,!0);var PT;(function(r){function e(t){switch(t){case ri.Ignore:return"severity-ignore "+be.info.classNames;case ri.Info:return be.info.classNames;case ri.Warning:return be.warning.classNames;case ri.Error:return be.error.classNames;default:return""}}r.className=e})(PT||(PT={}));Et((r,e)=>{const t=r.getColor(AX);if(t){const s=be.error.cssSelector;e.addRule(` + .monaco-editor .zone-widget ${s}, + .markers-panel .marker-icon${s}, + .text-search-provider-messages .providerMessage ${s}, + .extensions-viewlet > .extensions ${s} { + color: ${t}; + } + `)}const i=r.getColor(NX);if(i){const s=be.warning.cssSelector;e.addRule(` + .monaco-editor .zone-widget ${s}, + .markers-panel .marker-icon${s}, + .extensions-viewlet > .extensions ${s}, + .extension-editor ${s}, + .text-search-provider-messages .providerMessage ${s}, + .preferences-editor ${s} { + color: ${i}; + } + `)}const n=r.getColor(RX);if(n){const s=be.info.cssSelector;e.addRule(` + .monaco-editor .zone-widget ${s}, + .markers-panel .marker-icon${s}, + .extensions-viewlet > .extensions ${s}, + .text-search-provider-messages .providerMessage ${s}, + .extension-editor ${s} { + color: ${n}; + } + `)}});var bce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class vce{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 ue,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(Ei(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new AA(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{o.style.left=`-${a.scrollLeft}px`,o.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){ft(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=((t==null?void 0:t.length)||0)+2;s&&(typeof s=="string"?o+=s.length:o+=s.value.length);const a=aa(i);this._lines=a.length,this._longestLineLength=0;for(const h of a)this._longestLineLength=Math.max(h.length+o,this._longestLineLength);Ki(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const h of a)l=document.createElement("div"),l.innerText=h,h===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const h=document.createElement("span");if(h.classList.add("details"),l.appendChild(h),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),h.appendChild(f)}if(s)if(typeof s=="string"){const f=document.createElement("span");f.innerText=`(${s})`,f.classList.add("code"),h.appendChild(f)}else{this._codeLink=oe("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(s.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const f=X(this._codeLink,oe("span"));f.innerText=s.value,h.appendChild(this._codeLink)}}if(Ki(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),mr(n)){const h=this._relatedBlock.appendChild(document.createElement("div"));h.style.paddingTop=`${Math.floor(this._editor.getOption(58)*.66)}px`,this._lines+=1;for(const f of n){let g=document.createElement("div"),p=document.createElement("a");p.classList.add("filename"),p.innerText=`${bV(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,p.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(p,f);let _=document.createElement("span");_.innerText=f.message,g.appendChild(p),g.appendChild(_),this._lines+=1,h.appendChild(g)}}const c=this._editor.getOption(43),d=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:d,scrollHeight:u})}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 Jt.Error:t=m("Error","Error");break;case Jt.Warning:t=m("Warning","Warning");break;case Jt.Info:t=m("Info","Info");break;case Jt.Hint:t=m("Hint","Hint");break}let i=m("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let eg=class GV extends dy{constructor(e,t,i,n,s,o,a){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=a,this._callOnDispose=new ue,this._onDidSelectRelatedInformation=new H,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=Jt.Warning,this._backgroundColor=q.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(Sce);let t=FT,i=Cce;this._severity===Jt.Warning?(t=BT,i=wce):this._severity===Jt.Info&&(t=WT,i=yce);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(pV),secondaryHeadingColor:e.getColor(mV)})}_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.onBeforeRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(GV.TitleMenu,this._contextKeyService);ile(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=X(e,oe(""))}_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 vce(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),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());let n=k.lift(e);const s=this.editor.getPosition();let o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?m("problems","{0} of {1} problems",t,i):m("change","{0} of {1} problem",t,i);this.setTitle(Rs(a.uri),l)}this._icon.className=`codicon ${PT.className(Jt.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()}};eg.TitleMenu=new Ee("gotoErrorTitleMenu");eg=bce([wh(1,Gt),wh(2,co),wh(3,Bu),wh(4,gt),wh(5,Be),wh(6,ib)],eg);let C2=Nm(Xp,$W),w2=Nm(il,y0),y2=Nm(so,bA);const FT=V("editorMarkerNavigationError.background",{dark:C2,light:C2,hc:gi},m("editorMarkerNavigationError","Editor marker navigation widget error color.")),Cce=V("editorMarkerNavigationError.headerBackground",{dark:Ut(FT,.1),light:Ut(FT,.1),hc:null},m("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),BT=V("editorMarkerNavigationWarning.background",{dark:w2,light:w2,hc:gi},m("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),wce=V("editorMarkerNavigationWarning.headerBackground",{dark:Ut(BT,.1),light:Ut(BT,.1),hc:"#0C141F"},m("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),WT=V("editorMarkerNavigationInfo.background",{dark:y2,light:y2,hc:gi},m("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),yce=V("editorMarkerNavigationInfo.headerBackground",{dark:Ut(WT,.1),light:Ut(WT,.1),hc:null},m("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),Sce=V("editorMarkerNavigation.background",{dark:ts,light:ts,hc:ts},m("editorMarkerNavigationBackground","Editor marker navigation widget background."));Et((r,e)=>{const t=r.getColor(Z_);t&&e.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${t}; }`);const i=r.getColor(X_);i&&e.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`)});var xce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mv=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},KV=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let Nc=class _C{constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new ue,this._editor=e,this._widgetVisible=YV.bindTo(this._contextKeyService)}static get(e){return e.getContribution(_C.ID)}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(eg,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(i=>{var n,s,o;(!(!((n=this._model)===null||n===void 0)&&n.selected)||!k.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((o=this._model)===null||o===void 0||o.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:k.lift(i).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 U(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){return KV(this,void 0,void 0,function*(){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=yield this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(_C.get(n).close(),_C.get(n).nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}})}};Nc.ID="editor.contrib.markerController";Nc=xce([mv(1,qV),mv(2,Be),mv(3,Ct),mv(4,gt)],Nc);class cS extends Se{constructor(e,t,i){super(i);this._next=e,this._multiFile=t}run(e,t){return KV(this,void 0,void 0,function*(){t.hasModel()&&Nc.get(t).nagivate(this._next,this._multiFile)})}}class rl extends cS{constructor(){super(!0,!1,{id:rl.ID,label:rl.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:578,weight:100},menuOpts:{menuId:eg.TitleMenu,title:rl.LABEL,icon:un("marker-navigation-next",be.arrowDown,m("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}rl.ID="editor.action.marker.next";rl.LABEL=m("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class tg extends cS{constructor(){super(!1,!1,{id:tg.ID,label:tg.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:1602,weight:100},menuOpts:{menuId:eg.TitleMenu,title:rl.LABEL,icon:un("marker-navigation-previous",be.arrowUp,m("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}tg.ID="editor.action.marker.prev";tg.LABEL=m("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class Ece extends cS{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:m("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:66,weight:100},menuOpts:{menuId:Ee.MenubarGoMenu,title:m({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class kce extends cS{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:m("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:1090,weight:100},menuOpts:{menuId:Ee.MenubarGoMenu,title:m({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}wt(Nc.ID,Nc);pe(rl);pe(tg);pe(Ece);pe(kce);const YV=new xe("markersNavigationVisible",!1),Lce=dn.bindToContribution(Nc.get);fe(new Lce({id:"closeMarkersNavigation",precondition:YV,handler:r=>r.close(),kbOpts:{weight:100+50,kbExpr:R.focus,primary:9,secondary:[1033]}}));var Tce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},S2=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const fs=oe;class Ice{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const x2={type:1,filter:{include:et.QuickFix}};let VT=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._markerDecorationsService=i,this._openerService=n,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:s,d=this._markerDecorationsService.getMarker(i.uri,a);if(!d)continue;const u=new k(e.range.startLineNumber,l,e.range.startLineNumber,c);o.push(new Ice(this,u,d))}return o}renderHoverParts(e,t,i){if(!e.length)return Z.None;const n=new ue;e.forEach(o=>t.appendChild(this.renderMarkerHover(o,n)));const s=e.length===1?e[0]:e.sort((o,a)=>Jt.compare(o.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(s,i,n),n}renderMarkerHover(e,t){const i=fs("div.hover-row"),n=X(i,fs("div.marker.hover-contents")),{source:s,message:o,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const c=X(n,fs("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=o,s||a)if(a&&typeof a!="string"){const d=fs("span");if(s){const g=X(d,fs("span"));g.innerText=s}const u=X(d,fs("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(J(u,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const h=X(u,fs("span"));h.innerText=a.value;const f=X(n,d);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const d=X(n,fs("span"));d.style.opacity="0.6",d.style.paddingLeft="6px",d.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(mr(l))for(const{message:d,resource:u,startLineNumber:h,startColumn:f}of l){const g=X(n,fs("div"));g.style.marginTop="8px";const p=X(g,fs("a"));p.innerText=`${Rs(u)}(${h}, ${f}): `,p.style.cursor="pointer",t.add(J(p,"click",v=>{v.stopPropagation(),v.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:h,startColumn:f}}}).catch(Fe)}));const _=X(g,fs("span"));_.innerText=d,this._editor.applyFontInfo(_)}return i}renderMarkerStatusbar(e,t,i){if((e.marker.severity===Jt.Error||e.marker.severity===Jt.Warning||e.marker.severity===Jt.Info)&&t.addAction({label:m("view problem","View Problem"),commandId:rl.ID,run:()=>{this._hover.hide(),Nc.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(80)){const n=t.append(fs("div"));this.recentMarkerCodeActionsInfo&&(sy.makeKey(this.recentMarkerCodeActionsInfo.marker)===sy.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=m("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Z.None:i.add(Qd(()=>n.textContent=m("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(e.marker);i.add(Xe(()=>o.cancel())),o.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=m("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Xe(()=>{l||a.dispose()})),t.addAction({label:m("quick fixes","Quick Fix..."),commandId:kg.Id,run:c=>{l=!0;const d=gu.get(this._editor),u=rn(c);this._hover.hide(),d.showCodeActions(x2,a,{x:u.left+6,y:u.top+u.height+6})}})},Fe)}}getCodeActions(e){return Pi(t=>RN(this._editor.getModel(),new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),x2,$u.None,t))}};VT=Tce([S2(2,JD),S2(3,co)],VT);Et((r,e)=>{const t=r.getColor(Z_);t&&e.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${t}; }`);const i=r.getColor(X_);i&&e.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)});const ZV="editor.action.inlineSuggest.commit";class XV{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return Ace(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(` +`)}))).substring(this.parts[0].column-1)}}class Dce{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===` +`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}function Ace(r,e){const t=new Dce(r),i=e.map(n=>{const s=k.lift(n.range);return{startOffset:t.getOffset(s.getStartPosition()),endOffset:t.getOffset(s.getEndPosition()),text:n.text}});i.sort((n,s)=>s.startOffset-n.startOffset);for(const n of i)r=r.substring(0,n.startOffset)+n.text+r.substring(n.endOffset);return r}class E2{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class QV extends Z{constructor(e){super();this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(105)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function Nce(r,e){return r===e?!0:!r||!e?!1:r.range.equalsRange(e.range)&&r.text===e.text&&r.command===e.command}function JV(r,e,t,i,n=0){if(r.range.startLineNumber!==r.range.endLineNumber)return;const s=e.getLineContent(r.range.startLineNumber),o=Tt(s).length;if(r.range.startColumn-1<=o){const f=Tt(r.text).length,g=s.substring(r.range.startColumn-1,o),p=k.fromPositions(r.range.getStartPosition().delta(0,g.length),r.range.getEndPosition()),_=r.text.startsWith(g)?r.text.substring(g.length):r.text.substring(f);r={range:p,text:_,command:r.command}}const l=e.getValueInRange(r.range),c=Rce(l,r.text),d=r.range.startLineNumber,u=new Array;if(t==="prefix"){const f=c.filter(g=>g.originalLength===0);if(f.length>1||f.length===1&&f[0].originalStart!==l.length)return}const h=r.text.length-n;for(const f of c){const g=r.range.startColumn+f.originalStart+f.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===r.range.startLineNumber&&g<i.column||f.originalLength>0)return;if(f.modifiedLength===0)continue;const p=f.modifiedStart+f.modifiedLength,_=Math.max(f.modifiedStart,Math.min(p,h)),v=r.text.substring(f.modifiedStart,_),b=r.text.substring(_,Math.max(f.modifiedStart,p));if(v.length>0){const C=aa(v);u.push(new E2(g,C,!1))}if(b.length>0){const C=aa(b);u.push(new E2(g,C,!0))}}return new XV(d,u,0)}let Lo;function Rce(r,e){if((Lo==null?void 0:Lo.originalValue)===r&&(Lo==null?void 0:Lo.newValue)===e)return Lo==null?void 0:Lo.changes;{const t=Oce(r,e);return Lo={originalValue:r,newValue:e,changes:t},t}}function Oce(r,e){function t(l){let c=0;for(let d=0,u=l.length;d<u;d++){const h=l.charCodeAt(d);h>c&&(c=h)}return c}const i=Math.max(t(r),t(e));function n(l){if(l<0)throw new Error("unexpected");return i+l+1}function s(l){let c=0,d=0;const u=new Int32Array(l.length);for(let h=0,f=l.length;h<f;h++){const g=d*100+c;l[h]==="("?(u[h]=n(2*g),c++):l[h]===")"?(u[h]=n(2*g+1),c===1&&d++,c=Math.max(c-1,0)):u[h]=l.charCodeAt(h)}return u}const o=s(r),a=s(e);return new Uo({getElements:()=>o},{getElements:()=>a}).ComputeDiff(!1).changes}var Mce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pce=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Ua=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let HT=class extends Z{constructor(e,t,i){super();this.editor=e,this.cache=t,this.commandService=i,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new Un),this.active=!1,this.disposed=!1,this._register(i.onDidExecuteCommand(n=>{new Set([tA.id,iA.id,yf.Tab.id,yf.DeleteLeft.id,yf.DeleteRight.id,ZV,"acceptSelectedSuggestion"]).has(n.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(n=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(n=>{this.session&&!this.session.isValid&&this.hide()})),this._register(Xe(()=>{this.disposed=!0}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return(e=this.session)===null||e===void 0?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;(t=this.session)===null||t===void 0||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&((t=this.session)===null||t===void 0||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(54).enabled||this.session&&this.session.isValid||this.trigger(Gr.Automatic)}trigger(e){if(this.completionSession.value){e===Gr.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new Fce(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;(e=this.session)===null||e===void 0||e.commitCurrentCompletion()}showNext(){var e;(e=this.session)===null||e===void 0||e.showNextInlineCompletion()}showPrevious(){var e;(e=this.session)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return Ua(this,void 0,void 0,function*(){const t=yield(e=this.session)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};HT=Mce([Pce(2,pi)],HT);class Fce extends QV{constructor(e,t,i,n,s,o){super(e);this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=s,this.initialTriggerKind=o,this.minReservedLineCount=0,this.updateOperation=this._register(new Un),this.updateSoon=this._register(new $t(()=>{let l=this.initialTriggerKind;return this.initialTriggerKind=Gr.Automatic,this.update(l)},50)),this.currentlySelectedCompletionId=void 0;let a;this._register(this.onDidChange(()=>{const l=this.currentCompletion;if(l&&l.sourceInlineCompletion!==a){a=l.sourceInlineCompletion;const c=l.sourceProvider;c.handleItemDidShow&&c.handleItemDidShow(l.sourceInlineCompletions,a)}})),this._register(Xe(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(l=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(l=>{this.scheduleAutomaticUpdate()})),this._register(AD.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const e=this.cache.value.completions.findIndex(t=>t.semanticId===this.currentlySelectedCompletionId);return e===-1?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(!!this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return Ua(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const t=((e=this.cache.value)===null||e===void 0?void 0:e.completions)||[];if(t.length>0){const i=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[i].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var e;return Ua(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const t=((e=this.cache.value)===null||e===void 0?void 0:e.completions)||[];if(t.length>0){const i=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[i].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var e;return Ua(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===Gr.Explicit?yield this.updateOperation.value.promise:yield this.update(Gr.Explicit):((e=this.cache.value)===null||e===void 0?void 0:e.triggerKind)!==Gr.Explicit&&(yield this.update(Gr.Explicit))})}hasMultipleInlineCompletions(){var e;return Ua(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((e=this.cache.value)===null||e===void 0?void 0:e.completions.length)||0)>1})}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(54).mode;return e?JV(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(!!e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return Ua(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=Pi(s=>Ua(this,void 0,void 0,function*(){let o;try{o=yield t9(t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},s)}catch(a){Fe(a);return}s.isCancellationRequested||(this.cache.setValue(this.editor,o,e),this.onDidChangeEmitter.fire())})),n=new e9(i,e);this.updateOperation.value=n,yield i,this.updateOperation.value===n&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[ai.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{t==null||t.dispose()}).then(void 0,Yi):t==null||t.dispose(),this.onDidChangeEmitter.fire()}}class e9{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class Bce extends Z{constructor(e,t,i,n){super();this.triggerKind=n;const s=e.deltaDecorations([],t.items.map(o=>({range:o.range,options:{description:"inline-completion-tracking-range"}})));this._register(Xe(()=>{e.deltaDecorations(s,[])})),this.completions=t.items.map((o,a)=>new Wce(o,s[a])),this._register(e.onDidChangeModelContent(()=>{let o=!1;const a=e.getModel();for(const l of this.completions){const c=a.getDecorationRange(l.decorationId);if(!c){Fe(new Error("Decoration has no range"));continue}l.synchronizedRange.equalsRange(c)||(o=!0,l.synchronizedRange=c)}o&&i()})),this._register(t)}}class Wce{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function Vce(r,e){const t=e.getWordAtPosition(r),i=e.getLineMaxColumn(r.lineNumber);return t?new k(r.lineNumber,t.startColumn,r.lineNumber,i):k.fromPositions(r,r.with(void 0,i))}function t9(r,e,t,i=it.None){return Ua(this,void 0,void 0,function*(){const n=Vce(r,e),s=AD.all(e),o=yield Promise.all(s.map(l=>Ua(this,void 0,void 0,function*(){const c=yield l.provideInlineCompletions(e,r,t,i);return{completions:c,provider:l,dispose:()=>{c&&l.freeInlineCompletions(c)}}}))),a=new Map;for(const l of o){const c=l.completions;if(c)for(const d of c.items.map(u=>({text:u.text,range:u.range?k.lift(u.range):n,command:u.command,sourceProvider:l.provider,sourceInlineCompletions:c,sourceInlineCompletion:u})))d.range.startLineNumber===d.range.endLineNumber&&a.set(JSON.stringify({text:d.text,range:d.range}),d)}return{items:[...a.values()],dispose:()=>{for(const l of o)l.dispose()}}})}function hy(r,e){if(!e)return e;const t=r.getValueInRange(e.range),i=Of(t,e.text),n=r.getOffsetAt(e.range.getStartPosition())+i,s=r.getPositionAt(n),o=t.substr(i),a=UC(o,e.text),l=r.getPositionAt(Math.max(n,r.getOffsetAt(e.range.getEndPosition())-a));return{range:k.fromPositions(s,l),text:e.text.substr(i,e.text.length-i-a)}}class ms{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||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};let e=this.pos,t=0,i=this.value.charCodeAt(e),n;if(n=ms._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(ms.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(ms.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(ms.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(ms.isVariableCharacter(i)||ms.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof ms._table[i]=="undefined"&&!ms.isDigitCharacter(i)&&!ms.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}ms._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class Tg{constructor(){this._children=[]}appendChild(e){return e instanceof ur&&this._children[this._children.length-1]instanceof ur?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 o(a,l){for(const c of a)c.parent=l,o(c.children,c)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof dS)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class ur extends Tg{constructor(e){super();this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new ur(this.value)}}class i9 extends Tg{}class Ss extends i9{constructor(e){super();this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof fb?this._children[0]:void 0}clone(){let e=new Ss(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class fb extends Tg{constructor(){super(...arguments);this.options=[]}appendChild(e){return e instanceof ur&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new fb;return this.options.forEach(e.appendChild,e),e}}class WN extends Tg{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(s=>s instanceof qs&&Boolean(s.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof qs){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new WN;return e.regexp=new RegExp(this.regexp.source,(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class qs extends Tg{constructor(e,t,i,n){super();this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.toLowerCase():i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join(""):e}clone(){return new qs(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class u_ extends i9{constructor(e){super();this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new ur(t)],!0):!1}clone(){const e=new u_(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function k2(r,e){const t=[...r];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class dS extends Tg{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(i){return i instanceof Ss&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return k2([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Ss&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof u_&&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(){let e=new dS;return this._children=this.children.map(t=>t.clone()),e}walk(e){k2(this.children,e)}}class uS{constructor(){this._scanner=new ms,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){this._scanner.text(e),this._token=this._scanner.next();const n=new dS;for(;this._parse(n););const s=new Map,o=[];let a=0;n.walk(l=>(l instanceof Ss&&(a+=1,l.isFinalTabstop?s.set(0,void 0):!s.has(l.index)&&l.children.length>0?s.set(l.index,l.children):o.push(l)),!0));for(const l of o){const c=s.get(l.index);if(c){const d=new Ss(l.index);d.transform=l.transform;for(const u of c)d.appendChild(u.clone());n.replace(l,[d])}}return i||(i=a>0&&t),!s.has(0)&&i&&n.appendChild(new Ss(0)),n}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}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(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)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 ur(t)),!0):!1}_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 Ss(Number(t)):new u_(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 s=new Ss(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new ur("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const o=new fb;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(o),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new ur(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 s=new u_(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new ur("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){let t=new WN,i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new ur(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{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);let n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new qs(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new qs(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){let s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new qs(Number(n),s)),!0)}else if(this._accept(11)){let s=this._until(4);if(s)return e.appendChild(new qs(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){let s=this._until(4);if(s)return e.appendChild(new qs(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){let s=this._until(1);if(s){let o=this._until(4);if(o)return e.appendChild(new qs(Number(n),void 0,s,o)),!0}}else{let s=this._until(4);if(s)return e.appendChild(new qs(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new ur(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const Vi=new Uint8Array(16),Dn=[];for(let r=0;r<256;r++)Dn.push(r.toString(16).padStart(2,"0"));let $T;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?$T=crypto.getRandomValues.bind(crypto):$T=function(r){for(let e=0;e<r.length;e++)r[e]=Math.floor(Math.random()*256);return r};function Hce(){$T(Vi),Vi[6]=Vi[6]&15|64,Vi[8]=Vi[8]&63|128;let r=0,e="";return e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+="-",e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+="-",e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+="-",e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+="-",e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e+=Dn[Vi[r++]],e}const L2="code-workspace";function T2(r){const e=r;return typeof(e==null?void 0:e.id)=="string"&&De.isUri(e.uri)}function $ce(r){if(r.configuration)return{id:r.id,configPath:r.configuration};if(r.folders.length===1)return{id:r.id,uri:r.folders[0].uri}}class Uce{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let i=t.resolve(e);if(i!==void 0)return i}}}class zce{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),o=Tt(s,0,this._selection.startColumn-1);let a=o;e.snippet.walk(c=>c===e?!1:(c instanceof ur&&(a=Tt(aa(c.value).pop())),!0));const l=Of(a,o);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,d,u)=>`${d}${a.substr(l)}${u}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}}}class jce{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return Rd(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=Rd(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return UB(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(xD(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class qce{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(!!t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!u3(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}class Gce{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=Ue.getComments(i);if(!!n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}}class Zo{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return Zo.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return Zo.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return Zo.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return Zo.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}Zo.dayNames=[m("Sunday","Sunday"),m("Monday","Monday"),m("Tuesday","Tuesday"),m("Wednesday","Wednesday"),m("Thursday","Thursday"),m("Friday","Friday"),m("Saturday","Saturday")];Zo.dayNamesShort=[m("SundayShort","Sun"),m("MondayShort","Mon"),m("TuesdayShort","Tue"),m("WednesdayShort","Wed"),m("ThursdayShort","Thu"),m("FridayShort","Fri"),m("SaturdayShort","Sat")];Zo.monthNames=[m("January","January"),m("February","February"),m("March","March"),m("April","April"),m("May","May"),m("June","June"),m("July","July"),m("August","August"),m("September","September"),m("October","October"),m("November","November"),m("December","December")];Zo.monthNamesShort=[m("JanuaryShort","Jan"),m("FebruaryShort","Feb"),m("MarchShort","Mar"),m("AprilShort","Apr"),m("MayShort","May"),m("JuneShort","Jun"),m("JulyShort","Jul"),m("AugustShort","Aug"),m("SeptemberShort","Sep"),m("OctoberShort","Oct"),m("NovemberShort","Nov"),m("DecemberShort","Dec")];class Kce{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=$ce(this._workspaceService.getWorkspace());if(!!t){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(T2(e))return Rd(e.uri.path);let t=Rd(e.configPath.path);return t.endsWith(L2)&&(t=t.substr(0,t.length-L2.length-1)),t}_resoveWorkspacePath(e){if(T2(e))return CT(e.uri.fsPath);let t=Rd(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?CT(i):"/"}}class Yce{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return Hce()}}Et((r,e)=>{function t(i){const n=r.getColor(i);return n?n.toString():"transparent"}e.addRule(`.monaco-editor .snippet-placeholder { background-color: ${t(CX)}; outline-color: ${t(wX)}; }`),e.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${t(yX)}; outline-color: ${t(SX)}; }`)});class _s{constructor(e,t,i,n){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=n,this._nestingLevel=1,this._placeholderGroups=pO(t.placeholders,Ss.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){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=k.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),a=i.isFinalTabstop?_s._decor.inactiveFinal:_s._decor.inactive,l=t.addDecoration(o,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx])if(s.transform){const o=this._placeholderDecorations.get(s),a=this._editor.getModel().getDecorationRange(o),l=this._editor.getModel().getValueInRange(a),c=s.transform.resolve(l).split(/\r\n|\r|\n/);for(let d=1;d<c.length;d++)c[d]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[d]);n.push(ai.replace(a,c.join(this._editor.getModel().getEOL())))}n.length>0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(n=>{const s=new Set,o=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);o.push(new _e(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.changeDecorationOptions(l,a.isFinalTabstop?_s._decor.activeFinal:_s._decor.active),s.add(a);for(const d of this._snippet.enclosingPlaceholders(a)){const u=this._placeholderDecorations.get(d);n.changeDecorationOptions(u,d.isFinalTabstop?_s._decor.activeFinal:_s._decor.active),s.add(d)}}for(const[a,l]of this._placeholderDecorations)s.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?_s._decor.inactiveFinal:_s._decor.inactive);return o});return t?this.move(e):i!=null?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Ss){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}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 s=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(s);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}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(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const l of s._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=n.index+(o+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const a=this._placeholderDecorations.get(n);i.removeDecoration(a),this._placeholderDecorations.delete(n);for(const l of s._snippet.placeholders){const c=s._snippet.offset(l),d=s._snippet.fullLen(l),u=k.fromPositions(t.getPositionAt(s._offset+c),t.getPositionAt(s._offset+c+d)),h=i.addDecoration(u,_s._decor.inactive);this._placeholderDecorations.set(l,h)}}this._placeholderGroups=pO(this._snippet.placeholders,Ss.compareByIndex)})}}_s._decor={active:qe.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:qe.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:qe.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:qe.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const I2={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class Oo{constructor(e,t,i=I2){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,s){const o=e.getLineContent(t.lineNumber),a=Tt(o,0,t.column-1);let l;return i.walk(c=>{if(!(c instanceof ur)||c.parent instanceof fb)return!0;const d=c.value.split(/\r\n|\r|\n/);if(n){const h=i.offset(c);if(h===0)d[0]=e.normalizeIndentation(d[0]);else{l=l!=null?l:i.toString();let f=l.charCodeAt(h-1);(f===10||f===13)&&(d[0]=e.normalizeIndentation(a+d[0]))}for(let f=1;f<d.length;f++)d[f]=e.normalizeIndentation(a+d[f])}const u=d.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new ur(u)]),l=void 0),!0}),a}static adjustSelection(e,t,i,n){if(i!==0||n!==0){const{positionLineNumber:s,positionColumn:o}=t,a=o-i,l=o+n,c=e.validateRange({startLineNumber:s,startColumn:a,endLineNumber:s,endColumn:l});t=_e.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippets(e,t,i,n,s,o,a,l){const c=[],d=[];if(!e.hasModel())return{edits:c,snippets:d};const u=e.getModel(),h=e.invokeWithinContext(y=>y.get(cW)),f=e.invokeWithinContext(y=>new jce(y.get(ib),u)),g=()=>a;let p=0,_=u.getValueInRange(Oo.adjustSelection(u,e.getSelection(),i,0)),v=u.getValueInRange(Oo.adjustSelection(u,e.getSelection(),0,n)),b=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const C=e.getSelections().map((y,E)=>({selection:y,idx:E})).sort((y,E)=>k.compareRangesUsingStarts(y.selection,E.selection));for(const{selection:y,idx:E}of C){let S=Oo.adjustSelection(u,y,i,0),w=Oo.adjustSelection(u,y,0,n);_!==u.getValueInRange(S)&&(S=y),v!==u.getValueInRange(w)&&(w=y);const x=y.setStartPosition(S.startLineNumber,S.startColumn).setEndPosition(w.endLineNumber,w.endColumn),D=new uS().parse(t,!0,s),M=x.getStartPosition(),B=Oo.adjustWhitespace(u,M,D,o||E>0&&b!==u.getLineFirstNonWhitespaceColumn(y.positionLineNumber),!0);D.resolveVariables(new Uce([f,new qce(g,E,C.length,e.getOption(70)==="spread"),new zce(u,y,E,l),new Gce(u,y),new Zo,new Kce(h),new Yce]));const z=u.getOffsetAt(M)+p;p+=D.toString().length-u.getValueLengthInRange(x),c[E]=ai.replace(x,D.toString()),c[E].identifier={major:E,minor:0},d[E]=new _s(e,D,z,B)}return{edits:c,snippets:d}}dispose(){ft(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=Oo.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,i=>this._snippets[0].hasPlaceholder?this._move(!0):i.filter(n=>!!n.identifier).map(n=>_e.fromPositions(n.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=I2){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=Oo.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,s=>{for(const o of this._snippets)o.merge(n);return console.assert(n.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):s.filter(o=>!!o.identifier).map(o=>_e.fromPositions(o.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 choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(t.size===0)for(const[s,o]of n){o.sort(k.compareRangesUsingStarts);for(const a of e)if(o[0].containsRange(a)){t.set(s,[]);break}}if(t.size===0)return!1;t.forEach((s,o)=>{s.push(...n.get(o))})}e.sort(k.compareRangesUsingStarts);for(let[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(k.compareRangesUsingStarts);for(let s=0;s<n.length;s++)if(!n[s].containsRange(e[s])){t.delete(i);continue}}return t.size>0}}var lm=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const ot={Visible:new xe("suggestWidgetVisible",!1,m("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new xe("suggestWidgetDetailsVisible",!1,m("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new xe("suggestWidgetMultipleSuggestions",!1,m("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new xe("suggestionMakesTextEdit",!0,m("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new xe("acceptSuggestionOnEnter",!0,m("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new xe("suggestionHasInsertAndReplaceRange",!1,m("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new xe("suggestionInsertMode",void 0,{type:"string",description:m("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new xe("suggestionCanResolve",!1,m("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Rc=new Ee("suggestWidgetStatusBar");class Zce{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=oo.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),k.isIRange(t.range)?(this.editStart=new U(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new U(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new U(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new U(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new U(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new U(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return lm(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{ga(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class fy{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}fy.default=new fy;let Xce;function Qce(){return Xce}class Jce{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function n9(r,e,t=fy.default,i={triggerKind:0},n=it.None){return lm(this,void 0,void 0,function*(){const s=new sa(!0);e=e.clone();const o=r.getWordAtPosition(e),a=o?new k(e.lineNumber,o.startColumn,e.lineNumber,o.endColumn):k.fromPositions(e),l={replace:a,insert:a.setEndPosition(e.lineNumber,e.column)},c=[],d=new ue,u=[];let h=!1;const f=(p,_,v)=>{var b,C,y;if(!!_){for(let E of _.suggestions)if(!t.kindFilter.has(E.kind)){if(!t.showDeprecated&&((b=E==null?void 0:E.tags)===null||b===void 0?void 0:b.includes(1)))continue;E.range||(E.range=l),E.sortText||(E.sortText=typeof E.label=="string"?E.label:E.label.label),!h&&E.insertTextRules&&E.insertTextRules&4&&(h=uS.guessNeedsClipboard(E.insertText)),c.push(new Zce(e,E,_,p))}sD(_)&&d.add(_),u.push({providerName:(C=p._debugDisplayName)!==null&&C!==void 0?C:"unkown_provider",elapsedProvider:(y=_.duration)!==null&&y!==void 0?y:-1,elapsedOverall:v.elapsed()})}},g=(()=>lm(this,void 0,void 0,function*(){}))();for(let p of Zs.orderedGroups(r)){let _=c.length;if(yield Promise.all(p.map(v=>lm(this,void 0,void 0,function*(){if(!(t.providerFilter.size>0&&!t.providerFilter.has(v)))try{const b=new sa(!0),C=yield v.provideCompletionItems(r,e,i,n);f(v,C,b)}catch(b){Yi(b)}}))),_!==c.length||n.isCancellationRequested)break}return yield g,n.isCancellationRequested?(d.dispose(),Promise.reject(vg())):new Jce(c.sort(r9(t.snippetSortOrder)),h,{entries:u,elapsed:s.elapsed()},d)})}function VN(r,e){if(r.sortTextLow&&e.sortTextLow){if(r.sortTextLow<e.sortTextLow)return-1;if(r.sortTextLow>e.sortTextLow)return 1}return r.completion.label<e.completion.label?-1:r.completion.label>e.completion.label?1:r.completion.kind-e.completion.kind}function ede(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return VN(r,e)}function tde(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return VN(r,e)}const hS=new Map;hS.set(0,ede);hS.set(2,tde);hS.set(1,VN);function r9(r){return hS.get(r)}lt.registerCommand("_executeCompletionItemProvider",(r,...e)=>lm(void 0,void 0,void 0,function*(){const[t,i,n,s]=e;Dt(De.isUri(t)),Dt(U.isIPosition(i)),Dt(typeof n=="string"||!n),Dt(typeof s=="number"||!s);const o=yield r.get(ho).createModelReference(t);try{const a={incomplete:!1,suggestions:[]},l=[],c=yield n9(o.object.textEditorModel,U.lift(i),void 0,{triggerCharacter:n,triggerKind:n?1:0});for(const d of c.items)l.length<(s!=null?s:0)&&l.push(d.resolve(it.None)),a.incomplete=a.incomplete||d.container.incomplete,a.suggestions.push(d.completion);try{return yield Promise.all(l),a}finally{setTimeout(()=>c.disposable.dispose(),100)}}finally{o.dispose()}}));const UT=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};Zs.register("*",UT);function ide(r,e){setTimeout(()=>{UT.onlyOnceSuggestions.push(...e),r.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(UT))},0)}var nde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},D2=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const A2={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let ln=class Dp{constructor(e,t,i){this._editor=e,this._logService=t,this._snippetListener=new ue,this._modelVersionId=-1,this._inSnippet=Dp.InSnippetMode.bindTo(i),this._hasNextTabstop=Dp.HasNextTabstop.bindTo(i),this._hasPrevTabstop=Dp.HasPrevTabstop.bindTo(i)}static get(e){return e.getContribution(Dp.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?A2:Object.assign(Object.assign({},A2),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){!this._editor.hasModel()||(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new Oo(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.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.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:e}=this._session;if(!e){this._currentChoice=void 0;return}if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(i=>_e.fromPositions(i.getStartPosition())));const[t]=e.options;ide(this._editor,e.options.map((i,n)=>({kind:13,label:i.value,insertText:i.value,sortText:"a".repeat(n+1),range:k.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};ln.ID="snippetController2";ln.InSnippetMode=new xe("inSnippetMode",!1,m("inSnippetMode","Whether the editor in current in snippet mode"));ln.HasNextTabstop=new xe("hasNextTabstop",!1,m("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));ln.HasPrevTabstop=new xe("hasPrevTabstop",!1,m("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));ln=nde([D2(1,_l),D2(2,Be)],ln);wt(ln.ID,ln);const fS=dn.bindToContribution(ln.get);fe(new fS({id:"jumpToNextSnippetPlaceholder",precondition:me.and(ln.InSnippetMode,ln.HasNextTabstop),handler:r=>r.next(),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:2}}));fe(new fS({id:"jumpToPrevSnippetPlaceholder",precondition:me.and(ln.InSnippetMode,ln.HasPrevTabstop),handler:r=>r.prev(),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:1026}}));fe(new fS({id:"leaveSnippet",precondition:ln.InSnippetMode,handler:r=>r.cancel(!0),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:9,secondary:[1033]}}));fe(new fS({id:"acceptSnippet",precondition:ln.InSnippetMode,handler:r=>r.finish()}));var rde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gx=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class HN{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;let n=i[0].score[0];for(let s=0;s<i.length;s++){const{score:o,completion:a}=i[s];if(o[0]!==n)break;if(a.preselect)return s}return 0}}class s9 extends HN{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}class sde extends HN{constructor(){super("recentlyUsed");this._cache=new Bc(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageIdentifier().language}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(i.length===0)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);let s=i[0].score[0],o=-1,a=-1,l=-1;for(let c=0;c<i.length&&i[c].score[0]===s;c++){const d=`${e.getLanguageIdentifier().language}/${i[c].textLabel}`,u=this._cache.peek(d);if(u&&u.touch>l&&u.type===i[c].completion.kind&&u.insertText===i[c].completion.insertText&&(l=u.touch,a=c),i[c].completion.preselect&&o===-1)return o=c}return a!==-1?a:o!==-1?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:N3(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class ode extends HN{constructor(){super("recentlyUsedByPrefix");this._trie=ff.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let s=`${e.getLanguageIdentifier().language}/${n}`,o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let a=0;a<i.length;a++){let{kind:l,insertText:c}=i[a].completion;if(l===o.type&&c===o.insertText)return a}return super.select(e,t,i)}toJSON(){let e=[];return this._trie.forEach((t,i)=>e.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),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=typeof i.type=="number"?i.type:N3(i.type),this._trie.set(t,i)}}}let h_=class bC{constructor(e,t,i){this._storageService=e,this._modeService=t,this._configService=i,this._disposables=new ue,this._persistSoon=new $t(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===oy.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,n;const s=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:(i=this._modeService.getLanguageIdentifier(e.getLanguageIdAtPosition(t.lineNumber,t.column)))===null||i===void 0?void 0:i.language,resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==s){this._saveState();const o=bC._strategyCtors.get(s)||s9;this._strategy=new o;try{const l=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,c=this._storageService.get(`${bC._storagePrefix}/${s}`,l);c&&this._strategy.fromJSON(JSON.parse(c))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${bC._storagePrefix}/${this._strategy.name}`,i,t,1)}}};h_._strategyCtors=new Map([["recentlyUsedByPrefix",ode],["recentlyUsed",sde],["first",s9]]);h_._storagePrefix="suggest/memories";h_=rde([Gx(0,ba),Gx(1,Fs),Gx(2,di)],h_);const o9=bt("ISuggestMemories");Hu(o9,h_,!0);var ade=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lde=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let f_=class a9{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=a9.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(110)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(110)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};f_.AtEnd=new xe("atEndOfWord",!1);f_=ade([lde(1,Be)],f_);var cde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dde=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let bu=class vC{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=vC.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(vC._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits););return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(!!this._model)try{this._ignore=!0,this._index=vC._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};bu.OtherSuggestions=new xe("hasOtherSuggestions",!1);bu=cde([dde(1,Be)],bu);class ude{constructor(e,t,i){this._disposables=new ue,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(n=>{if(this._active&&!t.isFrozen()){const s=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!mr(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new qh;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 hde=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Er{provideSelectionRanges(e,t){return hde(this,void 0,void 0,function*(){const i=[];for(const n of t){const s=[];i.push(s);const o=new Map;yield new Promise(a=>Er._bracketsRightYield(a,0,e,n,o)),yield new Promise(a=>Er._bracketsLeftYield(a,0,e,n,o,s))}return i})}static _bracketsRightYield(e,t,i,n,s){const o=new Map,a=Date.now();for(;;){if(t>=Er._maxRounds){e();break}if(!n){e();break}let l=i.findNextBracket(n);if(!l){e();break}if(Date.now()-a>Er._maxDuration){setTimeout(()=>Er._bracketsRightYield(e,t+1,i,n,s));break}const d=l.close[0];if(l.isOpen){let u=o.has(d)?o.get(d):0;o.set(d,u+1)}else{let u=o.has(d)?o.get(d):0;if(u-=1,o.set(d,Math.max(0,u)),u<0){let h=s.get(d);h||(h=new Dr,s.set(d,h)),h.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,o){const a=new Map,l=Date.now();for(;;){if(t>=Er._maxRounds&&s.size===0){e();break}if(!n){e();break}let c=i.findPrevBracket(n);if(!c){e();break}if(Date.now()-l>Er._maxDuration){setTimeout(()=>Er._bracketsLeftYield(e,t+1,i,n,s,o));break}const u=c.close[0];if(c.isOpen){let h=a.has(u)?a.get(u):0;if(h-=1,a.set(u,Math.max(0,h)),h<0){let f=s.get(u);if(f){let g=f.shift();f.size===0&&s.delete(u);const p=k.fromPositions(c.range.getEndPosition(),g.getStartPosition()),_=k.fromPositions(c.range.getStartPosition(),g.getEndPosition());o.push({range:p}),o.push({range:_}),Er._addBracketLeading(i,_,o)}}}else{let h=a.has(u)?a.get(u):0;a.set(u,h+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:k.fromPositions(new U(n,s),t.getEndPosition())}),i.push({range:k.fromPositions(new U(n,1),t.getEndPosition())}));const o=n-1;if(o>0){const a=e.getLineFirstNonWhitespaceColumn(o);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(o)&&(i.push({range:k.fromPositions(new U(o,a),t.getEndPosition())}),i.push({range:k.fromPositions(new U(o,1),t.getEndPosition())}))}}}Er._maxDuration=30;Er._maxRounds=2;var fde=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Wo{static create(e,t){return fde(this,void 0,void 0,function*(){if(!t.getOption(105).localityBonus||!t.hasModel())return Wo.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return Wo.None;const[s]=yield new Er().provideSelectionRanges(i,[n]);if(s.length===0)return Wo.None;const o=yield e.computeWordRanges(i.uri,s[0].range);if(!o)return Wo.None;const a=i.getWordUntilPosition(n);return delete o[a.word],new class extends Wo{distance(l,c){if(!n.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let d=typeof c.label=="string"?c.label:c.label.label,u=o[d];if(z3(u))return 2<<20;let h=BD(u,k.fromPositions(l),k.compareRangesUsingStarts),f=h>=0?u[h]:u[Math.max(0,~h-1)],g=s.length;for(const p of s){if(!k.containsRange(p.range,f))break;g-=1}return g}}})}}Wo.None=new class extends Wo{distance(){return 0}};class Cd{constructor(e,t,i,n,s,o,a){this.clipboardText=a,this._snippetCompareFn=Cd._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,o==="top"?this._snippetCompareFn=Cd._compareCompletionItemsSnippetsUp:o==="bottom"&&(this._snippetCompareFn=Cd._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const e=new Set;for(let[t,i]of this._providerInfo)i&&e.add(t);return e}adopt(e){let t=[];for(let i=0;i<this._items.length;)e.has(this._items[i].provider)?i++:(t.push(this._items[i]),this._items[i]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const o=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||o.length>2e3?Yf:Vie;for(let c=0;c<o.length;c++){const d=o[c];if(d.isInvalid)continue;this._providerInfo.set(d.provider,Boolean(d.container.incomplete));const u=d.position.column-d.editStart.column,h=u+i-(d.position.column-this._column);if(n.length!==h&&(n=h===0?"":t.slice(-h),s=n.toLowerCase()),d.word=n,h===0)d.score=oo.Default;else{let f=0;for(;f<u;){const g=n.charCodeAt(f);if(g===32||g===9)f+=1;else break}if(f>=h)d.score=oo.Default;else if(typeof d.completion.filterText=="string"){let g=l(n,s,f,d.completion.filterText,d.filterTextLow,0,!1);if(!g)continue;Nk(d.completion.filterText,d.textLabel)===0?d.score=g:(d.score=Pie(n,s,f,d.textLabel,d.labelLow,0),d.score[0]=g[0])}else{let g=l(n,s,f,d.textLabel,d.labelLow,0,!1);if(!g)continue;d.score=g}}d.idx=c,d.distance=this._wordDistance.distance(d.position,d.completion),a.push(d),e.push(d.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Gk(e.length-.85,e,(c,d)=>c-d):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return Cd._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return Cd._compareCompletionItems(e,t)}}var gde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},pde=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Sh{constructor(e,t,i,n){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.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column||!isNaN(Number(n.word)))}}function mde(r,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowQuickSuggestions");return i!==void 0?Boolean(i):!1}function _de(r,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return i!==void 0?Boolean(i):!1}let zT=class l9{constructor(e,t,i,n,s,o,a){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=o,this._configurationService=a,this._toDispose=new ue,this._quickSuggestDelay=10,this._triggerCharacterListener=new ue,this._triggerQuickSuggest=new rr,this._state=0,this._completionDisposables=new ue,this._onDidCancel=new H,this._onDidTrigger=new H,this._onDidSuggest=new H,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new _e(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._updateQuickSuggest()})),this._toDispose.add(Zs.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(c=>{this._onCursorChange(c)}));let l=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{l=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{l=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{l||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){ft(this._triggerCharacterListener),ft([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const e=new Map;for(const i of Zs.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,s.add(Qce()),e.set(n,s)),s.add(i)}const t=i=>{if(!_de(this._editor,this._contextKeyService,this._configurationService)||Sh.shouldAutoTrigger(this._editor))return;if(!i){const o=this._editor.getPosition();i=this._editor.getModel().getLineContent(o.lineNumber).substr(0,o.column-1)}let n="";Mf(i.charCodeAt(i.length-1))?qi(i.charCodeAt(i.length-2))&&(n=i.substr(i.length-2)):n=i.charAt(i.length-1);const s=e.get(n);if(s){const o=this._completionModel?{items:this._completionModel.adopt(s),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:n},Boolean(this._completionModel),s,o)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;this._state!==0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!Zs.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}if(!!Zs.has(t))if(this._state===0&&e.reason===0){if(this._editor.getOption(78)===!1||!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())||this._editor.getOption(105).snippetsPreventQuickSuggestions&&ln.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!Sh.shouldAutoTrigger(this._editor)||!this._editor.hasModel())return;const n=this._editor.getModel(),s=this._editor.getPosition(),o=this._editor.getOption(78);if(o!==!1){if(o!==!0){n.tokenizeIfCheap(s.lineNumber);const a=n.getLineTokens(s.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(s.column-1-1,0)));if(!(o.other&&l===0||o.comments&&l===1||o.strings&&l===2))return}!mde(this._editor,this._contextKeyService,this._configurationService)||this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)}else this._state!==0&&e.reason===3&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new Sh(e,t,this._state===2,!1);this._onNewContext(i)})}trigger(e,t=!1,i,n){var s;if(!this._editor.hasModel())return;const o=this._editor.getModel(),a=e.auto,l=new Sh(o,this._editor.getPosition(),a,e.shy);this.cancel(t),this._state=a?2:1,this._onDidTrigger.fire({auto:a,shy:e.shy,position:this._editor.getPosition()}),this._context=l;let c={triggerKind:(s=e.triggerKind)!==null&&s!==void 0?s:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Hn;const d=this._editor.getOption(100);let u=1;switch(d){case"top":u=0;break;case"bottom":u=2;break}const{itemKind:h,showDeprecated:f}=l9._createSuggestFilter(this._editor),g=Wo.create(this._editorWorkerService,this._editor),p=n9(o,this._editor.getPosition(),new fy(u,h,i,f),c,this._requestToken.token);Promise.all([p,g]).then(([_,v])=>pde(this,void 0,void 0,function*(){var b;if((b=this._requestToken)===null||b===void 0||b.dispose(),!this._editor.hasModel())return;let C=n==null?void 0:n.clipboardText;if(!C&&_.needsClipboard&&(C=yield this._clipboardService.readText()),this._state===0)return;const y=this._editor.getModel();let E=_.items;if(n){const w=r9(u);E=E.concat(n.items).sort(w)}const S=new Sh(y,this._editor.getPosition(),a,e.shy);this._completionModel=new Cd(E,this._context.column,{leadingLineContent:S.leadingLineContent,characterCountDelta:S.column-this._context.column},v,this._editor.getOption(105),this._editor.getOption(100),C),this._completionDisposables.add(_.disposable),this._onNewContext(S),this._reportDurationsTelemetry(_.durations)})).catch(Fe)}_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;e.getOption(100)==="none"&&t.add(27);const n=e.getOption(105);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(!!this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Tt(e.leadingLineContent)!==Tt(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){const t=new Set(Zs.all(this._editor.getModel()));for(let n of this._completionModel.allProvider)t.delete(n);const i=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,t,{items:i,clipboardText:this._completionModel.clipboardText});return}if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&e.leadingWord.word.length!==0){const{incomplete:t}=this._completionModel,i=this._completionModel.adopt(t);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,t,{items:i,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){if(Sh.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}}}};zT=gde([yh(1,Ps),yh(2,$c),yh(3,Wc),yh(4,_l),yh(5,Be),yh(6,di)],zT);class gS{constructor(e,t){this._disposables=new ue,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let a=0;a<n;a++)if(!i[a].isEmpty()){s=!0;break}if(!s)return;this._lastOvertyped=[];const o=e.getModel();for(let a=0;a<n;a++){const l=i[a];if(o.getValueLengthInRange(l)>gS._maxSelectionLength)return;this._lastOvertyped[a]={value:o.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(i=>{!this._empty&&!i.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}gS._maxSelectionLength=51200;var bde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kx=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class $N extends Jf{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=m("ddd","{0} ({1})",this._action.label,$N.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let jT=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new ue,this.element=X(e,oe(".suggest-status-bar"));const s=o=>o instanceof Cc?t.createInstance($N,o,void 0):void 0;this._leftActions=new fl(this.element,{actionViewItemProvider:s}),this._rightActions=new fl(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(Rc,this._contextKeyService),t=()=>{const i=[],n=[];for(let[s,o]of e.getActions())s==="left"?i.push(...o):n.push(...o);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};jT=bde([Kx(1,gt),Kx(2,Bu),Kx(3,Be)],jT);const vde=V("symbolIcon.arrayForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Cde=V("symbolIcon.booleanForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),wde=V("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),yde=V("symbolIcon.colorForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Sde=V("symbolIcon.constantForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),xde=V("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ede=V("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),kde=V("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Lde=V("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Tde=V("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ide=V("symbolIcon.fileForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Dde=V("symbolIcon.folderForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ade=V("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Nde=V("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Rde=V("symbolIcon.keyForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ode=V("symbolIcon.keywordForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Mde=V("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Pde=V("symbolIcon.moduleForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Fde=V("symbolIcon.namespaceForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Bde=V("symbolIcon.nullForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Wde=V("symbolIcon.numberForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Vde=V("symbolIcon.objectForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Hde=V("symbolIcon.operatorForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$de=V("symbolIcon.packageForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ude=V("symbolIcon.propertyForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zde=V("symbolIcon.referenceForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jde=V("symbolIcon.snippetForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qde=V("symbolIcon.stringForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Gde=V("symbolIcon.structForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Kde=V("symbolIcon.textForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yde=V("symbolIcon.typeParameterForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zde=V("symbolIcon.unitForeground",{dark:Ae,light:Ae,hc:Ae},m("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Xde=V("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Et((r,e)=>{const t=r.getColor(vde);t&&e.addRule(`${be.symbolArray.cssSelector} { color: ${t}; }`);const i=r.getColor(Cde);i&&e.addRule(`${be.symbolBoolean.cssSelector} { color: ${i}; }`);const n=r.getColor(wde);n&&e.addRule(`${be.symbolClass.cssSelector} { color: ${n}; }`);const s=r.getColor(Mde);s&&e.addRule(`${be.symbolMethod.cssSelector} { color: ${s}; }`);const o=r.getColor(yde);o&&e.addRule(`${be.symbolColor.cssSelector} { color: ${o}; }`);const a=r.getColor(Sde);a&&e.addRule(`${be.symbolConstant.cssSelector} { color: ${a}; }`);const l=r.getColor(xde);l&&e.addRule(`${be.symbolConstructor.cssSelector} { color: ${l}; }`);const c=r.getColor(Ede);c&&e.addRule(` + ${be.symbolValue.cssSelector},${be.symbolEnum.cssSelector} { color: ${c}; }`);const d=r.getColor(kde);d&&e.addRule(`${be.symbolEnumMember.cssSelector} { color: ${d}; }`);const u=r.getColor(Lde);u&&e.addRule(`${be.symbolEvent.cssSelector} { color: ${u}; }`);const h=r.getColor(Tde);h&&e.addRule(`${be.symbolField.cssSelector} { color: ${h}; }`);const f=r.getColor(Ide);f&&e.addRule(`${be.symbolFile.cssSelector} { color: ${f}; }`);const g=r.getColor(Dde);g&&e.addRule(`${be.symbolFolder.cssSelector} { color: ${g}; }`);const p=r.getColor(Ade);p&&e.addRule(`${be.symbolFunction.cssSelector} { color: ${p}; }`);const _=r.getColor(Nde);_&&e.addRule(`${be.symbolInterface.cssSelector} { color: ${_}; }`);const v=r.getColor(Rde);v&&e.addRule(`${be.symbolKey.cssSelector} { color: ${v}; }`);const b=r.getColor(Ode);b&&e.addRule(`${be.symbolKeyword.cssSelector} { color: ${b}; }`);const C=r.getColor(Pde);C&&e.addRule(`${be.symbolModule.cssSelector} { color: ${C}; }`);const y=r.getColor(Fde);y&&e.addRule(`${be.symbolNamespace.cssSelector} { color: ${y}; }`);const E=r.getColor(Bde);E&&e.addRule(`${be.symbolNull.cssSelector} { color: ${E}; }`);const S=r.getColor(Wde);S&&e.addRule(`${be.symbolNumber.cssSelector} { color: ${S}; }`);const w=r.getColor(Vde);w&&e.addRule(`${be.symbolObject.cssSelector} { color: ${w}; }`);const x=r.getColor(Hde);x&&e.addRule(`${be.symbolOperator.cssSelector} { color: ${x}; }`);const D=r.getColor($de);D&&e.addRule(`${be.symbolPackage.cssSelector} { color: ${D}; }`);const M=r.getColor(Ude);M&&e.addRule(`${be.symbolProperty.cssSelector} { color: ${M}; }`);const B=r.getColor(zde);B&&e.addRule(`${be.symbolReference.cssSelector} { color: ${B}; }`);const z=r.getColor(jde);z&&e.addRule(`${be.symbolSnippet.cssSelector} { color: ${z}; }`);const j=r.getColor(qde);j&&e.addRule(`${be.symbolString.cssSelector} { color: ${j}; }`);const re=r.getColor(Gde);re&&e.addRule(`${be.symbolStruct.cssSelector} { color: ${re}; }`);const te=r.getColor(Kde);te&&e.addRule(`${be.symbolText.cssSelector} { color: ${te}; }`);const N=r.getColor(Yde);N&&e.addRule(`${be.symbolTypeParameter.cssSelector} { color: ${N}; }`);const L=r.getColor(Zde);L&&e.addRule(`${be.symbolUnit.cssSelector} { color: ${L}; }`);const O=r.getColor(Xde);O&&e.addRule(`${be.symbolVariable.cssSelector} { color: ${O}; }`)});class c9{constructor(){this._onDidWillResize=new H,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new H,this.onDidResize=this._onDidResize.event,this._sashListener=new ue,this._size=new Ht(0,0),this._minSize=new Ht(0,0),this._maxSize=new Ht(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new _n(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new _n(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new _n(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Uw.North}),this._southSash=new _n(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Uw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ke.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ke.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(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(ke.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ke.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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 a=new Ht(t,e);Ht.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,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}}var Qde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Jde=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function UN(r){return!!r&&Boolean(r.completion.documentation||r.completion.detail&&r.completion.detail!==r.completion.label)}let qT=class{constructor(e,t){this._editor=e,this._onDidClose=new H,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new H,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new ue,this._renderDisposeable=new ue,this._borderWidth=1,this._size=new Ht(330,0),this.domNode=oe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Ac,{editor:e}),this._body=oe(".body"),this._scrollbar=new Q_(this._body,{}),X(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=X(this._body,oe(".header")),this._close=X(this._header,oe("span"+be.close.cssSelector)),this._close.title=m("details.close","Close"),this._type=X(this._header,oe("p.type")),this._docs=X(this._body,oe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(43)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(43),i=t.fontFamily,n=e.get(106)||t.fontSize,s=e.get(107)||t.lineHeight,o=t.fontWeight,a=`${n}px`,l=`${s}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=l,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=m("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:o}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} +`,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"} +`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} +`,a+=`distance: ${e.distance} (localityBonus-setting) +`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} +`,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")} +`,o=new gl().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!UN(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=a,this._type.title=a,Tr(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Ki(this._type),this._type.title="",Zn(this._type),this.domNode.classList.add("no-type");if(Ki(this._docs),typeof o=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),Ki(this._docs);const a=this._markdownRenderer.render(o);this._docs.appendChild(a.element),this._renderDisposeable.add(a),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=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Ht(e,t);Ht.equals(i,this._size)||(this._size=i,lj(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}};qT=Qde([Jde(1,gt)],qT);class eue{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new ue,this._added=!1,this._resizable=new c9,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,o=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(o=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+o})}a.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size)}))}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){var t;const i=rn(e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,(t=this._userSize)!==null&&t!==void 0?t:this.widget.size)}_placeAtAnchor(e,t){const i=jy(document.body),n=this.widget.getLayoutInfo();let s,o,a=new Ht(220,2*n.lineHeight),l=0,c=e.top,d=e.top+e.height-n.borderHeight,u,h,f=i.width-(e.left+e.width+n.borderWidth+n.horizontalPadding);l=-n.borderWidth+e.left+e.width,h=!0,s=new Ht(f,i.height-e.top-n.borderHeight-n.verticalPadding),o=s.with(void 0,e.top+e.height-n.borderHeight-n.verticalPadding),t.width>f&&(e.left>f&&(f=e.left-n.borderWidth-n.horizontalPadding,h=!1,l=Math.max(n.horizontalPadding,e.left-t.width-n.borderWidth),s=s.with(f),o=s.with(void 0,o.height)),e.width>f*1.3&&i.height-(e.top+e.height)>e.height&&(f=e.width,l=e.left,c=-n.borderWidth+e.top+e.height,s=new Ht(e.width-n.borderHeight,i.height-e.top-e.height-n.verticalPadding),o=s.with(void 0,e.top-n.verticalPadding),a=a.with(s.width)));let g=t.height,p=Math.max(s.height,o.height);g>p&&(g=p);let _;g<=s.height?(u=!0,_=s):(u=!1,_=o),this._applyTopLeft({left:l,top:u?c:d-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,h,u,!h),this._resizable.minSize=a,this._resizable.maxSize=_,this._resizable.layout(g,Math.min(_.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 Qa;(function(r){r[r.FILE=0]="FILE",r[r.FOLDER=1]="FOLDER",r[r.ROOT_FOLDER=2]="ROOT_FOLDER"})(Qa||(Qa={}));function _v(r,e,t,i){const n=i===Qa.ROOT_FOLDER?["rootfolder-icon"]:i===Qa.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===Ye.data?s=bc.parseMetaData(t).get(bc.META_DATA_LABEL):s=N2(C3(t).toLowerCase()),i===Qa.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),s.length<=255){const a=s.split(".");for(let l=1;l<a.length;l++)n.push(`${a.slice(l).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}const o=tue(r,e,t);o&&n.push(`${N2(o)}-lang-file-icon`)}}return n}function tue(r,e,t){if(!t)return null;let i=null;if(t.scheme===Ye.data){const s=bc.parseMetaData(t).get(bc.META_DATA_MIME);s&&(i=e.getModeId(s))}else{const n=r.getModel(t);n&&(i=n.getModeId())}return i&&i!==jA?i:e.getModeIdByFilepathOrFirstLine(t)}function N2(r){return r.replace(/[\11\12\14\15\40]/g,"/")}var iue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yx=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},sp;function d9(r){return`suggest-aria-id:${r}`}const nue=un("suggest-more-info",be.chevronRight,m("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),rue=new(sp=class CC{extract(e,t){if(e.textLabel.match(CC._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(CC._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=CC._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},sp._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*\))/,sp._regexStrict=new RegExp(`^${sp._regexRelaxed.source}$`,"i"),sp);let GT=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._modeService=i,this._themeService=n,this._onDidToggleDetails=new H,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new ue,t.root=e,t.root.classList.add("show-file-icons"),t.icon=X(e,oe(".icon")),t.colorspan=X(t.icon,oe("span.colorspan"));const i=X(e,oe(".contents")),n=X(i,oe(".main"));t.iconContainer=X(n,oe(".icon-label.codicon")),t.left=X(n,oe("span.left")),t.right=X(n,oe("span.right")),t.iconLabel=new CN(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=X(t.left,oe("span.signature-label")),t.qualifierLabel=X(t.left,oe("span.qualifier-label")),t.detailsLabel=X(t.right,oe("span.details-label")),t.readMore=X(t.right,oe("span.readMore"+qt.asCSSSelector(nue))),t.readMore.title=m("readMore","Read More");const s=()=>{const o=this._editor.getOptions(),a=o.get(43),l=a.fontFamily,c=a.fontFeatureSettings,d=o.get(106)||a.fontSize,u=o.get(107)||a.lineHeight,h=a.fontWeight,f=`${d}px`,g=`${u}px`;t.root.style.fontSize=f,t.root.style.fontWeight=h,n.style.fontFamily=l,n.style.fontFeatureSettings=c,n.style.lineHeight=g,t.icon.style.height=g,t.icon.style.width=g,t.readMore.style.height=g,t.readMore.style.width=g};return s(),t.disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(43)||o.hasChanged(106)||o.hasChanged(107))&&s()})),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=d9(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:M0(e.score)};let o=[];if(n.kind===19&&rue.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=_v(this._modelService,this._modeService,De.from({scheme:"fake",path:e.textLabel}),Qa.FILE),l=_v(this._modelService,this._modeService,De.from({scheme:"fake",path:n.detail}),Qa.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=WD([_v(this._modelService,this._modeService,De.from({scheme:"fake",path:e.textLabel}),Qa.FOLDER),_v(this._modelService,this._modeService,De.from({scheme:"fake",path:n.detail}),Qa.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...Pq(n.kind).split(" ")));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=Zx(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=Zx(n.label.detail||""),i.detailsLabel.textContent=Zx(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?Tr(i.detailsLabel):Zn(i.detailsLabel),UN(e)?(i.right.classList.add("can-expand-details"),Tr(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),Zn(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};GT=iue([Yx(1,mi),Yx(2,Fs),Yx(3,Gt)],GT);function Zx(r){return r.replace(/\r\n|\r|\n/g,"")}var sue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bv=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},oue=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const aue=V("editorSuggestWidget.background",{dark:Mr,light:Mr,hc:Mr},m("editorSuggestWidgetBackground","Background color of the suggest widget.")),lue=V("editorSuggestWidget.border",{dark:Wd,light:Wd,hc:Wd},m("editorSuggestWidgetBorder","Border color of the suggest widget.")),cue=V("editorSuggestWidget.foreground",{dark:lc,light:lc,hc:lc},m("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),due=V("editorSuggestWidget.selectedForeground",{dark:iC,light:iC,hc:iC},m("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),uue=V("editorSuggestWidget.selectedIconForeground",{dark:nC,light:nC,hc:nC},m("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),hue=V("editorSuggestWidget.selectedBackground",{dark:rC,light:rC,hc:rC},m("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),fue=V("editorSuggestWidget.highlightForeground",{dark:wf,light:wf,hc:wf},m("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),gue=V("editorSuggestWidget.focusHighlightForeground",{dark:M1,light:M1,hc:M1},m("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class pue{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof mu}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(Ht.is(i))return Ht.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let g_=class KT{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new rr,this._disposables=new ue,this._onDidSelect=new H,this._onDidFocus=new H,this._onDidHide=new H,this._onDidShow=new H,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new H,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new c9,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new mue(this,e),this._persistedSize=new pue(t,e);class o{constructor(f,g,p=!1,_=!1){this.persistedSize=f,this.currentSize=g,this.persistHeight=p,this.persistWidth=_}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new o(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(h=>{var f,g,p,_;if(this._resize(h.dimension.width,h.dimension.height),a&&(a.persistHeight=a.persistHeight||!!h.north||!!h.south,a.persistWidth=a.persistWidth||!!h.east||!!h.west),!!h.done){if(a){const{itemHeight:v,defaultSize:b}=this.getLayoutInfo(),C=Math.round(v/2);let{width:y,height:E}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-E)<=C)&&(E=(g=(f=a.persistedSize)===null||f===void 0?void 0:f.height)!==null&&g!==void 0?g:b.height),(!a.persistWidth||Math.abs(a.currentSize.width-y)<=C)&&(y=(_=(p=a.persistedSize)===null||p===void 0?void 0:p.width)!==null&&_!==void 0?_:b.width),this._persistedSize.store(new Ht(y,E))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=X(this.element.domNode,oe(".message")),this._listElement=X(this.element.domNode,oe(".tree"));const l=s.createInstance(qT,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new eue(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);c();const d=s.createInstance(GT,this.editor);this._disposables.add(d),this._disposables.add(d.onDidToggleDetails(()=>this.toggleDetails())),this._list=new ma("SuggestWidget",this._listElement,{getHeight:h=>this.getLayoutInfo().itemHeight,getTemplateId:h=>"suggestion"},[d],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:h=>{if(h.isResolved&&this._isDetailsVisible()){const{documentation:f,detail:g}=h.completion,p=bn("{0}{1}",g||"",f?typeof f=="string"?f:f.value:"");return m("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",h.textLabel,p)}else return h.textLabel},getWidgetAriaLabel:()=>m("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=s.createInstance(jT,this.element.domNode);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);u(),this._disposables.add(du(this._list,n,{listInactiveFocusBackground:hue,listInactiveFocusOutline:Tn})),this._disposables.add(n.onDidColorThemeChange(h=>this._onThemeChange(h))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onTap(h=>this._onListMouseDownOrTap(h))),this._disposables.add(this._list.onDidChangeSelection(h=>this._onListSelection(h))),this._disposables.add(this._list.onDidChangeFocus(h=>this._onListFocus(h))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(h=>{h.hasChanged(105)&&(u(),c())})),this._ctxSuggestWidgetVisible=ot.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=ot.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=ot.MultipleSuggestions.bindTo(i),this._disposables.add(Ei(this._details.widget.domNode,"keydown",h=>{this._onDetailsKeydown.fire(h)})),this._disposables.add(this.editor.onMouseDown(h=>this._onEditorMouseDown(h)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.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(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(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){const t=e.getColor(aue);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(lue);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(yc);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth=e.type==="hc"?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Pi(s=>oue(this,void 0,void 0,function*(){const o=Qd(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);s.onCancellationRequested(()=>o.dispose());const a=yield i.resolve(s);return o.dispose(),a})),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:d9(n)}))}).catch(Fe)),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",e===4),this.element.domNode.classList.remove("message"),e){case 0:Zn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.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=KT.LOADING_MESSAGE,Zn(this._listElement,this._status.element),Tr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=KT.NO_SUGGESTIONS_MESSAGE,Zn(this._listElement,this._status.element),Tr(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Zn(this._messageElement),Tr(this._listElement,this._status.element),this._show();break;case 4:Zn(this._messageElement),Tr(this._listElement,this._status.element),this._show();break;case 5:Zn(this._messageElement),Tr(this._listElement,this._status.element),this._details.show(),this._show();break}}_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){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=Qd(()=>this._setState(1),t)))}showSuggestions(e,t,i,n){var s,o;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(o=this._currentSuggestionDetails)===null||o===void 0||o.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const a=this._completionModel.items.length,l=a===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}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(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(UN(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){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;(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,i,n;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const s=jy(document.body),o=this.getLayoutInfo();e||(e=o.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.lineHeight=`${o.itemHeight}px`,this._state===2||this._state===1)a=o.itemHeight+o.borderHeight,l=o.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Ht(l,a),this._contentWidget.setPreference(2);else{const c=s.width-o.borderHeight-2*o.horizontalPadding;l>c&&(l=c);const d=this._completionModel?this._completionModel.stats.pLabelLen*o.typicalHalfwidthCharacterWidth:l,u=o.statusBarHeight+this._list.contentHeight+o.borderHeight,h=o.itemHeight+o.statusBarHeight,f=rn(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=f.top+g.top+g.height,_=Math.min(s.height-p-o.verticalPadding,u),v=f.top+g.top-o.verticalPadding,b=Math.min(v,u);let C=Math.min(Math.max(b,_)+o.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<h&&(a=h),a>C&&(a=C);const y=150;a>_||this._forceRenderingAbove&&v>y?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),C=b):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),C=_),this.element.preferredSize=new Ht(d,o.defaultSize.height),this.element.maxSize=new Ht(c,C),this.element.minSize=new Ht(220,h),this._cappedHeight=a===u?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_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(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(43),t=bs(this.editor.getOption(107)||e.lineHeight,8,1e3),i=!this.editor.getOption(105).showStatusBar||this._state===2||this._state===1?0:t,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 Ht(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}};g_.LOADING_MESSAGE=m("suggestWidget.loading","Loading...");g_.NO_SUGGESTIONS_MESSAGE=m("suggestWidget.noSuggestions","No suggestions.");g_=sue([bv(1,ba),bv(2,Be),bv(3,Gt),bv(4,gt)],g_);class mue{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?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Ht(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}}Et((r,e)=>{const t=r.getColor(fue);t&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${t}; }`);const i=r.getColor(gue);t&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${i}; }`);const n=r.getColor(cue);n&&e.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${n}; }`);const s=r.getColor(due);s&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${s}; }`);const o=r.getColor(uue);o&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${o}; }`);const a=r.getColor(Z_);a&&e.addRule(`.monaco-editor .suggest-details a { color: ${a}; }`);const l=r.getColor(X_);l&&e.addRule(`.monaco-editor .suggest-details a:hover { color: ${l}; }`);const c=r.getColor(uA);c&&e.addRule(`.monaco-editor .suggest-details code { background-color: ${c}; }`)});var _ue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},op=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class bue{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:k.fromPositions(t,s),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)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let ks=class u9{constructor(e,t,i,n,s,o){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._lineSuffix=new Un,this._toDispose=new ue,this._selectors=new vue(d=>d.priority),this.editor=e,this.model=s.createInstance(zT,this.editor);const a=ot.InsertMode.bindTo(n);a.set(e.getOption(105).insertMode),this.model.onDidTrigger(()=>a.set(e.getOption(105).insertMode)),this.widget=this._toDispose.add(new df(()=>{const d=this._instantiationService.createInstance(g_,this.editor);this._toDispose.add(d),this._toDispose.add(d.onDidSelect(p=>this._insertSuggestion(p,0),this));const u=new ude(this.editor,d,p=>this._insertSuggestion(p,2));this._toDispose.add(u),this._toDispose.add(this.model.onDidSuggest(p=>{p.completionModel.items.length===0&&u.reset()}));const h=ot.MakesTextEdit.bindTo(this._contextKeyService),f=ot.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=ot.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Xe(()=>{h.reset(),f.reset(),g.reset()})),this._toDispose.add(d.onDidFocus(({item:p})=>{const _=this.editor.getPosition(),v=p.editStart.column,b=_.column;let C=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!p.completion.command&&!p.completion.additionalTextEdits&&!(p.completion.insertTextRules&4)&&b-v===p.completion.insertText.length&&(C=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:v,endLineNumber:_.lineNumber,endColumn:b})!==p.completion.insertText),h.set(C),f.set(!U.equals(p.editInsertEnd,p.editReplaceEnd)),g.set(Boolean(p.provider.resolveCompletionItem)||Boolean(p.completion.documentation)||p.completion.detail!==p.completion.label)})),this._toDispose.add(d.onDetailsKeyDown(p=>{if(p.toKeybinding().equals(new _m(!0,!1,!1,!1,33))||tt&&p.toKeybinding().equals(new _m(!1,!1,!1,!0,33))){p.stopPropagation();return}p.toKeybinding().isModifierKey()||this.editor.focus()})),d})),this._overtypingCapturer=this._toDispose.add(new df(()=>this._toDispose.add(new gS(this.editor,this.model)))),this._alternatives=this._toDispose.add(new df(()=>this._toDispose.add(new bu(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(f_,e)),this._toDispose.add(this.model.onDidTrigger(d=>{this.widget.value.showTriggered(d.auto,d.shy?250:50),this._lineSuffix.value=new bue(this.editor.getModel(),d.position)})),this._toDispose.add(this.model.onDidSuggest(d=>{if(!d.shy){let u=-1;for(const h of this._selectors.itemsOrderedByPriorityDesc)if(u=h.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items),u!==-1)break;u===-1&&(u=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),d.completionModel.items)),this.widget.value.showSuggestions(d.completionModel,u,d.isFrozen,d.auto)}})),this._toDispose.add(this.model.onDidCancel(d=>{d.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));let l=ot.AcceptSuggestionsOnEnter.bindTo(n),c=()=>{const d=this.editor.getOption(1);l.set(d==="on"||d==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}static get(e){return e.getContribution(u9.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:s}=e,o=[],a=new Hn;t&1||this.editor.pushUndoStop();const l=this.getOverwriteInfo(s,Boolean(t&8));if(this._memoryService.memorize(i,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){const d=xc.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(u=>ai.replace(k.lift(u.range),u.text))),d.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){const d=new sa(!0);let u;const h=i.onDidChangeContent(_=>{if(_.isFlush){a.cancel(),h.dispose();return}for(let v of _.changes){const b=k.getEndPosition(v.range);(!u||U.isBefore(b,u))&&(u=b)}});let f=t;t|=2;let g=!1,p=this.editor.onWillType(()=>{p.dispose(),g=!0,f&2||this.editor.pushUndoStop()});o.push(s.resolve(a.token).then(()=>{if(!s.completion.additionalTextEdits||a.token.isCancellationRequested||u&&s.completion.additionalTextEdits.some(v=>U.isBefore(u,k.getStartPosition(v.range))))return!1;g&&this.editor.pushUndoStop();const _=xc.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(v=>ai.replace(k.lift(v.range),v.text))),_.restoreRelativeVerticalPositionOfCursor(this.editor),(g||!(f&2))&&this.editor.pushUndoStop(),!0}).then(_=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",d.elapsed(),_),h.dispose(),p.dispose()}))}let{insertText:c}=s.completion;s.completion.insertTextRules&4||(c=uS.escape(c)),ln.get(this.editor).insert(c,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command?s.completion.command.id===gb.id?this.model.trigger({auto:!0,shy:!1},!0):(o.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(Fe)),this.model.cancel()):this.model.cancel(),t&4&&this._alternatives.value.set(e,d=>{for(a.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(d,3|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(o).finally(()=>{this.model.clear(),a.dispose()})}getOverwriteInfo(e,t){Dt(this.editor.hasModel());let i=this.editor.getOption(105).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,o=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+o,overwriteAfter:s+a}}_alertCompletionItem(e){if(mr(e.completion.additionalTextEdits)){let t=m("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);sn(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,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=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const o=this.editor.getPosition(),a=s.editStart.column,l=o.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:a,endLineNumber:o.lineNumber,endColumn:l})!==s.completion.insertText};ke.once(this.model.onDidTrigger)(s=>{let o=[];ke.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{ft(o),i()},void 0,o),this.model.onDidSuggest(({completionModel:a})=>{if(ft(o),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},7)},void 0,o)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,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()}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)}};ks.ID="editor.contrib.suggestController";ks=_ue([op(1,o9),op(2,pi),op(3,Be),op(4,gt),op(5,_l)],ks);class vue{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class gb extends Se{constructor(){super({id:gb.id,label:m("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:me.and(R.writable,R.hasCompletionItemProvider),kbOpts:{kbExpr:R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[521,2087]},weight:100}})}run(e,t){const i=ks.get(t);!i||i.triggerSuggest()}}gb.id="editor.action.triggerSuggest";wt(ks.ID,ks);pe(gb);const cs=100+90,wr=dn.bindToContribution(ks.get);fe(new wr({id:"acceptSelectedSuggestion",precondition:ot.Visible,handler(r){r.acceptSelectedSuggestion(!0,!1)}}));zn.registerKeybindingRule({id:"acceptSelectedSuggestion",when:me.and(ot.Visible,R.textInputFocus),primary:2,weight:cs});zn.registerKeybindingRule({id:"acceptSelectedSuggestion",when:me.and(ot.Visible,R.textInputFocus,ot.AcceptSuggestionsOnEnter,ot.MakesTextEdit),primary:3,weight:cs});es.appendMenuItem(Rc,{command:{id:"acceptSelectedSuggestion",title:m("accept.insert","Insert")},group:"left",order:1,when:ot.HasInsertAndReplaceRange.toNegated()});es.appendMenuItem(Rc,{command:{id:"acceptSelectedSuggestion",title:m("accept.insert","Insert")},group:"left",order:1,when:me.and(ot.HasInsertAndReplaceRange,ot.InsertMode.isEqualTo("insert"))});es.appendMenuItem(Rc,{command:{id:"acceptSelectedSuggestion",title:m("accept.replace","Replace")},group:"left",order:1,when:me.and(ot.HasInsertAndReplaceRange,ot.InsertMode.isEqualTo("replace"))});fe(new wr({id:"acceptAlternativeSelectedSuggestion",precondition:me.and(ot.Visible,R.textInputFocus),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:1027,secondary:[1026]},handler(r){r.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Rc,group:"left",order:2,when:me.and(ot.HasInsertAndReplaceRange,ot.InsertMode.isEqualTo("insert")),title:m("accept.replace","Replace")},{menuId:Rc,group:"left",order:2,when:me.and(ot.HasInsertAndReplaceRange,ot.InsertMode.isEqualTo("replace")),title:m("accept.insert","Insert")}]}));lt.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");fe(new wr({id:"hideSuggestWidget",precondition:ot.Visible,handler:r=>r.cancelSuggestWidget(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:9,secondary:[1033]}}));fe(new wr({id:"selectNextSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectNextSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:18,secondary:[2066],mac:{primary:18,secondary:[2066,300]}}}));fe(new wr({id:"selectNextPageSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectNextPageSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:12,secondary:[2060]}}));fe(new wr({id:"selectLastSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectLastSuggestion()}));fe(new wr({id:"selectPrevSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectPrevSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:16,secondary:[2064],mac:{primary:16,secondary:[2064,302]}}}));fe(new wr({id:"selectPrevPageSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectPrevPageSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:11,secondary:[2059]}}));fe(new wr({id:"selectFirstSuggestion",precondition:me.and(ot.Visible,ot.MultipleSuggestions),handler:r=>r.selectFirstSuggestion()}));fe(new wr({id:"toggleSuggestionDetails",precondition:ot.Visible,handler:r=>r.toggleSuggestionDetails(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:2058,secondary:[2087],mac:{primary:266,secondary:[2087]}},menuOpts:[{menuId:Rc,group:"right",order:1,when:me.and(ot.DetailsVisible,ot.CanResolve),title:m("detail.more","show less")},{menuId:Rc,group:"right",order:1,when:me.and(ot.DetailsVisible.toNegated(),ot.CanResolve),title:m("detail.less","show more")}]}));fe(new wr({id:"toggleExplainMode",precondition:ot.Visible,handler:r=>r.toggleExplainMode(),kbOpts:{weight:100,primary:2133}}));fe(new wr({id:"toggleSuggestionFocus",precondition:ot.Visible,handler:r=>r.toggleSuggestionFocus(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:2570,mac:{primary:778}}}));fe(new wr({id:"insertBestCompletion",precondition:me.and(R.textInputFocus,me.equals("config.editor.tabCompletion","on"),f_.AtEnd,ot.Visible.toNegated(),bu.OtherSuggestions.toNegated(),ln.InSnippetMode.toNegated()),handler:(r,e)=>{r.triggerSuggestAndAcceptBest(er(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:cs,primary:2}}));fe(new wr({id:"insertNextSuggestion",precondition:me.and(R.textInputFocus,me.equals("config.editor.tabCompletion","on"),bu.OtherSuggestions,ot.Visible.toNegated(),ln.InSnippetMode.toNegated()),handler:r=>r.acceptNextSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:2}}));fe(new wr({id:"insertPrevSuggestion",precondition:me.and(R.textInputFocus,me.equals("config.editor.tabCompletion","on"),bu.OtherSuggestions,ot.Visible.toNegated(),ln.InSnippetMode.toNegated()),handler:r=>r.acceptPrevSuggestion(),kbOpts:{weight:cs,kbExpr:R.textInputFocus,primary:1026}}));pe(class extends Se{constructor(){super({id:"editor.action.resetSuggestSize",label:m("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(r,e){ks.get(e).resetWidgetSize()}});function Cue(r,e){return{object:r,dispose:()=>e==null?void 0:e.dispose()}}function wue(r,e){return(t,i)=>e(r(t),r(i))}function yue(){return(r,e)=>r-e}function Sue(r,e){let t;for(const i of r)(t===void 0||e(i,t)>0)&&(t=i);return t}class xue extends Z{constructor(e,t){super();this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new $t(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=ks.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(o,a,l)=>{const c=this.editor.getModel(),d=hy(c,this.suggestControllerPreselector());if(!d)return-1;const u=U.lift(a),h=l.map((g,p)=>{const _=R2(i,u,g,this.isShiftKeyPressed),v=hy(c,_),b=v.range.equalsRange(d.range)&&d.text.startsWith(v.text);return{index:p,valid:b,prefixLength:v.text.length,suggestItem:g}}).filter(g=>g.valid),f=Sue(h,wue(g=>g.prefixLength,yue()));return f?f.index:-1}}));let n=!1;const s=()=>{n||(n=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ke.once(i.model.onDidTrigger)(o=>{s()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItemAsInlineCompletion:this._currentInlineCompletion}}update(e){const t=this.getInlineCompletion();let i=!1;Nce(this._currentInlineCompletion,t)||(this._currentInlineCompletion=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const e=ks.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();if(!!t)return R2(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=ks.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=ks.get(this.editor);e&&e.forceRenderingAbove()}}function R2(r,e,t,i){if(Array.isArray(t.completion.additionalTextEdits)&&t.completion.additionalTextEdits.length>0)return{text:"",range:k.fromPositions(e,e)};let{insertText:n}=t.completion;if(t.completion.insertTextRules&4){const o=new uS().parse(n),a=r.editor.getModel();Oo.adjustWhitespace(a,e,o,!0,!0),n=o.toString()}const s=r.getOverwriteInfo(t,i);return{text:n,range:k.fromPositions(e.delta(0,-s.overwriteBefore),e.delta(0,Math.max(s.overwriteAfter,0)))}}var O2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Eue extends QV{constructor(e,t){super(e);this.cache=t,this.suggestionInlineCompletionSource=this._register(new xue(this.editor,()=>{var i,n;return(n=(i=this.cache.value)===null||i===void 0?void 0:i.completions[0])===null||n===void 0?void 0:n.toLiveInlineCompletion()})),this.updateOperation=this._register(new Un),this.updateCacheSoon=this._register(new $t(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const n=this.ghostText;n&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,kue(n.parts.map(s=>s.lines.length-1)))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(i=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())})),this._register(Xe(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(105).preview}updateCache(){return O2(this,void 0,void 0,function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItemAsInlineCompletion)return;const t={text:e.selectedItemAsInlineCompletion.text,range:e.selectedItemAsInlineCompletion.range},i=this.editor.getPosition(),n=Pi(o=>O2(this,void 0,void 0,function*(){let a;try{a=yield t9(i,this.editor.getModel(),{triggerKind:Gr.Automatic,selectedSuggestionInfo:t},o)}catch(l){Fe(l);return}o.isCancellationRequested||(this.cache.setValue(this.editor,a,Gr.Automatic),this.onDidChangeEmitter.fire())})),s=new e9(n,Gr.Automatic);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}get ghostText(){var e,t;const i=this.suggestionInlineCompletionSource.state,n=hy(this.editor.getModel(),i==null?void 0:i.selectedItemAsInlineCompletion),s=hy(this.editor.getModel(),(t=(e=this.cache.value)===null||e===void 0?void 0:e.completions[0])===null||t===void 0?void 0:t.toLiveInlineCompletion()),o=s&&n&&s.text.startsWith(n.text)&&s.range.equalsRange(n.range)?s:n||s,a=n?((o==null?void 0:o.text.length)||0)-n.text.length:0,c=(d=>{const u=this.editor.getOptions().get(105).previewMode;return d?JV(d,this.editor.getModel(),u,this.editor.getPosition(),a)||new XV(d.range.endLineNumber,[],this.minReservedLineCount):void 0})(o);return this.isSuggestionPreviewEnabled()?c:void 0}}function kue(r){return r.reduce((e,t)=>e+t,0)}var Lue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Tue=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Iue=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Due extends Z{constructor(){super(...arguments);this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new Un)}get targetModel(){var e;return(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object}setTargetModel(e){var t;((t=this.currentModelRef.value)===null||t===void 0?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?Cue(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=(t=(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object)===null||t===void 0?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;(t=this.targetModel)===null||t===void 0||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let YT=class extends Due{constructor(e,t){super();this.editor=e,this.commandService=t,this.sharedCache=this._register(new Aue),this.suggestWidgetAdapterModel=this._register(new Eue(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new HT(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=(t=this.activeInlineCompletionsModel)===null||t===void 0?void 0:t.ghostText;return i?i.parts.some(n=>e.containsPosition(new U(i.lineNumber,n.column))):!1}triggerInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.trigger(Gr.Explicit)}commitInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.hide()}showNextInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showNext()}showPreviousInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showPrevious()}hasMultipleInlineCompletions(){var e;return Iue(this,void 0,void 0,function*(){const t=yield(e=this.activeInlineCompletionsModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};YT=Lue([Tue(1,pi)],YT);class Aue extends Z{constructor(){super(...arguments);this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new Un)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new Bce(e,t,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var h9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wC=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Xx;const M2=(Xx=window.trustedTypes)===null||Xx===void 0?void 0:Xx.createPolicy("editorGhostText",{createHTML:r=>r});let ZT=class extends Z{constructor(e,t,i){super();this.editor=e,this.model=t,this.instantiationService=i,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(XT,this.editor)),this.additionalLinesWidget=this._register(new Nue(this.editor)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(29)||n.hasChanged(104)||n.hasChanged(87)||n.hasChanged(82)||n.hasChanged(44)||n.hasChanged(43)||n.hasChanged(58))&&this.update()})),this._register(Xe(()=>{var n;this.disposed=!0,this.update(),(n=this.viewMoreContentWidget)===null||n===void 0||n.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const i=new Array,n=new Array;function s(c,d){if(n.length>0){const u=n[n.length-1];d&&u.decorations.push(new Nr(u.content.length+1,u.content.length+1+c[0].length,d,0)),u.content+=c[0],c=c.slice(1)}for(const u of c)n.push({content:u,decorations:d?[new Nr(1,u.length+1,d,0)]:[]})}const o=this.editor.getModel().getLineContent(t.lineNumber);this.editor.getModel().getLineTokens(t.lineNumber);let a,l=0;for(const c of t.parts){let d=c.lines;a===void 0?(i.push({column:c.column,text:d[0],preview:c.preview}),d=d.slice(1)):s([o.substring(l,c.column-1)],void 0),d.length>0&&(s(d,"ghost-text"),a===void 0&&c.column<=o.length&&(a=c.column)),l=c.column-1}a!==void 0&&s([o.substring(l)],void 0),this.partsWidget.setParts(t.lineNumber,i,a!==void 0?{column:a,length:o.length+1-a}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),t.parts.some(c=>c.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new U(t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):((e=this.viewMoreContentWidget)===null||e===void 0||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,i){const n=this.editor.getOption(43),s=document.createElement("div");s.className="suggest-preview-additional-widget",Ln.applyFontInfoSlow(s,n);const o=document.createElement("span");o.className="content-spacer",o.append(t),s.append(o);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("\u23CE "),s.append(a);const l=new ue,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines\u2026`),l.add(Ei(c,"mousedown",d=>{var u;(u=this.model)===null||u===void 0||u.setExpanded(!0),d.preventDefault(),this.editor.focus()})),s.append(c),new Pue(this.editor,e,s,l)}};ZT=h9([wC(2,gt)],ZT);let XT=class{constructor(e,t,i,n){this.editor=e,this.codeEditorService=t,this.themeService=i,this.contextKeyService=n,this.decorationIds=[],this.disposableStore=new ue}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,i){this.disposableStore.clear();const n=this.themeService.getColorTheme(),s=n.getColor(t8);let o,a;s&&(o=String(s.rgba.a),a=q.Format.CSS.format(f9(s)));const l=n.getColor(e8);let c;l&&(c=`2px dashed ${l}`);const d=this.editor.getModel();if(!d)return;const{tabSize:u}=d.getOptions(),h=d.getLineContent(e)||"";let f=0,g="";const p=new Array;i&&p.push({range:k.fromPositions(new U(e,i.column),new U(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const _=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),v=_===void 0?!0:!!_;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map(b=>{g+=h.substring(f,b.column-1),f=b.column-1;const C=v?b.text:this.renderSingleLineText(b.text,g,u,!1),y=this.disposableStore.add(Mue(this.codeEditorService,"ghost-text","0-ghost-text-",{after:{contentText:C,opacity:o,color:a,border:c,fontWeight:b.preview?"bold":"normal"}}));return{range:k.fromPositions(new U(e,b.column)),options:v?{description:"ghost-text",after:{content:C,inlineClassName:b.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},y.resolve())}}).concat(p))}renderSingleLineText(e,t,i,n){const s=t+e,o=Pt.visibleColumnsByColumns(s,i);let a="",l=t.length+1;for(const c of e){if(c===" "){const d=o[l+1]-o[l];if(n){a+="\u2192";for(let u=1;u<d;u++)a+="\xA0"}else for(let u=0;u<d;u++)a+="\xA0"}else c===" "?n?a+="\xB7":a+="\xA0":a+=c;l+=1}return a}};XT=h9([wC(1,Ct),wC(2,Gt),wC(3,Be)],XT);function f9(r){const{r:e,b:t,g:i}=r.rgba;return new q(new Je(e,i,t,255))}class Nue{constructor(e){this.editor=e,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}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(o=>{this._viewZoneId&&(o.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");Rue(l,s,t,this.editor.getOptions()),this._viewZoneId=o.addZone({afterLineNumber:e,heightInLines:a,domNode:l})}})}}function Rue(r,e,t,i){const n=i.get(29),s=i.get(104),o="none",a=i.get(82),l=i.get(44),c=i.get(43),d=i.get(58),u=eu(1e4);u.appendASCIIString('<div class="suggest-preview-text">');for(let g=0,p=t.length;g<p;g++){const _=t[g],v=_.content;u.appendASCIIString('<div class="view-line'),u.appendASCIIString('" style="top:'),u.appendASCIIString(String(g*d)),u.appendASCIIString('px;width:1000000px;">');const b=yD(v),C=Gy(v),y=Gi.createEmpty(v);t0(new Mu(c.isMonospace&&!n,c.canUseHalfwidthRightwardsArrow,v,!1,b,C,0,y,_.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,s,o,a,l!==Lr.OFF,null),u),u.appendASCIIString("</div>")}u.appendASCIIString("</div>"),Ln.applyFontInfoSlow(r,c);const h=u.build(),f=M2?M2.createHTML(h):h;r.innerHTML=f}let Oue=0;function Mue(r,e,t,i){const n=t+Oue++;return r.registerDecorationType(e,n,i),{dispose(){r.removeDecorationType(n)},resolve(){return r.resolveDecorationOptions(n,!0)}}}class Pue extends Z{constructor(e,t,i,n){super();this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register(Xe(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Et((r,e)=>{const t=r.getColor(t8);if(t){const n=String(t.rgba.a),s=q.Format.CSS.format(f9(t));e.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${n} !important; color: ${s} !important; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${n} !important; color: ${s} !important; }`)}const i=r.getColor(e8);i&&e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 2px dashed ${i}; }`)});var g9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},QT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},pS=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let cn=class p9 extends Z{constructor(e,t){super();this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new Un),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(i=>{i.hasChanged(105)&&this.updateModelController(),i.hasChanged(54)&&this.updateModelController()})),this.updateModelController()}static get(e){return e.getContribution(p9.ID)}get activeModel(){var e;return(e=this.activeController.value)===null||e===void 0?void 0:e.model}updateModelController(){const e=this.editor.getOption(105),t=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(JT,this.editor):void 0}shouldShowHoverAt(e){var t;return((t=this.activeModel)===null||t===void 0?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return((i=(t=this.activeController.value)===null||t===void 0?void 0:t.widget)===null||i===void 0?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(e=this.activeModel)===null||e===void 0||e.triggerInlineCompletion()}commit(){var e;(e=this.activeModel)===null||e===void 0||e.commitInlineCompletion()}hide(){var e;(e=this.activeModel)===null||e===void 0||e.hideInlineCompletion()}showNextInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return pS(this,void 0,void 0,function*(){const t=yield(e=this.activeModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};cn.inlineSuggestionVisible=new xe("inlineSuggestionVisible",!1,m("inlineSuggestionVisible","Whether an inline suggestion is visible"));cn.inlineSuggestionHasIndentation=new xe("inlineSuggestionHasIndentation",!1,m("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));cn.ID="editor.contrib.ghostTextController";cn=g9([QT(1,gt)],cn);class Fue{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=cn.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=cn.inlineSuggestionHasIndentation.bindTo(this.contextKeyService)}}let JT=class extends Z{constructor(e,t,i){super();this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new Fue(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(YT,this.editor)),this.widget=this._register(this.instantiationService.createInstance(ZT,this.editor,this.model)),this._register(Xe(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(((e=this.model.activeInlineCompletionsModel)===null||e===void 0?void 0:e.ghostText)!==void 0);const t=this.model.inlineCompletionsModel.ghostText;if(t&&t.parts.length>0){const{column:i,lines:n}=t.parts[0],s=n[0].startsWith(" ")||n[0].startsWith(" "),o=this.editor.getModel().getLineIndentColumn(t.lineNumber),a=i<=o;this.contextKeys.inlineCompletionSuggestsIndentation.set(!!this.model.activeInlineCompletionsModel&&s&&a)}else this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)}};JT=g9([QT(1,gt),QT(2,Be)],JT);const m9=dn.bindToContribution(cn.get),p_=new m9({id:ZV,precondition:cn.inlineSuggestionVisible,handler(r){r.commit(),r.editor.focus()}});fe(p_);zn.registerKeybindingRule({primary:2,weight:200,id:p_.id,when:me.and(p_.precondition,R.tabMovesFocus.toNegated(),cn.inlineSuggestionHasIndentation.toNegated())});fe(new m9({id:"editor.action.inlineSuggest.hide",precondition:cn.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(r){r.hide()}}));class ig extends Se{constructor(){super({id:ig.ID,label:m("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:me.and(R.writable,cn.inlineSuggestionVisible),kbOpts:{weight:100,primary:601}})}run(e,t){return pS(this,void 0,void 0,function*(){const i=cn.get(t);i&&(i.showNextInlineCompletion(),t.focus())})}}ig.ID="editor.action.inlineSuggest.showNext";class ng extends Se{constructor(){super({id:ng.ID,label:m("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:me.and(R.writable,cn.inlineSuggestionVisible),kbOpts:{weight:100,primary:599}})}run(e,t){return pS(this,void 0,void 0,function*(){const i=cn.get(t);i&&(i.showPreviousInlineCompletion(),t.focus())})}}ng.ID="editor.action.inlineSuggest.showPrevious";class Bue extends Se{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:m("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:R.writable})}run(e,t){return pS(this,void 0,void 0,function*(){const i=cn.get(t);i&&i.trigger()})}}wt(cn.ID,cn);pe(Bue);pe(ig);pe(ng);var Wue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Vue{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let eI=class{constructor(e,t,i,n,s,o,a,l){this._editor=e,this._hover=t,this._commandService=i,this._menuService=n,this._contextKeyService=s,this._modeService=o,this._openerService=a,this.accessibilityService=l}suggestHoverAnchor(e){const t=cn.get(this._editor);if(!t)return null;if(e.target.type===8){const i=e.target.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new Vx(1e3,this,k.fromPositions(i.positionBefore||i.position,i.positionBefore||i.position))}return e.target.type===7&&e.target.range&&t.shouldShowHoverAt(e.target.range)?new Vx(1e3,this,e.target.range):e.target.type===6&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new Vx(1e3,this,e.target.range):null}computeSync(e,t){const i=cn.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new Vue(this,e.range,i)]:[]}renderHoverParts(e,t,i){const n=new ue,s=e[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(s,t,n);const o=n.add(this._menuService.createMenu(Ee.InlineCompletionsActions,this._contextKeyService)),a=i.addAction({label:m("showNextInlineSuggestion","Next"),commandId:ig.ID,run:()=>this._commandService.executeCommand(ig.ID)}),l=i.addAction({label:m("showPreviousInlineSuggestion","Previous"),commandId:ng.ID,run:()=>this._commandService.executeCommand(ng.ID)});i.addAction({label:m("acceptInlineSuggestion","Accept"),commandId:p_.id,run:()=>this._commandService.executeCommand(p_.id)});const c=[a,l];for(const d of c)d.setEnabled(!1);s.hasMultipleSuggestions().then(d=>{for(const u of c)u.setEnabled(d)});for(const[d,u]of o.getActions())for(const h of u)h instanceof Cc&&i.addAction({label:h.label,commandId:h.item.id,run:()=>this._commandService.executeCommand(h.item.id)});return n}renderScreenReaderText(e,t,i){var n,s;const o=oe,a=o("div.hover-row.markdown-hover"),l=X(a,o("div.hover-contents")),c=i.add(new Ac({editor:this._editor},this._modeService,this._openerService)),d=h=>{i.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const f=m("inlineSuggestionFollows","Suggestion:"),g=i.add(c.render(new gl().appendText(f).appendCodeblock("text",h)));l.replaceChildren(g.element)},u=(s=(n=e.controller.activeModel)===null||n===void 0?void 0:n.inlineCompletionsModel)===null||s===void 0?void 0:s.ghostText;if(u){const h=this._editor.getModel().getLineContent(u.lineNumber);d(u.renderForScreenReader(h))}t.appendChild(a)}};eI=Wue([xh(2,pi),xh(3,Bu),xh(4,Be),xh(5,Fs),xh(6,co),xh(7,Cr)],eI);var _9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tI=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},P2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const F2=oe;let iI=class extends Z{constructor(e){super();this._keybindingService=e,this._hasContent=!1,this.hoverElement=F2("div.hover-row.status-bar"),this.actionsElement=X(this.hoverElement,F2("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(BN.render(this.actionsElement,e,i))}append(e){const t=X(this.actionsElement,e);return this._hasContent=!0,t}};iI=_9([tI(0,Zt)],iI);class gy{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(t.type!==1)return[];const i=e.getModel(),n=t.range.startLineNumber,s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(o=>{if(o.options.isWholeLine)return!0;const a=o.range.startLineNumber===n?o.range.startColumn:1,l=o.range.endLineNumber===n?o.range.endColumn:s;return!(a>t.range.startColumn||t.range.endColumn>l)})}computeAsync(e){return P2(this,void 0,void 0,function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const i=gy._getLineDecorations(this._editor,t),n=yield Promise.all(this._participants.map(s=>this._computeAsync(s,i,t,e)));return WD(n)})}_computeAsync(e,t,i,n){return P2(this,void 0,void 0,function*(){return e.computeAsync?e.computeAsync(i,t,n):[]})}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=gy._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return Ou(t)}onResult(e,t){t?this._result=e.concat(this._result):this._result=this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor){for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}}return this._result.slice(0)}}let tc=class nI extends Hr{constructor(e,t,i,n){super();this._hoverVisibleKey=t,this._keybindingService=n,this.allowEditorOverflow=!0,this._participants=[i.createInstance(AT,e,this),i.createInstance(RT,e,this),i.createInstance(eI,e,this),i.createInstance(VT,e,this)],this._hover=this._register(new PV),this._editor=e,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,s=>{s.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(43)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new gy(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new BV(this._computer,s=>this._withResult(s,!0),null,s=>this._withResult(s,!1),this._editor.getOption(52).delay),this._register(Ei(this.getDomNode(),Te.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(Ei(this.getDomNode(),Te.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(e.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay)})),this._register(Qt.onDidChange(()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return nI.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(t===6)return!0;if(t===7){const i=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,n=e.target.detail;if(n&&!n.isAfterLines&&typeof n.horizontalDistanceToText=="number"&&n.horizontalDistanceToText<i)return!0}return!1}maybeShowAt(e){var t;const i=[];for(const n of this._participants)if(typeof n.suggestHoverAnchor=="function"){const s=n.suggestHoverAnchor(e);s&&i.push(s)}if(this._shouldShowAt(e)&&e.target.range){const s=[...((t=e.target.element)===null||t===void 0?void 0:t.classList.values())||[]].find(o=>o.startsWith("ced-colorBox"))&&e.target.range.endColumn-e.target.range.startColumn===1?new k(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;i.push(new o2(0,s))}return i.length===0?!1:(i.sort((n,s)=>s.priority-n.priority),this._startShowingAt(i[0],0,!1),!0)}_showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,i){this._startShowingAt(new o2(0,e),t,i)}_startShowingAt(e,t,i){if(!(this._lastAnchor&&this._lastAnchor.equals(e))){if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||!this._lastAnchor||!e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition))this.hide();else{const n=this._messages.filter(s=>s.isValidForHoverAnchor(e));if(n.length===0)this.hide();else{if(n.length===this._messages.length)return;this._renderMessages(e,n)}}this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(e,t){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let i=1073741824,n=t[0].range,s=null,o=document.createDocumentFragment();const a=new ue,l=new Map;for(const d of t)i=Math.min(i,d.range.startColumn),n=k.plusRange(n,d.range),d.forceShowAtRange&&(s=d.range),l.has(d.owner)||l.set(d.owner,[]),l.get(d.owner).push(d);const c=a.add(new iI(this._keybindingService));for(const[d,u]of l)a.add(d.renderHoverParts(u,o,c));c.hasContent&&o.appendChild(c.hoverElement),this._renderDisposable=a,o.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new U(e.range.startLineNumber,i),n,this._shouldFocus),this._updateContents(o)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,n?[{range:n,options:nI._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};tc.ID="editor.contrib.modesContentHoverWidget";tc._DECORATION_OPTIONS=qe.register({description:"content-hover-highlight",className:"hoverHighlight"});tc=_9([tI(2,gt),tI(3,Zt)],tc);const B2=oe;class Hue{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||sm(s)||i.push(...VD(s).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class Ad extends Hr{constructor(e,t,i=tq){super();this._renderDisposeables=this._register(new ue),this._editor=e,this._hover=this._register(new PV),this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new Ac({editor:this._editor},t,i)),this._computer=new Hue(this._editor),this._hoverOperation=new BV(this._computer,n=>this._withResult(n),void 0,n=>this._withResult(n),300),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(43)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Ad.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_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(58),o=this._hover.containerDomNode.clientHeight,a=i-n-(o-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-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._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=B2("div.hover-row.markdown-hover"),o=X(s,B2("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));o.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}}Ad.ID="editor.contrib.modesGlyphHoverWidget";var $ue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vv=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Oc=class b9{constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._modeService=n,this._toUnhook=new ue,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(o=>{o.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=R.hoverVisible.bindTo(s)}static get(e){return e.getContribution(b9.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(52);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;(e=this._contentWidget)===null||e===void 0||e.onModelDecorationsChanged(),(t=this._glyphWidget)===null||t===void 0||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;if(t===9&&e.target.detail===tc.ID){this._hoverClicked=!0;return}t===12&&e.target.detail===Ad.ID||(t!==12&&e.target.detail!==Ad.ID&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,s,o;let a=e.target.type;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&a===9&&e.target.detail===tc.ID||this._isHoverSticky&&!(!((i=(t=e.event.browserEvent.view)===null||t===void 0?void 0:t.getSelection())===null||i===void 0)&&i.isCollapsed)||!this._isHoverSticky&&a===9&&e.target.detail===tc.ID&&((n=this._contentWidget)===null||n===void 0?void 0:n.isColorPickerVisible())||this._isHoverSticky&&a===12&&e.target.detail===Ad.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(s=this._glyphWidget)===null||s===void 0||s.hide();return}if(a===2&&e.target.position){(o=this._contentWidget)===null||o===void 0||o.hide(),this._glyphWidget||(this._glyphWidget=new Ad(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(e.target.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(tc,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Oc.ID="editor.contrib.hover";Oc=$ue([vv(1,gt),vv(2,co),vv(3,Fs),vv(4,Be)],Oc);class Uue extends Se{constructor(){super({id:"editor.action.showHover",label:m({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2087),weight:100}})}run(e,t){if(!t.hasModel())return;let i=Oc.get(t);if(!i)return;const n=t.getPosition(),s=new k(n.lineNumber,n.column,n.lineNumber,n.column),o=t.getOption(2)===2;i.showContentHover(s,1,o)}}class zue extends Se{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:m({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let i=Oc.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new k(n.lineNumber,n.column,n.lineNumber,n.column);_u.get(t).startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,!0)})}}wt(Oc.ID,Oc);pe(Uue);pe(zue);Et((r,e)=>{const t=r.getColor(BZ);t&&e.addRule(`.monaco-editor .hoverHighlight { background-color: ${t}; }`);const i=r.getColor(su);i&&e.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const n=r.getColor(yA);n&&(e.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`));const s=r.getColor(Z_);s&&e.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const o=r.getColor(X_);o&&e.addRule(`.monaco-editor .monaco-hover a:hover { color: ${o}; }`);const a=r.getColor(wA);a&&e.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=r.getColor(WZ);l&&e.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const c=r.getColor(uA);c&&e.addRule(`.monaco-editor .monaco-hover code { background-color: ${c}; }`)});class rI extends Z{constructor(e){super();this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){var t;if(e.target.type!==6||![...((t=e.target.element)===null||t===void 0?void 0:t.classList.values())||[]].find(o=>o.startsWith("ced-colorBox"))||!e.target.range)return;const s=this._editor.getContribution(Oc.ID);if(!s.isColorPickerVisible()){const o=new k(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);s.showContentHover(o,0,!1)}}}rI.ID="editor.contrib.colorContribution";wt(rI.ID,rI);class ic{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let o=0;o<n;o++){const a=e.charCodeAt(i+o),l=t.charCodeAt(o);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,o){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,d=e.endColumn,u=s.getLineContent(a),h=s.getLineContent(c);let f=u.lastIndexOf(t,l-1+t.length),g=h.indexOf(i,d-1-i.length);if(f!==-1&&g!==-1)if(a===c)u.substring(f+t.length,g).indexOf(i)>=0&&(f=-1,g=-1);else{const _=u.substring(f+t.length),v=h.substring(0,g);(_.indexOf(i)>=0||v.indexOf(i)>=0)&&(f=-1,g=-1)}let p;f!==-1&&g!==-1?(n&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),n&&g>0&&h.charCodeAt(g-1)===32&&(i=" "+i,g-=1),p=ic._createRemoveBlockCommentOperations(new k(a,f+t.length+1,c,g+1),t,i)):(p=ic._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=p.length===1?i:null);for(const _ of p)o.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return k.isEmpty(e)?n.push(ai.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(ai.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ai.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let s=[];return k.isEmpty(e)?s.push(ai.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(ai.insert(new U(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(ai.insert(new U(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=Ue.getComments(s);!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(i.length===2){const n=i[0],s=i[1];return new _e(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new _e(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class Ma{constructor(e,t,i,n,s,o){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),s=Ue.getComments(n),o=s?s.lineCommentToken:null;if(!o)return null;let a=[];for(let l=0,c=i-t+1;l<c;l++)a[l]={ignore:!1,commentStr:o,commentStrOffset:0,commentStrLength:o.length};return a}static _analyzeLines(e,t,i,n,s,o,a){let l=!0,c;e===0?c=!0:e===1?c=!1:c=!0;for(let d=0,u=n.length;d<u;d++){const h=n[d],f=s+d;if(f===s&&a){h.ignore=!0;continue}const g=i.getLineContent(f),p=pr(g);if(p===-1){h.ignore=o,h.commentStrOffset=g.length;continue}if(l=!1,h.ignore=!1,h.commentStrOffset=p,c&&!ic._haystackHasNeedleAtOffset(g,h.commentStr,p)&&(e===0?c=!1:e===1||(h.ignore=!0)),c&&t){const _=p+h.commentStrLength;_<g.length&&g.charCodeAt(_)===32&&(h.commentStrLength+=1)}}if(e===0&&l){c=!1;for(let d=0,u=n.length;d<u;d++)n[d].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:n}}static _gatherPreflightData(e,t,i,n,s,o,a){const l=Ma._gatherPreflightCommentStrings(i,n,s);return l===null?{supported:!1}:Ma._analyzeLines(e,t,i,l,n,o,a)}_executeLineComments(e,t,i,n){let s;i.shouldRemoveComments?s=Ma._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(Ma._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const o=new U(n.positionLineNumber,n.positionColumn);for(let a=0,l=s.length;a<l;a++)t.addEditOperation(s[a].range,s[a].text),k.isEmpty(s[a].range)&&k.getStartPosition(s[a].range).equals(o)&&e.getLineContent(o.lineNumber).length+1===o.column&&(this._deltaColumn=(s[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let s=t.startLineNumber,o=t.endLineNumber,a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(s).lastIndexOf(i,a-1),c=e.getLineContent(o).indexOf(n,t.endColumn-1-i.length);return l!==-1&&c===-1&&(c=e.getLineContent(s).indexOf(n,l+i.length),o=s),l===-1&&c!==-1&&(l=e.getLineContent(o).lastIndexOf(i,c),s=o),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(s).indexOf(i),l!==-1&&(c=e.getLineContent(s).indexOf(n,l+i.length))),l!==-1&&e.getLineContent(s).charCodeAt(l+i.length)===32&&(i+=" "),c!==-1&&e.getLineContent(o).charCodeAt(c-1)===32&&(n=" "+n,c-=1),l!==-1&&c!==-1?ic._createRemoveBlockCommentOperations(new k(s,l+i.length+1,o,c+1),i,n):null}_executeBlockComment(e,t,i){e.tokenizeIfCheap(i.startLineNumber);let n=e.getLanguageIdAtPosition(i.startLineNumber,1),s=Ue.getComments(n);if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const o=s.blockCommentStartToken,a=s.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,o,a);if(!l){if(i.isEmpty()){const c=e.getLineContent(i.startLineNumber);let d=pr(c);d===-1&&(d=c.length),l=ic._createAddBlockCommentOperations(new k(i.startLineNumber,d+1,i.startLineNumber,c.length+1),o,a,this._insertSpace)}else l=ic._createAddBlockCommentOperations(new k(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),o,a,this._insertSpace);l.length===1&&(this._deltaColumn=o.length+1)}this._selectionId=t.trackSelection(i);for(const c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new k(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":` +`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=Ma._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new _e(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];o.ignore||i.push(ai.delete(new k(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){let i=[];const n=this._insertSpace?" ":"";for(let s=0,o=e.length;s<o;s++){const a=e[s];a.ignore||i.push(ai.insert(new U(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,o,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let u=0;for(let h=0,f=t[l].commentStrOffset;u<s&&h<f;h++)u=Ma.nextVisibleColumn(u,n,d.charCodeAt(h)===9,1);u<s&&(s=u)}s=Math.floor(s/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const d=e.getLineContent(i+l);let u=0;for(o=0,a=t[l].commentStrOffset;u<s&&o<a;o++)u=Ma.nextVisibleColumn(u,n,d.charCodeAt(o)===9,1);u>s?t[l].commentStrOffset=o-1:t[l].commentStrOffset=o}}}class zN extends Se{constructor(e,t){super(t);this._type=e}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=i.getOptions(),o=t.getOption(19),a=t.getSelections().map((c,d)=>({selection:c,index:d,ignoreFirstLine:!1}));a.sort((c,d)=>k.compareRangesUsingStarts(c.selection,d.selection));let l=a[0];for(let c=1;c<a.length;c++){const d=a[c];l.selection.endLineNumber===d.selection.startLineNumber&&(l.index<d.index?d.ignoreFirstLine=!0:(l.ignoreFirstLine=!0,l=d))}for(const c of a)n.push(new Ma(c.selection,s.tabSize,this._type,o.insertSpace,o.ignoreEmptyLines,c.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class jue extends zN{constructor(){super(0,{id:"editor.action.commentLine",label:m("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2133,weight:100},menuOpts:{menuId:Ee.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class que extends zN{constructor(){super(1,{id:"editor.action.addCommentLine",label:m("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2081),weight:100}})}}class Gue extends zN{constructor(){super(2,{id:"editor.action.removeCommentLine",label:m("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2099),weight:100}})}}class Kue extends Se{constructor(){super({id:"editor.action.blockComment",label:m("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:1567,linux:{primary:3103},weight:100},menuOpts:{menuId:Ee.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(19),n=[],s=t.getSelections();for(const o of s)n.push(new ic(o,i.insertSpace));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}pe(jue);pe(que);pe(Gue);pe(Kue);var Yue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ap=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let rg=class v9{constructor(e,t,i,n,s,o){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=o,this._toDispose=new ue,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(a=>this._onContextMenu(a))),this._toDispose.add(this._editor.onMouseWheel(a=>{if(this._contextMenuIsBeingShownCount>0){const l=this._contextViewService.getContextViewElement(),c=a.srcElement;c.shadowRoot&&Ru(l)===c.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(a=>{a.keyCode===58&&(a.preventDefault(),a.stopPropagation(),this.showContextMenu())}))}static get(e){return e.getContribution(v9.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||(e.event.preventDefault(),e.event.stopPropagation(),e.target.type!==6&&e.target.type!==7&&e.target.type!==1))return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20)||!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?Ee.SimpleEditorContext:Ee.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(let o of s){const[,a]=o;let l=0;for(const c of a)if(c instanceof eA){const d=this._getMenuActions(e,c.item.submenu);d.length>0&&(i.push(new m0(c.id,c.label,d)),l++)}else i.push(c),l++;l&&i.push(new Is)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=rn(this._editor.getDomNode()),a=o.left+s.left,l=o.top+s.top+s.height;t={x:a,y:l}}const n=this._editor.getOption(113)&&!ra;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:s=>{const o=this._keybindingFor(s);if(o)return new Zm(s,s,{label:!0,keybinding:o.getLabel(),isMenu:!0});const a=s;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new Zm(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};rg.ID="editor.contrib.contextmenu";rg=Yue([ap(1,Hc),ap(2,Vc),ap(3,Be),ap(4,Zt),ap(5,Bu)],rg);class Zue extends Se{constructor(){super({id:"editor.action.showContextMenu",label:m("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:1092,weight:100}})}run(e,t){rg.get(t).showContextMenu()}}wt(rg.ID,rg);pe(Zue);class Qx{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}}class Jx{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class vu extends Z{constructor(e){super();this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new Qx(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new Jx(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(vu.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new Jx(new Qx(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new Jx(new Qx(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}}vu.ID="editor.contrib.cursorUndoRedoController";class Xue extends Se{constructor(){super({id:"cursorUndo",label:m("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:2099,weight:100}})}run(e,t,i){vu.get(t).cursorUndo()}}class Que extends Se{constructor(){super({id:"cursorRedo",label:m("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){vu.get(t).cursorRedo()}}wt(vu.ID,vu);pe(Xue);pe(Que);class Jue{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new _e(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);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new _e(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new _e(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}function Eh(r){return tt?r.altKey:r.ctrlKey}class sl extends Z{constructor(e){super();this._editor=e,this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],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(31)||this._editor.getOption(18)||(Eh(e)&&(this._modifierPressed=!0),this._mouseDown&&Eh(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(31)||this._editor.getOption(18)||(Eh(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===sl.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){let t=e.target;if(this._dragSelection===null){let n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}Eh(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){let t=new U(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){let n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:o}=n;i=[new _e(s,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new _e(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(Eh(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(sl.ID,new Jue(this._dragSelection,t,Eh(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:sl._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}sl.ID="editor.contrib.dragAndDrop";sl.TRIGGER_KEY_VALUE=tt?6:5;sl._DECORATION_OPTIONS=qe.register({description:"dnd-target",className:"dnd-target"});wt(sl.ID,sl);class yn{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.deltaDecorations(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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);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}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const n=i.options;if(n===yn._FIND_MATCH_DECORATION||n===yn._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n<s;n++){let o=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(o)){t=this._decorations[n],i=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,yn._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,yn._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){let o=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(o);s=new k(s.startLineNumber,s.startColumn,o,a)}this._rangeHighlightDecorationId=n.addDecoration(s,yn._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=yn._FIND_MATCH_DECORATION,s=[];if(e.length>1e3){n=yn._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,d=Math.max(2,Math.ceil(3/c));let u=e[0].range.startLineNumber,h=e[0].range.endLineNumber;for(let f=1,g=e.length;f<g;f++){const p=e[f].range;h+d>=p.startLineNumber?p.endLineNumber>h&&(h=p.endLineNumber):(s.push({range:new k(u,1,h,1),options:yn._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=p.startLineNumber,h=p.endLineNumber)}s.push({range:new k(u,1,h,1),options:yn._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let a=0,l=e.length;a<l;a++)o[a]={range:e[a].range,options:n};this._decorations=i.deltaDecorations(this._decorations,o),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),t!=null&&t.length&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,yn._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;t<i;t++){let n=this._decorations[t],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.startLineNumber<e.lineNumber)){if(s.startLineNumber>e.lineNumber)return s;if(!(s.startColumn<e.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}yn._CURRENT_FIND_MATCH_DECORATION=qe.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:li(xA),position:Fr.Center},minimap:{color:li(qW),position:Qr.Inline}});yn._FIND_MATCH_DECORATION=qe.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:li(xA),position:Fr.Center},minimap:{color:li(qW),position:Qr.Inline}});yn._FIND_MATCH_NO_OVERVIEW_DECORATION=qe.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});yn._FIND_MATCH_ONLY_OVERVIEW_DECORATION=qe.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:li(xA),position:Fr.Center}});yn._RANGE_HIGHLIGHT_DECORATION=qe.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});yn._FIND_SCOPE_DECORATION=qe.register({description:"find-scope",className:"findScope",isWholeLine:!0});class ehe{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let i=[];for(let o=0;o<this._ranges.length;o++)i.push({range:this._ranges[o],text:this._replaceStrings[o]});i.sort((o,a)=>k.compareRangesUsingStarts(o.range,a.range));let n=[],s=i[0];for(let o=1;o<i.length;o++)s.range.endLineNumber===i[o].range.startLineNumber&&s.range.endColumn===i[o].range.startColumn?(s.range=s.range.plusRange(i[o].range),s.text=s.text+i[o].text):(n.push(s),s=i[o]);n.push(s);for(const o of n)t.addEditOperation(o.range,o.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function C9(r,e){if(r&&r[0]!==""){const t=W2(r,e,"-"),i=W2(r,e,"_");return t&&!i?V2(r,e,"-"):!t&&i?V2(r,e,"_"):r[0].toUpperCase()===r[0]?e.toUpperCase():r[0].toLowerCase()===r[0]?e.toLowerCase():Aj(r[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):r[0][0].toUpperCase()!==r[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function W2(r,e,t){return r[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&r[0].split(t).length===e.split(t).length}function V2(r,e,t){const i=e.split(t),n=r[0].split(t);let s="";return i.forEach((o,a)=>{s+=C9([n[a]],o)+t}),s.slice(0,-1)}class H2{constructor(e){this.staticValue=e,this.kind=0}}class the{constructor(e){this.pieces=e,this.kind=1}}class sg{constructor(e){!e||e.length===0?this._state=new H2(""):e.length===1&&e[0].staticValue!==null?this._state=new H2(e[0].staticValue):this._state=new the(e)}static fromStaticValue(e){return new sg([Yd.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,t){if(this._state.kind===0)return t?C9(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n<s;n++){let o=this._state.pieces[n];if(o.staticValue!==null){i+=o.staticValue;continue}let a=sg._substitute(o.matchIndex,e);if(o.caseOps!==null&&o.caseOps.length>0){let l=[],c=o.caseOps.length,d=0;for(let u=0,h=a.length;u<h;u++){if(d>=c){l.push(a.slice(u));break}switch(o.caseOps[d]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),d++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),d++;break;default:l.push(a[u])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class Yd{constructor(e,t,i){this.staticValue=e,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}static staticValue(e){return new Yd(e,-1,null)}static caseOps(e,t){return new Yd(null,e,t)}}class ihe{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Yd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=Yd.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=Yd.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new sg(this._result)}}function nhe(r){if(!r||r.length===0)return new sg(null);let e=[],t=new ihe(r);for(let i=0,n=r.length;i<n;i++){let s=r.charCodeAt(i);if(s===92){if(i++,i>=n)break;let o=r.charCodeAt(i);switch(o){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` +`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(o));break}continue}if(s===36){if(i++,i>=n)break;let o=r.charCodeAt(i);if(o===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(o===48||o===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=o&&o<=57){let a=o-48;if(i+1<n){let l=r.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return t.finalize()}const Qu=new xe("findWidgetVisible",!1),mS=new xe("findInputFocussed",!1),jN=new xe("replaceInputFocussed",!1),Cv={primary:545,mac:{primary:2593}},wv={primary:565,mac:{primary:2613}},yv={primary:560,mac:{primary:2608}},Sv={primary:554,mac:{primary:2602}},xv={primary:558,mac:{primary:2606}},Wt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},nc=19999,rhe=240;class cm{constructor(e,t){this._toDispose=new ue,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new rr,this._decorations=new yn(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new $t(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ft(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){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)},rhe)):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;typeof t!="undefined"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let n=this._findMatches(i,!1,nc);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(o===0&&n.length>0){const a=U3(n.map(l=>l.range),l=>k.compareRangesUsingStarts(l,s)>=0);o=a>0?a-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new U(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const d=this._decorations.matchAfterPosition(e);d&&this._setCurrentFindMatch(d);return}if(this._decorations.getCount()<nc){let d=this._decorations.matchBeforePosition(e);d&&d.isEmpty()&&d.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),d=this._decorations.matchBeforePosition(e)),d&&this._setCurrentFindMatch(d);return}if(this._cannotFind())return;let i=this._decorations.getFindScope(),n=cm._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:s,column:o}=e,a=this._editor.getModel(),l=new U(s,o),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),!!c){if(!t&&!n.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new U(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()<nc){let i=this._decorations.matchAfterPosition(e);i&&i.isEmpty()&&i.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),i=this._decorations.matchAfterPosition(e)),i&&this._setCurrentFindMatch(i);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;let s=this._decorations.getFindScope(),o=cm._getSearchRange(this._editor.getModel(),s);o.getEndPosition().isBefore(e)&&(e=o.getStartPosition()),e.isBefore(o.getStartPosition())&&(e=o.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),d=new U(a,l),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t);return i&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(d)&&(d=this._nextSearchPosition(d),u=c.findNextMatch(this._state.searchString,d,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t)),u?!n&&!o.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,i,!0):u:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?nhe(this._state.replaceString):sg.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new tn(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new U(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(s=>cm._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=nc?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new ad(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let u="mu";i.ignoreCase&&(u+="i"),i.global&&(u+="g"),i=new RegExp(i.source,u)}const n=this._editor.getModel(),s=n.getValue(1),o=n.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=s.replace(i,function(){return a.buildReplaceString(arguments,c)}):l=s.replace(i,a.buildReplaceString(null,c));let d=new DA(o,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",d)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,a=i.length;o<a;o++)n[o]=t.buildReplaceString(i[o].matches,this._state.preserveCase);let s=new ehe(this._editor.getSelection(),i.map(o=>o.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),i=this._findMatches(e,!1,1073741824).map(s=>new _e(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)),n=this._editor.getSelection();for(let s=0,o=i.length;s<o;s++)if(i[s].equalsRange(n)){i=[n].concat(i.slice(0,s)).concat(i.slice(s+1));break}this._editor.setSelections(i)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}const she={inputActiveOptionBorder:q.fromHex("#007ACC00"),inputActiveOptionForeground:q.fromHex("#FFFFFF"),inputActiveOptionBackground:q.fromHex("#0E639C50")};class pb extends Hr{constructor(e){super();this._onChange=this._register(new H),this.onChange=this._onChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},she),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...hr.asClassNameArray(this._opts.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,i=>{this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}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 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const ohe=m("caseDescription","Match Case"),ahe=m("wordsDescription","Match Whole Word"),lhe=m("regexDescription","Use Regular Expression");class w9 extends pb{constructor(e){super({icon:be.caseSensitive,title:ohe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class y9 extends pb{constructor(e){super({icon:be.wholeWord,title:ahe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class S9 extends pb{constructor(e){super({icon:be.regex,title:lhe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class _S extends Hr{constructor(e,t,i,n){super();this._hideSoon=this._register(new $t(()=>this._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.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s=n.getColorTheme().getColor(cL),o=n.getColorTheme().getColor(uL),a=n.getColorTheme().getColor(dL);this.caseSensitive=this._register(new w9({appendTitle:this._keybindingLabelFor(Wt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new y9({appendTitle:this._keybindingLabelFor(Wt.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new S9({appendTitle:this._keybindingLabelFor(Wt.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),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(l=>{let c=!1;l.isRegex&&(this.regex.checked=this._state.isRegex,c=!0),l.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,c=!0),l.matchCase&&(this.caseSensitive.checked=this._state.matchCase,c=!0),!this._state.isRevealed&&c&&this._revealTemporarily()})),this._register(fD(this._domNode,l=>this._onMouseOut())),this._register(J(this._domNode,"mouseover",l=>this._onMouseOver())),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return _S.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){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")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(cL),inputActiveOptionForeground:e.getColor(uL),inputActiveOptionBackground:e.getColor(dL)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}_S.ID="editor.contrib.findOptionsWidget";Et((r,e)=>{const t=r.getColor(Mr);t&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${t}; }`);const i=r.getColor(nl);i&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const n=r.getColor(Sc);n&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${n}; }`);const s=r.getColor(gi);s&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)});function Ev(r,e){return r===1?!0:r===2?!1:e}class che extends Z{constructor(){super();this._onFindReplaceStateChange=this._register(new H),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}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Ev(this._isRegexOverride,this._isRegex)}get wholeWord(){return Ev(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Ev(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Ev(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}changeMatchInfo(e,t,i){let 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},s=!1;t===0&&(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),typeof i!="undefined"&&(k.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let 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},o=!1;const a=this.isRegex,l=this.wholeWord,c=this.matchCase,d=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,o=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,o=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,o=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,o=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(!((n=e.searchScope)===null||n===void 0)&&n.every(u=>{var h;return(h=this._searchScope)===null||h===void 0?void 0:h.some(f=>!k.equalsRange(f,u))})||(this._searchScope=e.searchScope,s.searchScope=!0,o=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,o=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(o=!0,s.isRegex=!0),l!==this.wholeWord&&(o=!0,s.wholeWord=!0),c!==this.matchCase&&(o=!0,s.matchCase=!0),d!==this.preserveCase&&(o=!0,s.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=nc}}const dhe=m("defaultLabel","input");class uhe extends Hr{constructor(e,t,i,n){super();this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new H),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new H),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new H),this._onKeyUp=this._register(new H),this._onCaseSensitiveKeyDown=this._register(new H),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new H),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||dhe,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendCaseSensitiveLabel||"",o=n.appendWholeWordsLabel||"",a=n.appendRegexLabel||"",l=n.history||[],c=!!n.flexibleHeight,d=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new D6(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:l,showHistoryHint:n.showHistoryHint,flexibleHeight:c,flexibleWidth:d,flexibleMaxHeight:u})),this.regex=this._register(new S9({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new y9({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new w9({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let h=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){let p=h.indexOf(document.activeElement);if(p>=0){let _=-1;g.equals(17)?_=(p+1)%h.length:g.equals(15)&&(p===0?_=h.length-1:_=p-1),g.equals(9)?(h[p].blur(),this.inputBox.focus()):_>=0&&h[_].focus(),xt.stop(g,!0)}}});let f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.caseSensitive.domNode),f.appendChild(this.wholeWords.domNode),f.appendChild(this.regex.domNode),this.domNode.appendChild(f),e&&e.appendChild(this.domNode),this._register(J(this.inputBox.inputElement,"compositionstart",g=>{this.imeSessionInProgress=!0})),this._register(J(this.inputBox.inputElement,"compositionend",g=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,g=>this._onKeyDown.fire(g)),this.onkeyup(this.inputBox.inputElement,g=>this._onKeyUp.fire(g)),this.oninput(this.inputBox.inputElement,g=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,g=>this._onMouseDown.fire(g))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.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()}clearMessage(){this.inputBox.hideMessage()}}const hhe=m("defaultLabel","input"),fhe=m("label.preserveCaseCheckbox","Preserve Case");class ghe extends pb{constructor(e){super({icon:be.preserveCase,title:fhe+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class phe extends Hr{constructor(e,t,i,n){super();this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new H),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new H),this._onInput=this._register(new H),this._onKeyUp=this._register(new H),this._onPreserveCaseKeyDown=this._register(new H),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||hhe,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",o=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new D6(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c})),this.preserveCase=this._register(new ghe({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(h=>{this._onDidOptionChange.fire(h),!h&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(h=>{this._onPreserveCaseKeyDown.fire(h)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let d=[this.preserveCase.domNode];this.onkeydown(this.domNode,h=>{if(h.equals(15)||h.equals(17)||h.equals(9)){let f=d.indexOf(document.activeElement);if(f>=0){let g=-1;h.equals(17)?g=(f+1)%d.length:h.equals(15)&&(f===0?g=d.length-1:g=f-1),h.equals(9)?(d[f].blur(),this.inputBox.focus()):g>=0&&d[g].focus(),xt.stop(h,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,h=>this._onKeyDown.fire(h)),this.onkeyup(this.inputBox.inputElement,h=>this._onKeyUp.fire(h)),this.oninput(this.inputBox.inputElement,h=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,h=>this._onMouseDown.fire(h))}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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var x9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},E9=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const m_="historyNavigationWidget",k9="historyNavigationForwardsEnabled",L9="historyNavigationBackwardsEnabled";function mhe(r,e,t){new xe(t,e).bindTo(r)}function _he(r,e){return r.createScoped(e.target)}function T9(r,e){return r.getContext(document.activeElement).getValue(e)}function I9(r,e){const t=_he(r,e);mhe(t,e,m_);const i=new xe(k9,!0).bindTo(t),n=new xe(L9,!0).bindTo(t);return{scopedContextKeyService:t,historyNavigationForwardsEnablement:i,historyNavigationBackwardsEnablement:n}}let sI=class extends uhe{constructor(e,t,i,n,s=!1){super(e,t,s,i);this._register(I9(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};sI=x9([E9(3,Be)],sI);let oI=class extends phe{constructor(e,t,i,n,s=!1){super(e,t,s,i);this._register(I9(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};oI=x9([E9(3,Be)],oI);zn.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:me.and(me.has(m_),me.equals(L9,!0),ot.Visible.isEqualTo(!1)),primary:16,secondary:[528],handler:r=>{const e=T9(r.get(Be),m_);e&&e.historyNavigator.showPreviousValue()}});zn.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:me.and(me.has(m_),me.equals(k9,!0),ot.Visible.isEqualTo(!1)),primary:18,secondary:[530],handler:r=>{const e=T9(r.get(Be),m_);e&&e.historyNavigator.showNextValue()}});function $2(r){var e,t;return((e=r.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=r.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var bhe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const vhe=un("find-selection",be.selection,m("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),U2=un("find-collapsed",be.chevronRight,m("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),z2=un("find-expanded",be.chevronDown,m("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),Che=un("find-replace",be.replace,m("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),whe=un("find-replace-all",be.replaceAll,m("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),yhe=un("find-previous-match",be.arrowUp,m("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),She=un("find-next-match",be.arrowDown,m("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),xhe=m("label.find","Find"),Ehe=m("placeholder.find","Find"),khe=m("label.previousMatchButton","Previous Match"),Lhe=m("label.nextMatchButton","Next Match"),The=m("label.toggleSelectionFind","Find in Selection"),Ihe=m("label.closeButton","Close"),Dhe=m("label.replace","Replace"),Ahe=m("placeholder.replace","Replace"),Nhe=m("label.replaceButton","Replace"),Rhe=m("label.replaceAllButton","Replace All"),Ohe=m("label.toggleReplaceButton","Toggle Replace"),Mhe=m("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",nc),Phe=m("label.matchesLocation","{0} of {1}"),j2=m("label.noResults","No results"),To=419,Fhe=275,Bhe=Fhe-54;let lp=69;const Whe=33,q2="ctrlEnterReplaceAll.windows.donotask",G2=tt?256:2048;class eE{constructor(e){this.afterLineNumber=e,this.heightInPx=Whe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function K2(r,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){r.stopPropagation();return}}function Y2(r,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEnd<t.value.length){r.stopPropagation();return}}class bS extends Hr{constructor(e,t,i,n,s,o,a,l,c){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=n,this._keybindingService=s,this._contextKeyService=o,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(q2,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new cl(500),this._register(Xe(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(d=>this._onStateChanged(d))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(d=>{if(d.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),d.hasChanged(129)&&this._tryUpdateWidgetWidth(),d.hasChanged(2)&&this.updateAccessibilitySupport(),d.hasChanged(35)){const u=this._codeEditor.getOption(35).addExtraSpaceOnTop;u&&!this._viewZone&&(this._viewZone=new eE(0),this._showViewZone()),!u&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>bhe(this,void 0,void 0,function*(){if(this._isVisible){let d=yield this._controller.getGlobalBufferTerm();d&&d!==this._state.searchString&&(this._state.change({searchString:d},!1),this._findInput.select())}}))),this._findInputFocused=mS.bindTo(o),this._findFocusTracker=this._register(Rf(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=jN.bindTo(o),this._replaceFocusTracker=this._register(Rf(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(35).addExtraSpaceOnTop&&(this._viewZone=new eE(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(d=>{if(d.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return bS.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(80)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=ps(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){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),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,Fe)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=lp+"px",this._state.matchesCount>=nc?this._matchesCount.title=Mhe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=nc&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=bn(Phe,i,t)}else e=j2;this._matchesCount.appendChild(document.createTextNode(e)),sn(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),lp=Math.max(lp,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===j2)return i===""?m("ariaSearchNoResultEmpty","{0} found",e):m("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=m("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return m("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,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);let 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);let i=!this._codeEditor.getOption(80);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(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;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(35).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=rn(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const l=r3(this._domNode).left;o>l&&(t=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),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(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new eE(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;let o=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(74).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(cL),inputActiveOptionBackground:e.getColor(dL),inputActiveOptionForeground:e.getColor(uL),inputBackground:e.getColor(hA),inputForeground:e.getColor(fA),inputBorder:e.getColor(gA),inputValidationInfoBackground:e.getColor(pA),inputValidationInfoForeground:e.getColor(mA),inputValidationInfoBorder:e.getColor(_A),inputValidationWarningBackground:e.getColor(PW),inputValidationWarningForeground:e.getColor(FW),inputValidationWarningBorder:e.getColor(BW),inputValidationErrorBackground:e.getColor(WW),inputValidationErrorForeground:e.getColor(VW),inputValidationErrorBorder:e.getColor(HW)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible||!uD(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,o=!1,a=!1;if(this._resized&&ps(this._domNode)>To){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=ps(this._findInput.domNode);return}if(To+28+n>=i&&(o=!0),To+28+n-lp>=i&&(a=!0),To+28+n-lp>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",o),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._resized){this._findInput.inputBox.layout();let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=ps(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 this._cachedHeight!==null&&this._cachedHeight===e?!1:(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){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(G2|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return K2(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return Y2(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(G2|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{an&&io&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(m("ctrlEnter.keybindingChanged","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(q2,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` +`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1026)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2066)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return K2(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return Y2(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){this._findInput=this._register(new sI(null,this._contextViewProvider,{width:Bhe,label:xhe,placeholder:Ehe,appendCaseSensitiveLabel:this._keybindingLabelFor(Wt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(Wt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(Wt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>$2(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),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(l=>{l.equals(1026)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),ir&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new kh({label:khe+this._keybindingLabelFor(Wt.PreviousMatchFindAction),icon:yhe,onTrigger:()=>{this._codeEditor.getAction(Wt.PreviousMatchFindAction).run().then(void 0,Fe)}})),this._nextBtn=this._register(new kh({label:Lhe+this._keybindingLabelFor(Wt.NextMatchFindAction),icon:She,onTrigger:()=>{this._codeEditor.getAction(Wt.NextMatchFindAction).run().then(void 0,Fe)}}));let 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 pb({icon:vhe,title:The+this._keybindingLabelFor(Wt.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new kh({label:Ihe+this._keybindingLabelFor(Wt.CloseFindWidgetCommand),icon:gte,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new oI(null,void 0,{label:Dhe,placeholder:Ahe,appendPreserveCaseLabel:this._keybindingLabelFor(Wt.TogglePreserveCaseCommand),history:[],flexibleHeight:!0,flexibleWidth:!0,flexibleMaxHeight:118,showHistoryHint:()=>$2(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.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(),l.preventDefault())})),this._replaceBtn=this._register(new kh({label:Nhe+this._keybindingLabelFor(Wt.ReplaceOneAction),icon:Che,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1026)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new kh({label:Rhe+this._keybindingLabelFor(Wt.ReplaceAllAction),icon:whe,onTrigger:()=>{this._controller.replaceAll()}}));let 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 kh({label:Ohe,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=ps(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.style.width=`${To}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(s),this._resizeSash=new _n(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=To;this._register(this._resizeSash.onDidStart(()=>{a=ps(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<To)return;const d=parseFloat(pD(this._domNode).maxWidth)||0;c>d||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=ps(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=ps(this._domNode);if(l<To)return;let c=To;if(!this._resized||l===To){const d=this._codeEditor.getLayoutInfo();c=d.width-28-d.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=ps(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}}bS.ID="editor.contrib.findWidget";class kh extends Hr{constructor(e){super();this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+qt.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,i=>{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(i)})}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(...qt.asClassNameArray(U2)),this._domNode.classList.add(...qt.asClassNameArray(z2))):(this._domNode.classList.remove(...qt.asClassNameArray(z2)),this._domNode.classList.add(...qt.asClassNameArray(U2)))}}Et((r,e)=>{const t=(g,p)=>{p&&e.addRule(`.monaco-editor ${g} { background-color: ${p}; }`)};t(".findMatch",r.getColor(fL)),t(".currentFindMatch",r.getColor(RZ)),t(".findScope",r.getColor(OZ));const i=r.getColor(Mr);t(".find-widget",i);const n=r.getColor(Sc);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=r.getColor(PZ);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${r.type==="hc"?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const o=r.getColor(MZ);o&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${o}; padding: 1px; box-sizing: border-box; }`);const a=r.getColor(FZ);a&&e.addRule(`.monaco-editor .findScope { border: 1px ${r.type==="hc"?"dashed":"solid"} ${a}; }`);const l=r.getColor(gi);l&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=r.getColor(nl);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const d=r.getColor(fZ);d&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${d}; }`);const u=r.getColor(yZ);if(u)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{const g=r.getColor(Wd);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}const h=r.getColor(vX);h&&e.addRule(` + .monaco-editor .find-widget .button:not(.disabled):hover, + .monaco-editor .find-widget .codicon-find-selection:hover { + background-color: ${h} !important; + } + `);const f=r.getColor(yc);f&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${f}; }`)});var D9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mo=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},og=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Vhe=524288;function aI(r,e="single",t=!1){if(!r.hasModel())return null;const i=r.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=r.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(r.getModel().getValueLengthInRange(i)<Vhe)return r.getModel().getValueInRange(i)}return null}let Vr=class A9 extends Z{constructor(e,t,i,n){super();this._editor=e,this._findWidgetVisible=Qu.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new cl(500),this._state=this._register(new che),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(s=>this._onStateChanged(s))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let s=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),s&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(A9.ID)}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,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}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!!mS.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()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Ns(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return og(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){let i=aI(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);i&&(this._state.isRegex?t.searchString=Ns(i):t.searchString=i)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let i=aI(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let i=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;i&&(t.searchString=i)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let i=this._editor.getSelections();i.some(n=>!n.isEmpty())&&(t.searchScope=i)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new cm(this._editor,this._state))})}start(e){return this._start(e)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return og(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Vr.ID="editor.contrib.findController";Vr=D9([Mo(1,Be),Mo(2,ba),Mo(3,$c)],Vr);let lI=class extends Vr{constructor(e,t,i,n,s,o,a,l){super(e,i,a,l);this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._notificationService=o,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return og(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber;break}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&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 bS(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new _S(this._editor,this._state,this._keybindingService,this._themeService))}};lI=D9([Mo(1,Vc),Mo(2,Be),Mo(3,Zt),Mo(4,Gt),Mo(5,ki),Mo(6,ba),Mo(7,$c)],lI);const Hhe=CW(new vW({id:Wt.StartFindAction,label:m("startFindAction","Find"),alias:"Find",precondition:me.or(R.focus,me.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2084,weight:100},menuOpts:{menuId:Ee.MenubarEditMenu,group:"3_find",title:m({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));Hhe.addImplementation(0,(r,e,t)=>{const i=Vr.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}):!1});class $he extends Se{constructor(){super({id:Wt.StartFindWithSelection,label:m("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2083},weight:100}})}run(e,t){return og(this,void 0,void 0,function*(){let i=Vr.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class N9 extends Se{run(e,t){return og(this,void 0,void 0,function*(){let i=Vr.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(i))})}}class Uhe extends N9{constructor(){super({id:Wt.NextMatchFindAction,label:m("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:R.focus,primary:61,mac:{primary:2085,secondary:[61]},weight:100},{kbExpr:me.and(R.focus,mS),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class zhe extends N9{constructor(){super({id:Wt.PreviousMatchFindAction,label:m("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:R.focus,primary:1085,mac:{primary:3109,secondary:[1085]},weight:100},{kbExpr:me.and(R.focus,mS),primary:1027,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class R9 extends Se{run(e,t){return og(this,void 0,void 0,function*(){let i=Vr.get(t);if(!i)return;const n=t.getOption(35).seedSearchStringFromSelection==="selection";let s=null;t.getOption(35).seedSearchStringFromSelection!=="never"&&(s=aI(t,"single",n)),s&&i.setSearchString(s),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(i))})}}class jhe extends R9{constructor(){super({id:Wt.NextSelectionMatchFindAction,label:m("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2109,weight:100}})}_run(e){return e.moveToNextMatch()}}class qhe extends R9{constructor(){super({id:Wt.PreviousSelectionMatchFindAction,label:m("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:3133,weight:100}})}_run(e){return e.moveToPrevMatch()}}const Ghe=CW(new vW({id:Wt.StartFindReplaceAction,label:m("startReplace","Replace"),alias:"Replace",precondition:me.or(R.focus,me.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2086,mac:{primary:2596},weight:100},menuOpts:{menuId:Ee.MenubarEditMenu,group:"3_find",title:m({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));Ghe.addImplementation(0,(r,e,t)=>{if(!e.hasModel()||e.getOption(80))return!1;const i=Vr.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),o=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(35).seedSearchStringFromSelection!=="never"&&!s,a=s||o?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:o?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop})});wt(Vr.ID,lI);pe($he);pe(Uhe);pe(zhe);pe(jhe);pe(qhe);const Co=dn.bindToContribution(Vr.get);fe(new Co({id:Wt.CloseFindWidgetCommand,precondition:Qu,handler:r=>r.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:me.and(R.focus,me.not("isComposing")),primary:9,secondary:[1033]}}));fe(new Co({id:Wt.ToggleCaseSensitiveCommand,precondition:void 0,handler:r=>r.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Cv.primary,mac:Cv.mac,win:Cv.win,linux:Cv.linux}}));fe(new Co({id:Wt.ToggleWholeWordCommand,precondition:void 0,handler:r=>r.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:wv.primary,mac:wv.mac,win:wv.win,linux:wv.linux}}));fe(new Co({id:Wt.ToggleRegexCommand,precondition:void 0,handler:r=>r.toggleRegex(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:yv.primary,mac:yv.mac,win:yv.win,linux:yv.linux}}));fe(new Co({id:Wt.ToggleSearchScopeCommand,precondition:void 0,handler:r=>r.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Sv.primary,mac:Sv.mac,win:Sv.win,linux:Sv.linux}}));fe(new Co({id:Wt.TogglePreserveCaseCommand,precondition:void 0,handler:r=>r.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:xv.primary,mac:xv.mac,win:xv.win,linux:xv.linux}}));fe(new Co({id:Wt.ReplaceOneAction,precondition:Qu,handler:r=>r.replace(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:3094}}));fe(new Co({id:Wt.ReplaceOneAction,precondition:Qu,handler:r=>r.replace(),kbOpts:{weight:100+5,kbExpr:me.and(R.focus,jN),primary:3}}));fe(new Co({id:Wt.ReplaceAllAction,precondition:Qu,handler:r=>r.replaceAll(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:2563}}));fe(new Co({id:Wt.ReplaceAllAction,precondition:Qu,handler:r=>r.replaceAll(),kbOpts:{weight:100+5,kbExpr:me.and(R.focus,jN),primary:void 0,mac:{primary:2051}}}));fe(new Co({id:Wt.SelectAllMatchesAction,precondition:Qu,handler:r=>r.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:515}}));const Z2=65535,Ga=16777215,X2=4278190080;class __{constructor(e,t,i){if(e.length!==t.length||e.length>Z2)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(i,n)=>{let s=e[e.length-1];return this.getStartLineNumber(s)<=i&&this.getEndLineNumber(s)>=n};for(let i=0,n=this._startIndexes.length;i<n;i++){let s=this._startIndexes[i],o=this._endIndexes[i];if(s>Ga||o>Ga)throw new Error("startLineNumber or endLineNumber must not exceed "+Ga);for(;e.length>0&&!t(s,o);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=s+((a&255)<<24),this._endIndexes[i]=o+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&Ga}getEndLineNumber(e){return this._endIndexes[e]&Ga}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return(this._collapseStates[t]&1<<i)!==0}setCollapsed(e,t){let i=e/32|0,n=e%32,s=this._collapseStates[i];t?this._collapseStates[i]=s|1<<n:this._collapseStates[i]=s&~(1<<n)}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),i=!0);return i}toRegion(e){return new Khe(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&X2)>>>24)+((this._endIndexes[e]&X2)>>>16);return t===Z2?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t<i;){let n=Math.floor((t+i)/2);e<this.getStartLineNumber(n)?i=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t<this.length;t++)e[t]=`[${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}}class Khe{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 Yhe{constructor(e,t){this._updateEventEmitter=new H,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new __(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,n)=>i.regionIndex-n.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,s=-1,o=-1;const a=l=>{for(;n<l;){const c=this._regions.getEndLineNumber(n),d=this._regions.isCollapsed(n);c<=s&&i.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(d,c<=o)),d&&c>o&&(o=c),n++}};for(let l of e){let c=l.regionIndex,d=this._editorDecorationIds[c];if(d&&!t[d]){t[d]=!0,a(c);let u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),s=Math.max(s,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=(u,h)=>{for(let f of t)if(u<f&&f<=h)return!0;return!1},s=-1,o=(u,h)=>{const f=e.getStartLineNumber(u),g=e.getEndLineNumber(u);h||(h=e.isCollapsed(u)),h&&n(f,g)&&(h=!1),e.setCollapsed(u,h);const p=this._textModel.getLineMaxColumn(f),_={startLineNumber:f,startColumn:Math.max(p-1,1),endLineNumber:f,endColumn:p};i.push({range:_,options:this._decorationProvider.getDecorationOption(h,g<=s)}),h&&g>s&&(s=g)},a=0,l=()=>{for(;a<this._regions.length;){let u=this._regions.isCollapsed(a);if(a++,u)return a-1}return-1},c=0,d=l();for(;d!==-1&&c<e.length;){let u=this._textModel.getDecorationRange(this._editorDecorationIds[d]);if(u){let h=u.startLineNumber;if(u.startColumn===Math.max(u.endColumn-1,1)&&this._textModel.getLineMaxColumn(h)===u.endColumn)for(;c<e.length;){let f=e.getStartLineNumber(c);if(h>=f)o(c,h===f),c++;else break}}d=l()}for(;c<e.length;)o(c,!1),c++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,i),this._regions=e,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let e=[];for(let t=0;t<this._regions.length;t++)if(this._regions.isCollapsed(t)){let i=this._textModel.getDecorationRange(this._editorDecorationIds[t]);if(i){let n=i.startLineNumber,s=i.endLineNumber+this._regions.getEndLineNumber(t)-this._regions.getStartLineNumber(t);e.push({startLineNumber:n,endLineNumber:s})}}if(e.length>0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let n=this.getRegionAtLine(i.startLineNumber);n&&!n.isCollapsed&&t.push(n)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){let o=this._regions.toRegion(n);(!t||t(o,s))&&i.push(o),s++,n=o.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const o=[];for(let a=n,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<s){for(;o.length>0&&!c.containedBy(o[o.length-1]);)o.pop();o.push(c),t(c,o.length)&&i.push(c)}else break}}else for(let o=n,a=this._regions.length;o<a;o++){let l=this._regions.toRegion(o);if(this._regions.getStartLineNumber(o)<s)(!t||t(l))&&i.push(l);else break}return i}}function Zhe(r,e,t){let i=[];for(let n of t){let s=r.getRegionAtLine(n);if(s){const o=!s.isCollapsed;if(i.push(s),e>1){let a=r.getRegionsInside(s,(l,c)=>l.isCollapsed!==o&&c<e);i.push(...a)}}}r.toggleCollapseState(i)}function Ig(r,e,t=Number.MAX_VALUE,i){let n=[];if(i&&i.length>0)for(let s of i){let o=r.getRegionAtLine(s);if(o&&(o.isCollapsed!==e&&n.push(o),t>1)){let a=r.getRegionsInside(o,(l,c)=>l.isCollapsed!==e&&c<t);n.push(...a)}}else{let s=r.getRegionsInside(null,(o,a)=>o.isCollapsed!==e&&a<t);n.push(...s)}r.toggleCollapseState(n)}function O9(r,e,t,i){let n=[];for(let s of i){let o=r.getAllRegionsAtLine(s,(a,l)=>a.isCollapsed!==e&&l<=t);n.push(...o)}r.toggleCollapseState(n)}function Xhe(r,e,t){let i=[];for(let n of t){let s=r.getAllRegionsAtLine(n,o=>o.isCollapsed!==e);s.length>0&&i.push(s[0])}r.toggleCollapseState(i)}function Qhe(r,e,t,i){let n=(o,a)=>a===e&&o.isCollapsed!==t&&!i.some(l=>o.containsLine(l)),s=r.getRegionsInside(null,n);r.toggleCollapseState(s)}function M9(r,e,t){let i=[];for(let o of t)i.push(r.getAllRegionsAtLine(o,void 0)[0]);let n=o=>i.every(a=>!a.containedBy(o)&&!o.containedBy(a))&&o.isCollapsed!==e,s=r.getRegionsInside(null,n);r.toggleCollapseState(s)}function qN(r,e,t){let i=r.textModel,n=r.regions,s=[];for(let o=n.length-1;o>=0;o--)if(t!==n.isCollapsed(o)){let a=n.getStartLineNumber(o);e.test(i.getLineContent(a))&&s.push(n.toRegion(o))}r.toggleCollapseState(s)}function GN(r,e,t){let i=r.regions,n=[];for(let s=i.length-1;s>=0;s--)t!==i.isCollapsed(s)&&e===i.getType(s)&&n.push(i.toRegion(s));r.toggleCollapseState(n)}function Jhe(r,e){let t=null,i=e.getRegionAtLine(r);if(i!==null&&(t=i.startLineNumber,r===t)){let n=i.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function efe(r,e){let t=e.getRegionAtLine(r);if(t!==null&&t.startLineNumber===r){if(r!==t.startLineNumber)return t.startLineNumber;{let i=t.parentIndex,n=0;for(i!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber<r)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function tfe(r,e){let t=e.getRegionAtLine(r);if(t!==null&&t.startLineNumber===r){let i=t.parentIndex,n=0;if(i!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>r)return t.startLineNumber;t.regionIndex<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}class ife{constructor(e){this._updateEventEmitter=new H,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,s=Number.MAX_VALUE,o=-1,a=this._foldingModel.regions;for(;i<a.length;i++){if(!a.isCollapsed(i))continue;let l=a.getStartLineNumber(i)+1,c=a.getEndLineNumber(i);s<=l&&c<=o||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===l&&this._hiddenRanges[n].endLineNumber===c?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new k(l,1,c,1))),s=l,o=c)}(e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyMemento(e){if(!Array.isArray(e)||e.length===0)return!1;let t=[];for(let i of e){if(!i.startLineNumber||!i.endLineNumber)return!1;t.push(new k(i.startLineNumber+1,1,i.endLineNumber,1))}return this.applyHiddenRanges(t),!0}getMemento(){return this._hiddenRanges.map(e=>({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber}))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return Q2(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,s=o=>((!n||!nfe(o,n))&&(n=Q2(this._hiddenRanges,o)),n?n.startLineNumber-1:null);for(let o=0,a=e.length;o<a;o++){let l=e[o],c=s(l.startLineNumber);c&&(l=l.setStartPosition(c,i.getLineMaxColumn(c)),t=!0);let d=s(l.endLineNumber);d&&(l=l.setEndPosition(d,i.getLineMaxColumn(d)),t=!0),e[o]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function nfe(r,e){return r>=e.startLineNumber&&r<=e.endLineNumber}function Q2(r,e){let t=U3(r,i=>e<i.startLineNumber)-1;return t>=0&&r[t].endLineNumber>=e?r[t]:null}const rfe=5e3,sfe="indent";class ofe{constructor(e){this.editorModel=e,this.id=sfe}dispose(){}compute(e){let t=Ue.getFoldingRules(this.editorModel.getLanguageIdentifier().id),i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(lfe(this.editorModel,i,n))}}class afe{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>Ga||t>Ga)return;let 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){if(this._length<=this._foldingRangesLimit){let t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=this._length-1,s=0;n>=0;n--,s++)t[s]=this._startIndexes[n],i[s]=this._endIndexes[n];return new __(t,i)}else{let t=0,i=this._indentOccurrences.length;for(let a=0;a<this._indentOccurrences.length;a++){let l=this._indentOccurrences[a];if(l){if(l+t>this._foldingRangesLimit){i=a;break}t+=l}}const n=e.getOptions().tabSize;let s=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit);for(let a=this._length-1,l=0;a>=0;a--){let c=this._startIndexes[a],d=e.getLineContent(c),u=Ti.computeIndentLevel(d,n);(u<i||u===i&&t++<this._foldingRangesLimit)&&(s[l]=c,o[l]=this._endIndexes[a],l++)}return new __(s,o)}}}function lfe(r,e,t,i=rfe){const n=r.getOptions().tabSize;let s=new afe(i),o;t&&(o=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=r.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=r.getLineCount();c>0;c--){let d=r.getLineContent(c),u=Ti.computeIndentLevel(d,n),h=a[a.length-1];if(u===-1){e&&(h.endAbove=c);continue}let f;if(o&&(f=d.match(o)))if(f[1]){let g=a.length-1;for(;g>0&&a[g].indent!==-2;)g--;if(g>0){a.length=g+1,h=a[g],s.insertFirst(c,h.line,u),h.line=c,h.indent=u,h.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(h.indent>u){do a.pop(),h=a[a.length-1];while(h.indent>u);let g=h.endAbove-1;g-c>=1&&s.insertFirst(c,g,u)}h.indent===u?h.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return s.toIndentRanges(r)}const cfe=5e3,dfe={},P9="syntax";class ufe{constructor(e,t,i,n=cfe){this.editorModel=e,this.providers=t,this.limit=n,this.id=P9;for(const s of t)typeof s.onDidChange=="function"&&(this.disposables||(this.disposables=new ue),this.disposables.add(s.onDidChange(i)))}compute(e){return hfe(this.providers,this.editorModel,e).then(t=>t?F9(t,this.limit):null)}dispose(){var e;(e=this.disposables)===null||e===void 0||e.dispose()}}function hfe(r,e,t){let i=null,n=r.map((s,o)=>Promise.resolve(s.provideFoldingRanges(e,dfe,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(i)||(i=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&i.push({start:c.start,end:c.end,rank:o,kind:c.kind})}},Yi));return Promise.all(n).then(s=>i)}class ffe{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>Ga||t>Ga)return;let 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(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;i<this._length;i++)e[i]=this._startIndexes[i],t[i]=this._endIndexes[i];return new __(e,t,this._types)}else{let e=0,t=this._nestingLevelCounts.length;for(let o=0;o<this._nestingLevelCounts.length;o++){let a=this._nestingLevelCounts[o];if(a){if(a+e>this._foldingRangesLimit){t=o;break}e+=a}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),s=[];for(let o=0,a=0;o<this._length;o++){let l=this._nestingLevels[o];(l<t||l===t&&e++<this._foldingRangesLimit)&&(i[a]=this._startIndexes[o],n[a]=this._endIndexes[o],s[a]=this._types[o],a++)}return new __(i,n,s)}}}function F9(r,e){let t=r.sort((o,a)=>{let l=o.start-a.start;return l===0&&(l=o.rank-a.rank),l}),i=new ffe(e),n,s=[];for(let o of t)if(!n)n=o,i.add(o.start,o.end,o.kind&&o.kind.value,s.length);else if(o.start>n.start)if(o.end<=n.end)s.push(n),n=o,i.add(o.start,o.end,o.kind&&o.kind.value,s.length);else{if(o.start>n.end){do n=s.pop();while(n&&o.start>n.end);n&&s.push(n),n=o}i.add(o.start,o.end,o.kind&&o.kind.value,s.length)}return i.toIndentRanges()}const B9="init";class gfe{constructor(e,t,i,n){if(this.editorModel=e,this.id=B9,t.length){let s=o=>({range:{startLineNumber:o.startLineNumber,startColumn:0,endLineNumber:o.endLineNumber,endColumn:e.getLineLength(o.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(s)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let i of this.decorationIds){let n=this.editorModel.getDecorationRange(i);n&&t.push({start:n.startLineNumber,end:n.endLineNumber,rank:1})}return Promise.resolve(F9(t,Number.MAX_VALUE))}}const KN=un("folding-expanded",be.chevronDown,m("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),YN=un("folding-collapsed",be.chevronRight,m("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class xs{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?xs.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?xs.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:xs.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?xs.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:xs.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}xs.COLLAPSED_VISUAL_DECORATION=qe.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:qt.asClassName(YN)});xs.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=qe.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:qt.asClassName(YN)});xs.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=qe.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:qt.asClassName(KN)});xs.EXPANDED_VISUAL_DECORATION=qe.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+qt.asClassName(KN)});xs.HIDDEN_RANGE_DECORATION=qe.register({description:"folding-hidden-range-decoration",stickiness:1});var pfe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mfe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const qn=new xe("foldingEnabled",!1);let ag=class W9 extends Z{constructor(e,t){super();this.contextKeyService=t,this.localToDispose=this._register(new ue),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(37),this._useFoldingProviders=i.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=i.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=i.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new xs(e),this.foldingDecorationProvider.autoHideFoldingControls=i.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=i.get(39),this.foldingEnabled=qn.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(n=>{if(n.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),n.hasChanged(98)||n.hasChanged(39)){const s=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=s.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=s.get(39),this.onModelContentChanged()}n.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),n.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),n.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(e){return e.getContribution(W9.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel||!e||e.lineCount!==t.getLineCount()||(this._currentModelHasFoldedImports=!!e.foldedImports,!e.collapsedRegions))return;(e.provider===P9||e.provider===B9)&&(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const n=this.getFoldingModel();n&&n.then(s=>{if(s){this._restoringViewState=!0;try{s.applyMemento(i)}finally{this._restoringViewState=!1}}}).then(void 0,Fe)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new Yhe(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new ife(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new cl(200),this.cursorChangedScheduler=new $t(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(Hk.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new ofe(e),this._useFoldingProviders&&this.foldingModel){let t=Hk.ordered(this.foldingModel.textModel);if(t.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new gfe(e,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);t.length>0&&(this.rangeProvider=new ufe(e,t,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){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=this.getRangeProvider(e.textModel);let i=this.foldingRegionPromise=Pi(n=>t.compute(n));return i.then(n=>{if(n&&i===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const l=n.setCollapsedAllOfType(uo.Imports.value,!0);l&&(s=xc.capture(this.editor),this._currentModelHasFoldedImports=l)}let o=this.editor.getSelections(),a=o?o.map(l=>l.startLineNumber):[];e.update(n,a),s&&s.restore(this.editor)}return e})}).then(void 0,e=>(Fe(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();!e||e.then(t=>{if(t){let i=this.editor.getSelections();if(i&&i.length>0){let n=[];for(let s of i){let o=s.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(o)&&n.push(...t.getAllRegionsAtLine(o,a=>a.isCollapsed&&o>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(i[0].getPosition()))}}}).then(void 0,Fe)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:const n=e.target.detail,s=e.target.element.offsetLeft;if(n.offsetX-s<5)return;i=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let a=this.editor.getModel();if(a&&t.startColumn===a.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!(!s||s.startLineNumber!==i)){if(n){if(e.target.type!==4)return}else{let o=this.editor.getModel();if(!o||s.startColumn!==o.getLineMaxColumn(i))return}t.then(o=>{if(o){let a=o.getRegionAtLine(i);if(a&&a.startLineNumber===i){let l=a.isCollapsed;if(n||l){let c=e.event.altKey,d=[];if(c){let u=f=>!f.containedBy(a)&&!a.containedBy(f),h=o.getRegionsInside(null,u);for(const f of h)f.isCollapsed&&d.push(f);d.length===0&&(d=h)}else{let u=e.event.middleButton||e.event.shiftKey;if(u)for(const h of o.getRegionsInside(a))h.isCollapsed===l&&d.push(h);(l||!u||d.length===0)&&d.push(a)}o.toggleCollapseState(d),this.reveal({lineNumber:i,column:1})}}}}).then(void 0,Fe)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};ag.ID="editor.contrib.folding";ag=pfe([mfe(1,Be)],ag);class sr extends Se{runEditorCommand(e,t,i){let n=ag.get(t);if(!n)return;let s=n.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(o=>{if(o){this.invoke(n,o,t,i);const a=t.getSelection();a&&n.reveal(a.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function V9(r){if(!Pn(r)){if(!er(r))return!1;const e=r;if(!Pn(e.levels)&&!Jd(e.levels)||!Pn(e.direction)&&!Os(e.direction)||!Pn(e.selectionLines)&&(!w3(e.selectionLines)||!e.selectionLines.every(Jd)))return!1}return!0}class _fe extends sr{constructor(){super({id:"editor.unfold",label:m("unfoldAction.label","Unfold"),alias:"Unfold",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:3161,mac:{primary:2649},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: + * 'levels': Number of levels to unfold. If not set, defaults to 1. + * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. + * 'selectionLines': 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. + `,constraint:V9,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){let s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&n.direction==="up"?O9(t,!1,s,o):Ig(t,!1,s,o)}}class bfe extends sr{constructor(){super({id:"editor.unfoldRecursively",label:m("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2137),weight:100}})}invoke(e,t,i,n){Ig(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class vfe extends sr{constructor(){super({id:"editor.fold",label:m("foldAction.label","Fold"),alias:"Fold",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:3159,mac:{primary:2647},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: + * 'levels': Number of levels to fold. + * 'direction': If 'up', folds given number of levels up otherwise folds down. + * 'selectionLines': 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. + If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. + `,constraint:V9,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let s=this.getLineNumbers(n,i);const o=n&&n.levels,a=n&&n.direction;typeof o!="number"&&typeof a!="string"?Xhe(t,!0,s):a==="up"?O9(t,!0,o||1,s):Ig(t,!0,o||1,s)}}class Cfe extends sr{constructor(){super({id:"editor.toggleFold",label:m("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2090),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);Zhe(t,1,n)}}class wfe extends sr{constructor(){super({id:"editor.foldRecursively",label:m("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2135),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);Ig(t,!0,Number.MAX_VALUE,n)}}class yfe extends sr{constructor(){super({id:"editor.foldAllBlockComments",label:m("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2133),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())GN(t,uo.Comment.value,!0);else{const n=i.getModel();if(!n)return;let s=Ue.getComments(n.getLanguageIdentifier().id);if(s&&s.blockCommentStartToken){let o=new RegExp("^\\s*"+Ns(s.blockCommentStartToken));qN(t,o,!0)}}}}class Sfe extends sr{constructor(){super({id:"editor.foldAllMarkerRegions",label:m("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2077),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())GN(t,uo.Region.value,!0);else{const n=i.getModel();if(!n)return;let s=Ue.getFoldingRules(n.getLanguageIdentifier().id);if(s&&s.markers&&s.markers.start){let o=new RegExp(s.markers.start);qN(t,o,!0)}}}}class xfe extends sr{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:m("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2078),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())GN(t,uo.Region.value,!1);else{const n=i.getModel();if(!n)return;let s=Ue.getFoldingRules(n.getLanguageIdentifier().id);if(s&&s.markers&&s.markers.start){let o=new RegExp(s.markers.start);qN(t,o,!1)}}}}class Efe extends sr{constructor(){super({id:"editor.foldAllExcept",label:m("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2131),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);M9(t,!0,n)}}class kfe extends sr{constructor(){super({id:"editor.unfoldAllExcept",label:m("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2129),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);M9(t,!1,n)}}class Lfe extends sr{constructor(){super({id:"editor.foldAll",label:m("foldAllAction.label","Fold All"),alias:"Fold All",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2069),weight:100}})}invoke(e,t,i){Ig(t,!0)}}class Tfe extends sr{constructor(){super({id:"editor.unfoldAll",label:m("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2088),weight:100}})}invoke(e,t,i){Ig(t,!1)}}class Cu extends sr{getFoldingLevel(){return parseInt(this.id.substr(Cu.ID_PREFIX.length))}invoke(e,t,i){Qhe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}Cu.ID_PREFIX="editor.foldLevel";Cu.ID=r=>Cu.ID_PREFIX+r;class Ife extends sr{constructor(){super({id:"editor.gotoParentFold",label:m("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=Jhe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Dfe extends sr{constructor(){super({id:"editor.gotoPreviousFold",label:m("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=efe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Afe extends sr{constructor(){super({id:"editor.gotoNextFold",label:m("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=tfe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}wt(ag.ID,ag);pe(_fe);pe(bfe);pe(vfe);pe(wfe);pe(Lfe);pe(Tfe);pe(yfe);pe(Sfe);pe(xfe);pe(Efe);pe(kfe);pe(Cfe);pe(Ife);pe(Dfe);pe(Afe);for(let r=1;r<=7;r++)wW(new Cu({id:Cu.ID(r),label:m("foldLevelAction.label","Fold Level {0}",r),alias:`Fold Level ${r}`,precondition:qn,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2048|21+r),weight:100}}));const Nfe=V("editor.foldBackground",{light:Ut(cc,.3),dark:Ut(cc,.3),hc:null},m("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),Rfe=V("editorGutter.foldingControlForeground",{dark:R1,light:R1,hc:R1},m("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));Et((r,e)=>{const t=r.getColor(Nfe);t&&e.addRule(`.monaco-editor .folded-background { background-color: ${t}; }`);const i=r.getColor(Rfe);i&&e.addRule(` + .monaco-editor .cldr${qt.asCSSSelector(KN)}, + .monaco-editor .cldr${qt.asCSSSelector(YN)} { + color: ${i} !important; + } + `)});class Ofe extends Se{constructor(){super({id:"editor.action.fontZoomIn",label:m("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){ul.setZoomLevel(ul.getZoomLevel()+1)}}class Mfe extends Se{constructor(){super({id:"editor.action.fontZoomOut",label:m("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){ul.setZoomLevel(ul.getZoomLevel()-1)}}class Pfe extends Se{constructor(){super({id:"editor.action.fontZoomReset",label:m("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){ul.setZoomLevel(0)}}pe(Ofe);pe(Mfe);pe(Pfe);var H9=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},$9=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},ZN=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let b_=class{constructor(e,t){this._workerService=t,this._callOnDispose=new ue,this._callOnModel=new ue,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(iw.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=iw.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new qh;for(let n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(n=>{let s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1)return;const t=this._editor.getModel(),i=this._editor.getPosition();let n=!1;const s=this._editor.onDidChangeModelContent(o=>{if(o.isFlush){n=!0,s.dispose();return}for(let a=0,l=o.changes.length;a<l;a++)if(o.changes[a].range.endLineNumber<=i.lineNumber){n=!0,s.dispose();return}});B6(this._workerService,t,i,e,t.getFormattingOptions()).then(o=>{s.dispose(),!n&&mr(o)&&(Xf.execute(this._editor,o,!0),SN(o))},o=>{throw s.dispose(),o})}};b_.ID="editor.contrib.autoFormat";b_=H9([$9(1,Ps)],b_);let v_=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new ue,this._callOnModel=new ue,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(Xs.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),this.editor.getOption(47)&&(!this.editor.hasModel()||!Xs.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(F6,this.editor,e,2,$u.None,it.None).catch(Fe)}};v_.ID="editor.contrib.formatOnPaste";v_=H9([$9(1,gt)],v_);class Ffe extends Se{constructor(){super({id:"editor.action.formatDocument",label:m("formatDocument.label","Format Document"),alias:"Format Document",precondition:me.and(R.notInCompositeEditor,R.writable,R.hasDocumentFormattingProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:1572,linux:{primary:3111},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return ZN(this,void 0,void 0,function*(){if(t.hasModel()){const i=e.get(gt);yield e.get(bl).showWhile(i.invokeFunction(woe,t,1,$u.None,it.None),250)}})}}class Bfe extends Se{constructor(){super({id:"editor.action.formatSelection",label:m("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:me.and(R.writable,R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2084),weight:100},contextMenuOpts:{when:R.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return ZN(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(gt),n=t.getModel(),s=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);yield e.get(bl).showWhile(i.invokeFunction(F6,t,s,1,$u.None,it.None),250)})}}wt(b_.ID,b_);wt(v_.ID,v_);pe(Ffe);pe(Bfe);lt.registerCommand("editor.action.format",r=>ZN(void 0,void 0,void 0,function*(){const e=r.get(Ct).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=r.get(pi);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));class tf{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class J2 extends tf{constructor(e,t,i){super();this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class Wfe extends tf{constructor(e,t,i,n){super();this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class Rn extends tf{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}static create(e,t){let i=this._keys.for(e,!0),n=Rn._requests.get(i);if(!n){let s=new Hn;n={promiseCnt:0,source:s,promise:Rn._create(e,s.token),model:void 0},Rn._requests.set(i,n);const o=Date.now();n.promise.then(()=>{this._requestDurations.update(e,Date.now()-o)})}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,t.onCancellationRequested(()=>{--n.promiseCnt===0&&(n.source.cancel(),Rn._requests.delete(i))}),new Promise((s,o)=>{n.promise.then(a=>{n.model=a,s(a)},a=>{Rn._requests.delete(i),o(a)})}))}static _create(e,t){const i=new Hn(t),n=new Rn(e.uri),s=Es.ordered(e),o=s.map((l,c)=>{var d;let u=tf.findId(`provider_${c}`,n),h=new Wfe(u,n,(d=l.displayName)!==null&&d!==void 0?d:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(e,i.token)).then(f=>{for(const g of f||[])Rn._makeOutlineElement(g,h);return h},f=>(Yi(f),h)).then(f=>{tf.empty(f)?f.remove():n._groups.set(u,f)})}),a=Es.onDidChange(()=>{const l=Es.ordered(e);Ls(l,s)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!t.isCancellationRequested?Rn._create(e,t):n._compact()).finally(()=>{a.dispose()})}static _makeOutlineElement(e,t){let i=tf.findId(e,t),n=new J2(i,t,e);if(e.children)for(const s of e.children)Rn._makeOutlineElement(s,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=at.first(this._groups.values());for(let[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof J2?e.push(t.symbol):e.push(...at.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return Rn._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>k.compareRangesUsingStarts(i.range,n.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&&Rn._flattenDocumentSymbols(e,n.children,n.name)}}Rn._requestDurations=new GC(Es,350);Rn._requests=new Bc(9,.75);Rn._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(r,e){return`${r.id}/${e?r.getVersionId():""}/${this._hash(Es.all(r))}`}_hash(r){let e="";for(const t of r){let i=this._data.get(t);typeof i=="undefined"&&(i=this._counter++,this._data.set(t,i)),e+=i}return e}};var U9=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function eF(r,e,t){return U9(this,void 0,void 0,function*(){const i=yield Rn.create(r,t);return e?i.asListOfDocumentSymbols():i.getTopLevelSymbols()})}lt.registerCommand("_executeDocumentSymbolProvider",function(r,...e){return U9(this,void 0,void 0,function*(){const[t]=e;Dt(De.isUri(t));const i=r.get(mi).getModel(t);if(i)return eF(i,!1,it.None);const n=yield r.get(ho).createModelReference(t);try{return yield eF(n.object.textEditorModel,!1,it.None)}finally{n.dispose()}})});function cr(r,e){let t=0;for(let i=0;i<r.length;i++)r.charAt(i)===" "?t+=e:t++;return t}function dm(r,e,t){r=r<0?0:r;let i="";if(!t){let n=Math.floor(r/e);r=r%e;for(let s=0;s<n;s++)i+=" "}for(let n=0;n<r;n++)i+=" ";return i}function z9(r,e,t,i){if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return[];let n=Ue.getIndentationRules(r.getLanguageIdentifier().id);if(!n)return[];for(t=Math.min(t,r.getLineCount());e<=t&&n.unIndentedLinePattern;){let p=r.getLineContent(e);if(!n.unIndentedLinePattern.test(p))break;e++}if(e>t-1)return[];const{tabSize:s,indentSize:o,insertSpaces:a}=r.getOptions(),l=(p,_)=>(_=_||1,Ir.shiftIndent(p,p.length+_,s,o,a)),c=(p,_)=>(_=_||1,Ir.unshiftIndent(p,p.length+_,s,o,a));let d=[],u,h=r.getLineContent(e),f=h;if(i!=null){u=i;let p=Tt(h);f=u+h.substring(p.length),n.decreaseIndentPattern&&n.decreaseIndentPattern.test(f)&&(u=c(u),f=u+h.substring(p.length)),h!==f&&d.push(ai.replaceMove(new _e(e,1,e,p.length+1),Ti.normalizeIndentation(u,o,a)))}else u=Tt(h);let g=u;n.increaseIndentPattern&&n.increaseIndentPattern.test(f)?(g=l(g),u=l(u)):n.indentNextLinePattern&&n.indentNextLinePattern.test(f)&&(g=l(g)),e++;for(let p=e;p<=t;p++){let _=r.getLineContent(p),v=Tt(_),b=g+_.substring(v.length);n.decreaseIndentPattern&&n.decreaseIndentPattern.test(b)&&(g=c(g),u=c(u)),v!==g&&d.push(ai.replaceMove(new _e(p,1,p,v.length+1),Ti.normalizeIndentation(g,o,a))),!(n.unIndentedLinePattern&&n.unIndentedLinePattern.test(_))&&(n.increaseIndentPattern&&n.increaseIndentPattern.test(b)?(u=l(u),g=u):n.indentNextLinePattern&&n.indentNextLinePattern.test(b)?g=l(g):g=u)}return d}class vS extends Se{constructor(){super({id:vS.ID,label:m("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new Ufe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}vS.ID="editor.action.indentationToSpaces";class CS extends Se{constructor(){super({id:CS.ID,label:m("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new zfe(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}CS.ID="editor.action.indentationToTabs";class j9 extends Se{constructor(e,t){super(t);this.insertSpaces=e}run(e,t){const i=e.get(Uc),n=e.get(mi);let s=t.getModel();if(!s)return;let o=n.getCreationOptions(s.getLanguageIdentifier().language,s.uri,s.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===o.tabSize?m("configuredTabSize","Configured Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:m({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then(c=>{c&&s&&!s.isDisposed()&&s.updateOptions({tabSize:parseInt(c.label,10),insertSpaces:this.insertSpaces})})},50)}}class wS extends j9{constructor(){super(!1,{id:wS.ID,label:m("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}wS.ID="editor.action.indentUsingTabs";class yS extends j9{constructor(){super(!0,{id:yS.ID,label:m("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}yS.ID="editor.action.indentUsingSpaces";class SS extends Se{constructor(){super({id:SS.ID,label:m("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(mi);let n=t.getModel();if(!n)return;let s=i.getCreationOptions(n.getLanguageIdentifier().language,n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}SS.ID="editor.action.detectIndentation";class Vfe extends Se{constructor(){super({id:"editor.action.reindentlines",label:m("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=z9(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}class Hfe extends Se{constructor(){super({id:"editor.action.reindentselectedlines",label:m("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(n===null)return;let s=[];for(let o of n){let a=o.startLineNumber,l=o.endLineNumber;if(a!==l&&o.endColumn===1&&l--,a===1){if(a===l)continue}else a--;let c=z9(i,a,l);s.push(...c)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class $fe{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(let n of this._edits)t.addEditOperation(k.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&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)}}class cI{constructor(e){this.callOnDispose=new ue,this.callOnModel=new ue,this.editor=e,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(9)<4||this.editor.getOption(47))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:o,insertSpaces:a}=i.getOptions();let l=[],c={shiftIndent:f=>Ir.shiftIndent(f,f.length+1,s,o,a),unshiftIndent:f=>Ir.unshiftIndent(f,f.length+1,s,o,a)},d=e.startLineNumber;for(;d<=e.endLineNumber;){if(this.shouldIgnoreLine(i,d)){d++;continue}break}if(d>e.endLineNumber)return;let u=i.getLineContent(d);if(!/\S/.test(u.substring(0,e.startColumn-1))){let f=Ue.getGoodIndentForLine(n,i,i.getLanguageIdentifier().id,d,c);if(f!==null){let g=Tt(u),p=cr(f,s),_=cr(g,s);if(p!==_){let v=dm(p,s,a);l.push({range:new k(d,1,d,g.length+1),text:v}),u=v+u.substr(g.length)}else{let v=Ue.getIndentMetadata(i,d);if(v===0||v===8)return}}}const h=d;for(;d<e.endLineNumber;){if(!/\S/.test(i.getLineContent(d+1))){d++;continue}break}if(d!==e.endLineNumber){let f={getLineTokens:p=>i.getLineTokens(p),getLanguageIdentifier:()=>i.getLanguageIdentifier(),getLanguageIdAtPosition:(p,_)=>i.getLanguageIdAtPosition(p,_),getLineContent:p=>p===h?u:i.getLineContent(p)},g=Ue.getGoodIndentForLine(n,f,i.getLanguageIdentifier().id,d+1,c);if(g!==null){let p=cr(g,s),_=cr(Tt(i.getLineContent(d+1)),s);if(p!==_){let v=p-_;for(let b=d+1;b<=e.endLineNumber;b++){let C=i.getLineContent(b),y=Tt(C),S=cr(y,s)+v,w=dm(S,s,a);w!==y&&l.push({range:new k(b,1,b,y.length+1),text:w})}}}}if(l.length>0){this.editor.pushUndoStop();let f=new $fe(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}cI.ID="editor.contrib.autoIndentOnPaste";function q9(r,e,t,i){if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let n="";for(let o=0;o<t;o++)n+=" ";let s=new RegExp(n,"gi");for(let o=1,a=r.getLineCount();o<=a;o++){let l=r.getLineFirstNonWhitespaceColumn(o);if(l===0&&(l=r.getLineMaxColumn(o)),l===1)continue;const c=new k(o,1,o,l),d=r.getValueInRange(c),u=i?d.replace(/\t/ig,n):d.replace(s," ");e.addEditOperation(c,u)}}class Ufe{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),q9(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class zfe{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),q9(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}wt(cI.ID,cI);pe(vS);pe(CS);pe(wS);pe(yS);pe(SS);pe(Vfe);pe(Hfe);var jfe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qfe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},py=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Gfe=1500;function G9(r,e,t){return py(this,void 0,void 0,function*(){const i=[],s=Zl.ordered(r).reverse().map(o=>e.map(a=>py(this,void 0,void 0,function*(){try{const l=yield o.provideInlayHints(r,a,t);l!=null&&l.length&&i.push(l.filter(c=>a.containsPosition(c.position)))}catch(l){Yi(l)}})));return yield Promise.all(s.flat()),i.flat().sort((o,a)=>U.compare(o.position,a.position))})}class my{constructor(){this._entries=new Bc(50)}get(e){const t=my._key(e);return this._entries.get(t)}set(e,t){const i=my._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}let lg=class K9{constructor(e,t){this._editor=e,this._codeEditorService=t,this._decorationOwnerId=++K9._decorationOwnerIdPool,this._disposables=new ue,this._sessionDisposables=new ue,this._getInlayHintsDelays=new GC(Zl,25,500),this._cache=new my,this._decorations=new Map,this._disposables.add(Zl.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(i=>{i.hasChanged(125)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(125).enabled)return;const e=this._editor.getModel();if(!e||!Zl.has(e))return;const t=this._cache.get(e);t&&this._updateHintsDecorators([e.getFullModelRange()],t);const i=new $t(()=>py(this,void 0,void 0,function*(){const s=Date.now(),o=new Hn;this._sessionDisposables.add(Xe(()=>o.dispose(!0)));const a=this._getHintsRanges(),l=yield G9(e,a,o.token);i.delay=this._getInlayHintsDelays.update(e,Date.now()-s),!o.token.isCancellationRequested&&(this._updateHintsDecorators(a,l),this._cache.set(e,Array.from(this._decorations.values()).map(c=>c.hint)))}),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(i),this._sessionDisposables.add(this._editor.onDidChangeModelContent(()=>i.schedule())),this._disposables.add(this._editor.onDidScrollChange(()=>i.schedule())),i.schedule();const n=new ue;this._sessionDisposables.add(n);for(const s of Zl.all(e))typeof s.onDidChangeInlayHints=="function"&&n.add(s.onDidChangeInlayHints(()=>i.schedule()))}_getHintsRanges(){const t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(k.compareRangesUsingStarts)){const o=t.validateRange(new k(s.startLineNumber-30,s.startColumn,s.endLineNumber+30,s.endColumn));n.length===0||!k.areIntersectingOrTouching(n[n.length-1],o)?n.push(o):n[n.length-1]=k.plusRange(n[n.length-1],o)}return n}_updateHintsDecorators(e,t){const{fontSize:i,fontFamily:n}=this._getLayoutInfo(),s=this._editor.getModel(),o=[],a=[],l="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(l,n);for(const u of t){const{text:h,position:f,whitespaceBefore:g,whitespaceAfter:p}=u,_=g?i/3|0:0,v=p?i/3|0:0,b={contentText:Kfe(h),fontSize:`${i}px`,margin:`0px ${v}px 0px ${_}px`,fontFamily:`var(${l})`,padding:`1px ${Math.max(1,i/4)|0}px`,borderRadius:`${i/4|0}px`,verticalAlign:"middle",backgroundColor:li(Hd),color:li(Vd)};u.kind===YC.Parameter?(b.backgroundColor=li(UZ),b.color=li($Z)):u.kind===YC.Type&&(b.backgroundColor=li(HZ),b.color=li(VZ));let C={beforeInjectedText:Object.assign(Object.assign({},b),{affectsLetterSpacing:!0})},y=k.fromPositions(f),E=s.getWordAtPosition(f),S=!1;E&&(E.endColumn===f.column?(C.afterInjectedText=C.beforeInjectedText,C.beforeInjectedText=void 0,S=!0,y=tF(E,f.lineNumber)):E.startColumn===f.column&&(S=!0,y=tF(E,f.lineNumber)));const w="inlayHints-"+LD(C).toString(16);if(this._codeEditorService.registerDecorationType("inlay-hints-controller",w,C,void 0,this._editor),o.push(w),a.push({range:y,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(w,!0)),{showIfCollapsed:!S,stickiness:0})})>Gfe)break}const c=[];for(const u of e)for(const{id:h}of s.getDecorationsInRange(u,this._decorationOwnerId,!0)){const f=this._decorations.get(h);f&&(c.push(h),this._codeEditorService.removeDecorationType(f.decorationTypeId),this._decorations.delete(h))}const d=s.deltaDecorations(c,a,this._decorationOwnerId);for(let u=0;u<d.length;u++)this._decorations.set(d[u],{hint:t[u],decorationTypeId:o[u]})}_getLayoutInfo(){const e=this._editor.getOption(125),t=this._editor.getOption(45);let i=e.fontSize;(!i||i<5||i>t)&&(i=t*.9|0);const n=e.fontFamily||this._editor.getOption(42);return{fontSize:i,fontFamily:n}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let e of this._decorations.values())this._codeEditorService.removeDecorationType(e.decorationTypeId);this._decorations.clear()}};lg.ID="editor.contrib.InlayHints";lg._decorationOwnerIdPool=0;lg=jfe([qfe(1,Ct)],lg);function tF(r,e){return new k(e,r.startColumn,e,r.endColumn)}function Kfe(r){const e="\xA0";return r.replace(/[ \t]/g,e)}wt(lg.ID,lg);lt.registerCommand("_executeInlayHintProvider",(r,...e)=>py(void 0,void 0,void 0,function*(){const[t,i]=e;Dt(De.isUri(t)),Dt(k.isIRange(i));const n=yield r.get(ho).createModelReference(t);try{return yield G9(n.object.textEditorModel,[k.lift(i)],it.None)}finally{n.dispose()}}));class Yfe{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 n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new _e(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new _e(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var Zfe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xfe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Mc=class dI{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(e){return e.getContribution(dI.ID)}dispose(){}run(e,t){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;const o=new Km(this.editor,5),a=n.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=Pi(l=>this.editorWorkerService.navigateValueSet(a,s,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!o.validate(this.editor))return;let c=k.lift(l.range),d=l.range,u=l.value.length-(s.endColumn-s.startColumn);d={startLineNumber:d.startLineNumber,startColumn:d.startColumn,endLineNumber:d.endLineNumber,endColumn:d.startColumn+l.value.length},u>1&&(s=new _e(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+u-1));const h=new Yfe(c,s,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,h),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:d,options:dI.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=mc(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(Fe)}).catch(Fe)):Promise.resolve(void 0)}};Mc.ID="editor.contrib.inPlaceReplaceController";Mc.DECORATION=qe.register({description:"in-place-replace",className:"valueSetReplacement"});Mc=Zfe([Xfe(1,Ps)],Mc);class Qfe extends Se{constructor(){super({id:"editor.action.inPlaceReplace.up",label:m("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:3154,weight:100}})}run(e,t){const i=Mc.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class Jfe extends Se{constructor(){super({id:"editor.action.inPlaceReplace.down",label:m("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:3156,weight:100}})}run(e,t){const i=Mc.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}wt(Mc.ID,Mc);pe(Qfe);pe(Jfe);Et((r,e)=>{const t=r.getColor(JW);t&&e.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${t}; }`)});class ege{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let i=tge(e,this._cursors);for(let n=0,s=i.length;n<s;n++){let o=i[n];t.addEditOperation(o.range,o.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function tge(r,e){e.sort((o,a)=>o.lineNumber===a.lineNumber?o.column-a.column:o.lineNumber-a.lineNumber);for(let o=e.length-2;o>=0;o--)e[o].lineNumber===e[o+1].lineNumber&&e.splice(o,1);let t=[],i=0,n=0,s=e.length;for(let o=1,a=r.getLineCount();o<=a;o++){let l=r.getLineContent(o),c=l.length+1,d=0;if(n<s&&e[n].lineNumber===o&&(d=e[n].column,n++,d===c)||l.length===0)continue;let u=Jo(l),h=0;if(u===-1)h=1;else if(u!==l.length-1)h=u+2;else continue;h=Math.max(d,h),t[i++]=ai.delete(new k(o,h,o,c))}return t}class Y9{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let o=i.startLineNumber;o<=i.endLineNumber;o++)n.push(e.getLineContent(o));const s=n.join(` +`);s===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":` +`):this._isCopyingDown?t.addEditOperation(new k(i.startLineNumber,1,i.startLineNumber,1),s+` +`):t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),` +`+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,s=i.startColumn,o=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(o=o+this._endLineNumberDelta,a=1),i=_e.createWithDirection(n,s,o,a,this._selectionDirection)}return i}}class ige{constructor(e,t,i){this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:s,indentSize:o,insertSpaces:a}=e.getOptions();let l=this.buildIndentConverter(s,o,a),c={getLineTokens:d=>e.getLineTokens(d),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(d,u)=>e.getLanguageIdAtPosition(d,u),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){let d=n.startLineNumber,u=this._isMovingDown?d+1:d-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(d,1,d,1),e.getLineContent(u)),t.addEditOperation(new k(u,1,u,e.getLineMaxColumn(u)),null)),n=new _e(u,1,u,1)}else{let d,u;if(this._isMovingDown){d=n.endLineNumber+1,u=e.getLineContent(d),t.addEditOperation(new k(d-1,e.getLineMaxColumn(d-1),d,e.getLineMaxColumn(d)),null);let h=u;if(this.shouldAutoIndent(e,n)){let f=this.matchEnterRule(e,l,s,d,n.startLineNumber-1);if(f!==null){let p=Tt(e.getLineContent(d)),_=f+cr(p,s);h=dm(_,s,a)+this.trimLeft(u)}else{c.getLineContent=_=>_===n.startLineNumber?e.getLineContent(d):e.getLineContent(_);let p=Ue.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber,l);if(p!==null){let _=Tt(e.getLineContent(d)),v=cr(p,s),b=cr(_,s);v!==b&&(h=dm(v,s,a)+this.trimLeft(u))}}t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),h+` +`);let g=this.matchEnterRuleMovingDown(e,l,s,n.startLineNumber,d,h);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,g);else{c.getLineContent=_=>_===n.startLineNumber?h:_>=n.startLineNumber+1&&_<=n.endLineNumber+1?e.getLineContent(_-1):e.getLineContent(_);let p=Ue.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(d,1),n.startLineNumber+1,l);if(p!==null){const _=Tt(e.getLineContent(n.startLineNumber)),v=cr(p,s),b=cr(_,s);if(v!==b){const C=v-b;this.getIndentEditsOfMovingBlock(e,t,n,s,a,C)}}}}else t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),h+` +`)}else if(d=n.startLineNumber-1,u=e.getLineContent(d),t.addEditOperation(new k(d,1,d+1,1),null),t.addEditOperation(new k(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),` +`+u),this.shouldAutoIndent(e,n)){c.getLineContent=f=>f===d?e.getLineContent(n.startLineNumber):e.getLineContent(f);let h=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(h!==null)h!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,h);else{let f=Ue.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),d,l);if(f!==null){let g=Tt(e.getLineContent(n.startLineNumber)),p=cr(f,s),_=cr(g,s);if(p!==_){let v=p-_;this.getIndentEditsOfMovingBlock(e,t,n,s,a,v)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>Ir.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>Ir.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===fi.None||s.indentAction===fi.Indent?o=s.indentation+s.appendText:s.indentAction===fi.IndentOutdent?o=s.indentation:s.indentAction===fi.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);let a=e.getLineContent(n);if(this.trimLeft(a).indexOf(this.trimLeft(o))>=0){let l=Tt(e.getLineContent(n)),c=Tt(o),d=Ue.getIndentMetadata(e,n);d!==null&&d&2&&(c=t.unshiftIndent(c));let u=cr(c,i),h=cr(l,i);return u-h}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(Jo(o)>=0){let a=e.getLineMaxColumn(s),l=Ue.getEnterAction(this._autoIndent,e,new k(s,a,s,a));return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){let d=e.getLineContent(a);if(Jo(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=Ue.getEnterAction(this._autoIndent,e,new k(a,l,a,l));return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,s,o){let a=s;for(;a>=1;){let d;if(a===s&&o!==void 0?d=o:d=e.getLineContent(a),Jo(d)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=Ue.getEnterAction(this._autoIndent,e,new k(a,l,a,l));return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||Ue.getIndentRulesSupport(i)===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){let l=e.getLineContent(a),c=Tt(l),u=cr(c,n)+o,h=dm(u,n,s);h!==c&&(t.addEditOperation(new k(a,1,a,c.length+1),h),a===i.endLineNumber&&i.endColumn<=c.length+1&&h===""&&(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<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}}class hc{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return hc._COLLATOR||(hc._COLLATOR=new Intl.Collator),hc._COLLATOR}getEditOperations(e,t){let i=nge(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;let n=Z9(e,t,i);if(!n)return!1;for(let s=0,o=n.before.length;s<o;s++)if(n.before[s]!==n.after[s])return!0;return!1}}hc._COLLATOR=null;function Z9(r,e,t){let i=e.startLineNumber,n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;let s=[];for(let a=i;a<=n;a++)s.push(r.getLineContent(a));let o=s.slice(0);return o.sort(hc.getCollator().compare),t===!0&&(o=o.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:o}}function nge(r,e,t){let i=Z9(r,e,t);return i?ai.replace(new k(i.startLineNumber,1,i.endLineNumber,r.getLineMaxColumn(i.endLineNumber)),i.after.join(` +`)):null}class X9 extends Se{constructor(e,t){super(t);this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((o,a)=>({selection:o,index:a,ignore:!1}));i.sort((o,a)=>k.compareRangesUsingStarts(o.selection,a.selection));let n=i[0];for(let o=1;o<i.length;o++){const a=i[o];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const s=[];for(const o of i)s.push(new Y9(o.selection,this.down,o.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class rge extends X9{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:m("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:1552,linux:{primary:3600},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"2_line",title:m({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class sge extends X9{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:m("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:1554,linux:{primary:3602},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"2_line",title:m({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class oge extends Se{constructor(){super({id:"editor.action.duplicateSelection",label:m("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:R.writable,menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"2_line",title:m({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),o=t.getModel();for(const a of s)if(a.isEmpty())n.push(new Y9(a,!0));else{const l=new _e(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new eJ(l,o.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Q9 extends Se{constructor(e,t){super(t);this.down=e}run(e,t){let i=[],n=t.getSelections()||[];const s=t.getOption(9);for(const o of n)i.push(new ige(o,this.down,s));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class age extends Q9{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:m("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:528,linux:{primary:528},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"2_line",title:m({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class lge extends Q9{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:m("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:530,linux:{primary:530},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"2_line",title:m({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class J9 extends Se{constructor(e,t){super(t);this.descending=e}run(e,t){const i=t.getSelections()||[];for(const s of i)if(!hc.canRun(t.getModel(),s,this.descending))return;let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new hc(i[s],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class cge extends J9{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:m("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:R.writable})}}class dge extends J9{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:m("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:R.writable})}}class xS extends Se{constructor(){super({id:xS.ID,label:m("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Bi(2089,2102),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new U(a.positionLineNumber,a.positionColumn)));let s=t.getSelection();if(s===null)return;let o=new ege(s,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}xS.ID="editor.action.trimTrailingWhitespace";class uge extends Se{constructor(){super({id:"editor.action.deleteLines",label:m("lines.delete","Delete Line"),alias:"Delete Line",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:3113,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0,o=[],a=[];for(let l=0,c=i.length;l<c;l++){const d=i[l];let u=d.startLineNumber,h=d.endLineNumber,f=1,g=n.getLineMaxColumn(h);h<n.getLineCount()?(h+=1,g=1):u>1&&(u-=1,f=n.getLineMaxColumn(u)),o.push(ai.replace(new _e(u,f,h,g),"")),a.push(new _e(u-s,d.positionColumn,u-s,d.positionColumn)),s+=d.endLineNumber-d.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(s=>{let o=s.endLineNumber;return s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(o-=1),{startLineNumber:s.startLineNumber,selectionStartColumn:s.selectionStartColumn,endLineNumber:o,positionColumn:s.positionColumn}});t.sort((s,o)=>s.startLineNumber===o.startLineNumber?s.endLineNumber-o.endLineNumber:s.startLineNumber-o.startLineNumber);let i=[],n=t[0];for(let s=1;s<t.length;s++)n.endLineNumber+1>=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class hge extends Se{constructor(){super({id:"editor.action.indentLines",label:m("lines.indent","Indent Line"),alias:"Indent Line",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2137,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Yt.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class fge extends Se{constructor(){super({id:"editor.action.outdentLines",label:m("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2135,weight:100}})}run(e,t){yf.Outdent.runEditorCommand(e,t,null)}}class gge extends Se{constructor(){super({id:"editor.action.insertLineBefore",label:m("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:3075,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Yt.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class pge extends Se{constructor(){super({id:"editor.action.insertLineAfter",label:m("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2051,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Yt.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class e7 extends Se{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),s=[];for(let l=0,c=n.length-1;l<c;l++){let d=n[l],u=n[l+1];k.intersectRanges(d,u)===null?s.push(d):n[l+1]=k.plusRange(d,u)}s.push(n[n.length-1]);let o=this._getEndCursorState(i,s),a=s.map(l=>ai.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}}class mge extends e7{constructor(){super({id:"deleteAllLeft",label:m("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:2049},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],s=0;return t.forEach(o=>{let a;if(o.endColumn===1&&s>0){let l=o.startLineNumber-s;a=new _e(l,o.startColumn,l,o.startColumn)}else a=new _e(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn);s+=o.endLineNumber-o.startLineNumber,o.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let i=t,n=e.getModel();return n===null?[]:(i.sort(k.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){let o=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineContent(o).length+1;return new k(o,a,s.startLineNumber,1)}else return new k(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new k(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class _ge extends e7{constructor(){super({id:"deleteAllRight",label:m("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:297,secondary:[2068]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let s=0,o=t.length,a=0;s<o;s++){let l=t[s],c=new _e(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?i=c:n.push(c)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let i=e.getSelections();if(i===null)return[];let n=i.map(s=>{if(s.isEmpty()){const o=t.getLineMaxColumn(s.startLineNumber);return s.startColumn===o?new k(s.startLineNumber,s.startColumn,s.startLineNumber+1,1):new k(s.startLineNumber,s.startColumn,s.startLineNumber,o)}return s});return n.sort(k.compareRangesUsingStarts),n}}class bge extends Se{constructor(){super({id:"editor.action.joinLines",label:m("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:0,mac:{primary:296},weight:100}})}run(e,t){let i=t.getSelections();if(i===null)return;let n=t.getSelection();if(n===null)return;i.sort(k.compareRangesUsingStarts);let s=[],o=i.reduce((h,f)=>h.isEmpty()?h.endLineNumber===f.startLineNumber?(n.equalsSelection(h)&&(n=f),f):f.startLineNumber>h.endLineNumber+1?(s.push(h),f):new _e(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>h.endLineNumber?(s.push(h),f):new _e(h.startLineNumber,h.startColumn,f.endLineNumber,f.endColumn));s.push(o);let a=t.getModel();if(a===null)return;let l=[],c=[],d=n,u=0;for(let h=0,f=s.length;h<f;h++){let g=s[h],p=g.startLineNumber,_=1,v=0,b,C,y=a.getLineContent(g.endLineNumber).length-g.endColumn;if(g.isEmpty()||g.startLineNumber===g.endLineNumber){let w=g.getStartPosition();w.lineNumber<a.getLineCount()?(b=p+1,C=a.getLineMaxColumn(b)):(b=w.lineNumber,C=a.getLineMaxColumn(w.lineNumber))}else b=g.endLineNumber,C=a.getLineMaxColumn(b);let E=a.getLineContent(p);for(let w=p+1;w<=b;w++){let x=a.getLineContent(w),D=a.getLineFirstNonWhitespaceColumn(w);if(D>=1){let M=!0;E===""&&(M=!1),M&&(E.charAt(E.length-1)===" "||E.charAt(E.length-1)===" ")&&(M=!1,E=E.replace(/[\s\uFEFF\xA0]+$/g," "));let B=x.substr(D-1);E+=(M?" ":"")+B,M?v=B.length+1:v=B.length}else v=0}let S=new k(p,_,b,C);if(!S.isEmpty()){let w;g.isEmpty()?(l.push(ai.replace(S,E)),w=new _e(S.startLineNumber-u,E.length-v+1,p-u,E.length-v+1)):g.startLineNumber===g.endLineNumber?(l.push(ai.replace(S,E)),w=new _e(g.startLineNumber-u,g.startColumn,g.endLineNumber-u,g.endColumn)):(l.push(ai.replace(S,E)),w=new _e(g.startLineNumber-u,g.startColumn,g.startLineNumber-u,E.length-y)),k.intersectRanges(S,n)!==null?d=w:c.push(w)}u+=S.endLineNumber-S.startLineNumber}c.unshift(d),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}}class vge extends Se{constructor(){super({id:"editor.action.transpose",label:m("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:R.writable})}run(e,t){let i=t.getSelections();if(i===null)return;let n=t.getModel();if(n===null)return;let s=[];for(let o=0,a=i.length;o<a;o++){let l=i[o];if(!l.isEmpty())continue;let c=l.getStartPosition(),d=n.getLineMaxColumn(c.lineNumber);if(c.column>=d){if(c.lineNumber===n.getLineCount())continue;let u=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new tn(new _e(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),h))}else{let u=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),h=n.getValueInRange(u).split("").reverse().join("");s.push(new DA(u,h,new _e(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class ES extends Se{run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=t.getOption(115),o=[];for(const a of i)if(a.isEmpty()){const l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;const d=new k(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=n.getValueInRange(d);o.push(ai.replace(d,this._modifyText(u,s)))}else{const l=n.getValueInRange(a);o.push(ai.replace(a,this._modifyText(l,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class Cge extends ES{constructor(){super({id:"editor.action.transformToUppercase",label:m("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class wge extends ES{constructor(){super({id:"editor.action.transformToLowercase",label:m("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class yge extends ES{constructor(){super({id:"editor.action.transformToTitlecase",label:m("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:R.writable})}_modifyText(e,t){const n=(`\r + `+t).split("");let s="",o=!0;for(let a=0;a<e.length;a++){let l=e[a];n.indexOf(l)>=0?(o=!0,s+=l):o?(o=!1,s+=l.toLocaleUpperCase()):s+=l.toLocaleLowerCase()}return s}}class t7{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{}}return this._actual}isSupported(){return this.get()!==null}}class fc extends ES{constructor(){super({id:"editor.action.transformToSnakecase",label:m("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:R.writable})}_modifyText(e,t){const i=fc.regExp1.get(),n=fc.regExp2.get();return!i||!n?e:e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}}fc.regExp1=new t7("(\\p{Ll})(\\p{Lu})","gmu");fc.regExp2=new t7("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");pe(rge);pe(sge);pe(oge);pe(age);pe(lge);pe(cge);pe(dge);pe(xS);pe(uge);pe(hge);pe(fge);pe(gge);pe(pge);pe(mge);pe(_ge);pe(bge);pe(vge);pe(Cge);pe(wge);pe(yge);fc.regExp1.isSupported()&&fc.regExp2.isSupported()&&pe(fc);var Sge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xge=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},uI=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const i7=new xe("LinkedEditingInputVisible",!1),n7="linked-editing-decoration";let Pc=class hI extends Z{constructor(e,t){super();this._debounceDuration=200,this._localToDispose=this._register(new ue),this._editor=e,this._enabled=!1,this._visibleContextKey=i7.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new ue),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(i=>{(i.hasChanged(61)||i.hasChanged(81))&&this.reinitialize(!1)})),this._register(QC.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(e){return e.getContribution(hI.ID)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(61)||this._editor.getOption(81))&&QC.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._languageWordPattern=Ue.getWordDefinition(t.getLanguageIdentifier().id),this._localToDispose.add(t.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=Ue.getWordDefinition(t.getLanguageIdentifier().id)}));const n=new cl(this._debounceDuration),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration)},o=new cl(0),a=l=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const c=t.getDecorationRange(this._currentDecorations[0]);if(c&&l.changes.every(d=>c.intersectRanges(d.range))){a(this._currentDecorations);return}}s()})),this._localToDispose.add({dispose:()=>{n.cancel(),o.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||e.length===0)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const o=n.match(this._currentWordPattern);if((o?o[0].length:0)!==n.length)return this.clearRanges()}let s=[];for(let o=1,a=e.length;o<a;o++){const l=t.getDecorationRange(e[o]);if(!!l)if(l.startLineNumber!==l.endLineNumber)s.push({range:l,text:n});else{let c=t.getValueInRange(l),d=n,u=l.startColumn,h=l.endColumn;const f=Of(c,d);u+=f,c=c.substr(f),d=d.substr(f);const g=UC(c,d);h-=g,c=c.substr(0,c.length-g),d=d.substr(0,d.length-g),(u!==h||d.length!==0)&&s.push({range:new k(l.startLineNumber,u,l.endLineNumber,h),text:d})}}if(s.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const o=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",s),this._editor._getViewModel().setPrevEditOperationType(o)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return uI(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const o=i.getDecorationRange(this._currentDecorations[0]);if(o&&o.containsPosition(t))return}}this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=Pi(o=>uI(this,void 0,void 0,function*(){try{const a=yield r7(i,t,o);if(s!==this._currentRequest||(this._currentRequest=null,n!==i.getVersionId()))return;let l=[];a!=null&&a.ranges&&(l=a.ranges),this._currentWordPattern=(a==null?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let u=0,h=l.length;u<h;u++)if(k.containsPosition(l[u],t)){if(c=!0,u!==0){const f=l[u];l.splice(u,1),l.unshift(f)}break}if(!c){this.clearRanges();return}const d=l.map(u=>({range:u,options:hI.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,d)}catch(a){ga(a)||Fe(a),(this._currentRequest===s||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=s,s})}};Pc.ID="editor.contrib.linkedEditing";Pc.DECORATION=qe.register({description:"linked-editing",stickiness:0,className:n7});Pc=Sge([xge(1,Be)],Pc);class Ege extends Se{constructor(){super({id:"editor.action.linkedEditing",label:m("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:me.and(R.writable,R.hasRenameProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:3132,weight:100}})}runCommand(e,t){const i=e.get(Ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return De.isUri(n)&&U.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(o=>{!o||(o.setPosition(s),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},Fe):super.runCommand(e,t)}run(e,t){const i=Pc.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const kge=dn.bindToContribution(Pc.get);fe(new kge({id:"cancelLinkedEditingInput",precondition:i7,handler:r=>r.clearRanges(),kbOpts:{kbExpr:R.editorTextFocus,weight:100+99,primary:9,secondary:[1033]}}));function r7(r,e,t){const i=QC.ordered(r);return QB(i.map(n=>()=>uI(this,void 0,void 0,function*(){try{return yield n.provideLinkedEditingRanges(r,e,t)}catch(s){Yi(s);return}})),n=>!!n&&mr(n==null?void 0:n.ranges))}const Lge=V("editor.linkedEditingBackground",{dark:q.fromHex("#f00").transparent(.3),light:q.fromHex("#f00").transparent(.3),hc:q.fromHex("#f00").transparent(.3)},m("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Et((r,e)=>{const t=r.getColor(Lge);t&&e.addRule(`.monaco-editor .${n7} { background: ${t}; border-left-color: ${t}; }`)});pa("_executeLinkedEditingProvider",(r,e)=>r7(r,e,it.None));wt(Pc.ID,Pc);pe(Ege);var s7=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Tge{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 s7(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?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 _y{constructor(e){this._disposables=new ue;let t=[];for(const[i,n]of e){const s=i.links.map(o=>new Tge(o,n));t=_y._union(t,s),sD(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i=[],n,s,o,a;for(n=0,o=0,s=e.length,a=t.length;n<s&&o<a;){const l=e[n],c=t[o];if(k.areIntersectingOrTouching(l.range,c.range)){n++;continue}k.compareRangesUsingStarts(l.range,c.range)<0?(i.push(l),n++):(i.push(c),o++)}for(;n<s;n++)i.push(e[n]);for(;o<a;o++)i.push(t[o]);return i}}function o7(r,e){const t=[],i=Em.ordered(r).reverse().map((n,s)=>Promise.resolve(n.provideLinks(r,e)).then(o=>{o&&(t[s]=[o,n])},Yi));return Promise.all(i).then(()=>{const n=new _y(Ou(t));return e.isCancellationRequested?(n.dispose(),new _y([])):n})}lt.registerCommand("_executeLinkProvider",(r,...e)=>s7(void 0,void 0,void 0,function*(){let[t,i]=e;Dt(t instanceof De),typeof i!="number"&&(i=0);const n=r.get(mi).getModel(t);if(!n)return[];const s=yield o7(n,it.None);if(!s)return[];for(let a=0;a<Math.min(i,s.links.length);a++)yield s.links[a].resolve(it.None);const o=s.links.slice(0);return s.dispose(),o}));var Ige=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},iF=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Dge=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Age(r,e){const t=r.url&&/^command:/i.test(r.url.toString()),i=r.tooltip?r.tooltip:t?m("links.navigate.executeCmd","Execute command"):m("links.navigate.follow","Follow link"),n=e?tt?m("links.navigate.kb.meta.mac","cmd + click"):m("links.navigate.kb.meta","ctrl + click"):tt?m("links.navigate.kb.alt.mac","option + click"):m("links.navigate.kb.alt","alt + click");if(r.url){let s="";if(/^command:/i.test(r.url.toString())){const a=r.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];s=` "${m("tooltip.explanation","Execute command {0}",l)}"`}}return new gl("",!0).appendMarkdown(`[${i}](${r.url.toString(!0).replace(/ /g,"%20")}${s}) (${n})`)}else return new gl().appendText(`${i} (${n})`)}const nF={general:qe.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:qe.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class kf{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:kf._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?nF.active:nF.general);return n.hoverMessage=Age(e,t),n}activate(e,t){e.changeDecorationOptions(this.decorationId,kf._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,kf._getOptions(this.link,t,!1))}}let wu=class fI{constructor(e,t,i){this.listenersToRemove=new ue,this.editor=e,this.openerService=t,this.notificationService=i;let n=new cV(e);this.listenersToRemove.add(n),this.listenersToRemove.add(n.onMouseMoveOrRelevantKeyDown(([s,o])=>{this._onEditorMouseMove(s,o)})),this.listenersToRemove.add(n.onExecute(s=>{this.onEditorMouseUp(s)})),this.listenersToRemove.add(n.onCancel(s=>{this.cleanUpActiveLinkDecoration()})),this.enabled=e.getOption(62),this.listenersToRemove.add(e.onDidChangeConfiguration(s=>{const o=e.getOption(62);this.enabled!==o&&(this.enabled=o,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(e.onDidChangeModelContent(s=>this.onChange())),this.listenersToRemove.add(e.onDidChangeModel(s=>this.onModelChanged())),this.listenersToRemove.add(e.onDidChangeModelLanguage(s=>this.onModelModeChanged())),this.listenersToRemove.add(Em.onDidChange(s=>this.onModelModeChanged())),this.timeout=new rr,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(e){return e.getContribution(fI.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),fI.RECOMPUTE_TIME)}beginCompute(){return Dge(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(!!Em.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Pi(t=>o7(e,t));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(t){Fe(t)}finally{this.computePromise=null}}})}updateDecorations(e){const t=this.editor.getOption(69)==="altKey";let i=[],n=Object.keys(this.currentOccurrences);for(let a=0,l=n.length;a<l;a++){let c=n[a],d=this.currentOccurrences[c];i.push(d.decorationId)}let s=[];if(e)for(const a of e)s.push(kf.decoration(a,t));let o=this.editor.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let a=0,l=o.length;a<l;a++){let c=new kf(e[a],o[a]);this.currentOccurrences[c.decorationId]=c}}_onEditorMouseMove(e,t){const i=this.editor.getOption(69)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const n=this.getLinkOccurrence(e.target.position);n&&this.editor.changeDecorations(s=>{n.activate(s,i),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(69)==="altKey";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(it.None).then(s=>{if(typeof s=="string"&&this.editor.hasModel()){const o=this.editor.getModel().uri;if(o.scheme===Ye.file&&s.startsWith(`${Ye.file}:`)){const a=De.parse(s);if(a.scheme===Ye.file){const l=zv(a);let c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(s=Yj(o,c))}}}return this.openerService.open(s,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})},s=>{const o=s instanceof Error?s.message:s;o==="invalid"?this.notificationService.warn(m("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):o==="missing"?this.notificationService.warn(m("missing.url","Failed to open this link because its target is missing.")):Fe(s)})}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 n=this.currentOccurrences[i.id];if(n)return n}return null}isEnabled(e,t){return Boolean(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};wu.ID="editor.linkDetector";wu.RECOMPUTE_TIME=1e3;wu=Ige([iF(1,co),iF(2,ki)],wu);class Nge extends Se{constructor(){super({id:"editor.action.openLink",label:m("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let i=wu.get(t);if(!i||!t.hasModel())return;let n=t.getSelections();for(let s of n){let o=i.getLinkOccurrence(s.getEndPosition());o&&i.openLinkOccurrence(o,!1)}}}wt(wu.ID,wu);pe(Nge);Et((r,e)=>{const t=r.getColor(SA);t&&e.addRule(`.monaco-editor .detected-link-active { color: ${t} !important; }`)});function Dg(r,e){const t=e.filter(i=>!r.find(n=>n.equals(i)));if(t.length>=1){const i=t.map(s=>`line ${s.viewState.position.lineNumber} column ${s.viewState.position.column}`).join(", "),n=t.length===1?m("cursorAdded","Cursor added: {0}",i):m("cursorsAdded","Cursors added: {0}",i);ww(n)}}class Rge extends Se{constructor(){super({id:"editor.action.insertCursorAbove",label:m("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:2576,linux:{primary:1552,secondary:[3088]},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;const n=i&&i.logicalLine===!0,s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,$i.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),Dg(o,s.getCursorStates())}}class Oge extends Se{constructor(){super({id:"editor.action.insertCursorBelow",label:m("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:2578,linux:{primary:1554,secondary:[3090]},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;const n=i&&i.logicalLine===!0,s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,$i.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),Dg(o,s.getCursorStates())}}class Mge extends Se{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:m("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1575,weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let s=t.getLineMaxColumn(n);i.push(new _e(n,s,n,s))}e.endColumn>1&&i.push(new _e(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();let a=[];n.forEach(l=>this.getCursorsForSelection(l,i,a)),a.length>0&&t.setSelections(a),Dg(o,s.getCursorStates())}}class Pge extends Se{constructor(){super({id:"editor.action.addCursorsToBottom",label:m("mutlicursor.addCursorsToBottom","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();let s=[];for(let l=i[0].startLineNumber;l<=n;l++)s.push(new _e(l,i[0].startColumn,l,i[0].endColumn));const o=t._getViewModel(),a=o.getCursorStates();s.length>0&&t.setSelections(s),Dg(a,o.getCursorStates())}}class Fge extends Se{constructor(){super({id:"editor.action.addCursorsToTop",label:m("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let a=i[0].startLineNumber;a>=1;a--)n.push(new _e(a,i[0].startColumn,a,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),Dg(o,s.getCursorStates())}}class kv{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class C_{constructor(e,t,i,n,s,o,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=a}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new C_(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n=!1,s,o;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,s=!0,o=!0):(s=i.wholeWord,o=i.matchCase);const l=e.getSelection();let c,d=null;if(l.isEmpty()){const u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,d=new _e(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` +`);return new C_(e,t,n,c,s,o,d)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new kv(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 kv(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}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(115):null,!1);return i?new _e(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 kv(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 kv(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}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(115):null,!1);return i?new _e(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class yu extends Z{constructor(e){super();this._sessionDispose=this._register(new ue),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(yu.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=C_.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(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.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 _e(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 n=e.getState().matchCase;if(!a7(this._editor.getModel(),t,n)){const o=this._editor.getModel();let a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(o,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const n=i.searchScope;let s=[];t.forEach(o=>{n.forEach(a=>{o.range.endLineNumber<=a.endLineNumber&&o.range.startLineNumber>=a.startLineNumber&&s.push(o)})}),t=s}if(t.length>0){const n=this._editor.getSelection();for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a.range.intersectRanges(n)){t[s]=t[0],t[0]=a;break}}this._setSelections(t.map(s=>new _e(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}}yu.ID="editor.contrib.multiCursorController";class Ag extends Se{run(e,t){const i=yu.get(t);if(!i)return;const n=Vr.get(t);if(!n)return;const s=t._getViewModel();if(s){const o=s.getCursorStates();this._run(i,n),Dg(o,s.getCursorStates())}}}class Bge extends Ag{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:m("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2082,weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class Wge extends Ag{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:m("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class Vge extends Ag{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:m("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:Bi(2089,2082),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class Hge extends Ag{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:m("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class $ge extends Ag{constructor(){super({id:"editor.action.selectHighlights",label:m("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:3114,weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"3_multi",title:m({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class Uge extends Ag{constructor(){super({id:"editor.action.changeAll",label:m("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:me.and(R.writable,R.editorTextFocus),kbOpts:{kbExpr:R.editorTextFocus,primary:2108,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class rF{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t?!0:!e||!t?!1:e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class ol extends Z{constructor(e){super();this.editor=e,this._isEnabled=e.getOption(96),this.decorations=[],this.updateSoon=this._register(new $t(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(96)})),this._register(e.onDidChangeCursorSelection(t=>{!this._isEnabled||(t.selection.isEmpty()?t.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(t=>{this._setState(null)})),this._register(e.onDidChangeModelContent(t=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(Vr.get(e).getState().onFindReplaceStateChange(t=>{this._update()}))}_update(){this._setState(ol._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e||!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=yu.get(t);if(!n)return null;const s=Vr.get(t);if(!s)return null;let o=n.getSession(s);if(!o){const c=t.getSelections();if(c.length>1){const u=s.getState().matchCase;if(!a7(t.getModel(),c,u))return null}o=C_.create(t,s)}if(!o||o.currentMatch||/^[ \t]+$/.test(o.searchText)||o.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let c=a.searchString;l||(c=c.toLowerCase());let d=o.searchText;if(l||(d=d.toLowerCase()),c===d&&o.matchCase===a.matchCase&&o.wholeWord===a.wholeWord&&!a.isRegex)return null}return new rF(o.searchText,o.matchCase,o.wholeWord?t.getOption(115):null,t.getModel().getVersionId())}_setState(e){if(rF.softEquals(this.state,e)){this.state=e;return}if(this.state=e,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=Pf.has(t)&&this.editor.getOption(71);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(l=>l.range);n.sort(k.compareRangesUsingStarts);let s=this.editor.getSelections();s.sort(k.compareRangesUsingStarts);let o=[];for(let l=0,c=0,d=n.length,u=s.length;l<d;){const h=n[l];if(c>=u)o.push(h),l++;else{const f=k.compareRangesUsingStarts(h,s[c]);f<0?((s[c].isEmpty()||!k.areIntersecting(h,s[c]))&&o.push(h),l++):(f>0||l++,c++)}}const a=o.map(l=>({range:l,options:i?ol._SELECTION_HIGHLIGHT:ol._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,a)}dispose(){this._setState(null),super.dispose()}}ol.ID="editor.contrib.selectionHighlighter";ol._SELECTION_HIGHLIGHT_OVERVIEW=qe.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:li(S0),position:Qr.Inline},overviewRuler:{color:li(jW),position:Fr.Center}});ol._SELECTION_HIGHLIGHT=qe.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function a7(r,e,t){const i=sF(r,e[0],!t);for(let n=1,s=e.length;n<s;n++){const o=e[n];if(o.isEmpty())return!1;const a=sF(r,o,!t);if(i!==a)return!1}return!0}function sF(r,e,t){const i=r.getValueInRange(e);return t?i.toLowerCase():i}wt(yu.ID,yu);wt(ol.ID,ol);pe(Rge);pe(Oge);pe(Mge);pe(Bge);pe(Wge);pe(Vge);pe(Hge);pe($ge);pe(Uge);pe(Pge);pe(Fge);var l7=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Su={Visible:new xe("parameterHintsVisible",!1),MultipleSignatures:new xe("parameterHintsMultipleSignatures",!1)};function c7(r,e,t,i){return l7(this,void 0,void 0,function*(){const n=Fd.ordered(r);for(const s of n)try{const o=yield s.provideSignatureHelp(r,e,i,t);if(o)return o}catch(o){Yi(o)}})}lt.registerCommand("_executeSignatureHelpProvider",(r,...e)=>l7(void 0,void 0,void 0,function*(){const[t,i,n]=e;Dt(De.isUri(t)),Dt(U.isIPosition(i)),Dt(typeof n=="string"||!n);const s=yield r.get(ho).createModelReference(t);try{const o=yield c7(s.object.textEditorModel,U.lift(i),{triggerKind:ta.Invoke,isRetrigger:!1,triggerCharacter:n},it.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{s.dispose()}}));var zge=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Hl;(function(r){r.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}r.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}r.Active=t})(Hl||(Hl={}));class kS extends Z{constructor(e,t=kS.DEFAULT_DELAY){super();this._onChangedHints=this._register(new H),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=Hl.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new Un),this.triggerChars=new qh,this.retriggerChars=new qh,this.triggerId=0,this.editor=e,this.throttledDelayer=new cl(t),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(i=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(i=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(i=>this.onCursorChange(i))),this._register(this.editor.onDidChangeModelContent(i=>this.onModelContentChange())),this._register(Fd.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(i=>this.onDidType(i))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=Hl.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!Fd.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(Fe)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e===e-1,n=this.editor.getOption(75).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(75).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new Hl.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return zge(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(jge);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 Hl.Pending(Pi(l=>c7(o,a,s,l)),i);try{const l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new Hl.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=Hl.Default),Fe(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new qh,this.retriggerChars=new qh;const e=this.editor.getModel();if(!!e)for(const t of Fd.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(i.charCodeAt(0)),this.retriggerChars.add(i.charCodeAt(0));for(const i of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(i.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:ta.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:ta.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:ta.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}kS.DEFAULT_DELAY=120;function jge(r,e){switch(e.triggerKind){case ta.Invoke:return e;case ta.ContentChange:return r;case ta.TriggerCharacter:default:return e}}var qge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tE=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Sr=oe,Gge=un("parameter-hints-next",be.chevronDown,m("parameterHintsNextIcon","Icon for show next parameter hint.")),Kge=un("parameter-hints-previous",be.chevronUp,m("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let by=class d7 extends Z{constructor(e,t,i,n){super();this.editor=e,this.renderDisposeables=this._register(new ue),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Ac({editor:e},n,i)),this.model=this._register(new kS(e)),this.keyVisible=Su.Visible.bindTo(t),this.keyMultipleSignatures=Su.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(s=>{s?(this.show(),this.render(s)):this.hide()}))}createParameterHintDOMNodes(){const e=Sr(".editor-widget.parameter-hints-widget"),t=X(e,Sr(".phwrapper"));t.tabIndex=-1;const i=X(t,Sr(".controls")),n=X(i,Sr(".button"+qt.asCSSSelector(Kge))),s=X(i,Sr(".overloads")),o=X(i,Sr(".button"+qt.asCSSSelector(Gge)));this._register(J(n,"click",h=>{xt.stop(h),this.previous()})),this._register(J(o,"click",h=>{xt.stop(h),this.next()}));const a=Sr(".body"),l=new Q_(a,{});this._register(l),t.appendChild(l.getDomNode());const c=X(a,Sr(".signature")),d=X(a,Sr(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:s,docs:d,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(h=>{this.visible&&this.editor.layoutContentWidget(this)}));const u=()=>{if(!this.domNodes)return;const h=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${h.fontSize}px`};u(),this._register(ke.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(h=>h.hasChanged(43)).on(u,null)),this._register(this.editor.onDidLayoutChange(h=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.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=X(this.domNodes.signature,Sr(".code")),o=this.editor.getOption(43);s.style.fontSize=`${o.fontSize}px`,s.style.fontFamily=o.fontFamily;const a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(s,n,l);else{const u=X(s,Sr("span"));u.textContent=n.label}const c=n.parameters[l];if(c!=null&&c.documentation){const u=Sr("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{const h=this.renderMarkdownDocs(c.documentation);u.appendChild(h.element)}X(this.domNodes.docs,Sr("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")X(this.domNodes.docs,Sr("p",{},n.documentation));else{const u=this.renderMarkdownDocs(n.documentation);X(this.domNodes.docs,u.element)}const d=this.hasDocs(n,c);if(this.domNodes.signature.classList.toggle("has-docs",d),this.domNodes.docs.classList.toggle("empty",!d),this.domNodes.overloads.textContent=String(e.activeSignature+1).padStart(e.signatures.length.toString().length,"0")+"/"+e.signatures.length,c){let u="";const h=n.parameters[l];Array.isArray(h.label)?u=n.label.substring(h.label[0],h.label[1]):u=h.label,h.documentation&&(u+=typeof h.documentation=="string"?`, ${h.documentation}`:`, ${h.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(sn(m("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&Db(t.documentation).length>0||t&&typeof t.documentation=="object"&&Db(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&Db(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&Db(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 a=document.createElement("span");a.textContent=t.label.substring(n,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),X(e,o,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${Ns(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return d7.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};by.ID="editor.widget.parameterHintsWidget";by=qge([tE(1,Be),tE(2,co),tE(3,Fs)],by);Et((r,e)=>{const t=r.getColor(yA);if(t){const l=r.type===Jr.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .parameter-hints-widget { border: ${l}px solid ${t}; }`),e.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${t.transparent(.5)}; }`)}const i=r.getColor(su);i&&e.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const n=r.getColor(Z_);n&&e.addRule(`.monaco-editor .parameter-hints-widget a { color: ${n}; }`);const s=r.getColor(X_);s&&e.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${s}; }`);const o=r.getColor(wA);o&&e.addRule(`.monaco-editor .parameter-hints-widget { color: ${o}; }`);const a=r.getColor(uA);a&&e.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${a}; }`)});var Yge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Zge=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let xu=class u7 extends Z{constructor(e,t){super();this.editor=e,this.widget=this._register(t.createInstance(by,this.editor))}static get(e){return e.getContribution(u7.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};xu.ID="editor.controller.parameterHints";xu=Yge([Zge(1,gt)],xu);class Xge extends Se{constructor(){super({id:"editor.action.triggerParameterHints",label:m("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:R.hasSignatureHelpProvider,kbOpts:{kbExpr:R.editorTextFocus,primary:3082,weight:100}})}run(e,t){const i=xu.get(t);i&&i.trigger({triggerKind:ta.Invoke})}}wt(xu.ID,xu);pe(Xge);const XN=100+75,QN=dn.bindToContribution(xu.get);fe(new QN({id:"closeParameterHints",precondition:Su.Visible,handler:r=>r.cancel(),kbOpts:{weight:XN,kbExpr:R.focus,primary:9,secondary:[1033]}}));fe(new QN({id:"showPrevParameterHint",precondition:me.and(Su.Visible,Su.MultipleSignatures),handler:r=>r.previous(),kbOpts:{weight:XN,kbExpr:R.focus,primary:16,secondary:[528],mac:{primary:16,secondary:[528,302]}}}));fe(new QN({id:"showNextParameterHint",precondition:me.and(Su.Visible,Su.MultipleSignatures),handler:r=>r.next(),kbOpts:{weight:XN,kbExpr:R.focus,primary:18,secondary:[530],mac:{primary:18,secondary:[530,300]}}}));var Qge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},iE=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const LS=new xe("renameInputVisible",!1,m("renameInputVisible","Whether the rename input widget is visible"));let gI=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new ue,this.allowEditorOverflow=!0,this._visibleContextKey=LS.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(43)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!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",m("renameAriaLabel","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);const e=()=>{var t,i;const[n,s]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=m({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel(),(i=this._keybindingService.lookupKeybinding(s))===null||i===void 0?void 0:i.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const o=e.getColor(Sc);this._domNode.style.backgroundColor=String((t=e.getColor(Mr))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=o?` 0 0 8px 2px ${o}`:"",this._domNode.style.color=String((i=e.getColor(fA))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor(hA))!==null&&n!==void 0?n:"");const a=e.getColor(gA);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=(s=a==null?void 0:a.toString())!==null&&s!==void 0?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(43);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,s,o){this._domNode.classList.toggle("preview",s),this._position=new U(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((e.endColumn-e.startColumn)*1.1,20);const a=new ue;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:s&&c})},o.onCancellationRequested(()=>this.cancelInput(!0)),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{a.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)}};gI=Qge([iE(2,Gt),iE(3,Zt),iE(4,Be)],gI);var Jge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lh=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Zd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class JN{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=XC.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Zd(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const n=this._providers[this._providerRenameIdx];if(!n.resolveRenameLocation)break;let s=yield n.resolveRenameLocation(this.model,this.position,e);if(!!s){if(s.rejectReason){t.push(s.rejectReason);continue}return s}}const i=this.model.getWordAtPosition(this.position);return i?{range:new k(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join(` +`):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` +`):void 0}})}provideRenameEdits(e,t){return Zd(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Zd(this,void 0,void 0,function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(` +`)};const o=yield s.provideRenameEdits(this.model,this.position,e,n);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(m("no result","No result.")),n);return o})}}function epe(r,e,t){return Zd(this,void 0,void 0,function*(){const i=new JN(r,e),n=yield i.resolveRenameLocation(it.None);return n!=null&&n.rejectReason?{edits:[],rejectReason:n.rejectReason}:i.provideRenameEdits(t,it.None)})}let Eu=class h7{constructor(e,t,i,n,s,o,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=a,this._dispoableStore=new ue,this._cts=new Hn,this._renameInputField=this._dispoableStore.add(new df(()=>this._dispoableStore.add(this._instaService.createInstance(gI,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(h7.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Zd(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new JN(this.editor.getModel(),e);if(!t.hasProvider())return;this._cts=new Ym(this.editor,5);let i;try{const d=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(d,250),i=yield d}catch(d){Wr.get(this.editor).showMessage(d||m("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e);return}if(!i)return;if(i.rejectReason){Wr.get(this.editor).showMessage(i.rejectReason,e);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new Ym(this.editor,5,i.range);let n=this.editor.getSelection(),s=0,o=i.text.length;!k.isEmpty(n)&&!k.spansMultipleLines(n)&&k.containsRange(i.range,n)&&(s=Math.max(0,n.startColumn-i.range.startColumn),o=Math.min(i.range.endColumn,n.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,s,o,a,this._cts.token);if(typeof l=="boolean"){l&&this.editor.focus();return}this.editor.focus();const c=dD(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(d=>Zd(this,void 0,void 0,function*(){if(!(!d||!this.editor.hasModel())){if(d.rejectReason){this._notificationService.info(d.rejectReason);return}this._bulkEditService.apply(r0.convert(d),{editor:this.editor,showPreview:l.wantsPreview,label:m("label","Renaming '{0}'",i==null?void 0:i.text),quotableLabel:m("quotableLabel","Renaming {0}",i==null?void 0:i.text)}).then(u=>{u.ariaSummary&&sn(m("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,u.ariaSummary))}).catch(u=>{this._notificationService.error(m("rename.failedApply","Rename failed to apply edits")),this._logService.error(u)})}}),d=>{this._notificationService.error(m("rename.failed","Rename failed to compute edits")),this._logService.error(d)});return this._progressService.showWhile(c,250),c})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};Eu.ID="editor.contrib.renameController";Eu=Jge([Lh(1,gt),Lh(2,ki),Lh(3,jD),Lh(4,bl),Lh(5,_l),Lh(6,FD)],Eu);class tpe extends Se{constructor(){super({id:"editor.action.rename",label:m("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:me.and(R.writable,R.hasRenameProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return De.isUri(n)&&U.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(o=>{!o||(o.setPosition(s),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},Fe):super.runCommand(e,t)}run(e,t){const i=Eu.get(t);return i?i.run():Promise.resolve()}}wt(Eu.ID,Eu);pe(tpe);const eR=dn.bindToContribution(Eu.get);fe(new eR({id:"acceptRenameInput",precondition:LS,handler:r=>r.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:R.focus,primary:3}}));fe(new eR({id:"acceptRenameInputWithPreview",precondition:me.and(LS,me.has("config.editor.rename.enablePreview")),handler:r=>r.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:R.focus,primary:1024+3}}));fe(new eR({id:"cancelRenameInput",precondition:LS,handler:r=>r.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:R.focus,primary:9,secondary:[1033]}}));pa("_executeDocumentRenameProvider",function(r,e,...t){const[i]=t;return Dt(typeof i=="string"),epe(r,e,i)});pa("_executePrepareRename",function(r,e){return Zd(this,void 0,void 0,function*(){const i=yield new JN(r,e).resolveRenameLocation(it.None);if(i!=null&&i.rejectReason)throw new Error(i.rejectReason);return i})});_i.as(Pu.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:m("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class ipe{provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;let{word:s,startColumn:o}=n,a=i.column-o,l=a,c=a,d=0;for(;l>=0;l--){let u=s.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(Ka(u)&&Ks(d))break;d=u}for(l+=1;c<s.length;c++){let u=s.charCodeAt(c);if(Ks(u)&&Ka(d))break;if(u===95||u===45)break;d=u}l<c&&e.push({range:new k(i.lineNumber,o+l,i.lineNumber,o+c)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new k(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new k(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var tR=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class iR{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new iR(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class cg{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(cg.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return tR(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!Xy.has(i)||(this._state||(yield g7(i,t.map(s=>s.getPosition()),this._editor.getOption(101),it.None).then(s=>{var o;if(!(!mr(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Ls(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<s.length;a++)s[a]=s[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new iR(0,a)),(o=this._selectionListener)===null||o===void 0||o.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>_e.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}}cg.ID="editor.contrib.smartSelectController";class f7 extends Se{constructor(e,t){super(t);this._forward=e}run(e,t){return tR(this,void 0,void 0,function*(){let i=cg.get(t);i&&(yield i.run(this._forward))})}}class npe extends f7{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:m("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1553,mac:{primary:3345,secondary:[1297]},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}lt.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class rpe extends f7{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:m("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1551,mac:{primary:3343,secondary:[1295]},weight:100},menuOpts:{menuId:Ee.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}wt(cg.ID,cg);pe(npe);pe(rpe);Xy.register("*",new ipe);function g7(r,e,t,i){return tR(this,void 0,void 0,function*(){const n=Xy.all(r);n.length===1&&n.unshift(new Er);let s=[],o=[];for(const a of n)s.push(Promise.resolve(a.provideSelectionRanges(r,e,i)).then(l=>{if(mr(l)&&l.length===e.length)for(let c=0;c<e.length;c++){o[c]||(o[c]=[]);for(const d of l[c])k.isIRange(d.range)&&k.containsPosition(d.range,e[c])&&o[c].push(k.lift(d.range))}},Yi));return yield Promise.all(s),o.map(a=>{if(a.length===0)return[];a.sort((u,h)=>U.isBefore(u.getStartPosition(),h.getStartPosition())?1:U.isBefore(h.getStartPosition(),u.getStartPosition())||U.isBefore(u.getEndPosition(),h.getEndPosition())?-1:U.isBefore(h.getEndPosition(),u.getEndPosition())?1:0);let l=[],c;for(const u of a)(!c||k.containsRange(u,c)&&!k.equalsRange(u,c))&&(l.push(u),c=u);if(!t.selectLeadingAndTrailingWhitespace)return l;let d=[l[0]];for(let u=1;u<l.length;u++){const h=l[u-1],f=l[u];if(f.startLineNumber!==h.startLineNumber||f.endLineNumber!==h.endLineNumber){const g=new k(h.startLineNumber,r.getLineFirstNonWhitespaceColumn(h.startLineNumber),h.endLineNumber,r.getLineLastNonWhitespaceColumn(h.endLineNumber));g.containsRange(h)&&!g.equalsRange(h)&&f.containsRange(g)&&!f.equalsRange(g)&&d.push(g);const p=new k(h.startLineNumber,1,h.endLineNumber,r.getLineMaxColumn(h.endLineNumber));p.containsRange(h)&&!p.equalsRange(g)&&f.containsRange(p)&&!f.equalsRange(p)&&d.push(p)}d.push(f)}return d})})}rY("_executeSelectionRangeProvider",function(r,...e){const[t]=e;return g7(r,t,{selectLeadingAndTrailingWhitespace:!0},it.None)});class spe extends Se{constructor(){super({id:"editor.action.forceRetokenize",label:m("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.resetTokenization();const n=new sa(!0);i.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}pe(spe);class dg extends Se{constructor(){super({id:dg.ID,label:m({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2091,mac:{primary:1323},weight:100}})}run(e,t){const n=!dw.getTabFocusMode();dw.setTabFocusMode(n),sn(n?m("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):m("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}dg.ID="editor.action.toggleTabFocusMode";pe(dg);var ope=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oF=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},ape=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const p7="ignoreUnusualLineTerminators";function lpe(r,e,t){r.setModelProperty(e.uri,p7,t)}function cpe(r,e){return r.getModelProperty(e.uri,p7)}let w_=class extends Z{constructor(e,t,i){super();this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return ape(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||cpe(this._codeEditorService,e)===!0||this._editor.getOption(80))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:m("unusualLineTerminators.title","Unusual Line Terminators"),message:m("unusualLineTerminators.message","Detected unusual line terminators"),detail:m("unusualLineTerminators.detail","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`.",Rs(e.uri)),primaryButton:m("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:m("unusualLineTerminators.ignore","Ignore")})).confirmed){lpe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};w_.ID="editor.contrib.unusualLineTerminatorsDetector";w_=ope([oF(1,tb),oF(2,Ct)],w_);wt(w_.ID,w_);var dpe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nE=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let y_=class extends Z{constructor(e,t,i,n){super();this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._tokenizeViewport=new $t(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(s=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(ND.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(KA)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!DL(e,this._themeService,this._configurationService)){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const t=GA(e);if(!t){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const i=this._modelService.getSemanticTokensProviderStyling(t),n=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(n.map(s=>this._requestRange(e,s,t,i)))}_requestRange(e,t,i,n){const s=e.getVersionId(),o=Pi(a=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,a)));return o.then(a=>{!a||e.isDisposed()||e.getVersionId()!==s||e.setPartialSemanticTokens(t,W8(a,n,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(o),()=>this._removeOutstandingRequest(o)),o}};y_.ID="editor.contrib.viewportSemanticTokens";y_=dpe([nE(1,mi),nE(2,Gt),nE(3,di)],y_);wt(y_.ID,y_);var upe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hpe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const fpe=V("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},m("wordHighlight","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),gpe=V("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},m("wordHighlightStrong","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),ppe=V("editor.wordHighlightBorder",{light:null,dark:null,hc:Tn},m("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),mpe=V("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:Tn},m("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),_pe=V("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),bpe=V("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},m("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),TS=new xe("hasWordHighlights",!1);function m7(r,e,t){const i=Pf.ordered(r);return QB(i.map(n=>()=>Promise.resolve(n.provideDocumentHighlights(r,e,t)).then(void 0,Yi)),mr)}class _7{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=Pi(n=>this._compute(e,t,i,n))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new k(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,d=i.length;!l&&c<d;c++){let u=e.getDecorationRange(i[c]);u&&u.startLineNumber===n&&u.startColumn<=s&&u.endColumn>=o&&(l=!0)}return l}cancel(){this.result.cancel()}}class vpe extends _7{_compute(e,t,i,n){return m7(e,t.getPosition(),n).then(s=>s||[])}}class Cpe extends _7{constructor(e,t,i){super(e,t,i);this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return mc(250,n).then(()=>{if(!t.isEmpty())return[];const s=e.getWordAtPosition(t.getPosition());return!s||s.word.length>1e3?[]:e.findMatches(s.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:ym.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function wpe(r,e,t){return Pf.has(r)?new vpe(r,e,t):new Cpe(r,e,t)}pa("_executeDocumentHighlights",(r,e)=>m7(r,e,it.None));class Ng{constructor(e,t){this.toUnhook=new ue,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=TS.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(i=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(i)})),this.toUnhook.add(e.onDidChangeModelContent(i=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(i=>{let n=this.editor.getOption(71);this.occurrencesHighlight!==n&&(this.occurrencesHighlight=n,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return Ou(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(k.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(n.startLineNumber);sn(`${o}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(n.startLineNumber);sn(`${o}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){this._stopAll();return}const s=this.workerRequest&&this.workerRequest.isValid(this.model,e,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),s)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let o=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=wpe(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(a=>{o===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},Fe)}}_beginRenderDecorations(){let 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;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Ng._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===ym.Write?this._WRITE_OPTIONS:e===ym.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Ng._WRITE_OPTIONS=qe.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:li(bpe),position:Fr.Center},minimap:{color:li(S0),position:Qr.Inline}});Ng._TEXT_OPTIONS=qe.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:li(jW),position:Fr.Center},minimap:{color:li(S0),position:Qr.Inline}});Ng._REGULAR_OPTIONS=qe.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:li(_pe),position:Fr.Center},minimap:{color:li(S0),position:Qr.Inline}});let ku=class b7 extends Z{constructor(e,t){super();this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new Ng(e,t))};this._register(e.onDidChangeModel(n=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}static get(e){return e.getContribution(b7.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};ku.ID="editor.contrib.wordHighlighter";ku=upe([hpe(1,Be)],ku);class v7 extends Se{constructor(e,t){super(t);this._isNext=e}run(e,t){const i=ku.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class ype extends v7{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:m("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:TS,kbOpts:{kbExpr:R.editorTextFocus,primary:65,weight:100}})}}class Spe extends v7{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:m("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:TS,kbOpts:{kbExpr:R.editorTextFocus,primary:1089,weight:100}})}}class xpe extends Se{constructor(){super({id:"editor.action.wordHighlight.trigger",label:m("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:TS.toNegated(),kbOpts:{kbExpr:R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=ku.get(t);!n||n.restoreViewState(!0)}}wt(ku.ID,ku);pe(ype);pe(Spe);pe(xpe);Et((r,e)=>{const t=r.getColor(CA);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=r.getColor(fpe);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=r.getColor(gpe);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const s=r.getColor(NZ);s&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const o=r.getColor(ppe);o&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${r.type==="hc"?"dashed":"solid"} ${o}; box-sizing: border-box; }`);const a=r.getColor(mpe);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${r.type==="hc"?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class IS extends dn{constructor(e){super(e);this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),a=t.getSelections().map(l=>{const c=new U(l.positionLineNumber,l.positionColumn),d=this._move(n,s,c,this._wordNavigationType);return this._moveTo(l,d,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>Ge.fromModelSelection(l))),a.length===1){const l=new U(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new _e(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new _e(t.lineNumber,t.column,t.lineNumber,t.column)}}class zc extends IS{_move(e,t,i,n){return ut.moveWordLeft(e,t,i,n)}}class jc extends IS{_move(e,t,i,n){return ut.moveWordRight(e,t,i,n)}}class Epe extends zc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class kpe extends zc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class Lpe extends zc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:me.and(R.textInputFocus,(e=me.and(eb,W0))===null||e===void 0?void 0:e.negate()),primary:2063,mac:{primary:527},weight:100}})}}class Tpe extends zc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class Ipe extends zc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Dpe extends zc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:me.and(R.textInputFocus,(e=me.and(eb,W0))===null||e===void 0?void 0:e.negate()),primary:3087,mac:{primary:1551},weight:100}})}}class Ape extends zc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(os(mo.wordSeparators.defaultValue),t,i,n)}}class Npe extends zc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(os(mo.wordSeparators.defaultValue),t,i,n)}}class Rpe extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class Ope extends jc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:me.and(R.textInputFocus,(e=me.and(eb,W0))===null||e===void 0?void 0:e.negate()),primary:2065,mac:{primary:529},weight:100}})}}class Mpe extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class Ppe extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class Fpe extends jc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:me.and(R.textInputFocus,(e=me.and(eb,W0))===null||e===void 0?void 0:e.negate()),primary:3089,mac:{primary:1553},weight:100}})}}class Bpe extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class Wpe extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(os(mo.wordSeparators.defaultValue),t,i,n)}}class Vpe extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(os(mo.wordSeparators.defaultValue),t,i,n)}}class DS extends dn{constructor(e){super(e);this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),o=t.getSelections(),a=t.getOption(5),l=t.getOption(8),c=Ue.getAutoClosingPairs(s.getLanguageIdentifier().id),d=t._getViewModel(),u=o.map(h=>{const f=this._delete({wordSeparators:n,model:s,selection:h,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:c,autoClosedCharacters:d.getCursorAutoClosedCharacters()},this._wordNavigationType);return new tn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class nR extends DS{_delete(e,t){let i=ut.deleteWordLeft(e,t);return i||new k(1,1,1,1)}}class rR extends DS{_delete(e,t){let i=ut.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class Hpe extends nR{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:R.writable})}}class $pe extends nR{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:R.writable})}}class Upe extends nR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2049,mac:{primary:513},weight:100}})}}class zpe extends rR{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:R.writable})}}class jpe extends rR{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:R.writable})}}class qpe extends rR{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2068,mac:{primary:532},weight:100}})}}class Gpe extends Se{constructor(){super({id:"deleteInsideWord",precondition:R.writable,label:m("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),a=t.getSelections().map(l=>{const c=ut.deleteInsideWord(n,s,l);return new tn(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}fe(new Epe);fe(new kpe);fe(new Lpe);fe(new Tpe);fe(new Ipe);fe(new Dpe);fe(new Rpe);fe(new Ope);fe(new Mpe);fe(new Ppe);fe(new Fpe);fe(new Bpe);fe(new Ape);fe(new Npe);fe(new Wpe);fe(new Vpe);fe(new Hpe);fe(new $pe);fe(new Upe);fe(new zpe);fe(new jpe);fe(new qpe);pe(Gpe);class Kpe extends DS{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:769},weight:100}})}_delete(e,t){let i=L0.deleteWordPartLeft(e);return i||new k(1,1,1,1)}}class Ype extends DS{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:788},weight:100}})}_delete(e,t){let i=L0.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class C7 extends IS{_move(e,t,i,n){return L0.moveWordPartLeft(e,t,i)}}class Zpe extends C7{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:783},weight:100}})}}lt.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class Xpe extends C7{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:1807},weight:100}})}}lt.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class w7 extends IS{_move(e,t,i,n){return L0.moveWordPartRight(e,t,i)}}class Qpe extends w7{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:785},weight:100}})}}class Jpe extends w7{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:1809},weight:100}})}}fe(new Kpe);fe(new Ype);fe(new Zpe);fe(new Xpe);fe(new Qpe);fe(new Jpe);var y7=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yC=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const S7=new xe("accessibilityHelpWidgetVisible",!1);let Lu=class x7 extends Z{constructor(e,t){super();this._editor=e,this._widget=this._register(t.createInstance(ug,this._editor))}static get(e){return e.getContribution(x7.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Lu.ID="editor.contrib.accessibilityHelpController";Lu=y7([yC(1,gt)],Lu);function eme(r,e){return!r||r.length===0?Ci.noSelection:r.length===1?e?bn(Ci.singleSelectionRange,r[0].positionLineNumber,r[0].positionColumn,e):bn(Ci.singleSelection,r[0].positionLineNumber,r[0].positionColumn):e?bn(Ci.multiSelectionRange,r.length,e):r.length>0?bn(Ci.multiSelection,r.length):""}let ug=class SC extends Hr{constructor(e,t,i,n){super();this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=S7.bindTo(this._contextKeyService),this._domNode=ht(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=ht(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(Ei(this._contentDomNode.domNode,"keydown",s=>{if(!!this._isVisible&&(s.equals(2083)&&(sn(Ci.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),Ki(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2086))){sn(Ci.openingDocs);let o=this._editor.getRawOptions().accessibilityHelpUrl;typeof o=="undefined"&&(o="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(De.parse(o)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return SC.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?bn(t,n.getAriaLabel()):bn(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=eme(t,i);e.get(53)?e.get(80)?n+=Ci.readonlyDiffEditor:n+=Ci.editableDiffEditor:e.get(80)?n+=Ci.readonlyEditor:n+=Ci.editableEditor;const s=tt?Ci.changeConfigToOnMac:Ci.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=` + + - `+s;break;case 2:n+=` + + - `+Ci.auto_on;break;case 1:n+=` + + - `+Ci.auto_off,n+=" "+s;break}e.get(128)?n+=` + + - `+this._descriptionForCommand(dg.ID,Ci.tabFocusModeOnMsg,Ci.tabFocusModeOnMsgNoKb):n+=` + + - `+this._descriptionForCommand(dg.ID,Ci.tabFocusModeOffMsg,Ci.tabFocusModeOffMsgNoKb);const o=tt?Ci.openDocMac:Ci.openDocWinLinux;n+=` + + - `+o,n+=` + +`+Ci.outroMsg,this._contentDomNode.domNode.appendChild(L6(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Ki(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(SC.WIDTH,e.width-40)),i=Math.max(5,Math.min(SC.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);let n=Math.round((e.height-i)/2);this._domNode.setTop(n);let s=Math.round((e.width-t)/2);this._domNode.setLeft(s)}};ug.ID="editor.contrib.accessibilityHelpWidget";ug.WIDTH=500;ug.HEIGHT=300;ug=y7([yC(1,Be),yC(2,Zt),yC(3,co)],ug);class tme extends Se{constructor(){super({id:"editor.action.showAccessibilityHelp",label:Ci.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:571,weight:100,linux:{primary:1595,secondary:[571]}}})}run(e,t){let i=Lu.get(t);i&&i.show()}}wt(Lu.ID,Lu);pe(tme);const ime=dn.bindToContribution(Lu.get);fe(new ime({id:"closeAccessibilityHelp",precondition:S7,handler:r=>r.hide(),kbOpts:{weight:100+100,kbExpr:R.focus,primary:9,secondary:[1033]}}));Et((r,e)=>{const t=r.getColor(Mr);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=r.getColor(nl);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const n=r.getColor(Sc);n&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${n}; }`);const s=r.getColor(gi);s&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)});class pI extends Z{constructor(e){super();this.editor=e,this.widget=null,ra&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(80);!this.widget&&e?this.widget=new AS(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}pI.ID="editor.contrib.iPadShowKeyboard";class AS extends Z{constructor(e){super();this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(J(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(J(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return AS.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}AS.ID="editor.contrib.ShowKeyboardWidget";wt(pI.ID,pI);var nme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},aF=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let hg=class E7 extends Z{constructor(e,t,i){super();this._editor=e,this._modeService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(Qt.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}static get(e){return e.getContribution(E7.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new NS(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};hg.ID="editor.contrib.inspectTokens";hg=nme([aF(1,Uu),aF(2,Fs)],hg);class rme extends Se{constructor(){super({id:"editor.action.inspectTokens",label:Qk.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=hg.get(t);i&&i.launch()}}function sme(r){let e="";for(let t=0,i=r.length;t<i;t++){let n=r.charCodeAt(t);switch(n){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(n)}}return e}function ome(r){let e=Qt.get(r.language);return e||{getInitialState:()=>G_,tokenize:(t,i,n,s)=>R3(r.language,t,n,s),tokenize2:(t,i,n,s)=>OD(r.id,t,n,s)}}class NS extends Z{constructor(e,t){super();this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=ome(this._model.getLanguageIdentifier()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return NS._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}let s=this._model.getLineContent(e.lineNumber),o="";if(i<t.tokens1.length){let l=t.tokens1[i].offset,c=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;o=s.substring(l,c)}_c(this._domNode,oe("h2.tm-token",void 0,sme(o),oe("span.tm-token-length",void 0,`${o.length} ${o.length===1?"char":"chars"}`))),X(this._domNode,oe("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;X(this._domNode,oe("table.tm-metadata-table",void 0,oe("tbody",void 0,oe("tr",void 0,oe("td.tm-metadata-key",void 0,"language"),oe("td.tm-metadata-value",void 0,`${a?a.languageIdentifier.language:"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"token type"),oe("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"font style"),oe("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"foreground"),oe("td.tm-metadata-value",void 0,`${a?q.Format.CSS.formatHex(a.foreground):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"background"),oe("td.tm-metadata-value",void 0,`${a?q.Format.CSS.formatHex(a.background):"-?-"}`))))),X(this._domNode,oe("hr.tokens-inspect-separator")),i<t.tokens1.length&&X(this._domNode,oe("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=Qt.getColorMap(),i=kn.getLanguageId(e),n=kn.getTokenType(e),s=kn.getFontStyle(e),o=kn.getForeground(e),a=kn.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(i),tokenType:n,fontStyle:s,foreground:t[o],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),!0,t,0);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t,0).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}NS._ID="editor.contrib.inspectTokensWidget";wt(hg.ID,hg);pe(rme);Et((r,e)=>{const t=r.getColor(yA);if(t){let s=r.type===Jr.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .tokens-inspect-widget { border: ${s}px solid ${t}; }`),e.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${t}; }`)}const i=r.getColor(su);i&&e.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const n=r.getColor(wA);n&&e.addRule(`.monaco-editor .tokens-inspect-widget { color: ${n}; }`)});var ame=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lme=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let vy=class xC{constructor(e){this.quickInputService=e,this.registry=_i.as(Gu.Quickaccess)}provide(e){const t=new ue;t.add(e.onDidAccept(()=>{const[s]=e.selectedItems;s&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(s=>{const o=this.registry.getQuickAccessProvider(s.substr(xC.PREFIX.length));o&&o.prefix&&o.prefix!==xC.PREFIX&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})}));const{editorProviders:i,globalProviders:n}=this.getQuickAccessProviders();return e.items=i.length===0||n.length===0?[...i.length===0?n:i]:[{label:m("globalCommands","global commands"),type:"separator"},...n,{label:m("editorCommands","editor commands"),type:"separator"},...i],t}getQuickAccessProviders(){const e=[],t=[];for(const i of this.registry.getQuickAccessProviders().sort((n,s)=>n.prefix.localeCompare(s.prefix)))if(i.prefix!==xC.PREFIX)for(const n of i.helpEntries){const s=n.prefix||i.prefix,o=s||"\u2026";(n.needsEditor?t:e).push({prefix:s,label:o,ariaLabel:m("helpPickAriaLabel","{0}, {1}",o,n.description),description:n.description})}return{editorProviders:t,globalProviders:e}}};vy.PREFIX="?";vy=ame([lme(0,Uc)],vy);_i.as(Gu.Quickaccess).registerQuickAccessProvider({ctor:vy,prefix:"",helpEntries:[{description:Jk.helpQuickAccessActionLabel,needsEditor:!0}]});class k7{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new ue;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new Un);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){const i=new ue,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const s={editor:n},o=J3(n);if(o){let a=Ar(n.saveViewState());i.add(o.onDidChangeCursorPosition(()=>{a=Ar(n.saveViewState())})),s.restoreViewState=()=>{a&&n===this.activeTextEditorControl&&n.restoreViewState(a)},i.add(ll(t.onCancellationRequested)(()=>{var l;return(l=s.restoreViewState)===null||l===void 0?void 0:l.call(s)}))}i.add(Xe(()=>this.clearDecorations(n))),i.add(this.provideWithTextEditor(s,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return Q3(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:li(XX),position:Fr.Full}}}],[o,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class RS extends k7{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=m("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,Z.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new ue;s.add(t.onDidAccept(l=>{const[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const o=()=>{const l=this.parsePosition(n,t.value.trim().substr(RS.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const d=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(d,0),this.addDecorations(n,d)};o(),s.add(t.onDidChangeValue(()=>o()));const a=J3(n);return a&&a.getOptions().get(59).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(Xe(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),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)?m("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):m("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?m("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):m("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")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(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}RS.PREFIX=":";var cme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},dme=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let S_=class extends RS{constructor(e){super();this.editorService=e,this.onDidActiveTextEditorControlChange=ke.None}get activeTextEditorControl(){return Ar(this.editorService.getFocusedCodeEditor())}};S_=cme([dme(0,Ct)],S_);_i.as(Gu.Quickaccess).registerQuickAccessProvider({ctor:S_,prefix:S_.PREFIX,helpEntries:[{description:_w.gotoLineActionLabel,needsEditor:!0}]});class ume extends Se{constructor(){super({id:"editor.action.gotoLine",label:_w.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2085,mac:{primary:293},weight:100}})}run(e){e.get(Uc).quickAccess.show(S_.PREFIX)}}pe(ume);const L7=[void 0,[]];function rE(r,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?hme(r,n.values,t,i):T7(r,e,t,i)}function hme(r,e,t,i){let n=0;const s=[];for(const o of e){const[a,l]=T7(r,o,t,i);if(typeof a!="number")return L7;n+=a,s.push(...l)}return[n,fme(s)]}function T7(r,e,t,i){const n=Yf(e.original,e.originalLowercase,t,r,r.toLowerCase(),i,!0);return n?[n[0],M0(n)]:L7}function fme(r){const e=r.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!gme(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function gme(r,e){return!(r.end<e.start||e.end<r.start)}function lF(r){return r.startsWith('"')&&r.endsWith('"')}const I7=" ";function mI(r){typeof r!="string"&&(r="");const e=r.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=cF(r),s=t.indexOf(Od)>=0,o=lF(r);let a;const l=r.split(I7);if(l.length>1)for(const c of l){const d=lF(c),{pathNormalized:u,normalized:h,normalizedLowercase:f}=cF(c);h&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:h,normalizedLowercase:f,expectContiguousMatch:d}))}return{original:r,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:o}}function cF(r){let e;an?e=r.replace(/\//g,Od):e=r.replace(/\\/g,Od);const t=yj(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function dF(r){return Array.isArray(r)?mI(r.map(e=>e.original).join(I7)):mI(r.original)}var cp=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class ns extends k7{constructor(e=Object.create(null)){super(e);this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),Z.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?Es.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):Z.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new ue;return this.provideLabelPick(i,m("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),cp(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 cp(this,void 0,void 0,function*(){if(Es.has(e))return!0;let i;const n=new Promise(o=>i=o),s=t.add(Es.onDidChange(()=>{Es.has(e)&&(s.dispose(),i(!0))}));return t.add(Xe(()=>i(!1))),n})}doProvideWithEditorSymbols(e,t,i,n){const s=e.editor,o=new ue;o.add(i.onDidAccept(u=>{const[h]=i.selectedItems;h&&h.range&&(this.gotoLocation(e,{range:h.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),o.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const a=this.getDocumentSymbols(t,n);let l;const c=()=>cp(this,void 0,void 0,function*(){l==null||l.dispose(!0),i.busy=!1,l=new Hn(n),i.busy=!0;try{const u=mI(i.value.substr(ns.PREFIX.length).trim()),h=yield this.doGetSymbolPicks(a,u,void 0,l.token);if(n.isCancellationRequested)return;h.length>0?i.items=h:u.original.length>0?this.provideLabelPick(i,m("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,m("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});o.add(i.onDidChangeValue(()=>c())),c();let d=!0;return o.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;if(u&&u.range){if(d){d=!1;return}s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration)}})),o}doGetSymbolPicks(e,t,i,n){return cp(this,void 0,void 0,function*(){const s=yield e;if(n.isCancellationRequested)return[];const o=t.original.indexOf(ns.SCOPE_PREFIX)===0,a=o?1:0;let l,c;t.values&&t.values.length>1?(l=dF(t.values[0]),c=dF(t.values.slice(1))):l=t;const d=[];for(let f=0;f<s.length;f++){const g=s[f],p=Cj(g.name),_=`$(symbol-${Vk.toString(g.kind)||"property"}) ${p}`,v=_.length-p.length;let b=g.containerName;i!=null&&i.extraContainerLabel&&(b?b=`${i.extraContainerLabel} \u2022 ${b}`:b=i.extraContainerLabel);let C,y,E,S;if(t.original.length>a){let x=!1;if(l!==t&&([C,y]=rE(_,Object.assign(Object.assign({},t),{values:void 0}),a,v),typeof C=="number"&&(x=!0)),typeof C!="number"&&([C,y]=rE(_,l,a,v),typeof C!="number"))continue;if(!x&&c){if(b&&c.original.length>0&&([E,S]=rE(b,c)),typeof E!="number")continue;typeof C=="number"&&(C+=E)}}const w=g.tags&&g.tags.indexOf(1)>=0;d.push({index:f,kind:g.kind,score:C,label:_,ariaLabel:p,description:b,highlights:w?void 0:{label:y,description:S},range:{selection:k.collapseToStart(g.selectionRange),decoration:g.range},strikethrough:w,buttons:(()=>{var x,D;const M=!((x=this.options)===null||x===void 0)&&x.openSideBySideDirection?(D=this.options)===null||D===void 0?void 0:D.openSideBySideDirection():void 0;if(!!M)return[{iconClass:M==="right"?be.splitHorizontal.classNames:be.splitVertical.classNames,tooltip:M==="right"?m("openToSide","Open to the Side"):m("openToBottom","Open to the Bottom")}]})()})}const u=d.sort((f,g)=>o?this.compareByKindAndScore(f,g):this.compareByScore(f,g));let h=[];if(o){let _=function(){g&&typeof f=="number"&&p>0&&(g.label=bn(oE[f]||sE,p))},f,g,p=0;for(const v of u)f!==v.kind?(_(),f=v.kind,p=1,g={type:"separator"},h.push(g)):p++,h.push(v);_()}else u.length>0&&(h=[{label:m("symbols","symbols ({0})",d.length),type:"separator"},...u]);return h})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=oE[e.kind]||sE,n=oE[t.kind]||sE,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return cp(this,void 0,void 0,function*(){const i=yield Rn.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}}ns.PREFIX="@";ns.SCOPE_PREFIX=":";ns.PREFIX_BY_CATEGORY=`${ns.PREFIX}${ns.SCOPE_PREFIX}`;const sE=m("property","properties ({0})"),oE={[5]:m("method","methods ({0})"),[11]:m("function","functions ({0})"),[8]:m("_constructor","constructors ({0})"),[12]:m("variable","variables ({0})"),[4]:m("class","classes ({0})"),[22]:m("struct","structs ({0})"),[23]:m("event","events ({0})"),[24]:m("operator","operators ({0})"),[10]:m("interface","interfaces ({0})"),[2]:m("namespace","namespaces ({0})"),[3]:m("package","packages ({0})"),[25]:m("typeParameter","type parameters ({0})"),[1]:m("modules","modules ({0})"),[6]:m("property","properties ({0})"),[9]:m("enum","enumerations ({0})"),[21]:m("enumMember","enumeration members ({0})"),[14]:m("string","strings ({0})"),[0]:m("file","files ({0})"),[17]:m("array","arrays ({0})"),[15]:m("number","numbers ({0})"),[16]:m("boolean","booleans ({0})"),[18]:m("object","objects ({0})"),[19]:m("key","keys ({0})"),[7]:m("field","fields ({0})"),[13]:m("constant","constants ({0})")};var pme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},mme=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let _I=class extends ns{constructor(e){super();this.editorService=e,this.onDidActiveTextEditorControlChange=ke.None}get activeTextEditorControl(){return Ar(this.editorService.getFocusedCodeEditor())}};_I=pme([mme(0,Ct)],_I);_i.as(Gu.Quickaccess).registerQuickAccessProvider({ctor:_I,prefix:ns.PREFIX,helpEntries:[{description:Dm.quickOutlineActionLabel,prefix:ns.PREFIX,needsEditor:!0},{description:Dm.quickOutlineByCategoryActionLabel,prefix:ns.PREFIX_BY_CATEGORY,needsEditor:!0}]});class _me extends Se{constructor(){super({id:"editor.action.quickOutline",label:Dm.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:R.hasDocumentSymbolProvider,kbOpts:{kbExpr:R.focus,primary:3117,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(Uc).quickAccess.show(ns.PREFIX)}}pe(_me);function aE(r,e){return e&&(r.stack||r.stacktrace)?m("stackTrace.format","{0}: {1}",hF(r),uF(r.stack)||uF(r.stacktrace)):hF(r)}function uF(r){return Array.isArray(r)?r.join(` +`):r}function hF(r){return typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?m("nodeExceptionMessage","A system error occurred ({0})",r.message):r.message||m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function D7(r=null,e=!1){if(!r)return m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){const t=Ou(r),i=D7(t[0],e);return t.length>1?m("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(Os(r))return r;if(r.detail){const t=r.detail;if(t.error)return aE(t.error,e);if(t.exception)return aE(t.exception,e)}return r.stack?aE(r,e):r.message?r.message:m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var Lv=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},nf;(function(r){r[r.NO_ACTION=0]="NO_ACTION",r[r.CLOSE_PICKER=1]="CLOSE_PICKER",r[r.REFRESH_PICKER=2]="REFRESH_PICKER",r[r.REMOVE_ITEM=3]="REMOVE_ITEM"})(nf||(nf={}));function lE(r){const e=r;return Array.isArray(e.items)}function bme(r){const e=r;return!!e.picks&&e.additionalPicks instanceof Promise}class OS extends Z{constructor(e,t){super();this.prefix=e,this.options=t}provide(e,t){var i;const n=new ue;e.canAcceptInBackground=!!(!((i=this.options)===null||i===void 0)&&i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const o=n.add(new Un),a=()=>Lv(this,void 0,void 0,function*(){const l=o.value=new ue;s==null||s.dispose(!0),e.busy=!1,s=new Hn(t);const c=s.token,d=e.value.substr(this.prefix.length).trim(),u=this._getPicks(d,l,c),h=(f,g)=>{var p;let _,v;if(lE(f)?(_=f.items,v=f.active):_=f,_.length===0){if(g)return!1;d.length>0&&((p=this.options)===null||p===void 0?void 0:p.noResultsPick)&&(_=[this.options.noResultsPick])}return e.items=_,v&&(e.activeItems=[v]),!0};if(u!==null)if(bme(u)){let f=!1,g=!1;yield Promise.all([(()=>Lv(this,void 0,void 0,function*(){yield mc(OS.FAST_PICKS_RACE_DELAY),!c.isCancellationRequested&&(g||(f=h(u.picks,!0)))}))(),(()=>Lv(this,void 0,void 0,function*(){e.busy=!0;try{const p=yield u.additionalPicks;if(c.isCancellationRequested)return;let _,v;lE(u.picks)?(_=u.picks.items,v=u.picks.active):_=u.picks;let b,C;if(lE(p)?(b=p.items,C=p.active):b=p,b.length>0||!f){let y;if(!v&&!C){const E=e.activeItems[0];E&&_.indexOf(E)!==-1&&(y=E)}h({items:[..._,...b],active:v||C||y})}}finally{c.isCancellationRequested||(e.busy=!1),g=!0}}))()])}else if(!(u instanceof Promise))h(u);else{e.busy=!0;try{const f=yield u;if(c.isCancellationRequested)return;h(f)}finally{c.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:c})=>Lv(this,void 0,void 0,function*(){var d,u;if(typeof c.trigger=="function"){const h=(u=(d=c.buttons)===null||d===void 0?void 0:d.indexOf(l))!==null&&u!==void 0?u:-1;if(h>=0){const f=c.trigger(h,e.keyMods),g=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(g){case nf.NO_ACTION:break;case nf.CLOSE_PICKER:e.hide();break;case nf.REFRESH_PICKER:a();break;case nf.REMOVE_ITEM:const p=e.items.indexOf(c);if(p!==-1){const _=e.items.slice(),v=_.splice(p,1),b=e.activeItems.filter(y=>y!==v[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=C}break}}}}))),n}}OS.FAST_PICKS_RACE_DELAY=200;var A7=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wd=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},fF=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let x_=class EC extends OS{constructor(e,t,i,n,s,o){super(EC.PREFIX,e);this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(Tu)),this.options=e}_getPicks(e,t,i){return fF(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const s=[];for(const c of n){const d=Ar(EC.WORD_FILTER(e,c.label)),u=c.commandAlias?Ar(EC.WORD_FILTER(e,c.commandAlias)):void 0;d||u?(c.highlights={label:d,detail:this.options.showAlias?u:void 0},s.push(c)):e===c.commandId&&s.push(c)}const o=new Map;for(const c of s){const d=o.get(c.label);d?(c.description=c.commandId,d.description=d.commandId):o.set(c.label,c)}s.sort((c,d)=>{const u=this.commandsHistory.peek(c.commandId),h=this.commandsHistory.peek(d.commandId);return u&&h?u>h?-1:1:u?-1:h?1:c.label.localeCompare(d.label)});const a=[];let l=!1;for(let c=0;c<s.length;c++){const d=s[c],u=this.keybindingService.lookupKeybinding(d.commandId),h=u?m("commandPickAriaLabelWithKeybinding","{0}, {1}",d.label,u.getAriaLabel()):d.label;c===0&&this.commandsHistory.peek(d.commandId)&&(a.push({type:"separator",label:m("recentlyUsed","recently used")}),l=!0),c!==0&&l&&!this.commandsHistory.peek(d.commandId)&&(a.push({type:"separator",label:m("morecCommands","other commands")}),l=!1),a.push(Object.assign(Object.assign({},d),{ariaLabel:h,detail:this.options.showAlias&&d.commandAlias!==d.label?d.commandAlias:void 0,keybinding:u,accept:()=>fF(this,void 0,void 0,function*(){this.commandsHistory.push(d.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:d.commandId,from:"quick open"});try{yield this.commandService.executeCommand(d.commandId)}catch(f){ga(f)||this.dialogService.show(ri.Error,m("canNotRun","Command '{0}' resulted in an error ({1})",d.label,D7(f)))}})}))}return a})}};x_.PREFIX=">";x_.WORD_FILTER=QA(R0,Rie,q8);x_=A7([wd(1,gt),wd(2,Zt),wd(3,pi),wd(4,Wc),wd(5,tb)],x_);let Tu=class Ai extends Z{constructor(e,t){super();this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Ai.getConfiguredCommandHistoryLength(this.configurationService),Ai.cache&&Ai.cache.limit!==this.configuredCommandsHistoryLength&&(Ai.cache.limit=this.configuredCommandsHistoryLength,Ai.saveState(this.storageService))}load(){const e=this.storageService.get(Ai.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=Ai.cache=new Bc(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,o)=>s.value-o.value),n.forEach(s=>i.set(s.key,s.value))}Ai.counter=this.storageService.getNumber(Ai.PREF_KEY_COUNTER,0,Ai.counter)}push(e){!Ai.cache||(Ai.cache.set(e,Ai.counter++),Ai.saveState(this.storageService))}peek(e){var t;return(t=Ai.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Ai.cache)return;const t={usesLRU:!0,entries:[]};Ai.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(Ai.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Ai.PREF_KEY_COUNTER,Ai.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:Ai.DEFAULT_COMMANDS_HISTORY_LENGTH}};Tu.DEFAULT_COMMANDS_HISTORY_LENGTH=50;Tu.PREF_KEY_CACHE="commandPalette.mru.cache";Tu.PREF_KEY_COUNTER="commandPalette.mru.counter";Tu.counter=1;Tu=A7([wd(0,ba),wd(1,di)],Tu);class vme extends x_{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:t6(i.label)||i.id});return t}}var Cme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Th=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},wme=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let E_=class extends vme{constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o);this.codeEditorService=t}get activeTextEditorControl(){return Ar(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return wme(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};E_=Cme([Th(0,gt),Th(1,Ct),Th(2,Zt),Th(3,pi),Th(4,Wc),Th(5,tb)],E_);_i.as(Gu.Quickaccess).registerQuickAccessProvider({ctor:E_,prefix:E_.PREFIX,helpEntries:[{description:bw.quickCommandHelp,needsEditor:!0}]});class yme extends Se{constructor(){super({id:"editor.action.quickCommand",label:bw.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(Uc).quickAccess.show(E_.PREFIX)}}pe(yme);var Sme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ih=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let bI=class extends Dc{constructor(e,t,i,n,s,o,a){super(!0,e,t,i,n,s,o,a)}};bI=Sme([Ih(1,Be),Ih(2,Ct),Ih(3,ki),Ih(4,gt),Ih(5,ba),Ih(6,di)],bI);wt(Dc.ID,bI);class xme extends Se{constructor(){super({id:"editor.action.toggleHighContrast",label:eL.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(e,t){const i=e.get(Uu);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}pe(xme);var bxe=Object.freeze(Object.defineProperty({__proto__:null,CancellationTokenSource:Eoe,Emitter:K0,KeyCode:koe,KeyMod:Loe,Position:Toe,Range:Ku,Selection:Ioe,SelectionDirection:Doe,MarkerSeverity:Qs,MarkerTag:Aoe,Uri:Y0,Token:Noe,editor:Ui,languages:we},Symbol.toStringTag,{value:"Module"}));function vxe(){return new Worker("./assets/editor.worker.7ef0e0c2.js",{type:"module"})}function Cxe(){return new Worker("./assets/json.worker.5e438d37.js",{type:"module"})}function wxe(){return new Worker("./assets/html.worker.ca00066f.js",{type:"module"})}var Eme=2*60*1e3,kme=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>Eme&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Ui.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}(),I;(function(r){r[r.Ident=0]="Ident",r[r.AtKeyword=1]="AtKeyword",r[r.String=2]="String",r[r.BadString=3]="BadString",r[r.UnquotedString=4]="UnquotedString",r[r.Hash=5]="Hash",r[r.Num=6]="Num",r[r.Percentage=7]="Percentage",r[r.Dimension=8]="Dimension",r[r.UnicodeRange=9]="UnicodeRange",r[r.CDO=10]="CDO",r[r.CDC=11]="CDC",r[r.Colon=12]="Colon",r[r.SemiColon=13]="SemiColon",r[r.CurlyL=14]="CurlyL",r[r.CurlyR=15]="CurlyR",r[r.ParenthesisL=16]="ParenthesisL",r[r.ParenthesisR=17]="ParenthesisR",r[r.BracketL=18]="BracketL",r[r.BracketR=19]="BracketR",r[r.Whitespace=20]="Whitespace",r[r.Includes=21]="Includes",r[r.Dashmatch=22]="Dashmatch",r[r.SubstringOperator=23]="SubstringOperator",r[r.PrefixOperator=24]="PrefixOperator",r[r.SuffixOperator=25]="SuffixOperator",r[r.Delim=26]="Delim",r[r.EMS=27]="EMS",r[r.EXS=28]="EXS",r[r.Length=29]="Length",r[r.Angle=30]="Angle",r[r.Time=31]="Time",r[r.Freq=32]="Freq",r[r.Exclamation=33]="Exclamation",r[r.Resolution=34]="Resolution",r[r.Comma=35]="Comma",r[r.Charset=36]="Charset",r[r.EscapedJavaScript=37]="EscapedJavaScript",r[r.BadEscapedJavaScript=38]="BadEscapedJavaScript",r[r.Comment=39]="Comment",r[r.SingleLineComment=40]="SingleLineComment",r[r.EOF=41]="EOF",r[r.CustomToken=42]="CustomToken"})(I||(I={}));var gF=function(){function r(e){this.source=e,this.len=e.length,this.position=0}return r.prototype.substring=function(e,t){return t===void 0&&(t=this.position),this.source.substring(e,t)},r.prototype.eos=function(){return this.len<=this.position},r.prototype.pos=function(){return this.position},r.prototype.goBackTo=function(e){this.position=e},r.prototype.goBack=function(e){this.position-=e},r.prototype.advance=function(e){this.position+=e},r.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},r.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},r.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},r.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},r.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},r.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},r}(),cE="a".charCodeAt(0),Lme="f".charCodeAt(0),pF="z".charCodeAt(0),dE="A".charCodeAt(0),Tme="F".charCodeAt(0),mF="Z".charCodeAt(0),Tv="0".charCodeAt(0),Iv="9".charCodeAt(0),Ime="~".charCodeAt(0),Dme="^".charCodeAt(0),dp="=".charCodeAt(0),Ame="|".charCodeAt(0),Dh="-".charCodeAt(0),_F="_".charCodeAt(0),Nme="%".charCodeAt(0),uE="*".charCodeAt(0),N7="(".charCodeAt(0),R7=")".charCodeAt(0),Rme="<".charCodeAt(0),Ome=">".charCodeAt(0),Mme="@".charCodeAt(0),Pme="#".charCodeAt(0),Fme="$".charCodeAt(0),hE="\\".charCodeAt(0),bF="/".charCodeAt(0),Ah=` +`.charCodeAt(0),Nh="\r".charCodeAt(0),up="\f".charCodeAt(0),vF='"'.charCodeAt(0),CF="'".charCodeAt(0),fE=" ".charCodeAt(0),gE=" ".charCodeAt(0),Bme=";".charCodeAt(0),Wme=":".charCodeAt(0),Vme="{".charCodeAt(0),Hme="}".charCodeAt(0),$me="[".charCodeAt(0),Ume="]".charCodeAt(0),zme=",".charCodeAt(0),wF=".".charCodeAt(0),yF="!".charCodeAt(0),wa={};wa[Bme]=I.SemiColon;wa[Wme]=I.Colon;wa[Vme]=I.CurlyL;wa[Hme]=I.CurlyR;wa[Ume]=I.BracketR;wa[$me]=I.BracketL;wa[N7]=I.ParenthesisL;wa[R7]=I.ParenthesisR;wa[zme]=I.Comma;var hn={};hn.em=I.EMS;hn.ex=I.EXS;hn.px=I.Length;hn.cm=I.Length;hn.mm=I.Length;hn.in=I.Length;hn.pt=I.Length;hn.pc=I.Length;hn.deg=I.Angle;hn.rad=I.Angle;hn.grad=I.Angle;hn.ms=I.Time;hn.s=I.Time;hn.hz=I.Freq;hn.khz=I.Freq;hn["%"]=I.Percentage;hn.fr=I.Percentage;hn.dpi=I.Resolution;hn.dpcm=I.Resolution;var sR=function(){function r(){this.stream=new gF(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return r.prototype.setSource=function(e){this.stream=new gF(e)},r.prototype.finishToken=function(e,t,i){return{offset:e,len:this.stream.pos()-e,type:t,text:i||this.stream.substring(e)}},r.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},r.prototype.pos=function(){return this.stream.pos()},r.prototype.goBackTo=function(e){this.stream.goBackTo(e)},r.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,I.UnquotedString,t.join("")):null},r.prototype.scan=function(){var e=this.trivia();if(e!==null)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,I.EOF):this.scanNext(t)},r.prototype.scanNext=function(e){if(this.stream.advanceIfChars([Rme,yF,Dh,Dh]))return this.finishToken(e,I.CDO);if(this.stream.advanceIfChars([Dh,Dh,Ome]))return this.finishToken(e,I.CDC);var t=[];if(this.ident(t))return this.finishToken(e,I.Ident,t.join(""));if(this.stream.advanceIfChar(Mme))if(t=["@"],this._name(t)){var i=t.join("");return i==="@charset"?this.finishToken(e,I.Charset,i):this.finishToken(e,I.AtKeyword,i)}else return this.finishToken(e,I.Delim);if(this.stream.advanceIfChar(Pme))return t=["#"],this._name(t)?this.finishToken(e,I.Hash,t.join("")):this.finishToken(e,I.Delim);if(this.stream.advanceIfChar(yF))return this.finishToken(e,I.Exclamation);if(this._number()){var n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(Nme))return this.finishToken(e,I.Percentage);if(this.ident(t)){var s=this.stream.substring(n).toLowerCase(),o=hn[s];return typeof o!="undefined"?this.finishToken(e,o,t.join("")):this.finishToken(e,I.Dimension,t.join(""))}return this.finishToken(e,I.Num)}t=[];var a=this._string(t);return a!==null?this.finishToken(e,a,t.join("")):(a=wa[this.stream.peekChar()],typeof a!="undefined"?(this.stream.advance(1),this.finishToken(e,a)):this.stream.peekChar(0)===Ime&&this.stream.peekChar(1)===dp?(this.stream.advance(2),this.finishToken(e,I.Includes)):this.stream.peekChar(0)===Ame&&this.stream.peekChar(1)===dp?(this.stream.advance(2),this.finishToken(e,I.Dashmatch)):this.stream.peekChar(0)===uE&&this.stream.peekChar(1)===dp?(this.stream.advance(2),this.finishToken(e,I.SubstringOperator)):this.stream.peekChar(0)===Dme&&this.stream.peekChar(1)===dp?(this.stream.advance(2),this.finishToken(e,I.PrefixOperator)):this.stream.peekChar(0)===Fme&&this.stream.peekChar(1)===dp?(this.stream.advance(2),this.finishToken(e,I.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,I.Delim)))},r.prototype.trivia=function(){for(;;){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,I.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,I.Comment)}else return null}},r.prototype.comment=function(){if(this.stream.advanceIfChars([bF,uE])){var e=!1,t=!1;return this.stream.advanceWhileChar(function(i){return t&&i===bF?(e=!0,!1):(t=i===uE,!0)}),e&&this.stream.advance(1),!0}return!1},r.prototype._number=function(){var e=0,t;return this.stream.peekChar()===wF&&(e=1),t=this.stream.peekChar(e),t>=Tv&&t<=Iv?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(i){return i>=Tv&&i<=Iv||e===0&&i===wF}),!0):!1},r.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case Nh:case up:case Ah:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Nh&&this.stream.advanceIfChar(Ah)&&e.push(` +`),!0}return!1},r.prototype._escape=function(e,t){var i=this.stream.peekChar();if(i===hE){this.stream.advance(1),i=this.stream.peekChar();for(var n=0;n<6&&(i>=Tv&&i<=Iv||i>=cE&&i<=Lme||i>=dE&&i<=Tme);)this.stream.advance(1),i=this.stream.peekChar(),n++;if(n>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-n),16);s&&e.push(String.fromCharCode(s))}catch{}return i===fE||i===gE?this.stream.advance(1):this._newline([]),!0}if(i!==Nh&&i!==up&&i!==Ah)return this.stream.advance(1),e.push(String.fromCharCode(i)),!0;if(t)return this._newline(e)}return!1},r.prototype._stringChar=function(e,t){var i=this.stream.peekChar();return i!==0&&i!==e&&i!==hE&&i!==Nh&&i!==up&&i!==Ah?(this.stream.advance(1),t.push(String.fromCharCode(i)),!0):!1},r.prototype._string=function(e){if(this.stream.peekChar()===CF||this.stream.peekChar()===vF){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),I.String):I.BadString}return null},r.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==hE&&t!==CF&&t!==vF&&t!==N7&&t!==R7&&t!==fE&&t!==gE&&t!==Ah&&t!==up&&t!==Nh?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},r.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===fE||t===gE||t===Ah||t===up||t===Nh});return e>0},r.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},r.prototype.ident=function(e){var t=this.stream.pos(),i=this._minus(e);if(i&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1},r.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===_F||t>=cE&&t<=pF||t>=dE&&t<=mF||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._minus=function(e){var t=this.stream.peekChar();return t===Dh?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._identChar=function(e){var t=this.stream.peekChar();return t===_F||t===Dh||t>=cE&&t<=pF||t>=dE&&t<=mF||t>=Tv&&t<=Iv||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r}();function On(r,e){if(r.length<e.length)return!1;for(var t=0;t<e.length;t++)if(r[t]!==e[t])return!1;return!0}function O7(r,e){var t=r.length-e.length;return t>0?r.lastIndexOf(e)===t:t===0?r===e:!1}function SF(r,e){return e===void 0&&(e=!0),r?r.length<140?r:r.slice(0,140)+(e?"\u2026":""):""}function jme(r,e){var t=e.exec(r);return t&&t[0].length?r.substr(0,r.length-t[0].length):r}var We=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),K;(function(r){r[r.Undefined=0]="Undefined",r[r.Identifier=1]="Identifier",r[r.Stylesheet=2]="Stylesheet",r[r.Ruleset=3]="Ruleset",r[r.Selector=4]="Selector",r[r.SimpleSelector=5]="SimpleSelector",r[r.SelectorInterpolation=6]="SelectorInterpolation",r[r.SelectorCombinator=7]="SelectorCombinator",r[r.SelectorCombinatorParent=8]="SelectorCombinatorParent",r[r.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",r[r.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",r[r.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",r[r.Page=12]="Page",r[r.PageBoxMarginBox=13]="PageBoxMarginBox",r[r.ClassSelector=14]="ClassSelector",r[r.IdentifierSelector=15]="IdentifierSelector",r[r.ElementNameSelector=16]="ElementNameSelector",r[r.PseudoSelector=17]="PseudoSelector",r[r.AttributeSelector=18]="AttributeSelector",r[r.Declaration=19]="Declaration",r[r.Declarations=20]="Declarations",r[r.Property=21]="Property",r[r.Expression=22]="Expression",r[r.BinaryExpression=23]="BinaryExpression",r[r.Term=24]="Term",r[r.Operator=25]="Operator",r[r.Value=26]="Value",r[r.StringLiteral=27]="StringLiteral",r[r.URILiteral=28]="URILiteral",r[r.EscapedValue=29]="EscapedValue",r[r.Function=30]="Function",r[r.NumericValue=31]="NumericValue",r[r.HexColorValue=32]="HexColorValue",r[r.MixinDeclaration=33]="MixinDeclaration",r[r.MixinReference=34]="MixinReference",r[r.VariableName=35]="VariableName",r[r.VariableDeclaration=36]="VariableDeclaration",r[r.Prio=37]="Prio",r[r.Interpolation=38]="Interpolation",r[r.NestedProperties=39]="NestedProperties",r[r.ExtendsReference=40]="ExtendsReference",r[r.SelectorPlaceholder=41]="SelectorPlaceholder",r[r.Debug=42]="Debug",r[r.If=43]="If",r[r.Else=44]="Else",r[r.For=45]="For",r[r.Each=46]="Each",r[r.While=47]="While",r[r.MixinContentReference=48]="MixinContentReference",r[r.MixinContentDeclaration=49]="MixinContentDeclaration",r[r.Media=50]="Media",r[r.Keyframe=51]="Keyframe",r[r.FontFace=52]="FontFace",r[r.Import=53]="Import",r[r.Namespace=54]="Namespace",r[r.Invocation=55]="Invocation",r[r.FunctionDeclaration=56]="FunctionDeclaration",r[r.ReturnStatement=57]="ReturnStatement",r[r.MediaQuery=58]="MediaQuery",r[r.FunctionParameter=59]="FunctionParameter",r[r.FunctionArgument=60]="FunctionArgument",r[r.KeyframeSelector=61]="KeyframeSelector",r[r.ViewPort=62]="ViewPort",r[r.Document=63]="Document",r[r.AtApplyRule=64]="AtApplyRule",r[r.CustomPropertyDeclaration=65]="CustomPropertyDeclaration",r[r.CustomPropertySet=66]="CustomPropertySet",r[r.ListEntry=67]="ListEntry",r[r.Supports=68]="Supports",r[r.SupportsCondition=69]="SupportsCondition",r[r.NamespacePrefix=70]="NamespacePrefix",r[r.GridLine=71]="GridLine",r[r.Plugin=72]="Plugin",r[r.UnknownAtRule=73]="UnknownAtRule",r[r.Use=74]="Use",r[r.ModuleConfiguration=75]="ModuleConfiguration",r[r.Forward=76]="Forward",r[r.ForwardVisibility=77]="ForwardVisibility",r[r.Module=78]="Module"})(K||(K={}));var It;(function(r){r[r.Mixin=0]="Mixin",r[r.Rule=1]="Rule",r[r.Variable=2]="Variable",r[r.Function=3]="Function",r[r.Keyframe=4]="Keyframe",r[r.Unknown=5]="Unknown",r[r.Module=6]="Module",r[r.Forward=7]="Forward",r[r.ForwardVisibility=8]="ForwardVisibility"})(It||(It={}));function vI(r,e){var t=null;return!r||e<r.offset||e>r.end?null:(r.accept(function(i){return i.offset===-1&&i.length===-1?!0:i.offset<=e&&i.end>=e?(t?i.length<=t.length&&(t=i):t=i,!0):!1}),t)}function qme(r,e){for(var t=vI(r,e),i=[];t;)i.unshift(t),t=t.parent;return i}function Gme(r){var e=r.findParent(K.Declaration),t=e&&e.getValue();return t&&t.encloses(r)?e:null}var He=function(){function r(e,t,i){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,i&&(this.nodeType=i)}return Object.defineProperty(r.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this.nodeType||K.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),r.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},r.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},r.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},r.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},r.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},r.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,i=this.children;t<i.length;t++){var n=i[t];n.accept(e)}},r.prototype.acceptVisitor=function(e){this.accept(e.visitNode.bind(e))},r.prototype.adoptChild=function(e,t){if(t===void 0&&(t=-1),e.parent&&e.parent.children){var i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;var n=this.children;return n||(n=this.children=[]),t!==-1?n.splice(t,0,e):n.push(e),e},r.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},r.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},r.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},r.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},r.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},r.prototype.setNode=function(e,t,i){return i===void 0&&(i=-1),t?(t.attachTo(this,i),this[e]=t,!0):!1},r.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},r.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);var t=e.end;(t>this.end||this.length===-1)&&(this.length=t-this.offset)},r.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},r.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},r.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},r.prototype.addChildren=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t];this.addChild(n)}},r.prototype.findFirstChildBeforeOffset=function(e){if(this.children){for(var t=null,i=this.children.length-1;i>=0;i--)if(t=this.children[i],t.offset<=e)return t}return null},r.prototype.findChildAtOffset=function(e,t){var i=this.findFirstChildBeforeOffset(e);return i&&i.end>=e?t&&i.findChildAtOffset(e,!0)||i:null},r.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},r.prototype.getParent=function(){for(var e=this.parent;e instanceof $n;)e=e.parent;return e},r.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},r.prototype.findAParent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this;i&&!e.some(function(n){return i.type===n});)i=i.parent;return i},r.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},r.prototype.getData=function(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]},r}(),$n=function(r){We(e,r);function e(t,i){i===void 0&&(i=-1);var n=r.call(this,-1,-1)||this;return n.attachTo(t,i),n.offset=-1,n.length=-1,n}return e}(He),to=function(r){We(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.isCustomProperty=!1,n}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Identifier},enumerable:!1,configurable:!0}),e.prototype.containsInterpolation=function(){return this.hasChildren()},e}(He),Kme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Stylesheet},enumerable:!1,configurable:!0}),e}(He),oR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Declarations},enumerable:!1,configurable:!0}),e}(He),Di=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return e.prototype.getDeclarations=function(){return this.declarations},e.prototype.setDeclarations=function(t){return this.setNode("declarations",t)},e}(He),kC=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Ruleset},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new $n(this)),this.selectors},e.prototype.isNested=function(){return!!this.parent&&this.parent.findParent(K.Declarations)!==null},e}(Di),MS=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Selector},enumerable:!1,configurable:!0}),e}(He),M7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.SimpleSelector},enumerable:!1,configurable:!0}),e}(He);(function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.AtApplyRule},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e})(He);var aR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return e}(He),Yme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.CustomPropertySet},enumerable:!1,configurable:!0}),e}(Di),fg=function(r){We(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.property=null,n}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Declaration},enumerable:!1,configurable:!0}),e.prototype.setProperty=function(t){return this.setNode("property",t)},e.prototype.getProperty=function(){return this.property},e.prototype.getFullPropertyName=function(){var t=this.property?this.property.getName():"unknown";if(this.parent instanceof oR&&this.parent.getParent()instanceof F7){var i=this.parent.getParent().getParent();if(i instanceof e)return i.getFullPropertyName()+t}return t},e.prototype.getNonPrefixedPropertyName=function(){var t=this.getFullPropertyName();if(t&&t.charAt(0)==="-"){var i=t.indexOf("-",1);if(i!==-1)return t.substring(i+1)}return t},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e.prototype.setNestedProperties=function(t){return this.setNode("nestedProperties",t)},e.prototype.getNestedProperties=function(){return this.nestedProperties},e}(aR),Zme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.CustomPropertyDeclaration},enumerable:!1,configurable:!0}),e.prototype.setPropertySet=function(t){return this.setNode("propertySet",t)},e.prototype.getPropertySet=function(){return this.propertySet},e}(fg),lR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Property},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return jme(this.getText(),/[_\+]+$/)},e.prototype.isCustomProperty=function(){return!!this.identifier&&this.identifier.isCustomProperty},e}(He),Xme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Invocation},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new $n(this)),this.arguments},e}(He),mb=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Function},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(Xme),PS=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.FunctionParameter},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setDefaultValue=function(t){return this.setNode("defaultValue",t,0)},e.prototype.getDefaultValue=function(){return this.defaultValue},e}(He),gg=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.FunctionArgument},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(He),Qme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.If},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(t){return this.setNode("expression",t,0)},e.prototype.setElseClause=function(t){return this.setNode("elseClause",t)},e}(Di),Jme=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.For},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return this.setNode("variable",t,0)},e}(Di),e_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Each},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return this.variables||(this.variables=new $n(this)),this.variables},e}(Di),t_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.While},enumerable:!1,configurable:!0}),e}(Di),i_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Else},enumerable:!1,configurable:!0}),e}(Di),Cy=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.FunctionDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new $n(this)),this.parameters},e}(Di),n_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.ViewPort},enumerable:!1,configurable:!0}),e}(Di),P7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.FontFace},enumerable:!1,configurable:!0}),e}(Di),F7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.NestedProperties},enumerable:!1,configurable:!0}),e}(Di),B7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Keyframe},enumerable:!1,configurable:!0}),e.prototype.setKeyword=function(t){return this.setNode("keyword",t,0)},e.prototype.getKeyword=function(){return this.keyword},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(Di),xF=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.KeyframeSelector},enumerable:!1,configurable:!0}),e}(Di),cR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Import},enumerable:!1,configurable:!0}),e.prototype.setMedialist=function(t){return t?(t.attachTo(this),!0):!1},e}(He),r_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Use},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new $n(this)),this.parameters},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),s_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.ModuleConfiguration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(He),o_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Forward},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getMembers=function(){return this.members||(this.members=new $n(this)),this.members},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new $n(this)),this.parameters},e}(He),a_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.ForwardVisibility},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),l_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Namespace},enumerable:!1,configurable:!0}),e}(He),W7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Media},enumerable:!1,configurable:!0}),e}(Di),CI=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Supports},enumerable:!1,configurable:!0}),e}(Di),c_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Document},enumerable:!1,configurable:!0}),e}(Di),V7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return e.prototype.getMediums=function(){return this.mediums||(this.mediums=new $n(this)),this.mediums},e}(He),H7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.MediaQuery},enumerable:!1,configurable:!0}),e}(He),um=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.SupportsCondition},enumerable:!1,configurable:!0}),e}(He),d_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Page},enumerable:!1,configurable:!0}),e}(Di),u_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.PageBoxMarginBox},enumerable:!1,configurable:!0}),e}(Di),$7=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Expression},enumerable:!1,configurable:!0}),e}(He),h_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.BinaryExpression},enumerable:!1,configurable:!0}),e.prototype.setLeft=function(t){return this.setNode("left",t)},e.prototype.getLeft=function(){return this.left},e.prototype.setRight=function(t){return this.setNode("right",t)},e.prototype.getRight=function(){return this.right},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e}(He),f_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Term},enumerable:!1,configurable:!0}),e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setExpression=function(t){return this.setNode("expression",t)},e.prototype.getExpression=function(){return this.expression},e}(He),g_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.AttributeSelector},enumerable:!1,configurable:!0}),e.prototype.setNamespacePrefix=function(t){return this.setNode("namespacePrefix",t)},e.prototype.getNamespacePrefix=function(){return this.namespacePrefix},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e}(He);(function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Operator},enumerable:!1,configurable:!0}),e})(He);var dR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.HexColorValue},enumerable:!1,configurable:!0}),e}(He),p_e=".".charCodeAt(0),m_e="0".charCodeAt(0),__e="9".charCodeAt(0),uR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.NumericValue},enumerable:!1,configurable:!0}),e.prototype.getValue=function(){for(var t=this.getText(),i=0,n,s=0,o=t.length;s<o&&(n=t.charCodeAt(s),m_e<=n&&n<=__e||n===p_e);s++)i+=1;return{value:t.substring(0,i),unit:i<t.length?t.substring(i):void 0}},e}(He),FS=function(r){We(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.variable=null,n.value=null,n.needsSemicolon=!0,n}return Object.defineProperty(e.prototype,"type",{get:function(){return K.VariableDeclaration},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return t?(t.attachTo(this),this.variable=t,!0):!1},e.prototype.getVariable=function(){return this.variable},e.prototype.getName=function(){return this.variable?this.variable.getName():""},e.prototype.setValue=function(t){return t?(t.attachTo(this),this.value=t,!0):!1},e.prototype.getValue=function(){return this.value},e}(aR),wI=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Interpolation},enumerable:!1,configurable:!0}),e}(He),hR=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.VariableName},enumerable:!1,configurable:!0}),e.prototype.getName=function(){return this.getText()},e}(He),k_=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.ExtendsReference},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new $n(this)),this.selectors},e}(He),b_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new $n(this)),this.arguments},e}(He),v_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new $n(this)),this.parameters},e}(Di),wy=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.MixinReference},enumerable:!1,configurable:!0}),e.prototype.getNamespaces=function(){return this.namespaces||(this.namespaces=new $n(this)),this.namespaces},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getArguments=function(){return this.arguments||(this.arguments=new $n(this)),this.arguments},e.prototype.setContent=function(t){return this.setNode("content",t)},e.prototype.getContent=function(){return this.content},e}(He),L_=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.MixinDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new $n(this)),this.parameters},e.prototype.setGuard=function(t){return t&&(t.attachTo(this),this.guard=t),!1},e}(Di),C_e=function(r){We(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.UnknownAtRule},enumerable:!1,configurable:!0}),e.prototype.setAtRuleName=function(t){this.atRuleName=t},e.prototype.getAtRuleName=function(){return this.atRuleName},e}(Di),w_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.ListEntry},enumerable:!1,configurable:!0}),e.prototype.setKey=function(t){return this.setNode("key",t,0)},e.prototype.setValue=function(t){return this.setNode("value",t,1)},e}(He),y_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getConditions=function(){return this.conditions||(this.conditions=new $n(this)),this.conditions},e}(He),S_e=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setVariable=function(t){return this.setNode("variable",t)},e}(He),EF=function(r){We(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return K.Module},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),pg;(function(r){r[r.Ignore=1]="Ignore",r[r.Warning=2]="Warning",r[r.Error=4]="Error"})(pg||(pg={}));var x_e=function(){function r(e,t,i,n,s,o){s===void 0&&(s=e.offset),o===void 0&&(o=e.length),this.node=e,this.rule=t,this.level=i,this.message=n||t.message,this.offset=s,this.length=o}return r.prototype.getRule=function(){return this.rule},r.prototype.getLevel=function(){return this.level},r.prototype.getOffset=function(){return this.offset},r.prototype.getLength=function(){return this.length},r.prototype.getNode=function(){return this.node},r.prototype.getMessage=function(){return this.message},r}();function E_e(r,e){var t;return e.length===0?t=r:t=r.replace(/\{(\d+)\}/g,function(i,n){var s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function k_e(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return E_e(e,t)}function qc(r){return k_e}var Ft=qc(),Bt=function(){function r(e,t){this.id=e,this.message=t}return r}(),ee={NumberExpected:new Bt("css-numberexpected",Ft("expected.number","number expected")),ConditionExpected:new Bt("css-conditionexpected",Ft("expected.condt","condition expected")),RuleOrSelectorExpected:new Bt("css-ruleorselectorexpected",Ft("expected.ruleorselector","at-rule or selector expected")),DotExpected:new Bt("css-dotexpected",Ft("expected.dot","dot expected")),ColonExpected:new Bt("css-colonexpected",Ft("expected.colon","colon expected")),SemiColonExpected:new Bt("css-semicolonexpected",Ft("expected.semicolon","semi-colon expected")),TermExpected:new Bt("css-termexpected",Ft("expected.term","term expected")),ExpressionExpected:new Bt("css-expressionexpected",Ft("expected.expression","expression expected")),OperatorExpected:new Bt("css-operatorexpected",Ft("expected.operator","operator expected")),IdentifierExpected:new Bt("css-identifierexpected",Ft("expected.ident","identifier expected")),PercentageExpected:new Bt("css-percentageexpected",Ft("expected.percentage","percentage expected")),URIOrStringExpected:new Bt("css-uriorstringexpected",Ft("expected.uriorstring","uri or string expected")),URIExpected:new Bt("css-uriexpected",Ft("expected.uri","URI expected")),VariableNameExpected:new Bt("css-varnameexpected",Ft("expected.varname","variable name expected")),VariableValueExpected:new Bt("css-varvalueexpected",Ft("expected.varvalue","variable value expected")),PropertyValueExpected:new Bt("css-propertyvalueexpected",Ft("expected.propvalue","property value expected")),LeftCurlyExpected:new Bt("css-lcurlyexpected",Ft("expected.lcurly","{ expected")),RightCurlyExpected:new Bt("css-rcurlyexpected",Ft("expected.rcurly","} expected")),LeftSquareBracketExpected:new Bt("css-rbracketexpected",Ft("expected.lsquare","[ expected")),RightSquareBracketExpected:new Bt("css-lbracketexpected",Ft("expected.rsquare","] expected")),LeftParenthesisExpected:new Bt("css-lparentexpected",Ft("expected.lparen","( expected")),RightParenthesisExpected:new Bt("css-rparentexpected",Ft("expected.rparent",") expected")),CommaExpected:new Bt("css-commaexpected",Ft("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new Bt("css-pagedirordeclexpected",Ft("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new Bt("css-unknownatrule",Ft("unknown.atrule","at-rule unknown")),UnknownKeyword:new Bt("css-unknownkeyword",Ft("unknown.keyword","unknown keyword")),SelectorExpected:new Bt("css-selectorexpected",Ft("expected.selector","selector expected")),StringLiteralExpected:new Bt("css-stringliteralexpected",Ft("expected.stringliteral","string literal expected")),WhitespaceExpected:new Bt("css-whitespaceexpected",Ft("expected.whitespace","whitespace expected")),MediaQueryExpected:new Bt("css-mediaqueryexpected",Ft("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new Bt("css-idorwildcardexpected",Ft("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new Bt("css-wildcardexpected",Ft("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new Bt("css-idorvarexpected",Ft("expected.idorvar","identifier or variable expected"))},kF={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function U7(r){switch(r){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F + +`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. + +`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. + +`;default:return""}}function hp(r,e,t){var i;if(e?i={kind:"markdown",value:T_e(r,t)}:i={kind:"plaintext",value:L_e(r,t)},i.value!=="")return i}function pE(r){return r=r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),r.replace(/</g,"<").replace(/>/g,">")}function L_e(r,e){if(!r.description||r.description==="")return"";if(typeof r.description!="string")return r.description.value;var t="";if((e==null?void 0:e.documentation)!==!1){r.status&&(t+=U7(r.status)),t+=r.description;var i=z7(r.browsers);i&&(t+=` +(`+i+")"),"syntax"in r&&(t+=` + +Syntax: `+r.syntax)}return r.references&&r.references.length>0&&(e==null?void 0:e.references)!==!1&&(t.length>0&&(t+=` + +`),t+=r.references.map(function(n){return n.name+": "+n.url}).join(" | ")),t}function T_e(r,e){if(!r.description||r.description==="")return"";var t="";if((e==null?void 0:e.documentation)!==!1){r.status&&(t+=U7(r.status));var i=typeof r.description=="string"?r.description:r.description.value;t+=pE(i);var n=z7(r.browsers);n&&(t+=` + +(`+pE(n)+")"),"syntax"in r&&r.syntax&&(t+=` + +Syntax: `+pE(r.syntax))}return r.references&&r.references.length>0&&(e==null?void 0:e.references)!==!1&&(t.length>0&&(t+=` + +`),t+=r.references.map(function(s){return"["+s.name+"]("+s.url+")"}).join(" | ")),t}function z7(r){return r===void 0&&(r=[]),r.length===0?null:r.map(function(e){var t="",i=e.match(/([A-Z]+)(\d+)?/),n=i[1],s=i[2];return n in kF&&(t+=kF[n]),s&&(t+=" "+s),t}).join(", ")}var Dv=qc(),I_e=[{func:"rgb($red, $green, $blue)",desc:Dv("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:Dv("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:Dv("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:Dv("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],yy={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},LF={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function Rh(r,e){var t=r.getText(),i=t.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(i){i[2]&&(e=100);var n=parseFloat(i[1])/e;if(n>=0&&n<=1)return n}throw new Error}function D_e(r){var e=r.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);if(t)return parseFloat(e)%360;throw new Error}function A_e(r){var e=r.getName();return e?/^(rgb|rgba|hsl|hsla)$/gi.test(e):!1}var TF=48,N_e=57,R_e=65,Av=97,O_e=102;function Hi(r){return r<TF?0:r<=N_e?r-TF:(r<Av&&(r+=Av-R_e),r>=Av&&r<=O_e?r-Av+10:0)}function IF(r){if(r[0]!=="#")return null;switch(r.length){case 4:return{red:Hi(r.charCodeAt(1))*17/255,green:Hi(r.charCodeAt(2))*17/255,blue:Hi(r.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Hi(r.charCodeAt(1))*17/255,green:Hi(r.charCodeAt(2))*17/255,blue:Hi(r.charCodeAt(3))*17/255,alpha:Hi(r.charCodeAt(4))*17/255};case 7:return{red:(Hi(r.charCodeAt(1))*16+Hi(r.charCodeAt(2)))/255,green:(Hi(r.charCodeAt(3))*16+Hi(r.charCodeAt(4)))/255,blue:(Hi(r.charCodeAt(5))*16+Hi(r.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Hi(r.charCodeAt(1))*16+Hi(r.charCodeAt(2)))/255,green:(Hi(r.charCodeAt(3))*16+Hi(r.charCodeAt(4)))/255,blue:(Hi(r.charCodeAt(5))*16+Hi(r.charCodeAt(6)))/255,alpha:(Hi(r.charCodeAt(7))*16+Hi(r.charCodeAt(8)))/255}}return null}function M_e(r,e,t,i){if(i===void 0&&(i=1),r=r/60,e===0)return{red:t,green:t,blue:t,alpha:i};var n=function(a,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-a)*c+a:c<3?l:c<4?(l-a)*(4-c)+a:a},s=t<=.5?t*(e+1):t+e-t*e,o=t*2-s;return{red:n(o,s,r+2),green:n(o,s,r),blue:n(o,s,r-2),alpha:i}}function P_e(r){var e=r.red,t=r.green,i=r.blue,n=r.alpha,s=Math.max(e,t,i),o=Math.min(e,t,i),a=0,l=0,c=(o+s)/2,d=s-o;if(d>0){switch(l=Math.min(c<=.5?d/(2*c):d/(2-2*c),1),s){case e:a=(t-i)/d+(t<i?6:0);break;case t:a=(i-e)/d+2;break;case i:a=(e-t)/d+4;break}a*=60,a=Math.round(a)}return{h:a,s:l,l:c,a:n}}function F_e(r){if(r.type===K.HexColorValue){var e=r.getText();return IF(e)}else if(r.type===K.Function){var t=r,i=t.getName(),n=t.getArguments().getChildren();if(!i||n.length<3||n.length>4)return null;try{var s=n.length===4?Rh(n[3],1):1;if(i==="rgb"||i==="rgba")return{red:Rh(n[0],255),green:Rh(n[1],255),blue:Rh(n[2],255),alpha:s};if(i==="hsl"||i==="hsla"){var o=D_e(n[0]),a=Rh(n[1],100),l=Rh(n[2],100);return M_e(o,a,l,s)}}catch{return null}}else if(r.type===K.Identifier){if(r.parent&&r.parent.type!==K.Term)return null;var c=r.parent;if(c&&c.parent&&c.parent.type===K.BinaryExpression){var d=c.parent;if(d.parent&&d.parent.type===K.ListEntry&&d.parent.key===d)return null}var u=r.getText().toLowerCase();if(u==="none")return null;var h=yy[u];if(h)return IF(h)}return null}var DF={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},AF={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},NF={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},B_e=["medium","thick","thin"],RF={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},OF={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},MF={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},PF={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},FF={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},BF={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},W_e={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},V_e=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],H_e=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],$_e=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Ao(r){return typeof r!="undefined"}var j7=function(){function r(e){e===void 0&&(e=new sR),this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:I.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}return r.prototype.peekIdent=function(e){return I.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},r.prototype.peekKeyword=function(e){return I.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},r.prototype.peekDelim=function(e){return I.Delim===this.token.type&&e===this.token.text},r.prototype.peek=function(e){return e===this.token.type},r.prototype.peekOne=function(e){return e.indexOf(this.token.type)!==-1},r.prototype.peekRegExp=function(e,t){return e!==this.token.type?!1:t.test(this.token.text)},r.prototype.hasWhitespace=function(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset},r.prototype.consumeToken=function(){this.prevToken=this.token,this.token=this.scanner.scan()},r.prototype.mark=function(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}},r.prototype.restoreAtMark=function(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)},r.prototype.try=function(e){var t=this.mark(),i=e();return i||(this.restoreAtMark(t),null)},r.prototype.acceptOneKeyword=function(e){if(I.AtKeyword===this.token.type)for(var t=0,i=e;t<i.length;t++){var n=i[t];if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1},r.prototype.accept=function(e){return e===this.token.type?(this.consumeToken(),!0):!1},r.prototype.acceptIdent=function(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1},r.prototype.acceptKeyword=function(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1},r.prototype.acceptDelim=function(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1},r.prototype.acceptRegexp=function(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1},r.prototype._parseRegexp=function(e){var t=this.createNode(K.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)},r.prototype.acceptUnquotedString=function(){var e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);var t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)},r.prototype.resync=function(e,t){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(t&&t.indexOf(this.token.type)!==-1)return!0;if(this.token.type===I.EOF)return!1;this.token=this.scanner.scan()}},r.prototype.createNode=function(e){return new He(this.token.offset,this.token.len,e)},r.prototype.create=function(e){return new e(this.token.offset,this.token.len)},r.prototype.finish=function(e,t,i,n){if(!(e instanceof $n)&&(t&&this.markError(e,t,i,n),this.prevToken)){var s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e},r.prototype.markError=function(e,t,i,n){this.token!==this.lastErrorToken&&(e.addIssue(new x_e(e,t,pg.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(i||n)&&this.resync(i,n)},r.prototype.parseStylesheet=function(e){var t=e.version,i=e.getText(),n=function(s,o){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return i.substr(s,o)};return this.internalParse(i,this._parseStylesheet,n)},r.prototype.internalParse=function(e,t,i){this.scanner.setSource(e),this.token=this.scanner.scan();var n=t.bind(this)();return n&&(i?n.textProvider=i:n.textProvider=function(s,o){return e.substr(s,o)}),n},r.prototype._parseStylesheet=function(){for(var e=this.create(Kme);e.addChild(this._parseStylesheetStart()););var t=!1;do{var i=!1;do{i=!1;var n=this._parseStylesheetStatement();for(n&&(e.addChild(n),i=!0,t=!1,!this.peek(I.EOF)&&this._needsSemicolonAfter(n)&&!this.accept(I.SemiColon)&&this.markError(e,ee.SemiColonExpected));this.accept(I.SemiColon)||this.accept(I.CDO)||this.accept(I.CDC);)i=!0,t=!1}while(i);if(this.peek(I.EOF))break;t||(this.peek(I.AtKeyword)?this.markError(e,ee.UnknownAtRule):this.markError(e,ee.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(I.EOF));return this.finish(e)},r.prototype._parseStylesheetStart=function(){return this._parseCharset()},r.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(I.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},r.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},r.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(I.Comma)&&this._parseSelector(e););if(this.accept(I.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},r.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var t=this.create(kC),i=t.getSelectors();if(!i.addChild(this._parseSelector(e)))return null;for(;this.accept(I.Comma);)if(!i.addChild(this._parseSelector(e)))return this.finish(t,ee.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},r.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},r.prototype._needsSemicolonAfter=function(e){switch(e.type){case K.Keyframe:case K.ViewPort:case K.Media:case K.Ruleset:case K.Namespace:case K.If:case K.For:case K.Each:case K.While:case K.MixinDeclaration:case K.FunctionDeclaration:case K.MixinContentDeclaration:return!1;case K.ExtendsReference:case K.MixinContentReference:case K.ReturnStatement:case K.MediaQuery:case K.Debug:case K.Import:case K.AtApplyRule:case K.CustomPropertyDeclaration:return!0;case K.VariableDeclaration:return e.needsSemicolon;case K.MixinReference:return!e.getContent();case K.Declaration:return!e.getNestedProperties()}return!1},r.prototype._parseDeclarations=function(e){var t=this.create(oR);if(!this.accept(I.CurlyL))return null;for(var i=e();t.addChild(i)&&!this.peek(I.CurlyR);){if(this._needsSemicolonAfter(i)&&!this.accept(I.SemiColon))return this.finish(t,ee.SemiColonExpected,[I.SemiColon,I.CurlyR]);for(i&&this.prevToken&&this.prevToken.type===I.SemiColon&&(i.semicolonPosition=this.prevToken.offset);this.accept(I.SemiColon););i=e()}return this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.RightCurlyExpected,[I.CurlyR,I.SemiColon])},r.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,ee.LeftCurlyExpected,[I.CurlyR,I.SemiColon])},r.prototype._parseSelector=function(e){var t=this.create(MS),i=!1;for(e&&(i=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)i=!0,t.addChild(this._parseCombinator());return i?this.finish(t):null},r.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var i=this.create(fg);return i.setProperty(this._parseProperty())?this.accept(I.Colon)?(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseExpr())?(i.addChild(this._parsePrio()),this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)):this.finish(i,ee.PropertyValueExpected)):this.finish(i,ee.ColonExpected,[I.Colon],e||[I.SemiColon]):null},r.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(I.Ident,/^--/))return null;var t=this.create(Zme);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(I.Colon))return this.finish(t,ee.ColonExpected,[I.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);var i=this.mark();if(this.peek(I.CurlyL)){var n=this.create(Yme),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(n.setDeclarations(s)&&!s.isErroneous(!0)&&(n.addChild(this._parsePrio()),this.peek(I.SemiColon)))return this.finish(n),t.setPropertySet(n),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(i)}var o=this._parseExpr();return o&&!o.isErroneous(!0)&&(this._parsePrio(),this.peekOne(e||[I.SemiColon]))?(t.setValue(o),t.semicolonPosition=this.token.offset,this.finish(t)):(this.restoreAtMark(i),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),Ao(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,ee.PropertyValueExpected):this.finish(t))},r.prototype._parseCustomPropertyValue=function(e){var t=this;e===void 0&&(e=[I.CurlyR]);var i=this.create(He),n=function(){return o===0&&a===0&&l===0},s=function(){return e.indexOf(t.token.type)!==-1},o=0,a=0,l=0;e:for(;;){switch(this.token.type){case I.SemiColon:if(n())break e;break;case I.Exclamation:if(n())break e;break;case I.CurlyL:o++;break;case I.CurlyR:if(o--,o<0){if(s()&&a===0&&l===0)break e;return this.finish(i,ee.LeftCurlyExpected)}break;case I.ParenthesisL:a++;break;case I.ParenthesisR:if(a--,a<0){if(s()&&l===0&&o===0)break e;return this.finish(i,ee.LeftParenthesisExpected)}break;case I.BracketL:l++;break;case I.BracketR:if(l--,l<0)return this.finish(i,ee.LeftSquareBracketExpected);break;case I.BadString:break e;case I.EOF:var c=ee.RightCurlyExpected;return l>0?c=ee.RightSquareBracketExpected:a>0&&(c=ee.RightParenthesisExpected),this.finish(i,c)}this.consumeToken()}return this.finish(i)},r.prototype._tryToParseDeclaration=function(e){var t=this.mark();return this._parseProperty()&&this.accept(I.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)},r.prototype._parseProperty=function(){var e=this.create(lR),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},r.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},r.prototype._parseCharset=function(){if(!this.peek(I.Charset))return null;var e=this.create(He);return this.consumeToken(),this.accept(I.String)?this.accept(I.SemiColon)?this.finish(e):this.finish(e,ee.SemiColonExpected):this.finish(e,ee.IdentifierExpected)},r.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(cR);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,ee.URIOrStringExpected):(!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},r.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(l_e);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,ee.URIExpected,[I.SemiColon]):this.accept(I.SemiColon)?this.finish(e):this.finish(e,ee.SemiColonExpected)},r.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(P7);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(n_e);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseKeyframe=function(){if(!this.peekRegExp(I.AtKeyword,this.keyframeRegex))return null;var e=this.create(B7),t=this.create(He);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,ee.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,ee.IdentifierExpected,[I.CurlyR])},r.prototype._parseKeyframeIdent=function(){return this._parseIdent([It.Keyframe])},r.prototype._parseKeyframeSelector=function(){var e=this.create(xF);if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return null;for(;this.accept(I.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return this.finish(e,ee.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._tryParseKeyframeSelector=function(){var e=this.create(xF),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return null;for(;this.accept(I.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return this.restoreAtMark(t),null;return this.peek(I.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},r.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(CI);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},r.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseSupportsCondition=function(){var e=this.create(um);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(I.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},r.prototype._parseSupportsConditionInParens=function(){var e=this.create(um);if(this.accept(I.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([I.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,ee.ConditionExpected):this.accept(I.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,ee.RightParenthesisExpected,[I.ParenthesisR],[]);if(this.peek(I.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(I.ParenthesisL)){for(var i=1;this.token.type!==I.EOF&&i!==0;)this.token.type===I.ParenthesisL?i++:this.token.type===I.ParenthesisR&&i--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,ee.LeftParenthesisExpected,[],[I.ParenthesisL])},r.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(W7);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,ee.MediaQueryExpected)},r.prototype._parseMediaQueryList=function(){var e=this.create(V7);if(!e.addChild(this._parseMediaQuery([I.CurlyL])))return this.finish(e,ee.MediaQueryExpected);for(;this.accept(I.Comma);)if(!e.addChild(this._parseMediaQuery([I.CurlyL])))return this.finish(e,ee.MediaQueryExpected);return this.finish(e)},r.prototype._parseMediaQuery=function(e){var t=this.create(H7),i=!0,n=!1;if(!this.peek(I.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!t.addChild(this._parseIdent()))return null;n=!0,i=this.acceptIdent("and")}for(;i;){if(t.addChild(this._parseMediaContentStart())){i=this.acceptIdent("and");continue}if(!this.accept(I.ParenthesisL))return n?this.finish(t,ee.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,ee.IdentifierExpected,[],e);if(this.accept(I.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,ee.TermExpected,[],e);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[],e);i=this.acceptIdent("and")}return this.finish(t)},r.prototype._parseMediaContentStart=function(){return null},r.prototype._parseMediaFeatureName=function(){return this._parseIdent()},r.prototype._parseMedium=function(){var e=this.create(He);return e.addChild(this._parseIdent())?this.finish(e):null},r.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},r.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(d_e);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(I.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,ee.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},r.prototype._parsePageMarginBox=function(){if(!this.peek(I.AtKeyword))return null;var e=this.create(u_e);return this.acceptOneKeyword($_e)||this.markError(e,ee.UnknownAtRule,[],[I.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parsePageSelector=function(){if(!this.peek(I.Ident)&&!this.peek(I.Colon))return null;var e=this.create(He);return e.addChild(this._parseIdent()),this.accept(I.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,ee.IdentifierExpected):this.finish(e)},r.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(c_e);return this.consumeToken(),this.resync([],[I.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},r.prototype._parseUnknownAtRule=function(){if(!this.peek(I.AtKeyword))return null;var e=this.create(C_e);e.addChild(this._parseUnknownAtRuleName());var t=function(){return n===0&&s===0&&o===0},i=0,n=0,s=0,o=0;e:for(;;){switch(this.token.type){case I.SemiColon:if(t())break e;break;case I.EOF:return n>0?this.finish(e,ee.RightCurlyExpected):o>0?this.finish(e,ee.RightSquareBracketExpected):s>0?this.finish(e,ee.RightParenthesisExpected):this.finish(e);case I.CurlyL:i++,n++;break;case I.CurlyR:if(n--,i>0&&n===0){if(this.consumeToken(),o>0)return this.finish(e,ee.RightSquareBracketExpected);if(s>0)return this.finish(e,ee.RightParenthesisExpected);break e}if(n<0){if(s===0&&o===0)break e;return this.finish(e,ee.LeftCurlyExpected)}break;case I.ParenthesisL:s++;break;case I.ParenthesisR:if(s--,s<0)return this.finish(e,ee.LeftParenthesisExpected);break;case I.BracketL:o++;break;case I.BracketR:if(o--,o<0)return this.finish(e,ee.LeftSquareBracketExpected);break}this.consumeToken()}return e},r.prototype._parseUnknownAtRuleName=function(){var e=this.create(He);return this.accept(I.AtKeyword)?this.finish(e):e},r.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(I.Dashmatch)||this.peek(I.Includes)||this.peek(I.SubstringOperator)||this.peek(I.PrefixOperator)||this.peek(I.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(K.Operator);return this.consumeToken(),this.finish(e)}else return null},r.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(He);return this.consumeToken(),this.finish(e)},r.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(He);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=K.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=K.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(He);return this.consumeToken(),e.type=K.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(He);return this.consumeToken(),e.type=K.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(He);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=K.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},r.prototype._parseSimpleSelector=function(){var e=this.create(M7),t=0;for(e.addChild(this._parseElementName())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},r.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},r.prototype._parseSelectorIdent=function(){return this._parseIdent()},r.prototype._parseHash=function(){if(!this.peek(I.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(K.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,ee.IdentifierExpected)}else this.consumeToken();return this.finish(e)},r.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(K.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,ee.IdentifierExpected):this.finish(e)},r.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(K.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)},r.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(K.NamespacePrefix);return!t.addChild(this._parseIdent())&&this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},r.prototype._parseAttrib=function(){if(!this.peek(I.BracketL))return null;var e=this.create(g_e);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(I.BracketR)?this.finish(e):this.finish(e,ee.RightSquareBracketExpected)):this.finish(e,ee.IdentifierExpected)},r.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(I.ParenthesisL)){var i=function(){var n=e.create(He);if(!n.addChild(e._parseSelector(!1)))return null;for(;e.accept(I.Comma)&&n.addChild(e._parseSelector(!1)););return e.peek(I.ParenthesisR)?e.finish(n):null};if(t.addChild(this.try(i)||this._parseBinaryExpr()),!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return this.finish(t)}return null},r.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(I.Colon))return null;var e=this.mark(),t=this.createNode(K.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(I.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,ee.IdentifierExpected):this.finish(t))},r.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},r.prototype._parsePrio=function(){if(!this.peek(I.Exclamation))return null;var e=this.createNode(K.Prio);return this.accept(I.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},r.prototype._parseExpr=function(e){e===void 0&&(e=!1);var t=this.create($7);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(I.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},r.prototype._parseNamedLine=function(){if(!this.peek(I.BracketL))return null;var e=this.createNode(K.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(I.BracketR)?this.finish(e):this.finish(e,ee.RightSquareBracketExpected)},r.prototype._parseBinaryExpr=function(e,t){var i=this.create(h_e);if(!i.setLeft(e||this._parseTerm()))return null;if(!i.setOperator(t||this._parseOperator()))return this.finish(i);if(!i.setRight(this._parseTerm()))return this.finish(i,ee.TermExpected);i=this.finish(i);var n=this._parseOperator();return n&&(i=this._parseBinaryExpr(i,n)),this.finish(i)},r.prototype._parseTerm=function(){var e=this.create(f_e);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},r.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},r.prototype._parseOperation=function(){if(!this.peek(I.ParenthesisL))return null;var e=this.create(He);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(I.ParenthesisR)?this.finish(e):this.finish(e,ee.RightParenthesisExpected)},r.prototype._parseNumeric=function(){if(this.peek(I.Num)||this.peek(I.Percentage)||this.peek(I.Resolution)||this.peek(I.Length)||this.peek(I.EMS)||this.peek(I.EXS)||this.peek(I.Angle)||this.peek(I.Time)||this.peek(I.Dimension)||this.peek(I.Freq)){var e=this.create(uR);return this.consumeToken(),this.finish(e)}return null},r.prototype._parseStringLiteral=function(){if(!this.peek(I.String)&&!this.peek(I.BadString))return null;var e=this.createNode(K.StringLiteral);return this.consumeToken(),this.finish(e)},r.prototype._parseURILiteral=function(){if(!this.peekRegExp(I.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(K.URILiteral);return this.accept(I.Ident),this.hasWhitespace()||!this.peek(I.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected))},r.prototype._parseURLArgument=function(){var e=this.create(He);return!this.accept(I.String)&&!this.accept(I.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},r.prototype._parseIdent=function(e){if(!this.peek(I.Ident))return null;var t=this.create(to);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(I.Ident,/^--/),this.consumeToken(),this.finish(t)},r.prototype._parseFunction=function(){var e=this.mark(),t=this.create(mb);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(I.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,ee.ExpressionExpected);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},r.prototype._parseFunctionIdentifier=function(){if(!this.peek(I.Ident))return null;var e=this.create(to);if(e.referenceTypes=[It.Function],this.acceptIdent("progid")){if(this.accept(I.Colon))for(;this.accept(I.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},r.prototype._parseFunctionArgument=function(){var e=this.create(gg);return e.setValue(this._parseExpr(!0))?this.finish(e):null},r.prototype._parseHexColor=function(){if(this.peekRegExp(I.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create(dR);return this.consumeToken(),this.finish(e)}else return null},r}();function U_e(r,e){var t=0,i=r.length;if(i===0)return 0;for(;t<i;){var n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}var z_e=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),q7=function(){function r(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}return r.prototype.addChild=function(e){this.children.push(e),e.setParent(this)},r.prototype.setParent=function(e){this.parent=e},r.prototype.findScope=function(e,t){return t===void 0&&(t=0),this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},r.prototype.findInScope=function(e,t){t===void 0&&(t=0);var i=e+t,n=U_e(this.children,function(o){return o.offset>i});if(n===0)return this;var s=this.children[n-1];return s.offset<=e&&s.offset+s.length>=e+t?s.findInScope(e,t):this},r.prototype.addSymbol=function(e){this.symbols.push(e)},r.prototype.getSymbol=function(e,t){for(var i=0;i<this.symbols.length;i++){var n=this.symbols[i];if(n.name===e&&n.type===t)return n}return null},r.prototype.getSymbols=function(){return this.symbols},r}(),j_e=function(r){z_e(e,r);function e(){return r.call(this,0,Number.MAX_VALUE)||this}return e}(q7),Nv=function(){function r(e,t,i,n){this.name=e,this.value=t,this.node=i,this.type=n}return r}(),q_e=function(){function r(e){this.scope=e}return r.prototype.addSymbol=function(e,t,i,n){if(e.offset!==-1){var s=this.scope.findScope(e.offset,e.length);s&&s.addSymbol(new Nv(t,i,e,n))}},r.prototype.addScope=function(e){if(e.offset!==-1){var t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){var i=new q7(e.offset,e.length);return t.addChild(i),i}return t}return null},r.prototype.addSymbolToChildScope=function(e,t,i,n,s){if(e&&e.offset!==-1){var o=this.addScope(e);o&&o.addSymbol(new Nv(i,n,t,s))}},r.prototype.visitNode=function(e){switch(e.type){case K.Keyframe:return this.addSymbol(e,e.getName(),void 0,It.Keyframe),!0;case K.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case K.VariableDeclaration:return this.visitVariableDeclarationNode(e);case K.Ruleset:return this.visitRuleSet(e);case K.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,It.Mixin),!0;case K.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,It.Function),!0;case K.FunctionParameter:return this.visitFunctionParameterNode(e);case K.Declarations:return this.addScope(e),!0;case K.For:var t=e,i=t.getDeclarations();return i&&t.variable&&this.addSymbolToChildScope(i,t.variable,t.variable.getName(),void 0,It.Variable),!0;case K.Each:{var n=e,s=n.getDeclarations();if(s)for(var o=n.getVariables().getChildren(),a=0,l=o;a<l.length;a++){var c=l[a];this.addSymbolToChildScope(s,c,c.getName(),void 0,It.Variable)}return!0}}return!0},r.prototype.visitRuleSet=function(e){var t=this.scope.findScope(e.offset,e.length);if(t)for(var i=0,n=e.getSelectors().getChildren();i<n.length;i++){var s=n[i];s instanceof MS&&s.getChildren().length===1&&t.addSymbol(new Nv(s.getChild(0).getText(),void 0,s,It.Rule))}return!0},r.prototype.visitVariableDeclarationNode=function(e){var t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,It.Variable),!0},r.prototype.visitFunctionParameterNode=function(e){var t=e.getParent().getDeclarations();if(t){var i=e.getDefaultValue(),n=i?i.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),n,It.Variable)}return!0},r.prototype.visitCustomPropertyDeclarationNode=function(e){var t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,It.Variable),!0},r.prototype.addCSSVariable=function(e,t,i,n){e.offset!==-1&&this.scope.addSymbol(new Nv(t,i,e,n))},r}(),yI=function(){function r(e){this.global=new j_e,e.acceptVisitor(new q_e(this.global))}return r.prototype.findSymbolsAtOffset=function(e,t){for(var i=this.global.findScope(e,0),n=[],s={};i;){for(var o=i.getSymbols(),a=0;a<o.length;a++){var l=o[a];l.type===t&&!s[l.name]&&(n.push(l),s[l.name]=!0)}i=i.parent}return n},r.prototype.internalFindSymbol=function(e,t){var i=e;if(e.parent instanceof PS&&e.parent.getParent()instanceof Di&&(i=e.parent.getParent().getDeclarations()),e.parent instanceof gg&&e.parent.getParent()instanceof mb){var n=e.parent.getParent().getIdentifier();if(n){var s=this.internalFindSymbol(n,[It.Function]);s&&(i=s.node.getDeclarations())}}if(!i)return null;for(var o=e.getText(),a=this.global.findScope(i.offset,i.length);a;){for(var l=0;l<t.length;l++){var c=t[l],d=a.getSymbol(o,c);if(d)return d}a=a.parent}return null},r.prototype.evaluateReferenceTypes=function(e){if(e instanceof to){var t=e.referenceTypes;if(t)return t;if(e.isCustomProperty)return[It.Variable];var i=Gme(e);if(i){var n=i.getNonPrefixedPropertyName();if((n==="animation"||n==="animation-name")&&i.getValue()&&i.getValue().offset===e.offset)return[It.Keyframe]}}else if(e instanceof hR)return[It.Variable];var s=e.findAParent(K.Selector,K.ExtendsReference);return s?[It.Rule]:null},r.prototype.findSymbolFromNode=function(e){if(!e)return null;for(;e.type===K.Interpolation;)e=e.getParent();var t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null},r.prototype.matchesSymbol=function(e,t){if(!e)return!1;for(;e.type===K.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;var i=this.evaluateReferenceTypes(e);if(!i||i.indexOf(t.type)===-1)return!1;var n=this.internalFindSymbol(e,i);return n===t},r.prototype.findSymbol=function(e,t,i){for(var n=this.global.findScope(i);n;){var s=n.getSymbol(e,t);if(s)return s;n=n.parent}return null},r}(),WF;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(WF||(WF={}));var Sy;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(Sy||(Sy={}));var jr;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=Sy.MAX_VALUE),n===Number.MAX_VALUE&&(n=Sy.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return le.objectLiteral(n)&&le.uinteger(n.line)&&le.uinteger(n.character)}r.is=t})(jr||(jr={}));var xi;(function(r){function e(i,n,s,o){if(le.uinteger(i)&&le.uinteger(n)&&le.uinteger(s)&&le.uinteger(o))return{start:jr.create(i,n),end:jr.create(s,o)};if(jr.is(i)&&jr.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return le.objectLiteral(n)&&jr.is(n.start)&&jr.is(n.end)}r.is=t})(xi||(xi={}));var T_;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&xi.is(n.range)&&(le.string(n.uri)||le.undefined(n.uri))}r.is=t})(T_||(T_={}));var VF;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return le.defined(n)&&xi.is(n.targetRange)&&le.string(n.targetUri)&&(xi.is(n.targetSelectionRange)||le.undefined(n.targetSelectionRange))&&(xi.is(n.originSelectionRange)||le.undefined(n.originSelectionRange))}r.is=t})(VF||(VF={}));var SI;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return le.numberRange(n.red,0,1)&&le.numberRange(n.green,0,1)&&le.numberRange(n.blue,0,1)&&le.numberRange(n.alpha,0,1)}r.is=t})(SI||(SI={}));var HF;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return xi.is(n.range)&&SI.is(n.color)}r.is=t})(HF||(HF={}));var $F;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return le.string(n.label)&&(le.undefined(n.textEdit)||dt.is(n))&&(le.undefined(n.additionalTextEdits)||le.typedArray(n.additionalTextEdits,dt.is))}r.is=t})($F||($F={}));var hm;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(hm||(hm={}));var UF;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return le.defined(s)&&(l.startCharacter=s),le.defined(o)&&(l.endCharacter=o),le.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return le.uinteger(n.startLine)&&le.uinteger(n.startLine)&&(le.undefined(n.startCharacter)||le.uinteger(n.startCharacter))&&(le.undefined(n.endCharacter)||le.uinteger(n.endCharacter))&&(le.undefined(n.kind)||le.string(n.kind))}r.is=t})(UF||(UF={}));var xI;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&T_.is(n.location)&&le.string(n.message)}r.is=t})(xI||(xI={}));var rf;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(rf||(rf={}));var zF;(function(r){r.Unnecessary=1,r.Deprecated=2})(zF||(zF={}));var jF;(function(r){function e(t){var i=t;return i!=null&&le.string(i.href)}r.is=e})(jF||(jF={}));var xy;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return le.defined(s)&&(c.severity=s),le.defined(o)&&(c.code=o),le.defined(a)&&(c.source=a),le.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return le.defined(s)&&xi.is(s.range)&&le.string(s.message)&&(le.number(s.severity)||le.undefined(s.severity))&&(le.integer(s.code)||le.string(s.code)||le.undefined(s.code))&&(le.undefined(s.codeDescription)||le.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(le.string(s.source)||le.undefined(s.source))&&(le.undefined(s.relatedInformation)||le.typedArray(s.relatedInformation,xI.is))}r.is=t})(xy||(xy={}));var I_;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return le.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return le.defined(n)&&le.string(n.title)&&le.string(n.command)}r.is=t})(I_||(I_={}));var dt;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return le.objectLiteral(o)&&le.string(o.newText)&&xi.is(o.range)}r.is=n})(dt||(dt={}));var Lf;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&le.objectLiteral(n)&&le.string(n.label)&&(le.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(le.string(n.description)||n.description===void 0)}r.is=t})(Lf||(Lf={}));var Xn;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(Xn||(Xn={}));var $l;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return dt.is(o)&&(Lf.is(o.annotationId)||Xn.is(o.annotationId))}r.is=n})($l||($l={}));var Ey;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&ky.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(Ey||(Ey={}));var D_;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&le.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||le.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||le.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Xn.is(n.annotationId))}r.is=t})(D_||(D_={}));var A_;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&le.string(n.oldUri)&&le.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||le.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||le.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Xn.is(n.annotationId))}r.is=t})(A_||(A_={}));var N_;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&le.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||le.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||le.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Xn.is(n.annotationId))}r.is=t})(N_||(N_={}));var EI;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return le.string(n.kind)?D_.is(n)||A_.is(n)||N_.is(n):Ey.is(n)}))}r.is=e})(EI||(EI={}));var Rv=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=dt.insert(e,t):Xn.is(i)?(s=i,n=$l.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=$l.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=dt.replace(e,t):Xn.is(i)?(s=i,n=$l.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=$l.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=dt.del(e):Xn.is(t)?(n=t,i=$l.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=$l.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),qF=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(Xn.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new qF(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(Ey.is(i)){var n=new Rv(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new Rv(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(ky.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new Rv(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new Rv(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new qF,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Lf.is(t)||Xn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=D_.create(e,i):(o=Xn.is(n)?n:this._changeAnnotations.manage(n),s=D_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Lf.is(i)||Xn.is(i)?s=i:n=i;var o,a;if(s===void 0?o=A_.create(e,t,n):(a=Xn.is(s)?s:this._changeAnnotations.manage(s),o=A_.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Lf.is(t)||Xn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=N_.create(e,i):(o=Xn.is(n)?n:this._changeAnnotations.manage(n),s=N_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var GF;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return le.defined(n)&&le.string(n.uri)}r.is=t})(GF||(GF={}));var KF;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&le.string(n.uri)&&le.integer(n.version)}r.is=t})(KF||(KF={}));var ky;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&le.string(n.uri)&&(n.version===null||le.integer(n.version))}r.is=t})(ky||(ky={}));var YF;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return le.defined(n)&&le.string(n.uri)&&le.string(n.languageId)&&le.integer(n.version)&&le.string(n.text)}r.is=t})(YF||(YF={}));var Xo;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(Xo||(Xo={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(Xo||(Xo={}));var kI;(function(r){function e(t){var i=t;return le.objectLiteral(t)&&Xo.is(i.kind)&&le.string(i.value)}r.is=e})(kI||(kI={}));var Re;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(Re||(Re={}));var kr;(function(r){r.PlainText=1,r.Snippet=2})(kr||(kr={}));var yd;(function(r){r.Deprecated=1})(yd||(yd={}));var ZF;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&le.string(n.newText)&&xi.is(n.insert)&&xi.is(n.replace)}r.is=t})(ZF||(ZF={}));var XF;(function(r){r.asIs=1,r.adjustIndentation=2})(XF||(XF={}));var QF;(function(r){function e(t){return{label:t}}r.create=e})(QF||(QF={}));var JF;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(JF||(JF={}));var Ly;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return le.string(n)||le.objectLiteral(n)&&le.string(n.language)&&le.string(n.value)}r.is=t})(Ly||(Ly={}));var e4;(function(r){function e(t){var i=t;return!!i&&le.objectLiteral(i)&&(kI.is(i.contents)||Ly.is(i.contents)||le.typedArray(i.contents,Ly.is))&&(t.range===void 0||xi.is(t.range))}r.is=e})(e4||(e4={}));var t4;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(t4||(t4={}));var i4;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return le.defined(i)&&(o.documentation=i),le.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(i4||(i4={}));var Ja;(function(r){r.Text=1,r.Read=2,r.Write=3})(Ja||(Ja={}));var n4;(function(r){function e(t,i){var n={range:t};return le.number(i)&&(n.kind=i),n}r.create=e})(n4||(n4={}));var vi;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(vi||(vi={}));var r4;(function(r){r.Deprecated=1})(r4||(r4={}));var s4;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(s4||(s4={}));var o4;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&le.string(n.name)&&le.number(n.kind)&&xi.is(n.range)&&xi.is(n.selectionRange)&&(n.detail===void 0||le.string(n.detail))&&(n.deprecated===void 0||le.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(o4||(o4={}));var a4;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(a4||(a4={}));var l4;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return le.defined(n)&&le.typedArray(n.diagnostics,xy.is)&&(n.only===void 0||le.typedArray(n.only,le.string))}r.is=t})(l4||(l4={}));var c4;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):I_.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&le.string(n.title)&&(n.diagnostics===void 0||le.typedArray(n.diagnostics,xy.is))&&(n.kind===void 0||le.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||I_.is(n.command))&&(n.isPreferred===void 0||le.boolean(n.isPreferred))&&(n.edit===void 0||EI.is(n.edit))}r.is=t})(c4||(c4={}));var d4;(function(r){function e(i,n){var s={range:i};return le.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return le.defined(n)&&xi.is(n.range)&&(le.undefined(n.command)||I_.is(n.command))}r.is=t})(d4||(d4={}));var u4;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return le.defined(n)&&le.uinteger(n.tabSize)&&le.boolean(n.insertSpaces)}r.is=t})(u4||(u4={}));var h4;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return le.defined(n)&&xi.is(n.range)&&(le.undefined(n.target)||le.string(n.target))}r.is=t})(h4||(h4={}));var f4;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&xi.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(f4||(f4={}));var g4;(function(r){function e(s,o,a,l){return new G_e(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(le.defined(o)&&le.string(o.uri)&&(le.undefined(o.languageId)||le.string(o.languageId))&&le.uinteger(o.lineCount)&&le.func(o.getText)&&le.func(o.positionAt)&&le.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,d=l.length-1;d>=0;d--){var u=l[d],h=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,h)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var d=0,u=0,h=0;d<l.length&&u<c.length;){var f=o(l[d],c[u]);f<=0?s[h++]=l[d++]:s[h++]=c[u++]}for(;d<l.length;)s[h++]=l[d++];for(;u<c.length;)s[h++]=c[u++];return s}})(g4||(g4={}));var G_e=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` +`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` +`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return jr.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return jr.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),le;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function d(f){return e.call(f)==="[object Function]"}r.func=d;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function h(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=h})(le||(le={}));var p4=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=G7(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),d=Math.max(o.end.line,0),u=this._lineOffsets,h=_4(s.text,!1,a);if(d-c===h.length)for(var f=0,g=h.length;f<g;f++)u[f+c+1]=h[f];else h.length<1e4?u.splice.apply(u,[c+1,d-c].concat(h)):this._lineOffsets=u=u.slice(0,c+1).concat(h,u.slice(d+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+h.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=_4(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),m4;(function(r){function e(n,s,o,a){return new p4(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof p4)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=LI(s.map(K_e),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],d=0,u=a;d<u.length;d++){var h=u[d],f=n.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),h.newText.length&&c.push(h.newText),l=n.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(m4||(m4={}));function LI(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);LI(i,e),LI(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function _4(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function G7(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function K_e(r){var e=G7(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var b4;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Xo.Markdown,Xo.PlainText]}},hover:{contentFormat:[Xo.Markdown,Xo.PlainText]}}}})(b4||(b4={}));var R_;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(R_||(R_={}));var K7;K7=(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,d="",u=0,h=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(h===g-1||f===1))if(h!==g-1&&f===2){if(d.length<2||u!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var p=d.lastIndexOf("/");if(p!==d.length-1){p===-1?(d="",u=0):u=(d=d.slice(0,p)).length-1-d.lastIndexOf("/"),h=g,f=0;continue}}else if(d.length===2||d.length===1){d="",u=0,h=g,f=0;continue}}l&&(d.length>0?d+="/..":d="..",u=2)}else d.length>0?d+="/"+a.slice(h+1,g):d=a.slice(h+1,g),u=g-h-1;h=g,f=0}else c===46&&f!==-1?++f:f=-1}return d}var o={resolve:function(){for(var a,l="",c=!1,d=arguments.length-1;d>=-1&&!c;d--){var u;d>=0?u=arguments[d]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var d=a.length,u=d-c,h=1;h<l.length&&l.charCodeAt(h)===47;++h);for(var f=l.length-h,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(h+_)===47)return l.slice(h+_+1);if(_===0)return l.slice(h+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(h+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=d;++_)_!==d&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(h+p):(h+=p,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,d=-1,u=!0,h=a.length-1;h>=1;--h)if((l=a.charCodeAt(h))===47){if(!u){d=h;break}}else u=!1;return d===-1?c?"/":".":c&&d===1?"//":a.slice(0,d)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,d=0,u=-1,h=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!h){d=c+1;break}}else g===-1&&(h=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return d===u?u=g:u===-1&&(u=a.length),a.slice(d,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!h){d=c+1;break}}else u===-1&&(h=!1,u=c+1);return u===-1?"":a.slice(d,u)},extname:function(a){n(a);for(var l=-1,c=0,d=-1,u=!0,h=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)d===-1&&(u=!1,d=f+1),g===46?l===-1?l=f:h!==1&&(h=1):l!==-1&&(h=-1);else if(!u){c=f+1;break}}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===c+1?"":a.slice(l,d)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var d=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return d?d===c.root?d+u:d+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,d=a.charCodeAt(0),u=d===47;u?(l.root="/",c=1):c=0;for(var h=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((d=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),d===46?h===-1?h=_:v!==1&&(v=1):h!==-1&&(v=-1);else if(!p){f=_+1;break}return h===-1||g===-1||v===0||v===1&&h===g-1&&h===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,h),l.base=a.slice(1,g)):(l.name=a.slice(f,h),l.base=a.slice(f,g)),l.ext=a.slice(h,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>z}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,d=(l=function(N,L){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,W){O.__proto__=W}||function(O,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(O[ge]=W[ge])})(N,L)},function(N,L){function O(){this.constructor=N}l(N,L),N.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}),u=/^\w[\w\d+.-]*$/,h=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function N(L,O,W,ge,se,ae){ae===void 0&&(ae=!1),typeof L=="object"?(this.scheme=L.scheme||g,this.authority=L.authority||g,this.path=L.path||g,this.query=L.query||g,this.fragment=L.fragment||g):(this.scheme=function(Ce,Le){return Ce||Le?Ce:"file"}(L,ae),this.authority=O||g,this.path=function(Ce,Le){switch(Ce){case"https":case"http":case"file":Le?Le[0]!==p&&(Le=p+Le):Le=p}return Le}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(Ce,Le){if(!Ce.scheme&&Le)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+Ce.authority+'", path: "'+Ce.path+'", query: "'+Ce.query+'", fragment: "'+Ce.fragment+'"}');if(Ce.scheme&&!u.test(Ce.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(Ce.path){if(Ce.authority){if(!h.test(Ce.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(f.test(Ce.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return N.isUri=function(L){return L instanceof N||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="function"&&typeof L.with=="function"&&typeof L.toString=="function"},Object.defineProperty(N.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),N.prototype.with=function(L){if(!L)return this;var O=L.scheme,W=L.authority,ge=L.path,se=L.query,ae=L.fragment;return O===void 0?O=this.scheme:O===null&&(O=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),O===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(O,W,ge,se,ae)},N.parse=function(L,O){O===void 0&&(O=!1);var W=_.exec(L);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),O):new C(g,g,g,g,g)},N.file=function(L){var O=g;if(o&&(L=L.replace(/\\/g,p)),L[0]===p&&L[1]===p){var W=L.indexOf(p,2);W===-1?(O=L.substring(2),L=p):(O=L.substring(2,W),L=L.substring(W)||p)}return new C("file",O,L,g,g)},N.from=function(L){return new C(L.scheme,L.authority,L.path,L.query,L.fragment)},N.prototype.toString=function(L){return L===void 0&&(L=!1),x(this,L)},N.prototype.toJSON=function(){return this},N.revive=function(L){if(L){if(L instanceof N)return L;var O=new C(L);return O._formatted=L.external,O._fsPath=L._sep===b?L.fsPath:null,O}return L},N}(),b=o?1:void 0,C=function(N){function L(){var O=N!==null&&N.apply(this,arguments)||this;return O._formatted=null,O._fsPath=null,O}return d(L,N),Object.defineProperty(L.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),L.prototype.toString=function(O){return O===void 0&&(O=!1),O?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)},L.prototype.toJSON=function(){var O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=b),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O},L}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function E(N,L){for(var O=void 0,W=-1,ge=0;ge<N.length;ge++){var se=N.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||L&&se===47)W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O!==void 0&&(O+=N.charAt(ge));else{O===void 0&&(O=N.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O+=ae):W===-1&&(W=ge)}}return W!==-1&&(O+=encodeURIComponent(N.substring(W))),O!==void 0?O:N}function S(N){for(var L=void 0,O=0;O<N.length;O++){var W=N.charCodeAt(O);W===35||W===63?(L===void 0&&(L=N.substr(0,O)),L+=y[W]):L!==void 0&&(L+=N[O])}return L!==void 0?L:N}function w(N,L){var O;return O=N.authority&&N.path.length>1&&N.scheme==="file"?"//"+N.authority+N.path:N.path.charCodeAt(0)===47&&(N.path.charCodeAt(1)>=65&&N.path.charCodeAt(1)<=90||N.path.charCodeAt(1)>=97&&N.path.charCodeAt(1)<=122)&&N.path.charCodeAt(2)===58?L?N.path.substr(1):N.path[1].toLowerCase()+N.path.substr(2):N.path,o&&(O=O.replace(/\//g,"\\")),O}function x(N,L){var O=L?S:E,W="",ge=N.scheme,se=N.authority,ae=N.path,Ce=N.query,Le=N.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var bi=se.substr(0,ct);se=se.substr(ct+1),(ct=bi.indexOf(":"))===-1?W+=O(bi,!1):(W+=O(bi.substr(0,ct),!1),W+=":",W+=O(bi.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=O(se,!1):(W+=O(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Kt=ae.charCodeAt(1))>=65&&Kt<=90&&(ae="/"+String.fromCharCode(Kt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Kt;(Kt=ae.charCodeAt(0))>=65&&Kt<=90&&(ae=String.fromCharCode(Kt+32)+":"+ae.substr(2))}W+=O(ae,!0)}return Ce&&(W+="?",W+=O(Ce,!1)),Le&&(W+="#",W+=L?Le:E(Le,!1)),W}function D(N){try{return decodeURIComponent(N)}catch{return N.length>3?N.substr(0,3)+D(N.substr(3)):N}}var M=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(N){return N.match(M)?N.replace(M,function(L){return D(L)}):N}var z,j=s(470),re=function(){for(var N=0,L=0,O=arguments.length;L<O;L++)N+=arguments[L].length;var W=Array(N),ge=0;for(L=0;L<O;L++)for(var se=arguments[L],ae=0,Ce=se.length;ae<Ce;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(N){N.joinPath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];return L.with({path:te.join.apply(te,re([L.path],O))})},N.resolvePath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];var ge=L.path||"/";return L.with({path:te.resolve.apply(te,re([ge],O))})},N.dirname=function(L){var O=te.dirname(L.path);return O.length===1&&O.charCodeAt(0)===46?L:L.with({path:O})},N.basename=function(L){return te.basename(L.path)},N.extname=function(L){return te.extname(L.path)}})(z||(z={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();const{URI:fR,Utils:TI}=K7;var Y_e=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return r.concat(s||Array.prototype.slice.call(e))};function mE(r){return TI.dirname(fR.parse(r)).toString()}function II(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return TI.joinPath.apply(TI,Y_e([fR.parse(r)],e,!1)).toString()}var v4=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},C4=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Z_e=function(){function r(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}return r.prototype.onCssURILiteralValue=function(e){this.literalCompletions.push(e)},r.prototype.onCssImportPath=function(e){this.importCompletions.push(e)},r.prototype.computeCompletions=function(e,t){return v4(this,void 0,void 0,function(){var i,n,s,o,a,p,l,c,d,C,u,h,f,g,p,_,v,b,C;return C4(this,function(y){switch(y.label){case 0:i={items:[],isIncomplete:!1},n=0,s=this.literalCompletions,y.label=1;case 1:return n<s.length?(o=s[n],a=o.uriValue,p=_E(a),p==="."||p===".."?(i.isIncomplete=!0,[3,4]):[3,2]):[3,5];case 2:return[4,this.providePathSuggestions(a,o.position,o.range,e,t)];case 3:for(l=y.sent(),c=0,d=l;c<d.length;c++)C=d[c],i.items.push(C);y.label=4;case 4:return n++,[3,1];case 5:u=0,h=this.importCompletions,y.label=6;case 6:return u<h.length?(f=h[u],g=f.pathValue,p=_E(g),p==="."||p===".."?(i.isIncomplete=!0,[3,9]):[3,7]):[3,10];case 7:return[4,this.providePathSuggestions(g,f.position,f.range,e,t)];case 8:for(_=y.sent(),e.languageId==="scss"&&_.forEach(function(E){On(E.label,"_")&&O7(E.label,".scss")&&(E.textEdit?E.textEdit.newText=E.label.slice(1,-5):E.label=E.label.slice(1,-5))}),v=0,b=_;v<b.length;v++)C=b[v],i.items.push(C);y.label=9;case 9:return u++,[3,6];case 10:return[2,i]}})})},r.prototype.providePathSuggestions=function(e,t,i,n,s){return v4(this,void 0,void 0,function(){var o,a,l,c,d,u,h,f,g,p,_,v,b,C,y;return C4(this,function(E){switch(E.label){case 0:if(o=_E(e),a=On(e,"'")||On(e,'"'),l=a?o.slice(0,t.character-(i.start.character+1)):o.slice(0,t.character-i.start.character),c=n.uri,d=a?ebe(i,1,-1):i,u=Q_e(l,o,d),h=l.substring(0,l.lastIndexOf("/")+1),f=s.resolveReference(h||".",c),!f)return[3,4];E.label=1;case 1:return E.trys.push([1,3,,4]),g=[],[4,this.readDirectory(f)];case 2:for(p=E.sent(),_=0,v=p;_<v.length;_++)b=v[_],C=b[0],y=b[1],C.charCodeAt(0)!==X_e&&(y===R_.Directory||II(f,C)!==c)&&g.push(J_e(C,y===R_.Directory,u));return[2,g];case 3:return E.sent(),[3,4];case 4:return[2,[]]}})})},r}(),X_e=".".charCodeAt(0);function _E(r){return On(r,"'")||On(r,'"')?r.slice(1,-1):r}function Q_e(r,e,t){var i,n=r.lastIndexOf("/");if(n===-1)i=t;else{var s=e.slice(n+1),o=Ty(t.end,-s.length),a=s.indexOf(" "),l=void 0;a!==-1?l=Ty(o,a):l=t.end,i=xi.create(o,l)}return i}function J_e(r,e,t){return e?(r=r+"/",{label:Ov(r),kind:Re.Folder,textEdit:dt.replace(t,Ov(r)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:Ov(r),kind:Re.File,textEdit:dt.replace(t,Ov(r))}}function Ov(r){return r.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function Ty(r,e){return jr.create(r.line,r.character+e)}function ebe(r,e,t){var i=Ty(r.start,e),n=Ty(r.end,t);return xi.create(i,n)}var tbe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},ibe=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},nbe=qc(),Dl=kr.Snippet,Ro;(function(r){r.Enums=" ",r.Normal="d",r.VendorPrefixed="x",r.Term="y",r.Variable="z"})(Ro||(Ro={}));var Y7=function(){function r(e,t,i){e===void 0&&(e=null),this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=i,this.completionParticipants=[]}return r.prototype.configure=function(e){this.defaultSettings=e},r.prototype.getSymbolContext=function(){return this.symbolContext||(this.symbolContext=new yI(this.styleSheet)),this.symbolContext},r.prototype.setCompletionParticipants=function(e){this.completionParticipants=e||[]},r.prototype.doComplete2=function(e,t,i,n,s){return s===void 0&&(s=this.defaultSettings),tbe(this,void 0,void 0,function(){var o,a,l,c;return ibe(this,function(d){switch(d.label){case 0:if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return[2,this.doComplete(e,t,i,s)];o=new Z_e(this.lsOptions.fileSystemProvider.readDirectory),a=this.completionParticipants,this.completionParticipants=[o].concat(a),l=this.doComplete(e,t,i,s),d.label=1;case 1:return d.trys.push([1,,3,4]),[4,o.computeCompletions(e,n)];case 2:return c=d.sent(),[2,{isIncomplete:l.isIncomplete||c.isIncomplete,items:c.items.concat(l.items)}];case 3:return this.completionParticipants=a,[7];case 4:return[2]}})})},r.prototype.doComplete=function(e,t,i,n){this.offset=e.offsetAt(t),this.position=t,this.currentWord=obe(e,this.offset),this.defaultReplaceRange=xi.create(jr.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=i,this.documentSettings=n;try{var s={isIncomplete:!1,items:[]};this.nodePath=qme(this.styleSheet,this.offset);for(var o=this.nodePath.length-1;o>=0;o--){var a=this.nodePath[o];if(a instanceof lR)this.getCompletionsForDeclarationProperty(a.getParent(),s);else if(a instanceof $7)a.parent instanceof wI?this.getVariableProposals(null,s):this.getCompletionsForExpression(a,s);else if(a instanceof M7){var l=a.findAParent(K.ExtendsReference,K.Ruleset);if(l)if(l.type===K.ExtendsReference)this.getCompletionsForExtendsReference(l,a,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(a instanceof gg)this.getCompletionsForFunctionArgument(a,a.getParent(),s);else if(a instanceof oR)this.getCompletionsForDeclarations(a,s);else if(a instanceof FS)this.getCompletionsForVariableDeclaration(a,s);else if(a instanceof kC)this.getCompletionsForRuleSet(a,s);else if(a instanceof wI)this.getCompletionsForInterpolation(a,s);else if(a instanceof Cy)this.getCompletionsForFunctionDeclaration(a,s);else if(a instanceof wy)this.getCompletionsForMixinReference(a,s);else if(a instanceof mb)this.getCompletionsForFunctionArgument(null,a,s);else if(a instanceof CI)this.getCompletionsForSupports(a,s);else if(a instanceof um)this.getCompletionsForSupportsCondition(a,s);else if(a instanceof k_)this.getCompletionsForExtendsReference(a,null,s);else if(a.type===K.URILiteral)this.getCompletionForUriLiteralValue(a,s);else if(a.parent===null)this.getCompletionForTopLevel(s);else if(a.type===K.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,s);else continue;if(s.items.length>0||this.offset>a.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},r.prototype.isImportPathParent=function(e){return e===K.Import},r.prototype.finalize=function(e){return e},r.prototype.findInNodePath=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this.nodePath.length-1;i>=0;i--){var n=this.nodePath[i];if(e.indexOf(n.type)!==-1)return n}return null},r.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},r.prototype.getPropertyProposals=function(e,t){var i=this,n=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,o=this.cssDataManager.getProperties();return o.forEach(function(a){var l,c,d=!1;e?(l=i.getCompletionRange(e.getProperty()),c=a.name,Ao(e.colonPosition)||(c+=": ",d=!0)):(l=i.getCompletionRange(null),c=a.name+": ",d=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&i.offset>=i.textDocument.offsetAt(l.end)&&(c+="$0;");var u={label:a.name,documentation:hp(a,i.doesSupportMarkdown()),tags:fp(a)?[yd.Deprecated]:[],textEdit:dt.replace(l,c),insertTextFormat:kr.Snippet,kind:Re.Property};a.restrictions||(d=!1),n&&d&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"});var h=typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50,f=(255-h).toString(16),g=On(a.name,"-")?Ro.VendorPrefixed:Ro.Normal;u.sortText=g+"_"+f,t.items.push(u)}),this.completionParticipants.forEach(function(a){a.onCssProperty&&a.onCssProperty({propertyName:i.currentWord,range:i.defaultReplaceRange})}),t},Object.defineProperty(r.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),r.prototype.getCompletionsForDeclarationValue=function(e,t){for(var i=this,n=e.getFullPropertyName(),s=this.cssDataManager.getProperty(n),o=e.getValue()||null;o&&o.hasChildren();)o=o.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(g){g.onCssPropertyValue&&g.onCssPropertyValue({propertyName:n,propertyValue:i.currentWord,range:i.getCompletionRange(o)})}),s){if(s.restrictions)for(var a=0,l=s.restrictions;a<l.length;a++){var c=l[a];switch(c){case"color":this.getColorProposals(s,o,t);break;case"position":this.getPositionProposals(s,o,t);break;case"repeat":this.getRepeatStyleProposals(s,o,t);break;case"line-style":this.getLineStyleProposals(s,o,t);break;case"line-width":this.getLineWidthProposals(s,o,t);break;case"geometry-box":this.getGeometryBoxProposals(s,o,t);break;case"box":this.getBoxProposals(s,o,t);break;case"image":this.getImageProposals(s,o,t);break;case"timing-function":this.getTimingFunctionProposals(s,o,t);break;case"shape":this.getBasicShapeProposals(s,o,t);break}}this.getValueEnumProposals(s,o,t),this.getCSSWideKeywordProposals(s,o,t),this.getUnitProposals(s,o,t)}else for(var d=rbe(this.styleSheet,e),u=0,h=d.getEntries();u<h.length;u++){var f=h[u];t.items.push({label:f,textEdit:dt.replace(this.getCompletionRange(o),f),kind:Re.Value})}return this.getVariableProposals(o,t),this.getTermProposals(s,o,t),t},r.prototype.getValueEnumProposals=function(e,t,i){if(e.values)for(var n=0,s=e.values;n<s.length;n++){var o=s[n],a=o.name,l=void 0;if(O7(a,")")){var c=a.lastIndexOf("(");c!==-1&&(a=a.substr(0,c)+"($1)",l=Dl)}var d=Ro.Enums;On(o.name,"-")&&(d+=Ro.VendorPrefixed);var u={label:o.name,documentation:hp(o,this.doesSupportMarkdown()),tags:fp(e)?[yd.Deprecated]:[],textEdit:dt.replace(this.getCompletionRange(t),a),sortText:d,kind:Re.Value,insertTextFormat:l};i.items.push(u)}return i},r.prototype.getCSSWideKeywordProposals=function(e,t,i){for(var n in MF)i.items.push({label:n,documentation:MF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getCompletionsForInterpolation=function(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t},r.prototype.getVariableProposals=function(e,t){for(var i=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Variable),n=0,s=i;n<s.length;n++){var o=s[n],a=On(o.name,"--")?"var("+o.name+")":o.name,l={label:o.name,documentation:o.value?SF(o.value):o.value,textEdit:dt.replace(this.getCompletionRange(e),a),kind:Re.Variable,sortText:Ro.Variable};if(typeof l.documentation=="string"&&w4(l.documentation)&&(l.kind=Re.Color),o.node.type===K.FunctionParameter){var c=o.node.getParent();c.type===K.MixinDeclaration&&(l.detail=nbe("completion.argument","argument from '{0}'",c.getName()))}t.items.push(l)}return t},r.prototype.getVariableProposalsForCSSVarFunction=function(e){var t=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Variable);t=t.filter(function(a){return On(a.name,"--")});for(var i=0,n=t;i<n.length;i++){var s=n[i],o={label:s.name,documentation:s.value?SF(s.value):s.value,textEdit:dt.replace(this.getCompletionRange(null),s.name),kind:Re.Variable};typeof o.documentation=="string"&&w4(o.documentation)&&(o.kind=Re.Color),e.items.push(o)}return e},r.prototype.getUnitProposals=function(e,t,i){var n="0";if(this.currentWord.length>0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(n=s[0],i.isIncomplete=n.length===this.currentWord.length)}else this.currentWord.length===0&&(i.isIncomplete=!0);if(t&&t.parent&&t.parent.type===K.Term&&(t=t.getParent()),e.restrictions)for(var o=0,a=e.restrictions;o<a.length;o++){var l=a[o],c=W_e[l];if(c)for(var d=0,u=c;d<u.length;d++){var h=u[d],f=n+h;i.items.push({label:f,textEdit:dt.replace(this.getCompletionRange(t),f),kind:Re.Unit})}}return i},r.prototype.getCompletionRange=function(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){var t=e.end!==-1?this.textDocument.positionAt(e.end):this.position,i=this.textDocument.positionAt(e.offset);if(i.line===t.line)return xi.create(i,t)}return this.defaultReplaceRange},r.prototype.getColorProposals=function(e,t,i){for(var n in yy)i.items.push({label:n,documentation:yy[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Color});for(var n in LF)i.items.push({label:n,documentation:LF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});var s=new Z7;this.styleSheet.acceptVisitor(new sbe(s,this.offset));for(var o=0,a=s.getEntries();o<a.length;o++){var n=a[o];i.items.push({label:n,textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Color})}for(var l=function(f){var g=1,p=function(v,b){return"${"+g+++":"+b+"}"},_=f.func.replace(/\[?\$(\w+)\]?/g,p);i.items.push({label:f.func.substr(0,f.func.indexOf("(")),detail:f.func,documentation:f.desc,textEdit:dt.replace(c.getCompletionRange(t),_),insertTextFormat:Dl,kind:Re.Function})},c=this,d=0,u=I_e;d<u.length;d++){var h=u[d];l(h)}return i},r.prototype.getPositionProposals=function(e,t,i){for(var n in DF)i.items.push({label:n,documentation:DF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getRepeatStyleProposals=function(e,t,i){for(var n in AF)i.items.push({label:n,documentation:AF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getLineStyleProposals=function(e,t,i){for(var n in NF)i.items.push({label:n,documentation:NF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getLineWidthProposals=function(e,t,i){for(var n=0,s=B_e;n<s.length;n++){var o=s[n];i.items.push({label:o,textEdit:dt.replace(this.getCompletionRange(t),o),kind:Re.Value})}return i},r.prototype.getGeometryBoxProposals=function(e,t,i){for(var n in OF)i.items.push({label:n,documentation:OF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getBoxProposals=function(e,t,i){for(var n in RF)i.items.push({label:n,documentation:RF[n],textEdit:dt.replace(this.getCompletionRange(t),n),kind:Re.Value});return i},r.prototype.getImageProposals=function(e,t,i){for(var n in PF){var s=gp(n);i.items.push({label:n,documentation:PF[n],textEdit:dt.replace(this.getCompletionRange(t),s),kind:Re.Function,insertTextFormat:n!==s?Dl:void 0})}return i},r.prototype.getTimingFunctionProposals=function(e,t,i){for(var n in FF){var s=gp(n);i.items.push({label:n,documentation:FF[n],textEdit:dt.replace(this.getCompletionRange(t),s),kind:Re.Function,insertTextFormat:n!==s?Dl:void 0})}return i},r.prototype.getBasicShapeProposals=function(e,t,i){for(var n in BF){var s=gp(n);i.items.push({label:n,documentation:BF[n],textEdit:dt.replace(this.getCompletionRange(t),s),kind:Re.Function,insertTextFormat:n!==s?Dl:void 0})}return i},r.prototype.getCompletionsForStylesheet=function(e){var t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof kC?this.getCompletionsForRuleSet(t,e):t instanceof CI?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)},r.prototype.getCompletionForTopLevel=function(e){var t=this;return this.cssDataManager.getAtDirectives().forEach(function(i){e.items.push({label:i.name,textEdit:dt.replace(t.getCompletionRange(null),i.name),documentation:hp(i,t.doesSupportMarkdown()),tags:fp(i)?[yd.Deprecated]:[],kind:Re.Keyword})}),this.getCompletionsForSelector(null,!1,e),e},r.prototype.getCompletionsForRuleSet=function(e,t){var i=e.getDeclarations(),n=i&&i.endsWith("}")&&this.offset>=i.end;if(n)return this.getCompletionForTopLevel(t);var s=!i||this.offset<=i.offset;return s?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},r.prototype.getCompletionsForSelector=function(e,t,i){var n=this,s=this.findInNodePath(K.PseudoSelector,K.IdentifierSelector,K.ClassSelector,K.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=xi.create(jr.create(this.position.line,this.position.character-this.currentWord.length),this.position));var o=this.cssDataManager.getPseudoClasses();o.forEach(function(_){var v=gp(_.name),b={label:_.name,textEdit:dt.replace(n.getCompletionRange(s),v),documentation:hp(_,n.doesSupportMarkdown()),tags:fp(_)?[yd.Deprecated]:[],kind:Re.Function,insertTextFormat:_.name!==v?Dl:void 0};On(_.name,":-")&&(b.sortText=Ro.VendorPrefixed),i.items.push(b)});var a=this.cssDataManager.getPseudoElements();if(a.forEach(function(_){var v=gp(_.name),b={label:_.name,textEdit:dt.replace(n.getCompletionRange(s),v),documentation:hp(_,n.doesSupportMarkdown()),tags:fp(_)?[yd.Deprecated]:[],kind:Re.Function,insertTextFormat:_.name!==v?Dl:void 0};On(_.name,"::-")&&(b.sortText=Ro.VendorPrefixed),i.items.push(b)}),!t){for(var l=0,c=V_e;l<c.length;l++){var d=c[l];i.items.push({label:d,textEdit:dt.replace(this.getCompletionRange(s),d),kind:Re.Keyword})}for(var u=0,h=H_e;u<h.length;u++){var d=h[u];i.items.push({label:d,textEdit:dt.replace(this.getCompletionRange(s),d),kind:Re.Keyword})}}var f={};f[this.currentWord]=!0;var g=this.textDocument.getText();if(this.styleSheet.accept(function(_){if(_.type===K.SimpleSelector&&_.length>0){var v=g.substr(_.offset,_.length);return v.charAt(0)==="."&&!f[v]&&(f[v]=!0,i.items.push({label:v,textEdit:dt.replace(n.getCompletionRange(s),v),kind:Re.Keyword})),!1}return!0}),e&&e.isNested()){var p=e.getSelectors().findFirstChildBeforeOffset(this.offset);p&&e.getSelectors().getChildren().indexOf(p)===0&&this.getPropertyProposals(null,i)}return i},r.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var i=e.findFirstChildBeforeOffset(this.offset);if(!i)return this.getCompletionsForDeclarationProperty(null,t);if(i instanceof aR){var n=i;if(!Ao(n.colonPosition)||this.offset<=n.colonPosition)return this.getCompletionsForDeclarationProperty(n,t);if(Ao(n.semicolonPosition)&&n.semicolonPosition<this.offset)return this.offset===n.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(n instanceof fg)return this.getCompletionsForDeclarationValue(n,t)}else i instanceof k_?this.getCompletionsForExtendsReference(i,null,t):this.currentWord&&this.currentWord[0]==="@"?this.getCompletionsForDeclarationProperty(null,t):i instanceof kC&&this.getCompletionsForDeclarationProperty(null,t);return t},r.prototype.getCompletionsForVariableDeclaration=function(e,t){return this.offset&&Ao(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue(),t),t},r.prototype.getCompletionsForExpression=function(e,t){var i=e.getParent();if(i instanceof gg)return this.getCompletionsForFunctionArgument(i,i.getParent(),t),t;var n=e.findParent(K.Declaration);if(!n)return this.getTermProposals(void 0,null,t),t;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof uR||s instanceof to?this.getCompletionsForDeclarationValue(n,t):t:this.getCompletionsForDeclarationValue(n,t)},r.prototype.getCompletionsForFunctionArgument=function(e,t,i){var n=t.getIdentifier();return n&&n.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(i),i},r.prototype.getCompletionsForFunctionDeclaration=function(e,t){var i=e.getDeclarations();return i&&this.offset>i.offset&&this.offset<i.end&&this.getTermProposals(void 0,null,t),t},r.prototype.getCompletionsForMixinReference=function(e,t){for(var i=this,n=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Mixin),s=0,o=n;s<o.length;s++){var a=o[s];a.node instanceof L_&&t.items.push(this.makeTermProposal(a,a.node.getParameters(),null))}var l=e.getIdentifier()||null;return this.completionParticipants.forEach(function(c){c.onCssMixinReference&&c.onCssMixinReference({mixinName:i.currentWord,range:i.getCompletionRange(l)})}),t},r.prototype.getTermProposals=function(e,t,i){for(var n=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Function),s=0,o=n;s<o.length;s++){var a=o[s];a.node instanceof Cy&&i.items.push(this.makeTermProposal(a,a.node.getParameters(),t))}return i},r.prototype.makeTermProposal=function(e,t,i){e.node;var n=t.getChildren().map(function(o){return o instanceof PS?o.getName():o.getText()}),s=e.name+"("+n.map(function(o,a){return"${"+(a+1)+":"+o+"}"}).join(", ")+")";return{label:e.name,detail:e.name+"("+n.join(", ")+")",textEdit:dt.replace(this.getCompletionRange(i),s),insertTextFormat:Dl,kind:Re.Function,sortText:Ro.Term}},r.prototype.getCompletionsForSupportsCondition=function(e,t){var i=e.findFirstChildBeforeOffset(this.offset);if(i){if(i instanceof fg)return!Ao(i.colonPosition)||this.offset<=i.colonPosition?this.getCompletionsForDeclarationProperty(i,t):this.getCompletionsForDeclarationValue(i,t);if(i instanceof um)return this.getCompletionsForSupportsCondition(i,t)}return Ao(e.lParent)&&this.offset>e.lParent&&(!Ao(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},r.prototype.getCompletionsForSupports=function(e,t){var i=e.getDeclarations(),n=!i||this.offset<=i.offset;if(n){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof um?this.getCompletionsForSupportsCondition(s,t):t}return this.getCompletionForTopLevel(t)},r.prototype.getCompletionsForExtendsReference=function(e,t,i){return i},r.prototype.getCompletionForUriLiteralValue=function(e,t){var i,n,s;if(e.hasChildren()){var a=e.getChild(0);i=a.getText(),n=this.position,s=this.getCompletionRange(a)}else{i="",n=this.position;var o=this.textDocument.positionAt(e.offset+4);s=xi.create(o,o)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:i,position:n,range:s})}),t},r.prototype.getCompletionForImportPath=function(e,t){var i=this;return this.completionParticipants.forEach(function(n){n.onCssImportPath&&n.onCssImportPath({pathValue:e.getText(),position:i.position,range:i.getCompletionRange(e)})}),t},r.prototype.hasCharacterAtPosition=function(e,t){var i=this.textDocument.getText();return e>=0&&e<i.length&&i.charAt(e)===t},r.prototype.doesSupportMarkdown=function(){var e,t,i;if(!Ao(this.supportsMarkdown)){if(!Ao(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var n=(i=(t=(e=this.lsOptions.clientCapabilities.textDocument)===null||e===void 0?void 0:e.completion)===null||t===void 0?void 0:t.completionItem)===null||i===void 0?void 0:i.documentationFormat;this.supportsMarkdown=Array.isArray(n)&&n.indexOf(Xo.Markdown)!==-1}return this.supportsMarkdown},r}();function fp(r){return!!(r.status&&(r.status==="nonstandard"||r.status==="obsolete"))}var Z7=function(){function r(){this.entries={}}return r.prototype.add=function(e){this.entries[e]=!0},r.prototype.getEntries=function(){return Object.keys(this.entries)},r}();function gp(r){return r.replace(/\(\)$/,"($1)")}function rbe(r,e){var t=e.getFullPropertyName(),i=new Z7;function n(a){return(a instanceof to||a instanceof uR||a instanceof dR)&&i.add(a.getText()),!0}function s(a){var l=a.getFullPropertyName();return t===l}function o(a){if(a instanceof fg&&a!==e&&s(a)){var l=a.getValue();l&&l.accept(n)}return!0}return r.accept(o),i}var sbe=function(){function r(e,t){this.entries=e,this.currentOffset=t}return r.prototype.visitNode=function(e){return(e instanceof dR||e instanceof mb&&A_e(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0},r}();function obe(r,e){for(var t=e-1,i=r.getText();t>=0&&` +\r":{[()]},*>+`.indexOf(i.charAt(t))===-1;)t--;return i.substring(t+1,e)}function w4(r){return r.toLowerCase()in yy||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)}var X7=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Q7=function(){function r(){this.parent=null,this.children=null,this.attributes=null}return r.prototype.findAttribute=function(e){if(this.attributes)for(var t=0,i=this.attributes;t<i.length;t++){var n=i[t];if(n.name===e)return n.value}return null},r.prototype.addChild=function(e){e instanceof r&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)},r.prototype.append=function(e){if(this.attributes){var t=this.attributes[this.attributes.length-1];t.value=t.value+e}},r.prototype.prepend=function(e){if(this.attributes){var t=this.attributes[0];t.value=e+t.value}},r.prototype.findRoot=function(){for(var e=this;e.parent&&!(e.parent instanceof y4);)e=e.parent;return e},r.prototype.removeChild=function(e){if(this.children){var t=this.children.indexOf(e);if(t!==-1)return this.children.splice(t,1),!0}return!1},r.prototype.addAttr=function(e,t){this.attributes||(this.attributes=[]);for(var i=0,n=this.attributes;i<n.length;i++){var s=n[i];if(s.name===e){s.value+=" "+t;return}}this.attributes.push({name:e,value:t})},r.prototype.clone=function(e){e===void 0&&(e=!0);var t=new r;if(this.attributes){t.attributes=[];for(var i=0,n=this.attributes;i<n.length;i++){var s=n[i];t.addAttr(s.name,s.value)}}if(e&&this.children){t.children=[];for(var o=0;o<this.children.length;o++)t.addChild(this.children[o].clone())}return t},r.prototype.cloneWithParent=function(){var e=this.clone(!1);if(this.parent&&!(this.parent instanceof y4)){var t=this.parent.cloneWithParent();t.addChild(e)}return e},r}(),y4=function(r){X7(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Q7);(function(r){X7(e,r);function e(t){var i=r.call(this)||this;return i.addAttr("name",t),i}return e})(Q7);var S4;(function(r){function e(i,n){return n+t(i)+n}r.ensure=e;function t(i){var n=i.match(/^['"](.*)["']$/);return n?n[1]:i}r.remove=t})(S4||(S4={}));var Mv=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Pv=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},x4=qc(),E4=/^\w+:\/\//,k4=/^data:/,abe=function(){function r(e){this.fileSystemProvider=e}return r.prototype.findDefinition=function(e,t,i){var n=new yI(i),s=e.offsetAt(t),o=vI(i,s);if(!o)return null;var a=n.findSymbolFromNode(o);return a?{uri:e.uri,range:cd(a.node,e)}:null},r.prototype.findReferences=function(e,t,i){var n=this.findDocumentHighlights(e,t,i);return n.map(function(s){return{uri:e.uri,range:s.range}})},r.prototype.findDocumentHighlights=function(e,t,i){var n=[],s=e.offsetAt(t),o=vI(i,s);if(!o||o.type===K.Stylesheet||o.type===K.Declarations)return n;o.type===K.Identifier&&o.parent&&o.parent.type===K.ClassSelector&&(o=o.parent);var a=new yI(i),l=a.findSymbolFromNode(o),c=o.getText();return i.accept(function(d){if(l){if(a.matchesSymbol(d,l))return n.push({kind:L4(d),range:cd(d,e)}),!1}else o&&o.type===d.type&&d.matches(c)&&n.push({kind:L4(d),range:cd(d,e)});return!0}),n},r.prototype.isRawStringDocumentLinkNode=function(e){return e.type===K.Import},r.prototype.findDocumentLinks=function(e,t,i){for(var n=this.findUnresolvedLinks(e,t),s=[],o=0,a=n;o<a.length;o++){var l=a[o],c=l.link,d=c.target;if(!(!d||k4.test(d)))if(E4.test(d))s.push(c);else{var u=i.resolveReference(d,e.uri);u&&(c.target=u),s.push(c)}}return s},r.prototype.findDocumentLinks2=function(e,t,i){return Mv(this,void 0,void 0,function(){var n,s,o,a,l,c,d,u;return Pv(this,function(h){switch(h.label){case 0:n=this.findUnresolvedLinks(e,t),s=[],o=0,a=n,h.label=1;case 1:return o<a.length?(l=a[o],c=l.link,d=c.target,!d||k4.test(d)?[3,5]:[3,2]):[3,6];case 2:return E4.test(d)?(s.push(c),[3,5]):[3,3];case 3:return[4,this.resolveRelativeReference(d,e.uri,i,l.isRawLink)];case 4:u=h.sent(),u!==void 0&&(c.target=u,s.push(c)),h.label=5;case 5:return o++,[3,1];case 6:return[2,s]}})})},r.prototype.findUnresolvedLinks=function(e,t){var i=this,n=[],s=function(o){var a=o.getText(),l=cd(o,e);if(!(l.start.line===l.end.line&&l.start.character===l.end.character)){(On(a,"'")||On(a,'"'))&&(a=a.slice(1,-1));var c=o.parent?i.isRawStringDocumentLinkNode(o.parent):!1;n.push({link:{target:a,range:l},isRawLink:c})}};return t.accept(function(o){if(o.type===K.URILiteral){var a=o.getChild(0);return a&&s(a),!1}if(o.parent&&i.isRawStringDocumentLinkNode(o.parent)){var l=o.getText();return(On(l,"'")||On(l,'"'))&&s(o),!1}return!0}),n},r.prototype.findDocumentSymbols=function(e,t){var i=[];return t.accept(function(n){var s={name:null,kind:vi.Class,location:null},o=n;if(n instanceof MS)return s.name=n.getText(),o=n.findAParent(K.Ruleset,K.ExtendsReference),o&&(s.location=T_.create(e.uri,cd(o,e)),i.push(s)),!1;if(n instanceof FS)s.name=n.getName(),s.kind=vi.Variable;else if(n instanceof L_)s.name=n.getName(),s.kind=vi.Method;else if(n instanceof Cy)s.name=n.getName(),s.kind=vi.Function;else if(n instanceof B7)s.name=x4("literal.keyframes","@keyframes {0}",n.getName());else if(n instanceof P7)s.name=x4("literal.fontface","@font-face");else if(n instanceof W7){var a=n.getChild(0);a instanceof V7&&(s.name="@media "+a.getText(),s.kind=vi.Module)}return s.name&&(s.location=T_.create(e.uri,cd(o,e)),i.push(s)),!0}),i},r.prototype.findDocumentColors=function(e,t){var i=[];return t.accept(function(n){var s=lbe(n,e);return s&&i.push(s),!0}),i},r.prototype.getColorPresentations=function(e,t,i,n){var s=[],o=Math.round(i.red*255),a=Math.round(i.green*255),l=Math.round(i.blue*255),c;i.alpha===1?c="rgb("+o+", "+a+", "+l+")":c="rgba("+o+", "+a+", "+l+", "+i.alpha+")",s.push({label:c,textEdit:dt.replace(n,c)}),i.alpha===1?c="#"+od(o)+od(a)+od(l):c="#"+od(o)+od(a)+od(l)+od(Math.round(i.alpha*255)),s.push({label:c,textEdit:dt.replace(n,c)});var d=P_e(i);return d.a===1?c="hsl("+d.h+", "+Math.round(d.s*100)+"%, "+Math.round(d.l*100)+"%)":c="hsla("+d.h+", "+Math.round(d.s*100)+"%, "+Math.round(d.l*100)+"%, "+d.a+")",s.push({label:c,textEdit:dt.replace(n,c)}),s},r.prototype.doRename=function(e,t,i,n){var s,o=this.findDocumentHighlights(e,t,n),a=o.map(function(l){return dt.replace(l.range,i)});return{changes:(s={},s[e.uri]=a,s)}},r.prototype.resolveRelativeReference=function(e,t,i,n){return Mv(this,void 0,void 0,function(){var s,o,a,l,c;return Pv(this,function(d){switch(d.label){case 0:return e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider?(e=e.substring(1),On(t,"file://")?(s=cbe(e),o=i.resolveReference("/",t),a=mE(t),[4,this.resolvePathToModule(s,a,o)]):[3,2]):[3,3];case 1:if(l=d.sent(),l)return c=e.substring(s.length+1),[2,II(l,c)];d.label=2;case 2:return[2,i.resolveReference(e,t)];case 3:return[2,i.resolveReference(e,t)]}})})},r.prototype.resolvePathToModule=function(e,t,i){return Mv(this,void 0,void 0,function(){var n;return Pv(this,function(s){switch(s.label){case 0:return n=II(t,"node_modules",e,"package.json"),[4,this.fileExists(n)];case 1:return s.sent()?[2,mE(n)]:i&&t.startsWith(i)&&t.length!==i.length?[2,this.resolvePathToModule(e,mE(t),i)]:[2,void 0]}})})},r.prototype.fileExists=function(e){return Mv(this,void 0,void 0,function(){var t;return Pv(this,function(i){switch(i.label){case 0:if(!this.fileSystemProvider)return[2,!1];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.fileSystemProvider.stat(e)];case 2:return t=i.sent(),t.type===R_.Unknown&&t.size===-1?[2,!1]:[2,!0];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},r}();function lbe(r,e){var t=F_e(r);if(t){var i=cd(r,e);return{color:t,range:i}}return null}function cd(r,e){return xi.create(e.positionAt(r.offset),e.positionAt(r.end))}function L4(r){if(r.type===K.Selector||r instanceof to&&r.parent&&r.parent instanceof lR&&r.isCustomProperty)return Ja.Write;if(r.parent)switch(r.parent.type){case K.FunctionDeclaration:case K.MixinDeclaration:case K.Keyframe:case K.VariableDeclaration:case K.FunctionParameter:return Ja.Write}return Ja.Read}function od(r){var e=r.toString(16);return e.length!==2?"0"+e:e}function cbe(r){return r[0]==="@"?r.substring(0,r.indexOf("/",r.indexOf("/")+1)):r.substring(0,r.indexOf("/"))}var Zi=qc(),Oh=pg.Warning,T4=pg.Error,Ws=pg.Ignore,fn=function(){function r(e,t,i){this.id=e,this.message=t,this.defaultValue=i}return r}(),dbe=function(){function r(e,t,i){this.id=e,this.message=t,this.defaultValue=i}return r}();new fn("compatibleVendorPrefixes",Zi("rule.vendorprefixes.all","When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Ws),new fn("vendorPrefix",Zi("rule.standardvendorprefix.all","When using a vendor-specific prefix also include the standard property"),Oh),new fn("duplicateProperties",Zi("rule.duplicateDeclarations","Do not use duplicate style definitions"),Ws),new fn("emptyRules",Zi("rule.emptyRuleSets","Do not use empty rulesets"),Oh),new fn("importStatement",Zi("rule.importDirective","Import statements do not load in parallel"),Ws),new fn("boxModel",Zi("rule.bewareOfBoxModelSize","Do not use width or height when using padding or border"),Ws),new fn("universalSelector",Zi("rule.universalSelector","The universal selector (*) is known to be slow"),Ws),new fn("zeroUnits",Zi("rule.zeroWidthUnit","No unit for zero needed"),Ws),new fn("fontFaceProperties",Zi("rule.fontFaceProperties","@font-face rule must define 'src' and 'font-family' properties"),Oh),new fn("hexColorLength",Zi("rule.hexColor","Hex colors must consist of three, four, six or eight hex numbers"),T4),new fn("argumentsInColorFunction",Zi("rule.colorFunction","Invalid number of parameters"),T4),new fn("unknownProperties",Zi("rule.unknownProperty","Unknown property."),Oh),new fn("unknownAtRules",Zi("rule.unknownAtRules","Unknown at-rule."),Oh),new fn("ieHack",Zi("rule.ieHack","IE hacks are only necessary when supporting IE7 and older"),Ws),new fn("unknownVendorSpecificProperties",Zi("rule.unknownVendorSpecificProperty","Unknown vendor specific property."),Ws),new fn("propertyIgnoredDueToDisplay",Zi("rule.propertyIgnoredDueToDisplay","Property is ignored due to the display."),Oh),new fn("important",Zi("rule.avoidImportant","Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Ws),new fn("float",Zi("rule.avoidFloat","Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Ws),new fn("idSelector",Zi("rule.avoidIdSelector","Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Ws);new dbe("validProperties",Zi("rule.validProperties","A list of properties that are not validated against the `unknownProperties` rule."),[]);var ube=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),I4="/".charCodeAt(0),hbe=` +`.charCodeAt(0),fbe="\r".charCodeAt(0),gbe="\f".charCodeAt(0),pbe="$".charCodeAt(0),mbe="#".charCodeAt(0),_be="{".charCodeAt(0),pp="=".charCodeAt(0),bbe="!".charCodeAt(0),vbe="<".charCodeAt(0),Cbe=">".charCodeAt(0),bE=".".charCodeAt(0),vl=I.CustomToken,DI=vl++,AI=vl++;vl++;var J7=vl++,eH=vl++,tH=vl++,iH=vl++,LC=vl++;vl++;var wbe=function(r){ube(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scanNext=function(t){if(this.stream.advanceIfChar(pbe)){var i=["$"];if(this.ident(i))return this.finishToken(t,DI,i.join(""));this.stream.goBackTo(t)}return this.stream.advanceIfChars([mbe,_be])?this.finishToken(t,AI):this.stream.advanceIfChars([pp,pp])?this.finishToken(t,J7):this.stream.advanceIfChars([bbe,pp])?this.finishToken(t,eH):this.stream.advanceIfChar(vbe)?this.stream.advanceIfChar(pp)?this.finishToken(t,iH):this.finishToken(t,I.Delim):this.stream.advanceIfChar(Cbe)?this.stream.advanceIfChar(pp)?this.finishToken(t,tH):this.finishToken(t,I.Delim):this.stream.advanceIfChars([bE,bE,bE])?this.finishToken(t,LC):r.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return r.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([I4,I4])?(this.stream.advanceWhileChar(function(t){switch(t){case hbe:case fbe:case gbe:return!1;default:return!0}}),!0):!1},e}(sR),vE=qc(),CE=function(){function r(e,t){this.id=e,this.message=t}return r}(),wE={FromExpected:new CE("scss-fromexpected",vE("expected.from","'from' expected")),ThroughOrToExpected:new CE("scss-throughexpected",vE("expected.through","'through' or 'to' expected")),InExpected:new CE("scss-fromexpected",vE("expected.in","'in' expected"))},ybe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){ybe(e,r);function e(){return r.call(this,new wbe)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(I.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(t)||r.prototype._parseStylesheetAtStatement.call(this,t):this._parseRuleset(!0)||this._parseVariableDeclaration()},e.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var t=this.create(cR);if(this.consumeToken(),!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.URIOrStringExpected);for(;this.accept(I.Comma);)if(!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.URIOrStringExpected);return!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t)},e.prototype._parseVariableDeclaration=function(t){if(t===void 0&&(t=[]),!this.peek(DI))return null;var i=this.create(FS);if(!i.setVariable(this._parseVariable()))return null;if(!this.accept(I.Colon))return this.finish(i,ee.ColonExpected);if(this.prevToken&&(i.colonPosition=this.prevToken.offset),!i.setValue(this._parseExpr()))return this.finish(i,ee.VariableValueExpected,[],t);for(;this.peek(I.Exclamation);)if(!i.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(I.Ident,/^(default|global)$/))return this.finish(i,ee.UnknownKeyword);this.consumeToken()}return this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseMediaContentStart=function(){return this._parseInterpolation()},e.prototype._parseMediaFeatureName=function(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseVariableDeclaration()||this._parseMixinContent()},e.prototype._parseVariable=function(){if(!this.peek(DI))return null;var t=this.create(hR);return this.consumeToken(),t},e.prototype._parseModuleMember=function(){var t=this.mark(),i=this.create(EF);return i.setIdentifier(this._parseIdent([It.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(t),null):i.addChild(this._parseVariable()||this._parseFunction())?i:this.finish(i,ee.IdentifierOrVariableExpected):null},e.prototype._parseIdent=function(t){var i=this;if(!this.peek(I.Ident)&&!this.peek(AI)&&!this.peekDelim("-"))return null;var n=this.create(to);n.referenceTypes=t,n.isCustomProperty=this.peekRegExp(I.Ident,/^--/);for(var s=!1,o=function(){var a=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(a),null):i._parseInterpolation()};(this.accept(I.Ident)||n.addChild(o())||s&&this.acceptRegexp(/^[\w-]/))&&(s=!0,!this.hasWhitespace()););return s?this.finish(n):null},e.prototype._parseTermExpression=function(){return this._parseModuleMember()||this._parseVariable()||this._parseSelectorCombinator()||r.prototype._parseTermExpression.call(this)},e.prototype._parseInterpolation=function(){if(this.peek(AI)){var t=this.create(wI);return this.consumeToken(),!t.addChild(this._parseExpr())&&!this._parseSelectorCombinator()?this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.ExpressionExpected):this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.RightCurlyExpected)}return null},e.prototype._parseOperator=function(){if(this.peek(J7)||this.peek(eH)||this.peek(tH)||this.peek(iH)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(K.Operator);return this.consumeToken(),this.finish(t)}return r.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(He);return this.consumeToken(),this.finish(t)}return r.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(t){var i=this._tryParseCustomPropertyDeclaration(t);if(i)return i;var n=this.create(fg);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(I.Colon))return this.finish(n,ee.ColonExpected,[I.Colon],t||[I.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var s=!1;if(n.setValue(this._parseExpr())&&(s=!0,n.addChild(this._parsePrio())),this.peek(I.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(n,ee.PropertyValueExpected);return this.peek(I.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)},e.prototype._parseNestedProperties=function(){var t=this.create(F7);return this._parseBody(t,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var t=this.create(k_);if(this.consumeToken(),!t.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(t,ee.SelectorExpected);for(;this.accept(I.Comma);)t.getSelectors().addChild(this._parseSimpleSelector());return this.accept(I.Exclamation)&&!this.acceptIdent("optional")?this.finish(t,ee.UnknownKeyword):this.finish(t)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(K.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(I.Num)||this.accept(I.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var t=this.createNode(K.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(t)}else if(this.peekKeyword("@at-root")){var t=this.createNode(K.SelectorPlaceholder);return this.consumeToken(),this.finish(t)}return null},e.prototype._parseElementName=function(){var t=this.mark(),i=r.prototype._parseElementName.call(this);return i&&!this.hasWhitespace()&&this.peek(I.ParenthesisL)?(this.restoreAtMark(t),null):i},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||r.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var t=this.createNode(K.Debug);return this.consumeToken(),t.addChild(this._parseExpr()),this.finish(t)},e.prototype._parseControlStatement=function(t){return t===void 0&&(t=this._parseRuleSetDeclaration.bind(this)),this.peek(I.AtKeyword)?this._parseIfStatement(t)||this._parseForStatement(t)||this._parseEachStatement(t)||this._parseWhileStatement(t):null},e.prototype._parseIfStatement=function(t){return this.peekKeyword("@if")?this._internalParseIfStatement(t):null},e.prototype._internalParseIfStatement=function(t){var i=this.create(Qme);if(this.consumeToken(),!i.setExpression(this._parseExpr(!0)))return this.finish(i,ee.ExpressionExpected);if(this._parseBody(i,t),this.acceptKeyword("@else")){if(this.peekIdent("if"))i.setElseClause(this._internalParseIfStatement(t));else if(this.peek(I.CurlyL)){var n=this.create(i_e);this._parseBody(n,t),i.setElseClause(n)}}return this.finish(i)},e.prototype._parseForStatement=function(t){if(!this.peekKeyword("@for"))return null;var i=this.create(Jme);return this.consumeToken(),i.setVariable(this._parseVariable())?this.acceptIdent("from")?i.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(i,wE.ThroughOrToExpected,[I.CurlyR]):i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,wE.FromExpected,[I.CurlyR]):this.finish(i,ee.VariableNameExpected,[I.CurlyR])},e.prototype._parseEachStatement=function(t){if(!this.peekKeyword("@each"))return null;var i=this.create(e_e);this.consumeToken();var n=i.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(i,ee.VariableNameExpected,[I.CurlyR]);for(;this.accept(I.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(i,ee.VariableNameExpected,[I.CurlyR]);return this.finish(n),this.acceptIdent("in")?i.addChild(this._parseExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,wE.InExpected,[I.CurlyR])},e.prototype._parseWhileStatement=function(t){if(!this.peekKeyword("@while"))return null;var i=this.create(t_e);return this.consumeToken(),i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var t=this.create(Cy);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([It.Function])))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.CurlyR]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}return this.accept(I.ParenthesisR)?this._parseBody(t,this._parseFunctionBodyDeclaration.bind(this)):this.finish(t,ee.RightParenthesisExpected,[I.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var t=this.createNode(K.ReturnStatement);return this.consumeToken(),t.addChild(this._parseExpr())?this.finish(t):this.finish(t,ee.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var t=this.create(L_);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([It.Mixin])))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(this.accept(I.ParenthesisL)){if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.CurlyR])}return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var t=this.create(PS);return t.setIdentifier(this._parseVariable())?(this.accept(LC),this.accept(I.Colon)&&!t.setDefaultValue(this._parseExpr(!0))?this.finish(t,ee.VariableValueExpected,[],[I.Comma,I.ParenthesisR]):this.finish(t)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var t=this.create(b_e);if(this.consumeToken(),this.accept(I.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return this.finish(t)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var t=this.create(wy);this.consumeToken();var i=this._parseIdent([It.Mixin]);if(!t.setIdentifier(i))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([It.Mixin]);if(!n)return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);var s=this.create(EF);i.referenceTypes=[It.Module],s.setIdentifier(i),t.setIdentifier(n),t.addChild(s)}if(this.accept(I.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(I.CurlyL))&&t.setContent(this._parseMixinContentDeclaration()),this.finish(t)},e.prototype._parseMixinContentDeclaration=function(){var t=this.create(v_e);if(this.acceptIdent("using")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.CurlyL]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.CurlyL])}return this.peek(I.CurlyL)&&this._parseBody(t,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(t)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var t=this.create(gg),i=this.mark(),n=this._parseVariable();if(n)if(this.accept(I.Colon))t.setIdentifier(n);else{if(this.accept(LC))return t.setValue(n),this.finish(t);this.restoreAtMark(i)}return t.setValue(this._parseExpr(!0))?(this.accept(LC),t.addChild(this._parsePrio()),this.finish(t)):t.setValue(this._tryParsePrio())?this.finish(t):null},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(I.ParenthesisR)){this.restoreAtMark(t);var n=this.create(He);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e.prototype._parseOperation=function(){if(!this.peek(I.ParenthesisL))return null;var t=this.create(He);for(this.consumeToken();t.addChild(this._parseListElement());)this.accept(I.Comma);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseListElement=function(){var t=this.create(w_e),i=this._parseBinaryExpr();if(!i)return null;if(this.accept(I.Colon)){if(t.setKey(i),!t.setValue(this._parseBinaryExpr()))return this.finish(t,ee.ExpressionExpected)}else t.setValue(i);return this.finish(t)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var t=this.create(r_e);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.StringLiteralExpected);if(!this.peek(I.SemiColon)&&!this.peek(I.EOF)){if(!this.peekRegExp(I.Ident,/as|with/))return this.finish(t,ee.UnknownKeyword);if(this.acceptIdent("as")&&!t.setIdentifier(this._parseIdent([It.Module]))&&!this.acceptDelim("*"))return this.finish(t,ee.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}}return!this.accept(I.SemiColon)&&!this.accept(I.EOF)?this.finish(t,ee.SemiColonExpected):this.finish(t)},e.prototype._parseModuleConfigDeclaration=function(){var t=this.create(s_e);return t.setIdentifier(this._parseVariable())?!this.accept(I.Colon)||!t.setValue(this._parseExpr(!0))?this.finish(t,ee.VariableValueExpected,[],[I.Comma,I.ParenthesisR]):this.accept(I.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(t,ee.UnknownKeyword):this.finish(t):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var t=this.create(o_e);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}if(!this.peek(I.SemiColon)&&!this.peek(I.EOF)){if(!this.peekRegExp(I.Ident,/as|hide|show/))return this.finish(t,ee.UnknownKeyword);if(this.acceptIdent("as")){var i=this._parseIdent([It.Forward]);if(!t.setIdentifier(i))return this.finish(t,ee.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(t,ee.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!t.addChild(this._parseForwardVisibility()))return this.finish(t,ee.IdentifierOrVariableExpected)}return!this.accept(I.SemiColon)&&!this.accept(I.EOF)?this.finish(t,ee.SemiColonExpected):this.finish(t)},e.prototype._parseForwardVisibility=function(){var t=this.create(a_e);for(t.setIdentifier(this._parseIdent());t.addChild(this._parseVariable()||this._parseIdent());)this.accept(I.Comma);return t.getChildren().length>1?t:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||r.prototype._parseSupportsCondition.call(this)},e})(j7);var Sbe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),ve=qc();(function(r){Sbe(e,r);function e(t,i){var n=r.call(this,"$",t,i)||this;return D4(e.scssModuleLoaders),D4(e.scssModuleBuiltIns),n}return e.prototype.isImportPathParent=function(t){return t===K.Forward||t===K.Use||r.prototype.isImportPathParent.call(this,t)},e.prototype.getCompletionForImportPath=function(t,i){var n=t.getParent().type;if(n===K.Forward||n===K.Use)for(var s=0,o=e.scssModuleBuiltIns;s<o.length;s++){var a=o[s],l={label:a.label,documentation:a.documentation,textEdit:dt.replace(this.getCompletionRange(t),"'"+a.label+"'"),kind:Re.Module};i.items.push(l)}return r.prototype.getCompletionForImportPath.call(this,t,i)},e.prototype.createReplaceFunction=function(){var t=1;return function(i,n){return"\\"+n+": ${"+t+++":"+(e.variableDefaults[n]||"")+"}"}},e.prototype.createFunctionProposals=function(t,i,n,s){for(var o=0,a=t;o<a.length;o++){var l=a[o],c=l.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),d=l.func.substr(0,l.func.indexOf("(")),u={label:d,detail:l.func,documentation:l.desc,textEdit:dt.replace(this.getCompletionRange(i),c),insertTextFormat:kr.Snippet,kind:Re.Function};n&&(u.sortText="z"),s.items.push(u)}return s},e.prototype.getCompletionsForSelector=function(t,i,n){return this.createFunctionProposals(e.selectorFuncs,null,!0,n),r.prototype.getCompletionsForSelector.call(this,t,i,n)},e.prototype.getTermProposals=function(t,i,n){var s=e.builtInFuncs;return t&&(s=s.filter(function(o){return!o.type||!t.restrictions||t.restrictions.indexOf(o.type)!==-1})),this.createFunctionProposals(s,i,!0,n),r.prototype.getTermProposals.call(this,t,i,n)},e.prototype.getColorProposals=function(t,i,n){return this.createFunctionProposals(e.colorProposals,i,!1,n),r.prototype.getColorProposals.call(this,t,i,n)},e.prototype.getCompletionsForDeclarationProperty=function(t,i){return this.getCompletionForAtDirectives(i),this.getCompletionsForSelector(null,!0,i),r.prototype.getCompletionsForDeclarationProperty.call(this,t,i)},e.prototype.getCompletionsForExtendsReference=function(t,i,n){for(var s=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Rule),o=0,a=s;o<a.length;o++){var l=a[o],c={label:l.name,textEdit:dt.replace(this.getCompletionRange(i),l.name),kind:Re.Function};n.items.push(c)}return n},e.prototype.getCompletionForAtDirectives=function(t){var i;return(i=t.items).push.apply(i,e.scssAtDirectives),t},e.prototype.getCompletionForTopLevel=function(t){return this.getCompletionForAtDirectives(t),this.getCompletionForModuleLoaders(t),r.prototype.getCompletionForTopLevel.call(this,t),t},e.prototype.getCompletionForModuleLoaders=function(t){var i;return(i=t.items).push.apply(i,e.scssModuleLoaders),t},e.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},e.colorProposals=[{func:"red($color)",desc:ve("scss.builtin.red","Gets the red component of a color.")},{func:"green($color)",desc:ve("scss.builtin.green","Gets the green component of a color.")},{func:"blue($color)",desc:ve("scss.builtin.blue","Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:ve("scss.builtin.mix","Mixes two colors together.")},{func:"hue($color)",desc:ve("scss.builtin.hue","Gets the hue component of a color.")},{func:"saturation($color)",desc:ve("scss.builtin.saturation","Gets the saturation component of a color.")},{func:"lightness($color)",desc:ve("scss.builtin.lightness","Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:ve("scss.builtin.adjust-hue","Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:ve("scss.builtin.lighten","Makes a color lighter.")},{func:"darken($color, $amount)",desc:ve("scss.builtin.darken","Makes a color darker.")},{func:"saturate($color, $amount)",desc:ve("scss.builtin.saturate","Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:ve("scss.builtin.desaturate","Makes a color less saturated.")},{func:"grayscale($color)",desc:ve("scss.builtin.grayscale","Converts a color to grayscale.")},{func:"complement($color)",desc:ve("scss.builtin.complement","Returns the complement of a color.")},{func:"invert($color)",desc:ve("scss.builtin.invert","Returns the inverse of a color.")},{func:"alpha($color)",desc:ve("scss.builtin.alpha","Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:ve("scss.builtin.rgba","Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:ve("scss.builtin.opacify","Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:ve("scss.builtin.fade-in","Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:ve("scss.builtin.transparentize","Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:ve("scss.builtin.fade-out","Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:ve("scss.builtin.adjust-color","Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:ve("scss.builtin.scale-color","Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:ve("scss.builtin.change-color","Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:ve("scss.builtin.ie-hex-str","Converts a color into the format understood by IE filters.")}],e.selectorFuncs=[{func:"selector-nest($selectors\u2026)",desc:ve("scss.builtin.selector-nest","Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors\u2026)",desc:ve("scss.builtin.selector-append","Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:ve("scss.builtin.selector-extend","Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:ve("scss.builtin.selector-replace","Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:ve("scss.builtin.selector-unify","Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:ve("scss.builtin.is-superselector","Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:ve("scss.builtin.simple-selectors","Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:ve("scss.builtin.selector-parse","Parses a selector into the format returned by &.")}],e.builtInFuncs=[{func:"unquote($string)",desc:ve("scss.builtin.unquote","Removes quotes from a string.")},{func:"quote($string)",desc:ve("scss.builtin.quote","Adds quotes to a string.")},{func:"str-length($string)",desc:ve("scss.builtin.str-length","Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:ve("scss.builtin.str-insert","Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:ve("scss.builtin.str-index","Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:ve("scss.builtin.str-slice","Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:ve("scss.builtin.to-upper-case","Converts a string to upper case.")},{func:"to-lower-case($string)",desc:ve("scss.builtin.to-lower-case","Converts a string to lower case.")},{func:"percentage($number)",desc:ve("scss.builtin.percentage","Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:ve("scss.builtin.round","Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:ve("scss.builtin.ceil","Rounds a number up to the next whole number.")},{func:"floor($number)",desc:ve("scss.builtin.floor","Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:ve("scss.builtin.abs","Returns the absolute value of a number.")},{func:"min($numbers)",desc:ve("scss.builtin.min","Finds the minimum of several numbers.")},{func:"max($numbers)",desc:ve("scss.builtin.max","Finds the maximum of several numbers.")},{func:"random([$limit])",desc:ve("scss.builtin.random","Returns a random number.")},{func:"length($list)",desc:ve("scss.builtin.length","Returns the length of a list.")},{func:"nth($list, $n)",desc:ve("scss.builtin.nth","Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:ve("scss.builtin.set-nth","Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:ve("scss.builtin.join","Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:ve("scss.builtin.append","Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:ve("scss.builtin.zip","Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:ve("scss.builtin.index","Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:ve("scss.builtin.list-separator","Returns the separator of a list.")},{func:"map-get($map, $key)",desc:ve("scss.builtin.map-get","Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:ve("scss.builtin.map-merge","Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:ve("scss.builtin.map-remove","Returns a new map with keys removed.")},{func:"map-keys($map)",desc:ve("scss.builtin.map-keys","Returns a list of all keys in a map.")},{func:"map-values($map)",desc:ve("scss.builtin.map-values","Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:ve("scss.builtin.map-has-key","Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:ve("scss.builtin.keywords","Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:ve("scss.builtin.feature-exists","Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:ve("scss.builtin.variable-exists","Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:ve("scss.builtin.global-variable-exists","Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:ve("scss.builtin.function-exists","Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:ve("scss.builtin.mixin-exists","Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:ve("scss.builtin.inspect","Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:ve("scss.builtin.type-of","Returns the type of a value.")},{func:"unit($number)",desc:ve("scss.builtin.unit","Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:ve("scss.builtin.unitless","Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:ve("scss.builtin.comparable","Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args\u2026)",desc:ve("scss.builtin.call","Dynamically calls a Sass function.")}],e.scssAtDirectives=[{label:"@extend",documentation:ve("scss.builtin.@extend","Inherits the styles of another selector."),kind:Re.Keyword},{label:"@at-root",documentation:ve("scss.builtin.@at-root","Causes one or more rules to be emitted at the root of the document."),kind:Re.Keyword},{label:"@debug",documentation:ve("scss.builtin.@debug","Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:Re.Keyword},{label:"@warn",documentation:ve("scss.builtin.@warn","Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:Re.Keyword},{label:"@error",documentation:ve("scss.builtin.@error","Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:Re.Keyword},{label:"@if",documentation:ve("scss.builtin.@if","Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { + $0 +}`,insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@for",documentation:ve("scss.builtin.@for","For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@each",documentation:ve("scss.builtin.@each","Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@while",documentation:ve("scss.builtin.@while","While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { + $0 +}`,insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@mixin",documentation:ve("scss.builtin.@mixin","Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { + $0 +}`,insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@include",documentation:ve("scss.builtin.@include","Includes the styles defined by another mixin into the current rule."),kind:Re.Keyword},{label:"@function",documentation:ve("scss.builtin.@function","Defines complex operations that can be re-used throughout stylesheets."),kind:Re.Keyword}],e.scssModuleLoaders=[{label:"@use",documentation:ve("scss.builtin.@use","Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:kr.Snippet,kind:Re.Keyword},{label:"@forward",documentation:ve("scss.builtin.@forward","Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:kr.Snippet,kind:Re.Keyword}],e.scssModuleBuiltIns=[{label:"sass:math",documentation:ve("scss.builtin.sass:math","Provides functions that operate on numbers."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:ve("scss.builtin.sass:string","Makes it easy to combine, search, or split apart strings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:ve("scss.builtin.sass:color","Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:ve("scss.builtin.sass:list","Lets you access and modify values in lists."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:ve("scss.builtin.sass:map","Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:ve("scss.builtin.sass:selector","Provides access to Sass\u2019s powerful selector engine."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:ve("scss.builtin.sass:meta","Exposes the details of Sass\u2019s inner workings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/meta"}]}],e})(Y7);function D4(r){r.forEach(function(e){if(e.documentation&&e.references&&e.references.length>0){var t=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+=` + +`,t.value+=e.references.map(function(i){return"["+i.name+"]("+i.url+")"}).join(" | "),e.documentation=t}})}var xbe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),A4="/".charCodeAt(0),Ebe=` +`.charCodeAt(0),kbe="\r".charCodeAt(0),Lbe="\f".charCodeAt(0),yE="`".charCodeAt(0),SE=".".charCodeAt(0),Tbe=I.CustomToken,NI=Tbe++,Ibe=function(r){xbe(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scanNext=function(t){var i=this.escapedJavaScript();return i!==null?this.finishToken(t,i):this.stream.advanceIfChars([SE,SE,SE])?this.finishToken(t,NI):r.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return r.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([A4,A4])?(this.stream.advanceWhileChar(function(t){switch(t){case Ebe:case kbe:case Lbe:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var t=this.stream.peekChar();return t===yE?(this.stream.advance(1),this.stream.advanceWhileChar(function(i){return i!==yE}),this.stream.advanceIfChar(yE)?I.EscapedJavaScript:I.BadEscapedJavaScript):null},e}(sR),Dbe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){Dbe(e,r);function e(){return r.call(this,new Ibe)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(I.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||r.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var t=this.create(cR);if(this.consumeToken(),this.accept(I.ParenthesisL)){if(!this.accept(I.Ident))return this.finish(t,ee.IdentifierExpected,[I.SemiColon]);do if(!this.accept(I.Comma))break;while(this.accept(I.Ident));if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.SemiColon])}return!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral())?this.finish(t,ee.URIOrStringExpected,[I.SemiColon]):(!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var t=this.createNode(K.Plugin);return this.consumeToken(),t.addChild(this._parseStringLiteral())?this.accept(I.SemiColon)?this.finish(t):this.finish(t,ee.SemiColonExpected):this.finish(t,ee.StringLiteralExpected)},e.prototype._parseMediaQuery=function(t){var i=r.prototype._parseMediaQuery.call(this,t);if(!i){var n=this.create(H7);return n.addChild(this._parseVariable())?this.finish(n):null}return i},e.prototype._parseMediaDeclaration=function(t){return t===void 0&&(t=!1),this._tryParseRuleset(t)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(t)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(t){t===void 0&&(t=[]);var i=this.create(FS),n=this.mark();if(!i.setVariable(this._parseVariable(!0)))return null;if(this.accept(I.Colon)){if(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseDetachedRuleSet()))i.needsSemicolon=!1;else if(!i.setValue(this._parseExpr()))return this.finish(i,ee.VariableValueExpected,[],t);i.addChild(this._parsePrio())}else return this.restoreAtMark(n),null;return this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseDetachedRuleSet=function(){var t=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(I.ParenthesisL)){var i=this.create(L_);if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,ee.IdentifierExpected,[],[I.ParenthesisR]);if(!this.accept(I.ParenthesisR))return this.restoreAtMark(t),null}else return this.restoreAtMark(t),null;if(!this.peek(I.CurlyL))return null;var n=this.create(Di);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(t){if(!t.addChild(this._parseLookupValue()))return!1;for(var i=!1;this.peek(I.BracketL)&&(i=!0),!!t.addChild(this._parseLookupValue());)i=!1;return!i},e.prototype._parseLookupValue=function(){var t=this.create(He),i=this.mark();return this.accept(I.BracketL)?(t.addChild(this._parseVariable(!1,!0))||t.addChild(this._parsePropertyIdentifier()))&&this.accept(I.BracketR)||this.accept(I.BracketR)?t:(this.restoreAtMark(i),null):(this.restoreAtMark(i),null)},e.prototype._parseVariable=function(t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=!t&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(I.AtKeyword))return null;for(var s=this.create(hR),o=this.mark();this.acceptDelim("@")||!t&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(o),null;return!this.accept(I.AtKeyword)&&!this.accept(I.Ident)?(this.restoreAtMark(o),null):!i&&this.peek(I.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(o),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||r.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(I.EscapedJavaScript)||this.peek(I.BadEscapedJavaScript)){var t=this.createNode(K.EscapedValue);return this.consumeToken(),this.finish(t)}if(this.peekDelim("~")){var t=this.createNode(K.EscapedValue);return this.consumeToken(),this.accept(I.String)||this.accept(I.EscapedJavaScript)?this.finish(t):this.finish(t,ee.TermExpected)}return null},e.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||r.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var t=this.createNode(K.Operator);return this.consumeToken(),this.acceptDelim("="),t}else if(this.peekDelim("=")){var t=this.createNode(K.Operator);return this.consumeToken(),this.acceptDelim("<"),t}else if(this.peekDelim("<")){var t=this.createNode(K.Operator);return this.consumeToken(),this.acceptDelim("="),t}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([It.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||r.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(t){var i=this.create(MS),n=!1;for(t&&(n=i.addChild(this._parseCombinator()));i.addChild(this._parseSimpleSelector());){n=!0;var s=this.mark();if(i.addChild(this._parseGuard())&&this.peek(I.CurlyL))break;this.restoreAtMark(s),i.addChild(this._parseCombinator())}return n?this.finish(i):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(K.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(I.Num)||this.accept(I.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var t=this.createNode(K.SelectorInterpolation),i=this._acceptInterpolatedIdent(t);return i?this.finish(t):null},e.prototype._parsePropertyIdentifier=function(t){t===void 0&&(t=!1);var i=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,i))return null;var n=this.mark(),s=this.create(to);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var o=!1;return t?s.isCustomProperty?o=s.addChild(this._parseIdent()):o=s.addChild(this._parseRegexp(i)):s.isCustomProperty?o=this._acceptInterpolatedIdent(s):o=this._acceptInterpolatedIdent(s,i),o?(!t&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(n),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(I.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(t,i){for(var n=this,s=!1,o=function(){var l=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(l),null):n._parseInterpolation()},a=i?function(){return n.acceptRegexp(i)}:function(){return n.accept(I.Ident)};(a()||t.addChild(this._parseInterpolation()||this.try(o)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var t=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var i=this.createNode(K.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(I.CurlyL)?(this.restoreAtMark(t),null):i.addChild(this._parseIdent())?this.accept(I.CurlyR)?this.finish(i):this.finish(i,ee.RightCurlyExpected):this.finish(i,ee.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var t=this.mark(),i=this.create(L_);if(!i.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(I.ParenthesisL))return this.restoreAtMark(t),null;if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,ee.IdentifierExpected,[],[I.ParenthesisR]);return this.accept(I.ParenthesisR)?(i.setGuard(this._parseGuard()),this.peek(I.CurlyL)?this._parseBody(i,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(t),null)):(this.restoreAtMark(t),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var t;if(this.peekDelim("#")||this.peekDelim(".")){if(t=this.create(to),this.consumeToken(),this.hasWhitespace()||!t.addChild(this._parseIdent()))return null}else if(this.peek(I.Hash))t=this.create(to),this.consumeToken();else return null;return t.referenceTypes=[It.Mixin],this.finish(t)},e.prototype._parsePseudo=function(){if(!this.peek(I.Colon))return null;var t=this.mark(),i=this.create(k_);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(i):(this.restoreAtMark(t),r.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var t=this.mark(),i=this.create(k_);return this.consumeToken(),this.hasWhitespace()||!this.accept(I.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(t),null):this._completeExtends(i)},e.prototype._completeExtends=function(t){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected);var i=t.getSelectors();if(!i.addChild(this._parseSelector(!0)))return this.finish(t,ee.SelectorExpected);for(;this.accept(I.Comma);)if(!i.addChild(this._parseSelector(!0)))return this.finish(t,ee.SelectorExpected);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(I.AtKeyword))return null;var t=this.mark(),i=this.create(wy);return i.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(I.ParenthesisL))?(this.restoreAtMark(t),null):this.accept(I.ParenthesisR)?this.finish(i):this.finish(i,ee.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(t){t===void 0&&(t=!0);for(var i=this.mark(),n=this.create(wy),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var o=this._parseMixinDeclarationIdentifier();if(o)n.getNamespaces().addChild(s),s=o;else break}if(!n.setIdentifier(s))return this.restoreAtMark(i),null;var a=!1;if(this.accept(I.ParenthesisL)){if(a=!0,n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(n,ee.RightParenthesisExpected);s.referenceTypes=[It.Mixin]}else s.referenceTypes=[It.Mixin,It.Rule];return this.peek(I.BracketL)?t||this._addLookupChildren(n):n.addChild(this._parsePrio()),!a&&!this.peek(I.SemiColon)&&!this.peek(I.CurlyR)&&!this.peek(I.EOF)?(this.restoreAtMark(i),null):this.finish(n)},e.prototype._parseMixinArgument=function(){var t=this.create(gg),i=this.mark(),n=this._parseVariable();return n&&(this.accept(I.Colon)?t.setIdentifier(n):this.restoreAtMark(i)),t.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(t):(this.restoreAtMark(i),null)},e.prototype._parseMixinParameter=function(){var t=this.create(PS);if(this.peekKeyword("@rest")){var i=this.create(He);return this.consumeToken(),this.accept(NI)?(t.setIdentifier(this.finish(i)),this.finish(t)):this.finish(t,ee.DotExpected,[],[I.Comma,I.ParenthesisR])}if(this.peek(NI)){var n=this.create(He);return this.consumeToken(),t.setIdentifier(this.finish(n)),this.finish(t)}var s=!1;return t.setIdentifier(this._parseVariable())&&(this.accept(I.Colon),s=!0),!t.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(t)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var t=this.create(y_e);if(this.consumeToken(),t.isNegated=this.acceptIdent("not"),!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,ee.ConditionExpected);for(;this.acceptIdent("and")||this.accept(I.Comma);)if(!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,ee.ConditionExpected);return this.finish(t)},e.prototype._parseGuardCondition=function(){if(!this.peek(I.ParenthesisL))return null;var t=this.create(S_e);return this.consumeToken(),t.addChild(this._parseExpr()),this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseFunction=function(){var t=this.mark(),i=this.create(mb);if(!i.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(I.ParenthesisL))return this.restoreAtMark(t),null;if(i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,ee.ExpressionExpected)}return this.accept(I.ParenthesisR)?this.finish(i):this.finish(i,ee.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(to);return t.referenceTypes=[It.Function],this.consumeToken(),this.finish(t)}return r.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(I.ParenthesisR)){this.restoreAtMark(t);var n=this.create(He);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e})(j7);var Abe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),$e=qc();(function(r){Abe(e,r);function e(t,i){return r.call(this,"@",t,i)||this}return e.prototype.createFunctionProposals=function(t,i,n,s){for(var o=0,a=t;o<a.length;o++){var l=a[o],c={label:l.name,detail:l.example,documentation:l.description,textEdit:dt.replace(this.getCompletionRange(i),l.name+"($0)"),insertTextFormat:kr.Snippet,kind:Re.Function};n&&(c.sortText="z"),s.items.push(c)}return s},e.prototype.getTermProposals=function(t,i,n){var s=e.builtInProposals;return t&&(s=s.filter(function(o){return!o.type||!t.restrictions||t.restrictions.indexOf(o.type)!==-1})),this.createFunctionProposals(s,i,!0,n),r.prototype.getTermProposals.call(this,t,i,n)},e.prototype.getColorProposals=function(t,i,n){return this.createFunctionProposals(e.colorProposals,i,!1,n),r.prototype.getColorProposals.call(this,t,i,n)},e.prototype.getCompletionsForDeclarationProperty=function(t,i){return this.getCompletionsForSelector(null,!0,i),r.prototype.getCompletionsForDeclarationProperty.call(this,t,i)},e.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:$e("less.builtin.if","returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:$e("less.builtin.boolean",'"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:$e("less.builtin.length","returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:$e("less.builtin.extract","returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:$e("less.builtin.range","generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:$e("less.builtin.each","bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:$e("less.builtin.escape","URL encodes a string")},{name:"e",example:"e(@string);",description:$e("less.builtin.e","escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:$e("less.builtin.replace","string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:$e("less.builtin.unit","remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:$e("less.builtin.color","parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:$e("less.builtin.convert","converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:$e("less.builtin.data-uri","inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:$e("less.builtin.abs","absolute value of a number"),example:"abs(number);"},{name:"acos",description:$e("less.builtin.acos","arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:$e("less.builtin.asin","arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:$e("less.builtin.ceil","rounds up to an integer")},{name:"cos",description:$e("less.builtin.cos","cosine function"),example:"cos(number);"},{name:"floor",description:$e("less.builtin.floor","rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:$e("less.builtin.percentage","converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:$e("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:$e("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:$e("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:$e("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:$e("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:$e("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:$e("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:$e("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:$e("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:$e("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:$e("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:$e("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:$e("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:$e("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:$e("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:$e("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:$e("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:$e("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:$e("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:$e("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:$e("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:$e("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:$e("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:$e("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:$e("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:$e("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:$e("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:$e("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:$e("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:$e("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:$e("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:$e("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:$e("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:$e("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:$e("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:$e("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:$e("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e})(Y7);var Nbe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Rbe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(d){try{c(i.next(d))}catch(u){o(u)}}function l(d){try{c(i.throw(d))}catch(u){o(u)}}function c(d){d.done?s(d.value):n(d.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Obe=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(d){return l([c,d])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(d){c=[6,d],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};(function(r){Nbe(e,r);function e(t){return r.call(this,t)||this}return e.prototype.isRawStringDocumentLinkNode=function(t){return r.prototype.isRawStringDocumentLinkNode.call(this,t)||t.type===K.Use||t.type===K.Forward},e.prototype.resolveRelativeReference=function(t,i,n,s){return Rbe(this,void 0,void 0,function(){function o(u){if(u.path!==""&&!(u.path.endsWith(".scss")||u.path.endsWith(".css"))){if(u.path.endsWith("/"))return[u.with({path:u.path+"index.scss"}).toString(),u.with({path:u.path+"_index.scss"}).toString()];var h=u.path.split("/"),f=h[h.length-1],g=u.path.slice(0,-f.length);if(f.startsWith("_"))return u.path.endsWith(".scss")?void 0:[u.with({path:u.path+".scss"}).toString()];var p=f+".scss",_=function(S){return u.with({path:g+S}).toString()},v=_(p),b=_("_"+p),C=_(p.slice(0,-5)+"/index.scss"),y=_(p.slice(0,-5)+"/_index.scss"),E=_(p.slice(0,-5)+".css");return[v,b,C,y,E]}}var a,l,c,d;return Obe(this,function(u){switch(u.label){case 0:return On(t,"sass:")?[2,void 0]:[4,r.prototype.resolveRelativeReference.call(this,t,i,n,s)];case 1:if(a=u.sent(),!(this.fileSystemProvider&&a&&s))return[3,8];l=fR.parse(a),u.label=2;case 2:if(u.trys.push([2,7,,8]),c=o(l),!c)return[3,6];d=0,u.label=3;case 3:return d<c.length?[4,this.fileExists(c[d])]:[3,6];case 4:if(u.sent())return[2,c[d]];u.label=5;case 5:return d++,[3,3];case 6:return[3,8];case 7:return u.sent(),[3,8];case 8:return[2,a]}})})},e})(abe);var Mbe=function(){function r(e,t,i){var n=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var s=function(a){var l=a.getModeId();if(l===n._languageId){var c;n._listener[a.uri.toString()]=a.onDidChangeContent(function(){window.clearTimeout(c),c=window.setTimeout(function(){return n._doValidate(a.uri,l)},500)}),n._doValidate(a.uri,l)}},o=function(a){Ui.setModelMarkers(a,n._languageId,[]);var l=a.uri.toString(),c=n._listener[l];c&&(c.dispose(),delete n._listener[l])};this._disposables.push(Ui.onDidCreateModel(s)),this._disposables.push(Ui.onWillDisposeModel(o)),this._disposables.push(Ui.onDidChangeModelLanguage(function(a){o(a.model),s(a.model)})),i.onDidChange(function(a){Ui.getModels().forEach(function(l){l.getModeId()===n._languageId&&(o(l),s(l))})}),this._disposables.push({dispose:function(){for(var a in n._listener)n._listener[a].dispose()}}),Ui.getModels().forEach(s)}return r.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},r.prototype._doValidate=function(e,t){this._worker(e).then(function(i){return i.doValidation(e.toString())}).then(function(i){var n=i.map(function(o){return Fbe(e,o)}),s=Ui.getModel(e);s&&s.getModeId()===t&&Ui.setModelMarkers(s,t,n)}).then(void 0,function(i){console.error(i)})},r}();function Pbe(r){switch(r){case rf.Error:return Qs.Error;case rf.Warning:return Qs.Warning;case rf.Information:return Qs.Info;case rf.Hint:return Qs.Hint;default:return Qs.Info}}function Fbe(r,e){var t=typeof e.code=="number"?String(e.code):e.code;return{severity:Pbe(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function Ju(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function Bbe(r){if(!!r)return{start:{line:r.startLineNumber-1,character:r.startColumn-1},end:{line:r.endLineNumber-1,character:r.endColumn-1}}}function As(r){if(!!r)return new Ku(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function Wbe(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function Vbe(r){var e=we.CompletionItemKind;switch(r){case Re.Text:return e.Text;case Re.Method:return e.Method;case Re.Function:return e.Function;case Re.Constructor:return e.Constructor;case Re.Field:return e.Field;case Re.Variable:return e.Variable;case Re.Class:return e.Class;case Re.Interface:return e.Interface;case Re.Module:return e.Module;case Re.Property:return e.Property;case Re.Unit:return e.Unit;case Re.Value:return e.Value;case Re.Enum:return e.Enum;case Re.Keyword:return e.Keyword;case Re.Snippet:return e.Snippet;case Re.Color:return e.Color;case Re.File:return e.File;case Re.Reference:return e.Reference}return e.Property}function RI(r){if(!!r)return{range:As(r.range),text:r.newText}}function Hbe(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var $be=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return["/","-",":"]},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),Ju(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new Ku(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(d){var u={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:Hbe(d.command),range:l,kind:Vbe(d.kind)};return d.textEdit&&(Wbe(d.textEdit)?u.range={insert:As(d.textEdit.insert),replace:As(d.textEdit.replace)}:u.range=As(d.textEdit.range),u.insertText=d.textEdit.newText),d.additionalTextEdits&&(u.additionalTextEdits=d.additionalTextEdits.map(RI)),d.insertTextFormat===kr.Snippet&&(u.insertTextRules=we.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function Ube(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function N4(r){return typeof r=="string"?{value:r}:Ube(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` +`+r.value+"\n```\n"}}function zbe(r){if(!!r)return Array.isArray(r)?r.map(N4):[N4(r)]}var jbe=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),Ju(t))}).then(function(s){if(!!s)return{range:As(s.range),contents:zbe(s.contents)}})},r}();function qbe(r){switch(r){case Ja.Read:return we.DocumentHighlightKind.Read;case Ja.Write:return we.DocumentHighlightKind.Write;case Ja.Text:return we.DocumentHighlightKind.Text}return we.DocumentHighlightKind.Text}var Gbe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentHighlights=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDocumentHighlights(n.toString(),Ju(t))}).then(function(s){if(!!s)return s.map(function(o){return{range:As(o.range),kind:qbe(o.kind)}})})},r}();function nH(r){return{uri:Y0.parse(r.uri),range:As(r.range)}}var Kbe=function(){function r(e){this._worker=e}return r.prototype.provideDefinition=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDefinition(n.toString(),Ju(t))}).then(function(s){if(!!s)return[nH(s)]})},r}(),Ybe=function(){function r(e){this._worker=e}return r.prototype.provideReferences=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.findReferences(s.toString(),Ju(t))}).then(function(o){if(!!o)return o.map(nH)})},r}();function Zbe(r){if(!(!r||!r.changes)){var e=[];for(var t in r.changes)for(var i=Y0.parse(t),n=0,s=r.changes[t];n<s.length;n++){var o=s[n];e.push({resource:i,edit:{range:As(o.range),text:o.newText}})}return{edits:e}}}var Xbe=function(){function r(e){this._worker=e}return r.prototype.provideRenameEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doRename(s.toString(),Ju(t),i)}).then(function(o){return Zbe(o)})},r}();function Qbe(r){var e=we.SymbolKind;switch(r){case vi.File:return e.Array;case vi.Module:return e.Module;case vi.Namespace:return e.Namespace;case vi.Package:return e.Package;case vi.Class:return e.Class;case vi.Method:return e.Method;case vi.Property:return e.Property;case vi.Field:return e.Field;case vi.Constructor:return e.Constructor;case vi.Enum:return e.Enum;case vi.Interface:return e.Interface;case vi.Function:return e.Function;case vi.Variable:return e.Variable;case vi.Constant:return e.Constant;case vi.String:return e.String;case vi.Number:return e.Number;case vi.Boolean:return e.Boolean;case vi.Array:return e.Array}return e.Function}var Jbe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:Qbe(s.kind),tags:[],range:As(s.location.range),selectionRange:As(s.location.range)}})})},r}(),eve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentColors=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentColors(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{color:s.color,range:As(s.range)}})})},r.prototype.provideColorPresentations=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getColorPresentations(n.toString(),t.color,Bbe(t.range))}).then(function(s){if(!!s)return s.map(function(o){var a={label:o.label};return o.textEdit&&(a.textEdit=RI(o.textEdit)),o.additionalTextEdits&&(a.additionalTextEdits=o.additionalTextEdits.map(RI)),a})})},r}(),tve=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=ive(o.kind)),a})})},r}();function ive(r){switch(r){case hm.Comment:return we.FoldingRangeKind.Comment;case hm.Imports:return we.FoldingRangeKind.Imports;case hm.Region:return we.FoldingRangeKind.Region}}var nve=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(Ju))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:As(o.range)}),o=o.parent;return a})})},r}();function rve(r){var e=[],t=[],i=new kme(r);e.push(i);var n=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.getLanguageServiceWorker.apply(i,o)};function s(){var o=r.languageId,a=r.modeConfiguration;rH(t),a.completionItems&&t.push(we.registerCompletionItemProvider(o,new $be(n))),a.hovers&&t.push(we.registerHoverProvider(o,new jbe(n))),a.documentHighlights&&t.push(we.registerDocumentHighlightProvider(o,new Gbe(n))),a.definitions&&t.push(we.registerDefinitionProvider(o,new Kbe(n))),a.references&&t.push(we.registerReferenceProvider(o,new Ybe(n))),a.documentSymbols&&t.push(we.registerDocumentSymbolProvider(o,new Jbe(n))),a.rename&&t.push(we.registerRenameProvider(o,new Xbe(n))),a.colors&&t.push(we.registerColorProvider(o,new eve(n))),a.foldingRanges&&t.push(we.registerFoldingRangeProvider(o,new tve(n))),a.diagnostics&&t.push(new Mbe(o,n,r)),a.selectionRanges&&t.push(we.registerSelectionRangeProvider(o,new nve(n)))}return s(),e.push(R4(t)),R4(e)}function R4(r){return{dispose:function(){return rH(r)}}}function rH(r){for(;r.length;)r.pop().dispose()}var sve=Object.freeze(Object.defineProperty({__proto__:null,setupMode:rve},Symbol.toStringTag,{value:"Module"})),ove=2*60*1e3,ave=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>ove&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Ui.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}();function sH(r,e){e===void 0&&(e=!1);var t=r.length,i=0,n="",s=0,o=16,a=0,l=0,c=0,d=0,u=0;function h(C,y){for(var E=0,S=0;E<C||!y;){var w=r.charCodeAt(i);if(w>=48&&w<=57)S=S*16+w-48;else if(w>=65&&w<=70)S=S*16+w-65+10;else if(w>=97&&w<=102)S=S*16+w-97+10;else break;i++,E++}return E<C&&(S=-1),S}function f(C){i=C,n="",s=0,o=16,u=0}function g(){var C=i;if(r.charCodeAt(i)===48)i++;else for(i++;i<r.length&&Mh(r.charCodeAt(i));)i++;if(i<r.length&&r.charCodeAt(i)===46)if(i++,i<r.length&&Mh(r.charCodeAt(i)))for(i++;i<r.length&&Mh(r.charCodeAt(i));)i++;else return u=3,r.substring(C,i);var y=i;if(i<r.length&&(r.charCodeAt(i)===69||r.charCodeAt(i)===101))if(i++,(i<r.length&&r.charCodeAt(i)===43||r.charCodeAt(i)===45)&&i++,i<r.length&&Mh(r.charCodeAt(i))){for(i++;i<r.length&&Mh(r.charCodeAt(i));)i++;y=i}else u=3;return r.substring(C,y)}function p(){for(var C="",y=i;;){if(i>=t){C+=r.substring(y,i),u=2;break}var E=r.charCodeAt(i);if(E===34){C+=r.substring(y,i),i++;break}if(E===92){if(C+=r.substring(y,i),i++,i>=t){u=2;break}var S=r.charCodeAt(i++);switch(S){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` +`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:var w=h(4,!0);w>=0?C+=String.fromCharCode(w):u=4;break;default:u=5}y=i;continue}if(E>=0&&E<=31)if(mp(E)){C+=r.substring(y,i),u=2;break}else u=6;i++}return C}function _(){if(n="",u=0,s=i,l=a,d=c,i>=t)return s=t,o=17;var C=r.charCodeAt(i);if(xE(C)){do i++,n+=String.fromCharCode(C),C=r.charCodeAt(i);while(xE(C));return o=15}if(mp(C))return i++,n+=String.fromCharCode(C),C===13&&r.charCodeAt(i)===10&&(i++,n+=` +`),a++,c=i,o=14;switch(C){case 123:return i++,o=1;case 125:return i++,o=2;case 91:return i++,o=3;case 93:return i++,o=4;case 58:return i++,o=6;case 44:return i++,o=5;case 34:return i++,n=p(),o=10;case 47:var y=i-1;if(r.charCodeAt(i+1)===47){for(i+=2;i<t&&!mp(r.charCodeAt(i));)i++;return n=r.substring(y,i),o=12}if(r.charCodeAt(i+1)===42){i+=2;for(var E=t-1,S=!1;i<E;){var w=r.charCodeAt(i);if(w===42&&r.charCodeAt(i+1)===47){i+=2,S=!0;break}i++,mp(w)&&(w===13&&r.charCodeAt(i)===10&&i++,a++,c=i)}return S||(i++,u=1),n=r.substring(y,i),o=13}return n+=String.fromCharCode(C),i++,o=16;case 45:if(n+=String.fromCharCode(C),i++,i===t||!Mh(r.charCodeAt(i)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=g(),o=11;default:for(;i<t&&v(C);)i++,C=r.charCodeAt(i);if(s!==i){switch(n=r.substring(s,i),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(C),i++,o=16}}function v(C){if(xE(C)||mp(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function b(){var C;do C=_();while(C>=12&&C<=15);return C}return{setPosition:f,getPosition:function(){return i},scan:e?b:_,getToken:function(){return o},getTokenValue:function(){return n},getTokenOffset:function(){return s},getTokenLength:function(){return i-s},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return s-d},getTokenError:function(){return u}}}function xE(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function mp(r){return r===10||r===13||r===8232||r===8233}function Mh(r){return r>=48&&r<=57}var Iy;(function(r){r.DEFAULT={allowTrailingComma:!1}})(Iy||(Iy={}));function lve(r,e,t){e===void 0&&(e=[]),t===void 0&&(t=Iy.DEFAULT);var i=null,n=[],s=[];function o(l){Array.isArray(n)?n.push(l):i!==null&&(n[i]=l)}var a={onObjectBegin:function(){var l={};o(l),s.push(n),n=l,i=null},onObjectProperty:function(l){i=l},onObjectEnd:function(){n=s.pop()},onArrayBegin:function(){var l=[];o(l),s.push(n),n=l,i=null},onArrayEnd:function(){n=s.pop()},onLiteralValue:o,onError:function(l,c,d){e.push({error:l,offset:c,length:d})}};return cve(r,a,t),n[0]}function OI(r){switch(r.type){case"array":return r.children.map(OI);case"object":for(var e=Object.create(null),t=0,i=r.children;t<i.length;t++){var n=i[t],s=n.children[1];s&&(e[n.children[0].value]=OI(s))}return e;case"null":case"string":case"number":case"boolean":return r.value;default:return}}function cve(r,e,t){t===void 0&&(t=Iy.DEFAULT);var i=sH(r,!1);function n(D){return D?function(){return D(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function s(D){return D?function(M){return D(M,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var o=n(e.onObjectBegin),a=s(e.onObjectProperty),l=n(e.onObjectEnd),c=n(e.onArrayBegin),d=n(e.onArrayEnd),u=s(e.onLiteralValue),h=s(e.onSeparator),f=n(e.onComment),g=s(e.onError),p=t&&t.disallowComments,_=t&&t.allowTrailingComma;function v(){for(;;){var D=i.scan();switch(i.getTokenError()){case 4:b(14);break;case 5:b(15);break;case 3:b(13);break;case 1:p||b(11);break;case 2:b(12);break;case 6:b(16);break}switch(D){case 12:case 13:p?b(10):f();break;case 16:b(1);break;case 15:case 14:break;default:return D}}}function b(D,M,B){if(M===void 0&&(M=[]),B===void 0&&(B=[]),g(D),M.length+B.length>0)for(var z=i.getToken();z!==17;){if(M.indexOf(z)!==-1){v();break}else if(B.indexOf(z)!==-1)break;z=v()}}function C(D){var M=i.getTokenValue();return D?u(M):a(M),v(),!0}function y(){switch(i.getToken()){case 11:var D=i.getTokenValue(),M=Number(D);isNaN(M)&&(b(2),M=0),u(M);break;case 7:u(null);break;case 8:u(!0);break;case 9:u(!1);break;default:return!1}return v(),!0}function E(){return i.getToken()!==10?(b(3,[],[2,5]),!1):(C(!1),i.getToken()===6?(h(":"),v(),x()||b(4,[],[2,5])):b(5,[],[2,5]),!0)}function S(){o(),v();for(var D=!1;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(D||b(4,[],[]),h(","),v(),i.getToken()===2&&_)break}else D&&b(6,[],[]);E()||b(4,[],[2,5]),D=!0}return l(),i.getToken()!==2?b(7,[2],[]):v(),!0}function w(){c(),v();for(var D=!1;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(D||b(4,[],[]),h(","),v(),i.getToken()===4&&_)break}else D&&b(6,[],[]);x()||b(4,[],[4,5]),D=!0}return d(),i.getToken()!==4?b(8,[4],[]):v(),!0}function x(){switch(i.getToken()){case 3:return w();case 1:return S();case 10:return C(!0);default:return y()}}return v(),i.getToken()===17?t.allowEmptyContent?!0:(b(4,[],[]),!1):x()?(i.getToken()!==17&&b(9,[],[]),!0):(b(4,[],[]),!1)}var dve=sH,uve=lve,hve=OI;function fve(r){return typeof r=="boolean"}function oH(r,e){if(r.length<e.length)return!1;for(var t=0;t<e.length;t++)if(r[t]!==e[t])return!1;return!0}function gve(r,e){var t=r.length-e.length;return t>0?r.lastIndexOf(e)===t:t===0?r===e:!1}function pve(r){return oH(r,"(?i)")?new RegExp(r.substring(4),"i"):new RegExp(r)}var O4;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(O4||(O4={}));var Dy;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(Dy||(Dy={}));var Vo;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=Dy.MAX_VALUE),n===Number.MAX_VALUE&&(n=Dy.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return ce.objectLiteral(n)&&ce.uinteger(n.line)&&ce.uinteger(n.character)}r.is=t})(Vo||(Vo={}));var Wn;(function(r){function e(i,n,s,o){if(ce.uinteger(i)&&ce.uinteger(n)&&ce.uinteger(s)&&ce.uinteger(o))return{start:Vo.create(i,n),end:Vo.create(s,o)};if(Vo.is(i)&&Vo.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return ce.objectLiteral(n)&&Vo.is(n.start)&&Vo.is(n.end)}r.is=t})(Wn||(Wn={}));var MI;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Wn.is(n.range)&&(ce.string(n.uri)||ce.undefined(n.uri))}r.is=t})(MI||(MI={}));var M4;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Wn.is(n.targetRange)&&ce.string(n.targetUri)&&(Wn.is(n.targetSelectionRange)||ce.undefined(n.targetSelectionRange))&&(Wn.is(n.originSelectionRange)||ce.undefined(n.originSelectionRange))}r.is=t})(M4||(M4={}));var PI;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return ce.numberRange(n.red,0,1)&&ce.numberRange(n.green,0,1)&&ce.numberRange(n.blue,0,1)&&ce.numberRange(n.alpha,0,1)}r.is=t})(PI||(PI={}));var P4;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return Wn.is(n.range)&&PI.is(n.color)}r.is=t})(P4||(P4={}));var F4;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return ce.string(n.label)&&(ce.undefined(n.textEdit)||gc.is(n))&&(ce.undefined(n.additionalTextEdits)||ce.typedArray(n.additionalTextEdits,gc.is))}r.is=t})(F4||(F4={}));var fm;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(fm||(fm={}));var B4;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return ce.defined(s)&&(l.startCharacter=s),ce.defined(o)&&(l.endCharacter=o),ce.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return ce.uinteger(n.startLine)&&ce.uinteger(n.startLine)&&(ce.undefined(n.startCharacter)||ce.uinteger(n.startCharacter))&&(ce.undefined(n.endCharacter)||ce.uinteger(n.endCharacter))&&(ce.undefined(n.kind)||ce.string(n.kind))}r.is=t})(B4||(B4={}));var FI;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&MI.is(n.location)&&ce.string(n.message)}r.is=t})(FI||(FI={}));var sf;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(sf||(sf={}));var W4;(function(r){r.Unnecessary=1,r.Deprecated=2})(W4||(W4={}));var V4;(function(r){function e(t){var i=t;return i!=null&&ce.string(i.href)}r.is=e})(V4||(V4={}));var Ay;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return ce.defined(s)&&(c.severity=s),ce.defined(o)&&(c.code=o),ce.defined(a)&&(c.source=a),ce.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return ce.defined(s)&&Wn.is(s.range)&&ce.string(s.message)&&(ce.number(s.severity)||ce.undefined(s.severity))&&(ce.integer(s.code)||ce.string(s.code)||ce.undefined(s.code))&&(ce.undefined(s.codeDescription)||ce.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(ce.string(s.source)||ce.undefined(s.source))&&(ce.undefined(s.relatedInformation)||ce.typedArray(s.relatedInformation,FI.is))}r.is=t})(Ay||(Ay={}));var O_;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return ce.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.title)&&ce.string(n.command)}r.is=t})(O_||(O_={}));var gc;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return ce.objectLiteral(o)&&ce.string(o.newText)&&Wn.is(o.range)}r.is=n})(gc||(gc={}));var Tf;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&ce.objectLiteral(n)&&ce.string(n.label)&&(ce.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(ce.string(n.description)||n.description===void 0)}r.is=t})(Tf||(Tf={}));var Qn;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(Qn||(Qn={}));var Ul;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return gc.is(o)&&(Tf.is(o.annotationId)||Qn.is(o.annotationId))}r.is=n})(Ul||(Ul={}));var Ny;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Ry.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(Ny||(Ny={}));var M_;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&ce.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||ce.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ce.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Qn.is(n.annotationId))}r.is=t})(M_||(M_={}));var P_;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&ce.string(n.oldUri)&&ce.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||ce.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ce.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Qn.is(n.annotationId))}r.is=t})(P_||(P_={}));var F_;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&ce.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||ce.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||ce.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Qn.is(n.annotationId))}r.is=t})(F_||(F_={}));var BI;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return ce.string(n.kind)?M_.is(n)||P_.is(n)||F_.is(n):Ny.is(n)}))}r.is=e})(BI||(BI={}));var Fv=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=gc.insert(e,t):Qn.is(i)?(s=i,n=Ul.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=Ul.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=gc.replace(e,t):Qn.is(i)?(s=i,n=Ul.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=Ul.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=gc.del(e):Qn.is(t)?(n=t,i=Ul.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=Ul.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),H4=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(Qn.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new H4(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(Ny.is(i)){var n=new Fv(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new Fv(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(Ry.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new Fv(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new Fv(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new H4,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Tf.is(t)||Qn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=M_.create(e,i):(o=Qn.is(n)?n:this._changeAnnotations.manage(n),s=M_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Tf.is(i)||Qn.is(i)?s=i:n=i;var o,a;if(s===void 0?o=P_.create(e,t,n):(a=Qn.is(s)?s:this._changeAnnotations.manage(s),o=P_.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Tf.is(t)||Qn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=F_.create(e,i):(o=Qn.is(n)?n:this._changeAnnotations.manage(n),s=F_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var $4;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)}r.is=t})($4||($4={}));var U4;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&ce.integer(n.version)}r.is=t})(U4||(U4={}));var Ry;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&(n.version===null||ce.integer(n.version))}r.is=t})(Ry||(Ry={}));var z4;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&ce.string(n.languageId)&&ce.integer(n.version)&&ce.string(n.text)}r.is=t})(z4||(z4={}));var Iu;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(Iu||(Iu={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(Iu||(Iu={}));var WI;(function(r){function e(t){var i=t;return ce.objectLiteral(t)&&Iu.is(i.kind)&&ce.string(i.value)}r.is=e})(WI||(WI={}));var Xi;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(Xi||(Xi={}));var VI;(function(r){r.PlainText=1,r.Snippet=2})(VI||(VI={}));var j4;(function(r){r.Deprecated=1})(j4||(j4={}));var q4;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&ce.string(n.newText)&&Wn.is(n.insert)&&Wn.is(n.replace)}r.is=t})(q4||(q4={}));var G4;(function(r){r.asIs=1,r.adjustIndentation=2})(G4||(G4={}));var K4;(function(r){function e(t){return{label:t}}r.create=e})(K4||(K4={}));var Y4;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(Y4||(Y4={}));var Oy;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return ce.string(n)||ce.objectLiteral(n)&&ce.string(n.language)&&ce.string(n.value)}r.is=t})(Oy||(Oy={}));var Z4;(function(r){function e(t){var i=t;return!!i&&ce.objectLiteral(i)&&(WI.is(i.contents)||Oy.is(i.contents)||ce.typedArray(i.contents,Oy.is))&&(t.range===void 0||Wn.is(t.range))}r.is=e})(Z4||(Z4={}));var X4;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(X4||(X4={}));var Q4;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return ce.defined(i)&&(o.documentation=i),ce.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(Q4||(Q4={}));var J4;(function(r){r.Text=1,r.Read=2,r.Write=3})(J4||(J4={}));var e5;(function(r){function e(t,i){var n={range:t};return ce.number(i)&&(n.kind=i),n}r.create=e})(e5||(e5={}));var Qi;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(Qi||(Qi={}));var t5;(function(r){r.Deprecated=1})(t5||(t5={}));var i5;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(i5||(i5={}));var n5;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&ce.string(n.name)&&ce.number(n.kind)&&Wn.is(n.range)&&Wn.is(n.selectionRange)&&(n.detail===void 0||ce.string(n.detail))&&(n.deprecated===void 0||ce.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(n5||(n5={}));var r5;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(r5||(r5={}));var s5;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.typedArray(n.diagnostics,Ay.is)&&(n.only===void 0||ce.typedArray(n.only,ce.string))}r.is=t})(s5||(s5={}));var o5;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):O_.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&ce.string(n.title)&&(n.diagnostics===void 0||ce.typedArray(n.diagnostics,Ay.is))&&(n.kind===void 0||ce.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||O_.is(n.command))&&(n.isPreferred===void 0||ce.boolean(n.isPreferred))&&(n.edit===void 0||BI.is(n.edit))}r.is=t})(o5||(o5={}));var a5;(function(r){function e(i,n){var s={range:i};return ce.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return ce.defined(n)&&Wn.is(n.range)&&(ce.undefined(n.command)||O_.is(n.command))}r.is=t})(a5||(a5={}));var l5;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.uinteger(n.tabSize)&&ce.boolean(n.insertSpaces)}r.is=t})(l5||(l5={}));var c5;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Wn.is(n.range)&&(ce.undefined(n.target)||ce.string(n.target))}r.is=t})(c5||(c5={}));var d5;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&Wn.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(d5||(d5={}));var u5;(function(r){function e(s,o,a,l){return new mve(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(ce.defined(o)&&ce.string(o.uri)&&(ce.undefined(o.languageId)||ce.string(o.languageId))&&ce.uinteger(o.lineCount)&&ce.func(o.getText)&&ce.func(o.positionAt)&&ce.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,d=l.length-1;d>=0;d--){var u=l[d],h=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,h)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var d=0,u=0,h=0;d<l.length&&u<c.length;){var f=o(l[d],c[u]);f<=0?s[h++]=l[d++]:s[h++]=c[u++]}for(;d<l.length;)s[h++]=l[d++];for(;u<c.length;)s[h++]=c[u++];return s}})(u5||(u5={}));var mve=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` +`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` +`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return Vo.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return Vo.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),ce;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function d(f){return e.call(f)==="[object Function]"}r.func=d;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function h(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=h})(ce||(ce={}));var h5=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=aH(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),d=Math.max(o.end.line,0),u=this._lineOffsets,h=g5(s.text,!1,a);if(d-c===h.length)for(var f=0,g=h.length;f<g;f++)u[f+c+1]=h[f];else h.length<1e4?u.splice.apply(u,[c+1,d-c].concat(h)):this._lineOffsets=u=u.slice(0,c+1).concat(h,u.slice(d+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+h.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=g5(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),f5;(function(r){function e(n,s,o,a){return new h5(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof h5)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=HI(s.map(_ve),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],d=0,u=a;d<u.length;d++){var h=u[d],f=n.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),h.newText.length&&c.push(h.newText),l=n.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(f5||(f5={}));function HI(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);HI(i,e),HI(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function g5(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function aH(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function _ve(r){var e=aH(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var p5;(function(r){r[r.Undefined=0]="Undefined",r[r.EnumValueMismatch=1]="EnumValueMismatch",r[r.Deprecated=2]="Deprecated",r[r.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=258]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",r[r.InvalidUnicode=260]="InvalidUnicode",r[r.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",r[r.InvalidCharacter=262]="InvalidCharacter",r[r.PropertyExpected=513]="PropertyExpected",r[r.CommaExpected=514]="CommaExpected",r[r.ColonExpected=515]="ColonExpected",r[r.ValueExpected=516]="ValueExpected",r[r.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",r[r.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",r[r.TrailingComma=519]="TrailingComma",r[r.DuplicateKey=520]="DuplicateKey",r[r.CommentNotPermitted=521]="CommentNotPermitted",r[r.SchemaResolveError=768]="SchemaResolveError"})(p5||(p5={}));var m5;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[Iu.Markdown,Iu.PlainText],commitCharactersSupport:!0}}}}})(m5||(m5={}));function bve(r,e){var t;return e.length===0?t=r:t=r.replace(/\{(\d+)\}/g,function(i,n){var s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function vve(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return bve(e,t)}function gR(r){return vve}var eh=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),_p=gR();_p("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),_p("dateTimeFormatWarning","String is not a RFC3339 date-time."),_p("dateFormatWarning","String is not a RFC3339 date."),_p("timeFormatWarning","String is not a RFC3339 time."),_p("emailFormatWarning","String is not an e-mail address.");var th=function(){function r(e,t,i){i===void 0&&(i=0),this.offset=t,this.length=i,this.parent=e}return Object.defineProperty(r.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},r}();(function(r){eh(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="null",n.value=null,n}return e})(th);(function(r){eh(e,r);function e(t,i,n){var s=r.call(this,t,n)||this;return s.type="boolean",s.value=i,s}return e})(th);(function(r){eh(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="array",n.items=[],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),e})(th);(function(r){eh(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return e})(th);(function(r){eh(e,r);function e(t,i,n){var s=r.call(this,t,i,n)||this;return s.type="string",s.value="",s}return e})(th);(function(r){eh(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.type="property",s.colonOffset=-1,s.keyNode=n,s}return Object.defineProperty(e.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),e})(th);(function(r){eh(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),e})(th);function Cve(r){return fve(r)?r?{}:{not:{}}:r}var _5;(function(r){r[r.Key=0]="Key",r[r.Enum=1]="Enum"})(_5||(_5={}));(function(){function r(){}return Object.defineProperty(r.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),r.prototype.add=function(e){},r.prototype.merge=function(e){},r.prototype.include=function(e){return!0},r.prototype.newSub=function(){return this},r.instance=new r,r})();function wve(r){return hve(r)}var lH;lH=(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,d="",u=0,h=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(h===g-1||f===1))if(h!==g-1&&f===2){if(d.length<2||u!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var p=d.lastIndexOf("/");if(p!==d.length-1){p===-1?(d="",u=0):u=(d=d.slice(0,p)).length-1-d.lastIndexOf("/"),h=g,f=0;continue}}else if(d.length===2||d.length===1){d="",u=0,h=g,f=0;continue}}l&&(d.length>0?d+="/..":d="..",u=2)}else d.length>0?d+="/"+a.slice(h+1,g):d=a.slice(h+1,g),u=g-h-1;h=g,f=0}else c===46&&f!==-1?++f:f=-1}return d}var o={resolve:function(){for(var a,l="",c=!1,d=arguments.length-1;d>=-1&&!c;d--){var u;d>=0?u=arguments[d]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var d=a.length,u=d-c,h=1;h<l.length&&l.charCodeAt(h)===47;++h);for(var f=l.length-h,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(h+_)===47)return l.slice(h+_+1);if(_===0)return l.slice(h+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(h+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=d;++_)_!==d&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(h+p):(h+=p,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,d=-1,u=!0,h=a.length-1;h>=1;--h)if((l=a.charCodeAt(h))===47){if(!u){d=h;break}}else u=!1;return d===-1?c?"/":".":c&&d===1?"//":a.slice(0,d)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,d=0,u=-1,h=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!h){d=c+1;break}}else g===-1&&(h=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return d===u?u=g:u===-1&&(u=a.length),a.slice(d,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!h){d=c+1;break}}else u===-1&&(h=!1,u=c+1);return u===-1?"":a.slice(d,u)},extname:function(a){n(a);for(var l=-1,c=0,d=-1,u=!0,h=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)d===-1&&(u=!1,d=f+1),g===46?l===-1?l=f:h!==1&&(h=1):l!==-1&&(h=-1);else if(!u){c=f+1;break}}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===c+1?"":a.slice(l,d)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var d=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return d?d===c.root?d+u:d+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,d=a.charCodeAt(0),u=d===47;u?(l.root="/",c=1):c=0;for(var h=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((d=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),d===46?h===-1?h=_:v!==1&&(v=1):h!==-1&&(v=-1);else if(!p){f=_+1;break}return h===-1||g===-1||v===0||v===1&&h===g-1&&h===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,h),l.base=a.slice(1,g)):(l.name=a.slice(f,h),l.base=a.slice(f,g)),l.ext=a.slice(h,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>z}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,d=(l=function(N,L){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,W){O.__proto__=W}||function(O,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(O[ge]=W[ge])})(N,L)},function(N,L){function O(){this.constructor=N}l(N,L),N.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}),u=/^\w[\w\d+.-]*$/,h=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function N(L,O,W,ge,se,ae){ae===void 0&&(ae=!1),typeof L=="object"?(this.scheme=L.scheme||g,this.authority=L.authority||g,this.path=L.path||g,this.query=L.query||g,this.fragment=L.fragment||g):(this.scheme=function(Ce,Le){return Ce||Le?Ce:"file"}(L,ae),this.authority=O||g,this.path=function(Ce,Le){switch(Ce){case"https":case"http":case"file":Le?Le[0]!==p&&(Le=p+Le):Le=p}return Le}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(Ce,Le){if(!Ce.scheme&&Le)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+Ce.authority+'", path: "'+Ce.path+'", query: "'+Ce.query+'", fragment: "'+Ce.fragment+'"}');if(Ce.scheme&&!u.test(Ce.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(Ce.path){if(Ce.authority){if(!h.test(Ce.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(f.test(Ce.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return N.isUri=function(L){return L instanceof N||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="function"&&typeof L.with=="function"&&typeof L.toString=="function"},Object.defineProperty(N.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),N.prototype.with=function(L){if(!L)return this;var O=L.scheme,W=L.authority,ge=L.path,se=L.query,ae=L.fragment;return O===void 0?O=this.scheme:O===null&&(O=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),O===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(O,W,ge,se,ae)},N.parse=function(L,O){O===void 0&&(O=!1);var W=_.exec(L);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),O):new C(g,g,g,g,g)},N.file=function(L){var O=g;if(o&&(L=L.replace(/\\/g,p)),L[0]===p&&L[1]===p){var W=L.indexOf(p,2);W===-1?(O=L.substring(2),L=p):(O=L.substring(2,W),L=L.substring(W)||p)}return new C("file",O,L,g,g)},N.from=function(L){return new C(L.scheme,L.authority,L.path,L.query,L.fragment)},N.prototype.toString=function(L){return L===void 0&&(L=!1),x(this,L)},N.prototype.toJSON=function(){return this},N.revive=function(L){if(L){if(L instanceof N)return L;var O=new C(L);return O._formatted=L.external,O._fsPath=L._sep===b?L.fsPath:null,O}return L},N}(),b=o?1:void 0,C=function(N){function L(){var O=N!==null&&N.apply(this,arguments)||this;return O._formatted=null,O._fsPath=null,O}return d(L,N),Object.defineProperty(L.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),L.prototype.toString=function(O){return O===void 0&&(O=!1),O?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)},L.prototype.toJSON=function(){var O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=b),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O},L}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function E(N,L){for(var O=void 0,W=-1,ge=0;ge<N.length;ge++){var se=N.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||L&&se===47)W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O!==void 0&&(O+=N.charAt(ge));else{O===void 0&&(O=N.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O+=ae):W===-1&&(W=ge)}}return W!==-1&&(O+=encodeURIComponent(N.substring(W))),O!==void 0?O:N}function S(N){for(var L=void 0,O=0;O<N.length;O++){var W=N.charCodeAt(O);W===35||W===63?(L===void 0&&(L=N.substr(0,O)),L+=y[W]):L!==void 0&&(L+=N[O])}return L!==void 0?L:N}function w(N,L){var O;return O=N.authority&&N.path.length>1&&N.scheme==="file"?"//"+N.authority+N.path:N.path.charCodeAt(0)===47&&(N.path.charCodeAt(1)>=65&&N.path.charCodeAt(1)<=90||N.path.charCodeAt(1)>=97&&N.path.charCodeAt(1)<=122)&&N.path.charCodeAt(2)===58?L?N.path.substr(1):N.path[1].toLowerCase()+N.path.substr(2):N.path,o&&(O=O.replace(/\//g,"\\")),O}function x(N,L){var O=L?S:E,W="",ge=N.scheme,se=N.authority,ae=N.path,Ce=N.query,Le=N.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var bi=se.substr(0,ct);se=se.substr(ct+1),(ct=bi.indexOf(":"))===-1?W+=O(bi,!1):(W+=O(bi.substr(0,ct),!1),W+=":",W+=O(bi.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=O(se,!1):(W+=O(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Kt=ae.charCodeAt(1))>=65&&Kt<=90&&(ae="/"+String.fromCharCode(Kt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Kt;(Kt=ae.charCodeAt(0))>=65&&Kt<=90&&(ae=String.fromCharCode(Kt+32)+":"+ae.substr(2))}W+=O(ae,!0)}return Ce&&(W+="?",W+=O(Ce,!1)),Le&&(W+="#",W+=L?Le:E(Le,!1)),W}function D(N){try{return decodeURIComponent(N)}catch{return N.length>3?N.substr(0,3)+D(N.substr(3)):N}}var M=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(N){return N.match(M)?N.replace(M,function(L){return D(L)}):N}var z,j=s(470),re=function(){for(var N=0,L=0,O=arguments.length;L<O;L++)N+=arguments[L].length;var W=Array(N),ge=0;for(L=0;L<O;L++)for(var se=arguments[L],ae=0,Ce=se.length;ae<Ce;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(N){N.joinPath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];return L.with({path:te.join.apply(te,re([L.path],O))})},N.resolvePath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];var ge=L.path||"/";return L.with({path:te.resolve.apply(te,re([ge],O))})},N.dirname=function(L){var O=te.dirname(L.path);return O.length===1&&O.charCodeAt(0)===46?L:L.with({path:O})},N.basename=function(L){return te.basename(L.path)},N.extname=function(L){return te.extname(L.path)}})(z||(z={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();const{URI:BS,Utils:yxe}=lH;function yve(r,e){if(typeof r!="string")throw new TypeError("Expected a string");for(var t=String(r),i="",n=e?!!e.extended:!1,s=e?!!e.globstar:!1,o=!1,a=e&&typeof e.flags=="string"?e.flags:"",l,c=0,d=t.length;c<d;c++)switch(l=t[c],l){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+l;break;case"?":if(n){i+=".";break}case"[":case"]":if(n){i+=l;break}case"{":if(n){o=!0,i+="(";break}case"}":if(n){o=!1,i+=")";break}case",":if(o){i+="|";break}i+="\\"+l;break;case"*":for(var u=t[c-1],h=1;t[c+1]==="*";)h++,c++;var f=t[c+1];if(!s)i+=".*";else{var g=h>1&&(u==="/"||u===void 0||u==="{"||u===",")&&(f==="/"||f===void 0||f===","||f==="}");g?(f==="/"?c++:u==="/"&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)"}break;default:i+=l}return(!a||!~a.indexOf("g"))&&(i="^"+i+"$"),new RegExp(i,a)}var Al=gR(),Sve="!",xve="/",Eve=function(){function r(e,t){this.globWrappers=[];try{for(var i=0,n=e;i<n.length;i++){var s=n[i],o=s[0]!==Sve;o||(s=s.substring(1)),s.length>0&&(s[0]===xve&&(s=s.substring(1)),this.globWrappers.push({regexp:yve("**/"+s,{extended:!0,globstar:!0}),include:o}))}this.uris=t}catch{this.globWrappers.length=0,this.uris=[]}}return r.prototype.matchesPattern=function(e){for(var t=!1,i=0,n=this.globWrappers;i<n.length;i++){var s=n[i],o=s.regexp,a=s.include;o.test(e)&&(t=a)}return t},r.prototype.getURIs=function(){return this.uris},r}(),kve=function(){function r(e,t,i){this.service=e,this.url=t,this.dependencies={},i&&(this.unresolvedSchema=this.service.promise.resolve(new Uh(i)))}return r.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},r.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)})),this.resolvedSchema},r.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},r}(),Uh=function(){function r(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return r}(),b5=function(){function r(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return r.prototype.getSection=function(e){var t=this.getSectionRecursive(e,this.schema);if(t)return Cve(t)},r.prototype.getSectionRecursive=function(e,t){if(!t||typeof t=="boolean"||e.length===0)return t;var i=e.shift();if(t.properties&&typeof t.properties[i])return this.getSectionRecursive(e,t.properties[i]);if(t.patternProperties)for(var n=0,s=Object.keys(t.patternProperties);n<s.length;n++){var o=s[n],a=pve(o);if(a.test(i))return this.getSectionRecursive(e,t.patternProperties[o])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(e,t.additionalProperties);if(i.match("[0-9]+")){if(Array.isArray(t.items)){var l=parseInt(i,10);if(!isNaN(l)&&t.items[l])return this.getSectionRecursive(e,t.items[l])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},r}();(function(){function r(e,t,i){this.contextService=t,this.requestService=e,this.promiseConstructor=i||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return r.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter(function(t){var i=BS.parse(t).scheme;return i!=="schemaservice"&&(!e||e(i))})},Object.defineProperty(r.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},r.prototype.onResourceChange=function(e){var t=this,i=!1;e=Nl(e);for(var n=[e],s=Object.keys(this.schemasById).map(function(c){return t.schemasById[c]});n.length;)for(var o=n.pop(),a=0;a<s.length;a++){var l=s[a];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),s[a]=void 0,i=!0)}return i},r.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var i in t){var n=Nl(i);this.contributionSchemas[n]=this.addSchemaHandle(n,t[i])}}if(Array.isArray(e.schemaAssociations))for(var s=e.schemaAssociations,o=0,a=s;o<a.length;o++){var l=a[o],c=l.uris.map(Nl),d=this.addFilePatternAssociation(l.pattern,c);this.contributionAssociations.push(d)}},r.prototype.addSchemaHandle=function(e,t){var i=new kve(this,e,t);return this.schemasById[e]=i,i},r.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},r.prototype.addFilePatternAssociation=function(e,t){var i=new Eve(e,t);return this.filePatternAssociations.push(i),i},r.prototype.registerExternalSchema=function(e,t,i){var n=Nl(e);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t&&this.addFilePatternAssociation(t,[e]),i?this.addSchemaHandle(n,i):this.getOrAddSchemaHandle(n)},r.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t=0,i=this.contributionAssociations;t<i.length;t++){var n=i[t];this.filePatternAssociations.push(n)}},r.prototype.getResolvedSchema=function(e){var t=Nl(e),i=this.schemasById[t];return i?i.getResolvedSchema():this.promise.resolve(void 0)},r.prototype.loadSchema=function(e){if(!this.requestService){var t=Al("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",Bv(e));return this.promise.resolve(new Uh({},[t]))}return this.requestService(e).then(function(i){if(!i){var n=Al("json.schema.nocontent","Unable to load schema from '{0}': No content.",Bv(e));return new Uh({},[n])}var s={},o=[];s=uve(i,o);var a=o.length?[Al("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",Bv(e),o[0].offset)]:[];return new Uh(s,a)},function(i){var n=i.toString(),s=i.toString().split("Error: ");return s.length>1&&(n=s[1]),gve(n,".")&&(n=n.substr(0,n.length-1)),new Uh({},[Al("json.schema.nocontent","Unable to load schema from '{0}': {1}.",Bv(e),n)])})},r.prototype.resolveSchemaContent=function(e,t,i){var n=this,s=e.errors.slice(0),o=e.schema;if(o.$schema){var a=Nl(o.$schema);if(a==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new b5({},[Al("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));a==="https://json-schema.org/draft/2019-09/schema"&&s.push(Al("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,c=function(f,g){if(!g)return f;var p=f;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(_){return _=_.replace(/~1/g,"/").replace(/~0/g,"~"),p=p[_],!p}),p},d=function(f,g,p,_){var v=_?decodeURIComponent(_):void 0,b=c(g,v);if(b)for(var C in b)b.hasOwnProperty(C)&&!f.hasOwnProperty(C)&&(f[C]=b[C]);else s.push(Al("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",v,p))},u=function(f,g,p,_,v){l&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,_)),g=Nl(g);var b=n.getOrAddSchemaHandle(g);return b.getUnresolvedSchema().then(function(C){if(v[g]=!0,C.errors.length){var y=p?g+"#"+p:g;s.push(Al("json.schema.problemloadingref","Problems loading reference '{0}': {1}",y,C.errors[0]))}return d(f,C.schema,g,p),h(f,C.schema,g,b.dependencies)})},h=function(f,g,p,_){if(!f||typeof f!="object")return Promise.resolve(null);for(var v=[f],b=[],C=[],y=function(){for(var D=[],M=0;M<arguments.length;M++)D[M]=arguments[M];for(var B=0,z=D;B<z.length;B++){var j=z[B];typeof j=="object"&&v.push(j)}},E=function(){for(var D=[],M=0;M<arguments.length;M++)D[M]=arguments[M];for(var B=0,z=D;B<z.length;B++){var j=z[B];if(typeof j=="object")for(var re in j){var te=re,N=j[te];typeof N=="object"&&v.push(N)}}},S=function(){for(var D=[],M=0;M<arguments.length;M++)D[M]=arguments[M];for(var B=0,z=D;B<z.length;B++){var j=z[B];if(Array.isArray(j))for(var re=0,te=j;re<te.length;re++){var N=te[re];typeof N=="object"&&v.push(N)}}},w=function(D){for(var M=[];D.$ref;){var B=D.$ref,z=B.split("#",2);if(delete D.$ref,z[0].length>0){C.push(u(D,z[0],z[1],p,_));return}else M.indexOf(B)===-1&&(d(D,g,p,z[1]),M.push(B))}y(D.items,D.additionalItems,D.additionalProperties,D.not,D.contains,D.propertyNames,D.if,D.then,D.else),E(D.definitions,D.properties,D.patternProperties,D.dependencies),S(D.anyOf,D.allOf,D.oneOf,D.items)};v.length;){var x=v.pop();b.indexOf(x)>=0||(b.push(x),w(x))}return n.promise.all(C)};return h(o,o,t,i).then(function(f){return new b5(o,s)})},r.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&t.root.type==="object"){var i=t.root.properties.filter(function(v){return v.keyNode.value==="$schema"&&v.valueNode&&v.valueNode.type==="string"});if(i.length>0){var n=i[0].valueNode;if(n&&n.type==="string"){var s=wve(n);if(s&&oH(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,e)),s){var o=Nl(s);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var a=Object.create(null),l=[],c=Tve(e),d=0,u=this.filePatternAssociations;d<u.length;d++){var h=u[d];if(h.matchesPattern(c))for(var f=0,g=h.getURIs();f<g.length;f++){var p=g[f];a[p]||(l.push(p),a[p]=!0)}}var _=l.length>0?this.createCombinedSchema(e,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:_},_},r.prototype.createCombinedSchema=function(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var i="schemaservice://combinedSchema/"+encodeURIComponent(e),n={allOf:t.map(function(s){return{$ref:s}})};return this.addSchemaHandle(i,n)},r.prototype.getMatchingSchemas=function(e,t,i){if(i){var n=i.id||"schemaservice://untitled/matchingSchemas/"+Lve++;return this.resolveSchemaContent(new Uh(i),n,{}).then(function(s){return t.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted})})}return this.getSchemaForResource(e.uri,t).then(function(s){return s?t.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted}):[]})},r})();var Lve=0;function Nl(r){try{return BS.parse(r).toString()}catch{return r}}function Tve(r){try{return BS.parse(r).with({fragment:null,query:null}).toString()}catch{return r}}function Bv(r){try{var e=BS.parse(r);if(e.scheme==="file")return e.fsPath}catch{}return r}var st=gR(),v5={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:st("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:st("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},Ive={id:st("schema.json.id","A unique identifier for the schema."),$schema:st("schema.json.$schema","The schema to verify this document against."),title:st("schema.json.title","A descriptive title of the element."),description:st("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:st("schema.json.default","A default value. Used by suggestions."),multipleOf:st("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:st("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:st("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:st("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:st("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:st("schema.json.maxLength","The maximum length of a string."),minLength:st("schema.json.minLength","The minimum length of a string."),pattern:st("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:st("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:st("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:st("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:st("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:st("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:st("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:st("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:st("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:st("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:st("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:st("schema.json.properties","A map of property names to schemas for each property."),patternProperties:st("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:st("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:st("schema.json.enum","The set of literal values that are valid."),type:st("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:st("schema.json.format","Describes the format expected for the value."),allOf:st("schema.json.allOf","An array of schemas, all of which must match."),anyOf:st("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:st("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:st("schema.json.not","A schema which must not match."),$id:st("schema.json.$id","A unique identifier for the schema."),$ref:st("schema.json.$ref","Reference a definition hosted on any location."),$comment:st("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:st("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:st("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:st("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:st("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:st("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:st("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:st("schema.json.contentEncoding","Describes the content encoding of a string property."),if:st("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:st("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:st("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var Dve in v5.schemas){var EE=v5.schemas[Dve];for(var bp in EE.properties){var kE=EE.properties[bp];typeof kE=="boolean"&&(kE=EE.properties[bp]={});var C5=Ive[bp];C5?kE.description=C5:console.log(bp+": localize('schema.json."+bp+`', "")`)}}var Ave=function(){function r(e,t,i){var n=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var s=function(a){var l=a.getModeId();if(l===n._languageId){var c;n._listener[a.uri.toString()]=a.onDidChangeContent(function(){clearTimeout(c),c=setTimeout(function(){return n._doValidate(a.uri,l)},500)}),n._doValidate(a.uri,l)}},o=function(a){Ui.setModelMarkers(a,n._languageId,[]);var l=a.uri.toString(),c=n._listener[l];c&&(c.dispose(),delete n._listener[l])};this._disposables.push(Ui.onDidCreateModel(s)),this._disposables.push(Ui.onWillDisposeModel(function(a){o(a),n._resetSchema(a.uri)})),this._disposables.push(Ui.onDidChangeModelLanguage(function(a){o(a.model),s(a.model),n._resetSchema(a.model.uri)})),this._disposables.push(i.onDidChange(function(a){Ui.getModels().forEach(function(l){l.getModeId()===n._languageId&&(o(l),s(l))})})),this._disposables.push({dispose:function(){Ui.getModels().forEach(o);for(var a in n._listener)n._listener[a].dispose()}}),Ui.getModels().forEach(s)}return r.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},r.prototype._resetSchema=function(e){this._worker().then(function(t){t.resetSchema(e.toString())})},r.prototype._doValidate=function(e,t){this._worker(e).then(function(i){return i.doValidation(e.toString()).then(function(n){var s=n.map(function(a){return Rve(e,a)}),o=Ui.getModel(e);o&&o.getModeId()===t&&Ui.setModelMarkers(o,t,s)})}).then(void 0,function(i){console.error(i)})},r}();function Nve(r){switch(r){case sf.Error:return Qs.Error;case sf.Warning:return Qs.Warning;case sf.Information:return Qs.Info;case sf.Hint:return Qs.Hint;default:return Qs.Info}}function Rve(r,e){var t=typeof e.code=="number"?String(e.code):e.code;return{severity:Nve(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function pR(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function cH(r){if(!!r)return{start:{line:r.startLineNumber-1,character:r.startColumn-1},end:{line:r.endLineNumber-1,character:r.endColumn-1}}}function al(r){if(!!r)return new Ku(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function Ove(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function Mve(r){var e=we.CompletionItemKind;switch(r){case Xi.Text:return e.Text;case Xi.Method:return e.Method;case Xi.Function:return e.Function;case Xi.Constructor:return e.Constructor;case Xi.Field:return e.Field;case Xi.Variable:return e.Variable;case Xi.Class:return e.Class;case Xi.Interface:return e.Interface;case Xi.Module:return e.Module;case Xi.Property:return e.Property;case Xi.Unit:return e.Unit;case Xi.Value:return e.Value;case Xi.Enum:return e.Enum;case Xi.Keyword:return e.Keyword;case Xi.Snippet:return e.Snippet;case Xi.Color:return e.Color;case Xi.File:return e.File;case Xi.Reference:return e.Reference}return e.Property}function B_(r){if(!!r)return{range:al(r.range),text:r.newText}}function Pve(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var Fve=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return[" ",":",'"']},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),pR(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new Ku(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(d){var u={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,detail:d.detail,command:Pve(d.command),range:l,kind:Mve(d.kind)};return d.textEdit&&(Ove(d.textEdit)?u.range={insert:al(d.textEdit.insert),replace:al(d.textEdit.replace)}:u.range=al(d.textEdit.range),u.insertText=d.textEdit.newText),d.additionalTextEdits&&(u.additionalTextEdits=d.additionalTextEdits.map(B_)),d.insertTextFormat===VI.Snippet&&(u.insertTextRules=we.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function Bve(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function w5(r){return typeof r=="string"?{value:r}:Bve(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` +`+r.value+"\n```\n"}}function Wve(r){if(!!r)return Array.isArray(r)?r.map(w5):[w5(r)]}var Vve=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),pR(t))}).then(function(s){if(!!s)return{range:al(s.range),contents:Wve(s.contents)}})},r}();function Hve(r){var e=we.SymbolKind;switch(r){case Qi.File:return e.Array;case Qi.Module:return e.Module;case Qi.Namespace:return e.Namespace;case Qi.Package:return e.Package;case Qi.Class:return e.Class;case Qi.Method:return e.Method;case Qi.Property:return e.Property;case Qi.Field:return e.Field;case Qi.Constructor:return e.Constructor;case Qi.Enum:return e.Enum;case Qi.Interface:return e.Interface;case Qi.Function:return e.Function;case Qi.Variable:return e.Variable;case Qi.Constant:return e.Constant;case Qi.String:return e.String;case Qi.Number:return e.Number;case Qi.Boolean:return e.Boolean;case Qi.Array:return e.Array}return e.Function}var $ve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:Hve(s.kind),range:al(s.location.range),selectionRange:al(s.location.range),tags:[]}})})},r}();function dH(r){return{tabSize:r.tabSize,insertSpaces:r.insertSpaces}}var Uve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentFormattingEdits=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.format(n.toString(),null,dH(t)).then(function(o){if(!(!o||o.length===0))return o.map(B_)})})},r}(),zve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentRangeFormattingEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.format(s.toString(),cH(t),dH(i)).then(function(a){if(!(!a||a.length===0))return a.map(B_)})})},r}(),jve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentColors=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentColors(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{color:s.color,range:al(s.range)}})})},r.prototype.provideColorPresentations=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getColorPresentations(n.toString(),t.color,cH(t.range))}).then(function(s){if(!!s)return s.map(function(o){var a={label:o.label};return o.textEdit&&(a.textEdit=B_(o.textEdit)),o.additionalTextEdits&&(a.additionalTextEdits=o.additionalTextEdits.map(B_)),a})})},r}(),qve=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=Gve(o.kind)),a})})},r}();function Gve(r){switch(r){case fm.Comment:return we.FoldingRangeKind.Comment;case fm.Imports:return we.FoldingRangeKind.Imports;case fm.Region:return we.FoldingRangeKind.Region}}var Kve=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(pR))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:al(o.range)}),o=o.parent;return a})})},r}();function Yve(r){return{getInitialState:function(){return new uH(null,null,!1,null)},tokenize:function(e,t,i,n){return sCe(r,e,t,i)}}}var y5="delimiter.bracket.json",S5="delimiter.array.json",Zve="delimiter.colon.json",Xve="delimiter.comma.json",Qve="keyword.json",Jve="keyword.json",eCe="string.value.json",tCe="number.json",iCe="string.key.json",nCe="comment.block.json",rCe="comment.line.json",Ap=function(){function r(e,t){this.parent=e,this.type=t}return r.pop=function(e){return e?e.parent:null},r.push=function(e,t){return new r(e,t)},r.equals=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0},r}(),uH=function(){function r(e,t,i,n){this._state=e,this.scanError=t,this.lastWasColon=i,this.parents=n}return r.prototype.clone=function(){return new r(this._state,this.scanError,this.lastWasColon,this.parents)},r.prototype.equals=function(e){return e===this?!0:!e||!(e instanceof r)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&Ap.equals(this.parents,e.parents)},r.prototype.getStateData=function(){return this._state},r.prototype.setStateData=function(e){this._state=e},r}();function sCe(r,e,t,i,n){i===void 0&&(i=0);var s=0,o=!1;switch(t.scanError){case 2:e='"'+e,s=1;break;case 1:e="/*"+e,s=2;break}for(var a=dve(e),l=t.lastWasColon,c=t.parents,d={tokens:[],endState:t.clone()};;){var u=i+a.getPosition(),h="",f=a.scan();if(f===17)break;if(u===i+a.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+e.substr(a.getPosition(),3));switch(o&&(u-=s),o=s>0,f){case 1:c=Ap.push(c,0),h=y5,l=!1;break;case 2:c=Ap.pop(c),h=y5,l=!1;break;case 3:c=Ap.push(c,1),h=S5,l=!1;break;case 4:c=Ap.pop(c),h=S5,l=!1;break;case 6:h=Zve,l=!0;break;case 5:h=Xve,l=!1;break;case 8:case 9:h=Qve,l=!1;break;case 7:h=Jve,l=!1;break;case 10:var g=c?c.type:0,p=g===1;h=l||p?eCe:iCe,l=!1;break;case 11:h=tCe,l=!1;break}if(r)switch(f){case 12:h=rCe;break;case 13:h=nCe;break}d.endState=new uH(t.getStateData(),a.getTokenError(),l,c),d.tokens.push({startIndex:u,scopes:h})}return d}function oCe(r){var e=[],t=[],i=new ave(r);e.push(i);var n=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i.getLanguageServiceWorker.apply(i,a)};function s(){var a=r.languageId,l=r.modeConfiguration;hH(t),l.documentFormattingEdits&&t.push(we.registerDocumentFormattingEditProvider(a,new Uve(n))),l.documentRangeFormattingEdits&&t.push(we.registerDocumentRangeFormattingEditProvider(a,new zve(n))),l.completionItems&&t.push(we.registerCompletionItemProvider(a,new Fve(n))),l.hovers&&t.push(we.registerHoverProvider(a,new Vve(n))),l.documentSymbols&&t.push(we.registerDocumentSymbolProvider(a,new $ve(n))),l.tokens&&t.push(we.setTokensProvider(a,Yve(!0))),l.colors&&t.push(we.registerColorProvider(a,new jve(n))),l.foldingRanges&&t.push(we.registerFoldingRangeProvider(a,new qve(n))),l.diagnostics&&t.push(new Ave(a,n,r)),l.selectionRanges&&t.push(we.registerSelectionRangeProvider(a,new Kve(n)))}s(),e.push(we.setLanguageConfiguration(r.languageId,aCe));var o=r.modeConfiguration;return r.onDidChange(function(a){a.modeConfiguration!==o&&(o=a.modeConfiguration,s())}),e.push(x5(t)),x5(e)}function x5(r){return{dispose:function(){return hH(r)}}}function hH(r){for(;r.length;)r.pop().dispose()}var aCe={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]},lCe=Object.freeze(Object.defineProperty({__proto__:null,setupMode:oCe},Symbol.toStringTag,{value:"Module"})),cCe=2*60*1e3,fH=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>cCe&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=Ui.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){if(e._worker)return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}(),E5;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(E5||(E5={}));var My;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(My||(My={}));var Ho;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=My.MAX_VALUE),n===Number.MAX_VALUE&&(n=My.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return de.objectLiteral(n)&&de.uinteger(n.line)&&de.uinteger(n.character)}r.is=t})(Ho||(Ho={}));var Vn;(function(r){function e(i,n,s,o){if(de.uinteger(i)&&de.uinteger(n)&&de.uinteger(s)&&de.uinteger(o))return{start:Ho.create(i,n),end:Ho.create(s,o)};if(Ho.is(i)&&Ho.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return de.objectLiteral(n)&&Ho.is(n.start)&&Ho.is(n.end)}r.is=t})(Vn||(Vn={}));var $I;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&Vn.is(n.range)&&(de.string(n.uri)||de.undefined(n.uri))}r.is=t})($I||($I={}));var k5;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return de.defined(n)&&Vn.is(n.targetRange)&&de.string(n.targetUri)&&(Vn.is(n.targetSelectionRange)||de.undefined(n.targetSelectionRange))&&(Vn.is(n.originSelectionRange)||de.undefined(n.originSelectionRange))}r.is=t})(k5||(k5={}));var UI;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return de.numberRange(n.red,0,1)&&de.numberRange(n.green,0,1)&&de.numberRange(n.blue,0,1)&&de.numberRange(n.alpha,0,1)}r.is=t})(UI||(UI={}));var L5;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return Vn.is(n.range)&&UI.is(n.color)}r.is=t})(L5||(L5={}));var T5;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return de.string(n.label)&&(de.undefined(n.textEdit)||pc.is(n))&&(de.undefined(n.additionalTextEdits)||de.typedArray(n.additionalTextEdits,pc.is))}r.is=t})(T5||(T5={}));var gm;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(gm||(gm={}));var I5;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return de.defined(s)&&(l.startCharacter=s),de.defined(o)&&(l.endCharacter=o),de.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return de.uinteger(n.startLine)&&de.uinteger(n.startLine)&&(de.undefined(n.startCharacter)||de.uinteger(n.startCharacter))&&(de.undefined(n.endCharacter)||de.uinteger(n.endCharacter))&&(de.undefined(n.kind)||de.string(n.kind))}r.is=t})(I5||(I5={}));var zI;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&$I.is(n.location)&&de.string(n.message)}r.is=t})(zI||(zI={}));var D5;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(D5||(D5={}));var A5;(function(r){r.Unnecessary=1,r.Deprecated=2})(A5||(A5={}));var N5;(function(r){function e(t){var i=t;return i!=null&&de.string(i.href)}r.is=e})(N5||(N5={}));var Py;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return de.defined(s)&&(c.severity=s),de.defined(o)&&(c.code=o),de.defined(a)&&(c.source=a),de.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return de.defined(s)&&Vn.is(s.range)&&de.string(s.message)&&(de.number(s.severity)||de.undefined(s.severity))&&(de.integer(s.code)||de.string(s.code)||de.undefined(s.code))&&(de.undefined(s.codeDescription)||de.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(de.string(s.source)||de.undefined(s.source))&&(de.undefined(s.relatedInformation)||de.typedArray(s.relatedInformation,zI.is))}r.is=t})(Py||(Py={}));var W_;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return de.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return de.defined(n)&&de.string(n.title)&&de.string(n.command)}r.is=t})(W_||(W_={}));var pc;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return de.objectLiteral(o)&&de.string(o.newText)&&Vn.is(o.range)}r.is=n})(pc||(pc={}));var If;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&de.objectLiteral(n)&&de.string(n.label)&&(de.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(de.string(n.description)||n.description===void 0)}r.is=t})(If||(If={}));var Jn;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(Jn||(Jn={}));var zl;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return pc.is(o)&&(If.is(o.annotationId)||Jn.is(o.annotationId))}r.is=n})(zl||(zl={}));var Fy;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&By.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(Fy||(Fy={}));var V_;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&de.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||de.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||de.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Jn.is(n.annotationId))}r.is=t})(V_||(V_={}));var H_;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&de.string(n.oldUri)&&de.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||de.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||de.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||Jn.is(n.annotationId))}r.is=t})(H_||(H_={}));var $_;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&de.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||de.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||de.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||Jn.is(n.annotationId))}r.is=t})($_||($_={}));var jI;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return de.string(n.kind)?V_.is(n)||H_.is(n)||$_.is(n):Fy.is(n)}))}r.is=e})(jI||(jI={}));var Wv=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=pc.insert(e,t):Jn.is(i)?(s=i,n=zl.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=zl.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=pc.replace(e,t):Jn.is(i)?(s=i,n=zl.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=zl.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=pc.del(e):Jn.is(t)?(n=t,i=zl.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=zl.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),R5=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(Jn.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new R5(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(Fy.is(i)){var n=new Wv(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new Wv(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(By.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new Wv(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new Wv(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new R5,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;If.is(t)||Jn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=V_.create(e,i):(o=Jn.is(n)?n:this._changeAnnotations.manage(n),s=V_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;If.is(i)||Jn.is(i)?s=i:n=i;var o,a;if(s===void 0?o=H_.create(e,t,n):(a=Jn.is(s)?s:this._changeAnnotations.manage(s),o=H_.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;If.is(t)||Jn.is(t)?n=t:i=t;var s,o;if(n===void 0?s=$_.create(e,i):(o=Jn.is(n)?n:this._changeAnnotations.manage(n),s=$_.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var O5;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return de.defined(n)&&de.string(n.uri)}r.is=t})(O5||(O5={}));var M5;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&de.string(n.uri)&&de.integer(n.version)}r.is=t})(M5||(M5={}));var By;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&de.string(n.uri)&&(n.version===null||de.integer(n.version))}r.is=t})(By||(By={}));var P5;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return de.defined(n)&&de.string(n.uri)&&de.string(n.languageId)&&de.integer(n.version)&&de.string(n.text)}r.is=t})(P5||(P5={}));var el;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(el||(el={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(el||(el={}));var qI;(function(r){function e(t){var i=t;return de.objectLiteral(t)&&el.is(i.kind)&&de.string(i.value)}r.is=e})(qI||(qI={}));var Ji;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(Ji||(Ji={}));var GI;(function(r){r.PlainText=1,r.Snippet=2})(GI||(GI={}));var F5;(function(r){r.Deprecated=1})(F5||(F5={}));var B5;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&de.string(n.newText)&&Vn.is(n.insert)&&Vn.is(n.replace)}r.is=t})(B5||(B5={}));var W5;(function(r){r.asIs=1,r.adjustIndentation=2})(W5||(W5={}));var V5;(function(r){function e(t){return{label:t}}r.create=e})(V5||(V5={}));var H5;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(H5||(H5={}));var Wy;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return de.string(n)||de.objectLiteral(n)&&de.string(n.language)&&de.string(n.value)}r.is=t})(Wy||(Wy={}));var $5;(function(r){function e(t){var i=t;return!!i&&de.objectLiteral(i)&&(qI.is(i.contents)||Wy.is(i.contents)||de.typedArray(i.contents,Wy.is))&&(t.range===void 0||Vn.is(t.range))}r.is=e})($5||($5={}));var U5;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(U5||(U5={}));var z5;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return de.defined(i)&&(o.documentation=i),de.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(z5||(z5={}));var pm;(function(r){r.Text=1,r.Read=2,r.Write=3})(pm||(pm={}));var j5;(function(r){function e(t,i){var n={range:t};return de.number(i)&&(n.kind=i),n}r.create=e})(j5||(j5={}));var en;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(en||(en={}));var q5;(function(r){r.Deprecated=1})(q5||(q5={}));var G5;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(G5||(G5={}));var K5;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&de.string(n.name)&&de.number(n.kind)&&Vn.is(n.range)&&Vn.is(n.selectionRange)&&(n.detail===void 0||de.string(n.detail))&&(n.deprecated===void 0||de.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(K5||(K5={}));var Y5;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(Y5||(Y5={}));var Z5;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return de.defined(n)&&de.typedArray(n.diagnostics,Py.is)&&(n.only===void 0||de.typedArray(n.only,de.string))}r.is=t})(Z5||(Z5={}));var X5;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):W_.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&de.string(n.title)&&(n.diagnostics===void 0||de.typedArray(n.diagnostics,Py.is))&&(n.kind===void 0||de.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||W_.is(n.command))&&(n.isPreferred===void 0||de.boolean(n.isPreferred))&&(n.edit===void 0||jI.is(n.edit))}r.is=t})(X5||(X5={}));var Q5;(function(r){function e(i,n){var s={range:i};return de.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return de.defined(n)&&Vn.is(n.range)&&(de.undefined(n.command)||W_.is(n.command))}r.is=t})(Q5||(Q5={}));var J5;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return de.defined(n)&&de.uinteger(n.tabSize)&&de.boolean(n.insertSpaces)}r.is=t})(J5||(J5={}));var eB;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return de.defined(n)&&Vn.is(n.range)&&(de.undefined(n.target)||de.string(n.target))}r.is=t})(eB||(eB={}));var tB;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&Vn.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(tB||(tB={}));var iB;(function(r){function e(s,o,a,l){return new dCe(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(de.defined(o)&&de.string(o.uri)&&(de.undefined(o.languageId)||de.string(o.languageId))&&de.uinteger(o.lineCount)&&de.func(o.getText)&&de.func(o.positionAt)&&de.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,d=l.length-1;d>=0;d--){var u=l[d],h=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,h)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=h}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var d=0,u=0,h=0;d<l.length&&u<c.length;){var f=o(l[d],c[u]);f<=0?s[h++]=l[d++]:s[h++]=c[u++]}for(;d<l.length;)s[h++]=l[d++];for(;u<c.length;)s[h++]=c[u++];return s}})(iB||(iB={}));var dCe=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` +`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` +`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return Ho.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return Ho.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),de;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function d(f){return e.call(f)==="[object Function]"}r.func=d;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function h(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=h})(de||(de={}));var nB=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=gH(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),d=Math.max(o.end.line,0),u=this._lineOffsets,h=sB(s.text,!1,a);if(d-c===h.length)for(var f=0,g=h.length;f<g;f++)u[f+c+1]=h[f];else h.length<1e4?u.splice.apply(u,[c+1,d-c].concat(h)):this._lineOffsets=u=u.slice(0,c+1).concat(h,u.slice(d+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+h.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=sB(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),rB;(function(r){function e(n,s,o,a){return new nB(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof nB)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=KI(s.map(uCe),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],d=0,u=a;d<u.length;d++){var h=u[d],f=n.offsetAt(h.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),h.newText.length&&c.push(h.newText),l=n.offsetAt(h.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(rB||(rB={}));function KI(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);KI(i,e),KI(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function sB(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function gH(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function uCe(r){var e=gH(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var oB;(function(r){r[r.StartCommentTag=0]="StartCommentTag",r[r.Comment=1]="Comment",r[r.EndCommentTag=2]="EndCommentTag",r[r.StartTagOpen=3]="StartTagOpen",r[r.StartTagClose=4]="StartTagClose",r[r.StartTagSelfClose=5]="StartTagSelfClose",r[r.StartTag=6]="StartTag",r[r.EndTagOpen=7]="EndTagOpen",r[r.EndTagClose=8]="EndTagClose",r[r.EndTag=9]="EndTag",r[r.DelimiterAssign=10]="DelimiterAssign",r[r.AttributeName=11]="AttributeName",r[r.AttributeValue=12]="AttributeValue",r[r.StartDoctypeTag=13]="StartDoctypeTag",r[r.Doctype=14]="Doctype",r[r.EndDoctypeTag=15]="EndDoctypeTag",r[r.Content=16]="Content",r[r.Whitespace=17]="Whitespace",r[r.Unknown=18]="Unknown",r[r.Script=19]="Script",r[r.Styles=20]="Styles",r[r.EOS=21]="EOS"})(oB||(oB={}));var aB;(function(r){r[r.WithinContent=0]="WithinContent",r[r.AfterOpeningStartTag=1]="AfterOpeningStartTag",r[r.AfterOpeningEndTag=2]="AfterOpeningEndTag",r[r.WithinDoctype=3]="WithinDoctype",r[r.WithinTag=4]="WithinTag",r[r.WithinEndTag=5]="WithinEndTag",r[r.WithinComment=6]="WithinComment",r[r.WithinScriptContent=7]="WithinScriptContent",r[r.WithinStyleContent=8]="WithinStyleContent",r[r.AfterAttributeName=9]="AfterAttributeName",r[r.BeforeAttributeValue=10]="BeforeAttributeValue"})(aB||(aB={}));var lB;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[el.Markdown,el.PlainText]}},hover:{contentFormat:[el.Markdown,el.PlainText]}}}})(lB||(lB={}));var cB;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(cB||(cB={}));function dB(r,e){var t=0,i=r.length;if(i===0)return 0;for(;t<i;){var n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}(function(){function r(e,t,i,n){this.start=e,this.end=t,this.children=i,this.parent=n,this.closed=!1}return Object.defineProperty(r.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),r.prototype.isSameTag=function(e){return this.tag===void 0?e===void 0:e!==void 0&&this.tag.length===e.length&&this.tag.toLowerCase()===e},Object.defineProperty(r.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),r.prototype.findNodeBefore=function(e){var t=dB(this.children,function(s){return e<=s.start})-1;if(t>=0){var i=this.children[t];if(e>i.start){if(e<i.end)return i.findNodeBefore(e);var n=i.lastChild;return n&&n.end===i.end?i.findNodeBefore(e):i}}return this},r.prototype.findNodeAt=function(e){var t=dB(this.children,function(n){return e<=n.start})-1;if(t>=0){var i=this.children[t];if(e>i.start&&e<=i.end)return i.findNodeAt(e)}return this},r})();globalThis&&globalThis.__awaiter;globalThis&&globalThis.__generator;globalThis&&globalThis.__awaiter;globalThis&&globalThis.__generator;(function(){var r=[,,function(i){function n(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var a=new n(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},n.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},n.prototype.has_match=function(a){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(a))return!0;return!1},n.prototype.set_indent=function(a,l){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(a){this.__items.push(a);var l=a.lastIndexOf(` +`);l!==-1?this.__character_count=a.length-l:this.__character_count+=a.length},n.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},n.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},n.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},n.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},n.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function s(a,l){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),l=l||"",a.indent_level>0&&(l=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}s.prototype.get_indent_size=function(a,l){var c=this.__base_string_length;return l=l||0,a<0&&(c=0),c+=a*this.__indent_size,c+=l,c},s.prototype.get_indent_string=function(a,l){var c=this.__base_string;return l=l||0,a<0&&(a=0,c=""),l+=a*this.__indent_size,this.__ensure_cache(l),c+=this.__cache[l],c},s.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},s.prototype.__add_column=function(){var a=this.__cache.length,l=0,c="";this.__indent_size&&a>=this.__indent_size&&(l=Math.floor(a/this.__indent_size),a-=l*this.__indent_size,c=new Array(l+1).join(this.__indent_string)),a&&(c+=new Array(a+1).join(" ")),this.__cache.push(c)};function o(a,l){this.__indent_cache=new s(a,l),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new n(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(a,l){return this.__indent_cache.get_indent_string(a,l)},o.prototype.get_indent_size=function(a,l){return this.__indent_cache.get_indent_size(a,l)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(a){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` +`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` +`);return a!==` +`&&(c=c.replace(/[\n]/g,a)),c},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(a,l){return a=a||0,l=l||0,this.next_line.set_indent(a,l),this.__lines.length>1?(this.current_line.set_indent(a,l),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(a){for(var l=0;l<a.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(a){for(var l=this.__lines.length;a<l;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,l){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==l){this.__lines.splice(c+1,0,new n(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},i.exports.Output=o},,,,function(i){function n(a,l){this.raw_options=s(a,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}n.prototype._get_array=function(a,l){var c=this.raw_options[a],d=l||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},n.prototype._get_boolean=function(a,l){var c=this.raw_options[a],d=c===void 0?!!l:!!c;return d},n.prototype._get_characters=function(a,l){var c=this.raw_options[a],d=l||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),d},n.prototype._get_number=function(a,l){var c=this.raw_options[a];l=parseInt(l,10),isNaN(l)&&(l=0);var d=parseInt(c,10);return isNaN(d)&&(d=l),d},n.prototype._get_selection=function(a,l,c){var d=this._get_selection_list(a,l,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: +`+l+` +You passed in: '`+this.raw_options[a]+"'");return d[0]},n.prototype._get_selection_list=function(a,l,c){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[l[0]],!this._is_valid_selection(c,l))throw new Error("Invalid Default Value!");var d=this._get_array(a,c);if(!this._is_valid_selection(d,l))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: +`+l+` +You passed in: '`+this.raw_options[a]+"'");return d},n.prototype._is_valid_selection=function(a,l){return a.length&&l.length&&!a.some(function(c){return l.indexOf(c)===-1})};function s(a,l){var c={};a=o(a);var d;for(d in a)d!==l&&(c[d]=a[d]);if(l&&a[l])for(d in a[l])c[d]=a[l][d];return c}function o(a){var l={},c;for(c in a){var d=c.replace(/-/g,"_");l[d]=a[c]}return l}i.exports.Options=n,i.exports.normalizeOpts=o,i.exports.mergeOpts=s},,function(i){var n=RegExp.prototype.hasOwnProperty("sticky");function s(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}s.prototype.restart=function(){this.__position=0},s.prototype.back=function(){this.__position>0&&(this.__position-=1)},s.prototype.hasNext=function(){return this.__position<this.__input_length},s.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},s.prototype.peek=function(o){var a=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(a=this.__input.charAt(o)),a},s.prototype.__match=function(o,a){o.lastIndex=a;var l=o.exec(this.__input);return l&&!(n&&o.sticky)&&l.index!==a&&(l=null),l},s.prototype.test=function(o,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(o,a):!1},s.prototype.testChar=function(o,a){var l=this.peek(a);return o.lastIndex=0,l!==null&&o.test(l)},s.prototype.match=function(o){var a=this.__match(o,this.__position);return a?this.__position+=a[0].length:a=null,a},s.prototype.read=function(o,a,l){var c="",d;return o&&(d=this.match(o),d&&(c+=d[0])),a&&(d||!o)&&(c+=this.readUntil(a,l)),c},s.prototype.readUntil=function(o,a){var l="",c=this.__position;o.lastIndex=this.__position;var d=o.exec(this.__input);return d?(c=d.index,a&&(c+=d[0].length)):c=this.__input_length,l=this.__input.substring(this.__position,c),this.__position=c,l},s.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},s.prototype.get_regexp=function(o,a){var l=null,c="g";return a&&n&&(c="y"),typeof o=="string"&&o!==""?l=new RegExp(o,c):o&&(l=new RegExp(o.source,c)),l},s.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},s.prototype.peekUntilAfter=function(o){var a=this.__position,l=this.readUntilAfter(o);return this.__position=a,l},s.prototype.lookBack=function(o){var a=this.__position-1;return a>=o.length&&this.__input.substring(a-o.length,a).toLowerCase()===o},i.exports.InputScanner=s},,,,,function(i){function n(s,o){s=typeof s=="string"?s:s.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(s+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(s+/\sbeautify\signore:end\s/.source+o,"g")}n.prototype.get_directives=function(s){if(!s.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(s);a;)o[a[1]]=a[2],a=this.__directive_pattern.exec(s);return o},n.prototype.readIgnored=function(s){return s.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=n},,function(i,n,s){var o=s(16).Beautifier,a=s(17).Options;function l(c,d){var u=new o(c,d);return u.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new a}},function(i,n,s){var o=s(17).Options,a=s(2).Output,l=s(8).InputScanner,c=s(13).Directives,d=new c(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,h=/\r\n|[\r\n]/g,f=/\s/,g=/(?:\s|\n)+/g,p=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function v(b,C){this._source_text=b||"",this._options=new o(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}v.prototype.eatString=function(b){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(b.indexOf(this._ch)!==-1||this._ch===` +`)break;this._ch=this._input.next()}return C},v.prototype.eatWhitespace=function(b){for(var C=f.test(this._input.peek()),y=0;f.test(this._input.peek());)this._ch=this._input.next(),b&&this._ch===` +`&&(y===0||y<this._options.max_preserve_newlines)&&(y++,this._output.add_new_line(!0));return C},v.prototype.foundNestedPseudoClass=function(){for(var b=0,C=1,y=this._input.peek(C);y;){if(y==="{")return!0;if(y==="(")b+=1;else if(y===")"){if(b===0)return!1;b-=1}else if(y===";"||y==="}")return!1;C++,y=this._input.peek(C)}return!1},v.prototype.print_string=function(b){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(b)},v.prototype.preserveSingleSpace=function(b){b&&(this._output.space_before_token=!0)},v.prototype.indent=function(){this._indentLevel++},v.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,C=this._options.eol;C==="auto"&&(C=` +`,b&&u.test(b||"")&&(C=b.match(u)[0])),b=b.replace(h,` +`);var y=b.match(/^[\t ]*/)[0];this._output=new a(this._options,y),this._input=new l(b),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var E=0,S=!1,w=!1,x=!1,D=!1,M=!1,B=this._ch,z,j,re;z=this._input.read(g),j=z!=="",re=B,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),B=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var te=this._input.read(p),N=d.get_directives(te);N&&N.ignore==="start"&&(te+=d.readIgnored(this._input)),this.print_string(te),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(j),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var L=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);L.match(/[ :]$/)&&(L=this.eatString(": ").replace(/\s$/,""),this.print_string(L),this._output.space_before_token=!0),L=L.replace(/\s$/,""),L==="extend"?D=!0:L==="import"&&(M=!0),L in this.NESTED_AT_RULE?(this._nestedLevel+=1,L in this.CONDITIONAL_GROUP_RULE&&(x=!0)):!S&&E===0&&L.indexOf(":")!==-1&&(w=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(w&&(w=!1,this.outdent()),x?(x=!1,S=this._indentLevel>=this._nestedLevel):S=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&S&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),re==="{"&&this._output.trim(!0),M=!1,D=!1,w&&(this.outdent(),w=!1),this.print_string(this._ch),S=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(S||x)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!D&&E===0?(this.print_string(":"),w||(w=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?E===0?(w&&(this.outdent(),w=!1),D=!1,M=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),E++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),E&&(E--,this.outdent()))):(this.preserveSingleSpace(j),this.print_string(this._ch),this.eatWhitespace(),E++,this.indent()):this._ch===")"?(E&&(E--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!w&&E===0&&!M&&!D?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!w&&E===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&f.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(j),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),f.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(j),this.print_string(this._ch));var O=this._output.get_code(C);return O},i.exports.Beautifier=v},function(i,n,s){var o=s(6).Options;function a(l){o.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var d=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<d.length;u++)d[u]!=="expand"?this.brace_style="collapse":this.brace_style=d[u]}a.prototype=new o,i.exports.Options=a}],e={};function t(i){var n=e[i];if(n!==void 0)return n.exports;var s=e[i]={exports:{}};return r[i](s,s.exports,t),s.exports}t(15)})();(function(){var r=[,,function(i){function n(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var a=new n(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},n.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},n.prototype.has_match=function(a){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(a))return!0;return!1},n.prototype.set_indent=function(a,l){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(a){this.__items.push(a);var l=a.lastIndexOf(` +`);l!==-1?this.__character_count=a.length-l:this.__character_count+=a.length},n.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},n.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},n.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},n.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},n.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function s(a,l){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),l=l||"",a.indent_level>0&&(l=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}s.prototype.get_indent_size=function(a,l){var c=this.__base_string_length;return l=l||0,a<0&&(c=0),c+=a*this.__indent_size,c+=l,c},s.prototype.get_indent_string=function(a,l){var c=this.__base_string;return l=l||0,a<0&&(a=0,c=""),l+=a*this.__indent_size,this.__ensure_cache(l),c+=this.__cache[l],c},s.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},s.prototype.__add_column=function(){var a=this.__cache.length,l=0,c="";this.__indent_size&&a>=this.__indent_size&&(l=Math.floor(a/this.__indent_size),a-=l*this.__indent_size,c=new Array(l+1).join(this.__indent_string)),a&&(c+=new Array(a+1).join(" ")),this.__cache.push(c)};function o(a,l){this.__indent_cache=new s(a,l),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new n(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(a,l){return this.__indent_cache.get_indent_string(a,l)},o.prototype.get_indent_size=function(a,l){return this.__indent_cache.get_indent_size(a,l)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(a){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` +`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` +`);return a!==` +`&&(c=c.replace(/[\n]/g,a)),c},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(a,l){return a=a||0,l=l||0,this.next_line.set_indent(a,l),this.__lines.length>1?(this.current_line.set_indent(a,l),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(a){for(var l=0;l<a.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(a){for(var l=this.__lines.length;a<l;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,l){for(var c=this.__lines.length-2;c>=0;){var d=this.__lines[c];if(d.is_empty())break;if(d.item(0).indexOf(a)!==0&&d.item(-1)!==l){this.__lines.splice(c+1,0,new n(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},i.exports.Output=o},function(i){function n(s,o,a,l){this.type=s,this.text=o,this.comments_before=null,this.newlines=a||0,this.whitespace_before=l||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=n},,,function(i){function n(a,l){this.raw_options=s(a,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}n.prototype._get_array=function(a,l){var c=this.raw_options[a],d=l||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(d=c.concat()):typeof c=="string"&&(d=c.split(/[^a-zA-Z0-9_\/\-]+/)),d},n.prototype._get_boolean=function(a,l){var c=this.raw_options[a],d=c===void 0?!!l:!!c;return d},n.prototype._get_characters=function(a,l){var c=this.raw_options[a],d=l||"";return typeof c=="string"&&(d=c.replace(/\\r/,"\r").replace(/\\n/,` +`).replace(/\\t/," ")),d},n.prototype._get_number=function(a,l){var c=this.raw_options[a];l=parseInt(l,10),isNaN(l)&&(l=0);var d=parseInt(c,10);return isNaN(d)&&(d=l),d},n.prototype._get_selection=function(a,l,c){var d=this._get_selection_list(a,l,c);if(d.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: +`+l+` +You passed in: '`+this.raw_options[a]+"'");return d[0]},n.prototype._get_selection_list=function(a,l,c){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[l[0]],!this._is_valid_selection(c,l))throw new Error("Invalid Default Value!");var d=this._get_array(a,c);if(!this._is_valid_selection(d,l))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: +`+l+` +You passed in: '`+this.raw_options[a]+"'");return d},n.prototype._is_valid_selection=function(a,l){return a.length&&l.length&&!a.some(function(c){return l.indexOf(c)===-1})};function s(a,l){var c={};a=o(a);var d;for(d in a)d!==l&&(c[d]=a[d]);if(l&&a[l])for(d in a[l])c[d]=a[l][d];return c}function o(a){var l={},c;for(c in a){var d=c.replace(/-/g,"_");l[d]=a[c]}return l}i.exports.Options=n,i.exports.normalizeOpts=o,i.exports.mergeOpts=s},,function(i){var n=RegExp.prototype.hasOwnProperty("sticky");function s(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}s.prototype.restart=function(){this.__position=0},s.prototype.back=function(){this.__position>0&&(this.__position-=1)},s.prototype.hasNext=function(){return this.__position<this.__input_length},s.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},s.prototype.peek=function(o){var a=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(a=this.__input.charAt(o)),a},s.prototype.__match=function(o,a){o.lastIndex=a;var l=o.exec(this.__input);return l&&!(n&&o.sticky)&&l.index!==a&&(l=null),l},s.prototype.test=function(o,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(o,a):!1},s.prototype.testChar=function(o,a){var l=this.peek(a);return o.lastIndex=0,l!==null&&o.test(l)},s.prototype.match=function(o){var a=this.__match(o,this.__position);return a?this.__position+=a[0].length:a=null,a},s.prototype.read=function(o,a,l){var c="",d;return o&&(d=this.match(o),d&&(c+=d[0])),a&&(d||!o)&&(c+=this.readUntil(a,l)),c},s.prototype.readUntil=function(o,a){var l="",c=this.__position;o.lastIndex=this.__position;var d=o.exec(this.__input);return d?(c=d.index,a&&(c+=d[0].length)):c=this.__input_length,l=this.__input.substring(this.__position,c),this.__position=c,l},s.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},s.prototype.get_regexp=function(o,a){var l=null,c="g";return a&&n&&(c="y"),typeof o=="string"&&o!==""?l=new RegExp(o,c):o&&(l=new RegExp(o.source,c)),l},s.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},s.prototype.peekUntilAfter=function(o){var a=this.__position,l=this.readUntilAfter(o);return this.__position=a,l},s.prototype.lookBack=function(o){var a=this.__position-1;return a>=o.length&&this.__input.substring(a-o.length,a).toLowerCase()===o},i.exports.InputScanner=s},function(i,n,s){var o=s(8).InputScanner,a=s(3).Token,l=s(10).TokenStream,c=s(11).WhitespacePattern,d={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(h,f){this._input=new o(h),this._options=f||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new l,this._reset();for(var h,f=new a(d.START,""),g=null,p=[],_=new l;f.type!==d.EOF;){for(h=this._get_next_token(f,g);this._is_comment(h);)_.add(h),h=this._get_next_token(f,g);_.isEmpty()||(h.comments_before=_,_=new l),h.parent=g,this._is_opening(h)?(p.push(g),g=h):g&&this._is_closing(h,g)&&(h.opened=g,g.closed=h,g=p.pop(),h.parent=g),h.previous=f,f.next=h,this.__tokens.add(h),f=h}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(h,f){this._readWhitespace();var g=this._input.read(/.+/g);return g?this._create_token(d.RAW,g):this._create_token(d.EOF,"")},u.prototype._is_comment=function(h){return!1},u.prototype._is_opening=function(h){return!1},u.prototype._is_closing=function(h,f){return!1},u.prototype._create_token=function(h,f){var g=new a(h,f,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return g},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=u,i.exports.TOKEN=d},function(i){function n(s){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=s}n.prototype.restart=function(){this.__position=0},n.prototype.isEmpty=function(){return this.__tokens_length===0},n.prototype.hasNext=function(){return this.__position<this.__tokens_length},n.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__tokens[this.__position],this.__position+=1),s},n.prototype.peek=function(s){var o=null;return s=s||0,s+=this.__position,s>=0&&s<this.__tokens_length&&(o=this.__tokens[s]),o},n.prototype.add=function(s){this.__parent_token&&(s.parent=this.__parent_token),this.__tokens.push(s),this.__tokens_length+=1},i.exports.TokenStream=n},function(i,n,s){var o=s(12).Pattern;function a(l,c){o.call(this,l,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new o,a.prototype.__set_whitespace_patterns=function(l,c){l+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+l+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var l=this._input.read(this._match_pattern);if(l===" ")this.whitespace_before_token=" ";else if(l){var c=this.__split(this._newline_regexp,l);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return l},a.prototype.matching=function(l,c){var d=this._create();return d.__set_whitespace_patterns(l,c),d._update(),d},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(l,c){l.lastIndex=0;for(var d=0,u=[],h=l.exec(c);h;)u.push(c.substring(d,h.index)),d=h.index+h[0].length,h=l.exec(c);return d<c.length?u.push(c.substring(d,c.length)):u.push(""),u},i.exports.WhitespacePattern=a},function(i){function n(s,o){this._input=s,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}n.prototype.read=function(){var s=this._input.read(this._starting_pattern);return(!this._starting_pattern||s)&&(s+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),s},n.prototype.read_match=function(){return this._input.match(this._match_pattern)},n.prototype.until_after=function(s){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(s),o._update(),o},n.prototype.until=function(s){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(s),o._update(),o},n.prototype.starting_with=function(s){var o=this._create();return o._starting_pattern=this._input.get_regexp(s,!0),o._update(),o},n.prototype.matching=function(s){var o=this._create();return o._match_pattern=this._input.get_regexp(s,!0),o._update(),o},n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){},i.exports.Pattern=n},function(i){function n(s,o){s=typeof s=="string"?s:s.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(s+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(s+/\sbeautify\signore:end\s/.source+o,"g")}n.prototype.get_directives=function(s){if(!s.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(s);a;)o[a[1]]=a[2],a=this.__directive_pattern.exec(s);return o},n.prototype.readIgnored=function(s){return s.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=n},function(i,n,s){var o=s(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function l(c,d){o.call(this,c,d),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),d&&(this.__template_pattern=this._input.get_regexp(d.__template_pattern),this._excluded=Object.assign(this._excluded,d._excluded),this._disabled=Object.assign(this._disabled,d._disabled));var u=new o(c);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}l.prototype=new o,l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){this.__set_templated_pattern()},l.prototype.disable=function(c){var d=this._create();return d._disabled[c]=!0,d._update(),d},l.prototype.read_options=function(c){var d=this._create();for(var u in a)d._disabled[u]=c.templating.indexOf(u)===-1;return d._update(),d},l.prototype.exclude=function(c){var d=this._create();return d._excluded[c]=!0,d._update(),d},l.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var d=this._read_template();d;)this._match_pattern?d+=this._input.read(this._match_pattern):d+=this._input.readUntil(this.__template_pattern),c+=d,d=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},l.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},l.prototype._read_template=function(){var c="",d=this._input.peek();if(d==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(c=c||this.__patterns.erb.read())}else d==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},i.exports.TemplatablePattern=l},,,,function(i,n,s){var o=s(19).Beautifier,a=s(20).Options;function l(c,d,u,h){var f=new o(c,d,u,h);return f.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new a}},function(i,n,s){var o=s(20).Options,a=s(2).Output,l=s(21).Tokenizer,c=s(21).TOKEN,d=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,h=function(S,w){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=S.max_preserve_newlines,this.preserve_newlines=S.preserve_newlines,this._output=new a(S,w)};h.prototype.current_line_has_match=function(S){return this._output.current_line.has_match(S)},h.prototype.set_space_before_token=function(S,w){this._output.space_before_token=S,this._output.non_breaking_space=w},h.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},h.prototype.add_raw_token=function(S){this._output.add_raw_token(S)},h.prototype.print_preserved_newlines=function(S){var w=0;S.type!==c.TEXT&&S.previous.type!==c.TEXT&&(w=S.newlines?1:0),this.preserve_newlines&&(w=S.newlines<this.max_preserve_newlines+1?S.newlines:this.max_preserve_newlines+1);for(var x=0;x<w;x++)this.print_newline(x>0);return w!==0},h.prototype.traverse_whitespace=function(S){return S.whitespace_before||S.newlines?(this.print_preserved_newlines(S)||(this._output.space_before_token=!0),!0):!1},h.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},h.prototype.print_newline=function(S){this._output.add_new_line(S)},h.prototype.print_token=function(S){S.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(S.text))},h.prototype.indent=function(){this.indent_level++},h.prototype.get_full_indent=function(S){return S=this.indent_level+(S||0),S<1?"":this._output.get_indent_string(S)};var f=function(S){for(var w=null,x=S.next;x.type!==c.EOF&&S.closed!==x;){if(x.type===c.ATTRIBUTE&&x.text==="type"){x.next&&x.next.type===c.EQUALS&&x.next.next&&x.next.next.type===c.VALUE&&(w=x.next.next.text);break}x=x.next}return w},g=function(S,w){var x=null,D=null;return w.closed?(S==="script"?x="text/javascript":S==="style"&&(x="text/css"),x=f(w)||x,x.search("text/css")>-1?D="css":x.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?D="javascript":x.search(/(text|application|dojo)\/(x-)?(html)/)>-1?D="html":x.search(/test\/null/)>-1&&(D="null"),D):null};function p(S,w){return w.indexOf(S)!==-1}function _(S,w,x){this.parent=S||null,this.tag=w?w.tag_name:"",this.indent_level=x||0,this.parser_token=w||null}function v(S){this._printer=S,this._current_frame=null}v.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},v.prototype.record_tag=function(S){var w=new _(this._current_frame,S,this._printer.indent_level);this._current_frame=w},v.prototype._try_pop_frame=function(S){var w=null;return S&&(w=S.parser_token,this._printer.indent_level=S.indent_level,this._current_frame=S.parent),w},v.prototype._get_frame=function(S,w){for(var x=this._current_frame;x&&S.indexOf(x.tag)===-1;){if(w&&w.indexOf(x.tag)!==-1){x=null;break}x=x.parent}return x},v.prototype.try_pop=function(S,w){var x=this._get_frame([S],w);return this._try_pop_frame(x)},v.prototype.indent_to_tag=function(S){var w=this._get_frame(S);w&&(this._printer.indent_level=w.indent_level)};function b(S,w,x,D){this._source_text=S||"",w=w||{},this._js_beautify=x,this._css_beautify=D,this._tag_stack=null;var M=new o(w,"html");this._options=M,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S=this._source_text,w=this._options.eol;this._options.eol==="auto"&&(w=` +`,S&&d.test(S)&&(w=S.match(d)[0])),S=S.replace(u,` +`);var x=S.match(/^[\t ]*/)[0],D={text:"",type:""},M=new C,B=new h(this._options,x),z=new l(S,this._options).tokenize();this._tag_stack=new v(B);for(var j=null,re=z.next();re.type!==c.EOF;)re.type===c.TAG_OPEN||re.type===c.COMMENT?(j=this._handle_tag_open(B,re,M,D),M=j):re.type===c.ATTRIBUTE||re.type===c.EQUALS||re.type===c.VALUE||re.type===c.TEXT&&!M.tag_complete?j=this._handle_inside_tag(B,re,M,z):re.type===c.TAG_CLOSE?j=this._handle_tag_close(B,re,M):re.type===c.TEXT?j=this._handle_text(B,re,M):B.add_raw_token(re),D=j,re=z.next();var te=B._output.get_code(w);return te},b.prototype._handle_tag_close=function(S,w,x){var D={text:w.text,type:w.type};return S.alignment_size=0,x.tag_complete=!0,S.set_space_before_token(w.newlines||w.whitespace_before!=="",!0),x.is_unformatted?S.add_raw_token(w):(x.tag_start_char==="<"&&(S.set_space_before_token(w.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&x.has_wrapped_attrs&&S.print_newline(!1)),S.print_token(w)),x.indent_content&&!(x.is_unformatted||x.is_content_unformatted)&&(S.indent(),x.indent_content=!1),!x.is_inline_element&&!(x.is_unformatted||x.is_content_unformatted)&&S.set_wrap_point(),D},b.prototype._handle_inside_tag=function(S,w,x,D){var M=x.has_wrapped_attrs,B={text:w.text,type:w.type};if(S.set_space_before_token(w.newlines||w.whitespace_before!=="",!0),x.is_unformatted)S.add_raw_token(w);else if(x.tag_start_char==="{"&&w.type===c.TEXT)S.print_preserved_newlines(w)?(w.newlines=0,S.add_raw_token(w)):S.print_token(w);else{if(w.type===c.ATTRIBUTE?(S.set_space_before_token(!0),x.attr_count+=1):(w.type===c.EQUALS||w.type===c.VALUE&&w.previous.type===c.EQUALS)&&S.set_space_before_token(!1),w.type===c.ATTRIBUTE&&x.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(S.traverse_whitespace(w),M=M||w.newlines!==0),this._is_wrap_attributes_force)){var z=x.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&x.attr_count===1){var j=!0,re=0,te;do{if(te=D.peek(re),te.type===c.ATTRIBUTE){j=!1;break}re+=1}while(re<4&&te.type!==c.EOF&&te.type!==c.TAG_CLOSE);z=!j}z&&(S.print_newline(!1),M=!0)}S.print_token(w),M=M||S.previous_token_wrapped(),x.has_wrapped_attrs=M}return B},b.prototype._handle_text=function(S,w,x){var D={text:w.text,type:"TK_CONTENT"};return x.custom_beautifier_name?this._print_custom_beatifier_text(S,w,x):x.is_unformatted||x.is_content_unformatted?S.add_raw_token(w):(S.traverse_whitespace(w),S.print_token(w)),D},b.prototype._print_custom_beatifier_text=function(S,w,x){var D=this;if(w.text!==""){var M=w.text,B,z=1,j="",re="";x.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:x.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:x.custom_beautifier_name==="html"&&(B=function(ge,se){var ae=new b(ge,se,D._js_beautify,D._css_beautify);return ae.beautify()}),this._options.indent_scripts==="keep"?z=0:this._options.indent_scripts==="separate"&&(z=-S.indent_level);var te=S.get_full_indent(z);if(M=M.replace(/\n[ \t]*$/,""),x.custom_beautifier_name!=="html"&&M[0]==="<"&&M.match(/^(<!--|<!\[CDATA\[)/)){var N=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(M);if(!N){S.add_raw_token(w);return}j=te+N[1]+` +`,M=N[4],N[5]&&(re=te+N[5]),M=M.replace(/\n[ \t]*$/,""),(N[2]||N[3].indexOf(` +`)!==-1)&&(N=N[3].match(/[ \t]+$/),N&&(w.whitespace_before=N[0]))}if(M)if(B){var L=function(){this.eol=` +`};L.prototype=this._options.raw_options;var O=new L;M=B(te+M,O)}else{var W=w.whitespace_before;W&&(M=M.replace(new RegExp(` +(`+W+")?","g"),` +`)),M=te+M.replace(/\n/g,` +`+te)}j&&(M?M=j+M+` +`+re:M=j+re),S.print_newline(!1),M&&(w.text=M,w.whitespace_before="",w.newlines=0,S.add_raw_token(w),S.print_newline(!0))}},b.prototype._handle_tag_open=function(S,w,x,D){var M=this._get_tag_open_token(w);return(x.is_unformatted||x.is_content_unformatted)&&!x.is_empty_element&&w.type===c.TAG_OPEN&&w.text.indexOf("</")===0?(S.add_raw_token(w),M.start_tag_token=this._tag_stack.try_pop(M.tag_name)):(S.traverse_whitespace(w),this._set_tag_position(S,w,M,x,D),M.is_inline_element||S.set_wrap_point(),S.print_token(w)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(M.alignment_size=w.text.length+1),!M.tag_complete&&!M.is_unformatted&&(S.alignment_size=M.alignment_size),M};var C=function(S,w){if(this.parent=S||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!w)this.tag_complete=!0;else{var x;this.tag_start_char=w.text[0],this.text=w.text,this.tag_start_char==="<"?(x=w.text.match(/^<([^\s>]*)/),this.tag_check=x?x[1]:""):(x=w.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=x?x[1]:"",w.text==="{{#>"&&this.tag_check===">"&&w.next!==null&&(this.tag_check=w.next.text)),this.tag_check=this.tag_check.toLowerCase(),w.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||w.closed&&w.closed.text==="/>",this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))}};b.prototype._get_tag_open_token=function(S){var w=new C(this._tag_stack.get_parser_token(),S);return w.alignment_size=this._options.wrap_attributes_indent_size,w.is_end_tag=w.is_end_tag||p(w.tag_check,this._options.void_elements),w.is_empty_element=w.tag_complete||w.is_start_tag&&w.is_end_tag,w.is_unformatted=!w.tag_complete&&p(w.tag_check,this._options.unformatted),w.is_content_unformatted=!w.is_empty_element&&p(w.tag_check,this._options.content_unformatted),w.is_inline_element=p(w.tag_name,this._options.inline)||w.tag_start_char==="{",w},b.prototype._set_tag_position=function(S,w,x,D,M){if(x.is_empty_element||(x.is_end_tag?x.start_tag_token=this._tag_stack.try_pop(x.tag_name):(this._do_optional_end_element(x)&&(x.is_inline_element||S.print_newline(!1)),this._tag_stack.record_tag(x),(x.tag_name==="script"||x.tag_name==="style")&&!(x.is_unformatted||x.is_content_unformatted)&&(x.custom_beautifier_name=g(x.tag_check,w)))),p(x.tag_check,this._options.extra_liners)&&(S.print_newline(!1),S._output.just_added_blankline()||S.print_newline(!0)),x.is_empty_element){if(x.tag_start_char==="{"&&x.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),x.indent_content=!0;var B=S.current_line_has_match(/{{#if/);B||S.print_newline(!1)}x.tag_name==="!--"&&M.type===c.TAG_CLOSE&&D.is_end_tag&&x.text.indexOf(` +`)===-1||(x.is_inline_element||x.is_unformatted||S.print_newline(!1),this._calcluate_parent_multiline(S,x))}else if(x.is_end_tag){var z=!1;z=x.start_tag_token&&x.start_tag_token.multiline_content,z=z||!x.is_inline_element&&!(D.is_inline_element||D.is_unformatted)&&!(M.type===c.TAG_CLOSE&&x.start_tag_token===D)&&M.type!=="TK_CONTENT",(x.is_content_unformatted||x.is_unformatted)&&(z=!1),z&&S.print_newline(!1)}else x.indent_content=!x.custom_beautifier_name,x.tag_start_char==="<"&&(x.tag_name==="html"?x.indent_content=this._options.indent_inner_html:x.tag_name==="head"?x.indent_content=this._options.indent_head_inner_html:x.tag_name==="body"&&(x.indent_content=this._options.indent_body_inner_html)),!(x.is_inline_element||x.is_unformatted)&&(M.type!=="TK_CONTENT"||x.is_content_unformatted)&&S.print_newline(!1),this._calcluate_parent_multiline(S,x)},b.prototype._calcluate_parent_multiline=function(S,w){w.parent&&S._output.just_added_newline()&&!((w.is_inline_element||w.is_unformatted)&&w.parent.is_inline_element)&&(w.parent.multiline_content=!0)};var y=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],E=["a","audio","del","ins","map","noscript","video"];b.prototype._do_optional_end_element=function(S){var w=null;if(!(S.is_empty_element||!S.is_start_tag||!S.parent)){if(S.tag_name==="body")w=w||this._tag_stack.try_pop("head");else if(S.tag_name==="li")w=w||this._tag_stack.try_pop("li",["ol","ul"]);else if(S.tag_name==="dd"||S.tag_name==="dt")w=w||this._tag_stack.try_pop("dt",["dl"]),w=w||this._tag_stack.try_pop("dd",["dl"]);else if(S.parent.tag_name==="p"&&y.indexOf(S.tag_name)!==-1){var x=S.parent.parent;(!x||E.indexOf(x.tag_name)===-1)&&(w=w||this._tag_stack.try_pop("p"))}else S.tag_name==="rp"||S.tag_name==="rt"?(w=w||this._tag_stack.try_pop("rt",["ruby","rtc"]),w=w||this._tag_stack.try_pop("rp",["ruby","rtc"])):S.tag_name==="optgroup"?w=w||this._tag_stack.try_pop("optgroup",["select"]):S.tag_name==="option"?w=w||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):S.tag_name==="colgroup"?w=w||this._tag_stack.try_pop("caption",["table"]):S.tag_name==="thead"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"])):S.tag_name==="tbody"||S.tag_name==="tfoot"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"]),w=w||this._tag_stack.try_pop("thead",["table"]),w=w||this._tag_stack.try_pop("tbody",["table"])):S.tag_name==="tr"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"]),w=w||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(S.tag_name==="th"||S.tag_name==="td")&&(w=w||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),w=w||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return S.parent=this._tag_stack.get_parser_token(),w}},i.exports.Beautifier=b},function(i,n,s){var o=s(6).Options;function a(l){o.call(this,l,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}a.prototype=new o,i.exports.Options=a},function(i,n,s){var o=s(9).Tokenizer,a=s(9).TOKEN,l=s(13).Directives,c=s(14).TemplatablePattern,d=s(12).Pattern,u={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},h=new l(/<\!--/,/-->/),f=function(g,p){o.call(this,g,p),this._current_tag_name="";var _=new c(this._input).read_options(this._options),v=new d(this._input);if(this.__patterns={word:_.until(/[\n\r\t <]/),single_quote:_.until_after(/'/),double_quote:_.until_after(/"/),attribute:_.until(/[\n\r\t =>]|\/>/),element_name:_.until(/[\n\r\t >\/]/),handlebars_comment:v.starting_with(/{{!--/).until_after(/--}}/),handlebars:v.starting_with(/{{/).until_after(/}}/),handlebars_open:v.until(/[\n\r\t }]/),handlebars_raw_close:v.until(/}}/),comment:v.starting_with(/<!--/).until_after(/-->/),cdata:v.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:v.starting_with(/<!\[/).until_after(/]>/),processing:v.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var b=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=v.matching(b).until_after(b)}};f.prototype=new o,f.prototype._is_comment=function(g){return!1},f.prototype._is_opening=function(g){return g.type===u.TAG_OPEN},f.prototype._is_closing=function(g,p){return g.type===u.TAG_CLOSE&&p&&((g.text===">"||g.text==="/>")&&p.text[0]==="<"||g.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},f.prototype._reset=function(){this._current_tag_name=""},f.prototype._get_next_token=function(g,p){var _=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(u.EOF,""):(_=_||this._read_open_handlebars(v,p),_=_||this._read_attribute(v,g,p),_=_||this._read_close(v,p),_=_||this._read_raw_content(v,g,p),_=_||this._read_content_word(v),_=_||this._read_comment_or_cdata(v),_=_||this._read_processing(v),_=_||this._read_open(v,p),_=_||this._create_token(u.UNKNOWN,this._input.next()),_)},f.prototype._read_comment_or_cdata=function(g){var p=null,_=null,v=null;if(g==="<"){var b=this._input.peek(1);b==="!"&&(_=this.__patterns.comment.read(),_?(v=h.get_directives(_),v&&v.ignore==="start"&&(_+=h.readIgnored(this._input))):_=this.__patterns.cdata.read()),_&&(p=this._create_token(u.COMMENT,_),p.directives=v)}return p},f.prototype._read_processing=function(g){var p=null,_=null,v=null;if(g==="<"){var b=this._input.peek(1);(b==="!"||b==="?")&&(_=this.__patterns.conditional_comment.read(),_=_||this.__patterns.processing.read()),_&&(p=this._create_token(u.COMMENT,_),p.directives=v)}return p},f.prototype._read_open=function(g,p){var _=null,v=null;return p||g==="<"&&(_=this._input.next(),this._input.peek()==="/"&&(_+=this._input.next()),_+=this.__patterns.element_name.read(),v=this._create_token(u.TAG_OPEN,_)),v},f.prototype._read_open_handlebars=function(g,p){var _=null,v=null;return p||this._options.indent_handlebars&&g==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(_=this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars.read(),v=this._create_token(u.COMMENT,_)):(_=this.__patterns.handlebars_open.read(),v=this._create_token(u.TAG_OPEN,_))),v},f.prototype._read_close=function(g,p){var _=null,v=null;return p&&(p.text[0]==="<"&&(g===">"||g==="/"&&this._input.peek(1)===">")?(_=this._input.next(),g==="/"&&(_+=this._input.next()),v=this._create_token(u.TAG_CLOSE,_)):p.text[0]==="{"&&g==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),v=this._create_token(u.TAG_CLOSE,"}}"))),v},f.prototype._read_attribute=function(g,p,_){var v=null,b="";if(_&&_.text[0]==="<")if(g==="=")v=this._create_token(u.EQUALS,this._input.next());else if(g==='"'||g==="'"){var C=this._input.next();g==='"'?C+=this.__patterns.double_quote.read():C+=this.__patterns.single_quote.read(),v=this._create_token(u.VALUE,C)}else b=this.__patterns.attribute.read(),b&&(p.type===u.EQUALS?v=this._create_token(u.VALUE,b):v=this._create_token(u.ATTRIBUTE,b));return v},f.prototype._is_content_unformatted=function(g){return this._options.void_elements.indexOf(g)===-1&&(this._options.content_unformatted.indexOf(g)!==-1||this._options.unformatted.indexOf(g)!==-1)},f.prototype._read_raw_content=function(g,p,_){var v="";if(_&&_.text[0]==="{")v=this.__patterns.handlebars_raw_close.read();else if(p.type===u.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var b=p.opened.text.substr(1).toLowerCase();if(b==="script"||b==="style"){var C=this._read_comment_or_cdata(g);if(C)return C.type=u.TEXT,C;v=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(b)&&(v=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig")))}return v?this._create_token(u.TEXT,v):null},f.prototype._read_content_word=function(g){var p="";if(this._options.unformatted_content_delimiter&&g===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read()),p||(p=this.__patterns.word.read()),p)return this._create_token(u.TEXT,p)},i.exports.Tokenizer=f,i.exports.TOKEN=u}],e={};function t(i){var n=e[i];if(n!==void 0)return n.exports;var s=e[i]={exports:{}};return r[i](s,s.exports,t),s.exports}t(18)})();(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,d="",u=0,h=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(h===g-1||f===1))if(h!==g-1&&f===2){if(d.length<2||u!==2||d.charCodeAt(d.length-1)!==46||d.charCodeAt(d.length-2)!==46){if(d.length>2){var p=d.lastIndexOf("/");if(p!==d.length-1){p===-1?(d="",u=0):u=(d=d.slice(0,p)).length-1-d.lastIndexOf("/"),h=g,f=0;continue}}else if(d.length===2||d.length===1){d="",u=0,h=g,f=0;continue}}l&&(d.length>0?d+="/..":d="..",u=2)}else d.length>0?d+="/"+a.slice(h+1,g):d=a.slice(h+1,g),u=g-h-1;h=g,f=0}else c===46&&f!==-1?++f:f=-1}return d}var o={resolve:function(){for(var a,l="",c=!1,d=arguments.length-1;d>=-1&&!c;d--){var u;d>=0?u=arguments[d]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var d=a.length,u=d-c,h=1;h<l.length&&l.charCodeAt(h)===47;++h);for(var f=l.length-h,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(h+_)===47)return l.slice(h+_+1);if(_===0)return l.slice(h+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(h+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=d;++_)_!==d&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(h+p):(h+=p,l.charCodeAt(h)===47&&++h,l.slice(h))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,d=-1,u=!0,h=a.length-1;h>=1;--h)if((l=a.charCodeAt(h))===47){if(!u){d=h;break}}else u=!1;return d===-1?c?"/":".":c&&d===1?"//":a.slice(0,d)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,d=0,u=-1,h=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!h){d=c+1;break}}else g===-1&&(h=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return d===u?u=g:u===-1&&(u=a.length),a.slice(d,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!h){d=c+1;break}}else u===-1&&(h=!1,u=c+1);return u===-1?"":a.slice(d,u)},extname:function(a){n(a);for(var l=-1,c=0,d=-1,u=!0,h=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)d===-1&&(u=!1,d=f+1),g===46?l===-1?l=f:h!==1&&(h=1):l!==-1&&(h=-1);else if(!u){c=f+1;break}}return l===-1||d===-1||h===0||h===1&&l===d-1&&l===c+1?"":a.slice(l,d)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var d=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return d?d===c.root?d+u:d+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,d=a.charCodeAt(0),u=d===47;u?(l.root="/",c=1):c=0;for(var h=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((d=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),d===46?h===-1?h=_:v!==1&&(v=1):h!==-1&&(v=-1);else if(!p){f=_+1;break}return h===-1||g===-1||v===0||v===1&&h===g-1&&h===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,h),l.base=a.slice(1,g)):(l.name=a.slice(f,h),l.base=a.slice(f,g)),l.ext=a.slice(h,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>z}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,d=(l=function(N,L){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(O,W){O.__proto__=W}||function(O,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(O[ge]=W[ge])})(N,L)},function(N,L){function O(){this.constructor=N}l(N,L),N.prototype=L===null?Object.create(L):(O.prototype=L.prototype,new O)}),u=/^\w[\w\d+.-]*$/,h=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function N(L,O,W,ge,se,ae){ae===void 0&&(ae=!1),typeof L=="object"?(this.scheme=L.scheme||g,this.authority=L.authority||g,this.path=L.path||g,this.query=L.query||g,this.fragment=L.fragment||g):(this.scheme=function(Ce,Le){return Ce||Le?Ce:"file"}(L,ae),this.authority=O||g,this.path=function(Ce,Le){switch(Ce){case"https":case"http":case"file":Le?Le[0]!==p&&(Le=p+Le):Le=p}return Le}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(Ce,Le){if(!Ce.scheme&&Le)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+Ce.authority+'", path: "'+Ce.path+'", query: "'+Ce.query+'", fragment: "'+Ce.fragment+'"}');if(Ce.scheme&&!u.test(Ce.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(Ce.path){if(Ce.authority){if(!h.test(Ce.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(f.test(Ce.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return N.isUri=function(L){return L instanceof N||!!L&&typeof L.authority=="string"&&typeof L.fragment=="string"&&typeof L.path=="string"&&typeof L.query=="string"&&typeof L.scheme=="string"&&typeof L.fsPath=="function"&&typeof L.with=="function"&&typeof L.toString=="function"},Object.defineProperty(N.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),N.prototype.with=function(L){if(!L)return this;var O=L.scheme,W=L.authority,ge=L.path,se=L.query,ae=L.fragment;return O===void 0?O=this.scheme:O===null&&(O=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),O===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(O,W,ge,se,ae)},N.parse=function(L,O){O===void 0&&(O=!1);var W=_.exec(L);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),O):new C(g,g,g,g,g)},N.file=function(L){var O=g;if(o&&(L=L.replace(/\\/g,p)),L[0]===p&&L[1]===p){var W=L.indexOf(p,2);W===-1?(O=L.substring(2),L=p):(O=L.substring(2,W),L=L.substring(W)||p)}return new C("file",O,L,g,g)},N.from=function(L){return new C(L.scheme,L.authority,L.path,L.query,L.fragment)},N.prototype.toString=function(L){return L===void 0&&(L=!1),x(this,L)},N.prototype.toJSON=function(){return this},N.revive=function(L){if(L){if(L instanceof N)return L;var O=new C(L);return O._formatted=L.external,O._fsPath=L._sep===b?L.fsPath:null,O}return L},N}(),b=o?1:void 0,C=function(N){function L(){var O=N!==null&&N.apply(this,arguments)||this;return O._formatted=null,O._fsPath=null,O}return d(L,N),Object.defineProperty(L.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),L.prototype.toString=function(O){return O===void 0&&(O=!1),O?x(this,!0):(this._formatted||(this._formatted=x(this,!1)),this._formatted)},L.prototype.toJSON=function(){var O={$mid:1};return this._fsPath&&(O.fsPath=this._fsPath,O._sep=b),this._formatted&&(O.external=this._formatted),this.path&&(O.path=this.path),this.scheme&&(O.scheme=this.scheme),this.authority&&(O.authority=this.authority),this.query&&(O.query=this.query),this.fragment&&(O.fragment=this.fragment),O},L}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function E(N,L){for(var O=void 0,W=-1,ge=0;ge<N.length;ge++){var se=N.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||L&&se===47)W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O!==void 0&&(O+=N.charAt(ge));else{O===void 0&&(O=N.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(O+=encodeURIComponent(N.substring(W,ge)),W=-1),O+=ae):W===-1&&(W=ge)}}return W!==-1&&(O+=encodeURIComponent(N.substring(W))),O!==void 0?O:N}function S(N){for(var L=void 0,O=0;O<N.length;O++){var W=N.charCodeAt(O);W===35||W===63?(L===void 0&&(L=N.substr(0,O)),L+=y[W]):L!==void 0&&(L+=N[O])}return L!==void 0?L:N}function w(N,L){var O;return O=N.authority&&N.path.length>1&&N.scheme==="file"?"//"+N.authority+N.path:N.path.charCodeAt(0)===47&&(N.path.charCodeAt(1)>=65&&N.path.charCodeAt(1)<=90||N.path.charCodeAt(1)>=97&&N.path.charCodeAt(1)<=122)&&N.path.charCodeAt(2)===58?L?N.path.substr(1):N.path[1].toLowerCase()+N.path.substr(2):N.path,o&&(O=O.replace(/\//g,"\\")),O}function x(N,L){var O=L?S:E,W="",ge=N.scheme,se=N.authority,ae=N.path,Ce=N.query,Le=N.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var bi=se.substr(0,ct);se=se.substr(ct+1),(ct=bi.indexOf(":"))===-1?W+=O(bi,!1):(W+=O(bi.substr(0,ct),!1),W+=":",W+=O(bi.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=O(se,!1):(W+=O(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Kt=ae.charCodeAt(1))>=65&&Kt<=90&&(ae="/"+String.fromCharCode(Kt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Kt;(Kt=ae.charCodeAt(0))>=65&&Kt<=90&&(ae=String.fromCharCode(Kt+32)+":"+ae.substr(2))}W+=O(ae,!0)}return Ce&&(W+="?",W+=O(Ce,!1)),Le&&(W+="#",W+=L?Le:E(Le,!1)),W}function D(N){try{return decodeURIComponent(N)}catch{return N.length>3?N.substr(0,3)+D(N.substr(3)):N}}var M=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(N){return N.match(M)?N.replace(M,function(L){return D(L)}):N}var z,j=s(470),re=function(){for(var N=0,L=0,O=arguments.length;L<O;L++)N+=arguments[L].length;var W=Array(N),ge=0;for(L=0;L<O;L++)for(var se=arguments[L],ae=0,Ce=se.length;ae<Ce;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(N){N.joinPath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];return L.with({path:te.join.apply(te,re([L.path],O))})},N.resolvePath=function(L){for(var O=[],W=1;W<arguments.length;W++)O[W-1]=arguments[W];var ge=L.path||"/";return L.with({path:te.resolve.apply(te,re([ge],O))})},N.dirname=function(L){var O=te.dirname(L.path);return O.length===1&&O.charCodeAt(0)===46?L:L.with({path:O})},N.basename=function(L){return te.basename(L.path)},N.extname=function(L){return te.extname(L.path)}})(z||(z={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();function Du(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function hCe(r){if(!!r)return{start:Du(r.getStartPosition()),end:Du(r.getEndPosition())}}function lo(r){if(!!r)return new Ku(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function fCe(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function gCe(r){var e=we.CompletionItemKind;switch(r){case Ji.Text:return e.Text;case Ji.Method:return e.Method;case Ji.Function:return e.Function;case Ji.Constructor:return e.Constructor;case Ji.Field:return e.Field;case Ji.Variable:return e.Variable;case Ji.Class:return e.Class;case Ji.Interface:return e.Interface;case Ji.Module:return e.Module;case Ji.Property:return e.Property;case Ji.Unit:return e.Unit;case Ji.Value:return e.Value;case Ji.Enum:return e.Enum;case Ji.Keyword:return e.Keyword;case Ji.Snippet:return e.Snippet;case Ji.Color:return e.Color;case Ji.File:return e.File;case Ji.Reference:return e.Reference}return e.Property}function mR(r){if(!!r)return{range:lo(r.range),text:r.newText}}function pCe(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var pH=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return[".",":","<",'"',"=","/"]},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),Du(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new Ku(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(d){var u={label:d.label,insertText:d.insertText||d.label,sortText:d.sortText,filterText:d.filterText,documentation:d.documentation,command:pCe(d.command),detail:d.detail,range:l,kind:gCe(d.kind)};return d.textEdit&&(fCe(d.textEdit)?u.range={insert:lo(d.textEdit.insert),replace:lo(d.textEdit.replace)}:u.range=lo(d.textEdit.range),u.insertText=d.textEdit.newText),d.additionalTextEdits&&(u.additionalTextEdits=d.additionalTextEdits.map(mR)),d.insertTextFormat===GI.Snippet&&(u.insertTextRules=we.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function mCe(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function uB(r){return typeof r=="string"?{value:r}:mCe(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` +`+r.value+"\n```\n"}}function _Ce(r){if(!!r)return Array.isArray(r)?r.map(uB):[uB(r)]}var mH=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),Du(t))}).then(function(s){if(!!s)return{range:lo(s.range),contents:_Ce(s.contents)}})},r}();function bCe(r){var e=we.DocumentHighlightKind;switch(r){case pm.Read:return e.Read;case pm.Write:return e.Write;case pm.Text:return e.Text}return e.Text}var _H=function(){function r(e){this._worker=e}return r.prototype.provideDocumentHighlights=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDocumentHighlights(n.toString(),Du(t))}).then(function(s){if(!!s)return s.map(function(o){return{range:lo(o.range),kind:bCe(o.kind)}})})},r}();function vCe(r){var e=we.SymbolKind;switch(r){case en.File:return e.Array;case en.Module:return e.Module;case en.Namespace:return e.Namespace;case en.Package:return e.Package;case en.Class:return e.Class;case en.Method:return e.Method;case en.Property:return e.Property;case en.Field:return e.Field;case en.Constructor:return e.Constructor;case en.Enum:return e.Enum;case en.Interface:return e.Interface;case en.Function:return e.Function;case en.Variable:return e.Variable;case en.Constant:return e.Constant;case en.String:return e.String;case en.Number:return e.Number;case en.Boolean:return e.Boolean;case en.Array:return e.Array}return e.Function}var bH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:vCe(s.kind),tags:[],range:lo(s.location.range),selectionRange:lo(s.location.range)}})})},r}(),vH=function(){function r(e){this._worker=e}return r.prototype.provideLinks=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentLinks(i.toString())}).then(function(n){if(!!n)return{links:n.map(function(s){return{range:lo(s.range),url:s.target}})}})},r}();function CH(r){return{tabSize:r.tabSize,insertSpaces:r.insertSpaces}}var wH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentFormattingEdits=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.format(n.toString(),null,CH(t)).then(function(o){if(!(!o||o.length===0))return o.map(mR)})})},r}(),yH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentRangeFormattingEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.format(s.toString(),hCe(t),CH(i)).then(function(a){if(!(!a||a.length===0))return a.map(mR)})})},r}(),SH=function(){function r(e){this._worker=e}return r.prototype.provideRenameEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doRename(s.toString(),Du(t),i)}).then(function(o){return CCe(o)})},r}();function CCe(r){if(!(!r||!r.changes)){var e=[];for(var t in r.changes)for(var i=Y0.parse(t),n=0,s=r.changes[t];n<s.length;n++){var o=s[n];e.push({resource:i,edit:{range:lo(o.range),text:o.newText}})}return{edits:e}}}var xH=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=wCe(o.kind)),a})})},r}();function wCe(r){switch(r){case gm.Comment:return we.FoldingRangeKind.Comment;case gm.Imports:return we.FoldingRangeKind.Imports;case gm.Region:return we.FoldingRangeKind.Region}}var EH=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(Du))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:lo(o.range)}),o=o.parent;return a})})},r}();function yCe(r){var e=new fH(r),t=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return e.getLanguageServiceWorker.apply(e,n)},i=r.languageId;we.registerCompletionItemProvider(i,new pH(t)),we.registerHoverProvider(i,new mH(t)),we.registerDocumentHighlightProvider(i,new _H(t)),we.registerLinkProvider(i,new vH(t)),we.registerFoldingRangeProvider(i,new xH(t)),we.registerDocumentSymbolProvider(i,new bH(t)),we.registerSelectionRangeProvider(i,new EH(t)),we.registerRenameProvider(i,new SH(t)),i==="html"&&(we.registerDocumentFormattingEditProvider(i,new wH(t)),we.registerDocumentRangeFormattingEditProvider(i,new yH(t)))}function SCe(r){var e=[],t=[],i=new fH(r);e.push(i);var n=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.getLanguageServiceWorker.apply(i,o)};function s(){var o=r.languageId,a=r.modeConfiguration;kH(t),a.completionItems&&t.push(we.registerCompletionItemProvider(o,new pH(n))),a.hovers&&t.push(we.registerHoverProvider(o,new mH(n))),a.documentHighlights&&t.push(we.registerDocumentHighlightProvider(o,new _H(n))),a.links&&t.push(we.registerLinkProvider(o,new vH(n))),a.documentSymbols&&t.push(we.registerDocumentSymbolProvider(o,new bH(n))),a.rename&&t.push(we.registerRenameProvider(o,new SH(n))),a.foldingRanges&&t.push(we.registerFoldingRangeProvider(o,new xH(n))),a.selectionRanges&&t.push(we.registerSelectionRangeProvider(o,new EH(n))),a.documentFormattingEdits&&t.push(we.registerDocumentFormattingEditProvider(o,new wH(n))),a.documentRangeFormattingEdits&&t.push(we.registerDocumentRangeFormattingEditProvider(o,new yH(n)))}return s(),e.push(hB(t)),hB(e)}function hB(r){return{dispose:function(){return kH(r)}}}function kH(r){for(;r.length;)r.pop().dispose()}var xCe=Object.freeze(Object.defineProperty({__proto__:null,setupMode1:yCe,setupMode:SCe},Symbol.toStringTag,{value:"Module"})),ECe={comments:{lineComment:"*"},brackets:[["[","]"],["(",")"]]},kCe={defaultToken:"invalid",ignoreCase:!0,tokenPostfix:".abap",keywords:["abap-source","abbreviated","abstract","accept","accepting","according","activation","actual","add","add-corresponding","adjacent","after","alias","aliases","align","all","allocate","alpha","analysis","analyzer","and","append","appendage","appending","application","archive","area","arithmetic","as","ascending","aspect","assert","assign","assigned","assigning","association","asynchronous","at","attributes","authority","authority-check","avg","back","background","backup","backward","badi","base","before","begin","between","big","binary","bintohex","bit","black","blank","blanks","blob","block","blocks","blue","bound","boundaries","bounds","boxed","break-point","buffer","by","bypassing","byte","byte-order","call","calling","case","cast","casting","catch","center","centered","chain","chain-input","chain-request","change","changing","channels","character","char-to-hex","check","checkbox","ci_","circular","class","class-coding","class-data","class-events","class-methods","class-pool","cleanup","clear","client","clob","clock","close","coalesce","code","coding","col_background","col_group","col_heading","col_key","col_negative","col_normal","col_positive","col_total","collect","color","column","columns","comment","comments","commit","common","communication","comparing","component","components","compression","compute","concat","concat_with_space","concatenate","cond","condense","condition","connect","connection","constants","context","contexts","continue","control","controls","conv","conversion","convert","copies","copy","corresponding","country","cover","cpi","create","creating","critical","currency","currency_conversion","current","cursor","cursor-selection","customer","customer-function","dangerous","data","database","datainfo","dataset","date","dats_add_days","dats_add_months","dats_days_between","dats_is_valid","daylight","dd/mm/yy","dd/mm/yyyy","ddmmyy","deallocate","decimal_shift","decimals","declarations","deep","default","deferred","define","defining","definition","delete","deleting","demand","department","descending","describe","destination","detail","dialog","directory","disconnect","display","display-mode","distinct","divide","divide-corresponding","division","do","dummy","duplicate","duplicates","duration","during","dynamic","dynpro","edit","editor-call","else","elseif","empty","enabled","enabling","encoding","end","endat","endcase","endcatch","endchain","endclass","enddo","endenhancement","end-enhancement-section","endexec","endform","endfunction","endian","endif","ending","endinterface","end-lines","endloop","endmethod","endmodule","end-of-definition","end-of-editing","end-of-file","end-of-page","end-of-selection","endon","endprovide","endselect","end-test-injection","end-test-seam","endtry","endwhile","endwith","engineering","enhancement","enhancement-point","enhancements","enhancement-section","entries","entry","enum","environment","equiv","errormessage","errors","escaping","event","events","exact","except","exception","exceptions","exception-table","exclude","excluding","exec","execute","exists","exit","exit-command","expand","expanding","expiration","explicit","exponent","export","exporting","extend","extended","extension","extract","fail","fetch","field","field-groups","fields","field-symbol","field-symbols","file","filter","filters","filter-table","final","find","first","first-line","fixed-point","fkeq","fkge","flush","font","for","form","format","forward","found","frame","frames","free","friends","from","function","functionality","function-pool","further","gaps","generate","get","giving","gkeq","gkge","global","grant","green","group","groups","handle","handler","harmless","hashed","having","hdb","header","headers","heading","head-lines","help-id","help-request","hextobin","hide","high","hint","hold","hotspot","icon","id","identification","identifier","ids","if","ignore","ignoring","immediately","implementation","implementations","implemented","implicit","import","importing","in","inactive","incl","include","includes","including","increment","index","index-line","infotypes","inheriting","init","initial","initialization","inner","inout","input","insert","instance","instances","instr","intensified","interface","interface-pool","interfaces","internal","intervals","into","inverse","inverted-date","is","iso","job","join","keep","keeping","kernel","key","keys","keywords","kind","language","last","late","layout","leading","leave","left","left-justified","leftplus","leftspace","legacy","length","let","level","levels","like","line","lines","line-count","linefeed","line-selection","line-size","list","listbox","list-processing","little","llang","load","load-of-program","lob","local","locale","locator","logfile","logical","log-point","long","loop","low","lower","lpad","lpi","ltrim","mail","main","major-id","mapping","margin","mark","mask","match","matchcode","max","maximum","medium","members","memory","mesh","message","message-id","messages","messaging","method","methods","min","minimum","minor-id","mm/dd/yy","mm/dd/yyyy","mmddyy","mode","modif","modifier","modify","module","move","move-corresponding","multiply","multiply-corresponding","name","nametab","native","nested","nesting","new","new-line","new-page","new-section","next","no","no-display","no-extension","no-gap","no-gaps","no-grouping","no-heading","no-scrolling","no-sign","no-title","no-topofpage","no-zero","node","nodes","non-unicode","non-unique","not","null","number","object","objects","obligatory","occurrence","occurrences","occurs","of","off","offset","ole","on","only","open","option","optional","options","or","order","other","others","out","outer","output","output-length","overflow","overlay","pack","package","pad","padding","page","pages","parameter","parameters","parameter-table","part","partially","pattern","percentage","perform","performing","person","pf1","pf10","pf11","pf12","pf13","pf14","pf15","pf2","pf3","pf4","pf5","pf6","pf7","pf8","pf9","pf-status","pink","places","pool","pos_high","pos_low","position","pragmas","precompiled","preferred","preserving","primary","print","print-control","priority","private","procedure","process","program","property","protected","provide","public","push","pushbutton","put","queue-only","quickinfo","radiobutton","raise","raising","range","ranges","read","reader","read-only","receive","received","receiver","receiving","red","redefinition","reduce","reduced","ref","reference","refresh","regex","reject","remote","renaming","replace","replacement","replacing","report","request","requested","reserve","reset","resolution","respecting","responsible","result","results","resumable","resume","retry","return","returncode","returning","returns","right","right-justified","rightplus","rightspace","risk","rmc_communication_failure","rmc_invalid_status","rmc_system_failure","role","rollback","rows","rpad","rtrim","run","sap","sap-spool","saving","scale_preserving","scale_preserving_scientific","scan","scientific","scientific_with_leading_zero","scroll","scroll-boundary","scrolling","search","secondary","seconds","section","select","selection","selections","selection-screen","selection-set","selection-sets","selection-table","select-options","send","separate","separated","set","shared","shift","short","shortdump-id","sign_as_postfix","single","size","skip","skipping","smart","some","sort","sortable","sorted","source","specified","split","spool","spots","sql","sqlscript","stable","stamp","standard","starting","start-of-editing","start-of-selection","state","statement","statements","static","statics","statusinfo","step-loop","stop","structure","structures","style","subkey","submatches","submit","subroutine","subscreen","subtract","subtract-corresponding","suffix","sum","summary","summing","supplied","supply","suppress","switch","switchstates","symbol","syncpoints","syntax","syntax-check","syntax-trace","system-call","system-exceptions","system-exit","tab","tabbed","table","tables","tableview","tabstrip","target","task","tasks","test","testing","test-injection","test-seam","text","textpool","then","throw","time","times","timestamp","timezone","tims_is_valid","title","titlebar","title-lines","to","tokenization","tokens","top-lines","top-of-page","trace-file","trace-table","trailing","transaction","transfer","transformation","translate","transporting","trmac","truncate","truncation","try","tstmp_add_seconds","tstmp_current_utctimestamp","tstmp_is_valid","tstmp_seconds_between","type","type-pool","type-pools","types","uline","unassign","under","unicode","union","unique","unit_conversion","unix","unpack","until","unwind","up","update","upper","user","user-command","using","utf-8","valid","value","value-request","values","vary","varying","verification-message","version","via","view","visible","wait","warning","when","whenever","where","while","width","window","windows","with","with-heading","without","with-title","word","work","write","writer","xml","xsd","yellow","yes","yymmdd","zero","zone","abap_system_timezone","abap_user_timezone","access","action","adabas","adjust_numbers","allow_precision_loss","allowed","amdp","applicationuser","as_geo_json","as400","associations","balance","behavior","breakup","bulk","cds","cds_client","check_before_save","child","clients","corr","corr_spearman","cross","cycles","datn_add_days","datn_add_months","datn_days_between","dats_from_datn","dats_tims_to_tstmp","dats_to_datn","db2","db6","ddl","dense_rank","depth","deterministic","discarding","entities","entity","error","failed","finalize","first_value","fltp_to_dec","following","fractional","full","graph","grouping","hierarchy","hierarchy_ancestors","hierarchy_ancestors_aggregate","hierarchy_descendants","hierarchy_descendants_aggregate","hierarchy_siblings","incremental","indicators","lag","last_value","lead","leaves","like_regexpr","link","locale_sap","lock","locks","many","mapped","matched","measures","median","mssqlnt","multiple","nodetype","ntile","nulls","occurrences_regexpr","one","operations","oracle","orphans","over","parent","parents","partition","pcre","period","pfcg_mapping","preceding","privileged","product","projection","rank","redirected","replace_regexpr","reported","response","responses","root","row","row_number","sap_system_date","save","schema","session","sets","shortdump","siblings","spantree","start","stddev","string_agg","subtotal","sybase","tims_from_timn","tims_to_timn","to_blob","to_clob","total","trace-entry","tstmp_to_dats","tstmp_to_dst","tstmp_to_tims","tstmpl_from_utcl","tstmpl_to_utcl","unbounded","utcl_add_seconds","utcl_current","utcl_seconds_between","uuid","var","verbatim"],builtinFunctions:["abs","acos","asin","atan","bit-set","boolc","boolx","ceil","char_off","charlen","cmax","cmin","concat_lines_of","contains","contains_any_not_of","contains_any_of","cos","cosh","count","count_any_not_of","count_any_of","dbmaxlen","distance","escape","exp","find_any_not_of","find_any_of","find_end","floor","frac","from_mixed","ipow","line_exists","line_index","log","log10","matches","nmax","nmin","numofchar","repeat","rescale","reverse","round","segment","shift_left","shift_right","sign","sin","sinh","sqrt","strlen","substring","substring_after","substring_before","substring_from","substring_to","tan","tanh","to_lower","to_mixed","to_upper","trunc","utclong_add","utclong_current","utclong_diff","xsdbool","xstrlen"],typeKeywords:["b","c","d","decfloat16","decfloat34","f","i","int8","n","p","s","string","t","utclong","x","xstring","any","clike","csequence","decfloat","numeric","simple","xsequence","accp","char","clnt","cuky","curr","datn","dats","d16d","d16n","d16r","d34d","d34n","d34r","dec","df16_dec","df16_raw","df34_dec","df34_raw","fltp","geom_ewkb","int1","int2","int4","lang","lchr","lraw","numc","quan","raw","rawstring","sstring","timn","tims","unit","utcl","df16_scl","df34_scl","prec","varc","abap_bool","abap_false","abap_true","abap_undefined","me","screen","space","super","sy","syst","table_line","*sys*"],builtinMethods:["class_constructor","constructor"],derivedTypes:["%CID","%CID_REF","%CONTROL","%DATA","%ELEMENT","%FAIL","%KEY","%MSG","%PARAM","%PID","%PID_ASSOC","%PID_PARENT","%_HINTS"],cdsLanguage:["@AbapAnnotation","@AbapCatalog","@AccessControl","@API","@ClientDependent","@ClientHandling","@CompatibilityContract","@DataAging","@EndUserText","@Environment","@LanguageDependency","@MappingRole","@Metadata","@MetadataExtension","@ObjectModel","@Scope","@Semantics","$EXTENSION","$SELF"],selectors:["->","->*","=>","~","~*"],operators:[" +"," -","/","*","**","div","mod","=","#","@","+=","-=","*=","/=","**=","&&=","?=","&","&&","bit-and","bit-not","bit-or","bit-xor","m","o","z","<"," >","<=",">=","<>","><","=<","=>","bt","byte-ca","byte-cn","byte-co","byte-cs","byte-na","byte-ns","ca","cn","co","cp","cs","eq","ge","gt","le","lt","na","nb","ne","np","ns","*/","*:","--","/*","//"],symbols:/[=><!~?&+\-*\/\^%#@]+/,tokenizer:{root:[[/[a-z_\/$%@]([\w\/$%]|-(?!>))*/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@cdsLanguage":"annotation","@derivedTypes":"type","@builtinFunctions":"type","@builtinMethods":"type","@operators":"key","@default":"identifier"}}],[/<[\w]+>/,"identifier"],[/##[\w|_]+/,"comment"],{include:"@whitespace"},[/[:,.]/,"delimiter"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@selectors":"tag","@operators":"key","@default":""}}],[/'/,{token:"string",bracket:"@open",next:"@stringquote"}],[/`/,{token:"string",bracket:"@open",next:"@stringping"}],[/\|/,{token:"string",bracket:"@open",next:"@stringtemplate"}],[/\d+/,"number"]],stringtemplate:[[/[^\\\|]+/,"string"],[/\\\|/,"string"],[/\|/,{token:"string",bracket:"@close",next:"@pop"}]],stringping:[[/[^\\`]+/,"string"],[/`/,{token:"string",bracket:"@close",next:"@pop"}]],stringquote:[[/[^\\']+/,"string"],[/'/,{token:"string",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/^\*.*$/,"comment"],[/\".*$/,"comment"]]}},LCe=Object.freeze(Object.defineProperty({__proto__:null,conf:ECe,language:kCe},Symbol.toStringTag,{value:"Module"})),TCe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},ICe=["abstract","activate","and","any","array","as","asc","assert","autonomous","begin","bigdecimal","blob","boolean","break","bulk","by","case","cast","catch","char","class","collect","commit","const","continue","convertcurrency","decimal","default","delete","desc","do","double","else","end","enum","exception","exit","export","extends","false","final","finally","float","for","from","future","get","global","goto","group","having","hint","if","implements","import","in","inner","insert","instanceof","int","interface","into","join","last_90_days","last_month","last_n_days","last_week","like","limit","list","long","loop","map","merge","native","new","next_90_days","next_month","next_n_days","next_week","not","null","nulls","number","object","of","on","or","outer","override","package","parallel","pragma","private","protected","public","retrieve","return","returning","rollback","savepoint","search","select","set","short","sort","stat","static","strictfp","super","switch","synchronized","system","testmethod","then","this","this_month","this_week","throw","throws","today","tolabel","tomorrow","transaction","transient","trigger","true","try","type","undelete","update","upsert","using","virtual","void","volatile","webservice","when","where","while","yesterday"],DCe=function(r){return r.charAt(0).toUpperCase()+r.substr(1)},TC=[];ICe.forEach(function(r){TC.push(r),TC.push(r.toUpperCase()),TC.push(DCe(r))});var ACe={defaultToken:"",tokenPostfix:".apex",keywords:TC,operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[a-z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@apexdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],apexdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}},NCe=Object.freeze(Object.defineProperty({__proto__:null,conf:TCe,language:ACe},Symbol.toStringTag,{value:"Module"})),RCe={comments:{lineComment:"#"}},OCe={defaultToken:"keyword",ignoreCase:!0,tokenPostfix:".azcli",str:/[^#\s]/,tokenizer:{root:[{include:"@comment"},[/\s-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}],[/^-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":{token:"key.identifier",next:"@type"}}}]],type:[{include:"@comment"},[/-+@str*\s*/,{cases:{"@eos":{token:"key.identifier",next:"@popall"},"@default":"key.identifier"}}],[/@str+\s*/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}]],comment:[[/#.*$/,{cases:{"@eos":{token:"comment",next:"@popall"}}}]]}},MCe=Object.freeze(Object.defineProperty({__proto__:null,conf:RCe,language:OCe},Symbol.toStringTag,{value:"Module"})),PCe={comments:{lineComment:"REM"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|REM\\s+)#region"),end:new RegExp("^\\s*(::\\s*|REM\\s+)#endregion")}}},FCe={defaultToken:"",ignoreCase:!0,tokenPostfix:".bat",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:/call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/,symbols:/[=><!~?&|+\-*\/\^;\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)(rem(?:\s.*|))$/,["","comment"]],[/(\@?)(@keywords)(?!\w)/,[{token:"keyword"},{token:"keyword.$2"}]],[/[ \t\r\n]+/,""],[/setlocal(?!\w)/,"keyword.tag-setlocal"],[/endlocal(?!\w)/,"keyword.tag-setlocal"],[/[a-zA-Z_]\w*/,""],[/:\w*/,"metatag"],[/%[^%]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],string:[[/[^\\"'%]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/%[\w ]+%/,"variable"],[/%%[\w]+(?!\w)/,"variable"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/$/,"string","@popall"]]}},BCe=Object.freeze(Object.defineProperty({__proto__:null,conf:PCe,language:FCe},Symbol.toStringTag,{value:"Module"})),WCe=function(r){return"\\b"+r+"\\b"},VCe="[_a-zA-Z]",HCe="[_a-zA-Z0-9]",$Ce=WCe(""+VCe+HCe+"*"),UCe=["targetScope","resource","module","param","var","output","for","in","if","existing"],zCe=["true","false","null"],jCe="[ \\t\\r\\n]",qCe="[0-9]+",GCe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:"'''",close:"'''"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:"'''",close:"'''",notIn:["string","comment"]}],autoCloseBefore:`:.,=}])' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},KCe={defaultToken:"",tokenPostfix:".bicep",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~?:&|+\-*/^%]+/,keywords:UCe,namedLiterals:zCe,escapes:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",tokenizer:{root:[{include:"@expression"},{include:"@whitespace"}],stringVerbatim:[{regex:"(|'|'')[^']",action:{token:"string"}},{regex:"'''",action:{token:"string.quote",next:"@pop"}}],stringLiteral:[{regex:"\\${",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"[^\\\\'$]+",action:{token:"string"}},{regex:"@escapes",action:{token:"string.escape"}},{regex:"\\\\.",action:{token:"string.escape.invalid"}},{regex:"'",action:{token:"string",next:"@pop"}}],bracketCounting:[{regex:"{",action:{token:"delimiter.bracket",next:"@bracketCounting"}},{regex:"}",action:{token:"delimiter.bracket",next:"@pop"}},{include:"expression"}],comment:[{regex:"[^\\*]+",action:{token:"comment"}},{regex:"\\*\\/",action:{token:"comment",next:"@pop"}},{regex:"[\\/*]",action:{token:"comment"}}],whitespace:[{regex:jCe},{regex:"\\/\\*",action:{token:"comment",next:"@comment"}},{regex:"\\/\\/.*$",action:{token:"comment"}}],expression:[{regex:"'''",action:{token:"string.quote",next:"@stringVerbatim"}},{regex:"'",action:{token:"string.quote",next:"@stringLiteral"}},{regex:qCe,action:{token:"number"}},{regex:$Ce,action:{cases:{"@keywords":{token:"keyword"},"@namedLiterals":{token:"keyword"},"@default":{token:"identifier"}}}}]}},YCe=Object.freeze(Object.defineProperty({__proto__:null,conf:GCe,language:KCe},Symbol.toStringTag,{value:"Module"})),ZCe={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},XCe={defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},QCe=Object.freeze(Object.defineProperty({__proto__:null,conf:ZCe,language:XCe},Symbol.toStringTag,{value:"Module"})),JCe={comments:{lineComment:";;"},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}],surroundingPairs:[{open:"[",close:"]"},{open:'"',close:'"'},{open:"(",close:")"},{open:"{",close:"}"}]},ewe={defaultToken:"",ignoreCase:!0,tokenPostfix:".clj",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"}],constants:["true","false","nil"],numbers:/^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/,characters:/^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/,escapes:/^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,qualifiedSymbols:/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,specialForms:[".","catch","def","do","if","monitor-enter","monitor-exit","new","quote","recur","set!","throw","try","var"],coreSymbols:["*","*'","*1","*2","*3","*agent*","*allow-unresolved-vars*","*assert*","*clojure-version*","*command-line-args*","*compile-files*","*compile-path*","*compiler-options*","*data-readers*","*default-data-reader-fn*","*e","*err*","*file*","*flush-on-newline*","*fn-loader*","*in*","*math-context*","*ns*","*out*","*print-dup*","*print-length*","*print-level*","*print-meta*","*print-namespace-maps*","*print-readably*","*read-eval*","*reader-resolver*","*source-path*","*suppress-read*","*unchecked-math*","*use-context-classloader*","*verbose-defrecords*","*warn-on-reflection*","+","+'","-","-'","->","->>","->ArrayChunk","->Eduction","->Vec","->VecNode","->VecSeq","-cache-protocol-fn","-reset-methods","..","/","<","<=","=","==",">",">=","EMPTY-NODE","Inst","StackTraceElement->vec","Throwable->map","accessor","aclone","add-classpath","add-watch","agent","agent-error","agent-errors","aget","alength","alias","all-ns","alter","alter-meta!","alter-var-root","amap","ancestors","and","any?","apply","areduce","array-map","as->","aset","aset-boolean","aset-byte","aset-char","aset-double","aset-float","aset-int","aset-long","aset-short","assert","assoc","assoc!","assoc-in","associative?","atom","await","await-for","await1","bases","bean","bigdec","bigint","biginteger","binding","bit-and","bit-and-not","bit-clear","bit-flip","bit-not","bit-or","bit-set","bit-shift-left","bit-shift-right","bit-test","bit-xor","boolean","boolean-array","boolean?","booleans","bound-fn","bound-fn*","bound?","bounded-count","butlast","byte","byte-array","bytes","bytes?","case","cast","cat","char","char-array","char-escape-string","char-name-string","char?","chars","chunk","chunk-append","chunk-buffer","chunk-cons","chunk-first","chunk-next","chunk-rest","chunked-seq?","class","class?","clear-agent-errors","clojure-version","coll?","comment","commute","comp","comparator","compare","compare-and-set!","compile","complement","completing","concat","cond","cond->","cond->>","condp","conj","conj!","cons","constantly","construct-proxy","contains?","count","counted?","create-ns","create-struct","cycle","dec","dec'","decimal?","declare","dedupe","default-data-readers","definline","definterface","defmacro","defmethod","defmulti","defn","defn-","defonce","defprotocol","defrecord","defstruct","deftype","delay","delay?","deliver","denominator","deref","derive","descendants","destructure","disj","disj!","dissoc","dissoc!","distinct","distinct?","doall","dorun","doseq","dosync","dotimes","doto","double","double-array","double?","doubles","drop","drop-last","drop-while","eduction","empty","empty?","ensure","ensure-reduced","enumeration-seq","error-handler","error-mode","eval","even?","every-pred","every?","ex-data","ex-info","extend","extend-protocol","extend-type","extenders","extends?","false?","ffirst","file-seq","filter","filterv","find","find-keyword","find-ns","find-protocol-impl","find-protocol-method","find-var","first","flatten","float","float-array","float?","floats","flush","fn","fn?","fnext","fnil","for","force","format","frequencies","future","future-call","future-cancel","future-cancelled?","future-done?","future?","gen-class","gen-interface","gensym","get","get-in","get-method","get-proxy-class","get-thread-bindings","get-validator","group-by","halt-when","hash","hash-combine","hash-map","hash-ordered-coll","hash-set","hash-unordered-coll","ident?","identical?","identity","if-let","if-not","if-some","ifn?","import","in-ns","inc","inc'","indexed?","init-proxy","inst-ms","inst-ms*","inst?","instance?","int","int-array","int?","integer?","interleave","intern","interpose","into","into-array","ints","io!","isa?","iterate","iterator-seq","juxt","keep","keep-indexed","key","keys","keyword","keyword?","last","lazy-cat","lazy-seq","let","letfn","line-seq","list","list*","list?","load","load-file","load-reader","load-string","loaded-libs","locking","long","long-array","longs","loop","macroexpand","macroexpand-1","make-array","make-hierarchy","map","map-entry?","map-indexed","map?","mapcat","mapv","max","max-key","memfn","memoize","merge","merge-with","meta","method-sig","methods","min","min-key","mix-collection-hash","mod","munge","name","namespace","namespace-munge","nat-int?","neg-int?","neg?","newline","next","nfirst","nil?","nnext","not","not-any?","not-empty","not-every?","not=","ns","ns-aliases","ns-imports","ns-interns","ns-map","ns-name","ns-publics","ns-refers","ns-resolve","ns-unalias","ns-unmap","nth","nthnext","nthrest","num","number?","numerator","object-array","odd?","or","parents","partial","partition","partition-all","partition-by","pcalls","peek","persistent!","pmap","pop","pop!","pop-thread-bindings","pos-int?","pos?","pr","pr-str","prefer-method","prefers","primitives-classnames","print","print-ctor","print-dup","print-method","print-simple","print-str","printf","println","println-str","prn","prn-str","promise","proxy","proxy-call-with-super","proxy-mappings","proxy-name","proxy-super","push-thread-bindings","pvalues","qualified-ident?","qualified-keyword?","qualified-symbol?","quot","rand","rand-int","rand-nth","random-sample","range","ratio?","rational?","rationalize","re-find","re-groups","re-matcher","re-matches","re-pattern","re-seq","read","read-line","read-string","reader-conditional","reader-conditional?","realized?","record?","reduce","reduce-kv","reduced","reduced?","reductions","ref","ref-history-count","ref-max-history","ref-min-history","ref-set","refer","refer-clojure","reify","release-pending-sends","rem","remove","remove-all-methods","remove-method","remove-ns","remove-watch","repeat","repeatedly","replace","replicate","require","reset!","reset-meta!","reset-vals!","resolve","rest","restart-agent","resultset-seq","reverse","reversible?","rseq","rsubseq","run!","satisfies?","second","select-keys","send","send-off","send-via","seq","seq?","seqable?","seque","sequence","sequential?","set","set-agent-send-executor!","set-agent-send-off-executor!","set-error-handler!","set-error-mode!","set-validator!","set?","short","short-array","shorts","shuffle","shutdown-agents","simple-ident?","simple-keyword?","simple-symbol?","slurp","some","some->","some->>","some-fn","some?","sort","sort-by","sorted-map","sorted-map-by","sorted-set","sorted-set-by","sorted?","special-symbol?","spit","split-at","split-with","str","string?","struct","struct-map","subs","subseq","subvec","supers","swap!","swap-vals!","symbol","symbol?","sync","tagged-literal","tagged-literal?","take","take-last","take-nth","take-while","test","the-ns","thread-bound?","time","to-array","to-array-2d","trampoline","transduce","transient","tree-seq","true?","type","unchecked-add","unchecked-add-int","unchecked-byte","unchecked-char","unchecked-dec","unchecked-dec-int","unchecked-divide-int","unchecked-double","unchecked-float","unchecked-inc","unchecked-inc-int","unchecked-int","unchecked-long","unchecked-multiply","unchecked-multiply-int","unchecked-negate","unchecked-negate-int","unchecked-remainder-int","unchecked-short","unchecked-subtract","unchecked-subtract-int","underive","unquote","unquote-splicing","unreduced","unsigned-bit-shift-right","update","update-in","update-proxy","uri?","use","uuid?","val","vals","var-get","var-set","var?","vary-meta","vec","vector","vector-of","vector?","volatile!","volatile?","vreset!","vswap!","when","when-first","when-let","when-not","when-some","while","with-bindings","with-bindings*","with-in-str","with-loading-context","with-local-vars","with-meta","with-open","with-out-str","with-precision","with-redefs","with-redefs-fn","xml-seq","zero?","zipmap"],tokenizer:{root:[{include:"@whitespace"},[/@numbers/,"number"],[/@characters/,"string"],{include:"@string"},[/[()\[\]{}]/,"@brackets"],[/\/#"(?:\.|(?:")|[^"\n])*"\/g/,"regexp"],[/[#'@^`~]/,"meta"],[/@qualifiedSymbols/,{cases:{"^:.+$":"constant","@specialForms":"keyword","@coreSymbols":"keyword","@constants":"constant","@default":"identifier"}}]],whitespace:[[/[\s,]+/,"white"],[/;.*$/,"comment"],[/\(comment\b/,"comment","@comment"]],comment:[[/\(/,"comment","@push"],[/\)/,"comment","@pop"],[/[^()]/,"comment"]],string:[[/"/,"string","@multiLineString"]],multiLineString:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/./,"string"]]}},twe=Object.freeze(Object.defineProperty({__proto__:null,conf:JCe,language:ewe},Symbol.toStringTag,{value:"Module"})),iwe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},nwe={defaultToken:"",ignoreCase:!0,tokenPostfix:".coffee",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:["and","or","is","isnt","not","on","yes","@","no","off","true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","if","else","switch","for","while","do","try","catch","finally","class","extends","super","undefined","then","unless","until","loop","of","by","when"],symbols:/[=><!~?&%|+\-*\/\^\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@[a-zA-Z_]\w*/,"variable.predefined"],[/[a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/###/,"comment","@comment"],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\()(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\=)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\[)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\!)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\&)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\|)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\?)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\{)(\s*)(@regEx)/,["@brackets","","regexp"]],[/(\;)(\s*)(@regEx)/,["","","regexp"]],[/}/,{cases:{"$S2==interpolatedstring":{token:"string",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/###/,"comment","@pop"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}},rwe=Object.freeze(Object.defineProperty({__proto__:null,conf:iwe,language:nwe},Symbol.toStringTag,{value:"Module"})),swe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},owe={defaultToken:"",tokenPostfix:".cpp",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","for","friend","gcnew","generic","goto","if","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,floatsuffix:/[fFlL]?/,encoding:/u|u8|U|L/,tokenizer:{root:[[/@encoding?R\"(?:([^ ()\\\t]*))\(/,{token:"string.raw.begin",next:"@raw.$1"}],[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/^\s*#\s*include/,{token:"keyword.directive.include",next:"@include"}],[/^\s*#\s*\w+/,"keyword.directive"],{include:"@whitespace"},[/\[\s*\[/,{token:"annotation",next:"@annotation"}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*\\$/,"comment","@linecomment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],linecomment:[[/.*[^\\]$/,"comment","@pop"],[/[^]+/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],raw:[[/(.*)(\))(?:([^ ()\\\t"]*))(\")/,{cases:{"$3==$S2":["string.raw","string.raw.end","string.raw.end",{token:"string.raw.end",next:"@pop"}],"@default":["string.raw","string.raw","string.raw","string.raw"]}}],[/.*/,"string.raw"]],annotation:[{include:"@whitespace"},[/using|alignas/,"keyword"],[/[a-zA-Z0-9_]+/,"annotation"],[/[,:]/,"delimiter"],[/[()]/,"@brackets"],[/\]\s*\]/,{token:"annotation",next:"@pop"}]],include:[[/(\s*)(<)([^<>]*)(>)/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]],[/(\s*)(")([^"]*)(")/,["","keyword.directive.include.begin","string.include.identifier",{token:"keyword.directive.include.end",next:"@pop"}]]]}},LH=Object.freeze(Object.defineProperty({__proto__:null,conf:swe,language:owe},Symbol.toStringTag,{value:"Module"})),awe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},lwe={defaultToken:"",tokenPostfix:".cs",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["extern","alias","using","bool","decimal","sbyte","byte","short","ushort","int","uint","long","ulong","char","float","double","object","dynamic","string","assembly","is","as","ref","out","this","base","new","typeof","void","checked","unchecked","default","delegate","var","const","if","else","switch","case","while","do","for","foreach","in","break","continue","goto","return","throw","try","catch","finally","lock","yield","from","let","where","join","on","equals","into","orderby","ascending","descending","select","group","by","namespace","partial","class","field","event","method","param","public","protected","internal","private","abstract","sealed","static","struct","readonly","volatile","virtual","override","params","get","set","add","remove","operator","true","false","implicit","explicit","interface","enum","null","async","await","fixed","sizeof","stackalloc","unsafe","nameof","when"],namespaceFollows:["namespace","using"],parenFollows:["if","for","while","switch","foreach","using","catch","when"],operators:["=","??","||","&&","|","^","&","==","!=","<=",">=","<<","+","-","*","/","%","!","~","++","--","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=",">>","=>"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\@?[a-zA-Z_]\w*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@keywords":{token:"keyword.$0",next:"@qualified"},"@default":{token:"identifier",next:"@qualified"}}}],{include:"@whitespace"},[/}/,{cases:{"$S2==interpolatedstring":{token:"string.quote",next:"@pop"},"$S2==litinterpstring":{token:"string.quote",next:"@pop"},"@default":"@brackets"}}],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?[fFdD]?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01_]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",next:"@string"}],[/\$\@"/,{token:"string.quote",next:"@litinterpstring"}],[/\@"/,{token:"string.quote",next:"@litstring"}],[/\$"/,{token:"string.quote",next:"@interpolatedstring"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],qualified:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/\./,"delimiter"],["","","@pop"]],namespace:[{include:"@whitespace"},[/[A-Z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]],litinterpstring:[[/[^"{]+/,"string"],[/""/,"string.escape"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.litinterpstring"}],[/"/,{token:"string.quote",next:"@pop"}]],interpolatedstring:[[/[^\\"{]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/{{/,"string.escape"],[/}}/,"string.escape"],[/{/,{token:"string.quote",next:"root.interpolatedstring"}],[/"/,{token:"string.quote",next:"@pop"}]],whitespace:[[/^[ \t\v\f]*#((r)|(load))(?=\s)/,"directive.csx"],[/^[ \t\v\f]*#\w.*$/,"namespace.cpp"],[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},cwe=Object.freeze(Object.defineProperty({__proto__:null,conf:awe,language:lwe},Symbol.toStringTag,{value:"Module"})),dwe={brackets:[],autoClosingPairs:[],surroundingPairs:[]},uwe={keywords:[],typeKeywords:[],tokenPostfix:".csp",operators:[],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/child-src/,"string.quote"],[/connect-src/,"string.quote"],[/default-src/,"string.quote"],[/font-src/,"string.quote"],[/frame-src/,"string.quote"],[/img-src/,"string.quote"],[/manifest-src/,"string.quote"],[/media-src/,"string.quote"],[/object-src/,"string.quote"],[/script-src/,"string.quote"],[/style-src/,"string.quote"],[/worker-src/,"string.quote"],[/base-uri/,"string.quote"],[/plugin-types/,"string.quote"],[/sandbox/,"string.quote"],[/disown-opener/,"string.quote"],[/form-action/,"string.quote"],[/frame-ancestors/,"string.quote"],[/report-uri/,"string.quote"],[/report-to/,"string.quote"],[/upgrade-insecure-requests/,"string.quote"],[/block-all-mixed-content/,"string.quote"],[/require-sri-for/,"string.quote"],[/reflected-xss/,"string.quote"],[/referrer/,"string.quote"],[/policy-uri/,"string.quote"],[/'self'/,"string.quote"],[/'unsafe-inline'/,"string.quote"],[/'unsafe-eval'/,"string.quote"],[/'strict-dynamic'/,"string.quote"],[/'unsafe-hashed-attributes'/,"string.quote"]]}},hwe=Object.freeze(Object.defineProperty({__proto__:null,conf:dwe,language:uwe},Symbol.toStringTag,{value:"Module"})),fwe={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},gwe={defaultToken:"",tokenPostfix:".css",ws:`[ +\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}},pwe=Object.freeze(Object.defineProperty({__proto__:null,conf:fwe,language:gwe},Symbol.toStringTag,{value:"Module"})),mwe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:"(",close:")"},{open:'"',close:'"'},{open:"`",close:"`"}],folding:{markers:{start:/^\s*\s*#?region\b/,end:/^\s*\s*#?endregion\b/}}},_we={defaultToken:"invalid",tokenPostfix:".dart",keywords:["abstract","dynamic","implements","show","as","else","import","static","assert","enum","in","super","async","export","interface","switch","await","extends","is","sync","break","external","library","this","case","factory","mixin","throw","catch","false","new","true","class","final","null","try","const","finally","on","typedef","continue","for","operator","var","covariant","Function","part","void","default","get","rethrow","while","deferred","hide","return","with","do","if","set","yield"],typeKeywords:["int","double","String","bool"],operators:["+","-","*","/","~/","%","++","--","==","!=",">","<",">=","<=","=","-=","/=","%=",">>=","^=","+=","*=","~/=","<<=","&=","!=","||","&&","&","|","^","~","<<",">>","!",">>>","??","?",":","|="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@typeKeywords":"type.identifier","@keywords":"keyword","@default":"identifier"}}],[/[A-Z_$][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/@[a-zA-Z]+/,"annotation"],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/\/.*$/,"comment.doc"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([gimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"\$]+/,"string"],[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"],[/\$\w+/,"identifier"]],string_single:[[/[^\\'\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"],[/\$\w+/,"identifier"]]}},bwe=Object.freeze(Object.defineProperty({__proto__:null,conf:mwe,language:_we},Symbol.toStringTag,{value:"Module"})),vwe={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Cwe={defaultToken:"",tokenPostfix:".dockerfile",variable:/\${?[\w]+}?/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/(ONBUILD)(\s+)/,["keyword",""]],[/(ENV)(\s+)([\w]+)/,["keyword","",{token:"variable",next:"@arguments"}]],[/(FROM|MAINTAINER|RUN|EXPOSE|ENV|ADD|ARG|VOLUME|LABEL|USER|WORKDIR|COPY|CMD|STOPSIGNAL|SHELL|HEALTHCHECK|ENTRYPOINT)/,{token:"keyword",next:"@arguments"}]],arguments:[{include:"@whitespace"},{include:"@strings"},[/(@variable)/,{cases:{"@eos":{token:"variable",next:"@popall"},"@default":"variable"}}],[/\\/,{cases:{"@eos":"","@default":""}}],[/./,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],whitespace:[[/\s+/,{cases:{"@eos":{token:"",next:"@popall"},"@default":""}}]],comment:[[/(^#.*$)/,"comment","@popall"]],strings:[[/\\'$/,"","@popall"],[/\\'/,""],[/'$/,"string","@popall"],[/'/,"string","@stringBody"],[/"$/,"string","@popall"],[/"/,"string","@dblStringBody"]],stringBody:[[/[^\\\$']/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/'$/,"string","@popall"],[/'/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]],dblStringBody:[[/[^\\\$"]/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/\\./,"string.escape"],[/"$/,"string","@popall"],[/"/,"string","@pop"],[/(@variable)/,"variable"],[/\\$/,"string"],[/$/,"string","@popall"]]}},wwe=Object.freeze(Object.defineProperty({__proto__:null,conf:vwe,language:Cwe},Symbol.toStringTag,{value:"Module"})),ywe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}]},Swe={defaultToken:"",tokenPostfix:".ecl",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],pounds:["append","break","declare","demangle","end","for","getdatatype","if","inmodule","loop","mangle","onwarning","option","set","stored","uniquename"].join("|"),keywords:["__compressed__","after","all","and","any","as","atmost","before","beginc","best","between","case","cluster","compressed","compression","const","counter","csv","default","descend","embed","encoding","encrypt","end","endc","endembed","endmacro","enum","escape","except","exclusive","expire","export","extend","fail","few","fileposition","first","flat","forward","from","full","function","functionmacro","group","grouped","heading","hole","ifblock","import","in","inner","interface","internal","joined","keep","keyed","last","left","limit","linkcounted","literal","little_endian","load","local","locale","lookup","lzw","macro","many","maxcount","maxlength","min skew","module","mofn","multiple","named","namespace","nocase","noroot","noscan","nosort","not","noxpath","of","onfail","only","opt","or","outer","overwrite","packed","partition","penalty","physicallength","pipe","prefetch","quote","record","repeat","retry","return","right","right1","right2","rows","rowset","scan","scope","self","separator","service","shared","skew","skip","smart","soapaction","sql","stable","store","terminator","thor","threshold","timelimit","timeout","token","transform","trim","type","unicodeorder","unordered","unsorted","unstable","update","use","validate","virtual","whole","width","wild","within","wnotrim","xml","xpath"],functions:["abs","acos","aggregate","allnodes","apply","ascii","asin","assert","asstring","atan","atan2","ave","build","buildindex","case","catch","choose","choosen","choosesets","clustersize","combine","correlation","cos","cosh","count","covariance","cron","dataset","dedup","define","denormalize","dictionary","distribute","distributed","distribution","ebcdic","enth","error","evaluate","event","eventextra","eventname","exists","exp","fail","failcode","failmessage","fetch","fromunicode","fromxml","getenv","getisvalid","global","graph","group","hash","hash32","hash64","hashcrc","hashmd5","having","httpcall","httpheader","if","iff","index","intformat","isvalid","iterate","join","keydiff","keypatch","keyunicode","length","library","limit","ln","loadxml","local","log","loop","map","matched","matchlength","matchposition","matchtext","matchunicode","max","merge","mergejoin","min","nofold","nolocal","nonempty","normalize","nothor","notify","output","parallel","parse","pipe","power","preload","process","project","pull","random","range","rank","ranked","realformat","recordof","regexfind","regexreplace","regroup","rejected","rollup","round","roundup","row","rowdiff","sample","sequential","set","sin","sinh","sizeof","soapcall","sort","sorted","sqrt","stepped","stored","sum","table","tan","tanh","thisnode","topn","tounicode","toxml","transfer","transform","trim","truncate","typeof","ungroup","unicodeorder","variance","wait","which","workunit","xmldecode","xmlencode","xmltext","xmlunicode"],typesint:["integer","unsigned"].join("|"),typesnum:["data","qstring","string","unicode","utf8","varstring","varunicode"],typesone:["ascii","big_endian","boolean","data","decimal","ebcdic","grouped","integer","linkcounted","pattern","qstring","real","record","rule","set of","streamed","string","token","udecimal","unicode","unsigned","utf8","varstring","varunicode"].join("|"),operators:["+","-","/",":=","<","<>","=",">","\\","and","in","not","or"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/@typesint[4|8]/,"type"],[/#(@pounds)/,"type"],[/@typesone/,"type"],[/[a-zA-Z_$][\w-$]*/,{cases:{"@functions":"keyword.function","@keywords":"keyword","@operators":"operator"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]+/,"number.hex"],[/0[bB][01]+/,"number.hex"],[/[0-9_]+/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\v\f\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]]}},xwe=Object.freeze(Object.defineProperty({__proto__:null,conf:ywe,language:Swe},Symbol.toStringTag,{value:"Module"})),Ewe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"'",close:"'"},{open:'"',close:'"'}],autoClosingPairs:[{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["comment"]},{open:'"""',close:'"""'},{open:"`",close:"`",notIn:["string","comment"]},{open:"(",close:")"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"<<",close:">>"}],indentationRules:{increaseIndentPattern:/^\s*(after|else|catch|rescue|fn|[^#]*(do|<\-|\->|\{|\[|\=))\s*$/,decreaseIndentPattern:/^\s*((\}|\])\s*$|(after|else|catch|rescue|end)\b)/}},kwe={defaultToken:"source",tokenPostfix:".elixir",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"<<",close:">>",token:"delimiter.angle.special"}],declarationKeywords:["def","defp","defn","defnp","defguard","defguardp","defmacro","defmacrop","defdelegate","defcallback","defmacrocallback","defmodule","defprotocol","defexception","defimpl","defstruct"],operatorKeywords:["and","in","not","or","when"],namespaceKeywords:["alias","import","require","use"],otherKeywords:["after","case","catch","cond","do","else","end","fn","for","if","quote","raise","receive","rescue","super","throw","try","unless","unquote_splicing","unquote","with"],constants:["true","false","nil"],nameBuiltin:["__MODULE__","__DIR__","__ENV__","__CALLER__","__STACKTRACE__"],operator:/-[->]?|!={0,2}|\*|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/,variableName:/[a-z_][a-zA-Z0-9_]*[?!]?/,atomName:/[a-zA-Z_][a-zA-Z0-9_@]*[?!]?|@specialAtomName|@operator/,specialAtomName:/\.\.\.|<<>>|%\{\}|%|\{\}/,aliasPart:/[A-Z][a-zA-Z0-9_]*/,moduleName:/@aliasPart(?:\.@aliasPart)*/,sigilSymmetricDelimiter:/"""|'''|"|'|\/|\|/,sigilStartDelimiter:/@sigilSymmetricDelimiter|<|\{|\[|\(/,sigilEndDelimiter:/@sigilSymmetricDelimiter|>|\}|\]|\)/,decimal:/\d(?:_?\d)*/,hex:/[0-9a-fA-F](_?[0-9a-fA-F])*/,octal:/[0-7](_?[0-7])*/,binary:/[01](_?[01])*/,escape:/\\u[0-9a-fA-F]{4}|\\x[0-9a-fA-F]{2}|\\./,tokenizer:{root:[{include:"@whitespace"},{include:"@comments"},{include:"@keywordsShorthand"},{include:"@numbers"},{include:"@identifiers"},{include:"@strings"},{include:"@atoms"},{include:"@sigils"},{include:"@attributes"},{include:"@symbols"}],whitespace:[[/\s+/,"white"]],comments:[[/(#)(.*)/,["comment.punctuation","comment"]]],keywordsShorthand:[[/(@atomName)(:)/,["constant","constant.punctuation"]],[/"(?=([^"]|#\{.*?\}|\\")*":)/,{token:"constant.delimiter",next:"@doubleQuotedStringKeyword"}],[/'(?=([^']|#\{.*?\}|\\')*':)/,{token:"constant.delimiter",next:"@singleQuotedStringKeyword"}]],doubleQuotedStringKeyword:[[/":/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringKeyword:[[/':/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],numbers:[[/0b@binary/,"number.binary"],[/0o@octal/,"number.octal"],[/0x@hex/,"number.hex"],[/@decimal\.@decimal([eE]-?@decimal)?/,"number.float"],[/@decimal/,"number"]],identifiers:[[/\b(defp?|defnp?|defmacrop?|defguardp?|defdelegate)(\s+)(@variableName)(?!\s+@operator)/,["keyword.declaration","white",{cases:{unquote:"keyword","@default":"function"}}]],[/(@variableName)(?=\s*\.?\s*\()/,{cases:{"@declarationKeywords":"keyword.declaration","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@default":"function.call"}}],[/(@moduleName)(\s*)(\.)(\s*)(@variableName)/,["type.identifier","white","operator","white","function.call"]],[/(:)(@atomName)(\s*)(\.)(\s*)(@variableName)/,["constant.punctuation","constant","white","operator","white","function.call"]],[/(\|>)(\s*)(@variableName)/,["operator","white",{cases:{"@otherKeywords":"keyword","@default":"function.call"}}]],[/(&)(\s*)(@variableName)/,["operator","white","function.call"]],[/@variableName/,{cases:{"@declarationKeywords":"keyword.declaration","@operatorKeywords":"keyword.operator","@namespaceKeywords":"keyword","@otherKeywords":"keyword","@constants":"constant.language","@nameBuiltin":"variable.language","_.*":"comment.unused","@default":"identifier"}}],[/@moduleName/,"type.identifier"]],strings:[[/"""/,{token:"string.delimiter",next:"@doubleQuotedHeredoc"}],[/'''/,{token:"string.delimiter",next:"@singleQuotedHeredoc"}],[/"/,{token:"string.delimiter",next:"@doubleQuotedString"}],[/'/,{token:"string.delimiter",next:"@singleQuotedString"}]],doubleQuotedHeredoc:[[/"""/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedHeredoc:[[/'''/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],doubleQuotedString:[[/"/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],singleQuotedString:[[/'/,{token:"string.delimiter",next:"@pop"}],{include:"@stringContentInterpol"}],atoms:[[/(:)(@atomName)/,["constant.punctuation","constant"]],[/:"/,{token:"constant.delimiter",next:"@doubleQuotedStringAtom"}],[/:'/,{token:"constant.delimiter",next:"@singleQuotedStringAtom"}]],doubleQuotedStringAtom:[[/"/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],singleQuotedStringAtom:[[/'/,{token:"constant.delimiter",next:"@pop"}],{include:"@stringConstantContentInterpol"}],sigils:[[/~[a-z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.interpol"}],[/~[A-Z]@sigilStartDelimiter/,{token:"@rematch",next:"@sigil.noInterpol"}]],sigil:[[/~([a-zA-Z])\{/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.{.}"}],[/~([a-zA-Z])\[/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.[.]"}],[/~([a-zA-Z])\(/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.(.)"}],[/~([a-zA-Z])\</,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.<.>"}],[/~([a-zA-Z])(@sigilSymmetricDelimiter)/,{token:"@rematch",switchTo:"@sigilStart.$S2.$1.$2.$2"}]],"sigilStart.interpol.s":[[/~s@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.s":[[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContentInterpol"}],"sigilStart.noInterpol.S":[[/~S@sigilStartDelimiter/,{token:"string.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.S":[[/(^|[^\\])\\@sigilEndDelimiter/,"string"],[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"string.delimiter",next:"@pop"},"@default":"string"}}],{include:"@stringContent"}],"sigilStart.interpol.r":[[/~r@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol.r":[[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContentInterpol"}],"sigilStart.noInterpol.R":[[/~R@sigilStartDelimiter/,{token:"regexp.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol.R":[[/(^|[^\\])\\@sigilEndDelimiter/,"regexp"],[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"regexp.delimiter",next:"@pop"},"@default":"regexp"}}],{include:"@regexpContent"}],"sigilStart.interpol":[[/~([a-zA-Z])@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.interpol":[[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContentInterpol"}],"sigilStart.noInterpol":[[/~([a-zA-Z])@sigilStartDelimiter/,{token:"sigil.delimiter",switchTo:"@sigilContinue.$S2.$S3.$S4.$S5"}]],"sigilContinue.noInterpol":[[/(^|[^\\])\\@sigilEndDelimiter/,"sigil"],[/(@sigilEndDelimiter)[a-zA-Z]*/,{cases:{"$1==$S5":{token:"sigil.delimiter",next:"@pop"},"@default":"sigil"}}],{include:"@sigilContent"}],attributes:[[/\@(module|type)?doc (~[sS])?"""/,{token:"comment.block.documentation",next:"@doubleQuotedHeredocDocstring"}],[/\@(module|type)?doc (~[sS])?"/,{token:"comment.block.documentation",next:"@doubleQuotedStringDocstring"}],[/\@(module|type)?doc false/,"comment.block.documentation"],[/\@(@variableName)/,"variable"]],doubleQuotedHeredocDocstring:[[/"""/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],doubleQuotedStringDocstring:[[/"/,{token:"comment.block.documentation",next:"@pop"}],{include:"@docstringContent"}],symbols:[[/\?(\\.|[^\\\s])/,"number.constant"],[/&\d+/,"operator"],[/<<<|>>>/,"operator"],[/[()\[\]\{\}]|<<|>>/,"@brackets"],[/\.\.\./,"identifier"],[/=>/,"punctuation"],[/@operator/,"operator"],[/[:;,.%]/,"punctuation"]],stringContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringContent"}],stringContent:[[/./,"string"]],stringConstantContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@stringConstantContent"}],stringConstantContent:[[/./,"constant"]],regexpContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@regexpContent"}],regexpContent:[[/(\s)(#)(\s.*)$/,["white","comment.punctuation","comment"]],[/./,"regexp"]],sigilContentInterpol:[{include:"@interpolation"},{include:"@escapeChar"},{include:"@sigilContent"}],sigilContent:[[/./,"sigil"]],docstringContent:[[/./,"comment.block.documentation"]],escapeChar:[[/@escape/,"constant.character.escape"]],interpolation:[[/#{/,{token:"delimiter.bracket.embed",next:"@interpolationContinue"}]],interpolationContinue:[[/}/,{token:"delimiter.bracket.embed",next:"@pop"}],{include:"@root"}]}},Lwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Ewe,language:kwe},Symbol.toStringTag,{value:"Module"})),Twe={comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},Iwe={defaultToken:"",tokenPostfix:".flow",keywords:["import","require","export","forbid","native","if","else","cast","unsafe","switch","default"],types:["io","mutable","bool","int","double","string","flow","void","ref","true","false","with"],operators:["=",">","<","<=",">=","==","!","!=",":=","::=","&&","||","+","-","*","/","@","&","%",":","->","\\","$","??","^"],symbols:/[@$=><!~?:&|+\-*\\\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@types":"type","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"delimiter"],[/[<>](?!@symbols)/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/((0(x|X)[0-9a-fA-F]*)|(([0-9]+\.?[0-9]*)|(\.[0-9]+))((e|E)(\+|-)?[0-9]+)?)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}},Dwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Twe,language:Iwe},Symbol.toStringTag,{value:"Module"})),Awe={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*#region\\b|^\\s*\\(\\*\\s*#region(.*)\\*\\)"),end:new RegExp("^\\s*//\\s*#endregion\\b|^\\s*\\(\\*\\s*#endregion\\s*\\*\\)")}}},Nwe={defaultToken:"",tokenPostfix:".fs",keywords:["abstract","and","atomic","as","assert","asr","base","begin","break","checked","component","const","constraint","constructor","continue","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","eager","event","external","extern","false","finally","for","fun","function","fixed","functor","global","if","in","include","inherit","inline","interface","internal","land","lor","lsl","lsr","lxor","lazy","let","match","member","mod","module","mutable","namespace","method","mixin","new","not","null","of","open","or","object","override","private","parallel","process","protected","pure","public","rec","return","static","sealed","struct","sig","then","to","true","tailcall","trait","try","type","upcast","use","val","void","virtual","volatile","when","while","with","yield"],symbols:/[=><!~?:&|+\-*\^%;\.,\/]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/[uU]?[yslnLI]?/,floatsuffix:/[fFmM]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[<.*>\]/,"annotation"],[/^#(if|else|endif)/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0x[0-9a-fA-F]+LF/,"number.float"],[/0x[0-9a-fA-F]+(@integersuffix)/,"number.hex"],[/0b[0-1]+(@integersuffix)/,"number.bin"],[/\d+(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string",'@string."""'],[/"/,"string",'@string."'],[/\@"/,{token:"string.quote",next:"@litstring"}],[/'[^\\']'B?/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\(\*(?!\))/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^*(]+/,"comment"],[/\*\)/,"comment","@pop"],[/\*/,"comment"],[/\(\*\)/,"comment"],[/\(/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/("""|"B?)/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],litstring:[[/[^"]+/,"string"],[/""/,"string.escape"],[/"/,{token:"string.quote",next:"@pop"}]]}},Rwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Awe,language:Nwe},Symbol.toStringTag,{value:"Module"})),Owe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"}]},Mwe={defaultToken:"",tokenPostfix:".go",keywords:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var","bool","true","false","uint8","uint16","uint32","uint64","int8","int16","int32","int64","float32","float64","complex64","complex128","byte","rune","uint","int","uintptr","string","nil"],operators:["+","-","*","/","%","&","|","^","<<",">>","&^","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>=","&^=","&&","||","<-","++","--","==","<",">","=","!","!=","<=",">=",":=","...","(",")","","]","{","}",",",";",".",":"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex"],[/0[0-7']*[0-7]/,"number.octal"],[/0[bB][0-1']*[0-1]/,"number.binary"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/`/,"string","@rawstring"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],rawstring:[[/[^\`]/,"string"],[/`/,"string","@pop"]]}},Pwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Owe,language:Mwe},Symbol.toStringTag,{value:"Module"})),Fwe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""',notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"""',close:'"""'},{open:'"',close:'"'}],folding:{offSide:!0}},Bwe={defaultToken:"invalid",tokenPostfix:".gql",keywords:["null","true","false","query","mutation","subscription","extend","schema","directive","scalar","type","interface","union","enum","input","implements","fragment","on"],typeKeywords:["Int","Float","String","Boolean","ID"],directiveLocations:["SCHEMA","SCALAR","OBJECT","FIELD_DEFINITION","ARGUMENT_DEFINITION","INTERFACE","UNION","ENUM","ENUM_VALUE","INPUT_OBJECT","INPUT_FIELD_DEFINITION","QUERY","MUTATION","SUBSCRIPTION","FIELD","FRAGMENT_DEFINITION","FRAGMENT_SPREAD","INLINE_FRAGMENT","VARIABLE_DEFINITION"],operators:["=","!","?",":","&","|"],symbols:/[=!?:&|]+/,escapes:/\\(?:["\\\/bfnrt]|u[0-9A-Fa-f]{4})/,tokenizer:{root:[[/[a-z_][\w$]*/,{cases:{"@keywords":"keyword","@default":"key.identifier"}}],[/[$][\w$]*/,{cases:{"@keywords":"keyword","@default":"argument.identifier"}}],[/[A-Z][\w\$]*/,{cases:{"@typeKeywords":"keyword","@default":"type.identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,{token:"annotation",log:"annotation token: $0"}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"""/,{token:"string",next:"@mlstring",nextEmbedded:"markdown"}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],mlstring:[[/[^"]+/,"string"],['"""',{token:"string",next:"@pop",nextEmbedded:"@pop"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/#.*$/,"comment"]]}},Wwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Fwe,language:Bwe},Symbol.toStringTag,{value:"Module"})),fB=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],Vwe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{{!--","--}}"]},brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+fB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:we.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+fB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:we.IndentAction.Indent}}]},Hwe={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/\{\{!--/,"comment.block.start.handlebars","@commentBlock"],[/\{\{!/,"comment.start.handlebars","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@commentHtml"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],doctype:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/\}\}/,"comment.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentBlock:[[/--\}\}/,"comment.block.end.handlebars","@pop"],[/./,"comment.content.handlebars"]],commentHtml:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/\{\{/,{token:"@rematch",switchTo:"@handlebarsInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],handlebarsInSimpleState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3"}],{include:"handlebarsRoot"}],handlebarsInEmbeddedState:[[/\{\{\{?/,"delimiter.handlebars"],[/\}\}\}?/,{token:"delimiter.handlebars",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"handlebarsRoot"}],handlebarsRoot:[[/"[^"]*"/,"string.handlebars"],[/[#/][^\s}]+/,"keyword.helper.handlebars"],[/else\b/,"keyword.helper.handlebars"],[/[\s]+/],[/[^}]/,"variable.parameter.handlebars"]]}},$we=Object.freeze(Object.defineProperty({__proto__:null,conf:Vwe,language:Hwe},Symbol.toStringTag,{value:"Module"})),Uwe={comments:{lineComment:"#",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},zwe={defaultToken:"",tokenPostfix:".hcl",keywords:["var","local","path","for_each","any","string","number","bool","true","false","null","if ","else ","endif ","for ","in","endfor"],operators:["=",">=","<=","==","!=","+","-","*","/","%","&&","||","!","<",">","?","...",":"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,terraformFunctions:/(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,terraformMainBlocks:/(module|data|terraform|resource|provider|variable|output|locals)/,tokenizer:{root:[[/^@terraformMainBlocks([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,["type","","string","","string","","@brackets"]],[/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)(\{)/,["identifier","","string","","string","","@brackets"]],[/(\w+[ \t]+)([ \t]*)([\w-]+|"[\w-]+"|)([ \t]*)([\w-]+|"[\w-]+"|)(=)(\{)/,["identifier","","string","","operator","","@brackets"]],{include:"@terraform"}],terraform:[[/@terraformFunctions(\()/,["type","@brackets"]],[/[a-zA-Z_]\w*-*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"variable"}}],{include:"@whitespace"},{include:"@heredoc"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d[\d']*/,"number"],[/\d/,"number"],[/[;,.]/,"delimiter"],[/"/,"string","@string"],[/'/,"invalid"]],heredoc:[[/<<[-]*\s*["]?([\w\-]+)["]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"],[/#.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],string:[[/\$\{/,{token:"delimiter",next:"@stringExpression"}],[/[^\\"\$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@popall"]],stringInsideExpression:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],stringExpression:[[/\}/,{token:"delimiter",next:"@pop"}],[/"/,"string","@stringInsideExpression"],{include:"@terraform"}]}},jwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Uwe,language:zwe},Symbol.toStringTag,{value:"Module"})),gB=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],qwe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+gB.join("|")+"))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:we.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+gB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:we.IndentAction.Indent}}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#endregion\\b.*-->")}}},Gwe={defaultToken:"",tokenPostfix:".html",ignoreCase:!0,tokenizer:{root:[[/<!DOCTYPE/,"metatag","@doctype"],[/<!--/,"comment","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter","tag","","delimiter"]],[/(<)(script)/,["delimiter",{token:"tag",next:"@script"}]],[/(<)(style)/,["delimiter",{token:"tag",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter",{token:"tag",next:"@otherTag"}]],[/</,"delimiter"],[/[^<]+/]],doctype:[[/[^>]+/,"metatag.content"],[/>/,"metatag","@pop"]],comment:[[/-->/,"comment","@pop"],[/[^-]+/,"comment.content"],[/./,"comment.content"]],otherTag:[[/\/?>/,"delimiter","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter","tag",{token:"delimiter",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}},Kwe=Object.freeze(Object.defineProperty({__proto__:null,conf:qwe,language:Gwe},Symbol.toStringTag,{value:"Module"})),Ywe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Zwe={defaultToken:"",tokenPostfix:".ini",escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^\[[^\]]*\]/,"metatag"],[/(^\w+)(\s*)(\=)/,["key","","delimiter"]],{include:"@whitespace"},[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/^\s*[#;].*$/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}},Xwe=Object.freeze(Object.defineProperty({__proto__:null,conf:Ywe,language:Zwe},Symbol.toStringTag,{value:"Module"})),Qwe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},Jwe={defaultToken:"",tokenPostfix:".java",keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false","yield","record","sealed","non-sealed","permits"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[["non-sealed","keyword.non-sealed"],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}},eye=Object.freeze(Object.defineProperty({__proto__:null,conf:Qwe,language:Jwe},Symbol.toStringTag,{value:"Module"})),TH={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:we.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:we.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:we.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:we.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},Vs={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","package","private","protected","public","override","readonly","require","global","return","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}},tye=Object.freeze(Object.defineProperty({__proto__:null,conf:TH,language:Vs},Symbol.toStringTag,{value:"Module"})),iye=TH,nye={defaultToken:"invalid",tokenPostfix:".js",keywords:["break","case","catch","class","continue","const","constructor","debugger","default","delete","do","else","export","extends","false","finally","for","from","function","get","if","import","in","instanceof","let","new","null","return","set","super","switch","symbol","this","throw","true","try","typeof","undefined","var","void","while","with","yield","async","await","of"],typeKeywords:[],operators:Vs.operators,symbols:Vs.symbols,escapes:Vs.escapes,digits:Vs.digits,octaldigits:Vs.octaldigits,binarydigits:Vs.binarydigits,hexdigits:Vs.hexdigits,regexpctl:Vs.regexpctl,regexpesc:Vs.regexpesc,tokenizer:Vs.tokenizer},rye=Object.freeze(Object.defineProperty({__proto__:null,conf:iye,language:nye},Symbol.toStringTag,{value:"Module"})),sye={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},oye={tokenPostfix:".julia",keywords:["begin","while","if","for","try","return","break","continue","function","macro","quote","let","local","global","const","do","struct","module","baremodule","using","import","export","end","else","elseif","catch","finally","mutable","primitive","abstract","type","in","isa","where","new"],types:["LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","AbstractArray","UndefKeywordError","AbstractChannel","UndefRefError","AbstractChar","UndefVarError","AbstractDict","Union","AbstractDisplay","UnionAll","AbstractFloat","UnitRange","AbstractIrrational","Unsigned","AbstractMatrix","AbstractRange","Val","AbstractSet","Vararg","AbstractString","VecElement","AbstractUnitRange","VecOrMat","AbstractVecOrMat","Vector","AbstractVector","VersionNumber","Any","WeakKeyDict","ArgumentError","WeakRef","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError"],keywordops:["<:",">:",":","=>","...",".","->","?"],allops:/[^\w\d\s()\[\]{}"'#]+/,constants:["true","false","nothing","missing","undef","Inf","pi","NaN","\u03C0","\u212F","ans","PROGRAM_FILE","ARGS","C_NULL","VERSION","DEPOT_PATH","LOAD_PATH"],operators:["!","!=","!==","%","&","*","+","-","/","//","<","<<","<=","==","===","=>",">",">=",">>",">>>","\\","^","|","|>","~","\xF7","\u2208","\u2209","\u220B","\u220C","\u2218","\u221A","\u221B","\u2229","\u222A","\u2248","\u2249","\u2260","\u2261","\u2262","\u2264","\u2265","\u2286","\u2287","\u2288","\u2289","\u228A","\u228B","\u22BB"],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],ident:/π|ℯ|\b(?!\d)\w+\b/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,tokenizer:{root:[[/(::)\s*|\b(isa)\s+/,"keyword","@typeanno"],[/\b(isa)(\s*\(@ident\s*,\s*)/,["keyword",{token:"",next:"@typeanno"}]],[/\b(type|struct)[ \t]+/,"keyword","@typeanno"],[/^\s*:@ident[!?]?/,"metatag"],[/(return)(\s*:@ident[!?]?)/,["keyword","metatag"]],[/(\(|\[|\{|@allops)(\s*:@ident[!?]?)/,["","metatag"]],[/:\(/,"metatag","@quote"],[/r"""/,"regexp.delim","@tregexp"],[/r"/,"regexp.delim","@sregexp"],[/raw"""/,"string.delim","@rtstring"],[/[bv]?"""/,"string.delim","@dtstring"],[/raw"/,"string.delim","@rsstring"],[/[bv]?"/,"string.delim","@dsstring"],[/(@ident)\{/,{cases:{"$1@types":{token:"type",next:"@gen"},"@default":{token:"type",next:"@gen"}}}],[/@ident[!?'']?(?=\.?\()/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"keyword.flow"}}],[/@ident[!?']?/,{cases:{"@types":"type","@keywords":"keyword","@constants":"variable","@default":"identifier"}}],[/\$\w+/,"key"],[/\$\(/,"key","@paste"],[/@@@ident/,"annotation"],{include:"@whitespace"},[/'(?:@escapes|.)'/,"string.character"],[/[()\[\]{}]/,"@brackets"],[/@allops/,{cases:{"@keywordops":"keyword","@operators":"operator"}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/[+\-]?\d+(\.\d+)?(im?|[eE][+\-]?\d+(\.\d+)?)?/,"number"]],typeanno:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@gen"],[/([a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*)(\s*<:\s*)/,["type","keyword"]],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type","@pop"],["","","@pop"]],gen:[[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*\{/,"type","@push"],[/[a-zA-Z_]\w*(?:\.[a-zA-Z_]\w*)*/,"type"],[/<:/,"keyword"],[/(\})(\s*<:\s*)/,["type",{token:"keyword",next:"@pop"}]],[/\}/,"type","@pop"],{include:"@root"}],quote:[[/\$\(/,"key","@paste"],[/\(/,"@brackets","@paren"],[/\)/,"metatag","@pop"],{include:"@root"}],paste:[[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@paren"],[/\)/,"key","@pop"],{include:"@root"}],paren:[[/\$\(/,"key","@paste"],[/:\(/,"metatag","@quote"],[/\(/,"@brackets","@push"],[/\)/,"@brackets","@pop"],{include:"@root"}],sregexp:[[/^.*/,"invalid"],[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"[imsx]*/,"regexp.delim","@pop"]],tregexp:[[/[^\\"()\[\]{}]/,"regexp"],[/[()\[\]{}]/,"@brackets"],[/\\./,"operator.scss"],[/"(?!"")/,"string"],[/"""[imsx]*/,"regexp.delim","@pop"]],rsstring:[[/^.*/,"invalid"],[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"/,"string.delim","@pop"]],rtstring:[[/[^\\"]/,"string"],[/\\./,"string.escape"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],dsstring:[[/^.*/,"invalid"],[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string.delim","@pop"]],dtstring:[[/[^\\"\$]/,"string"],[/\$/,"","@interpolated"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?!"")/,"string"],[/"""/,"string.delim","@pop"]],interpolated:[[/\(/,{token:"",switchTo:"@interpolated_compound"}],[/[a-zA-Z_]\w*/,"identifier"],["","","@pop"]],interpolated_compound:[[/\)/,"","@pop"],{include:"@root"}],whitespace:[[/[ \t\r\n]+/,""],[/#=/,"comment","@multi_comment"],[/#.*$/,"comment"]],multi_comment:[[/#=/,"comment","@push"],[/=#/,"comment","@pop"],[/=(?!#)|#(?!=)/,"comment"],[/[^#=]+/,"comment"]]}},aye=Object.freeze(Object.defineProperty({__proto__:null,conf:sye,language:oye},Symbol.toStringTag,{value:"Module"})),lye={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},cye={defaultToken:"",tokenPostfix:".kt",keywords:["as","as?","break","class","continue","do","else","false","for","fun","if","in","!in","interface","is","!is","null","object","package","return","super","this","throw","true","try","typealias","val","var","when","while","by","catch","constructor","delegate","dynamic","field","file","finally","get","import","init","param","property","receiver","set","setparam","where","actual","abstract","annotation","companion","const","crossinline","data","enum","expect","external","final","infix","inline","inner","internal","lateinit","noinline","open","operator","out","override","private","protected","public","reified","sealed","suspend","tailrec","vararg","field","it"],operators:["+","-","*","/","%","=","+=","-=","*=","/=","%=","++","--","&&","||","!","==","!=","===","!==",">","<","<=",">=","[","]","!!","?.","?:","::","..",":","?","->","@",";","$","_"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,tokenizer:{root:[[/[A-Z][\w\$]*/,"type.identifier"],[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/@\s*[a-zA-Z_\$][\w\$]*/,"annotation"],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float"],[/0[xX](@hexdigits)[Ll]?/,"number.hex"],[/0(@octaldigits)[Ll]?/,"number.octal"],[/0[bB](@binarydigits)[Ll]?/,"number.binary"],[/(@digits)[fFdD]/,"number.float"],[/(@digits)[lL]?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"""/,"string","@multistring"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@javadoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],javadoc:[[/[^\/*]+/,"comment.doc"],[/\/\*/,"comment.doc","@push"],[/\/\*/,"comment.doc.invalid"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],multistring:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"""/,"string","@pop"],[/./,"string"]]}},dye=Object.freeze(Object.defineProperty({__proto__:null,conf:lye,language:cye},Symbol.toStringTag,{value:"Module"})),uye={wordPattern:/(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},hye={defaultToken:"",tokenPostfix:".less",identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",identifierPlus:"-?-?([a-zA-Z:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-:.]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@nestedJSBegin"},["[ \\t\\r\\n]+",""],{include:"@comments"},{include:"@keyword"},{include:"@strings"},{include:"@numbers"},["[*_]?[a-zA-Z\\-\\s]+(?=:.*(;|(\\\\$)))","attribute.name","@attribute"],["url(\\-prefix)?\\(",{token:"tag",next:"@urldeclaration"}],["[{}()\\[\\]]","@brackets"],["[,:;]","delimiter"],["#@identifierPlus","tag.id"],["&","tag"],["\\.@identifierPlus(?=\\()","tag.class","@attribute"],["\\.@identifierPlus","tag.class"],["@identifierPlus","tag"],{include:"@operators"},["@(@identifier(?=[:,\\)]))","variable","@attribute"],["@(@identifier)","variable"],["@","key","@atRules"]],nestedJSBegin:[["``","delimiter.backtick"],["`",{token:"delimiter.backtick",next:"@nestedJSEnd",nextEmbedded:"text/javascript"}]],nestedJSEnd:[["`",{token:"delimiter.backtick",next:"@pop",nextEmbedded:"@pop"}]],operators:[["[<>=\\+\\-\\*\\/\\^\\|\\~]","operator"]],keyword:[["(@[\\s]*import|![\\s]*important|true|false|when|iscolor|isnumber|isstring|iskeyword|isurl|ispixel|ispercentage|isem|hue|saturation|lightness|alpha|lighten|darken|saturate|desaturate|fadein|fadeout|fade|spin|mix|round|ceil|floor|percentage)\\b","keyword"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"tag",next:"@pop"}]],attribute:[{include:"@nestedJSBegin"},{include:"@comments"},{include:"@strings"},{include:"@numbers"},{include:"@keyword"},["[a-zA-Z\\-]+(?=\\()","attribute.value","@attribute"],[">","operator","@pop"],["@identifier","attribute.value"],{include:"@operators"},["@(@identifier)","variable"],["[)\\}]","@brackets","@pop"],["[{}()\\[\\]>]","@brackets"],["[;]","delimiter","@pop"],["[,=:]","delimiter"],["\\s",""],[".","attribute.value"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],strings:[['~?"',{token:"string.delimiter",next:"@stringsEndDoubleQuote"}],["~?'",{token:"string.delimiter",next:"@stringsEndQuote"}]],stringsEndDoubleQuote:[['\\\\"',"string"],['"',{token:"string.delimiter",next:"@popall"}],[".","string"]],stringsEndQuote:[["\\\\'","string"],["'",{token:"string.delimiter",next:"@popall"}],[".","string"]],atRules:[{include:"@comments"},{include:"@strings"},["[()]","delimiter"],["[\\{;]","delimiter","@pop"],[".","key"]]}},fye=Object.freeze(Object.defineProperty({__proto__:null,conf:uye,language:hye},Symbol.toStringTag,{value:"Module"})),gye={comments:{lineComment:"COMMENT"},brackets:[["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:":",close:"."}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"`",close:"`"},{open:'"',close:'"'},{open:"'",close:"'"},{open:":",close:"."}],folding:{markers:{start:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#region"),end:new RegExp("^\\s*(::\\s*|COMMENT\\s+)#endregion")}}},pye={tokenPostfix:".lexon",ignoreCase:!0,keywords:["lexon","lex","clause","terms","contracts","may","pay","pays","appoints","into","to"],typeKeywords:["amount","person","key","time","date","asset","text"],operators:["less","greater","equal","le","gt","or","and","add","added","subtract","subtracted","multiply","multiplied","times","divide","divided","is","be","certified"],symbols:/[=><!~?:&|+\-*\/\^%]+/,tokenizer:{root:[[/^(\s*)(comment:?(?:\s.*|))$/,["","comment"]],[/"/,{token:"identifier.quote",bracket:"@open",next:"@quoted_identifier"}],["LEX$",{token:"keyword",bracket:"@open",next:"@identifier_until_period"}],["LEXON",{token:"keyword",bracket:"@open",next:"@semver"}],[":",{token:"delimiter",bracket:"@open",next:"@identifier_until_period"}],[/[a-z_$][\w$]*/,{cases:{"@operators":"operator","@typeKeywords":"keyword.type","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d*\.\d*/,"number.semver"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"]],quoted_identifier:[[/[^\\"]+/,"identifier"],[/"/,{token:"identifier.quote",bracket:"@close",next:"@pop"}]],space_identifier_until_period:[[":","delimiter"],[" ",{token:"white",next:"@identifier_rest"}]],identifier_until_period:[{include:"@whitespace"},[":",{token:"delimiter",next:"@identifier_rest"}],[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],identifier_rest:[[/[^\\.]+/,"identifier"],[/\./,{token:"delimiter",bracket:"@close",next:"@pop"}]],semver:[{include:"@whitespace"},[":","delimiter"],[/\d*\.\d*\.\d*/,{token:"number.semver",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"]]}},mye=Object.freeze(Object.defineProperty({__proto__:null,conf:gye,language:pye},Symbol.toStringTag,{value:"Module"})),_ye={comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},bye={defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/,["delimiter","","key","","delimiter"]],[/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/,["@brackets","","key","","delimiter"]],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/--\[([=]*)\[/,"comment","@comment.$1"],[/--.*$/,"comment"]],comment:[[/[^\]]+/,"comment"],[/\]([=]*)\]/,{cases:{"$1==$S2":{token:"comment",next:"@pop"},"@default":"comment"}}],[/./,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}},vye=Object.freeze(Object.defineProperty({__proto__:null,conf:_ye,language:bye},Symbol.toStringTag,{value:"Module"})),pB=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],Cye={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,brackets:[["<!--","-->"],["<",">"],["{{","}}"],["{%","%}"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"%",close:"%"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+pB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:we.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+pB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:we.IndentAction.Indent}}]},wye={defaultToken:"",tokenPostfix:"",builtinTags:["if","else","elseif","endif","render","assign","capture","endcapture","case","endcase","comment","endcomment","cycle","decrement","for","endfor","include","increment","layout","raw","endraw","render","tablerow","endtablerow","unless","endunless"],builtinFilters:["abs","append","at_least","at_most","capitalize","ceil","compact","date","default","divided_by","downcase","escape","escape_once","first","floor","join","json","last","lstrip","map","minus","modulo","newline_to_br","plus","prepend","remove","remove_first","replace","replace_first","reverse","round","rstrip","size","slice","sort","sort_natural","split","strip","strip_html","strip_newlines","times","truncate","truncatewords","uniq","upcase","url_decode","url_encode","where"],constants:["true","false"],operators:["==","!=",">","<",">=","<="],symbol:/[=><!]+/,identifier:/[a-zA-Z_][\w]*/,tokenizer:{root:[[/\{\%\s*comment\s*\%\}/,"comment.start.liquid","@comment"],[/\{\{/,{token:"@rematch",switchTo:"@liquidState.root"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.root"}],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/\{/,"delimiter.html"],[/[^<{]+/]],comment:[[/\{\%\s*endcomment\s*\%\}/,"comment.end.liquid","@pop"],[/./,"comment.content.liquid"]],otherTag:[[/\{\{/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\{\%/,{token:"@rematch",switchTo:"@liquidState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],liquidState:[[/\{\{/,"delimiter.output.liquid"],[/\}\}/,{token:"delimiter.output.liquid",switchTo:"@$S2.$S3"}],[/\{\%/,"delimiter.tag.liquid"],[/raw\s*\%\}/,"delimiter.tag.liquid","@liquidRaw"],[/\%\}/,{token:"delimiter.tag.liquid",switchTo:"@$S2.$S3"}],{include:"liquidRoot"}],liquidRaw:[[/^(?!\{\%\s*endraw\s*\%\}).+/],[/\{\%/,"delimiter.tag.liquid"],[/@identifier/],[/\%\}/,{token:"delimiter.tag.liquid",next:"@root"}]],liquidRoot:[[/\d+(\.\d+)?/,"number.liquid"],[/"[^"]*"/,"string.liquid"],[/'[^']*'/,"string.liquid"],[/\s+/],[/@symbol/,{cases:{"@operators":"operator.liquid","@default":""}}],[/\./],[/@identifier/,{cases:{"@constants":"keyword.liquid","@builtinFilters":"predefined.liquid","@builtinTags":"predefined.liquid","@default":"variable.liquid"}}],[/[^}|%]/,"variable.liquid"]]}},yye=Object.freeze(Object.defineProperty({__proto__:null,conf:Cye,language:wye},Symbol.toStringTag,{value:"Module"})),Sye={comments:{blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"(*",close:"*)"},{open:"<*",close:"*>"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]}]},xye={defaultToken:"",tokenPostfix:".m3",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["AND","ANY","ARRAY","AS","BEGIN","BITS","BRANDED","BY","CASE","CONST","DIV","DO","ELSE","ELSIF","END","EVAL","EXCEPT","EXCEPTION","EXIT","EXPORTS","FINALLY","FOR","FROM","GENERIC","IF","IMPORT","IN","INTERFACE","LOCK","LOOP","METHODS","MOD","MODULE","NOT","OBJECT","OF","OR","OVERRIDES","PROCEDURE","RAISE","RAISES","READONLY","RECORD","REF","REPEAT","RETURN","REVEAL","SET","THEN","TO","TRY","TYPE","TYPECASE","UNSAFE","UNTIL","UNTRACED","VALUE","VAR","WHILE","WITH"],reservedConstNames:["ABS","ADR","ADRSIZE","BITSIZE","BYTESIZE","CEILING","DEC","DISPOSE","FALSE","FIRST","FLOAT","FLOOR","INC","ISTYPE","LAST","LOOPHOLE","MAX","MIN","NARROW","NEW","NIL","NUMBER","ORD","ROUND","SUBARRAY","TRUE","TRUNC","TYPECODE","VAL"],reservedTypeNames:["ADDRESS","ANY","BOOLEAN","CARDINAL","CHAR","EXTENDED","INTEGER","LONGCARD","LONGINT","LONGREAL","MUTEX","NULL","REAL","REFANY","ROOT","TEXT"],operators:["+","-","*","/","&","^","."],relations:["=","#","<","<=",">",">=","<:",":"],delimiters:["|","..","=>",",",";",":="],symbols:/[>=<#.,:;+\-*/&^]+/,escapes:/\\(?:[\\fnrt"']|[0-7]{3})/,tokenizer:{root:[[/_\w*/,"invalid"],[/[a-zA-Z][a-zA-Z0-9_]*/,{cases:{"@keywords":{token:"keyword.$0"},"@reservedConstNames":{token:"constant.reserved.$0"},"@reservedTypeNames":{token:"type.reserved.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/,"number.float"],[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/,"number"],[/@symbols/,{cases:{"@operators":"operators","@relations":"operators","@delimiters":"delimiter","@default":"invalid"}}],[/'[^\\']'/,"string.char"],[/(')(@escapes)(')/,["string.char","string.escape","string.char"]],[/'/,"invalid"],[/"([^"\\]|\\.)*$/,"invalid"],[/"/,"string.text","@text"]],text:[[/[^\\"]+/,"string.text"],[/@escapes/,"string.escape"],[/\\./,"invalid"],[/"/,"string.text","@pop"]],comment:[[/\(\*/,"comment","@push"],[/\*\)/,"comment","@pop"],[/./,"comment"]],pragma:[[/<\*/,"keyword.pragma","@push"],[/\*>/,"keyword.pragma","@pop"],[/./,"keyword.pragma"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/<\*/,"keyword.pragma","@pragma"]]}},Eye=Object.freeze(Object.defineProperty({__proto__:null,conf:Sye,language:xye},Symbol.toStringTag,{value:"Module"})),kye={comments:{blockComment:["<!--","-->"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")}}},Lye={defaultToken:"",tokenPostfix:".md",control:/[\\`*_\[\]{}()#+\-\.!]/,noncontrol:/[^\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,jsescapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],tokenizer:{root:[[/^\s*\|/,"@rematch","@table_header"],[/^(\s{0,3})(#+)((?:[^\\#]|@escapes)+)((?:#+)?)/,["white","keyword","keyword","keyword"]],[/^\s*(=+|\-+)\s*$/,"keyword"],[/^\s*((\*[ ]?)+)\s*$/,"meta.separator"],[/^\s*>+/,"comment"],[/^\s*([\*\-+:]|\d+\.)\s/,"keyword"],[/^(\t|[ ]{4})[^ ].*$/,"string"],[/^\s*~~~\s*((?:\w|[\/\-#])+)?\s*$/,{token:"string",next:"@codeblock"}],[/^\s*```\s*((?:\w|[\/\-#])+).*$/,{token:"string",next:"@codeblockgh",nextEmbedded:"$1"}],[/^\s*```\s*$/,{token:"string",next:"@codeblock"}],{include:"@linecontent"}],table_header:[{include:"@table_common"},[/[^\|]+/,"keyword.table.header"]],table_body:[{include:"@table_common"},{include:"@linecontent"}],table_common:[[/\s*[\-:]+\s*/,{token:"keyword",switchTo:"table_body"}],[/^\s*\|/,"keyword.table.left"],[/^\s*[^\|]/,"@rematch","@pop"],[/^\s*$/,"@rematch","@pop"],[/\|/,{cases:{"@eos":"keyword.table.right","@default":"keyword.table.middle"}}]],codeblock:[[/^\s*~~~\s*$/,{token:"string",next:"@pop"}],[/^\s*```\s*$/,{token:"string",next:"@pop"}],[/.*$/,"variable.source"]],codeblockgh:[[/```\s*$/,{token:"string",next:"@pop",nextEmbedded:"@pop"}],[/[^`]+/,"variable.source"]],linecontent:[[/&\w+;/,"string.escape"],[/@escapes/,"escape"],[/\b__([^\\_]|@escapes|_(?!_))+__\b/,"strong"],[/\*\*([^\\*]|@escapes|\*(?!\*))+\*\*/,"strong"],[/\b_[^_]+_\b/,"emphasis"],[/\*([^\\*]|@escapes)+\*/,"emphasis"],[/`([^\\`]|@escapes)+`/,"variable"],[/\{+[^}]+\}+/,"string.target"],[/(!?\[)((?:[^\]\\]|@escapes)*)(\]\([^\)]+\))/,["string.link","","string.link"]],[/(!?\[)((?:[^\]\\]|@escapes)*)(\])/,"string.link"],{include:"html"}],html:[[/<(\w+)\/>/,"tag"],[/<(\w+)/,{cases:{"@empty":{token:"tag",next:"@tag.$1"},"@default":{token:"tag",next:"@tag.$1"}}}],[/<\/(\w+)\s*>/,{token:"tag"}],[/<!--/,"comment","@comment"]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,"comment","@pop"],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],tag:[[/[ \t\r\n]+/,"white"],[/(type)(\s*=\s*)(")([^"]+)(")/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(type)(\s*=\s*)(')([^']+)(')/,["attribute.name.html","delimiter.html","string.html",{token:"string.html",switchTo:"@tag.$S2.$4"},"string.html"]],[/(\w+)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name.html","delimiter.html","string.html"]],[/\w+/,"attribute.name.html"],[/\/>/,"tag","@pop"],[/>/,{cases:{"$S2==style":{token:"tag",switchTo:"embeddedStyle",nextEmbedded:"text/css"},"$S2==script":{cases:{$S3:{token:"tag",switchTo:"embeddedScript",nextEmbedded:"$S3"},"@default":{token:"tag",switchTo:"embeddedScript",nextEmbedded:"text/javascript"}}},"@default":{token:"tag",next:"@pop"}}}]],embeddedStyle:[[/[^<]+/,""],[/<\/style\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]],embeddedScript:[[/[^<]+/,""],[/<\/script\s*>/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/</,""]]}},Tye=Object.freeze(Object.defineProperty({__proto__:null,conf:kye,language:Lye},Symbol.toStringTag,{value:"Module"})),Iye={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{blockComment:["###","###"],lineComment:"#"},folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},Dye={defaultToken:"",ignoreCase:!1,tokenPostfix:".mips",regEx:/\/(?!\/\/)(?:[^\/\\]|\\.)*\/[igm]*/,keywords:[".data",".text","syscall","trap","add","addu","addi","addiu","and","andi","div","divu","mult","multu","nor","or","ori","sll","slv","sra","srav","srl","srlv","sub","subu","xor","xori","lhi","lho","lhi","llo","slt","slti","sltu","sltiu","beq","bgtz","blez","bne","j","jal","jalr","jr","lb","lbu","lh","lhu","lw","li","la","sb","sh","sw","mfhi","mflo","mthi","mtlo","move"],symbols:/[\.,\:]+/,escapes:/\\(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/\$[a-zA-Z_]\w*/,"variable.predefined"],[/[.a-zA-Z_]\w*/,{cases:{this:"variable.predefined","@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/#.*$/,"comment"],["///",{token:"regexp",next:"@hereregexp"}],[/^(\s*)(@regEx)/,["","regexp"]],[/(\,)(\s*)(@regEx)/,["delimiter","","regexp"]],[/(\:)(\s*)(@regEx)/,["delimiter","","regexp"]],[/@symbols/,"delimiter"],[/\d+[eE]([\-+]?\d+)?/,"number.float"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/0[0-7]+(?!\d)/,"number.octal"],[/\d+/,"number"],[/[,.]/,"delimiter"],[/"""/,"string",'@herestring."""'],[/'''/,"string","@herestring.'''"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\#\\]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/\./,"string.escape.invalid"],[/#{/,{cases:{'$S2=="':{token:"string",next:"root.interpolatedstring"},"@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/#/,"string"]],herestring:[[/("""|''')/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^#\\'"]+/,"string"],[/['"]+/,"string"],[/@escapes/,"string.escape"],[/\./,"string.escape.invalid"],[/#{/,{token:"string.quote",next:"root.interpolatedstring"}],[/#/,"string"]],comment:[[/[^#]+/,"comment"],[/#/,"comment"]],hereregexp:[[/[^\\\/#]+/,"regexp"],[/\\./,"regexp"],[/#.*$/,"comment"],["///[igm]*",{token:"regexp",next:"@pop"}],[/\//,"regexp"]]}},Aye=Object.freeze(Object.defineProperty({__proto__:null,conf:Iye,language:Dye},Symbol.toStringTag,{value:"Module"})),Nye={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]}]},Rye={defaultToken:"",tokenPostfix:".msdax",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["VAR","RETURN","NOT","EVALUATE","DATATABLE","ORDER","BY","START","AT","DEFINE","MEASURE","ASC","DESC","IN","BOOLEAN","DOUBLE","INTEGER","DATETIME","CURRENCY","STRING"],functions:["CLOSINGBALANCEMONTH","CLOSINGBALANCEQUARTER","CLOSINGBALANCEYEAR","DATEADD","DATESBETWEEN","DATESINPERIOD","DATESMTD","DATESQTD","DATESYTD","ENDOFMONTH","ENDOFQUARTER","ENDOFYEAR","FIRSTDATE","FIRSTNONBLANK","LASTDATE","LASTNONBLANK","NEXTDAY","NEXTMONTH","NEXTQUARTER","NEXTYEAR","OPENINGBALANCEMONTH","OPENINGBALANCEQUARTER","OPENINGBALANCEYEAR","PARALLELPERIOD","PREVIOUSDAY","PREVIOUSMONTH","PREVIOUSQUARTER","PREVIOUSYEAR","SAMEPERIODLASTYEAR","STARTOFMONTH","STARTOFQUARTER","STARTOFYEAR","TOTALMTD","TOTALQTD","TOTALYTD","ADDCOLUMNS","ADDMISSINGITEMS","ALL","ALLEXCEPT","ALLNOBLANKROW","ALLSELECTED","CALCULATE","CALCULATETABLE","CALENDAR","CALENDARAUTO","CROSSFILTER","CROSSJOIN","CURRENTGROUP","DATATABLE","DETAILROWS","DISTINCT","EARLIER","EARLIEST","EXCEPT","FILTER","FILTERS","GENERATE","GENERATEALL","GROUPBY","IGNORE","INTERSECT","ISONORAFTER","KEEPFILTERS","LOOKUPVALUE","NATURALINNERJOIN","NATURALLEFTOUTERJOIN","RELATED","RELATEDTABLE","ROLLUP","ROLLUPADDISSUBTOTAL","ROLLUPGROUP","ROLLUPISSUBTOTAL","ROW","SAMPLE","SELECTCOLUMNS","SUBSTITUTEWITHINDEX","SUMMARIZE","SUMMARIZECOLUMNS","TOPN","TREATAS","UNION","USERELATIONSHIP","VALUES","SUM","SUMX","PATH","PATHCONTAINS","PATHITEM","PATHITEMREVERSE","PATHLENGTH","AVERAGE","AVERAGEA","AVERAGEX","COUNT","COUNTA","COUNTAX","COUNTBLANK","COUNTROWS","COUNTX","DISTINCTCOUNT","DIVIDE","GEOMEAN","GEOMEANX","MAX","MAXA","MAXX","MEDIAN","MEDIANX","MIN","MINA","MINX","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILEX.EXC","PERCENTILEX.INC","PRODUCT","PRODUCTX","RANK.EQ","RANKX","STDEV.P","STDEV.S","STDEVX.P","STDEVX.S","VAR.P","VAR.S","VARX.P","VARX.S","XIRR","XNPV","DATE","DATEDIFF","DATEVALUE","DAY","EDATE","EOMONTH","HOUR","MINUTE","MONTH","NOW","SECOND","TIME","TIMEVALUE","TODAY","WEEKDAY","WEEKNUM","YEAR","YEARFRAC","CONTAINS","CONTAINSROW","CUSTOMDATA","ERROR","HASONEFILTER","HASONEVALUE","ISBLANK","ISCROSSFILTERED","ISEMPTY","ISERROR","ISEVEN","ISFILTERED","ISLOGICAL","ISNONTEXT","ISNUMBER","ISODD","ISSUBTOTAL","ISTEXT","USERNAME","USERPRINCIPALNAME","AND","FALSE","IF","IFERROR","NOT","OR","SWITCH","TRUE","ABS","ACOS","ACOSH","ACOT","ACOTH","ASIN","ASINH","ATAN","ATANH","BETA.DIST","BETA.INV","CEILING","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","COMBIN","COMBINA","CONFIDENCE.NORM","CONFIDENCE.T","COS","COSH","COT","COTH","CURRENCY","DEGREES","EVEN","EXP","EXPON.DIST","FACT","FLOOR","GCD","INT","ISO.CEILING","LCM","LN","LOG","LOG10","MOD","MROUND","ODD","PERMUT","PI","POISSON.DIST","POWER","QUOTIENT","RADIANS","RAND","RANDBETWEEN","ROUND","ROUNDDOWN","ROUNDUP","SIGN","SIN","SINH","SQRT","SQRTPI","TAN","TANH","TRUNC","BLANK","CONCATENATE","CONCATENATEX","EXACT","FIND","FIXED","FORMAT","LEFT","LEN","LOWER","MID","REPLACE","REPT","RIGHT","SEARCH","SUBSTITUTE","TRIM","UNICHAR","UNICODE","UPPER","VALUE"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},[/[;,.]/,"delimiter"],[/[({})]/,"@brackets"],[/[a-z_][a-zA-Z0-9_]*/,{cases:{"@keywords":"keyword","@functions":"keyword","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/\/\/+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N"/,{token:"string",next:"@string"}],[/"/,{token:"string",next:"@string"}]],string:[[/[^"]+/,"string"],[/""/,"string"],[/"/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/'/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^']+/,"identifier"],[/''/,"identifier"],[/'/,{token:"identifier.quote",next:"@pop"}]]}},Oye=Object.freeze(Object.defineProperty({__proto__:null,conf:Nye,language:Rye},Symbol.toStringTag,{value:"Module"})),Mye={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Pye={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ACCESSIBLE","ACCOUNT","ACTION","ADD","AFTER","AGAINST","AGGREGATE","ALGORITHM","ALL","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","AS","ASC","ASCII","ASENSITIVE","AT","AUTOEXTEND_SIZE","AUTO_INCREMENT","AVG","AVG_ROW_LENGTH","BACKUP","BEFORE","BEGIN","BETWEEN","BIGINT","BINARY","BINLOG","BIT","BLOB","BLOCK","BOOL","BOOLEAN","BOTH","BTREE","BY","BYTE","CACHE","CALL","CASCADE","CASCADED","CASE","CATALOG_NAME","CHAIN","CHANGE","CHANGED","CHANNEL","CHAR","CHARACTER","CHARSET","CHECK","CHECKSUM","CIPHER","CLASS_ORIGIN","CLIENT","CLOSE","COALESCE","CODE","COLLATE","COLLATION","COLUMN","COLUMNS","COLUMN_FORMAT","COLUMN_NAME","COMMENT","COMMIT","COMMITTED","COMPACT","COMPLETION","COMPRESSED","COMPRESSION","CONCURRENT","CONDITION","CONNECTION","CONSISTENT","CONSTRAINT","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONTAINS","CONTEXT","CONTINUE","CONVERT","CPU","CREATE","CROSS","CUBE","CURRENT","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURSOR","CURSOR_NAME","DATA","DATABASE","DATABASES","DATAFILE","DATE","DATETIME","DAY","DAY_HOUR","DAY_MICROSECOND","DAY_MINUTE","DAY_SECOND","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULT_AUTH","DEFINER","DELAYED","DELAY_KEY_WRITE","DELETE","DESC","DESCRIBE","DES_KEY_FILE","DETERMINISTIC","DIAGNOSTICS","DIRECTORY","DISABLE","DISCARD","DISK","DISTINCT","DISTINCTROW","DIV","DO","DOUBLE","DROP","DUAL","DUMPFILE","DUPLICATE","DYNAMIC","EACH","ELSE","ELSEIF","ENABLE","ENCLOSED","ENCRYPTION","END","ENDS","ENGINE","ENGINES","ENUM","ERROR","ERRORS","ESCAPE","ESCAPED","EVENT","EVENTS","EVERY","EXCHANGE","EXECUTE","EXISTS","EXIT","EXPANSION","EXPIRE","EXPLAIN","EXPORT","EXTENDED","EXTENT_SIZE","FALSE","FAST","FAULTS","FETCH","FIELDS","FILE","FILE_BLOCK_SIZE","FILTER","FIRST","FIXED","FLOAT","FLOAT4","FLOAT8","FLUSH","FOLLOWS","FOR","FORCE","FOREIGN","FORMAT","FOUND","FROM","FULL","FULLTEXT","FUNCTION","GENERAL","GENERATED","GEOMETRY","GEOMETRYCOLLECTION","GET","GET_FORMAT","GLOBAL","GRANT","GRANTS","GROUP","GROUP_REPLICATION","HANDLER","HASH","HAVING","HELP","HIGH_PRIORITY","HOST","HOSTS","HOUR","HOUR_MICROSECOND","HOUR_MINUTE","HOUR_SECOND","IDENTIFIED","IF","IGNORE","IGNORE_SERVER_IDS","IMPORT","INDEX","INDEXES","INFILE","INITIAL_SIZE","INNER","INOUT","INSENSITIVE","INSERT","INSERT_METHOD","INSTALL","INSTANCE","INT","INT1","INT2","INT3","INT4","INT8","INTEGER","INTERVAL","INTO","INVOKER","IO","IO_AFTER_GTIDS","IO_BEFORE_GTIDS","IO_THREAD","IPC","ISOLATION","ISSUER","ITERATE","JOIN","JSON","KEY","KEYS","KEY_BLOCK_SIZE","KILL","LANGUAGE","LAST","LEADING","LEAVE","LEAVES","LEFT","LESS","LEVEL","LIKE","LIMIT","LINEAR","LINES","LINESTRING","LIST","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCK","LOCKS","LOGFILE","LOGS","LONG","LONGBLOB","LONGTEXT","LOOP","LOW_PRIORITY","MASTER","MASTER_AUTO_POSITION","MASTER_BIND","MASTER_CONNECT_RETRY","MASTER_DELAY","MASTER_HEARTBEAT_PERIOD","MASTER_HOST","MASTER_LOG_FILE","MASTER_LOG_POS","MASTER_PASSWORD","MASTER_PORT","MASTER_RETRY_COUNT","MASTER_SERVER_ID","MASTER_SSL","MASTER_SSL_CA","MASTER_SSL_CAPATH","MASTER_SSL_CERT","MASTER_SSL_CIPHER","MASTER_SSL_CRL","MASTER_SSL_CRLPATH","MASTER_SSL_KEY","MASTER_SSL_VERIFY_SERVER_CERT","MASTER_TLS_VERSION","MASTER_USER","MATCH","MAXVALUE","MAX_CONNECTIONS_PER_HOUR","MAX_QUERIES_PER_HOUR","MAX_ROWS","MAX_SIZE","MAX_STATEMENT_TIME","MAX_UPDATES_PER_HOUR","MAX_USER_CONNECTIONS","MEDIUM","MEDIUMBLOB","MEDIUMINT","MEDIUMTEXT","MEMORY","MERGE","MESSAGE_TEXT","MICROSECOND","MIDDLEINT","MIGRATE","MINUTE","MINUTE_MICROSECOND","MINUTE_SECOND","MIN_ROWS","MOD","MODE","MODIFIES","MODIFY","MONTH","MULTILINESTRING","MULTIPOINT","MULTIPOLYGON","MUTEX","MYSQL_ERRNO","NAME","NAMES","NATIONAL","NATURAL","NCHAR","NDB","NDBCLUSTER","NEVER","NEW","NEXT","NO","NODEGROUP","NONBLOCKING","NONE","NO_WAIT","NO_WRITE_TO_BINLOG","NUMBER","NUMERIC","NVARCHAR","OFFSET","OLD_PASSWORD","ON","ONE","ONLY","OPEN","OPTIMIZE","OPTIMIZER_COSTS","OPTION","OPTIONALLY","OPTIONS","OR","ORDER","OUT","OUTER","OUTFILE","OWNER","PACK_KEYS","PAGE","PARSER","PARSE_GCOL_EXPR","PARTIAL","PARTITION","PARTITIONING","PARTITIONS","PASSWORD","PHASE","PLUGIN","PLUGINS","PLUGIN_DIR","POINT","POLYGON","PORT","PRECEDES","PRECISION","PREPARE","PRESERVE","PREV","PRIMARY","PRIVILEGES","PROCEDURE","PROCESSLIST","PROFILE","PROFILES","PROXY","PURGE","QUARTER","QUERY","QUICK","RANGE","READ","READS","READ_ONLY","READ_WRITE","REAL","REBUILD","RECOVER","REDOFILE","REDO_BUFFER_SIZE","REDUNDANT","REFERENCES","REGEXP","RELAY","RELAYLOG","RELAY_LOG_FILE","RELAY_LOG_POS","RELAY_THREAD","RELEASE","RELOAD","REMOVE","RENAME","REORGANIZE","REPAIR","REPEAT","REPEATABLE","REPLACE","REPLICATE_DO_DB","REPLICATE_DO_TABLE","REPLICATE_IGNORE_DB","REPLICATE_IGNORE_TABLE","REPLICATE_REWRITE_DB","REPLICATE_WILD_DO_TABLE","REPLICATE_WILD_IGNORE_TABLE","REPLICATION","REQUIRE","RESET","RESIGNAL","RESTORE","RESTRICT","RESUME","RETURN","RETURNED_SQLSTATE","RETURNS","REVERSE","REVOKE","RIGHT","RLIKE","ROLLBACK","ROLLUP","ROTATE","ROUTINE","ROW","ROWS","ROW_COUNT","ROW_FORMAT","RTREE","SAVEPOINT","SCHEDULE","SCHEMA","SCHEMAS","SCHEMA_NAME","SECOND","SECOND_MICROSECOND","SECURITY","SELECT","SENSITIVE","SEPARATOR","SERIAL","SERIALIZABLE","SERVER","SESSION","SET","SHARE","SHOW","SHUTDOWN","SIGNAL","SIGNED","SIMPLE","SLAVE","SLOW","SMALLINT","SNAPSHOT","SOCKET","SOME","SONAME","SOUNDS","SOURCE","SPATIAL","SPECIFIC","SQL","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQL_AFTER_GTIDS","SQL_AFTER_MTS_GAPS","SQL_BEFORE_GTIDS","SQL_BIG_RESULT","SQL_BUFFER_RESULT","SQL_CACHE","SQL_CALC_FOUND_ROWS","SQL_NO_CACHE","SQL_SMALL_RESULT","SQL_THREAD","SQL_TSI_DAY","SQL_TSI_HOUR","SQL_TSI_MINUTE","SQL_TSI_MONTH","SQL_TSI_QUARTER","SQL_TSI_SECOND","SQL_TSI_WEEK","SQL_TSI_YEAR","SSL","STACKED","START","STARTING","STARTS","STATS_AUTO_RECALC","STATS_PERSISTENT","STATS_SAMPLE_PAGES","STATUS","STOP","STORAGE","STORED","STRAIGHT_JOIN","STRING","SUBCLASS_ORIGIN","SUBJECT","SUBPARTITION","SUBPARTITIONS","SUPER","SUSPEND","SWAPS","SWITCHES","TABLE","TABLES","TABLESPACE","TABLE_CHECKSUM","TABLE_NAME","TEMPORARY","TEMPTABLE","TERMINATED","TEXT","THAN","THEN","TIME","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TINYBLOB","TINYINT","TINYTEXT","TO","TRAILING","TRANSACTION","TRIGGER","TRIGGERS","TRUE","TRUNCATE","TYPE","TYPES","UNCOMMITTED","UNDEFINED","UNDO","UNDOFILE","UNDO_BUFFER_SIZE","UNICODE","UNINSTALL","UNION","UNIQUE","UNKNOWN","UNLOCK","UNSIGNED","UNTIL","UPDATE","UPGRADE","USAGE","USE","USER","USER_RESOURCES","USE_FRM","USING","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARCHARACTER","VARIABLES","VARYING","VIEW","VIRTUAL","WAIT","WARNINGS","WEEK","WEIGHT_STRING","WHEN","WHERE","WHILE","WITH","WITHOUT","WORK","WRAPPER","WRITE","X509","XA","XID","XML","XOR","YEAR","YEAR_MONTH","ZEROFILL"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["ABS","ACOS","ADDDATE","ADDTIME","AES_DECRYPT","AES_ENCRYPT","ANY_VALUE","Area","AsBinary","AsWKB","ASCII","ASIN","AsText","AsWKT","ASYMMETRIC_DECRYPT","ASYMMETRIC_DERIVE","ASYMMETRIC_ENCRYPT","ASYMMETRIC_SIGN","ASYMMETRIC_VERIFY","ATAN","ATAN2","ATAN","AVG","BENCHMARK","BIN","BIT_AND","BIT_COUNT","BIT_LENGTH","BIT_OR","BIT_XOR","Buffer","CAST","CEIL","CEILING","Centroid","CHAR","CHAR_LENGTH","CHARACTER_LENGTH","CHARSET","COALESCE","COERCIBILITY","COLLATION","COMPRESS","CONCAT","CONCAT_WS","CONNECTION_ID","Contains","CONV","CONVERT","CONVERT_TZ","ConvexHull","COS","COT","COUNT","CRC32","CREATE_ASYMMETRIC_PRIV_KEY","CREATE_ASYMMETRIC_PUB_KEY","CREATE_DH_PARAMETERS","CREATE_DIGEST","Crosses","CURDATE","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURTIME","DATABASE","DATE","DATE_ADD","DATE_FORMAT","DATE_SUB","DATEDIFF","DAY","DAYNAME","DAYOFMONTH","DAYOFWEEK","DAYOFYEAR","DECODE","DEFAULT","DEGREES","DES_DECRYPT","DES_ENCRYPT","Dimension","Disjoint","Distance","ELT","ENCODE","ENCRYPT","EndPoint","Envelope","Equals","EXP","EXPORT_SET","ExteriorRing","EXTRACT","ExtractValue","FIELD","FIND_IN_SET","FLOOR","FORMAT","FOUND_ROWS","FROM_BASE64","FROM_DAYS","FROM_UNIXTIME","GeomCollFromText","GeometryCollectionFromText","GeomCollFromWKB","GeometryCollectionFromWKB","GeometryCollection","GeometryN","GeometryType","GeomFromText","GeometryFromText","GeomFromWKB","GeometryFromWKB","GET_FORMAT","GET_LOCK","GLength","GREATEST","GROUP_CONCAT","GTID_SUBSET","GTID_SUBTRACT","HEX","HOUR","IF","IFNULL","INET_ATON","INET_NTOA","INET6_ATON","INET6_NTOA","INSERT","INSTR","InteriorRingN","Intersects","INTERVAL","IS_FREE_LOCK","IS_IPV4","IS_IPV4_COMPAT","IS_IPV4_MAPPED","IS_IPV6","IS_USED_LOCK","IsClosed","IsEmpty","ISNULL","IsSimple","JSON_APPEND","JSON_ARRAY","JSON_ARRAY_APPEND","JSON_ARRAY_INSERT","JSON_CONTAINS","JSON_CONTAINS_PATH","JSON_DEPTH","JSON_EXTRACT","JSON_INSERT","JSON_KEYS","JSON_LENGTH","JSON_MERGE","JSON_MERGE_PRESERVE","JSON_OBJECT","JSON_QUOTE","JSON_REMOVE","JSON_REPLACE","JSON_SEARCH","JSON_SET","JSON_TYPE","JSON_UNQUOTE","JSON_VALID","LAST_INSERT_ID","LCASE","LEAST","LEFT","LENGTH","LineFromText","LineStringFromText","LineFromWKB","LineStringFromWKB","LineString","LN","LOAD_FILE","LOCALTIME","LOCALTIMESTAMP","LOCATE","LOG","LOG10","LOG2","LOWER","LPAD","LTRIM","MAKE_SET","MAKEDATE","MAKETIME","MASTER_POS_WAIT","MAX","MBRContains","MBRCoveredBy","MBRCovers","MBRDisjoint","MBREqual","MBREquals","MBRIntersects","MBROverlaps","MBRTouches","MBRWithin","MD5","MICROSECOND","MID","MIN","MINUTE","MLineFromText","MultiLineStringFromText","MLineFromWKB","MultiLineStringFromWKB","MOD","MONTH","MONTHNAME","MPointFromText","MultiPointFromText","MPointFromWKB","MultiPointFromWKB","MPolyFromText","MultiPolygonFromText","MPolyFromWKB","MultiPolygonFromWKB","MultiLineString","MultiPoint","MultiPolygon","NAME_CONST","NOT IN","NOW","NULLIF","NumGeometries","NumInteriorRings","NumPoints","OCT","OCTET_LENGTH","OLD_PASSWORD","ORD","Overlaps","PASSWORD","PERIOD_ADD","PERIOD_DIFF","PI","Point","PointFromText","PointFromWKB","PointN","PolyFromText","PolygonFromText","PolyFromWKB","PolygonFromWKB","Polygon","POSITION","POW","POWER","PROCEDURE ANALYSE","QUARTER","QUOTE","RADIANS","RAND","RANDOM_BYTES","RELEASE_ALL_LOCKS","RELEASE_LOCK","REPEAT","REPLACE","REVERSE","RIGHT","ROUND","ROW_COUNT","RPAD","RTRIM","SCHEMA","SEC_TO_TIME","SECOND","SESSION_USER","SHA1","SHA","SHA2","SIGN","SIN","SLEEP","SOUNDEX","SPACE","SQRT","SRID","ST_Area","ST_AsBinary","ST_AsWKB","ST_AsGeoJSON","ST_AsText","ST_AsWKT","ST_Buffer","ST_Buffer_Strategy","ST_Centroid","ST_Contains","ST_ConvexHull","ST_Crosses","ST_Difference","ST_Dimension","ST_Disjoint","ST_Distance","ST_Distance_Sphere","ST_EndPoint","ST_Envelope","ST_Equals","ST_ExteriorRing","ST_GeoHash","ST_GeomCollFromText","ST_GeometryCollectionFromText","ST_GeomCollFromTxt","ST_GeomCollFromWKB","ST_GeometryCollectionFromWKB","ST_GeometryN","ST_GeometryType","ST_GeomFromGeoJSON","ST_GeomFromText","ST_GeometryFromText","ST_GeomFromWKB","ST_GeometryFromWKB","ST_InteriorRingN","ST_Intersection","ST_Intersects","ST_IsClosed","ST_IsEmpty","ST_IsSimple","ST_IsValid","ST_LatFromGeoHash","ST_Length","ST_LineFromText","ST_LineStringFromText","ST_LineFromWKB","ST_LineStringFromWKB","ST_LongFromGeoHash","ST_MakeEnvelope","ST_MLineFromText","ST_MultiLineStringFromText","ST_MLineFromWKB","ST_MultiLineStringFromWKB","ST_MPointFromText","ST_MultiPointFromText","ST_MPointFromWKB","ST_MultiPointFromWKB","ST_MPolyFromText","ST_MultiPolygonFromText","ST_MPolyFromWKB","ST_MultiPolygonFromWKB","ST_NumGeometries","ST_NumInteriorRing","ST_NumInteriorRings","ST_NumPoints","ST_Overlaps","ST_PointFromGeoHash","ST_PointFromText","ST_PointFromWKB","ST_PointN","ST_PolyFromText","ST_PolygonFromText","ST_PolyFromWKB","ST_PolygonFromWKB","ST_Simplify","ST_SRID","ST_StartPoint","ST_SymDifference","ST_Touches","ST_Union","ST_Validate","ST_Within","ST_X","ST_Y","StartPoint","STD","STDDEV","STDDEV_POP","STDDEV_SAMP","STR_TO_DATE","STRCMP","SUBDATE","SUBSTR","SUBSTRING","SUBSTRING_INDEX","SUBTIME","SUM","SYSDATE","SYSTEM_USER","TAN","TIME","TIME_FORMAT","TIME_TO_SEC","TIMEDIFF","TIMESTAMP","TIMESTAMPADD","TIMESTAMPDIFF","TO_BASE64","TO_DAYS","TO_SECONDS","Touches","TRIM","TRUNCATE","UCASE","UNCOMPRESS","UNCOMPRESSED_LENGTH","UNHEX","UNIX_TIMESTAMP","UpdateXML","UPPER","USER","UTC_DATE","UTC_TIME","UTC_TIMESTAMP","UUID","UUID_SHORT","VALIDATE_PASSWORD_STRENGTH","VALUES","VAR_POP","VAR_SAMP","VARIANCE","VERSION","WAIT_FOR_EXECUTED_GTID_SET","WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS","WEEK","WEEKDAY","WEEKOFYEAR","WEIGHT_STRING","Within","X","Y","YEAR","YEARWEEK"],builtinVariables:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/#+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],complexIdentifiers:[[/`/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^`]+/,"identifier"],[/``/,"identifier"],[/`/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}},Fye=Object.freeze(Object.defineProperty({__proto__:null,conf:Mye,language:Pye},Symbol.toStringTag,{value:"Module"})),Bye={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Wye={defaultToken:"",tokenPostfix:".objective-c",keywords:["#import","#include","#define","#else","#endif","#if","#ifdef","#ifndef","#ident","#undef","@class","@defs","@dynamic","@encode","@end","@implementation","@interface","@package","@private","@protected","@property","@protocol","@public","@selector","@synthesize","__declspec","assign","auto","BOOL","break","bycopy","byref","case","char","Class","const","copy","continue","default","do","double","else","enum","extern","FALSE","false","float","for","goto","if","in","int","id","inout","IMP","long","nil","nonatomic","NULL","oneway","out","private","public","protected","readwrite","readonly","register","return","SEL","self","short","signed","sizeof","static","struct","super","switch","typedef","TRUE","true","union","unsigned","volatile","void","while"],decpart:/\d(_?\d)*/,decimal:/0|@decpart/,tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()<>]/,"@brackets"],[/[a-zA-Z@#]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[<>=\\+\\-\\*\\/\\^\\|\\~,]|and\\b|or\\b|not\\b]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],numbers:[[/0[xX][0-9a-fA-F]*(_?[0-9a-fA-F])*/,"number.hex"],[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)[fF]*/,{cases:{"(\\d)*":"number",$0:"number.float"}}]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]]}},Vye=Object.freeze(Object.defineProperty({__proto__:null,conf:Bye,language:Wye},Symbol.toStringTag,{value:"Module"})),Hye={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["{","}"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\{\\$REGION(\\s\\'.*\\')?\\}"),end:new RegExp("^\\s*\\{\\$ENDREGION\\}")}}},$ye={defaultToken:"",tokenPostfix:".pascal",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["absolute","abstract","all","and_then","array","as","asm","attribute","begin","bindable","case","class","const","contains","default","div","else","end","except","exports","external","far","file","finalization","finally","forward","generic","goto","if","implements","import","in","index","inherited","initialization","interrupt","is","label","library","mod","module","name","near","not","object","of","on","only","operator","or_else","otherwise","override","package","packed","pow","private","program","protected","public","published","interface","implementation","qualified","read","record","resident","requires","resourcestring","restricted","segment","set","shl","shr","specialize","stored","strict","then","threadvar","to","try","type","unit","uses","var","view","virtual","dynamic","overload","reintroduce","with","write","xor","true","false","procedure","function","constructor","destructor","property","break","continue","exit","abort","while","do","for","raise","repeat","until"],typeKeywords:["boolean","double","byte","integer","shortint","char","longint","float","string"],operators:["=",">","<","<=",">=","<>",":",":=","and","or","+","-","*","/","@","&","^","%"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\*\}]+/,"comment"],[/\}/,"comment","@pop"],[/[\{]/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\{/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},Uye=Object.freeze(Object.defineProperty({__proto__:null,conf:Hye,language:$ye},Symbol.toStringTag,{value:"Module"})),zye={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"}]},jye={defaultToken:"",tokenPostfix:".pascaligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["begin","block","case","const","else","end","fail","for","from","function","if","is","nil","of","remove","return","skip","then","type","var","while","with","option","None","transaction"],typeKeywords:["bool","int","list","map","nat","record","string","unit","address","map","mtz","xtz"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},qye=Object.freeze(Object.defineProperty({__proto__:null,conf:zye,language:jye},Symbol.toStringTag,{value:"Module"})),Gye={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},Kye={defaultToken:"",tokenPostfix:".perl",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["__DATA__","else","lock","__END__","elsif","lt","__FILE__","eq","__LINE__","exp","ne","sub","__PACKAGE__","for","no","and","foreach","or","unless","cmp","ge","package","until","continue","gt","while","CORE","if","xor","do","le","__DIE__","__WARN__"],builtinFunctions:["-A","END","length","setpgrp","-B","endgrent","link","setpriority","-b","endhostent","listen","setprotoent","-C","endnetent","local","setpwent","-c","endprotoent","localtime","setservent","-d","endpwent","log","setsockopt","-e","endservent","lstat","shift","-f","eof","map","shmctl","-g","eval","mkdir","shmget","-k","exec","msgctl","shmread","-l","exists","msgget","shmwrite","-M","exit","msgrcv","shutdown","-O","fcntl","msgsnd","sin","-o","fileno","my","sleep","-p","flock","next","socket","-r","fork","not","socketpair","-R","format","oct","sort","-S","formline","open","splice","-s","getc","opendir","split","-T","getgrent","ord","sprintf","-t","getgrgid","our","sqrt","-u","getgrnam","pack","srand","-w","gethostbyaddr","pipe","stat","-W","gethostbyname","pop","state","-X","gethostent","pos","study","-x","getlogin","print","substr","-z","getnetbyaddr","printf","symlink","abs","getnetbyname","prototype","syscall","accept","getnetent","push","sysopen","alarm","getpeername","quotemeta","sysread","atan2","getpgrp","rand","sysseek","AUTOLOAD","getppid","read","system","BEGIN","getpriority","readdir","syswrite","bind","getprotobyname","readline","tell","binmode","getprotobynumber","readlink","telldir","bless","getprotoent","readpipe","tie","break","getpwent","recv","tied","caller","getpwnam","redo","time","chdir","getpwuid","ref","times","CHECK","getservbyname","rename","truncate","chmod","getservbyport","require","uc","chomp","getservent","reset","ucfirst","chop","getsockname","return","umask","chown","getsockopt","reverse","undef","chr","glob","rewinddir","UNITCHECK","chroot","gmtime","rindex","unlink","close","goto","rmdir","unpack","closedir","grep","say","unshift","connect","hex","scalar","untie","cos","index","seek","use","crypt","INIT","seekdir","utime","dbmclose","int","select","values","dbmopen","ioctl","semctl","vec","defined","join","semget","wait","delete","keys","semop","waitpid","DESTROY","kill","send","wantarray","die","last","setgrent","warn","dump","lc","sethostent","write","each","lcfirst","setnetent"],builtinFileHandlers:["ARGV","STDERR","STDOUT","ARGVOUT","STDIN","ENV"],builtinVariables:["$!","$^RE_TRIE_MAXBUF","$LAST_REGEXP_CODE_RESULT",'$"',"$^S","$LIST_SEPARATOR","$#","$^T","$MATCH","$$","$^TAINT","$MULTILINE_MATCHING","$%","$^UNICODE","$NR","$&","$^UTF8LOCALE","$OFMT","$'","$^V","$OFS","$(","$^W","$ORS","$)","$^WARNING_BITS","$OS_ERROR","$*","$^WIDE_SYSTEM_CALLS","$OSNAME","$+","$^X","$OUTPUT_AUTO_FLUSH","$,","$_","$OUTPUT_FIELD_SEPARATOR","$-","$`","$OUTPUT_RECORD_SEPARATOR","$.","$a","$PERL_VERSION","$/","$ACCUMULATOR","$PERLDB","$0","$ARG","$PID","$:","$ARGV","$POSTMATCH","$;","$b","$PREMATCH","$<","$BASETIME","$PROCESS_ID","$=","$CHILD_ERROR","$PROGRAM_NAME","$>","$COMPILING","$REAL_GROUP_ID","$?","$DEBUGGING","$REAL_USER_ID","$@","$EFFECTIVE_GROUP_ID","$RS","$[","$EFFECTIVE_USER_ID","$SUBSCRIPT_SEPARATOR","$\\","$EGID","$SUBSEP","$]","$ERRNO","$SYSTEM_FD_MAX","$^","$EUID","$UID","$^A","$EVAL_ERROR","$WARNING","$^C","$EXCEPTIONS_BEING_CAUGHT","$|","$^CHILD_ERROR_NATIVE","$EXECUTABLE_NAME","$~","$^D","$EXTENDED_OS_ERROR","%!","$^E","$FORMAT_FORMFEED","%^H","$^ENCODING","$FORMAT_LINE_BREAK_CHARACTERS","%ENV","$^F","$FORMAT_LINES_LEFT","%INC","$^H","$FORMAT_LINES_PER_PAGE","%OVERLOAD","$^I","$FORMAT_NAME","%SIG","$^L","$FORMAT_PAGE_NUMBER","@+","$^M","$FORMAT_TOP_NAME","@-","$^N","$GID","@_","$^O","$INPLACE_EDIT","@ARGV","$^OPEN","$INPUT_LINE_NUMBER","@INC","$^P","$INPUT_RECORD_SEPARATOR","@LAST_MATCH_START","$^R","$LAST_MATCH_END","$^RE_DEBUG_FLAGS","$LAST_PAREN_MATCH"],symbols:/[:+\-\^*$&%@=<>!?|\/~\.]/,quoteLikeOps:["qr","m","s","q","qq","qx","qw","tr","y"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/[a-zA-Z\-_][\w\-_]*/,{cases:{"@keywords":"keyword","@builtinFunctions":"type.identifier","@builtinFileHandlers":"variable.predefined","@quoteLikeOps":{token:"@rematch",next:"quotedConstructs"},"@default":""}}],[/[\$@%][*@#?\+\-\$!\w\\\^><~:;\.]+/,{cases:{"@builtinVariables":"variable.predefined","@default":"variable"}}],{include:"@strings"},{include:"@dblStrings"},{include:"@perldoc"},{include:"@heredoc"},[/[{}\[\]()]/,"@brackets"],[/[\/](?:(?:\[(?:\\]|[^\]])+\])|(?:\\\/|[^\]\/]))*[\/]\w*\s*(?=[).,;]|$)/,"regexp"],[/@symbols/,"operators"],{include:"@numbers"},[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"],[/(^#!.*$)/,"metatag"],[/(^#.*$)/,"comment"]],numbers:[[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"]],strings:[[/'/,"string","@stringBody"]],stringBody:[[/'/,"string","@popall"],[/\\'/,"string.escape"],[/./,"string"]],dblStrings:[[/"/,"string","@dblStringBody"]],dblStringBody:[[/"/,"string","@popall"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],{include:"@variables"},[/./,"string"]],quotedConstructs:[[/(q|qw|tr|y)\s*\(/,{token:"string.delim",switchTo:"@qstring.(.)"}],[/(q|qw|tr|y)\s*\[/,{token:"string.delim",switchTo:"@qstring.[.]"}],[/(q|qw|tr|y)\s*\{/,{token:"string.delim",switchTo:"@qstring.{.}"}],[/(q|qw|tr|y)\s*</,{token:"string.delim",switchTo:"@qstring.<.>"}],[/(q|qw|tr|y)#/,{token:"string.delim",switchTo:"@qstring.#.#"}],[/(q|qw|tr|y)\s*([^A-Za-z0-9#\s])/,{token:"string.delim",switchTo:"@qstring.$2.$2"}],[/(q|qw|tr|y)\s+(\w)/,{token:"string.delim",switchTo:"@qstring.$2.$2"}],[/(qr|m|s)\s*\(/,{token:"regexp.delim",switchTo:"@qregexp.(.)"}],[/(qr|m|s)\s*\[/,{token:"regexp.delim",switchTo:"@qregexp.[.]"}],[/(qr|m|s)\s*\{/,{token:"regexp.delim",switchTo:"@qregexp.{.}"}],[/(qr|m|s)\s*</,{token:"regexp.delim",switchTo:"@qregexp.<.>"}],[/(qr|m|s)#/,{token:"regexp.delim",switchTo:"@qregexp.#.#"}],[/(qr|m|s)\s*([^A-Za-z0-9_#\s])/,{token:"regexp.delim",switchTo:"@qregexp.$2.$2"}],[/(qr|m|s)\s+(\w)/,{token:"regexp.delim",switchTo:"@qregexp.$2.$2"}],[/(qq|qx)\s*\(/,{token:"string.delim",switchTo:"@qqstring.(.)"}],[/(qq|qx)\s*\[/,{token:"string.delim",switchTo:"@qqstring.[.]"}],[/(qq|qx)\s*\{/,{token:"string.delim",switchTo:"@qqstring.{.}"}],[/(qq|qx)\s*</,{token:"string.delim",switchTo:"@qqstring.<.>"}],[/(qq|qx)#/,{token:"string.delim",switchTo:"@qqstring.#.#"}],[/(qq|qx)\s*([^A-Za-z0-9#\s])/,{token:"string.delim",switchTo:"@qqstring.$2.$2"}],[/(qq|qx)\s+(\w)/,{token:"string.delim",switchTo:"@qqstring.$2.$2"}]],qstring:[[/\\./,"string.escape"],[/./,{cases:{"$#==$S3":{token:"string.delim",next:"@pop"},"$#==$S2":{token:"string.delim",next:"@push"},"@default":"string"}}]],qregexp:[{include:"@variables"},[/\\./,"regexp.escape"],[/./,{cases:{"$#==$S3":{token:"regexp.delim",next:"@regexpModifiers"},"$#==$S2":{token:"regexp.delim",next:"@push"},"@default":"regexp"}}]],regexpModifiers:[[/[msixpodualngcer]+/,{token:"regexp.modifier",next:"@popall"}]],qqstring:[{include:"@variables"},{include:"@qstring"}],heredoc:[[/<<\s*['"`]?([\w\-]+)['"`]?/,{token:"string.heredoc.delimiter",next:"@heredocBody.$1"}]],heredocBody:[[/^([\w\-]+)$/,{cases:{"$1==$S2":[{token:"string.heredoc.delimiter",next:"@popall"}],"@default":"string.heredoc"}}],[/./,"string.heredoc"]],perldoc:[[/^=\w/,"comment.doc","@perldocBody"]],perldocBody:[[/^=cut\b/,"type.identifier","@popall"],[/./,"comment.doc"]],variables:[[/\$\w+/,"variable"],[/@\w+/,"variable"],[/%\w+/,"variable"]]}},Yye=Object.freeze(Object.defineProperty({__proto__:null,conf:Gye,language:Kye},Symbol.toStringTag,{value:"Module"})),Zye={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},Xye={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["A","ABORT","ABS","ABSENT","ABSOLUTE","ACCESS","ACCORDING","ACTION","ADA","ADD","ADMIN","AFTER","AGGREGATE","ALL","ALLOCATE","ALSO","ALTER","ALWAYS","ANALYSE","ANALYZE","AND","ANY","ARE","ARRAY","ARRAY_AGG","ARRAY_MAX_CARDINALITY","AS","ASC","ASENSITIVE","ASSERTION","ASSIGNMENT","ASYMMETRIC","AT","ATOMIC","ATTRIBUTE","ATTRIBUTES","AUTHORIZATION","AVG","BACKWARD","BASE64","BEFORE","BEGIN","BEGIN_FRAME","BEGIN_PARTITION","BERNOULLI","BETWEEN","BIGINT","BINARY","BIT","BIT_LENGTH","BLOB","BLOCKED","BOM","BOOLEAN","BOTH","BREADTH","BY","C","CACHE","CALL","CALLED","CARDINALITY","CASCADE","CASCADED","CASE","CAST","CATALOG","CATALOG_NAME","CEIL","CEILING","CHAIN","CHAR","CHARACTER","CHARACTERISTICS","CHARACTERS","CHARACTER_LENGTH","CHARACTER_SET_CATALOG","CHARACTER_SET_NAME","CHARACTER_SET_SCHEMA","CHAR_LENGTH","CHECK","CHECKPOINT","CLASS","CLASS_ORIGIN","CLOB","CLOSE","CLUSTER","COALESCE","COBOL","COLLATE","COLLATION","COLLATION_CATALOG","COLLATION_NAME","COLLATION_SCHEMA","COLLECT","COLUMN","COLUMNS","COLUMN_NAME","COMMAND_FUNCTION","COMMAND_FUNCTION_CODE","COMMENT","COMMENTS","COMMIT","COMMITTED","CONCURRENTLY","CONDITION","CONDITION_NUMBER","CONFIGURATION","CONFLICT","CONNECT","CONNECTION","CONNECTION_NAME","CONSTRAINT","CONSTRAINTS","CONSTRAINT_CATALOG","CONSTRAINT_NAME","CONSTRAINT_SCHEMA","CONSTRUCTOR","CONTAINS","CONTENT","CONTINUE","CONTROL","CONVERSION","CONVERT","COPY","CORR","CORRESPONDING","COST","COUNT","COVAR_POP","COVAR_SAMP","CREATE","CROSS","CSV","CUBE","CUME_DIST","CURRENT","CURRENT_CATALOG","CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_ROW","CURRENT_SCHEMA","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CURSOR_NAME","CYCLE","DATA","DATABASE","DATALINK","DATE","DATETIME_INTERVAL_CODE","DATETIME_INTERVAL_PRECISION","DAY","DB","DEALLOCATE","DEC","DECIMAL","DECLARE","DEFAULT","DEFAULTS","DEFERRABLE","DEFERRED","DEFINED","DEFINER","DEGREE","DELETE","DELIMITER","DELIMITERS","DENSE_RANK","DEPENDS","DEPTH","DEREF","DERIVED","DESC","DESCRIBE","DESCRIPTOR","DETERMINISTIC","DIAGNOSTICS","DICTIONARY","DISABLE","DISCARD","DISCONNECT","DISPATCH","DISTINCT","DLNEWCOPY","DLPREVIOUSCOPY","DLURLCOMPLETE","DLURLCOMPLETEONLY","DLURLCOMPLETEWRITE","DLURLPATH","DLURLPATHONLY","DLURLPATHWRITE","DLURLSCHEME","DLURLSERVER","DLVALUE","DO","DOCUMENT","DOMAIN","DOUBLE","DROP","DYNAMIC","DYNAMIC_FUNCTION","DYNAMIC_FUNCTION_CODE","EACH","ELEMENT","ELSE","EMPTY","ENABLE","ENCODING","ENCRYPTED","END","END-EXEC","END_FRAME","END_PARTITION","ENFORCED","ENUM","EQUALS","ESCAPE","EVENT","EVERY","EXCEPT","EXCEPTION","EXCLUDE","EXCLUDING","EXCLUSIVE","EXEC","EXECUTE","EXISTS","EXP","EXPLAIN","EXPRESSION","EXTENSION","EXTERNAL","EXTRACT","FALSE","FAMILY","FETCH","FILE","FILTER","FINAL","FIRST","FIRST_VALUE","FLAG","FLOAT","FLOOR","FOLLOWING","FOR","FORCE","FOREIGN","FORTRAN","FORWARD","FOUND","FRAME_ROW","FREE","FREEZE","FROM","FS","FULL","FUNCTION","FUNCTIONS","FUSION","G","GENERAL","GENERATED","GET","GLOBAL","GO","GOTO","GRANT","GRANTED","GREATEST","GROUP","GROUPING","GROUPS","HANDLER","HAVING","HEADER","HEX","HIERARCHY","HOLD","HOUR","ID","IDENTITY","IF","IGNORE","ILIKE","IMMEDIATE","IMMEDIATELY","IMMUTABLE","IMPLEMENTATION","IMPLICIT","IMPORT","IN","INCLUDING","INCREMENT","INDENT","INDEX","INDEXES","INDICATOR","INHERIT","INHERITS","INITIALLY","INLINE","INNER","INOUT","INPUT","INSENSITIVE","INSERT","INSTANCE","INSTANTIABLE","INSTEAD","INT","INTEGER","INTEGRITY","INTERSECT","INTERSECTION","INTERVAL","INTO","INVOKER","IS","ISNULL","ISOLATION","JOIN","K","KEY","KEY_MEMBER","KEY_TYPE","LABEL","LAG","LANGUAGE","LARGE","LAST","LAST_VALUE","LATERAL","LEAD","LEADING","LEAKPROOF","LEAST","LEFT","LENGTH","LEVEL","LIBRARY","LIKE","LIKE_REGEX","LIMIT","LINK","LISTEN","LN","LOAD","LOCAL","LOCALTIME","LOCALTIMESTAMP","LOCATION","LOCATOR","LOCK","LOCKED","LOGGED","LOWER","M","MAP","MAPPING","MATCH","MATCHED","MATERIALIZED","MAX","MAXVALUE","MAX_CARDINALITY","MEMBER","MERGE","MESSAGE_LENGTH","MESSAGE_OCTET_LENGTH","MESSAGE_TEXT","METHOD","MIN","MINUTE","MINVALUE","MOD","MODE","MODIFIES","MODULE","MONTH","MORE","MOVE","MULTISET","MUMPS","NAME","NAMES","NAMESPACE","NATIONAL","NATURAL","NCHAR","NCLOB","NESTING","NEW","NEXT","NFC","NFD","NFKC","NFKD","NIL","NO","NONE","NORMALIZE","NORMALIZED","NOT","NOTHING","NOTIFY","NOTNULL","NOWAIT","NTH_VALUE","NTILE","NULL","NULLABLE","NULLIF","NULLS","NUMBER","NUMERIC","OBJECT","OCCURRENCES_REGEX","OCTETS","OCTET_LENGTH","OF","OFF","OFFSET","OIDS","OLD","ON","ONLY","OPEN","OPERATOR","OPTION","OPTIONS","OR","ORDER","ORDERING","ORDINALITY","OTHERS","OUT","OUTER","OUTPUT","OVER","OVERLAPS","OVERLAY","OVERRIDING","OWNED","OWNER","P","PAD","PARALLEL","PARAMETER","PARAMETER_MODE","PARAMETER_NAME","PARAMETER_ORDINAL_POSITION","PARAMETER_SPECIFIC_CATALOG","PARAMETER_SPECIFIC_NAME","PARAMETER_SPECIFIC_SCHEMA","PARSER","PARTIAL","PARTITION","PASCAL","PASSING","PASSTHROUGH","PASSWORD","PATH","PERCENT","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","PERIOD","PERMISSION","PLACING","PLANS","PLI","POLICY","PORTION","POSITION","POSITION_REGEX","POWER","PRECEDES","PRECEDING","PRECISION","PREPARE","PREPARED","PRESERVE","PRIMARY","PRIOR","PRIVILEGES","PROCEDURAL","PROCEDURE","PROGRAM","PUBLIC","QUOTE","RANGE","RANK","READ","READS","REAL","REASSIGN","RECHECK","RECOVERY","RECURSIVE","REF","REFERENCES","REFERENCING","REFRESH","REGR_AVGX","REGR_AVGY","REGR_COUNT","REGR_INTERCEPT","REGR_R2","REGR_SLOPE","REGR_SXX","REGR_SXY","REGR_SYY","REINDEX","RELATIVE","RELEASE","RENAME","REPEATABLE","REPLACE","REPLICA","REQUIRING","RESET","RESPECT","RESTART","RESTORE","RESTRICT","RESULT","RETURN","RETURNED_CARDINALITY","RETURNED_LENGTH","RETURNED_OCTET_LENGTH","RETURNED_SQLSTATE","RETURNING","RETURNS","REVOKE","RIGHT","ROLE","ROLLBACK","ROLLUP","ROUTINE","ROUTINE_CATALOG","ROUTINE_NAME","ROUTINE_SCHEMA","ROW","ROWS","ROW_COUNT","ROW_NUMBER","RULE","SAVEPOINT","SCALE","SCHEMA","SCHEMA_NAME","SCOPE","SCOPE_CATALOG","SCOPE_NAME","SCOPE_SCHEMA","SCROLL","SEARCH","SECOND","SECTION","SECURITY","SELECT","SELECTIVE","SELF","SENSITIVE","SEQUENCE","SEQUENCES","SERIALIZABLE","SERVER","SERVER_NAME","SESSION","SESSION_USER","SET","SETOF","SETS","SHARE","SHOW","SIMILAR","SIMPLE","SIZE","SKIP","SMALLINT","SNAPSHOT","SOME","SOURCE","SPACE","SPECIFIC","SPECIFICTYPE","SPECIFIC_NAME","SQL","SQLCODE","SQLERROR","SQLEXCEPTION","SQLSTATE","SQLWARNING","SQRT","STABLE","STANDALONE","START","STATE","STATEMENT","STATIC","STATISTICS","STDDEV_POP","STDDEV_SAMP","STDIN","STDOUT","STORAGE","STRICT","STRIP","STRUCTURE","STYLE","SUBCLASS_ORIGIN","SUBMULTISET","SUBSTRING","SUBSTRING_REGEX","SUCCEEDS","SUM","SYMMETRIC","SYSID","SYSTEM","SYSTEM_TIME","SYSTEM_USER","T","TABLE","TABLES","TABLESAMPLE","TABLESPACE","TABLE_NAME","TEMP","TEMPLATE","TEMPORARY","TEXT","THEN","TIES","TIME","TIMESTAMP","TIMEZONE_HOUR","TIMEZONE_MINUTE","TO","TOKEN","TOP_LEVEL_COUNT","TRAILING","TRANSACTION","TRANSACTIONS_COMMITTED","TRANSACTIONS_ROLLED_BACK","TRANSACTION_ACTIVE","TRANSFORM","TRANSFORMS","TRANSLATE","TRANSLATE_REGEX","TRANSLATION","TREAT","TRIGGER","TRIGGER_CATALOG","TRIGGER_NAME","TRIGGER_SCHEMA","TRIM","TRIM_ARRAY","TRUE","TRUNCATE","TRUSTED","TYPE","TYPES","UESCAPE","UNBOUNDED","UNCOMMITTED","UNDER","UNENCRYPTED","UNION","UNIQUE","UNKNOWN","UNLINK","UNLISTEN","UNLOGGED","UNNAMED","UNNEST","UNTIL","UNTYPED","UPDATE","UPPER","URI","USAGE","USER","USER_DEFINED_TYPE_CATALOG","USER_DEFINED_TYPE_CODE","USER_DEFINED_TYPE_NAME","USER_DEFINED_TYPE_SCHEMA","USING","VACUUM","VALID","VALIDATE","VALIDATOR","VALUE","VALUES","VALUE_OF","VARBINARY","VARCHAR","VARIADIC","VARYING","VAR_POP","VAR_SAMP","VERBOSE","VERSION","VERSIONING","VIEW","VIEWS","VOLATILE","WHEN","WHENEVER","WHERE","WHITESPACE","WIDTH_BUCKET","WINDOW","WITH","WITHIN","WITHOUT","WORK","WRAPPER","WRITE","XML","XMLAGG","XMLATTRIBUTES","XMLBINARY","XMLCAST","XMLCOMMENT","XMLCONCAT","XMLDECLARATION","XMLDOCUMENT","XMLELEMENT","XMLEXISTS","XMLFOREST","XMLITERATE","XMLNAMESPACES","XMLPARSE","XMLPI","XMLQUERY","XMLROOT","XMLSCHEMA","XMLSERIALIZE","XMLTABLE","XMLTEXT","XMLVALIDATE","YEAR","YES","ZONE"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["abbrev","abs","acos","acosd","age","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","ascii","asin","asind","atan","atan2","atan2d","atand","avg","bit","bit_and","bit_length","bit_or","bool_and","bool_or","bound_box","box","brin_summarize_new_values","broadcast","btrim","cardinality","cbrt","ceil","ceiling","center","char_length","character_length","chr","circle","clock_timestamp","coalesce","col_description","concat","concat_ws","convert","convert_from","convert_to","corr","cos","cosd","cot","cotd","count","covar_pop","covar_samp","cume_dist","current_catalog","current_database","current_date","current_query","current_role","current_schema","current_schemas","current_setting","current_time","current_timestamp","current_user","currval","cursor_to_xml","date_part","date_trunc","decode","degrees","dense_rank","diameter","div","encode","enum_first","enum_last","enum_range","every","exp","extract","family","first_value","floor","format","format_type","generate_series","generate_subscripts","get_bit","get_byte","get_current_ts_config","gin_clean_pending_list","greatest","grouping","has_any_column_privilege","has_column_privilege","has_database_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_schema_privilege","has_sequence_privilege","has_server_privilege","has_table_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","initcap","isclosed","isempty","isfinite","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lag","last_value","lastval","lead","least","left","length","line","ln","localtime","localtimestamp","log","lower","lower_inc","lower_inf","lpad","lseg","ltrim","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","max","md5","min","mod","mode","netmask","network","nextval","now","npoints","nth_value","ntile","nullif","num_nonnulls","num_nulls","numnode","obj_description","octet_length","overlay","parse_ident","path","pclose","percent_rank","percentile_cont","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backend_pid","pg_backup_start_time","pg_blocking_pids","pg_cancel_backend","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_terminate_backend","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","pi","plainto_tsquery","point","polygon","popen","position","power","pqserverversion","query_to_xml","querytree","quote_ident","quote_literal","quote_nullable","radians","radius","random","range_merge","rank","regexp_matches","regexp_replace","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","repeat","replace","reverse","right","round","row_number","row_security_active","row_to_json","rpad","rtrim","scale","session_user","set_bit","set_byte","set_config","set_masklen","setseed","setval","setweight","shobj_description","sign","sin","sind","split_part","sprintf","sqrt","statement_timestamp","stddev","stddev_pop","stddev_samp","string_agg","string_to_array","strip","strpos","substr","substring","sum","table_to_xml","table_to_xml_and_xmlschema","tan","tand","text","timeofday","timezone","to_ascii","to_char","to_date","to_hex","to_json","to_number","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_timestamp","to_tsquery","to_tsvector","transaction_timestamp","translate","trim","trunc","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper","upper_inc","upper_inf","user","var_pop","var_samp","variance","version","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}},Qye=Object.freeze(Object.defineProperty({__proto__:null,conf:Zye,language:Xye},Symbol.toStringTag,{value:"Module"})),Jye={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:"(",close:")",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*(#|//)region\\b"),end:new RegExp("^\\s*(#|//)endregion\\b")}}},e0e={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)(\w+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)(\w+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[^<]+/]],doctype:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\?((php)|=)?/,{token:"@rematch",switchTo:"@phpInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],phpInSimpleState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3"}],{include:"phpRoot"}],phpInEmbeddedState:[[/<\?((php)|=)?/,"metatag.php"],[/\?>/,{token:"metatag.php",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],{include:"phpRoot"}],phpRoot:[[/[a-zA-Z_]\w*/,{cases:{"@phpKeywords":{token:"keyword.php"},"@phpCompileTimeConstants":{token:"constant.php"},"@default":"identifier.php"}}],[/[$a-zA-Z_]\w*/,{cases:{"@phpPreDefinedVariables":{token:"variable.predefined.php"},"@default":"variable.php"}}],[/[{}]/,"delimiter.bracket.php"],[/[\[\]]/,"delimiter.array.php"],[/[()]/,"delimiter.parenthesis.php"],[/[ \t\r\n]+/],[/(#|\/\/)$/,"comment.php"],[/(#|\/\/)/,"comment.php","@phpLineComment"],[/\/\*/,"comment.php","@phpComment"],[/"/,"string.php","@phpDoubleQuoteString"],[/'/,"string.php","@phpSingleQuoteString"],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,\@]/,"delimiter.php"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.php"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.php"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.php"],[/0[0-7']*[0-7]/,"number.octal.php"],[/0[bB][0-1']*[0-1]/,"number.binary.php"],[/\d[\d']*/,"number.php"],[/\d/,"number.php"]],phpComment:[[/\*\//,"comment.php","@pop"],[/[^*]+/,"comment.php"],[/./,"comment.php"]],phpLineComment:[[/\?>/,{token:"@rematch",next:"@pop"}],[/.$/,"comment.php","@pop"],[/[^?]+$/,"comment.php","@pop"],[/[^?]+/,"comment.php"],[/./,"comment.php"]],phpDoubleQuoteString:[[/[^\\"]+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/"/,"string.php","@pop"]],phpSingleQuoteString:[[/[^\\']+/,"string.php"],[/@escapes/,"string.escape.php"],[/\\./,"string.escape.invalid.php"],[/'/,"string.php","@pop"]]},phpKeywords:["abstract","and","array","as","break","callable","case","catch","cfunction","class","clone","const","continue","declare","default","do","else","elseif","enddeclare","endfor","endforeach","endif","endswitch","endwhile","extends","false","final","for","foreach","function","global","goto","if","implements","interface","instanceof","insteadof","namespace","new","null","object","old_function","or","private","protected","public","resource","static","switch","throw","trait","try","true","use","var","while","xor","die","echo","empty","exit","eval","include","include_once","isset","list","require","require_once","return","print","unset","yield","__construct"],phpCompileTimeConstants:["__CLASS__","__DIR__","__FILE__","__LINE__","__NAMESPACE__","__METHOD__","__FUNCTION__","__TRAIT__"],phpPreDefinedVariables:["$GLOBALS","$_SERVER","$_GET","$_POST","$_FILES","$_REQUEST","$_SESSION","$_ENV","$_COOKIE","$php_errormsg","$HTTP_RAW_POST_DATA","$http_response_header","$argc","$argv"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/},t0e=Object.freeze(Object.defineProperty({__proto__:null,conf:Jye,language:e0e},Symbol.toStringTag,{value:"Module"})),i0e={comments:{lineComment:"#"},brackets:[["[","]"],["<",">"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}],surroundingPairs:[{open:"[",close:"]"},{open:"<",close:">"},{open:"(",close:")"}]},n0e={defaultToken:"",tokenPostfix:".pla",brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"<",close:">",token:"delimiter.angle"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:[".i",".o",".mv",".ilb",".ob",".label",".type",".phase",".pair",".symbolic",".symbolic-output",".kiss",".p",".e",".end"],comment:/#.*$/,identifier:/[a-zA-Z]+[a-zA-Z0-9_\-]*/,plaContent:/[01\-~\|]+/,tokenizer:{root:[{include:"@whitespace"},[/@comment/,"comment"],[/\.([a-zA-Z_\-]+)/,{cases:{"@eos":{token:"keyword.$1"},"@keywords":{cases:{".type":{token:"keyword.$1",next:"@type"},"@default":{token:"keyword.$1",next:"@keywordArg"}}},"@default":{token:"keyword.$1"}}}],[/@identifier/,"identifier"],[/@plaContent/,"string"]],whitespace:[[/[ \t\r\n]+/,""]],type:[{include:"@whitespace"},[/\w+/,{token:"type",next:"@pop"}]],keywordArg:[[/[ \t\r\n]+/,{cases:{"@eos":{token:"",next:"@pop"},"@default":""}}],[/@comment/,"comment","@pop"],[/[<>()\[\]]/,{cases:{"@eos":{token:"@brackets",next:"@pop"},"@default":"@brackets"}}],[/\-?\d+/,{cases:{"@eos":{token:"number",next:"@pop"},"@default":"number"}}],[/@identifier/,{cases:{"@eos":{token:"identifier",next:"@pop"},"@default":"identifier"}}],[/[;=]/,{cases:{"@eos":{token:"delimiter",next:"@pop"},"@default":"delimiter"}}]]}},r0e=Object.freeze(Object.defineProperty({__proto__:null,conf:i0e,language:n0e},Symbol.toStringTag,{value:"Module"})),s0e={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},o0e={tokenPostfix:".pats",defaultToken:"invalid",keywords:["abstype","abst0ype","absprop","absview","absvtype","absviewtype","absvt0ype","absviewt0ype","as","and","assume","begin","classdec","datasort","datatype","dataprop","dataview","datavtype","dataviewtype","do","end","extern","extype","extvar","exception","fn","fnx","fun","prfn","prfun","praxi","castfn","if","then","else","ifcase","in","infix","infixl","infixr","prefix","postfix","implmnt","implement","primplmnt","primplement","import","let","local","macdef","macrodef","nonfix","symelim","symintr","overload","of","op","rec","sif","scase","sortdef","sta","stacst","stadef","static","staload","dynload","try","tkindef","typedef","propdef","viewdef","vtypedef","viewtypedef","prval","var","prvar","when","where","with","withtype","withprop","withview","withvtype","withviewtype"],keywords_dlr:["$delay","$ldelay","$arrpsz","$arrptrsize","$d2ctype","$effmask","$effmask_ntm","$effmask_exn","$effmask_ref","$effmask_wrt","$effmask_all","$extern","$extkind","$extype","$extype_struct","$extval","$extfcall","$extmcall","$literal","$myfilename","$mylocation","$myfunction","$lst","$lst_t","$lst_vt","$list","$list_t","$list_vt","$rec","$rec_t","$rec_vt","$record","$record_t","$record_vt","$tup","$tup_t","$tup_vt","$tuple","$tuple_t","$tuple_vt","$break","$continue","$raise","$showtype","$vcopyenv_v","$vcopyenv_vt","$tempenver","$solver_assert","$solver_verify"],keywords_srp:["#if","#ifdef","#ifndef","#then","#elif","#elifdef","#elifndef","#else","#endif","#error","#prerr","#print","#assert","#undef","#define","#include","#require","#pragma","#codegen2","#codegen3"],irregular_keyword_list:["val+","val-","val","case+","case-","case","addr@","addr","fold@","free@","fix@","fix","lam@","lam","llam@","llam","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","view+","view-","view@","view","type+","type-","type","vtype+","vtype-","vtype","vt@ype+","vt@ype-","vt@ype","viewt@ype+","viewt@ype-","viewt@ype","viewtype+","viewtype-","viewtype","prop+","prop-","prop","type+","type-","type","t@ype","t@ype+","t@ype-","abst@ype","abstype","absviewt@ype","absvt@ype","for*","for","while*","while"],keywords_types:["bool","double","byte","int","short","char","void","unit","long","float","string","strptr"],keywords_effects:["0","fun","clo","prf","funclo","cloptr","cloref","ref","ntm","1"],operators:["@","!","|","`",":","$",".","=","#","~","..","...","=>","=<>","=/=>","=>>","=/=>>","<",">","><",".<",">.",".<>.","->","-<>"],brackets:[{open:",(",close:")",token:"delimiter.parenthesis"},{open:"`(",close:")",token:"delimiter.parenthesis"},{open:"%(",close:")",token:"delimiter.parenthesis"},{open:"'(",close:")",token:"delimiter.parenthesis"},{open:"'{",close:"}",token:"delimiter.parenthesis"},{open:"@(",close:")",token:"delimiter.parenthesis"},{open:"@{",close:"}",token:"delimiter.brace"},{open:"@[",close:"]",token:"delimiter.square"},{open:"#[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=><!~?:&|+\-*\/\^%]+/,IDENTFST:/[a-zA-Z_]/,IDENTRST:/[a-zA-Z0-9_'$]/,symbolic:/[%&+-./:=@~`^|*!$#?<>]/,digit:/[0-9]/,digitseq0:/@digit*/,xdigit:/[0-9A-Za-z]/,xdigitseq0:/@xdigit*/,INTSP:/[lLuU]/,FLOATSP:/[fFlL]/,fexponent:/[eE][+-]?[0-9]+/,fexponent_bin:/[pP][+-]?[0-9]+/,deciexp:/\.[0-9]*@fexponent?/,hexiexp:/\.[0-9a-zA-Z]*@fexponent_bin?/,irregular_keywords:/val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/,ESCHAR:/[ntvbrfa\\\?'"\(\[\{]/,start:"root",tokenizer:{root:[{regex:/[ \t\r\n]+/,action:{token:""}},{regex:/\(\*\)/,action:{token:"invalid"}},{regex:/\(\*/,action:{token:"comment",next:"lexing_COMMENT_block_ml"}},{regex:/\(/,action:"@brackets"},{regex:/\)/,action:"@brackets"},{regex:/\[/,action:"@brackets"},{regex:/\]/,action:"@brackets"},{regex:/\{/,action:"@brackets"},{regex:/\}/,action:"@brackets"},{regex:/,\(/,action:"@brackets"},{regex:/,/,action:{token:"delimiter.comma"}},{regex:/;/,action:{token:"delimiter.semicolon"}},{regex:/@\(/,action:"@brackets"},{regex:/@\[/,action:"@brackets"},{regex:/@\{/,action:"@brackets"},{regex:/:</,action:{token:"keyword",next:"@lexing_EFFECT_commaseq0"}},{regex:/\.@symbolic+/,action:{token:"identifier.sym"}},{regex:/\.@digit*@fexponent@FLOATSP*/,action:{token:"number.float"}},{regex:/\.@digit+/,action:{token:"number.float"}},{regex:/\$@IDENTFST@IDENTRST*/,action:{cases:{"@keywords_dlr":{token:"keyword.dlr"},"@default":{token:"namespace"}}}},{regex:/\#@IDENTFST@IDENTRST*/,action:{cases:{"@keywords_srp":{token:"keyword.srp"},"@default":{token:"identifier"}}}},{regex:/%\(/,action:{token:"delimiter.parenthesis"}},{regex:/^%{(#|\^|\$)?/,action:{token:"keyword",next:"@lexing_EXTCODE",nextEmbedded:"text/javascript"}},{regex:/^%}/,action:{token:"keyword"}},{regex:/'\(/,action:{token:"delimiter.parenthesis"}},{regex:/'\[/,action:{token:"delimiter.bracket"}},{regex:/'\{/,action:{token:"delimiter.brace"}},[/(')(\\@ESCHAR|\\[xX]@xdigit+|\\@digit+)(')/,["string","string.escape","string"]],[/'[^\\']'/,"string"],[/"/,"string.quote","@lexing_DQUOTE"],{regex:/`\(/,action:"@brackets"},{regex:/\\/,action:{token:"punctuation"}},{regex:/@irregular_keywords(?!@IDENTRST)/,action:{token:"keyword"}},{regex:/@IDENTFST@IDENTRST*[<!\[]?/,action:{cases:{"@keywords":{token:"keyword"},"@keywords_types":{token:"type"},"@default":{token:"identifier"}}}},{regex:/\/\/\/\//,action:{token:"comment",next:"@lexing_COMMENT_rest"}},{regex:/\/\/.*$/,action:{token:"comment"}},{regex:/\/\*/,action:{token:"comment",next:"@lexing_COMMENT_block_c"}},{regex:/-<|=</,action:{token:"keyword",next:"@lexing_EFFECT_commaseq0"}},{regex:/@symbolic+/,action:{cases:{"@operators":"keyword","@default":"operator"}}},{regex:/0[xX]@xdigit+(@hexiexp|@fexponent_bin)@FLOATSP*/,action:{token:"number.float"}},{regex:/0[xX]@xdigit+@INTSP*/,action:{token:"number.hex"}},{regex:/0[0-7]+(?![0-9])@INTSP*/,action:{token:"number.octal"}},{regex:/@digit+(@fexponent|@deciexp)@FLOATSP*/,action:{token:"number.float"}},{regex:/@digit@digitseq0@INTSP*/,action:{token:"number.decimal"}},{regex:/@digit+@INTSP*/,action:{token:"number"}}],lexing_COMMENT_block_ml:[[/[^\(\*]+/,"comment"],[/\(\*/,"comment","@push"],[/\(\*/,"comment.invalid"],[/\*\)/,"comment","@pop"],[/\*/,"comment"]],lexing_COMMENT_block_c:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],lexing_COMMENT_rest:[[/$/,"comment","@pop"],[/.*/,"comment"]],lexing_EFFECT_commaseq0:[{regex:/@IDENTFST@IDENTRST+|@digit+/,action:{cases:{"@keywords_effects":{token:"type.effect"},"@default":{token:"identifier"}}}},{regex:/,/,action:{token:"punctuation"}},{regex:/>/,action:{token:"@rematch",next:"@pop"}}],lexing_EXTCODE:[{regex:/^%}/,action:{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}},{regex:/[^%]+/,action:""}],lexing_DQUOTE:[{regex:/"/,action:{token:"string.quote",next:"@pop"}},{regex:/(\{\$)(@IDENTFST@IDENTRST*)(\})/,action:[{token:"string.escape"},{token:"identifier"},{token:"string.escape"}]},{regex:/\\$/,action:{token:"string.escape"}},{regex:/\\(@ESCHAR|[xX]@xdigit+|@digit+)/,action:{token:"string.escape"}},{regex:/[^\\"]+/,action:{token:"string"}}]}},a0e=Object.freeze(Object.defineProperty({__proto__:null,conf:s0e,language:o0e},Symbol.toStringTag,{value:"Module"})),l0e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["[","]"],["(",")"],["{","}"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment","identifier"]},{open:"[",close:"]",notIn:["string","comment","identifier"]},{open:"(",close:")",notIn:["string","comment","identifier"]},{open:"{",close:"}",notIn:["string","comment","identifier"]}]},c0e={defaultToken:"",tokenPostfix:".pq",ignoreCase:!1,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"{",close:"}",token:"delimiter.brackets"},{open:"(",close:")",token:"delimiter.parenthesis"}],operatorKeywords:["and","not","or"],keywords:["as","each","else","error","false","if","in","is","let","meta","otherwise","section","shared","then","true","try","type"],constructors:["#binary","#date","#datetime","#datetimezone","#duration","#table","#time"],constants:["#infinity","#nan","#sections","#shared"],typeKeywords:["action","any","anynonnull","none","null","logical","number","time","date","datetime","datetimezone","duration","text","binary","list","record","table","function"],builtinFunctions:["Access.Database","Action.Return","Action.Sequence","Action.Try","ActiveDirectory.Domains","AdoDotNet.DataSource","AdoDotNet.Query","AdobeAnalytics.Cubes","AnalysisServices.Database","AnalysisServices.Databases","AzureStorage.BlobContents","AzureStorage.Blobs","AzureStorage.Tables","Binary.Buffer","Binary.Combine","Binary.Compress","Binary.Decompress","Binary.End","Binary.From","Binary.FromList","Binary.FromText","Binary.InferContentType","Binary.Length","Binary.ToList","Binary.ToText","BinaryFormat.7BitEncodedSignedInteger","BinaryFormat.7BitEncodedUnsignedInteger","BinaryFormat.Binary","BinaryFormat.Byte","BinaryFormat.ByteOrder","BinaryFormat.Choice","BinaryFormat.Decimal","BinaryFormat.Double","BinaryFormat.Group","BinaryFormat.Length","BinaryFormat.List","BinaryFormat.Null","BinaryFormat.Record","BinaryFormat.SignedInteger16","BinaryFormat.SignedInteger32","BinaryFormat.SignedInteger64","BinaryFormat.Single","BinaryFormat.Text","BinaryFormat.Transform","BinaryFormat.UnsignedInteger16","BinaryFormat.UnsignedInteger32","BinaryFormat.UnsignedInteger64","Byte.From","Character.FromNumber","Character.ToNumber","Combiner.CombineTextByDelimiter","Combiner.CombineTextByEachDelimiter","Combiner.CombineTextByLengths","Combiner.CombineTextByPositions","Combiner.CombineTextByRanges","Comparer.Equals","Comparer.FromCulture","Comparer.Ordinal","Comparer.OrdinalIgnoreCase","Csv.Document","Cube.AddAndExpandDimensionColumn","Cube.AddMeasureColumn","Cube.ApplyParameter","Cube.AttributeMemberId","Cube.AttributeMemberProperty","Cube.CollapseAndRemoveColumns","Cube.Dimensions","Cube.DisplayFolders","Cube.Measures","Cube.Parameters","Cube.Properties","Cube.PropertyKey","Cube.ReplaceDimensions","Cube.Transform","Currency.From","DB2.Database","Date.AddDays","Date.AddMonths","Date.AddQuarters","Date.AddWeeks","Date.AddYears","Date.Day","Date.DayOfWeek","Date.DayOfWeekName","Date.DayOfYear","Date.DaysInMonth","Date.EndOfDay","Date.EndOfMonth","Date.EndOfQuarter","Date.EndOfWeek","Date.EndOfYear","Date.From","Date.FromText","Date.IsInCurrentDay","Date.IsInCurrentMonth","Date.IsInCurrentQuarter","Date.IsInCurrentWeek","Date.IsInCurrentYear","Date.IsInNextDay","Date.IsInNextMonth","Date.IsInNextNDays","Date.IsInNextNMonths","Date.IsInNextNQuarters","Date.IsInNextNWeeks","Date.IsInNextNYears","Date.IsInNextQuarter","Date.IsInNextWeek","Date.IsInNextYear","Date.IsInPreviousDay","Date.IsInPreviousMonth","Date.IsInPreviousNDays","Date.IsInPreviousNMonths","Date.IsInPreviousNQuarters","Date.IsInPreviousNWeeks","Date.IsInPreviousNYears","Date.IsInPreviousQuarter","Date.IsInPreviousWeek","Date.IsInPreviousYear","Date.IsInYearToDate","Date.IsLeapYear","Date.Month","Date.MonthName","Date.QuarterOfYear","Date.StartOfDay","Date.StartOfMonth","Date.StartOfQuarter","Date.StartOfWeek","Date.StartOfYear","Date.ToRecord","Date.ToText","Date.WeekOfMonth","Date.WeekOfYear","Date.Year","DateTime.AddZone","DateTime.Date","DateTime.FixedLocalNow","DateTime.From","DateTime.FromFileTime","DateTime.FromText","DateTime.IsInCurrentHour","DateTime.IsInCurrentMinute","DateTime.IsInCurrentSecond","DateTime.IsInNextHour","DateTime.IsInNextMinute","DateTime.IsInNextNHours","DateTime.IsInNextNMinutes","DateTime.IsInNextNSeconds","DateTime.IsInNextSecond","DateTime.IsInPreviousHour","DateTime.IsInPreviousMinute","DateTime.IsInPreviousNHours","DateTime.IsInPreviousNMinutes","DateTime.IsInPreviousNSeconds","DateTime.IsInPreviousSecond","DateTime.LocalNow","DateTime.Time","DateTime.ToRecord","DateTime.ToText","DateTimeZone.FixedLocalNow","DateTimeZone.FixedUtcNow","DateTimeZone.From","DateTimeZone.FromFileTime","DateTimeZone.FromText","DateTimeZone.LocalNow","DateTimeZone.RemoveZone","DateTimeZone.SwitchZone","DateTimeZone.ToLocal","DateTimeZone.ToRecord","DateTimeZone.ToText","DateTimeZone.ToUtc","DateTimeZone.UtcNow","DateTimeZone.ZoneHours","DateTimeZone.ZoneMinutes","Decimal.From","Diagnostics.ActivityId","Diagnostics.Trace","DirectQueryCapabilities.From","Double.From","Duration.Days","Duration.From","Duration.FromText","Duration.Hours","Duration.Minutes","Duration.Seconds","Duration.ToRecord","Duration.ToText","Duration.TotalDays","Duration.TotalHours","Duration.TotalMinutes","Duration.TotalSeconds","Embedded.Value","Error.Record","Excel.CurrentWorkbook","Excel.Workbook","Exchange.Contents","Expression.Constant","Expression.Evaluate","Expression.Identifier","Facebook.Graph","File.Contents","Folder.Contents","Folder.Files","Function.From","Function.Invoke","Function.InvokeAfter","Function.IsDataSource","GoogleAnalytics.Accounts","Guid.From","HdInsight.Containers","HdInsight.Contents","HdInsight.Files","Hdfs.Contents","Hdfs.Files","Informix.Database","Int16.From","Int32.From","Int64.From","Int8.From","ItemExpression.From","Json.Document","Json.FromValue","Lines.FromBinary","Lines.FromText","Lines.ToBinary","Lines.ToText","List.Accumulate","List.AllTrue","List.Alternate","List.AnyTrue","List.Average","List.Buffer","List.Combine","List.Contains","List.ContainsAll","List.ContainsAny","List.Count","List.Covariance","List.DateTimeZones","List.DateTimes","List.Dates","List.Difference","List.Distinct","List.Durations","List.FindText","List.First","List.FirstN","List.Generate","List.InsertRange","List.Intersect","List.IsDistinct","List.IsEmpty","List.Last","List.LastN","List.MatchesAll","List.MatchesAny","List.Max","List.MaxN","List.Median","List.Min","List.MinN","List.Mode","List.Modes","List.NonNullCount","List.Numbers","List.PositionOf","List.PositionOfAny","List.Positions","List.Product","List.Random","List.Range","List.RemoveFirstN","List.RemoveItems","List.RemoveLastN","List.RemoveMatchingItems","List.RemoveNulls","List.RemoveRange","List.Repeat","List.ReplaceMatchingItems","List.ReplaceRange","List.ReplaceValue","List.Reverse","List.Select","List.Single","List.SingleOrDefault","List.Skip","List.Sort","List.StandardDeviation","List.Sum","List.Times","List.Transform","List.TransformMany","List.Union","List.Zip","Logical.From","Logical.FromText","Logical.ToText","MQ.Queue","MySQL.Database","Number.Abs","Number.Acos","Number.Asin","Number.Atan","Number.Atan2","Number.BitwiseAnd","Number.BitwiseNot","Number.BitwiseOr","Number.BitwiseShiftLeft","Number.BitwiseShiftRight","Number.BitwiseXor","Number.Combinations","Number.Cos","Number.Cosh","Number.Exp","Number.Factorial","Number.From","Number.FromText","Number.IntegerDivide","Number.IsEven","Number.IsNaN","Number.IsOdd","Number.Ln","Number.Log","Number.Log10","Number.Mod","Number.Permutations","Number.Power","Number.Random","Number.RandomBetween","Number.Round","Number.RoundAwayFromZero","Number.RoundDown","Number.RoundTowardZero","Number.RoundUp","Number.Sign","Number.Sin","Number.Sinh","Number.Sqrt","Number.Tan","Number.Tanh","Number.ToText","OData.Feed","Odbc.DataSource","Odbc.Query","OleDb.DataSource","OleDb.Query","Oracle.Database","Percentage.From","PostgreSQL.Database","RData.FromBinary","Record.AddField","Record.Combine","Record.Field","Record.FieldCount","Record.FieldNames","Record.FieldOrDefault","Record.FieldValues","Record.FromList","Record.FromTable","Record.HasFields","Record.RemoveFields","Record.RenameFields","Record.ReorderFields","Record.SelectFields","Record.ToList","Record.ToTable","Record.TransformFields","Replacer.ReplaceText","Replacer.ReplaceValue","RowExpression.Column","RowExpression.From","Salesforce.Data","Salesforce.Reports","SapBusinessWarehouse.Cubes","SapHana.Database","SharePoint.Contents","SharePoint.Files","SharePoint.Tables","Single.From","Soda.Feed","Splitter.SplitByNothing","Splitter.SplitTextByAnyDelimiter","Splitter.SplitTextByDelimiter","Splitter.SplitTextByEachDelimiter","Splitter.SplitTextByLengths","Splitter.SplitTextByPositions","Splitter.SplitTextByRanges","Splitter.SplitTextByRepeatedLengths","Splitter.SplitTextByWhitespace","Sql.Database","Sql.Databases","SqlExpression.SchemaFrom","SqlExpression.ToExpression","Sybase.Database","Table.AddColumn","Table.AddIndexColumn","Table.AddJoinColumn","Table.AddKey","Table.AggregateTableColumn","Table.AlternateRows","Table.Buffer","Table.Column","Table.ColumnCount","Table.ColumnNames","Table.ColumnsOfType","Table.Combine","Table.CombineColumns","Table.Contains","Table.ContainsAll","Table.ContainsAny","Table.DemoteHeaders","Table.Distinct","Table.DuplicateColumn","Table.ExpandListColumn","Table.ExpandRecordColumn","Table.ExpandTableColumn","Table.FillDown","Table.FillUp","Table.FilterWithDataTable","Table.FindText","Table.First","Table.FirstN","Table.FirstValue","Table.FromColumns","Table.FromList","Table.FromPartitions","Table.FromRecords","Table.FromRows","Table.FromValue","Table.Group","Table.HasColumns","Table.InsertRows","Table.IsDistinct","Table.IsEmpty","Table.Join","Table.Keys","Table.Last","Table.LastN","Table.MatchesAllRows","Table.MatchesAnyRows","Table.Max","Table.MaxN","Table.Min","Table.MinN","Table.NestedJoin","Table.Partition","Table.PartitionValues","Table.Pivot","Table.PositionOf","Table.PositionOfAny","Table.PrefixColumns","Table.Profile","Table.PromoteHeaders","Table.Range","Table.RemoveColumns","Table.RemoveFirstN","Table.RemoveLastN","Table.RemoveMatchingRows","Table.RemoveRows","Table.RemoveRowsWithErrors","Table.RenameColumns","Table.ReorderColumns","Table.Repeat","Table.ReplaceErrorValues","Table.ReplaceKeys","Table.ReplaceMatchingRows","Table.ReplaceRelationshipIdentity","Table.ReplaceRows","Table.ReplaceValue","Table.ReverseRows","Table.RowCount","Table.Schema","Table.SelectColumns","Table.SelectRows","Table.SelectRowsWithErrors","Table.SingleRow","Table.Skip","Table.Sort","Table.SplitColumn","Table.ToColumns","Table.ToList","Table.ToRecords","Table.ToRows","Table.TransformColumnNames","Table.TransformColumnTypes","Table.TransformColumns","Table.TransformRows","Table.Transpose","Table.Unpivot","Table.UnpivotOtherColumns","Table.View","Table.ViewFunction","TableAction.DeleteRows","TableAction.InsertRows","TableAction.UpdateRows","Tables.GetRelationships","Teradata.Database","Text.AfterDelimiter","Text.At","Text.BeforeDelimiter","Text.BetweenDelimiters","Text.Clean","Text.Combine","Text.Contains","Text.End","Text.EndsWith","Text.Format","Text.From","Text.FromBinary","Text.Insert","Text.Length","Text.Lower","Text.Middle","Text.NewGuid","Text.PadEnd","Text.PadStart","Text.PositionOf","Text.PositionOfAny","Text.Proper","Text.Range","Text.Remove","Text.RemoveRange","Text.Repeat","Text.Replace","Text.ReplaceRange","Text.Select","Text.Split","Text.SplitAny","Text.Start","Text.StartsWith","Text.ToBinary","Text.ToList","Text.Trim","Text.TrimEnd","Text.TrimStart","Text.Upper","Time.EndOfHour","Time.From","Time.FromText","Time.Hour","Time.Minute","Time.Second","Time.StartOfHour","Time.ToRecord","Time.ToText","Type.AddTableKey","Type.ClosedRecord","Type.Facets","Type.ForFunction","Type.ForRecord","Type.FunctionParameters","Type.FunctionRequiredParameters","Type.FunctionReturn","Type.Is","Type.IsNullable","Type.IsOpenRecord","Type.ListItem","Type.NonNullable","Type.OpenRecord","Type.RecordFields","Type.ReplaceFacets","Type.ReplaceTableKeys","Type.TableColumn","Type.TableKeys","Type.TableRow","Type.TableSchema","Type.Union","Uri.BuildQueryString","Uri.Combine","Uri.EscapeDataString","Uri.Parts","Value.Add","Value.As","Value.Compare","Value.Divide","Value.Equals","Value.Firewall","Value.FromText","Value.Is","Value.Metadata","Value.Multiply","Value.NativeQuery","Value.NullableEquals","Value.RemoveMetadata","Value.ReplaceMetadata","Value.ReplaceType","Value.Subtract","Value.Type","ValueAction.NativeStatement","ValueAction.Replace","Variable.Value","Web.Contents","Web.Page","WebAction.Request","Xml.Document","Xml.Tables"],builtinConstants:["BinaryEncoding.Base64","BinaryEncoding.Hex","BinaryOccurrence.Optional","BinaryOccurrence.Repeating","BinaryOccurrence.Required","ByteOrder.BigEndian","ByteOrder.LittleEndian","Compression.Deflate","Compression.GZip","CsvStyle.QuoteAfterDelimiter","CsvStyle.QuoteAlways","Culture.Current","Day.Friday","Day.Monday","Day.Saturday","Day.Sunday","Day.Thursday","Day.Tuesday","Day.Wednesday","ExtraValues.Error","ExtraValues.Ignore","ExtraValues.List","GroupKind.Global","GroupKind.Local","JoinAlgorithm.Dynamic","JoinAlgorithm.LeftHash","JoinAlgorithm.LeftIndex","JoinAlgorithm.PairwiseHash","JoinAlgorithm.RightHash","JoinAlgorithm.RightIndex","JoinAlgorithm.SortMerge","JoinKind.FullOuter","JoinKind.Inner","JoinKind.LeftAnti","JoinKind.LeftOuter","JoinKind.RightAnti","JoinKind.RightOuter","JoinSide.Left","JoinSide.Right","MissingField.Error","MissingField.Ignore","MissingField.UseNull","Number.E","Number.Epsilon","Number.NaN","Number.NegativeInfinity","Number.PI","Number.PositiveInfinity","Occurrence.All","Occurrence.First","Occurrence.Last","Occurrence.Optional","Occurrence.Repeating","Occurrence.Required","Order.Ascending","Order.Descending","Precision.Decimal","Precision.Double","QuoteStyle.Csv","QuoteStyle.None","RelativePosition.FromEnd","RelativePosition.FromStart","RoundingMode.AwayFromZero","RoundingMode.Down","RoundingMode.ToEven","RoundingMode.TowardZero","RoundingMode.Up","SapHanaDistribution.All","SapHanaDistribution.Connection","SapHanaDistribution.Off","SapHanaDistribution.Statement","SapHanaRangeOperator.Equals","SapHanaRangeOperator.GreaterThan","SapHanaRangeOperator.GreaterThanOrEquals","SapHanaRangeOperator.LessThan","SapHanaRangeOperator.LessThanOrEquals","SapHanaRangeOperator.NotEquals","TextEncoding.Ascii","TextEncoding.BigEndianUnicode","TextEncoding.Unicode","TextEncoding.Utf16","TextEncoding.Utf8","TextEncoding.Windows","TraceLevel.Critical","TraceLevel.Error","TraceLevel.Information","TraceLevel.Verbose","TraceLevel.Warning","WebMethod.Delete","WebMethod.Get","WebMethod.Head","WebMethod.Patch","WebMethod.Post","WebMethod.Put"],builtinTypes:["Action.Type","Any.Type","Binary.Type","BinaryEncoding.Type","BinaryOccurrence.Type","Byte.Type","ByteOrder.Type","Character.Type","Compression.Type","CsvStyle.Type","Currency.Type","Date.Type","DateTime.Type","DateTimeZone.Type","Day.Type","Decimal.Type","Double.Type","Duration.Type","ExtraValues.Type","Function.Type","GroupKind.Type","Guid.Type","Int16.Type","Int32.Type","Int64.Type","Int8.Type","JoinAlgorithm.Type","JoinKind.Type","JoinSide.Type","List.Type","Logical.Type","MissingField.Type","None.Type","Null.Type","Number.Type","Occurrence.Type","Order.Type","Password.Type","Percentage.Type","Precision.Type","QuoteStyle.Type","Record.Type","RelativePosition.Type","RoundingMode.Type","SapHanaDistribution.Type","SapHanaRangeOperator.Type","Single.Type","Table.Type","Text.Type","TextEncoding.Type","Time.Type","TraceLevel.Type","Type.Type","Uri.Type","WebMethod.Type"],tokenizer:{root:[[/#"[\w \.]+"/,"identifier.quote"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+/,"number.hex"],[/\d+([eE][\-+]?\d+)?/,"number"],[/(#?[a-z]+)\b/,{cases:{"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@constructors":"constructor","@operatorKeywords":"operators","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.Type)\b/,{cases:{"@builtinTypes":"type","@default":"identifier"}}],[/\b([A-Z][a-zA-Z0-9]+\.[A-Z][a-zA-Z0-9]+)\b/,{cases:{"@builtinFunctions":"keyword.function","@builtinConstants":"constant","@default":"identifier"}}],[/\b([a-zA-Z_][\w\.]*)\b/,"identifier"],{include:"@whitespace"},{include:"@comments"},{include:"@strings"},[/[{}()\[\]]/,"@brackets"],[/([=\+<>\-\*&@\?\/!])|([<>]=)|(<>)|(=>)|(\.\.\.)|(\.\.)/,"operators"],[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],strings:[['"',"string","@string"]],string:[['""',"string.escape"],['"',"string","@pop"],[".","string"]]}},d0e=Object.freeze(Object.defineProperty({__proto__:null,conf:l0e,language:c0e},Symbol.toStringTag,{value:"Module"})),u0e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"#",blockComment:["<#","#>"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},h0e={defaultToken:"",ignoreCase:!0,tokenPostfix:".ps1",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["begin","break","catch","class","continue","data","define","do","dynamicparam","else","elseif","end","exit","filter","finally","for","foreach","from","function","if","in","param","process","return","switch","throw","trap","try","until","using","var","while","workflow","parallel","sequence","inlinescript","configuration"],helpKeywords:/SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/,symbols:/[=><!~?&%|+\-*\/\^;\.,]+/,escapes:/`(?:[abfnrtv\\"'$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_][\w-]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[ \t\r\n]+/,""],[/^:\w*/,"metatag"],[/\$(\{((global|local|private|script|using):)?[\w]+\}|((global|local|private|script|using):)?[\w]+)/,"variable"],[/<#/,"comment","@comment"],[/#.*$/,"comment"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+?/,"number"],[/[;,.]/,"delimiter"],[/\@"/,"string",'@herestring."'],[/\@'/,"string","@herestring.'"],[/"/,{cases:{"@eos":"string","@default":{token:"string",next:'@string."'}}}],[/'/,{cases:{"@eos":"string","@default":{token:"string",next:"@string.'"}}}]],string:[[/[^"'\$`]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/`./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/\$[\w]+$/,{cases:{'$S2=="':{token:"variable",next:"@popall"},"@default":{token:"string",next:"@popall"}}}],[/\$[\w]+/,{cases:{'$S2=="':"variable","@default":"string"}}],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}}}]],herestring:[[/^\s*(["'])@/,{cases:{"$1==$S2":{token:"string",next:"@pop"},"@default":"string"}}],[/[^\$`]+/,"string"],[/@escapes/,"string.escape"],[/`./,"string.escape.invalid"],[/\$[\w]+/,{cases:{'$S2=="':"variable","@default":"string"}}]],comment:[[/[^#\.]+/,"comment"],[/#>/,"comment","@pop"],[/(\.)(@helpKeywords)(?!\w)/,{token:"comment.keyword.$2"}],[/[\.#]/,"comment"]]}},f0e=Object.freeze(Object.defineProperty({__proto__:null,conf:u0e,language:h0e},Symbol.toStringTag,{value:"Module"})),g0e=["true","false"],p0e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string"]}],autoCloseBefore:`.,=}])>' + `,indentationRules:{increaseIndentPattern:new RegExp("^((?!\\/\\/).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$"),decreaseIndentPattern:new RegExp("^((?!.*?\\/\\*).*\\*/)?\\s*[\\}\\]].*$")}},m0e={defaultToken:"",tokenPostfix:".proto",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],symbols:/[=><!~?:&|+\-*/^%]+/,keywords:["syntax","import","weak","public","package","option","repeated","oneof","map","reserved","to","max","enum","message","service","rpc","stream","returns","package","optional","true","false"],builtinTypes:["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],operators:["=","+","-"],namedLiterals:g0e,escapes:"\\\\(u{[0-9A-Fa-f]+}|n|r|t|\\\\|'|\\${)",identifier:/[a-zA-Z]\w*/,fullIdentifier:/@identifier(?:\s*\.\s*@identifier)*/,optionName:/(?:@identifier|\(\s*@fullIdentifier\s*\))(?:\s*\.\s*@identifier)*/,messageName:/@identifier/,enumName:/@identifier/,messageType:/\.?\s*(?:@identifier\s*\.\s*)*@messageName/,enumType:/\.?\s*(?:@identifier\s*\.\s*)*@enumName/,floatLit:/[0-9]+\s*\.\s*[0-9]*(?:@exponent)?|[0-9]+@exponent|\.[0-9]+(?:@exponent)?/,exponent:/[eE]\s*[+-]?\s*[0-9]+/,boolLit:/true\b|false\b/,decimalLit:/[1-9][0-9]*/,octalLit:/0[0-7]*/,hexLit:/0[xX][0-9a-fA-F]+/,type:/double|float|int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string|bytes|@messageType|@enumType/,keyType:/int32|int64|uint32|uint64|sint32|sint64|fixed32|fixed64|sfixed32|sfixed64|bool|string/,tokenizer:{root:[{include:"@whitespace"},[/syntax/,"keyword"],[/=/,"operators"],[/;/,"delimiter"],[/(")(proto3)(")/,["string.quote","string",{token:"string.quote",switchTo:"@topLevel.proto3"}]],[/(")(proto2)(")/,["string.quote","string",{token:"string.quote",switchTo:"@topLevel.proto2"}]]],topLevel:[{include:"@whitespace"},{include:"@constant"},[/=/,"operators"],[/[;.]/,"delimiter"],[/@fullIdentifier/,{cases:{option:{token:"keyword",next:"@option.$S2"},enum:{token:"keyword",next:"@enumDecl.$S2"},message:{token:"keyword",next:"@messageDecl.$S2"},service:{token:"keyword",next:"@serviceDecl.$S2"},extend:{cases:{"$S2==proto2":{token:"keyword",next:"@extendDecl.$S2"}}},"@keywords":"keyword","@default":"identifier"}}]],enumDecl:[{include:"@whitespace"},[/@identifier/,"type.identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@enumBody.$S2"}]],enumBody:[{include:"@whitespace"},{include:"@constant"},[/=/,"operators"],[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/@identifier/,"identifier"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],messageDecl:[{include:"@whitespace"},[/@identifier/,"type.identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}]],messageBody:[{include:"@whitespace"},{include:"@constant"},[/=/,"operators"],[/;/,"delimiter"],["(map)(s*)(<)",["keyword","white",{token:"@brackets",bracket:"@open",next:"@map.$S2"}]],[/@identifier/,{cases:{option:{token:"keyword",next:"@option.$S2"},enum:{token:"keyword",next:"@enumDecl.$S2"},message:{token:"keyword",next:"@messageDecl.$S2"},oneof:{token:"keyword",next:"@oneofDecl.$S2"},extensions:{cases:{"$S2==proto2":{token:"keyword",next:"@reserved.$S2"}}},reserved:{token:"keyword",next:"@reserved.$S2"},"(?:repeated|optional)":{token:"keyword",next:"@field.$S2"},required:{cases:{"$S2==proto2":{token:"keyword",next:"@field.$S2"}}},"$S2==proto3":{token:"@rematch",next:"@field.$S2"}}}],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],extendDecl:[{include:"@whitespace"},[/@identifier/,"type.identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@extendBody.$S2"}]],extendBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/(?:repeated|optional|required)/,"keyword","@field.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],options:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/\]/,{token:"@brackets",bracket:"@close",next:"@pop"}]],option:[{include:"@whitespace"},[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator","@pop"]],oneofDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@oneofBody.$S2"}]],oneofBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/(@identifier)(\s*)(=)/,["identifier","white","delimiter"]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],reserved:[{include:"@whitespace"},[/,/,"delimiter"],[/;/,"delimiter","@pop"],{include:"@constant"},[/to\b|max\b/,"keyword"]],map:[{include:"@whitespace"},[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}],[/,/,"delimiter"],[/>/,{token:"@brackets",bracket:"@close",switchTo:"identifier"}]],field:[{include:"@whitespace"},["group",{cases:{"$S2==proto2":{token:"keyword",switchTo:"@groupDecl.$S2"}}}],[/(@identifier)(\s*)(=)/,["identifier","white",{token:"delimiter",next:"@pop"}]],[/@fullIdentifier|\./,{cases:{"@builtinTypes":"keyword","@default":"type.identifier"}}]],groupDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],["=","operator"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@messageBody.$S2"}],{include:"@constant"}],type:[{include:"@whitespace"},[/@identifier/,"type.identifier","@pop"],[/./,"delimiter"]],identifier:[{include:"@whitespace"},[/@identifier/,"identifier","@pop"]],serviceDecl:[{include:"@whitespace"},[/@identifier/,"identifier"],[/{/,{token:"@brackets",bracket:"@open",switchTo:"@serviceBody.$S2"}]],serviceBody:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],[/option\b/,"keyword","@option.$S2"],[/rpc\b/,"keyword","@rpc.$S2"],[/\[/,{token:"@brackets",bracket:"@open",next:"@options.$S2"}],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],rpc:[{include:"@whitespace"},[/@identifier/,"identifier"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@request.$S2"}],[/{/,{token:"@brackets",bracket:"@open",next:"@methodOptions.$S2"}],[/;/,"delimiter","@pop"]],request:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@returns.$S2"}]],returns:[{include:"@whitespace"},[/returns\b/,"keyword"],[/\(/,{token:"@brackets",bracket:"@open",switchTo:"@response.$S2"}]],response:[{include:"@whitespace"},[/@messageType/,{cases:{stream:{token:"keyword",next:"@type.$S2"},"@default":"type.identifier"}}],[/\)/,{token:"@brackets",bracket:"@close",switchTo:"@rpc.$S2"}]],methodOptions:[{include:"@whitespace"},{include:"@constant"},[/;/,"delimiter"],["option","keyword"],[/@optionName/,"annotation"],[/[()]/,"annotation.brackets"],[/=/,"operator"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],stringSingle:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],constant:[["@boolLit","keyword.constant"],["@hexLit","number.hex"],["@octalLit","number.octal"],["@decimalLit","number"],["@floatLit","number.float"],[/("([^"\\]|\\.)*|'([^'\\]|\\.)*)$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/'/,{token:"string.quote",bracket:"@open",next:"@stringSingle"}],[/{/,{token:"@brackets",bracket:"@open",next:"@prototext"}],[/identifier/,"identifier"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],prototext:[{include:"@whitespace"},{include:"@constant"},[/@identifier/,"identifier"],[/[:;]/,"delimiter"],[/}/,{token:"@brackets",bracket:"@close",next:"@pop"}]]}},_0e=Object.freeze(Object.defineProperty({__proto__:null,conf:p0e,language:m0e},Symbol.toStringTag,{value:"Module"})),b0e={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}],folding:{offSide:!0}},v0e={defaultToken:"",tokenPostfix:".pug",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],keywords:["append","block","case","default","doctype","each","else","extends","for","if","in","include","mixin","typeof","unless","var","when"],tags:["a","abbr","acronym","address","area","article","aside","audio","b","base","basefont","bdi","bdo","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","datalist","dd","del","details","dfn","div","dl","dt","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","keygen","kbd","label","li","link","map","mark","menu","meta","meter","nav","noframes","noscript","object","ol","optgroup","option","output","p","param","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strike","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","tracks","tt","u","ul","video","wbr"],symbols:/[\+\-\*\%\&\|\!\=\/\.\,\:]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/^(\s*)([a-zA-Z_-][\w-]*)/,{cases:{"$2@tags":{cases:{"@eos":["","tag"],"@default":["",{token:"tag",next:"@tag.$1"}]}},"$2@keywords":["",{token:"keyword.$2"}],"@default":["",""]}}],[/^(\s*)(#[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.id"],"@default":["",{token:"tag.id",next:"@tag.$1"}]}}],[/^(\s*)(\.[a-zA-Z_-][\w-]*)/,{cases:{"@eos":["","tag.class"],"@default":["",{token:"tag.class",next:"@tag.$1"}]}}],[/^(\s*)(\|.*)$/,""],{include:"@whitespace"},[/[a-zA-Z_$][\w$]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":""}}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/\d+\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],tag:[[/(\.)(\s*$)/,[{token:"delimiter",next:"@blockText.$S2."},""]],[/\s+/,{token:"",next:"@simpleText"}],[/#[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.id",next:"@pop"},"@default":"tag.id"}}],[/\.[a-zA-Z_-][\w-]*/,{cases:{"@eos":{token:"tag.class",next:"@pop"},"@default":"tag.class"}}],[/\(/,{token:"delimiter.parenthesis",next:"@attributeList"}]],simpleText:[[/[^#]+$/,{token:"",next:"@popall"}],[/[^#]+/,{token:""}],[/(#{)([^}]*)(})/,{cases:{"@eos":["interpolation.delimiter","interpolation",{token:"interpolation.delimiter",next:"@popall"}],"@default":["interpolation.delimiter","interpolation","interpolation.delimiter"]}}],[/#$/,{token:"",next:"@popall"}],[/#/,""]],attributeList:[[/\s+/,""],[/(\w+)(\s*=\s*)("|')/,["attribute.name","delimiter",{token:"attribute.value",next:"@value.$3"}]],[/\w+/,"attribute.name"],[/,/,{cases:{"@eos":{token:"attribute.delimiter",next:"@popall"},"@default":"attribute.delimiter"}}],[/\)$/,{token:"delimiter.parenthesis",next:"@popall"}],[/\)/,{token:"delimiter.parenthesis",next:"@pop"}]],whitespace:[[/^(\s*)(\/\/.*)$/,{token:"comment",next:"@blockText.$1.comment"}],[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],blockText:[[/^\s+.*$/,{cases:{"($S2\\s+.*$)":{token:"$S3"},"@default":{token:"@rematch",next:"@popall"}}}],[/./,{token:"@rematch",next:"@popall"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]],string:[[/[^\\"'#]+/,{cases:{"@eos":{token:"string",next:"@popall"},"@default":"string"}}],[/@escapes/,{cases:{"@eos":{token:"string.escape",next:"@popall"},"@default":"string.escape"}}],[/\\./,{cases:{"@eos":{token:"string.escape.invalid",next:"@popall"},"@default":"string.escape.invalid"}}],[/(#{)([^}]*)(})/,["interpolation.delimiter","interpolation","interpolation.delimiter"]],[/#/,"string"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":{token:"string"}}}]],value:[[/[^\\"']+/,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/\\./,{cases:{"@eos":{token:"attribute.value",next:"@popall"},"@default":"attribute.value"}}],[/["']/,{cases:{"$#==$S2":{token:"attribute.value",next:"@pop"},"@default":{token:"attribute.value"}}}]]}},C0e=Object.freeze(Object.defineProperty({__proto__:null,conf:b0e,language:v0e},Symbol.toStringTag,{value:"Module"})),w0e={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),action:{indentAction:we.IndentAction.Indent}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},y0e={defaultToken:"",tokenPostfix:".python",keywords:["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","print","raise","return","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","self","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@whitespace"},{include:"@numbers"},{include:"@strings"},[/[,:;]/,"delimiter"],[/[{}\[\]()]/,"@brackets"],[/@[a-zA-Z_]\w*/,"tag"],[/[a-zA-Z_]\w*/,{cases:{"@keywords":"keyword","@default":"identifier"}}]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]],numbers:[[/-?0x([abcdef]|[ABCDEF]|\d)+[lL]?/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?[jJ]?[lL]?/,"number"]],strings:[[/'$/,"string.escape","@popall"],[/'/,"string.escape","@stringBody"],[/"$/,"string.escape","@popall"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/[^\\']+$/,"string","@popall"],[/[^\\']+/,"string"],[/\\./,"string"],[/'/,"string.escape","@popall"],[/\\$/,"string"]],dblStringBody:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string"],[/"/,"string.escape","@popall"],[/\\$/,"string"]]}},S0e=Object.freeze(Object.defineProperty({__proto__:null,conf:w0e,language:y0e},Symbol.toStringTag,{value:"Module"})),x0e={comments:{lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},E0e={keywords:["namespace","open","as","operation","function","body","adjoint","newtype","controlled","if","elif","else","repeat","until","fixup","for","in","while","return","fail","within","apply","Adjoint","Controlled","Adj","Ctl","is","self","auto","distribute","invert","intrinsic","let","set","w/","new","not","and","or","use","borrow","using","borrowing","mutable"],typeKeywords:["Unit","Int","BigInt","Double","Bool","String","Qubit","Result","Pauli","Range"],invalidKeywords:["abstract","base","bool","break","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","enum","event","explicit","extern","finally","fixed","float","foreach","goto","implicit","int","interface","lock","long","null","object","operator","out","override","params","private","protected","public","readonly","ref","sbyte","sealed","short","sizeof","stackalloc","static","string","struct","switch","this","throw","try","typeof","unit","ulong","unchecked","unsafe","ushort","virtual","void","volatile"],constants:["true","false","PauliI","PauliX","PauliY","PauliZ","One","Zero"],builtin:["X","Y","Z","H","HY","S","T","SWAP","CNOT","CCNOT","MultiX","R","RFrac","Rx","Ry","Rz","R1","R1Frac","Exp","ExpFrac","Measure","M","MultiM","Message","Length","Assert","AssertProb","AssertEqual"],operators:["and=","<-","->","*","*=","@","!","^","^=",":","::","..","==","...","=","=>",">",">=","<","<=","-","-=","!=","or=","%","%=","|","+","+=","?","/","/=","&&&","&&&=","^^^","^^^=",">>>",">>>=","<<<","<<<=","|||","|||=","~~~","_","w/","w/="],namespaceFollows:["namespace","open"],symbols:/[=><!~?:&|+\-*\/\^%@._]+/,escapes:/\\[\s\S]/,tokenizer:{root:[[/[a-zA-Z_$][\w$]*/,{cases:{"@namespaceFollows":{token:"keyword.$0",next:"@namespace"},"@typeKeywords":"type","@keywords":"keyword","@constants":"constant","@builtin":"keyword","@invalidKeywords":"invalid","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],namespace:[{include:"@whitespace"},[/[A-Za-z]\w*/,"namespace"],[/[\.=]/,"delimiter"],["","","@pop"]],whitespace:[[/[ \t\r\n]+/,"white"],[/(\/\/).*/,"comment"]]}},k0e=Object.freeze(Object.defineProperty({__proto__:null,conf:x0e,language:E0e},Symbol.toStringTag,{value:"Module"})),L0e={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},T0e={defaultToken:"",tokenPostfix:".r",roxygen:["@alias","@aliases","@assignee","@author","@backref","@callGraph","@callGraphDepth","@callGraphPrimitives","@concept","@describeIn","@description","@details","@docType","@encoding","@evalNamespace","@evalRd","@example","@examples","@export","@exportClass","@exportMethod","@exportPattern","@family","@field","@formals","@format","@import","@importClassesFrom","@importFrom","@importMethodsFrom","@include","@inherit","@inheritDotParams","@inheritParams","@inheritSection","@keywords","@md","@method","@name","@noMd","@noRd","@note","@param","@rawNamespace","@rawRd","@rdname","@references","@return","@S3method","@section","@seealso","@setClass","@slot","@source","@template","@templateVar","@title","@TODO","@usage","@useDynLib"],constants:["NULL","FALSE","TRUE","NA","Inf","NaN","NA_integer_","NA_real_","NA_complex_","NA_character_","T","F","LETTERS","letters","month.abb","month.name","pi","R.version.string"],keywords:["break","next","return","if","else","for","in","repeat","while","array","category","character","complex","double","function","integer","list","logical","matrix","numeric","vector","data.frame","factor","library","require","attach","detach","source"],special:["\\n","\\r","\\t","\\b","\\a","\\f","\\v","\\'",'\\"',"\\\\"],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],tokenizer:{root:[{include:"@numbers"},{include:"@strings"},[/[{}\[\]()]/,"@brackets"],{include:"@operators"},[/#'$/,"comment.doc"],[/#'/,"comment.doc","@roxygen"],[/(^#.*$)/,"comment"],[/\s+/,"white"],[/[,:;]/,"delimiter"],[/@[a-zA-Z]\w*/,"tag"],[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@constants":"constant","@default":"identifier"}}]],roxygen:[[/@\w+/,{cases:{"@roxygen":"tag","@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/\s+/,{cases:{"@eos":{token:"comment.doc",next:"@pop"},"@default":"comment.doc"}}],[/.*/,{token:"comment.doc",next:"@pop"}]],numbers:[[/0[xX][0-9a-fA-F]+/,"number.hex"],[/-?(\d*\.)?\d+([eE][+\-]?\d+)?/,"number"]],operators:[[/<{1,2}-/,"operator"],[/->{1,2}/,"operator"],[/%[^%\s]+%/,"operator"],[/\*\*/,"operator"],[/%%/,"operator"],[/&&/,"operator"],[/\|\|/,"operator"],[/<</,"operator"],[/>>/,"operator"],[/[-+=&|!<>^~*/:$]/,"operator"]],strings:[[/'/,"string.escape","@stringBody"],[/"/,"string.escape","@dblStringBody"]],stringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/'/,"string.escape","@popall"],[/./,"string"]],dblStringBody:[[/\\./,{cases:{"@special":"string","@default":"error-token"}}],[/"/,"string.escape","@popall"],[/./,"string"]]}},I0e=Object.freeze(Object.defineProperty({__proto__:null,conf:L0e,language:T0e},Symbol.toStringTag,{value:"Module"})),mB=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],D0e={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["<!--","-->"]},brackets:[["<!--","-->"],["<",">"],["{","}"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}],onEnterRules:[{beforeText:new RegExp("<(?!(?:"+mB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/(\w[\w\d]*)\s*>$/i,action:{indentAction:we.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(?!(?:"+mB.join("|")+"))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:we.IndentAction.Indent}}]},A0e={defaultToken:"",tokenPostfix:"",tokenizer:{root:[[/@@@@/],[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.root"}],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)([:\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)([\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[ \t\r\n]+/],[/[^<@]+/]],doctype:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.comment"}],[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.otherTag"}],[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/]],script:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.script"}],[/type/,"attribute.name","@scriptAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterType"}],[/=/,"delimiter","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.text/javascript",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.scriptWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.scriptEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],style:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.style"}],[/type/,"attribute.name","@styleAfterType"],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterType"}],[/=/,"delimiter","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleAfterTypeEquals"}],[/"([^"]*)"/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.text/css",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInSimpleState.styleWithCustomType.$S2"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value"],[/'([^']*)'/,"attribute.value"],[/[\w\-]+/,"attribute.name"],[/=/,"delimiter"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/@[^@]/,{token:"@rematch",switchTo:"@razorInEmbeddedState.styleEmbedded.$S2",nextEmbedded:"@pop"}],[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}]],razorInSimpleState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3"}]],razorInEmbeddedState:[[/@\*/,"comment.cs","@razorBlockCommentTopLevel"],[/@[{(]/,"metatag.cs","@razorRootTopLevel"],[/(@)(\s*[\w]+)/,["metatag.cs",{token:"identifier.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],[/[})]/,{token:"metatag.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}],[/\*@/,{token:"comment.cs",switchTo:"@$S2.$S3",nextEmbedded:"$S3"}]],razorBlockCommentTopLevel:[[/\*@/,"@rematch","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorBlockComment:[[/\*@/,"comment.cs","@pop"],[/[^*]+/,"comment.cs"],[/./,"comment.cs"]],razorRootTopLevel:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/[})]/,"@rematch","@pop"],{include:"razorCommon"}],razorRoot:[[/\{/,"delimiter.bracket.cs","@razorRoot"],[/\(/,"delimiter.parenthesis.cs","@razorRoot"],[/\}/,"delimiter.bracket.cs","@pop"],[/\)/,"delimiter.parenthesis.cs","@pop"],{include:"razorCommon"}],razorCommon:[[/[a-zA-Z_]\w*/,{cases:{"@razorKeywords":{token:"keyword.cs"},"@default":"identifier.cs"}}],[/[\[\]]/,"delimiter.array.cs"],[/[ \t\r\n]+/],[/\/\/.*$/,"comment.cs"],[/@\*/,"comment.cs","@razorBlockComment"],[/"([^"]*)"/,"string.cs"],[/'([^']*)'/,"string.cs"],[/(<)([\w\-]+)(\/>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/(<\/)([\w\-]+)(>)/,["delimiter.html","tag.html","delimiter.html"]],[/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/,"delimiter.cs"],[/\d*\d+[eE]([\-+]?\d+)?/,"number.float.cs"],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float.cs"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F]/,"number.hex.cs"],[/0[0-7']*[0-7]/,"number.octal.cs"],[/0[bB][0-1']*[0-1]/,"number.binary.cs"],[/\d[\d']*/,"number.cs"],[/\d/,"number.cs"]]},razorKeywords:["abstract","as","async","await","base","bool","break","by","byte","case","catch","char","checked","class","const","continue","decimal","default","delegate","do","double","descending","explicit","event","extern","else","enum","false","finally","fixed","float","for","foreach","from","goto","group","if","implicit","in","int","interface","internal","into","is","lock","long","nameof","new","null","namespace","object","operator","out","override","orderby","params","private","protected","public","readonly","ref","return","switch","struct","sbyte","sealed","short","sizeof","stackalloc","static","string","select","this","throw","true","try","typeof","uint","ulong","unchecked","unsafe","ushort","using","var","virtual","volatile","void","when","while","where","yield","model","inject"],escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/},N0e=Object.freeze(Object.defineProperty({__proto__:null,conf:D0e,language:A0e},Symbol.toStringTag,{value:"Module"})),R0e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},O0e={defaultToken:"",tokenPostfix:".redis",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["APPEND","AUTH","BGREWRITEAOF","BGSAVE","BITCOUNT","BITFIELD","BITOP","BITPOS","BLPOP","BRPOP","BRPOPLPUSH","CLIENT","KILL","LIST","GETNAME","PAUSE","REPLY","SETNAME","CLUSTER","ADDSLOTS","COUNT-FAILURE-REPORTS","COUNTKEYSINSLOT","DELSLOTS","FAILOVER","FORGET","GETKEYSINSLOT","INFO","KEYSLOT","MEET","NODES","REPLICATE","RESET","SAVECONFIG","SET-CONFIG-EPOCH","SETSLOT","SLAVES","SLOTS","COMMAND","COUNT","GETKEYS","CONFIG","GET","REWRITE","SET","RESETSTAT","DBSIZE","DEBUG","OBJECT","SEGFAULT","DECR","DECRBY","DEL","DISCARD","DUMP","ECHO","EVAL","EVALSHA","EXEC","EXISTS","EXPIRE","EXPIREAT","FLUSHALL","FLUSHDB","GEOADD","GEOHASH","GEOPOS","GEODIST","GEORADIUS","GEORADIUSBYMEMBER","GETBIT","GETRANGE","GETSET","HDEL","HEXISTS","HGET","HGETALL","HINCRBY","HINCRBYFLOAT","HKEYS","HLEN","HMGET","HMSET","HSET","HSETNX","HSTRLEN","HVALS","INCR","INCRBY","INCRBYFLOAT","KEYS","LASTSAVE","LINDEX","LINSERT","LLEN","LPOP","LPUSH","LPUSHX","LRANGE","LREM","LSET","LTRIM","MGET","MIGRATE","MONITOR","MOVE","MSET","MSETNX","MULTI","PERSIST","PEXPIRE","PEXPIREAT","PFADD","PFCOUNT","PFMERGE","PING","PSETEX","PSUBSCRIBE","PUBSUB","PTTL","PUBLISH","PUNSUBSCRIBE","QUIT","RANDOMKEY","READONLY","READWRITE","RENAME","RENAMENX","RESTORE","ROLE","RPOP","RPOPLPUSH","RPUSH","RPUSHX","SADD","SAVE","SCARD","SCRIPT","FLUSH","LOAD","SDIFF","SDIFFSTORE","SELECT","SETBIT","SETEX","SETNX","SETRANGE","SHUTDOWN","SINTER","SINTERSTORE","SISMEMBER","SLAVEOF","SLOWLOG","SMEMBERS","SMOVE","SORT","SPOP","SRANDMEMBER","SREM","STRLEN","SUBSCRIBE","SUNION","SUNIONSTORE","SWAPDB","SYNC","TIME","TOUCH","TTL","TYPE","UNSUBSCRIBE","UNLINK","UNWATCH","WAIT","WATCH","ZADD","ZCARD","ZCOUNT","ZINCRBY","ZINTERSTORE","ZLEXCOUNT","ZRANGE","ZRANGEBYLEX","ZREVRANGEBYLEX","ZRANGEBYSCORE","ZRANK","ZREM","ZREMRANGEBYLEX","ZREMRANGEBYRANK","ZREMRANGEBYSCORE","ZREVRANGE","ZREVRANGEBYSCORE","ZREVRANK","ZSCORE","ZUNIONSTORE","SCAN","SSCAN","HSCAN","ZSCAN"],operators:[],builtinFunctions:[],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}],[/"/,{token:"string.double",next:"@stringDouble"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],stringDouble:[[/[^"]+/,"string.double"],[/""/,"string.double"],[/"/,{token:"string.double",next:"@pop"}]],scopes:[]}},M0e=Object.freeze(Object.defineProperty({__proto__:null,conf:R0e,language:O0e},Symbol.toStringTag,{value:"Module"})),P0e={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},F0e={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["AES128","AES256","ALL","ALLOWOVERWRITE","ANALYSE","ANALYZE","AND","ANY","ARRAY","AS","ASC","AUTHORIZATION","BACKUP","BETWEEN","BINARY","BLANKSASNULL","BOTH","BY","BYTEDICT","BZIP2","CASE","CAST","CHECK","COLLATE","COLUMN","CONSTRAINT","CREATE","CREDENTIALS","CROSS","CURRENT_DATE","CURRENT_TIME","CURRENT_TIMESTAMP","CURRENT_USER","CURRENT_USER_ID","DEFAULT","DEFERRABLE","DEFLATE","DEFRAG","DELTA","DELTA32K","DESC","DISABLE","DISTINCT","DO","ELSE","EMPTYASNULL","ENABLE","ENCODE","ENCRYPT","ENCRYPTION","END","EXCEPT","EXPLICIT","FALSE","FOR","FOREIGN","FREEZE","FROM","FULL","GLOBALDICT256","GLOBALDICT64K","GRANT","GROUP","GZIP","HAVING","IDENTITY","IGNORE","ILIKE","IN","INITIALLY","INNER","INTERSECT","INTO","IS","ISNULL","JOIN","LEADING","LEFT","LIKE","LIMIT","LOCALTIME","LOCALTIMESTAMP","LUN","LUNS","LZO","LZOP","MINUS","MOSTLY13","MOSTLY32","MOSTLY8","NATURAL","NEW","NOT","NOTNULL","NULL","NULLS","OFF","OFFLINE","OFFSET","OID","OLD","ON","ONLY","OPEN","OR","ORDER","OUTER","OVERLAPS","PARALLEL","PARTITION","PERCENT","PERMISSIONS","PLACING","PRIMARY","RAW","READRATIO","RECOVER","REFERENCES","RESPECT","REJECTLOG","RESORT","RESTORE","RIGHT","SELECT","SESSION_USER","SIMILAR","SNAPSHOT","SOME","SYSDATE","SYSTEM","TABLE","TAG","TDES","TEXT255","TEXT32K","THEN","TIMESTAMP","TO","TOP","TRAILING","TRUE","TRUNCATECOLUMNS","UNION","UNIQUE","USER","USING","VERBOSE","WALLET","WHEN","WHERE","WITH","WITHOUT"],operators:["AND","BETWEEN","IN","LIKE","NOT","OR","IS","NULL","INTERSECT","UNION","INNER","JOIN","LEFT","OUTER","RIGHT"],builtinFunctions:["current_schema","current_schemas","has_database_privilege","has_schema_privilege","has_table_privilege","age","current_time","current_timestamp","localtime","isfinite","now","ascii","get_bit","get_byte","set_bit","set_byte","to_ascii","approximate percentile_disc","avg","count","listagg","max","median","min","percentile_cont","stddev_samp","stddev_pop","sum","var_samp","var_pop","bit_and","bit_or","bool_and","bool_or","cume_dist","first_value","lag","last_value","lead","nth_value","ratio_to_report","dense_rank","ntile","percent_rank","rank","row_number","case","coalesce","decode","greatest","least","nvl","nvl2","nullif","add_months","at time zone","convert_timezone","current_date","date_cmp","date_cmp_timestamp","date_cmp_timestamptz","date_part_year","dateadd","datediff","date_part","date_trunc","extract","getdate","interval_cmp","last_day","months_between","next_day","sysdate","timeofday","timestamp_cmp","timestamp_cmp_date","timestamp_cmp_timestamptz","timestamptz_cmp","timestamptz_cmp_date","timestamptz_cmp_timestamp","timezone","to_timestamp","trunc","abs","acos","asin","atan","atan2","cbrt","ceil","ceiling","checksum","cos","cot","degrees","dexp","dlog1","dlog10","exp","floor","ln","log","mod","pi","power","radians","random","round","sin","sign","sqrt","tan","to_hex","bpcharcmp","btrim","bttext_pattern_cmp","char_length","character_length","charindex","chr","concat","crc32","func_sha1","initcap","left and rights","len","length","lower","lpad and rpads","ltrim","md5","octet_length","position","quote_ident","quote_literal","regexp_count","regexp_instr","regexp_replace","regexp_substr","repeat","replace","replicate","reverse","rtrim","split_part","strpos","strtol","substring","textlen","translate","trim","upper","cast","convert","to_char","to_date","to_number","json_array_length","json_extract_array_element_text","json_extract_path_text","current_setting","pg_cancel_backend","pg_terminate_backend","set_config","current_database","current_user","current_user_id","pg_backend_pid","pg_last_copy_count","pg_last_copy_id","pg_last_query_id","pg_last_unload_count","session_user","slice_num","user","version","abbrev","acosd","any","area","array_agg","array_append","array_cat","array_dims","array_fill","array_length","array_lower","array_ndims","array_position","array_positions","array_prepend","array_remove","array_replace","array_to_json","array_to_string","array_to_tsvector","array_upper","asind","atan2d","atand","bit","bit_length","bound_box","box","brin_summarize_new_values","broadcast","cardinality","center","circle","clock_timestamp","col_description","concat_ws","convert_from","convert_to","corr","cosd","cotd","covar_pop","covar_samp","current_catalog","current_query","current_role","currval","cursor_to_xml","diameter","div","encode","enum_first","enum_last","enum_range","every","family","format","format_type","generate_series","generate_subscripts","get_current_ts_config","gin_clean_pending_list","grouping","has_any_column_privilege","has_column_privilege","has_foreign_data_wrapper_privilege","has_function_privilege","has_language_privilege","has_sequence_privilege","has_server_privilege","has_tablespace_privilege","has_type_privilege","height","host","hostmask","inet_client_addr","inet_client_port","inet_merge","inet_same_family","inet_server_addr","inet_server_port","isclosed","isempty","isopen","json_agg","json_object","json_object_agg","json_populate_record","json_populate_recordset","json_to_record","json_to_recordset","jsonb_agg","jsonb_object_agg","justify_days","justify_hours","justify_interval","lastval","left","line","localtimestamp","lower_inc","lower_inf","lpad","lseg","make_date","make_interval","make_time","make_timestamp","make_timestamptz","masklen","mode","netmask","network","nextval","npoints","num_nonnulls","num_nulls","numnode","obj_description","overlay","parse_ident","path","pclose","percentile_disc","pg_advisory_lock","pg_advisory_lock_shared","pg_advisory_unlock","pg_advisory_unlock_all","pg_advisory_unlock_shared","pg_advisory_xact_lock","pg_advisory_xact_lock_shared","pg_backup_start_time","pg_blocking_pids","pg_client_encoding","pg_collation_is_visible","pg_column_size","pg_conf_load_time","pg_control_checkpoint","pg_control_init","pg_control_recovery","pg_control_system","pg_conversion_is_visible","pg_create_logical_replication_slot","pg_create_physical_replication_slot","pg_create_restore_point","pg_current_xlog_flush_location","pg_current_xlog_insert_location","pg_current_xlog_location","pg_database_size","pg_describe_object","pg_drop_replication_slot","pg_export_snapshot","pg_filenode_relation","pg_function_is_visible","pg_get_constraintdef","pg_get_expr","pg_get_function_arguments","pg_get_function_identity_arguments","pg_get_function_result","pg_get_functiondef","pg_get_indexdef","pg_get_keywords","pg_get_object_address","pg_get_owned_sequence","pg_get_ruledef","pg_get_serial_sequence","pg_get_triggerdef","pg_get_userbyid","pg_get_viewdef","pg_has_role","pg_identify_object","pg_identify_object_as_address","pg_index_column_has_property","pg_index_has_property","pg_indexam_has_property","pg_indexes_size","pg_is_in_backup","pg_is_in_recovery","pg_is_other_temp_schema","pg_is_xlog_replay_paused","pg_last_committed_xact","pg_last_xact_replay_timestamp","pg_last_xlog_receive_location","pg_last_xlog_replay_location","pg_listening_channels","pg_logical_emit_message","pg_logical_slot_get_binary_changes","pg_logical_slot_get_changes","pg_logical_slot_peek_binary_changes","pg_logical_slot_peek_changes","pg_ls_dir","pg_my_temp_schema","pg_notification_queue_usage","pg_opclass_is_visible","pg_operator_is_visible","pg_opfamily_is_visible","pg_options_to_table","pg_postmaster_start_time","pg_read_binary_file","pg_read_file","pg_relation_filenode","pg_relation_filepath","pg_relation_size","pg_reload_conf","pg_replication_origin_create","pg_replication_origin_drop","pg_replication_origin_oid","pg_replication_origin_progress","pg_replication_origin_session_is_setup","pg_replication_origin_session_progress","pg_replication_origin_session_reset","pg_replication_origin_session_setup","pg_replication_origin_xact_reset","pg_replication_origin_xact_setup","pg_rotate_logfile","pg_size_bytes","pg_size_pretty","pg_sleep","pg_sleep_for","pg_sleep_until","pg_start_backup","pg_stat_file","pg_stop_backup","pg_switch_xlog","pg_table_is_visible","pg_table_size","pg_tablespace_databases","pg_tablespace_location","pg_tablespace_size","pg_total_relation_size","pg_trigger_depth","pg_try_advisory_lock","pg_try_advisory_lock_shared","pg_try_advisory_xact_lock","pg_try_advisory_xact_lock_shared","pg_ts_config_is_visible","pg_ts_dict_is_visible","pg_ts_parser_is_visible","pg_ts_template_is_visible","pg_type_is_visible","pg_typeof","pg_xact_commit_timestamp","pg_xlog_location_diff","pg_xlog_replay_pause","pg_xlog_replay_resume","pg_xlogfile_name","pg_xlogfile_name_offset","phraseto_tsquery","plainto_tsquery","point","polygon","popen","pqserverversion","query_to_xml","querytree","quote_nullable","radius","range_merge","regexp_matches","regexp_split_to_array","regexp_split_to_table","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","right","row_security_active","row_to_json","rpad","scale","set_masklen","setseed","setval","setweight","shobj_description","sind","sprintf","statement_timestamp","stddev","string_agg","string_to_array","strip","substr","table_to_xml","table_to_xml_and_xmlschema","tand","text","to_json","to_regclass","to_regnamespace","to_regoper","to_regoperator","to_regproc","to_regprocedure","to_regrole","to_regtype","to_tsquery","to_tsvector","transaction_timestamp","ts_debug","ts_delete","ts_filter","ts_headline","ts_lexize","ts_parse","ts_rank","ts_rank_cd","ts_rewrite","ts_stat","ts_token_type","tsquery_phrase","tsvector_to_array","tsvector_update_trigger","tsvector_update_trigger_column","txid_current","txid_current_snapshot","txid_snapshot_xip","txid_snapshot_xmax","txid_snapshot_xmin","txid_visible_in_snapshot","unnest","upper_inc","upper_inf","variance","width","width_bucket","xml_is_well_formed","xml_is_well_formed_content","xml_is_well_formed_document","xmlagg","xmlcomment","xmlconcat","xmlelement","xmlexists","xmlforest","xmlparse","xmlpi","xmlroot","xmlserialize","xpath","xpath_exists"],builtinVariables:[],pseudoColumns:[],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[]}},B0e=Object.freeze(Object.defineProperty({__proto__:null,conf:P0e,language:F0e},Symbol.toStringTag,{value:"Module"})),W0e={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">",notIn:["string"]}],surroundingPairs:[{open:"(",close:")"},{open:"[",close:"]"},{open:"`",close:"`"}],folding:{markers:{start:new RegExp("^\\s*<!--\\s*#?region\\b.*-->"),end:new RegExp("^\\s*<!--\\s*#?endregion\\b.*-->")}}},V0e={defaultToken:"",tokenPostfix:".rst",control:/[\\`*_\[\]{}()#+\-\.!]/,escapes:/\\(?:@control)/,empty:["area","base","basefont","br","col","frame","hr","img","input","isindex","link","meta","param"],alphanumerics:/[A-Za-z0-9]/,simpleRefNameWithoutBq:/(?:@alphanumerics[-_+:.]*@alphanumerics)+|(?:@alphanumerics+)/,simpleRefName:/(?:`@phrase`|@simpleRefNameWithoutBq)/,phrase:/@simpleRefNameWithoutBq(?:\s@simpleRefNameWithoutBq)*/,citationName:/[A-Za-z][A-Za-z0-9-_.]*/,blockLiteralStart:/(?:[!"#$%&'()*+,-./:;<=>?@\[\]^_`{|}~]|[\s])/,precedingChars:/(?:[ -:/'"<([{])/,followingChars:/(?:[ -.,:;!?/'")\]}>]|$)/,punctuation:/(=|-|~|`|#|"|\^|\+|\*|:|\.|'|_|\+)/,tokenizer:{root:[[/^(@punctuation{3,}$){1,1}?/,"keyword"],[/^\s*([\*\-+‣•]|[a-zA-Z0-9]+\.|\([a-zA-Z0-9]+\)|[a-zA-Z0-9]+\))\s/,"keyword"],[/([ ]::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],[/(::)\s*$/,"keyword","@blankLineOfLiteralBlocks"],{include:"@tables"},{include:"@explicitMarkupBlocks"},{include:"@inlineMarkup"}],explicitMarkupBlocks:[{include:"@citations"},{include:"@footnotes"},[/^(\.\.\s)(@simpleRefName)(::\s)(.*)$/,[{token:"",next:"subsequentLines"},"keyword","",""]],[/^(\.\.)(\s+)(_)(@simpleRefName)(:)(\s+)(.*)/,[{token:"",next:"hyperlinks"},"","","string.link","","","string.link"]],[/^((?:(?:\.\.)(?:\s+))?)(__)(:)(\s+)(.*)/,[{token:"",next:"subsequentLines"},"","","","string.link"]],[/^(__\s+)(.+)/,["","string.link"]],[/^(\.\.)( \|)([^| ]+[^|]*[^| ]*)(\| )(@simpleRefName)(:: .*)/,[{token:"",next:"subsequentLines"},"","string.link","","keyword",""],"@rawBlocks"],[/(\|)([^| ]+[^|]*[^| ]*)(\|_{0,2})/,["","string.link",""]],[/^(\.\.)([ ].*)$/,[{token:"",next:"@comments"},"comment"]]],inlineMarkup:[{include:"@citationsReference"},{include:"@footnotesReference"},[/(@simpleRefName)(_{1,2})/,["string.link",""]],[/(`)([^<`]+\s+)(<)(.*)(>)(`)(_)/,["","string.link","","string.link","","",""]],[/\*\*([^\\*]|\*(?!\*))+\*\*/,"strong"],[/\*[^*]+\*/,"emphasis"],[/(``)((?:[^`]|\`(?!`))+)(``)/,["","keyword",""]],[/(__\s+)(.+)/,["","keyword"]],[/(:)((?:@simpleRefNameWithoutBq)?)(:`)([^`]+)(`)/,["","keyword","","",""]],[/(`)([^`]+)(`:)((?:@simpleRefNameWithoutBq)?)(:)/,["","","","keyword",""]],[/(`)([^`]+)(`)/,""],[/(_`)(@phrase)(`)/,["","string.link",""]]],citations:[[/^(\.\.\s+\[)((?:@citationName))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],citationsReference:[[/(\[)(@citationName)(\]_)/,["","string.link",""]]],footnotes:[[/^(\.\.\s+\[)((?:[0-9]+))(\]\s+.*)/,[{token:"",next:"@subsequentLines"},"string.link",""]],[/^(\.\.\s+\[)((?:#@simpleRefName?))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]],[/^(\.\.\s+\[)((?:\*))(\]\s+)(.*)/,[{token:"",next:"@subsequentLines"},"string.link","",""]]],footnotesReference:[[/(\[)([0-9]+)(\])(_)/,["","string.link","",""]],[/(\[)(#@simpleRefName?)(\])(_)/,["","string.link","",""]],[/(\[)(\*)(\])(_)/,["","string.link","",""]]],blankLineOfLiteralBlocks:[[/^$/,"","@subsequentLinesOfLiteralBlocks"],[/^.*$/,"","@pop"]],subsequentLinesOfLiteralBlocks:[[/(@blockLiteralStart+)(.*)/,["keyword",""]],[/^(?!blockLiteralStart)/,"","@popall"]],subsequentLines:[[/^[\s]+.*/,""],[/^(?!\s)/,"","@pop"]],hyperlinks:[[/^[\s]+.*/,"string.link"],[/^(?!\s)/,"","@pop"]],comments:[[/^[\s]+.*/,"comment"],[/^(?!\s)/,"","@pop"]],tables:[[/\+-[+-]+/,"keyword"],[/\+=[+=]+/,"keyword"]]}},H0e=Object.freeze(Object.defineProperty({__proto__:null,conf:W0e,language:V0e},Symbol.toStringTag,{value:"Module"})),$0e={comments:{lineComment:"#",blockComment:["=begin","=end"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],indentationRules:{increaseIndentPattern:new RegExp(`^\\s*((begin|class|(private|protected)\\s+def|def|else|elsif|ensure|for|if|module|rescue|unless|until|when|while|case)|([^#]*\\sdo\\b)|([^#]*=\\s*(case|if|unless)))\\b([^#\\{;]|("|'|/).*\\4)*(#.*)?$`),decreaseIndentPattern:new RegExp("^\\s*([}\\]]([,)]?\\s*(#|$)|\\.[a-zA-Z_]\\w*\\b)|(end|rescue|ensure|else|elsif|when)\\b)")}},U0e={tokenPostfix:".ruby",keywords:["__LINE__","__ENCODING__","__FILE__","BEGIN","END","alias","and","begin","break","case","class","def","defined?","do","else","elsif","end","ensure","for","false","if","in","module","next","nil","not","or","redo","rescue","retry","return","self","super","then","true","undef","unless","until","when","while","yield"],keywordops:["::","..","...","?",":","=>"],builtins:["require","public","private","include","extend","attr_reader","protected","private_class_method","protected_class_method","new"],declarations:["module","class","def","case","do","begin","for","if","while","until","unless"],linedecls:["def","case","do","begin","for","if","while","until","unless"],operators:["^","&","|","<=>","==","===","!~","=~",">",">=","<","<=","<<",">>","+","-","*","/","%","**","~","+@","-@","[]","[]=","`","+=","-=","*=","**=","/=","^=","%=","<<=",">>=","&=","&&=","||=","|="],brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],symbols:/[=><!~?:&|+\-*\/\^%\.]+/,escape:/(?:[abefnrstv\\"'\n\r]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2}|u[0-9A-Fa-f]{4})/,escapes:/\\(?:C\-(@escape|.)|c(@escape|.)|@escape)/,decpart:/\d(_?\d)*/,decimal:/0|@decpart/,delim:/[^a-zA-Z0-9\s\n\r]/,heredelim:/(?:\w+|'[^']*'|"[^"]*"|`[^`]*`)/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[AzZbBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})?/,tokenizer:{root:[[/^(\s*)([a-z_]\w*[!?=]?)/,["white",{cases:{"for|until|while":{token:"keyword.$2",next:"@dodecl.$2"},"@declarations":{token:"keyword.$2",next:"@root.$2"},end:{token:"keyword.$S2",next:"@pop"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}]],[/[a-z_]\w*[!?=]?/,{cases:{"if|unless|while|until":{token:"keyword.$0x",next:"@modifier.$0x"},for:{token:"keyword.$2",next:"@dodecl.$2"},"@linedecls":{token:"keyword.$0",next:"@root.$0"},end:{token:"keyword.$S2",next:"@pop"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],[/[A-Z][\w]*[!?=]?/,"constructor.identifier"],[/\$[\w]*/,"global.constant"],[/@[\w]*/,"namespace.instance.identifier"],[/@@@[\w]*/,"namespace.class.identifier"],[/<<[-~](@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],[/[ \t\r\n]+<<(@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],[/^<<(@heredelim).*/,{token:"string.heredoc.delimiter",next:"@heredoc.$1"}],{include:"@whitespace"},[/"/,{token:"string.d.delim",next:'@dstring.d."'}],[/'/,{token:"string.sq.delim",next:"@sstring.sq"}],[/%([rsqxwW]|Q?)/,{token:"@rematch",next:"pstring"}],[/`/,{token:"string.x.delim",next:"@dstring.x.`"}],[/:(\w|[$@])\w*[!?=]?/,"string.s"],[/:"/,{token:"string.s.delim",next:'@dstring.s."'}],[/:'/,{token:"string.s.delim",next:"@sstring.s"}],[/\/(?=(\\\/|[^\/\n])+\/)/,{token:"regexp.delim",next:"@regexp"}],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywordops":"keyword","@operators":"operator","@default":""}}],[/[;,]/,"delimiter"],[/0[xX][0-9a-fA-F](_?[0-9a-fA-F])*/,"number.hex"],[/0[_oO][0-7](_?[0-7])*/,"number.octal"],[/0[bB][01](_?[01])*/,"number.binary"],[/0[dD]@decpart/,"number"],[/@decimal((\.@decpart)?([eE][\-+]?@decpart)?)/,{cases:{$1:"number.float","@default":"number"}}]],dodecl:[[/^/,{token:"",switchTo:"@root.$S2"}],[/[a-z_]\w*[!?=]?/,{cases:{end:{token:"keyword.$S2",next:"@pop"},do:{token:"keyword",switchTo:"@root.$S2"},"@linedecls":{token:"@rematch",switchTo:"@root.$S2"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],{include:"@root"}],modifier:[[/^/,"","@pop"],[/[a-z_]\w*[!?=]?/,{cases:{end:{token:"keyword.$S2",next:"@pop"},"then|else|elsif|do":{token:"keyword",switchTo:"@root.$S2"},"@linedecls":{token:"@rematch",switchTo:"@root.$S2"},"@keywords":"keyword","@builtins":"predefined","@default":"identifier"}}],{include:"@root"}],sstring:[[/[^\\']+/,"string.$S2"],[/\\\\|\\'|\\$/,"string.$S2.escape"],[/\\./,"string.$S2.invalid"],[/'/,{token:"string.$S2.delim",next:"@pop"}]],dstring:[[/[^\\`"#]+/,"string.$S2"],[/#/,"string.$S2.escape","@interpolated"],[/\\$/,"string.$S2.escape"],[/@escapes/,"string.$S2.escape"],[/\\./,"string.$S2.escape.invalid"],[/[`"]/,{cases:{"$#==$S3":{token:"string.$S2.delim",next:"@pop"},"@default":"string.$S2"}}]],heredoc:[[/^(\s*)(@heredelim)$/,{cases:{"$2==$S2":["string.heredoc",{token:"string.heredoc.delimiter",next:"@pop"}],"@default":["string.heredoc","string.heredoc"]}}],[/.*/,"string.heredoc"]],interpolated:[[/\$\w*/,"global.constant","@pop"],[/@\w*/,"namespace.class.identifier","@pop"],[/@@@\w*/,"namespace.instance.identifier","@pop"],[/[{]/,{token:"string.escape.curly",switchTo:"@interpolated_compound"}],["","","@pop"]],interpolated_compound:[[/[}]/,{token:"string.escape.curly",next:"@pop"}],{include:"@root"}],pregexp:[{include:"@whitespace"},[/[^\(\{\[\\]/,{cases:{"$#==$S3":{token:"regexp.delim",next:"@pop"},"$#==$S2":{token:"regexp.delim",next:"@push"},"~[)}\\]]":"@brackets.regexp.escape.control","~@regexpctl":"regexp.escape.control","@default":"regexp"}}],{include:"@regexcontrol"}],regexp:[{include:"@regexcontrol"},[/[^\\\/]/,"regexp"],["/[ixmp]*",{token:"regexp.delim"},"@pop"]],regexcontrol:[[/(\{)(\d+(?:,\d*)?)(\})/,["@brackets.regexp.escape.control","regexp.escape.control","@brackets.regexp.escape.control"]],[/(\[)(\^?)/,["@brackets.regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?[:=!])/,["@brackets.regexp.escape.control","regexp.escape.control"]],[/\(\?#/,{token:"regexp.escape.control",next:"@regexpcomment"}],[/[()]/,"@brackets.regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/\\$/,"regexp.escape"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/#/,"regexp.escape","@interpolated"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/\\$/,"regexp.escape"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"@brackets.regexp.escape.control","@pop"]],regexpcomment:[[/[^)]+/,"comment"],[/\)/,{token:"regexp.escape.control",next:"@pop"}]],pstring:[[/%([qws])\(/,{token:"string.$1.delim",switchTo:"@qstring.$1.(.)"}],[/%([qws])\[/,{token:"string.$1.delim",switchTo:"@qstring.$1.[.]"}],[/%([qws])\{/,{token:"string.$1.delim",switchTo:"@qstring.$1.{.}"}],[/%([qws])</,{token:"string.$1.delim",switchTo:"@qstring.$1.<.>"}],[/%([qws])(@delim)/,{token:"string.$1.delim",switchTo:"@qstring.$1.$2.$2"}],[/%r\(/,{token:"regexp.delim",switchTo:"@pregexp.(.)"}],[/%r\[/,{token:"regexp.delim",switchTo:"@pregexp.[.]"}],[/%r\{/,{token:"regexp.delim",switchTo:"@pregexp.{.}"}],[/%r</,{token:"regexp.delim",switchTo:"@pregexp.<.>"}],[/%r(@delim)/,{token:"regexp.delim",switchTo:"@pregexp.$1.$1"}],[/%(x|W|Q?)\(/,{token:"string.$1.delim",switchTo:"@qqstring.$1.(.)"}],[/%(x|W|Q?)\[/,{token:"string.$1.delim",switchTo:"@qqstring.$1.[.]"}],[/%(x|W|Q?)\{/,{token:"string.$1.delim",switchTo:"@qqstring.$1.{.}"}],[/%(x|W|Q?)</,{token:"string.$1.delim",switchTo:"@qqstring.$1.<.>"}],[/%(x|W|Q?)(@delim)/,{token:"string.$1.delim",switchTo:"@qqstring.$1.$2.$2"}],[/%([rqwsxW]|Q?)./,{token:"invalid",next:"@pop"}],[/./,{token:"invalid",next:"@pop"}]],qstring:[[/\\$/,"string.$S2.escape"],[/\\./,"string.$S2.escape"],[/./,{cases:{"$#==$S4":{token:"string.$S2.delim",next:"@pop"},"$#==$S3":{token:"string.$S2.delim",next:"@push"},"@default":"string.$S2"}}]],qqstring:[[/#/,"string.$S2.escape","@interpolated"],{include:"@qstring"}],whitespace:[[/[ \t\r\n]+/,""],[/^\s*=begin\b/,"comment","@comment"],[/#.*$/,"comment"]],comment:[[/[^=]+/,"comment"],[/^\s*=begin\b/,"comment.invalid"],[/^\s*=end\b.*/,"comment","@pop"],[/[=]/,"comment"]]}},z0e=Object.freeze(Object.defineProperty({__proto__:null,conf:$0e,language:U0e},Symbol.toStringTag,{value:"Module"})),j0e={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},q0e={tokenPostfix:".rust",defaultToken:"invalid",keywords:["as","async","await","box","break","const","continue","crate","dyn","else","enum","extern","false","fn","for","if","impl","in","let","loop","match","mod","move","mut","pub","ref","return","self","static","struct","super","trait","true","try","type","unsafe","use","where","while","catch","default","union","static","abstract","alignof","become","do","final","macro","offsetof","override","priv","proc","pure","sizeof","typeof","unsized","virtual","yield"],typeKeywords:["Self","m32","m64","m128","f80","f16","f128","int","uint","float","char","bool","u8","u16","u32","u64","f32","f64","i8","i16","i32","i64","str","Option","Either","c_float","c_double","c_void","FILE","fpos_t","DIR","dirent","c_char","c_schar","c_uchar","c_short","c_ushort","c_int","c_uint","c_long","c_ulong","size_t","ptrdiff_t","clock_t","time_t","c_longlong","c_ulonglong","intptr_t","uintptr_t","off_t","dev_t","ino_t","pid_t","mode_t","ssize_t"],constants:["true","false","Some","None","Left","Right","Ok","Err"],supportConstants:["EXIT_FAILURE","EXIT_SUCCESS","RAND_MAX","EOF","SEEK_SET","SEEK_CUR","SEEK_END","_IOFBF","_IONBF","_IOLBF","BUFSIZ","FOPEN_MAX","FILENAME_MAX","L_tmpnam","TMP_MAX","O_RDONLY","O_WRONLY","O_RDWR","O_APPEND","O_CREAT","O_EXCL","O_TRUNC","S_IFIFO","S_IFCHR","S_IFBLK","S_IFDIR","S_IFREG","S_IFMT","S_IEXEC","S_IWRITE","S_IREAD","S_IRWXU","S_IXUSR","S_IWUSR","S_IRUSR","F_OK","R_OK","W_OK","X_OK","STDIN_FILENO","STDOUT_FILENO","STDERR_FILENO"],supportMacros:["format!","print!","println!","panic!","format_args!","unreachable!","write!","writeln!"],operators:["!","!=","%","%=","&","&=","&&","*","*=","+","+=","-","-=","->",".","..","...","/","/=",":",";","<<","<<=","<","<=","=","==","=>",">",">=",">>",">>=","@","^","^=","|","|=","||","_","?","#"],escapes:/\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,delimiters:/[,]/,symbols:/[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,intSuffixes:/[iu](8|16|32|64|128|size)/,floatSuffixes:/f(32|64)/,tokenizer:{root:[[/[a-zA-Z][a-zA-Z0-9_]*!?|_[a-zA-Z0-9_]+/,{cases:{"@typeKeywords":"keyword.type","@keywords":"keyword","@supportConstants":"keyword","@supportMacros":"keyword","@constants":"keyword","@default":"identifier"}}],[/\$/,"identifier"],[/'[a-zA-Z_][a-zA-Z0-9_]*(?=[^\'])/,"identifier"],[/'\S'/,"string.byteliteral"],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],{include:"@numbers"},{include:"@whitespace"},[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}],[/[{}()\[\]<>]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],numbers:[[/(0o[0-7_]+)(@intSuffixes)?/,{token:"number"}],[/(0b[0-1_]+)(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(\.[\d][\d_]*)?[eE][+-][\d_]+(@floatSuffixes)?/,{token:"number"}],[/\b(\d\.?[\d_]*)(@floatSuffixes)?\b/,{token:"number"}],[/(0x[\da-fA-F]+)_?(@intSuffixes)?/,{token:"number"}],[/[\d][\d_]*(@intSuffixes?)?/,{token:"number"}]]}},G0e=Object.freeze(Object.defineProperty({__proto__:null,conf:j0e,language:q0e},Symbol.toStringTag,{value:"Module"})),K0e={comments:{lineComment:"'"},brackets:[["(",")"],["[","]"],["If","EndIf"],["While","EndWhile"],["For","EndFor"],["Sub","EndSub"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]}]},Y0e={defaultToken:"",tokenPostfix:".sb",ignoreCase:!0,brackets:[{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"keyword.tag-if",open:"If",close:"EndIf"},{token:"keyword.tag-while",open:"While",close:"EndWhile"},{token:"keyword.tag-for",open:"For",close:"EndFor"},{token:"keyword.tag-sub",open:"Sub",close:"EndSub"}],keywords:["Else","ElseIf","EndFor","EndIf","EndSub","EndWhile","For","Goto","If","Step","Sub","Then","To","While"],tagwords:["If","Sub","While","For"],operators:[">","<","<>","<=",">=","And","Or","+","-","*","/","="],identifier:/[a-zA-Z_][\w]*/,symbols:/[=><:+\-*\/%\.,]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},[/(@identifier)(?=[.])/,"type"],[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@operators":"operator","@default":"variable.name"}}],[/([.])(@identifier)/,{cases:{$2:["delimiter","type.member"],"@default":""}}],[/\d*\.\d+/,"number.float"],[/\d+/,"number"],[/[()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"operator","@default":"delimiter"}}],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],whitespace:[[/[ \t\r\n]+/,""],[/(\').*$/,"comment"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"C?/,"string","@pop"]]}},Z0e=Object.freeze(Object.defineProperty({__proto__:null,conf:K0e,language:Y0e},Symbol.toStringTag,{value:"Module"})),X0e={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},Q0e={tokenPostfix:".scala",keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=><!~?:&|+\-*\/^\\%@#]+/,digits:/\d+(_+\d+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,escapes:/\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,fstring_conv:/[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,tokenizer:{root:[[/\braw"""/,{token:"string.quote",bracket:"@open",next:"@rawstringt"}],[/\braw"/,{token:"string.quote",bracket:"@open",next:"@rawstring"}],[/\bs"""/,{token:"string.quote",bracket:"@open",next:"@sstringt"}],[/\bs"/,{token:"string.quote",bracket:"@open",next:"@sstring"}],[/\bf""""/,{token:"string.quote",bracket:"@open",next:"@fstringt"}],[/\bf"/,{token:"string.quote",bracket:"@open",next:"@fstring"}],[/"""/,{token:"string.quote",bracket:"@open",next:"@stringt"}],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/0[xX](@hexdigits)[Ll]?/,"number.hex","@allowMethod"],[/(@digits)[fFdD]/,"number.float","@allowMethod"],[/(@digits)[lL]?/,"number","@allowMethod"],[/\b_\*/,"key"],[/\b(_)\b/,"keyword","@allowMethod"],[/\bimport\b/,"keyword","@import"],[/\b(case)([ \t]+)(class)\b/,["keyword.modifier","white","keyword"]],[/\bcase\b/,"keyword","@case"],[/\bva[lr]\b/,"keyword","@vardef"],[/\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,["keyword","white","identifier"]],[/@name(?=[ \t]*:(?!:))/,"variable"],[/(\.)(@name|@symbols)/,["operator",{token:"@rematch",next:"@allowMethod"}]],[/([{(])(\s*)(@name(?=\s*=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},\."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,\.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,["string","string.escape",{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[\.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([\-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([\-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},J0e=Object.freeze(Object.defineProperty({__proto__:null,conf:X0e,language:Q0e},Symbol.toStringTag,{value:"Module"})),eSe={comments:{lineComment:";",blockComment:["#|","|#"]},brackets:[["(",")"],["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'}]},tSe={defaultToken:"",ignoreCase:!0,tokenPostfix:".scheme",brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],keywords:["case","do","let","loop","if","else","when","cons","car","cdr","cond","lambda","lambda*","syntax-rules","format","set!","quote","eval","append","list","list?","member?","load"],constants:["#t","#f"],operators:["eq?","eqv?","equal?","and","or","not","null?"],tokenizer:{root:[[/#[xXoObB][0-9a-fA-F]+/,"number.hex"],[/[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?/,"number.float"],[/(?:\b(?:(define|define-syntax|define-macro))\b)(\s+)((?:\w|\-|\!|\?)*)/,["keyword","white","variable"]],{include:"@whitespace"},{include:"@strings"},[/[a-zA-Z_#][a-zA-Z0-9_\-\?\!\*]*/,{cases:{"@keywords":"keyword","@constants":"constant","@operators":"operators","@default":"identifier"}}]],comment:[[/[^\|#]+/,"comment"],[/#\|/,"comment","@push"],[/\|#/,"comment","@pop"],[/[\|#]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/#\|/,"comment","@comment"],[/;.*$/,"comment"]],strings:[[/"$/,"string","@popall"],[/"(?=.)/,"string","@multiLineString"]],multiLineString:[[/[^\\"]+$/,"string","@popall"],[/[^\\"]+/,"string"],[/\\./,"string.escape"],[/"/,"string","@popall"],[/\\$/,"string"]]}},iSe=Object.freeze(Object.defineProperty({__proto__:null,conf:eSe,language:tSe},Symbol.toStringTag,{value:"Module"})),nSe={wordPattern:/(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,comments:{blockComment:["/*","*/"],lineComment:"//"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},rSe={defaultToken:"",tokenPostfix:".scss",ws:`[ +\r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@variabledeclaration"},{include:"@warndebug"},["[@](include)",{token:"keyword",next:"@includedeclaration"}],["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["[@](function)",{token:"keyword",next:"@functiondeclaration"}],["[@](mixin)",{token:"keyword",next:"@mixindeclaration"}],["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@controlstatement"},{include:"@selectorname"},["[&\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.curly",next:"@selectorbody"}]],selectorbody:[["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],{include:"@selector"},["[@](extend)",{token:"keyword",next:"@extendbody"}],["[@](return)",{token:"keyword",next:"@declarationbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],selectorname:[["#{",{token:"meta",next:"@variableinterpolation"}],["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["url(\\-prefix)?\\(",{token:"meta",next:"@urldeclaration"}],{include:"@functioninvocation"},{include:"@numbers"},{include:"@strings"},{include:"@variablereference"},["(and\\b|or\\b|not\\b)","operator"],{include:"@name"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","operator"],[",","delimiter"],["!default","literal"],["\\(",{token:"delimiter.parenthesis",next:"@parenthizedterm"}]],rulevalue:[{include:"@term"},["!important","literal"],[";","delimiter","@pop"],["{",{token:"delimiter.curly",switchTo:"@nestedproperty"}],["(?=})",{token:"",next:"@pop"}]],nestedproperty:[["[*_]?@identifier@ws:","attribute.name","@rulevalue"],{include:"@comments"},["}",{token:"delimiter.curly",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],variabledeclaration:[["\\$@identifier@ws:","variable.decl","@declarationbody"]],urldeclaration:[{include:"@strings"},[`[^)\r +]+`,"string"],["\\)",{token:"meta",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],extendbody:[{include:"@selectorname"},["!optional","literal"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],variablereference:[["\\$@identifier","variable.ref"],["\\.\\.\\.","operator"],["#{",{token:"meta",next:"@variableinterpolation"}]],variableinterpolation:[{include:"@variablereference"},["}",{token:"meta",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[".","comment"]],name:[["@identifier","attribute.value"]],numbers:[["(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","number.hex"]],units:[["(em|ex|ch|rem|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","number","@pop"]],functiondeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["{",{token:"delimiter.curly",switchTo:"@functionbody"}]],mixindeclaration:[["@identifier@ws\\(",{token:"meta",next:"@parameterdeclaration"}],["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],parameterdeclaration:[["\\$@identifier@ws:","variable.decl"],["\\.\\.\\.","operator"],[",","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],includedeclaration:[{include:"@functioninvocation"},["@identifier","meta"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}],["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],keyframedeclaration:[["@identifier","meta"],["{",{token:"delimiter.curly",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.curly",next:"@selectorbody"}],["}",{token:"delimiter.curly",next:"@pop"}]],controlstatement:[["[@](if|else|for|while|each|media)",{token:"keyword.flow",next:"@controlstatementdeclaration"}]],controlstatementdeclaration:[["(in|from|through|if|to)\\b",{token:"keyword.flow"}],{include:"@term"},["{",{token:"delimiter.curly",switchTo:"@selectorbody"}]],functionbody:[["[@](return)",{token:"keyword"}],{include:"@variabledeclaration"},{include:"@term"},{include:"@controlstatement"},[";","delimiter"],["}",{token:"delimiter.curly",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"meta",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"meta",next:"@pop"}]],strings:[['~?"',{token:"string.delimiter",next:"@stringenddoublequote"}],["~?'",{token:"string.delimiter",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string.delimiter",next:"@pop"}],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string.delimiter",next:"@pop"}],[".","string"]]}},sSe=Object.freeze(Object.defineProperty({__proto__:null,conf:nSe,language:rSe},Symbol.toStringTag,{value:"Module"})),oSe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},aSe={defaultToken:"",ignoreCase:!0,tokenPostfix:".shell",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","then","do","else","elif","while","until","for","in","esac","fi","fin","fil","done","exit","set","unset","export","function"],builtins:["ab","awk","bash","beep","cat","cc","cd","chown","chmod","chroot","clear","cp","curl","cut","diff","echo","find","gawk","gcc","get","git","grep","hg","kill","killall","ln","ls","make","mkdir","openssl","mv","nc","node","npm","ping","ps","restart","rm","rmdir","sed","service","sh","shopt","shred","source","sort","sleep","ssh","start","stop","su","sudo","svn","tee","telnet","top","touch","vi","vim","wall","wc","wget","who","write","yes","zsh"],symbols:/[=><!~?&|+\-*\/\^;\.,]+/,tokenizer:{root:[{include:"@whitespace"},[/[a-zA-Z]\w*/,{cases:{"@keywords":"keyword","@builtins":"type.identifier","@default":""}}],{include:"@strings"},{include:"@parameters"},{include:"@heredoc"},[/[{}\[\]()]/,"@brackets"],[/-+\w+/,"attribute.name"],[/@symbols/,"delimiter"],{include:"@numbers"},[/[,;]/,"delimiter"]],whitespace:[[/\s+/,"white"],[/(^#!.*$)/,"metatag"],[/(^#.*$)/,"comment"]],numbers:[[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+/,"number"]],strings:[[/'/,"string","@stringBody"],[/"/,"string","@dblStringBody"]],stringBody:[[/'/,"string","@popall"],[/./,"string"]],dblStringBody:[[/"/,"string","@popall"],[/./,"string"]],heredoc:[[/(<<[-<]?)(\s*)(['"`]?)([\w\-]+)(['"`]?)/,["constants","white","string.heredoc.delimiter","string.heredoc","string.heredoc.delimiter"]]],parameters:[[/\$\d+/,"variable.predefined"],[/\$\w+/,"variable"],[/\$[*@#?\-$!0_]/,"variable"],[/\$'/,"variable","@parameterBodyQuote"],[/\$"/,"variable","@parameterBodyDoubleQuote"],[/\$\(/,"variable","@parameterBodyParen"],[/\$\{/,"variable","@parameterBodyCurlyBrace"]],parameterBodyQuote:[[/[^#:%*@\-!_']+/,"variable"],[/[#:%*@\-!_]/,"delimiter"],[/[']/,"variable","@pop"]],parameterBodyDoubleQuote:[[/[^#:%*@\-!_"]+/,"variable"],[/[#:%*@\-!_]/,"delimiter"],[/["]/,"variable","@pop"]],parameterBodyParen:[[/[^#:%*@\-!_)]+/,"variable"],[/[#:%*@\-!_]/,"delimiter"],[/[)]/,"variable","@pop"]],parameterBodyCurlyBrace:[[/[^#:%*@\-!_}]+/,"variable"],[/[#:%*@\-!_]/,"delimiter"],[/[}]/,"variable","@pop"]]}},lSe=Object.freeze(Object.defineProperty({__proto__:null,conf:oSe,language:aSe},Symbol.toStringTag,{value:"Module"})),cSe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},dSe={defaultToken:"",tokenPostfix:".sol",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["pragma","solidity","contract","library","using","struct","function","modifier","constructor","address","string","bool","Int","Uint","Byte","Fixed","Ufixed","int","int8","int16","int24","int32","int40","int48","int56","int64","int72","int80","int88","int96","int104","int112","int120","int128","int136","int144","int152","int160","int168","int176","int184","int192","int200","int208","int216","int224","int232","int240","int248","int256","uint","uint8","uint16","uint24","uint32","uint40","uint48","uint56","uint64","uint72","uint80","uint88","uint96","uint104","uint112","uint120","uint128","uint136","uint144","uint152","uint160","uint168","uint176","uint184","uint192","uint200","uint208","uint216","uint224","uint232","uint240","uint248","uint256","byte","bytes","bytes1","bytes2","bytes3","bytes4","bytes5","bytes6","bytes7","bytes8","bytes9","bytes10","bytes11","bytes12","bytes13","bytes14","bytes15","bytes16","bytes17","bytes18","bytes19","bytes20","bytes21","bytes22","bytes23","bytes24","bytes25","bytes26","bytes27","bytes28","bytes29","bytes30","bytes31","bytes32","fixed","fixed0x8","fixed0x16","fixed0x24","fixed0x32","fixed0x40","fixed0x48","fixed0x56","fixed0x64","fixed0x72","fixed0x80","fixed0x88","fixed0x96","fixed0x104","fixed0x112","fixed0x120","fixed0x128","fixed0x136","fixed0x144","fixed0x152","fixed0x160","fixed0x168","fixed0x176","fixed0x184","fixed0x192","fixed0x200","fixed0x208","fixed0x216","fixed0x224","fixed0x232","fixed0x240","fixed0x248","fixed0x256","fixed8x8","fixed8x16","fixed8x24","fixed8x32","fixed8x40","fixed8x48","fixed8x56","fixed8x64","fixed8x72","fixed8x80","fixed8x88","fixed8x96","fixed8x104","fixed8x112","fixed8x120","fixed8x128","fixed8x136","fixed8x144","fixed8x152","fixed8x160","fixed8x168","fixed8x176","fixed8x184","fixed8x192","fixed8x200","fixed8x208","fixed8x216","fixed8x224","fixed8x232","fixed8x240","fixed8x248","fixed16x8","fixed16x16","fixed16x24","fixed16x32","fixed16x40","fixed16x48","fixed16x56","fixed16x64","fixed16x72","fixed16x80","fixed16x88","fixed16x96","fixed16x104","fixed16x112","fixed16x120","fixed16x128","fixed16x136","fixed16x144","fixed16x152","fixed16x160","fixed16x168","fixed16x176","fixed16x184","fixed16x192","fixed16x200","fixed16x208","fixed16x216","fixed16x224","fixed16x232","fixed16x240","fixed24x8","fixed24x16","fixed24x24","fixed24x32","fixed24x40","fixed24x48","fixed24x56","fixed24x64","fixed24x72","fixed24x80","fixed24x88","fixed24x96","fixed24x104","fixed24x112","fixed24x120","fixed24x128","fixed24x136","fixed24x144","fixed24x152","fixed24x160","fixed24x168","fixed24x176","fixed24x184","fixed24x192","fixed24x200","fixed24x208","fixed24x216","fixed24x224","fixed24x232","fixed32x8","fixed32x16","fixed32x24","fixed32x32","fixed32x40","fixed32x48","fixed32x56","fixed32x64","fixed32x72","fixed32x80","fixed32x88","fixed32x96","fixed32x104","fixed32x112","fixed32x120","fixed32x128","fixed32x136","fixed32x144","fixed32x152","fixed32x160","fixed32x168","fixed32x176","fixed32x184","fixed32x192","fixed32x200","fixed32x208","fixed32x216","fixed32x224","fixed40x8","fixed40x16","fixed40x24","fixed40x32","fixed40x40","fixed40x48","fixed40x56","fixed40x64","fixed40x72","fixed40x80","fixed40x88","fixed40x96","fixed40x104","fixed40x112","fixed40x120","fixed40x128","fixed40x136","fixed40x144","fixed40x152","fixed40x160","fixed40x168","fixed40x176","fixed40x184","fixed40x192","fixed40x200","fixed40x208","fixed40x216","fixed48x8","fixed48x16","fixed48x24","fixed48x32","fixed48x40","fixed48x48","fixed48x56","fixed48x64","fixed48x72","fixed48x80","fixed48x88","fixed48x96","fixed48x104","fixed48x112","fixed48x120","fixed48x128","fixed48x136","fixed48x144","fixed48x152","fixed48x160","fixed48x168","fixed48x176","fixed48x184","fixed48x192","fixed48x200","fixed48x208","fixed56x8","fixed56x16","fixed56x24","fixed56x32","fixed56x40","fixed56x48","fixed56x56","fixed56x64","fixed56x72","fixed56x80","fixed56x88","fixed56x96","fixed56x104","fixed56x112","fixed56x120","fixed56x128","fixed56x136","fixed56x144","fixed56x152","fixed56x160","fixed56x168","fixed56x176","fixed56x184","fixed56x192","fixed56x200","fixed64x8","fixed64x16","fixed64x24","fixed64x32","fixed64x40","fixed64x48","fixed64x56","fixed64x64","fixed64x72","fixed64x80","fixed64x88","fixed64x96","fixed64x104","fixed64x112","fixed64x120","fixed64x128","fixed64x136","fixed64x144","fixed64x152","fixed64x160","fixed64x168","fixed64x176","fixed64x184","fixed64x192","fixed72x8","fixed72x16","fixed72x24","fixed72x32","fixed72x40","fixed72x48","fixed72x56","fixed72x64","fixed72x72","fixed72x80","fixed72x88","fixed72x96","fixed72x104","fixed72x112","fixed72x120","fixed72x128","fixed72x136","fixed72x144","fixed72x152","fixed72x160","fixed72x168","fixed72x176","fixed72x184","fixed80x8","fixed80x16","fixed80x24","fixed80x32","fixed80x40","fixed80x48","fixed80x56","fixed80x64","fixed80x72","fixed80x80","fixed80x88","fixed80x96","fixed80x104","fixed80x112","fixed80x120","fixed80x128","fixed80x136","fixed80x144","fixed80x152","fixed80x160","fixed80x168","fixed80x176","fixed88x8","fixed88x16","fixed88x24","fixed88x32","fixed88x40","fixed88x48","fixed88x56","fixed88x64","fixed88x72","fixed88x80","fixed88x88","fixed88x96","fixed88x104","fixed88x112","fixed88x120","fixed88x128","fixed88x136","fixed88x144","fixed88x152","fixed88x160","fixed88x168","fixed96x8","fixed96x16","fixed96x24","fixed96x32","fixed96x40","fixed96x48","fixed96x56","fixed96x64","fixed96x72","fixed96x80","fixed96x88","fixed96x96","fixed96x104","fixed96x112","fixed96x120","fixed96x128","fixed96x136","fixed96x144","fixed96x152","fixed96x160","fixed104x8","fixed104x16","fixed104x24","fixed104x32","fixed104x40","fixed104x48","fixed104x56","fixed104x64","fixed104x72","fixed104x80","fixed104x88","fixed104x96","fixed104x104","fixed104x112","fixed104x120","fixed104x128","fixed104x136","fixed104x144","fixed104x152","fixed112x8","fixed112x16","fixed112x24","fixed112x32","fixed112x40","fixed112x48","fixed112x56","fixed112x64","fixed112x72","fixed112x80","fixed112x88","fixed112x96","fixed112x104","fixed112x112","fixed112x120","fixed112x128","fixed112x136","fixed112x144","fixed120x8","fixed120x16","fixed120x24","fixed120x32","fixed120x40","fixed120x48","fixed120x56","fixed120x64","fixed120x72","fixed120x80","fixed120x88","fixed120x96","fixed120x104","fixed120x112","fixed120x120","fixed120x128","fixed120x136","fixed128x8","fixed128x16","fixed128x24","fixed128x32","fixed128x40","fixed128x48","fixed128x56","fixed128x64","fixed128x72","fixed128x80","fixed128x88","fixed128x96","fixed128x104","fixed128x112","fixed128x120","fixed128x128","fixed136x8","fixed136x16","fixed136x24","fixed136x32","fixed136x40","fixed136x48","fixed136x56","fixed136x64","fixed136x72","fixed136x80","fixed136x88","fixed136x96","fixed136x104","fixed136x112","fixed136x120","fixed144x8","fixed144x16","fixed144x24","fixed144x32","fixed144x40","fixed144x48","fixed144x56","fixed144x64","fixed144x72","fixed144x80","fixed144x88","fixed144x96","fixed144x104","fixed144x112","fixed152x8","fixed152x16","fixed152x24","fixed152x32","fixed152x40","fixed152x48","fixed152x56","fixed152x64","fixed152x72","fixed152x80","fixed152x88","fixed152x96","fixed152x104","fixed160x8","fixed160x16","fixed160x24","fixed160x32","fixed160x40","fixed160x48","fixed160x56","fixed160x64","fixed160x72","fixed160x80","fixed160x88","fixed160x96","fixed168x8","fixed168x16","fixed168x24","fixed168x32","fixed168x40","fixed168x48","fixed168x56","fixed168x64","fixed168x72","fixed168x80","fixed168x88","fixed176x8","fixed176x16","fixed176x24","fixed176x32","fixed176x40","fixed176x48","fixed176x56","fixed176x64","fixed176x72","fixed176x80","fixed184x8","fixed184x16","fixed184x24","fixed184x32","fixed184x40","fixed184x48","fixed184x56","fixed184x64","fixed184x72","fixed192x8","fixed192x16","fixed192x24","fixed192x32","fixed192x40","fixed192x48","fixed192x56","fixed192x64","fixed200x8","fixed200x16","fixed200x24","fixed200x32","fixed200x40","fixed200x48","fixed200x56","fixed208x8","fixed208x16","fixed208x24","fixed208x32","fixed208x40","fixed208x48","fixed216x8","fixed216x16","fixed216x24","fixed216x32","fixed216x40","fixed224x8","fixed224x16","fixed224x24","fixed224x32","fixed232x8","fixed232x16","fixed232x24","fixed240x8","fixed240x16","fixed248x8","ufixed","ufixed0x8","ufixed0x16","ufixed0x24","ufixed0x32","ufixed0x40","ufixed0x48","ufixed0x56","ufixed0x64","ufixed0x72","ufixed0x80","ufixed0x88","ufixed0x96","ufixed0x104","ufixed0x112","ufixed0x120","ufixed0x128","ufixed0x136","ufixed0x144","ufixed0x152","ufixed0x160","ufixed0x168","ufixed0x176","ufixed0x184","ufixed0x192","ufixed0x200","ufixed0x208","ufixed0x216","ufixed0x224","ufixed0x232","ufixed0x240","ufixed0x248","ufixed0x256","ufixed8x8","ufixed8x16","ufixed8x24","ufixed8x32","ufixed8x40","ufixed8x48","ufixed8x56","ufixed8x64","ufixed8x72","ufixed8x80","ufixed8x88","ufixed8x96","ufixed8x104","ufixed8x112","ufixed8x120","ufixed8x128","ufixed8x136","ufixed8x144","ufixed8x152","ufixed8x160","ufixed8x168","ufixed8x176","ufixed8x184","ufixed8x192","ufixed8x200","ufixed8x208","ufixed8x216","ufixed8x224","ufixed8x232","ufixed8x240","ufixed8x248","ufixed16x8","ufixed16x16","ufixed16x24","ufixed16x32","ufixed16x40","ufixed16x48","ufixed16x56","ufixed16x64","ufixed16x72","ufixed16x80","ufixed16x88","ufixed16x96","ufixed16x104","ufixed16x112","ufixed16x120","ufixed16x128","ufixed16x136","ufixed16x144","ufixed16x152","ufixed16x160","ufixed16x168","ufixed16x176","ufixed16x184","ufixed16x192","ufixed16x200","ufixed16x208","ufixed16x216","ufixed16x224","ufixed16x232","ufixed16x240","ufixed24x8","ufixed24x16","ufixed24x24","ufixed24x32","ufixed24x40","ufixed24x48","ufixed24x56","ufixed24x64","ufixed24x72","ufixed24x80","ufixed24x88","ufixed24x96","ufixed24x104","ufixed24x112","ufixed24x120","ufixed24x128","ufixed24x136","ufixed24x144","ufixed24x152","ufixed24x160","ufixed24x168","ufixed24x176","ufixed24x184","ufixed24x192","ufixed24x200","ufixed24x208","ufixed24x216","ufixed24x224","ufixed24x232","ufixed32x8","ufixed32x16","ufixed32x24","ufixed32x32","ufixed32x40","ufixed32x48","ufixed32x56","ufixed32x64","ufixed32x72","ufixed32x80","ufixed32x88","ufixed32x96","ufixed32x104","ufixed32x112","ufixed32x120","ufixed32x128","ufixed32x136","ufixed32x144","ufixed32x152","ufixed32x160","ufixed32x168","ufixed32x176","ufixed32x184","ufixed32x192","ufixed32x200","ufixed32x208","ufixed32x216","ufixed32x224","ufixed40x8","ufixed40x16","ufixed40x24","ufixed40x32","ufixed40x40","ufixed40x48","ufixed40x56","ufixed40x64","ufixed40x72","ufixed40x80","ufixed40x88","ufixed40x96","ufixed40x104","ufixed40x112","ufixed40x120","ufixed40x128","ufixed40x136","ufixed40x144","ufixed40x152","ufixed40x160","ufixed40x168","ufixed40x176","ufixed40x184","ufixed40x192","ufixed40x200","ufixed40x208","ufixed40x216","ufixed48x8","ufixed48x16","ufixed48x24","ufixed48x32","ufixed48x40","ufixed48x48","ufixed48x56","ufixed48x64","ufixed48x72","ufixed48x80","ufixed48x88","ufixed48x96","ufixed48x104","ufixed48x112","ufixed48x120","ufixed48x128","ufixed48x136","ufixed48x144","ufixed48x152","ufixed48x160","ufixed48x168","ufixed48x176","ufixed48x184","ufixed48x192","ufixed48x200","ufixed48x208","ufixed56x8","ufixed56x16","ufixed56x24","ufixed56x32","ufixed56x40","ufixed56x48","ufixed56x56","ufixed56x64","ufixed56x72","ufixed56x80","ufixed56x88","ufixed56x96","ufixed56x104","ufixed56x112","ufixed56x120","ufixed56x128","ufixed56x136","ufixed56x144","ufixed56x152","ufixed56x160","ufixed56x168","ufixed56x176","ufixed56x184","ufixed56x192","ufixed56x200","ufixed64x8","ufixed64x16","ufixed64x24","ufixed64x32","ufixed64x40","ufixed64x48","ufixed64x56","ufixed64x64","ufixed64x72","ufixed64x80","ufixed64x88","ufixed64x96","ufixed64x104","ufixed64x112","ufixed64x120","ufixed64x128","ufixed64x136","ufixed64x144","ufixed64x152","ufixed64x160","ufixed64x168","ufixed64x176","ufixed64x184","ufixed64x192","ufixed72x8","ufixed72x16","ufixed72x24","ufixed72x32","ufixed72x40","ufixed72x48","ufixed72x56","ufixed72x64","ufixed72x72","ufixed72x80","ufixed72x88","ufixed72x96","ufixed72x104","ufixed72x112","ufixed72x120","ufixed72x128","ufixed72x136","ufixed72x144","ufixed72x152","ufixed72x160","ufixed72x168","ufixed72x176","ufixed72x184","ufixed80x8","ufixed80x16","ufixed80x24","ufixed80x32","ufixed80x40","ufixed80x48","ufixed80x56","ufixed80x64","ufixed80x72","ufixed80x80","ufixed80x88","ufixed80x96","ufixed80x104","ufixed80x112","ufixed80x120","ufixed80x128","ufixed80x136","ufixed80x144","ufixed80x152","ufixed80x160","ufixed80x168","ufixed80x176","ufixed88x8","ufixed88x16","ufixed88x24","ufixed88x32","ufixed88x40","ufixed88x48","ufixed88x56","ufixed88x64","ufixed88x72","ufixed88x80","ufixed88x88","ufixed88x96","ufixed88x104","ufixed88x112","ufixed88x120","ufixed88x128","ufixed88x136","ufixed88x144","ufixed88x152","ufixed88x160","ufixed88x168","ufixed96x8","ufixed96x16","ufixed96x24","ufixed96x32","ufixed96x40","ufixed96x48","ufixed96x56","ufixed96x64","ufixed96x72","ufixed96x80","ufixed96x88","ufixed96x96","ufixed96x104","ufixed96x112","ufixed96x120","ufixed96x128","ufixed96x136","ufixed96x144","ufixed96x152","ufixed96x160","ufixed104x8","ufixed104x16","ufixed104x24","ufixed104x32","ufixed104x40","ufixed104x48","ufixed104x56","ufixed104x64","ufixed104x72","ufixed104x80","ufixed104x88","ufixed104x96","ufixed104x104","ufixed104x112","ufixed104x120","ufixed104x128","ufixed104x136","ufixed104x144","ufixed104x152","ufixed112x8","ufixed112x16","ufixed112x24","ufixed112x32","ufixed112x40","ufixed112x48","ufixed112x56","ufixed112x64","ufixed112x72","ufixed112x80","ufixed112x88","ufixed112x96","ufixed112x104","ufixed112x112","ufixed112x120","ufixed112x128","ufixed112x136","ufixed112x144","ufixed120x8","ufixed120x16","ufixed120x24","ufixed120x32","ufixed120x40","ufixed120x48","ufixed120x56","ufixed120x64","ufixed120x72","ufixed120x80","ufixed120x88","ufixed120x96","ufixed120x104","ufixed120x112","ufixed120x120","ufixed120x128","ufixed120x136","ufixed128x8","ufixed128x16","ufixed128x24","ufixed128x32","ufixed128x40","ufixed128x48","ufixed128x56","ufixed128x64","ufixed128x72","ufixed128x80","ufixed128x88","ufixed128x96","ufixed128x104","ufixed128x112","ufixed128x120","ufixed128x128","ufixed136x8","ufixed136x16","ufixed136x24","ufixed136x32","ufixed136x40","ufixed136x48","ufixed136x56","ufixed136x64","ufixed136x72","ufixed136x80","ufixed136x88","ufixed136x96","ufixed136x104","ufixed136x112","ufixed136x120","ufixed144x8","ufixed144x16","ufixed144x24","ufixed144x32","ufixed144x40","ufixed144x48","ufixed144x56","ufixed144x64","ufixed144x72","ufixed144x80","ufixed144x88","ufixed144x96","ufixed144x104","ufixed144x112","ufixed152x8","ufixed152x16","ufixed152x24","ufixed152x32","ufixed152x40","ufixed152x48","ufixed152x56","ufixed152x64","ufixed152x72","ufixed152x80","ufixed152x88","ufixed152x96","ufixed152x104","ufixed160x8","ufixed160x16","ufixed160x24","ufixed160x32","ufixed160x40","ufixed160x48","ufixed160x56","ufixed160x64","ufixed160x72","ufixed160x80","ufixed160x88","ufixed160x96","ufixed168x8","ufixed168x16","ufixed168x24","ufixed168x32","ufixed168x40","ufixed168x48","ufixed168x56","ufixed168x64","ufixed168x72","ufixed168x80","ufixed168x88","ufixed176x8","ufixed176x16","ufixed176x24","ufixed176x32","ufixed176x40","ufixed176x48","ufixed176x56","ufixed176x64","ufixed176x72","ufixed176x80","ufixed184x8","ufixed184x16","ufixed184x24","ufixed184x32","ufixed184x40","ufixed184x48","ufixed184x56","ufixed184x64","ufixed184x72","ufixed192x8","ufixed192x16","ufixed192x24","ufixed192x32","ufixed192x40","ufixed192x48","ufixed192x56","ufixed192x64","ufixed200x8","ufixed200x16","ufixed200x24","ufixed200x32","ufixed200x40","ufixed200x48","ufixed200x56","ufixed208x8","ufixed208x16","ufixed208x24","ufixed208x32","ufixed208x40","ufixed208x48","ufixed216x8","ufixed216x16","ufixed216x24","ufixed216x32","ufixed216x40","ufixed224x8","ufixed224x16","ufixed224x24","ufixed224x32","ufixed232x8","ufixed232x16","ufixed232x24","ufixed240x8","ufixed240x16","ufixed248x8","event","enum","let","mapping","private","public","external","inherited","payable","true","false","var","import","constant","if","else","for","else","for","while","do","break","continue","throw","returns","return","suicide","new","is","this","super"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,floatsuffix:/[fFlL]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/int\d*/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}},uSe=Object.freeze(Object.defineProperty({__proto__:null,conf:cSe,language:dSe},Symbol.toStringTag,{value:"Module"})),hSe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:'"',close:'"',notIn:["string","comment"]},{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]}]},fSe={defaultToken:"",tokenPostfix:".aes",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["contract","library","entrypoint","function","stateful","state","hash","signature","tuple","list","address","string","bool","int","record","datatype","type","option","oracle","oracle_query","Call","Bits","Bytes","Oracle","String","Crypto","Address","Auth","Chain","None","Some","bits","bytes","event","let","map","private","public","true","false","var","if","else","throw"],operators:["=",">","<","!","~","?","::",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,integersuffix:/(ll|LL|u|U|l|L)?(ll|LL|u|U|l|L)?/,floatsuffix:/[fFlL]?/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/\[\[.*\]\]/,"annotation"],[/^\s*#\w+/,"keyword"],[/int\d*/,"keyword"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\d+[eE]([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+([eE][\-+]?\d+)?(@floatsuffix)/,"number.float"],[/0[xX][0-9a-fA-F']*[0-9a-fA-F](@integersuffix)/,"number.hex"],[/0[0-7']*[0-7](@integersuffix)/,"number.octal"],[/0[bB][0-1']*[0-1](@integersuffix)/,"number.binary"],[/\d[\d']*\d(@integersuffix)/,"number"],[/\d(@integersuffix)/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],doccomment:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]]}},gSe=Object.freeze(Object.defineProperty({__proto__:null,conf:hSe,language:fSe},Symbol.toStringTag,{value:"Module"})),pSe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"'",close:"'",notIn:["string"]},{open:'"',close:'"',notIn:["string"]},{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"}]},mSe={defaultToken:"",tokenPostfix:".rq",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["add","as","asc","ask","base","by","clear","construct","copy","create","data","delete","desc","describe","distinct","drop","false","filter","from","graph","group","having","in","insert","limit","load","minus","move","named","not","offset","optional","order","prefix","reduced","select","service","silent","to","true","undef","union","using","values","where","with"],builtinFunctions:["a","abs","avg","bind","bnode","bound","ceil","coalesce","concat","contains","count","datatype","day","encode_for_uri","exists","floor","group_concat","hours","if","iri","isblank","isiri","isliteral","isnumeric","isuri","lang","langmatches","lcase","max","md5","min","minutes","month","now","rand","regex","replace","round","sameterm","sample","seconds","sha1","sha256","sha384","sha512","str","strafter","strbefore","strdt","strends","strlang","strlen","strstarts","struuid","substr","sum","timezone","tz","ucase","uri","uuid","year"],ignoreCase:!0,tokenizer:{root:[[/<[^\s\u00a0>]*>?/,"tag"],{include:"@strings"},[/#.*/,"comment"],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/[_\w\d]+:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])*/,"tag"],[/:(\.(?=[\w_\-\\%])|[:\w_-]|\\[-\\_~.!$&'()*+,;=/?#@%]|%[a-f\d][a-f\d])+/,"tag"],[/[$?]?[_\w\d]+/,{cases:{"@keywords":{token:"keyword"},"@builtinFunctions":{token:"predefined.sql"},"@default":"identifier"}}],[/\^\^/,"operator.sql"],[/\^[*+\-<>=&|^\/!?]*/,"operator.sql"],[/[*+\-<>=&|\/!?]/,"operator.sql"],[/@[a-z\d\-]*/,"metatag.html"],[/\s+/,"white"]],strings:[[/'([^'\\]|\\.)*$/,"string.invalid"],[/'$/,"string.sql","@pop"],[/'/,"string.sql","@stringBody"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"$/,"string.sql","@pop"],[/"/,"string.sql","@dblStringBody"]],stringBody:[[/[^\\']+/,"string.sql"],[/\\./,"string.escape"],[/'/,"string.sql","@pop"]],dblStringBody:[[/[^\\"]+/,"string.sql"],[/\\./,"string.escape"],[/"/,"string.sql","@pop"]]}},_Se=Object.freeze(Object.defineProperty({__proto__:null,conf:pSe,language:mSe},Symbol.toStringTag,{value:"Module"})),bSe={comments:{lineComment:"--",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},vSe={defaultToken:"",tokenPostfix:".sql",ignoreCase:!0,brackets:[{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],keywords:["ABORT_AFTER_WAIT","ABSENT","ABSOLUTE","ACCENT_SENSITIVITY","ACTION","ACTIVATION","ACTIVE","ADD","ADDRESS","ADMIN","AES","AES_128","AES_192","AES_256","AFFINITY","AFTER","AGGREGATE","ALGORITHM","ALL_CONSTRAINTS","ALL_ERRORMSGS","ALL_INDEXES","ALL_LEVELS","ALL_SPARSE_COLUMNS","ALLOW_CONNECTIONS","ALLOW_MULTIPLE_EVENT_LOSS","ALLOW_PAGE_LOCKS","ALLOW_ROW_LOCKS","ALLOW_SINGLE_EVENT_LOSS","ALLOW_SNAPSHOT_ISOLATION","ALLOWED","ALTER","ANONYMOUS","ANSI_DEFAULTS","ANSI_NULL_DEFAULT","ANSI_NULL_DFLT_OFF","ANSI_NULL_DFLT_ON","ANSI_NULLS","ANSI_PADDING","ANSI_WARNINGS","APPEND","APPLICATION","APPLICATION_LOG","ARITHABORT","ARITHIGNORE","AS","ASC","ASSEMBLY","ASYMMETRIC","ASYNCHRONOUS_COMMIT","AT","ATOMIC","ATTACH","ATTACH_REBUILD_LOG","AUDIT","AUDIT_GUID","AUTHENTICATION","AUTHORIZATION","AUTO","AUTO_CLEANUP","AUTO_CLOSE","AUTO_CREATE_STATISTICS","AUTO_SHRINK","AUTO_UPDATE_STATISTICS","AUTO_UPDATE_STATISTICS_ASYNC","AUTOMATED_BACKUP_PREFERENCE","AUTOMATIC","AVAILABILITY","AVAILABILITY_MODE","BACKUP","BACKUP_PRIORITY","BASE64","BATCHSIZE","BEGIN","BEGIN_DIALOG","BIGINT","BINARY","BINDING","BIT","BLOCKERS","BLOCKSIZE","BOUNDING_BOX","BREAK","BROKER","BROKER_INSTANCE","BROWSE","BUCKET_COUNT","BUFFER","BUFFERCOUNT","BULK","BULK_LOGGED","BY","CACHE","CALL","CALLED","CALLER","CAP_CPU_PERCENT","CASCADE","CASE","CATALOG","CATCH","CELLS_PER_OBJECT","CERTIFICATE","CHANGE_RETENTION","CHANGE_TRACKING","CHANGES","CHAR","CHARACTER","CHECK","CHECK_CONSTRAINTS","CHECK_EXPIRATION","CHECK_POLICY","CHECKALLOC","CHECKCATALOG","CHECKCONSTRAINTS","CHECKDB","CHECKFILEGROUP","CHECKIDENT","CHECKPOINT","CHECKTABLE","CLASSIFIER_FUNCTION","CLEANTABLE","CLEANUP","CLEAR","CLOSE","CLUSTER","CLUSTERED","CODEPAGE","COLLATE","COLLECTION","COLUMN","COLUMN_SET","COLUMNS","COLUMNSTORE","COLUMNSTORE_ARCHIVE","COMMIT","COMMITTED","COMPATIBILITY_LEVEL","COMPRESSION","COMPUTE","CONCAT","CONCAT_NULL_YIELDS_NULL","CONFIGURATION","CONNECT","CONSTRAINT","CONTAINMENT","CONTENT","CONTEXT","CONTINUE","CONTINUE_AFTER_ERROR","CONTRACT","CONTRACT_NAME","CONTROL","CONVERSATION","COOKIE","COPY_ONLY","COUNTER","CPU","CREATE","CREATE_NEW","CREATION_DISPOSITION","CREDENTIAL","CRYPTOGRAPHIC","CUBE","CURRENT","CURRENT_DATE","CURSOR","CURSOR_CLOSE_ON_COMMIT","CURSOR_DEFAULT","CYCLE","DATA","DATA_COMPRESSION","DATA_PURITY","DATABASE","DATABASE_DEFAULT","DATABASE_MIRRORING","DATABASE_SNAPSHOT","DATAFILETYPE","DATE","DATE_CORRELATION_OPTIMIZATION","DATEFIRST","DATEFORMAT","DATETIME","DATETIME2","DATETIMEOFFSET","DAY","DAYOFYEAR","DAYS","DB_CHAINING","DBCC","DBREINDEX","DDL_DATABASE_LEVEL_EVENTS","DEADLOCK_PRIORITY","DEALLOCATE","DEC","DECIMAL","DECLARE","DECRYPTION","DEFAULT","DEFAULT_DATABASE","DEFAULT_FULLTEXT_LANGUAGE","DEFAULT_LANGUAGE","DEFAULT_SCHEMA","DEFINITION","DELAY","DELAYED_DURABILITY","DELETE","DELETED","DENSITY_VECTOR","DENY","DEPENDENTS","DES","DESC","DESCRIPTION","DESX","DHCP","DIAGNOSTICS","DIALOG","DIFFERENTIAL","DIRECTORY_NAME","DISABLE","DISABLE_BROKER","DISABLED","DISK","DISTINCT","DISTRIBUTED","DOCUMENT","DOUBLE","DROP","DROP_EXISTING","DROPCLEANBUFFERS","DUMP","DURABILITY","DYNAMIC","EDITION","ELEMENTS","ELSE","EMERGENCY","EMPTY","EMPTYFILE","ENABLE","ENABLE_BROKER","ENABLED","ENCRYPTION","END","ENDPOINT","ENDPOINT_URL","ERRLVL","ERROR","ERROR_BROKER_CONVERSATIONS","ERRORFILE","ESCAPE","ESTIMATEONLY","EVENT","EVENT_RETENTION_MODE","EXEC","EXECUTABLE","EXECUTE","EXIT","EXPAND","EXPIREDATE","EXPIRY_DATE","EXPLICIT","EXTENDED_LOGICAL_CHECKS","EXTENSION","EXTERNAL","EXTERNAL_ACCESS","FAIL_OPERATION","FAILOVER","FAILOVER_MODE","FAILURE_CONDITION_LEVEL","FALSE","FAN_IN","FAST","FAST_FORWARD","FETCH","FIELDTERMINATOR","FILE","FILEGROUP","FILEGROWTH","FILELISTONLY","FILENAME","FILEPATH","FILESTREAM","FILESTREAM_ON","FILETABLE_COLLATE_FILENAME","FILETABLE_DIRECTORY","FILETABLE_FULLPATH_UNIQUE_CONSTRAINT_NAME","FILETABLE_NAMESPACE","FILETABLE_PRIMARY_KEY_CONSTRAINT_NAME","FILETABLE_STREAMID_UNIQUE_CONSTRAINT_NAME","FILLFACTOR","FILTERING","FIRE_TRIGGERS","FIRST","FIRSTROW","FLOAT","FMTONLY","FOLLOWING","FOR","FORCE","FORCE_FAILOVER_ALLOW_DATA_LOSS","FORCE_SERVICE_ALLOW_DATA_LOSS","FORCED","FORCEPLAN","FORCESCAN","FORCESEEK","FOREIGN","FORMATFILE","FORMSOF","FORWARD_ONLY","FREE","FREEPROCCACHE","FREESESSIONCACHE","FREESYSTEMCACHE","FROM","FULL","FULLSCAN","FULLTEXT","FUNCTION","GB","GEOGRAPHY_AUTO_GRID","GEOGRAPHY_GRID","GEOMETRY_AUTO_GRID","GEOMETRY_GRID","GET","GLOBAL","GO","GOTO","GOVERNOR","GRANT","GRIDS","GROUP","GROUP_MAX_REQUESTS","HADR","HASH","HASHED","HAVING","HEADERONLY","HEALTH_CHECK_TIMEOUT","HELP","HIERARCHYID","HIGH","HINT","HISTOGRAM","HOLDLOCK","HONOR_BROKER_PRIORITY","HOUR","HOURS","IDENTITY","IDENTITY_INSERT","IDENTITY_VALUE","IDENTITYCOL","IF","IGNORE_CONSTRAINTS","IGNORE_DUP_KEY","IGNORE_NONCLUSTERED_COLUMNSTORE_INDEX","IGNORE_TRIGGERS","IMAGE","IMMEDIATE","IMPERSONATE","IMPLICIT_TRANSACTIONS","IMPORTANCE","INCLUDE","INCREMENT","INCREMENTAL","INDEX","INDEXDEFRAG","INFINITE","INFLECTIONAL","INIT","INITIATOR","INPUT","INPUTBUFFER","INSENSITIVE","INSERT","INSERTED","INSTEAD","INT","INTEGER","INTO","IO","IP","ISABOUT","ISOLATION","JOB","KB","KEEP","KEEP_CDC","KEEP_NULLS","KEEP_REPLICATION","KEEPDEFAULTS","KEEPFIXED","KEEPIDENTITY","KEEPNULLS","KERBEROS","KEY","KEY_SOURCE","KEYS","KEYSET","KILL","KILOBYTES_PER_BATCH","LABELONLY","LANGUAGE","LAST","LASTROW","LEVEL","LEVEL_1","LEVEL_2","LEVEL_3","LEVEL_4","LIFETIME","LIMIT","LINENO","LIST","LISTENER","LISTENER_IP","LISTENER_PORT","LOAD","LOADHISTORY","LOB_COMPACTION","LOCAL","LOCAL_SERVICE_NAME","LOCK_ESCALATION","LOCK_TIMEOUT","LOGIN","LOGSPACE","LOOP","LOW","MANUAL","MARK","MARK_IN_USE_FOR_REMOVAL","MASTER","MAX_CPU_PERCENT","MAX_DISPATCH_LATENCY","MAX_DOP","MAX_DURATION","MAX_EVENT_SIZE","MAX_FILES","MAX_IOPS_PER_VOLUME","MAX_MEMORY","MAX_MEMORY_PERCENT","MAX_QUEUE_READERS","MAX_ROLLOVER_FILES","MAX_SIZE","MAXDOP","MAXERRORS","MAXLENGTH","MAXRECURSION","MAXSIZE","MAXTRANSFERSIZE","MAXVALUE","MB","MEDIADESCRIPTION","MEDIANAME","MEDIAPASSWORD","MEDIUM","MEMBER","MEMORY_OPTIMIZED","MEMORY_OPTIMIZED_DATA","MEMORY_OPTIMIZED_ELEVATE_TO_SNAPSHOT","MEMORY_PARTITION_MODE","MERGE","MESSAGE","MESSAGE_FORWARD_SIZE","MESSAGE_FORWARDING","MICROSECOND","MILLISECOND","MIN_CPU_PERCENT","MIN_IOPS_PER_VOLUME","MIN_MEMORY_PERCENT","MINUTE","MINUTES","MINVALUE","MIRROR","MIRROR_ADDRESS","MODIFY","MONEY","MONTH","MOVE","MULTI_USER","MUST_CHANGE","NAME","NANOSECOND","NATIONAL","NATIVE_COMPILATION","NCHAR","NEGOTIATE","NESTED_TRIGGERS","NEW_ACCOUNT","NEW_BROKER","NEW_PASSWORD","NEWNAME","NEXT","NO","NO_BROWSETABLE","NO_CHECKSUM","NO_COMPRESSION","NO_EVENT_LOSS","NO_INFOMSGS","NO_TRUNCATE","NO_WAIT","NOCHECK","NOCOUNT","NOEXEC","NOEXPAND","NOFORMAT","NOINDEX","NOINIT","NOLOCK","NON","NON_TRANSACTED_ACCESS","NONCLUSTERED","NONE","NORECOMPUTE","NORECOVERY","NORESEED","NORESET","NOREWIND","NORMAL","NOSKIP","NOTIFICATION","NOTRUNCATE","NOUNLOAD","NOWAIT","NTEXT","NTLM","NUMANODE","NUMERIC","NUMERIC_ROUNDABORT","NVARCHAR","OBJECT","OF","OFF","OFFLINE","OFFSET","OFFSETS","OLD_ACCOUNT","OLD_PASSWORD","ON","ON_FAILURE","ONLINE","ONLY","OPEN","OPEN_EXISTING","OPENTRAN","OPTIMISTIC","OPTIMIZE","OPTION","ORDER","OUT","OUTPUT","OUTPUTBUFFER","OVER","OVERRIDE","OWNER","OWNERSHIP","PAD_INDEX","PAGE","PAGE_VERIFY","PAGECOUNT","PAGLOCK","PARAMETERIZATION","PARSEONLY","PARTIAL","PARTITION","PARTITIONS","PARTNER","PASSWORD","PATH","PER_CPU","PER_NODE","PERCENT","PERMISSION_SET","PERSISTED","PHYSICAL_ONLY","PLAN","POISON_MESSAGE_HANDLING","POOL","POPULATION","PORT","PRECEDING","PRECISION","PRIMARY","PRIMARY_ROLE","PRINT","PRIOR","PRIORITY","PRIORITY_LEVEL","PRIVATE","PRIVILEGES","PROC","PROCCACHE","PROCEDURE","PROCEDURE_NAME","PROCESS","PROFILE","PROPERTY","PROPERTY_DESCRIPTION","PROPERTY_INT_ID","PROPERTY_SET_GUID","PROVIDER","PROVIDER_KEY_NAME","PUBLIC","PUT","QUARTER","QUERY","QUERY_GOVERNOR_COST_LIMIT","QUEUE","QUEUE_DELAY","QUOTED_IDENTIFIER","RAISERROR","RANGE","RAW","RC2","RC4","RC4_128","READ","READ_COMMITTED_SNAPSHOT","READ_ONLY","READ_ONLY_ROUTING_LIST","READ_ONLY_ROUTING_URL","READ_WRITE","READ_WRITE_FILEGROUPS","READCOMMITTED","READCOMMITTEDLOCK","READONLY","READPAST","READTEXT","READUNCOMMITTED","READWRITE","REAL","REBUILD","RECEIVE","RECOMPILE","RECONFIGURE","RECOVERY","RECURSIVE","RECURSIVE_TRIGGERS","REFERENCES","REGENERATE","RELATED_CONVERSATION","RELATED_CONVERSATION_GROUP","RELATIVE","REMOTE","REMOTE_PROC_TRANSACTIONS","REMOTE_SERVICE_NAME","REMOVE","REORGANIZE","REPAIR_ALLOW_DATA_LOSS","REPAIR_FAST","REPAIR_REBUILD","REPEATABLE","REPEATABLEREAD","REPLICA","REPLICATION","REQUEST_MAX_CPU_TIME_SEC","REQUEST_MAX_MEMORY_GRANT_PERCENT","REQUEST_MEMORY_GRANT_TIMEOUT_SEC","REQUIRED","RESAMPLE","RESEED","RESERVE_DISK_SPACE","RESET","RESOURCE","RESTART","RESTORE","RESTRICT","RESTRICTED_USER","RESULT","RESUME","RETAINDAYS","RETENTION","RETURN","RETURNS","REVERT","REVOKE","REWIND","REWINDONLY","ROBUST","ROLE","ROLLBACK","ROLLUP","ROOT","ROUTE","ROW","ROWCOUNT","ROWGUIDCOL","ROWLOCK","ROWS","ROWS_PER_BATCH","ROWTERMINATOR","ROWVERSION","RSA_1024","RSA_2048","RSA_512","RULE","SAFE","SAFETY","SAMPLE","SAVE","SCHEDULER","SCHEMA","SCHEMA_AND_DATA","SCHEMA_ONLY","SCHEMABINDING","SCHEME","SCROLL","SCROLL_LOCKS","SEARCH","SECOND","SECONDARY","SECONDARY_ONLY","SECONDARY_ROLE","SECONDS","SECRET","SECURITY_LOG","SECURITYAUDIT","SELECT","SELECTIVE","SELF","SEND","SENT","SEQUENCE","SERIALIZABLE","SERVER","SERVICE","SERVICE_BROKER","SERVICE_NAME","SESSION","SESSION_TIMEOUT","SET","SETS","SETUSER","SHOW_STATISTICS","SHOWCONTIG","SHOWPLAN","SHOWPLAN_ALL","SHOWPLAN_TEXT","SHOWPLAN_XML","SHRINKDATABASE","SHRINKFILE","SHUTDOWN","SID","SIGNATURE","SIMPLE","SINGLE_BLOB","SINGLE_CLOB","SINGLE_NCLOB","SINGLE_USER","SINGLETON","SIZE","SKIP","SMALLDATETIME","SMALLINT","SMALLMONEY","SNAPSHOT","SORT_IN_TEMPDB","SOURCE","SPARSE","SPATIAL","SPATIAL_WINDOW_MAX_CELLS","SPECIFICATION","SPLIT","SQL","SQL_VARIANT","SQLPERF","STANDBY","START","START_DATE","STARTED","STARTUP_STATE","STAT_HEADER","STATE","STATEMENT","STATIC","STATISTICAL_SEMANTICS","STATISTICS","STATISTICS_INCREMENTAL","STATISTICS_NORECOMPUTE","STATS","STATS_STREAM","STATUS","STATUSONLY","STOP","STOP_ON_ERROR","STOPAT","STOPATMARK","STOPBEFOREMARK","STOPLIST","STOPPED","SUBJECT","SUBSCRIPTION","SUPPORTED","SUSPEND","SWITCH","SYMMETRIC","SYNCHRONOUS_COMMIT","SYNONYM","SYSNAME","SYSTEM","TABLE","TABLERESULTS","TABLESAMPLE","TABLOCK","TABLOCKX","TAKE","TAPE","TARGET","TARGET_RECOVERY_TIME","TB","TCP","TEXT","TEXTIMAGE_ON","TEXTSIZE","THEN","THESAURUS","THROW","TIES","TIME","TIMEOUT","TIMER","TIMESTAMP","TINYINT","TO","TOP","TORN_PAGE_DETECTION","TRACEOFF","TRACEON","TRACESTATUS","TRACK_CAUSALITY","TRACK_COLUMNS_UPDATED","TRAN","TRANSACTION","TRANSFER","TRANSFORM_NOISE_WORDS","TRIGGER","TRIPLE_DES","TRIPLE_DES_3KEY","TRUE","TRUNCATE","TRUNCATEONLY","TRUSTWORTHY","TRY","TSQL","TWO_DIGIT_YEAR_CUTOFF","TYPE","TYPE_WARNING","UNBOUNDED","UNCHECKED","UNCOMMITTED","UNDEFINED","UNIQUE","UNIQUEIDENTIFIER","UNKNOWN","UNLIMITED","UNLOAD","UNSAFE","UPDATE","UPDATETEXT","UPDATEUSAGE","UPDLOCK","URL","USE","USED","USER","USEROPTIONS","USING","VALID_XML","VALIDATION","VALUE","VALUES","VARBINARY","VARCHAR","VARYING","VERIFYONLY","VERSION","VIEW","VIEW_METADATA","VIEWS","VISIBILITY","WAIT_AT_LOW_PRIORITY","WAITFOR","WEEK","WEIGHT","WELL_FORMED_XML","WHEN","WHERE","WHILE","WINDOWS","WITH","WITHIN","WITHOUT","WITNESS","WORK","WORKLOAD","WRITETEXT","XACT_ABORT","XLOCK","XMAX","XMIN","XML","XMLDATA","XMLNAMESPACES","XMLSCHEMA","XQUERY","XSINIL","YEAR","YMAX","YMIN"],operators:["ALL","AND","ANY","BETWEEN","EXISTS","IN","LIKE","NOT","OR","SOME","EXCEPT","INTERSECT","UNION","APPLY","CROSS","FULL","INNER","JOIN","LEFT","OUTER","RIGHT","CONTAINS","FREETEXT","IS","NULL","PIVOT","UNPIVOT","MATCHED"],builtinFunctions:["AVG","CHECKSUM_AGG","COUNT","COUNT_BIG","GROUPING","GROUPING_ID","MAX","MIN","SUM","STDEV","STDEVP","VAR","VARP","CUME_DIST","FIRST_VALUE","LAG","LAST_VALUE","LEAD","PERCENTILE_CONT","PERCENTILE_DISC","PERCENT_RANK","COLLATE","COLLATIONPROPERTY","TERTIARY_WEIGHTS","FEDERATION_FILTERING_VALUE","CAST","CONVERT","PARSE","TRY_CAST","TRY_CONVERT","TRY_PARSE","ASYMKEY_ID","ASYMKEYPROPERTY","CERTPROPERTY","CERT_ID","CRYPT_GEN_RANDOM","DECRYPTBYASYMKEY","DECRYPTBYCERT","DECRYPTBYKEY","DECRYPTBYKEYAUTOASYMKEY","DECRYPTBYKEYAUTOCERT","DECRYPTBYPASSPHRASE","ENCRYPTBYASYMKEY","ENCRYPTBYCERT","ENCRYPTBYKEY","ENCRYPTBYPASSPHRASE","HASHBYTES","IS_OBJECTSIGNED","KEY_GUID","KEY_ID","KEY_NAME","SIGNBYASYMKEY","SIGNBYCERT","SYMKEYPROPERTY","VERIFYSIGNEDBYCERT","VERIFYSIGNEDBYASYMKEY","CURSOR_STATUS","DATALENGTH","IDENT_CURRENT","IDENT_INCR","IDENT_SEED","IDENTITY","SQL_VARIANT_PROPERTY","CURRENT_TIMESTAMP","DATEADD","DATEDIFF","DATEFROMPARTS","DATENAME","DATEPART","DATETIME2FROMPARTS","DATETIMEFROMPARTS","DATETIMEOFFSETFROMPARTS","DAY","EOMONTH","GETDATE","GETUTCDATE","ISDATE","MONTH","SMALLDATETIMEFROMPARTS","SWITCHOFFSET","SYSDATETIME","SYSDATETIMEOFFSET","SYSUTCDATETIME","TIMEFROMPARTS","TODATETIMEOFFSET","YEAR","CHOOSE","COALESCE","IIF","NULLIF","ABS","ACOS","ASIN","ATAN","ATN2","CEILING","COS","COT","DEGREES","EXP","FLOOR","LOG","LOG10","PI","POWER","RADIANS","RAND","ROUND","SIGN","SIN","SQRT","SQUARE","TAN","APP_NAME","APPLOCK_MODE","APPLOCK_TEST","ASSEMBLYPROPERTY","COL_LENGTH","COL_NAME","COLUMNPROPERTY","DATABASE_PRINCIPAL_ID","DATABASEPROPERTYEX","DB_ID","DB_NAME","FILE_ID","FILE_IDEX","FILE_NAME","FILEGROUP_ID","FILEGROUP_NAME","FILEGROUPPROPERTY","FILEPROPERTY","FULLTEXTCATALOGPROPERTY","FULLTEXTSERVICEPROPERTY","INDEX_COL","INDEXKEY_PROPERTY","INDEXPROPERTY","OBJECT_DEFINITION","OBJECT_ID","OBJECT_NAME","OBJECT_SCHEMA_NAME","OBJECTPROPERTY","OBJECTPROPERTYEX","ORIGINAL_DB_NAME","PARSENAME","SCHEMA_ID","SCHEMA_NAME","SCOPE_IDENTITY","SERVERPROPERTY","STATS_DATE","TYPE_ID","TYPE_NAME","TYPEPROPERTY","DENSE_RANK","NTILE","RANK","ROW_NUMBER","PUBLISHINGSERVERNAME","OPENDATASOURCE","OPENQUERY","OPENROWSET","OPENXML","CERTENCODED","CERTPRIVATEKEY","CURRENT_USER","HAS_DBACCESS","HAS_PERMS_BY_NAME","IS_MEMBER","IS_ROLEMEMBER","IS_SRVROLEMEMBER","LOGINPROPERTY","ORIGINAL_LOGIN","PERMISSIONS","PWDENCRYPT","PWDCOMPARE","SESSION_USER","SESSIONPROPERTY","SUSER_ID","SUSER_NAME","SUSER_SID","SUSER_SNAME","SYSTEM_USER","USER","USER_ID","USER_NAME","ASCII","CHAR","CHARINDEX","CONCAT","DIFFERENCE","FORMAT","LEFT","LEN","LOWER","LTRIM","NCHAR","PATINDEX","QUOTENAME","REPLACE","REPLICATE","REVERSE","RIGHT","RTRIM","SOUNDEX","SPACE","STR","STUFF","SUBSTRING","UNICODE","UPPER","BINARY_CHECKSUM","CHECKSUM","CONNECTIONPROPERTY","CONTEXT_INFO","CURRENT_REQUEST_ID","ERROR_LINE","ERROR_NUMBER","ERROR_MESSAGE","ERROR_PROCEDURE","ERROR_SEVERITY","ERROR_STATE","FORMATMESSAGE","GETANSINULL","GET_FILESTREAM_TRANSACTION_CONTEXT","HOST_ID","HOST_NAME","ISNULL","ISNUMERIC","MIN_ACTIVE_ROWVERSION","NEWID","NEWSEQUENTIALID","ROWCOUNT_BIG","XACT_STATE","TEXTPTR","TEXTVALID","COLUMNS_UPDATED","EVENTDATA","TRIGGER_NESTLEVEL","UPDATE","CHANGETABLE","CHANGE_TRACKING_CONTEXT","CHANGE_TRACKING_CURRENT_VERSION","CHANGE_TRACKING_IS_COLUMN_IN_MASK","CHANGE_TRACKING_MIN_VALID_VERSION","CONTAINSTABLE","FREETEXTTABLE","SEMANTICKEYPHRASETABLE","SEMANTICSIMILARITYDETAILSTABLE","SEMANTICSIMILARITYTABLE","FILETABLEROOTPATH","GETFILENAMESPACEPATH","GETPATHLOCATOR","PATHNAME","GET_TRANSMISSION_STATUS"],builtinVariables:["@@DATEFIRST","@@DBTS","@@LANGID","@@LANGUAGE","@@LOCK_TIMEOUT","@@MAX_CONNECTIONS","@@MAX_PRECISION","@@NESTLEVEL","@@OPTIONS","@@REMSERVER","@@SERVERNAME","@@SERVICENAME","@@SPID","@@TEXTSIZE","@@VERSION","@@CURSOR_ROWS","@@FETCH_STATUS","@@DATEFIRST","@@PROCID","@@ERROR","@@IDENTITY","@@ROWCOUNT","@@TRANCOUNT","@@CONNECTIONS","@@CPU_BUSY","@@IDLE","@@IO_BUSY","@@PACKET_ERRORS","@@PACK_RECEIVED","@@PACK_SENT","@@TIMETICKS","@@TOTAL_ERRORS","@@TOTAL_READ","@@TOTAL_WRITE"],pseudoColumns:["$ACTION","$IDENTITY","$ROWGUID","$PARTITION"],tokenizer:{root:[{include:"@comments"},{include:"@whitespace"},{include:"@pseudoColumns"},{include:"@numbers"},{include:"@strings"},{include:"@complexIdentifiers"},{include:"@scopes"},[/[;,.]/,"delimiter"],[/[()]/,"@brackets"],[/[\w@#$]+/,{cases:{"@keywords":"keyword","@operators":"operator","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],[/[<>=!%&+\-*/|~^]/,"operator"]],whitespace:[[/\s+/,"white"]],comments:[[/--+.*/,"comment"],[/\/\*/,{token:"comment.quote",next:"@comment"}]],comment:[[/[^*/]+/,"comment"],[/\*\//,{token:"comment.quote",next:"@pop"}],[/./,"comment"]],pseudoColumns:[[/[$][A-Za-z_][\w@#$]*/,{cases:{"@pseudoColumns":"predefined","@default":"identifier"}}]],numbers:[[/0[xX][0-9a-fA-F]*/,"number"],[/[$][+-]*\d*(\.\d*)?/,"number"],[/((\d+(\.\d*)?)|(\.\d+))([eE][\-+]?\d+)?/,"number"]],strings:[[/N'/,{token:"string",next:"@string"}],[/'/,{token:"string",next:"@string"}]],string:[[/[^']+/,"string"],[/''/,"string"],[/'/,{token:"string",next:"@pop"}]],complexIdentifiers:[[/\[/,{token:"identifier.quote",next:"@bracketedIdentifier"}],[/"/,{token:"identifier.quote",next:"@quotedIdentifier"}]],bracketedIdentifier:[[/[^\]]+/,"identifier"],[/]]/,"identifier"],[/]/,{token:"identifier.quote",next:"@pop"}]],quotedIdentifier:[[/[^"]+/,"identifier"],[/""/,"identifier"],[/"/,{token:"identifier.quote",next:"@pop"}]],scopes:[[/BEGIN\s+(DISTRIBUTED\s+)?TRAN(SACTION)?\b/i,"keyword"],[/BEGIN\s+TRY\b/i,{token:"keyword.try"}],[/END\s+TRY\b/i,{token:"keyword.try"}],[/BEGIN\s+CATCH\b/i,{token:"keyword.catch"}],[/END\s+CATCH\b/i,{token:"keyword.catch"}],[/(BEGIN|CASE)\b/i,{token:"keyword.block"}],[/END\b/i,{token:"keyword.block"}],[/WHEN\b/i,{token:"keyword.choice"}],[/THEN\b/i,{token:"keyword.choice"}]]}},CSe=Object.freeze(Object.defineProperty({__proto__:null,conf:bSe,language:vSe},Symbol.toStringTag,{value:"Module"})),wSe={comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["var","end_var"],["var_input","end_var"],["var_output","end_var"],["var_in_out","end_var"],["var_temp","end_var"],["var_global","end_var"],["var_access","end_var"],["var_external","end_var"],["type","end_type"],["struct","end_struct"],["program","end_program"],["function","end_function"],["function_block","end_function_block"],["action","end_action"],["step","end_step"],["initial_step","end_step"],["transaction","end_transaction"],["configuration","end_configuration"],["tcp","end_tcp"],["recource","end_recource"],["channel","end_channel"],["library","end_library"],["folder","end_folder"],["binaries","end_binaries"],["includes","end_includes"],["sources","end_sources"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"/*",close:"*/"},{open:"'",close:"'",notIn:["string_sq"]},{open:'"',close:'"',notIn:["string_dq"]},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"var",close:"end_var"},{open:"var_input",close:"end_var"},{open:"var_output",close:"end_var"},{open:"var_in_out",close:"end_var"},{open:"var_temp",close:"end_var"},{open:"var_global",close:"end_var"},{open:"var_access",close:"end_var"},{open:"var_external",close:"end_var"},{open:"type",close:"end_type"},{open:"struct",close:"end_struct"},{open:"program",close:"end_program"},{open:"function",close:"end_function"},{open:"function_block",close:"end_function_block"},{open:"action",close:"end_action"},{open:"step",close:"end_step"},{open:"initial_step",close:"end_step"},{open:"transaction",close:"end_transaction"},{open:"configuration",close:"end_configuration"},{open:"tcp",close:"end_tcp"},{open:"recource",close:"end_recource"},{open:"channel",close:"end_channel"},{open:"library",close:"end_library"},{open:"folder",close:"end_folder"},{open:"binaries",close:"end_binaries"},{open:"includes",close:"end_includes"},{open:"sources",close:"end_sources"}],folding:{markers:{start:new RegExp("^\\s*#pragma\\s+region\\b"),end:new RegExp("^\\s*#pragma\\s+endregion\\b")}}},ySe={defaultToken:"",tokenPostfix:".st",ignoreCase:!0,brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["if","end_if","elsif","else","case","of","to","__try","__catch","__finally","do","with","by","while","repeat","end_while","end_repeat","end_case","for","end_for","task","retain","non_retain","constant","with","at","exit","return","interval","priority","address","port","on_channel","then","iec","file","uses","version","packagetype","displayname","copyright","summary","vendor","common_source","from","extends"],constant:["false","true","null"],defineKeywords:["var","var_input","var_output","var_in_out","var_temp","var_global","var_access","var_external","end_var","type","end_type","struct","end_struct","program","end_program","function","end_function","function_block","end_function_block","interface","end_interface","method","end_method","property","end_property","namespace","end_namespace","configuration","end_configuration","tcp","end_tcp","resource","end_resource","channel","end_channel","library","end_library","folder","end_folder","binaries","end_binaries","includes","end_includes","sources","end_sources","action","end_action","step","initial_step","end_step","transaction","end_transaction"],typeKeywords:["int","sint","dint","lint","usint","uint","udint","ulint","real","lreal","time","date","time_of_day","date_and_time","string","bool","byte","word","dword","array","pointer","lword"],operators:["=",">","<",":",":=","<=",">=","<>","&","+","-","*","**","MOD","^","or","and","not","xor","abs","acos","asin","atan","cos","exp","expt","ln","log","sin","sqrt","tan","sel","max","min","limit","mux","shl","shr","rol","ror","indexof","sizeof","adr","adrinst","bitadr","is_valid","ref","ref_to"],builtinVariables:[],builtinFunctions:["sr","rs","tp","ton","tof","eq","ge","le","lt","ne","round","trunc","ctd","\u0441tu","ctud","r_trig","f_trig","move","concat","delete","find","insert","left","len","replace","right","rtc"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/(\.\.)/,"delimiter"],[/\b(16#[0-9A-Fa-f\_]*)+\b/,"number.hex"],[/\b(2#[01\_]+)+\b/,"number.binary"],[/\b(8#[0-9\_]*)+\b/,"number.octal"],[/\b\d*\.\d+([eE][\-+]?\d+)?\b/,"number.float"],[/\b(L?REAL)#[0-9\_\.e]+\b/,"number.float"],[/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9\_]+\b/,"number"],[/\d+/,"number"],[/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/,"tag"],[/\%(I|Q|M)(X|B|W|D|L)[0-9\.]+/,"tag"],[/\%(I|Q|M)[0-9\.]*/,"tag"],[/\b[A-Za-z]{1,6}#[0-9]+\b/,"tag"],[/\b(TO_|CTU_|CTD_|CTUD_|MUX_|SEL_)[A_Za-z]+\b/,"predefined"],[/\b[A_Za-z]+(_TO_)[A_Za-z]+\b/,"predefined"],[/[;]/,"delimiter"],[/[.]/,{token:"delimiter",next:"@params"}],[/[a-zA-Z_]\w*/,{cases:{"@operators":"operators","@keywords":"keyword","@typeKeywords":"type","@defineKeywords":"variable","@constant":"constant","@builtinVariables":"predefined","@builtinFunctions":"predefined","@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,{token:"string.quote",bracket:"@open",next:"@string_dq"}],[/'/,{token:"string.quote",bracket:"@open",next:"@string_sq"}],[/'[^\\']'/,"string"],[/(')(@escapes)(')/,["string","string.escape","string"]],[/'/,"string.invalid"]],params:[[/\b[A-Za-z0-9_]+\b(?=\()/,{token:"identifier",next:"@pop"}],[/\b[A-Za-z0-9_]+\b/,"variable.name","@pop"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],comment2:[[/[^\(*]+/,"comment"],[/\(\*/,"comment","@push"],["\\*\\)","comment","@pop"],[/[\(*]/,"comment"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@comment"],[/\(\*/,"comment","@comment2"]],string_dq:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],string_sq:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]]}},SSe=Object.freeze(Object.defineProperty({__proto__:null,conf:wSe,language:ySe},Symbol.toStringTag,{value:"Module"}));/*!--------------------------------------------------------------------------------------------- + * Copyright (C) David Owens II, owensd.io. All rights reserved. + *--------------------------------------------------------------------------------------------*/var xSe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}]},ESe={defaultToken:"",tokenPostfix:".swift",identifier:/[a-zA-Z_][\w$]*/,attributes:["@autoclosure","@noescape","@noreturn","@NSApplicationMain","@NSCopying","@NSManaged","@objc","@UIApplicationMain","@noreturn","@availability","@IBAction","@IBDesignable","@IBInspectable","@IBOutlet"],accessmodifiers:["public","private","fileprivate","internal"],keywords:["__COLUMN__","__FILE__","__FUNCTION__","__LINE__","as","as!","as?","associativity","break","case","catch","class","continue","convenience","default","deinit","didSet","do","dynamic","dynamicType","else","enum","extension","fallthrough","fileprivate","final","for","func","get","guard","if","import","in","infix","init","inout","internal","is","lazy","left","let","mutating","nil","none","nonmutating","operator","optional","override","postfix","precedence","prefix","private","protocol","Protocol","public","repeat","required","return","right","self","Self","set","static","struct","subscript","super","switch","throw","throws","try","try!","Type","typealias","unowned","var","weak","where","while","willSet","FALSE","TRUE"],symbols:/[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,operatorstart:/[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/,operatorend:/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/,operators:/(@operatorstart)((@operatorstart)|(@operatorend))*/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},{include:"@attribute"},{include:"@literal"},{include:"@keyword"},{include:"@invokedmethod"},{include:"@symbol"}],whitespace:[[/\s+/,"white"],[/"""/,"string.quote","@endDblDocString"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string.quote","@popall"],[/"/,"string"]],symbol:[[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/[.]/,"delimiter"],[/@operators/,"operator"],[/@symbols/,"operator"]],comment:[[/\/\/\/.*$/,"comment.doc"],[/\/\*\*/,"comment.doc","@commentdocbody"],[/\/\/.*$/,"comment"],[/\/\*/,"comment","@commentbody"]],commentdocbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment.doc","@pop"],[/\:[a-zA-Z]+\:/,"comment.doc.param"],[/./,"comment.doc"]],commentbody:[[/\/\*/,"comment","@commentbody"],[/\*\//,"comment","@pop"],[/./,"comment"]],attribute:[[/@@@identifier/,{cases:{"@attributes":"keyword.control","@default":""}}]],literal:[[/"/,{token:"string.quote",next:"@stringlit"}],[/0[b]([01]_?)+/,"number.binary"],[/0[o]([0-7]_?)+/,"number.octal"],[/0[x]([0-9a-fA-F]_?)+([pP][\-+](\d_?)+)?/,"number.hex"],[/(\d_?)*\.(\d_?)+([eE][\-+]?(\d_?)+)?/,"number.float"],[/(\d_?)+/,"number"]],stringlit:[[/\\\(/,{token:"operator",next:"@interpolatedexpression"}],[/@escapes/,"string"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",next:"@pop"}],[/./,"string"]],interpolatedexpression:[[/\(/,{token:"operator",next:"@interpolatedexpression"}],[/\)/,{token:"operator",next:"@pop"}],{include:"@literal"},{include:"@keyword"},{include:"@symbol"}],keyword:[[/`/,{token:"operator",next:"@escapedkeyword"}],[/@identifier/,{cases:{"@keywords":"keyword","[A-Z][a-zA-Z0-9$]*":"type.identifier","@default":"identifier"}}]],escapedkeyword:[[/`/,{token:"operator",next:"@pop"}],[/./,"identifier"]],invokedmethod:[[/([.])(@identifier)/,{cases:{$2:["delimeter","type.identifier"],"@default":""}}]]}},kSe=Object.freeze(Object.defineProperty({__proto__:null,conf:xSe,language:ESe},Symbol.toStringTag,{value:"Module"})),LSe={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["begin","end"],["case","endcase"],["casex","endcase"],["casez","endcase"],["checker","endchecker"],["class","endclass"],["clocking","endclocking"],["config","endconfig"],["function","endfunction"],["generate","endgenerate"],["group","endgroup"],["interface","endinterface"],["module","endmodule"],["package","endpackage"],["primitive","endprimitive"],["program","endprogram"],["property","endproperty"],["specify","endspecify"],["sequence","endsequence"],["table","endtable"],["task","endtask"]],autoClosingPairs:[{open:"[",close:"]"},{open:"{",close:"}"},{open:"(",close:")"},{open:"'",close:"'",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!1,markers:{start:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:begin|case(x|z)?|class|clocking|config|covergroup|function|generate|interface|module|package|primitive|property|program|sequence|specify|table|task)\\b"),end:new RegExp("^(?:\\s*|.*(?!\\/[\\/\\*])[^\\w])(?:end|endcase|endclass|endclocking|endconfig|endgroup|endfunction|endgenerate|endinterface|endmodule|endpackage|endprimitive|endproperty|endprogram|endsequence|endspecify|endtable|endtask)\\b")}}},TSe={defaultToken:"",tokenPostfix:".sv",brackets:[{token:"delimiter.curly",open:"{",close:"}"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.square",open:"[",close:"]"},{token:"delimiter.angle",open:"<",close:">"}],keywords:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate","genvar","global","highz0","highz1","if","iff","ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","null","or","output","package","packed","parameter","pmos","posedge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","xor"],builtin_gates:["and","nand","nor","or","xor","xnor","buf","not","bufif0","bufif1","notif1","notif0","cmos","nmos","pmos","rcmos","rnmos","rpmos","tran","tranif1","tranif0","rtran","rtranif1","rtranif0"],operators:["=","+=","-=","*=","/=","%=","&=","|=","^=","<<=",">>+","<<<=",">>>=","?",":","+","-","!","~","&","~&","|","~|","^","~^","^~","+","-","*","/","%","==","!=","===","!==","==?","!=?","&&","||","**","<","<=",">",">=","&","|","^",">>","<<",">>>","<<<","++","--","->","<->","inside","dist","::","+:","-:","*>","&&&","|->","|=>","#=#"],symbols:/[=><!~?:&|+\-*\/\^%#]+/,escapes:/%%|\\(?:[antvf\\"']|x[0-9A-Fa-f]{1,2}|[0-7]{1,3})/,identifier:/(?:[a-zA-Z_][a-zA-Z0-9_$\.]*|\\\S+ )/,systemcall:/[$][a-zA-Z0-9_]+/,timeunits:/s|ms|us|ns|ps|fs/,tokenizer:{root:[[/^(\s*)(@identifier)/,["",{cases:{"@builtin_gates":{token:"keyword.$2",next:"@module_instance"},table:{token:"keyword.$2",next:"@table"},"@keywords":{token:"keyword.$2"},"@default":{token:"identifier",next:"@module_instance"}}}]],[/^\s*`include/,{token:"keyword.directive.include",next:"@include"}],[/^\s*`\s*\w+/,"keyword"],{include:"@identifier_or_keyword"},{include:"@whitespace"},[/\(\*.*\*\)/,"annotation"],[/@systemcall/,"variable.predefined"],[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],{include:"@numbers"},[/[;,.]/,"delimiter"],{include:"@strings"}],identifier_or_keyword:[[/@identifier/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}]],numbers:[[/\d+?[\d_]*(?:\.[\d_]+)?[eE][\-+]?\d+/,"number.float"],[/\d+?[\d_]*\.[\d_]+(?:\s*@timeunits)?/,"number.float"],[/(?:\d+?[\d_]*\s*)?'[sS]?[dD]\s*[0-9xXzZ?]+?[0-9xXzZ?_]*/,"number"],[/(?:\d+?[\d_]*\s*)?'[sS]?[bB]\s*[0-1xXzZ?]+?[0-1xXzZ?_]*/,"number.binary"],[/(?:\d+?[\d_]*\s*)?'[sS]?[oO]\s*[0-7xXzZ?]+?[0-7xXzZ?_]*/,"number.octal"],[/(?:\d+?[\d_]*\s*)?'[sS]?[hH]\s*[0-9a-fA-FxXzZ?]+?[0-9a-fA-FxXzZ?_]*/,"number.hex"],[/1step/,"number"],[/[\dxXzZ]+?[\dxXzZ_]*(?:\s*@timeunits)?/,"number"],[/'[01xXzZ]+/,"number"]],module_instance:[{include:"@whitespace"},[/(#?)(\()/,["",{token:"@brackets",next:"@port_connection"}]],[/@identifier\s*[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@symbols|[;={}\[\],]/,{token:"@rematch",next:"@pop"}],[/@identifier/,"type"],[/;/,"delimiter","@pop"]],port_connection:[{include:"@identifier_or_keyword"},{include:"@whitespace"},[/@systemcall/,"variable.predefined"],{include:"@numbers"},{include:"@strings"},[/[,]/,"delimiter"],[/\(/,"@brackets","@port_connection"],[/\)/,"@brackets","@pop"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],strings:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string"]],string:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],include:[[/(\s*)(")([\w*\/*]*)(.\w*)(")/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]],[/(\s*)(<)([\w*\/*]*)(.\w*)(>)/,["","string.include.identifier","string.include.identifier","string.include.identifier",{token:"string.include.identifier",next:"@pop"}]]],table:[{include:"@whitespace"},[/[()]/,"@brackets"],[/[:;]/,"delimiter"],[/[01\-*?xXbBrRfFpPnN]/,"variable.predefined"],["endtable","keyword.endtable","@pop"]]}},IH=Object.freeze(Object.defineProperty({__proto__:null,conf:LSe,language:TSe},Symbol.toStringTag,{value:"Module"})),ISe={brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},DSe={tokenPostfix:".tcl",specialFunctions:["set","unset","rename","variable","proc","coroutine","foreach","incr","append","lappend","linsert","lreplace"],mainFunctions:["if","then","elseif","else","case","switch","while","for","break","continue","return","package","namespace","catch","exit","eval","expr","uplevel","upvar"],builtinFunctions:["file","info","concat","join","lindex","list","llength","lrange","lsearch","lsort","split","array","parray","binary","format","regexp","regsub","scan","string","subst","dict","cd","clock","exec","glob","pid","pwd","close","eof","fblocked","fconfigure","fcopy","fileevent","flush","gets","open","puts","read","seek","socket","tell","interp","after","auto_execok","auto_load","auto_mkindex","auto_reset","bgerror","error","global","history","load","source","time","trace","unknown","unset","update","vwait","winfo","wm","bind","event","pack","place","grid","font","bell","clipboard","destroy","focus","grab","lower","option","raise","selection","send","tk","tkwait","tk_bisque","tk_focusNext","tk_focusPrev","tk_focusFollowsMouse","tk_popup","tk_setPalette"],symbols:/[=><!~?:&|+\-*\/\^%]+/,brackets:[{open:"(",close:")",token:"delimiter.parenthesis"},{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"}],escapes:/\\(?:[abfnrtv\\"'\[\]\{\};\$]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,variables:/(?:\$+(?:(?:\:\:?)?[a-zA-Z_]\w*)+)/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@specialFunctions":{token:"keyword.flow",next:"@specialFunc"},"@mainFunctions":"keyword","@builtinFunctions":"variable","@default":"operator.scss"}}],[/\s+\-+(?!\d|\.)\w*|{\*}/,"metatag"],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/@symbols/,"operator"],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/\.(?!\d|\.)[\w\-]*/,"operator.sql"],[/\d+(\.\d+)?/,"number"],[/\d+/,"number"],[/;/,"delimiter"],[/"/,{token:"string.quote",bracket:"@open",next:"@dstring"}],[/'/,{token:"string.quote",bracket:"@open",next:"@sstring"}]],dstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]"]+/,"string"],[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",next:"@pop"}]],sstring:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\$+(?:\:\:)?\{/,{token:"identifier",next:"@nestedVariable"}],[/@variables/,"type.identifier"],[/[^\\$\[\]']+/,"string"],[/@escapes/,"string.escape"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/#.*\\$/,{token:"comment",next:"@newlineComment"}],[/#.*(?!\\)$/,"comment"]],newlineComment:[[/.*\\$/,"comment"],[/.*(?!\\)$/,{token:"comment",next:"@pop"}]],nestedVariable:[[/[^\{\}\$]+/,"type.identifier"],[/\}/,{token:"identifier",next:"@pop"}]],nestedCall:[[/\[/,{token:"@brackets",next:"@nestedCall"}],[/\]/,{token:"@brackets",next:"@pop"}],{include:"root"}],specialFunc:[[/"/,{token:"string",next:"@dstring"}],[/'/,{token:"string",next:"@sstring"}],[/\S+/,{token:"type",next:"@pop"}]]}},ASe=Object.freeze(Object.defineProperty({__proto__:null,conf:ISe,language:DSe},Symbol.toStringTag,{value:"Module"})),NSe={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\$\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\s]+)/g,comments:{blockComment:["{#","#}"]},brackets:[["{#","#}"],["{%","%}"],["{{","}}"],["(",")"],["[","]"],["<!--","-->"],["<",">"]],autoClosingPairs:[{open:"{# ",close:" #}"},{open:"{% ",close:" %}"},{open:"{{ ",close:" }}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:'"',close:'"'},{open:"'",close:"'"},{open:"<",close:">"}]},RSe={defaultToken:"",tokenPostfix:"",ignoreCase:!0,keywords:["apply","autoescape","block","deprecated","do","embed","extends","flush","for","from","if","import","include","macro","sandbox","set","use","verbatim","with","endapply","endautoescape","endblock","endembed","endfor","endif","endmacro","endsandbox","endset","endwith","true","false"],tokenizer:{root:[[/\s+/],[/{#/,"comment.twig","@commentState"],[/{%[-~]?/,"delimiter.twig","@blockState"],[/{{[-~]?/,"delimiter.twig","@variableState"],[/<!DOCTYPE/,"metatag.html","@doctype"],[/<!--/,"comment.html","@comment"],[/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/,["delimiter.html","tag.html","","delimiter.html"]],[/(<)(script)/,["delimiter.html",{token:"tag.html",next:"@script"}]],[/(<)(style)/,["delimiter.html",{token:"tag.html",next:"@style"}]],[/(<)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/(<\/)((?:[\w\-]+:)?[\w\-]+)/,["delimiter.html",{token:"tag.html",next:"@otherTag"}]],[/</,"delimiter.html"],[/[^<]+/]],commentState:[[/#}/,"comment.twig","@pop"],[/./,"comment.twig"]],blockState:[[/[-~]?%}/,"delimiter.twig","@pop"],[/\s+/],[/(verbatim)(\s*)([-~]?%})/,["keyword.twig","",{token:"delimiter.twig",next:"@rawDataState"}]],{include:"expression"}],rawDataState:[[/({%[-~]?)(\s*)(endverbatim)(\s*)([-~]?%})/,["delimiter.twig","","keyword.twig","",{token:"delimiter.twig",next:"@popall"}]],[/./,"string.twig"]],variableState:[[/[-~]?}}/,"delimiter.twig","@pop"],{include:"expression"}],stringState:[[/"/,"string.twig","@pop"],[/#{\s*/,"string.twig","@interpolationState"],[/[^#"\\]*(?:(?:\\.|#(?!\{))[^#"\\]*)*/,"string.twig"]],interpolationState:[[/}/,"string.twig","@pop"],{include:"expression"}],expression:[[/\s+/],[/\+|-|\/{1,2}|%|\*{1,2}/,"operators.twig"],[/(and|or|not|b-and|b-xor|b-or)(\s+)/,["operators.twig",""]],[/==|!=|<|>|>=|<=/,"operators.twig"],[/(starts with|ends with|matches)(\s+)/,["operators.twig",""]],[/(in)(\s+)/,["operators.twig",""]],[/(is)(\s+)/,["operators.twig",""]],[/\||~|:|\.{1,2}|\?{1,2}/,"operators.twig"],[/[^\W\d][\w]*/,{cases:{"@keywords":"keyword.twig","@default":"variable.twig"}}],[/\d+(\.\d+)?/,"number.twig"],[/\(|\)|\[|\]|{|}|,/,"delimiter.twig"],[/"([^#"\\]*(?:\\.[^#"\\]*)*)"|\'([^\'\\]*(?:\\.[^\'\\]*)*)\'/,"string.twig"],[/"/,"string.twig","@stringState"],[/=>/,"operators.twig"],[/=/,"operators.twig"]],doctype:[[/[^>]+/,"metatag.content.html"],[/>/,"metatag.html","@pop"]],comment:[[/-->/,"comment.html","@pop"],[/[^-]+/,"comment.content.html"],[/./,"comment.content.html"]],otherTag:[[/\/?>/,"delimiter.html","@pop"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/]],script:[[/type/,"attribute.name.html","@scriptAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/(<\/)(script\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],scriptAfterType:[[/=/,"delimiter.html","@scriptAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@scriptWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@scriptEmbedded",nextEmbedded:"text/javascript"}],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptWithCustomType:[[/>/,{token:"delimiter.html",next:"@scriptEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/script\s*>/,{token:"@rematch",next:"@pop"}]],scriptEmbedded:[[/<\/script/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]],style:[[/type/,"attribute.name.html","@styleAfterType"],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/(<\/)(style\s*)(>)/,["delimiter.html","tag.html",{token:"delimiter.html",next:"@pop"}]]],styleAfterType:[[/=/,"delimiter.html","@styleAfterTypeEquals"],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleAfterTypeEquals:[[/"([^"]*)"/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/'([^']*)'/,{token:"attribute.value.html",switchTo:"@styleWithCustomType.$1"}],[/>/,{token:"delimiter.html",next:"@styleEmbedded",nextEmbedded:"text/css"}],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleWithCustomType:[[/>/,{token:"delimiter.html",next:"@styleEmbedded.$S2",nextEmbedded:"$S2"}],[/"([^"]*)"/,"attribute.value.html"],[/'([^']*)'/,"attribute.value.html"],[/[\w\-]+/,"attribute.name.html"],[/=/,"delimiter.html"],[/[ \t\r\n]+/],[/<\/style\s*>/,{token:"@rematch",next:"@pop"}]],styleEmbedded:[[/<\/style/,{token:"@rematch",next:"@pop",nextEmbedded:"@pop"}],[/[^<]+/,""]]}},OSe=Object.freeze(Object.defineProperty({__proto__:null,conf:NSe,language:RSe},Symbol.toStringTag,{value:"Module"})),MSe={comments:{lineComment:"'",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"],["addhandler","end addhandler"],["class","end class"],["enum","end enum"],["event","end event"],["function","end function"],["get","end get"],["if","end if"],["interface","end interface"],["module","end module"],["namespace","end namespace"],["operator","end operator"],["property","end property"],["raiseevent","end raiseevent"],["removehandler","end removehandler"],["select","end select"],["set","end set"],["structure","end structure"],["sub","end sub"],["synclock","end synclock"],["try","end try"],["while","end while"],["with","end with"],["using","end using"],["do","loop"],["for","next"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"<",close:">",notIn:["string","comment"]}],folding:{markers:{start:new RegExp("^\\s*#Region\\b"),end:new RegExp("^\\s*#End Region\\b")}}},PSe={defaultToken:"",tokenPostfix:".vb",ignoreCase:!0,brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"},{token:"delimiter.angle",open:"<",close:">"},{token:"keyword.tag-addhandler",open:"addhandler",close:"end addhandler"},{token:"keyword.tag-class",open:"class",close:"end class"},{token:"keyword.tag-enum",open:"enum",close:"end enum"},{token:"keyword.tag-event",open:"event",close:"end event"},{token:"keyword.tag-function",open:"function",close:"end function"},{token:"keyword.tag-get",open:"get",close:"end get"},{token:"keyword.tag-if",open:"if",close:"end if"},{token:"keyword.tag-interface",open:"interface",close:"end interface"},{token:"keyword.tag-module",open:"module",close:"end module"},{token:"keyword.tag-namespace",open:"namespace",close:"end namespace"},{token:"keyword.tag-operator",open:"operator",close:"end operator"},{token:"keyword.tag-property",open:"property",close:"end property"},{token:"keyword.tag-raiseevent",open:"raiseevent",close:"end raiseevent"},{token:"keyword.tag-removehandler",open:"removehandler",close:"end removehandler"},{token:"keyword.tag-select",open:"select",close:"end select"},{token:"keyword.tag-set",open:"set",close:"end set"},{token:"keyword.tag-structure",open:"structure",close:"end structure"},{token:"keyword.tag-sub",open:"sub",close:"end sub"},{token:"keyword.tag-synclock",open:"synclock",close:"end synclock"},{token:"keyword.tag-try",open:"try",close:"end try"},{token:"keyword.tag-while",open:"while",close:"end while"},{token:"keyword.tag-with",open:"with",close:"end with"},{token:"keyword.tag-using",open:"using",close:"end using"},{token:"keyword.tag-do",open:"do",close:"loop"},{token:"keyword.tag-for",open:"for",close:"next"}],keywords:["AddHandler","AddressOf","Alias","And","AndAlso","As","Async","Boolean","ByRef","Byte","ByVal","Call","Case","Catch","CBool","CByte","CChar","CDate","CDbl","CDec","Char","CInt","Class","CLng","CObj","Const","Continue","CSByte","CShort","CSng","CStr","CType","CUInt","CULng","CUShort","Date","Decimal","Declare","Default","Delegate","Dim","DirectCast","Do","Double","Each","Else","ElseIf","End","EndIf","Enum","Erase","Error","Event","Exit","False","Finally","For","Friend","Function","Get","GetType","GetXMLNamespace","Global","GoSub","GoTo","Handles","If","Implements","Imports","In","Inherits","Integer","Interface","Is","IsNot","Let","Lib","Like","Long","Loop","Me","Mod","Module","MustInherit","MustOverride","MyBase","MyClass","NameOf","Namespace","Narrowing","New","Next","Not","Nothing","NotInheritable","NotOverridable","Object","Of","On","Operator","Option","Optional","Or","OrElse","Out","Overloads","Overridable","Overrides","ParamArray","Partial","Private","Property","Protected","Public","RaiseEvent","ReadOnly","ReDim","RemoveHandler","Resume","Return","SByte","Select","Set","Shadows","Shared","Short","Single","Static","Step","Stop","String","Structure","Sub","SyncLock","Then","Throw","To","True","Try","TryCast","TypeOf","UInteger","ULong","UShort","Using","Variant","Wend","When","While","Widening","With","WithEvents","WriteOnly","Xor"],tagwords:["If","Sub","Select","Try","Class","Enum","Function","Get","Interface","Module","Namespace","Operator","Set","Structure","Using","While","With","Do","Loop","For","Next","Property","Continue","AddHandler","RemoveHandler","Event","RaiseEvent","SyncLock"],symbols:/[=><!~?;\.,:&|+\-*\/\^%]+/,integersuffix:/U?[DI%L&S@]?/,floatsuffix:/[R#F!]?/,tokenizer:{root:[{include:"@whitespace"},[/next(?!\w)/,{token:"keyword.tag-for"}],[/loop(?!\w)/,{token:"keyword.tag-do"}],[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/,{token:"keyword.tag-$1"}],[/[a-zA-Z_]\w*/,{cases:{"@tagwords":{token:"keyword.tag-$0"},"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],[/^\s*#\w+/,"keyword"],[/\d*\d+e([\-+]?\d+)?(@floatsuffix)/,"number.float"],[/\d*\.\d+(e[\-+]?\d+)?(@floatsuffix)/,"number.float"],[/&H[0-9a-f]+(@integersuffix)/,"number.hex"],[/&0[0-7]+(@integersuffix)/,"number.octal"],[/\d+(@integersuffix)/,"number"],[/#.*#/,"number"],[/[{}()\[\]]/,"@brackets"],[/@symbols/,"delimiter"],[/["\u201c\u201d]/,{token:"string.quote",next:"@string"}]],whitespace:[[/[ \t\r\n]+/,""],[/(\'|REM(?!\w)).*$/,"comment"]],string:[[/[^"\u201c\u201d]+/,"string"],[/["\u201c\u201d]{2}/,"string.escape"],[/["\u201c\u201d]C?/,{token:"string.quote",next:"@pop"}]]}},FSe=Object.freeze(Object.defineProperty({__proto__:null,conf:MSe,language:PSe},Symbol.toStringTag,{value:"Module"})),BSe={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:we.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:we.IndentAction.Indent}}]},WSe={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}},VSe=Object.freeze(Object.defineProperty({__proto__:null,conf:BSe,language:WSe},Symbol.toStringTag,{value:"Module"})),HSe={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0}},$Se={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|.*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/[^#]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}},USe=Object.freeze(Object.defineProperty({__proto__:null,conf:HSe,language:$Se},Symbol.toStringTag,{value:"Module"}));export{lt as C,Loe as K,Qs as M,Ku as R,Qt as T,Cxe as W,we as a,wxe as b,vxe as c,koe as d,Ui as e,me as f,zn as g,jSe as l,bxe as m,x8 as t}; diff --git a/magic-editor/src/main/resources/magic-editor/assets/vendor.95bdc8f2.js b/magic-editor/src/main/resources/magic-editor/assets/vendor.95bdc8f2.js deleted file mode 100644 index 16121f9e..00000000 --- a/magic-editor/src/main/resources/magic-editor/assets/vendor.95bdc8f2.js +++ /dev/null @@ -1,829 +0,0 @@ -import{g as KH}from"./axios.23e7b955.js";var qH=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),i=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(i)!=="[object Symbol]")return!1;var n=42;e[t]=n;for(t in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var s=Object.getOwnPropertySymbols(e);if(s.length!==1||s[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var o=Object.getOwnPropertyDescriptor(e,t);if(o.value!==n||o.enumerable!==!0)return!1}return!0},WR=typeof Symbol!="undefined"&&Symbol,GH=qH,ZH=function(){return typeof WR!="function"||typeof Symbol!="function"||typeof WR("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:GH()},YH="Function.prototype.bind called on incompatible ",Y1=Array.prototype.slice,XH=Object.prototype.toString,QH="[object Function]",JH=function(e){var t=this;if(typeof t!="function"||XH.call(t)!==QH)throw new TypeError(YH+t);for(var i=Y1.call(arguments,1),n,s=function(){if(this instanceof n){var h=t.apply(this,i.concat(Y1.call(arguments)));return Object(h)===h?h:this}else return t.apply(e,i.concat(Y1.call(arguments)))},o=Math.max(0,t.length-i.length),a=[],l=0;l<o;l++)a.push("$"+l);if(n=Function("binder","return function ("+a.join(",")+"){ return binder.apply(this,arguments); }")(s),t.prototype){var c=function(){};c.prototype=t.prototype,n.prototype=new c,c.prototype=null}return n},ez=JH,X1=Function.prototype.bind||ez,tz=X1,iz=tz.call(Function.call,Object.prototype.hasOwnProperty),Rt,Qg=SyntaxError,VR=Function,md=TypeError,Q1=function(r){try{return VR('"use strict"; return ('+r+").constructor;")()}catch{}},oh=Object.getOwnPropertyDescriptor;if(oh)try{oh({},"")}catch{oh=null}var J1=function(){throw new md},nz=oh?function(){try{return arguments.callee,J1}catch{try{return oh(arguments,"callee").get}catch{return J1}}}():J1,_d=ZH(),Tl=Object.getPrototypeOf||function(r){return r.__proto__},bd={},rz=typeof Uint8Array=="undefined"?Rt:Tl(Uint8Array),vd={"%AggregateError%":typeof AggregateError=="undefined"?Rt:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Rt:ArrayBuffer,"%ArrayIteratorPrototype%":_d?Tl([][Symbol.iterator]()):Rt,"%AsyncFromSyncIteratorPrototype%":Rt,"%AsyncFunction%":bd,"%AsyncGenerator%":bd,"%AsyncGeneratorFunction%":bd,"%AsyncIteratorPrototype%":bd,"%Atomics%":typeof Atomics=="undefined"?Rt:Atomics,"%BigInt%":typeof BigInt=="undefined"?Rt:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Rt:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array=="undefined"?Rt:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Rt:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Rt:FinalizationRegistry,"%Function%":VR,"%GeneratorFunction%":bd,"%Int8Array%":typeof Int8Array=="undefined"?Rt:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Rt:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Rt:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_d?Tl(Tl([][Symbol.iterator]())):Rt,"%JSON%":typeof JSON=="object"?JSON:Rt,"%Map%":typeof Map=="undefined"?Rt:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!_d?Rt:Tl(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Rt:Promise,"%Proxy%":typeof Proxy=="undefined"?Rt:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect=="undefined"?Rt:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Rt:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!_d?Rt:Tl(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Rt:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_d?Tl(""[Symbol.iterator]()):Rt,"%Symbol%":_d?Symbol:Rt,"%SyntaxError%":Qg,"%ThrowTypeError%":nz,"%TypedArray%":rz,"%TypeError%":md,"%Uint8Array%":typeof Uint8Array=="undefined"?Rt:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Rt:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Rt:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Rt:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap=="undefined"?Rt:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Rt:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Rt:WeakSet},sz=function r(e){var t;if(e==="%AsyncFunction%")t=Q1("async function () {}");else if(e==="%GeneratorFunction%")t=Q1("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=Q1("async function* () {}");else if(e==="%AsyncGenerator%"){var i=r("%AsyncGeneratorFunction%");i&&(t=i.prototype)}else if(e==="%AsyncIteratorPrototype%"){var n=r("%AsyncGenerator%");n&&(t=Tl(n.prototype))}return vd[e]=t,t},HR={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Pb=X1,Ob=iz,oz=Pb.call(Function.call,Array.prototype.concat),az=Pb.call(Function.apply,Array.prototype.splice),zR=Pb.call(Function.call,String.prototype.replace),Fb=Pb.call(Function.call,String.prototype.slice),lz=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,cz=/\\(\\)?/g,hz=function(e){var t=Fb(e,0,1),i=Fb(e,-1);if(t==="%"&&i!=="%")throw new Qg("invalid intrinsic syntax, expected closing `%`");if(i==="%"&&t!=="%")throw new Qg("invalid intrinsic syntax, expected opening `%`");var n=[];return zR(e,lz,function(s,o,a,l){n[n.length]=a?zR(l,cz,"$1"):o||s}),n},uz=function(e,t){var i=e,n;if(Ob(HR,i)&&(n=HR[i],i="%"+n[0]+"%"),Ob(vd,i)){var s=vd[i];if(s===bd&&(s=sz(i)),typeof s=="undefined"&&!t)throw new md("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:s}}throw new Qg("intrinsic "+e+" does not exist!")},eS=function(e,t){if(typeof e!="string"||e.length===0)throw new md("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new md('"allowMissing" argument must be a boolean');var i=hz(e),n=i.length>0?i[0]:"",s=uz("%"+n+"%",t),o=s.name,a=s.value,l=!1,c=s.alias;c&&(n=c[0],az(i,oz([0,1],c)));for(var h=1,u=!0;h<i.length;h+=1){var d=i[h],f=Fb(d,0,1),g=Fb(d,-1);if((f==='"'||f==="'"||f==="`"||g==='"'||g==="'"||g==="`")&&f!==g)throw new Qg("property names with quotes must have matching quotes");if((d==="constructor"||!u)&&(l=!0),n+="."+d,o="%"+n+"%",Ob(vd,o))a=vd[o];else if(a!=null){if(!(d in a)){if(!t)throw new md("base intrinsic for "+e+" exists, but the property is not available.");return}if(oh&&h+1>=i.length){var p=oh(a,d);u=!!p,u&&"get"in p&&!("originalValue"in p.get)?a=p.get:a=a[d]}else u=Ob(a,d),a=a[d];u&&!l&&(vd[o]=a)}}return a},$R={exports:{}};(function(r){var e=X1,t=eS,i=t("%Function.prototype.apply%"),n=t("%Function.prototype.call%"),s=t("%Reflect.apply%",!0)||e.call(n,i),o=t("%Object.getOwnPropertyDescriptor%",!0),a=t("%Object.defineProperty%",!0),l=t("%Math.max%");if(a)try{a({},"a",{value:1})}catch{a=null}r.exports=function(u){var d=s(e,n,arguments);if(o&&a){var f=o(d,"length");f.configurable&&a(d,"length",{value:1+l(0,u.length-(arguments.length-1))})}return d};var c=function(){return s(e,i,arguments)};a?a(r.exports,"apply",{value:c}):r.exports.apply=c})($R);var UR=eS,jR=$R.exports,dz=jR(UR("String.prototype.indexOf")),fz=function(e,t){var i=UR(e,!!t);return typeof i=="function"&&dz(e,".prototype.")>-1?jR(i):i},gz={},pz=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",default:gz}),mz=KH(pz),tS=typeof Map=="function"&&Map.prototype,iS=Object.getOwnPropertyDescriptor&&tS?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,Bb=tS&&iS&&typeof iS.get=="function"?iS.get:null,_z=tS&&Map.prototype.forEach,nS=typeof Set=="function"&&Set.prototype,rS=Object.getOwnPropertyDescriptor&&nS?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,Wb=nS&&rS&&typeof rS.get=="function"?rS.get:null,bz=nS&&Set.prototype.forEach,vz=typeof WeakMap=="function"&&WeakMap.prototype,Jg=vz?WeakMap.prototype.has:null,Cz=typeof WeakSet=="function"&&WeakSet.prototype,ep=Cz?WeakSet.prototype.has:null,wz=typeof WeakRef=="function"&&WeakRef.prototype,KR=wz?WeakRef.prototype.deref:null,yz=Boolean.prototype.valueOf,Sz=Object.prototype.toString,Lz=Function.prototype.toString,xz=String.prototype.match,sS=String.prototype.slice,Al=String.prototype.replace,kz=String.prototype.toUpperCase,qR=String.prototype.toLowerCase,GR=RegExp.prototype.test,ZR=Array.prototype.concat,Eo=Array.prototype.join,Dz=Array.prototype.slice,YR=Math.floor,oS=typeof BigInt=="function"?BigInt.prototype.valueOf:null,aS=Object.getOwnPropertySymbols,lS=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="object",Gn=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===Cd?"object":"symbol")?Symbol.toStringTag:null,XR=Object.prototype.propertyIsEnumerable,QR=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function JR(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||GR.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var i=r<0?-YR(-r):YR(r);if(i!==r){var n=String(i),s=sS.call(e,n.length+1);return Al.call(n,t,"$&_")+"."+Al.call(Al.call(s,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Al.call(e,t,"$&_")}var cS=mz.custom,hS=cS&&tM(cS)?cS:null,Ez=function r(e,t,i,n){var s=t||{};if(Rl(s,"quoteStyle")&&s.quoteStyle!=="single"&&s.quoteStyle!=="double")throw new TypeError('option "quoteStyle" must be "single" or "double"');if(Rl(s,"maxStringLength")&&(typeof s.maxStringLength=="number"?s.maxStringLength<0&&s.maxStringLength!==1/0:s.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var o=Rl(s,"customInspect")?s.customInspect:!0;if(typeof o!="boolean"&&o!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(Rl(s,"indent")&&s.indent!==null&&s.indent!==" "&&!(parseInt(s.indent,10)===s.indent&&s.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(Rl(s,"numericSeparator")&&typeof s.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var a=s.numericSeparator;if(typeof e=="undefined")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return nM(e,s);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var l=String(e);return a?JR(e,l):l}if(typeof e=="bigint"){var c=String(e)+"n";return a?JR(e,c):c}var h=typeof s.depth=="undefined"?5:s.depth;if(typeof i=="undefined"&&(i=0),i>=h&&h>0&&typeof e=="object")return uS(e)?"[Array]":"[Object]";var u=qz(s,i);if(typeof n=="undefined")n=[];else if(iM(n,e)>=0)return"[Circular]";function d(j,re,te){if(re&&(n=Dz.call(n),n.push(re)),te){var A={depth:s.depth};return Rl(s,"quoteStyle")&&(A.quoteStyle=s.quoteStyle),r(j,A,i+1,n)}return r(j,s,i+1,n)}if(typeof e=="function"){var f=Bz(e),g=Vb(e,d);return"[Function"+(f?": "+f:" (anonymous)")+"]"+(g.length>0?" { "+Eo.call(g,", ")+" }":"")}if(tM(e)){var p=Cd?Al.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):lS.call(e);return typeof e=="object"&&!Cd?tp(p):p}if(Uz(e)){for(var _="<"+qR.call(String(e.nodeName)),v=e.attributes||[],b=0;b<v.length;b++)_+=" "+v[b].name+"="+eM(Iz(v[b].value),"double",s);return _+=">",e.childNodes&&e.childNodes.length&&(_+="..."),_+="</"+qR.call(String(e.nodeName))+">",_}if(uS(e)){if(e.length===0)return"[]";var C=Vb(e,d);return u&&!Kz(C)?"["+fS(C,u)+"]":"[ "+Eo.call(C,", ")+" ]"}if(Az(e)){var y=Vb(e,d);return"cause"in e&&!XR.call(e,"cause")?"{ ["+String(e)+"] "+Eo.call(ZR.call("[cause]: "+d(e.cause),y),", ")+" }":y.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+Eo.call(y,", ")+" }"}if(typeof e=="object"&&o){if(hS&&typeof e[hS]=="function")return e[hS]();if(o!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(Wz(e)){var x=[];return _z.call(e,function(j,re){x.push(d(re,e,!0)+" => "+d(j,e))}),rM("Map",Bb.call(e),x,u)}if(zz(e)){var S=[];return bz.call(e,function(j){S.push(d(j,e))}),rM("Set",Wb.call(e),S,u)}if(Vz(e))return dS("WeakMap");if($z(e))return dS("WeakSet");if(Hz(e))return dS("WeakRef");if(Mz(e))return tp(d(Number(e)));if(Oz(e))return tp(d(oS.call(e)));if(Pz(e))return tp(yz.call(e));if(Rz(e))return tp(d(String(e)));if(!Nz(e)&&!Tz(e)){var w=Vb(e,d),L=QR?QR(e)===Object.prototype:e instanceof Object||e.constructor===Object,N=e instanceof Object?"":"null prototype",P=!L&&Gn&&Object(e)===e&&Gn in e?sS.call(Ml(e),8,-1):N?"Object":"",B=L||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",U=B+(P||N?"["+Eo.call(ZR.call([],P||[],N||[]),": ")+"] ":"");return w.length===0?U+"{}":u?U+"{"+fS(w,u)+"}":U+"{ "+Eo.call(w,", ")+" }"}return String(e)};function eM(r,e,t){var i=(t.quoteStyle||e)==="double"?'"':"'";return i+r+i}function Iz(r){return Al.call(String(r),/"/g,""")}function uS(r){return Ml(r)==="[object Array]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Nz(r){return Ml(r)==="[object Date]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Tz(r){return Ml(r)==="[object RegExp]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Az(r){return Ml(r)==="[object Error]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Rz(r){return Ml(r)==="[object String]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Mz(r){return Ml(r)==="[object Number]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function Pz(r){return Ml(r)==="[object Boolean]"&&(!Gn||!(typeof r=="object"&&Gn in r))}function tM(r){if(Cd)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!lS)return!1;try{return lS.call(r),!0}catch{}return!1}function Oz(r){if(!r||typeof r!="object"||!oS)return!1;try{return oS.call(r),!0}catch{}return!1}var Fz=Object.prototype.hasOwnProperty||function(r){return r in this};function Rl(r,e){return Fz.call(r,e)}function Ml(r){return Sz.call(r)}function Bz(r){if(r.name)return r.name;var e=xz.call(Lz.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function iM(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,i=r.length;t<i;t++)if(r[t]===e)return t;return-1}function Wz(r){if(!Bb||!r||typeof r!="object")return!1;try{Bb.call(r);try{Wb.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function Vz(r){if(!Jg||!r||typeof r!="object")return!1;try{Jg.call(r,Jg);try{ep.call(r,ep)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function Hz(r){if(!KR||!r||typeof r!="object")return!1;try{return KR.call(r),!0}catch{}return!1}function zz(r){if(!Wb||!r||typeof r!="object")return!1;try{Wb.call(r);try{Bb.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function $z(r){if(!ep||!r||typeof r!="object")return!1;try{ep.call(r,ep);try{Jg.call(r,Jg)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function Uz(r){return!r||typeof r!="object"?!1:typeof HTMLElement!="undefined"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function nM(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,i="... "+t+" more character"+(t>1?"s":"");return nM(sS.call(r,0,e.maxStringLength),e)+i}var n=Al.call(Al.call(r,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,jz);return eM(n,"single",e)}function jz(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+kz.call(e.toString(16))}function tp(r){return"Object("+r+")"}function dS(r){return r+" { ? }"}function rM(r,e,t,i){var n=i?fS(t,i):Eo.call(t,", ");return r+" ("+e+") {"+n+"}"}function Kz(r){for(var e=0;e<r.length;e++)if(iM(r[e],` -`)>=0)return!1;return!0}function qz(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=Eo.call(Array(r.indent+1)," ");else return null;return{base:t,prev:Eo.call(Array(e+1),t)}}function fS(r,e){if(r.length===0)return"";var t=` -`+e.prev+e.base;return t+Eo.call(r,","+t)+` -`+e.prev}function Vb(r,e){var t=uS(r),i=[];if(t){i.length=r.length;for(var n=0;n<r.length;n++)i[n]=Rl(r,n)?e(r[n],r):""}var s=typeof aS=="function"?aS(r):[],o;if(Cd){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in r)!Rl(r,l)||t&&String(Number(l))===l&&l<r.length||Cd&&o["$"+l]instanceof Symbol||(GR.call(/[^\w$]/,l)?i.push(e(l,r)+": "+e(r[l],r)):i.push(l+": "+e(r[l],r)));if(typeof aS=="function")for(var c=0;c<s.length;c++)XR.call(r,s[c])&&i.push("["+e(s[c])+"]: "+e(r[s[c]],r));return i}var gS=eS,wd=fz,Gz=Ez,Zz=gS("%TypeError%"),Hb=gS("%WeakMap%",!0),zb=gS("%Map%",!0),Yz=wd("WeakMap.prototype.get",!0),Xz=wd("WeakMap.prototype.set",!0),Qz=wd("WeakMap.prototype.has",!0),Jz=wd("Map.prototype.get",!0),e$=wd("Map.prototype.set",!0),t$=wd("Map.prototype.has",!0),pS=function(r,e){for(var t=r,i;(i=t.next)!==null;t=i)if(i.key===e)return t.next=i.next,i.next=r.next,r.next=i,i},i$=function(r,e){var t=pS(r,e);return t&&t.value},n$=function(r,e,t){var i=pS(r,e);i?i.value=t:r.next={key:e,next:r.next,value:t}},r$=function(r,e){return!!pS(r,e)},s$=function(){var e,t,i,n={assert:function(s){if(!n.has(s))throw new Zz("Side channel does not contain "+Gz(s))},get:function(s){if(Hb&&s&&(typeof s=="object"||typeof s=="function")){if(e)return Yz(e,s)}else if(zb){if(t)return Jz(t,s)}else if(i)return i$(i,s)},has:function(s){if(Hb&&s&&(typeof s=="object"||typeof s=="function")){if(e)return Qz(e,s)}else if(zb){if(t)return t$(t,s)}else if(i)return r$(i,s);return!1},set:function(s,o){Hb&&s&&(typeof s=="object"||typeof s=="function")?(e||(e=new Hb),Xz(e,s,o)):zb?(t||(t=new zb),e$(t,s,o)):(i||(i={key:{},next:null}),n$(i,s,o))}};return n},o$=String.prototype.replace,a$=/%20/g,mS={RFC1738:"RFC1738",RFC3986:"RFC3986"},_S={default:mS.RFC3986,formatters:{RFC1738:function(r){return o$.call(r,a$,"+")},RFC3986:function(r){return String(r)}},RFC1738:mS.RFC1738,RFC3986:mS.RFC3986},l$=_S,bS=Object.prototype.hasOwnProperty,ah=Array.isArray,Io=function(){for(var r=[],e=0;e<256;++e)r.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return r}(),c$=function(e){for(;e.length>1;){var t=e.pop(),i=t.obj[t.prop];if(ah(i)){for(var n=[],s=0;s<i.length;++s)typeof i[s]!="undefined"&&n.push(i[s]);t.obj[t.prop]=n}}},sM=function(e,t){for(var i=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)typeof e[n]!="undefined"&&(i[n]=e[n]);return i},h$=function r(e,t,i){if(!t)return e;if(typeof t!="object"){if(ah(e))e.push(t);else if(e&&typeof e=="object")(i&&(i.plainObjects||i.allowPrototypes)||!bS.call(Object.prototype,t))&&(e[t]=!0);else return[e,t];return e}if(!e||typeof e!="object")return[e].concat(t);var n=e;return ah(e)&&!ah(t)&&(n=sM(e,i)),ah(e)&&ah(t)?(t.forEach(function(s,o){if(bS.call(e,o)){var a=e[o];a&&typeof a=="object"&&s&&typeof s=="object"?e[o]=r(a,s,i):e.push(s)}else e[o]=s}),e):Object.keys(t).reduce(function(s,o){var a=t[o];return bS.call(s,o)?s[o]=r(s[o],a,i):s[o]=a,s},n)},u$=function(e,t){return Object.keys(t).reduce(function(i,n){return i[n]=t[n],i},e)},d$=function(r,e,t){var i=r.replace(/\+/g," ");if(t==="iso-8859-1")return i.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(i)}catch{return i}},f$=function(e,t,i,n,s){if(e.length===0)return e;var o=e;if(typeof e=="symbol"?o=Symbol.prototype.toString.call(e):typeof e!="string"&&(o=String(e)),i==="iso-8859-1")return escape(o).replace(/%u[0-9a-f]{4}/gi,function(h){return"%26%23"+parseInt(h.slice(2),16)+"%3B"});for(var a="",l=0;l<o.length;++l){var c=o.charCodeAt(l);if(c===45||c===46||c===95||c===126||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||s===l$.RFC1738&&(c===40||c===41)){a+=o.charAt(l);continue}if(c<128){a=a+Io[c];continue}if(c<2048){a=a+(Io[192|c>>6]+Io[128|c&63]);continue}if(c<55296||c>=57344){a=a+(Io[224|c>>12]+Io[128|c>>6&63]+Io[128|c&63]);continue}l+=1,c=65536+((c&1023)<<10|o.charCodeAt(l)&1023),a+=Io[240|c>>18]+Io[128|c>>12&63]+Io[128|c>>6&63]+Io[128|c&63]}return a},g$=function(e){for(var t=[{obj:{o:e},prop:"o"}],i=[],n=0;n<t.length;++n)for(var s=t[n],o=s.obj[s.prop],a=Object.keys(o),l=0;l<a.length;++l){var c=a[l],h=o[c];typeof h=="object"&&h!==null&&i.indexOf(h)===-1&&(t.push({obj:o,prop:c}),i.push(h))}return c$(t),e},p$=function(e){return Object.prototype.toString.call(e)==="[object RegExp]"},m$=function(e){return!e||typeof e!="object"?!1:!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))},_$=function(e,t){return[].concat(e,t)},b$=function(e,t){if(ah(e)){for(var i=[],n=0;n<e.length;n+=1)i.push(t(e[n]));return i}return t(e)},oM={arrayToObject:sM,assign:u$,combine:_$,compact:g$,decode:d$,encode:f$,isBuffer:m$,isRegExp:p$,maybeMap:b$,merge:h$},aM=s$,vS=oM,ip=_S,v$=Object.prototype.hasOwnProperty,lM={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},lh=Array.isArray,C$=String.prototype.split,w$=Array.prototype.push,cM=function(r,e){w$.apply(r,lh(e)?e:[e])},y$=Date.prototype.toISOString,hM=ip.default,Tn={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:vS.encode,encodeValuesOnly:!1,format:hM,formatter:ip.formatters[hM],indices:!1,serializeDate:function(e){return y$.call(e)},skipNulls:!1,strictNullHandling:!1},S$=function(e){return typeof e=="string"||typeof e=="number"||typeof e=="boolean"||typeof e=="symbol"||typeof e=="bigint"},CS={},L$=function r(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p){for(var _=e,v=p,b=0,C=!1;(v=v.get(CS))!==void 0&&!C;){var y=v.get(e);if(b+=1,typeof y!="undefined"){if(y===b)throw new RangeError("Cyclic object value");C=!0}typeof v.get(CS)=="undefined"&&(b=0)}if(typeof a=="function"?_=a(t,_):_ instanceof Date?_=h(_):i==="comma"&&lh(_)&&(_=vS.maybeMap(_,function(D){return D instanceof Date?h(D):D})),_===null){if(n)return o&&!f?o(t,Tn.encoder,g,"key",u):t;_=""}if(S$(_)||vS.isBuffer(_)){if(o){var x=f?t:o(t,Tn.encoder,g,"key",u);if(i==="comma"&&f){for(var S=C$.call(String(_),","),w="",L=0;L<S.length;++L)w+=(L===0?"":",")+d(o(S[L],Tn.encoder,g,"value",u));return[d(x)+"="+w]}return[d(x)+"="+d(o(_,Tn.encoder,g,"value",u))]}return[d(t)+"="+d(String(_))]}var N=[];if(typeof _=="undefined")return N;var P;if(i==="comma"&&lh(_))P=[{value:_.length>0?_.join(",")||null:void 0}];else if(lh(a))P=a;else{var B=Object.keys(_);P=l?B.sort(l):B}for(var U=0;U<P.length;++U){var j=P[U],re=typeof j=="object"&&j.value!==void 0?j.value:_[j];if(!(s&&re===null)){var te=lh(_)?typeof i=="function"?i(t,j):t:t+(c?"."+j:"["+j+"]");p.set(e,b);var A=aM();A.set(CS,p),cM(N,r(re,te,i,n,s,o,a,l,c,h,u,d,f,g,A))}}return N},x$=function(e){if(!e)return Tn;if(e.encoder!==null&&e.encoder!==void 0&&typeof e.encoder!="function")throw new TypeError("Encoder has to be a function.");var t=e.charset||Tn.charset;if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var i=ip.default;if(typeof e.format!="undefined"){if(!v$.call(ip.formatters,e.format))throw new TypeError("Unknown format option provided.");i=e.format}var n=ip.formatters[i],s=Tn.filter;return(typeof e.filter=="function"||lh(e.filter))&&(s=e.filter),{addQueryPrefix:typeof e.addQueryPrefix=="boolean"?e.addQueryPrefix:Tn.addQueryPrefix,allowDots:typeof e.allowDots=="undefined"?Tn.allowDots:!!e.allowDots,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:Tn.charsetSentinel,delimiter:typeof e.delimiter=="undefined"?Tn.delimiter:e.delimiter,encode:typeof e.encode=="boolean"?e.encode:Tn.encode,encoder:typeof e.encoder=="function"?e.encoder:Tn.encoder,encodeValuesOnly:typeof e.encodeValuesOnly=="boolean"?e.encodeValuesOnly:Tn.encodeValuesOnly,filter:s,format:i,formatter:n,serializeDate:typeof e.serializeDate=="function"?e.serializeDate:Tn.serializeDate,skipNulls:typeof e.skipNulls=="boolean"?e.skipNulls:Tn.skipNulls,sort:typeof e.sort=="function"?e.sort:null,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:Tn.strictNullHandling}},k$=function(r,e){var t=r,i=x$(e),n,s;typeof i.filter=="function"?(s=i.filter,t=s("",t)):lh(i.filter)&&(s=i.filter,n=s);var o=[];if(typeof t!="object"||t===null)return"";var a;e&&e.arrayFormat in lM?a=e.arrayFormat:e&&"indices"in e?a=e.indices?"indices":"repeat":a="indices";var l=lM[a];n||(n=Object.keys(t)),i.sort&&n.sort(i.sort);for(var c=aM(),h=0;h<n.length;++h){var u=n[h];i.skipNulls&&t[u]===null||cM(o,L$(t[u],u,l,i.strictNullHandling,i.skipNulls,i.encode?i.encoder:null,i.filter,i.sort,i.allowDots,i.serializeDate,i.format,i.formatter,i.encodeValuesOnly,i.charset,c))}var d=o.join(i.delimiter),f=i.addQueryPrefix===!0?"?":"";return i.charsetSentinel&&(i.charset==="iso-8859-1"?f+="utf8=%26%2310003%3B&":f+="utf8=%E2%9C%93&"),d.length>0?f+d:""},yd=oM,wS=Object.prototype.hasOwnProperty,D$=Array.isArray,wn={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:yd.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},E$=function(r){return r.replace(/&#(\d+);/g,function(e,t){return String.fromCharCode(parseInt(t,10))})},uM=function(r,e){return r&&typeof r=="string"&&e.comma&&r.indexOf(",")>-1?r.split(","):r},I$="utf8=%26%2310003%3B",N$="utf8=%E2%9C%93",T$=function(e,t){var i={},n=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,s=t.parameterLimit===1/0?void 0:t.parameterLimit,o=n.split(t.delimiter,s),a=-1,l,c=t.charset;if(t.charsetSentinel)for(l=0;l<o.length;++l)o[l].indexOf("utf8=")===0&&(o[l]===N$?c="utf-8":o[l]===I$&&(c="iso-8859-1"),a=l,l=o.length);for(l=0;l<o.length;++l)if(l!==a){var h=o[l],u=h.indexOf("]="),d=u===-1?h.indexOf("="):u+1,f,g;d===-1?(f=t.decoder(h,wn.decoder,c,"key"),g=t.strictNullHandling?null:""):(f=t.decoder(h.slice(0,d),wn.decoder,c,"key"),g=yd.maybeMap(uM(h.slice(d+1),t),function(p){return t.decoder(p,wn.decoder,c,"value")})),g&&t.interpretNumericEntities&&c==="iso-8859-1"&&(g=E$(g)),h.indexOf("[]=")>-1&&(g=D$(g)?[g]:g),wS.call(i,f)?i[f]=yd.combine(i[f],g):i[f]=g}return i},A$=function(r,e,t,i){for(var n=i?e:uM(e,t),s=r.length-1;s>=0;--s){var o,a=r[s];if(a==="[]"&&t.parseArrays)o=[].concat(n);else{o=t.plainObjects?Object.create(null):{};var l=a.charAt(0)==="["&&a.charAt(a.length-1)==="]"?a.slice(1,-1):a,c=parseInt(l,10);!t.parseArrays&&l===""?o={0:n}:!isNaN(c)&&a!==l&&String(c)===l&&c>=0&&t.parseArrays&&c<=t.arrayLimit?(o=[],o[c]=n):o[l]=n}n=o}return n},R$=function(e,t,i,n){if(!!e){var s=i.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,o=/(\[[^[\]]*])/,a=/(\[[^[\]]*])/g,l=i.depth>0&&o.exec(s),c=l?s.slice(0,l.index):s,h=[];if(c){if(!i.plainObjects&&wS.call(Object.prototype,c)&&!i.allowPrototypes)return;h.push(c)}for(var u=0;i.depth>0&&(l=a.exec(s))!==null&&u<i.depth;){if(u+=1,!i.plainObjects&&wS.call(Object.prototype,l[1].slice(1,-1))&&!i.allowPrototypes)return;h.push(l[1])}return l&&h.push("["+s.slice(l.index)+"]"),A$(h,t,i,n)}},M$=function(e){if(!e)return wn;if(e.decoder!==null&&e.decoder!==void 0&&typeof e.decoder!="function")throw new TypeError("Decoder has to be a function.");if(typeof e.charset!="undefined"&&e.charset!=="utf-8"&&e.charset!=="iso-8859-1")throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=typeof e.charset=="undefined"?wn.charset:e.charset;return{allowDots:typeof e.allowDots=="undefined"?wn.allowDots:!!e.allowDots,allowPrototypes:typeof e.allowPrototypes=="boolean"?e.allowPrototypes:wn.allowPrototypes,allowSparse:typeof e.allowSparse=="boolean"?e.allowSparse:wn.allowSparse,arrayLimit:typeof e.arrayLimit=="number"?e.arrayLimit:wn.arrayLimit,charset:t,charsetSentinel:typeof e.charsetSentinel=="boolean"?e.charsetSentinel:wn.charsetSentinel,comma:typeof e.comma=="boolean"?e.comma:wn.comma,decoder:typeof e.decoder=="function"?e.decoder:wn.decoder,delimiter:typeof e.delimiter=="string"||yd.isRegExp(e.delimiter)?e.delimiter:wn.delimiter,depth:typeof e.depth=="number"||e.depth===!1?+e.depth:wn.depth,ignoreQueryPrefix:e.ignoreQueryPrefix===!0,interpretNumericEntities:typeof e.interpretNumericEntities=="boolean"?e.interpretNumericEntities:wn.interpretNumericEntities,parameterLimit:typeof e.parameterLimit=="number"?e.parameterLimit:wn.parameterLimit,parseArrays:e.parseArrays!==!1,plainObjects:typeof e.plainObjects=="boolean"?e.plainObjects:wn.plainObjects,strictNullHandling:typeof e.strictNullHandling=="boolean"?e.strictNullHandling:wn.strictNullHandling}},P$=function(r,e){var t=M$(e);if(r===""||r===null||typeof r=="undefined")return t.plainObjects?Object.create(null):{};for(var i=typeof r=="string"?T$(r,t):r,n=t.plainObjects?Object.create(null):{},s=Object.keys(i),o=0;o<s.length;++o){var a=s[o],l=R$(a,i[a],t,typeof r=="string");n=yd.merge(n,l,t)}return t.allowSparse===!0?n:yd.compact(n)},O$=k$,F$=P$,B$=_S,mwe={formats:B$,parse:F$,stringify:O$};const W$={"{0} ({1})":0,input:1,"Match Case":2,"Match Whole Word":3,"Use Regular Expression":4,"Preserve Case":5,"Loading...":6,"Error: {0}":7,"Warning: {0}":8,"Info: {0}":9,"for history":10,Unbound:11,Clear:12,"Disable Filter on Type":13,"Enable Filter on Type":14,"No elements found":15,"Matched {0} out of {1} elements":16,"(empty)":17,"{0}: {1}":18,"A system error occurred ({0})":19,"An unknown error occurred. Please consult the log for more details.":20,"{0} ({1} errors in total)":21,Ctrl:22,Shift:23,Alt:24,Windows:25,Super:26,Control:27,Command:28,Back:29,"Press 'Enter' to confirm your input or 'Escape' to cancel":30,"{0}/{1}":31,"Type to narrow down results.":32,"{0} Results":33,"{0} Selected":34,OK:35,Custom:36,"Back ({0})":37,"Quick Input":38,"Stick to the end even when going to longer lines":39,"Removed secondary cursors":40,editor:41,"The editor is not accessible at this time. Press {0} for options.":42,"Whether the editor runs a cancellable operation, e.g. like 'Peek References'":43,"&&Undo":44,Undo:45,"&&Redo":46,Redo:47,"&&Select All":48,"Select All":49,"The number of cursors has been limited to {0}.":50,"Line decoration for inserts in the diff editor.":51,"Line decoration for removals in the diff editor.":52,"Cannot compare files because one file is too large.":53,"Icon for 'Insert' in diff review.":54,"Icon for 'Remove' in diff review.":55,"Icon for 'Close' in diff review.":56,Close:57,"no lines changed":58,"1 line changed":59,"{0} lines changed":60,"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}":61,blank:62,"{0} unchanged line {1}":63,"{0} original line {1} modified line {2}":64,"+ {0} modified line {1}":65,"- {0} original line {1}":66,"Go to Next Difference":67,"Go to Previous Difference":68,"Copy deleted lines":69,"Copy deleted line":70,"Copy deleted line ({0})":71,"Revert this change":72,Editor:73,"The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.":74,"Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.":75,"Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.":76,"Remove trailing auto inserted whitespace.":77,"Special handling for large files to disable certain memory intensive features.":78,"Controls whether completions should be computed based on words in the document.":79,"Only suggest words from the active document.":80,"Suggest words from all open documents of the same language.":81,"Suggest words from all open documents.":82,"Controls from which documents word based completions are computed.":83,"Semantic highlighting enabled for all color themes.":84,"Semantic highlighting disabled for all color themes.":85,"Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.":86,"Controls whether the semanticHighlighting is shown for the languages that support it.":87,"Keep peek editors open even when double clicking their content or when hitting `Escape`.":88,"Lines above this length will not be tokenized for performance reasons":89,"Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.":90,"Maximum file size in MB for which to compute diffs. Use 0 for no limit.":91,"Controls whether the diff editor shows the diff side by side or inline.":92,"When enabled, the diff editor ignores changes in leading or trailing whitespace.":93,"Controls whether the diff editor shows +/- indicators for added/removed changes.":94,"Controls whether the editor shows CodeLens.":95,"Lines will never wrap.":96,"Lines will wrap at the viewport width.":97,"Lines will wrap according to the `#editor.wordWrap#` setting.":98,"The editor will use platform APIs to detect when a Screen Reader is attached.":99,"The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled.":100,"The editor will never be optimized for usage with a Screen Reader.":101,"Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.":102,"Controls whether a space character is inserted when commenting.":103,"Controls if empty lines should be ignored with toggle, add or remove actions for line comments.":104,"Controls whether copying without a selection copies the current line.":105,"Controls whether the cursor should jump to find matches while typing.":106,"Never seed search string from the editor selection.":107,"Always seed search string from the editor selection, including word at cursor position.":108,"Only seed search string from the editor selection.":109,"Controls whether the search string in the Find Widget is seeded from the editor selection.":110,"Never turn on Find in Selection automatically (default).":111,"Always turn on Find in Selection automatically.":112,"Turn on Find in Selection automatically when multiple lines of content are selected.":113,"Controls the condition for turning on Find in Selection automatically.":114,"Controls whether the Find Widget should read or modify the shared find clipboard on macOS.":115,"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.":116,"Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.":117,"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.":118,"Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.":119,"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.":120,"Controls the font size in pixels.":121,'Only "normal" and "bold" keywords or numbers between 1 and 1000 are allowed.':122,'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.':123,"Show peek view of the results (default)":124,"Go to the primary result and show a peek view":125,"Go to the primary result and enable peek-less navigation to others":126,"This setting is deprecated, please use separate settings like 'editor.editor.gotoLocation.multipleDefinitions' or 'editor.editor.gotoLocation.multipleImplementations' instead.":127,"Controls the behavior the 'Go to Definition'-command when multiple target locations exist.":128,"Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.":129,"Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.":130,"Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.":131,"Controls the behavior the 'Go to References'-command when multiple target locations exist.":132,"Alternative command id that is being executed when the result of 'Go to Definition' is the current location.":133,"Alternative command id that is being executed when the result of 'Go to Type Definition' is the current location.":134,"Alternative command id that is being executed when the result of 'Go to Declaration' is the current location.":135,"Alternative command id that is being executed when the result of 'Go to Implementation' is the current location.":136,"Alternative command id that is being executed when the result of 'Go to Reference' is the current location.":137,"Controls whether the hover is shown.":138,"Controls the delay in milliseconds after which the hover is shown.":139,"Controls whether the hover should remain visible when mouse is moved over it.":140,"Enables the code action lightbulb in the editor.":141,"Enables the inlay hints in the editor.":142,"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.":143,"Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.":144,"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.":145,"Controls whether the minimap is shown.":146,"The minimap has the same size as the editor contents (and might scroll).":147,"The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling).":148,"The minimap will shrink as necessary to never be larger than the editor (no scrolling).":149,"Controls the size of the minimap.":150,"Controls the side where to render the minimap.":151,"Controls when the minimap slider is shown.":152,"Scale of content drawn in the minimap: 1, 2 or 3.":153,"Render the actual characters on a line as opposed to color blocks.":154,"Limit the width of the minimap to render at most a certain number of columns.":155,"Controls the amount of space between the top edge of the editor and the first line.":156,"Controls the amount of space between the bottom edge of the editor and the last line.":157,"Enables a pop-up that shows parameter documentation and type information as you type.":158,"Controls whether the parameter hints menu cycles or closes when reaching the end of the list.":159,"Enable quick suggestions inside strings.":160,"Enable quick suggestions inside comments.":161,"Enable quick suggestions outside of strings and comments.":162,"Controls whether suggestions should automatically show up while typing.":163,"Line numbers are not rendered.":164,"Line numbers are rendered as absolute number.":165,"Line numbers are rendered as distance in lines to cursor position.":166,"Line numbers are rendered every 10 lines.":167,"Controls the display of line numbers.":168,"Number of monospace characters at which this editor ruler will render.":169,"Color of this editor ruler.":170,"Render vertical rulers after a certain number of monospace characters. Use multiple values for multiple rulers. No rulers are drawn if array is empty.":171,"The vertical scrollbar will be visible only when necessary.":172,"The vertical scrollbar will always be visible.":173,"The vertical scrollbar will always be hidden.":174,"Controls the visibility of the vertical scrollbar.":175,"The horizontal scrollbar will be visible only when necessary.":176,"The horizontal scrollbar will always be visible.":177,"The horizontal scrollbar will always be hidden.":178,"Controls the visibility of the horizontal scrollbar.":179,"The width of the vertical scrollbar.":180,"The height of the horizontal scrollbar.":181,"Controls whether clicks scroll by page or jump to click position.":182,"Controls whether to automatically show inline suggestions in the editor.":183,"Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.":184,"Controls whether bracket pair guides are enabled or not.":185,"Controls whether the editor should render indent guides.":186,"Controls whether the editor should highlight the active indent guide.":187,"Insert suggestion without overwriting text right of the cursor.":188,"Insert suggestion and overwrite text right of the cursor.":189,"Controls whether words are overwritten when accepting completions. Note that this depends on extensions opting into this feature.":190,"Controls whether filtering and sorting suggestions accounts for small typos.":191,"Controls whether sorting favors words that appear close to the cursor.":192,"Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).":193,"Controls whether an active snippet prevents quick suggestions.":194,"Controls whether to show or hide icons in suggestions.":195,"Controls the visibility of the status bar at the bottom of the suggest widget.":196,"Controls whether to preview the suggestion outcome in the editor.":197,"Controls whether suggest details show inline with the label or only in the details widget":198,"This setting is deprecated. The suggest widget can now be resized.":199,"This setting is deprecated, please use separate settings like 'editor.suggest.showKeywords' or 'editor.suggest.showSnippets' instead.":200,"When enabled IntelliSense shows `method`-suggestions.":201,"When enabled IntelliSense shows `function`-suggestions.":202,"When enabled IntelliSense shows `constructor`-suggestions.":203,"When enabled IntelliSense shows `deprecated`-suggestions.":204,"When enabled IntelliSense shows `field`-suggestions.":205,"When enabled IntelliSense shows `variable`-suggestions.":206,"When enabled IntelliSense shows `class`-suggestions.":207,"When enabled IntelliSense shows `struct`-suggestions.":208,"When enabled IntelliSense shows `interface`-suggestions.":209,"When enabled IntelliSense shows `module`-suggestions.":210,"When enabled IntelliSense shows `property`-suggestions.":211,"When enabled IntelliSense shows `event`-suggestions.":212,"When enabled IntelliSense shows `operator`-suggestions.":213,"When enabled IntelliSense shows `unit`-suggestions.":214,"When enabled IntelliSense shows `value`-suggestions.":215,"When enabled IntelliSense shows `constant`-suggestions.":216,"When enabled IntelliSense shows `enum`-suggestions.":217,"When enabled IntelliSense shows `enumMember`-suggestions.":218,"When enabled IntelliSense shows `keyword`-suggestions.":219,"When enabled IntelliSense shows `text`-suggestions.":220,"When enabled IntelliSense shows `color`-suggestions.":221,"When enabled IntelliSense shows `file`-suggestions.":222,"When enabled IntelliSense shows `reference`-suggestions.":223,"When enabled IntelliSense shows `customcolor`-suggestions.":224,"When enabled IntelliSense shows `folder`-suggestions.":225,"When enabled IntelliSense shows `typeParameter`-suggestions.":226,"When enabled IntelliSense shows `snippet`-suggestions.":227,"When enabled IntelliSense shows `user`-suggestions.":228,"When enabled IntelliSense shows `issues`-suggestions.":229,"Whether leading and trailing whitespace should always be selected.":230,"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.":231,"Only accept a suggestion with `Enter` when it makes a textual change.":232,"Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.":233,"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.":234,"Editor content":235,"Use language configurations to determine when to autoclose brackets.":236,"Autoclose brackets only when the cursor is to the left of whitespace.":237,"Controls whether the editor should automatically close brackets after the user adds an opening bracket.":238,"Remove adjacent closing quotes or brackets only if they were automatically inserted.":239,"Controls whether the editor should remove adjacent closing quotes or brackets when deleting.":240,"Type over closing quotes or brackets only if they were automatically inserted.":241,"Controls whether the editor should type over closing quotes or brackets.":242,"Use language configurations to determine when to autoclose quotes.":243,"Autoclose quotes only when the cursor is to the left of whitespace.":244,"Controls whether the editor should automatically close quotes after the user adds an opening quote.":245,"The editor will not insert indentation automatically.":246,"The editor will keep the current line's indentation.":247,"The editor will keep the current line's indentation and honor language defined brackets.":248,"The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages.":249,"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.":250,"Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.":251,"Use language configurations to determine when to automatically surround selections.":252,"Surround with quotes but not brackets.":253,"Surround with brackets but not quotes.":254,"Controls whether the editor should automatically surround selections when typing quotes or brackets.":255,"Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.":256,"Controls the font family for CodeLens.":257,"Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.":258,"Controls whether the editor should render the inline color decorators and color picker.":259,"Enable that the selection with the mouse and keys is doing column selection.":260,"Controls whether syntax highlighting should be copied into the clipboard.":261,"Control the cursor animation style.":262,"Controls whether the smooth caret animation should be enabled.":263,"Controls the cursor style.":264,"Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.":265,"`cursorSurroundingLines` is enforced only when triggered via the keyboard or API.":266,"`cursorSurroundingLines` is enforced always.":267,"Controls when `cursorSurroundingLines` should be enforced.":268,"Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.":269,"Controls whether the editor should allow moving selections via drag and drop.":270,"Scrolling speed multiplier when pressing `Alt`.":271,"Controls whether the editor has code folding enabled.":272,"Use a language-specific folding strategy if available, else the indentation-based one.":273,"Use the indentation-based folding strategy.":274,"Controls the strategy for computing folding ranges.":275,"Controls whether the editor should highlight folded ranges.":276,"Controls whether the editor automatically collapses import ranges.":277,"Controls whether clicking on the empty content after a folded line will unfold the line.":278,"Controls the font family.":279,"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.":280,"Controls whether the editor should automatically format the line after typing.":281,"Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.":282,"Controls whether the cursor should be hidden in the overview ruler.":283,"Controls the letter spacing in pixels.":284,"Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.":285,"Controls whether the editor should detect links and make them clickable.":286,"Highlight matching brackets.":287,"A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.":288,"Zoom the font of the editor when using mouse wheel and holding `Ctrl`.":289,"Merge multiple cursors when they are overlapping.":290,"Maps to `Control` on Windows and Linux and to `Command` on macOS.":291,"Maps to `Alt` on Windows and Linux and to `Option` on macOS.":292,"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).":293,"Each cursor pastes a single line of the text.":294,"Each cursor pastes the full text.":295,"Controls pasting when the line count of the pasted text matches the cursor count.":296,"Controls whether the editor should highlight semantic symbol occurrences.":297,"Controls whether a border should be drawn around the overview ruler.":298,"Focus the tree when opening peek":299,"Focus the editor when opening peek":300,"Controls whether to focus the inline editor or the tree in the peek widget.":301,"Controls whether the Go to Definition mouse gesture always opens the peek widget.":302,"Controls the delay in milliseconds after which quick suggestions will show up.":303,"Controls whether the editor auto renames on type.":304,"Deprecated, use `editor.linkedEditing` instead.":305,"Controls whether the editor should render control characters.":306,"Render last line number when the file ends with a newline.":307,"Highlights both the gutter and the current line.":308,"Controls how the editor should render the current line highlight.":309,"Controls if the editor should render the current line highlight only when the editor is focused.":310,"Render whitespace characters except for single spaces between words.":311,"Render whitespace characters only on selected text.":312,"Render only trailing whitespace characters.":313,"Controls how the editor should render whitespace characters.":314,"Controls whether selections should have rounded corners.":315,"Controls the number of extra characters beyond which the editor will scroll horizontally.":316,"Controls whether the editor will scroll beyond the last line.":317,"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.":318,"Controls whether the Linux primary clipboard should be supported.":319,"Controls whether the editor should highlight matches similar to the selection.":320,"Always show the folding controls.":321,"Only show the folding controls when the mouse is over the gutter.":322,"Controls when the folding controls on the gutter are shown.":323,"Controls fading out of unused code.":324,"Controls strikethrough deprecated variables.":325,"Show snippet suggestions on top of other suggestions.":326,"Show snippet suggestions below other suggestions.":327,"Show snippets suggestions with other suggestions.":328,"Do not show snippet suggestions.":329,"Controls whether snippets are shown with other suggestions and how they are sorted.":330,"Controls whether the editor will scroll using an animation.":331,"Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.":332,"Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.":333,"Controls whether suggestions should automatically show up when typing trigger characters.":334,"Always select the first suggestion.":335,"Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently.":336,"Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.":337,"Controls how suggestions are pre-selected when showing the suggest list.":338,"Tab complete will insert the best matching suggestion when pressing tab.":339,"Disable tab completions.":340,"Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.":341,"Enables tab completions.":342,"Unusual line terminators are automatically removed.":343,"Unusual line terminators are ignored.":344,"Unusual line terminators prompt to be removed.":345,"Remove unusual line terminators that might cause problems.":346,"Inserting and deleting whitespace follows tab stops.":347,"Characters that will be used as word separators when doing word related navigations or operations.":348,"Lines will wrap at `#editor.wordWrapColumn#`.":349,"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.":350,"Controls how lines should wrap.":351,"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.":352,"No indentation. Wrapped lines begin at column 1.":353,"Wrapped lines get the same indentation as the parent.":354,"Wrapped lines get +1 indentation toward the parent.":355,"Wrapped lines get +2 indentation toward the parent.":356,"Controls the indentation of wrapped lines.":357,"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.":358,"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.":359,"Controls the algorithm that computes wrapping points.":360,"Whether the editor text has focus (cursor is blinking)":361,"Whether the editor or an editor widget has focus (e.g. focus is in the find widget)":362,"Whether an editor or a rich text input has focus (cursor is blinking)":363,"Whether the editor is read only":364,"Whether the context is a diff editor":365,"Whether `editor.columnSelection` is enabled":366,"Whether the editor has text selected":367,"Whether the editor has multiple selections":368,"Whether `Tab` will move focus out of the editor":369,"Whether the editor hover is visible":370,"Whether the editor is part of a larger editor (e.g. notebooks)":371,"The language identifier of the editor":372,"Whether the editor has a completion item provider":373,"Whether the editor has a code actions provider":374,"Whether the editor has a code lens provider":375,"Whether the editor has a definition provider":376,"Whether the editor has a declaration provider":377,"Whether the editor has an implementation provider":378,"Whether the editor has a type definition provider":379,"Whether the editor has a hover provider":380,"Whether the editor has a document highlight provider":381,"Whether the editor has a document symbol provider":382,"Whether the editor has a reference provider":383,"Whether the editor has a rename provider":384,"Whether the editor has a signature help provider":385,"Whether the editor has an inline hints provider":386,"Whether the editor has a document formatting provider":387,"Whether the editor has a document selection formatting provider":388,"Whether the editor has multiple document formatting providers":389,"Whether the editor has multiple document selection formatting providers":390,Typing:391,"Plain Text":392,"No selection":393,"Line {0}, Column {1} ({2} selected)":394,"Line {0}, Column {1}":395,"{0} selections ({1} characters selected)":396,"{0} selections":397,"Now changing the setting `accessibilitySupport` to 'on'.":398,"Now opening the Editor Accessibility documentation page.":399," in a read-only pane of a diff editor.":400," in a pane of a diff editor.":401," in a read-only code editor":402," in a code editor":403,"To configure the editor to be optimized for usage with a Screen Reader press Command+E now.":404,"To configure the editor to be optimized for usage with a Screen Reader press Control+E now.":405,"The editor is configured to be optimized for usage with a Screen Reader.":406,"The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time.":407,"Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}.":408,"Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding.":409,"Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}.":410,"Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding.":411,"Press Command+H now to open a browser window with more information related to editor accessibility.":412,"Press Control+H now to open a browser window with more information related to editor accessibility.":413,"You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.":414,"Show Accessibility Help":415,"Developer: Inspect Tokens":416,"Go to Line/Column...":417,"Show all Quick Access Providers":418,"Command Palette":419,"Show And Run Commands":420,"Go to Symbol...":421,"Go to Symbol by Category...":422,"Press Alt+F1 for Accessibility Options.":423,"Toggle High Contrast Theme":424,"Made {0} edits in {1} files":425,"Background color for the highlight of line at the cursor position.":426,"Background color for the border around the line at the cursor position.":427,"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.":428,"Background color of the border around highlighted ranges.":429,"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.":430,"Background color of the border around highlighted symbols.":431,"Color of the editor cursor.":432,"The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.":433,"Color of whitespace characters in the editor.":434,"Color of the editor indentation guides.":435,"Color of the active editor indentation guides.":436,"Color of editor line numbers.":437,"Color of editor active line number":438,"Id is deprecated. Use 'editorLineNumber.activeForeground' instead.":439,"Color of the editor rulers.":440,"Foreground color of editor CodeLens":441,"Background color behind matching brackets":442,"Color for matching brackets boxes":443,"Color of the overview ruler border.":444,"Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.":445,"Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.":446,"Border color of unnecessary (unused) source code in the editor.":447,"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.":448,"Border color of ghost text in the editor.":449,"Foreground color of the ghost text in the editor.":450,"Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations.":451,"Overview ruler marker color for errors.":452,"Overview ruler marker color for warnings.":453,"Overview ruler marker color for infos.":454,"Foreground color of brackets (1). Requires enabling bracket pair colorization.":455,"Foreground color of brackets (2). Requires enabling bracket pair colorization.":456,"Foreground color of brackets (3). Requires enabling bracket pair colorization.":457,"Foreground color of brackets (4). Requires enabling bracket pair colorization.":458,"Foreground color of brackets (5). Requires enabling bracket pair colorization.":459,"Foreground color of brackets (6). Requires enabling bracket pair colorization.":460,"Foreground color of unexpected brackets.":461,"Selection Anchor":462,"Anchor set at {0}:{1}":463,"Set Selection Anchor":464,"Go to Selection Anchor":465,"Select from Anchor to Cursor":466,"Cancel Selection Anchor":467,"Overview ruler marker color for matching brackets.":468,"Go to Bracket":469,"Select to Bracket":470,"Go to &&Bracket":471,"Move Selected Text Left":472,"Move Selected Text Right":473,"Transpose Letters":474,"Cu&&t":475,Cut:476,"&&Copy":477,Copy:478,"Copy As":479,"&&Paste":480,Paste:481,"Copy With Syntax Highlighting":482,"Kind of the code action to run.":483,"Controls when the returned actions are applied.":484,"Always apply the first returned code action.":485,"Apply the first returned code action if it is the only one.":486,"Do not apply the returned code actions.":487,"Controls if only preferred code actions should be returned.":488,"An unknown error occurred while applying the code action":489,"Quick Fix...":490,"No code actions available":491,"No preferred code actions for '{0}' available":492,"No code actions for '{0}' available":493,"No preferred code actions available":494,"Refactor...":495,"No preferred refactorings for '{0}' available":496,"No refactorings for '{0}' available":497,"No preferred refactorings available":498,"No refactorings available":499,"Source Action...":500,"No preferred source actions for '{0}' available":501,"No source actions for '{0}' available":502,"No preferred source actions available":503,"No source actions available":504,"Organize Imports":505,"No organize imports action available":506,"Fix All":507,"No fix all action available":508,"Auto Fix...":509,"No auto fixes available":510,"Show Code Actions. Preferred Quick Fix Available ({0})":511,"Show Code Actions ({0})":512,"Show Code Actions":513,"Show CodeLens Commands For Current Line":514,"Toggle Line Comment":515,"&&Toggle Line Comment":516,"Add Line Comment":517,"Remove Line Comment":518,"Toggle Block Comment":519,"Toggle &&Block Comment":520,"Show Editor Context Menu":521,"Cursor Undo":522,"Cursor Redo":523,Find:524,"&&Find":525,"Find With Selection":526,"Find Next":527,"Find Previous":528,"Find Next Selection":529,"Find Previous Selection":530,Replace:531,"&&Replace":532,"Icon for 'Find in Selection' in the editor find widget.":533,"Icon to indicate that the editor find widget is collapsed.":534,"Icon to indicate that the editor find widget is expanded.":535,"Icon for 'Replace' in the editor find widget.":536,"Icon for 'Replace All' in the editor find widget.":537,"Icon for 'Find Previous' in the editor find widget.":538,"Icon for 'Find Next' in the editor find widget.":539,"Previous Match":540,"Next Match":541,"Find in Selection":542,"Replace All":543,"Toggle Replace":544,"Only the first {0} results are highlighted, but all find operations work on the entire text.":545,"{0} of {1}":546,"No results":547,"{0} found":548,"{0} found for '{1}'":549,"{0} found for '{1}', at {2}":550,"Ctrl+Enter now inserts line break instead of replacing all. You can modify the keybinding for editor.action.replaceAll to override this behavior.":551,Unfold:552,"Unfold Recursively":553,Fold:554,"Toggle Fold":555,"Fold Recursively":556,"Fold All Block Comments":557,"Fold All Regions":558,"Unfold All Regions":559,"Fold All Regions Except Selected":560,"Unfold All Regions Except Selected":561,"Fold All":562,"Unfold All":563,"Go to Parent Fold":564,"Go to Previous Folding Range":565,"Go to Next Folding Range":566,"Fold Level {0}":567,"Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations.":568,"Color of the folding control in the editor gutter.":569,"Icon for expanded ranges in the editor glyph margin.":570,"Icon for collapsed ranges in the editor glyph margin.":571,"Editor Font Zoom In":572,"Editor Font Zoom Out":573,"Editor Font Zoom Reset":574,"Made 1 formatting edit on line {0}":575,"Made {0} formatting edits on line {1}":576,"Made 1 formatting edit between lines {0} and {1}":577,"Made {0} formatting edits between lines {1} and {2}":578,"Format Document":579,"Format Selection":580,"Go to Next Problem (Error, Warning, Info)":581,"Icon for goto next marker.":582,"Go to Previous Problem (Error, Warning, Info)":583,"Icon for goto previous marker.":584,"Go to Next Problem in Files (Error, Warning, Info)":585,"Next &&Problem":586,"Go to Previous Problem in Files (Error, Warning, Info)":587,"Previous &&Problem":588,Error:589,Warning:590,Info:591,Hint:592,"{0} at {1}. ":593,"{0} of {1} problems":594,"{0} of {1} problem":595,"Editor marker navigation widget error color.":596,"Editor marker navigation widget error heading background.":597,"Editor marker navigation widget warning color.":598,"Editor marker navigation widget warning heading background.":599,"Editor marker navigation widget info color.":600,"Editor marker navigation widget info heading background.":601,"Editor marker navigation widget background.":602,Peek:603,Definitions:604,"No definition found for '{0}'":605,"No definition found":606,"Go to Definition":607,"Open Definition to the Side":608,"Peek Definition":609,Declarations:610,"No declaration found for '{0}'":611,"No declaration found":612,"Go to Declaration":613,"Peek Declaration":614,"Type Definitions":615,"No type definition found for '{0}'":616,"No type definition found":617,"Go to Type Definition":618,"Peek Type Definition":619,Implementations:620,"No implementation found for '{0}'":621,"No implementation found":622,"Go to Implementations":623,"Peek Implementations":624,"No references found for '{0}'":625,"No references found":626,"Go to References":627,References:628,"Peek References":629,"Go To Any Symbol":630,Locations:631,"No results for '{0}'":632,"Go to &&Definition":633,"Go to &&Declaration":634,"Go to &&Type Definition":635,"Go to &&Implementations":636,"Go to &&References":637,"Click to show {0} definitions.":638,"Whether reference peek is visible, like 'Peek References' or 'Peek Definition'":639,"{0} references":640,"{0} reference":641,"no preview available":642,"symbol in {0} on line {1} at column {2}":643,"symbol in {0} on line {1} at column {2}, {3}":644,"1 symbol in {0}, full path {1}":645,"{0} symbols in {1}, full path {2}":646,"No results found":647,"Found 1 symbol in {0}":648,"Found {0} symbols in {1}":649,"Found {0} symbols in {1} files":650,"Whether there are symbol locations that can be navigated via keyboard-only.":651,"Symbol {0} of {1}, {2} for next":652,"Symbol {0} of {1}":653,"Show Hover":654,"Show Definition Preview Hover":655,"Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.":656,"View Problem":657,"No quick fixes available":658,"Checking for quick fixes...":659,"Replace with Previous Value":660,"Replace with Next Value":661,"Convert Indentation to Spaces":662,"Convert Indentation to Tabs":663,"Configured Tab Size":664,"Select Tab Size for Current File":665,"Indent Using Tabs":666,"Indent Using Spaces":667,"Detect Indentation from Content":668,"Reindent Lines":669,"Reindent Selected Lines":670,"Whether an inline suggestion is visible":671,"Whether the inline suggestion starts with whitespace":672,"Show Next Inline Suggestion":673,"Show Previous Inline Suggestion":674,"Trigger Inline Suggestion":675,Next:676,Previous:677,Accept:678,"Suggestion:":679,"Copy Line Up":680,"&&Copy Line Up":681,"Copy Line Down":682,"Co&&py Line Down":683,"Duplicate Selection":684,"&&Duplicate Selection":685,"Move Line Up":686,"Mo&&ve Line Up":687,"Move Line Down":688,"Move &&Line Down":689,"Sort Lines Ascending":690,"Sort Lines Descending":691,"Trim Trailing Whitespace":692,"Delete Line":693,"Indent Line":694,"Outdent Line":695,"Insert Line Above":696,"Insert Line Below":697,"Delete All Left":698,"Delete All Right":699,"Join Lines":700,"Transpose characters around the cursor":701,"Transform to Uppercase":702,"Transform to Lowercase":703,"Transform to Title Case":704,"Transform to Snake Case":705,"Start Linked Editing":706,"Background color when the editor auto renames on type.":707,"Execute command":708,"Follow link":709,"cmd + click":710,"ctrl + click":711,"option + click":712,"alt + click":713,"Execute command {0}":714,"Failed to open this link because it is not well-formed: {0}":715,"Failed to open this link because its target is missing.":716,"Open Link":717,"Whether the editor is currently showing an inline message":718,"Cannot edit in read-only editor":719,"Cursor added: {0}":720,"Cursors added: {0}":721,"Add Cursor Above":722,"&&Add Cursor Above":723,"Add Cursor Below":724,"A&&dd Cursor Below":725,"Add Cursors to Line Ends":726,"Add C&&ursors to Line Ends":727,"Add Cursors To Bottom":728,"Add Cursors To Top":729,"Add Selection To Next Find Match":730,"Add &&Next Occurrence":731,"Add Selection To Previous Find Match":732,"Add P&&revious Occurrence":733,"Move Last Selection To Next Find Match":734,"Move Last Selection To Previous Find Match":735,"Select All Occurrences of Find Match":736,"Select All &&Occurrences":737,"Change All Occurrences":738,"Trigger Parameter Hints":739,"Icon for show next parameter hint.":740,"Icon for show previous parameter hint.":741,"{0}, hint":742,"Whether the current code editor is embedded inside peek":743,"Background color of the peek view title area.":744,"Color of the peek view title.":745,"Color of the peek view title info.":746,"Color of the peek view borders and arrow.":747,"Background color of the peek view result list.":748,"Foreground color for line nodes in the peek view result list.":749,"Foreground color for file nodes in the peek view result list.":750,"Background color of the selected entry in the peek view result list.":751,"Foreground color of the selected entry in the peek view result list.":752,"Background color of the peek view editor.":753,"Background color of the gutter in the peek view editor.":754,"Match highlight color in the peek view result list.":755,"Match highlight color in the peek view editor.":756,"Match highlight border in the peek view editor.":757,"Open a text editor first to go to a line.":758,"Go to line {0} and character {1}.":759,"Go to line {0}.":760,"Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.":761,"Current Line: {0}, Character: {1}. Type a line number to navigate to.":762,"To go to a symbol, first open a text editor with symbol information.":763,"The active text editor does not provide symbol information.":764,"No matching editor symbols":765,"No editor symbols":766,"Open to the Side":767,"Open to the Bottom":768,"symbols ({0})":769,"properties ({0})":770,"methods ({0})":771,"functions ({0})":772,"constructors ({0})":773,"variables ({0})":774,"classes ({0})":775,"structs ({0})":776,"events ({0})":777,"operators ({0})":778,"interfaces ({0})":779,"namespaces ({0})":780,"packages ({0})":781,"type parameters ({0})":782,"modules ({0})":783,"enumerations ({0})":784,"enumeration members ({0})":785,"strings ({0})":786,"files ({0})":787,"arrays ({0})":788,"numbers ({0})":789,"booleans ({0})":790,"objects ({0})":791,"keys ({0})":792,"fields ({0})":793,"constants ({0})":794,"No result.":795,"An unknown error occurred while resolving rename location":796,"Renaming '{0}'":797,"Renaming {0}":798,"Successfully renamed '{0}' to '{1}'. Summary: {2}":799,"Rename failed to apply edits":800,"Rename failed to compute edits":801,"Rename Symbol":802,"Enable/disable the ability to preview changes before renaming":803,"Whether the rename input widget is visible":804,"Rename input. Type new name and press Enter to commit.":805,"{0} to Rename, {1} to Preview":806,"Expand Selection":807,"&&Expand Selection":808,"Shrink Selection":809,"&&Shrink Selection":810,"Whether the editor in current in snippet mode":811,"Whether there is a next tab stop when in snippet mode":812,"Whether there is a previous tab stop when in snippet mode":813,Sunday:814,Monday:815,Tuesday:816,Wednesday:817,Thursday:818,Friday:819,Saturday:820,Sun:821,Mon:822,Tue:823,Wed:824,Thu:825,Fri:826,Sat:827,January:828,February:829,March:830,April:831,May:832,June:833,July:834,August:835,September:836,October:837,November:838,December:839,Jan:840,Feb:841,Mar:842,Apr:843,Jun:844,Jul:845,Aug:846,Sep:847,Oct:848,Nov:849,Dec:850,"Whether suggestion are visible":851,"Whether suggestion details are visible":852,"Whether there are multiple suggestions to pick from":853,"Whether inserting the current suggestion yields in a change or has everything already been typed":854,"Whether suggestions are inserted when pressing Enter":855,"Whether the current suggestion has insert and replace behaviour":856,"Whether the default behaviour is to insert or replace":857,"Whether the current suggestion supports to resolve further details":858,"Accepting '{0}' made {1} additional edits":859,"Trigger Suggest":860,Insert:861,"show less":862,"show more":863,"Reset Suggest Widget Size":864,"Background color of the suggest widget.":865,"Border color of the suggest widget.":866,"Foreground color of the suggest widget.":867,"Foreground color of the selected entry in the suggest widget.":868,"Icon foreground color of the selected entry in the suggest widget.":869,"Background color of the selected entry in the suggest widget.":870,"Color of the match highlights in the suggest widget.":871,"Color of the match highlights in the suggest widget when an item is focused.":872,"No suggestions.":873,"{0}, docs: {1}":874,Suggest:875,"Icon for more information in the suggest widget.":876,"Read More":877,"The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":878,"The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":879,"The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":880,"The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":881,"The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":882,"The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":883,"The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":884,"The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":885,"The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":886,"The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":887,"The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":888,"The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":889,"The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":890,"The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":891,"The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":892,"The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":893,"The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":894,"The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":895,"The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":896,"The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":897,"The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":898,"The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":899,"The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":900,"The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":901,"The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":902,"The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":903,"The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":904,"The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":905,"The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":906,"The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":907,"The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":908,"The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":909,"The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget.":910,"Toggle Tab Key Moves Focus":911,"Pressing Tab will now move focus to the next focusable element":912,"Pressing Tab will now insert the tab character":913,"Developer: Force Retokenize":914,"Unusual Line Terminators":915,"Detected unusual line terminators":916,"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`.":917,"Remove Unusual Line Terminators":918,Ignore:919,"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.":920,"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.":921,"Border color of a symbol during read-access, like reading a variable.":922,"Border color of a symbol during write-access, like writing to a variable.":923,"Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations.":924,"Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations.":925,"Go to Next Symbol Highlight":926,"Go to Previous Symbol Highlight":927,"Trigger Symbol Highlight":928,"Delete Word":929,"Default Language Configuration Overrides":930,"Configure editor settings to be overridden for a language.":931,"This setting does not support per-language configuration.":932,"Cannot register an empty property":933,"Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.":934,"Cannot register '{0}'. This property is already registered.":935,"A command that returns information about context keys":936,"Whether the operating system is Windows":937,"({0}) was pressed. Waiting for second key of chord...":938,"The key combination ({0}, {1}) is not a command.":939,Workbench:940,"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.":941,"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.":942,"Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.":943,"Controls tree indentation in pixels.":944,"Controls whether the tree should render indent guides.":945,"Controls whether lists and trees have smooth scrolling.":946,"Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes.":947,"Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements.":948,"Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.":949,"Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.":950,"Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.":951,"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.":952,"{0}, {1}":953,"recently used":954,"other commands":955,"Command '{0}' resulted in an error ({1})":956,"global commands":957,"editor commands":958,"Overall foreground color. This color is only used if not overridden by a component.":959,"Overall foreground color for error messages. This color is only used if not overridden by a component.":960,"The default color for icons in the workbench.":961,"Overall border color for focused elements. This color is only used if not overridden by a component.":962,"An extra border around elements to separate them from others for greater contrast.":963,"An extra border around active elements to separate them from others for greater contrast.":964,"Foreground color for links in text.":965,"Foreground color for links in text when clicked on and on mouse hover.":966,"Background color for code blocks in text.":967,"Shadow color of widgets such as find/replace inside the editor.":968,"Input box background.":969,"Input box foreground.":970,"Input box border.":971,"Border color of activated options in input fields.":972,"Background color of activated options in input fields.":973,"Foreground color of activated options in input fields.":974,"Input validation background color for information severity.":975,"Input validation foreground color for information severity.":976,"Input validation border color for information severity.":977,"Input validation background color for warning severity.":978,"Input validation foreground color for warning severity.":979,"Input validation border color for warning severity.":980,"Input validation background color for error severity.":981,"Input validation foreground color for error severity.":982,"Input validation border color for error severity.":983,"Dropdown background.":984,"Dropdown foreground.":985,"Button foreground color.":986,"Button background color.":987,"Button background color when hovering.":988,"Badge background color. Badges are small information labels, e.g. for search results count.":989,"Badge foreground color. Badges are small information labels, e.g. for search results count.":990,"Scrollbar shadow to indicate that the view is scrolled.":991,"Scrollbar slider background color.":992,"Scrollbar slider background color when hovering.":993,"Scrollbar slider background color when clicked on.":994,"Background color of the progress bar that can show for long running operations.":995,"Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations.":996,"Foreground color of error squigglies in the editor.":997,"Border color of error boxes in the editor.":998,"Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations.":999,"Foreground color of warning squigglies in the editor.":1e3,"Border color of warning boxes in the editor.":1001,"Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations.":1002,"Foreground color of info squigglies in the editor.":1003,"Border color of info boxes in the editor.":1004,"Foreground color of hint squigglies in the editor.":1005,"Border color of hint boxes in the editor.":1006,"Editor background color.":1007,"Editor default foreground color.":1008,"Background color of editor widgets, such as find/replace.":1009,"Foreground color of editor widgets, such as find/replace.":1010,"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.":1011,"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.":1012,"Quick picker background color. The quick picker widget is the container for pickers like the command palette.":1013,"Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.":1014,"Quick picker title background color. The quick picker widget is the container for pickers like the command palette.":1015,"Quick picker color for grouping labels.":1016,"Quick picker color for grouping borders.":1017,"Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.":1018,"Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.":1019,"Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.":1020,"Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.":1021,"Color of the editor selection.":1022,"Color of the selected text for high contrast.":1023,"Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations.":1024,"Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations.":1025,"Border color for regions with the same content as the selection.":1026,"Color of the current search match.":1027,"Color of the other search matches. The color must not be opaque so as not to hide underlying decorations.":1028,"Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.":1029,"Border color of the current search match.":1030,"Border color of the other search matches.":1031,"Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations.":1032,"Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations.":1033,"Background color of the editor hover.":1034,"Foreground color of the editor hover.":1035,"Border color of the editor hover.":1036,"Background color of the editor hover status bar.":1037,"Color of active links.":1038,"Foreground color of inline hints":1039,"Background color of inline hints":1040,"Foreground color of inline hints for types":1041,"Background color of inline hints for types":1042,"Foreground color of inline hints for parameters":1043,"Background color of inline hints for parameters":1044,"The color used for the lightbulb actions icon.":1045,"The color used for the lightbulb auto fix actions icon.":1046,"Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations.":1047,"Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations.":1048,"Outline color for the text that got inserted.":1049,"Outline color for text that got removed.":1050,"Border color between the two text editors.":1051,"Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.":1052,"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.":1053,"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.":1054,"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.":1055,"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.":1056,"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.":1057,"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.":1058,"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.":1059,"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.":1060,"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.":1061,"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.":1062,"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.":1063,"List/Tree background when hovering over items using the mouse.":1064,"List/Tree foreground when hovering over items using the mouse.":1065,"List/Tree drag and drop background when moving items around using the mouse.":1066,"List/Tree foreground color of the match highlights when searching inside the list/tree.":1067,"List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.":1068,"Background color of the type filter widget in lists and trees.":1069,"Outline color of the type filter widget in lists and trees.":1070,"Outline color of the type filter widget in lists and trees, when there are no matches.":1071,"Tree stroke color for the indentation guides.":1072,"Please use quickInputList.focusBackground instead":1073,"Quick picker foreground color for the focused item.":1074,"Quick picker icon foreground color for the focused item.":1075,"Quick picker background color for the focused item.":1076,"Border color of menus.":1077,"Foreground color of menu items.":1078,"Background color of menu items.":1079,"Foreground color of the selected menu item in menus.":1080,"Background color of the selected menu item in menus.":1081,"Border color of the selected menu item in menus.":1082,"Color of a separator menu item in menus.":1083,"Toolbar background when hovering over actions using the mouse":1084,"Highlight background color of a snippet tabstop.":1085,"Highlight border color of a snippet tabstop.":1086,"Highlight background color of the final tabstop of a snippet.":1087,"Highlight border color of the final tabstop of a snippet.":1088,"Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations.":1089,"Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations.":1090,"Minimap marker color for find matches.":1091,"Minimap marker color for repeating editor selections.":1092,"Minimap marker color for the editor selection.":1093,"Minimap marker color for errors.":1094,"Minimap marker color for warnings.":1095,"Minimap background color.":1096,'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.':1097,"Minimap slider background color.":1098,"Minimap slider background color when hovering.":1099,"Minimap slider background color when clicked on.":1100,"The color used for the problems error icon.":1101,"The color used for the problems warning icon.":1102,"The color used for the problems info icon.":1103,"The id of the font to use. If not set, the font that is defined first is used.":1104,"The font character associated with the icon definition.":1105,"Icon for the close action in widgets.":1106,"The following files have been closed and modified on disk: {0}.":1107,"The following files have been modified in an incompatible way: {0}.":1108,"Could not undo '{0}' across all files. {1}":1109,"Could not undo '{0}' across all files because changes were made to {1}":1110,"Could not undo '{0}' across all files because there is already an undo or redo operation running on {1}":1111,"Could not undo '{0}' across all files because an undo or redo operation occurred in the meantime":1112,"Would you like to undo '{0}' across all files?":1113,"Undo in {0} Files":1114,"Undo this File":1115,Cancel:1116,"Could not undo '{0}' because there is already an undo or redo operation running.":1117,"Would you like to undo '{0}'?":1118,Yes:1119,"Could not redo '{0}' across all files. {1}":1120,"Could not redo '{0}' across all files because changes were made to {1}":1121,"Could not redo '{0}' across all files because there is already an undo or redo operation running on {1}":1122,"Could not redo '{0}' across all files because an undo or redo operation occurred in the meantime":1123,"Could not redo '{0}' because there is already an undo or redo operation running.":1124},V$={"zh-cn":{"0":"{0} ({1})","1":"\u8F93\u5165","2":"\u533A\u5206\u5927\u5C0F\u5199","3":"\u5168\u5B57\u5339\u914D","4":"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F","5":"\u4FDD\u7559\u5927\u5C0F\u5199","6":"\u6B63\u5728\u52A0\u8F7D\u2026","7":"\u9519\u8BEF: {0}","8":"\u8B66\u544A: {0}","9":"\u4FE1\u606F: {0}","10":"for history","11":"\u672A\u7ED1\u5B9A","12":"\u6E05\u9664","13":"\u7981\u7528\u8F93\u5165\u65F6\u7B5B\u9009","14":"\u542F\u7528\u8F93\u5165\u65F6\u7B5B\u9009","15":"\u672A\u627E\u5230\u5143\u7D20","16":"\u5DF2\u5339\u914D {0} \u4E2A\u5143\u7D20(\u5171 {1} \u4E2A)","17":"(\u7A7A)","18":"{0}: {1}","19":"\u53D1\u751F\u4E86\u7CFB\u7EDF\u9519\u8BEF ({0})","20":"\u51FA\u73B0\u672A\u77E5\u9519\u8BEF\u3002\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F\uFF0C\u8BF7\u53C2\u9605\u65E5\u5FD7\u3002","21":"{0} \u4E2A(\u5171 {1} \u4E2A\u9519\u8BEF)","22":"Ctrl","23":"Shift","24":"Alt","25":"Windows","26":"\u8D85\u952E","27":"Control","28":"Command","29":"\u4E0A\u4E00\u6B65","30":'\u6309 "Enter" \u4EE5\u786E\u8BA4\u6216\u6309 "Esc" \u4EE5\u53D6\u6D88',"31":"{0}/{1}","32":"\u5728\u6B64\u8F93\u5165\u53EF\u7F29\u5C0F\u7ED3\u679C\u8303\u56F4\u3002","33":"{0} \u4E2A\u7ED3\u679C","34":"\u5DF2\u9009 {0} \u9879","35":"\u786E\u5B9A","36":"\u81EA\u5B9A\u4E49","37":"\u540E\u9000 ({0})","38":"\u5FEB\u901F\u8F93\u5165","39":"\u5373\u4F7F\u8F6C\u5230\u8F83\u957F\u7684\u884C\uFF0C\u4E5F\u4E00\u76F4\u5230\u672B\u5C3E","40":"\u5DF2\u5220\u9664\u8F85\u52A9\u6E38\u6807","41":"\u7F16\u8F91\u5668","42":"\u73B0\u5728\u65E0\u6CD5\u8BBF\u95EE\u7F16\u8F91\u5668\u3002\u6309 {0} \u83B7\u53D6\u9009\u9879\u3002","43":"\u7F16\u8F91\u5668\u662F\u5426\u8FD0\u884C\u53EF\u53D6\u6D88\u7684\u64CD\u4F5C\uFF0C\u4F8B\u5982\u201C\u9884\u89C8\u5F15\u7528\u201D","44":"\u64A4\u6D88(&&U)","45":"\u64A4\u6D88","46":"\u6062\u590D(&&R)","47":"\u6062\u590D","48":"\u5168\u9009(&&S)","49":"\u9009\u62E9\u5168\u90E8","50":"\u5149\u6807\u6570\u91CF\u88AB\u9650\u5236\u4E3A {0}\u3002","51":"\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u63D2\u5165\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","52":"\u5DEE\u5F02\u7F16\u8F91\u5668\u4E2D\u5220\u9664\u9879\u7684\u7EBF\u6761\u4FEE\u9970\u3002","53":"\u6587\u4EF6\u8FC7\u5927\uFF0C\u65E0\u6CD5\u6BD4\u8F83\u3002","54":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u63D2\u5165\u201D\u56FE\u6807\u3002","55":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u5220\u9664\u201D\u56FE\u6807\u3002","56":"\u5DEE\u5F02\u8BC4\u5BA1\u4E2D\u7684\u201C\u5173\u95ED\u201D\u56FE\u6807\u3002","57":"\u5173\u95ED","58":"\u672A\u66F4\u6539\u884C","59":"\u66F4\u6539\u4E86 1 \u884C","60":"\u66F4\u6539\u4E86 {0} \u884C","61":"\u5DEE\u5F02 {0}/ {1}: \u539F\u59CB\u884C {2}\uFF0C{3}\uFF0C\u4FEE\u6539\u540E\u7684\u884C {4}\uFF0C{5}","62":"\u7A7A\u767D","63":"{0} \u672A\u66F4\u6539\u7684\u884C {1}","64":"{0}\u539F\u59CB\u884C{1}\u4FEE\u6539\u7684\u884C{2}","65":"+ {0}\u4FEE\u6539\u7684\u884C{1}","66":"- {0}\u539F\u59CB\u884C{1}","67":"\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u5DEE\u5F02","68":"\u8F6C\u81F3\u4E0A\u4E00\u4E2A\u5DEE\u5F02","69":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","70":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C","71":"\u590D\u5236\u5DF2\u5220\u9664\u7684\u884C({0})","72":"\u8FD8\u539F\u6B64\u66F4\u6539","73":"\u7F16\u8F91\u5668","74":"\u4E00\u4E2A\u5236\u8868\u7B26\u7B49\u4E8E\u7684\u7A7A\u683C\u6570\u3002\u5728 `#editor.detectIndentation#` \u542F\u7528\u65F6\uFF0C\u6839\u636E\u6587\u4EF6\u5185\u5BB9\uFF0C\u8BE5\u8BBE\u7F6E\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6\u3002","75":"\u6309 `Tab` \u952E\u65F6\u63D2\u5165\u7A7A\u683C\u3002\u8BE5\u8BBE\u7F6E\u5728 `#editor.detectIndentation#` \u542F\u7528\u65F6\u6839\u636E\u6587\u4EF6\u5185\u5BB9\u53EF\u80FD\u4F1A\u88AB\u8986\u76D6\u3002","76":"\u63A7\u5236\u662F\u5426\u5728\u6253\u5F00\u6587\u4EF6\u65F6\uFF0C\u57FA\u4E8E\u6587\u4EF6\u5185\u5BB9\u81EA\u52A8\u68C0\u6D4B `#editor.tabSize#` \u548C `#editor.insertSpaces#`\u3002","77":"\u5220\u9664\u81EA\u52A8\u63D2\u5165\u7684\u5C3E\u968F\u7A7A\u767D\u7B26\u53F7\u3002","78":"\u5BF9\u5927\u578B\u6587\u4EF6\u8FDB\u884C\u7279\u6B8A\u5904\u7406\uFF0C\u7981\u7528\u67D0\u4E9B\u5185\u5B58\u5BC6\u96C6\u578B\u529F\u80FD\u3002","79":"\u63A7\u5236\u662F\u5426\u6839\u636E\u6587\u6863\u4E2D\u7684\u6587\u5B57\u8BA1\u7B97\u81EA\u52A8\u5B8C\u6210\u5217\u8868\u3002","80":"\u4EC5\u5EFA\u8BAE\u6D3B\u52A8\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","81":"\u5EFA\u8BAE\u4F7F\u7528\u540C\u4E00\u8BED\u8A00\u7684\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","82":"\u5EFA\u8BAE\u6240\u6709\u6253\u5F00\u7684\u6587\u6863\u4E2D\u7684\u5B57\u8BCD\u3002","83":"\u63A7\u5236\u901A\u8FC7\u54EA\u4E9B\u6587\u6863\u8BA1\u7B97\u57FA\u4E8E\u5B57\u8BCD\u7684\u8865\u5168\u3002","84":"\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u542F\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","85":"\u5BF9\u6240\u6709\u989C\u8272\u4E3B\u9898\u7981\u7528\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","86":'\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u662F\u7531\u5F53\u524D\u989C\u8272\u4E3B\u9898\u7684 "semanticHighlighting" \u8BBE\u7F6E\u914D\u7F6E\u7684\u3002',"87":"\u63A7\u5236\u662F\u5426\u4E3A\u652F\u6301\u5B83\u7684\u8BED\u8A00\u663E\u793A\u8BED\u4E49\u7A81\u51FA\u663E\u793A\u3002","88":"\u5728\u901F\u89C8\u7F16\u8F91\u5668\u4E2D\uFF0C\u5373\u4F7F\u53CC\u51FB\u5176\u4E2D\u7684\u5185\u5BB9\u6216\u8005\u6309 `Esc` \u952E\uFF0C\u4E5F\u4FDD\u6301\u5176\u6253\u5F00\u72B6\u6001\u3002","89":"\u7531\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u8D85\u8FC7\u8FD9\u4E2A\u957F\u5EA6\u7684\u884C\u5C06\u4E0D\u4F1A\u88AB\u6807\u8BB0","90":"\u8D85\u65F6(\u4EE5\u6BEB\u79D2\u4E3A\u5355\u4F4D)\uFF0C\u4E4B\u540E\u5C06\u53D6\u6D88\u5DEE\u5F02\u8BA1\u7B97\u3002\u4F7F\u75280\u8868\u793A\u6CA1\u6709\u8D85\u65F6\u3002","91":"Maximum file size in MB for which to compute diffs. Use 0 for no limit.","92":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u663E\u793A\u65B9\u5F0F\u662F\u5E76\u6392\u8FD8\u662F\u5185\u8054\u3002","93":"\u542F\u7528\u540E\uFF0C\u5DEE\u5F02\u7F16\u8F91\u5668\u5C06\u5FFD\u7565\u524D\u5BFC\u7A7A\u683C\u6216\u5C3E\u968F\u7A7A\u683C\u4E2D\u7684\u66F4\u6539\u3002","94":"\u63A7\u5236\u5DEE\u5F02\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u6DFB\u52A0/\u5220\u9664\u7684\u66F4\u6539\u663E\u793A +/- \u6307\u793A\u7B26\u53F7\u3002","95":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A CodeLens\u3002","96":"\u6C38\u4E0D\u6362\u884C\u3002","97":"\u5C06\u5728\u89C6\u533A\u5BBD\u5EA6\u5904\u6362\u884C\u3002","98":"\u5C06\u6839\u636E `#editor.wordWrap#` \u8BBE\u7F6E\u6362\u884C\u3002","99":"\u7F16\u8F91\u5668\u5C06\u4F7F\u7528\u5E73\u53F0 API \u4EE5\u68C0\u6D4B\u662F\u5426\u9644\u52A0\u4E86\u5C4F\u5E55\u9605\u8BFB\u5668\u3002","100":"\u7F16\u8F91\u5668\u5C06\u9488\u5BF9\u4E0E\u5C4F\u5E55\u9605\u8BFB\u5668\u642D\u914D\u4F7F\u7528\u8FDB\u884C\u6C38\u4E45\u4F18\u5316\u3002\u5C06\u7981\u7528\u81EA\u52A8\u6362\u884C\u3002","101":"\u7F16\u8F91\u5668\u5C06\u4E0D\u518D\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\u8FDB\u884C\u4F18\u5316\u3002","102":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5728\u5BF9\u5C4F\u5E55\u9605\u8BFB\u5668\u8FDB\u884C\u4E86\u4F18\u5316\u7684\u6A21\u5F0F\u4E0B\u8FD0\u884C\u3002\u8BBE\u7F6E\u4E3A\u201C\u5F00\u201D\u5C06\u7981\u7528\u81EA\u52A8\u6362\u884C\u3002","103":"\u63A7\u5236\u5728\u6CE8\u91CA\u65F6\u662F\u5426\u63D2\u5165\u7A7A\u683C\u5B57\u7B26\u3002","104":"\u63A7\u5236\u5728\u5BF9\u884C\u6CE8\u91CA\u6267\u884C\u5207\u6362\u3001\u6DFB\u52A0\u6216\u5220\u9664\u64CD\u4F5C\u65F6\uFF0C\u662F\u5426\u5E94\u5FFD\u7565\u7A7A\u884C\u3002","105":"\u63A7\u5236\u5728\u6CA1\u6709\u9009\u62E9\u5185\u5BB9\u65F6\u8FDB\u884C\u590D\u5236\u662F\u5426\u590D\u5236\u5F53\u524D\u884C\u3002","106":"\u63A7\u5236\u5728\u952E\u5165\u65F6\u5149\u6807\u662F\u5426\u5E94\u8DF3\u8F6C\u4EE5\u67E5\u627E\u5339\u914D\u9879\u3002","107":"\u5207\u52FF\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","108":"\u59CB\u7EC8\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\uFF0C\u5305\u62EC\u5149\u6807\u4F4D\u7F6E\u7684\u5B57\u8BCD\u3002","109":"\u4EC5\u4E3A\u7F16\u8F91\u5668\u9009\u62E9\u4E2D\u7684\u641C\u7D22\u5B57\u7B26\u4E32\u8BBE\u5B9A\u79CD\u5B50\u3002","110":"\u63A7\u5236\u662F\u5426\u5C06\u7F16\u8F91\u5668\u9009\u4E2D\u5185\u5BB9\u4F5C\u4E3A\u641C\u7D22\u8BCD\u586B\u5165\u5230\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u3002","111":"\u4ECE\u4E0D\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D(\u9ED8\u8BA4)\u3002","112":"\u59CB\u7EC8\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","113":"\u9009\u62E9\u591A\u884C\u5185\u5BB9\u65F6\uFF0C\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u3002","114":"\u63A7\u5236\u81EA\u52A8\u6253\u5F00\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u7684\u6761\u4EF6\u3002","115":"\u63A7\u5236\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u662F\u5426\u8BFB\u53D6\u6216\u4FEE\u6539 macOS \u7684\u5171\u4EAB\u67E5\u627E\u526A\u8D34\u677F\u3002","116":'\u63A7\u5236 "\u67E5\u627E\u5C0F\u90E8\u4EF6" \u662F\u5426\u5E94\u5728\u7F16\u8F91\u5668\u9876\u90E8\u6DFB\u52A0\u989D\u5916\u7684\u884C\u3002\u5982\u679C\u4E3A true, \u5219\u53EF\u4EE5\u5728 "\u67E5\u627E\u5C0F\u5DE5\u5177" \u53EF\u89C1\u65F6\u6EDA\u52A8\u5230\u7B2C\u4E00\u884C\u4E4B\u5916\u3002',"117":"\u63A7\u5236\u5728\u627E\u4E0D\u5230\u5176\u4ED6\u5339\u914D\u9879\u65F6\uFF0C\u662F\u5426\u81EA\u52A8\u4ECE\u5F00\u5934(\u6216\u7ED3\u5C3E)\u91CD\u65B0\u5F00\u59CB\u641C\u7D22\u3002","118":'\u542F\u7528/\u7981\u7528\u5B57\u4F53\u8FDE\u5B57("calt" \u548C "liga" \u5B57\u4F53\u7279\u6027)\u3002\u5C06\u6B64\u66F4\u6539\u4E3A\u5B57\u7B26\u4E32\uFF0C\u53EF\u5BF9 "font-feature-settings" CSS \u5C5E\u6027\u8FDB\u884C\u7CBE\u7EC6\u63A7\u5236\u3002',"119":'\u663E\u5F0F "font-feature-settings" CSS \u5C5E\u6027\u3002\u5982\u679C\u53EA\u9700\u6253\u5F00/\u5173\u95ED\u8FDE\u5B57\uFF0C\u53EF\u4EE5\u6539\u4E3A\u4F20\u9012\u5E03\u5C14\u503C\u3002',"120":'\u914D\u7F6E\u5B57\u4F53\u8FDE\u5B57\u6216\u5B57\u4F53\u7279\u6027\u3002\u53EF\u4EE5\u662F\u7528\u4E8E\u542F\u7528/\u7981\u7528\u8FDE\u5B57\u7684\u5E03\u5C14\u503C\uFF0C\u6216\u7528\u4E8E\u8BBE\u7F6E CSS "font-feature-settings" \u5C5E\u6027\u503C\u7684\u5B57\u7B26\u4E32\u3002',"121":"\u63A7\u5236\u5B57\u4F53\u5927\u5C0F(\u50CF\u7D20)\u3002","122":"\u4EC5\u5141\u8BB8\u4F7F\u7528\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u4F7F\u7528\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","123":"\u63A7\u5236\u5B57\u4F53\u7C97\u7EC6\u3002\u63A5\u53D7\u5173\u952E\u5B57\u201C\u6B63\u5E38\u201D\u548C\u201C\u52A0\u7C97\u201D\uFF0C\u6216\u8005\u63A5\u53D7\u4ECB\u4E8E 1 \u81F3 1000 \u4E4B\u95F4\u7684\u6570\u5B57\u3002","124":"\u663E\u793A\u7ED3\u679C\u7684\u9884\u89C8\u89C6\u56FE (\u9ED8\u8BA4\u503C)","125":"\u8F6C\u5230\u4E3B\u7ED3\u679C\u5E76\u663E\u793A\u9884\u89C8\u89C6\u56FE","126":"\u8F6C\u5230\u4E3B\u7ED3\u679C\uFF0C\u5E76\u5BF9\u5176\u4ED6\u4EBA\u542F\u7528\u9632\u5077\u7AA5\u5BFC\u822A","127":'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.editor.gotoLocation.multipleDefinitions"\u6216"editor.editor.gotoLocation.multipleImplementations"\u3002',"128":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"129":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"130":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u58F0\u660E"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"131":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5B9E\u73B0"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"132":'\u63A7\u5236\u5B58\u5728\u591A\u4E2A\u76EE\u6807\u4F4D\u7F6E\u65F6"\u8F6C\u5230\u5F15\u7528"\u547D\u4EE4\u7684\u884C\u4E3A\u3002',"133":'\u5F53"\u8F6C\u5230\u5B9A\u4E49"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"134":'\u5F53"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u5907\u7528\u547D\u4EE4 ID\u3002',"135":'\u5F53"\u8F6C\u5230\u58F0\u660E"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"136":'\u5F53"\u8F6C\u5230\u5B9E\u73B0"\u7684\u7ED3\u679C\u4E3A\u5F53\u524D\u4F4D\u7F6E\u65F6\u5C06\u8981\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4\u7684 ID\u3002',"137":'\u5F53"\u8F6C\u5230\u5F15\u7528"\u7684\u7ED3\u679C\u662F\u5F53\u524D\u4F4D\u7F6E\u65F6\u6B63\u5728\u6267\u884C\u7684\u66FF\u4EE3\u547D\u4EE4 ID\u3002',"138":"\u63A7\u5236\u662F\u5426\u663E\u793A\u60AC\u505C\u63D0\u793A\u3002","139":"\u63A7\u5236\u663E\u793A\u60AC\u505C\u63D0\u793A\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","140":"\u63A7\u5236\u5F53\u9F20\u6807\u79FB\u52A8\u5230\u60AC\u505C\u63D0\u793A\u4E0A\u65F6\uFF0C\u5176\u662F\u5426\u4FDD\u6301\u53EF\u89C1\u3002","141":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u4EE3\u7801\u64CD\u4F5C\u5C0F\u706F\u6CE1\u63D0\u793A\u3002","142":"\u5728\u7F16\u8F91\u5668\u4E2D\u542F\u7528\u5185\u8054\u63D0\u793A\u3002","143":"Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.","144":"\u5728\u7F16\u8F91\u5668\u4E2D\u63A7\u5236\u5185\u5D4C\u63D0\u793A\u7684\u5B57\u4F53\u7CFB\u5217\u3002\u8BBE\u7F6E\u4E3A\u7A7A\u65F6\uFF0C\u4F7F\u7528 `#editor.fontFamily#`\u3002","145":`\u63A7\u5236\u884C\u9AD8\u3002\r - - \u4F7F\u7528 0 \u6839\u636E\u5B57\u53F7\u81EA\u52A8\u8BA1\u7B97\u884C\u9AD8\u3002\r - - \u4ECB\u4E8E 0 \u548C 8 \u4E4B\u95F4\u7684\u503C\u5C06\u7528\u4F5C\u5B57\u53F7\u7684\u4E58\u6570\u3002\r - - \u5927\u4E8E\u6216\u7B49\u4E8E 8 \u7684\u503C\u5C06\u7528\u4F5C\u6709\u6548\u503C\u3002`,"146":"\u63A7\u5236\u662F\u5426\u663E\u793A\u7F29\u7565\u56FE\u3002","147":"\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u4E0E\u7F16\u8F91\u5668\u5185\u5BB9\u76F8\u540C(\u5E76\u4E14\u53EF\u80FD\u6EDA\u52A8)\u3002","148":"\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u62C9\u4F38\u6216\u7F29\u5C0F\u4EE5\u586B\u5145\u7F16\u8F91\u5668\u7684\u9AD8\u5EA6(\u4E0D\u6EDA\u52A8)\u3002","149":"\u8FF7\u4F60\u5730\u56FE\u5C06\u6839\u636E\u9700\u8981\u7F29\u5C0F\uFF0C\u6C38\u8FDC\u4E0D\u4F1A\u5927\u4E8E\u7F16\u8F91\u5668(\u4E0D\u6EDA\u52A8)\u3002","150":"\u63A7\u5236\u8FF7\u4F60\u5730\u56FE\u7684\u5927\u5C0F\u3002","151":"\u63A7\u5236\u5728\u54EA\u4E00\u4FA7\u663E\u793A\u7F29\u7565\u56FE\u3002","152":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u3002","153":"\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u7ED8\u5236\u7684\u5185\u5BB9\u6BD4\u4F8B: 1\u30012 \u6216 3\u3002","154":"\u6E32\u67D3\u6BCF\u884C\u7684\u5B9E\u9645\u5B57\u7B26\uFF0C\u800C\u4E0D\u662F\u8272\u5757\u3002","155":"\u9650\u5236\u7F29\u7565\u56FE\u7684\u5BBD\u5EA6\uFF0C\u63A7\u5236\u5176\u6700\u591A\u663E\u793A\u7684\u5217\u6570\u3002","156":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u9876\u8FB9\u548C\u7B2C\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","157":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5E95\u8FB9\u548C\u6700\u540E\u4E00\u884C\u4E4B\u95F4\u7684\u95F4\u8DDD\u91CF\u3002","158":"\u5728\u8F93\u5165\u65F6\u663E\u793A\u542B\u6709\u53C2\u6570\u6587\u6863\u548C\u7C7B\u578B\u4FE1\u606F\u7684\u5C0F\u9762\u677F\u3002","159":"\u63A7\u5236\u53C2\u6570\u63D0\u793A\u83DC\u5355\u5728\u5230\u8FBE\u5217\u8868\u672B\u5C3E\u65F6\u8FDB\u884C\u5FAA\u73AF\u8FD8\u662F\u5173\u95ED\u3002","160":"\u5728\u5B57\u7B26\u4E32\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","161":"\u5728\u6CE8\u91CA\u5185\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","162":"\u5728\u5B57\u7B26\u4E32\u548C\u6CE8\u91CA\u5916\u542F\u7528\u5FEB\u901F\u5EFA\u8BAE\u3002","163":"\u63A7\u5236\u662F\u5426\u5728\u952E\u5165\u65F6\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","164":"\u4E0D\u663E\u793A\u884C\u53F7\u3002","165":"\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u7EDD\u5BF9\u884C\u6570\u3002","166":"\u5C06\u884C\u53F7\u663E\u793A\u4E3A\u4E0E\u5149\u6807\u76F8\u9694\u7684\u884C\u6570\u3002","167":"\u6BCF 10 \u884C\u663E\u793A\u4E00\u6B21\u884C\u53F7\u3002","168":"\u63A7\u5236\u884C\u53F7\u7684\u663E\u793A\u3002","169":"\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u5C06\u6E32\u67D3\u7684\u7B49\u5BBD\u5B57\u7B26\u6570\u3002","170":"\u6B64\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","171":"\u5728\u4E00\u5B9A\u6570\u91CF\u7684\u7B49\u5BBD\u5B57\u7B26\u540E\u663E\u793A\u5782\u76F4\u6807\u5C3A\u3002\u8F93\u5165\u591A\u4E2A\u503C\uFF0C\u663E\u793A\u591A\u4E2A\u6807\u5C3A\u3002\u82E5\u6570\u7EC4\u4E3A\u7A7A\uFF0C\u5219\u4E0D\u7ED8\u5236\u6807\u5C3A\u3002","172":"\u5782\u76F4\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","173":"\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","174":"\u5782\u76F4\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","175":"\u63A7\u5236\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","176":"\u6C34\u5E73\u6EDA\u52A8\u6761\u4EC5\u5728\u5FC5\u8981\u65F6\u53EF\u89C1\u3002","177":"\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u53EF\u89C1\u3002","178":"\u6C34\u5E73\u6EDA\u52A8\u6761\u5C06\u59CB\u7EC8\u9690\u85CF\u3002","179":"\u63A7\u5236\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u53EF\u89C1\u6027\u3002","180":"\u5782\u76F4\u6EDA\u52A8\u6761\u7684\u5BBD\u5EA6\u3002","181":"\u6C34\u5E73\u6EDA\u52A8\u6761\u7684\u9AD8\u5EA6\u3002","182":"\u63A7\u5236\u5355\u51FB\u6309\u9875\u6EDA\u52A8\u8FD8\u662F\u8DF3\u8F6C\u5230\u5355\u51FB\u4F4D\u7F6E\u3002","183":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u81EA\u52A8\u663E\u793A\u5185\u8054\u5EFA\u8BAE\u3002","184":"\u63A7\u5236\u662F\u5426\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002\u4F7F\u7528 \u201Cworkbench.colorCustomizations\u201D \u66FF\u4EE3\u62EC\u53F7\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","185":"Controls whether bracket pair guides are enabled or not.","186":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","187":"\u63A7\u5236\u662F\u5426\u7A81\u51FA\u663E\u793A\u7F16\u8F91\u5668\u4E2D\u6D3B\u52A8\u7684\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","188":"\u63D2\u5165\u5EFA\u8BAE\u800C\u4E0D\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","189":"\u63D2\u5165\u5EFA\u8BAE\u5E76\u8986\u76D6\u5149\u6807\u53F3\u4FA7\u7684\u6587\u672C\u3002","190":"\u63A7\u5236\u63A5\u53D7\u8865\u5168\u65F6\u662F\u5426\u8986\u76D6\u5355\u8BCD\u3002\u8BF7\u6CE8\u610F\uFF0C\u8FD9\u53D6\u51B3\u4E8E\u6269\u5C55\u9009\u62E9\u4F7F\u7528\u6B64\u529F\u80FD\u3002","191":"\u63A7\u5236\u5BF9\u5EFA\u8BAE\u7684\u7B5B\u9009\u548C\u6392\u5E8F\u662F\u5426\u8003\u8651\u5C0F\u7684\u62FC\u5199\u9519\u8BEF\u3002","192":"\u63A7\u5236\u6392\u5E8F\u65F6\u662F\u5426\u9996\u9009\u5149\u6807\u9644\u8FD1\u7684\u5B57\u8BCD\u3002","193":"\u63A7\u5236\u662F\u5426\u5728\u591A\u4E2A\u5DE5\u4F5C\u533A\u548C\u7A97\u53E3\u95F4\u5171\u4EAB\u8BB0\u5FC6\u7684\u5EFA\u8BAE\u9009\u9879(\u9700\u8981 `#editor.suggestSelection#`)\u3002","194":"\u63A7\u5236\u6D3B\u52A8\u4EE3\u7801\u6BB5\u662F\u5426\u963B\u6B62\u5FEB\u901F\u5EFA\u8BAE\u3002","195":"\u63A7\u5236\u662F\u5426\u5728\u5EFA\u8BAE\u4E2D\u663E\u793A\u6216\u9690\u85CF\u56FE\u6807\u3002","196":"\u63A7\u5236\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u5E95\u90E8\u7684\u72B6\u6001\u680F\u7684\u53EF\u89C1\u6027\u3002","197":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u9884\u89C8\u5EFA\u8BAE\u7ED3\u679C\u3002","198":"\u63A7\u5236\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u968F\u6807\u7B7E\u4E00\u8D77\u663E\u793A\u8FD8\u662F\u4EC5\u663E\u793A\u5728\u8BE6\u7EC6\u4FE1\u606F\u5C0F\u7EC4\u4EF6\u4E2D","199":"\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\u3002\u73B0\u5728\u53EF\u4EE5\u8C03\u6574\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u5927\u5C0F\u3002","200":'\u6B64\u8BBE\u7F6E\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528\u5355\u72EC\u7684\u8BBE\u7F6E\uFF0C\u5982"editor.suggest.showKeywords"\u6216"editor.suggest.showSnippets"\u3002',"201":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u65B9\u6CD5\u201D\u5EFA\u8BAE\u3002","202":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","203":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6784\u9020\u51FD\u6570\u201D\u5EFA\u8BAE\u3002","204":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5DF2\u542F\u7528\u201D\u5EFA\u8BAE\u3002","205":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5B57\u6BB5\u201D\u5EFA\u8BAE\u3002","206":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53D8\u91CF\u201D\u5EFA\u8BAE\u3002","207":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7C7B\u201D\u5EFA\u8BAE\u3002","208":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7ED3\u6784\u201D\u5EFA\u8BAE\u3002","209":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u63A5\u53E3\u201D\u5EFA\u8BAE\u3002","210":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6A21\u5757\u201D\u5EFA\u8BAE\u3002","211":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5C5E\u6027\u201D\u5EFA\u8BAE\u3002","212":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u4E8B\u4EF6\u201D\u5EFA\u8BAE\u3002","213":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u64CD\u4F5C\u7B26\u201D\u5EFA\u8BAE\u3002","214":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5355\u4F4D\u201D\u5EFA\u8BAE\u3002","215":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u503C\u201D\u5EFA\u8BAE\u3002","216":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5E38\u91CF\u201D\u5EFA\u8BAE\u3002","217":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u679A\u4E3E\u201D\u5EFA\u8BAE\u3002","218":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "enumMember" \u5EFA\u8BAE\u3002',"219":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u5173\u952E\u5B57\u201D\u5EFA\u8BAE\u3002","220":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u672C\u201D\u5EFA\u8BAE\u3002","221":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u989C\u8272\u201D\u5EFA\u8BAE\u3002","222":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u201D\u5EFA\u8BAE\u3002","223":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u53C2\u8003\u201D\u5EFA\u8BAE\u3002","224":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u81EA\u5B9A\u4E49\u989C\u8272\u201D\u5EFA\u8BAE\u3002","225":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u6587\u4EF6\u5939\u201D\u5EFA\u8BAE\u3002","226":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A "typeParameter" \u5EFA\u8BAE\u3002',"227":"\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A\u201C\u7247\u6BB5\u201D\u5EFA\u8BAE\u3002","228":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u7528\u6237"\u5EFA\u8BAE\u3002',"229":'\u542F\u7528\u540E\uFF0CIntelliSense \u5C06\u663E\u793A"\u95EE\u9898"\u5EFA\u8BAE\u3002',"230":"\u662F\u5426\u5E94\u59CB\u7EC8\u9009\u62E9\u524D\u5BFC\u548C\u5C3E\u968F\u7A7A\u683C\u3002","231":"\u63A7\u5236\u662F\u5426\u5E94\u5728\u9047\u5230\u63D0\u4EA4\u5B57\u7B26\u65F6\u63A5\u53D7\u5EFA\u8BAE\u3002\u4F8B\u5982\uFF0C\u5728 JavaScript \u4E2D\uFF0C\u534A\u89D2\u5206\u53F7 (`;`) \u53EF\u4EE5\u4E3A\u63D0\u4EA4\u5B57\u7B26\uFF0C\u80FD\u591F\u5728\u63A5\u53D7\u5EFA\u8BAE\u7684\u540C\u65F6\u952E\u5165\u8BE5\u5B57\u7B26\u3002","232":"\u4EC5\u5F53\u5EFA\u8BAE\u5305\u542B\u6587\u672C\u6539\u52A8\u65F6\u624D\u53EF\u4F7F\u7528 `Enter` \u952E\u8FDB\u884C\u63A5\u53D7\u3002","233":"\u63A7\u5236\u9664\u4E86 `Tab` \u952E\u4EE5\u5916\uFF0C `Enter` \u952E\u662F\u5426\u540C\u6837\u53EF\u4EE5\u63A5\u53D7\u5EFA\u8BAE\u3002\u8FD9\u80FD\u51CF\u5C11\u201C\u63D2\u5165\u65B0\u884C\u201D\u548C\u201C\u63A5\u53D7\u5EFA\u8BAE\u201D\u547D\u4EE4\u4E4B\u95F4\u7684\u6B67\u4E49\u3002","234":"\u63A7\u5236\u7F16\u8F91\u5668\u4E2D\u53EF\u7531\u5C4F\u5E55\u9605\u8BFB\u5668\u4E00\u6B21\u8BFB\u51FA\u7684\u884C\u6570\u3002\u6211\u4EEC\u68C0\u6D4B\u5230\u5C4F\u5E55\u9605\u8BFB\u5668\u65F6\uFF0C\u4F1A\u81EA\u52A8\u5C06\u9ED8\u8BA4\u503C\u8BBE\u7F6E\u4E3A 500\u3002\u8B66\u544A: \u5982\u679C\u884C\u6570\u5927\u4E8E\u9ED8\u8BA4\u503C\uFF0C\u53EF\u80FD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","235":"\u7F16\u8F91\u5668\u5185\u5BB9","236":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","237":"\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u62EC\u53F7\u3002","238":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u62EC\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u62EC\u53F7\u3002","239":"\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","240":"\u63A7\u5236\u5728\u5220\u9664\u65F6\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5220\u9664\u76F8\u90BB\u7684\u53F3\u5F15\u53F7\u6216\u53F3\u65B9\u62EC\u53F7\u3002","241":"\u4EC5\u5728\u81EA\u52A8\u63D2\u5165\u65F6\u624D\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","242":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u6539\u5199\u53F3\u5F15\u53F7\u6216\u53F3\u62EC\u53F7\u3002","243":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","244":"\u4EC5\u5F53\u5149\u6807\u4F4D\u4E8E\u7A7A\u767D\u5B57\u7B26\u5DE6\u4FA7\u65F6\uFF0C\u624D\u81EA\u52A8\u95ED\u5408\u5F15\u53F7\u3002","245":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5728\u5DE6\u5F15\u53F7\u540E\u81EA\u52A8\u63D2\u5165\u53F3\u5F15\u53F7\u3002","246":"\u7F16\u8F91\u5668\u4E0D\u4F1A\u81EA\u52A8\u63D2\u5165\u7F29\u8FDB\u3002","247":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3002","248":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u5E76\u9075\u5FAA\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u3002","249":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\u3001\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\u5E76\u8C03\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u5B9A onEnterRules\u3002","250":"\u7F16\u8F91\u5668\u5C06\u4FDD\u7559\u5F53\u524D\u884C\u7684\u7F29\u8FDB\uFF0C\u4F7F\u7528\u8BED\u8A00\u5B9A\u4E49\u7684\u62EC\u53F7\uFF0C\u8C03\u7528\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7279\u6B8A\u8F93\u5165\u89C4\u5219\uFF0C\u5E76\u9075\u5FAA\u7531\u8BED\u8A00\u5B9A\u4E49\u7684\u7F29\u8FDB\u89C4\u5219\u3002","251":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5728\u7528\u6237\u952E\u5165\u3001\u7C98\u8D34\u3001\u79FB\u52A8\u6216\u7F29\u8FDB\u884C\u65F6\u81EA\u52A8\u8C03\u6574\u7F29\u8FDB\u3002","252":"\u4F7F\u7528\u8BED\u8A00\u914D\u7F6E\u786E\u5B9A\u4F55\u65F6\u81EA\u52A8\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","253":"\u4F7F\u7528\u5F15\u53F7\u800C\u975E\u62EC\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","254":"\u4F7F\u7528\u62EC\u53F7\u800C\u975E\u5F15\u53F7\u6765\u5305\u4F4F\u6240\u9009\u5185\u5BB9\u3002","255":"\u63A7\u5236\u5728\u952E\u5165\u5F15\u53F7\u6216\u65B9\u62EC\u53F7\u65F6\uFF0C\u7F16\u8F91\u5668\u662F\u5426\u5E94\u81EA\u52A8\u5C06\u6240\u9009\u5185\u5BB9\u62EC\u8D77\u6765\u3002","256":"\u5728\u4F7F\u7528\u7A7A\u683C\u8FDB\u884C\u7F29\u8FDB\u65F6\u6A21\u62DF\u5236\u8868\u7B26\u7684\u9009\u62E9\u884C\u4E3A\u3002\u6240\u9009\u5185\u5BB9\u5C06\u59CB\u7EC8\u4F7F\u7528\u5236\u8868\u7B26\u505C\u6B62\u4F4D\u3002","257":"\u63A7\u5236 CodeLens \u7684\u5B57\u4F53\u7CFB\u5217\u3002","258":"\u63A7\u5236 CodeLens \u7684\u5B57\u4F53\u5927\u5C0F(\u50CF\u7D20)\u3002\u8BBE\u7F6E\u4E3A `0` \u65F6\uFF0C\u5C06\u4F7F\u7528 `#editor.fontSize#` \u7684 90%\u3002","259":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u5185\u8054\u989C\u8272\u4FEE\u9970\u5668\u548C\u989C\u8272\u9009\u53D6\u5668\u3002","260":"\u542F\u7528\u4F7F\u7528\u9F20\u6807\u548C\u952E\u8FDB\u884C\u5217\u9009\u62E9\u3002","261":"\u63A7\u5236\u5728\u590D\u5236\u65F6\u662F\u5426\u540C\u65F6\u590D\u5236\u8BED\u6CD5\u9AD8\u4EAE\u3002","262":"\u63A7\u5236\u5149\u6807\u7684\u52A8\u753B\u6837\u5F0F\u3002","263":"\u63A7\u5236\u662F\u5426\u542F\u7528\u5E73\u6ED1\u63D2\u5165\u52A8\u753B\u3002","264":"\u63A7\u5236\u5149\u6807\u6837\u5F0F\u3002","265":'\u63A7\u5236\u5149\u6807\u5468\u56F4\u53EF\u89C1\u7684\u524D\u7F6E\u884C\u548C\u5C3E\u968F\u884C\u7684\u6700\u5C0F\u6570\u76EE\u3002\u5728\u5176\u4ED6\u4E00\u4E9B\u7F16\u8F91\u5668\u4E2D\u79F0\u4E3A "scrollOff" \u6216 "scrollOffset"\u3002',"266":'\u4EC5\u5F53\u901A\u8FC7\u952E\u76D8\u6216 API \u89E6\u53D1\u65F6\uFF0C\u624D\u4F1A\u5F3A\u5236\u6267\u884C"\u5149\u6807\u73AF\u7ED5\u884C"\u3002',"267":'\u59CB\u7EC8\u5F3A\u5236\u6267\u884C "cursorSurroundingLines"',"268":'\u63A7\u5236\u4F55\u65F6\u5E94\u5F3A\u5236\u6267\u884C"\u5149\u6807\u73AF\u7ED5\u884C"\u3002',"269":"\u5F53 `#editor.cursorStyle#` \u8BBE\u7F6E\u4E3A `line` \u65F6\uFF0C\u63A7\u5236\u5149\u6807\u7684\u5BBD\u5EA6\u3002","270":"\u63A7\u5236\u5728\u7F16\u8F91\u5668\u4E2D\u662F\u5426\u5141\u8BB8\u901A\u8FC7\u62D6\u653E\u6765\u79FB\u52A8\u9009\u4E2D\u5185\u5BB9\u3002","271":'\u6309\u4E0B"Alt"\u65F6\u6EDA\u52A8\u901F\u5EA6\u500D\u589E\u3002',"272":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u542F\u7528\u4E86\u4EE3\u7801\u6298\u53E0\u3002","273":"\u4F7F\u7528\u7279\u5B9A\u4E8E\u8BED\u8A00\u7684\u6298\u53E0\u7B56\u7565(\u5982\u679C\u53EF\u7528)\uFF0C\u5426\u5219\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u7B56\u7565\u3002","274":"\u4F7F\u7528\u57FA\u4E8E\u7F29\u8FDB\u7684\u6298\u53E0\u7B56\u7565\u3002","275":"\u63A7\u5236\u8BA1\u7B97\u6298\u53E0\u8303\u56F4\u7684\u7B56\u7565\u3002","276":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u6298\u53E0\u8303\u56F4\u3002","277":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u6298\u53E0\u5BFC\u5165\u8303\u56F4\u3002","278":"\u63A7\u5236\u5355\u51FB\u5DF2\u6298\u53E0\u7684\u884C\u540E\u9762\u7684\u7A7A\u5185\u5BB9\u662F\u5426\u4F1A\u5C55\u5F00\u8BE5\u884C\u3002","279":"\u63A7\u5236\u5B57\u4F53\u7CFB\u5217\u3002","280":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u7C98\u8D34\u7684\u5185\u5BB9\u3002\u683C\u5F0F\u5316\u7A0B\u5E8F\u5FC5\u987B\u53EF\u7528\uFF0C\u5E76\u4E14\u80FD\u9488\u5BF9\u6587\u6863\u4E2D\u7684\u67D0\u4E00\u8303\u56F4\u8FDB\u884C\u683C\u5F0F\u5316\u3002","281":"\u63A7\u5236\u7F16\u8F91\u5668\u5728\u952E\u5165\u4E00\u884C\u540E\u662F\u5426\u81EA\u52A8\u683C\u5F0F\u5316\u8BE5\u884C\u3002","282":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u5448\u73B0\u5782\u76F4\u5B57\u5F62\u8FB9\u8DDD\u3002\u5B57\u5F62\u8FB9\u8DDD\u6700\u5E38\u7528\u4E8E\u8C03\u8BD5\u3002","283":"\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u4E2D\u9690\u85CF\u5149\u6807\u3002","284":"\u63A7\u5236\u5B57\u6BCD\u95F4\u8DDD(\u50CF\u7D20)\u3002","285":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u542F\u7528\u94FE\u63A5\u7F16\u8F91\u3002\u76F8\u5173\u7B26\u53F7(\u5982 HTML \u6807\u8BB0)\u5728\u7F16\u8F91\u65F6\u8FDB\u884C\u66F4\u65B0\uFF0C\u5177\u4F53\u7531\u8BED\u8A00\u800C\u5B9A\u3002","286":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u68C0\u6D4B\u94FE\u63A5\u5E76\u4F7F\u5176\u53EF\u88AB\u70B9\u51FB\u3002","287":"\u7A81\u51FA\u663E\u793A\u5339\u914D\u7684\u62EC\u53F7\u3002","288":"\u5BF9\u9F20\u6807\u6EDA\u8F6E\u6EDA\u52A8\u4E8B\u4EF6\u7684 `deltaX` \u548C `deltaY` \u4E58\u4E0A\u7684\u7CFB\u6570\u3002","289":"\u6309\u4F4F `Ctrl` \u952E\u5E76\u6EDA\u52A8\u9F20\u6807\u6EDA\u8F6E\u65F6\u5BF9\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F\u8FDB\u884C\u7F29\u653E\u3002","290":"\u5F53\u591A\u4E2A\u5149\u6807\u91CD\u53E0\u65F6\u8FDB\u884C\u5408\u5E76\u3002","291":"\u6620\u5C04\u4E3A `Ctrl` (Windows \u548C Linux) \u6216 `Command` (macOS)\u3002","292":"\u6620\u5C04\u4E3A `Alt` (Windows \u548C Linux) \u6216 `Option` (macOS)\u3002","293":"\u5728\u901A\u8FC7\u9F20\u6807\u6DFB\u52A0\u591A\u4E2A\u5149\u6807\u65F6\u4F7F\u7528\u7684\u4FEE\u6539\u952E\u3002\u201C\u8F6C\u5230\u5B9A\u4E49\u201D\u548C\u201C\u6253\u5F00\u94FE\u63A5\u201D\u529F\u80FD\u6240\u9700\u7684\u9F20\u6807\u52A8\u4F5C\u5C06\u4F1A\u76F8\u5E94\u8C03\u6574\uFF0C\u4E0D\u4E0E\u591A\u5149\u6807\u4FEE\u6539\u952E\u51B2\u7A81\u3002[\u9605\u8BFB\u8BE6\u7EC6\u4FE1\u606F](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier)\u3002","294":"\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u4E00\u884C\u6587\u672C\u3002","295":"\u6BCF\u4E2A\u5149\u6807\u7C98\u8D34\u5168\u6587\u3002","296":"\u63A7\u5236\u7C98\u8D34\u65F6\u7C98\u8D34\u6587\u672C\u7684\u884C\u8BA1\u6570\u4E0E\u5149\u6807\u8BA1\u6570\u76F8\u5339\u914D\u3002","297":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u7A81\u51FA\u663E\u793A\u8BED\u4E49\u7B26\u53F7\u7684\u5339\u914D\u9879\u3002","298":"\u63A7\u5236\u662F\u5426\u5728\u6982\u89C8\u6807\u5C3A\u5468\u56F4\u7ED8\u5236\u8FB9\u6846\u3002","299":"\u6253\u5F00\u901F\u89C8\u65F6\u805A\u7126\u6811","300":"\u6253\u5F00\u9884\u89C8\u65F6\u5C06\u7126\u70B9\u653E\u5728\u7F16\u8F91\u5668\u4E0A","301":"\u63A7\u5236\u662F\u5C06\u7126\u70B9\u653E\u5728\u5185\u8054\u7F16\u8F91\u5668\u4E0A\u8FD8\u662F\u653E\u5728\u9884\u89C8\u5C0F\u90E8\u4EF6\u4E2D\u7684\u6811\u4E0A\u3002","302":'\u63A7\u5236"\u8F6C\u5230\u5B9A\u4E49"\u9F20\u6807\u624B\u52BF\u662F\u5426\u59CB\u7EC8\u6253\u5F00\u9884\u89C8\u5C0F\u90E8\u4EF6\u3002',"303":"\u63A7\u5236\u663E\u793A\u5FEB\u901F\u5EFA\u8BAE\u524D\u7684\u7B49\u5F85\u65F6\u95F4 (\u6BEB\u79D2)\u3002","304":"\u63A7\u5236\u662F\u5426\u5728\u7F16\u8F91\u5668\u4E2D\u8F93\u5165\u65F6\u81EA\u52A8\u91CD\u547D\u540D\u3002","305":'\u5DF2\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editor.linkedEditing"\u3002',"306":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u663E\u793A\u63A7\u5236\u5B57\u7B26\u3002","307":"\u5F53\u6587\u4EF6\u4EE5\u6362\u884C\u7B26\u7ED3\u675F\u65F6, \u5448\u73B0\u6700\u540E\u4E00\u884C\u7684\u884C\u53F7\u3002","308":"\u540C\u65F6\u7A81\u51FA\u663E\u793A\u5BFC\u822A\u7EBF\u548C\u5F53\u524D\u884C\u3002","309":"\u63A7\u5236\u7F16\u8F91\u5668\u7684\u5F53\u524D\u884C\u8FDB\u884C\u9AD8\u4EAE\u663E\u793A\u7684\u65B9\u5F0F\u3002","310":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4EC5\u5728\u7126\u70B9\u5728\u7F16\u8F91\u5668\u65F6\u7A81\u51FA\u663E\u793A\u5F53\u524D\u884C\u3002","311":"\u5448\u73B0\u7A7A\u683C\u5B57\u7B26(\u5B57\u8BCD\u4E4B\u95F4\u7684\u5355\u4E2A\u7A7A\u683C\u9664\u5916)\u3002","312":"\u4EC5\u5728\u9009\u5B9A\u6587\u672C\u4E0A\u5448\u73B0\u7A7A\u767D\u5B57\u7B26\u3002","313":"\u4EC5\u5448\u73B0\u5C3E\u968F\u7A7A\u683C\u5B57\u7B26\u3002","314":"\u63A7\u5236\u7F16\u8F91\u5668\u5728\u7A7A\u767D\u5B57\u7B26\u4E0A\u663E\u793A\u7B26\u53F7\u7684\u65B9\u5F0F\u3002","315":"\u63A7\u5236\u9009\u533A\u662F\u5426\u6709\u5706\u89D2\u3002","316":"\u63A7\u5236\u7F16\u8F91\u5668\u6C34\u5E73\u6EDA\u52A8\u65F6\u53EF\u4EE5\u8D85\u8FC7\u8303\u56F4\u7684\u5B57\u7B26\u6570\u3002","317":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u53EF\u4EE5\u6EDA\u52A8\u5230\u6700\u540E\u4E00\u884C\u4E4B\u540E\u3002","318":"\u540C\u65F6\u5782\u76F4\u548C\u6C34\u5E73\u6EDA\u52A8\u65F6\uFF0C\u4EC5\u6CBF\u4E3B\u8F74\u6EDA\u52A8\u3002\u5728\u89E6\u63A7\u677F\u4E0A\u5782\u76F4\u6EDA\u52A8\u65F6\uFF0C\u53EF\u9632\u6B62\u6C34\u5E73\u6F02\u79FB\u3002","319":"\u63A7\u5236\u662F\u5426\u652F\u6301 Linux \u4E3B\u526A\u8D34\u677F\u3002","320":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u5E94\u7A81\u51FA\u663E\u793A\u4E0E\u6240\u9009\u5185\u5BB9\u7C7B\u4F3C\u7684\u5339\u914D\u9879\u3002","321":"\u59CB\u7EC8\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","322":"\u4EC5\u5728\u9F20\u6807\u4F4D\u4E8E\u88C5\u8BA2\u7EBF\u4E0A\u65B9\u65F6\u663E\u793A\u6298\u53E0\u63A7\u4EF6\u3002","323":"\u63A7\u5236\u4F55\u65F6\u663E\u793A\u884C\u53F7\u69FD\u4E0A\u7684\u6298\u53E0\u63A7\u4EF6\u3002","324":"\u63A7\u5236\u662F\u5426\u6DE1\u5316\u672A\u4F7F\u7528\u7684\u4EE3\u7801\u3002","325":"\u63A7\u5236\u52A0\u5220\u9664\u7EBF\u88AB\u5F03\u7528\u7684\u53D8\u91CF\u3002","326":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0A\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","327":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E0B\u65B9\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","328":"\u5728\u5176\u4ED6\u5EFA\u8BAE\u4E2D\u7A7F\u63D2\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","329":"\u4E0D\u663E\u793A\u4EE3\u7801\u7247\u6BB5\u5EFA\u8BAE\u3002","330":"\u63A7\u5236\u4EE3\u7801\u7247\u6BB5\u662F\u5426\u4E0E\u5176\u4ED6\u5EFA\u8BAE\u4E00\u8D77\u663E\u793A\u53CA\u5176\u6392\u5217\u7684\u4F4D\u7F6E\u3002","331":"\u63A7\u5236\u7F16\u8F91\u5668\u662F\u5426\u4F7F\u7528\u52A8\u753B\u6EDA\u52A8\u3002","332":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u5B57\u53F7\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.fontSize#` \u7684\u503C\u3002","333":"\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u7684\u884C\u9AD8\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `0`\uFF0C\u5219\u4F7F\u7528 `#editor.lineHeight#` \u7684\u503C\u3002\u6700\u5C0F\u503C\u4E3A 8\u3002","334":"\u63A7\u5236\u5728\u952E\u5165\u89E6\u53D1\u5B57\u7B26\u540E\u662F\u5426\u81EA\u52A8\u663E\u793A\u5EFA\u8BAE\u3002","335":"\u59CB\u7EC8\u9009\u62E9\u7B2C\u4E00\u4E2A\u5EFA\u8BAE\u3002","336":"\u9009\u62E9\u6700\u8FD1\u7684\u5EFA\u8BAE\uFF0C\u9664\u975E\u8FDB\u4E00\u6B65\u952E\u5165\u9009\u62E9\u5176\u4ED6\u9879\u3002\u4F8B\u5982 `console. -> console.log`\uFF0C\u56E0\u4E3A\u6700\u8FD1\u8865\u5168\u8FC7 `log`\u3002","337":"\u6839\u636E\u4E4B\u524D\u8865\u5168\u8FC7\u7684\u5EFA\u8BAE\u7684\u524D\u7F00\u6765\u8FDB\u884C\u9009\u62E9\u3002\u4F8B\u5982\uFF0C`co -> console`\u3001`con -> const`\u3002","338":"\u63A7\u5236\u5728\u5EFA\u8BAE\u5217\u8868\u4E2D\u5982\u4F55\u9884\u5148\u9009\u62E9\u5EFA\u8BAE\u3002","339":"\u5728\u6309\u4E0B Tab \u952E\u65F6\u8FDB\u884C Tab \u8865\u5168\uFF0C\u5C06\u63D2\u5165\u6700\u4F73\u5339\u914D\u5EFA\u8BAE\u3002","340":"\u7981\u7528 Tab \u8865\u5168\u3002","341":'\u5728\u524D\u7F00\u5339\u914D\u65F6\u8FDB\u884C Tab \u8865\u5168\u3002\u5728 "quickSuggestions" \u672A\u542F\u7528\u65F6\u4F53\u9A8C\u6700\u597D\u3002',"342":"\u542F\u7528 Tab \u8865\u5168\u3002","343":"\u81EA\u52A8\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","344":"\u5FFD\u7565\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","345":"\u63D0\u793A\u5220\u9664\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\u3002","346":"\u5220\u9664\u53EF\u80FD\u5BFC\u81F4\u95EE\u9898\u7684\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26\u3002","347":"\u6839\u636E\u5236\u8868\u4F4D\u63D2\u5165\u548C\u5220\u9664\u7A7A\u683C\u3002","348":"\u6267\u884C\u5355\u8BCD\u76F8\u5173\u7684\u5BFC\u822A\u6216\u64CD\u4F5C\u65F6\u4F5C\u4E3A\u5355\u8BCD\u5206\u9694\u7B26\u7684\u5B57\u7B26\u3002","349":"\u5728 `#editor.wordWrapColumn#` \u5904\u6298\u884C\u3002","350":"\u5728\u89C6\u533A\u5BBD\u5EA6\u548C `#editor.wordWrapColumn#` \u4E2D\u7684\u8F83\u5C0F\u503C\u5904\u6298\u884C\u3002","351":"\u63A7\u5236\u6298\u884C\u7684\u65B9\u5F0F\u3002","352":"\u5728 `#editor.wordWrap#` \u4E3A `wordWrapColumn` \u6216 `bounded` \u65F6\uFF0C\u63A7\u5236\u7F16\u8F91\u5668\u7684\u6298\u884C\u5217\u3002","353":"\u6CA1\u6709\u7F29\u8FDB\u3002\u6298\u884C\u4ECE\u7B2C 1 \u5217\u5F00\u59CB\u3002","354":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u4E0E\u5176\u7236\u7EA7\u76F8\u540C\u3002","355":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 1\u3002","356":"\u6298\u884C\u7684\u7F29\u8FDB\u91CF\u6BD4\u5176\u7236\u7EA7\u591A 2\u3002","357":"\u63A7\u5236\u6298\u884C\u7684\u7F29\u8FDB\u3002","358":"\u5047\u5B9A\u6240\u6709\u5B57\u7B26\u7684\u5BBD\u5EA6\u76F8\u540C\u3002\u8FD9\u662F\u4E00\u79CD\u5FEB\u901F\u7B97\u6CD5\uFF0C\u9002\u7528\u4E8E\u7B49\u5BBD\u5B57\u4F53\u548C\u67D0\u4E9B\u5B57\u5F62\u5BBD\u5EA6\u76F8\u7B49\u7684\u6587\u5B57(\u5982\u62C9\u4E01\u5B57\u7B26)\u3002","359":"\u5C06\u5305\u88C5\u70B9\u8BA1\u7B97\u59D4\u6258\u7ED9\u6D4F\u89C8\u5668\u3002\u8FD9\u662F\u4E00\u4E2A\u7F13\u6162\u7B97\u6CD5\uFF0C\u53EF\u80FD\u4F1A\u5BFC\u81F4\u5927\u578B\u6587\u4EF6\u88AB\u51BB\u7ED3\uFF0C\u4F46\u5B83\u5728\u6240\u6709\u60C5\u51B5\u4E0B\u90FD\u6B63\u5E38\u5DE5\u4F5C\u3002","360":"\u63A7\u5236\u8BA1\u7B97\u5305\u88F9\u70B9\u7684\u7B97\u6CD5\u3002","361":"\u7F16\u8F91\u5668\u6587\u672C\u662F\u5426\u5177\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","362":"\u7F16\u8F91\u5668\u6216\u7F16\u8F91\u5668\u5C0F\u7EC4\u4EF6\u662F\u5426\u5177\u6709\u7126\u70B9(\u4F8B\u5982\u7126\u70B9\u5728\u201C\u67E5\u627E\u201D\u5C0F\u7EC4\u4EF6\u4E2D)","363":"\u7F16\u8F91\u5668\u6216 RTF \u8F93\u5165\u662F\u5426\u6709\u7126\u70B9(\u5149\u6807\u662F\u5426\u95EA\u70C1)","364":"\u7F16\u8F91\u5668\u662F\u5426\u4E3A\u53EA\u8BFB","365":"\u4E0A\u4E0B\u6587\u662F\u5426\u4E3A\u5DEE\u5F02\u7F16\u8F91\u5668","366":'\u662F\u5426\u5DF2\u542F\u7528 "editor.columnSelection"',"367":"\u7F16\u8F91\u5668\u662F\u5426\u5DF2\u9009\u5B9A\u6587\u672C","368":"\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u9009\u62E9","369":'"Tab" \u662F\u5426\u5C06\u7126\u70B9\u79FB\u51FA\u7F16\u8F91\u5668',"370":"\u7F16\u8F91\u5668\u8F6F\u952E\u76D8\u662F\u5426\u53EF\u89C1","371":"\u8BE5\u7F16\u8F91\u5668\u662F\u5426\u662F\u66F4\u5927\u7684\u7F16\u8F91\u5668(\u4F8B\u5982\u7B14\u8BB0\u672C)\u7684\u4E00\u90E8\u5206","372":"\u7F16\u8F91\u5668\u7684\u8BED\u8A00\u6807\u8BC6\u7B26","373":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u8865\u5168\u9879\u63D0\u4F9B\u7A0B\u5E8F","374":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u4EE3\u7801\u64CD\u4F5C\u63D0\u4F9B\u7A0B\u5E8F","375":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709 CodeLens \u63D0\u4F9B\u7A0B\u5E8F","376":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","377":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u58F0\u660E\u63D0\u4F9B\u7A0B\u5E8F","378":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5B9E\u73B0\u63D0\u4F9B\u7A0B\u5E8F","379":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7C7B\u578B\u5B9A\u4E49\u63D0\u4F9B\u7A0B\u5E8F","380":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u60AC\u505C\u63D0\u4F9B\u7A0B\u5E8F","381":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7A81\u51FA\u663E\u793A\u63D0\u4F9B\u7A0B\u5E8F","382":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u7B26\u53F7\u63D0\u4F9B\u7A0B\u5E8F","383":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5F15\u7528\u63D0\u4F9B\u7A0B\u5E8F","384":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u91CD\u547D\u540D\u63D0\u4F9B\u7A0B\u5E8F","385":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u7B7E\u540D\u5E2E\u52A9\u63D0\u4F9B\u7A0B\u5E8F","386":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u5185\u8054\u63D0\u793A\u63D0\u4F9B\u7A0B\u5E8F","387":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","388":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","389":"\u7F16\u8F91\u5668\u662F\u5426\u5177\u6709\u591A\u4E2A\u6587\u6863\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","390":"\u7F16\u8F91\u5668\u662F\u5426\u6709\u591A\u4E2A\u6587\u6863\u9009\u62E9\u683C\u5F0F\u8BBE\u7F6E\u63D0\u4F9B\u7A0B\u5E8F","391":"\u8F93\u5165","392":"\u7EAF\u6587\u672C","393":"\u65E0\u9009\u62E9","394":"\u884C {0}, \u5217 {1} (\u9009\u4E2D {2})","395":"\u884C {0}, \u5217 {1}","396":"{0} \u9009\u62E9(\u5DF2\u9009\u62E9 {1} \u4E2A\u5B57\u7B26)","397":"{0} \u9009\u62E9","398":'\u73B0\u5728\u5C06 "\u8F85\u52A9\u529F\u80FD\u652F\u6301" \u8BBE\u7F6E\u66F4\u6539\u4E3A "\u6253\u5F00"\u3002',"399":"\u73B0\u5728\u6B63\u5728\u6253\u5F00\u201C\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u201D\u6587\u6863\u9875\u3002","400":"\u5728\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u53EA\u8BFB\u7A97\u683C\u4E2D\u3002","401":"\u5728\u4E00\u4E2A\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u7A97\u683C\u4E2D\u3002","402":"\u5728\u53EA\u8BFB\u4EE3\u7801\u7F16\u8F91\u5668\u4E2D","403":"\u5728\u4EE3\u7801\u7F16\u8F91\u5668\u4E2D","404":"\u82E5\u8981\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u597D\u5730\u914D\u5408\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\uFF0C\u8BF7\u7ACB\u5373\u6309 Command+E\u3002","405":"\u82E5\u8981\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u9AD8\u6548\u5730\u914D\u5408\u5C4F\u5E55\u9605\u8BFB\u5668\u7684\u4F7F\u7528\uFF0C\u6309\u4E0B Ctrl+E\u3002","406":"\u914D\u7F6E\u7F16\u8F91\u5668\uFF0C\u5C06\u5176\u8FDB\u884C\u4F18\u5316\u4EE5\u6700\u597D\u5730\u914D\u5408\u5C4F\u5E55\u8BFB\u53D6\u5668\u7684\u4F7F\u7528\u3002","407":"\u7F16\u8F91\u5668\u88AB\u914D\u7F6E\u4E3A\u6C38\u8FDC\u4E0D\u8FDB\u884C\u4F18\u5316\u4EE5\u914D\u5408\u5C4F\u5E55\u8BFB\u53D6\u5668\u7684\u4F7F\u7528, \u800C\u5F53\u524D\u4E0D\u662F\u8FD9\u79CD\u60C5\u51B5\u3002","408":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u5C06\u7126\u70B9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u53EF\u805A\u7126\u7684\u5143\u7D20\u3002\u901A\u8FC7\u6309 {0} \u5207\u6362\u6B64\u884C\u4E3A\u3002","409":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u5C06\u7126\u70B9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u53EF\u805A\u7126\u7684\u5143\u7D20\u3002\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u6309\u952E\u7ED1\u5B9A\u89E6\u53D1\u547D\u4EE4 {0}\u3002","410":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u5C06\u63D2\u5165\u5236\u8868\u7B26\u3002\u901A\u8FC7\u6309 {0} \u5207\u6362\u6B64\u884C\u4E3A\u3002","411":"\u5728\u5F53\u524D\u7F16\u8F91\u5668\u4E2D\u6309 Tab \u4F1A\u63D2\u5165\u5236\u8868\u7B26\u3002\u5F53\u524D\u65E0\u6CD5\u901A\u8FC7\u952E\u7ED1\u5B9A\u89E6\u53D1\u547D\u4EE4 {0}\u3002","412":"\u73B0\u5728\u6309 Command+H \u6253\u5F00\u4E00\u4E2A\u6D4F\u89C8\u5668\u7A97\u53E3, \u5176\u4E2D\u5305\u542B\u6709\u5173\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u7684\u8BE6\u7EC6\u4FE1\u606F\u3002","413":"\u73B0\u5728\u6309 Ctrl+H \u6253\u5F00\u4E00\u4E2A\u6D4F\u89C8\u5668\u7A97\u53E3, \u5176\u4E2D\u5305\u542B\u6709\u5173\u7F16\u8F91\u5668\u8F85\u52A9\u529F\u80FD\u7684\u66F4\u591A\u4FE1\u606F\u3002","414":"\u4F60\u53EF\u4EE5\u6309 Esc \u6216 Shift+Esc \u6D88\u9664\u6B64\u5DE5\u5177\u63D0\u793A\u5E76\u8FD4\u56DE\u5230\u7F16\u8F91\u5668\u3002","415":"\u663E\u793A\u8F85\u52A9\u529F\u80FD\u5E2E\u52A9","416":"\u5F00\u53D1\u4EBA\u5458: \u68C0\u67E5\u4EE4\u724C","417":"\u8F6C\u5230\u884C/\u5217...","418":"\u663E\u793A\u6240\u6709\u5FEB\u901F\u8BBF\u95EE\u63D0\u4F9B\u7A0B\u5E8F","419":"\u547D\u4EE4\u9762\u677F","420":"\u663E\u793A\u5E76\u8FD0\u884C\u547D\u4EE4","421":"\u8F6C\u5230\u7B26\u53F7...","422":"\u6309\u7C7B\u522B\u8F6C\u5230\u7B26\u53F7...","423":"\u6309 Alt+F1 \u53EF\u6253\u5F00\u8F85\u52A9\u529F\u80FD\u9009\u9879\u3002","424":"\u5207\u6362\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898","425":"\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u8FDB\u884C\u4E86 {0} \u6B21\u7F16\u8F91","426":"\u5149\u6807\u6240\u5728\u884C\u9AD8\u4EAE\u5185\u5BB9\u7684\u80CC\u666F\u989C\u8272\u3002","427":"\u5149\u6807\u6240\u5728\u884C\u56DB\u5468\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","428":"\u80CC\u666F\u989C\u8272\u7684\u9AD8\u4EAE\u8303\u56F4\uFF0C\u559C\u6B22\u901A\u8FC7\u5FEB\u901F\u6253\u5F00\u548C\u67E5\u627E\u529F\u80FD\u3002\u989C\u8272\u4E0D\u80FD\u4E0D\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","429":"\u9AD8\u4EAE\u533A\u57DF\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","430":"\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u7684\u80CC\u666F\u989C\u8272\uFF0C\u4F8B\u5982\u8F6C\u5230\u5B9A\u4E49\u6216\u8F6C\u5230\u4E0B\u4E00\u4E2A/\u4E0A\u4E00\u4E2A\u7B26\u53F7\u3002\u989C\u8272\u4E0D\u80FD\u662F\u4E0D\u900F\u660E\u7684\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","431":"\u9AD8\u4EAE\u663E\u793A\u7B26\u53F7\u5468\u56F4\u7684\u8FB9\u6846\u7684\u80CC\u666F\u989C\u8272\u3002","432":"\u7F16\u8F91\u5668\u5149\u6807\u989C\u8272\u3002","433":"\u7F16\u8F91\u5668\u5149\u6807\u7684\u80CC\u666F\u8272\u3002\u53EF\u4EE5\u81EA\u5B9A\u4E49\u5757\u578B\u5149\u6807\u8986\u76D6\u5B57\u7B26\u7684\u989C\u8272\u3002","434":"\u7F16\u8F91\u5668\u4E2D\u7A7A\u767D\u5B57\u7B26\u7684\u989C\u8272\u3002","435":"\u7F16\u8F91\u5668\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","436":"\u7F16\u8F91\u5668\u6D3B\u52A8\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u989C\u8272\u3002","437":"\u7F16\u8F91\u5668\u884C\u53F7\u7684\u989C\u8272\u3002","438":"\u7F16\u8F91\u5668\u6D3B\u52A8\u884C\u53F7\u7684\u989C\u8272","439":'"Id" \u5DF2\u88AB\u5F03\u7528\uFF0C\u8BF7\u6539\u7528 "editorLineNumber.activeForeground"\u3002',"440":"\u7F16\u8F91\u5668\u6807\u5C3A\u7684\u989C\u8272\u3002","441":"\u7F16\u8F91\u5668 CodeLens \u7684\u524D\u666F\u8272","442":"\u5339\u914D\u62EC\u53F7\u7684\u80CC\u666F\u8272","443":"\u5339\u914D\u62EC\u53F7\u5916\u6846\u7684\u989C\u8272","444":"\u6982\u89C8\u6807\u5C3A\u8FB9\u6846\u7684\u989C\u8272\u3002","445":"\u7F16\u8F91\u5668\u6982\u8FF0\u6807\u5C3A\u7684\u80CC\u666F\u8272\u3002\u4EC5\u5F53\u7F29\u7565\u56FE\u5DF2\u542F\u7528\u4E14\u7F6E\u4E8E\u7F16\u8F91\u5668\u53F3\u4FA7\u65F6\u624D\u4F7F\u7528\u3002","446":"\u7F16\u8F91\u5668\u5BFC\u822A\u7EBF\u7684\u80CC\u666F\u8272\u3002\u5BFC\u822A\u7EBF\u5305\u62EC\u8FB9\u7F18\u7B26\u53F7\u548C\u884C\u53F7\u3002","447":"\u7F16\u8F91\u5668\u4E2D\u4E0D\u5FC5\u8981(\u672A\u4F7F\u7528)\u7684\u6E90\u4EE3\u7801\u7684\u8FB9\u6846\u989C\u8272\u3002","448":'\u975E\u5FC5\u987B(\u672A\u4F7F\u7528)\u4EE3\u7801\u7684\u5728\u7F16\u8F91\u5668\u4E2D\u663E\u793A\u7684\u4E0D\u900F\u660E\u5EA6\u3002\u4F8B\u5982\uFF0C"#000000c0" \u5C06\u4EE5 75% \u7684\u4E0D\u900F\u660E\u5EA6\u663E\u793A\u4EE3\u7801\u3002\u5BF9\u4E8E\u9AD8\u5BF9\u6BD4\u5EA6\u4E3B\u9898\uFF0C\u8BF7\u4F7F\u7528 \u201DeditorUnnecessaryCode.border\u201C \u4E3B\u9898\u6765\u4E3A\u975E\u5FC5\u987B\u4EE3\u7801\u6DFB\u52A0\u4E0B\u5212\u7EBF\uFF0C\u4EE5\u907F\u514D\u989C\u8272\u6DE1\u5316\u3002',"449":"\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u8FB9\u6846\u989C\u8272\u3002","450":"\u7F16\u8F91\u5668\u4E2D\u865A\u5F71\u6587\u672C\u7684\u524D\u666F\u8272\u3002","451":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u8303\u56F4\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","452":"\u6982\u89C8\u6807\u5C3A\u4E2D\u9519\u8BEF\u6807\u8BB0\u7684\u989C\u8272\u3002","453":"\u6982\u89C8\u6807\u5C3A\u4E2D\u8B66\u544A\u6807\u8BB0\u7684\u989C\u8272\u3002","454":"\u6982\u89C8\u6807\u5C3A\u4E2D\u4FE1\u606F\u6807\u8BB0\u7684\u989C\u8272\u3002","455":"\u62EC\u53F7\u7684\u524D\u666F\u8272(1)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","456":"\u62EC\u53F7\u7684\u524D\u666F\u8272(2)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","457":"\u62EC\u53F7\u7684\u524D\u666F\u8272(3)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","458":"\u62EC\u53F7\u7684\u524D\u666F\u8272(4)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","459":"\u62EC\u53F7\u7684\u524D\u666F\u8272(5)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","460":"\u62EC\u53F7\u7684\u524D\u666F\u8272(6)\u3002\u9700\u8981\u542F\u7528\u62EC\u53F7\u5BF9\u7740\u8272\u3002","461":"\u65B9\u62EC\u53F7\u51FA\u73B0\u610F\u5916\u7684\u524D\u666F\u8272\u3002","462":"\u9009\u62E9\u5B9A\u4F4D\u70B9","463":"\u5B9A\u4F4D\u70B9\u8BBE\u7F6E\u4E3A {0}:{1}","464":"\u8BBE\u7F6E\u9009\u62E9\u5B9A\u4F4D\u70B9","465":"\u8F6C\u5230\u9009\u62E9\u5B9A\u4F4D\u70B9","466":"\u9009\u62E9\u4ECE\u5B9A\u4F4D\u70B9\u5230\u5149\u6807","467":"\u53D6\u6D88\u9009\u62E9\u5B9A\u4F4D\u70B9","468":"\u6982\u89C8\u6807\u5C3A\u4E0A\u8868\u793A\u5339\u914D\u62EC\u53F7\u7684\u6807\u8BB0\u989C\u8272\u3002","469":"\u8F6C\u5230\u62EC\u53F7","470":"\u9009\u62E9\u62EC\u53F7\u6240\u6709\u5185\u5BB9","471":"\u8F6C\u5230\u62EC\u53F7(&&B)","472":"\u5411\u5DE6\u79FB\u52A8\u6240\u9009\u6587\u672C","473":"\u5411\u53F3\u79FB\u52A8\u6240\u9009\u6587\u672C","474":"\u8F6C\u7F6E\u5B57\u6BCD","475":"\u526A\u5207(&&T)","476":"\u526A\u5207","477":"\u590D\u5236(&&C)","478":"\u590D\u5236","479":"\u590D\u5236\u4E3A","480":"\u7C98\u8D34(&&P)","481":"\u7C98\u8D34","482":"\u590D\u5236\u5E76\u7A81\u51FA\u663E\u793A\u8BED\u6CD5","483":"\u8981\u8FD0\u884C\u7684\u4EE3\u7801\u64CD\u4F5C\u7684\u79CD\u7C7B\u3002","484":"\u63A7\u5236\u4F55\u65F6\u5E94\u7528\u8FD4\u56DE\u7684\u64CD\u4F5C\u3002","485":"\u59CB\u7EC8\u5E94\u7528\u7B2C\u4E00\u4E2A\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","486":"\u5982\u679C\u4EC5\u8FD4\u56DE\u7684\u7B2C\u4E00\u4E2A\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u7528\u8BE5\u64CD\u4F5C\u3002","487":"\u4E0D\u8981\u5E94\u7528\u8FD4\u56DE\u7684\u4EE3\u7801\u64CD\u4F5C\u3002","488":"\u5982\u679C\u53EA\u5E94\u8FD4\u56DE\u9996\u9009\u4EE3\u7801\u64CD\u4F5C\uFF0C\u5219\u5E94\u8FD4\u56DE\u63A7\u4EF6\u3002","489":"\u5E94\u7528\u4EE3\u7801\u64CD\u4F5C\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF","490":"\u5FEB\u901F\u4FEE\u590D...","491":"\u6CA1\u6709\u53EF\u7528\u7684\u4EE3\u7801\u64CD\u4F5C","492":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C',"493":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u4EE3\u7801\u64CD\u4F5C',"494":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u4EE3\u7801\u64CD\u4F5C","495":"\u91CD\u6784...","496":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u91CD\u6784',"497":'\u6CA1\u6709\u53EF\u7528\u7684"{0}"\u91CD\u6784',"498":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u91CD\u6784","499":"\u6CA1\u6709\u53EF\u7528\u7684\u91CD\u6784\u64CD\u4F5C","500":"\u6E90\u4EE3\u7801\u64CD\u4F5C...","501":'\u6CA1\u6709\u9002\u7528\u4E8E"{0}"\u7684\u9996\u9009\u6E90\u64CD\u4F5C',"502":"\u6CA1\u6709\u9002\u7528\u4E8E\u201C {0}\u201D\u7684\u6E90\u64CD\u4F5C","503":"\u6CA1\u6709\u53EF\u7528\u7684\u9996\u9009\u6E90\u64CD\u4F5C","504":"\u6CA1\u6709\u53EF\u7528\u7684\u6E90\u4EE3\u7801\u64CD\u4F5C","505":"\u6574\u7406 import \u8BED\u53E5","506":"\u6CA1\u6709\u53EF\u7528\u7684\u6574\u7406 import \u8BED\u53E5\u64CD\u4F5C","507":"\u5168\u90E8\u4FEE\u590D","508":"\u6CA1\u6709\u53EF\u7528\u7684\u201C\u5168\u90E8\u4FEE\u590D\u201D\u64CD\u4F5C","509":"\u81EA\u52A8\u4FEE\u590D...","510":"\u6CA1\u6709\u53EF\u7528\u7684\u81EA\u52A8\u4FEE\u590D\u7A0B\u5E8F","511":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C\u3002\u9996\u9009\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D({0})","512":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C({0})","513":"\u663E\u793A\u4EE3\u7801\u64CD\u4F5C","514":"\u663E\u793A\u5F53\u524D\u884C\u7684 Code Lens \u547D\u4EE4","515":"\u5207\u6362\u884C\u6CE8\u91CA","516":"\u5207\u6362\u884C\u6CE8\u91CA(&&T)","517":"\u6DFB\u52A0\u884C\u6CE8\u91CA","518":"\u5220\u9664\u884C\u6CE8\u91CA","519":"\u5207\u6362\u5757\u6CE8\u91CA","520":"\u5207\u6362\u5757\u6CE8\u91CA(&&B)","521":"\u663E\u793A\u7F16\u8F91\u5668\u4E0A\u4E0B\u6587\u83DC\u5355","522":"\u5149\u6807\u64A4\u6D88","523":"\u5149\u6807\u91CD\u505A","524":"\u67E5\u627E","525":"\u67E5\u627E(&&F)","526":"\u67E5\u627E\u9009\u5B9A\u5185\u5BB9","527":"\u67E5\u627E\u4E0B\u4E00\u4E2A","528":"\u67E5\u627E\u4E0A\u4E00\u4E2A","529":"\u67E5\u627E\u4E0B\u4E00\u4E2A\u9009\u62E9","530":"\u67E5\u627E\u4E0A\u4E00\u4E2A\u9009\u62E9","531":"\u66FF\u6362","532":"\u66FF\u6362(&&R)","533":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E\u201D\u56FE\u6807\u3002","534":"\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u6298\u53E0\u7684\u56FE\u6807\u3002","535":"\u7528\u4E8E\u6307\u793A\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u5DF2\u5C55\u5F00\u7684\u56FE\u6807\u3002","536":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u66FF\u6362\u201D\u56FE\u6807\u3002","537":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u5168\u90E8\u66FF\u6362\u201D\u56FE\u6807\u3002","538":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0A\u4E00\u4E2A\u201D\u56FE\u6807\u3002","539":"\u7F16\u8F91\u5668\u67E5\u627E\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u201C\u67E5\u627E\u4E0B\u4E00\u4E2A\u201D\u56FE\u6807\u3002","540":"\u4E0A\u4E00\u4E2A\u5339\u914D\u9879","541":"\u4E0B\u4E00\u4E2A\u5339\u914D\u9879","542":"\u5728\u9009\u5B9A\u5185\u5BB9\u4E2D\u67E5\u627E","543":"\u5168\u90E8\u66FF\u6362","544":"\u5207\u6362\u66FF\u6362","545":"\u4EC5\u9AD8\u4EAE\u4E86\u524D {0} \u4E2A\u7ED3\u679C\uFF0C\u4F46\u6240\u6709\u67E5\u627E\u64CD\u4F5C\u5747\u9488\u5BF9\u5168\u6587\u3002","546":"{1} \u4E2D\u7684 {0}","547":"\u65E0\u7ED3\u679C","548":"\u627E\u5230 {0}","549":"\u4E3A\u201C{1}\u201D\u627E\u5230 {0}","550":"\u5728 {2} \u5904\u627E\u5230\u201C{1}\u201D\u7684 {0}","551":"Ctrl+Enter \u73B0\u5728\u7531\u5168\u90E8\u66FF\u6362\u6539\u4E3A\u63D2\u5165\u6362\u884C\u3002\u4F60\u53EF\u4EE5\u4FEE\u6539editor.action.replaceAll \u7684\u6309\u952E\u7ED1\u5B9A\u4EE5\u8986\u76D6\u6B64\u884C\u4E3A\u3002","552":"\u5C55\u5F00","553":"\u4EE5\u9012\u5F52\u65B9\u5F0F\u5C55\u5F00","554":"\u6298\u53E0","555":"\u5207\u6362\u6298\u53E0","556":"\u4EE5\u9012\u5F52\u65B9\u5F0F\u6298\u53E0","557":"\u6298\u53E0\u6240\u6709\u5757\u6CE8\u91CA","558":"\u6298\u53E0\u6240\u6709\u533A\u57DF","559":"\u5C55\u5F00\u6240\u6709\u533A\u57DF","560":"\u6298\u53E0\u9664\u6240\u9009\u533A\u57DF\u4E4B\u5916\u7684\u6240\u6709\u533A\u57DF","561":"\u5C55\u5F00\u9664\u6240\u9009\u533A\u57DF\u4E4B\u5916\u7684\u6240\u6709\u533A\u57DF","562":"\u5168\u90E8\u6298\u53E0","563":"\u5168\u90E8\u5C55\u5F00","564":"\u8DF3\u8F6C\u5230\u7236\u7EA7\u6298\u53E0","565":"Go to Previous Folding Range","566":"Go to Next Folding Range","567":"\u6298\u53E0\u7EA7\u522B {0}","568":"\u6298\u53E0\u8303\u56F4\u540E\u9762\u7684\u80CC\u666F\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u8BBE\u4E3A\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","569":"\u7F16\u8F91\u5668\u88C5\u8BA2\u7EBF\u4E2D\u6298\u53E0\u63A7\u4EF6\u7684\u989C\u8272\u3002","570":"\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u5C55\u5F00\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","571":"\u7F16\u8F91\u5668\u5B57\u5F62\u8FB9\u8DDD\u4E2D\u5DF2\u6298\u53E0\u7684\u8303\u56F4\u7684\u56FE\u6807\u3002","572":"\u653E\u5927\u7F16\u8F91\u5668\u5B57\u4F53","573":"\u7F29\u5C0F\u7F16\u8F91\u5668\u5B57\u4F53","574":"\u91CD\u7F6E\u7F16\u8F91\u5668\u5B57\u4F53\u5927\u5C0F","575":"\u5728\u7B2C {0} \u884C\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","576":"\u5728\u7B2C {1} \u884C\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91","577":"\u7B2C {0} \u884C\u5230\u7B2C {1} \u884C\u95F4\u8FDB\u884C\u4E86 1 \u6B21\u683C\u5F0F\u7F16\u8F91","578":"\u7B2C {1} \u884C\u5230\u7B2C {2} \u884C\u95F4\u8FDB\u884C\u4E86 {0} \u6B21\u683C\u5F0F\u7F16\u8F91","579":"\u683C\u5F0F\u5316\u6587\u6863","580":"\u683C\u5F0F\u5316\u9009\u5B9A\u5185\u5BB9","581":"\u8F6C\u5230\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","582":"\u201C\u8F6C\u5230\u4E0B\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","583":"\u8F6C\u5230\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","584":"\u201C\u8F6C\u5230\u4E0A\u4E00\u4E2A\u201D\u6807\u8BB0\u7684\u56FE\u6807\u3002","585":"\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0B\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","586":"\u4E0B\u4E00\u4E2A\u95EE\u9898(&&P)","587":"\u8F6C\u5230\u6587\u4EF6\u4E2D\u7684\u4E0A\u4E00\u4E2A\u95EE\u9898 (\u9519\u8BEF\u3001\u8B66\u544A\u3001\u4FE1\u606F)","588":"\u4E0A\u4E00\u4E2A\u95EE\u9898(&&P)","589":"\u9519\u8BEF","590":"\u8B66\u544A","591":"\u4FE1\u606F","592":"\u63D0\u793A","593":"{1} \u4E2D\u7684 {0}","594":"{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","595":"{0} \u4E2A\u95EE\u9898(\u5171 {1} \u4E2A)","596":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u989C\u8272\u3002","597":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u9519\u8BEF\u6807\u9898\u80CC\u666F\u8272\u3002","598":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u989C\u8272\u3002","599":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u8B66\u544A\u6807\u9898\u80CC\u666F\u8272\u3002","600":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u989C\u8272\u3002","601":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u4FE1\u606F\u6807\u9898\u80CC\u666F\u8272\u3002","602":"\u7F16\u8F91\u5668\u6807\u8BB0\u5BFC\u822A\u5C0F\u7EC4\u4EF6\u80CC\u666F\u8272\u3002","603":"\u5FEB\u901F\u67E5\u770B","604":"\u5B9A\u4E49","605":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u4EFB\u4F55\u5B9A\u4E49","606":"\u627E\u4E0D\u5230\u5B9A\u4E49","607":"\u8F6C\u5230\u5B9A\u4E49","608":"\u6253\u5F00\u4FA7\u8FB9\u7684\u5B9A\u4E49","609":"\u901F\u89C8\u5B9A\u4E49","610":"\u58F0\u660E","611":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u58F0\u660E","612":"\u672A\u627E\u5230\u58F0\u660E","613":"\u8F6C\u5230\u58F0\u660E","614":"\u67E5\u770B\u58F0\u660E","615":"\u7C7B\u578B\u5B9A\u4E49","616":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u7C7B\u578B\u5B9A\u4E49","617":"\u672A\u627E\u5230\u7C7B\u578B\u5B9A\u4E49","618":"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49","619":"\u5FEB\u901F\u67E5\u770B\u7C7B\u578B\u5B9A\u4E49","620":"\u5B9E\u73B0","621":"\u672A\u627E\u5230\u201C{0}\u201D\u7684\u5B9E\u73B0","622":"\u672A\u627E\u5230\u5B9E\u73B0","623":"\u8F6C\u5230\u5B9E\u73B0","624":"\u67E5\u770B\u5B9E\u73B0","625":'\u672A\u627E\u5230"{0}"\u7684\u5F15\u7528',"626":"\u672A\u627E\u5230\u5F15\u7528","627":"\u8F6C\u5230\u5F15\u7528","628":"\u5F15\u7528","629":"\u67E5\u770B\u5F15\u7528","630":"\u8F6C\u5230\u4EFB\u4F55\u7B26\u53F7","631":"\u4F4D\u7F6E","632":"\u65E0\u201C{0}\u201D\u7684\u7ED3\u679C","633":"\u8F6C\u5230\u5B9A\u4E49(&&D)","634":"\u8F6C\u5230\u58F0\u660E(&&D)","635":"\u8F6C\u5230\u7C7B\u578B\u5B9A\u4E49(&&T)","636":"\u8F6C\u5230\u5B9E\u73B0(&&I)","637":"\u8F6C\u5230\u5F15\u7528(&&R)","638":"\u5355\u51FB\u663E\u793A {0} \u4E2A\u5B9A\u4E49\u3002","639":"\u5F15\u7528\u901F\u89C8\u662F\u5426\u53EF\u89C1\uFF0C\u4F8B\u5982\u201C\u901F\u89C8\u5F15\u7528\u201D\u6216\u201C\u901F\u89C8\u5B9A\u4E49\u201D","640":"{0} \u4E2A\u5F15\u7528","641":"{0} \u4E2A\u5F15\u7528","642":"\u65E0\u53EF\u7528\u9884\u89C8","643":"\u5728\u6587\u4EF6 {0} \u7684 {1} \u884C {2} \u5217\u7684\u7B26\u53F7","644":"{0} \u4E2D {1} \u884C {2} \u5217\u7684\u7B26\u53F7\uFF0C{3}","645":"{0} \u4E2D\u6709 1 \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {1}","646":"{1} \u4E2D\u6709 {0} \u4E2A\u7B26\u53F7\uFF0C\u5B8C\u6574\u8DEF\u5F84: {2}","647":"\u672A\u627E\u5230\u7ED3\u679C","648":"\u5728 {0} \u4E2D\u627E\u5230 1 \u4E2A\u7B26\u53F7","649":"\u5728 {1} \u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7","650":"\u5728 {1} \u4E2A\u6587\u4EF6\u4E2D\u627E\u5230 {0} \u4E2A\u7B26\u53F7","651":"\u662F\u5426\u5B58\u5728\u53EA\u80FD\u901A\u8FC7\u952E\u76D8\u5BFC\u822A\u7684\u7B26\u53F7\u4F4D\u7F6E\u3002","652":"{1} \u7684\u7B26\u53F7 {0}\uFF0C\u4E0B\u4E00\u4E2A\u4F7F\u7528 {2}","653":"{1} \u7684\u7B26\u53F7 {0}","654":"\u663E\u793A\u60AC\u505C","655":"\u663E\u793A\u5B9A\u4E49\u9884\u89C8\u60AC\u505C","656":"\u51FA\u4E8E\u6027\u80FD\u539F\u56E0\uFF0C\u672A\u5BF9\u957F\u884C\u8FDB\u884C\u89E3\u6790\u3002\u89E3\u6790\u957F\u5EA6\u9608\u503C\u53EF\u901A\u8FC7\u201Ceditor.maxTokenizationLineLength\u201D\u8FDB\u884C\u914D\u7F6E\u3002","657":"\u67E5\u770B\u95EE\u9898","658":"\u6CA1\u6709\u53EF\u7528\u7684\u5FEB\u901F\u4FEE\u590D","659":"\u6B63\u5728\u68C0\u67E5\u5FEB\u901F\u4FEE\u590D...","660":"\u66FF\u6362\u4E3A\u4E0A\u4E00\u4E2A\u503C","661":"\u66FF\u6362\u4E3A\u4E0B\u4E00\u4E2A\u503C","662":"\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u7A7A\u683C","663":"\u5C06\u7F29\u8FDB\u8F6C\u6362\u4E3A\u5236\u8868\u7B26","664":"\u5DF2\u914D\u7F6E\u5236\u8868\u7B26\u5927\u5C0F","665":"\u9009\u62E9\u5F53\u524D\u6587\u4EF6\u7684\u5236\u8868\u7B26\u5927\u5C0F","666":'\u4F7F\u7528 "Tab" \u7F29\u8FDB',"667":"\u4F7F\u7528\u7A7A\u683C\u7F29\u8FDB","668":"\u4ECE\u5185\u5BB9\u4E2D\u68C0\u6D4B\u7F29\u8FDB\u65B9\u5F0F","669":"\u91CD\u65B0\u7F29\u8FDB\u884C","670":"\u91CD\u65B0\u7F29\u8FDB\u6240\u9009\u884C","671":"\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1","672":"\u5185\u8054\u5EFA\u8BAE\u662F\u5426\u4EE5\u7A7A\u767D\u5F00\u5934","673":"\u663E\u793A\u4E0B\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","674":"\u663E\u793A\u4E0A\u4E00\u4E2A\u5185\u8054\u5EFA\u8BAE","675":"\u89E6\u53D1\u5185\u8054\u5EFA\u8BAE","676":"\u4E0B\u4E00\u4E2A","677":"\u4E0A\u4E00\u4E2A","678":"\u63A5\u53D7","679":"\u5EFA\u8BAE:","680":"\u5411\u4E0A\u590D\u5236\u884C","681":"\u5411\u4E0A\u590D\u5236\u4E00\u884C(&&C)","682":"\u5411\u4E0B\u590D\u5236\u884C","683":"\u5411\u4E0B\u590D\u5236\u4E00\u884C(&&P)","684":"\u91CD\u590D\u9009\u62E9","685":"\u91CD\u590D\u9009\u62E9(&&D)","686":"\u5411\u4E0A\u79FB\u52A8\u884C","687":"\u5411\u4E0A\u79FB\u52A8\u4E00\u884C(&&V)","688":"\u5411\u4E0B\u79FB\u52A8\u884C","689":"\u5411\u4E0B\u79FB\u52A8\u4E00\u884C(&&L)","690":"\u6309\u5347\u5E8F\u6392\u5217\u884C","691":"\u6309\u964D\u5E8F\u6392\u5217\u884C","692":"\u88C1\u526A\u5C3E\u968F\u7A7A\u683C","693":"\u5220\u9664\u884C","694":"\u884C\u7F29\u8FDB","695":"\u884C\u51CF\u5C11\u7F29\u8FDB","696":"\u5728\u4E0A\u9762\u63D2\u5165\u884C","697":"\u5728\u4E0B\u9762\u63D2\u5165\u884C","698":"\u5220\u9664\u5DE6\u4FA7\u6240\u6709\u5185\u5BB9","699":"\u5220\u9664\u53F3\u4FA7\u6240\u6709\u5185\u5BB9","700":"\u5408\u5E76\u884C","701":"\u8F6C\u7F6E\u5149\u6807\u5904\u7684\u5B57\u7B26","702":"\u8F6C\u6362\u4E3A\u5927\u5199","703":"\u8F6C\u6362\u4E3A\u5C0F\u5199","704":"\u8F6C\u6362\u4E3A\u8BCD\u9996\u5B57\u6BCD\u5927\u5199","705":"\u8F6C\u6362\u4E3A\u86C7\u5F62\u547D\u540D\u6CD5","706":"\u542F\u52A8\u94FE\u63A5\u7F16\u8F91","707":"\u7F16\u8F91\u5668\u6839\u636E\u7C7B\u578B\u81EA\u52A8\u91CD\u547D\u540D\u65F6\u7684\u80CC\u666F\u8272\u3002","708":"\u6267\u884C\u547D\u4EE4","709":"\u5173\u6CE8\u94FE\u63A5","710":"cmd + \u5355\u51FB","711":"ctrl + \u5355\u51FB","712":"option + \u5355\u51FB","713":"alt + \u5355\u51FB","714":"\u6267\u884C\u547D\u4EE4 {0}","715":"\u6B64\u94FE\u63A5\u683C\u5F0F\u4E0D\u6B63\u786E\uFF0C\u65E0\u6CD5\u6253\u5F00: {0}","716":"\u6B64\u94FE\u63A5\u76EE\u6807\u5DF2\u4E22\u5931\uFF0C\u65E0\u6CD5\u6253\u5F00\u3002","717":"\u6253\u5F00\u94FE\u63A5","718":"\u7F16\u8F91\u5668\u5F53\u524D\u662F\u5426\u6B63\u5728\u663E\u793A\u5185\u8054\u6D88\u606F","719":"\u65E0\u6CD5\u5728\u53EA\u8BFB\u7F16\u8F91\u5668\u4E2D\u7F16\u8F91","720":"\u6DFB\u52A0\u7684\u5149\u6807: {0}","721":"\u6DFB\u52A0\u7684\u6E38\u6807: {0}","722":"\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807","723":"\u5728\u4E0A\u9762\u6DFB\u52A0\u5149\u6807(&&A)","724":"\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807","725":"\u5728\u4E0B\u9762\u6DFB\u52A0\u5149\u6807(&&D)","726":"\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807","727":"\u5728\u884C\u5C3E\u6DFB\u52A0\u5149\u6807(&&U)","728":"\u5728\u5E95\u90E8\u6DFB\u52A0\u5149\u6807","729":"\u5728\u9876\u90E8\u6DFB\u52A0\u5149\u6807","730":"\u5C06\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879\u6DFB\u52A0\u5230\u9009\u62E9","731":"\u6DFB\u52A0\u4E0B\u4E00\u4E2A\u5339\u914D\u9879(&&N)","732":"\u5C06\u9009\u62E9\u5185\u5BB9\u6DFB\u52A0\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","733":"\u6DFB\u52A0\u4E0A\u4E00\u4E2A\u5339\u914D\u9879(&&R)","734":"\u5C06\u4E0A\u6B21\u9009\u62E9\u79FB\u52A8\u5230\u4E0B\u4E00\u4E2A\u67E5\u627E\u5339\u914D\u9879","735":"\u5C06\u4E0A\u4E2A\u9009\u62E9\u5185\u5BB9\u79FB\u52A8\u5230\u4E0A\u4E00\u67E5\u627E\u5339\u914D\u9879","736":"\u9009\u62E9\u6240\u6709\u627E\u5230\u7684\u67E5\u627E\u5339\u914D\u9879","737":"\u9009\u62E9\u6240\u6709\u5339\u914D\u9879(&&O)","738":"\u66F4\u6539\u6240\u6709\u5339\u914D\u9879","739":"\u89E6\u53D1\u53C2\u6570\u63D0\u793A","740":"\u201C\u663E\u793A\u4E0B\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","741":"\u201C\u663E\u793A\u4E0A\u4E00\u4E2A\u53C2\u6570\u201D\u63D0\u793A\u7684\u56FE\u6807\u3002","742":"{0}\uFF0C\u63D0\u793A","743":"\u901F\u89C8\u4E2D\u662F\u5426\u5D4C\u5165\u4E86\u5F53\u524D\u4EE3\u7801\u7F16\u8F91\u5668","744":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u533A\u57DF\u80CC\u666F\u989C\u8272\u3002","745":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u989C\u8272\u3002","746":"\u901F\u89C8\u89C6\u56FE\u6807\u9898\u4FE1\u606F\u989C\u8272\u3002","747":"\u901F\u89C8\u89C6\u56FE\u8FB9\u6846\u548C\u7BAD\u5934\u989C\u8272\u3002","748":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u80CC\u666F\u8272\u3002","749":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u884C\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","750":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6587\u4EF6\u8282\u70B9\u7684\u524D\u666F\u8272\u3002","751":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","752":"\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","753":"\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","754":"\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u88C5\u8BA2\u7EBF\u7684\u80CC\u666F\u8272\u3002","755":"\u5728\u901F\u89C8\u89C6\u56FE\u7ED3\u679C\u5217\u8868\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","756":"\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u7A81\u51FA\u663E\u793A\u989C\u8272\u3002","757":"\u5728\u901F\u89C8\u89C6\u56FE\u7F16\u8F91\u5668\u4E2D\u5339\u914D\u9879\u7684\u7A81\u51FA\u663E\u793A\u8FB9\u6846\u3002","758":"\u5148\u6253\u5F00\u6587\u672C\u7F16\u8F91\u5668\u7136\u540E\u8DF3\u8F6C\u5230\u884C\u3002","759":"\u8F6C\u5230\u7B2C {0} \u884C\u7B2C {1} \u4E2A\u5B57\u7B26\u3002","760":"\u8F6C\u5230\u884C {0}\u3002","761":"\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002\u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7(\u4ECB\u4E8E 1 \u81F3 {2} \u4E4B\u95F4)\u3002","762":"\u5F53\u524D\u884C: {0}\uFF0C\u5B57\u7B26: {1}\u3002 \u952E\u5165\u8981\u5BFC\u822A\u5230\u7684\u884C\u53F7\u3002","763":"\u8981\u8F6C\u5230\u7B26\u53F7\uFF0C\u9996\u5148\u6253\u5F00\u5177\u6709\u7B26\u53F7\u4FE1\u606F\u7684\u6587\u672C\u7F16\u8F91\u5668\u3002","764":"\u6D3B\u52A8\u6587\u672C\u7F16\u8F91\u5668\u4E0D\u63D0\u4F9B\u7B26\u53F7\u4FE1\u606F\u3002","765":"\u6CA1\u6709\u5339\u914D\u7684\u7F16\u8F91\u5668\u7B26\u53F7","766":"\u6CA1\u6709\u7F16\u8F91\u5668\u7B26\u53F7","767":"\u5728\u4FA7\u8FB9\u6253\u5F00","768":"\u5728\u5E95\u90E8\u6253\u5F00","769":"\u7B26\u53F7({0})","770":"\u5C5E\u6027({0})","771":"\u65B9\u6CD5({0})","772":"\u51FD\u6570({0})","773":"\u6784\u9020\u51FD\u6570 ({0})","774":"\u53D8\u91CF({0})","775":"\u7C7B({0})","776":"\u7ED3\u6784({0})","777":"\u4E8B\u4EF6({0})","778":"\u8FD0\u7B97\u7B26({0})","779":"\u63A5\u53E3({0})","780":"\u547D\u540D\u7A7A\u95F4({0})","781":"\u5305({0})","782":"\u7C7B\u578B\u53C2\u6570({0})","783":"\u6A21\u5757({0})","784":"\u679A\u4E3E({0})","785":"\u679A\u4E3E\u6210\u5458({0})","786":"\u5B57\u7B26\u4E32({0})","787":"\u6587\u4EF6({0})","788":"\u6570\u7EC4({0})","789":"\u6570\u5B57({0})","790":"\u5E03\u5C14\u503C({0})","791":"\u5BF9\u8C61({0})","792":"\u952E({0})","793":"\u5B57\u6BB5({0})","794":"\u5E38\u91CF({0})","795":"\u65E0\u7ED3\u679C\u3002","796":"\u89E3\u6790\u91CD\u547D\u540D\u4F4D\u7F6E\u65F6\u53D1\u751F\u672A\u77E5\u9519\u8BEF","797":"\u6B63\u5728\u91CD\u547D\u540D\u201C{0}\u201D","798":"\u91CD\u547D\u540D {0}","799":"\u6210\u529F\u5C06\u201C{0}\u201D\u91CD\u547D\u540D\u4E3A\u201C{1}\u201D\u3002\u6458\u8981: {2}","800":"\u91CD\u547D\u540D\u65E0\u6CD5\u5E94\u7528\u4FEE\u6539","801":"\u91CD\u547D\u540D\u65E0\u6CD5\u8BA1\u7B97\u4FEE\u6539","802":"\u91CD\u547D\u540D\u7B26\u53F7","803":"\u542F\u7528/\u7981\u7528\u91CD\u547D\u540D\u4E4B\u524D\u9884\u89C8\u66F4\u6539\u7684\u529F\u80FD","804":"\u91CD\u547D\u540D\u8F93\u5165\u5C0F\u7EC4\u4EF6\u662F\u5426\u53EF\u89C1","805":'\u91CD\u547D\u540D\u8F93\u5165\u3002\u952E\u5165\u65B0\u540D\u79F0\u5E76\u6309 "Enter" \u63D0\u4EA4\u3002',"806":"\u6309 {0} \u8FDB\u884C\u91CD\u547D\u540D\uFF0C\u6309 {1} \u8FDB\u884C\u9884\u89C8","807":"\u5C55\u5F00\u9009\u62E9","808":"\u6269\u5927\u9009\u533A(&&E)","809":"\u6536\u8D77\u9009\u62E9","810":"\u7F29\u5C0F\u9009\u533A(&&S)","811":"\u7F16\u8F91\u5668\u76EE\u524D\u662F\u5426\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B","812":"\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0B\u4E00\u5236\u8868\u4F4D","813":"\u5728\u4EE3\u7801\u7247\u6BB5\u6A21\u5F0F\u4E0B\u65F6\u662F\u5426\u5B58\u5728\u4E0A\u4E00\u5236\u8868\u4F4D","814":"\u661F\u671F\u5929","815":"\u661F\u671F\u4E00","816":"\u661F\u671F\u4E8C","817":"\u661F\u671F\u4E09","818":"\u661F\u671F\u56DB","819":"\u661F\u671F\u4E94","820":"\u661F\u671F\u516D","821":"\u5468\u65E5","822":"\u5468\u4E00","823":"\u5468\u4E8C","824":"\u5468\u4E09","825":"\u5468\u56DB","826":"\u5468\u4E94","827":"\u5468\u516D","828":"\u4E00\u6708","829":"\u4E8C\u6708","830":"\u4E09\u6708","831":"\u56DB\u6708","832":"5\u6708","833":"\u516D\u6708","834":"\u4E03\u6708","835":"\u516B\u6708","836":"\u4E5D\u6708","837":"\u5341\u6708","838":"\u5341\u4E00\u6708","839":"\u5341\u4E8C\u6708","840":"1\u6708","841":"2\u6708","842":"3\u6708","843":"4\u6708","844":"6\u6708","845":"7\u6708","846":"8\u6708","847":"9\u6708","848":"10\u6708","849":"11 \u6708","850":"12\u6708","851":"\u5EFA\u8BAE\u662F\u5426\u53EF\u89C1","852":"\u5EFA\u8BAE\u8BE6\u7EC6\u4FE1\u606F\u662F\u5426\u53EF\u89C1","853":"\u662F\u5426\u5B58\u5728\u591A\u6761\u5EFA\u8BAE\u53EF\u4F9B\u9009\u62E9","854":"\u63D2\u5165\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u4F1A\u5BFC\u81F4\u66F4\u6539\u6216\u5BFC\u81F4\u5DF2\u952E\u5165\u6240\u6709\u5185\u5BB9","855":"\u6309 Enter \u65F6\u662F\u5426\u4F1A\u63D2\u5165\u5EFA\u8BAE","856":"\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u5177\u6709\u63D2\u5165\u548C\u66FF\u6362\u884C\u4E3A","857":"\u9ED8\u8BA4\u884C\u4E3A\u662F\u5426\u662F\u63D2\u5165\u6216\u66FF\u6362","858":"\u5F53\u524D\u5EFA\u8BAE\u662F\u5426\u652F\u6301\u89E3\u6790\u66F4\u591A\u8BE6\u7EC6\u4FE1\u606F","859":"\u9009\u62E9\u201C{0}\u201D\u540E\u8FDB\u884C\u4E86\u5176\u4ED6 {1} \u6B21\u7F16\u8F91","860":"\u89E6\u53D1\u5EFA\u8BAE","861":"\u63D2\u5165","862":"\u663E\u793A\u66F4\u5C11","863":"\u663E\u793A\u66F4\u591A","864":"\u91CD\u7F6E\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u5927\u5C0F","865":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","866":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002","867":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u7684\u524D\u666F\u8272\u3002","868":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u524D\u666F\u8272\u3002","869":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u56FE\u6807\u524D\u666F\u8272\u3002","870":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u6240\u9009\u6761\u76EE\u7684\u80CC\u666F\u8272\u3002","871":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","872":"\u5F53\u67D0\u9879\u83B7\u5F97\u7126\u70B9\u65F6\uFF0C\u5728\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7A81\u51FA\u663E\u793A\u7684\u5339\u914D\u9879\u7684\u989C\u8272\u3002","873":"\u65E0\u5EFA\u8BAE\u3002","874":"{0}\uFF0C\u6587\u6863: {1}","875":"\u5EFA\u8BAE","876":"\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u7684\u8BE6\u7EC6\u4FE1\u606F\u7684\u56FE\u6807\u3002","877":"\u4E86\u89E3\u8BE6\u7EC6\u4FE1\u606F","878":"\u6570\u7EC4\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","879":"\u5E03\u5C14\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","880":"\u7C7B\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","881":"\u989C\u8272\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","882":"\u5E38\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","883":"\u6784\u9020\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","884":"\u679A\u4E3E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","885":"\u679A\u4E3E\u5668\u6210\u5458\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","886":"\u4E8B\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","887":"\u5B57\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","888":"\u6587\u4EF6\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","889":"\u6587\u4EF6\u5939\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","890":"\u51FD\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","891":"\u63A5\u53E3\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u5C06\u663E\u793A\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","892":"\u952E\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","893":"\u5173\u952E\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","894":"\u65B9\u6CD5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","895":"\u6A21\u5757\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","896":"\u547D\u540D\u7A7A\u95F4\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","897":"\u7A7A\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","898":"\u6570\u5B57\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","899":"\u5BF9\u8C61\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","900":"\u8FD0\u7B97\u7B26\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","901":"\u5305\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","902":"\u5C5E\u6027\u7B26\u53F7\u7684\u524D\u666F\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u7EC4\u4EF6\u4E2D\u3002","903":"\u53C2\u8003\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","904":"\u7247\u6BB5\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","905":"\u5B57\u7B26\u4E32\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u8F6E\u5ED3\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","906":"\u7ED3\u6784\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","907":"\u6587\u672C\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","908":"\u7C7B\u578B\u53C2\u6570\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","909":"\u5355\u4F4D\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","910":"\u53D8\u91CF\u7B26\u53F7\u7684\u524D\u666F\u989C\u8272\u3002\u8FD9\u4E9B\u7B26\u53F7\u51FA\u73B0\u5728\u5927\u7EB2\u3001\u75D5\u8FF9\u5BFC\u822A\u680F\u548C\u5EFA\u8BAE\u5C0F\u90E8\u4EF6\u4E2D\u3002","911":"\u5207\u6362 Tab \u952E\u79FB\u52A8\u7126\u70B9","912":"Tab \u952E\u5C06\u79FB\u52A8\u5230\u4E0B\u4E00\u53EF\u805A\u7126\u7684\u5143\u7D20","913":"Tab \u952E\u5C06\u63D2\u5165\u5236\u8868\u7B26","914":"\u5F00\u53D1\u4EBA\u5458: \u5F3A\u5236\u91CD\u65B0\u8FDB\u884C\u6807\u8BB0","915":"\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","916":"\u68C0\u6D4B\u5230\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","917":`\u6587\u4EF6\u201C{0}\u201D\u5305\u542B\u4E00\u4E2A\u6216\u591A\u4E2A\u5F02\u5E38\u7684\u884C\u7EC8\u6B62\u7B26\uFF0C\u4F8B\u5982\u884C\u5206\u9694\u7B26(LS)\u6216\u6BB5\u843D\u5206\u9694\u7B26(PS)\u3002\r -\r -\u5EFA\u8BAE\u4ECE\u6587\u4EF6\u4E2D\u5220\u9664\u5B83\u4EEC\u3002\u53EF\u901A\u8FC7\u201Ceditor.unusualLineTerminators\u201D\u8FDB\u884C\u914D\u7F6E\u3002`,"918":"\u5220\u9664\u5F02\u5E38\u884C\u7EC8\u6B62\u7B26","919":"\u5FFD\u7565","920":"\u8BFB\u53D6\u8BBF\u95EE\u671F\u95F4\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","921":"\u5199\u5165\u8BBF\u95EE\u8FC7\u7A0B\u4E2D\u7B26\u53F7\u7684\u80CC\u666F\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u65F6\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","922":"\u7B26\u53F7\u5728\u8FDB\u884C\u8BFB\u53D6\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u8BFB\u53D6\u53D8\u91CF\u3002","923":"\u7B26\u53F7\u5728\u8FDB\u884C\u5199\u5165\u8BBF\u95EE\u64CD\u4F5C\u65F6\u7684\u8FB9\u6846\u989C\u8272\uFF0C\u4F8B\u5982\u5199\u5165\u53D8\u91CF\u3002","924":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","925":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u5199\u6743\u9650\u7B26\u53F7\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","926":"\u8F6C\u5230\u4E0B\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","927":"\u8F6C\u5230\u4E0A\u4E00\u4E2A\u7A81\u51FA\u663E\u793A\u7684\u7B26\u53F7","928":"\u89E6\u53D1\u7B26\u53F7\u9AD8\u4EAE","929":"\u5220\u9664 Word","930":"\u9ED8\u8BA4\u8BED\u8A00\u914D\u7F6E\u66FF\u4EE3","931":"\u9488\u5BF9\u67D0\u79CD\u8BED\u8A00\uFF0C\u914D\u7F6E\u66FF\u4EE3\u7F16\u8F91\u5668\u8BBE\u7F6E\u3002","932":"\u6B64\u8BBE\u7F6E\u4E0D\u652F\u6301\u6309\u8BED\u8A00\u914D\u7F6E\u3002","933":"\u65E0\u6CD5\u6CE8\u518C\u7A7A\u5C5E\u6027","934":'\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u5176\u7B26\u5408\u63CF\u8FF0\u7279\u5B9A\u8BED\u8A00\u7F16\u8F91\u5668\u8BBE\u7F6E\u7684\u8868\u8FBE\u5F0F "\\\\[.*\\\\]$"\u3002\u8BF7\u4F7F\u7528 "configurationDefaults"\u3002',"935":"\u65E0\u6CD5\u6CE8\u518C\u201C{0}\u201D\u3002\u6B64\u5C5E\u6027\u5DF2\u6CE8\u518C\u3002","936":"\u7528\u4E8E\u8FD4\u56DE\u4E0A\u4E0B\u6587\u952E\u7684\u76F8\u5173\u4FE1\u606F\u7684\u547D\u4EE4","937":"\u64CD\u4F5C\u7CFB\u7EDF\u662F\u5426\u4E3A Windows","938":"({0})\u5DF2\u6309\u4E0B\u3002\u6B63\u5728\u7B49\u5F85\u6309\u4E0B\u7B2C\u4E8C\u4E2A\u952E...","939":"\u7EC4\u5408\u952E({0}\uFF0C{1})\u4E0D\u662F\u547D\u4EE4\u3002","940":"\u5DE5\u4F5C\u53F0","941":"\u5728\u901A\u8FC7\u9F20\u6807\u591A\u9009\u6811\u548C\u5217\u8868\u6761\u76EE\u65F6\u4F7F\u7528\u7684\u4FEE\u6539\u952E (\u4F8B\u5982\u201C\u8D44\u6E90\u7BA1\u7406\u5668\u201D\u3001\u201C\u6253\u5F00\u7684\u7F16\u8F91\u5668\u201D\u548C\u201C\u6E90\u4EE3\u7801\u7BA1\u7406\u201D\u89C6\u56FE)\u3002\u201C\u5728\u4FA7\u8FB9\u6253\u5F00\u201D\u529F\u80FD\u6240\u9700\u7684\u9F20\u6807\u52A8\u4F5C (\u82E5\u53EF\u7528) \u5C06\u4F1A\u76F8\u5E94\u8C03\u6574\uFF0C\u4E0D\u4E0E\u591A\u9009\u4FEE\u6539\u952E\u51B2\u7A81\u3002","942":"\u63A7\u5236\u5982\u4F55\u4F7F\u7528\u9F20\u6807\u6253\u5F00\u6811\u548C\u5217\u8868\u4E2D\u7684\u9879(\u82E5\u652F\u6301)\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u6B64\u8BBE\u7F6E\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u5B83\u3002","943":"\u63A7\u5236\u5217\u8868\u548C\u6811\u662F\u5426\u652F\u6301\u5DE5\u4F5C\u53F0\u4E2D\u7684\u6C34\u5E73\u6EDA\u52A8\u3002\u8B66\u544A: \u6253\u5F00\u6B64\u8BBE\u7F6E\u5F71\u54CD\u4F1A\u5F71\u54CD\u6027\u80FD\u3002","944":"\u63A7\u5236\u6811\u7F29\u8FDB(\u4EE5\u50CF\u7D20\u4E3A\u5355\u4F4D)\u3002","945":"\u63A7\u5236\u6811\u662F\u5426\u5E94\u5448\u73B0\u7F29\u8FDB\u53C2\u8003\u7EBF\u3002","946":"\u63A7\u5236\u5217\u8868\u548C\u6811\u662F\u5426\u5177\u6709\u5E73\u6ED1\u6EDA\u52A8\u6548\u679C\u3002","947":"\u7B80\u5355\u952E\u76D8\u5BFC\u822A\u805A\u7126\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u4EC5\u5BF9\u524D\u7F00\u8FDB\u884C\u5339\u914D\u3002","948":"\u9AD8\u4EAE\u952E\u76D8\u5BFC\u822A\u4F1A\u7A81\u51FA\u663E\u793A\u4E0E\u952E\u76D8\u8F93\u5165\u76F8\u5339\u914D\u7684\u5143\u7D20\u3002\u8FDB\u4E00\u6B65\u5411\u4E0A\u548C\u5411\u4E0B\u5BFC\u822A\u5C06\u4EC5\u904D\u5386\u7A81\u51FA\u663E\u793A\u7684\u5143\u7D20\u3002","949":"\u7B5B\u9009\u5668\u952E\u76D8\u5BFC\u822A\u5C06\u7B5B\u9009\u51FA\u5E76\u9690\u85CF\u4E0E\u952E\u76D8\u8F93\u5165\u4E0D\u5339\u914D\u7684\u6240\u6709\u5143\u7D20\u3002","950":"\u63A7\u5236\u5DE5\u4F5C\u53F0\u4E2D\u7684\u5217\u8868\u548C\u6811\u7684\u952E\u76D8\u5BFC\u822A\u6837\u5F0F\u3002\u5B83\u53EF\u4E3A\u201C\u7B80\u5355\u201D\u3001\u201C\u7A81\u51FA\u663E\u793A\u201D\u6216\u201C\u7B5B\u9009\u201D\u3002","951":"\u63A7\u5236\u5217\u8868\u548C\u6811\u4E2D\u7684\u952E\u76D8\u5BFC\u822A\u662F\u5426\u4EC5\u901A\u8FC7\u952E\u5165\u81EA\u52A8\u89E6\u53D1\u3002\u5982\u679C\u8BBE\u7F6E\u4E3A `false` \uFF0C\u952E\u76D8\u5BFC\u822A\u53EA\u5728\u6267\u884C `list.toggleKeyboardNavigation` \u547D\u4EE4\u65F6\u89E6\u53D1\uFF0C\u60A8\u53EF\u4EE5\u4E3A\u8BE5\u547D\u4EE4\u6307\u5B9A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","952":"\u63A7\u5236\u5728\u5355\u51FB\u6587\u4EF6\u5939\u540D\u79F0\u65F6\u5982\u4F55\u6269\u5C55\u6811\u6587\u4EF6\u5939\u3002\u8BF7\u6CE8\u610F\uFF0C\u5982\u679C\u4E0D\u9002\u7528\uFF0C\u67D0\u4E9B\u6811\u548C\u5217\u8868\u53EF\u80FD\u4F1A\u9009\u62E9\u5FFD\u7565\u6B64\u8BBE\u7F6E\u3002","953":"{0}, {1}","954":"\u6700\u8FD1\u4F7F\u7528","955":"\u5176\u4ED6\u547D\u4EE4","956":'\u547D\u4EE4"{0}"\u5BFC\u81F4\u9519\u8BEF ({1})',"957":"\u5168\u5C40\u547D\u4EE4","958":"\u7F16\u8F91\u5668\u547D\u4EE4","959":"\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","960":"\u9519\u8BEF\u4FE1\u606F\u7684\u6574\u4F53\u524D\u666F\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","961":"\u5DE5\u4F5C\u53F0\u4E2D\u56FE\u6807\u7684\u9ED8\u8BA4\u989C\u8272\u3002","962":"\u7126\u70B9\u5143\u7D20\u7684\u6574\u4F53\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u4E0D\u88AB\u5176\u4ED6\u7EC4\u4EF6\u8986\u76D6\u65F6\u9002\u7528\u3002","963":"\u5728\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","964":"\u5728\u6D3B\u52A8\u5143\u7D20\u5468\u56F4\u989D\u5916\u7684\u4E00\u5C42\u8FB9\u6846\uFF0C\u7528\u6765\u63D0\u9AD8\u5BF9\u6BD4\u5EA6\u4ECE\u800C\u533A\u522B\u5176\u4ED6\u5143\u7D20\u3002","965":"\u6587\u672C\u4E2D\u94FE\u63A5\u7684\u524D\u666F\u8272\u3002","966":"\u6587\u672C\u4E2D\u94FE\u63A5\u5728\u70B9\u51FB\u6216\u9F20\u6807\u60AC\u505C\u65F6\u7684\u524D\u666F\u8272 \u3002","967":"\u6587\u672C\u4E2D\u4EE3\u7801\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","968":"\u7F16\u8F91\u5668\u5185\u5C0F\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u7684\u9634\u5F71\u989C\u8272\u3002","969":"\u8F93\u5165\u6846\u80CC\u666F\u8272\u3002","970":"\u8F93\u5165\u6846\u524D\u666F\u8272\u3002","971":"\u8F93\u5165\u6846\u8FB9\u6846\u3002","972":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u9009\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","973":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u6FC0\u6D3B\u9009\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","974":"\u8F93\u5165\u5B57\u6BB5\u4E2D\u5DF2\u6FC0\u6D3B\u7684\u9009\u9879\u7684\u524D\u666F\u8272\u3002","975":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","976":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u4FE1\u606F\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","977":"\u4E25\u91CD\u6027\u4E3A\u4FE1\u606F\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","978":"\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u80CC\u666F\u8272\u3002","979":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u8B66\u544A\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","980":"\u4E25\u91CD\u6027\u4E3A\u8B66\u544A\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","981":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u80CC\u666F\u8272\u3002","982":"\u8F93\u5165\u9A8C\u8BC1\u7ED3\u679C\u4E3A\u9519\u8BEF\u7EA7\u522B\u65F6\u7684\u524D\u666F\u8272\u3002","983":"\u4E25\u91CD\u6027\u4E3A\u9519\u8BEF\u65F6\u8F93\u5165\u9A8C\u8BC1\u7684\u8FB9\u6846\u989C\u8272\u3002","984":"\u4E0B\u62C9\u5217\u8868\u80CC\u666F\u8272\u3002","985":"\u4E0B\u62C9\u5217\u8868\u524D\u666F\u8272\u3002","986":"\u6309\u94AE\u524D\u666F\u8272\u3002","987":"\u6309\u94AE\u80CC\u666F\u8272\u3002","988":"\u6309\u94AE\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002","989":"Badge \u80CC\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","990":"Badge \u524D\u666F\u8272\u3002Badge \u662F\u5C0F\u578B\u7684\u4FE1\u606F\u6807\u7B7E\uFF0C\u5982\u8868\u793A\u641C\u7D22\u7ED3\u679C\u6570\u91CF\u7684\u6807\u7B7E\u3002","991":"\u8868\u793A\u89C6\u56FE\u88AB\u6EDA\u52A8\u7684\u6EDA\u52A8\u6761\u9634\u5F71\u3002","992":"\u6EDA\u52A8\u6761\u6ED1\u5757\u80CC\u666F\u8272","993":"\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u60AC\u505C\u65F6\u7684\u80CC\u666F\u8272","994":"\u6EDA\u52A8\u6761\u6ED1\u5757\u5728\u88AB\u70B9\u51FB\u65F6\u7684\u80CC\u666F\u8272\u3002","995":"\u8868\u793A\u957F\u65F6\u95F4\u64CD\u4F5C\u7684\u8FDB\u5EA6\u6761\u7684\u80CC\u666F\u8272\u3002","996":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","997":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","998":"\u7F16\u8F91\u5668\u4E2D\u9519\u8BEF\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","999":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1000":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1001":"\u7F16\u8F91\u5668\u4E2D\u8B66\u544A\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1002":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1003":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1004":"\u7F16\u8F91\u5668\u4E2D\u4FE1\u606F\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1005":"\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u6CE2\u6D6A\u7EBF\u7684\u524D\u666F\u8272\u3002","1006":"\u7F16\u8F91\u5668\u4E2D\u63D0\u793A\u6846\u7684\u8FB9\u6846\u989C\u8272\u3002","1007":"\u7F16\u8F91\u5668\u80CC\u666F\u8272\u3002","1008":"\u7F16\u8F91\u5668\u9ED8\u8BA4\u524D\u666F\u8272\u3002","1009":"\u7F16\u8F91\u5668\u7EC4\u4EF6(\u5982\u67E5\u627E/\u66FF\u6362)\u80CC\u666F\u989C\u8272\u3002","1010":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u524D\u666F\u8272\uFF0C\u5982\u67E5\u627E/\u66FF\u6362\u3002","1011":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u91CD\u5199\u65F6\u9002\u7528\u3002","1012":"\u7F16\u8F91\u5668\u5C0F\u90E8\u4EF6\u5927\u5C0F\u8C03\u6574\u6761\u7684\u8FB9\u6846\u989C\u8272\u3002\u6B64\u989C\u8272\u4EC5\u5728\u5C0F\u90E8\u4EF6\u6709\u8C03\u6574\u8FB9\u6846\u4E14\u4E0D\u88AB\u5C0F\u90E8\u4EF6\u989C\u8272\u8986\u76D6\u65F6\u4F7F\u7528\u3002","1013":"\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u9009\u53D6\u5668(\u5982\u547D\u4EE4\u8C03\u8272\u677F)\u7684\u5BB9\u5668\u3002","1014":"\u524D\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","1015":"\u6807\u9898\u80CC\u666F\u989C\u8272\u5FEB\u901F\u9009\u53D6\u5668\u3002\u5FEB\u901F\u9009\u53D6\u5668\u5C0F\u90E8\u4EF6\u662F\u547D\u4EE4\u8C03\u8272\u677F\u7B49\u9009\u53D6\u5668\u7684\u5BB9\u5668\u3002","1016":"\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u6807\u7B7E\u7684\u989C\u8272\u3002","1017":"\u5FEB\u901F\u9009\u53D6\u5668\u5206\u7EC4\u8FB9\u6846\u7684\u989C\u8272\u3002","1018":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u80CC\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1019":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u524D\u666F\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1020":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1021":"\u952E\u7ED1\u5B9A\u6807\u7B7E\u8FB9\u6846\u5E95\u90E8\u8272\u3002\u952E\u7ED1\u5B9A\u6807\u7B7E\u7528\u4E8E\u8868\u793A\u952E\u76D8\u5FEB\u6377\u65B9\u5F0F\u3002","1022":"\u7F16\u8F91\u5668\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\u3002","1023":"\u7528\u4EE5\u5F70\u663E\u9AD8\u5BF9\u6BD4\u5EA6\u7684\u6240\u9009\u6587\u672C\u7684\u989C\u8272\u3002","1024":"\u975E\u6D3B\u52A8\u7F16\u8F91\u5668\u4E2D\u6240\u9009\u5185\u5BB9\u7684\u989C\u8272\uFF0C\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u88C5\u9970\u6548\u679C\u3002","1025":"\u5177\u6709\u4E0E\u6240\u9009\u9879\u76F8\u5173\u5185\u5BB9\u7684\u533A\u57DF\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1026":"\u4E0E\u6240\u9009\u9879\u5185\u5BB9\u76F8\u540C\u7684\u533A\u57DF\u7684\u8FB9\u6846\u989C\u8272\u3002","1027":"\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002","1028":"\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1029":"\u9650\u5236\u641C\u7D22\u8303\u56F4\u7684\u989C\u8272\u3002\u989C\u8272\u4E0D\u80FD\u4E0D\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u5E95\u5C42\u88C5\u9970\u3002","1030":"\u5F53\u524D\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1031":"\u5176\u4ED6\u641C\u7D22\u5339\u914D\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1032":"\u9650\u5236\u641C\u7D22\u7684\u8303\u56F4\u7684\u8FB9\u6846\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1033":"\u5728\u4E0B\u9762\u7A81\u51FA\u663E\u793A\u60AC\u505C\u7684\u5B57\u8BCD\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1034":"\u7F16\u8F91\u5668\u60AC\u505C\u63D0\u793A\u7684\u80CC\u666F\u989C\u8272\u3002","1035":"\u7F16\u8F91\u5668\u60AC\u505C\u7684\u524D\u666F\u989C\u8272\u3002","1036":"\u5149\u6807\u60AC\u505C\u65F6\u7F16\u8F91\u5668\u7684\u8FB9\u6846\u989C\u8272\u3002","1037":"\u7F16\u8F91\u5668\u60AC\u505C\u72B6\u6001\u680F\u7684\u80CC\u666F\u8272\u3002","1038":"\u6D3B\u52A8\u94FE\u63A5\u989C\u8272\u3002","1039":"\u5185\u8054\u63D0\u793A\u7684\u524D\u666F\u8272","1040":"\u5185\u8054\u63D0\u793A\u7684\u80CC\u666F\u8272","1041":"Foreground color of inline hints for types","1042":"Background color of inline hints for types","1043":"Foreground color of inline hints for parameters","1044":"Background color of inline hints for parameters","1045":"\u7528\u4E8E\u706F\u6CE1\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","1046":"\u7528\u4E8E\u706F\u6CE1\u81EA\u52A8\u4FEE\u590D\u64CD\u4F5C\u56FE\u6807\u7684\u989C\u8272\u3002","1047":"\u5DF2\u63D2\u5165\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1048":"\u5DF2\u5220\u9664\u7684\u6587\u672C\u7684\u80CC\u666F\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1049":"\u63D2\u5165\u7684\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1050":"\u88AB\u5220\u9664\u6587\u672C\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1051":"\u4E24\u4E2A\u6587\u672C\u7F16\u8F91\u5668\u4E4B\u95F4\u7684\u8FB9\u6846\u989C\u8272\u3002","1052":"\u5DEE\u5F02\u7F16\u8F91\u5668\u7684\u5BF9\u89D2\u7EBF\u586B\u5145\u989C\u8272\u3002\u5BF9\u89D2\u7EBF\u586B\u5145\u7528\u4E8E\u5E76\u6392\u5DEE\u5F02\u89C6\u56FE\u3002","1053":"\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1054":"\u7126\u70B9\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1055":"\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1056":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1057":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1058":"\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u6D3B\u52A8\u65F6\u7684\u5217\u8868/\u6811\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","1059":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1060":"\u5DF2\u9009\u9879\u5728\u5217\u8868\u6216\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1061":"\u5DF2\u9009\u9879\u5728\u5217\u8868/\u6811\u975E\u6D3B\u52A8\u65F6\u7684\u56FE\u6807\u524D\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u5219\u6CA1\u6709\u3002","1062":"\u975E\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u63A7\u4EF6\u4E2D\u7126\u70B9\u9879\u7684\u80CC\u666F\u989C\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868\u6216\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1063":"\u5217\u8868/\u6570\u975E\u6D3B\u52A8\u65F6\uFF0C\u7126\u70B9\u9879\u76EE\u7684\u5217\u8868/\u6811\u8FB9\u6846\u8272\u3002\u6D3B\u52A8\u7684\u5217\u8868/\u6811\u5177\u6709\u952E\u76D8\u7126\u70B9\uFF0C\u975E\u6D3B\u52A8\u7684\u6CA1\u6709\u3002","1064":"\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u80CC\u666F\u989C\u8272\u3002","1065":"\u9F20\u6807\u5728\u9879\u76EE\u4E0A\u60AC\u505C\u65F6\uFF0C\u5217\u8868\u6216\u6811\u7684\u524D\u666F\u989C\u8272\u3002","1066":"\u4F7F\u7528\u9F20\u6807\u79FB\u52A8\u9879\u76EE\u65F6\uFF0C\u5217\u8868\u6216\u6811\u8FDB\u884C\u62D6\u653E\u7684\u80CC\u666F\u989C\u8272\u3002","1067":"\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5176\u4E2D\u5339\u914D\u5185\u5BB9\u7684\u9AD8\u4EAE\u989C\u8272\u3002","1068":"\u5728\u5217\u8868\u6216\u6811\u4E2D\u641C\u7D22\u65F6\uFF0C\u5339\u914D\u6D3B\u52A8\u805A\u7126\u9879\u7684\u7A81\u51FA\u663E\u793A\u5185\u5BB9\u7684\u5217\u8868/\u6811\u524D\u666F\u8272\u3002","1069":"\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u80CC\u666F\u8272\u3002","1070":"\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1071":"\u5F53\u6CA1\u6709\u5339\u914D\u9879\u65F6\uFF0C\u5217\u8868\u548C\u6811\u4E2D\u7C7B\u578B\u7B5B\u9009\u5668\u5C0F\u7EC4\u4EF6\u7684\u8F6E\u5ED3\u989C\u8272\u3002","1072":"\u7F29\u8FDB\u53C2\u8003\u7EBF\u7684\u6811\u63CF\u8FB9\u989C\u8272\u3002","1073":"\u8BF7\u6539\u7528 quickInputList.focusBackground","1074":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u524D\u666F\u8272\u3002","1075":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u53D6\u5668\u56FE\u6807\u524D\u666F\u8272\u3002","1076":"\u7126\u70B9\u9879\u76EE\u7684\u5FEB\u901F\u9009\u62E9\u5668\u80CC\u666F\u8272\u3002","1077":"\u83DC\u5355\u7684\u8FB9\u6846\u989C\u8272\u3002","1078":"\u83DC\u5355\u9879\u7684\u524D\u666F\u989C\u8272\u3002","1079":"\u83DC\u5355\u9879\u7684\u80CC\u666F\u989C\u8272\u3002","1080":"\u83DC\u5355\u4E2D\u9009\u5B9A\u83DC\u5355\u9879\u7684\u524D\u666F\u8272\u3002","1081":"\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u80CC\u666F\u8272\u3002","1082":"\u83DC\u5355\u4E2D\u6240\u9009\u83DC\u5355\u9879\u7684\u8FB9\u6846\u989C\u8272\u3002","1083":"\u83DC\u5355\u4E2D\u5206\u9694\u7EBF\u7684\u989C\u8272\u3002","1084":"\u4F7F\u7528\u9F20\u6807\u60AC\u505C\u5728\u64CD\u4F5C\u4E0A\u65F6\u663E\u793A\u5DE5\u5177\u680F\u80CC\u666F","1085":"\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","1086":"\u4EE3\u7801\u7247\u6BB5 Tab \u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","1087":"\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684 Tab \u4F4D\u7684\u9AD8\u4EAE\u80CC\u666F\u8272\u3002","1088":"\u4EE3\u7801\u7247\u6BB5\u4E2D\u6700\u540E\u7684\u5236\u8868\u4F4D\u7684\u9AD8\u4EAE\u8FB9\u6846\u989C\u8272\u3002","1089":"\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1090":"\u7528\u4E8E\u7A81\u51FA\u663E\u793A\u6240\u9009\u5185\u5BB9\u7684\u6982\u8FF0\u6807\u5C3A\u6807\u8BB0\u989C\u8272\u3002\u989C\u8272\u5FC5\u987B\u900F\u660E\uFF0C\u4EE5\u514D\u9690\u85CF\u4E0B\u9762\u7684\u4FEE\u9970\u6548\u679C\u3002","1091":"\u7528\u4E8E\u67E5\u627E\u5339\u914D\u9879\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1092":"Minimap marker color for repeating editor selections.","1093":"\u7F16\u8F91\u5668\u9009\u533A\u5728\u8FF7\u4F60\u5730\u56FE\u4E2D\u5BF9\u5E94\u7684\u6807\u8BB0\u989C\u8272\u3002","1094":"\u7528\u4E8E\u9519\u8BEF\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1095":"\u7528\u4E8E\u8B66\u544A\u7684\u8FF7\u4F60\u5730\u56FE\u6807\u8BB0\u989C\u8272\u3002","1096":"\u8FF7\u4F60\u5730\u56FE\u80CC\u666F\u989C\u8272\u3002","1097":'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.',"1098":"\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u80CC\u666F\u989C\u8272\u3002","1099":"\u60AC\u505C\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","1100":"\u5355\u51FB\u65F6\uFF0C\u8FF7\u4F60\u5730\u56FE\u6ED1\u5757\u7684\u80CC\u666F\u989C\u8272\u3002","1101":"\u7528\u4E8E\u95EE\u9898\u9519\u8BEF\u56FE\u6807\u7684\u989C\u8272\u3002","1102":"\u7528\u4E8E\u95EE\u9898\u8B66\u544A\u56FE\u6807\u7684\u989C\u8272\u3002","1103":"\u7528\u4E8E\u95EE\u9898\u4FE1\u606F\u56FE\u6807\u7684\u989C\u8272\u3002","1104":"\u8981\u4F7F\u7528\u7684\u5B57\u4F53\u7684 ID\u3002\u5982\u679C\u672A\u8BBE\u7F6E\uFF0C\u5219\u4F7F\u7528\u6700\u5148\u5B9A\u4E49\u7684\u5B57\u4F53\u3002","1105":"\u4E0E\u56FE\u6807\u5B9A\u4E49\u5173\u8054\u7684\u5B57\u4F53\u5B57\u7B26\u3002","1106":"\u5C0F\u7EC4\u4EF6\u4E2D\u201C\u5173\u95ED\u201D\u64CD\u4F5C\u7684\u56FE\u6807\u3002","1107":"\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u5173\u95ED\u5E76\u4E14\u5DF2\u5728\u78C1\u76D8\u4E0A\u4FEE\u6539: {0}\u3002","1108":"\u4EE5\u4E0B\u6587\u4EF6\u5DF2\u4EE5\u4E0D\u517C\u5BB9\u7684\u65B9\u5F0F\u4FEE\u6539: {0}\u3002","1109":"\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D\u3002{1}","1110":"\u65E0\u6CD5\u64A4\u6D88\u6240\u6709\u6587\u4EF6\u7684\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","1111":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","1112":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","1113":"\u662F\u5426\u8981\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u64A4\u6D88\u201C{0}\u201D?","1114":"\u5728 {0} \u4E2A\u6587\u4EF6\u4E2D\u64A4\u6D88","1115":"\u64A4\u6D88\u6B64\u6587\u4EF6","1116":"\u53D6\u6D88","1117":"\u65E0\u6CD5\u64A4\u9500\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002","1118":"\u662F\u5426\u8981\u64A4\u6D88\u201C{0}\u201D?","1119":"\u662F","1120":"\u65E0\u6CD5\u5728\u6240\u6709\u6587\u4EF6\u4E2D\u91CD\u505A\u201C{0}\u201D\u3002{1}","1121":"\u65E0\u6CD5\u5BF9\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u66F4\u6539 {1}","1122":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A {1} \u4E0A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C","1123":"\u65E0\u6CD5\u8DE8\u6240\u6709\u6587\u4EF6\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u540C\u65F6\u53D1\u751F\u4E86\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C","1124":"\u65E0\u6CD5\u91CD\u505A\u201C{0}\u201D\uFF0C\u56E0\u4E3A\u5DF2\u6709\u4E00\u9879\u64A4\u6D88\u6216\u91CD\u505A\u64CD\u4F5C\u6B63\u5728\u8FD0\u884C\u3002"}},dM=localStorage.getItem("magic-locale")||"zh-cn";function H$(r,e){let t;return e.length===0?t=r:t=r.replace(/{(d+)}/g,function(i,n){const s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function m(r,e){if(dM!=="en"){let s=W$[e]||-1;const o=V$[dM];s in o&&(e=o[s])}const t=[];for(var i=0,n=arguments.length;i<n;++i)t.push(arguments[i]);return H$(e,t)}var yS;const $b="en";let Ub=!1,jb=!1,Kb=!1,fM=!1,gM=!1,SS=!1,qb,LS=$b,z$,Pl;const wi=typeof self=="object"?self:typeof global=="object"?global:{};let yn;typeof wi.vscode!="undefined"&&typeof wi.vscode.process!="undefined"?yn=wi.vscode.process:typeof process!="undefined"&&(yn=process);const $$=typeof((yS=yn==null?void 0:yn.versions)===null||yS===void 0?void 0:yS.electron)=="string"&&yn.type==="renderer";if(typeof navigator=="object"&&!$$)Pl=navigator.userAgent,Ub=Pl.indexOf("Windows")>=0,jb=Pl.indexOf("Macintosh")>=0,SS=(Pl.indexOf("Macintosh")>=0||Pl.indexOf("iPad")>=0||Pl.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,Kb=Pl.indexOf("Linux")>=0,gM=!0,qb=navigator.language,LS=qb;else if(typeof yn=="object"){Ub=yn.platform==="win32",jb=yn.platform==="darwin",Kb=yn.platform==="linux",Kb&&!!yn.env.SNAP&&yn.env.SNAP_REVISION,qb=$b,LS=$b;const r=yn.env.VSCODE_NLS_CONFIG;if(r)try{const e=JSON.parse(r),t=e.availableLanguages["*"];qb=e.locale,LS=t||$b,z$=e._translationsConfigFile}catch{}fM=!0}else console.error("Unable to resolve platform.");const Xi=Ub,Je=jb,Zn=Kb,js=fM,Sd=gM,No=SS,U$=Pl,xS=function(){if(wi.setImmediate)return wi.setImmediate.bind(wi);if(typeof wi.postMessage=="function"&&!wi.importScripts){let t=[];wi.addEventListener("message",n=>{if(n.data&&n.data.vscodeSetImmediateId)for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a.id===n.data.vscodeSetImmediateId){t.splice(s,1),a.callback();return}}});let i=0;return n=>{const s=++i;t.push({id:s,callback:n}),wi.postMessage({vscodeSetImmediateId:s},"*")}}if(typeof(yn==null?void 0:yn.nextTick)=="function")return yn.nextTick.bind(yn);const e=Promise.resolve();return t=>e.then(t)}(),bs=jb||SS?2:Ub?1:3;let pM=!0,mM=!1;function _M(){if(!mM){mM=!0;const r=new Uint8Array(2);r[0]=1,r[1]=2,pM=new Uint16Array(r.buffer)[0]===(2<<8)+1}return pM}const bM="`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?";function j$(r=""){let e="(-?\\d*\\.\\d\\w*)|([^";for(const t of bM)r.indexOf(t)>=0||(e+="\\"+t);return e+="\\s]+)",new RegExp(e,"g")}const vM=j$();function kS(r){let e=vM;if(r&&r instanceof RegExp)if(r.global)e=r;else{let t="g";r.ignoreCase&&(t+="i"),r.multiline&&(t+="m"),r.unicode&&(t+="u"),e=new RegExp(r.source,t)}return e.lastIndex=0,e}const K$={maxLen:1e3,windowSize:15,timeBudget:150};function Gb(r,e,t,i,n=K$){if(t.length>n.maxLen){let c=r-n.maxLen/2;return c<0?c=0:i+=c,t=t.substring(c,r+n.maxLen/2),Gb(r,e,t,i,n)}const s=Date.now(),o=r-1-i;let a=-1,l=null;for(let c=1;!(Date.now()-s>=n.timeBudget);c++){const h=o-n.windowSize*c;e.lastIndex=Math.max(0,h);const u=q$(e,t,o,a);if(!u&&l||(l=u,h<=0))break;a=h}if(l){let c={word:l[0],startColumn:i+1+l.index,endColumn:i+1+l.index+l[0].length};return e.lastIndex=0,c}return null}function q$(r,e,t,i){let n;for(;n=r.exec(e);){const s=n.index||0;if(s<=t&&r.lastIndex>=t)return n;if(i>0&&s>i)return null}return null}const Ol=8;class CM{constructor(e){this._values=e}hasChanged(e){return this._values[e]}}class G${constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class wM{constructor(){this.stableMinimapLayoutInput=null,this.stableFitMaxMinimapScale=0,this.stableFitRemainingWidth=0}}class Ri{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}compute(e,t,i){return i}}class Ld{constructor(e,t=null){this.schema=void 0,this.id=e,this.name="_never_",this.defaultValue=void 0,this.deps=t}validate(e){return this.defaultValue}}class ch{constructor(e,t,i,n){this.id=e,this.name=t,this.defaultValue=i,this.schema=n}validate(e){return typeof e=="undefined"?this.defaultValue:e}compute(e,t,i){return i}}function Te(r,e){return typeof r=="undefined"?e:r==="false"?!1:Boolean(r)}class rt extends ch{constructor(e,t,i,n=void 0){typeof n!="undefined"&&(n.type="boolean",n.default=i);super(e,t,i,n)}validate(e){return Te(e,this.defaultValue)}}function DS(r,e,t,i){if(typeof r=="undefined")return e;let n=parseInt(r,10);return isNaN(n)?e:(n=Math.max(t,n),n=Math.min(i,n),n|0)}class jt extends ch{constructor(e,t,i,n,s,o=void 0){typeof o!="undefined"&&(o.type="integer",o.default=i,o.minimum=n,o.maximum=s);super(e,t,i,o);this.minimum=n,this.maximum=s}static clampedInt(e,t,i,n){return DS(e,t,i,n)}validate(e){return jt.clampedInt(e,this.defaultValue,this.minimum,this.maximum)}}class To extends ch{constructor(e,t,i,n,s){typeof s!="undefined"&&(s.type="number",s.default=i);super(e,t,i,s);this.validationFn=n}static clamp(e,t,i){return e<t?t:e>i?i:e}static float(e,t){if(typeof e=="number")return e;if(typeof e=="undefined")return t;const i=parseFloat(e);return isNaN(i)?t:i}validate(e){return this.validationFn(To.float(e,this.defaultValue))}}class cr extends ch{static string(e,t){return typeof e!="string"?t:e}constructor(e,t,i,n=void 0){typeof n!="undefined"&&(n.type="string",n.default=i);super(e,t,i,n)}validate(e){return cr.string(e,this.defaultValue)}}function Yn(r,e,t){return typeof r!="string"||t.indexOf(r)===-1?e:r}class xi extends ch{constructor(e,t,i,n,s=void 0){typeof s!="undefined"&&(s.type="string",s.enum=n,s.default=i);super(e,t,i,s);this._allowedValues=n}validate(e){return Yn(e,this.defaultValue,this._allowedValues)}}class np extends Ri{constructor(e,t,i,n,s,o,a=void 0){typeof a!="undefined"&&(a.type="string",a.enum=s,a.default=n);super(e,t,i,a);this._allowedValues=s,this._convert=o}validate(e){return typeof e!="string"?this.defaultValue:this._allowedValues.indexOf(e)===-1?this.defaultValue:this._convert(e)}}function Z$(r){switch(r){case"none":return 0;case"keep":return 1;case"brackets":return 2;case"advanced":return 3;case"full":return 4}}class Y$ extends Ri{constructor(){super(2,"accessibilitySupport",0,{type:"string",enum:["auto","on","off"],enumDescriptions:[m("accessibilitySupport.auto","The editor will use platform APIs to detect when a Screen Reader is attached."),m("accessibilitySupport.on","The editor will be permanently optimized for usage with a Screen Reader. Word wrapping will be disabled."),m("accessibilitySupport.off","The editor will never be optimized for usage with a Screen Reader.")],default:"auto",description:m("accessibilitySupport","Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")})}validate(e){switch(e){case"auto":return 0;case"off":return 1;case"on":return 2}return this.defaultValue}compute(e,t,i){return i===0?e.accessibilitySupport:i}}class X$ extends Ri{constructor(){const e={insertSpace:!0,ignoreEmptyLines:!0};super(19,"comments",e,{"editor.comments.insertSpace":{type:"boolean",default:e.insertSpace,description:m("comments.insertSpace","Controls whether a space character is inserted when commenting.")},"editor.comments.ignoreEmptyLines":{type:"boolean",default:e.ignoreEmptyLines,description:m("comments.ignoreEmptyLines","Controls if empty lines should be ignored with toggle, add or remove actions for line comments.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertSpace:Te(t.insertSpace,this.defaultValue.insertSpace),ignoreEmptyLines:Te(t.ignoreEmptyLines,this.defaultValue.ignoreEmptyLines)}}}function Q$(r){switch(r){case"blink":return 1;case"smooth":return 2;case"phase":return 3;case"expand":return 4;case"solid":return 5}}var zi;(function(r){r[r.Line=1]="Line",r[r.Block=2]="Block",r[r.Underline=3]="Underline",r[r.LineThin=4]="LineThin",r[r.BlockOutline=5]="BlockOutline",r[r.UnderlineThin=6]="UnderlineThin"})(zi||(zi={}));function J$(r){switch(r){case"line":return zi.Line;case"block":return zi.Block;case"underline":return zi.Underline;case"line-thin":return zi.LineThin;case"block-outline":return zi.BlockOutline;case"underline-thin":return zi.UnderlineThin}}class eU extends Ld{constructor(){super(126,[65,33])}compute(e,t,i){const n=["monaco-editor"];return t.get(33)&&n.push(t.get(33)),e.extraEditorClassName&&n.push(e.extraEditorClassName),t.get(65)==="default"?n.push("mouse-default"):t.get(65)==="copy"&&n.push("mouse-copy"),t.get(99)&&n.push("showUnused"),t.get(124)&&n.push("showDeprecated"),n.join(" ")}}class tU extends rt{constructor(){super(32,"emptySelectionClipboard",!0,{description:m("emptySelectionClipboard","Controls whether copying without a selection copies the current line.")})}compute(e,t,i){return i&&e.emptySelectionClipboard}}class iU extends Ri{constructor(){const e={cursorMoveOnType:!0,seedSearchStringFromSelection:"always",autoFindInSelection:"never",globalFindClipboard:!1,addExtraSpaceOnTop:!0,loop:!0};super(35,"find",e,{"editor.find.cursorMoveOnType":{type:"boolean",default:e.cursorMoveOnType,description:m("find.cursorMoveOnType","Controls whether the cursor should jump to find matches while typing.")},"editor.find.seedSearchStringFromSelection":{type:"string",enum:["never","always","selection"],default:e.seedSearchStringFromSelection,enumDescriptions:[m("editor.find.seedSearchStringFromSelection.never","Never seed search string from the editor selection."),m("editor.find.seedSearchStringFromSelection.always","Always seed search string from the editor selection, including word at cursor position."),m("editor.find.seedSearchStringFromSelection.selection","Only seed search string from the editor selection.")],description:m("find.seedSearchStringFromSelection","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:[m("editor.find.autoFindInSelection.never","Never turn on Find in Selection automatically (default)."),m("editor.find.autoFindInSelection.always","Always turn on Find in Selection automatically."),m("editor.find.autoFindInSelection.multiline","Turn on Find in Selection automatically when multiple lines of content are selected.")],description:m("find.autoFindInSelection","Controls the condition for turning on Find in Selection automatically.")},"editor.find.globalFindClipboard":{type:"boolean",default:e.globalFindClipboard,description:m("find.globalFindClipboard","Controls whether the Find Widget should read or modify the shared find clipboard on macOS."),included:Je},"editor.find.addExtraSpaceOnTop":{type:"boolean",default:e.addExtraSpaceOnTop,description:m("find.addExtraSpaceOnTop","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:m("find.loop","Controls whether the search automatically restarts from the beginning (or the end) when no further matches can be found.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{cursorMoveOnType:Te(t.cursorMoveOnType,this.defaultValue.cursorMoveOnType),seedSearchStringFromSelection:typeof e.seedSearchStringFromSelection=="boolean"?e.seedSearchStringFromSelection?"always":"never":Yn(t.seedSearchStringFromSelection,this.defaultValue.seedSearchStringFromSelection,["never","always","selection"]),autoFindInSelection:typeof e.autoFindInSelection=="boolean"?e.autoFindInSelection?"always":"never":Yn(t.autoFindInSelection,this.defaultValue.autoFindInSelection,["never","always","multiline"]),globalFindClipboard:Te(t.globalFindClipboard,this.defaultValue.globalFindClipboard),addExtraSpaceOnTop:Te(t.addExtraSpaceOnTop,this.defaultValue.addExtraSpaceOnTop),loop:Te(t.loop,this.defaultValue.loop)}}}class Dr extends Ri{constructor(){super(44,"fontLigatures",Dr.OFF,{anyOf:[{type:"boolean",description:m("fontLigatures","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:m("fontFeatureSettings","Explicit 'font-feature-settings' CSS property. A boolean can be passed instead if one only needs to turn on/off ligatures.")}],description:m("fontLigaturesGeneral","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 typeof e=="undefined"?this.defaultValue:typeof e=="string"?e==="false"?Dr.OFF:e==="true"?Dr.ON:e:Boolean(e)?Dr.ON:Dr.OFF}}Dr.OFF='"liga" off, "calt" off';Dr.ON='"liga" on, "calt" on';class nU extends Ld{constructor(){super(43)}compute(e,t,i){return e.fontInfo}}class rU extends ch{constructor(){super(45,"fontSize",hr.fontSize,{type:"number",minimum:6,maximum:100,default:hr.fontSize,description:m("fontSize","Controls the font size in pixels.")})}validate(e){let t=To.float(e,this.defaultValue);return t===0?hr.fontSize:To.clamp(t,6,100)}compute(e,t,i){return e.fontInfo.fontSize}}class Ao extends Ri{constructor(){super(46,"fontWeight",hr.fontWeight,{anyOf:[{type:"number",minimum:Ao.MINIMUM_VALUE,maximum:Ao.MAXIMUM_VALUE,errorMessage:m("fontWeightErrorMessage",'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:Ao.SUGGESTION_VALUES}],default:hr.fontWeight,description:m("fontWeight",'Controls the font weight. Accepts "normal" and "bold" keywords or numbers between 1 and 1000.')})}validate(e){return e==="normal"||e==="bold"?e:String(jt.clampedInt(e,hr.fontWeight,Ao.MINIMUM_VALUE,Ao.MAXIMUM_VALUE))}}Ao.SUGGESTION_VALUES=["normal","bold","100","200","300","400","500","600","700","800","900"];Ao.MINIMUM_VALUE=1;Ao.MAXIMUM_VALUE=1e3;class sU extends Ri{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:[m("editor.gotoLocation.multiple.peek","Show peek view of the results (default)"),m("editor.gotoLocation.multiple.gotoAndPeek","Go to the primary result and show a peek view"),m("editor.gotoLocation.multiple.goto","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(50,"gotoLocation",e,{"editor.gotoLocation.multiple":{deprecationMessage:m("editor.gotoLocation.multiple.deprecated","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:m("editor.editor.gotoLocation.multipleDefinitions","Controls the behavior the 'Go to Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleTypeDefinitions":Object.assign({description:m("editor.editor.gotoLocation.multipleTypeDefinitions","Controls the behavior the 'Go to Type Definition'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleDeclarations":Object.assign({description:m("editor.editor.gotoLocation.multipleDeclarations","Controls the behavior the 'Go to Declaration'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleImplementations":Object.assign({description:m("editor.editor.gotoLocation.multipleImplemenattions","Controls the behavior the 'Go to Implementations'-command when multiple target locations exist.")},t),"editor.gotoLocation.multipleReferences":Object.assign({description:m("editor.editor.gotoLocation.multipleReferences","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:m("alternativeDefinitionCommand","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:m("alternativeTypeDefinitionCommand","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:m("alternativeDeclarationCommand","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:m("alternativeImplementationCommand","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:m("alternativeReferenceCommand","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||typeof e!="object")return this.defaultValue;const a=e;return{multiple:Yn(a.multiple,this.defaultValue.multiple,["peek","gotoAndPeek","goto"]),multipleDefinitions:(t=a.multipleDefinitions)!==null&&t!==void 0?t:Yn(a.multipleDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleTypeDefinitions:(i=a.multipleTypeDefinitions)!==null&&i!==void 0?i:Yn(a.multipleTypeDefinitions,"peek",["peek","gotoAndPeek","goto"]),multipleDeclarations:(n=a.multipleDeclarations)!==null&&n!==void 0?n:Yn(a.multipleDeclarations,"peek",["peek","gotoAndPeek","goto"]),multipleImplementations:(s=a.multipleImplementations)!==null&&s!==void 0?s:Yn(a.multipleImplementations,"peek",["peek","gotoAndPeek","goto"]),multipleReferences:(o=a.multipleReferences)!==null&&o!==void 0?o:Yn(a.multipleReferences,"peek",["peek","gotoAndPeek","goto"]),alternativeDefinitionCommand:cr.string(a.alternativeDefinitionCommand,this.defaultValue.alternativeDefinitionCommand),alternativeTypeDefinitionCommand:cr.string(a.alternativeTypeDefinitionCommand,this.defaultValue.alternativeTypeDefinitionCommand),alternativeDeclarationCommand:cr.string(a.alternativeDeclarationCommand,this.defaultValue.alternativeDeclarationCommand),alternativeImplementationCommand:cr.string(a.alternativeImplementationCommand,this.defaultValue.alternativeImplementationCommand),alternativeReferenceCommand:cr.string(a.alternativeReferenceCommand,this.defaultValue.alternativeReferenceCommand)}}}class oU extends Ri{constructor(){const e={enabled:!0,delay:300,sticky:!0};super(52,"hover",e,{"editor.hover.enabled":{type:"boolean",default:e.enabled,description:m("hover.enabled","Controls whether the hover is shown.")},"editor.hover.delay":{type:"number",default:e.delay,description:m("hover.delay","Controls the delay in milliseconds after which the hover is shown.")},"editor.hover.sticky":{type:"boolean",default:e.sticky,description:m("hover.sticky","Controls whether the hover should remain visible when mouse is moved over it.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Te(t.enabled,this.defaultValue.enabled),delay:jt.clampedInt(t.delay,this.defaultValue.delay,0,1e4),sticky:Te(t.sticky,this.defaultValue.sticky)}}}class xd extends Ld{constructor(){super(129,[49,57,37,64,91,59,60,93,116,119,120,121,2])}compute(e,t,i){return xd.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})}static computeContainedMinimapLineCount(e){const t=e.height/e.lineHeight,i=e.scrollBeyondLastLine?t-1:0,n=(e.viewLineCount+i)/(e.pixelRatio*e.height),s=Math.floor(e.viewLineCount/n);return{typicalViewportLineCount:t,extraLinesBeyondLastLine:i,desiredRatio:n,minimapLineCount: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,a=o&&e.outerHeight===o.outerHeight&&e.lineHeight===o.lineHeight&&e.typicalHalfwidthCharacterWidth===o.typicalHalfwidthCharacterWidth&&e.pixelRatio===o.pixelRatio&&e.scrollBeyondLastLine===o.scrollBeyondLastLine&&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,l=e.lineHeight,c=e.typicalHalfwidthCharacterWidth,h=e.scrollBeyondLastLine,u=e.minimap.renderCharacters;let d=s>=2?Math.round(e.minimap.scale*2):e.minimap.scale;const f=e.minimap.maxColumn,g=e.minimap.size,p=e.minimap.side,_=e.verticalScrollbarWidth,v=e.viewLineCount,b=e.remainingWidth,C=e.isViewportWrapping,y=u?2:3;let x=Math.floor(s*n);const S=x/s;let w=!1,L=!1,N=y*d,P=d/s,B=1;if(g==="fill"||g==="fit"){const{typicalViewportLineCount:M,extraLinesBeyondLastLine:W,desiredRatio:ge,minimapLineCount:se}=xd.computeContainedMinimapLineCount({viewLineCount:v,scrollBeyondLastLine:h,height:n,lineHeight:l,pixelRatio:s});if(v/se>1)w=!0,L=!0,d=1,N=1,P=d/s;else{let we=!1,De=d+1;if(g==="fit"){const ct=Math.ceil((v+W)*N);C&&a&&b<=t.stableFitRemainingWidth?(we=!0,De=t.stableFitMaxMinimapScale):we=ct>x}if(g==="fill"||we){w=!0;const ct=d;N=Math.min(l*s,Math.max(1,Math.floor(1/ge))),C&&a&&b<=t.stableFitRemainingWidth&&(De=t.stableFitMaxMinimapScale),d=Math.min(De,Math.max(1,Math.floor(N/y))),d>ct&&(B=Math.min(2,d/ct)),P=d/s/B,x=Math.ceil(Math.max(M,v+W)*N),C?(t.stableMinimapLayoutInput=e,t.stableFitRemainingWidth=b,t.stableFitMaxMinimapScale=d):(t.stableMinimapLayoutInput=null,t.stableFitRemainingWidth=0)}}}const U=Math.floor(f*P),j=Math.min(U,Math.max(0,Math.floor((b-_-2)*P/(c+P)))+Ol);let re=Math.floor(s*j);const te=re/s;re=Math.floor(re*B);const A=u?1:2,D=p==="left"?0:i-j-_;return{renderMinimap:A,minimapLeft:D,minimapWidth:j,minimapHeightIsEditorHeight:w,minimapIsSampling:L,minimapScale:d,minimapLineHeight:N,minimapCanvasInnerWidth:re,minimapCanvasInnerHeight:x,minimapCanvasOuterWidth:te,minimapCanvasOuterHeight:S}}static computeLayout(e,t){const i=t.outerWidth|0,n=t.outerHeight|0,s=t.lineHeight|0,o=t.lineNumbersDigitCount|0,a=t.typicalHalfwidthCharacterWidth,l=t.maxDigitWidth,c=t.pixelRatio,h=t.viewLineCount,u=e.get(121),d=u==="inherit"?e.get(120):u,f=d==="inherit"?e.get(116):d,g=e.get(119),p=e.get(2),_=t.isDominatedByLongLines,v=e.get(49),b=e.get(59).renderType!==0,C=e.get(60),y=e.get(93),x=e.get(64),S=e.get(91),w=S.verticalScrollbarSize,L=S.verticalHasArrows,N=S.arrowSize,P=S.horizontalScrollbarSize,B=e.get(57),U=e.get(37);let j;if(typeof B=="string"&&/^\d+(\.\d+)?ch$/.test(B)){const Us=parseFloat(B.substr(0,B.length-2));j=jt.clampedInt(Us*a,0,0,1e3)}else j=jt.clampedInt(B,0,0,1e3);U&&(j+=16);let re=0;if(b){const Us=Math.max(o,C);re=Math.round(Us*l)}let te=0;v&&(te=s);let A=0,D=A+te,M=D+re,W=M+j;const ge=i-te-re-j;let se=!1,ae=!1,we=-1;p!==2&&(d==="inherit"&&_?(se=!0,ae=!0):f==="on"||f==="bounded"?ae=!0:f==="wordWrapColumn"&&(we=g));const De=xd._computeMinimapLayout({outerWidth:i,outerHeight:n,lineHeight:s,typicalHalfwidthCharacterWidth:a,pixelRatio:c,scrollBeyondLastLine:y,minimap:x,verticalScrollbarWidth:w,viewLineCount:h,remainingWidth:ge,isViewportWrapping:ae},t.memory||new wM);De.renderMinimap!==0&&De.minimapLeft===0&&(A+=De.minimapWidth,D+=De.minimapWidth,M+=De.minimapWidth,W+=De.minimapWidth);const ct=ge-De.minimapWidth,Ci=Math.max(1,Math.floor((ct-w-2)/a)),Yt=L?N:0;return ae&&(we=Math.max(1,Ci),f==="bounded"&&(we=Math.min(we,g))),{width:i,height:n,glyphMarginLeft:A,glyphMarginWidth:te,lineNumbersLeft:D,lineNumbersWidth:re,decorationsLeft:M,decorationsWidth:j,contentLeft:W,contentWidth:ct,minimap:De,viewportColumn:Ci,isWordWrapMinified:se,isViewportWrapping:ae,wrappingColumn:we,verticalScrollbarWidth:w,horizontalScrollbarHeight:P,overviewRuler:{top:Yt,width:w,height:n-2*Yt,right:0}}}}class aU extends Ri{constructor(){const e={enabled:!0};super(56,"lightbulb",e,{"editor.lightbulb.enabled":{type:"boolean",default:e.enabled,description:m("codeActions","Enables the code action lightbulb in the editor.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Te(e.enabled,this.defaultValue.enabled)}}}class lU extends Ri{constructor(){const e={enabled:!0,fontSize:0,fontFamily:""};super(125,"inlayHints",e,{"editor.inlayHints.enabled":{type:"boolean",default:e.enabled,description:m("inlayHints.enable","Enables the inlay hints in the editor.")},"editor.inlayHints.fontSize":{type:"number",default:e.fontSize,markdownDescription:m("inlayHints.fontSize","Controls font size of inlay hints in the editor. A default of 90% of `#editor.fontSize#` is used when the configured value is less than `5` or greater than the editor font size.")},"editor.inlayHints.fontFamily":{type:"string",default:e.fontFamily,markdownDescription:m("inlayHints.fontFamily","Controls font family of inlay hints in the editor. When set to empty, the `#editor.fontFamily#` is used.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Te(t.enabled,this.defaultValue.enabled),fontSize:jt.clampedInt(t.fontSize,this.defaultValue.fontSize,0,100),fontFamily:cr.string(t.fontFamily,this.defaultValue.fontFamily)}}}class cU extends To{constructor(){super(58,"lineHeight",hr.lineHeight,e=>To.clamp(e,0,150),{markdownDescription:m("lineHeight",`Controls the line height. - - Use 0 to automatically compute the line height from the font size. - - Values between 0 and 8 will be used as a multiplier with the font size. - - Values greater than or equal to 8 will be used as effective values.`)})}compute(e,t,i){return e.fontInfo.lineHeight}}class hU extends Ri{constructor(){const e={enabled:!0,size:"proportional",side:"right",showSlider:"mouseover",renderCharacters:!0,maxColumn:120,scale:1};super(64,"minimap",e,{"editor.minimap.enabled":{type:"boolean",default:e.enabled,description:m("minimap.enabled","Controls whether the minimap is shown.")},"editor.minimap.size":{type:"string",enum:["proportional","fill","fit"],enumDescriptions:[m("minimap.size.proportional","The minimap has the same size as the editor contents (and might scroll)."),m("minimap.size.fill","The minimap will stretch or shrink as necessary to fill the height of the editor (no scrolling)."),m("minimap.size.fit","The minimap will shrink as necessary to never be larger than the editor (no scrolling).")],default:e.size,description:m("minimap.size","Controls the size of the minimap.")},"editor.minimap.side":{type:"string",enum:["left","right"],default:e.side,description:m("minimap.side","Controls the side where to render the minimap.")},"editor.minimap.showSlider":{type:"string",enum:["always","mouseover"],default:e.showSlider,description:m("minimap.showSlider","Controls when the minimap slider is shown.")},"editor.minimap.scale":{type:"number",default:e.scale,minimum:1,maximum:3,enum:[1,2,3],description:m("minimap.scale","Scale of content drawn in the minimap: 1, 2 or 3.")},"editor.minimap.renderCharacters":{type:"boolean",default:e.renderCharacters,description:m("minimap.renderCharacters","Render the actual characters on a line as opposed to color blocks.")},"editor.minimap.maxColumn":{type:"number",default:e.maxColumn,description:m("minimap.maxColumn","Limit the width of the minimap to render at most a certain number of columns.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Te(t.enabled,this.defaultValue.enabled),size:Yn(t.size,this.defaultValue.size,["proportional","fill","fit"]),side:Yn(t.side,this.defaultValue.side,["right","left"]),showSlider:Yn(t.showSlider,this.defaultValue.showSlider,["always","mouseover"]),renderCharacters:Te(t.renderCharacters,this.defaultValue.renderCharacters),scale:jt.clampedInt(t.scale,1,1,3),maxColumn:jt.clampedInt(t.maxColumn,this.defaultValue.maxColumn,1,1e4)}}}function uU(r){return r==="ctrlCmd"?Je?"metaKey":"ctrlKey":"altKey"}class dU extends Ri{constructor(){super(74,"padding",{top:0,bottom:0},{"editor.padding.top":{type:"number",default:0,minimum:0,maximum:1e3,description:m("padding.top","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:m("padding.bottom","Controls the amount of space between the bottom edge of the editor and the last line.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{top:jt.clampedInt(t.top,0,0,1e3),bottom:jt.clampedInt(t.bottom,0,0,1e3)}}}class fU extends Ri{constructor(){const e={enabled:!0,cycle:!1};super(75,"parameterHints",e,{"editor.parameterHints.enabled":{type:"boolean",default:e.enabled,description:m("parameterHints.enabled","Enables a pop-up that shows parameter documentation and type information as you type.")},"editor.parameterHints.cycle":{type:"boolean",default:e.cycle,description:m("parameterHints.cycle","Controls whether the parameter hints menu cycles or closes when reaching the end of the list.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Te(t.enabled,this.defaultValue.enabled),cycle:Te(t.cycle,this.defaultValue.cycle)}}}class gU extends Ld{constructor(){super(127)}compute(e,t,i){return e.pixelRatio}}class pU extends Ri{constructor(){const e={other:!0,comments:!1,strings:!1};super(78,"quickSuggestions",e,{anyOf:[{type:"boolean"},{type:"object",properties:{strings:{type:"boolean",default:e.strings,description:m("quickSuggestions.strings","Enable quick suggestions inside strings.")},comments:{type:"boolean",default:e.comments,description:m("quickSuggestions.comments","Enable quick suggestions inside comments.")},other:{type:"boolean",default:e.other,description:m("quickSuggestions.other","Enable quick suggestions outside of strings and comments.")}}}],default:e,description:m("quickSuggestions","Controls whether suggestions should automatically show up while typing.")});this.defaultValue=e}validate(e){if(typeof e=="boolean")return e;if(e&&typeof e=="object"){const t=e,i={other:Te(t.other,this.defaultValue.other),comments:Te(t.comments,this.defaultValue.comments),strings:Te(t.strings,this.defaultValue.strings)};return i.other&&i.comments&&i.strings?!0:!i.other&&!i.comments&&!i.strings?!1:i}return this.defaultValue}}class mU extends Ri{constructor(){super(59,"lineNumbers",{renderType:1,renderFn:null},{type:"string",enum:["off","on","relative","interval"],enumDescriptions:[m("lineNumbers.off","Line numbers are not rendered."),m("lineNumbers.on","Line numbers are rendered as absolute number."),m("lineNumbers.relative","Line numbers are rendered as distance in lines to cursor position."),m("lineNumbers.interval","Line numbers are rendered every 10 lines.")],default:"on",description:m("lineNumbers","Controls the display of line numbers.")})}validate(e){let t=this.defaultValue.renderType,i=this.defaultValue.renderFn;return typeof e!="undefined"&&(typeof e=="function"?(t=4,i=e):e==="interval"?t=3:e==="relative"?t=2:e==="on"?t=1:t=0),{renderType:t,renderFn:i}}}function ES(r){const e=r.get(86);return e==="editable"?r.get(80):e!=="on"}class _U extends Ri{constructor(){const e=[],t={type:"number",description:m("rulers.size","Number of monospace characters at which this editor ruler will render.")};super(90,"rulers",e,{type:"array",items:{anyOf:[t,{type:["object"],properties:{column:t,color:{type:"string",description:m("rulers.color","Color of this editor ruler."),format:"color-hex"}}}]},default:e,description:m("rulers","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)){let t=[];for(let i of e)if(typeof i=="number")t.push({column:jt.clampedInt(i,0,0,1e4),color:null});else if(i&&typeof i=="object"){const n=i;t.push({column:jt.clampedInt(n.column,0,0,1e4),color:n.color})}return t.sort((i,n)=>i.column-n.column),t}return this.defaultValue}}function yM(r,e){if(typeof r!="string")return e;switch(r){case"hidden":return 2;case"visible":return 3;default:return 1}}class bU extends Ri{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(91,"scrollbar",e,{"editor.scrollbar.vertical":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.vertical.auto","The vertical scrollbar will be visible only when necessary."),m("scrollbar.vertical.visible","The vertical scrollbar will always be visible."),m("scrollbar.vertical.fit","The vertical scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.vertical","Controls the visibility of the vertical scrollbar.")},"editor.scrollbar.horizontal":{type:"string",enum:["auto","visible","hidden"],enumDescriptions:[m("scrollbar.horizontal.auto","The horizontal scrollbar will be visible only when necessary."),m("scrollbar.horizontal.visible","The horizontal scrollbar will always be visible."),m("scrollbar.horizontal.fit","The horizontal scrollbar will always be hidden.")],default:"auto",description:m("scrollbar.horizontal","Controls the visibility of the horizontal scrollbar.")},"editor.scrollbar.verticalScrollbarSize":{type:"number",default:e.verticalScrollbarSize,description:m("scrollbar.verticalScrollbarSize","The width of the vertical scrollbar.")},"editor.scrollbar.horizontalScrollbarSize":{type:"number",default:e.horizontalScrollbarSize,description:m("scrollbar.horizontalScrollbarSize","The height of the horizontal scrollbar.")},"editor.scrollbar.scrollByPage":{type:"boolean",default:e.scrollByPage,description:m("scrollbar.scrollByPage","Controls whether clicks scroll by page or jump to click position.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e,i=jt.clampedInt(t.horizontalScrollbarSize,this.defaultValue.horizontalScrollbarSize,0,1e3),n=jt.clampedInt(t.verticalScrollbarSize,this.defaultValue.verticalScrollbarSize,0,1e3);return{arrowSize:jt.clampedInt(t.arrowSize,this.defaultValue.arrowSize,0,1e3),vertical:yM(t.vertical,this.defaultValue.vertical),horizontal:yM(t.horizontal,this.defaultValue.horizontal),useShadows:Te(t.useShadows,this.defaultValue.useShadows),verticalHasArrows:Te(t.verticalHasArrows,this.defaultValue.verticalHasArrows),horizontalHasArrows:Te(t.horizontalHasArrows,this.defaultValue.horizontalHasArrows),handleMouseWheel:Te(t.handleMouseWheel,this.defaultValue.handleMouseWheel),alwaysConsumeMouseWheel:Te(t.alwaysConsumeMouseWheel,this.defaultValue.alwaysConsumeMouseWheel),horizontalScrollbarSize:i,horizontalSliderSize:jt.clampedInt(t.horizontalSliderSize,i,0,1e3),verticalScrollbarSize:n,verticalSliderSize:jt.clampedInt(t.verticalSliderSize,n,0,1e3),scrollByPage:Te(t.scrollByPage,this.defaultValue.scrollByPage)}}}class vU extends Ri{constructor(){const e={enabled:!0,mode:"subwordSmart"};super(54,"inlineSuggest",e,{"editor.inlineSuggest.enabled":{type:"boolean",default:e.enabled,description:m("inlineSuggest.enabled","Controls whether to automatically show inline suggestions in the editor.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{enabled:Te(t.enabled,this.defaultValue.enabled),mode:Yn(t.mode,this.defaultValue.mode,["prefix","subword","subwordSmart"])}}}class CU extends Ri{constructor(){const e={enabled:Sn.bracketPairColorizationOptions.enabled};super(12,"bracketPairColorization",e,{"editor.bracketPairColorization.enabled":{type:"boolean",default:e.enabled,description:m("bracketPairColorization.enabled","Controls whether bracket pair colorization is enabled or not. Use 'workbench.colorCustomizations' to override the bracket highlight colors.")}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{enabled:Te(e.enabled,this.defaultValue.enabled)}}}class wU extends Ri{constructor(){const e={bracketPairs:!1,indentation:!0,highlightActiveIndentation:!0};super(13,"guides",e,{"editor.guides.bracketPairs":{type:"boolean",default:e.bracketPairs,description:m("editor.guides.bracketPairs","Controls whether bracket pair guides are enabled or not.")},"editor.guides.indentation":{type:"boolean",default:e.indentation,description:m("editor.guides.indentation","Controls whether the editor should render indent guides.")},"editor.guides.highlightActiveIndentation":{type:"boolean",default:e.highlightActiveIndentation,description:m("editor.guides.highlightActiveIndentation","Controls whether the editor should highlight the active indent guide.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{bracketPairs:Te(t.bracketPairs,this.defaultValue.bracketPairs),indentation:Te(t.indentation,this.defaultValue.indentation),highlightActiveIndentation:Te(t.highlightActiveIndentation,this.defaultValue.highlightActiveIndentation)}}}class yU extends Ri{constructor(){const e={insertMode:"insert",filterGraceful:!0,snippetsPreventQuickSuggestions:!0,localityBonus:!1,shareSuggestSelections:!1,showIcons:!0,showStatusBar:!1,preview:!1,previewMode:"subwordSmart",showInlineDetails:!0,showMethods:!0,showFunctions:!0,showConstructors:!0,showDeprecated:!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(105,"suggest",e,{"editor.suggest.insertMode":{type:"string",enum:["insert","replace"],enumDescriptions:[m("suggest.insertMode.insert","Insert suggestion without overwriting text right of the cursor."),m("suggest.insertMode.replace","Insert suggestion and overwrite text right of the cursor.")],default:e.insertMode,description:m("suggest.insertMode","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:m("suggest.filterGraceful","Controls whether filtering and sorting suggestions accounts for small typos.")},"editor.suggest.localityBonus":{type:"boolean",default:e.localityBonus,description:m("suggest.localityBonus","Controls whether sorting favors words that appear close to the cursor.")},"editor.suggest.shareSuggestSelections":{type:"boolean",default:e.shareSuggestSelections,markdownDescription:m("suggest.shareSuggestSelections","Controls whether remembered suggestion selections are shared between multiple workspaces and windows (needs `#editor.suggestSelection#`).")},"editor.suggest.snippetsPreventQuickSuggestions":{type:"boolean",default:e.snippetsPreventQuickSuggestions,description:m("suggest.snippetsPreventQuickSuggestions","Controls whether an active snippet prevents quick suggestions.")},"editor.suggest.showIcons":{type:"boolean",default:e.showIcons,description:m("suggest.showIcons","Controls whether to show or hide icons in suggestions.")},"editor.suggest.showStatusBar":{type:"boolean",default:e.showStatusBar,description:m("suggest.showStatusBar","Controls the visibility of the status bar at the bottom of the suggest widget.")},"editor.suggest.preview":{type:"boolean",default:e.preview,description:m("suggest.preview","Controls whether to preview the suggestion outcome in the editor.")},"editor.suggest.showInlineDetails":{type:"boolean",default:e.showInlineDetails,description:m("suggest.showInlineDetails","Controls whether suggest details show inline with the label or only in the details widget")},"editor.suggest.maxVisibleSuggestions":{type:"number",deprecationMessage:m("suggest.maxVisibleSuggestions.dep","This setting is deprecated. The suggest widget can now be resized.")},"editor.suggest.filteredTypes":{type:"object",deprecationMessage:m("deprecated","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:m("editor.suggest.showMethods","When enabled IntelliSense shows `method`-suggestions.")},"editor.suggest.showFunctions":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFunctions","When enabled IntelliSense shows `function`-suggestions.")},"editor.suggest.showConstructors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstructors","When enabled IntelliSense shows `constructor`-suggestions.")},"editor.suggest.showDeprecated":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showDeprecated","When enabled IntelliSense shows `deprecated`-suggestions.")},"editor.suggest.showFields":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFields","When enabled IntelliSense shows `field`-suggestions.")},"editor.suggest.showVariables":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showVariables","When enabled IntelliSense shows `variable`-suggestions.")},"editor.suggest.showClasses":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showClasss","When enabled IntelliSense shows `class`-suggestions.")},"editor.suggest.showStructs":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showStructs","When enabled IntelliSense shows `struct`-suggestions.")},"editor.suggest.showInterfaces":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showInterfaces","When enabled IntelliSense shows `interface`-suggestions.")},"editor.suggest.showModules":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showModules","When enabled IntelliSense shows `module`-suggestions.")},"editor.suggest.showProperties":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showPropertys","When enabled IntelliSense shows `property`-suggestions.")},"editor.suggest.showEvents":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEvents","When enabled IntelliSense shows `event`-suggestions.")},"editor.suggest.showOperators":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showOperators","When enabled IntelliSense shows `operator`-suggestions.")},"editor.suggest.showUnits":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUnits","When enabled IntelliSense shows `unit`-suggestions.")},"editor.suggest.showValues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showValues","When enabled IntelliSense shows `value`-suggestions.")},"editor.suggest.showConstants":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showConstants","When enabled IntelliSense shows `constant`-suggestions.")},"editor.suggest.showEnums":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnums","When enabled IntelliSense shows `enum`-suggestions.")},"editor.suggest.showEnumMembers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showEnumMembers","When enabled IntelliSense shows `enumMember`-suggestions.")},"editor.suggest.showKeywords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showKeywords","When enabled IntelliSense shows `keyword`-suggestions.")},"editor.suggest.showWords":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTexts","When enabled IntelliSense shows `text`-suggestions.")},"editor.suggest.showColors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showColors","When enabled IntelliSense shows `color`-suggestions.")},"editor.suggest.showFiles":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFiles","When enabled IntelliSense shows `file`-suggestions.")},"editor.suggest.showReferences":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showReferences","When enabled IntelliSense shows `reference`-suggestions.")},"editor.suggest.showCustomcolors":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showCustomcolors","When enabled IntelliSense shows `customcolor`-suggestions.")},"editor.suggest.showFolders":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showFolders","When enabled IntelliSense shows `folder`-suggestions.")},"editor.suggest.showTypeParameters":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showTypeParameters","When enabled IntelliSense shows `typeParameter`-suggestions.")},"editor.suggest.showSnippets":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showSnippets","When enabled IntelliSense shows `snippet`-suggestions.")},"editor.suggest.showUsers":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showUsers","When enabled IntelliSense shows `user`-suggestions.")},"editor.suggest.showIssues":{type:"boolean",default:!0,markdownDescription:m("editor.suggest.showIssues","When enabled IntelliSense shows `issues`-suggestions.")}})}validate(e){if(!e||typeof e!="object")return this.defaultValue;const t=e;return{insertMode:Yn(t.insertMode,this.defaultValue.insertMode,["insert","replace"]),filterGraceful:Te(t.filterGraceful,this.defaultValue.filterGraceful),snippetsPreventQuickSuggestions:Te(t.snippetsPreventQuickSuggestions,this.defaultValue.filterGraceful),localityBonus:Te(t.localityBonus,this.defaultValue.localityBonus),shareSuggestSelections:Te(t.shareSuggestSelections,this.defaultValue.shareSuggestSelections),showIcons:Te(t.showIcons,this.defaultValue.showIcons),showStatusBar:Te(t.showStatusBar,this.defaultValue.showStatusBar),preview:Te(t.preview,this.defaultValue.preview),previewMode:Yn(t.previewMode,this.defaultValue.previewMode,["prefix","subword","subwordSmart"]),showInlineDetails:Te(t.showInlineDetails,this.defaultValue.showInlineDetails),showMethods:Te(t.showMethods,this.defaultValue.showMethods),showFunctions:Te(t.showFunctions,this.defaultValue.showFunctions),showConstructors:Te(t.showConstructors,this.defaultValue.showConstructors),showDeprecated:Te(t.showDeprecated,this.defaultValue.showDeprecated),showFields:Te(t.showFields,this.defaultValue.showFields),showVariables:Te(t.showVariables,this.defaultValue.showVariables),showClasses:Te(t.showClasses,this.defaultValue.showClasses),showStructs:Te(t.showStructs,this.defaultValue.showStructs),showInterfaces:Te(t.showInterfaces,this.defaultValue.showInterfaces),showModules:Te(t.showModules,this.defaultValue.showModules),showProperties:Te(t.showProperties,this.defaultValue.showProperties),showEvents:Te(t.showEvents,this.defaultValue.showEvents),showOperators:Te(t.showOperators,this.defaultValue.showOperators),showUnits:Te(t.showUnits,this.defaultValue.showUnits),showValues:Te(t.showValues,this.defaultValue.showValues),showConstants:Te(t.showConstants,this.defaultValue.showConstants),showEnums:Te(t.showEnums,this.defaultValue.showEnums),showEnumMembers:Te(t.showEnumMembers,this.defaultValue.showEnumMembers),showKeywords:Te(t.showKeywords,this.defaultValue.showKeywords),showWords:Te(t.showWords,this.defaultValue.showWords),showColors:Te(t.showColors,this.defaultValue.showColors),showFiles:Te(t.showFiles,this.defaultValue.showFiles),showReferences:Te(t.showReferences,this.defaultValue.showReferences),showFolders:Te(t.showFolders,this.defaultValue.showFolders),showTypeParameters:Te(t.showTypeParameters,this.defaultValue.showTypeParameters),showSnippets:Te(t.showSnippets,this.defaultValue.showSnippets),showUsers:Te(t.showUsers,this.defaultValue.showUsers),showIssues:Te(t.showIssues,this.defaultValue.showIssues)}}}class SU extends Ri{constructor(){super(101,"smartSelect",{selectLeadingAndTrailingWhitespace:!0},{"editor.smartSelect.selectLeadingAndTrailingWhitespace":{description:m("selectLeadingAndTrailingWhitespace","Whether leading and trailing whitespace should always be selected."),default:!0,type:"boolean"}})}validate(e){return!e||typeof e!="object"?this.defaultValue:{selectLeadingAndTrailingWhitespace:Te(e.selectLeadingAndTrailingWhitespace,this.defaultValue.selectLeadingAndTrailingWhitespace)}}}class LU extends Ld{constructor(){super(128,[80])}compute(e,t,i){return t.get(80)?!0:e.tabFocusMode}}function xU(r){switch(r){case"none":return 0;case"same":return 1;case"indent":return 2;case"deepIndent":return 3}}class kU extends Ld{constructor(){super(130,[129])}compute(e,t,i){const n=t.get(129);return{isDominatedByLongLines:e.isDominatedByLongLines,isWordWrapMinified:n.isWordWrapMinified,isViewportWrapping:n.isViewportWrapping,wrappingColumn:n.wrappingColumn}}}const DU="Consolas, 'Courier New', monospace",EU="Menlo, Monaco, 'Courier New', monospace",IU="'Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",hr={fontFamily:Je?EU:Zn?IU:DU,fontWeight:"normal",fontSize:Je?12:14,lineHeight:0,letterSpacing:0},Sn={tabSize:4,indentSize:4,insertSpaces:!0,detectIndentation:!0,trimAutoWhitespace:!0,largeFileOptimizations:!0,bracketPairColorizationOptions:{enabled:!1}},kd=[];function de(r){return kd[r.id]=r,r}const Ks={acceptSuggestionOnCommitCharacter:de(new rt(0,"acceptSuggestionOnCommitCharacter",!0,{markdownDescription:m("acceptSuggestionOnCommitCharacter","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:de(new xi(1,"acceptSuggestionOnEnter","on",["on","smart","off"],{markdownEnumDescriptions:["",m("acceptSuggestionOnEnterSmart","Only accept a suggestion with `Enter` when it makes a textual change."),""],markdownDescription:m("acceptSuggestionOnEnter","Controls whether suggestions should be accepted on `Enter`, in addition to `Tab`. Helps to avoid ambiguity between inserting new lines or accepting suggestions.")})),accessibilitySupport:de(new Y$),accessibilityPageSize:de(new jt(3,"accessibilityPageSize",10,1,1073741824,{description:m("accessibilityPageSize","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.")})),ariaLabel:de(new cr(4,"ariaLabel",m("editorViewAccessibleLabel","Editor content"))),autoClosingBrackets:de(new xi(5,"autoClosingBrackets","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingBrackets.languageDefined","Use language configurations to determine when to autoclose brackets."),m("editor.autoClosingBrackets.beforeWhitespace","Autoclose brackets only when the cursor is to the left of whitespace."),""],description:m("autoClosingBrackets","Controls whether the editor should automatically close brackets after the user adds an opening bracket.")})),autoClosingDelete:de(new xi(6,"autoClosingDelete","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingDelete.auto","Remove adjacent closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingDelete","Controls whether the editor should remove adjacent closing quotes or brackets when deleting.")})),autoClosingOvertype:de(new xi(7,"autoClosingOvertype","auto",["always","auto","never"],{enumDescriptions:["",m("editor.autoClosingOvertype.auto","Type over closing quotes or brackets only if they were automatically inserted."),""],description:m("autoClosingOvertype","Controls whether the editor should type over closing quotes or brackets.")})),autoClosingQuotes:de(new xi(8,"autoClosingQuotes","languageDefined",["always","languageDefined","beforeWhitespace","never"],{enumDescriptions:["",m("editor.autoClosingQuotes.languageDefined","Use language configurations to determine when to autoclose quotes."),m("editor.autoClosingQuotes.beforeWhitespace","Autoclose quotes only when the cursor is to the left of whitespace."),""],description:m("autoClosingQuotes","Controls whether the editor should automatically close quotes after the user adds an opening quote.")})),autoIndent:de(new np(9,"autoIndent",4,"full",["none","keep","brackets","advanced","full"],Z$,{enumDescriptions:[m("editor.autoIndent.none","The editor will not insert indentation automatically."),m("editor.autoIndent.keep","The editor will keep the current line's indentation."),m("editor.autoIndent.brackets","The editor will keep the current line's indentation and honor language defined brackets."),m("editor.autoIndent.advanced","The editor will keep the current line's indentation, honor language defined brackets and invoke special onEnterRules defined by languages."),m("editor.autoIndent.full","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:m("autoIndent","Controls whether the editor should automatically adjust the indentation when users type, paste, move or indent lines.")})),automaticLayout:de(new rt(10,"automaticLayout",!1)),autoSurround:de(new xi(11,"autoSurround","languageDefined",["languageDefined","quotes","brackets","never"],{enumDescriptions:[m("editor.autoSurround.languageDefined","Use language configurations to determine when to automatically surround selections."),m("editor.autoSurround.quotes","Surround with quotes but not brackets."),m("editor.autoSurround.brackets","Surround with brackets but not quotes."),""],description:m("autoSurround","Controls whether the editor should automatically surround selections when typing quotes or brackets.")})),bracketPairColorization:de(new CU),bracketPairGuides:de(new wU),stickyTabStops:de(new rt(103,"stickyTabStops",!1,{description:m("stickyTabStops","Emulate selection behavior of tab characters when using spaces for indentation. Selection will stick to tab stops.")})),codeLens:de(new rt(14,"codeLens",!0,{description:m("codeLens","Controls whether the editor shows CodeLens.")})),codeLensFontFamily:de(new cr(15,"codeLensFontFamily","",{description:m("codeLensFontFamily","Controls the font family for CodeLens.")})),codeLensFontSize:de(new jt(16,"codeLensFontSize",0,0,100,{type:"number",default:0,minimum:0,maximum:100,markdownDescription:m("codeLensFontSize","Controls the font size in pixels for CodeLens. When set to `0`, the 90% of `#editor.fontSize#` is used.")})),colorDecorators:de(new rt(17,"colorDecorators",!0,{description:m("colorDecorators","Controls whether the editor should render the inline color decorators and color picker.")})),columnSelection:de(new rt(18,"columnSelection",!1,{description:m("columnSelection","Enable that the selection with the mouse and keys is doing column selection.")})),comments:de(new X$),contextmenu:de(new rt(20,"contextmenu",!0)),copyWithSyntaxHighlighting:de(new rt(21,"copyWithSyntaxHighlighting",!0,{description:m("copyWithSyntaxHighlighting","Controls whether syntax highlighting should be copied into the clipboard.")})),cursorBlinking:de(new np(22,"cursorBlinking",1,"blink",["blink","smooth","phase","expand","solid"],Q$,{description:m("cursorBlinking","Control the cursor animation style.")})),cursorSmoothCaretAnimation:de(new rt(23,"cursorSmoothCaretAnimation",!1,{description:m("cursorSmoothCaretAnimation","Controls whether the smooth caret animation should be enabled.")})),cursorStyle:de(new np(24,"cursorStyle",zi.Line,"line",["line","block","underline","line-thin","block-outline","underline-thin"],J$,{description:m("cursorStyle","Controls the cursor style.")})),cursorSurroundingLines:de(new jt(25,"cursorSurroundingLines",0,0,1073741824,{description:m("cursorSurroundingLines","Controls the minimal number of visible leading and trailing lines surrounding the cursor. Known as 'scrollOff' or 'scrollOffset' in some other editors.")})),cursorSurroundingLinesStyle:de(new xi(26,"cursorSurroundingLinesStyle","default",["default","all"],{enumDescriptions:[m("cursorSurroundingLinesStyle.default","`cursorSurroundingLines` is enforced only when triggered via the keyboard or API."),m("cursorSurroundingLinesStyle.all","`cursorSurroundingLines` is enforced always.")],description:m("cursorSurroundingLinesStyle","Controls when `cursorSurroundingLines` should be enforced.")})),cursorWidth:de(new jt(27,"cursorWidth",0,0,1073741824,{markdownDescription:m("cursorWidth","Controls the width of the cursor when `#editor.cursorStyle#` is set to `line`.")})),disableLayerHinting:de(new rt(28,"disableLayerHinting",!1)),disableMonospaceOptimizations:de(new rt(29,"disableMonospaceOptimizations",!1)),domReadOnly:de(new rt(30,"domReadOnly",!1)),dragAndDrop:de(new rt(31,"dragAndDrop",!0,{description:m("dragAndDrop","Controls whether the editor should allow moving selections via drag and drop.")})),emptySelectionClipboard:de(new tU),extraEditorClassName:de(new cr(33,"extraEditorClassName","")),fastScrollSensitivity:de(new To(34,"fastScrollSensitivity",5,r=>r<=0?5:r,{markdownDescription:m("fastScrollSensitivity","Scrolling speed multiplier when pressing `Alt`.")})),find:de(new iU),fixedOverflowWidgets:de(new rt(36,"fixedOverflowWidgets",!1)),folding:de(new rt(37,"folding",!0,{description:m("folding","Controls whether the editor has code folding enabled.")})),foldingStrategy:de(new xi(38,"foldingStrategy","auto",["auto","indentation"],{enumDescriptions:[m("foldingStrategy.auto","Use a language-specific folding strategy if available, else the indentation-based one."),m("foldingStrategy.indentation","Use the indentation-based folding strategy.")],description:m("foldingStrategy","Controls the strategy for computing folding ranges.")})),foldingHighlight:de(new rt(39,"foldingHighlight",!0,{description:m("foldingHighlight","Controls whether the editor should highlight folded ranges.")})),foldingImportsByDefault:de(new rt(40,"foldingImportsByDefault",!1,{description:m("foldingImportsByDefault","Controls whether the editor automatically collapses import ranges.")})),unfoldOnClickAfterEndOfLine:de(new rt(41,"unfoldOnClickAfterEndOfLine",!1,{description:m("unfoldOnClickAfterEndOfLine","Controls whether clicking on the empty content after a folded line will unfold the line.")})),fontFamily:de(new cr(42,"fontFamily",hr.fontFamily,{description:m("fontFamily","Controls the font family.")})),fontInfo:de(new nU),fontLigatures2:de(new Dr),fontSize:de(new rU),fontWeight:de(new Ao),formatOnPaste:de(new rt(47,"formatOnPaste",!1,{description:m("formatOnPaste","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:de(new rt(48,"formatOnType",!1,{description:m("formatOnType","Controls whether the editor should automatically format the line after typing.")})),glyphMargin:de(new rt(49,"glyphMargin",!0,{description:m("glyphMargin","Controls whether the editor should render the vertical glyph margin. Glyph margin is mostly used for debugging.")})),gotoLocation:de(new sU),hideCursorInOverviewRuler:de(new rt(51,"hideCursorInOverviewRuler",!1,{description:m("hideCursorInOverviewRuler","Controls whether the cursor should be hidden in the overview ruler.")})),hover:de(new oU),inDiffEditor:de(new rt(53,"inDiffEditor",!1)),letterSpacing:de(new To(55,"letterSpacing",hr.letterSpacing,r=>To.clamp(r,-5,20),{description:m("letterSpacing","Controls the letter spacing in pixels.")})),lightbulb:de(new aU),lineDecorationsWidth:de(new ch(57,"lineDecorationsWidth",10)),lineHeight:de(new cU),lineNumbers:de(new mU),lineNumbersMinChars:de(new jt(60,"lineNumbersMinChars",5,1,300)),linkedEditing:de(new rt(61,"linkedEditing",!1,{description:m("linkedEditing","Controls whether the editor has linked editing enabled. Depending on the language, related symbols, e.g. HTML tags, are updated while editing.")})),links:de(new rt(62,"links",!0,{description:m("links","Controls whether the editor should detect links and make them clickable.")})),matchBrackets:de(new xi(63,"matchBrackets","always",["always","near","never"],{description:m("matchBrackets","Highlight matching brackets.")})),minimap:de(new hU),mouseStyle:de(new xi(65,"mouseStyle","text",["text","default","copy"])),mouseWheelScrollSensitivity:de(new To(66,"mouseWheelScrollSensitivity",1,r=>r===0?1:r,{markdownDescription:m("mouseWheelScrollSensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")})),mouseWheelZoom:de(new rt(67,"mouseWheelZoom",!1,{markdownDescription:m("mouseWheelZoom","Zoom the font of the editor when using mouse wheel and holding `Ctrl`.")})),multiCursorMergeOverlapping:de(new rt(68,"multiCursorMergeOverlapping",!0,{description:m("multiCursorMergeOverlapping","Merge multiple cursors when they are overlapping.")})),multiCursorModifier:de(new np(69,"multiCursorModifier","altKey","alt",["ctrlCmd","alt"],uU,{markdownEnumDescriptions:[m("multiCursorModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiCursorModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],markdownDescription:m({key:"multiCursorModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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. [Read more](https://code.visualstudio.com/docs/editor/codebasics#_multicursor-modifier).")})),multiCursorPaste:de(new xi(70,"multiCursorPaste","spread",["spread","full"],{markdownEnumDescriptions:[m("multiCursorPaste.spread","Each cursor pastes a single line of the text."),m("multiCursorPaste.full","Each cursor pastes the full text.")],markdownDescription:m("multiCursorPaste","Controls pasting when the line count of the pasted text matches the cursor count.")})),occurrencesHighlight:de(new rt(71,"occurrencesHighlight",!0,{description:m("occurrencesHighlight","Controls whether the editor should highlight semantic symbol occurrences.")})),overviewRulerBorder:de(new rt(72,"overviewRulerBorder",!0,{description:m("overviewRulerBorder","Controls whether a border should be drawn around the overview ruler.")})),overviewRulerLanes:de(new jt(73,"overviewRulerLanes",3,0,3)),padding:de(new dU),parameterHints:de(new fU),peekWidgetDefaultFocus:de(new xi(76,"peekWidgetDefaultFocus","tree",["tree","editor"],{enumDescriptions:[m("peekWidgetDefaultFocus.tree","Focus the tree when opening peek"),m("peekWidgetDefaultFocus.editor","Focus the editor when opening peek")],description:m("peekWidgetDefaultFocus","Controls whether to focus the inline editor or the tree in the peek widget.")})),definitionLinkOpensInPeek:de(new rt(77,"definitionLinkOpensInPeek",!1,{description:m("definitionLinkOpensInPeek","Controls whether the Go to Definition mouse gesture always opens the peek widget.")})),quickSuggestions:de(new pU),quickSuggestionsDelay:de(new jt(79,"quickSuggestionsDelay",10,0,1073741824,{description:m("quickSuggestionsDelay","Controls the delay in milliseconds after which quick suggestions will show up.")})),readOnly:de(new rt(80,"readOnly",!1)),renameOnType:de(new rt(81,"renameOnType",!1,{description:m("renameOnType","Controls whether the editor auto renames on type."),markdownDeprecationMessage:m("renameOnTypeDeprecate","Deprecated, use `editor.linkedEditing` instead.")})),renderControlCharacters:de(new rt(82,"renderControlCharacters",!1,{description:m("renderControlCharacters","Controls whether the editor should render control characters.")})),renderFinalNewline:de(new rt(83,"renderFinalNewline",!0,{description:m("renderFinalNewline","Render last line number when the file ends with a newline.")})),renderLineHighlight:de(new xi(84,"renderLineHighlight","line",["none","gutter","line","all"],{enumDescriptions:["","","",m("renderLineHighlight.all","Highlights both the gutter and the current line.")],description:m("renderLineHighlight","Controls how the editor should render the current line highlight.")})),renderLineHighlightOnlyWhenFocus:de(new rt(85,"renderLineHighlightOnlyWhenFocus",!1,{description:m("renderLineHighlightOnlyWhenFocus","Controls if the editor should render the current line highlight only when the editor is focused.")})),renderValidationDecorations:de(new xi(86,"renderValidationDecorations","editable",["editable","on","off"])),renderWhitespace:de(new xi(87,"renderWhitespace","selection",["none","boundary","selection","trailing","all"],{enumDescriptions:["",m("renderWhitespace.boundary","Render whitespace characters except for single spaces between words."),m("renderWhitespace.selection","Render whitespace characters only on selected text."),m("renderWhitespace.trailing","Render only trailing whitespace characters."),""],description:m("renderWhitespace","Controls how the editor should render whitespace characters.")})),revealHorizontalRightPadding:de(new jt(88,"revealHorizontalRightPadding",30,0,1e3)),roundedSelection:de(new rt(89,"roundedSelection",!0,{description:m("roundedSelection","Controls whether selections should have rounded corners.")})),rulers:de(new _U),scrollbar:de(new bU),scrollBeyondLastColumn:de(new jt(92,"scrollBeyondLastColumn",5,0,1073741824,{description:m("scrollBeyondLastColumn","Controls the number of extra characters beyond which the editor will scroll horizontally.")})),scrollBeyondLastLine:de(new rt(93,"scrollBeyondLastLine",!0,{description:m("scrollBeyondLastLine","Controls whether the editor will scroll beyond the last line.")})),scrollPredominantAxis:de(new rt(94,"scrollPredominantAxis",!0,{description:m("scrollPredominantAxis","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:de(new rt(95,"selectionClipboard",!0,{description:m("selectionClipboard","Controls whether the Linux primary clipboard should be supported."),included:Zn})),selectionHighlight:de(new rt(96,"selectionHighlight",!0,{description:m("selectionHighlight","Controls whether the editor should highlight matches similar to the selection.")})),selectOnLineNumbers:de(new rt(97,"selectOnLineNumbers",!0)),showFoldingControls:de(new xi(98,"showFoldingControls","mouseover",["always","mouseover"],{enumDescriptions:[m("showFoldingControls.always","Always show the folding controls."),m("showFoldingControls.mouseover","Only show the folding controls when the mouse is over the gutter.")],description:m("showFoldingControls","Controls when the folding controls on the gutter are shown.")})),showUnused:de(new rt(99,"showUnused",!0,{description:m("showUnused","Controls fading out of unused code.")})),showDeprecated:de(new rt(124,"showDeprecated",!0,{description:m("showDeprecated","Controls strikethrough deprecated variables.")})),inlayHints:de(new lU),snippetSuggestions:de(new xi(100,"snippetSuggestions","inline",["top","bottom","inline","none"],{enumDescriptions:[m("snippetSuggestions.top","Show snippet suggestions on top of other suggestions."),m("snippetSuggestions.bottom","Show snippet suggestions below other suggestions."),m("snippetSuggestions.inline","Show snippets suggestions with other suggestions."),m("snippetSuggestions.none","Do not show snippet suggestions.")],description:m("snippetSuggestions","Controls whether snippets are shown with other suggestions and how they are sorted.")})),smartSelect:de(new SU),smoothScrolling:de(new rt(102,"smoothScrolling",!1,{description:m("smoothScrolling","Controls whether the editor will scroll using an animation.")})),stopRenderingLineAfter:de(new jt(104,"stopRenderingLineAfter",1e4,-1,1073741824)),suggest:de(new yU),inlineSuggest:de(new vU),suggestFontSize:de(new jt(106,"suggestFontSize",0,0,1e3,{markdownDescription:m("suggestFontSize","Font size for the suggest widget. When set to `0`, the value of `#editor.fontSize#` is used.")})),suggestLineHeight:de(new jt(107,"suggestLineHeight",0,0,1e3,{markdownDescription:m("suggestLineHeight","Line height for the suggest widget. When set to `0`, the value of `#editor.lineHeight#` is used. The minimum value is 8.")})),suggestOnTriggerCharacters:de(new rt(108,"suggestOnTriggerCharacters",!0,{description:m("suggestOnTriggerCharacters","Controls whether suggestions should automatically show up when typing trigger characters.")})),suggestSelection:de(new xi(109,"suggestSelection","recentlyUsed",["first","recentlyUsed","recentlyUsedByPrefix"],{markdownEnumDescriptions:[m("suggestSelection.first","Always select the first suggestion."),m("suggestSelection.recentlyUsed","Select recent suggestions unless further typing selects one, e.g. `console.| -> console.log` because `log` has been completed recently."),m("suggestSelection.recentlyUsedByPrefix","Select suggestions based on previous prefixes that have completed those suggestions, e.g. `co -> console` and `con -> const`.")],description:m("suggestSelection","Controls how suggestions are pre-selected when showing the suggest list.")})),tabCompletion:de(new xi(110,"tabCompletion","off",["on","off","onlySnippets"],{enumDescriptions:[m("tabCompletion.on","Tab complete will insert the best matching suggestion when pressing tab."),m("tabCompletion.off","Disable tab completions."),m("tabCompletion.onlySnippets","Tab complete snippets when their prefix match. Works best when 'quickSuggestions' aren't enabled.")],description:m("tabCompletion","Enables tab completions.")})),tabIndex:de(new jt(111,"tabIndex",0,-1,1073741824)),unusualLineTerminators:de(new xi(112,"unusualLineTerminators","prompt",["auto","off","prompt"],{enumDescriptions:[m("unusualLineTerminators.auto","Unusual line terminators are automatically removed."),m("unusualLineTerminators.off","Unusual line terminators are ignored."),m("unusualLineTerminators.prompt","Unusual line terminators prompt to be removed.")],description:m("unusualLineTerminators","Remove unusual line terminators that might cause problems.")})),useShadowDOM:de(new rt(113,"useShadowDOM",!0)),useTabStops:de(new rt(114,"useTabStops",!0,{description:m("useTabStops","Inserting and deleting whitespace follows tab stops.")})),wordSeparators:de(new cr(115,"wordSeparators",bM,{description:m("wordSeparators","Characters that will be used as word separators when doing word related navigations or operations.")})),wordWrap:de(new xi(116,"wordWrap","off",["off","on","wordWrapColumn","bounded"],{markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m({key:"wordWrap.wordWrapColumn",comment:["- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at `#editor.wordWrapColumn#`."),m({key:"wordWrap.bounded",comment:["- viewport means the edge of the visible window size.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Lines will wrap at the minimum of viewport and `#editor.wordWrapColumn#`.")],description:m({key:"wordWrap",comment:["- 'off', 'on', 'wordWrapColumn' and 'bounded' refer to values the setting can take and should not be localized.","- `editor.wordWrapColumn` refers to a different setting and should not be localized."]},"Controls how lines should wrap.")})),wordWrapBreakAfterCharacters:de(new cr(117,"wordWrapBreakAfterCharacters"," })]?|/&.,;\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:de(new cr(118,"wordWrapBreakBeforeCharacters","([{\u2018\u201C\u3008\u300A\u300C\u300E\u3010\u3014\uFF08\uFF3B\uFF5B\uFF62\xA3\xA5\uFF04\uFFE1\uFFE5+\uFF0B")),wordWrapColumn:de(new jt(119,"wordWrapColumn",80,1,1073741824,{markdownDescription:m({key:"wordWrapColumn",comment:["- `editor.wordWrap` refers to a different setting and should not be localized.","- 'wordWrapColumn' and 'bounded' refer to values the different setting can take and should not be localized."]},"Controls the wrapping column of the editor when `#editor.wordWrap#` is `wordWrapColumn` or `bounded`.")})),wordWrapOverride1:de(new xi(120,"wordWrapOverride1","inherit",["off","on","inherit"])),wordWrapOverride2:de(new xi(121,"wordWrapOverride2","inherit",["off","on","inherit"])),wrappingIndent:de(new np(122,"wrappingIndent",1,"same",["none","same","indent","deepIndent"],xU,{enumDescriptions:[m("wrappingIndent.none","No indentation. Wrapped lines begin at column 1."),m("wrappingIndent.same","Wrapped lines get the same indentation as the parent."),m("wrappingIndent.indent","Wrapped lines get +1 indentation toward the parent."),m("wrappingIndent.deepIndent","Wrapped lines get +2 indentation toward the parent.")],description:m("wrappingIndent","Controls the indentation of wrapped lines.")})),wrappingStrategy:de(new xi(123,"wrappingStrategy","simple",["simple","advanced"],{enumDescriptions:[m("wrappingStrategy.simple","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."),m("wrappingStrategy.advanced","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.")],description:m("wrappingStrategy","Controls the algorithm that computes wrapping points.")})),editorClassName:de(new eU),pixelRatio:de(new gU),tabFocusMode:de(new LU),layoutInfo:de(new xd),wrappingInfo:de(new kU)};class NU{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(e){setTimeout(()=>{throw e.stack?new Error(e.message+` - -`+e.stack):e},0)}}emit(e){this.listeners.forEach(t=>{t(e)})}onUnexpectedError(e){this.unexpectedErrorHandler(e),this.emit(e)}onUnexpectedExternalError(e){this.unexpectedErrorHandler(e)}}const SM=new NU;function Oe(r){Ro(r)||SM.onUnexpectedError(r)}function $i(r){Ro(r)||SM.onUnexpectedExternalError(r)}function LM(r){if(r instanceof Error){let{name:e,message:t}=r;const i=r.stacktrace||r.stack;return{$isError:!0,name:e,message:t,stack:i}}return r}const IS="Canceled";function Ro(r){return r instanceof Error&&r.name===IS&&r.message===IS}function Dd(){const r=new Error(IS);return r.name=r.message,r}function Er(r){return r?new Error(`Illegal argument: ${r}`):new Error("Illegal argument")}function TU(r){return r?new Error(`Illegal state: ${r}`):new Error("Illegal state")}class AU extends Error{constructor(e){super("NotSupported");e&&(this.message=e)}}function Na(r){const e=this;let t=!1,i;return function(){return t||(t=!0,i=r.apply(e,arguments)),i}}var at;(function(r){function e(b){return b&&typeof b=="object"&&typeof b[Symbol.iterator]=="function"}r.is=e;const t=Object.freeze([]);function i(){return t}r.empty=i;function*n(b){yield b}r.single=n;function s(b){return b||t}r.from=s;function o(b){return!b||b[Symbol.iterator]().next().done===!0}r.isEmpty=o;function a(b){return b[Symbol.iterator]().next().value}r.first=a;function l(b,C){for(const y of b)if(C(y))return!0;return!1}r.some=l;function c(b,C){for(const y of b)if(C(y))return y}r.find=c;function*h(b,C){for(const y of b)C(y)&&(yield y)}r.filter=h;function*u(b,C){let y=0;for(const x of b)yield C(x,y++)}r.map=u;function*d(...b){for(const C of b)for(const y of C)yield y}r.concat=d;function*f(b){for(const C of b)for(const y of C)yield y}r.concatNested=f;function g(b,C,y){let x=y;for(const S of b)x=C(x,S);return x}r.reduce=g;function*p(b,C,y=b.length){for(C<0&&(C+=b.length),y<0?y+=b.length:y>b.length&&(y=b.length);C<y;C++)yield b[C]}r.slice=p;function _(b,C=Number.POSITIVE_INFINITY){const y=[];if(C===0)return[y,b];const x=b[Symbol.iterator]();for(let S=0;S<C;S++){const w=x.next();if(w.done)return[y,r.empty()];y.push(w.value)}return[y,{[Symbol.iterator](){return x}}]}r.consume=_;function v(b,C,y=(x,S)=>x===S){const x=b[Symbol.iterator](),S=C[Symbol.iterator]();for(;;){const w=x.next(),L=S.next();if(w.done!==L.done)return!1;if(w.done)return!0;if(!y(w.value,L.value))return!1}}r.equals=v})(at||(at={}));function RU(r){return r}function MU(r,e){}function PU(r){return r}class OU extends Error{constructor(e){super(`Encountered errors while disposing of store. Errors: [${e.join(", ")}]`);this.errors=e}}function NS(r){return typeof r.dispose=="function"&&r.dispose.length===0}function ht(r){if(at.is(r)){let e=[];for(const t of r)if(t)try{t.dispose()}catch(i){e.push(i)}if(e.length===1)throw e[0];if(e.length>1)throw new OU(e);return Array.isArray(r)?[]:r}else if(r)return r.dispose(),r}function Fl(...r){return Xe(()=>ht(r))}function Xe(r){return RU({dispose:Na(()=>{r()})})}class le{constructor(){this._toDispose=new Set,this._isDisposed=!1}dispose(){this._isDisposed||(this._isDisposed=!0,this.clear())}clear(){try{ht(this._toDispose.values())}finally{this._toDispose.clear()}}add(e){if(!e)return e;if(e===this)throw new Error("Cannot register a disposable on itself!");return this._isDisposed?le.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}}le.DISABLE_DISPOSED_WARNING=!1;class Y{constructor(){this._store=new le,MU(this._store)}dispose(){this._store.dispose()}_register(e){if(e===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(e)}}Y.None=Object.freeze({dispose(){}});class An{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(e){var t;this._isDisposed||e===this._value||((t=this._value)===null||t===void 0||t.dispose(),this._value=e)}clear(){this.value=void 0}dispose(){var e;this._isDisposed=!0,(e=this._value)===null||e===void 0||e.dispose(),this._value=void 0}clearAndLeak(){const e=this._value;return this._value=void 0,e}}class FU{constructor(e){this.object=e}dispose(){}}class ni{constructor(e){this.element=e,this.next=ni.Undefined,this.prev=ni.Undefined}}ni.Undefined=new ni(void 0);class Ir{constructor(){this._first=ni.Undefined,this._last=ni.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===ni.Undefined}clear(){let e=this._first;for(;e!==ni.Undefined;){const t=e.next;e.prev=ni.Undefined,e.next=ni.Undefined,e=t}this._first=ni.Undefined,this._last=ni.Undefined,this._size=0}unshift(e){return this._insert(e,!1)}push(e){return this._insert(e,!0)}_insert(e,t){const i=new ni(e);if(this._first===ni.Undefined)this._first=i,this._last=i;else if(t){const s=this._last;this._last=i,i.prev=s,s.next=i}else{const s=this._first;this._first=i,i.next=s,s.prev=i}this._size+=1;let n=!1;return()=>{n||(n=!0,this._remove(i))}}shift(){if(this._first!==ni.Undefined){const e=this._first.element;return this._remove(this._first),e}}pop(){if(this._last!==ni.Undefined){const e=this._last.element;return this._remove(this._last),e}}_remove(e){if(e.prev!==ni.Undefined&&e.next!==ni.Undefined){const t=e.prev;t.next=e.next,e.next.prev=t}else e.prev===ni.Undefined&&e.next===ni.Undefined?(this._first=ni.Undefined,this._last=ni.Undefined):e.next===ni.Undefined?(this._last=this._last.prev,this._last.next=ni.Undefined):e.prev===ni.Undefined&&(this._first=this._first.next,this._first.prev=ni.Undefined);this._size-=1}*[Symbol.iterator](){let e=this._first;for(;e!==ni.Undefined;)yield e.element,e=e.next}}const BU=wi.performance&&typeof wi.performance.now=="function";class Mo{constructor(e){this._highResolution=BU&&e,this._startTime=this._now(),this._stopTime=-1}static create(e=!0){return new Mo(e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?wi.performance.now():Date.now()}}var ke;(function(r){r.None=()=>Y.None;function e(b){return(C,y=null,x)=>{let S=!1,w;return w=b(L=>{if(!S)return w?w.dispose():S=!0,C.call(y,L)},null,x),S&&w.dispose(),w}}r.once=e;function t(b,C){return l((y,x=null,S)=>b(w=>y.call(x,C(w)),null,S))}r.map=t;function i(b,C){return l((y,x=null,S)=>b(w=>{C(w),y.call(x,w)},null,S))}r.forEach=i;function n(b,C){return l((y,x=null,S)=>b(w=>C(w)&&y.call(x,w),null,S))}r.filter=n;function s(b){return b}r.signal=s;function o(...b){return(C,y=null,x)=>Fl(...b.map(S=>S(w=>C.call(y,w),null,x)))}r.any=o;function a(b,C,y){let x=y;return t(b,S=>(x=C(x,S),x))}r.reduce=a;function l(b){let C;const y=new H({onFirstListenerAdd(){C=b(y.fire,y)},onLastListenerRemove(){C.dispose()}});return y.event}function c(b,C,y=100,x=!1,S){let w,L,N,P=0;const B=new H({leakWarningThreshold:S,onFirstListenerAdd(){w=b(U=>{P++,L=C(L,U),x&&!N&&(B.fire(L),L=void 0),clearTimeout(N),N=setTimeout(()=>{const j=L;L=void 0,N=void 0,(!x||P>1)&&B.fire(j),P=0},y)})},onLastListenerRemove(){w.dispose()}});return B.event}r.debounce=c;function h(b,C=(y,x)=>y===x){let y=!0,x;return n(b,S=>{const w=y||!C(S,x);return y=!1,x=S,w})}r.latch=h;function u(b,C){return[r.filter(b,C),r.filter(b,y=>!C(y))]}r.split=u;function d(b,C=!1,y=[]){let x=y.slice(),S=b(N=>{x?x.push(N):L.fire(N)});const w=()=>{x&&x.forEach(N=>L.fire(N)),x=null},L=new H({onFirstListenerAdd(){S||(S=b(N=>L.fire(N)))},onFirstListenerDidAdd(){x&&(C?setTimeout(w):w())},onLastListenerRemove(){S&&S.dispose(),S=null}});return L.event}r.buffer=d;class f{constructor(C){this.event=C}map(C){return new f(t(this.event,C))}forEach(C){return new f(i(this.event,C))}filter(C){return new f(n(this.event,C))}reduce(C,y){return new f(a(this.event,C,y))}latch(){return new f(h(this.event))}debounce(C,y=100,x=!1,S){return new f(c(this.event,C,y,x,S))}on(C,y,x){return this.event(C,y,x)}once(C,y,x){return e(this.event)(C,y,x)}}function g(b){return new f(b)}r.chain=g;function p(b,C,y=x=>x){const x=(...N)=>L.fire(y(...N)),S=()=>b.on(C,x),w=()=>b.removeListener(C,x),L=new H({onFirstListenerAdd:S,onLastListenerRemove:w});return L.event}r.fromNodeEventEmitter=p;function _(b,C,y=x=>x){const x=(...N)=>L.fire(y(...N)),S=()=>b.addEventListener(C,x),w=()=>b.removeEventListener(C,x),L=new H({onFirstListenerAdd:S,onLastListenerRemove:w});return L.event}r.fromDOMEventEmitter=_;function v(b){return new Promise(C=>e(b)(C))}r.toPromise=v})(ke||(ke={}));class Zb{constructor(e){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${e}_${Zb._idPool++}`}start(e){this._stopWatch=new Mo(!0),this._listenerCount=e}stop(){if(this._stopWatch){const e=this._stopWatch.elapsed();this._elapsedOverall+=e,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${e.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}Zb._idPool=0;class H{constructor(e){var t;this._disposed=!1,this._options=e,this._leakageMon=void 0,this._perfMon=((t=this._options)===null||t===void 0?void 0:t._profName)?new Zb(this._options._profName):void 0}get event(){return this._event||(this._event=(e,t,i)=>{var n;this._listeners||(this._listeners=new Ir);const s=this._listeners.isEmpty();s&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const o=this._listeners.push(t?[e,t]:e);s&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,e,t);const a=(n=this._leakageMon)===null||n===void 0?void 0:n.check(this._listeners.size),l=Xe(()=>{a&&a(),this._disposed||(o(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return i instanceof le?i.add(l):Array.isArray(i)&&i.push(l),l}),this._event}fire(e){var t,i;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Ir);for(let n of this._listeners)this._deliveryQueue.push([n,e]);for((t=this._perfMon)===null||t===void 0||t.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[n,s]=this._deliveryQueue.shift();try{typeof n=="function"?n.call(void 0,s):n[0].call(n[1],s)}catch(o){Oe(o)}}(i=this._perfMon)===null||i===void 0||i.stop()}}dispose(){var e,t,i,n,s;this._disposed||(this._disposed=!0,(e=this._listeners)===null||e===void 0||e.clear(),(t=this._deliveryQueue)===null||t===void 0||t.clear(),(n=(i=this._options)===null||i===void 0?void 0:i.onLastListenerRemove)===null||n===void 0||n.call(i),(s=this._leakageMon)===null||s===void 0||s.dispose())}}class Yb extends H{constructor(e){super(e);this._isPaused=0,this._eventQueue=new Ir,this._mergeFn=e==null?void 0:e.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused==0)if(this._mergeFn){const e=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(e))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(e){this._listeners&&(this._isPaused!==0?this._eventQueue.push(e):super.fire(e))}}class WU extends Yb{constructor(e){var t;super(e);this._delay=(t=e.delay)!==null&&t!==void 0?t:100}fire(e){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(e)}}class TS{constructor(){this.buffers=[]}wrapEvent(e){return(t,i,n)=>e(s=>{const o=this.buffers[this.buffers.length-1];o?o.push(()=>t.call(i,s)):t.call(i,s)},void 0,n)}bufferEvents(e){const t=[];this.buffers.push(t);const i=e();return this.buffers.pop(),t.forEach(n=>n()),i}}class xM{constructor(){this.listening=!1,this.inputEvent=ke.None,this.inputEventListener=Y.None,this.emitter=new H({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{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()}}const kM=Object.freeze(function(r,e){const t=setTimeout(r.bind(e),0);return{dispose(){clearTimeout(t)}}});var et;(function(r){function e(t){return t===r.None||t===r.Cancelled||t instanceof Xb?!0:!t||typeof t!="object"?!1:typeof t.isCancellationRequested=="boolean"&&typeof t.onCancellationRequested=="function"}r.isCancellationToken=e,r.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:ke.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:kM})})(et||(et={}));class Xb{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?kM:(this._emitter||(this._emitter=new H),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=null)}}class Rn{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 Xb),this._token}cancel(){this._token?this._token instanceof Xb&&this._token.cancel():this._token=et.Cancelled}dispose(e=!1){e&&this.cancel(),this._parentListener&&this._parentListener.dispose(),this._token?this._token instanceof Xb&&this._token.dispose():this._token=et.None}}class AS{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 RS=new AS,MS=new AS,PS=new AS;(function(){function r(e,t,i=t,n=i){RS.define(e,t),MS.define(e,i),PS.define(e,n)}r(0,"unknown"),r(1,"Backspace"),r(2,"Tab"),r(3,"Enter"),r(4,"Shift"),r(5,"Ctrl"),r(6,"Alt"),r(7,"PauseBreak"),r(8,"CapsLock"),r(9,"Escape"),r(10,"Space"),r(11,"PageUp"),r(12,"PageDown"),r(13,"End"),r(14,"Home"),r(15,"LeftArrow","Left"),r(16,"UpArrow","Up"),r(17,"RightArrow","Right"),r(18,"DownArrow","Down"),r(19,"Insert"),r(20,"Delete"),r(21,"0"),r(22,"1"),r(23,"2"),r(24,"3"),r(25,"4"),r(26,"5"),r(27,"6"),r(28,"7"),r(29,"8"),r(30,"9"),r(31,"A"),r(32,"B"),r(33,"C"),r(34,"D"),r(35,"E"),r(36,"F"),r(37,"G"),r(38,"H"),r(39,"I"),r(40,"J"),r(41,"K"),r(42,"L"),r(43,"M"),r(44,"N"),r(45,"O"),r(46,"P"),r(47,"Q"),r(48,"R"),r(49,"S"),r(50,"T"),r(51,"U"),r(52,"V"),r(53,"W"),r(54,"X"),r(55,"Y"),r(56,"Z"),r(57,"Meta"),r(58,"ContextMenu"),r(59,"F1"),r(60,"F2"),r(61,"F3"),r(62,"F4"),r(63,"F5"),r(64,"F6"),r(65,"F7"),r(66,"F8"),r(67,"F9"),r(68,"F10"),r(69,"F11"),r(70,"F12"),r(71,"F13"),r(72,"F14"),r(73,"F15"),r(74,"F16"),r(75,"F17"),r(76,"F18"),r(77,"F19"),r(78,"NumLock"),r(79,"ScrollLock"),r(80,";",";","OEM_1"),r(81,"=","=","OEM_PLUS"),r(82,",",",","OEM_COMMA"),r(83,"-","-","OEM_MINUS"),r(84,".",".","OEM_PERIOD"),r(85,"/","/","OEM_2"),r(86,"`","`","OEM_3"),r(110,"ABNT_C1"),r(111,"ABNT_C2"),r(87,"[","[","OEM_4"),r(88,"\\","\\","OEM_5"),r(89,"]","]","OEM_6"),r(90,"'","'","OEM_7"),r(91,"OEM_8"),r(92,"OEM_102"),r(93,"NumPad0"),r(94,"NumPad1"),r(95,"NumPad2"),r(96,"NumPad3"),r(97,"NumPad4"),r(98,"NumPad5"),r(99,"NumPad6"),r(100,"NumPad7"),r(101,"NumPad8"),r(102,"NumPad9"),r(103,"NumPad_Multiply"),r(104,"NumPad_Add"),r(105,"NumPad_Separator"),r(106,"NumPad_Subtract"),r(107,"NumPad_Decimal"),r(108,"NumPad_Divide")})();var hh;(function(r){function e(o){return RS.keyCodeToStr(o)}r.toString=e;function t(o){return RS.strToKeyCode(o)}r.fromString=t;function i(o){return MS.keyCodeToStr(o)}r.toUserSettingsUS=i;function n(o){return PS.keyCodeToStr(o)}r.toUserSettingsGeneral=n;function s(o){return MS.strToKeyCode(o)||PS.strToKeyCode(o)}r.fromUserSettings=s})(hh||(hh={}));function Mi(r,e){const t=(e&65535)<<16>>>0;return(r|t)>>>0}function OS(r,e){if(r===0)return null;const t=(r&65535)>>>0,i=(r&4294901760)>>>16;return i!==0?new BS([FS(t,e),FS(i,e)]):new BS([FS(t,e)])}function FS(r,e){const t=!!(r&2048),i=!!(r&256),n=e===2?i:t,s=!!(r&1024),o=!!(r&512),a=e===2?t:i,l=r&255;return new rp(n,s,o,a,l)}class rp{constructor(e,t,i,n,s){this.ctrlKey=e,this.shiftKey=t,this.altKey=i,this.metaKey=n,this.keyCode=s}equals(e){return this.ctrlKey===e.ctrlKey&&this.shiftKey===e.shiftKey&&this.altKey===e.altKey&&this.metaKey===e.metaKey&&this.keyCode===e.keyCode}isModifierKey(){return this.keyCode===0||this.keyCode===5||this.keyCode===57||this.keyCode===6||this.keyCode===4}toChord(){return new BS([this])}isDuplicateModifierCase(){return this.ctrlKey&&this.keyCode===5||this.shiftKey&&this.keyCode===4||this.altKey&&this.keyCode===6||this.metaKey&&this.keyCode===57}}class BS{constructor(e){if(e.length===0)throw Er("parts");this.parts=e}}class VU{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 HU{}let Ed;if(typeof wi.vscode!="undefined"&&typeof wi.vscode.process!="undefined"){const r=wi.vscode.process;Ed={get platform(){return r.platform},get arch(){return r.arch},get env(){return r.env},cwd(){return r.cwd()},nextTick(e){return xS(e)}}}else typeof process!="undefined"?Ed={get platform(){return process.platform},get arch(){return process.arch},get env(){return process.env},cwd(){return process.env.VSCODE_CWD||process.cwd()},nextTick(r){return process.nextTick(r)}}:Ed={get platform(){return Xi?"win32":Je?"darwin":"linux"},get arch(){},nextTick(r){return xS(r)},get env(){return{}},cwd(){return"/"}};const WS=Ed.cwd,zU=Ed.env,uh=Ed.platform,$U=65,UU=97,jU=90,KU=122,Bl=46,Ln=47,Nr=92,Wl=58,qU=63;class DM extends Error{constructor(e,t,i){let n;typeof t=="string"&&t.indexOf("not ")===0?(n="must not be",t=t.replace(/^not /,"")):n="must be";const s=e.indexOf(".")!==-1?"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 Pi(r,e){if(typeof r!="string")throw new DM(e,"string",r)}function vt(r){return r===Ln||r===Nr}function VS(r){return r===Ln}function Vl(r){return r>=$U&&r<=jU||r>=UU&&r<=KU}function Qb(r,e,t,i){let n="",s=0,o=-1,a=0,l=0;for(let c=0;c<=r.length;++c){if(c<r.length)l=r.charCodeAt(c);else{if(i(l))break;l=Ln}if(i(l)){if(!(o===c-1||a===1))if(a===2){if(n.length<2||s!==2||n.charCodeAt(n.length-1)!==Bl||n.charCodeAt(n.length-2)!==Bl){if(n.length>2){const h=n.lastIndexOf(t);h===-1?(n="",s=0):(n=n.slice(0,h),s=n.length-1-n.lastIndexOf(t)),o=c,a=0;continue}else if(n.length!==0){n="",s=0,o=c,a=0;continue}}e&&(n+=n.length>0?`${t}..`:"..",s=2)}else n.length>0?n+=`${t}${r.slice(o+1,c)}`:n=r.slice(o+1,c),s=c-o-1;o=c,a=0}else l===Bl&&a!==-1?++a:a=-1}return n}function EM(r,e){if(e===null||typeof e!="object")throw new DM("pathObject","Object",e);const t=e.dir||e.root,i=e.base||`${e.name||""}${e.ext||""}`;return t?t===e.root?`${t}${i}`:`${t}${r}${i}`:i}const ur={resolve(...r){let e="",t="",i=!1;for(let n=r.length-1;n>=-1;n--){let s;if(n>=0){if(s=r[n],Pi(s,"path"),s.length===0)continue}else e.length===0?s=WS():(s=zU[`=${e}`]||WS(),(s===void 0||s.slice(0,2).toLowerCase()!==e.toLowerCase()&&s.charCodeAt(2)===Nr)&&(s=`${e}\\`));const o=s.length;let a=0,l="",c=!1;const h=s.charCodeAt(0);if(o===1)vt(h)&&(a=1,c=!0);else if(vt(h))if(c=!0,vt(s.charCodeAt(1))){let u=2,d=u;for(;u<o&&!vt(s.charCodeAt(u));)u++;if(u<o&&u!==d){const f=s.slice(d,u);for(d=u;u<o&&vt(s.charCodeAt(u));)u++;if(u<o&&u!==d){for(d=u;u<o&&!vt(s.charCodeAt(u));)u++;(u===o||u!==d)&&(l=`\\\\${f}\\${s.slice(d,u)}`,a=u)}}}else a=1;else Vl(h)&&s.charCodeAt(1)===Wl&&(l=s.slice(0,2),a=2,o>2&&vt(s.charCodeAt(2))&&(c=!0,a=3));if(l.length>0)if(e.length>0){if(l.toLowerCase()!==e.toLowerCase())continue}else e=l;if(i){if(e.length>0)break}else if(t=`${s.slice(a)}\\${t}`,i=c,c&&e.length>0)break}return t=Qb(t,!i,"\\",vt),i?`${e}\\${t}`:`${e}${t}`||"."},normalize(r){Pi(r,"path");const e=r.length;if(e===0)return".";let t=0,i,n=!1;const s=r.charCodeAt(0);if(e===1)return VS(s)?"\\":r;if(vt(s))if(n=!0,vt(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){const c=r.slice(l,a);for(l=a;a<e&&vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!vt(r.charCodeAt(a));)a++;if(a===e)return`\\\\${c}\\${r.slice(l)}\\`;a!==l&&(i=`\\\\${c}\\${r.slice(l,a)}`,t=a)}}}else t=1;else Vl(s)&&r.charCodeAt(1)===Wl&&(i=r.slice(0,2),t=2,e>2&&vt(r.charCodeAt(2))&&(n=!0,t=3));let o=t<e?Qb(r.slice(t),!n,"\\",vt):"";return o.length===0&&!n&&(o="."),o.length>0&&vt(r.charCodeAt(e-1))&&(o+="\\"),i===void 0?n?`\\${o}`:o:n?`${i}\\${o}`:`${i}${o}`},isAbsolute(r){Pi(r,"path");const e=r.length;if(e===0)return!1;const t=r.charCodeAt(0);return vt(t)||e>2&&Vl(t)&&r.charCodeAt(1)===Wl&&vt(r.charCodeAt(2))},join(...r){if(r.length===0)return".";let e,t;for(let s=0;s<r.length;++s){const o=r[s];Pi(o,"path"),o.length>0&&(e===void 0?e=t=o:e+=`\\${o}`)}if(e===void 0)return".";let i=!0,n=0;if(typeof t=="string"&&vt(t.charCodeAt(0))){++n;const s=t.length;s>1&&vt(t.charCodeAt(1))&&(++n,s>2&&(vt(t.charCodeAt(2))?++n:i=!1))}if(i){for(;n<e.length&&vt(e.charCodeAt(n));)n++;n>=2&&(e=`\\${e.slice(n)}`)}return ur.normalize(e)},relative(r,e){if(Pi(r,"from"),Pi(e,"to"),r===e)return"";const t=ur.resolve(r),i=ur.resolve(e);if(t===i||(r=t.toLowerCase(),e=i.toLowerCase(),r===e))return"";let n=0;for(;n<r.length&&r.charCodeAt(n)===Nr;)n++;let s=r.length;for(;s-1>n&&r.charCodeAt(s-1)===Nr;)s--;const o=s-n;let a=0;for(;a<e.length&&e.charCodeAt(a)===Nr;)a++;let l=e.length;for(;l-1>a&&e.charCodeAt(l-1)===Nr;)l--;const c=l-a,h=o<c?o:c;let u=-1,d=0;for(;d<h;d++){const g=r.charCodeAt(n+d);if(g!==e.charCodeAt(a+d))break;g===Nr&&(u=d)}if(d!==h){if(u===-1)return i}else{if(c>h){if(e.charCodeAt(a+d)===Nr)return i.slice(a+d+1);if(d===2)return i.slice(a+d)}o>h&&(r.charCodeAt(n+d)===Nr?u=d:d===2&&(u=3)),u===-1&&(u=0)}let f="";for(d=n+u+1;d<=s;++d)(d===s||r.charCodeAt(d)===Nr)&&(f+=f.length===0?"..":"\\..");return a+=u,f.length>0?`${f}${i.slice(a,l)}`:(i.charCodeAt(a)===Nr&&++a,i.slice(a,l))},toNamespacedPath(r){if(typeof r!="string")return r;if(r.length===0)return"";const e=ur.resolve(r);if(e.length<=2)return r;if(e.charCodeAt(0)===Nr){if(e.charCodeAt(1)===Nr){const t=e.charCodeAt(2);if(t!==qU&&t!==Bl)return`\\\\?\\UNC\\${e.slice(2)}`}}else if(Vl(e.charCodeAt(0))&&e.charCodeAt(1)===Wl&&e.charCodeAt(2)===Nr)return`\\\\?\\${e}`;return r},dirname(r){Pi(r,"path");const e=r.length;if(e===0)return".";let t=-1,i=0;const n=r.charCodeAt(0);if(e===1)return vt(n)?r:".";if(vt(n)){if(t=i=1,vt(r.charCodeAt(1))){let a=2,l=a;for(;a<e&&!vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&vt(r.charCodeAt(a));)a++;if(a<e&&a!==l){for(l=a;a<e&&!vt(r.charCodeAt(a));)a++;if(a===e)return r;a!==l&&(t=i=a+1)}}}}else Vl(n)&&r.charCodeAt(1)===Wl&&(t=e>2&&vt(r.charCodeAt(2))?3:2,i=t);let s=-1,o=!0;for(let a=e-1;a>=i;--a)if(vt(r.charCodeAt(a))){if(!o){s=a;break}}else o=!1;if(s===-1){if(t===-1)return".";s=t}return r.slice(0,s)},basename(r,e){e!==void 0&&Pi(e,"ext"),Pi(r,"path");let t=0,i=-1,n=!0,s;if(r.length>=2&&Vl(r.charCodeAt(0))&&r.charCodeAt(1)===Wl&&(t=2),e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let o=e.length-1,a=-1;for(s=r.length-1;s>=t;--s){const l=r.charCodeAt(s);if(vt(l)){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o==-1&&(i=s):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(s=r.length-1;s>=t;--s)if(vt(r.charCodeAt(s))){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(t,i)},extname(r){Pi(r,"path");let e=0,t=-1,i=0,n=-1,s=!0,o=0;r.length>=2&&r.charCodeAt(1)===Wl&&Vl(r.charCodeAt(0))&&(e=i=2);for(let a=r.length-1;a>=e;--a){const l=r.charCodeAt(a);if(vt(l)){if(!s){i=a+1;break}continue}n===-1&&(s=!1,n=a+1),l===Bl?t===-1?t=a:o!==1&&(o=1):t!==-1&&(o=-1)}return t===-1||n===-1||o===0||o===1&&t===n-1&&t===i+1?"":r.slice(t,n)},format:EM.bind(null,"\\"),parse(r){Pi(r,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;const t=r.length;let i=0,n=r.charCodeAt(0);if(t===1)return vt(n)?(e.root=e.dir=r,e):(e.base=e.name=r,e);if(vt(n)){if(i=1,vt(r.charCodeAt(1))){let u=2,d=u;for(;u<t&&!vt(r.charCodeAt(u));)u++;if(u<t&&u!==d){for(d=u;u<t&&vt(r.charCodeAt(u));)u++;if(u<t&&u!==d){for(d=u;u<t&&!vt(r.charCodeAt(u));)u++;u===t?i=u:u!==d&&(i=u+1)}}}}else if(Vl(n)&&r.charCodeAt(1)===Wl){if(t<=2)return e.root=e.dir=r,e;if(i=2,vt(r.charCodeAt(2))){if(t===3)return e.root=e.dir=r,e;i=3}}i>0&&(e.root=r.slice(0,i));let s=-1,o=i,a=-1,l=!0,c=r.length-1,h=0;for(;c>=i;--c){if(n=r.charCodeAt(c),vt(n)){if(!l){o=c+1;break}continue}a===-1&&(l=!1,a=c+1),n===Bl?s===-1?s=c:h!==1&&(h=1):s!==-1&&(h=-1)}return a!==-1&&(s===-1||h===0||h===1&&s===a-1&&s===o+1?e.base=e.name=r.slice(o,a):(e.name=r.slice(o,s),e.base=r.slice(o,a),e.ext=r.slice(s,a))),o>0&&o!==i?e.dir=r.slice(0,o-1):e.dir=e.root,e},sep:"\\",delimiter:";",win32:null,posix:null},Ni={resolve(...r){let e="",t=!1;for(let i=r.length-1;i>=-1&&!t;i--){const n=i>=0?r[i]:WS();Pi(n,"path"),n.length!==0&&(e=`${n}/${e}`,t=n.charCodeAt(0)===Ln)}return e=Qb(e,!t,"/",VS),t?`/${e}`:e.length>0?e:"."},normalize(r){if(Pi(r,"path"),r.length===0)return".";const e=r.charCodeAt(0)===Ln,t=r.charCodeAt(r.length-1)===Ln;return r=Qb(r,!e,"/",VS),r.length===0?e?"/":t?"./":".":(t&&(r+="/"),e?`/${r}`:r)},isAbsolute(r){return Pi(r,"path"),r.length>0&&r.charCodeAt(0)===Ln},join(...r){if(r.length===0)return".";let e;for(let t=0;t<r.length;++t){const i=r[t];Pi(i,"path"),i.length>0&&(e===void 0?e=i:e+=`/${i}`)}return e===void 0?".":Ni.normalize(e)},relative(r,e){if(Pi(r,"from"),Pi(e,"to"),r===e||(r=Ni.resolve(r),e=Ni.resolve(e),r===e))return"";const t=1,i=r.length,n=i-t,s=1,o=e.length-s,a=n<o?n:o;let l=-1,c=0;for(;c<a;c++){const u=r.charCodeAt(t+c);if(u!==e.charCodeAt(s+c))break;u===Ln&&(l=c)}if(c===a)if(o>a){if(e.charCodeAt(s+c)===Ln)return e.slice(s+c+1);if(c===0)return e.slice(s+c)}else n>a&&(r.charCodeAt(t+c)===Ln?l=c:c===0&&(l=0));let h="";for(c=t+l+1;c<=i;++c)(c===i||r.charCodeAt(c)===Ln)&&(h+=h.length===0?"..":"/..");return`${h}${e.slice(s+l)}`},toNamespacedPath(r){return r},dirname(r){if(Pi(r,"path"),r.length===0)return".";const e=r.charCodeAt(0)===Ln;let t=-1,i=!0;for(let n=r.length-1;n>=1;--n)if(r.charCodeAt(n)===Ln){if(!i){t=n;break}}else i=!1;return t===-1?e?"/":".":e&&t===1?"//":r.slice(0,t)},basename(r,e){e!==void 0&&Pi(e,"ext"),Pi(r,"path");let t=0,i=-1,n=!0,s;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e===r)return"";let o=e.length-1,a=-1;for(s=r.length-1;s>=0;--s){const l=r.charCodeAt(s);if(l===Ln){if(!n){t=s+1;break}}else a===-1&&(n=!1,a=s+1),o>=0&&(l===e.charCodeAt(o)?--o==-1&&(i=s):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(s=r.length-1;s>=0;--s)if(r.charCodeAt(s)===Ln){if(!n){t=s+1;break}}else i===-1&&(n=!1,i=s+1);return i===-1?"":r.slice(t,i)},extname(r){Pi(r,"path");let e=-1,t=0,i=-1,n=!0,s=0;for(let o=r.length-1;o>=0;--o){const a=r.charCodeAt(o);if(a===Ln){if(!n){t=o+1;break}continue}i===-1&&(n=!1,i=o+1),a===Bl?e===-1?e=o:s!==1&&(s=1):e!==-1&&(s=-1)}return e===-1||i===-1||s===0||s===1&&e===i-1&&e===t+1?"":r.slice(e,i)},format:EM.bind(null,"/"),parse(r){Pi(r,"path");const e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;const t=r.charCodeAt(0)===Ln;let i;t?(e.root="/",i=1):i=0;let n=-1,s=0,o=-1,a=!0,l=r.length-1,c=0;for(;l>=i;--l){const h=r.charCodeAt(l);if(h===Ln){if(!a){s=l+1;break}continue}o===-1&&(a=!1,o=l+1),h===Bl?n===-1?n=l:c!==1&&(c=1):n!==-1&&(c=-1)}if(o!==-1){const h=s===0&&t?1:s;n===-1||c===0||c===1&&n===o-1&&n===s+1?e.base=e.name=r.slice(h,o):(e.name=r.slice(h,n),e.base=r.slice(h,o),e.ext=r.slice(n,o))}return s>0?e.dir=r.slice(0,s-1):t&&(e.dir="/"),e},sep:"/",delimiter:":",win32:null,posix:null};Ni.win32=ur.win32=ur;Ni.posix=ur.posix=Ni;const HS=uh==="win32"?ur.normalize:Ni.normalize,GU=uh==="win32"?ur.resolve:Ni.resolve,ZU=uh==="win32"?ur.relative:Ni.relative,IM=uh==="win32"?ur.dirname:Ni.dirname,dh=uh==="win32"?ur.basename:Ni.basename,YU=uh==="win32"?ur.extname:Ni.extname,fh=uh==="win32"?ur.sep:Ni.sep,XU=/^\w[\w\d+.-]*$/,QU=/^\//,JU=/^\/\//;function NM(r,e){if(!r.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${r.authority}", path: "${r.path}", query: "${r.query}", fragment: "${r.fragment}"}`);if(r.scheme&&!XU.test(r.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(r.path){if(r.authority){if(!QU.test(r.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(JU.test(r.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}function ej(r,e){return!r&&!e?"file":r}function tj(r,e){switch(r){case"https":case"http":case"file":e?e[0]!==qs&&(e=qs+e):e=qs;break}return e}const ai="",qs="/",ij=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class Ie{constructor(e,t,i,n,s,o=!1){typeof e=="object"?(this.scheme=e.scheme||ai,this.authority=e.authority||ai,this.path=e.path||ai,this.query=e.query||ai,this.fragment=e.fragment||ai):(this.scheme=ej(e,o),this.authority=t||ai,this.path=tj(this.scheme,i||ai),this.query=n||ai,this.fragment=s||ai,NM(this,o))}static isUri(e){return e instanceof Ie?!0:e?typeof e.authority=="string"&&typeof e.fragment=="string"&&typeof e.path=="string"&&typeof e.query=="string"&&typeof e.scheme=="string"&&typeof e.fsPath=="string"&&typeof e.with=="function"&&typeof e.toString=="function":!1}get fsPath(){return Jb(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:i,path:n,query:s,fragment:o}=e;return t===void 0?t=this.scheme:t===null&&(t=ai),i===void 0?i=this.authority:i===null&&(i=ai),n===void 0?n=this.path:n===null&&(n=ai),s===void 0?s=this.query:s===null&&(s=ai),o===void 0?o=this.fragment:o===null&&(o=ai),t===this.scheme&&i===this.authority&&n===this.path&&s===this.query&&o===this.fragment?this:new Id(t,i,n,s,o)}static parse(e,t=!1){const i=ij.exec(e);return i?new Id(i[2]||ai,ev(i[4]||ai),ev(i[5]||ai),ev(i[7]||ai),ev(i[9]||ai),t):new Id(ai,ai,ai,ai,ai)}static file(e){let t=ai;if(Xi&&(e=e.replace(/\\/g,qs)),e[0]===qs&&e[1]===qs){const i=e.indexOf(qs,2);i===-1?(t=e.substring(2),e=qs):(t=e.substring(2,i),e=e.substring(i)||qs)}return new Id("file",t,e,ai,ai)}static from(e){const t=new Id(e.scheme,e.authority,e.path,e.query,e.fragment);return NM(t,!0),t}static joinPath(e,...t){if(!e.path)throw new Error("[UriError]: cannot call joinPath on URI without path");let i;return Xi&&e.scheme==="file"?i=Ie.file(ur.join(Jb(e,!0),...t)).path:i=Ni.join(e.path,...t),e.with({path:i})}toString(e=!1){return zS(this,e)}toJSON(){return this}static revive(e){if(e){if(e instanceof Ie)return e;{const t=new Id(e);return t._formatted=e.external,t._fsPath=e._sep===TM?e.fsPath:null,t}}else return e}}const TM=Xi?1:void 0;class Id extends Ie{constructor(){super(...arguments);this._formatted=null,this._fsPath=null}get fsPath(){return this._fsPath||(this._fsPath=Jb(this,!1)),this._fsPath}toString(e=!1){return e?zS(this,!0):(this._formatted||(this._formatted=zS(this,!1)),this._formatted)}toJSON(){const e={$mid:1};return this._fsPath&&(e.fsPath=this._fsPath,e._sep=TM),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 AM={[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 RM(r,e){let t,i=-1;for(let n=0;n<r.length;n++){const s=r.charCodeAt(n);if(s>=97&&s<=122||s>=65&&s<=90||s>=48&&s<=57||s===45||s===46||s===95||s===126||e&&s===47)i!==-1&&(t+=encodeURIComponent(r.substring(i,n)),i=-1),t!==void 0&&(t+=r.charAt(n));else{t===void 0&&(t=r.substr(0,n));const o=AM[s];o!==void 0?(i!==-1&&(t+=encodeURIComponent(r.substring(i,n)),i=-1),t+=o):i===-1&&(i=n)}}return i!==-1&&(t+=encodeURIComponent(r.substring(i))),t!==void 0?t:r}function nj(r){let e;for(let t=0;t<r.length;t++){const i=r.charCodeAt(t);i===35||i===63?(e===void 0&&(e=r.substr(0,t)),e+=AM[i]):e!==void 0&&(e+=r[t])}return e!==void 0?e:r}function Jb(r,e){let t;return r.authority&&r.path.length>1&&r.scheme==="file"?t=`//${r.authority}${r.path}`:r.path.charCodeAt(0)===47&&(r.path.charCodeAt(1)>=65&&r.path.charCodeAt(1)<=90||r.path.charCodeAt(1)>=97&&r.path.charCodeAt(1)<=122)&&r.path.charCodeAt(2)===58?e?t=r.path.substr(1):t=r.path[1].toLowerCase()+r.path.substr(2):t=r.path,Xi&&(t=t.replace(/\//g,"\\")),t}function zS(r,e){const t=e?nj:RM;let i="",{scheme:n,authority:s,path:o,query:a,fragment:l}=r;if(n&&(i+=n,i+=":"),(s||n==="file")&&(i+=qs,i+=qs),s){let c=s.indexOf("@");if(c!==-1){const h=s.substr(0,c);s=s.substr(c+1),c=h.indexOf(":"),c===-1?i+=t(h,!1):(i+=t(h.substr(0,c),!1),i+=":",i+=t(h.substr(c+1),!1)),i+="@"}s=s.toLowerCase(),c=s.indexOf(":"),c===-1?i+=t(s,!1):(i+=t(s.substr(0,c),!1),i+=s.substr(c))}if(o){if(o.length>=3&&o.charCodeAt(0)===47&&o.charCodeAt(2)===58){const c=o.charCodeAt(1);c>=65&&c<=90&&(o=`/${String.fromCharCode(c+32)}:${o.substr(3)}`)}else if(o.length>=2&&o.charCodeAt(1)===58){const c=o.charCodeAt(0);c>=65&&c<=90&&(o=`${String.fromCharCode(c+32)}:${o.substr(2)}`)}i+=t(o,!0)}return a&&(i+="?",i+=t(a,!1)),l&&(i+="#",i+=e?l:RM(l,!1)),i}function MM(r){try{return decodeURIComponent(r)}catch{return r.length>3?r.substr(0,3)+MM(r.substr(3)):r}}const PM=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function ev(r){return r.match(PM)?r.replace(PM,e=>MM(e)):r}class ${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 $(e,t)}delta(e=0,t=0){return this.with(this.lineNumber+e,this.column+t)}equals(e){return $.equals(this,e)}static equals(e,t){return!e&&!t?!0:!!e&&!!t&&e.lineNumber===t.lineNumber&&e.column===t.column}isBefore(e){return $.isBefore(this,e)}static isBefore(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<t.column}isBeforeOrEqual(e){return $.isBeforeOrEqual(this,e)}static isBeforeOrEqual(e,t){return e.lineNumber<t.lineNumber?!0:t.lineNumber<e.lineNumber?!1:e.column<=t.column}static compare(e,t){let i=e.lineNumber|0,n=t.lineNumber|0;if(i===n){let s=e.column|0,o=t.column|0;return s-o}return i-n}clone(){return new $(this.lineNumber,this.column)}toString(){return"("+this.lineNumber+","+this.column+")"}static lift(e){return new $(e.lineNumber,e.column)}static isIPosition(e){return e&&typeof e.lineNumber=="number"&&typeof e.column=="number"}}class k{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 k.isEmpty(this)}static isEmpty(e){return e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn}containsPosition(e){return k.containsPosition(this,e)}static containsPosition(e,t){return!(t.lineNumber<e.startLineNumber||t.lineNumber>e.endLineNumber||t.lineNumber===e.startLineNumber&&t.column<e.startColumn||t.lineNumber===e.endLineNumber&&t.column>e.endColumn)}containsRange(e){return k.containsRange(this,e)}static containsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>e.endColumn)}strictContainsRange(e){return k.strictContainsRange(this,e)}static strictContainsRange(e,t){return!(t.startLineNumber<e.startLineNumber||t.endLineNumber<e.startLineNumber||t.startLineNumber>e.endLineNumber||t.endLineNumber>e.endLineNumber||t.startLineNumber===e.startLineNumber&&t.startColumn<=e.startColumn||t.endLineNumber===e.endLineNumber&&t.endColumn>=e.endColumn)}plusRange(e){return k.plusRange(this,e)}static plusRange(e,t){let i,n,s,o;return t.startLineNumber<e.startLineNumber?(i=t.startLineNumber,n=t.startColumn):t.startLineNumber===e.startLineNumber?(i=t.startLineNumber,n=Math.min(t.startColumn,e.startColumn)):(i=e.startLineNumber,n=e.startColumn),t.endLineNumber>e.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 k(i,n,s,o)}intersectRanges(e){return k.intersectRanges(this,e)}static intersectRanges(e,t){let i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=t.startLineNumber,l=t.startColumn,c=t.endLineNumber,h=t.endColumn;return i<a?(i=a,n=l):i===a&&(n=Math.max(n,l)),s>c?(s=c,o=h):s===c&&(o=Math.min(o,h)),i>s||i===s&&n>o?null:new k(i,n,s,o)}equalsRange(e){return k.equalsRange(this,e)}static equalsRange(e,t){return!!e&&!!t&&e.startLineNumber===t.startLineNumber&&e.startColumn===t.startColumn&&e.endLineNumber===t.endLineNumber&&e.endColumn===t.endColumn}getEndPosition(){return k.getEndPosition(this)}static getEndPosition(e){return new $(e.endLineNumber,e.endColumn)}getStartPosition(){return k.getStartPosition(this)}static getStartPosition(e){return new $(e.startLineNumber,e.startColumn)}toString(){return"["+this.startLineNumber+","+this.startColumn+" -> "+this.endLineNumber+","+this.endColumn+"]"}setEndPosition(e,t){return new k(this.startLineNumber,this.startColumn,e,t)}setStartPosition(e,t){return new k(e,t,this.endLineNumber,this.endColumn)}collapseToStart(){return k.collapseToStart(this)}static collapseToStart(e){return new k(e.startLineNumber,e.startColumn,e.startLineNumber,e.startColumn)}static fromPositions(e,t=e){return new k(e.lineNumber,e.column,t.lineNumber,t.column)}static lift(e){return e?new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn):null}static isIRange(e){return e&&typeof e.startLineNumber=="number"&&typeof e.startColumn=="number"&&typeof e.endLineNumber=="number"&&typeof e.endColumn=="number"}static areIntersectingOrTouching(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<e.startColumn)}static areIntersecting(e,t){return!(e.endLineNumber<t.startLineNumber||e.endLineNumber===t.startLineNumber&&e.endColumn<=t.startColumn||t.endLineNumber<e.startLineNumber||t.endLineNumber===e.startLineNumber&&t.endColumn<=e.startColumn)}static compareRangesUsingStarts(e,t){if(e&&t){const s=e.startLineNumber|0,o=t.startLineNumber|0;if(s===o){const a=e.startColumn|0,l=t.startColumn|0;if(a===l){const c=e.endLineNumber|0,h=t.endLineNumber|0;if(c===h){const u=e.endColumn|0,d=t.endColumn|0;return u-d}return c-h}return a-l}return s-o}return(e?1:0)-(t?1:0)}static compareRangesUsingEnds(e,t){return e.endLineNumber===t.endLineNumber?e.endColumn===t.endColumn?e.startLineNumber===t.startLineNumber?e.startColumn-t.startColumn:e.startLineNumber-t.startLineNumber:e.endColumn-t.endColumn:e.endLineNumber-t.endLineNumber}static spansMultipleLines(e){return e.endLineNumber>e.startLineNumber}}class be extends k{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 be.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 this.getDirection()===0?new be(this.startLineNumber,this.startColumn,e,t):new be(e,t,this.startLineNumber,this.startColumn)}getPosition(){return new $(this.positionLineNumber,this.positionColumn)}setStartPosition(e,t){return this.getDirection()===0?new be(e,t,this.endLineNumber,this.endColumn):new be(this.endLineNumber,this.endColumn,e,t)}static fromPositions(e,t=e){return new be(e.lineNumber,e.column,t.lineNumber,t.column)}static liftSelection(e){return new be(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<n;i++)if(!this.selectionsEqual(e[i],t[i]))return!1;return!0}static isISelection(e){return e&&typeof e.selectionStartLineNumber=="number"&&typeof e.selectionStartColumn=="number"&&typeof e.positionLineNumber=="number"&&typeof e.positionColumn=="number"}static createWithDirection(e,t,i,n,s){return s===0?new be(e,t,i,n):new be(i,n,e,t)}}class tv{constructor(e,t,i){this._tokenBrand=void 0,this.offset=e|0,this.type=t,this.language=i}toString(){return"("+this.offset+", "+this.type+")"}}class $S{constructor(e,t){this._tokenizationResultBrand=void 0,this.tokens=e,this.endState=t}}class iv{constructor(e,t){this._tokenizationResult2Brand=void 0,this.tokens=e,this.endState=t}}var US;(function(r){r[r.Unknown=0]="Unknown",r[r.Disabled=1]="Disabled",r[r.Enabled=2]="Enabled"})(US||(US={}));var jS;(function(r){r[r.KeepWhitespace=1]="KeepWhitespace",r[r.InsertAsSnippet=4]="InsertAsSnippet"})(jS||(jS={}));var KS;(function(r){r[r.Method=0]="Method",r[r.Function=1]="Function",r[r.Constructor=2]="Constructor",r[r.Field=3]="Field",r[r.Variable=4]="Variable",r[r.Class=5]="Class",r[r.Struct=6]="Struct",r[r.Interface=7]="Interface",r[r.Module=8]="Module",r[r.Property=9]="Property",r[r.Event=10]="Event",r[r.Operator=11]="Operator",r[r.Unit=12]="Unit",r[r.Value=13]="Value",r[r.Constant=14]="Constant",r[r.Enum=15]="Enum",r[r.EnumMember=16]="EnumMember",r[r.Keyword=17]="Keyword",r[r.Text=18]="Text",r[r.Color=19]="Color",r[r.File=20]="File",r[r.Reference=21]="Reference",r[r.Customcolor=22]="Customcolor",r[r.Folder=23]="Folder",r[r.TypeParameter=24]="TypeParameter",r[r.User=25]="User",r[r.Issue=26]="Issue",r[r.Snippet=27]="Snippet"})(KS||(KS={}));var qS;(function(r){r[r.Deprecated=1]="Deprecated"})(qS||(qS={}));var GS;(function(r){r[r.Invoke=0]="Invoke",r[r.TriggerCharacter=1]="TriggerCharacter",r[r.TriggerForIncompleteCompletions=2]="TriggerForIncompleteCompletions"})(GS||(GS={}));var ZS;(function(r){r[r.EXACT=0]="EXACT",r[r.ABOVE=1]="ABOVE",r[r.BELOW=2]="BELOW"})(ZS||(ZS={}));var YS;(function(r){r[r.NotSet=0]="NotSet",r[r.ContentFlush=1]="ContentFlush",r[r.RecoverFromMarkers=2]="RecoverFromMarkers",r[r.Explicit=3]="Explicit",r[r.Paste=4]="Paste",r[r.Undo=5]="Undo",r[r.Redo=6]="Redo"})(YS||(YS={}));var XS;(function(r){r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(XS||(XS={}));var QS;(function(r){r[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write"})(QS||(QS={}));var JS;(function(r){r[r.None=0]="None",r[r.Keep=1]="Keep",r[r.Brackets=2]="Brackets",r[r.Advanced=3]="Advanced",r[r.Full=4]="Full"})(JS||(JS={}));var eL;(function(r){r[r.acceptSuggestionOnCommitCharacter=0]="acceptSuggestionOnCommitCharacter",r[r.acceptSuggestionOnEnter=1]="acceptSuggestionOnEnter",r[r.accessibilitySupport=2]="accessibilitySupport",r[r.accessibilityPageSize=3]="accessibilityPageSize",r[r.ariaLabel=4]="ariaLabel",r[r.autoClosingBrackets=5]="autoClosingBrackets",r[r.autoClosingDelete=6]="autoClosingDelete",r[r.autoClosingOvertype=7]="autoClosingOvertype",r[r.autoClosingQuotes=8]="autoClosingQuotes",r[r.autoIndent=9]="autoIndent",r[r.automaticLayout=10]="automaticLayout",r[r.autoSurround=11]="autoSurround",r[r.bracketPairColorization=12]="bracketPairColorization",r[r.guides=13]="guides",r[r.codeLens=14]="codeLens",r[r.codeLensFontFamily=15]="codeLensFontFamily",r[r.codeLensFontSize=16]="codeLensFontSize",r[r.colorDecorators=17]="colorDecorators",r[r.columnSelection=18]="columnSelection",r[r.comments=19]="comments",r[r.contextmenu=20]="contextmenu",r[r.copyWithSyntaxHighlighting=21]="copyWithSyntaxHighlighting",r[r.cursorBlinking=22]="cursorBlinking",r[r.cursorSmoothCaretAnimation=23]="cursorSmoothCaretAnimation",r[r.cursorStyle=24]="cursorStyle",r[r.cursorSurroundingLines=25]="cursorSurroundingLines",r[r.cursorSurroundingLinesStyle=26]="cursorSurroundingLinesStyle",r[r.cursorWidth=27]="cursorWidth",r[r.disableLayerHinting=28]="disableLayerHinting",r[r.disableMonospaceOptimizations=29]="disableMonospaceOptimizations",r[r.domReadOnly=30]="domReadOnly",r[r.dragAndDrop=31]="dragAndDrop",r[r.emptySelectionClipboard=32]="emptySelectionClipboard",r[r.extraEditorClassName=33]="extraEditorClassName",r[r.fastScrollSensitivity=34]="fastScrollSensitivity",r[r.find=35]="find",r[r.fixedOverflowWidgets=36]="fixedOverflowWidgets",r[r.folding=37]="folding",r[r.foldingStrategy=38]="foldingStrategy",r[r.foldingHighlight=39]="foldingHighlight",r[r.foldingImportsByDefault=40]="foldingImportsByDefault",r[r.unfoldOnClickAfterEndOfLine=41]="unfoldOnClickAfterEndOfLine",r[r.fontFamily=42]="fontFamily",r[r.fontInfo=43]="fontInfo",r[r.fontLigatures=44]="fontLigatures",r[r.fontSize=45]="fontSize",r[r.fontWeight=46]="fontWeight",r[r.formatOnPaste=47]="formatOnPaste",r[r.formatOnType=48]="formatOnType",r[r.glyphMargin=49]="glyphMargin",r[r.gotoLocation=50]="gotoLocation",r[r.hideCursorInOverviewRuler=51]="hideCursorInOverviewRuler",r[r.hover=52]="hover",r[r.inDiffEditor=53]="inDiffEditor",r[r.inlineSuggest=54]="inlineSuggest",r[r.letterSpacing=55]="letterSpacing",r[r.lightbulb=56]="lightbulb",r[r.lineDecorationsWidth=57]="lineDecorationsWidth",r[r.lineHeight=58]="lineHeight",r[r.lineNumbers=59]="lineNumbers",r[r.lineNumbersMinChars=60]="lineNumbersMinChars",r[r.linkedEditing=61]="linkedEditing",r[r.links=62]="links",r[r.matchBrackets=63]="matchBrackets",r[r.minimap=64]="minimap",r[r.mouseStyle=65]="mouseStyle",r[r.mouseWheelScrollSensitivity=66]="mouseWheelScrollSensitivity",r[r.mouseWheelZoom=67]="mouseWheelZoom",r[r.multiCursorMergeOverlapping=68]="multiCursorMergeOverlapping",r[r.multiCursorModifier=69]="multiCursorModifier",r[r.multiCursorPaste=70]="multiCursorPaste",r[r.occurrencesHighlight=71]="occurrencesHighlight",r[r.overviewRulerBorder=72]="overviewRulerBorder",r[r.overviewRulerLanes=73]="overviewRulerLanes",r[r.padding=74]="padding",r[r.parameterHints=75]="parameterHints",r[r.peekWidgetDefaultFocus=76]="peekWidgetDefaultFocus",r[r.definitionLinkOpensInPeek=77]="definitionLinkOpensInPeek",r[r.quickSuggestions=78]="quickSuggestions",r[r.quickSuggestionsDelay=79]="quickSuggestionsDelay",r[r.readOnly=80]="readOnly",r[r.renameOnType=81]="renameOnType",r[r.renderControlCharacters=82]="renderControlCharacters",r[r.renderFinalNewline=83]="renderFinalNewline",r[r.renderLineHighlight=84]="renderLineHighlight",r[r.renderLineHighlightOnlyWhenFocus=85]="renderLineHighlightOnlyWhenFocus",r[r.renderValidationDecorations=86]="renderValidationDecorations",r[r.renderWhitespace=87]="renderWhitespace",r[r.revealHorizontalRightPadding=88]="revealHorizontalRightPadding",r[r.roundedSelection=89]="roundedSelection",r[r.rulers=90]="rulers",r[r.scrollbar=91]="scrollbar",r[r.scrollBeyondLastColumn=92]="scrollBeyondLastColumn",r[r.scrollBeyondLastLine=93]="scrollBeyondLastLine",r[r.scrollPredominantAxis=94]="scrollPredominantAxis",r[r.selectionClipboard=95]="selectionClipboard",r[r.selectionHighlight=96]="selectionHighlight",r[r.selectOnLineNumbers=97]="selectOnLineNumbers",r[r.showFoldingControls=98]="showFoldingControls",r[r.showUnused=99]="showUnused",r[r.snippetSuggestions=100]="snippetSuggestions",r[r.smartSelect=101]="smartSelect",r[r.smoothScrolling=102]="smoothScrolling",r[r.stickyTabStops=103]="stickyTabStops",r[r.stopRenderingLineAfter=104]="stopRenderingLineAfter",r[r.suggest=105]="suggest",r[r.suggestFontSize=106]="suggestFontSize",r[r.suggestLineHeight=107]="suggestLineHeight",r[r.suggestOnTriggerCharacters=108]="suggestOnTriggerCharacters",r[r.suggestSelection=109]="suggestSelection",r[r.tabCompletion=110]="tabCompletion",r[r.tabIndex=111]="tabIndex",r[r.unusualLineTerminators=112]="unusualLineTerminators",r[r.useShadowDOM=113]="useShadowDOM",r[r.useTabStops=114]="useTabStops",r[r.wordSeparators=115]="wordSeparators",r[r.wordWrap=116]="wordWrap",r[r.wordWrapBreakAfterCharacters=117]="wordWrapBreakAfterCharacters",r[r.wordWrapBreakBeforeCharacters=118]="wordWrapBreakBeforeCharacters",r[r.wordWrapColumn=119]="wordWrapColumn",r[r.wordWrapOverride1=120]="wordWrapOverride1",r[r.wordWrapOverride2=121]="wordWrapOverride2",r[r.wrappingIndent=122]="wrappingIndent",r[r.wrappingStrategy=123]="wrappingStrategy",r[r.showDeprecated=124]="showDeprecated",r[r.inlayHints=125]="inlayHints",r[r.editorClassName=126]="editorClassName",r[r.pixelRatio=127]="pixelRatio",r[r.tabFocusMode=128]="tabFocusMode",r[r.layoutInfo=129]="layoutInfo",r[r.wrappingInfo=130]="wrappingInfo"})(eL||(eL={}));var tL;(function(r){r[r.TextDefined=0]="TextDefined",r[r.LF=1]="LF",r[r.CRLF=2]="CRLF"})(tL||(tL={}));var iL;(function(r){r[r.LF=0]="LF",r[r.CRLF=1]="CRLF"})(iL||(iL={}));var nL;(function(r){r[r.None=0]="None",r[r.Indent=1]="Indent",r[r.IndentOutdent=2]="IndentOutdent",r[r.Outdent=3]="Outdent"})(nL||(nL={}));var rL;(function(r){r[r.Other=0]="Other",r[r.Type=1]="Type",r[r.Parameter=2]="Parameter"})(rL||(rL={}));var sL;(function(r){r[r.Automatic=0]="Automatic",r[r.Explicit=1]="Explicit"})(sL||(sL={}));var oL;(function(r){r[r.DependsOnKbLayout=-1]="DependsOnKbLayout",r[r.Unknown=0]="Unknown",r[r.Backspace=1]="Backspace",r[r.Tab=2]="Tab",r[r.Enter=3]="Enter",r[r.Shift=4]="Shift",r[r.Ctrl=5]="Ctrl",r[r.Alt=6]="Alt",r[r.PauseBreak=7]="PauseBreak",r[r.CapsLock=8]="CapsLock",r[r.Escape=9]="Escape",r[r.Space=10]="Space",r[r.PageUp=11]="PageUp",r[r.PageDown=12]="PageDown",r[r.End=13]="End",r[r.Home=14]="Home",r[r.LeftArrow=15]="LeftArrow",r[r.UpArrow=16]="UpArrow",r[r.RightArrow=17]="RightArrow",r[r.DownArrow=18]="DownArrow",r[r.Insert=19]="Insert",r[r.Delete=20]="Delete",r[r.KEY_0=21]="KEY_0",r[r.KEY_1=22]="KEY_1",r[r.KEY_2=23]="KEY_2",r[r.KEY_3=24]="KEY_3",r[r.KEY_4=25]="KEY_4",r[r.KEY_5=26]="KEY_5",r[r.KEY_6=27]="KEY_6",r[r.KEY_7=28]="KEY_7",r[r.KEY_8=29]="KEY_8",r[r.KEY_9=30]="KEY_9",r[r.KEY_A=31]="KEY_A",r[r.KEY_B=32]="KEY_B",r[r.KEY_C=33]="KEY_C",r[r.KEY_D=34]="KEY_D",r[r.KEY_E=35]="KEY_E",r[r.KEY_F=36]="KEY_F",r[r.KEY_G=37]="KEY_G",r[r.KEY_H=38]="KEY_H",r[r.KEY_I=39]="KEY_I",r[r.KEY_J=40]="KEY_J",r[r.KEY_K=41]="KEY_K",r[r.KEY_L=42]="KEY_L",r[r.KEY_M=43]="KEY_M",r[r.KEY_N=44]="KEY_N",r[r.KEY_O=45]="KEY_O",r[r.KEY_P=46]="KEY_P",r[r.KEY_Q=47]="KEY_Q",r[r.KEY_R=48]="KEY_R",r[r.KEY_S=49]="KEY_S",r[r.KEY_T=50]="KEY_T",r[r.KEY_U=51]="KEY_U",r[r.KEY_V=52]="KEY_V",r[r.KEY_W=53]="KEY_W",r[r.KEY_X=54]="KEY_X",r[r.KEY_Y=55]="KEY_Y",r[r.KEY_Z=56]="KEY_Z",r[r.Meta=57]="Meta",r[r.ContextMenu=58]="ContextMenu",r[r.F1=59]="F1",r[r.F2=60]="F2",r[r.F3=61]="F3",r[r.F4=62]="F4",r[r.F5=63]="F5",r[r.F6=64]="F6",r[r.F7=65]="F7",r[r.F8=66]="F8",r[r.F9=67]="F9",r[r.F10=68]="F10",r[r.F11=69]="F11",r[r.F12=70]="F12",r[r.F13=71]="F13",r[r.F14=72]="F14",r[r.F15=73]="F15",r[r.F16=74]="F16",r[r.F17=75]="F17",r[r.F18=76]="F18",r[r.F19=77]="F19",r[r.NumLock=78]="NumLock",r[r.ScrollLock=79]="ScrollLock",r[r.US_SEMICOLON=80]="US_SEMICOLON",r[r.US_EQUAL=81]="US_EQUAL",r[r.US_COMMA=82]="US_COMMA",r[r.US_MINUS=83]="US_MINUS",r[r.US_DOT=84]="US_DOT",r[r.US_SLASH=85]="US_SLASH",r[r.US_BACKTICK=86]="US_BACKTICK",r[r.US_OPEN_SQUARE_BRACKET=87]="US_OPEN_SQUARE_BRACKET",r[r.US_BACKSLASH=88]="US_BACKSLASH",r[r.US_CLOSE_SQUARE_BRACKET=89]="US_CLOSE_SQUARE_BRACKET",r[r.US_QUOTE=90]="US_QUOTE",r[r.OEM_8=91]="OEM_8",r[r.OEM_102=92]="OEM_102",r[r.NUMPAD_0=93]="NUMPAD_0",r[r.NUMPAD_1=94]="NUMPAD_1",r[r.NUMPAD_2=95]="NUMPAD_2",r[r.NUMPAD_3=96]="NUMPAD_3",r[r.NUMPAD_4=97]="NUMPAD_4",r[r.NUMPAD_5=98]="NUMPAD_5",r[r.NUMPAD_6=99]="NUMPAD_6",r[r.NUMPAD_7=100]="NUMPAD_7",r[r.NUMPAD_8=101]="NUMPAD_8",r[r.NUMPAD_9=102]="NUMPAD_9",r[r.NUMPAD_MULTIPLY=103]="NUMPAD_MULTIPLY",r[r.NUMPAD_ADD=104]="NUMPAD_ADD",r[r.NUMPAD_SEPARATOR=105]="NUMPAD_SEPARATOR",r[r.NUMPAD_SUBTRACT=106]="NUMPAD_SUBTRACT",r[r.NUMPAD_DECIMAL=107]="NUMPAD_DECIMAL",r[r.NUMPAD_DIVIDE=108]="NUMPAD_DIVIDE",r[r.KEY_IN_COMPOSITION=109]="KEY_IN_COMPOSITION",r[r.ABNT_C1=110]="ABNT_C1",r[r.ABNT_C2=111]="ABNT_C2",r[r.MAX_VALUE=112]="MAX_VALUE"})(oL||(oL={}));var aL;(function(r){r[r.Hint=1]="Hint",r[r.Info=2]="Info",r[r.Warning=4]="Warning",r[r.Error=8]="Error"})(aL||(aL={}));var lL;(function(r){r[r.Unnecessary=1]="Unnecessary",r[r.Deprecated=2]="Deprecated"})(lL||(lL={}));var cL;(function(r){r[r.Inline=1]="Inline",r[r.Gutter=2]="Gutter"})(cL||(cL={}));var hL;(function(r){r[r.UNKNOWN=0]="UNKNOWN",r[r.TEXTAREA=1]="TEXTAREA",r[r.GUTTER_GLYPH_MARGIN=2]="GUTTER_GLYPH_MARGIN",r[r.GUTTER_LINE_NUMBERS=3]="GUTTER_LINE_NUMBERS",r[r.GUTTER_LINE_DECORATIONS=4]="GUTTER_LINE_DECORATIONS",r[r.GUTTER_VIEW_ZONE=5]="GUTTER_VIEW_ZONE",r[r.CONTENT_TEXT=6]="CONTENT_TEXT",r[r.CONTENT_EMPTY=7]="CONTENT_EMPTY",r[r.CONTENT_VIEW_ZONE=8]="CONTENT_VIEW_ZONE",r[r.CONTENT_WIDGET=9]="CONTENT_WIDGET",r[r.OVERVIEW_RULER=10]="OVERVIEW_RULER",r[r.SCROLLBAR=11]="SCROLLBAR",r[r.OVERLAY_WIDGET=12]="OVERLAY_WIDGET",r[r.OUTSIDE_EDITOR=13]="OUTSIDE_EDITOR"})(hL||(hL={}));var uL;(function(r){r[r.TOP_RIGHT_CORNER=0]="TOP_RIGHT_CORNER",r[r.BOTTOM_RIGHT_CORNER=1]="BOTTOM_RIGHT_CORNER",r[r.TOP_CENTER=2]="TOP_CENTER"})(uL||(uL={}));var dL;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(dL||(dL={}));var fL;(function(r){r[r.Off=0]="Off",r[r.On=1]="On",r[r.Relative=2]="Relative",r[r.Interval=3]="Interval",r[r.Custom=4]="Custom"})(fL||(fL={}));var gL;(function(r){r[r.None=0]="None",r[r.Text=1]="Text",r[r.Blocks=2]="Blocks"})(gL||(gL={}));var pL;(function(r){r[r.Smooth=0]="Smooth",r[r.Immediate=1]="Immediate"})(pL||(pL={}));var mL;(function(r){r[r.Auto=1]="Auto",r[r.Hidden=2]="Hidden",r[r.Visible=3]="Visible"})(mL||(mL={}));var _L;(function(r){r[r.LTR=0]="LTR",r[r.RTL=1]="RTL"})(_L||(_L={}));var bL;(function(r){r[r.Invoke=1]="Invoke",r[r.TriggerCharacter=2]="TriggerCharacter",r[r.ContentChange=3]="ContentChange"})(bL||(bL={}));var vL;(function(r){r[r.File=0]="File",r[r.Module=1]="Module",r[r.Namespace=2]="Namespace",r[r.Package=3]="Package",r[r.Class=4]="Class",r[r.Method=5]="Method",r[r.Property=6]="Property",r[r.Field=7]="Field",r[r.Constructor=8]="Constructor",r[r.Enum=9]="Enum",r[r.Interface=10]="Interface",r[r.Function=11]="Function",r[r.Variable=12]="Variable",r[r.Constant=13]="Constant",r[r.String=14]="String",r[r.Number=15]="Number",r[r.Boolean=16]="Boolean",r[r.Array=17]="Array",r[r.Object=18]="Object",r[r.Key=19]="Key",r[r.Null=20]="Null",r[r.EnumMember=21]="EnumMember",r[r.Struct=22]="Struct",r[r.Event=23]="Event",r[r.Operator=24]="Operator",r[r.TypeParameter=25]="TypeParameter"})(vL||(vL={}));var CL;(function(r){r[r.Deprecated=1]="Deprecated"})(CL||(CL={}));var wL;(function(r){r[r.Hidden=0]="Hidden",r[r.Blink=1]="Blink",r[r.Smooth=2]="Smooth",r[r.Phase=3]="Phase",r[r.Expand=4]="Expand",r[r.Solid=5]="Solid"})(wL||(wL={}));var yL;(function(r){r[r.Line=1]="Line",r[r.Block=2]="Block",r[r.Underline=3]="Underline",r[r.LineThin=4]="LineThin",r[r.BlockOutline=5]="BlockOutline",r[r.UnderlineThin=6]="UnderlineThin"})(yL||(yL={}));var SL;(function(r){r[r.AlwaysGrowsWhenTypingAtEdges=0]="AlwaysGrowsWhenTypingAtEdges",r[r.NeverGrowsWhenTypingAtEdges=1]="NeverGrowsWhenTypingAtEdges",r[r.GrowsOnlyWhenTypingBefore=2]="GrowsOnlyWhenTypingBefore",r[r.GrowsOnlyWhenTypingAfter=3]="GrowsOnlyWhenTypingAfter"})(SL||(SL={}));var LL;(function(r){r[r.None=0]="None",r[r.Same=1]="Same",r[r.Indent=2]="Indent",r[r.DeepIndent=3]="DeepIndent"})(LL||(LL={}));class sp{static chord(e,t){return Mi(e,t)}}sp.CtrlCmd=2048;sp.Shift=1024;sp.Alt=512;sp.WinCtrl=256;function OM(){return{editor:void 0,languages:void 0,CancellationTokenSource:Rn,Emitter:H,KeyCode:oL,KeyMod:sp,Position:$,Range:k,Selection:be,SelectionDirection:_L,MarkerSeverity:aL,MarkerTag:lL,Uri:Ie,Token:tv}}var Gs;(function(r){r.serviceIds=new Map,r.DI_TARGET="$di$target",r.DI_DEPENDENCIES="$di$dependencies";function e(t){return t[r.DI_DEPENDENCIES]||[]}r.getServiceDependencies=e})(Gs||(Gs={}));const ut=bt("instantiationService");function FM(r,e,t,i){e[Gs.DI_TARGET]===e?e[Gs.DI_DEPENDENCIES].push({id:r,index:t,optional:i}):(e[Gs.DI_DEPENDENCIES]=[{id:r,index:t,optional:i}],e[Gs.DI_TARGET]=e)}function bt(r){if(Gs.serviceIds.has(r))return Gs.serviceIds.get(r);const e=function(t,i,n){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");FM(e,t,n,!1)};return e.toString=()=>r,Gs.serviceIds.set(r,e),e}function rj(r){return function(e,t,i){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");FM(r,e,i,!0)}}const Ct=bt("codeEditorService");class gh{constructor(){this._zoomLevel=0,this._lastZoomLevelChangeTime=0,this._onDidChangeZoomLevel=new H,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event,this._zoomFactor=1}getZoomLevel(){return this._zoomLevel}getTimeSinceLastZoomLevelChanged(){return Date.now()-this._lastZoomLevelChangeTime}getZoomFactor(){return this._zoomFactor}getPixelRatio(){let e=document.createElement("canvas").getContext("2d"),t=window.devicePixelRatio||1,i=e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1;return t/i}}gh.INSTANCE=new gh;function xL(){return gh.INSTANCE.getZoomLevel()}function sj(){return gh.INSTANCE.getTimeSinceLastZoomLevelChanged()}function BM(r){return gh.INSTANCE.onDidChangeZoomLevel(r)}function oj(){return gh.INSTANCE.getZoomFactor()}function nv(){return gh.INSTANCE.getPixelRatio()}const op=navigator.userAgent,Mn=op.indexOf("Firefox")>=0,ph=op.indexOf("AppleWebKit")>=0,rv=op.indexOf("Chrome")>=0,Po=!rv&&op.indexOf("Safari")>=0,aj=!rv&&!Po&&ph,ap=op.indexOf("Android")>=0,WM=window.matchMedia&&window.matchMedia("(display-mode: standalone)").matches,sv={clipboard:{writeText:js||document.queryCommandSupported&&document.queryCommandSupported("copy")||!!(navigator&&navigator.clipboard&&navigator.clipboard.writeText),readText:js||!!(navigator&&navigator.clipboard&&navigator.clipboard.readText)},keyboard:(()=>js||WM?0:navigator.keyboard||Po?1:2)(),touch:"ontouchstart"in window||navigator.maxTouchPoints>0,pointerEvents:window.PointerEvent&&("ontouchstart"in window||window.navigator.maxTouchPoints>0||navigator.maxTouchPoints>0)};let VM=new Array(230),kL=new Array(112);(function(){for(let e=0;e<kL.length;e++)kL[e]=-1;function r(e,t){VM[e]=t,kL[t]=e}r(3,7),r(8,1),r(9,2),r(13,3),r(16,4),r(17,5),r(18,6),r(19,7),r(20,8),r(27,9),r(32,10),r(33,11),r(34,12),r(35,13),r(36,14),r(37,15),r(38,16),r(39,17),r(40,18),r(45,19),r(46,20),r(48,21),r(49,22),r(50,23),r(51,24),r(52,25),r(53,26),r(54,27),r(55,28),r(56,29),r(57,30),r(65,31),r(66,32),r(67,33),r(68,34),r(69,35),r(70,36),r(71,37),r(72,38),r(73,39),r(74,40),r(75,41),r(76,42),r(77,43),r(78,44),r(79,45),r(80,46),r(81,47),r(82,48),r(83,49),r(84,50),r(85,51),r(86,52),r(87,53),r(88,54),r(89,55),r(90,56),r(93,58),r(96,93),r(97,94),r(98,95),r(99,96),r(100,97),r(101,98),r(102,99),r(103,100),r(104,101),r(105,102),r(106,103),r(107,104),r(108,105),r(109,106),r(110,107),r(111,108),r(112,59),r(113,60),r(114,61),r(115,62),r(116,63),r(117,64),r(118,65),r(119,66),r(120,67),r(121,68),r(122,69),r(123,70),r(124,71),r(125,72),r(126,73),r(127,74),r(128,75),r(129,76),r(130,77),r(144,78),r(145,79),r(186,80),r(187,81),r(188,82),r(189,83),r(190,84),r(191,85),r(192,86),r(193,110),r(194,111),r(219,87),r(220,88),r(221,89),r(222,90),r(223,91),r(226,92),r(229,109),Mn?(r(59,80),r(107,81),r(109,83),Je&&r(224,57)):ph&&(r(91,57),r(Je?93:92,57))})();function lj(r){if(r.charCode){let e=String.fromCharCode(r.charCode).toUpperCase();return hh.fromString(e)}return VM[r.keyCode]||0}const cj=Je?256:2048,hj=512,uj=1024,dj=Je?2048:256;class ei{constructor(e){this._standardKeyboardEventBrand=!0;let 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.keyCode=lj(t),this.code=t.code,this.ctrlKey=this.ctrlKey||this.keyCode===5,this.altKey=this.altKey||this.keyCode===6,this.shiftKey=this.shiftKey||this.keyCode===4,this.metaKey=this.metaKey||this.keyCode===57,this._asKeybinding=this._computeKeybinding(),this._asRuntimeKeybinding=this._computeRuntimeKeybinding()}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation&&this.browserEvent.stopPropagation()}toKeybinding(){return this._asRuntimeKeybinding}equals(e){return this._asKeybinding===e}_computeKeybinding(){let e=0;this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode);let t=0;return this.ctrlKey&&(t|=cj),this.altKey&&(t|=hj),this.shiftKey&&(t|=uj),this.metaKey&&(t|=dj),t|=e,t}_computeRuntimeKeybinding(){let e=0;return this.keyCode!==5&&this.keyCode!==4&&this.keyCode!==6&&this.keyCode!==57&&(e=this.keyCode),new rp(this.ctrlKey,this.shiftKey,this.altKey,this.metaKey,e)}}let DL=!1,Nd=null;function fj(r){if(!r.parent||r.parent===r)return null;try{let e=r.location,t=r.parent.location;if(e.origin!=="null"&&t.origin!=="null"&&e.origin!==t.origin)return DL=!0,null}catch{return DL=!0,null}return r.parent}class EL{static getSameOriginWindowChain(){if(!Nd){Nd=[];let e=window,t;do t=fj(e),t?Nd.push({window:e,iframeElement:e.frameElement||null}):Nd.push({window:e,iframeElement:null}),e=t;while(e)}return Nd.slice(0)}static hasDifferentOriginAncestor(){return Nd||this.getSameOriginWindowChain(),DL}static getPositionOfChildWindowRelativeToAncestorWindow(e,t){if(!t||e===t)return{top:0,left:0};let i=0,n=0,s=this.getSameOriginWindowChain();for(const o of s){if(i+=o.window.scrollY,n+=o.window.scrollX,o.window===t||!o.iframeElement)break;let a=o.iframeElement.getBoundingClientRect();i+=a.top,n+=a.left}return{top:i,left:n}}}class Gr{constructor(e){this.timestamp=Date.now(),this.browserEvent=e,this.leftButton=e.button===0,this.middleButton=e.button===1,this.rightButton=e.button===2,this.buttons=e.buttons,this.target=e.target,this.detail=e.detail||1,e.type==="dblclick"&&(this.detail=2),this.ctrlKey=e.ctrlKey,this.shiftKey=e.shiftKey,this.altKey=e.altKey,this.metaKey=e.metaKey,typeof e.pageX=="number"?(this.posx=e.pageX,this.posy=e.pageY):(this.posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,this.posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop);let t=EL.getPositionOfChildWindowRelativeToAncestorWindow(self,e.view);this.posx-=t.left,this.posy-=t.top}preventDefault(){this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent.stopPropagation()}}class Td{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){let n=e,s=e;if(typeof n.wheelDeltaY!="undefined")this.deltaY=n.wheelDeltaY/120;else if(typeof s.VERTICAL_AXIS!="undefined"&&s.axis===s.VERTICAL_AXIS)this.deltaY=-s.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?Mn&&!Je?this.deltaY=-e.deltaY/3:this.deltaY=-e.deltaY:this.deltaY=-e.deltaY/40}if(typeof n.wheelDeltaX!="undefined")Po&&Xi?this.deltaX=-(n.wheelDeltaX/120):this.deltaX=n.wheelDeltaX/120;else if(typeof s.HORIZONTAL_AXIS!="undefined"&&s.axis===s.HORIZONTAL_AXIS)this.deltaX=-e.detail/3;else if(e.type==="wheel"){const o=e;o.deltaMode===o.DOM_DELTA_LINE?Mn&&!Je?this.deltaX=-e.deltaX/3:this.deltaX=-e.deltaX:this.deltaX=-e.deltaX/40}this.deltaY===0&&this.deltaX===0&&e.wheelDelta&&(this.deltaY=e.wheelDelta/120)}}preventDefault(){this.browserEvent&&this.browserEvent.preventDefault()}stopPropagation(){this.browserEvent&&this.browserEvent.stopPropagation()}}var gj=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function pj(r){return!!r&&typeof r.then=="function"}function Oi(r){const e=new Rn,t=r(e.token),i=new Promise((n,s)=>{const o=e.token.onCancellationRequested(()=>{o.dispose(),e.dispose(),s(Dd())});Promise.resolve(t).then(a=>{o.dispose(),e.dispose(),n(a)},a=>{o.dispose(),e.dispose(),s(a)})});return new class{cancel(){e.cancel()}then(n,s){return i.then(n,s)}catch(n){return this.then(void 0,n)}finally(n){return i.finally(n)}}}function IL(r,e,t){return Promise.race([r,new Promise(i=>e.onCancellationRequested(()=>i(t)))])}class mj{constructor(){this.activePromise=null,this.queuedPromise=null,this.queuedPromiseFactory=null}queue(e){if(this.activePromise){if(this.queuedPromiseFactory=e,!this.queuedPromise){const t=()=>{this.queuedPromise=null;const i=this.queue(this.queuedPromiseFactory);return this.queuedPromiseFactory=null,i};this.queuedPromise=new Promise(i=>{this.activePromise.then(t,t).then(i)})}return new Promise((t,i)=>{this.queuedPromise.then(t,i)})}return this.activePromise=e(),new Promise((t,i)=>{this.activePromise.then(n=>{this.activePromise=null,t(n)},n=>{this.activePromise=null,i(n)})})}}class Ta{constructor(e){this.defaultDelay=e,this.timeout=null,this.completionPromise=null,this.doResolve=null,this.doReject=null,this.task=null}trigger(e,t=this.defaultDelay){return this.task=e,this.cancelTimeout(),this.completionPromise||(this.completionPromise=new Promise((i,n)=>{this.doResolve=i,this.doReject=n}).then(()=>{if(this.completionPromise=null,this.doResolve=null,this.task){const i=this.task;return this.task=null,i()}})),this.timeout=setTimeout(()=>{this.timeout=null,this.doResolve&&this.doResolve(null)},t),this.completionPromise}isTriggered(){return this.timeout!==null}cancel(){this.cancelTimeout(),this.completionPromise&&(this.doReject&&this.doReject(Dd()),this.completionPromise=null)}cancelTimeout(){this.timeout!==null&&(clearTimeout(this.timeout),this.timeout=null)}dispose(){this.cancel()}}class _j{constructor(e){this.delayer=new Ta(e),this.throttler=new mj}trigger(e,t){return this.delayer.trigger(()=>this.throttler.queue(e),t)}dispose(){this.delayer.dispose()}}function Hl(r,e){return e?new Promise((t,i)=>{const n=setTimeout(()=>{s.dispose(),t()},r),s=e.onCancellationRequested(()=>{clearTimeout(n),s.dispose(),i(Dd())})}):Oi(t=>Hl(r,t))}function mh(r,e=0){const t=setTimeout(r,e);return Xe(()=>clearTimeout(t))}function HM(r,e=i=>!!i,t=null){let i=0;const n=r.length,s=()=>{if(i>=n)return Promise.resolve(t);const o=r[i++];return Promise.resolve(o()).then(l=>e(l)?Promise.resolve(l):s())};return s()}class Xn{constructor(e,t){this._token=-1,typeof e=="function"&&typeof t=="number"&&this.setIfNotSet(e,t)}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearTimeout(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setTimeout(()=>{this._token=-1,e()},t)}setIfNotSet(e,t){this._token===-1&&(this._token=setTimeout(()=>{this._token=-1,e()},t))}}class lp{constructor(){this._token=-1}dispose(){this.cancel()}cancel(){this._token!==-1&&(clearInterval(this._token),this._token=-1)}cancelAndSet(e,t){this.cancel(),this._token=setInterval(()=>{e()},t)}}class Bt{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 this.timeoutToken!==-1}onTimeout(){this.timeoutToken=-1,this.runner&&this.doRun()}doRun(){this.runner&&this.runner()}}let ov;(function(){typeof requestIdleCallback!="function"||typeof cancelIdleCallback!="function"?ov=r=>{const e=setTimeout(()=>{const i=Date.now()+15;r(Object.freeze({didTimeout:!0,timeRemaining(){return Math.max(0,i-Date.now())}}))});let t=!1;return{dispose(){t||(t=!0,clearTimeout(e))}}}:ov=(r,e)=>{const t=requestIdleCallback(r,typeof e=="number"?{timeout:e}:void 0);let i=!1;return{dispose(){i||(i=!0,cancelIdleCallback(t))}}}})();class Ad{constructor(e){this._didRun=!1,this._executor=()=>{try{this._value=e()}catch(t){this._error=t}finally{this._didRun=!0}},this._handle=ov(()=>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}}var NL;(function(r){function e(t){return gj(this,void 0,void 0,function*(){let i;const n=yield Promise.all(t.map(s=>s.then(o=>o,o=>{i||(i=o)})));if(typeof i!="undefined")throw i;return n})}r.settled=e})(NL||(NL={}));var Ze;(function(r){r.inMemory="inmemory",r.vscode="vscode",r.internal="private",r.walkThrough="walkThrough",r.walkThroughSnippet="walkThroughSnippet",r.http="http",r.https="https",r.file="file",r.mailto="mailto",r.untitled="untitled",r.data="data",r.command="command",r.vscodeRemote="vscode-remote",r.vscodeRemoteResource="vscode-remote-resource",r.userData="vscode-userdata",r.vscodeCustomEditor="vscode-custom-editor",r.vscodeNotebook="vscode-notebook",r.vscodeNotebookCell="vscode-notebook-cell",r.vscodeNotebookCellMetadata="vscode-notebook-cell-metadata",r.vscodeNotebookCellOutput="vscode-notebook-cell-output",r.vscodeInteractive="vscode-interactive",r.vscodeInteractiveInput="vscode-interactive-input",r.vscodeSettings="vscode-settings",r.vscodeWorkspaceTrust="vscode-workspace-trust",r.vscodeTerminal="vscode-terminal",r.webviewPanel="webview-panel",r.vscodeWebview="vscode-webview",r.extension="extension",r.vscodeFileResource="vscode-file",r.tmp="tmp"})(Ze||(Ze={}));class bj{constructor(){this._hosts=Object.create(null),this._ports=Object.create(null),this._connectionTokens=Object.create(null),this._preferredWebSchema="http",this._delegate=null}setPreferredWebSchema(e){this._preferredWebSchema=e}rewrite(e){if(this._delegate)return this._delegate(e);const t=e.authority;let i=this._hosts[t];i&&i.indexOf(":")!==-1&&(i=`[${i}]`);const n=this._ports[t],s=this._connectionTokens[t];let o=`path=${encodeURIComponent(e.path)}`;return typeof s=="string"&&(o+=`&tkn=${encodeURIComponent(s)}`),Ie.from({scheme:Sd?this._preferredWebSchema:Ze.vscodeRemoteResource,authority:`${i}:${n}`,path:"/vscode-remote-resource",query:o})}}const zM=new bj;class cp{asBrowserUri(e,t){const i=this.toUri(e,t);return i.scheme===Ze.vscodeRemote?zM.rewrite(i):i.scheme===Ze.file&&(js||typeof wi.importScripts=="function"&&wi.origin===`${Ze.vscodeFileResource}://${cp.FALLBACK_AUTHORITY}`)?i.with({scheme:Ze.vscodeFileResource,authority:i.authority||cp.FALLBACK_AUTHORITY,query:null,fragment:null}):i}toUri(e,t){return Ie.isUri(e)?e:Ie.parse(t.toUrl(e))}}cp.FALLBACK_AUTHORITY="vscode-app";const $M=new cp;function Ui(r){for(;r.firstChild;)r.firstChild.remove()}function TL(r){var e;return(e=r==null?void 0:r.isConnected)!==null&&e!==void 0?e:!1}class vj{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 J(r,e,t,i){return new vj(r,e,t,i)}function UM(r){return function(e){return r(new Gr(e))}}function Cj(r){return function(e){return r(new ei(e))}}let ki=function(e,t,i,n){let s=i;return t==="click"||t==="mousedown"?s=UM(i):(t==="keydown"||t==="keypress"||t==="keyup")&&(s=Cj(i)),J(e,t,s,n)},wj=function(e,t,i){let n=UM(t);return AL(e,n,i)};function AL(r,e,t){return J(r,No&&sv.pointerEvents?Ee.POINTER_DOWN:Ee.MOUSE_DOWN,e,t)}function jM(r,e,t){return J(r,No&&sv.pointerEvents?Ee.POINTER_UP:Ee.MOUSE_UP,e,t)}function RL(r,e){return J(r,"mouseout",t=>{let i=t.relatedTarget;for(;i&&i!==r;)i=i.parentNode;i!==r&&e(t)})}function yj(r,e){return J(r,"pointerout",t=>{let i=t.relatedTarget;for(;i&&i!==r;)i=i.parentNode;i!==r&&e(t)})}let ML=null;function Sj(r){if(!ML){const e=t=>setTimeout(()=>t(new Date().getTime()),0);ML=self.requestAnimationFrame||self.msRequestAnimationFrame||self.webkitRequestAnimationFrame||self.mozRequestAnimationFrame||self.oRequestAnimationFrame||e}return ML.call(self,r)}let KM,Oo;class PL{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(e){Oe(e)}}static sort(e,t){return t.priority-e.priority}}(function(){let r=[],e=null,t=!1,i=!1,n=()=>{for(t=!1,e=r,r=[],i=!0;e.length>0;)e.sort(PL.sort),e.shift().execute();i=!1};Oo=(s,o=0)=>{let a=new PL(s,o);return r.push(a),t||(t=!0,Sj(n)),a},KM=(s,o)=>{if(i){let a=new PL(s,o);return e.push(a),a}else return Oo(s,o)}})();const Lj=8,xj=function(r,e){return e};class kj extends Y{constructor(e,t,i,n=xj,s=Lj){super();let o=null,a=0,l=this._register(new Xn),c=()=>{a=new Date().getTime(),i(o),o=null};this._register(J(e,t,h=>{o=n(o,h);let u=new Date().getTime()-a;u>=s?(l.cancel(),c()):l.setIfNotSet(c,s-u)}))}}function OL(r,e,t,i,n){return new kj(r,e,t,i,n)}function FL(r){return document.defaultView.getComputedStyle(r,null)}function av(r){if(r!==document.body)return new Wt(r.clientWidth,r.clientHeight);if(No&&window.visualViewport)return new Wt(window.visualViewport.width,window.visualViewport.height);if(window.innerWidth&&window.innerHeight)return new Wt(window.innerWidth,window.innerHeight);if(document.body&&document.body.clientWidth&&document.body.clientHeight)return new Wt(document.body.clientWidth,document.body.clientHeight);if(document.documentElement&&document.documentElement.clientWidth&&document.documentElement.clientHeight)return new Wt(document.documentElement.clientWidth,document.documentElement.clientHeight);throw new Error("Unable to figure out browser width and height")}class ri{static convertToPixels(e,t){return parseFloat(t)||0}static getDimension(e,t,i){let n=FL(e),s="0";return n&&(n.getPropertyValue?s=n.getPropertyValue(t):s=n.getAttribute(i)),ri.convertToPixels(e,s)}static getBorderLeftWidth(e){return ri.getDimension(e,"border-left-width","borderLeftWidth")}static getBorderRightWidth(e){return ri.getDimension(e,"border-right-width","borderRightWidth")}static getBorderTopWidth(e){return ri.getDimension(e,"border-top-width","borderTopWidth")}static getBorderBottomWidth(e){return ri.getDimension(e,"border-bottom-width","borderBottomWidth")}static getPaddingLeft(e){return ri.getDimension(e,"padding-left","paddingLeft")}static getPaddingRight(e){return ri.getDimension(e,"padding-right","paddingRight")}static getPaddingTop(e){return ri.getDimension(e,"padding-top","paddingTop")}static getPaddingBottom(e){return ri.getDimension(e,"padding-bottom","paddingBottom")}static getMarginLeft(e){return ri.getDimension(e,"margin-left","marginLeft")}static getMarginTop(e){return ri.getDimension(e,"margin-top","marginTop")}static getMarginRight(e){return ri.getDimension(e,"margin-right","marginRight")}static getMarginBottom(e){return ri.getDimension(e,"margin-bottom","marginBottom")}}class Wt{constructor(e,t){this.width=e,this.height=t}with(e=this.width,t=this.height){return e!==this.width||t!==this.height?new Wt(e,t):this}static is(e){return typeof e=="object"&&typeof e.height=="number"&&typeof e.width=="number"}static lift(e){return e instanceof Wt?e:new Wt(e.width,e.height)}static equals(e,t){return e===t?!0:!e||!t?!1:e.width===t.width&&e.height===t.height}}function qM(r){let e=r.offsetParent,t=r.offsetTop,i=r.offsetLeft;for(;(r=r.parentNode)!==null&&r!==document.body&&r!==document.documentElement;){t-=r.scrollTop;const n=YM(r)?null:FL(r);n&&(i-=n.direction!=="rtl"?r.scrollLeft:-r.scrollLeft),r===e&&(i+=ri.getBorderLeftWidth(r),t+=ri.getBorderTopWidth(r),t+=r.offsetTop,i+=r.offsetLeft,e=r.offsetParent)}return{left:i,top:t}}function Dj(r,e,t){typeof e=="number"&&(r.style.width=`${e}px`),typeof t=="number"&&(r.style.height=`${t}px`)}function Qi(r){let e=r.getBoundingClientRect();return{left:e.left+Aa.scrollX,top:e.top+Aa.scrollY,width:e.width,height:e.height}}const Aa=new class{get scrollX(){return typeof window.scrollX=="number"?window.scrollX:document.body.scrollLeft+document.documentElement.scrollLeft}get scrollY(){return typeof window.scrollY=="number"?window.scrollY:document.body.scrollTop+document.documentElement.scrollTop}};function vs(r){let e=ri.getMarginLeft(r)+ri.getMarginRight(r);return r.offsetWidth+e}function BL(r){let e=ri.getBorderLeftWidth(r)+ri.getBorderRightWidth(r),t=ri.getPaddingLeft(r)+ri.getPaddingRight(r);return r.offsetWidth-e-t}function Ej(r){let e=ri.getBorderTopWidth(r)+ri.getBorderBottomWidth(r),t=ri.getPaddingTop(r)+ri.getPaddingBottom(r);return r.offsetHeight-e-t}function WL(r){let e=ri.getMarginTop(r)+ri.getMarginBottom(r);return r.offsetHeight+e}function Fo(r,e){for(;r;){if(r===e)return!0;r=r.parentNode}return!1}function GM(r,e,t){for(;r&&r.nodeType===r.ELEMENT_NODE;){if(r.classList.contains(e))return r;if(t){if(typeof t=="string"){if(r.classList.contains(t))return null}else if(r===t)return null}r=r.parentNode}return null}function ZM(r,e,t){return!!GM(r,e,t)}function YM(r){return r&&!!r.host&&!!r.mode}function lv(r){return!!_h(r)}function _h(r){for(;r.parentNode;){if(r===document.body)return null;r=r.parentNode}return YM(r)?r:null}function Rd(){let r=document.activeElement;for(;r==null?void 0:r.shadowRoot;)r=r.shadowRoot.activeElement;return r}function Tr(r=document.getElementsByTagName("head")[0]){let e=document.createElement("style");return e.type="text/css",e.media="screen",r.appendChild(e),e}let VL=null;function XM(){return VL||(VL=Tr()),VL}function Ij(r){var e,t;return((e=r==null?void 0:r.sheet)===null||e===void 0?void 0:e.rules)?r.sheet.rules:((t=r==null?void 0:r.sheet)===null||t===void 0?void 0:t.cssRules)?r.sheet.cssRules:[]}function HL(r,e,t=XM()){!t||!e||t.sheet.insertRule(r+"{"+e+"}",0)}function cv(r,e=XM()){if(!e)return;let t=Ij(e),i=[];for(let n=0;n<t.length;n++)t[n].selectorText.indexOf(r)!==-1&&i.push(n);for(let n=i.length-1;n>=0;n--)e.sheet.deleteRule(i[n])}function QM(r){return typeof HTMLElement=="object"?r instanceof HTMLElement:r&&typeof r=="object"&&r.nodeType===1&&typeof r.nodeName=="string"}const Ee={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",CONTEXT_MENU:"contextmenu",WHEEL:"wheel",KEY_DOWN:"keydown",KEY_PRESS:"keypress",KEY_UP:"keyup",LOAD:"load",BEFORE_UNLOAD:"beforeunload",UNLOAD:"unload",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:ph?"webkitAnimationStart":"animationstart",ANIMATION_END:ph?"webkitAnimationEnd":"animationend",ANIMATION_ITERATION:ph?"webkitAnimationIteration":"animationiteration"},St={stop:function(r,e){r.preventDefault?r.preventDefault():r.returnValue=!1,e&&(r.stopPropagation?r.stopPropagation():r.cancelBubble=!0)}};function Nj(r){let e=[];for(let t=0;r&&r.nodeType===r.ELEMENT_NODE;t++)e[t]=r.scrollTop,r=r.parentNode;return e}function Tj(r,e){for(let t=0;r&&r.nodeType===r.ELEMENT_NODE;t++)r.scrollTop!==e[t]&&(r.scrollTop=e[t]),r=r.parentNode}class Aj extends Y{constructor(e){super();this._onDidFocus=this._register(new H),this.onDidFocus=this._onDidFocus.event,this._onDidBlur=this._register(new H),this.onDidBlur=this._onDidBlur.event;let t=Fo(document.activeElement,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=()=>{Fo(document.activeElement,e)!==t&&(t?s():n())},this._register(J(e,Ee.FOCUS,n,!0)),this._register(J(e,Ee.BLUR,s,!0))}}function Md(r){return new Aj(r)}function X(r,...e){if(r.append(...e),e.length===1&&typeof e[0]!="string")return e[0]}function Rj(r,e){return r.insertBefore(e,r.firstChild),e}function zl(r,...e){r.innerText="",X(r,...e)}const Mj=/([\w\-]+)?(#([\w\-]+))?((\.([\w\-]+))*)/;var hp;(function(r){r.HTML="http://www.w3.org/1999/xhtml",r.SVG="http://www.w3.org/2000/svg"})(hp||(hp={}));function JM(r,e,t,...i){let n=Mj.exec(e);if(!n)throw new Error("Bad use of emmet");t=Object.assign({},t||{});let s=n[1]||"div",o;return r!==hp.HTML?o=document.createElementNS(r,s):o=document.createElement(s),n[3]&&(o.id=n[3]),n[4]&&(o.className=n[4].replace(/\./g," ").trim()),Object.keys(t).forEach(a=>{const l=t[a];typeof l!="undefined"&&(/^on\w+$/.test(a)?o[a]=l:a==="selected"?l&&o.setAttribute(a,"true"):o.setAttribute(a,l))}),o.append(...i),o}function oe(r,e,...t){return JM(hp.HTML,r,e,...t)}oe.SVG=function(r,e,...t){return JM(hp.SVG,r,e,...t)};function Ar(...r){for(let e of r)e.style.display="",e.removeAttribute("aria-hidden")}function Qn(...r){for(let e of r)e.style.display="none",e.setAttribute("aria-hidden","true")}function Pj(r){return Array.prototype.slice.call(document.getElementsByTagName(r),0)}function e2(r){const e=window.devicePixelRatio*r;return Math.max(1,Math.floor(e))/window.devicePixelRatio}function t2(r){window.open(r,"_blank","noopener")}function Oj(r){const e=()=>{r(),t=Oo(e)};let t=Oo(e);return Xe(()=>t.dispose())}zM.setPreferredWebSchema(/^https:/.test(window.location.href)?"https":"http");function Ra(r){return r?`url('${$M.asBrowserUri(r).toString(!0).replace(/'/g,"%27")}')`:"url('')"}function i2(r){return`'${r.replace(/'/g,"%27")}'`}class bh extends H{constructor(){super();this._subscriptions=new le,this._keyStatus={altKey:!1,shiftKey:!1,ctrlKey:!1,metaKey:!1},this._subscriptions.add(J(window,"keydown",e=>{if(e.defaultPrevented)return;const t=new ei(e);if(!(t.keyCode===6&&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(t.keyCode!==6)this._keyStatus.lastKeyPressed=void 0;else return;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(J(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(J(document.body,"mousedown",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(J(document.body,"mouseup",()=>{this._keyStatus.lastKeyPressed=void 0},!0)),this._subscriptions.add(J(document.body,"mousemove",e=>{e.buttons&&(this._keyStatus.lastKeyPressed=void 0)},!0)),this._subscriptions.add(J(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 bh.instance||(bh.instance=new bh),bh.instance}dispose(){super.dispose(),this._subscriptions.dispose()}}function Fj(r,e){const t=window.matchMedia(r);typeof t.addEventListener=="function"?t.addEventListener("change",e):t.addListener(e)}function n2(r){return!r||typeof r!="string"?!0:r.trim().length===0}const Bj=/{(\d+)}/g;function gn(r,...e){return e.length===0?r:r.replace(Bj,function(t,i){const n=parseInt(i,10);return isNaN(n)||n<0||n>=e.length?t:e[n]})}function zL(r){return r.replace(/[<>&]/g,function(e){switch(e){case"<":return"<";case">":return">";case"&":return"&";default:return e}})}function Cs(r){return r.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function Wj(r,e=" "){const t=$L(r,e);return r2(t,e)}function $L(r,e){if(!r||!e)return r;const t=e.length;if(t===0||r.length===0)return r;let i=0;for(;r.indexOf(e,i)===i;)i=i+t;return r.substring(i)}function r2(r,e){if(!r||!e)return r;const t=e.length,i=r.length;if(t===0||i===0)return r;let n=i,s=-1;for(;s=r.lastIndexOf(e,n-1),!(s===-1||s+t!==n);){if(s===0)return"";n=s}return r.substring(0,n)}function Vj(r){return r.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Hj(r){return r.replace(/\*/g,"")}function s2(r,e,t={}){if(!r)throw new Error("Cannot create regex from empty string");e||(r=Cs(r)),t.wholeWord&&(/\B/.test(r.charAt(0))||(r="\\b"+r),/\B/.test(r.charAt(r.length-1))||(r=r+"\\b"));let i="";return t.global&&(i+="g"),t.matchCase||(i+="i"),t.multiline&&(i+="m"),t.unicode&&(i+="u"),new RegExp(r,i)}function zj(r){return r.source==="^"||r.source==="^$"||r.source==="$"||r.source==="^\\s*$"?!1:!!(r.exec("")&&r.lastIndex===0)}function UL(r){return(r.global?"g":"")+(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")}function Bo(r){return r.split(/\r\n|\r|\n/)}function dr(r){for(let e=0,t=r.length;e<t;e++){const i=r.charCodeAt(e);if(i!==32&&i!==9)return e}return-1}function Dt(r,e=0,t=r.length){for(let i=e;i<t;i++){const n=r.charCodeAt(i);if(n!==32&&n!==9)return r.substring(e,i)}return r.substring(e,t)}function Wo(r,e=r.length-1){for(let t=e;t>=0;t--){const i=r.charCodeAt(t);if(i!==32&&i!==9)return t}return-1}function up(r,e){return r<e?-1:r>e?1:0}function jL(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){let l=r.charCodeAt(t),c=e.charCodeAt(n);if(l<c)return-1;if(l>c)return 1}const o=i-t,a=s-n;return o<a?-1:o>a?1:0}function KL(r,e){return qL(r,e,0,r.length,0,e.length)}function qL(r,e,t=0,i=r.length,n=0,s=e.length){for(;t<i&&n<s;t++,n++){let l=r.charCodeAt(t),c=e.charCodeAt(n);if(l===c)continue;const h=l-c;if(!(h===32&&Zs(c))&&!(h===-32&&Zs(l)))return Ma(l)&&Ma(c)?h:jL(r.toLowerCase(),e.toLowerCase(),t,i,n,s)}const o=i-t,a=s-n;return o<a?-1:o>a?1:0}function Ma(r){return r>=97&&r<=122}function Zs(r){return r>=65&&r<=90}function o2(r){return Ma(r)||Zs(r)}function dp(r,e){return r.length===e.length&&a2(r,e)}function a2(r,e,t=r.length){for(let i=0;i<t;i++){const n=r.charCodeAt(i),s=e.charCodeAt(i);if(n!==s){if(o2(n)&&o2(s)){const o=Math.abs(n-s);if(o!==0&&o!==32)return!1}else if(String.fromCharCode(n).toLowerCase()!==String.fromCharCode(s).toLowerCase())return!1}}return!0}function GL(r,e){const t=e.length;return e.length>r.length?!1:a2(r,e,t)}function Pd(r,e){let t,i=Math.min(r.length,e.length);for(t=0;t<i;t++)if(r.charCodeAt(t)!==e.charCodeAt(t))return t;return i}function hv(r,e){let t,i=Math.min(r.length,e.length);const n=r.length-1,s=e.length-1;for(t=0;t<i;t++)if(r.charCodeAt(n-t)!==e.charCodeAt(s-t))return t;return i}function ji(r){return 55296<=r&&r<=56319}function Od(r){return 56320<=r&&r<=57343}function ZL(r,e){return(r-55296<<10)+(e-56320)+65536}function Pa(r,e,t){const i=r.charCodeAt(t);if(ji(i)&&t+1<e){const n=r.charCodeAt(t+1);if(Od(n))return ZL(i,n)}return i}function Fd(r,e){const t=r.charCodeAt(e-1);if(Od(t)&&e>1){const i=r.charCodeAt(e-2);if(ji(i))return ZL(i,t)}return t}function uv(r,e){const t=Oa.getInstance(),i=e,n=r.length,s=Pa(r,n,e);e+=s>=65536?2:1;let o=t.getGraphemeBreakType(s);for(;e<n;){const a=Pa(r,n,e),l=t.getGraphemeBreakType(a);if(gp(o,l))break;e+=a>=65536?2:1,o=l}return e-i}function $j(r,e){const t=Oa.getInstance(),i=e,n=Fd(r,e);e-=n>=65536?2:1;let s=t.getGraphemeBreakType(n);for(;e>0;){const o=Fd(r,e),a=t.getGraphemeBreakType(o);if(gp(a,s))break;e-=o>=65536?2:1,s=a}return i-e}const Uj=/(?:[\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-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function dv(r){return Uj.test(r)}const jj=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function Kj(r){return jj.test(r)}const qj=/^[\t\n\r\x20-\x7E]*$/;function YL(r){return qj.test(r)}const l2=/[\u2028\u2029]/;function c2(r){return l2.test(r)}function Gj(r){for(let e=0,t=r.length;e<t;e++)if(Ys(r.charCodeAt(e)))return!0;return!1}function Ys(r){return r=+r,r>=11904&&r<=55215||r>=63744&&r<=64255||r>=65281&&r<=65374}function fp(r){return r>=127462&&r<=127487||r===8986||r===8987||r===9200||r===9203||r>=9728&&r<=10175||r===11088||r===11093||r>=127744&&r<=128591||r>=128640&&r<=128764||r>=128992&&r<=129003||r>=129280&&r<=129535||r>=129648&&r<=129750}const Zj=String.fromCharCode(65279);function XL(r){return!!(r&&r.length>0&&r.charCodeAt(0)===65279)}function Yj(r,e=!1){return r?(e&&(r=r.replace(/\\./g,"")),r.toLowerCase()!==r):!1}function h2(r){const e=90-65+1;return r=r%(2*e),r<e?String.fromCharCode(97+r):String.fromCharCode(65+r-e)}function Bd(r){return Oa.getInstance().getGraphemeBreakType(r)}function gp(r,e){return r===0?e!==5&&e!==7:r===2&&e===3?!1:r===4||r===2||r===3||e===4||e===2||e===3?!0:!(r===8&&(e===8||e===9||e===11||e===12)||(r===11||r===9)&&(e===9||e===10)||(r===12||r===10)&&e===10||e===5||e===13||e===7||r===1||r===13&&e===14||r===6&&e===6)}class Oa{constructor(){this._data=Xj()}static getInstance(){return Oa._INSTANCE||(Oa._INSTANCE=new Oa),Oa._INSTANCE}getGraphemeBreakType(e){if(e<32)return e===10?3:e===13?2:4;if(e<127)return 0;const t=this._data,i=t.length/3;let n=1;for(;n<=i;)if(e<t[3*n])n=2*n;else if(e>t[3*n+1])n=2*n+1;else return t[3*n+2];return 0}}Oa._INSTANCE=null;function Xj(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,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,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,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,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,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,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,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,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,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,2259,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,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,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,6848,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,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,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,9776,9783,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,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,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,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,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Qj(r,e){if(r===0)return 0;const t=Jj(r,e);if(t!==void 0)return t;const i=Fd(e,r);return r-=fv(i),r}function Jj(r,e){let t=Fd(e,r);for(r-=fv(t);eK(t)||t===65039||t===8419;){if(r===0)return;t=Fd(e,r),r-=fv(t)}if(!!fp(t)){if(r>=0){const i=Fd(e,r);i===8205&&(r-=fv(i))}return r}}function fv(r){return r>=65536?2:1}function eK(r){return 127995<=r&&r<=127999}var u2,d2;class tK{constructor(){this._value="",this._pos=0}reset(e){return this._value=e,this._pos=0,this}next(){return this._pos+=1,this}hasNext(){return this._pos<this._value.length-1}cmp(e){const t=e.charCodeAt(0),i=this._value.charCodeAt(this._pos);return t-i}value(){return this._value[this._pos]}}class iK{constructor(e=!0){this._caseSensitive=e}reset(e){return this._value=e,this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++)if(this._value.charCodeAt(this._to)===46)if(e)this._from++;else break;else e=!1;return this}cmp(e){return this._caseSensitive?jL(e,this._value,0,e.length,this._from,this._to):qL(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class nK{constructor(e=!0,t=!0){this._splitOnBackslash=e,this._caseSensitive=t}reset(e){return this._value=e.replace(/\\$|\/$/,""),this._from=0,this._to=0,this.next()}hasNext(){return this._to<this._value.length}next(){this._from=this._to;let e=!0;for(;this._to<this._value.length;this._to++){const t=this._value.charCodeAt(this._to);if(t===47||this._splitOnBackslash&&t===92)if(e)this._from++;else break;else e=!1}return this}cmp(e){return this._caseSensitive?jL(e,this._value,0,e.length,this._from,this._to):qL(e,this._value,0,e.length,this._from,this._to)}value(){return this._value.substring(this._from,this._to)}}class rK{constructor(e){this._ignorePathCasing=e,this._states=[],this._stateIdx=0}reset(e){return this._value=e,this._states=[],this._value.scheme&&this._states.push(1),this._value.authority&&this._states.push(2),this._value.path&&(this._pathIterator=new nK(!1,!this._ignorePathCasing(e)),this._pathIterator.reset(e.path),this._pathIterator.value()&&this._states.push(3)),this._value.query&&this._states.push(4),this._value.fragment&&this._states.push(5),this._stateIdx=0,this}next(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()?this._pathIterator.next():this._stateIdx+=1,this}hasNext(){return this._states[this._stateIdx]===3&&this._pathIterator.hasNext()||this._stateIdx<this._states.length-1}cmp(e){if(this._states[this._stateIdx]===1)return KL(e,this._value.scheme);if(this._states[this._stateIdx]===2)return KL(e,this._value.authority);if(this._states[this._stateIdx]===3)return this._pathIterator.cmp(e);if(this._states[this._stateIdx]===4)return up(e,this._value.query);if(this._states[this._stateIdx]===5)return up(e,this._value.fragment);throw new Error}value(){if(this._states[this._stateIdx]===1)return this._value.scheme;if(this._states[this._stateIdx]===2)return this._value.authority;if(this._states[this._stateIdx]===3)return this._pathIterator.value();if(this._states[this._stateIdx]===4)return this._value.query;if(this._states[this._stateIdx]===5)return this._value.fragment;throw new Error}}class gv{isEmpty(){return!this.left&&!this.mid&&!this.right&&!this.value}}class Wd{constructor(e){this._iter=e}static forUris(e=()=>!1){return new Wd(new rK(e))}static forStrings(){return new Wd(new tK)}static forConfigKeys(){return new Wd(new iK)}clear(){this._root=void 0}set(e,t){const i=this._iter.reset(e);let n;for(this._root||(this._root=new gv,this._root.segment=i.value()),n=this._root;;){const o=i.cmp(n.segment);if(o>0)n.left||(n.left=new gv,n.left.segment=i.value()),n=n.left;else if(o<0)n.right||(n.right=new gv,n.right.segment=i.value()),n=n.right;else if(i.hasNext())i.next(),n.mid||(n.mid=new gv,n.mid.segment=i.value()),n=n.mid;else break}const s=n.value;return n.value=t,n.key=e,s}get(e){var t;return(t=this._getNode(e))===null||t===void 0?void 0:t.value}_getNode(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else break}return i}has(e){const t=this._getNode(e);return!((t==null?void 0:t.value)===void 0&&(t==null?void 0:t.mid)===void 0)}delete(e){return this._delete(e,!1)}deleteSuperstr(e){return this._delete(e,!0)}_delete(e,t){const i=this._iter.reset(e),n=[];let s=this._root;for(;s;){const o=i.cmp(s.segment);if(o>0)n.push([1,s]),s=s.left;else if(o<0)n.push([-1,s]),s=s.right;else if(i.hasNext())i.next(),n.push([0,s]),s=s.mid;else{for(t?(s.left=void 0,s.mid=void 0,s.right=void 0):s.value=void 0;n.length>0&&s.isEmpty();){let[a,l]=n.pop();switch(a){case 1:l.left=void 0;break;case 0:l.mid=void 0;break;case-1:l.right=void 0;break}s=l}break}}}findSubstr(e){const t=this._iter.reset(e);let i=this._root,n;for(;i;){const s=t.cmp(i.segment);if(s>0)i=i.left;else if(s<0)i=i.right;else if(t.hasNext())t.next(),n=i.value||n,i=i.mid;else break}return i&&i.value||n}findSuperstr(e){const t=this._iter.reset(e);let i=this._root;for(;i;){const n=t.cmp(i.segment);if(n>0)i=i.left;else if(n<0)i=i.right;else if(t.hasNext())t.next(),i=i.mid;else return i.mid?this._entries(i.mid):void 0}}forEach(e){for(const[t,i]of this)e(i,t)}*[Symbol.iterator](){yield*this._entries(this._root)}*_entries(e){if(!e)return;const t=[e];for(;t.length>0;){const i=t.pop();i&&(i.value&&(yield[i.key,i.value]),i.left&&t.push(i.left),i.mid&&t.push(i.mid),i.right&&t.push(i.right))}}}class Pn{constructor(e,t){this[u2]="ResourceMap",e instanceof Pn?(this.map=new Map(e.map),this.toKey=t!=null?t:Pn.defaultToKey):(this.map=new Map,this.toKey=e!=null?e:Pn.defaultToKey)}set(e,t){return this.map.set(this.toKey(e),t),this}get(e){return this.map.get(this.toKey(e))}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){typeof t!="undefined"&&(e=e.bind(t));for(let[i,n]of this.map)e(n,Ie.parse(i),this)}values(){return this.map.values()}*keys(){for(let e of this.map.keys())yield Ie.parse(e)}*entries(){for(let e of this.map.entries())yield[Ie.parse(e[0]),e[1]]}*[(u2=Symbol.toStringTag,Symbol.iterator)](){for(let e of this.map)yield[Ie.parse(e[0]),e[1]]}}Pn.defaultToKey=r=>r.toString();class sK{constructor(){this[d2]="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(e=this._head)===null||e===void 0?void 0:e.value}get last(){var e;return(e=this._tail)===null||e===void 0?void 0:e.value}has(e){return this._map.has(e)}get(e,t=0){const i=this._map.get(e);if(!!i)return t!==0&&this.touch(i,t),i.value}set(e,t,i=0){let n=this._map.get(e);if(n)n.value=t,i!==0&&this.touch(n,i);else{switch(n={key:e,value:t,next:void 0,previous:void 0},i){case 0:this.addItemLast(n);break;case 1:this.addItemFirst(n);break;case 2:this.addItemLast(n);break;default:this.addItemLast(n);break}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](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.key,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}values(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:i.value,done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}entries(){const e=this,t=this._state;let i=this._head;const n={[Symbol.iterator](){return n},next(){if(e._state!==t)throw new Error("LinkedMap got modified during iteration.");if(i){const s={value:[i.key,i.value],done:!1};return i=i.next,s}else return{value:void 0,done:!0}}};return n}[(d2=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(e){if(e>=this.size)return;if(e===0){this.clear();return}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)this._tail=e;else if(this._head)e.next=this._head,this._head.previous=e;else throw new Error("Invalid list");this._head=e,this._state++}addItemLast(e){if(!this._head&&!this._tail)this._head=e;else if(this._tail)e.previous=this._tail,this._tail.next=e;else throw new Error("Invalid list");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(!(t!==1&&t!==2)){if(t===1){if(e===this._head)return;const i=e.next,n=e.previous;e===this._tail?(n.next=void 0,this._tail=n):(i.previous=n,n.next=i),e.previous=void 0,e.next=this._head,this._head.previous=e,this._head=e,this._state++}else if(t===2){if(e===this._tail)return;const i=e.next,n=e.previous;e===this._head?(i.previous=void 0,this._head=i):(i.previous=n,n.next=i),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 $l extends sK{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))}}const f2=typeof Buffer!="undefined";let QL;class pv{constructor(e){this.buffer=e,this.byteLength=this.buffer.byteLength}static wrap(e){return f2&&!Buffer.isBuffer(e)&&(e=Buffer.from(e.buffer,e.byteOffset,e.byteLength)),new pv(e)}toString(){return f2?this.buffer.toString():(QL||(QL=new TextDecoder),QL.decode(this.buffer))}}function oK(r,e){return r[e+0]<<0>>>0|r[e+1]<<8>>>0}function aK(r,e,t){r[t+0]=e&255,e=e>>>8,r[t+1]=e&255}function Xs(r,e){return r[e]*Math.pow(2,24)+r[e+1]*Math.pow(2,16)+r[e+2]*Math.pow(2,8)+r[e+3]}function Qs(r,e,t){r[t+3]=e,e=e>>>8,r[t+2]=e,e=e>>>8,r[t+1]=e,e=e>>>8,r[t]=e}function g2(r,e){return r[e]}function p2(r,e,t){r[t]=e}function JL(r){let e=JSON.parse(r);return e=ex(e),e}function ex(r,e=0){if(!r||e>200)return r;if(typeof r=="object"){switch(r.$mid){case 1:return Ie.revive(r);case 2:return new RegExp(r.source,r.flags)}if(r instanceof pv||r instanceof Uint8Array)return r;if(Array.isArray(r))for(let t=0;t<r.length;++t)r[t]=ex(r[t],e+1);else for(const t in r)Object.hasOwnProperty.call(r,t)&&(r[t]=ex(r[t],e+1))}return r}function lK(r){return r.replace(/[\\/]/g,Ni.sep)}function cK(r){return r.indexOf("/")===-1&&(r=lK(r)),/^[a-zA-Z]:(\/|$)/.test(r)&&(r="/"+r),r}function hK(r,e,t,i=fh){if(r===e)return!0;if(!r||!e||e.length>r.length)return!1;if(t){if(!GL(r,e))return!1;if(e.length===r.length)return!0;let s=e.length;return e.charAt(e.length-1)===i&&s--,r.charAt(s)===i}return e.charAt(e.length-1)!==i&&(e+=i),r.indexOf(e)===0}function uK(r){return r>=65&&r<=90||r>=97&&r<=122}function dK(r){const e=HS(r);return Xi?r.length>3?!1:m2(e)&&(r.length===2||e.charCodeAt(2)===92):e===Ni.sep}function m2(r){return Xi?uK(r.charCodeAt(0))&&r.charCodeAt(1)===58:!1}function mv(r){return Jb(r,!0)}class fK{constructor(e){this._ignorePathCasing=e}compare(e,t,i=!1){return e===t?0:up(this.getComparisonKey(e,i),this.getComparisonKey(t,i))}isEqual(e,t,i=!1){return e===t?!0:!e||!t?!1: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()}joinPath(e,...t){return Ie.joinPath(e,...t)}basenameOrAuthority(e){return ws(e)||e.authority}basename(e){return Ni.basename(e.path)}dirname(e){if(e.path.length===0)return e;let t;return e.scheme===Ze.file?t=Ie.file(IM(mv(e))).path:(t=Ni.dirname(e.path),e.authority&&t.length&&t.charCodeAt(0)!==47&&(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 e.scheme===Ze.file?t=Ie.file(HS(mv(e))).path:t=Ni.normalize(e.path),e.with({path:t})}resolvePath(e,t){if(e.scheme===Ze.file){const i=Ie.file(GU(mv(e),t));return e.with({authority:i.authority,path:i.path})}return t=cK(t),e.with({path:Ni.resolve(e.path,t)})}}const Jn=new fK(()=>!1),_2=Jn.isEqual.bind(Jn),b2=Jn.basenameOrAuthority.bind(Jn),ws=Jn.basename.bind(Jn),tx=Jn.dirname.bind(Jn),gK=Jn.joinPath.bind(Jn),pK=Jn.normalizePath.bind(Jn),v2=Jn.resolvePath.bind(Jn);var Ul;(function(r){r.META_DATA_LABEL="label",r.META_DATA_DESCRIPTION="description",r.META_DATA_SIZE="size",r.META_DATA_MIME="mime";function e(t){const i=new Map;t.path.substring(t.path.indexOf(";")+1,t.path.lastIndexOf(";")).split(";").forEach(o=>{const[a,l]=o.split(":");a&&l&&i.set(a,l)});const s=t.path.substring(0,t.path.indexOf(";"));return s&&i.set(r.META_DATA_MIME,s),i}r.parseMetaData=e})(Ul||(Ul={}));function C2(r){return Array.isArray(r)}function ys(r){return typeof r=="string"}function er(r){return typeof r=="object"&&r!==null&&!Array.isArray(r)&&!(r instanceof RegExp)&&!(r instanceof Date)}function vh(r){return typeof r=="number"&&!isNaN(r)}function w2(r){return r===!0||r===!1}function On(r){return typeof r=="undefined"}function Zr(r){return On(r)||r===null}function Nt(r,e){if(!r)throw new Error(e?`Unexpected type, expected '${e}'`:"Unexpected type")}function _v(r){if(Zr(r))throw new Error("Assertion Failed: argument is undefined or null");return r}function pp(r){return typeof r=="function"}function mK(r,e){const t=Math.min(r.length,e.length);for(let i=0;i<t;i++)_K(r[i],e[i])}function _K(r,e){if(ys(e)){if(typeof r!==e)throw new Error(`argument does not match constraint: typeof ${e}`)}else if(pp(e)){try{if(r instanceof e)return}catch{}if(!Zr(r)&&r.constructor===e||e.length===1&&e.call(void 0,r)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function bK(r){let e=[],t=Object.getPrototypeOf(r);for(;Object.prototype!==t;)e=e.concat(Object.getOwnPropertyNames(t)),t=Object.getPrototypeOf(t);return e}function ix(r){const e=[];for(const t of bK(r))typeof r[t]=="function"&&e.push(t);return e}function y2(r,e){const t=n=>function(){const s=Array.prototype.slice.call(arguments,0);return e(n,s)};let i={};for(const n of r)i[n]=t(n);return i}function Rr(r){return r===null?void 0:r}function vK(r,e="Unreachable"){throw new Error(e)}const fi=bt("commandService"),lt=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new H,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(r,e){if(!r)throw new Error("invalid command");if(typeof r=="string"){if(!e)throw new Error("invalid command");return this.registerCommand({id:r,handler:e})}if(r.description){const o=[];for(let l of r.description.args)o.push(l.constraint);const a=r.handler;r.handler=function(l,...c){return mK(c,o),a(l,...c)}}const{id:t}=r;let i=this._commands.get(t);i||(i=new Ir,this._commands.set(t,i));let n=i.unshift(r),s=Xe(()=>{n();const o=this._commands.get(t);(o==null?void 0:o.isEmpty())&&this._commands.delete(t)});return this._onDidRegisterCommand.fire(t),s}registerCommandAlias(r,e){return lt.registerCommand(r,(t,...i)=>t.get(fi).executeCommand(e,...i))}getCommand(r){const e=this._commands.get(r);if(!(!e||e.isEmpty()))return at.first(e)}getCommands(){const r=new Map;for(const e of this._commands.keys()){const t=this.getCommand(e);t&&r.set(e,t)}return r}};lt.registerCommand("noop",()=>{});var bv;(function(r){r[r.API=0]="API",r[r.USER=1]="USER"})(bv||(bv={}));var S2=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Js=bt("openerService"),CK=Object.freeze({_serviceBrand:void 0,registerOpener(){return Y.None},registerValidator(){return Y.None},registerExternalUriResolver(){return Y.None},setDefaultExternalOpener(){},registerExternalOpener(){return Y.None},open(){return S2(this,void 0,void 0,function*(){return!1})},resolveExternalUri(r){return S2(this,void 0,void 0,function*(){return{resolved:r,dispose(){}}})}});function Vd(r,e){return Ie.isUri(r)?dp(r.scheme,e):GL(r,e+":")}var nx=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vv=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Ch=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let rx=class{constructor(e){this._commandService=e}open(e,t){return Ch(this,void 0,void 0,function*(){if(!Vd(e,Ze.command))return!1;if(!(t==null?void 0:t.allowCommands))return!0;typeof e=="string"&&(e=Ie.parse(e));let i=[];try{i=JL(decodeURIComponent(e.query))}catch{try{i=JL(e.query)}catch{}}return Array.isArray(i)||(i=[i]),yield this._commandService.executeCommand(e.path,...i),!0})}};rx=nx([vv(0,fi)],rx);let sx=class{constructor(e){this._editorService=e}open(e,t){return Ch(this,void 0,void 0,function*(){typeof e=="string"&&(e=Ie.parse(e));let i;const n=/^L?(\d+)(?:,(\d+))?/.exec(e.fragment);return n&&(i={startLineNumber:parseInt(n[1]),startColumn:n[2]?parseInt(n[2]):1},e=e.with({fragment:""})),e.scheme===Ze.file&&(e=pK(e)),yield this._editorService.openCodeEditor({resource:e,options:Object.assign({selection:i,context:(t==null?void 0:t.fromUserGesture)?bv.USER:bv.API},t==null?void 0:t.editorOptions)},this._editorService.getFocusedCodeEditor(),t==null?void 0:t.openToSide),!0})}};sx=nx([vv(0,Ct)],sx);let ox=class{constructor(e,t){this._openers=new Ir,this._validators=new Ir,this._resolvers=new Ir,this._resolvedUriTargets=new Pn(i=>i.with({path:null,fragment:null,query:null}).toString()),this._externalOpeners=new Ir,this._defaultExternalOpener={openExternal:i=>Ch(this,void 0,void 0,function*(){return Vd(i,Ze.http)||Vd(i,Ze.https)?t2(i):window.location.href=i,!0})},this._openers.push({open:(i,n)=>Ch(this,void 0,void 0,function*(){return(n==null?void 0:n.openExternal)||Vd(i,Ze.mailto)||Vd(i,Ze.http)||Vd(i,Ze.https)?(yield this._doOpenExternal(i,n),!0):!1})}),this._openers.push(new rx(t)),this._openers.push(new sx(e))}registerOpener(e){return{dispose:this._openers.unshift(e)}}registerValidator(e){return{dispose:this._validators.push(e)}}registerExternalUriResolver(e){return{dispose:this._resolvers.push(e)}}setDefaultExternalOpener(e){this._defaultExternalOpener=e}registerExternalOpener(e){return{dispose:this._externalOpeners.push(e)}}open(e,t){var i;return Ch(this,void 0,void 0,function*(){const n=typeof e=="string"?Ie.parse(e):e,s=(i=this._resolvedUriTargets.get(n))!==null&&i!==void 0?i:e;for(const o of this._validators)if(!(yield o.shouldOpen(s)))return!1;for(const o of this._openers)if(yield o.open(e,t))return!0;return!1})}resolveExternalUri(e,t){return Ch(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{}throw new Error("Could not resolve external URI: "+e.toString())})}_doOpenExternal(e,t){return Ch(this,void 0,void 0,function*(){const i=typeof e=="string"?Ie.parse(e):e;let n;try{n=(yield this.resolveExternalUri(i,t)).resolved}catch{n=i}let s;if(typeof e=="string"&&i.toString()===n.toString()?s=e:s=encodeURI(n.toString(!0)),t==null?void 0:t.allowContributedOpeners){const o=typeof(t==null?void 0:t.allowContributedOpeners)=="string"?t==null?void 0:t.allowContributedOpeners:void 0;for(const a of this._externalOpeners)if(yield a.openExternal(s,{sourceUri:i,preferredOpenerId:o},et.None))return!0}return this._defaultExternalOpener.openExternal(s,{sourceUri:i},et.None)})}dispose(){this._validators.clear()}};ox=nx([vv(0,Ct),vv(1,fi)],ox);function Cv(r,e){if(!r)throw new Error(e?`Assertion failed (${e})`:"Assertion Failed")}function jl(r){if(!r||typeof r!="object"||r instanceof RegExp)return r;const e=Array.isArray(r)?[]:{};return Object.keys(r).forEach(t=>{r[t]&&typeof r[t]=="object"?e[t]=jl(r[t]):e[t]=r[t]}),e}function wK(r){if(!r||typeof r!="object")return r;const e=[r];for(;e.length>0;){const t=e.shift();Object.freeze(t);for(const i in t)if(L2.call(t,i)){const n=t[i];typeof n=="object"&&!Object.isFrozen(n)&&e.push(n)}}return r}const L2=Object.prototype.hasOwnProperty;function yK(r,e){return ax(r,e,new Set)}function ax(r,e,t){if(Zr(r))return r;const i=e(r);if(typeof i!="undefined")return i;if(C2(r)){const n=[];for(const s of r)n.push(ax(s,e,t));return n}if(er(r)){if(t.has(r))throw new Error("Cannot clone recursive data-structure");t.add(r);const n={};for(let s in r)L2.call(r,s)&&(n[s]=ax(r[s],e,t));return t.delete(r),n}return r}function eo(r,e,t=!0){return er(r)?(er(e)&&Object.keys(e).forEach(i=>{i in r?t&&(er(r[i])&&er(e[i])?eo(r[i],e[i],t):r[i]=e[i]):r[i]=e[i]}),r):e}function to(r,e){if(r===e)return!0;if(r==null||e===null||e===void 0||typeof r!=typeof e||typeof r!="object"||Array.isArray(r)!==Array.isArray(e))return!1;let t,i;if(Array.isArray(r)){if(r.length!==e.length)return!1;for(t=0;t<r.length;t++)if(!to(r[t],e[t]))return!1}else{const n=[];for(i in r)n.push(i);n.sort();const s=[];for(i in e)s.push(i);if(s.sort(),!to(n,s))return!1;for(t=0;t<n.length;t++)if(!to(r[n[t]],e[n[t]]))return!1}return!0}function Vo(r,e,t){const i=e(r);return typeof i=="undefined"?t:i}const SK={followsCaret:!0,ignoreCharChanges:!0,alwaysRevealFirst:!0};class LK extends Y{constructor(e,t={}){super();this._onDidUpdate=this._register(new H),this._editor=e,this._options=eo(t,SK,!1),this.disposed=!1,this.nextIdx=-1,this.ranges=[],this.ignoreSelectionChange=!1,this.revealFirst=Boolean(this._options.alwaysRevealFirst),this._register(this._editor.onDidDispose(()=>this.dispose())),this._register(this._editor.onDidUpdateDiff(()=>this._onDiffUpdated())),this._options.followsCaret&&this._register(this._editor.getModifiedEditor().onDidChangeCursorPosition(i=>{this.ignoreSelectionChange||(this.nextIdx=-1)})),this._options.alwaysRevealFirst&&this._register(this._editor.getModifiedEditor().onDidChangeModel(i=>{this.revealFirst=!0})),this._init()}_init(){!!this._editor.getLineChanges()}_onDiffUpdated(){this._init(),this._compute(this._editor.getLineChanges()),this.revealFirst&&this._editor.getLineChanges()!==null&&(this.revealFirst=!1,this.nextIdx=-1,this.next(1))}_compute(e){this.ranges=[],e&&e.forEach(t=>{!this._options.ignoreCharChanges&&t.charChanges?t.charChanges.forEach(i=>{this.ranges.push({rhs:!0,range:new k(i.modifiedStartLineNumber,i.modifiedStartColumn,i.modifiedEndLineNumber,i.modifiedEndColumn)})}):this.ranges.push({rhs:!0,range:new k(t.modifiedStartLineNumber,1,t.modifiedStartLineNumber,1)})}),this.ranges.sort((t,i)=>t.range.getStartPosition().isBeforeOrEqual(i.range.getStartPosition())?-1:i.range.getStartPosition().isBeforeOrEqual(t.range.getStartPosition())?1:0),this._onDidUpdate.fire(this)}_initIdx(e){let t=!1,i=this._editor.getPosition();if(!i){this.nextIdx=0;return}for(let n=0,s=this.ranges.length;n<s&&!t;n++){let o=this.ranges[n].range;i.isBeforeOrEqual(o.getStartPosition())&&(this.nextIdx=n+(e?0:-1),t=!0)}t||(this.nextIdx=e?0:this.ranges.length-1),this.nextIdx<0&&(this.nextIdx=this.ranges.length-1)}_move(e,t){if(Cv(!this.disposed,"Illegal State - diff navigator has been disposed"),!this.canNavigate())return;this.nextIdx===-1?this._initIdx(e):e?(this.nextIdx+=1,this.nextIdx>=this.ranges.length&&(this.nextIdx=0)):(this.nextIdx-=1,this.nextIdx<0&&(this.nextIdx=this.ranges.length-1));let i=this.ranges[this.nextIdx];this.ignoreSelectionChange=!0;try{let n=i.range.getStartPosition();this._editor.setPosition(n),this._editor.revealPositionInCenter(n,t)}finally{this.ignoreSelectionChange=!1}}canNavigate(){return this.ranges&&this.ranges.length>0}next(e=0){this._move(!0,e)}previous(e=0){this._move(!1,e)}dispose(){super.dispose(),this.ranges=[],this.disposed=!0}}const Fa=new class{constructor(){this._zoomLevel=0,this._onDidChangeZoomLevel=new H,this.onDidChangeZoomLevel=this._onDidChangeZoomLevel.event}getZoomLevel(){return this._zoomLevel}setZoomLevel(r){r=Math.min(Math.max(-5,r),20),this._zoomLevel!==r&&(this._zoomLevel=r,this._onDidChangeZoomLevel.fire(this._zoomLevel))}},xK=Je?1.5:1.35,lx=8;class wh{constructor(e){this._bareFontInfoBrand=void 0,this.zoomLevel=e.zoomLevel,this.pixelRatio=e.pixelRatio,this.fontFamily=String(e.fontFamily),this.fontWeight=String(e.fontWeight),this.fontSize=e.fontSize,this.fontFeatureSettings=e.fontFeatureSettings,this.lineHeight=e.lineHeight|0,this.letterSpacing=e.letterSpacing}static createFromValidatedSettings(e,t,i,n){const s=e.get(42),o=e.get(46),a=e.get(45),l=e.get(44),c=e.get(58),h=e.get(55);return wh._create(s,o,a,l,c,h,t,i,n)}static _create(e,t,i,n,s,o,a,l,c){s===0?s=xK*i:s<lx&&(s=s*i),s=Math.round(s),s<lx&&(s=lx);const h=1+(c?0:Fa.getZoomLevel()*.1);return i*=h,s*=h,new wh({zoomLevel:a,pixelRatio:l,fontFamily:e,fontWeight:t,fontSize:i,fontFeatureSettings:n,lineHeight:s,letterSpacing:o})}getId(){return this.zoomLevel+"-"+this.pixelRatio+"-"+this.fontFamily+"-"+this.fontWeight+"-"+this.fontSize+"-"+this.fontFeatureSettings+"-"+this.lineHeight+"-"+this.letterSpacing}getMassagedFontFamily(e){const t=wh._wrapInQuotes(this.fontFamily);return e&&this.fontFamily!==e?`${t}, ${e}`:t}static _wrapInQuotes(e){return/[,"']/.test(e)?e:/[+ ]/.test(e)?`"${e}"`:e}}const kK=1;class cx extends wh{constructor(e,t){super(e);this._editorStylingBrand=void 0,this.version=kK,this.isTrusted=t,this.isMonospace=e.isMonospace,this.typicalHalfwidthCharacterWidth=e.typicalHalfwidthCharacterWidth,this.typicalFullwidthCharacterWidth=e.typicalFullwidthCharacterWidth,this.canUseHalfwidthRightwardsArrow=e.canUseHalfwidthRightwardsArrow,this.spaceWidth=e.spaceWidth,this.middotWidth=e.middotWidth,this.wsmiddotWidth=e.wsmiddotWidth,this.maxDigitWidth=e.maxDigitWidth}equals(e){return this.fontFamily===e.fontFamily&&this.fontWeight===e.fontWeight&&this.fontSize===e.fontSize&&this.fontFeatureSettings===e.fontFeatureSettings&&this.lineHeight===e.lineHeight&&this.letterSpacing===e.letterSpacing&&this.typicalHalfwidthCharacterWidth===e.typicalHalfwidthCharacterWidth&&this.typicalFullwidthCharacterWidth===e.typicalFullwidthCharacterWidth&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.spaceWidth===e.spaceWidth&&this.middotWidth===e.middotWidth&&this.wsmiddotWidth===e.wsmiddotWidth&&this.maxDigitWidth===e.maxDigitWidth}}function DK(r){return r&&typeof r.id=="string"}const mp={ICodeEditor:"vs.editor.ICodeEditor",IDiffEditor:"vs.editor.IDiffEditor"};var Mr;(function(r){r[r.Left=1]="Left",r[r.Center=2]="Center",r[r.Right=4]="Right",r[r.Full=7]="Full"})(Mr||(Mr={}));var Yr;(function(r){r[r.Inline=1]="Inline",r[r.Gutter=2]="Gutter"})(Yr||(Yr={}));class wv{constructor(e){this._textModelResolvedOptionsBrand=void 0,this.tabSize=Math.max(1,e.tabSize|0),this.indentSize=e.tabSize|0,this.insertSpaces=Boolean(e.insertSpaces),this.defaultEOL=e.defaultEOL|0,this.trimAutoWhitespace=Boolean(e.trimAutoWhitespace),this.bracketPairColorizationOptions=e.bracketPairColorizationOptions}equals(e){return this.tabSize===e.tabSize&&this.indentSize===e.indentSize&&this.insertSpaces===e.insertSpaces&&this.defaultEOL===e.defaultEOL&&this.trimAutoWhitespace===e.trimAutoWhitespace&&to(this.bracketPairColorizationOptions,e.bracketPairColorizationOptions)}createChangeEvent(e){return{tabSize:this.tabSize!==e.tabSize,indentSize:this.indentSize!==e.indentSize,insertSpaces:this.insertSpaces!==e.insertSpaces,trimAutoWhitespace:this.trimAutoWhitespace!==e.trimAutoWhitespace}}}class _p{constructor(e,t){this._findMatchBrand=void 0,this.range=e,this.matches=t}}class x2{constructor(e,t){this.visibleColumn=e,this.className=t}}class EK{constructor(e,t,i,n){this.range=e,this.openingBracketRange=t,this.closingBracketRange=i,this.nestingLevel=n}}class hx{constructor(e,t,i,n,s,o){this.identifier=e,this.range=t,this.text=i,this.forceMoveMarkers=n,this.isAutoWhitespaceEdit=s,this._isTracked=o}}class IK{constructor(e,t,i){this.reverseEdits=e,this.changes=t,this.trimAutoWhitespaceLineNumbers=i}}function ux(r){return yv(r,0)}function yv(r,e){switch(typeof r){case"object":return r===null?Ba(349,e):Array.isArray(r)?TK(r,e):AK(r,e);case"string":return dx(r,e);case"boolean":return NK(r,e);case"number":return Ba(r,e);case"undefined":return Ba(937,e);default:return Ba(617,e)}}function Ba(r,e){return(e<<5)-e+r|0}function NK(r,e){return Ba(r?433:863,e)}function dx(r,e){e=Ba(149417,e);for(let t=0,i=r.length;t<i;t++)e=Ba(r.charCodeAt(t),e);return e}function TK(r,e){return e=Ba(104579,e),r.reduce((t,i)=>yv(i,t),e)}function AK(r,e){return e=Ba(181387,e),Object.keys(r).sort().reduce((t,i)=>(t=dx(i,t),yv(r[i],t)),e)}function fx(r,e,t=32){const i=t-e,n=~((1<<i)-1);return(r<<e|(n&r)>>>i)>>>0}function k2(r,e=0,t=r.byteLength,i=0){for(let n=0;n<t;n++)r[e+n]=i}function RK(r,e,t="0"){for(;r.length<e;)r=t+r;return r}function bp(r,e=32){return r instanceof ArrayBuffer?Array.from(new Uint8Array(r)).map(t=>t.toString(16).padStart(2,"0")).join(""):RK((r>>>0).toString(16),e/4)}class Sv{constructor(){this._h0=1732584193,this._h1=4023233417,this._h2=2562383102,this._h3=271733878,this._h4=3285377520,this._buff=new Uint8Array(64+3),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(t===0)return;const i=this._buff;let n=this._buffLen,s=this._leftoverHighSurrogate,o,a;for(s!==0?(o=s,a=-1,s=0):(o=e.charCodeAt(0),a=0);;){let l=o;if(ji(o))if(a+1<t){const c=e.charCodeAt(a+1);Od(c)?(a++,l=ZL(o,c)):l=65533}else{s=o;break}else Od(o)&&(l=65533);if(n=this._push(i,n,l),a++,a<t)o=e.charCodeAt(a);else break}this._buffLen=n,this._leftoverHighSurrogate=s}_push(e,t,i){return i<128?e[t++]=i:i<2048?(e[t++]=192|(i&1984)>>>6,e[t++]=128|(i&63)>>>0):i<65536?(e[t++]=224|(i&61440)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0):(e[t++]=240|(i&1835008)>>>18,e[t++]=128|(i&258048)>>>12,e[t++]=128|(i&4032)>>>6,e[t++]=128|(i&63)>>>0),t>=64&&(this._step(),t-=64,this._totalLen+=64,e[0]=e[64+0],e[1]=e[64+1],e[2]=e[64+2]),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()),bp(this._h0)+bp(this._h1)+bp(this._h2)+bp(this._h3)+bp(this._h4)}_wrapUp(){this._buff[this._buffLen++]=128,k2(this._buff,this._buffLen),this._buffLen>56&&(this._step(),k2(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=Sv._bigBlock32,t=this._buffDV;for(let u=0;u<64;u+=4)e.setUint32(u,t.getUint32(u,!1),!1);for(let u=64;u<320;u+=4)e.setUint32(u,fx(e.getUint32(u-12,!1)^e.getUint32(u-32,!1)^e.getUint32(u-56,!1)^e.getUint32(u-64,!1),1),!1);let i=this._h0,n=this._h1,s=this._h2,o=this._h3,a=this._h4,l,c,h;for(let u=0;u<80;u++)u<20?(l=n&s|~n&o,c=1518500249):u<40?(l=n^s^o,c=1859775393):u<60?(l=n&s|n&o|s&o,c=2400959708):(l=n^s^o,c=3395469782),h=fx(i,5)+l+a+c+e.getUint32(u*4,!1)&4294967295,a=o,o=s,s=fx(n,30),n=i,i=h;this._h0=this._h0+i&4294967295,this._h1=this._h1+n&4294967295,this._h2=this._h2+s&4294967295,this._h3=this._h3+o&4294967295,this._h4=this._h4+a&4294967295}}Sv._bigBlock32=new DataView(new ArrayBuffer(320));function Ss(r,e,t){return Math.min(Math.max(r,e),t)}class MK{constructor(){this._n=1,this._val=0}update(e){return this._val=this._val+(e-this._val)/this._n,this._n+=1,this}get value(){return this._val}}const gx="**",D2="/",Lv="[/\\\\]",xv="[^/\\\\]",PK=/\//g;function E2(r){switch(r){case 0:return"";case 1:return`${xv}*?`;default:return`(?:${Lv}|${xv}+${Lv}|${Lv}${xv}+)*?`}}function I2(r,e){if(!r)return[];const t=[];let i=!1,n=!1,s="";for(const o of r){switch(o){case e:if(!i&&!n){t.push(s),s="";continue}break;case"{":i=!0;break;case"}":i=!1;break;case"[":n=!0;break;case"]":n=!1;break}s+=o}return s&&t.push(s),t}function N2(r){if(!r)return"";let e="";const t=I2(r,D2);if(t.every(i=>i===gx))e=".*";else{let i=!1;t.forEach((n,s)=>{if(n===gx){i||(e+=E2(2),i=!0);return}let o=!1,a="",l=!1,c="";for(const h of n){if(h!=="}"&&o){a+=h;continue}if(l&&(h!=="]"||!c)){let u;h==="-"?u=h:(h==="^"||h==="!")&&!c?u="^":h===D2?u="":u=Cs(h),c+=u;continue}switch(h){case"{":o=!0;continue;case"[":l=!0;continue;case"}":e+=`(?:${I2(a,",").map(f=>N2(f)).join("|")})`,o=!1,a="";break;case"]":e+="["+c+"]",l=!1,c="";break;case"?":e+=xv;continue;case"*":e+=E2(1);continue;default:e+=Cs(h)}}s<t.length-1&&(t[s+1]!==gx||s+2<t.length)&&(e+=Lv),i=!1})}return e}const OK=/^\*\*\/\*\.[\w\.-]+$/,FK=/^\*\*\/([\w\.-]+)\/?$/,BK=/^{\*\*\/[\*\.]?[\w\.-]+\/?(,\*\*\/[\*\.]?[\w\.-]+\/?)*}$/,WK=/^{\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?(,\*\*\/[\*\.]?[\w\.-]+(\/(\*\*)?)?)*}$/,VK=/^\*\*((\/[\w\.-]+)+)\/?$/,HK=/^([\w\.-]+(\/[\w\.-]+)*)\/?$/,T2=new $l(1e4),A2=function(){return!1},Ho=function(){return null};function px(r,e){if(!r)return Ho;let t;typeof r!="string"?t=r.pattern:t=r,t=t.trim();const i=`${t}_${!!e.trimForExclusions}`;let n=T2.get(i);if(n)return R2(n,r);let s;if(OK.test(t)){const o=t.substr(4);n=function(a,l){return typeof a=="string"&&a.endsWith(o)?t:null}}else(s=FK.exec(mx(t,e)))?n=zK(s[1],t):(e.trimForExclusions?WK:BK).test(t)?n=$K(t,e):(s=VK.exec(mx(t,e)))?n=M2(s[1].substr(1),t,!0):(s=HK.exec(mx(t,e)))?n=M2(s[1],t,!1):n=UK(t);return T2.set(i,n),R2(n,r)}function R2(r,e){return typeof e=="string"?r:function(t,i){return hK(t,e.base)?r(ZU(e.base,t),i):null}}function mx(r,e){return e.trimForExclusions&&r.endsWith("/**")?r.substr(0,r.length-2):r}function zK(r,e){const t=`/${r}`,i=`\\${r}`,n=function(o,a){return typeof o!="string"?null:a?a===r?e:null:o===r||o.endsWith(t)||o.endsWith(i)?e:null},s=[r];return n.basenames=s,n.patterns=[e],n.allBasenames=s,n}function $K(r,e){const t=O2(r.slice(1,-1).split(",").map(a=>px(a,e)).filter(a=>a!==Ho),r),i=t.length;if(!i)return Ho;if(i===1)return t[0];const n=function(a,l){for(let c=0,h=t.length;c<h;c++)if(t[c](a,l))return r;return null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(n.allPaths=o),n}function M2(r,e,t){const i=fh===Ni.sep,n=i?r:r.replace(PK,fh),s=fh+n,o=Ni.sep+r,a=t?function(l,c){return typeof l=="string"&&(l===n||l.endsWith(s)||!i&&(l===r||l.endsWith(o)))?e:null}:function(l,c){return typeof l=="string"&&(l===n||!i&&l===r)?e:null};return a.allPaths=[(t?"*/":"./")+r],a}function UK(r){try{const e=new RegExp(`^${N2(r)}$`);return function(t){return e.lastIndex=0,typeof t=="string"&&e.test(t)?r:null}}catch{return Ho}}function jK(r,e,t){return!r||typeof e!="string"?!1:P2(r)(e,void 0,t)}function P2(r,e={}){if(!r)return A2;if(typeof r=="string"||KK(r)){const t=px(r,e);if(t===Ho)return A2;const i=function(n,s){return!!t(n,s)};return t.allBasenames&&(i.allBasenames=t.allBasenames),t.allPaths&&(i.allPaths=t.allPaths),i}return qK(r,e)}function KK(r){const e=r;return e&&typeof e.base=="string"&&typeof e.pattern=="string"}function qK(r,e){const t=O2(Object.getOwnPropertyNames(r).map(a=>GK(a,r[a],e)).filter(a=>a!==Ho)),i=t.length;if(!i)return Ho;if(!t.some(a=>!!a.requiresSiblings)){if(i===1)return t[0];const a=function(h,u){for(let d=0,f=t.length;d<f;d++){const g=t[d](h,u);if(g)return g}return null},l=t.find(h=>!!h.allBasenames);l&&(a.allBasenames=l.allBasenames);const c=t.reduce((h,u)=>u.allPaths?h.concat(u.allPaths):h,[]);return c.length&&(a.allPaths=c),a}const n=function(a,l,c){let h;for(let u=0,d=t.length;u<d;u++){const f=t[u];f.requiresSiblings&&c&&(l||(l=dh(a)),h||(h=l.substr(0,l.length-YU(a).length)));const g=f(a,l,h,c);if(g)return g}return null},s=t.find(a=>!!a.allBasenames);s&&(n.allBasenames=s.allBasenames);const o=t.reduce((a,l)=>l.allPaths?a.concat(l.allPaths):a,[]);return o.length&&(n.allPaths=o),n}function GK(r,e,t){if(e===!1)return Ho;const i=px(r,t);if(i===Ho)return Ho;if(typeof e=="boolean")return i;if(e){const n=e.when;if(typeof n=="string"){const s=(o,a,l,c)=>{if(!c||!i(o,a))return null;const h=n.replace("$(basename)",l),u=c(h);return pj(u)?u.then(d=>d?r:null):u?r:null};return s.requiresSiblings=!0,s}}return i}function O2(r,e){const t=r.filter(a=>!!a.basenames);if(t.length<2)return r;const i=t.reduce((a,l)=>{const c=l.basenames;return c?a.concat(c):a},[]);let n;if(e){n=[];for(let a=0,l=i.length;a<l;a++)n.push(e)}else n=t.reduce((a,l)=>{const c=l.patterns;return c?a.concat(c):a},[]);const s=function(a,l){if(typeof a!="string")return null;if(!l){let h;for(h=a.length;h>0;h--){const u=a.charCodeAt(h-1);if(u===47||u===92)break}l=a.substr(h)}const c=i.indexOf(l);return c!==-1?n[c]:null};s.basenames=i,s.patterns=n,s.allBasenames=i;const o=r.filter(a=>!a.basenames);return o.push(s),o}function F2(r,e,t,i){if(Array.isArray(r)){let n=0;for(const s of r){const o=F2(s,e,t,i);if(o===10)return o;o>n&&(n=o)}return n}else{if(typeof r=="string")return i?r==="*"?5:r===t?10:0:0;if(r){const{language:n,pattern:s,scheme:o,hasAccessToAllModels:a}=r;if(!i&&!a)return 0;let l=0;if(o)if(o===e.scheme)l=10;else if(o==="*")l=5;else return 0;if(n)if(n===t)l=10;else if(n==="*")l=Math.max(l,5);else return 0;if(s){let c;if(typeof s=="string"?c=s:c=Object.assign(Object.assign({},s),{base:HS(s.base)}),c===e.fsPath||jK(c,e.fsPath))l=10;else return 0}return l}else return 0}}const gi=bt("modelService");function ZK(r){return!r.isTooLargeForSyncing()&&!r.isForSimpleWidget}function B2(r){return typeof r=="string"?!1:Array.isArray(r)?r.every(B2):!!r.exclusive}class li{constructor(){this._clock=0,this._entries=[],this._onDidChange=new H}get onDidChange(){return 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),Xe(()=>{if(i){let n=this._entries.indexOf(i);n>=0&&(this._entries.splice(n,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(let i of this._entries)i._score>0&&t.push(i.provider);return t}ordered(e){const t=[];return this._orderedForEach(e,i=>t.push(i.provider)),t}orderedGroups(e){const t=[];let i,n;return this._orderedForEach(e,s=>{i&&n===s._score?i.push(s.provider):(n=s._score,i=[s.provider],t.push(i))}),t}_orderedForEach(e,t){if(!!e){this._updateScores(e);for(const i of this._entries)i._score>0&&t(i)}}_updateScores(e){let t={uri:e.uri.toString(),language:e.getLanguageIdentifier().language};if(!(this._lastCandidate&&this._lastCandidate.language===t.language&&this._lastCandidate.uri===t.uri)){this._lastCandidate=t;for(let i of this._entries)if(i._score=F2(i.selector,e.uri,e.getLanguageIdentifier().language,ZK(e)),B2(i.selector)&&i._score>0){for(let n of this._entries)n._score=0;i._score=1e3;break}this._entries.sort(li._compareByScoreAndTime)}}static _compareByScoreAndTime(e,t){return e._score<t._score?1:e._score>t._score?-1:e._time<t._time?1:e._time>t._time?-1:0}}const W2=new WeakMap;let YK=0;function XK(r){let e=W2.get(r);return e===void 0&&(e=++YK,W2.set(r,e)),e}class kv{constructor(e,t,i=Number.MAX_SAFE_INTEGER){this._registry=e,this.min=t,this.max=i,this._cache=new $l(50,.7)}_key(e){return e.id+this._registry.all(e).reduce((t,i)=>yv(XK(i),t),0)}_clamp(e){return e===void 0?this.min:Math.min(this.max,Math.max(this.min,Math.floor(e*1.3)))}get(e){const t=this._key(e),i=this._cache.get(t);return this._clamp(i==null?void 0:i.value)}update(e,t){const i=this._key(e);let n=this._cache.get(i);return n||(n=new MK,this._cache.set(i,n)),n.update(t),this.get(e)}}class QK{constructor(){this._map=new Map,this._promises=new Map,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._colorMap=null}fire(e){this._onDidChange.fire({changedLanguages:e,changedColorMap:!1})}register(e,t){return this._map.set(e,t),this.fire([e]),Xe(()=>{this._map.get(e)===t&&(this._map.delete(e),this.fire([e]))})}registerPromise(e,t){let i=null,n=!1;return this._promises.set(e,t.then(s=>{this._promises.delete(e),!(n||!s)&&(i=this.register(e,s))})),Xe(()=>{n=!0,i&&i.dispose()})}getPromise(e){const t=this.get(e);if(t)return Promise.resolve(t);const i=this._promises.get(e);return i?i.then(n=>this.get(e)):null}get(e){return this._map.get(e)||null}setColorMap(e){this._colorMap=e,this._onDidChange.fire({changedLanguages:Array.from(this._map.keys()),changedColorMap:!0})}getColorMap(){return this._colorMap}getDefaultBackground(){return this._colorMap&&this._colorMap.length>2?this._colorMap[2]:null}}class JK{constructor(){this._icons=new Map,this._onDidRegister=new H}add(e){const t=this._icons.get(e.id);t?e.description?t.description=e.description:console.error(`Duplicate registration of codicon ${e.id}`):(this._icons.set(e.id,e),this._onDidRegister.fire(e))}get(e){return this._icons.get(e)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const V2=new JK,Dv=V2;function Ls(r,e){return new ve(r,e)}function eq(r){return r?r.replace(/\$\((.*?)\)/g,(e,t)=>` ${t} `).trim():""}class ve{constructor(e,t,i){this.id=e,this.definition=t,this.description=i,V2.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var fr;(function(r){r.iconNameSegment="[A-Za-z0-9]+",r.iconNameExpression="[A-Za-z0-9\\-]+",r.iconModifierExpression="~[A-Za-z]+";const e=new RegExp(`^(${r.iconNameExpression})(${r.iconModifierExpression})?$`);function t(s){if(s instanceof ve)return["codicon","codicon-"+s.id];const o=e.exec(s.id);if(!o)return t(ve.error);let[,a,l]=o;const c=["codicon","codicon-"+a];return l&&c.push("codicon-modifier-"+l.substr(1)),c}r.asClassNameArray=t;function i(s){return t(s).join(" ")}r.asClassName=i;function n(s){return"."+t(s).join(".")}r.asCSSSelector=n})(fr||(fr={}));(function(r){r.add=new r("add",{fontCharacter:"\\ea60"}),r.plus=new r("plus",{fontCharacter:"\\ea60"}),r.gistNew=new r("gist-new",{fontCharacter:"\\ea60"}),r.repoCreate=new r("repo-create",{fontCharacter:"\\ea60"}),r.lightbulb=new r("lightbulb",{fontCharacter:"\\ea61"}),r.lightBulb=new r("light-bulb",{fontCharacter:"\\ea61"}),r.repo=new r("repo",{fontCharacter:"\\ea62"}),r.repoDelete=new r("repo-delete",{fontCharacter:"\\ea62"}),r.gistFork=new r("gist-fork",{fontCharacter:"\\ea63"}),r.repoForked=new r("repo-forked",{fontCharacter:"\\ea63"}),r.gitPullRequest=new r("git-pull-request",{fontCharacter:"\\ea64"}),r.gitPullRequestAbandoned=new r("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),r.recordKeys=new r("record-keys",{fontCharacter:"\\ea65"}),r.keyboard=new r("keyboard",{fontCharacter:"\\ea65"}),r.tag=new r("tag",{fontCharacter:"\\ea66"}),r.tagAdd=new r("tag-add",{fontCharacter:"\\ea66"}),r.tagRemove=new r("tag-remove",{fontCharacter:"\\ea66"}),r.person=new r("person",{fontCharacter:"\\ea67"}),r.personFollow=new r("person-follow",{fontCharacter:"\\ea67"}),r.personOutline=new r("person-outline",{fontCharacter:"\\ea67"}),r.personFilled=new r("person-filled",{fontCharacter:"\\ea67"}),r.gitBranch=new r("git-branch",{fontCharacter:"\\ea68"}),r.gitBranchCreate=new r("git-branch-create",{fontCharacter:"\\ea68"}),r.gitBranchDelete=new r("git-branch-delete",{fontCharacter:"\\ea68"}),r.sourceControl=new r("source-control",{fontCharacter:"\\ea68"}),r.mirror=new r("mirror",{fontCharacter:"\\ea69"}),r.mirrorPublic=new r("mirror-public",{fontCharacter:"\\ea69"}),r.star=new r("star",{fontCharacter:"\\ea6a"}),r.starAdd=new r("star-add",{fontCharacter:"\\ea6a"}),r.starDelete=new r("star-delete",{fontCharacter:"\\ea6a"}),r.starEmpty=new r("star-empty",{fontCharacter:"\\ea6a"}),r.comment=new r("comment",{fontCharacter:"\\ea6b"}),r.commentAdd=new r("comment-add",{fontCharacter:"\\ea6b"}),r.alert=new r("alert",{fontCharacter:"\\ea6c"}),r.warning=new r("warning",{fontCharacter:"\\ea6c"}),r.search=new r("search",{fontCharacter:"\\ea6d"}),r.searchSave=new r("search-save",{fontCharacter:"\\ea6d"}),r.logOut=new r("log-out",{fontCharacter:"\\ea6e"}),r.signOut=new r("sign-out",{fontCharacter:"\\ea6e"}),r.logIn=new r("log-in",{fontCharacter:"\\ea6f"}),r.signIn=new r("sign-in",{fontCharacter:"\\ea6f"}),r.eye=new r("eye",{fontCharacter:"\\ea70"}),r.eyeUnwatch=new r("eye-unwatch",{fontCharacter:"\\ea70"}),r.eyeWatch=new r("eye-watch",{fontCharacter:"\\ea70"}),r.circleFilled=new r("circle-filled",{fontCharacter:"\\ea71"}),r.primitiveDot=new r("primitive-dot",{fontCharacter:"\\ea71"}),r.closeDirty=new r("close-dirty",{fontCharacter:"\\ea71"}),r.debugBreakpoint=new r("debug-breakpoint",{fontCharacter:"\\ea71"}),r.debugBreakpointDisabled=new r("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),r.debugHint=new r("debug-hint",{fontCharacter:"\\ea71"}),r.primitiveSquare=new r("primitive-square",{fontCharacter:"\\ea72"}),r.edit=new r("edit",{fontCharacter:"\\ea73"}),r.pencil=new r("pencil",{fontCharacter:"\\ea73"}),r.info=new r("info",{fontCharacter:"\\ea74"}),r.issueOpened=new r("issue-opened",{fontCharacter:"\\ea74"}),r.gistPrivate=new r("gist-private",{fontCharacter:"\\ea75"}),r.gitForkPrivate=new r("git-fork-private",{fontCharacter:"\\ea75"}),r.lock=new r("lock",{fontCharacter:"\\ea75"}),r.mirrorPrivate=new r("mirror-private",{fontCharacter:"\\ea75"}),r.close=new r("close",{fontCharacter:"\\ea76"}),r.removeClose=new r("remove-close",{fontCharacter:"\\ea76"}),r.x=new r("x",{fontCharacter:"\\ea76"}),r.repoSync=new r("repo-sync",{fontCharacter:"\\ea77"}),r.sync=new r("sync",{fontCharacter:"\\ea77"}),r.clone=new r("clone",{fontCharacter:"\\ea78"}),r.desktopDownload=new r("desktop-download",{fontCharacter:"\\ea78"}),r.beaker=new r("beaker",{fontCharacter:"\\ea79"}),r.microscope=new r("microscope",{fontCharacter:"\\ea79"}),r.vm=new r("vm",{fontCharacter:"\\ea7a"}),r.deviceDesktop=new r("device-desktop",{fontCharacter:"\\ea7a"}),r.file=new r("file",{fontCharacter:"\\ea7b"}),r.fileText=new r("file-text",{fontCharacter:"\\ea7b"}),r.more=new r("more",{fontCharacter:"\\ea7c"}),r.ellipsis=new r("ellipsis",{fontCharacter:"\\ea7c"}),r.kebabHorizontal=new r("kebab-horizontal",{fontCharacter:"\\ea7c"}),r.mailReply=new r("mail-reply",{fontCharacter:"\\ea7d"}),r.reply=new r("reply",{fontCharacter:"\\ea7d"}),r.organization=new r("organization",{fontCharacter:"\\ea7e"}),r.organizationFilled=new r("organization-filled",{fontCharacter:"\\ea7e"}),r.organizationOutline=new r("organization-outline",{fontCharacter:"\\ea7e"}),r.newFile=new r("new-file",{fontCharacter:"\\ea7f"}),r.fileAdd=new r("file-add",{fontCharacter:"\\ea7f"}),r.newFolder=new r("new-folder",{fontCharacter:"\\ea80"}),r.fileDirectoryCreate=new r("file-directory-create",{fontCharacter:"\\ea80"}),r.trash=new r("trash",{fontCharacter:"\\ea81"}),r.trashcan=new r("trashcan",{fontCharacter:"\\ea81"}),r.history=new r("history",{fontCharacter:"\\ea82"}),r.clock=new r("clock",{fontCharacter:"\\ea82"}),r.folder=new r("folder",{fontCharacter:"\\ea83"}),r.fileDirectory=new r("file-directory",{fontCharacter:"\\ea83"}),r.symbolFolder=new r("symbol-folder",{fontCharacter:"\\ea83"}),r.logoGithub=new r("logo-github",{fontCharacter:"\\ea84"}),r.markGithub=new r("mark-github",{fontCharacter:"\\ea84"}),r.github=new r("github",{fontCharacter:"\\ea84"}),r.terminal=new r("terminal",{fontCharacter:"\\ea85"}),r.console=new r("console",{fontCharacter:"\\ea85"}),r.repl=new r("repl",{fontCharacter:"\\ea85"}),r.zap=new r("zap",{fontCharacter:"\\ea86"}),r.symbolEvent=new r("symbol-event",{fontCharacter:"\\ea86"}),r.error=new r("error",{fontCharacter:"\\ea87"}),r.stop=new r("stop",{fontCharacter:"\\ea87"}),r.variable=new r("variable",{fontCharacter:"\\ea88"}),r.symbolVariable=new r("symbol-variable",{fontCharacter:"\\ea88"}),r.array=new r("array",{fontCharacter:"\\ea8a"}),r.symbolArray=new r("symbol-array",{fontCharacter:"\\ea8a"}),r.symbolModule=new r("symbol-module",{fontCharacter:"\\ea8b"}),r.symbolPackage=new r("symbol-package",{fontCharacter:"\\ea8b"}),r.symbolNamespace=new r("symbol-namespace",{fontCharacter:"\\ea8b"}),r.symbolObject=new r("symbol-object",{fontCharacter:"\\ea8b"}),r.symbolMethod=new r("symbol-method",{fontCharacter:"\\ea8c"}),r.symbolFunction=new r("symbol-function",{fontCharacter:"\\ea8c"}),r.symbolConstructor=new r("symbol-constructor",{fontCharacter:"\\ea8c"}),r.symbolBoolean=new r("symbol-boolean",{fontCharacter:"\\ea8f"}),r.symbolNull=new r("symbol-null",{fontCharacter:"\\ea8f"}),r.symbolNumeric=new r("symbol-numeric",{fontCharacter:"\\ea90"}),r.symbolNumber=new r("symbol-number",{fontCharacter:"\\ea90"}),r.symbolStructure=new r("symbol-structure",{fontCharacter:"\\ea91"}),r.symbolStruct=new r("symbol-struct",{fontCharacter:"\\ea91"}),r.symbolParameter=new r("symbol-parameter",{fontCharacter:"\\ea92"}),r.symbolTypeParameter=new r("symbol-type-parameter",{fontCharacter:"\\ea92"}),r.symbolKey=new r("symbol-key",{fontCharacter:"\\ea93"}),r.symbolText=new r("symbol-text",{fontCharacter:"\\ea93"}),r.symbolReference=new r("symbol-reference",{fontCharacter:"\\ea94"}),r.goToFile=new r("go-to-file",{fontCharacter:"\\ea94"}),r.symbolEnum=new r("symbol-enum",{fontCharacter:"\\ea95"}),r.symbolValue=new r("symbol-value",{fontCharacter:"\\ea95"}),r.symbolRuler=new r("symbol-ruler",{fontCharacter:"\\ea96"}),r.symbolUnit=new r("symbol-unit",{fontCharacter:"\\ea96"}),r.activateBreakpoints=new r("activate-breakpoints",{fontCharacter:"\\ea97"}),r.archive=new r("archive",{fontCharacter:"\\ea98"}),r.arrowBoth=new r("arrow-both",{fontCharacter:"\\ea99"}),r.arrowDown=new r("arrow-down",{fontCharacter:"\\ea9a"}),r.arrowLeft=new r("arrow-left",{fontCharacter:"\\ea9b"}),r.arrowRight=new r("arrow-right",{fontCharacter:"\\ea9c"}),r.arrowSmallDown=new r("arrow-small-down",{fontCharacter:"\\ea9d"}),r.arrowSmallLeft=new r("arrow-small-left",{fontCharacter:"\\ea9e"}),r.arrowSmallRight=new r("arrow-small-right",{fontCharacter:"\\ea9f"}),r.arrowSmallUp=new r("arrow-small-up",{fontCharacter:"\\eaa0"}),r.arrowUp=new r("arrow-up",{fontCharacter:"\\eaa1"}),r.bell=new r("bell",{fontCharacter:"\\eaa2"}),r.bold=new r("bold",{fontCharacter:"\\eaa3"}),r.book=new r("book",{fontCharacter:"\\eaa4"}),r.bookmark=new r("bookmark",{fontCharacter:"\\eaa5"}),r.debugBreakpointConditionalUnverified=new r("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),r.debugBreakpointConditional=new r("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),r.debugBreakpointConditionalDisabled=new r("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),r.debugBreakpointDataUnverified=new r("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),r.debugBreakpointData=new r("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),r.debugBreakpointDataDisabled=new r("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),r.debugBreakpointLogUnverified=new r("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),r.debugBreakpointLog=new r("debug-breakpoint-log",{fontCharacter:"\\eaab"}),r.debugBreakpointLogDisabled=new r("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),r.briefcase=new r("briefcase",{fontCharacter:"\\eaac"}),r.broadcast=new r("broadcast",{fontCharacter:"\\eaad"}),r.browser=new r("browser",{fontCharacter:"\\eaae"}),r.bug=new r("bug",{fontCharacter:"\\eaaf"}),r.calendar=new r("calendar",{fontCharacter:"\\eab0"}),r.caseSensitive=new r("case-sensitive",{fontCharacter:"\\eab1"}),r.check=new r("check",{fontCharacter:"\\eab2"}),r.checklist=new r("checklist",{fontCharacter:"\\eab3"}),r.chevronDown=new r("chevron-down",{fontCharacter:"\\eab4"}),r.chevronLeft=new r("chevron-left",{fontCharacter:"\\eab5"}),r.chevronRight=new r("chevron-right",{fontCharacter:"\\eab6"}),r.chevronUp=new r("chevron-up",{fontCharacter:"\\eab7"}),r.chromeClose=new r("chrome-close",{fontCharacter:"\\eab8"}),r.chromeMaximize=new r("chrome-maximize",{fontCharacter:"\\eab9"}),r.chromeMinimize=new r("chrome-minimize",{fontCharacter:"\\eaba"}),r.chromeRestore=new r("chrome-restore",{fontCharacter:"\\eabb"}),r.circleOutline=new r("circle-outline",{fontCharacter:"\\eabc"}),r.debugBreakpointUnverified=new r("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),r.circleSlash=new r("circle-slash",{fontCharacter:"\\eabd"}),r.circuitBoard=new r("circuit-board",{fontCharacter:"\\eabe"}),r.clearAll=new r("clear-all",{fontCharacter:"\\eabf"}),r.clippy=new r("clippy",{fontCharacter:"\\eac0"}),r.closeAll=new r("close-all",{fontCharacter:"\\eac1"}),r.cloudDownload=new r("cloud-download",{fontCharacter:"\\eac2"}),r.cloudUpload=new r("cloud-upload",{fontCharacter:"\\eac3"}),r.code=new r("code",{fontCharacter:"\\eac4"}),r.collapseAll=new r("collapse-all",{fontCharacter:"\\eac5"}),r.colorMode=new r("color-mode",{fontCharacter:"\\eac6"}),r.commentDiscussion=new r("comment-discussion",{fontCharacter:"\\eac7"}),r.compareChanges=new r("compare-changes",{fontCharacter:"\\eafd"}),r.creditCard=new r("credit-card",{fontCharacter:"\\eac9"}),r.dash=new r("dash",{fontCharacter:"\\eacc"}),r.dashboard=new r("dashboard",{fontCharacter:"\\eacd"}),r.database=new r("database",{fontCharacter:"\\eace"}),r.debugContinue=new r("debug-continue",{fontCharacter:"\\eacf"}),r.debugDisconnect=new r("debug-disconnect",{fontCharacter:"\\ead0"}),r.debugPause=new r("debug-pause",{fontCharacter:"\\ead1"}),r.debugRestart=new r("debug-restart",{fontCharacter:"\\ead2"}),r.debugStart=new r("debug-start",{fontCharacter:"\\ead3"}),r.debugStepInto=new r("debug-step-into",{fontCharacter:"\\ead4"}),r.debugStepOut=new r("debug-step-out",{fontCharacter:"\\ead5"}),r.debugStepOver=new r("debug-step-over",{fontCharacter:"\\ead6"}),r.debugStop=new r("debug-stop",{fontCharacter:"\\ead7"}),r.debug=new r("debug",{fontCharacter:"\\ead8"}),r.deviceCameraVideo=new r("device-camera-video",{fontCharacter:"\\ead9"}),r.deviceCamera=new r("device-camera",{fontCharacter:"\\eada"}),r.deviceMobile=new r("device-mobile",{fontCharacter:"\\eadb"}),r.diffAdded=new r("diff-added",{fontCharacter:"\\eadc"}),r.diffIgnored=new r("diff-ignored",{fontCharacter:"\\eadd"}),r.diffModified=new r("diff-modified",{fontCharacter:"\\eade"}),r.diffRemoved=new r("diff-removed",{fontCharacter:"\\eadf"}),r.diffRenamed=new r("diff-renamed",{fontCharacter:"\\eae0"}),r.diff=new r("diff",{fontCharacter:"\\eae1"}),r.discard=new r("discard",{fontCharacter:"\\eae2"}),r.editorLayout=new r("editor-layout",{fontCharacter:"\\eae3"}),r.emptyWindow=new r("empty-window",{fontCharacter:"\\eae4"}),r.exclude=new r("exclude",{fontCharacter:"\\eae5"}),r.extensions=new r("extensions",{fontCharacter:"\\eae6"}),r.eyeClosed=new r("eye-closed",{fontCharacter:"\\eae7"}),r.fileBinary=new r("file-binary",{fontCharacter:"\\eae8"}),r.fileCode=new r("file-code",{fontCharacter:"\\eae9"}),r.fileMedia=new r("file-media",{fontCharacter:"\\eaea"}),r.filePdf=new r("file-pdf",{fontCharacter:"\\eaeb"}),r.fileSubmodule=new r("file-submodule",{fontCharacter:"\\eaec"}),r.fileSymlinkDirectory=new r("file-symlink-directory",{fontCharacter:"\\eaed"}),r.fileSymlinkFile=new r("file-symlink-file",{fontCharacter:"\\eaee"}),r.fileZip=new r("file-zip",{fontCharacter:"\\eaef"}),r.files=new r("files",{fontCharacter:"\\eaf0"}),r.filter=new r("filter",{fontCharacter:"\\eaf1"}),r.flame=new r("flame",{fontCharacter:"\\eaf2"}),r.foldDown=new r("fold-down",{fontCharacter:"\\eaf3"}),r.foldUp=new r("fold-up",{fontCharacter:"\\eaf4"}),r.fold=new r("fold",{fontCharacter:"\\eaf5"}),r.folderActive=new r("folder-active",{fontCharacter:"\\eaf6"}),r.folderOpened=new r("folder-opened",{fontCharacter:"\\eaf7"}),r.gear=new r("gear",{fontCharacter:"\\eaf8"}),r.gift=new r("gift",{fontCharacter:"\\eaf9"}),r.gistSecret=new r("gist-secret",{fontCharacter:"\\eafa"}),r.gist=new r("gist",{fontCharacter:"\\eafb"}),r.gitCommit=new r("git-commit",{fontCharacter:"\\eafc"}),r.gitCompare=new r("git-compare",{fontCharacter:"\\eafd"}),r.gitMerge=new r("git-merge",{fontCharacter:"\\eafe"}),r.githubAction=new r("github-action",{fontCharacter:"\\eaff"}),r.githubAlt=new r("github-alt",{fontCharacter:"\\eb00"}),r.globe=new r("globe",{fontCharacter:"\\eb01"}),r.grabber=new r("grabber",{fontCharacter:"\\eb02"}),r.graph=new r("graph",{fontCharacter:"\\eb03"}),r.gripper=new r("gripper",{fontCharacter:"\\eb04"}),r.heart=new r("heart",{fontCharacter:"\\eb05"}),r.home=new r("home",{fontCharacter:"\\eb06"}),r.horizontalRule=new r("horizontal-rule",{fontCharacter:"\\eb07"}),r.hubot=new r("hubot",{fontCharacter:"\\eb08"}),r.inbox=new r("inbox",{fontCharacter:"\\eb09"}),r.issueClosed=new r("issue-closed",{fontCharacter:"\\eba4"}),r.issueReopened=new r("issue-reopened",{fontCharacter:"\\eb0b"}),r.issues=new r("issues",{fontCharacter:"\\eb0c"}),r.italic=new r("italic",{fontCharacter:"\\eb0d"}),r.jersey=new r("jersey",{fontCharacter:"\\eb0e"}),r.json=new r("json",{fontCharacter:"\\eb0f"}),r.kebabVertical=new r("kebab-vertical",{fontCharacter:"\\eb10"}),r.key=new r("key",{fontCharacter:"\\eb11"}),r.law=new r("law",{fontCharacter:"\\eb12"}),r.lightbulbAutofix=new r("lightbulb-autofix",{fontCharacter:"\\eb13"}),r.linkExternal=new r("link-external",{fontCharacter:"\\eb14"}),r.link=new r("link",{fontCharacter:"\\eb15"}),r.listOrdered=new r("list-ordered",{fontCharacter:"\\eb16"}),r.listUnordered=new r("list-unordered",{fontCharacter:"\\eb17"}),r.liveShare=new r("live-share",{fontCharacter:"\\eb18"}),r.loading=new r("loading",{fontCharacter:"\\eb19"}),r.location=new r("location",{fontCharacter:"\\eb1a"}),r.mailRead=new r("mail-read",{fontCharacter:"\\eb1b"}),r.mail=new r("mail",{fontCharacter:"\\eb1c"}),r.markdown=new r("markdown",{fontCharacter:"\\eb1d"}),r.megaphone=new r("megaphone",{fontCharacter:"\\eb1e"}),r.mention=new r("mention",{fontCharacter:"\\eb1f"}),r.milestone=new r("milestone",{fontCharacter:"\\eb20"}),r.mortarBoard=new r("mortar-board",{fontCharacter:"\\eb21"}),r.move=new r("move",{fontCharacter:"\\eb22"}),r.multipleWindows=new r("multiple-windows",{fontCharacter:"\\eb23"}),r.mute=new r("mute",{fontCharacter:"\\eb24"}),r.noNewline=new r("no-newline",{fontCharacter:"\\eb25"}),r.note=new r("note",{fontCharacter:"\\eb26"}),r.octoface=new r("octoface",{fontCharacter:"\\eb27"}),r.openPreview=new r("open-preview",{fontCharacter:"\\eb28"}),r.package_=new r("package",{fontCharacter:"\\eb29"}),r.paintcan=new r("paintcan",{fontCharacter:"\\eb2a"}),r.pin=new r("pin",{fontCharacter:"\\eb2b"}),r.play=new r("play",{fontCharacter:"\\eb2c"}),r.run=new r("run",{fontCharacter:"\\eb2c"}),r.plug=new r("plug",{fontCharacter:"\\eb2d"}),r.preserveCase=new r("preserve-case",{fontCharacter:"\\eb2e"}),r.preview=new r("preview",{fontCharacter:"\\eb2f"}),r.project=new r("project",{fontCharacter:"\\eb30"}),r.pulse=new r("pulse",{fontCharacter:"\\eb31"}),r.question=new r("question",{fontCharacter:"\\eb32"}),r.quote=new r("quote",{fontCharacter:"\\eb33"}),r.radioTower=new r("radio-tower",{fontCharacter:"\\eb34"}),r.reactions=new r("reactions",{fontCharacter:"\\eb35"}),r.references=new r("references",{fontCharacter:"\\eb36"}),r.refresh=new r("refresh",{fontCharacter:"\\eb37"}),r.regex=new r("regex",{fontCharacter:"\\eb38"}),r.remoteExplorer=new r("remote-explorer",{fontCharacter:"\\eb39"}),r.remote=new r("remote",{fontCharacter:"\\eb3a"}),r.remove=new r("remove",{fontCharacter:"\\eb3b"}),r.replaceAll=new r("replace-all",{fontCharacter:"\\eb3c"}),r.replace=new r("replace",{fontCharacter:"\\eb3d"}),r.repoClone=new r("repo-clone",{fontCharacter:"\\eb3e"}),r.repoForcePush=new r("repo-force-push",{fontCharacter:"\\eb3f"}),r.repoPull=new r("repo-pull",{fontCharacter:"\\eb40"}),r.repoPush=new r("repo-push",{fontCharacter:"\\eb41"}),r.report=new r("report",{fontCharacter:"\\eb42"}),r.requestChanges=new r("request-changes",{fontCharacter:"\\eb43"}),r.rocket=new r("rocket",{fontCharacter:"\\eb44"}),r.rootFolderOpened=new r("root-folder-opened",{fontCharacter:"\\eb45"}),r.rootFolder=new r("root-folder",{fontCharacter:"\\eb46"}),r.rss=new r("rss",{fontCharacter:"\\eb47"}),r.ruby=new r("ruby",{fontCharacter:"\\eb48"}),r.saveAll=new r("save-all",{fontCharacter:"\\eb49"}),r.saveAs=new r("save-as",{fontCharacter:"\\eb4a"}),r.save=new r("save",{fontCharacter:"\\eb4b"}),r.screenFull=new r("screen-full",{fontCharacter:"\\eb4c"}),r.screenNormal=new r("screen-normal",{fontCharacter:"\\eb4d"}),r.searchStop=new r("search-stop",{fontCharacter:"\\eb4e"}),r.server=new r("server",{fontCharacter:"\\eb50"}),r.settingsGear=new r("settings-gear",{fontCharacter:"\\eb51"}),r.settings=new r("settings",{fontCharacter:"\\eb52"}),r.shield=new r("shield",{fontCharacter:"\\eb53"}),r.smiley=new r("smiley",{fontCharacter:"\\eb54"}),r.sortPrecedence=new r("sort-precedence",{fontCharacter:"\\eb55"}),r.splitHorizontal=new r("split-horizontal",{fontCharacter:"\\eb56"}),r.splitVertical=new r("split-vertical",{fontCharacter:"\\eb57"}),r.squirrel=new r("squirrel",{fontCharacter:"\\eb58"}),r.starFull=new r("star-full",{fontCharacter:"\\eb59"}),r.starHalf=new r("star-half",{fontCharacter:"\\eb5a"}),r.symbolClass=new r("symbol-class",{fontCharacter:"\\eb5b"}),r.symbolColor=new r("symbol-color",{fontCharacter:"\\eb5c"}),r.symbolConstant=new r("symbol-constant",{fontCharacter:"\\eb5d"}),r.symbolEnumMember=new r("symbol-enum-member",{fontCharacter:"\\eb5e"}),r.symbolField=new r("symbol-field",{fontCharacter:"\\eb5f"}),r.symbolFile=new r("symbol-file",{fontCharacter:"\\eb60"}),r.symbolInterface=new r("symbol-interface",{fontCharacter:"\\eb61"}),r.symbolKeyword=new r("symbol-keyword",{fontCharacter:"\\eb62"}),r.symbolMisc=new r("symbol-misc",{fontCharacter:"\\eb63"}),r.symbolOperator=new r("symbol-operator",{fontCharacter:"\\eb64"}),r.symbolProperty=new r("symbol-property",{fontCharacter:"\\eb65"}),r.wrench=new r("wrench",{fontCharacter:"\\eb65"}),r.wrenchSubaction=new r("wrench-subaction",{fontCharacter:"\\eb65"}),r.symbolSnippet=new r("symbol-snippet",{fontCharacter:"\\eb66"}),r.tasklist=new r("tasklist",{fontCharacter:"\\eb67"}),r.telescope=new r("telescope",{fontCharacter:"\\eb68"}),r.textSize=new r("text-size",{fontCharacter:"\\eb69"}),r.threeBars=new r("three-bars",{fontCharacter:"\\eb6a"}),r.thumbsdown=new r("thumbsdown",{fontCharacter:"\\eb6b"}),r.thumbsup=new r("thumbsup",{fontCharacter:"\\eb6c"}),r.tools=new r("tools",{fontCharacter:"\\eb6d"}),r.triangleDown=new r("triangle-down",{fontCharacter:"\\eb6e"}),r.triangleLeft=new r("triangle-left",{fontCharacter:"\\eb6f"}),r.triangleRight=new r("triangle-right",{fontCharacter:"\\eb70"}),r.triangleUp=new r("triangle-up",{fontCharacter:"\\eb71"}),r.twitter=new r("twitter",{fontCharacter:"\\eb72"}),r.unfold=new r("unfold",{fontCharacter:"\\eb73"}),r.unlock=new r("unlock",{fontCharacter:"\\eb74"}),r.unmute=new r("unmute",{fontCharacter:"\\eb75"}),r.unverified=new r("unverified",{fontCharacter:"\\eb76"}),r.verified=new r("verified",{fontCharacter:"\\eb77"}),r.versions=new r("versions",{fontCharacter:"\\eb78"}),r.vmActive=new r("vm-active",{fontCharacter:"\\eb79"}),r.vmOutline=new r("vm-outline",{fontCharacter:"\\eb7a"}),r.vmRunning=new r("vm-running",{fontCharacter:"\\eb7b"}),r.watch=new r("watch",{fontCharacter:"\\eb7c"}),r.whitespace=new r("whitespace",{fontCharacter:"\\eb7d"}),r.wholeWord=new r("whole-word",{fontCharacter:"\\eb7e"}),r.window=new r("window",{fontCharacter:"\\eb7f"}),r.wordWrap=new r("word-wrap",{fontCharacter:"\\eb80"}),r.zoomIn=new r("zoom-in",{fontCharacter:"\\eb81"}),r.zoomOut=new r("zoom-out",{fontCharacter:"\\eb82"}),r.listFilter=new r("list-filter",{fontCharacter:"\\eb83"}),r.listFlat=new r("list-flat",{fontCharacter:"\\eb84"}),r.listSelection=new r("list-selection",{fontCharacter:"\\eb85"}),r.selection=new r("selection",{fontCharacter:"\\eb85"}),r.listTree=new r("list-tree",{fontCharacter:"\\eb86"}),r.debugBreakpointFunctionUnverified=new r("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),r.debugBreakpointFunction=new r("debug-breakpoint-function",{fontCharacter:"\\eb88"}),r.debugBreakpointFunctionDisabled=new r("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),r.debugStackframeActive=new r("debug-stackframe-active",{fontCharacter:"\\eb89"}),r.debugStackframeDot=new r("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),r.debugStackframe=new r("debug-stackframe",{fontCharacter:"\\eb8b"}),r.debugStackframeFocused=new r("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),r.debugBreakpointUnsupported=new r("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),r.symbolString=new r("symbol-string",{fontCharacter:"\\eb8d"}),r.debugReverseContinue=new r("debug-reverse-continue",{fontCharacter:"\\eb8e"}),r.debugStepBack=new r("debug-step-back",{fontCharacter:"\\eb8f"}),r.debugRestartFrame=new r("debug-restart-frame",{fontCharacter:"\\eb90"}),r.callIncoming=new r("call-incoming",{fontCharacter:"\\eb92"}),r.callOutgoing=new r("call-outgoing",{fontCharacter:"\\eb93"}),r.menu=new r("menu",{fontCharacter:"\\eb94"}),r.expandAll=new r("expand-all",{fontCharacter:"\\eb95"}),r.feedback=new r("feedback",{fontCharacter:"\\eb96"}),r.groupByRefType=new r("group-by-ref-type",{fontCharacter:"\\eb97"}),r.ungroupByRefType=new r("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),r.account=new r("account",{fontCharacter:"\\eb99"}),r.bellDot=new r("bell-dot",{fontCharacter:"\\eb9a"}),r.debugConsole=new r("debug-console",{fontCharacter:"\\eb9b"}),r.library=new r("library",{fontCharacter:"\\eb9c"}),r.output=new r("output",{fontCharacter:"\\eb9d"}),r.runAll=new r("run-all",{fontCharacter:"\\eb9e"}),r.syncIgnored=new r("sync-ignored",{fontCharacter:"\\eb9f"}),r.pinned=new r("pinned",{fontCharacter:"\\eba0"}),r.githubInverted=new r("github-inverted",{fontCharacter:"\\eba1"}),r.debugAlt=new r("debug-alt",{fontCharacter:"\\eb91"}),r.serverProcess=new r("server-process",{fontCharacter:"\\eba2"}),r.serverEnvironment=new r("server-environment",{fontCharacter:"\\eba3"}),r.pass=new r("pass",{fontCharacter:"\\eba4"}),r.stopCircle=new r("stop-circle",{fontCharacter:"\\eba5"}),r.playCircle=new r("play-circle",{fontCharacter:"\\eba6"}),r.record=new r("record",{fontCharacter:"\\eba7"}),r.debugAltSmall=new r("debug-alt-small",{fontCharacter:"\\eba8"}),r.vmConnect=new r("vm-connect",{fontCharacter:"\\eba9"}),r.cloud=new r("cloud",{fontCharacter:"\\ebaa"}),r.merge=new r("merge",{fontCharacter:"\\ebab"}),r.exportIcon=new r("export",{fontCharacter:"\\ebac"}),r.graphLeft=new r("graph-left",{fontCharacter:"\\ebad"}),r.magnet=new r("magnet",{fontCharacter:"\\ebae"}),r.notebook=new r("notebook",{fontCharacter:"\\ebaf"}),r.redo=new r("redo",{fontCharacter:"\\ebb0"}),r.checkAll=new r("check-all",{fontCharacter:"\\ebb1"}),r.pinnedDirty=new r("pinned-dirty",{fontCharacter:"\\ebb2"}),r.passFilled=new r("pass-filled",{fontCharacter:"\\ebb3"}),r.circleLargeFilled=new r("circle-large-filled",{fontCharacter:"\\ebb4"}),r.circleLargeOutline=new r("circle-large-outline",{fontCharacter:"\\ebb5"}),r.combine=new r("combine",{fontCharacter:"\\ebb6"}),r.gather=new r("gather",{fontCharacter:"\\ebb6"}),r.table=new r("table",{fontCharacter:"\\ebb7"}),r.variableGroup=new r("variable-group",{fontCharacter:"\\ebb8"}),r.typeHierarchy=new r("type-hierarchy",{fontCharacter:"\\ebb9"}),r.typeHierarchySub=new r("type-hierarchy-sub",{fontCharacter:"\\ebba"}),r.typeHierarchySuper=new r("type-hierarchy-super",{fontCharacter:"\\ebbb"}),r.gitPullRequestCreate=new r("git-pull-request-create",{fontCharacter:"\\ebbc"}),r.runAbove=new r("run-above",{fontCharacter:"\\ebbd"}),r.runBelow=new r("run-below",{fontCharacter:"\\ebbe"}),r.notebookTemplate=new r("notebook-template",{fontCharacter:"\\ebbf"}),r.debugRerun=new r("debug-rerun",{fontCharacter:"\\ebc0"}),r.workspaceTrusted=new r("workspace-trusted",{fontCharacter:"\\ebc1"}),r.workspaceUntrusted=new r("workspace-untrusted",{fontCharacter:"\\ebc2"}),r.workspaceUnspecified=new r("workspace-unspecified",{fontCharacter:"\\ebc3"}),r.terminalCmd=new r("terminal-cmd",{fontCharacter:"\\ebc4"}),r.terminalDebian=new r("terminal-debian",{fontCharacter:"\\ebc5"}),r.terminalLinux=new r("terminal-linux",{fontCharacter:"\\ebc6"}),r.terminalPowershell=new r("terminal-powershell",{fontCharacter:"\\ebc7"}),r.terminalTmux=new r("terminal-tmux",{fontCharacter:"\\ebc8"}),r.terminalUbuntu=new r("terminal-ubuntu",{fontCharacter:"\\ebc9"}),r.terminalBash=new r("terminal-bash",{fontCharacter:"\\ebca"}),r.arrowSwap=new r("arrow-swap",{fontCharacter:"\\ebcb"}),r.copy=new r("copy",{fontCharacter:"\\ebcc"}),r.personAdd=new r("person-add",{fontCharacter:"\\ebcd"}),r.filterFilled=new r("filter-filled",{fontCharacter:"\\ebce"}),r.wand=new r("wand",{fontCharacter:"\\ebcf"}),r.debugLineByLine=new r("debug-line-by-line",{fontCharacter:"\\ebd0"}),r.inspect=new r("inspect",{fontCharacter:"\\ebd1"}),r.layers=new r("layers",{fontCharacter:"\\ebd2"}),r.layersDot=new r("layers-dot",{fontCharacter:"\\ebd3"}),r.layersActive=new r("layers-active",{fontCharacter:"\\ebd4"}),r.compass=new r("compass",{fontCharacter:"\\ebd5"}),r.compassDot=new r("compass-dot",{fontCharacter:"\\ebd6"}),r.compassActive=new r("compass-active",{fontCharacter:"\\ebd7"}),r.azure=new r("azure",{fontCharacter:"\\ebd8"}),r.issueDraft=new r("issue-draft",{fontCharacter:"\\ebd9"}),r.gitPullRequestClosed=new r("git-pull-request-closed",{fontCharacter:"\\ebda"}),r.gitPullRequestDraft=new r("git-pull-request-draft",{fontCharacter:"\\ebdb"}),r.debugAll=new r("debug-all",{fontCharacter:"\\ebdc"}),r.debugCoverage=new r("debug-coverage",{fontCharacter:"\\ebdd"}),r.runErrors=new r("run-errors",{fontCharacter:"\\ebde"}),r.folderLibrary=new r("folder-library",{fontCharacter:"\\ebdf"}),r.debugContinueSmall=new r("debug-continue-small",{fontCharacter:"\\ebe0"}),r.beakerStop=new r("beaker-stop",{fontCharacter:"\\ebe1"}),r.graphLine=new r("graph-line",{fontCharacter:"\\ebe2"}),r.graphScatter=new r("graph-scatter",{fontCharacter:"\\ebe3"}),r.pieChart=new r("pie-chart",{fontCharacter:"\\ebe4"}),r.bracket=new r("bracket",{fontCharacter:"\\eb0f"}),r.bracketDot=new r("bracket-dot",{fontCharacter:"\\ebe5"}),r.bracketError=new r("bracket-error",{fontCharacter:"\\ebe6"}),r.dropDownButton=new r("drop-down-button",r.chevronDown.definition)})(ve||(ve={}));class _x{constructor(e,t){this.language=e,this.id=t}}class xn{static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&1792)>>>8}static getFontStyle(e){return(e&14336)>>>11}static getForeground(e){return(e&8372224)>>>14}static getBackground(e){return(e&4286578688)>>>23}static getClassNameFromMetadata(e){let t=this.getForeground(e),i="mtk"+t,n=this.getFontStyle(e);return n&1&&(i+=" mtki"),n&2&&(i+=" mtkb"),n&4&&(i+=" mtku"),i}static getInlineStyleFromMetadata(e,t){const i=this.getForeground(e),n=this.getFontStyle(e);let s=`color: ${t[i]};`;return n&1&&(s+="font-style: italic;"),n&2&&(s+="font-weight: bold;"),n&4&&(s+="text-decoration: underline;"),s}}const tq=function(){let r=Object.create(null);return r[0]="symbol-method",r[1]="symbol-function",r[2]="symbol-constructor",r[3]="symbol-field",r[4]="symbol-variable",r[5]="symbol-class",r[6]="symbol-struct",r[7]="symbol-interface",r[8]="symbol-module",r[9]="symbol-property",r[10]="symbol-event",r[11]="symbol-operator",r[12]="symbol-unit",r[13]="symbol-value",r[14]="symbol-constant",r[15]="symbol-enum",r[16]="symbol-enum-member",r[17]="symbol-keyword",r[27]="symbol-snippet",r[18]="symbol-text",r[19]="symbol-color",r[20]="symbol-file",r[21]="symbol-reference",r[22]="symbol-customcolor",r[23]="symbol-folder",r[24]="symbol-type-parameter",r[25]="account",r[26]="issues",function(e){const t=r[e];let i=t&&Dv.get(t);return i||(console.info("No codicon found for CompletionItemKind "+e),i=ve.symbolProperty),i.classNames}}();let H2=function(){let r=Object.create(null);return r.method=0,r.function=1,r.constructor=2,r.field=3,r.variable=4,r.class=5,r.struct=6,r.interface=7,r.module=8,r.property=9,r.event=10,r.operator=11,r.unit=12,r.value=13,r.constant=14,r.enum=15,r["enum-member"]=16,r.enumMember=16,r.keyword=17,r.snippet=27,r.text=18,r.color=19,r.file=20,r.reference=21,r.customcolor=22,r.folder=23,r["type-parameter"]=24,r.typeParameter=24,r.account=25,r.issue=26,function(e,t){let i=r[e];return typeof i=="undefined"&&!t&&(i=9),i}}();var Xr;(function(r){r[r.Automatic=0]="Automatic",r[r.Explicit=1]="Explicit"})(Xr||(Xr={}));var zo;(function(r){r[r.Invoke=1]="Invoke",r[r.TriggerCharacter=2]="TriggerCharacter",r[r.ContentChange=3]="ContentChange"})(zo||(zo={}));var vp;(function(r){r[r.Text=0]="Text",r[r.Read=1]="Read",r[r.Write=2]="Write"})(vp||(vp={}));function iq(r){return r&&Ie.isUri(r.uri)&&k.isIRange(r.range)&&(k.isIRange(r.originSelectionRange)||k.isIRange(r.targetSelectionRange))}var bx;(function(r){const e=new Map;e.set("file",0),e.set("module",1),e.set("namespace",2),e.set("package",3),e.set("class",4),e.set("method",5),e.set("property",6),e.set("field",7),e.set("constructor",8),e.set("enum",9),e.set("interface",10),e.set("function",11),e.set("variable",12),e.set("constant",13),e.set("string",14),e.set("number",15),e.set("boolean",16),e.set("array",17),e.set("object",18),e.set("key",19),e.set("null",20),e.set("enum-member",21),e.set("struct",22),e.set("event",23),e.set("operator",24),e.set("type-parameter",25);const t=new Map;t.set(0,"file"),t.set(1,"module"),t.set(2,"namespace"),t.set(3,"package"),t.set(4,"class"),t.set(5,"method"),t.set(6,"property"),t.set(7,"field"),t.set(8,"constructor"),t.set(9,"enum"),t.set(10,"interface"),t.set(11,"function"),t.set(12,"variable"),t.set(13,"constant"),t.set(14,"string"),t.set(15,"number"),t.set(16,"boolean"),t.set(17,"array"),t.set(18,"object"),t.set(19,"key"),t.set(20,"null"),t.set(21,"enum-member"),t.set(22,"struct"),t.set(23,"event"),t.set(24,"operator"),t.set(25,"type-parameter");function i(o){return e.get(o)}r.fromString=i;function n(o){return t.get(o)}r.toString=n;function s(o,a){const l=t.get(o);let c=l&&Dv.get("symbol-"+l);return c||(console.info("No codicon found for SymbolKind "+o),c=ve.symbolProperty),`${a?"inline":"block"} ${c.classNames}`}r.toCssClassName=s})(bx||(bx={}));class io{constructor(e){this.value=e}}io.Comment=new io("comment");io.Imports=new io("imports");io.Region=new io("region");var Ev;(function(r){r[r.Other=0]="Other",r[r.Type=1]="Type",r[r.Parameter=2]="Parameter"})(Ev||(Ev={}));const Iv=new li,Nv=new li,no=new li,vx=new li,yh=new li,Cp=new li,xs=new li,Hd=new li,Tv=new li,wp=new li,Av=new li,Rv=new li,Mv=new li,Wa=new li,Kl=new li,$o=new li,yp=new li,ro=new li,Pv=new li,Sp=new li,zd=new li,Ov=new li,Cx=new li,Fv=new li,wx=new li,ti=new QK;class nq{clone(){return this}equals(e){return this===e}}const Lp=new nq,yx="vs.editor.nullMode",Bv=new _x(yx,0);function z2(r,e,t,i){return new $S([new tv(i,"",r)],t)}function Sx(r,e,t,i){let n=new Uint32Array(2);return n[0]=i,n[1]=(r<<0|0<<8|0<<11|1<<14|2<<23)>>>0,new iv(n,t===null?Lp:t)}const rq="editorWorkerService",ks=bt(rq),Ds=bt("modeService"),so=bt("textModelService"),sq="$initialize";let $2=!1;function Lx(r){!Sd||($2||($2=!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(r.message))}class oq{constructor(e){this._workerId=-1,this._handler=e,this._lastSentReq=0,this._pendingReplies=Object.create(null)}setWorkerId(e){this._workerId=e}sendMessage(e,t){let i=String(++this._lastSentReq);return new Promise((n,s)=>{this._pendingReplies[i]={resolve:n,reject:s},this._send({vsWorker:this._workerId,req:i,method:e,args:t})})}handleMessage(e){!e||!e.vsWorker||this._workerId!==-1&&e.vsWorker!==this._workerId||this._handleMessage(e)}_handleMessage(e){if(e.seq){let s=e;if(!this._pendingReplies[s.seq]){console.warn("Got reply to unknown seq");return}let o=this._pendingReplies[s.seq];if(delete this._pendingReplies[s.seq],s.err){let a=s.err;s.err.$isError&&(a=new Error,a.name=s.err.name,a.message=s.err.message,a.stack=s.err.stack),o.reject(a);return}o.resolve(s.res);return}let t=e,i=t.req;this._handler.handleMessage(t.method,t.args).then(s=>{this._send({vsWorker:this._workerId,seq:i,res:s,err:void 0})},s=>{s.detail instanceof Error&&(s.detail=LM(s.detail)),this._send({vsWorker:this._workerId,seq:i,res:void 0,err:LM(s)})})}_send(e){let t=[];if(e.req){const i=e;for(let n=0;n<i.args.length;n++)i.args[n]instanceof ArrayBuffer&&t.push(i.args[n])}else{const i=e;i.res instanceof ArrayBuffer&&t.push(i.res)}this._handler.sendMessage(e,t)}}class aq extends Y{constructor(e,t,i){super();let n=null;this._worker=this._register(e.create("vs/base/common/worker/simpleWorker",l=>{this._protocol.handleMessage(l)},l=>{n&&n(l)})),this._protocol=new oq({sendMessage:(l,c)=>{this._worker.postMessage(l,c)},handleMessage:(l,c)=>{if(typeof i[l]!="function")return Promise.reject(new Error("Missing method "+l+" on main thread host."));try{return Promise.resolve(i[l].apply(i,c))}catch(h){return Promise.reject(h)}}}),this._protocol.setWorkerId(this._worker.getId());let s=null;typeof self.require!="undefined"&&typeof self.require.getConfig=="function"?s=self.require.getConfig():typeof self.requirejs!="undefined"&&(s=self.requirejs.s.contexts._.config);const o=ix(i);this._onModuleLoaded=this._protocol.sendMessage(sq,[this._worker.getId(),JSON.parse(JSON.stringify(s)),t,o]);const a=(l,c)=>this._request(l,c);this._lazyProxy=new Promise((l,c)=>{n=c,this._onModuleLoaded.then(h=>{l(y2(h,a))},h=>{c(h),this._onError("Worker failed to load "+t,h)})})}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)}}var xx;const U2=(xx=window.trustedTypes)===null||xx===void 0?void 0:xx.createPolicy("defaultWorkerFactory",{createScriptURL:r=>r});function lq(r,e){if(wi.MonacoEnvironment){if(typeof wi.MonacoEnvironment.getWorker=="function")return wi.MonacoEnvironment.getWorker(r,e);if(typeof wi.MonacoEnvironment.getWorkerUrl=="function"){const t=wi.MonacoEnvironment.getWorkerUrl(r,e);return new Worker(U2?U2.createScriptURL(t):t,{name:e})}}throw new Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}function cq(r){return typeof r.then=="function"}class hq{constructor(e,t,i,n,s){this.id=t;const o=lq("workerMain.js",i);cq(o)?this.worker=o:this.worker=Promise.resolve(o),this.postMessage(e,[]),this.worker.then(a=>{a.onmessage=function(l){n(l.data)},a.onmessageerror=s,typeof a.addEventListener=="function"&&a.addEventListener("error",s)})}getId(){return this.id}postMessage(e,t){this.worker&&this.worker.then(i=>i.postMessage(e,t))}dispose(){this.worker&&this.worker.then(e=>e.terminate()),this.worker=null}}class Wv{constructor(e){this._label=e,this._webWorkerFailedBeforeError=!1}create(e,t,i){let n=++Wv.LAST_WORKER_ID;if(this._webWorkerFailedBeforeError)throw this._webWorkerFailedBeforeError;return new hq(e,n,this._label||"anonymous"+n,t,s=>{Lx(s),this._webWorkerFailedBeforeError=s,i(s)})}}Wv.LAST_WORKER_ID=0;var pi;(function(r){r[r.None=0]="None",r[r.Indent=1]="Indent",r[r.IndentOutdent=2]="IndentOutdent",r[r.Outdent=3]="Outdent"})(pi||(pi={}));class kx{constructor(e){if(this._standardAutoClosingPairConditionalBrand=void 0,this.open=e.open,this.close=e.close,this._standardTokenMask=0,Array.isArray(e.notIn))for(let t=0,i=e.notIn.length;t<i;t++)switch(e.notIn[t]){case"string":this._standardTokenMask|=2;break;case"comment":this._standardTokenMask|=1;break;case"regex":this._standardTokenMask|=4;break}}isOK(e){return(this._standardTokenMask&e)==0}}class uq{constructor(e){this.autoClosingPairsOpenByStart=new Map,this.autoClosingPairsOpenByEnd=new Map,this.autoClosingPairsCloseByStart=new Map,this.autoClosingPairsCloseByEnd=new Map,this.autoClosingPairsCloseSingleChar=new Map;for(const t of e)xp(this.autoClosingPairsOpenByStart,t.open.charAt(0),t),xp(this.autoClosingPairsOpenByEnd,t.open.charAt(t.open.length-1),t),xp(this.autoClosingPairsCloseByStart,t.close.charAt(0),t),xp(this.autoClosingPairsCloseByEnd,t.close.charAt(t.close.length-1),t),t.close.length===1&&t.open.length===1&&xp(this.autoClosingPairsCloseSingleChar,t.close,t)}}function xp(r,e,t){r.has(e)?r.get(e).push(t):r.set(e,[t])}function Vv(r,e){let t=r.getCount(),i=r.findTokenIndexAtOffset(e),n=r.getLanguageId(i),s=i;for(;s+1<t&&r.getLanguageId(s+1)===n;)s++;let o=i;for(;o>0&&r.getLanguageId(o-1)===n;)o--;return new dq(r,n,o,s+1,r.getStartOffset(o),r.getEndOffset(s))}class dq{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 Uo(r){return(r&7)!=0}class $d{constructor(e){if(e.autoClosingPairs?this._autoClosingPairs=e.autoClosingPairs.map(t=>new kx(t)):e.brackets?this._autoClosingPairs=e.brackets.map(t=>new kx({open:t[0],close:t[1]})):this._autoClosingPairs=[],e.colorizedBracketPairs?this._colorizedBracketPairs=e.colorizedBracketPairs.map(t=>[t[0],t[1]]):e.brackets?this._colorizedBracketPairs=e.brackets.map(t=>[t[0],t[1]]).filter(t=>!(t[0]==="<"&&t[1]===">")):this._colorizedBracketPairs=[],e.__electricCharacterSupport&&e.__electricCharacterSupport.docComment){const t=e.__electricCharacterSupport.docComment;this._autoClosingPairs.push(new kx({open:t.open,close:t.close||""}))}this._autoCloseBefore=typeof e.autoCloseBefore=="string"?e.autoCloseBefore:$d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED,this._surroundingPairs=e.surroundingPairs||this._autoClosingPairs}getAutoClosingPairs(){return this._autoClosingPairs}getAutoCloseBeforeSet(){return this._autoCloseBefore}static shouldAutoClosePair(e,t,i){if(t.getTokenCount()===0)return!0;const n=t.findTokenIndexAtOffset(i-2),s=t.getStandardTokenType(n);return e.isOK(s)}getSurroundingPairs(){return this._surroundingPairs}getColorizedBrackets(){return this._colorizedBracketPairs}}$d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED=`;:.,=}])> - `;let Dx;function j2(){return Dx||(Dx=new TextDecoder("UTF-16LE")),Dx}let Ex;function fq(){return Ex||(Ex=new TextDecoder("UTF-16BE")),Ex}let Ix;function K2(){return Ix||(Ix=_M()?j2():fq()),Ix}const q2=typeof TextDecoder!="undefined";let Sh,Nx;q2?(Sh=r=>new pq(r),Nx=gq):(Sh=r=>new mq,Nx=G2);function gq(r,e,t){const i=new Uint16Array(r.buffer,e,t);return t>0&&(i[0]===65279||i[0]===65534)?G2(r,e,t):j2().decode(i)}function G2(r,e,t){let i=[],n=0;for(let s=0;s<t;s++){const o=oK(r,e);e+=2,i[n++]=String.fromCharCode(o)}return i.join("")}class pq{constructor(e){this._capacity=e|0,this._buffer=new Uint16Array(this._capacity),this._completedStrings=null,this._bufferLength=0}reset(){this._completedStrings=null,this._bufferLength=0}build(){return this._completedStrings!==null?(this._flushBuffer(),this._completedStrings.join("")):this._buildBuffer()}_buildBuffer(){if(this._bufferLength===0)return"";const e=new Uint16Array(this._buffer.buffer,0,this._bufferLength);return K2().decode(e)}_flushBuffer(){const e=this._buildBuffer();this._bufferLength=0,this._completedStrings===null?this._completedStrings=[e]:this._completedStrings[this._completedStrings.length]=e}write1(e){const t=this._capacity-this._bufferLength;t<=1&&(t===0||ji(e))&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCII(e){this._bufferLength===this._capacity&&this._flushBuffer(),this._buffer[this._bufferLength++]=e}appendASCIIString(e){const t=e.length;if(this._bufferLength+t>=this._capacity){this._flushBuffer(),this._completedStrings[this._completedStrings.length]=e;return}for(let i=0;i<t;i++)this._buffer[this._bufferLength++]=e.charCodeAt(i)}}class mq{constructor(){this._pieces=[],this._piecesLen=0}reset(){this._pieces=[],this._piecesLen=0}build(){return this._pieces.join("")}write1(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCII(e){this._pieces[this._piecesLen++]=String.fromCharCode(e)}appendASCIIString(e){this._pieces[this._piecesLen++]=e}}class Hv{constructor(e,t,i,n,s,o){this._richEditBracketBrand=void 0,this.languageIdentifier=e,this.index=t,this.open=i,this.close=n,this.forwardRegex=s,this.reversedRegex=o,this._openSet=Hv._toSet(this.open),this._closeSet=Hv._toSet(this.close)}isOpen(e){return this._openSet.has(e)}isClose(e){return this._closeSet.has(e)}static _toSet(e){const t=new Set;for(const i of e)t.add(i);return t}}function _q(r){const e=r.length;r=r.map(o=>[o[0].toLowerCase(),o[1].toLowerCase()]);const t=[];for(let o=0;o<e;o++)t[o]=o;const i=(o,a)=>{const[l,c]=o,[h,u]=a;return l===h||l===u||c===h||c===u},n=(o,a)=>{const l=Math.min(o,a),c=Math.max(o,a);for(let h=0;h<e;h++)t[h]===c&&(t[h]=l)};for(let o=0;o<e;o++){const a=r[o];for(let l=o+1;l<e;l++){const c=r[l];i(a,c)&&n(t[o],t[l])}}const s=[];for(let o=0;o<e;o++){let a=[],l=[];for(let c=0;c<e;c++)if(t[c]===o){const[h,u]=r[c];a.push(h),l.push(u)}a.length>0&&s.push({open:a,close:l})}return s}class bq{constructor(e,t){this._richEditBracketsBrand=void 0;const i=_q(t);this.brackets=i.map((n,s)=>new Hv(e,s,n.open,n.close,vq(n.open,n.close,i,s),Cq(n.open,n.close,i,s))),this.forwardRegex=wq(this.brackets),this.reversedRegex=yq(this.brackets),this.textIsBracket={},this.textIsOpenBracket={},this.maxBracketLength=0;for(const n of this.brackets){for(const s of n.open)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!0,this.maxBracketLength=Math.max(this.maxBracketLength,s.length);for(const s of n.close)this.textIsBracket[s]=n,this.textIsOpenBracket[s]=!1,this.maxBracketLength=Math.max(this.maxBracketLength,s.length)}}}function Z2(r,e,t,i){for(let n=0,s=e.length;n<s;n++){if(n===t)continue;const o=e[n];for(const a of o.open)a.indexOf(r)>=0&&i.push(a);for(const a of o.close)a.indexOf(r)>=0&&i.push(a)}}function Y2(r,e){return r.length-e.length}function zv(r){if(r.length<=1)return r;const e=[],t=new Set;for(const i of r)t.has(i)||(e.push(i),t.add(i));return e}function vq(r,e,t,i){let n=[];n=n.concat(r),n=n.concat(e);for(let s=0,o=n.length;s<o;s++)Z2(n[s],t,i,n);return n=zv(n),n.sort(Y2),n.reverse(),$v(n)}function Cq(r,e,t,i){let n=[];n=n.concat(r),n=n.concat(e);for(let s=0,o=n.length;s<o;s++)Z2(n[s],t,i,n);return n=zv(n),n.sort(Y2),n.reverse(),$v(n.map(Tx))}function wq(r){let e=[];for(const t of r){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=zv(e),$v(e)}function yq(r){let e=[];for(const t of r){for(const i of t.open)e.push(i);for(const i of t.close)e.push(i)}return e=zv(e),$v(e.map(Tx))}function Sq(r){const e=/^[\w ]+$/.test(r);return r=Cs(r),e?`\\b${r}\\b`:r}function $v(r){let e=`(${r.map(Sq).join(")|(")})`;return s2(e,!0)}const Tx=function(){function r(i){if(q2){const n=new Uint16Array(i.length);let s=0;for(let o=i.length-1;o>=0;o--)n[s++]=i.charCodeAt(o);return K2().decode(n)}else{let n=[],s=0;for(let o=i.length-1;o>=0;o--)n[s++]=i.charAt(o);return n.join("")}}let e=null,t=null;return function(n){return e!==n&&(e=n,t=r(e)),t}}();class Es{static _findPrevBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let o=i.length-(s.index||0),a=s[0].length,l=n+o;return new k(t,l-a+1,t,l+1)}static findPrevBracketInRange(e,t,i,n,s){const a=Tx(i).substring(i.length-s,i.length-n);return this._findPrevBracketInText(e,t,a,n)}static findNextBracketInText(e,t,i,n){let s=i.match(e);if(!s)return null;let o=s.index||0,a=s[0].length;if(a===0)return null;let l=n+o;return new k(t,l+1,t,l+1+a)}static findNextBracketInRange(e,t,i,n,s){const o=i.substring(n,s);return this.findNextBracketInText(e,t,o,n)}}class Lq{constructor(e){this._richEditBrackets=e}getElectricCharacters(){let e=[];if(this._richEditBrackets)for(const t of this._richEditBrackets.brackets)for(const i of t.close){const n=i.charAt(i.length-1);e.push(n)}return e=e.filter((t,i,n)=>n.indexOf(t)===i),e}onElectricCharacter(e,t,i){if(!this._richEditBrackets||this._richEditBrackets.brackets.length===0)return null;const n=t.findTokenIndexAtOffset(i-1);if(Uo(t.getStandardTokenType(n)))return null;const s=this._richEditBrackets.reversedRegex,o=t.getLineContent().substring(0,i-1)+e,a=Es.findPrevBracketInRange(s,1,o,0,o.length);if(!a)return null;const l=o.substring(a.startColumn-1,a.endColumn-1).toLowerCase();if(this._richEditBrackets.textIsOpenBracket[l])return null;const h=t.getActualLineContentBefore(a.startColumn-1);return/^\s*$/.test(h)?{matchOpenBracket:l}:null}}function Uv(r){return r.global&&(r.lastIndex=0),!0}class xq{constructor(e){this._indentationRules=e}shouldIncrease(e){return!!(this._indentationRules&&this._indentationRules.increaseIndentPattern&&Uv(this._indentationRules.increaseIndentPattern)&&this._indentationRules.increaseIndentPattern.test(e))}shouldDecrease(e){return!!(this._indentationRules&&this._indentationRules.decreaseIndentPattern&&Uv(this._indentationRules.decreaseIndentPattern)&&this._indentationRules.decreaseIndentPattern.test(e))}shouldIndentNextLine(e){return!!(this._indentationRules&&this._indentationRules.indentNextLinePattern&&Uv(this._indentationRules.indentNextLinePattern)&&this._indentationRules.indentNextLinePattern.test(e))}shouldIgnore(e){return!!(this._indentationRules&&this._indentationRules.unIndentedLinePattern&&Uv(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 Ud{constructor(e){e=e||{},e.brackets=e.brackets||[["(",")"],["{","}"],["[","]"]],this._brackets=[],e.brackets.forEach(t=>{const i=Ud._createOpenBracketRegExp(t[0]),n=Ud._createCloseBracketRegExp(t[1]);i&&n&&this._brackets.push({open:t[0],openRegExp:i,close:t[1],closeRegExp:n})}),this._regExpRules=e.onEnterRules||[]}onEnter(e,t,i,n){if(e>=3)for(let s=0,o=this._regExpRules.length;s<o;s++){let a=this._regExpRules[s];if([{reg:a.beforeText,text:i},{reg:a.afterText,text:n},{reg:a.previousLineText,text:t}].every(c=>c.reg?(c.reg.lastIndex=0,c.reg.test(c.text)):!0))return a.action}if(e>=2&&i.length>0&&n.length>0)for(let s=0,o=this._brackets.length;s<o;s++){let a=this._brackets[s];if(a.openRegExp.test(i)&&a.closeRegExp.test(n))return{indentAction:pi.IndentOutdent}}if(e>=2&&i.length>0){for(let s=0,o=this._brackets.length;s<o;s++)if(this._brackets[s].openRegExp.test(i))return{indentAction:pi.Indent}}return null}static _createOpenBracketRegExp(e){let t=Cs(e);return/\B/.test(t.charAt(0))||(t="\\b"+t),t+="\\s*$",Ud._safeRegExp(t)}static _createCloseBracketRegExp(e){let t=Cs(e);return/\B/.test(t.charAt(t.length-1))||(t=t+"\\b"),t="^\\s*"+t,Ud._safeRegExp(t)}static _safeRegExp(e){try{return new RegExp(e)}catch(t){return Oe(t),null}}}class Ax{constructor(e,t){this._languageIdentifier=e,this._brackets=null,this._electricCharacter=null,this._conf=t,this._onEnterSupport=this._conf.brackets||this._conf.indentationRules||this._conf.onEnterRules?new Ud(this._conf):null,this.comments=Ax._handleComments(this._conf),this.characterPair=new $d(this._conf),this.wordDefinition=this._conf.wordPattern||vM,this.indentationRules=this._conf.indentationRules,this._conf.indentationRules?this.indentRulesSupport=new xq(this._conf.indentationRules):this.indentRulesSupport=null,this.foldingRules=this._conf.folding||{}}get brackets(){return!this._brackets&&this._conf.brackets&&(this._brackets=new bq(this._languageIdentifier,this._conf.brackets)),this._brackets}get electricCharacter(){return this._electricCharacter||(this._electricCharacter=new Lq(this.brackets)),this._electricCharacter}onEnter(e,t,i,n){return this._onEnterSupport?this._onEnterSupport.onEnter(e,t,i,n):null}static _handleComments(e){let t=e.comments;if(!t)return null;let i={};if(t.lineComment&&(i.lineCommentToken=t.lineComment),t.blockComment){let[n,s]=t.blockComment;i.blockCommentStartToken=n,i.blockCommentEndToken=s}return i}}class X2{constructor(e){this.languageIdentifier=e}}class Q2{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 kq{constructor(e){this.languageIdentifier=e,this._resolved=null,this._entries=[],this._order=0,this._resolved=null}register(e,t){const i=new Q2(e,t,++this._order);return this._entries.push(i),this._resolved=null,Xe(()=>{for(let n=0;n<this._entries.length;n++)if(this._entries[n]===i){this._entries.splice(n,1),this._resolved=null;break}})}getRichEditSupport(){if(!this._resolved){const e=this._resolve();e&&(this._resolved=new Ax(this.languageIdentifier,e))}return this._resolved}_resolve(){if(this._entries.length===0)return null;this._entries.sort(Q2.cmp);const e={};for(const t of this._entries){const i=t.configuration;e.comments=i.comments||e.comments,e.brackets=i.brackets||e.brackets,e.wordPattern=i.wordPattern||e.wordPattern,e.indentationRules=i.indentationRules||e.indentationRules,e.onEnterRules=i.onEnterRules||e.onEnterRules,e.autoClosingPairs=i.autoClosingPairs||e.autoClosingPairs,e.surroundingPairs=i.surroundingPairs||e.surroundingPairs,e.autoCloseBefore=i.autoCloseBefore||e.autoCloseBefore,e.folding=i.folding||e.folding,e.colorizedBracketPairs=i.colorizedBracketPairs||e.colorizedBracketPairs,e.__electricCharacterSupport=i.__electricCharacterSupport||e.__electricCharacterSupport}return e}}class Dq{constructor(){this._entries=new Map,this._onDidChange=new H,this.onDidChange=this._onDidChange.event}register(e,t,i=0){let n=this._entries.get(e.id);n||(n=new kq(e),this._entries.set(e.id,n));const s=n.register(t,i);return this._onDidChange.fire(new X2(e)),Xe(()=>{s.dispose(),this._onDidChange.fire(new X2(e))})}_getRichEditSupport(e){const t=this._entries.get(e);return t?t.getRichEditSupport():null}getIndentationRules(e){const t=this._getRichEditSupport(e);return t&&t.indentationRules||null}_getElectricCharacterSupport(e){let t=this._getRichEditSupport(e);return t&&t.electricCharacter||null}getElectricCharacters(e){let t=this._getElectricCharacterSupport(e);return t?t.getElectricCharacters():[]}onElectricCharacter(e,t,i){let n=Vv(t,i-1),s=this._getElectricCharacterSupport(n.languageId);return s?s.onElectricCharacter(e,n,i-n.firstCharOffset):null}getComments(e){let t=this._getRichEditSupport(e);return t&&t.comments||null}_getCharacterPairSupport(e){let t=this._getRichEditSupport(e);return t&&t.characterPair||null}getAutoClosingPairs(e){const t=this._getCharacterPairSupport(e);return new uq(t?t.getAutoClosingPairs():[])}getAutoCloseBeforeSet(e){let t=this._getCharacterPairSupport(e);return t?t.getAutoCloseBeforeSet():$d.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED}getSurroundingPairs(e){let t=this._getCharacterPairSupport(e);return t?t.getSurroundingPairs():[]}shouldAutoClosePair(e,t,i){const n=Vv(t,i-1);return $d.shouldAutoClosePair(e,n,i-n.firstCharOffset)}getWordDefinition(e){let t=this._getRichEditSupport(e);return kS(t&&t.wordDefinition||null)}getFoldingRules(e){let t=this._getRichEditSupport(e);return t?t.foldingRules:{}}getIndentRulesSupport(e){let t=this._getRichEditSupport(e);return t&&t.indentRulesSupport||null}getPrecedingValidLine(e,t,i){let n=e.getLanguageIdAtPosition(t,0);if(t>1){let s,o=-1;for(s=t-1;s>=1;s--){if(e.getLanguageIdAtPosition(s,0)!==n)return o;let a=e.getLineContent(s);if(i.shouldIgnore(a)||/^\s+$/.test(a)||a===""){o=s;continue}return s}}return-1}getInheritIndentForLine(e,t,i,n=!0){if(e<4)return null;const s=this.getIndentRulesSupport(t.getLanguageIdentifier().id);if(!s)return null;if(i<=1)return{indentation:"",action:null};const o=this.getPrecedingValidLine(t,i,s);if(o<0)return null;if(o<1)return{indentation:"",action:null};const a=t.getLineContent(o);if(s.shouldIncrease(a)||s.shouldIndentNextLine(a))return{indentation:Dt(a),action:pi.Indent,line:o};if(s.shouldDecrease(a))return{indentation:Dt(a),action:null,line:o};{if(o===1)return{indentation:Dt(t.getLineContent(o)),action:null,line:o};const l=o-1,c=s.getIndentMetadata(t.getLineContent(l));if(!(c&(1|2))&&c&4){let h=0;for(let u=l-1;u>0;u--)if(!s.shouldIndentNextLine(t.getLineContent(u))){h=u;break}return{indentation:Dt(t.getLineContent(h+1)),action:null,line:h+1}}if(n)return{indentation:Dt(t.getLineContent(o)),action:null,line:o};for(let h=o;h>0;h--){const u=t.getLineContent(h);if(s.shouldIncrease(u))return{indentation:Dt(u),action:pi.Indent,line:h};if(s.shouldIndentNextLine(u)){let d=0;for(let f=h-1;f>0;f--)if(!s.shouldIndentNextLine(t.getLineContent(h))){d=f;break}return{indentation:Dt(t.getLineContent(d+1)),action:null,line:d+1}}else if(s.shouldDecrease(u))return{indentation:Dt(u),action:null,line:h}}return{indentation:Dt(t.getLineContent(1)),action:null,line:1}}}getGoodIndentForLine(e,t,i,n,s){if(e<4)return null;const o=this._getRichEditSupport(i);if(!o)return null;const a=this.getIndentRulesSupport(i);if(!a)return null;const l=this.getInheritIndentForLine(e,t,n),c=t.getLineContent(n);if(l){const h=l.line;if(h!==void 0){const u=o.onEnter(e,"",t.getLineContent(h),"");if(u){let d=Dt(t.getLineContent(h));return u.removeText&&(d=d.substring(0,d.length-u.removeText)),u.indentAction===pi.Indent||u.indentAction===pi.IndentOutdent?d=s.shiftIndent(d):u.indentAction===pi.Outdent&&(d=s.unshiftIndent(d)),a.shouldDecrease(c)&&(d=s.unshiftIndent(d)),u.appendText&&(d+=u.appendText),Dt(d)}}return a.shouldDecrease(c)?l.action===pi.Indent?l.indentation:s.unshiftIndent(l.indentation):l.action===pi.Indent?s.shiftIndent(l.indentation):l.indentation}return null}getIndentForEnter(e,t,i,n){if(e<4)return null;t.forceTokenization(i.startLineNumber);const s=t.getLineTokens(i.startLineNumber),o=Vv(s,i.startColumn-1),a=o.getLineContent();let l=!1,c;o.firstCharOffset>0&&s.getLanguageId(0)!==o.languageId?(l=!0,c=a.substr(0,i.startColumn-1-o.firstCharOffset)):c=s.getLineContent().substring(0,i.startColumn-1);let h;i.isEmpty()?h=a.substr(i.startColumn-1-o.firstCharOffset):h=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-o.firstCharOffset);const u=this.getIndentRulesSupport(o.languageId);if(!u)return null;const d=c,f=Dt(c),g={getLineTokens:b=>t.getLineTokens(b),getLanguageIdentifier:()=>t.getLanguageIdentifier(),getLanguageIdAtPosition:(b,C)=>t.getLanguageIdAtPosition(b,C),getLineContent:b=>b===i.startLineNumber?d:t.getLineContent(b)},p=Dt(s.getLineContent()),_=this.getInheritIndentForLine(e,g,i.startLineNumber+1);if(!_){const b=l?p:f;return{beforeEnter:b,afterEnter:b}}let v=l?p:_.indentation;return _.action===pi.Indent&&(v=n.shiftIndent(v)),u.shouldDecrease(h)&&(v=n.unshiftIndent(v)),{beforeEnter:l?p:f,afterEnter:v}}getIndentActionForType(e,t,i,n,s){if(e<4)return null;const o=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn);if(o.firstCharOffset)return null;const a=this.getIndentRulesSupport(o.languageId);if(!a)return null;const l=o.getLineContent(),c=l.substr(0,i.startColumn-1-o.firstCharOffset);let h;if(i.isEmpty()?h=l.substr(i.startColumn-1-o.firstCharOffset):h=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-o.firstCharOffset),!a.shouldDecrease(c+h)&&a.shouldDecrease(c+n+h)){const u=this.getInheritIndentForLine(e,t,i.startLineNumber,!1);if(!u)return null;let d=u.indentation;return u.action!==pi.Indent&&(d=s.unshiftIndent(d)),d}return null}getIndentMetadata(e,t){const i=this.getIndentRulesSupport(e.getLanguageIdentifier().id);return!i||t<1||t>e.getLineCount()?null:i.getIndentMetadata(e.getLineContent(t))}getEnterAction(e,t,i){const n=this.getScopedLineTokens(t,i.startLineNumber,i.startColumn),s=this._getRichEditSupport(n.languageId);if(!s)return null;const o=n.getLineContent(),a=o.substr(0,i.startColumn-1-n.firstCharOffset);let l;i.isEmpty()?l=o.substr(i.startColumn-1-n.firstCharOffset):l=this.getScopedLineTokens(t,i.endLineNumber,i.endColumn).getLineContent().substr(i.endColumn-1-n.firstCharOffset);let c="";if(i.startLineNumber>1&&n.firstCharOffset===0){const p=this.getScopedLineTokens(t,i.startLineNumber-1);p.languageId===n.languageId&&(c=p.getLineContent())}const h=s.onEnter(e,c,a,l);if(!h)return null;const u=h.indentAction;let d=h.appendText;const f=h.removeText||0;d?u===pi.Indent&&(d=" "+d):u===pi.Indent||u===pi.IndentOutdent?d=" ":d="";let g=this.getIndentationAtPosition(t,i.startLineNumber,i.startColumn);return f&&(g=g.substring(0,g.length-f)),{indentAction:u,appendText:d,removeText:f,indentation:g}}getIndentationAtPosition(e,t,i){const n=e.getLineContent(t);let s=Dt(n);return s.length>i-1&&(s=s.substring(0,i-1)),s}getScopedLineTokens(e,t,i){e.forceTokenization(t);const n=e.getLineTokens(t),s=typeof i=="undefined"?e.getLineMaxColumn(t)-1:i-1;return Vv(n,s)}getBracketsSupport(e){const t=this._getRichEditSupport(e);return t&&t.brackets||null}getColorizedBracketPairs(e){var t;return((t=this._getRichEditSupport(e))===null||t===void 0?void 0:t.characterPair.getColorizedBrackets())||[]}}const ze=new Dq;class ql{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 J2{constructor(e){this.source=e}getElements(){const e=this.source,t=new Int32Array(e.length);for(let i=0,n=e.length;i<n;i++)t[i]=e.charCodeAt(i);return t}}function Eq(r,e,t){return new jo(new J2(r),new J2(e)).ComputeDiff(t).changes}class jd{static Assert(e,t){if(!e)throw new Error(t)}}class Kd{static Copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}static Copy2(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}}class eP{constructor(){this.m_changes=[],this.m_originalStart=1073741824,this.m_modifiedStart=1073741824,this.m_originalCount=0,this.m_modifiedCount=0}MarkNextChange(){(this.m_originalCount>0||this.m_modifiedCount>0)&&this.m_changes.push(new ql(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 jo{constructor(e,t,i=null){this.ContinueProcessingPredicate=i,this._originalSequence=e,this._modifiedSequence=t;const[n,s,o]=jo._getElements(e),[a,l,c]=jo._getElements(t);this._hasStrings=o&&c,this._originalStringElements=n,this._originalElementsOrHash=s,this._modifiedStringElements=a,this._modifiedElementsOrHash=l,this.m_forwardHistory=[],this.m_reverseHistory=[]}static _isStringArray(e){return e.length>0&&typeof e[0]=="string"}static _getElements(e){const t=e.getElements();if(jo._isStringArray(t)){const i=new Int32Array(t.length);for(let n=0,s=t.length;n<s;n++)i[n]=dx(t[n],0);return[t,i,!0]}return t instanceof Int32Array?[[],t,!1]:[[],new Int32Array(t),!1]}ElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._modifiedStringElements[t]:!0}ElementsAreStrictEqual(e,t){if(!this.ElementsAreEqual(e,t))return!1;const i=jo._getStrictElement(this._originalSequence,e),n=jo._getStrictElement(this._modifiedSequence,t);return i===n}static _getStrictElement(e,t){return typeof e.getStrictElement=="function"?e.getStrictElement(t):null}OriginalElementsAreEqual(e,t){return this._originalElementsOrHash[e]!==this._originalElementsOrHash[t]?!1:this._hasStrings?this._originalStringElements[e]===this._originalStringElements[t]:!0}ModifiedElementsAreEqual(e,t){return this._modifiedElementsOrHash[e]!==this._modifiedElementsOrHash[t]?!1:this._hasStrings?this._modifiedStringElements[e]===this._modifiedStringElements[t]:!0}ComputeDiff(e){return this._ComputeDiff(0,this._originalElementsOrHash.length-1,0,this._modifiedElementsOrHash.length-1,e)}_ComputeDiff(e,t,i,n,s){const o=[!1];let a=this.ComputeDiffRecursive(e,t,i,n,o);return s&&(a=this.PrettifyChanges(a)),{quitEarly:o[0],changes:a}}ComputeDiffRecursive(e,t,i,n,s){for(s[0]=!1;e<=t&&i<=n&&this.ElementsAreEqual(e,i);)e++,i++;for(;t>=e&&n>=i&&this.ElementsAreEqual(t,n);)t--,n--;if(e>t||i>n){let u;return i<=n?(jd.Assert(e===t+1,"originalStart should only be one more than originalEnd"),u=[new ql(e,0,i,n-i+1)]):e<=t?(jd.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[new ql(e,t-e+1,i,0)]):(jd.Assert(e===t+1,"originalStart should only be one more than originalEnd"),jd.Assert(i===n+1,"modifiedStart should only be one more than modifiedEnd"),u=[]),u}const o=[0],a=[0],l=this.ComputeRecursionPoint(e,t,i,n,o,a,s),c=o[0],h=a[0];if(l!==null)return l;if(!s[0]){const u=this.ComputeDiffRecursive(e,c,i,h,s);let d=[];return s[0]?d=[new ql(c+1,t-(c+1)+1,h+1,n-(h+1)+1)]:d=this.ComputeDiffRecursive(c+1,t,h+1,n,s),this.ConcatenateChanges(u,d)}return[new ql(e,t-e+1,i,n-i+1)]}WALKTRACE(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p,_,v,b){let C=null,y=null,x=new eP,S=t,w=i,L=f[0]-_[0]-n,N=-1073741824,P=this.m_forwardHistory.length-1;do{const B=L+e;B===S||B<w&&c[B-1]<c[B+1]?(u=c[B+1],g=u-L-n,u<N&&x.MarkNextChange(),N=u,x.AddModifiedElement(u+1,g),L=B+1-e):(u=c[B-1]+1,g=u-L-n,u<N&&x.MarkNextChange(),N=u-1,x.AddOriginalElement(u,g+1),L=B-1-e),P>=0&&(c=this.m_forwardHistory[P],e=c[0],S=1,w=c.length-1)}while(--P>=-1);if(C=x.getReverseChanges(),b[0]){let B=f[0]+1,U=_[0]+1;if(C!==null&&C.length>0){const j=C[C.length-1];B=Math.max(B,j.getOriginalEnd()),U=Math.max(U,j.getModifiedEnd())}y=[new ql(B,d-B+1,U,p-U+1)]}else{x=new eP,S=o,w=a,L=f[0]-_[0]-l,N=1073741824,P=v?this.m_reverseHistory.length-1:this.m_reverseHistory.length-2;do{const B=L+s;B===S||B<w&&h[B-1]>=h[B+1]?(u=h[B+1]-1,g=u-L-l,u>N&&x.MarkNextChange(),N=u+1,x.AddOriginalElement(u+1,g+1),L=B+1-s):(u=h[B-1],g=u-L-l,u>N&&x.MarkNextChange(),N=u,x.AddModifiedElement(u+1,g+1),L=B-1-s),P>=0&&(h=this.m_reverseHistory[P],s=h[0],S=1,w=h.length-1)}while(--P>=-1);y=x.getChanges()}return this.ConcatenateChanges(C,y)}ComputeRecursionPoint(e,t,i,n,s,o,a){let l=0,c=0,h=0,u=0,d=0,f=0;e--,i--,s[0]=0,o[0]=0,this.m_forwardHistory=[],this.m_reverseHistory=[];const g=t-e+(n-i),p=g+1,_=new Int32Array(p),v=new Int32Array(p),b=n-i,C=t-e,y=e-i,x=t-n,w=(C-b)%2==0;_[b]=e,v[C]=t,a[0]=!1;for(let L=1;L<=g/2+1;L++){let N=0,P=0;h=this.ClipDiagonalBound(b-L,L,b,p),u=this.ClipDiagonalBound(b+L,L,b,p);for(let U=h;U<=u;U+=2){U===h||U<u&&_[U-1]<_[U+1]?l=_[U+1]:l=_[U-1]+1,c=l-(U-b)-y;const j=l;for(;l<t&&c<n&&this.ElementsAreEqual(l+1,c+1);)l++,c++;if(_[U]=l,l+c>N+P&&(N=l,P=c),!w&&Math.abs(U-C)<=L-1&&l>=v[U])return s[0]=l,o[0]=c,j<=v[U]&&1447>0&&L<=1447+1?this.WALKTRACE(b,h,u,y,C,d,f,x,_,v,l,t,s,c,n,o,w,a):null}const B=(N-e+(P-i)-L)/2;if(this.ContinueProcessingPredicate!==null&&!this.ContinueProcessingPredicate(N,B))return a[0]=!0,s[0]=N,o[0]=P,B>0&&1447>0&&L<=1447+1?this.WALKTRACE(b,h,u,y,C,d,f,x,_,v,l,t,s,c,n,o,w,a):(e++,i++,[new ql(e,t-e+1,i,n-i+1)]);d=this.ClipDiagonalBound(C-L,L,C,p),f=this.ClipDiagonalBound(C+L,L,C,p);for(let U=d;U<=f;U+=2){U===d||U<f&&v[U-1]>=v[U+1]?l=v[U+1]-1:l=v[U-1],c=l-(U-C)-x;const j=l;for(;l>e&&c>i&&this.ElementsAreEqual(l,c);)l--,c--;if(v[U]=l,w&&Math.abs(U-b)<=L&&l<=_[U])return s[0]=l,o[0]=c,j>=_[U]&&1447>0&&L<=1447+1?this.WALKTRACE(b,h,u,y,C,d,f,x,_,v,l,t,s,c,n,o,w,a):null}if(L<=1447){let U=new Int32Array(u-h+2);U[0]=b-h+1,Kd.Copy2(_,h,U,1,u-h+1),this.m_forwardHistory.push(U),U=new Int32Array(f-d+2),U[0]=C-d+1,Kd.Copy2(v,d,U,1,f-d+1),this.m_reverseHistory.push(U)}}return this.WALKTRACE(b,h,u,y,C,d,f,x,_,v,l,t,s,c,n,o,w,a)}PrettifyChanges(e){for(let t=0;t<e.length;t++){const i=e[t],n=t<e.length-1?e[t+1].originalStart:this._originalElementsOrHash.length,s=t<e.length-1?e[t+1].modifiedStart:this._modifiedElementsOrHash.length,o=i.originalLength>0,a=i.modifiedLength>0;for(;i.originalStart+i.originalLength<n&&i.modifiedStart+i.modifiedLength<s&&(!o||this.OriginalElementsAreEqual(i.originalStart,i.originalStart+i.originalLength))&&(!a||this.ModifiedElementsAreEqual(i.modifiedStart,i.modifiedStart+i.modifiedLength));){const c=this.ElementsAreStrictEqual(i.originalStart,i.modifiedStart);if(this.ElementsAreStrictEqual(i.originalStart+i.originalLength,i.modifiedStart+i.modifiedLength)&&!c)break;i.originalStart++,i.modifiedStart++}let l=[null];if(t<e.length-1&&this.ChangesOverlap(e[t],e[t+1],l)){e[t]=l[0],e.splice(t+1,1),t--;continue}}for(let t=e.length-1;t>=0;t--){const i=e[t];let n=0,s=0;if(t>0){const u=e[t-1];n=u.originalStart+u.originalLength,s=u.modifiedStart+u.modifiedLength}const o=i.originalLength>0,a=i.modifiedLength>0;let l=0,c=this._boundaryScore(i.originalStart,i.originalLength,i.modifiedStart,i.modifiedLength);for(let u=1;;u++){const d=i.originalStart-u,f=i.modifiedStart-u;if(d<n||f<s||o&&!this.OriginalElementsAreEqual(d,d+i.originalLength)||a&&!this.ModifiedElementsAreEqual(f,f+i.modifiedLength))break;const p=(d===n&&f===s?5:0)+this._boundaryScore(d,i.originalLength,f,i.modifiedLength);p>c&&(c=p,l=u)}i.originalStart-=l,i.modifiedStart-=l;const h=[null];if(t>0&&this.ChangesOverlap(e[t-1],e[t],h)){e[t-1]=h[0],e.splice(t,1),t++;continue}}if(this._hasStrings)for(let t=1,i=e.length;t<i;t++){const n=e[t-1],s=e[t],o=s.originalStart-n.originalStart-n.originalLength,a=n.originalStart,l=s.originalStart+s.originalLength,c=l-a,h=n.modifiedStart,u=s.modifiedStart+s.modifiedLength,d=u-h;if(o<5&&c<20&&d<20){const f=this._findBetterContiguousSequence(a,c,h,d,o);if(f){const[g,p]=f;(g!==n.originalStart+n.originalLength||p!==n.modifiedStart+n.modifiedLength)&&(n.originalLength=g-n.originalStart,n.modifiedLength=p-n.modifiedStart,s.originalStart=g+o,s.modifiedStart=p+o,s.originalLength=l-s.originalStart,s.modifiedLength=u-s.modifiedStart)}}}return e}_findBetterContiguousSequence(e,t,i,n,s){if(t<s||n<s)return null;const o=e+t-s+1,a=i+n-s+1;let l=0,c=0,h=0;for(let u=e;u<o;u++)for(let d=i;d<a;d++){const f=this._contiguousSequenceScore(u,d,s);f>0&&f>l&&(l=f,c=u,h=d)}return l>0?[c,h]:null}_contiguousSequenceScore(e,t,i){let n=0;for(let s=0;s<i;s++){if(!this.ElementsAreEqual(e+s,t+s))return 0;n+=this._originalStringElements[e+s].length}return n}_OriginalIsBoundary(e){return e<=0||e>=this._originalElementsOrHash.length-1?!0: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?!0: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){const s=this._OriginalRegionIsBoundary(e,t)?1:0,o=this._ModifiedRegionIsBoundary(i,n)?1:0;return s+o}ConcatenateChanges(e,t){let i=[];if(e.length===0||t.length===0)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 Kd.Copy(e,0,n,0,e.length-1),n[e.length-1]=i[0],Kd.Copy(t,1,n,e.length,t.length-1),n}else{const n=new Array(e.length+t.length);return Kd.Copy(e,0,n,0,e.length),Kd.Copy(t,0,n,e.length,t.length),n}}ChangesOverlap(e,t,i){if(jd.Assert(e.originalStart<=t.originalStart,"Left change is not less than or equal to right change"),jd.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 a=e.modifiedLength;return e.originalStart+e.originalLength>=t.originalStart&&(s=t.originalStart+t.originalLength-e.originalStart),e.modifiedStart+e.modifiedLength>=t.modifiedStart&&(a=t.modifiedStart+t.modifiedLength-e.modifiedStart),i[0]=new ql(n,s,o,a),!0}else return i[0]=null,!1}ClipDiagonalBound(e,t,i,n){if(e>=0&&e<n)return e;const s=i,o=n-i-1,a=t%2==0;if(e<0){const l=s%2==0;return a===l?0:1}else{const l=o%2==0;return a===l?n-1:n-2}}}const Iq=3;function tP(r,e,t,i){return new jo(r,e,t).ComputeDiff(i)}class iP{constructor(e){const t=[],i=[];for(let n=0,s=e.length;n<s;n++)t[n]=Rx(e[n],1),i[n]=Mx(e[n],1);this.lines=e,this._startColumns=t,this._endColumns=i}getElements(){const e=[];for(let t=0,i=this.lines.length;t<i;t++)e[t]=this.lines[t].substring(this._startColumns[t]-1,this._endColumns[t]-1);return e}getStrictElement(e){return this.lines[e]}getStartLineNumber(e){return e+1}getEndLineNumber(e){return e+1}createCharSequence(e,t,i){const n=[],s=[],o=[];let a=0;for(let l=t;l<=i;l++){const c=this.lines[l],h=e?this._startColumns[l]:1,u=e?this._endColumns[l]:c.length+1;for(let d=h;d<u;d++)n[a]=c.charCodeAt(d-1),s[a]=l+1,o[a]=d,a++}return new Nq(n,s,o)}}class Nq{constructor(e,t,i){this._charCodes=e,this._lineNumbers=t,this._columns=i}getElements(){return this._charCodes}getStartLineNumber(e){return this._lineNumbers[e]}getStartColumn(e){return this._columns[e]}getEndLineNumber(e){return this._lineNumbers[e]}getEndColumn(e){return this._columns[e]+1}}class kp{constructor(e,t,i,n,s,o,a,l){this.originalStartLineNumber=e,this.originalStartColumn=t,this.originalEndLineNumber=i,this.originalEndColumn=n,this.modifiedStartLineNumber=s,this.modifiedStartColumn=o,this.modifiedEndLineNumber=a,this.modifiedEndColumn=l}static createFromDiffChange(e,t,i){let n,s,o,a,l,c,h,u;return e.originalLength===0?(n=0,s=0,o=0,a=0):(n=t.getStartLineNumber(e.originalStart),s=t.getStartColumn(e.originalStart),o=t.getEndLineNumber(e.originalStart+e.originalLength-1),a=t.getEndColumn(e.originalStart+e.originalLength-1)),e.modifiedLength===0?(l=0,c=0,h=0,u=0):(l=i.getStartLineNumber(e.modifiedStart),c=i.getStartColumn(e.modifiedStart),h=i.getEndLineNumber(e.modifiedStart+e.modifiedLength-1),u=i.getEndColumn(e.modifiedStart+e.modifiedLength-1)),new kp(n,s,o,a,l,c,h,u)}}function Tq(r){if(r.length<=1)return r;const e=[r[0]];let t=e[0];for(let i=1,n=r.length;i<n;i++){const s=r[i],o=s.originalStart-(t.originalStart+t.originalLength),a=s.modifiedStart-(t.modifiedStart+t.modifiedLength);Math.min(o,a)<Iq?(t.originalLength=s.originalStart+s.originalLength-t.originalStart,t.modifiedLength=s.modifiedStart+s.modifiedLength-t.modifiedStart):(e.push(s),t=s)}return e}class Dp{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,a){let l,c,h,u,d;if(t.originalLength===0?(l=i.getStartLineNumber(t.originalStart)-1,c=0):(l=i.getStartLineNumber(t.originalStart),c=i.getEndLineNumber(t.originalStart+t.originalLength-1)),t.modifiedLength===0?(h=n.getStartLineNumber(t.modifiedStart)-1,u=0):(h=n.getStartLineNumber(t.modifiedStart),u=n.getEndLineNumber(t.modifiedStart+t.modifiedLength-1)),o&&t.originalLength>0&&t.originalLength<20&&t.modifiedLength>0&&t.modifiedLength<20&&s()){const f=i.createCharSequence(e,t.originalStart,t.originalStart+t.originalLength-1),g=n.createCharSequence(e,t.modifiedStart,t.modifiedStart+t.modifiedLength-1);let p=tP(f,g,s,!0).changes;a&&(p=Tq(p)),d=[];for(let _=0,v=p.length;_<v;_++)d.push(kp.createFromDiffChange(p[_],f,g))}return new Dp(l,c,h,u,d)}}class Aq{constructor(e,t,i){this.shouldComputeCharChanges=i.shouldComputeCharChanges,this.shouldPostProcessCharChanges=i.shouldPostProcessCharChanges,this.shouldIgnoreTrimWhitespace=i.shouldIgnoreTrimWhitespace,this.shouldMakePrettyDiff=i.shouldMakePrettyDiff,this.originalLines=e,this.modifiedLines=t,this.original=new iP(e),this.modified=new iP(t),this.continueLineDiff=nP(i.maxComputationTime),this.continueCharDiff=nP(i.maxComputationTime===0?0:Math.min(i.maxComputationTime,5e3))}computeDiff(){if(this.original.lines.length===1&&this.original.lines[0].length===0)return this.modified.lines.length===1&&this.modified.lines[0].length===0?{quitEarly:!1,changes:[]}:{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:1,modifiedStartLineNumber:1,modifiedEndLineNumber:this.modified.lines.length,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};if(this.modified.lines.length===1&&this.modified.lines[0].length===0)return{quitEarly:!1,changes:[{originalStartLineNumber:1,originalEndLineNumber:this.original.lines.length,modifiedStartLineNumber:1,modifiedEndLineNumber:1,charChanges:[{modifiedEndColumn:0,modifiedEndLineNumber:0,modifiedStartColumn:0,modifiedStartLineNumber:0,originalEndColumn:0,originalEndLineNumber:0,originalStartColumn:0,originalStartLineNumber:0}]}]};const e=tP(this.original,this.modified,this.continueLineDiff,this.shouldMakePrettyDiff),t=e.changes,i=e.quitEarly;if(this.shouldIgnoreTrimWhitespace){const a=[];for(let l=0,c=t.length;l<c;l++)a.push(Dp.createFromDiffResult(this.shouldIgnoreTrimWhitespace,t[l],this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges));return{quitEarly:i,changes:a}}const n=[];let s=0,o=0;for(let a=-1,l=t.length;a<l;a++){const c=a+1<l?t[a+1]:null,h=c?c.originalStart:this.originalLines.length,u=c?c.modifiedStart:this.modifiedLines.length;for(;s<h&&o<u;){const d=this.originalLines[s],f=this.modifiedLines[o];if(d!==f){{let g=Rx(d,1),p=Rx(f,1);for(;g>1&&p>1;){const _=d.charCodeAt(g-2),v=f.charCodeAt(p-2);if(_!==v)break;g--,p--}(g>1||p>1)&&this._pushTrimWhitespaceCharChange(n,s+1,1,g,o+1,1,p)}{let g=Mx(d,1),p=Mx(f,1);const _=d.length+1,v=f.length+1;for(;g<_&&p<v;){const b=d.charCodeAt(g-1),C=d.charCodeAt(p-1);if(b!==C)break;g++,p++}(g<_||p<v)&&this._pushTrimWhitespaceCharChange(n,s+1,g,_,o+1,p,v)}}s++,o++}c&&(n.push(Dp.createFromDiffResult(this.shouldIgnoreTrimWhitespace,c,this.original,this.modified,this.continueCharDiff,this.shouldComputeCharChanges,this.shouldPostProcessCharChanges)),s+=c.originalLength,o+=c.modifiedLength)}return{quitEarly:i,changes:n}}_pushTrimWhitespaceCharChange(e,t,i,n,s,o,a){if(this._mergeTrimWhitespaceCharChange(e,t,i,n,s,o,a))return;let l;this.shouldComputeCharChanges&&(l=[new kp(t,i,t,n,s,o,s,a)]),e.push(new Dp(t,t,s,s,l))}_mergeTrimWhitespaceCharChange(e,t,i,n,s,o,a){const l=e.length;if(l===0)return!1;const c=e[l-1];return c.originalEndLineNumber===0||c.modifiedEndLineNumber===0?!1:c.originalEndLineNumber+1===t&&c.modifiedEndLineNumber+1===s?(c.originalEndLineNumber=t,c.modifiedEndLineNumber=s,this.shouldComputeCharChanges&&c.charChanges&&c.charChanges.push(new kp(t,i,t,n,s,o,s,a)),!0):!1}}function Rx(r,e){const t=dr(r);return t===-1?e:t+1}function Mx(r,e){const t=Wo(r);return t===-1?e:t+2}function nP(r){if(r===0)return()=>!0;const e=Date.now();return()=>Date.now()-e<r}function jv(r){return r<0?0:r>255?255:r|0}function qd(r){return r<0?0:r>4294967295?4294967295:r|0}class rP{constructor(e,t){this._prefixSumIndexOfResultBrand=void 0,this.index=e,this.remainder=t}}class Rq{constructor(e){this.values=e,this.prefixSum=new Uint32Array(e.length),this.prefixSumValidIndex=new Int32Array(1),this.prefixSumValidIndex[0]=-1}insertValues(e,t){e=qd(e);const i=this.values,n=this.prefixSum,s=t.length;return s===0?!1:(this.values=new Uint32Array(i.length+s),this.values.set(i.subarray(0,e),0),this.values.set(i.subarray(e),e+s),this.values.set(t,e),e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSum=new Uint32Array(this.values.length),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}changeValue(e,t){return e=qd(e),t=qd(t),this.values[e]===t?!1:(this.values[e]=t,e-1<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),!0)}removeValues(e,t){e=qd(e),t=qd(t);const i=this.values,n=this.prefixSum;if(e>=i.length)return!1;let s=i.length-e;return t>=s&&(t=s),t===0?!1:(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<this.prefixSumValidIndex[0]&&(this.prefixSumValidIndex[0]=e-1),this.prefixSumValidIndex[0]>=0&&this.prefixSum.set(n.subarray(0,this.prefixSumValidIndex[0]+1)),!0)}getTotalSum(){return this.values.length===0?0:this._getPrefixSum(this.values.length-1)}getPrefixSum(e){return e<0?0:(e=qd(e),this._getPrefixSum(e))}_getPrefixSum(e){if(e<=this.prefixSumValidIndex[0])return this.prefixSum[e];let t=this.prefixSumValidIndex[0]+1;t===0&&(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<o)i=n-1;else if(e>=s)t=n+1;else break;return new rP(n,e-o)}}class Mq{constructor(e,t,i,n){this._uri=e,this._lines=t,this._eol=i,this._versionId=n,this._lineStarts=null,this._cachedTextValue=null}dispose(){this._lines.length=0}get version(){return this._versionId}getText(){return this._cachedTextValue===null&&(this._cachedTextValue=this._lines.join(this._eol)),this._cachedTextValue}onEvents(e){e.eol&&e.eol!==this._eol&&(this._eol=e.eol,this._lineStarts=null);const t=e.changes;for(const i of t)this._acceptDeleteRange(i.range),this._acceptInsertText(new $(i.range.startLineNumber,i.range.startColumn),i.text);this._versionId=e.versionId,this._cachedTextValue=null}_ensureLineStarts(){if(!this._lineStarts){const e=this._eol.length,t=this._lines.length,i=new Uint32Array(t);for(let n=0;n<t;n++)i[n]=this._lines[n].length+e;this._lineStarts=new Rq(i)}}_setLineText(e,t){this._lines[e]=t,this._lineStarts&&this._lineStarts.changeValue(e,this._lines[e].length+this._eol.length)}_acceptDeleteRange(e){if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.startLineNumber-1].substring(e.endColumn-1));return}this._setLineText(e.startLineNumber-1,this._lines[e.startLineNumber-1].substring(0,e.startColumn-1)+this._lines[e.endLineNumber-1].substring(e.endColumn-1)),this._lines.splice(e.startLineNumber,e.endLineNumber-e.startLineNumber),this._lineStarts&&this._lineStarts.removeValues(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){if(t.length===0)return;let i=Bo(t);if(i.length===1){this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]+this._lines[e.lineNumber-1].substring(e.column-1));return}i[i.length-1]+=this._lines[e.lineNumber-1].substring(e.column-1),this._setLineText(e.lineNumber-1,this._lines[e.lineNumber-1].substring(0,e.column-1)+i[0]);let n=new Uint32Array(i.length-1);for(let s=1;s<i.length;s++)this._lines.splice(e.lineNumber+s-1,0,i[s]),n[s-1]=i[s].length+this._eol.length;this._lineStarts&&this._lineStarts.insertValues(e.lineNumber,n)}}class Gd{constructor(e){let t=jv(e);this._defaultValue=t,this._asciiMap=Gd._createAsciiMap(t),this._map=new Map}static _createAsciiMap(e){let t=new Uint8Array(256);for(let i=0;i<256;i++)t[i]=e;return t}set(e,t){let i=jv(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}}class Zd{constructor(){this._actual=new Gd(0)}add(e){this._actual.set(e,1)}has(e){return this._actual.get(e)===1}}class Pq{constructor(e,t,i){const n=new Uint8Array(e*t);for(let s=0,o=e*t;s<o;s++)n[s]=i;this._data=n,this.rows=e,this.cols=t}get(e,t){return this._data[e*this.cols+t]}set(e,t,i){this._data[e*this.cols+t]=i}}class Oq{constructor(e){let t=0,i=0;for(let s=0,o=e.length;s<o;s++){let[a,l,c]=e[s];l>t&&(t=l),a>i&&(i=a),c>i&&(i=c)}t++,i++;let n=new Pq(i,t,0);for(let s=0,o=e.length;s<o;s++){let[a,l,c]=e[s];n.set(a,l,c)}this._states=n,this._maxCharCode=t}nextState(e,t){return t<0||t>=this._maxCharCode?0:this._states.get(e,t)}}let Px=null;function Fq(){return Px===null&&(Px=new Oq([[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]])),Px}let Ep=null;function Bq(){if(Ep===null){Ep=new Gd(0);const r=` <>'"\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 t=0;t<r.length;t++)Ep.set(r.charCodeAt(t),1);const e=".,;";for(let t=0;t<e.length;t++)Ep.set(e.charCodeAt(t),2)}return Ep}class Kv{static _createLink(e,t,i,n,s){let o=s-1;do{const a=t.charCodeAt(o);if(e.get(a)!==2)break;o--}while(o>n);if(n>0){const a=t.charCodeAt(n-1),l=t.charCodeAt(o);(a===40&&l===41||a===91&&l===93||a===123&&l===125)&&o--}return{range:{startLineNumber:i,startColumn:n+1,endLineNumber:i,endColumn:o+2},url:t.substring(n,o+1)}}static computeLinks(e,t=Fq()){const i=Bq();let n=[];for(let s=1,o=e.getLineCount();s<=o;s++){const a=e.getLineContent(s),l=a.length;let c=0,h=0,u=0,d=1,f=!1,g=!1,p=!1,_=!1;for(;c<l;){let v=!1;const b=a.charCodeAt(c);if(d===13){let C;switch(b){case 40:f=!0,C=0;break;case 41:C=f?0:1;break;case 91:p=!0,g=!0,C=0;break;case 93:p=!1,C=g?0:1;break;case 123:_=!0,C=0;break;case 125:C=_?0:1;break;case 39:C=u===34||u===96?0:1;break;case 34:C=u===39||u===96?0:1;break;case 96:C=u===39||u===34?0:1;break;case 42:C=u===42?1:0;break;case 124:C=u===124?1:0;break;case 32:C=p?0:1;break;default:C=i.get(b)}C===1&&(n.push(Kv._createLink(i,a,s,h,c)),v=!0)}else if(d===12){let C;b===91?(g=!0,C=0):C=i.get(b),C===1?v=!0:d=13}else d=t.nextState(d,b),d===0&&(v=!0);v&&(d=1,f=!1,g=!1,_=!1,h=c+1,u=b),c++}d===13&&n.push(Kv._createLink(i,a,s,h,l))}return n}}function Wq(r){return!r||typeof r.getLineCount!="function"||typeof r.getLineContent!="function"?[]:Kv.computeLinks(r)}class Ox{constructor(){this._defaultValueSet=[["true","false"],["True","False"],["Private","Public","Friend","ReadOnly","Partial","Protected","WriteOnly"],["public","protected","private"]]}navigateValueSet(e,t,i,n,s){if(e&&t){let o=this.doNavigateValueSet(t,s);if(o)return{range:e,value:o}}if(i&&n){let o=this.doNavigateValueSet(n,s);if(o)return{range:i,value:o}}return null}doNavigateValueSet(e,t){let i=this.numberReplace(e,t);return i!==null?i:this.textReplace(e,t)}numberReplace(e,t){let i=Math.pow(10,e.length-(e.lastIndexOf(".")+1)),n=Number(e),s=parseFloat(e);return!isNaN(n)&&!isNaN(s)&&n===s?n===0&&!t?null:(n=Math.floor(n*i),n+=t?i:-i,String(n/i)):null}textReplace(e,t){return this.valueSetsReplace(this._defaultValueSet,e,t)}valueSetsReplace(e,t,i){let n=null;for(let s=0,o=e.length;n===null&&s<o;s++)n=this.valueSetReplace(e[s],t,i);return n}valueSetReplace(e,t,i){let n=e.indexOf(t);return n>=0?(n+=i?1:-1,n<0?n=e.length-1:n%=e.length,e[n]):null}}Ox.INSTANCE=new Ox;var Yd=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Vq extends Mq{get uri(){return this._uri}get eol(){return this._eol}getValue(){return this.getText()}getLinesContent(){return this._lines.slice(0)}getLineCount(){return this._lines.length}getLineContent(e){return this._lines[e-1]}getWordAtPosition(e,t){let i=Gb(e.column,kS(t),this._lines[e.lineNumber-1],0);return i?new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn):null}words(e){const t=this._lines,i=this._wordenize.bind(this);let n=0,s="",o=0,a=[];return{*[Symbol.iterator](){for(;;)if(o<a.length){const l=s.substring(a[o].start,a[o].end);o+=1,yield l}else if(n<t.length)s=t[n],a=i(s,e),o=0,n+=1;else break}}}getLineWords(e,t){let i=this._lines[e-1],n=this._wordenize(i,t),s=[];for(const o of n)s.push({word:i.substring(o.start,o.end),startColumn:o.start+1,endColumn:o.end+1});return s}_wordenize(e,t){const i=[];let n;for(t.lastIndex=0;(n=t.exec(e))&&n[0].length!==0;)i.push({start:n.index,end:n.index+n[0].length});return i}getValueInRange(e){if(e=this._validateRange(e),e.startLineNumber===e.endLineNumber)return this._lines[e.startLineNumber-1].substring(e.startColumn-1,e.endColumn-1);let t=this._eol,i=e.startLineNumber-1,n=e.endLineNumber-1,s=[];s.push(this._lines[i].substring(e.startColumn-1));for(let o=i+1;o<n;o++)s.push(this._lines[o]);return s.push(this._lines[n].substring(0,e.endColumn-1)),s.join(t)}offsetAt(e){return e=this._validatePosition(e),this._ensureLineStarts(),this._lineStarts.getPrefixSum(e.lineNumber-2)+(e.column-1)}positionAt(e){e=Math.floor(e),e=Math.max(0,e),this._ensureLineStarts();let t=this._lineStarts.getIndexOf(e),i=this._lines[t.index].length;return{lineNumber:1+t.index,column:1+Math.min(t.remainder,i)}}_validateRange(e){const t=this._validatePosition({lineNumber:e.startLineNumber,column:e.startColumn}),i=this._validatePosition({lineNumber:e.endLineNumber,column:e.endColumn});return t.lineNumber!==e.startLineNumber||t.column!==e.startColumn||i.lineNumber!==e.endLineNumber||i.column!==e.endColumn?{startLineNumber:t.lineNumber,startColumn:t.column,endLineNumber:i.lineNumber,endColumn:i.column}:e}_validatePosition(e){if(!$.isIPosition(e))throw new Error("bad position");let{lineNumber:t,column:i}=e,n=!1;if(t<1)t=1,i=1,n=!0;else if(t>this._lines.length)t=this._lines.length,i=this._lines[t-1].length+1,n=!0;else{let s=this._lines[t-1].length+1;i<1?(i=1,n=!0):i>s&&(i=s,n=!0)}return n?{lineNumber:t,column:i}:e}}class Lh{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(){let e=[];return Object.keys(this._models).forEach(t=>e.push(this._models[t])),e}acceptNewModel(e){this._models[e.url]=new Vq(Ie.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]}computeDiff(e,t,i,n){return Yd(this,void 0,void 0,function*(){const s=this._getModel(e),o=this._getModel(t);if(!s||!o)return null;const a=s.getLinesContent(),l=o.getLinesContent(),h=new Aq(a,l,{shouldComputeCharChanges:!0,shouldPostProcessCharChanges:!0,shouldIgnoreTrimWhitespace:i,shouldMakePrettyDiff:!0,maxComputationTime:n}).computeDiff(),u=h.changes.length>0?!1:this._modelsAreIdentical(s,o);return{quitEarly:h.quitEarly,identical:u,changes:h.changes}})}_modelsAreIdentical(e,t){const i=e.getLineCount(),n=t.getLineCount();if(i!==n)return!1;for(let s=1;s<=i;s++){const o=e.getLineContent(s),a=t.getLineContent(s);if(o!==a)return!1}return!0}computeMoreMinimalEdits(e,t){return Yd(this,void 0,void 0,function*(){const i=this._getModel(e);if(!i)return t;const n=[];let s;t=t.slice(0).sort((o,a)=>{if(o.range&&a.range)return k.compareRangesUsingStarts(o.range,a.range);let l=o.range?0:1,c=a.range?0:1;return l-c});for(let{range:o,text:a,eol:l}of t){if(typeof l=="number"&&(s=l),k.isEmpty(o)&&!a)continue;const c=i.getValueInRange(o);if(a=a.replace(/\r\n|\n|\r/g,i.eol),c===a)continue;if(Math.max(a.length,c.length)>Lh._diffLimit){n.push({range:o,text:a});continue}const h=Eq(c,a,!1),u=i.offsetAt(k.lift(o).getStartPosition());for(const d of h){const f=i.positionAt(u+d.originalStart),g=i.positionAt(u+d.originalStart+d.originalLength),p={text:a.substr(d.modifiedStart,d.modifiedLength),range:{startLineNumber:f.lineNumber,startColumn:f.column,endLineNumber:g.lineNumber,endColumn:g.column}};i.getValueInRange(p.range)!==p.text&&n.push(p)}}return typeof s=="number"&&n.push({eol:s,text:"",range:{startLineNumber:0,startColumn:0,endLineNumber:0,endColumn:0}}),n})}computeLinks(e){return Yd(this,void 0,void 0,function*(){let t=this._getModel(e);return t?Wq(t):null})}textualSuggest(e,t,i,n){return Yd(this,void 0,void 0,function*(){const s=new Mo(!0),o=new RegExp(i,n),a=new Set;e:for(let l of e){const c=this._getModel(l);if(!!c){for(let h of c.words(o))if(!(h===t||!isNaN(Number(h)))&&(a.add(h),a.size>Lh._suggestionsLimit))break e}}return{words:Array.from(a),duration:s.elapsed()}})}computeWordRanges(e,t,i,n){return Yd(this,void 0,void 0,function*(){let s=this._getModel(e);if(!s)return Object.create(null);const o=new RegExp(i,n),a=Object.create(null);for(let l=t.startLineNumber;l<t.endLineNumber;l++){let c=s.getLineWords(l,o);for(const h of c){if(!isNaN(Number(h.word)))continue;let u=a[h.word];u||(u=[],a[h.word]=u),u.push({startLineNumber:l,startColumn:h.startColumn,endLineNumber:l,endColumn:h.endColumn})}}return a})}navigateValueSet(e,t,i,n,s){return Yd(this,void 0,void 0,function*(){let o=this._getModel(e);if(!o)return null;let a=new RegExp(n,s);t.startColumn===t.endColumn&&(t={startLineNumber:t.startLineNumber,startColumn:t.startColumn,endLineNumber:t.endLineNumber,endColumn:t.endColumn+1});let l=o.getValueInRange(t),c=o.getWordAtPosition({lineNumber:t.startLineNumber,column:t.startColumn},a);if(!c)return null;let h=o.getValueInRange(c);return Ox.INSTANCE.navigateValueSet(t,l,c,h,i)})}loadForeignModule(e,t,i){let o={host:y2(i,(a,l)=>this._host.fhr(a,l)),getMirrorModels:()=>this._getModels()};return this._foreignModuleFactory?(this._foreignModule=this._foreignModuleFactory(o,t),Promise.resolve(ix(this._foreignModule))):Promise.reject(new Error("Unexpected usage"))}fmr(e,t){if(!this._foreignModule||typeof this._foreignModule[e]!="function")return Promise.reject(new Error("Missing requestHandler or method: "+e));try{return Promise.resolve(this._foreignModule[e].apply(this._foreignModule,t))}catch(i){return Promise.reject(i)}}}Lh._diffLimit=1e5;Lh._suggestionsLimit=1e4;typeof importScripts=="function"&&(wi.monaco=OM());const Fx=bt("textResourceConfigurationService"),sP=bt("textResourcePropertiesService");function Qr(r,e=0){return r[r.length-(1+e)]}function Hq(r){if(r.length===0)throw new Error("Invalid tail call");return[r.slice(0,r.length-1),r[r.length-1]]}function Is(r,e,t=(i,n)=>i===n){if(r===e)return!0;if(!r||!e||r.length!==e.length)return!1;for(let i=0,n=r.length;i<n;i++)if(!t(r[i],e[i]))return!1;return!0}function Bx(r,e,t){let i=0,n=r.length-1;for(;i<=n;){const s=(i+n)/2|0,o=t(r[s],e);if(o<0)i=s+1;else if(o>0)n=s-1;else return s}return-(i+1)}function oP(r,e){let t=0,i=r.length;if(i===0)return 0;for(;t<i;){const n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}function Wx(r,e,t){if(r=r|0,r>=e.length)throw new TypeError("invalid index");let i=e[Math.floor(e.length*Math.random())],n=[],s=[],o=[];for(let a of e){const l=t(a,i);l<0?n.push(a):l>0?s.push(a):o.push(a)}return r<n.length?Wx(r,n,t):r<n.length+o.length?o[0]:Wx(r-(n.length+o.length),s,t)}function aP(r,e){const t=[];let i;for(const n of r.slice(0).sort(e))!i||e(i[0],n)!==0?(i=[n],t.push(i)):i.push(n);return t}function xh(r){return r.filter(e=>!!e)}function lP(r){return!Array.isArray(r)||r.length===0}function gr(r){return Array.isArray(r)&&r.length>0}function cP(r,e){if(!e)return r.filter((i,n)=>r.indexOf(i)===n);const t=Object.create(null);return r.filter(i=>{const n=e(i);return t[n]?!1:(t[n]=!0,!0)})}function hP(r){const e=new Set;return r.filter(t=>e.has(t)?!1:(e.add(t),!0))}function zq(r,e){const t=$q(r,e);if(t!==-1)return r[t]}function $q(r,e){for(let t=r.length-1;t>=0;t--){const i=r[t];if(e(i))return t}return-1}function Vx(r,e){return r.length>0?r[0]:e}function Hx(r){return[].concat(...r)}function Fn(r,e){let t=typeof e=="number"?r:0;typeof e=="number"?t=r:(t=0,e=r);const i=[];if(t<=e)for(let n=t;n<e;n++)i.push(n);else for(let n=t;n>e;n--)i.push(n);return i}function Ip(r,e,t){const i=r.slice(0,e),n=r.slice(e);return i.concat(t,n)}function zx(r,e){const t=r.indexOf(e);t>-1&&(r.splice(t,1),r.unshift(e))}function qv(r,e){const t=r.indexOf(e);t>-1&&(r.splice(t,1),r.push(e))}function $x(r){return Array.isArray(r)?r:[r]}function Uq(r,e,t){const i=uP(r,e),n=r.length,s=t.length;r.length=n+s;for(let o=n-1;o>=i;o--)r[o+s]=r[o];for(let o=0;o<s;o++)r[o+i]=t[o]}function jq(r,e,t,i){const n=uP(r,e),s=r.splice(n,t);return Uq(r,n,i),s}function uP(r,e){return e<0?Math.max(e+r.length,0):Math.min(e,r.length)}class Np{constructor(e){this.items=e,this.firstIdx=0,this.lastIdx=this.items.length-1}takeWhile(e){let t=this.firstIdx;for(;t<this.items.length&&e(this.items[t]);)t++;const i=t===this.firstIdx?null:this.items.slice(this.firstIdx,t);return this.firstIdx=t,i}takeFromEndWhile(e){let t=this.lastIdx;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(){return this.items[this.firstIdx]}}const Va=bt("logService");var oo;(function(r){r[r.Trace=0]="Trace",r[r.Debug=1]="Debug",r[r.Info=2]="Info",r[r.Warning=3]="Warning",r[r.Error=4]="Error",r[r.Critical=5]="Critical",r[r.Off=6]="Off"})(oo||(oo={}));const dP=oo.Info;class Kq extends Y{constructor(){super(...arguments);this.level=dP,this._onDidChangeLogLevel=this._register(new H)}setLevel(e){this.level!==e&&(this.level=e,this._onDidChangeLogLevel.fire(this.level))}getLevel(){return this.level}}class qq extends Kq{constructor(e=dP){super();this.setLevel(e)}trace(e,...t){this.getLevel()<=oo.Trace&&console.log("%cTRACE","color: #888",e,...t)}debug(e,...t){this.getLevel()<=oo.Debug&&console.log("%cDEBUG","background: #eee; color: #888",e,...t)}info(e,...t){this.getLevel()<=oo.Info&&console.log("%c INFO","color: #33f",e,...t)}error(e,...t){this.getLevel()<=oo.Error&&console.log("%c ERR","color: #f33",e,...t)}dispose(){}}class Gq extends Y{constructor(e){super();this.logger=e,this._register(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)}error(e,...t){this.logger.error(e,...t)}}var Zq=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ux=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},jx=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const fP=60*1e3,gP=5*60*1e3;function Xd(r,e){let t=r.getModel(e);return!(!t||t.isTooLargeForSyncing())}let Kx=class extends Y{constructor(e,t,i){super();this._modelService=e,this._workerManager=this._register(new Xq(this._modelService)),this._logService=i,this._register(Sp.register("*",{provideLinks:(n,s)=>Xd(this._modelService,n.uri)?this._workerManager.withWorker().then(o=>o.computeLinks(n.uri)).then(o=>o&&{links:o}):Promise.resolve({links:[]})})),this._register(no.register("*",new Yq(this._workerManager,t,this._modelService)))}dispose(){super.dispose()}computeDiff(e,t,i,n){return this._workerManager.withWorker().then(s=>s.computeDiff(e,t,i,n))}computeMoreMinimalEdits(e,t){if(gr(t)){if(!Xd(this._modelService,e))return Promise.resolve(t);const i=Mo.create(!0),n=this._workerManager.withWorker().then(s=>s.computeMoreMinimalEdits(e,t));return n.finally(()=>this._logService.trace("FORMAT#computeMoreMinimalEdits",e.toString(!0),i.elapsed())),Promise.race([n,Hl(1e3).then(()=>t)])}else return Promise.resolve(void 0)}canNavigateValueSet(e){return Xd(this._modelService,e)}navigateValueSet(e,t,i){return this._workerManager.withWorker().then(n=>n.navigateValueSet(e,t,i))}canComputeWordRanges(e){return Xd(this._modelService,e)}computeWordRanges(e,t){return this._workerManager.withWorker().then(i=>i.computeWordRanges(e,t))}};Kx=Zq([Ux(0,gi),Ux(1,Fx),Ux(2,Va)],Kx);class Yq{constructor(e,t,i){this._debugDisplayName="wordbasedCompletions",this._workerManager=e,this._configurationService=t,this._modelService=i}provideCompletionItems(e,t){return jx(this,void 0,void 0,function*(){const i=this._configurationService.getValue(e.uri,t,"editor");if(!i.wordBasedSuggestions)return;const n=[];if(i.wordBasedSuggestionsMode==="currentDocument")Xd(this._modelService,e.uri)&&n.push(e.uri);else for(const u of this._modelService.getModels())!Xd(this._modelService,u.uri)||(u===e?n.unshift(u.uri):(i.wordBasedSuggestionsMode==="allDocuments"||u.getLanguageIdentifier().id===e.getLanguageIdentifier().id)&&n.push(u.uri));if(n.length===0)return;const s=ze.getWordDefinition(e.getLanguageIdentifier().id),o=e.getWordAtPosition(t),a=o?new k(t.lineNumber,o.startColumn,t.lineNumber,o.endColumn):k.fromPositions(t),l=a.setEndPosition(t.lineNumber,t.column),h=yield(yield this._workerManager.withWorker()).textualSuggest(n,o==null?void 0:o.word,s);if(!!h)return{duration:h.duration,suggestions:h.words.map(u=>({kind:18,label:u,insertText:u,range:{insert:l,replace:a}}))}})}}class Xq extends Y{constructor(e){super();this._modelService=e,this._editorWorkerClient=null,this._lastWorkerUsedTime=new Date().getTime(),this._register(new lp).cancelAndSet(()=>this._checkStopIdleWorker(),Math.round(gP/2)),this._register(this._modelService.onModelRemoved(i=>this._checkStopEmptyWorker()))}dispose(){this._editorWorkerClient&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null),super.dispose()}_checkStopEmptyWorker(){if(!this._editorWorkerClient)return;this._modelService.getModels().length===0&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}_checkStopIdleWorker(){if(!this._editorWorkerClient)return;new Date().getTime()-this._lastWorkerUsedTime>gP&&(this._editorWorkerClient.dispose(),this._editorWorkerClient=null)}withWorker(){return this._lastWorkerUsedTime=new Date().getTime(),this._editorWorkerClient||(this._editorWorkerClient=new mP(this._modelService,!1,"editorWorkerService")),Promise.resolve(this._editorWorkerClient)}}class Qq extends Y{constructor(e,t,i){super();if(this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),this._proxy=e,this._modelService=t,!i){let n=new lp;n.cancelAndSet(()=>this._checkStopModelSync(),Math.round(fP/2)),this._register(n)}}dispose(){for(let e in this._syncedModels)ht(this._syncedModels[e]);this._syncedModels=Object.create(null),this._syncedModelsLastUsedTime=Object.create(null),super.dispose()}ensureSyncedResources(e,t){for(const i of e){let n=i.toString();this._syncedModels[n]||this._beginModelSync(i,t),this._syncedModels[n]&&(this._syncedModelsLastUsedTime[n]=new Date().getTime())}}_checkStopModelSync(){let e=new Date().getTime(),t=[];for(let i in this._syncedModelsLastUsedTime)e-this._syncedModelsLastUsedTime[i]>fP&&t.push(i);for(const i of t)this._stopModelSync(i)}_beginModelSync(e,t){let i=this._modelService.getModel(e);if(!i||!t&&i.isTooLargeForSyncing())return;let n=e.toString();this._proxy.acceptNewModel({url:i.uri.toString(),lines:i.getLinesContent(),EOL:i.getEOL(),versionId:i.getVersionId()});const s=new le;s.add(i.onDidChangeContent(o=>{this._proxy.acceptModelChanged(n.toString(),o)})),s.add(i.onWillDispose(()=>{this._stopModelSync(n)})),s.add(Xe(()=>{this._proxy.acceptRemovedModel(n)})),this._syncedModels[n]=s}_stopModelSync(e){let t=this._syncedModels[e];delete this._syncedModels[e],delete this._syncedModelsLastUsedTime[e],ht(t)}}class pP{constructor(e){this._instance=e,this._proxyObj=Promise.resolve(this._instance)}dispose(){this._instance.dispose()}getProxyObject(){return this._proxyObj}}class qx{constructor(e){this._workerClient=e}fhr(e,t){return this._workerClient.fhr(e,t)}}class mP extends Y{constructor(e,t,i){super();this._disposed=!1,this._modelService=e,this._keepIdleModels=t,this._workerFactory=new Wv(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 aq(this._workerFactory,"vs/editor/common/services/editorSimpleWorker",new qx(this)))}catch(e){Lx(e),this._worker=new pP(new Lh(new qx(this),null))}return this._worker}_getProxy(){return this._getOrCreateWorker().getProxyObject().then(void 0,e=>(Lx(e),this._worker=new pP(new Lh(new qx(this),null)),this._getOrCreateWorker().getProxyObject()))}_getOrCreateModelManager(e){return this._modelManager||(this._modelManager=this._register(new Qq(e,this._modelService,this._keepIdleModels))),this._modelManager}_withSyncedResources(e,t=!1){return jx(this,void 0,void 0,function*(){return this._disposed?Promise.reject(Dd()):this._getProxy().then(i=>(this._getOrCreateModelManager(i).ensureSyncedResources(e,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){return this._withSyncedResources([e]).then(i=>i.computeMoreMinimalEdits(e.toString(),t))}computeLinks(e){return this._withSyncedResources([e]).then(t=>t.computeLinks(e.toString()))}textualSuggest(e,t,i){return jx(this,void 0,void 0,function*(){const n=yield this._withSyncedResources(e),s=i.source,o=UL(i);return n.textualSuggest(e.map(a=>a.toString()),t,s,o)})}computeWordRanges(e,t){return this._withSyncedResources([e]).then(i=>{let n=this._modelService.getModel(e);if(!n)return Promise.resolve(null);let s=ze.getWordDefinition(n.getLanguageIdentifier().id),o=s.source,a=UL(s);return i.computeWordRanges(e.toString(),t,o,a)})}navigateValueSet(e,t,i){return this._withSyncedResources([e]).then(n=>{let s=this._modelService.getModel(e);if(!s)return null;let o=ze.getWordDefinition(s.getLanguageIdentifier().id),a=o.source,l=UL(o);return n.navigateValueSet(e.toString(),t,i,a,l)})}dispose(){super.dispose(),this._disposed=!0}}function Jq(r,e){return new eG(r,e)}class eG extends mP{constructor(e,t){super(e,t.keepIdleModels||!1,t.label);this._foreignModuleId=t.moduleId,this._foreignModuleCreateData=t.createData||null,this._foreignModuleHost=t.host||null,this._foreignProxy=null}fhr(e,t){if(!this._foreignModuleHost||typeof this._foreignModuleHost[e]!="function")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(i){return Promise.reject(i)}}_getForeignProxy(){return this._foreignProxy||(this._foreignProxy=this._getProxy().then(e=>{const t=this._foreignModuleHost?ix(this._foreignModuleHost):[];return e.loadForeignModule(this._foreignModuleId,this._foreignModuleCreateData,t).then(i=>{this._foreignModuleCreateData=null;const n=(a,l)=>e.fmr(a,l),s=(a,l)=>function(){const c=Array.prototype.slice.call(arguments,0);return l(a,c)};let o={};for(const a of i)o[a]=s(a,n);return o})})),this._foreignProxy}getProxy(){return this._getForeignProxy()}withSyncedResources(e){return this._withSyncedResources(e).then(t=>this.getProxy())}}class Ki{constructor(e,t){this._lineTokensBrand=void 0,this._tokens=e,this._tokensCount=this._tokens.length>>>1,this._text=t}static createEmpty(e){const t=Ki.defaultTokenMetadata,i=new Uint32Array(2);return i[0]=e.length,i[1]=t,new Ki(i,e)}equals(e){return e instanceof Ki?this.slicedEquals(e,0,this._tokensCount):!1}slicedEquals(e,t,i){if(this._text!==e._text||this._tokensCount!==e._tokensCount)return!1;const n=t<<1,s=n+(i<<1);for(let o=n;o<s;o++)if(this._tokens[o]!==e._tokens[o])return!1;return!0}getLineContent(){return this._text}getCount(){return this._tokensCount}getStartOffset(e){return e>0?this._tokens[e-1<<1]:0}getMetadata(e){return this._tokens[(e<<1)+1]}getLanguageId(e){const t=this._tokens[(e<<1)+1];return xn.getLanguageId(t)}getStandardTokenType(e){const t=this._tokens[(e<<1)+1];return xn.getTokenType(t)}getForeground(e){const t=this._tokens[(e<<1)+1];return xn.getForeground(t)}getClassName(e){const t=this._tokens[(e<<1)+1];return xn.getClassNameFromMetadata(t)}getInlineStyle(e,t){const i=this._tokens[(e<<1)+1];return xn.getInlineStyleFromMetadata(i,t)}getEndOffset(e){return this._tokens[e<<1]}findTokenIndexAtOffset(e){return Ki.findIndexInTokensArray(this._tokens,e)}inflate(){return this}sliceAndInflate(e,t,i){return new Gx(this,e,t,i)}static convertToEndOffset(e,t){const n=(e.length>>>1)-1;for(let s=0;s<n;s++)e[s<<1]=e[s+1<<1];e[n<<1]=t}static findIndexInTokensArray(e,t){if(e.length<=2)return 0;let i=0,n=(e.length>>>1)-1;for(;i<n;){const s=i+Math.floor((n-i)/2),o=e[s<<1];if(o===t)return s+1;o<t?i=s+1:o>t&&(n=s)}return i}withInserted(e){if(e.length===0)return this;let t=0,i=0,n="";const s=new Array;let o=0;for(;;){let a=t<this._tokensCount?this._tokens[t<<1]:-1,l=i<e.length?e[i]:null;if(a!==-1&&(l===null||a<=l.offset)){n+=this._text.substring(o,a);const c=this._tokens[(t<<1)+1];s.push(n.length,c),t++,o=a}else if(l){if(l.offset>o){n+=this._text.substring(o,l.offset);const c=this._tokens[(t<<1)+1];s.push(n.length,c),o=l.offset}n+=l.text,s.push(n.length,l.tokenMetadata),i++}else break}return new Ki(new Uint32Array(s),n)}}Ki.defaultTokenMetadata=(0<<11|1<<14|2<<23)>>>0;class Gx{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<o&&!(e.getStartOffset(s)>=i);s++)this._tokensCount++}equals(e){return e instanceof Gx?this._startOffset===e._startOffset&&this._endOffset===e._endOffset&&this._deltaOffset===e._deltaOffset&&this._source.slicedEquals(e._source,this._firstTokenIndex,this._tokensCount):!1}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)}findTokenIndexAtOffset(e){return this._source.findTokenIndexAtOffset(e+this._startOffset-this._deltaOffset)-this._firstTokenIndex}}class Pr{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,n=t.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!Pr._equals(e[s],t[s]))return!1;return!0}static extractWrapped(e,t,i){if(e.length===0)return e;const n=t+1,s=i+1,o=i-t,a=[];let l=0;for(const c of e)c.endColumn<=n||c.startColumn>=s||(a[l++]=new Pr(Math.max(1,c.startColumn-n+1),Math.min(o+1,c.endColumn-n+1),c.className,c.type));return a}static filter(e,t,i,n){if(e.length===0)return[];let s=[],o=0;for(let a=0,l=e.length;a<l;a++){const c=e[a],h=c.range;if(h.endLineNumber<t||h.startLineNumber>t||h.isEmpty()&&(c.type===0||c.type===3))continue;const u=h.startLineNumber===t?h.startColumn:i,d=h.endLineNumber===t?h.endColumn:n;s[o++]=new Pr(u,d,c.inlineClassName,c.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=Pr._typeCompare(e.type,t.type);return i!==0?i:e.className!==t.className?e.className<t.className?-1:1:0}}class _P{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.className=i,this.metadata=n}}class Gv{constructor(){this.stopOffsets=[],this.classNames=[],this.metadata=[],this.count=0}static _metadata(e){let t=0;for(let i=0,n=e.length;i<n;i++)t|=e[i];return t}consumeLowerThan(e,t,i){for(;this.count>0&&this.stopOffsets[0]<e;){let n=0;for(;n+1<this.count&&this.stopOffsets[n]===this.stopOffsets[n+1];)n++;i.push(new _P(t,this.stopOffsets[n],this.classNames.join(" "),Gv._metadata(this.metadata))),t=this.stopOffsets[n]+1,this.stopOffsets.splice(0,n+1),this.classNames.splice(0,n+1),this.metadata.splice(0,n+1),this.count-=n+1}return this.count>0&&t<e&&(i.push(new _P(t,e-1,this.classNames.join(" "),Gv._metadata(this.metadata))),t=e),t}insert(e,t,i){if(this.count===0||this.stopOffsets[this.count-1]<=e)this.stopOffsets.push(e),this.classNames.push(t),this.metadata.push(i);else for(let n=0;n<this.count;n++)if(this.stopOffsets[n]>=e){this.stopOffsets.splice(n,0,e),this.classNames.splice(n,0,t),this.metadata.splice(n,0,i);break}this.count++}}class tG{static normalize(e,t){if(t.length===0)return[];let i=[];const n=new Gv;let s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];let c=l.startColumn,h=l.endColumn;const u=l.className,d=l.type===1?2:l.type===2?4:0;if(c>1){const p=e.charCodeAt(c-2);ji(p)&&c--}if(h>1){const p=e.charCodeAt(h-2);ji(p)&&h--}const f=c-1,g=h-2;s=n.consumeLowerThan(f,s,i),n.count===0&&(s=f),n.insert(g,u,d)}return n.consumeLowerThan(1073741824,s,i),i}}class kn{constructor(e,t,i){this._linePartBrand=void 0,this.endIndex=e,this.type=t,this.metadata=i}isWhitespace(){return!!(this.metadata&1)}isPseudoAfter(){return!!(this.metadata&4)}}class iG{constructor(e,t){this.startOffset=e,this.endOffset=t}equals(e){return this.startOffset===e.startOffset&&this.endOffset===e.endOffset}}class kh{constructor(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p,_,v,b,C){this.useMonospaceOptimizations=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.continuesWithWrappedLine=n,this.isBasicASCII=s,this.containsRTL=o,this.fauxIndentLength=a,this.lineTokens=l,this.lineDecorations=c.sort(Pr.compare),this.tabSize=h,this.startVisibleColumn=u,this.spaceWidth=d,this.stopRenderingLineAfter=p,this.renderWhitespace=_==="all"?4:_==="boundary"?1:_==="selection"?2:_==="trailing"?3:0,this.renderControlCharacters=v,this.fontLigatures=b,this.selectionsOnLine=C&&C.sort((S,w)=>S.startOffset<w.startOffset?-1:1);const y=Math.abs(g-d),x=Math.abs(f-d);y<x?(this.renderSpaceWidth=g,this.renderSpaceCharCode=11825):(this.renderSpaceWidth=f,this.renderSpaceCharCode=183)}sameSelection(e){if(this.selectionsOnLine===null)return e===null;if(e===null||e.length!==this.selectionsOnLine.length)return!1;for(let t=0;t<this.selectionsOnLine.length;t++)if(!this.selectionsOnLine[t].equals(e[t]))return!1;return!0}equals(e){return this.useMonospaceOptimizations===e.useMonospaceOptimizations&&this.canUseHalfwidthRightwardsArrow===e.canUseHalfwidthRightwardsArrow&&this.lineContent===e.lineContent&&this.continuesWithWrappedLine===e.continuesWithWrappedLine&&this.isBasicASCII===e.isBasicASCII&&this.containsRTL===e.containsRTL&&this.fauxIndentLength===e.fauxIndentLength&&this.tabSize===e.tabSize&&this.startVisibleColumn===e.startVisibleColumn&&this.spaceWidth===e.spaceWidth&&this.renderSpaceWidth===e.renderSpaceWidth&&this.renderSpaceCharCode===e.renderSpaceCharCode&&this.stopRenderingLineAfter===e.stopRenderingLineAfter&&this.renderWhitespace===e.renderWhitespace&&this.renderControlCharacters===e.renderControlCharacters&&this.fontLigatures===e.fontLigatures&&Pr.equalsArr(this.lineDecorations,e.lineDecorations)&&this.lineTokens.equals(e.lineTokens)&&this.sameSelection(e.selectionsOnLine)}}class Zx{constructor(e,t){this.partIndex=e,this.charIndex=t}}class Ko{constructor(e,t){this.length=e,this._data=new Uint32Array(this.length),this._absoluteOffsets=new Uint32Array(this.length)}static getPartIndex(e){return(e&4294901760)>>>16}static getCharIndex(e){return(e&65535)>>>0}setColumnInfo(e,t,i,n){const s=(t<<16|i<<0)>>>0;this._data[e-1]=s,this._absoluteOffsets[e-1]=n+i}getAbsoluteOffset(e){return this._absoluteOffsets.length===0?0:this._absoluteOffsets[e-1]}charOffsetToPartData(e){return this.length===0?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=Ko.getPartIndex(t),n=Ko.getCharIndex(t);return new Zx(i,n)}getColumn(e,t){return this.partDataToCharOffset(e.partIndex,t,e.charIndex)+1}partDataToCharOffset(e,t,i){if(this.length===0)return 0;let n=(e<<16|i<<0)>>>0,s=0,o=this.length-1;for(;s+1<o;){let p=s+o>>>1,_=this._data[p];if(_===n)return p;_>n?o=p:s=p}if(s===o)return s;let a=this._data[s],l=this._data[o];if(a===n)return s;if(l===n)return o;let c=Ko.getPartIndex(a),h=Ko.getCharIndex(a),u=Ko.getPartIndex(l),d;c!==u?d=t:d=Ko.getCharIndex(l);let f=i-h,g=d-i;return f<=g?s:o}}class Yx{constructor(e,t,i){this._renderLineOutputBrand=void 0,this.characterMapping=e,this.containsRTL=t,this.containsForeignElements=i}}function Zv(r,e){if(r.lineContent.length===0){if(r.lineDecorations.length>0){e.appendASCIIString("<span>");let t=0,i=0,n=0;for(const o of r.lineDecorations)(o.type===1||o.type===2)&&(e.appendASCIIString('<span class="'),e.appendASCIIString(o.className),e.appendASCIIString('"></span>'),o.type===1&&(n|=1,t++),o.type===2&&(n|=2,i++));e.appendASCIIString("</span>");const s=new Ko(1,t+i);return s.setColumnInfo(1,t,0,0),new Yx(s,!1,n)}return e.appendASCIIString("<span><span></span></span>"),new Yx(new Ko(0,0),!1,0)}return hG(sG(r),e)}class nG{constructor(e,t,i,n){this.characterMapping=e,this.html=t,this.containsRTL=i,this.containsForeignElements=n}}function Yv(r){let e=Sh(1e4),t=Zv(r,e);return new nG(t.characterMapping,e.build(),t.containsRTL,t.containsForeignElements)}class rG{constructor(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p){this.fontIsMonospace=e,this.canUseHalfwidthRightwardsArrow=t,this.lineContent=i,this.len=n,this.isOverflowing=s,this.parts=o,this.containsForeignElements=a,this.fauxIndentLength=l,this.tabSize=c,this.startVisibleColumn=h,this.containsRTL=u,this.spaceWidth=d,this.renderSpaceCharCode=f,this.renderWhitespace=g,this.renderControlCharacters=p}}function sG(r){const e=r.lineContent;let t,i;r.stopRenderingLineAfter!==-1&&r.stopRenderingLineAfter<e.length?(t=!0,i=r.stopRenderingLineAfter):(t=!1,i=e.length);let n=oG(r.lineTokens,r.fauxIndentLength,i);(r.renderWhitespace===4||r.renderWhitespace===1||r.renderWhitespace===2&&!!r.selectionsOnLine||r.renderWhitespace===3)&&(n=lG(r,e,i,n));let s=0;if(r.lineDecorations.length>0){for(let o=0,a=r.lineDecorations.length;o<a;o++){const l=r.lineDecorations[o];l.type===3||l.type===1?s|=1:l.type===2&&(s|=2)}n=cG(e,i,n,r.lineDecorations)}return r.containsRTL||(n=aG(e,n,!r.isBasicASCII||r.fontLigatures)),new rG(r.useMonospaceOptimizations,r.canUseHalfwidthRightwardsArrow,e,i,t,n,s,r.fauxIndentLength,r.tabSize,r.startVisibleColumn,r.containsRTL,r.spaceWidth,r.renderSpaceCharCode,r.renderWhitespace,r.renderControlCharacters)}function oG(r,e,t){let i=[],n=0;e>0&&(i[n++]=new kn(e,"",0));for(let s=0,o=r.getCount();s<o;s++){const a=r.getEndOffset(s);if(a<=e)continue;const l=r.getClassName(s);if(a>=t){i[n++]=new kn(t,l,0);break}i[n++]=new kn(a,l,0)}return i}function aG(r,e,t){let i=0,n=[],s=0;if(t)for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.endIndex;if(i+50<c){const h=l.type,u=l.metadata;let d=-1,f=i;for(let g=i;g<c;g++)r.charCodeAt(g)===32&&(d=g),d!==-1&&g-f>=50&&(n[s++]=new kn(d+1,h,u),f=d+1,d=-1);f!==c&&(n[s++]=new kn(c,h,u))}else n[s++]=l;i=c}else for(let o=0,a=e.length;o<a;o++){const l=e[o],c=l.endIndex;let h=c-i;if(h>50){const u=l.type,d=l.metadata,f=Math.ceil(h/50);for(let g=1;g<f;g++){let p=i+g*50;n[s++]=new kn(p,u,d)}n[s++]=new kn(c,u,d)}else n[s++]=l;i=c}return n}function lG(r,e,t,i){const n=r.continuesWithWrappedLine,s=r.fauxIndentLength,o=r.tabSize,a=r.startVisibleColumn,l=r.useMonospaceOptimizations,c=r.selectionsOnLine,h=r.renderWhitespace===1,u=r.renderWhitespace===3,d=r.renderSpaceWidth!==r.spaceWidth;let f=[],g=0,p=0,_=i[p].type,v=i[p].endIndex;const b=i.length;let C=!1,y=dr(e),x;y===-1?(C=!0,y=t,x=t):x=Wo(e);let S=!1,w=0,L=c&&c[w],N=a%o;for(let B=s;B<t;B++){const U=e.charCodeAt(B);L&&B>=L.endOffset&&(w++,L=c&&c[w]);let j;if(B<y||B>x)j=!0;else if(U===9)j=!0;else if(U===32)if(h)if(S)j=!0;else{const re=B+1<t?e.charCodeAt(B+1):0;j=re===32||re===9}else j=!0;else j=!1;if(j&&c&&(j=!!L&&L.startOffset<=B&&L.endOffset>B),j&&u&&(j=C||B>x),S){if(!j||!l&&N>=o){if(d){const re=g>0?f[g-1].endIndex:s;for(let te=re+1;te<=B;te++)f[g++]=new kn(te,"mtkw",1)}else f[g++]=new kn(B,"mtkw",1);N=N%o}}else(B===v||j&&B>s)&&(f[g++]=new kn(B,_,0),N=N%o);for(U===9?N=o:Ys(U)?N+=2:N++,S=j;B===v&&(p++,p<b);)_=i[p].type,v=i[p].endIndex}let P=!1;if(S)if(n&&h){let B=t>0?e.charCodeAt(t-1):0,U=t>1?e.charCodeAt(t-2):0;B===32&&U!==32&&U!==9||(P=!0)}else P=!0;if(P)if(d){const B=g>0?f[g-1].endIndex:s;for(let U=B+1;U<=t;U++)f[g++]=new kn(U,"mtkw",1)}else f[g++]=new kn(t,"mtkw",1);else f[g++]=new kn(t,_,0);return f}function cG(r,e,t,i){i.sort(Pr.compare);const n=tG.normalize(r,i),s=n.length;let o=0,a=[],l=0,c=0;for(let u=0,d=t.length;u<d;u++){const f=t[u],g=f.endIndex,p=f.type,_=f.metadata;for(;o<s&&n[o].startOffset<g;){const v=n[o];if(v.startOffset>c&&(c=v.startOffset,a[l++]=new kn(c,p,_)),v.endOffset+1<=g)c=v.endOffset+1,a[l++]=new kn(c,p+" "+v.className,_|v.metadata),o++;else{c=g,a[l++]=new kn(c,p+" "+v.className,_|v.metadata);break}}g>c&&(c=g,a[l++]=new kn(c,p,_))}const h=t[t.length-1].endIndex;if(o<s&&n[o].startOffset===h)for(;o<s&&n[o].startOffset===h;){const u=n[o];a[l++]=new kn(c,u.className,u.metadata),o++}return a}function hG(r,e){const t=r.fontIsMonospace,i=r.canUseHalfwidthRightwardsArrow,n=r.containsForeignElements,s=r.lineContent,o=r.len,a=r.isOverflowing,l=r.parts,c=r.fauxIndentLength,h=r.tabSize,u=r.startVisibleColumn,d=r.containsRTL,f=r.spaceWidth,g=r.renderSpaceCharCode,p=r.renderWhitespace,_=r.renderControlCharacters,v=new Ko(o+1,l.length);let b=!1,C=0,y=u,x=0,S=0,w=0,L=0;d?e.appendASCIIString('<span dir="ltr">'):e.appendASCIIString("<span>");for(let N=0,P=l.length;N<P;N++){L+=w;const B=l[N],U=B.endIndex,j=B.type,re=p!==0&&B.isWhitespace(),te=re&&!t&&(j==="mtkw"||!n),A=C===U&&B.isPseudoAfter();if(x=0,e.appendASCIIString('<span class="'),e.appendASCIIString(te?"mtkz":j),e.appendASCII(34),re){let D=0;{let M=C,W=y;for(;M<U;M++){const se=(s.charCodeAt(M)===9?h-W%h:1)|0;D+=se,M>=c&&(W+=se)}}for(te&&(e.appendASCIIString(' style="width:'),e.appendASCIIString(String(f*D)),e.appendASCIIString('px"')),e.appendASCII(62);C<U;C++){v.setColumnInfo(C+1,N-S,x,L),S=0;const M=s.charCodeAt(C);let W;if(M===9){W=h-y%h|0,!i||W>1?e.write1(8594):e.write1(65515);for(let ge=2;ge<=W;ge++)e.write1(160)}else W=1,e.write1(g);x+=W,C>=c&&(y+=W)}w=D}else{let D=0;for(e.appendASCII(62);C<U;C++){v.setColumnInfo(C+1,N-S,x,L),S=0;const M=s.charCodeAt(C);let W=1,ge=1;switch(M){case 9:W=h-y%h,ge=W;for(let se=1;se<=W;se++)e.write1(160);break;case 32:e.write1(160);break;case 60:e.appendASCIIString("<");break;case 62:e.appendASCIIString(">");break;case 38:e.appendASCIIString("&");break;case 0:_?e.write1(9216):e.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:e.write1(65533);break;default:Ys(M)&&ge++,_&&M<32?e.write1(9216+M):_&&M===127?e.write1(9249):e.write1(M)}x+=W,D+=W,C>=c&&(y+=ge)}w=D}A?S++:S=0,C>=o&&!b&&B.isPseudoAfter()&&(b=!0,v.setColumnInfo(C+1,N,x,L)),e.appendASCIIString("</span>")}return b||v.setColumnInfo(o+1,l.length-1,x,L),a&&e.appendASCIIString("<span>…</span>"),e.appendASCIIString("</span>"),new Yx(v,d,n)}class bP{constructor(e,t,i,n){this._viewportBrand=void 0,this.top=e|0,this.left=t|0,this.width=i|0,this.height=n|0}}class uG{constructor(e,t){this.outputLineIndex=e,this.outputOffset=t}toString(){return`${this.outputLineIndex}:${this.outputOffset}`}toPosition(e,t){const i=this.outputLineIndex>0?t:0;return new $(e+this.outputLineIndex,i+this.outputOffset+1)}}class Tp{constructor(e,t,i,n,s){this.breakOffsets=e,this.breakOffsetsVisibleColumn=t,this.wrappedTextIndentLength=i,this.injectionOffsets=n,this.injectionOptions=s}getInputOffsetOfOutputPosition(e,t){let i=0;if(e===0?i=t:i=this.breakOffsets[e-1]+t,this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&i>this.injectionOffsets[n];n++)i<this.injectionOffsets[n]+this.injectionOptions[n].content.length?i=this.injectionOffsets[n]:i-=this.injectionOptions[n].content.length;return i}getOutputPositionOfInputOffset(e,t=2){let i=0;if(this.injectionOffsets!==null)for(let n=0;n<this.injectionOffsets.length&&!(e<this.injectionOffsets[n]||t!==1&&e===this.injectionOffsets[n]);n++)i+=this.injectionOptions[n].content.length;return e+=i,this.getOutputPositionOfOffsetInUnwrappedLine(e,t)}getOutputPositionOfOffsetInUnwrappedLine(e,t=2){let i=0,n=this.breakOffsets.length-1,s=0,o=0;for(;i<=n;){s=i+(n-i)/2|0;const a=this.breakOffsets[s];if(o=s>0?this.breakOffsets[s-1]:0,t===0)if(e<=o)n=s-1;else if(e>a)i=s+1;else break;else if(e<o)n=s-1;else if(e>=a)i=s+1;else break}return new uG(s,e-o)}outputPositionToOffsetInUnwrappedLine(e,t){let i=(e>0?this.breakOffsets[e-1]:0)+t;return e>0&&(i-=this.wrappedTextIndentLength),i}normalizeOffsetAroundInjections(e,t){const i=this.getInjectedTextAtOffset(e);if(!i)return e;if(t===2)return e===i.offsetInUnwrappedLine+i.length?i.offsetInUnwrappedLine+i.length:i.offsetInUnwrappedLine;if(t===1){let o=i.offsetInUnwrappedLine+i.length,a=i.injectedTextIndex;for(;a+1<this.injectionOffsets.length&&this.injectionOffsets[a+1]===this.injectionOffsets[a];)o+=this.injectionOptions[a+1].content.length,a++;return o}let n=i.offsetInUnwrappedLine,s=i.injectedTextIndex;for(;s-1>=0&&this.injectionOffsets[s-1]===this.injectionOffsets[s];)n-=this.injectionOptions[s-1].content.length,s++;return n}getInjectedText(e,t){const i=this.outputPositionToOffsetInUnwrappedLine(e,t),n=this.getInjectedTextAtOffset(i);return n?{options:this.injectionOptions[n.injectedTextIndex]}:null}getInjectedTextAtOffset(e){const t=this.injectionOffsets,i=this.injectionOptions;if(t!==null){let n=0;for(let s=0;s<t.length;s++){const o=i[s].content.length,a=t[s]+n,l=t[s]+n+o;if(a>e)break;if(e<=l)return{injectedTextIndex:s,offsetInUnwrappedLine:a,length:o};n+=o}}}}class dG{constructor(e,t){this.tabSize=e,this.data=t}}class Xx{constructor(e,t,i,n,s,o,a){this._viewLineDataBrand=void 0,this.content=e,this.continuesWithWrappedLine=t,this.minColumn=i,this.maxColumn=n,this.startVisibleColumn=s,this.tokens=o,this.inlineDecorations=a}}class Or{constructor(e,t,i,n,s,o,a,l,c,h){this.minColumn=e,this.maxColumn=t,this.content=i,this.continuesWithWrappedLine=n,this.isBasicASCII=Or.isBasicASCII(i,o),this.containsRTL=Or.containsRTL(i,this.isBasicASCII,s),this.tokens=a,this.inlineDecorations=l,this.tabSize=c,this.startVisibleColumn=h}static isBasicASCII(e,t){return t?YL(e):!0}static containsRTL(e,t,i){return!t&&i?dv(e):!1}}class Ap{constructor(e,t,i){this.range=e,this.inlineClassName=t,this.type=i}}class fG{constructor(e,t,i,n){this.startOffset=e,this.endOffset=t,this.inlineClassName=i,this.inlineClassNameAffectsLetterSpacing=n}toInlineDecoration(e){return new Ap(new k(e,this.startOffset+1,e,this.endOffset+1),this.inlineClassName,this.inlineClassNameAffectsLetterSpacing?3:0)}}class vP{constructor(e,t){this._viewModelDecorationBrand=void 0,this.range=e,this.options=t}}function gG(r){return Array.isArray(r)}function pG(r){return!gG(r)}function CP(r){return typeof r=="string"}function wP(r){return!CP(r)}function Qd(r){return!r}function Gl(r,e){return r.ignoreCase&&e?e.toLowerCase():e}function yP(r){return r.replace(/[&<>'"_]/g,"-")}function mG(r,e){console.log(`${r.languageId}: ${e}`)}function Mt(r,e){return new Error(`${r.languageId}: ${e}`)}function Zl(r,e,t,i,n){const s=/\$((\$)|(#)|(\d\d?)|[sS](\d\d?)|@(\w+))/g;let o=null;return e.replace(s,function(a,l,c,h,u,d,f,g,p){return Qd(c)?Qd(h)?!Qd(u)&&u<i.length?Gl(r,i[u]):!Qd(f)&&r&&typeof r[f]=="string"?r[f]:(o===null&&(o=n.split("."),o.unshift(n)),!Qd(d)&&d<o.length?Gl(r,o[d]):""):Gl(r,t):"$"})}function Xv(r,e){let t=e;for(;t&&t.length>0;){const i=r.tokenizer[t];if(i)return i;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return null}function _G(r,e){let t=e;for(;t&&t.length>0;){if(r.stateNames[t])return!0;const n=t.lastIndexOf(".");n<0?t=null:t=t.substr(0,n)}return!1}const SP=5;class Rp{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(e!==null&&e.depth>=this._maxCacheDepth)return new Jd(e,t);let i=Jd.getStackElementId(e);i.length>0&&(i+="|"),i+=t;let n=this._entries[i];return n||(n=new Jd(e,t),this._entries[i]=n,n)}}Rp._INSTANCE=new Rp(SP);class Jd{constructor(e,t){this.parent=e,this.state=t,this.depth=(this.parent?this.parent.depth:0)+1}static getStackElementId(e){let t="";for(;e!==null;)t.length>0&&(t+="|"),t+=e.state,e=e.parent;return t}static _equals(e,t){for(;e!==null&&t!==null;){if(e===t)return!0;if(e.state!==t.state)return!1;e=e.parent,t=t.parent}return e===null&&t===null}equals(e){return Jd._equals(this,e)}push(e){return Rp.create(this,e)}pop(){return this.parent}popall(){let e=this;for(;e.parent;)e=e.parent;return e}switchTo(e){return Rp.create(this.parent,e)}}class Mp{constructor(e,t){this.modeId=e,this.state=t}equals(e){return this.modeId===e.modeId&&this.state.equals(e.state)}clone(){return this.state.clone()===this.state?this:new Mp(this.modeId,this.state)}}class Yl{constructor(e){this._maxCacheDepth=e,this._entries=Object.create(null)}static create(e,t){return this._INSTANCE.create(e,t)}create(e,t){if(t!==null)return new Pp(e,t);if(e!==null&&e.depth>=this._maxCacheDepth)return new Pp(e,t);let i=Jd.getStackElementId(e),n=this._entries[i];return n||(n=new Pp(e,null),this._entries[i]=n,n)}}Yl._INSTANCE=new Yl(SP);class Pp{constructor(e,t){this.stack=e,this.embeddedModeData=t}clone(){return(this.embeddedModeData?this.embeddedModeData.clone():null)===this.embeddedModeData?this:Yl.create(this.stack,this.embeddedModeData)}equals(e){return!(e instanceof Pp)||!this.stack.equals(e.stack)?!1:this.embeddedModeData===null&&e.embeddedModeData===null?!0:this.embeddedModeData===null||e.embeddedModeData===null?!1:this.embeddedModeData.equals(e.embeddedModeData)}}class bG{constructor(){this._tokens=[],this._language=null,this._lastTokenType=null,this._lastTokenLanguage=null}enterMode(e,t){this._language=t}emit(e,t){this._lastTokenType===t&&this._lastTokenLanguage===this._language||(this._lastTokenType=t,this._lastTokenLanguage=this._language,this._tokens.push(new tv(e,t,this._language)))}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,a=ti.get(s);if(!a)return this.enterMode(n,s),this.emit(n,""),o;let l=a.tokenize(e,t,o,n);return this._tokens=this._tokens.concat(l.tokens),this._lastTokenType=null,this._lastTokenLanguage=null,this._language=null,l.endState}finalize(e){return new $S(this._tokens,e)}}class Qv{constructor(e,t){this._modeService=e,this._theme=t,this._prependTokens=null,this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0}enterMode(e,t){this._currentLanguageId=this._modeService.getLanguageIdentifier(t).id}emit(e,t){let i=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){let n=e!==null?e.length:0,s=t.length,o=i!==null?i.length:0;if(n===0&&s===0&&o===0)return new Uint32Array(0);if(n===0&&s===0)return i;if(s===0&&o===0)return e;let a=new Uint32Array(n+s+o);e!==null&&a.set(e);for(let l=0;l<s;l++)a[n+l]=t[l];return i!==null&&a.set(i,n+s),a}nestedModeTokenize(e,t,i,n){const s=i.modeId,o=i.state,a=ti.get(s);if(!a)return this.enterMode(n,s),this.emit(n,""),o;let l=a.tokenize2(e,t,o,n);return this._prependTokens=Qv._merge(this._prependTokens,this._tokens,l.tokens),this._tokens=[],this._currentLanguageId=0,this._lastTokenMetadata=0,l.endState}finalize(e){return new iv(Qv._merge(this._prependTokens,this._tokens,null),e)}}class Jv{constructor(e,t,i,n){this._modeService=e,this._standaloneThemeService=t,this._modeId=i,this._lexer=n,this._embeddedModes=Object.create(null),this.embeddedLoaded=Promise.resolve(void 0);let s=!1;this._tokenizationRegistryListener=ti.onDidChange(o=>{if(s)return;let a=!1;for(let l=0,c=o.changedLanguages.length;l<c;l++){let h=o.changedLanguages[l];if(this._embeddedModes[h]){a=!0;break}}a&&(s=!0,ti.fire([this._modeId]),s=!1)})}dispose(){this._tokenizationRegistryListener.dispose()}getLoadStatus(){let e=[];for(let t in this._embeddedModes){const i=ti.get(t);if(i){if(i instanceof Jv){const s=i.getLoadStatus();s.loaded===!1&&e.push(s.promise)}continue}const n=ti.getPromise(t);n&&e.push(n)}return e.length===0?{loaded:!0}:{loaded:!1,promise:Promise.all(e).then(t=>{})}}getInitialState(){let e=Rp.create(null,this._lexer.start);return Yl.create(e,null)}tokenize(e,t,i,n){let s=new bG,o=this._tokenize(e,t,i,n,s);return s.finalize(o)}tokenize2(e,t,i,n){let s=new Qv(this._modeService,this._standaloneThemeService.getColorTheme().tokenTheme),o=this._tokenize(e,t,i,n,s);return s.finalize(o)}_tokenize(e,t,i,n,s){return i.embeddedModeData?this._nestedTokenize(e,t,i,n,s):this._myTokenize(e,t,i,n,s)}_findLeavingNestedModeOffset(e,t){let i=this._lexer.tokenizer[t.stack.state];if(!i&&(i=Xv(this._lexer,t.stack.state),!i))throw Mt(this._lexer,"tokenizer state is not defined: "+t.stack.state);let n=-1,s=!1;for(const o of i){if(!wP(o.action)||o.action.nextEmbedded!=="@pop")continue;s=!0;let a=o.regex,l=o.regex.source;if(l.substr(0,4)==="^(?:"&&l.substr(l.length-1,1)===")"){let h=(a.ignoreCase?"i":"")+(a.unicode?"u":"");a=new RegExp(l.substr(4,l.length-5),h)}let c=e.search(a);c===-1||c!==0&&o.matchOnlyAtLineStart||(n===-1||c<n)&&(n=c)}if(!s)throw Mt(this._lexer,'no rule containing nextEmbedded: "@pop" in tokenizer embedded state: '+t.stack.state);return n}_nestedTokenize(e,t,i,n,s){let o=this._findLeavingNestedModeOffset(e,i);if(o===-1){let c=s.nestedModeTokenize(e,t,i.embeddedModeData,n);return Yl.create(i.stack,new Mp(i.embeddedModeData.modeId,c))}let a=e.substring(0,o);a.length>0&&s.nestedModeTokenize(a,!1,i.embeddedModeData,n);let l=e.substring(o);return this._myTokenize(l,t,i,n+o,s)}_safeRuleName(e){return e?e.name:"(unknown)"}_myTokenize(e,t,i,n,s){s.enterMode(n,this._modeId);const o=e.length,a=t&&this._lexer.includeLF?e+` -`:e,l=a.length;let c=i.embeddedModeData,h=i.stack,u=0,d=null,f=!0;for(;f||u<l;){const g=u,p=h.depth,_=d?d.groups.length:0,v=h.state;let b=null,C=null,y=null,x=null,S=null;if(d){b=d.matches;const N=d.groups.shift();C=N.matched,y=N.action,x=d.rule,d.groups.length===0&&(d=null)}else{if(!f&&u>=l)break;f=!1;let N=this._lexer.tokenizer[v];if(!N&&(N=Xv(this._lexer,v),!N))throw Mt(this._lexer,"tokenizer state is not defined: "+v);let P=a.substr(u);for(const B of N)if((u===0||!B.matchOnlyAtLineStart)&&(b=P.match(B.regex),b)){C=b[0],y=B.action;break}}if(b||(b=[""],C=""),y||(u<l&&(b=[a.charAt(u)],C=b[0]),y=this._lexer.defaultToken),C===null)break;for(u+=C.length;pG(y)&&wP(y)&&y.test;)y=y.test(C,b,v,u===l);let w=null;if(typeof y=="string"||Array.isArray(y))w=y;else if(y.group)w=y.group;else if(y.token!==null&&y.token!==void 0){if(y.tokenSubst?w=Zl(this._lexer,y.token,C,b,v):w=y.token,y.nextEmbedded)if(y.nextEmbedded==="@pop"){if(!c)throw Mt(this._lexer,"cannot pop embedded mode if not inside one");c=null}else{if(c)throw Mt(this._lexer,"cannot enter embedded mode from within an embedded mode");S=Zl(this._lexer,y.nextEmbedded,C,b,v)}if(y.goBack&&(u=Math.max(0,u-y.goBack)),y.switchTo&&typeof y.switchTo=="string"){let N=Zl(this._lexer,y.switchTo,C,b,v);if(N[0]==="@"&&(N=N.substr(1)),Xv(this._lexer,N))h=h.switchTo(N);else throw Mt(this._lexer,"trying to switch to a state '"+N+"' that is undefined in rule: "+this._safeRuleName(x))}else{if(y.transform&&typeof y.transform=="function")throw Mt(this._lexer,"action.transform not supported");if(y.next)if(y.next==="@push"){if(h.depth>=this._lexer.maxStack)throw Mt(this._lexer,"maximum tokenizer stack size reached: ["+h.state+","+h.parent.state+",...]");h=h.push(v)}else if(y.next==="@pop"){if(h.depth<=1)throw Mt(this._lexer,"trying to pop an empty stack in rule: "+this._safeRuleName(x));h=h.pop()}else if(y.next==="@popall")h=h.popall();else{let N=Zl(this._lexer,y.next,C,b,v);if(N[0]==="@"&&(N=N.substr(1)),Xv(this._lexer,N))h=h.push(N);else throw Mt(this._lexer,"trying to set a next state '"+N+"' that is undefined in rule: "+this._safeRuleName(x))}}y.log&&typeof y.log=="string"&&mG(this._lexer,this._lexer.languageId+": "+Zl(this._lexer,y.log,C,b,v))}if(w===null)throw Mt(this._lexer,"lexer rule has no well-defined action in rule: "+this._safeRuleName(x));const L=N=>{let P=this._modeService.getModeIdForLanguageName(N);P&&(N=P);const B=this._getNestedEmbeddedModeData(N);if(u<l){const U=e.substr(u);return this._nestedTokenize(U,t,Yl.create(h,B),n+u,s)}else return Yl.create(h,B)};if(Array.isArray(w)){if(d&&d.groups.length>0)throw Mt(this._lexer,"groups cannot be nested: "+this._safeRuleName(x));if(b.length!==w.length+1)throw Mt(this._lexer,"matched number of groups does not match the number of actions in rule: "+this._safeRuleName(x));let N=0;for(let P=1;P<b.length;P++)N+=b[P].length;if(N!==C.length)throw Mt(this._lexer,"with groups, all characters should be matched in consecutive groups in rule: "+this._safeRuleName(x));d={rule:x,matches:b,groups:[]};for(let P=0;P<w.length;P++)d.groups[P]={action:w[P],matched:b[P+1]};u-=C.length;continue}else{if(w==="@rematch"&&(u-=C.length,C="",b=null,w="",S!==null))return L(S);if(C.length===0){if(l===0||p!==h.depth||v!==h.state||(d?d.groups.length:0)!==_)continue;throw Mt(this._lexer,"no progress in tokenizer in rule: "+this._safeRuleName(x))}let N=null;if(CP(w)&&w.indexOf("@brackets")===0){let P=w.substr("@brackets".length),B=vG(this._lexer,C);if(!B)throw Mt(this._lexer,"@brackets token returned but no bracket defined as: "+C);N=yP(B.token+P)}else{let P=w===""?"":w+this._lexer.tokenPostfix;N=yP(P)}g<o&&s.emit(g+n,N)}if(S!==null)return L(S)}return Yl.create(h,c)}_getNestedEmbeddedModeData(e){let t=this._locateMode(e);if(t){let i=ti.get(t);if(i)return new Mp(t,i.getInitialState())}return new Mp(t||yx,Lp)}_locateMode(e){if(!e||!this._modeService.isRegisteredMode(e))return null;if(e===this._modeId)return e;let t=this._modeService.getModeId(e);return t&&(this._modeService.triggerMode(t),this._embeddedModes[t]=!0),t}}function vG(r,e){if(!e)return null;e=Gl(r,e);let t=r.brackets;for(const i of t){if(i.open===e)return{token:i.token,bracketType:1};if(i.close===e)return{token:i.token,bracketType:-1}}return null}function CG(r,e,t,i){return new Jv(r,e,t,i)}var Qx;const Jx=(Qx=window.trustedTypes)===null||Qx===void 0?void 0:Qx.createPolicy("standaloneColorizer",{createHTML:r=>r});class ek{static colorizeElement(e,t,i,n){n=n||{};let s=n.theme||"vs",o=n.mimeType||i.getAttribute("lang")||i.getAttribute("data-lang");if(!o)return console.error("Mode not detected"),Promise.resolve();e.setTheme(s);let a=i.firstChild?i.firstChild.nodeValue:"";i.className+=" "+s;let l=c=>{var h;const u=(h=Jx==null?void 0:Jx.createHTML(c))!==null&&h!==void 0?h:c;i.innerHTML=u};return this.colorize(t,a||"",o,n).then(l,c=>console.error(c))}static colorize(e,t,i,n){let s=4;n&&typeof n.tabSize=="number"&&(s=n.tabSize),XL(t)&&(t=t.substr(1));let o=Bo(t),a=e.getModeId(i);if(!a)return Promise.resolve(LP(o,s));e.triggerMode(a);const l=ti.get(a);if(l)return tk(o,s,l);const c=ti.getPromise(a);return c?new Promise((h,u)=>{c.then(d=>{tk(o,s,d).then(h,u)},u)}):new Promise((h,u)=>{let d=null,f=null;const g=()=>{d&&(d.dispose(),d=null),f&&(f.dispose(),f=null);const p=ti.get(a);if(p){tk(o,s,p).then(h,u);return}h(LP(o,s))};f=new Xn,f.cancelAndSet(g,500),d=ti.onDidChange(p=>{p.changedLanguages.indexOf(a)>=0&&g()})})}static colorizeLine(e,t,i,n,s=4){const o=Or.isBasicASCII(e,t),a=Or.containsRTL(e,o,i);return Yv(new kh(!1,!0,e,!1,o,a,0,n,[],s,0,0,0,0,-1,"none",!1,!1,null)).html}static colorizeModelLine(e,t,i=4){let n=e.getLineContent(t);e.forceTokenization(t);let o=e.getLineTokens(t).inflate();return this.colorizeLine(n,e.mightContainNonBasicASCII(),e.mightContainRTL(),o,i)}}function tk(r,e,t){return new Promise((i,n)=>{const s=()=>{const o=wG(r,e,t);if(t instanceof Jv){const a=t.getLoadStatus();if(a.loaded===!1){a.promise.then(s,n);return}}i(o)};s()})}function LP(r,e){let t=[];const i=(0<<11|1<<14|2<<23)>>>0,n=new Uint32Array(2);n[0]=0,n[1]=i;for(let s=0,o=r.length;s<o;s++){let a=r[s];n[0]=a.length;const l=new Ki(n,a),c=Or.isBasicASCII(a,!0),h=Or.containsRTL(a,c,!0);let u=Yv(new kh(!1,!0,a,!1,c,h,0,l,[],e,0,0,0,0,-1,"none",!1,!1,null));t=t.concat(u.html),t.push("<br/>")}return t.join("")}function wG(r,e,t){let i=[],n=t.getInitialState();for(let s=0,o=r.length;s<o;s++){let a=r[s],l=t.tokenize2(a,!0,n,0);Ki.convertToEndOffset(l.tokens,a.length);let c=new Ki(l.tokens,a);const h=Or.isBasicASCII(a,!0),u=Or.containsRTL(a,h,!0);let d=Yv(new kh(!1,!0,a,!1,h,u,0,c.inflate(),[],e,0,0,0,0,-1,"none",!1,!1,null));i=i.concat(d.html),i.push("<br/>"),n=l.endState}return i.join("")}var Op;(function(r){r[r.Ignore=0]="Ignore",r[r.Info=1]="Info",r[r.Warning=2]="Warning",r[r.Error=3]="Error"})(Op||(Op={}));(function(r){const e="error",t="warning",i="warn",n="info",s="ignore";function o(l){return l?dp(e,l)?r.Error:dp(t,l)||dp(i,l)?r.Warning:dp(n,l)?r.Info:r.Ignore:r.Ignore}r.fromValue=o;function a(l){switch(l){case r.Error:return e;case r.Warning:return t;case r.Info:return n;default:return s}}r.toString=a})(Op||(Op={}));var si=Op;function qo(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===mp.ICodeEditor:!1}function xP(r){return r&&typeof r.getEditorType=="function"?r.getEditorType()===mp.IDiffEditor:!1}function kP(r){return qo(r)?r:xP(r)?r.getModifiedEditor():null}const ik=bt("IWorkspaceEditService");function yG(r){return er(r)&&(Boolean(r.newUri)||Boolean(r.oldUri))}function SG(r){return er(r)&&Ie.isUri(r.resource)&&er(r.edit)}class eC{constructor(e){this.metadata=e}static convert(e){return e.edits.map(t=>{if(SG(t))return new DP(t.resource,t.edit,t.modelVersionId,t.metadata);if(yG(t))return new LG(t.oldUri,t.newUri,t.options,t.metadata);throw new Error("Unsupported edit")})}}class DP extends eC{constructor(e,t,i,n){super(n);this.resource=e,this.textEdit=t,this.versionId=i}}class LG extends eC{constructor(e,t,i,n){super(n);this.oldResource=e,this.newResource=t,this.options=i}}class xG{constructor(){this.data=new Map}add(e,t){Cv(ys(e)),Cv(er(t)),Cv(!this.data.has(e),"There is already an extension with this id"),this.data.set(e,t)}as(e){return this.data.get(e)||null}}const mi=new xG,tC={JSONContribution:"base.contributions.json"};function kG(r){return r.length>0&&r.charAt(r.length-1)==="#"?r.substring(0,r.length-1):r}class DG{constructor(){this._onDidChangeSchema=new H,this.schemasById={}}registerSchema(e,t){this.schemasById[kG(e)]=t,this._onDidChangeSchema.fire(e)}notifySchemaChanged(e){this._onDidChangeSchema.fire(e)}}const EG=new DG;mi.add(tC.JSONContribution,EG);const Dh={Configuration:"base.contributions.configuration"},EP={properties:{},patternProperties:{}},IP={properties:{},patternProperties:{}},NP={properties:{},patternProperties:{}},TP={properties:{},patternProperties:{}},AP={properties:{},patternProperties:{}},nk={properties:{},patternProperties:{}},rk="vscode://schemas/settings/resourceLanguage",RP=mi.as(tC.JSONContribution);class IG{constructor(){this.overrideIdentifiers=new Set,this._onDidSchemaChange=new H,this._onDidUpdateConfiguration=new H,this.defaultValues={},this.defaultLanguageConfigurationOverridesNode={id:"defaultOverrides",title:m("defaultLanguageConfigurationOverrides.title","Default Language Configuration Overrides"),properties:{}},this.configurationContributors=[this.defaultLanguageConfigurationOverridesNode],this.resourceLanguageSettingsSchema={properties:{},patternProperties:{},additionalProperties:!1,errorMessage:"Unknown editor configuration setting",allowTrailingCommas:!0,allowComments:!0},this.configurationProperties={},this.excludedConfigurationProperties={},RP.registerSchema(rk,this.resourceLanguageSettingsSchema)}registerConfiguration(e,t=!0){this.registerConfigurations([e],t)}registerConfigurations(e,t=!0){const i=this.doRegisterConfigurations(e,t);RP.registerSchema(rk,this.resourceLanguageSettingsSchema),this._onDidSchemaChange.fire(),this._onDidUpdateConfiguration.fire(i)}registerOverrideIdentifiers(e){for(const t of e)this.overrideIdentifiers.add(t);this.updateOverridePropertyPatternKey()}doRegisterConfigurations(e,t){const i=[];return e.forEach(n=>{i.push(...this.validateAndRegisterProperties(n,t,n.extensionInfo)),this.configurationContributors.push(n),this.registerJSONConfiguration(n)}),i}validateAndRegisterProperties(e,t=!0,i,n=3){var s;n=Zr(e.scope)?n:e.scope;let o=[],a=e.properties;if(a)for(let c in a){if(t&&RG(c)){delete a[c];continue}const h=a[c];if(this.updatePropertyDefaultValue(c,h),sk.test(c)?h.scope=void 0:(h.scope=Zr(h.scope)?n:h.scope,h.restricted=Zr(h.restricted)?!!((s=i==null?void 0:i.restrictedConfigurations)===null||s===void 0?void 0:s.includes(c)):h.restricted),a[c].hasOwnProperty("included")&&!a[c].included){this.excludedConfigurationProperties[c]=a[c],delete a[c];continue}else this.configurationProperties[c]=a[c];!a[c].deprecationMessage&&a[c].markdownDeprecationMessage&&(a[c].deprecationMessage=a[c].markdownDeprecationMessage),o.push(c)}let l=e.allOf;if(l)for(let c of l)o.push(...this.validateAndRegisterProperties(c,t,i,n));return o}getConfigurationProperties(){return this.configurationProperties}registerJSONConfiguration(e){const t=i=>{let n=i.properties;if(n)for(const o in n)this.updateSchema(o,n[o]);let s=i.allOf;s&&s.forEach(t)};t(e)}updateSchema(e,t){switch(EP.properties[e]=t,t.scope){case 1:IP.properties[e]=t;break;case 2:NP.properties[e]=t;break;case 6:TP.properties[e]=t;break;case 3:AP.properties[e]=t;break;case 4:nk.properties[e]=t;break;case 5:nk.properties[e]=t,this.resourceLanguageSettingsSchema.properties[e]=t;break}}updateOverridePropertyPatternKey(){for(const e of this.overrideIdentifiers.values()){const t=`[${e}]`,i={type:"object",description:m("overrideSettings.defaultDescription","Configure editor settings to be overridden for a language."),errorMessage:m("overrideSettings.errorMessage","This setting does not support per-language configuration."),$ref:rk};this.updatePropertyDefaultValue(t,i),EP.properties[t]=i,IP.properties[t]=i,NP.properties[t]=i,TP.properties[t]=i,AP.properties[t]=i,nk.properties[t]=i}this._onDidSchemaChange.fire()}updatePropertyDefaultValue(e,t){let i=this.defaultValues[e];On(i)&&(i=t.default),On(i)&&(i=AG(t.type)),t.default=i}}const NG="\\[.*\\]$",sk=new RegExp(NG);function TG(r){return r.substring(1,r.length-1)}function AG(r){switch(Array.isArray(r)?r[0]:r){case"boolean":return!1;case"integer":case"number":return 0;case"string":return"";case"array":return[];case"object":return{};default:return null}}const MP=new IG;mi.add(Dh.Configuration,MP);function RG(r){return r.trim()?sk.test(r)?m("config.property.languageDefault","Cannot register '{0}'. This matches property pattern '\\\\[.*\\\\]$' for describing language specific editor settings. Use 'configurationDefaults' contribution.",r):MP.getConfigurationProperties()[r]!==void 0?m("config.property.duplicate","Cannot register '{0}'. This property is already registered.",r):null:m("config.property.empty","Cannot register an empty property")}const MG=Object.prototype.hasOwnProperty;function PG(r,e){for(let t in r)if(MG.call(r,t)&&e({key:t,value:r[t]},function(){delete r[t]})===!1)return}class OG{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),i.size===0&&this.map.delete(e))}forEach(e,t){const i=this.map.get(e);!i||i.forEach(t)}}const iC=new class{constructor(){this._tabFocus=!1,this._onDidChangeTabFocus=new H,this.onDidChangeTabFocus=this._onDidChangeTabFocus.event}getTabFocusMode(){return this._tabFocus}setTabFocusMode(r){this._tabFocus!==r&&(this._tabFocus=r,this._onDidChangeTabFocus.fire(this._tabFocus))}},PP=Object.hasOwnProperty;class FG{constructor(){this._values=[]}_read(e){return this._values[e]}get(e){return this._values[e]}_write(e,t){this._values[e]=t}}class BG{constructor(){this._values=[]}_read(e){return this._values[e]}_write(e,t){this._values[e]=t}}class Ha{static readOptions(e){const t=e,i=new BG;for(const n of kd){const s=n.name==="_never_"?void 0:t[n.name];i._write(n.id,s)}return i}static validateOptions(e){const t=new G$;for(const i of kd)t._write(i.id,i.validate(e._read(i.id)));return t}static computeOptions(e,t){const i=new FG;for(const n of kd)i._write(n.id,n.compute(t,i,e._read(n.id)));return i}static _deepEquals(e,t){if(typeof e!="object"||typeof t!="object")return e===t;if(Array.isArray(e)||Array.isArray(t))return Array.isArray(e)&&Array.isArray(t)?Is(e,t):!1;for(let i in e)if(!Ha._deepEquals(e[i],t[i]))return!1;return!0}static checkEquals(e,t){const i=[];let n=!1;for(const s of kd){const o=!Ha._deepEquals(e._read(s.id),t._read(s.id));i[s.id]=o,o&&(n=!0)}return n?new CM(i):null}}function WG(r){const e=r.wordWrap;e===!0?r.wordWrap="on":e===!1&&(r.wordWrap="off");const t=r.lineNumbers;t===!0?r.lineNumbers="on":t===!1&&(r.lineNumbers="off"),r.autoClosingBrackets===!1&&(r.autoClosingBrackets="never",r.autoClosingQuotes="never",r.autoSurround="never"),r.cursorBlinking==="visible"&&(r.cursorBlinking="solid");const s=r.renderWhitespace;s===!0?r.renderWhitespace="boundary":s===!1&&(r.renderWhitespace="none");const o=r.renderLineHighlight;o===!0?r.renderLineHighlight="line":o===!1&&(r.renderLineHighlight="none");const a=r.acceptSuggestionOnEnter;a===!0?r.acceptSuggestionOnEnter="on":a===!1&&(r.acceptSuggestionOnEnter="off");const l=r.tabCompletion;l===!1?r.tabCompletion="off":l===!0&&(r.tabCompletion="onlySnippets");const c=r.suggest;if(c&&typeof c.filteredTypes=="object"&&c.filteredTypes){const _={};_.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",PG(_,v=>{const b=c.filteredTypes[v.key];b===!1&&(c[v.value]=b)})}const h=r.hover;h===!0?r.hover={enabled:!0}:h===!1&&(r.hover={enabled:!1});const u=r.parameterHints;u===!0?r.parameterHints={enabled:!0}:u===!1&&(r.parameterHints={enabled:!1});const d=r.autoIndent;d===!0?r.autoIndent="full":d===!1&&(r.autoIndent="advanced");const f=r.matchBrackets;f===!0?r.matchBrackets="always":f===!1&&(r.matchBrackets="never");const{renderIndentGuides:g,highlightActiveIndentGuide:p}=r;r.guides||(r.guides={}),g!==void 0&&(r.guides.indentation=!!g),p!==void 0&&(r.guides.highlightActiveIndentation=!!p)}function OP(r){const e=jl(r);return WG(e),e}class nC extends Y{constructor(e,t){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidChangeFast=this._register(new H),this.onDidChangeFast=this._onDidChangeFast.event,this.isSimpleWidget=e,this._isDominatedByLongLines=!1,this._computeOptionsMemory=new wM,this._viewLineCount=1,this._lineNumbersDigitCount=1,this._rawOptions=OP(t),this._readOptions=Ha.readOptions(this._rawOptions),this._validatedOptions=Ha.validateOptions(this._readOptions),this._register(Fa.onDidChangeZoomLevel(i=>this._recomputeOptions())),this._register(iC.onDidChangeTabFocus(i=>this._recomputeOptions()))}observeReferenceElement(e){}updatePixelRatio(){}_recomputeOptions(){const e=this.options,t=this._computeInternalOptions();if(!e)this.options=t;else{const i=Ha.checkEquals(e,t);if(i===null)return;this.options=t,this._onDidChangeFast.fire(i),this._onDidChange.fire(i)}}getRawOptions(){return this._rawOptions}_computeInternalOptions(){const e=this._getEnvConfiguration(),t=wh.createFromValidatedSettings(this._validatedOptions,e.zoomLevel,e.pixelRatio,this.isSimpleWidget),i={memory:this._computeOptionsMemory,outerWidth:e.outerWidth,outerHeight:e.outerHeight,fontInfo:this.readConfiguration(t),extraEditorClassName:e.extraEditorClassName,isDominatedByLongLines:this._isDominatedByLongLines,viewLineCount:this._viewLineCount,lineNumbersDigitCount:this._lineNumbersDigitCount,emptySelectionClipboard:e.emptySelectionClipboard,pixelRatio:e.pixelRatio,tabFocusMode:iC.getTabFocusMode(),accessibilitySupport:e.accessibilitySupport};return Ha.computeOptions(this._validatedOptions,i)}static _subsetEquals(e,t){for(const i in t)if(PP.call(t,i)){const n=t[i],s=e[i];if(s===n)continue;if(Array.isArray(s)&&Array.isArray(n)){if(!Is(s,n))return!1;continue}if(s&&typeof s=="object"&&n&&typeof n=="object"){if(!this._subsetEquals(s,n))return!1;continue}return!1}return!0}updateOptions(e){if(typeof e=="undefined")return;const t=OP(e);nC._subsetEquals(this._rawOptions,t)||(this._rawOptions=eo(this._rawOptions,t||{}),this._readOptions=Ha.readOptions(this._rawOptions),this._validatedOptions=Ha.validateOptions(this._readOptions),this._recomputeOptions())}setIsDominatedByLongLines(e){this._isDominatedByLongLines=e,this._recomputeOptions()}setMaxLineNumber(e){const t=nC._digitCount(e);this._lineNumbersDigitCount!==t&&(this._lineNumbersDigitCount=t,this._recomputeOptions())}setViewLineCount(e){this._viewLineCount!==e&&(this._viewLineCount=e,this._recomputeOptions())}static _digitCount(e){let t=0;for(;e;)e=Math.floor(e/10),t++;return t||1}}const VG=Object.freeze({id:"editor",order:5,type:"object",title:m("editorConfigurationTitle","Editor"),scope:5}),HG=mi.as(Dh.Configuration),rC=Object.assign(Object.assign({},VG),{properties:{"editor.tabSize":{type:"number",default:Sn.tabSize,minimum:1,markdownDescription:m("tabSize","The number of spaces a tab is equal to. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.insertSpaces":{type:"boolean",default:Sn.insertSpaces,markdownDescription:m("insertSpaces","Insert spaces when pressing `Tab`. This setting is overridden based on the file contents when `#editor.detectIndentation#` is on.")},"editor.detectIndentation":{type:"boolean",default:Sn.detectIndentation,markdownDescription:m("detectIndentation","Controls whether `#editor.tabSize#` and `#editor.insertSpaces#` will be automatically detected when a file is opened based on the file contents.")},"editor.trimAutoWhitespace":{type:"boolean",default:Sn.trimAutoWhitespace,description:m("trimAutoWhitespace","Remove trailing auto inserted whitespace.")},"editor.largeFileOptimizations":{type:"boolean",default:Sn.largeFileOptimizations,description:m("largeFileOptimizations","Special handling for large files to disable certain memory intensive features.")},"editor.wordBasedSuggestions":{type:"boolean",default:!0,description:m("wordBasedSuggestions","Controls whether completions should be computed based on words in the document.")},"editor.wordBasedSuggestionsMode":{enum:["currentDocument","matchingDocuments","allDocuments"],default:"matchingDocuments",enumDescriptions:[m("wordBasedSuggestionsMode.currentDocument","Only suggest words from the active document."),m("wordBasedSuggestionsMode.matchingDocuments","Suggest words from all open documents of the same language."),m("wordBasedSuggestionsMode.allDocuments","Suggest words from all open documents.")],description:m("wordBasedSuggestionsMode","Controls from which documents word based completions are computed.")},"editor.semanticHighlighting.enabled":{enum:[!0,!1,"configuredByTheme"],enumDescriptions:[m("semanticHighlighting.true","Semantic highlighting enabled for all color themes."),m("semanticHighlighting.false","Semantic highlighting disabled for all color themes."),m("semanticHighlighting.configuredByTheme","Semantic highlighting is configured by the current color theme's `semanticHighlighting` setting.")],default:"configuredByTheme",description:m("semanticHighlighting.enabled","Controls whether the semanticHighlighting is shown for the languages that support it.")},"editor.stablePeek":{type:"boolean",default:!1,markdownDescription:m("stablePeek","Keep peek editors open even when double clicking their content or when hitting `Escape`.")},"editor.maxTokenizationLineLength":{type:"integer",default:2e4,description:m("maxTokenizationLineLength","Lines above this length will not be tokenized for performance reasons")},"diffEditor.maxComputationTime":{type:"number",default:5e3,description:m("maxComputationTime","Timeout in milliseconds after which diff computation is cancelled. Use 0 for no timeout.")},"diffEditor.maxFileSize":{type:"number",default:50,description:m("maxFileSize","Maximum file size in MB for which to compute diffs. Use 0 for no limit.")},"diffEditor.renderSideBySide":{type:"boolean",default:!0,description:m("sideBySide","Controls whether the diff editor shows the diff side by side or inline.")},"diffEditor.ignoreTrimWhitespace":{type:"boolean",default:!0,description:m("ignoreTrimWhitespace","When enabled, the diff editor ignores changes in leading or trailing whitespace.")},"diffEditor.renderIndicators":{type:"boolean",default:!0,description:m("renderIndicators","Controls whether the diff editor shows +/- indicators for added/removed changes.")},"diffEditor.codeLens":{type:"boolean",default:!1,description:m("codeLens","Controls whether the editor shows CodeLens.")},"diffEditor.wordWrap":{type:"string",enum:["off","on","inherit"],default:"inherit",markdownEnumDescriptions:[m("wordWrap.off","Lines will never wrap."),m("wordWrap.on","Lines will wrap at the viewport width."),m("wordWrap.inherit","Lines will wrap according to the `#editor.wordWrap#` setting.")]}}});function zG(r){return typeof r.type!="undefined"||typeof r.anyOf!="undefined"}for(const r of kd){const e=r.schema;if(typeof e!="undefined")if(zG(e))rC.properties[`editor.${r.name}`]=e;else for(let t in e)PP.call(e,t)&&(rC.properties[t]=e[t])}let sC=null;function FP(){return sC===null&&(sC=Object.create(null),Object.keys(rC.properties).forEach(r=>{sC[r]=!0})),sC}function $G(r){return FP()[`editor.${r}`]||!1}function UG(r){return FP()[`diffEditor.${r}`]||!1}HG.registerConfiguration(rC);class ci{static insert(e,t){return{range:new k(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}}}const hi=bt("configurationService");function BP(r,e){const t=Object.create(null);for(let i in r)ok(t,i,r[i],e);return t}function ok(r,e,t,i){const n=e.split("."),s=n.pop();let o=r;for(let a=0;a<n.length;a++){let l=n[a],c=o[l];switch(typeof c){case"undefined":c=o[l]=Object.create(null);break;case"object":break;default:i(`Ignoring ${e} as ${n.slice(0,a+1).join(".")} is ${JSON.stringify(c)}`);return}o=c}if(typeof o=="object"&&o!==null)try{o[s]=t}catch{i(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`)}else i(`Ignoring ${e} as ${n.join(".")} is ${JSON.stringify(o)}`)}function jG(r,e){const t=e.split(".");WP(r,t)}function WP(r,e){const t=e.shift();if(e.length===0){delete r[t];return}if(Object.keys(r).indexOf(t)!==-1){const i=r[t];typeof i=="object"&&!Array.isArray(i)&&(WP(i,e),Object.keys(i).length===0&&delete r[t])}}function KG(r,e,t){function i(o,a){let l=o;for(const c of a){if(typeof l!="object"||l===null)return;l=l[c]}return l}const n=e.split("."),s=i(r,n);return typeof s=="undefined"?t:s}function qG(){const r=mi.as(Dh.Configuration).getConfigurationProperties();return Object.keys(r)}function GG(){const r=Object.create(null),e=mi.as(Dh.Configuration).getConfigurationProperties();for(let t in e){let i=e[t].default;ok(r,t,i,n=>console.error(`Conflict in default settings: ${n}`))}return r}class Jr{constructor(e={},t=[],i=[]){this._contents=e,this._keys=t,this._overrides=i,this.isFrozen=!1,this.overrideConfigurations=new Map}get contents(){return this.checkAndFreeze(this._contents)}get overrides(){return this.checkAndFreeze(this._overrides)}get keys(){return this.checkAndFreeze(this._keys)}isEmpty(){return this._keys.length===0&&Object.keys(this._contents).length===0&&this._overrides.length===0}getValue(e){return e?KG(this.contents,e):this.contents}override(e){let t=this.overrideConfigurations.get(e);return t||(t=this.createOverrideConfigurationModel(e),this.overrideConfigurations.set(e,t)),t}merge(...e){const t=jl(this.contents),i=jl(this.overrides),n=[...this.keys];for(const s of e){this.mergeContents(t,s.contents);for(const o of s.overrides){const[a]=i.filter(l=>Is(l.identifiers,o.identifiers));a?this.mergeContents(a.contents,o.contents):i.push(jl(o))}for(const o of s.keys)n.indexOf(o)===-1&&n.push(o)}return new Jr(t,n,i)}freeze(){return this.isFrozen=!0,this}createOverrideConfigurationModel(e){const t=this.getContentsForOverrideIdentifer(e);if(!t||typeof t!="object"||!Object.keys(t).length)return this;let i={};for(const n of cP([...Object.keys(this.contents),...Object.keys(t)])){let s=this.contents[n],o=t[n];o&&(typeof s=="object"&&typeof o=="object"?(s=jl(s),this.mergeContents(s,o)):s=o),i[n]=s}return new Jr(i,this.keys,this.overrides)}mergeContents(e,t){for(const i of Object.keys(t)){if(i in e&&er(e[i])&&er(t[i])){this.mergeContents(e[i],t[i]);continue}e[i]=jl(t[i])}}checkAndFreeze(e){return this.isFrozen&&!Object.isFrozen(e)?wK(e):e}getContentsForOverrideIdentifer(e){for(const t of this.overrides)if(t.identifiers.indexOf(e)!==-1)return t.contents;return null}toJSON(){return{contents:this.contents,overrides:this.overrides,keys:this.keys}}setValue(e,t){this.addKey(e),ok(this.contents,e,t,i=>{throw new Error(i)})}removeValue(e){this.removeKey(e)&&jG(this.contents,e)}addKey(e){let t=this.keys.length;for(let i=0;i<t;i++)e.indexOf(this.keys[i])===0&&(t=i);this.keys.splice(t,1,e)}removeKey(e){let t=this.keys.indexOf(e);return t!==-1?(this.keys.splice(t,1),!0):!1}}class ZG extends Jr{constructor(){const e=GG(),t=qG(),i=[];for(const n of Object.keys(e))sk.test(n)&&i.push({identifiers:[TG(n).trim()],keys:Object.keys(e[n]),contents:BP(e[n],s=>console.error(`Conflict in default settings file: ${s}`))});super(e,t,i)}}class oC{constructor(e,t,i=new Jr,n=new Jr,s=new Pn,o=new Jr,a=new Pn,l=!0){this._defaultConfiguration=e,this._localUserConfiguration=t,this._remoteUserConfiguration=i,this._workspaceConfiguration=n,this._folderConfigurations=s,this._memoryConfiguration=o,this._memoryConfigurationByResource=a,this._freeze=l,this._workspaceConsolidatedConfiguration=null,this._foldersConsolidatedConfigurations=new Pn,this._userConfiguration=null}getValue(e,t,i){return this.getConsolidateConfigurationModel(t,i).getValue(e)}updateValue(e,t,i={}){let n;i.resource?(n=this._memoryConfigurationByResource.get(i.resource),n||(n=new Jr,this._memoryConfigurationByResource.set(i.resource,n))):n=this._memoryConfiguration,t===void 0?n.removeValue(e):n.setValue(e,t),i.resource||(this._workspaceConsolidatedConfiguration=null)}get userConfiguration(){return this._userConfiguration||(this._userConfiguration=this._remoteUserConfiguration.isEmpty()?this._localUserConfiguration:this._localUserConfiguration.merge(this._remoteUserConfiguration),this._freeze&&this._userConfiguration.freeze()),this._userConfiguration}getConsolidateConfigurationModel(e,t){let i=this.getConsolidatedConfigurationModelForResource(e,t);return e.overrideIdentifier?i.override(e.overrideIdentifier):i}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.userConfiguration,this._workspaceConfiguration,this._memoryConfiguration),this._freeze&&(this._workspaceConfiguration=this._workspaceConfiguration.freeze())),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._freeze&&(t=t.freeze()),this._foldersConsolidatedConfigurations.set(e,t)):t=i}return t}toData(){return{defaults:{contents:this._defaultConfiguration.contents,overrides:this._defaultConfiguration.overrides,keys:this._defaultConfiguration.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.user),n=this.parseConfigurationModel(e.workspace),s=e.folders.reduce((o,a)=>(o.set(Ie.revive(a[0]),this.parseConfigurationModel(a[1])),o),new Pn);return new oC(t,i,new Jr,n,s,new Jr,new Pn,!1)}static parseConfigurationModel(e){return new Jr(e.contents,e.keys,e.overrides).freeze()}}class YG{constructor(e,t,i,n){this.change=e,this.previous=t,this.currentConfiguraiton=i,this.currentWorkspace=n,this._previousConfiguration=void 0;const s=new Set;e.keys.forEach(a=>s.add(a)),e.overrides.forEach(([,a])=>a.forEach(l=>s.add(l))),this.affectedKeys=[...s.values()];const o=new Jr;this.affectedKeys.forEach(a=>o.setValue(a,{})),this.affectedKeysTree=o.contents}get previousConfiguration(){return!this._previousConfiguration&&this.previous&&(this._previousConfiguration=oC.parse(this.previous.data)),this._previousConfiguration}affectsConfiguration(e,t){var i;if(this.doesAffectedKeysTreeContains(this.affectedKeysTree,e)){if(t){const n=this.previousConfiguration?this.previousConfiguration.getValue(e,t,(i=this.previous)===null||i===void 0?void 0:i.workspace):void 0,s=this.currentConfiguraiton.getValue(e,t,this.currentWorkspace);return!to(n,s)}return!0}return!1}doesAffectedKeysTreeContains(e,t){let i=BP({[t]:!0},()=>{}),n;for(;typeof i=="object"&&(n=Object.keys(i)[0]);){if(e=e[n],!e)return!1;i=i[n]}return!0}}const XG=/^(cursor|delete)/;class QG extends Y{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 H),this._currentChord=null,this._currentChordChecker=new lp,this._currentChordStatusMessage=null,this._ignoreSingleModifiers=ef.EMPTY,this._currentSingleModifier=null,this._currentSingleModifierClearTimeout=new Xn,this._logging=!1}get onDidUpdateKeybindings(){return this._onDidUpdateKeybindings?this._onDidUpdateKeybindings.event:ke.None}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){const i=this.resolveKeyboardEvent(e);if(i.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),null;const[n]=i.getDispatchParts();if(n===null)return null;const s=this._contextKeyService.getContext(t),o=this._currentChord?this._currentChord.keypress:null;return this._getResolver().resolve(s,o,n)}_enterChordMode(e,t){this._currentChord={keypress:e,label:t},this._currentChordStatusMessage=this._notificationService.status(m("first.chord","({0}) was pressed. Waiting for second key of chord...",t));const i=Date.now();this._currentChordChecker.cancelAndSet(()=>{if(!this._documentHasFocus()){this._leaveChordMode();return}Date.now()-i>5e3&&this._leaveChordMode()},500)}_leaveChordMode(){this._currentChordStatusMessage&&(this._currentChordStatusMessage.dispose(),this._currentChordStatusMessage=null),this._currentChordChecker.cancel(),this._currentChord=null}_dispatch(e,t){return this._doDispatch(this.resolveKeyboardEvent(e),t,!1)}_singleModifierDispatch(e,t){const i=this.resolveKeyboardEvent(e),[n]=i.getSingleModifierDispatchParts();if(n)return this._ignoreSingleModifiers.has(n)?(this._log(`+ Ignoring single modifier ${n} due to it being pressed together with other keys.`),this._ignoreSingleModifiers=ef.EMPTY,this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1):(this._ignoreSingleModifiers=ef.EMPTY,this._currentSingleModifier===null?(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.getParts();return this._ignoreSingleModifiers=new ef(s),this._currentSingleModifier!==null&&this._log("+ Clearing single modifier due to other key up."),this._currentSingleModifierClearTimeout.cancel(),this._currentSingleModifier=null,!1}_doDispatch(e,t,i=!1){let n=!1;if(e.isChord())return console.warn("Unexpected keyboard event mapped to a chord"),!1;let s=null,o=null;if(i){const[h]=e.getSingleModifierDispatchParts();s=h,o=h}else[s]=e.getDispatchParts(),o=this._currentChord?this._currentChord.keypress:null;if(s===null)return this._log("\\ Keyboard event cannot be dispatched in keydown phase."),n;const a=this._contextKeyService.getContext(t),l=e.getLabel(),c=this._getResolver().resolve(a,o,s);return this._logService.trace("KeybindingService#dispatch",l,c==null?void 0:c.commandId),c&&c.enterChord?(n=!0,this._enterChordMode(s,l),n):(this._currentChord&&(!c||!c.commandId)&&(this._notificationService.status(m("missing.chord","The key combination ({0}, {1}) is not a command.",this._currentChord.label,l),{hideAfter:10*1e3}),n=!0),this._leaveChordMode(),c&&c.commandId&&(c.bubble||(n=!0),typeof c.commandArgs=="undefined"?this._commandService.executeCommand(c.commandId).then(void 0,h=>this._notificationService.warn(h)):this._commandService.executeCommand(c.commandId,c.commandArgs).then(void 0,h=>this._notificationService.warn(h)),XG.test(c.commandId)||this._telemetryService.publicLog2("workbenchActionExecuted",{id:c.commandId,from:"keybinding"})),n)}mightProducePrintableCharacter(e){return e.ctrlKey||e.metaKey?!1:e.keyCode>=31&&e.keyCode<=56||e.keyCode>=21&&e.keyCode<=30}}class ef{constructor(e){this._ctrlKey=e?e.ctrlKey:!1,this._shiftKey=e?e.shiftKey:!1,this._altKey=e?e.altKey:!1,this._metaKey=e?e.metaKey:!1}has(e){switch(e){case"ctrl":return this._ctrlKey;case"shift":return this._shiftKey;case"alt":return this._altKey;case"meta":return this._metaKey}}}ef.EMPTY=new ef(null);let aC=U$||"";const pn=new Map;pn.set("false",!1);pn.set("true",!0);pn.set("isMac",Je);pn.set("isLinux",Zn);pn.set("isWindows",Xi);pn.set("isWeb",Sd);pn.set("isMacNative",Je&&!Sd);pn.set("isEdge",aC.indexOf("Edg/")>=0);pn.set("isFirefox",aC.indexOf("Firefox")>=0);pn.set("isChrome",aC.indexOf("Chrome")>=0);pn.set("isSafari",aC.indexOf("Safari")>=0);const JG=Object.prototype.hasOwnProperty;class _e{static has(e){return Xl.create(e)}static equals(e,t){return nf.create(e,t)}static regex(e,t){return fC.create(e,t)}static not(e){return Eh.create(e)}static and(...e){return Ql.create(e,null)}static or(...e){return za.create(e,null,!0)}static deserialize(e,t=!1){if(!!e)return this._deserializeOrExpression(e,t)}static _deserializeOrExpression(e,t){let i=e.split("||");return za.create(i.map(n=>this._deserializeAndExpression(n,t)),null,!0)}static _deserializeAndExpression(e,t){let i=e.split("&&");return Ql.create(i.map(n=>this._deserializeOne(n,t)),null)}static _deserializeOne(e,t){if(e=e.trim(),e.indexOf("!=")>=0){let i=e.split("!=");return lC.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("==")>=0){let i=e.split("==");return nf.create(i[0].trim(),this._deserializeValue(i[1],t))}if(e.indexOf("=~")>=0){let i=e.split("=~");return fC.create(i[0].trim(),this._deserializeRegexValue(i[1],t))}if(e.indexOf(" in ")>=0){let i=e.split(" in ");return ak.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(e)){const i=e.split(">=");return hC.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(e)){const i=e.split(">");return cC.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(e)){const i=e.split("<=");return dC.create(i[0].trim(),i[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(e)){const i=e.split("<");return uC.create(i[0].trim(),i[1].trim())}return/^\!\s*/.test(e)?Eh.create(e.substr(1).trim()):Xl.create(e)}static _deserializeValue(e,t){if(e=e.trim(),e==="true")return!0;if(e==="false")return!1;let i=/^'([^']*)'$/.exec(e);return i?i[1].trim():e}static _deserializeRegexValue(e,t){if(n2(e)){if(t)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let i=e.indexOf("/"),n=e.lastIndexOf("/");if(i===n||i<0){if(t)throw new Error(`bad regexp-value '${e}', missing /-enclosure`);return console.warn(`bad regexp-value '${e}', missing /-enclosure`),null}let s=e.slice(i+1,n),o=e[n+1]==="i"?"i":"";try{return new RegExp(s,o)}catch(a){if(t)throw new Error(`bad regexp-value '${e}', parse error: ${a}`);return console.warn(`bad regexp-value '${e}', parse error: ${a}`),null}}}function eZ(r,e){const t=r?r.substituteConstants():void 0,i=e?e.substituteConstants():void 0;return!t&&!i?!0:!t||!i?!1:t.equals(i)}function tf(r,e){return r.cmp(e)}class es{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 ts.INSTANCE}}es.INSTANCE=new es;class ts{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 es.INSTANCE}}ts.INSTANCE=new ts;class Xl{constructor(e,t){this.key=e,this.negated=t,this.type=2}static create(e,t=null){const i=pn.get(e);return typeof i=="boolean"?i?ts.INSTANCE:es.INSTANCE:new Xl(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:HP(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=pn.get(this.key);return typeof e=="boolean"?e?ts.INSTANCE:es.INSTANCE:this}evaluate(e){return!!e.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=Eh.create(this.key,this)),this.negated}}class nf{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=4}static create(e,t,i=null){if(typeof t=="boolean")return t?Xl.create(e,i):Eh.create(e,i);const n=pn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?ts.INSTANCE:es.INSTANCE:new nf(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=pn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?ts.INSTANCE:es.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=lC.create(this.key,this.value,this)),this.negated}}class ak{constructor(e,t){this.key=e,this.valueKey=t,this.type=10,this.negated=null}static create(e,t){return new ak(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.valueKey,e.key,e.valueKey)}equals(e){return e.type===this.type?this.key===e.key&&this.valueKey===e.valueKey:!1}substituteConstants(){return this}evaluate(e){const t=e.getValue(this.valueKey),i=e.getValue(this.key);return Array.isArray(t)?t.indexOf(i)>=0:typeof i=="string"&&typeof t=="object"&&t!==null?JG.call(t,i):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=lk.create(this)),this.negated}}class lk{constructor(e){this._actual=e,this.type=11}static create(e){return new lk(e)}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):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class lC{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=5}static create(e,t,i=null){if(typeof t=="boolean")return t?Eh.create(e,i):Xl.create(e,i);const n=pn.get(e);return typeof n=="boolean"?t===(n?"true":"false")?es.INSTANCE:ts.INSTANCE:new lC(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){const e=pn.get(this.key);if(typeof e=="boolean"){const t=e?"true":"false";return this.value===t?es.INSTANCE:ts.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=nf.create(this.key,this.value,this)),this.negated}}class Eh{constructor(e,t){this.key=e,this.negated=t,this.type=3}static create(e,t=null){const i=pn.get(e);return typeof i=="boolean"?i?es.INSTANCE:ts.INSTANCE:new Eh(e,t)}cmp(e){return e.type!==this.type?this.type-e.type:HP(this.key,e.key)}equals(e){return e.type===this.type?this.key===e.key:!1}substituteConstants(){const e=pn.get(this.key);return typeof e=="boolean"?e?es.INSTANCE:ts.INSTANCE:this}evaluate(e){return!e.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Xl.create(this.key,this)),this.negated}}class cC{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=12}static create(e,t,i=null){return new cC(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>parseFloat(this.value)}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=dC.create(this.key,this.value,this)),this.negated}}class hC{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=13}static create(e,t,i=null){return new hC(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))>=parseFloat(this.value)}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=uC.create(this.key,this.value,this)),this.negated}}class uC{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=14}static create(e,t,i=null){return new uC(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<parseFloat(this.value)}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=hC.create(this.key,this.value,this)),this.negated}}class dC{constructor(e,t,i){this.key=e,this.value=t,this.negated=i,this.type=15}static create(e,t,i=null){return new dC(e,t,i)}cmp(e){return e.type!==this.type?this.type-e.type:Ih(this.key,this.value,e.key,e.value)}equals(e){return e.type===this.type?this.key===e.key&&this.value===e.value:!1}substituteConstants(){return this}evaluate(e){return parseFloat(e.getValue(this.key))<=parseFloat(this.value)}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=cC.create(this.key,this.value,this)),this.negated}}class fC{constructor(e,t){this.key=e,this.regexp=t,this.type=7,this.negated=null}static create(e,t){return new fC(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.key<e.key)return-1;if(this.key>e.key)return 1;const t=this.regexp?this.regexp.source:"",i=e.regexp?e.regexp.source:"";return t<i?-1:t>i?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){let t=e.getValue(this.key);return this.regexp?this.regexp.test(t):!1}serialize(){const e=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${e}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ck.create(this)),this.negated}}class ck{constructor(e){this._actual=e,this.type=8}static create(e){return new ck(e)}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):!1}substituteConstants(){return this}evaluate(e){return!this._actual.evaluate(e)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function VP(r){let e=null;for(let t=0,i=r.length;t<i;t++){const n=r[t].substituteConstants();if(r[t]!==n&&e===null){e=[];for(let s=0;s<t;s++)e[s]=r[s]}e!==null&&(e[t]=n)}return e===null?r:e}class Ql{constructor(e,t){this.expr=e,this.negated=t,this.type=6}static create(e,t){return Ql._normalizeArr(e,t)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const n=tf(this.expr[t],e.expr[t]);if(n!==0)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=VP(this.expr);return e===this.expr?this:Ql.create(e,this.negated)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].evaluate(e))return!1;return!0}static _normalizeArr(e,t){const i=[];let n=!1;for(const s of e)if(!!s){if(s.type===1){n=!0;continue}if(s.type===0)return es.INSTANCE;if(s.type===6){i.push(...s.expr);continue}i.push(s)}if(i.length===0&&n)return ts.INSTANCE;if(i.length!==0){if(i.length===1)return i[0];i.sort(tf);for(let s=1;s<i.length;s++)i[s-1].equals(i[s])&&(i.splice(s,1),s--);if(i.length===1)return i[0];for(;i.length>1;){const s=i[i.length-1];if(s.type!==9)break;i.pop();const o=i.pop(),a=i.length===0,l=za.create(s.expr.map(c=>Ql.create([c,o],null)),null,a);l&&(i.push(l),i.sort(tf))}return i.length===1?i[0]:new Ql(i,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" && ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){const e=[];for(let t of this.expr)e.push(t.negate());this.negated=za.create(e,this,!0)}return this.negated}}class za{constructor(e,t){this.expr=e,this.negated=t,this.type=9}static create(e,t,i){return za._normalizeArr(e,t,i)}cmp(e){if(e.type!==this.type)return this.type-e.type;if(this.expr.length<e.expr.length)return-1;if(this.expr.length>e.expr.length)return 1;for(let t=0,i=this.expr.length;t<i;t++){const n=tf(this.expr[t],e.expr[t]);if(n!==0)return n}return 0}equals(e){if(e.type===this.type){if(this.expr.length!==e.expr.length)return!1;for(let t=0,i=this.expr.length;t<i;t++)if(!this.expr[t].equals(e.expr[t]))return!1;return!0}return!1}substituteConstants(){const e=VP(this.expr);return e===this.expr?this:za.create(e,this.negated,!1)}evaluate(e){for(let t=0,i=this.expr.length;t<i;t++)if(this.expr[t].evaluate(e))return!0;return!1}static _normalizeArr(e,t,i){let n=[],s=!1;if(e){for(let o=0,a=e.length;o<a;o++){const l=e[o];if(!!l){if(l.type===0){s=!0;continue}if(l.type===1)return ts.INSTANCE;if(l.type===9){n=n.concat(l.expr);continue}n.push(l)}}if(n.length===0&&s)return es.INSTANCE;n.sort(tf)}if(n.length!==0){if(n.length===1)return n[0];for(let o=1;o<n.length;o++)n[o-1].equals(n[o])&&(n.splice(o,1),o--);if(n.length===1)return n[0];if(i){for(let o=0;o<n.length;o++)for(let a=o+1;a<n.length;a++)zP(n[o],n[a])&&(n.splice(a,1),a--);if(n.length===1)return n[0]}return new za(n,t)}}serialize(){return this.expr.map(e=>e.serialize()).join(" || ")}keys(){const e=[];for(let t of this.expr)e.push(...t.keys());return e}negate(){if(!this.negated){let e=[];for(let t of this.expr)e.push(t.negate());for(;e.length>1;){const t=e.shift(),i=e.shift(),n=[];for(const o of gC(t))for(const a of gC(i))n.push(Ql.create([o,a],null));const s=e.length===0;e.unshift(za.create(n,null,s))}this.negated=e[0]}return this.negated}}class Le extends Xl{constructor(e,t,i){super(e,null);this._defaultValue=t,typeof i=="object"?Le._info.push(Object.assign(Object.assign({},i),{key:e})):i!==!0&&Le._info.push({key:e,description:i,type:t!=null?typeof t:void 0})}static all(){return Le._info.values()}bindTo(e){return e.createKey(this.key,this._defaultValue)}getValue(e){return e.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(e){return nf.create(this.key,e)}}Le._info=[];const Fe=bt("contextKeyService"),tZ="setContext";function HP(r,e){return r<e?-1:r>e?1:0}function Ih(r,e,t,i){return r<t?-1:r>t?1:e<i?-1:e>i?1:0}function zP(r,e){if(e.type===6&&r.type!==9&&r.type!==6){for(const n of e.expr)if(r.equals(n))return!0}const t=r.negate(),i=gC(t).concat(gC(e));i.sort(tf);for(let n=0;n<i.length;n++){const o=i[n].negate();for(let a=n+1;a<i.length;a++){const l=i[a];if(o.equals(l))return!0}}return!1}function gC(r){return r.type===9?r.expr:[r]}class rf{constructor(e,t,i){this._log=i,this._defaultKeybindings=e,this._defaultBoundCommands=new Map;for(let n=0,s=e.length;n<s;n++){const o=e[n].command;o&&this._defaultBoundCommands.set(o,!0)}this._map=new Map,this._lookupMap=new Map,this._keybindings=rf.combine(e,t);for(let n=0,s=this._keybindings.length;n<s;n++){let o=this._keybindings[n];o.keypressParts.length!==0&&(o.when&&o.when.type===0||this._addKeyPress(o.keypressParts[0],o))}}static _isTargetedForRemoval(e,t,i,n,s){return!(e.command!==n||t&&e.keypressParts[0]!==t||i&&e.keypressParts[1]!==i||s&&(!e.when||!eZ(s,e.when)))}static combine(e,t){e=e.slice(0);let i=[];for(const n of t){if(!n.command||n.command.length===0||n.command.charAt(0)!=="-"){i.push(n);continue}const s=n.command.substr(1),o=n.keypressParts[0],a=n.keypressParts[1],l=n.when;for(let c=e.length-1;c>=0;c--)this._isTargetedForRemoval(e[c],o,a,s,l)&&e.splice(c,1)}return e.concat(i)}_addKeyPress(e,t){const i=this._map.get(e);if(typeof i=="undefined"){this._map.set(e,[t]),this._addToLookupMap(t);return}for(let n=i.length-1;n>=0;n--){let s=i[n];if(s.command===t.command)continue;const o=s.keypressParts.length>1,a=t.keypressParts.length>1;o&&a&&s.keypressParts[1]!==t.keypressParts[1]||rf.whenIsEntirelyIncluded(s.when,t.when)&&this._removeFromLookupMap(s)}i.push(t),this._addToLookupMap(t)}_addToLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);typeof t=="undefined"?(t=[e],this._lookupMap.set(e.command,t)):t.push(e)}_removeFromLookupMap(e){if(!e.command)return;let t=this._lookupMap.get(e.command);if(typeof t!="undefined"){for(let i=0,n=t.length;i<n;i++)if(t[i]===e){t.splice(i,1);return}}}static whenIsEntirelyIncluded(e,t){return!t||t.type===1?!0:!e||e.type===1?!1:zP(e,t)}getKeybindings(){return this._keybindings}lookupPrimaryKeybinding(e,t){const i=this._lookupMap.get(e);if(typeof i=="undefined"||i.length===0)return null;if(i.length===1)return i[0];for(let n=i.length-1;n>=0;n--){const s=i[n];if(t.contextMatchesRules(s.when))return s}return i[i.length-1]}resolve(e,t,i){this._log(`| Resolving ${i}${t?` chorded from ${t}`:""}`);let n=null;if(t!==null){const o=this._map.get(t);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;n=[];for(let a=0,l=o.length;a<l;a++){let c=o[a];c.keypressParts[1]===i&&n.push(c)}}else{const o=this._map.get(i);if(typeof o=="undefined")return this._log("\\ No keybinding entries."),null;n=o}let s=this._findCommand(e,n);return s?t===null&&s.keypressParts.length>1&&s.keypressParts[1]!==null?(this._log(`\\ From ${n.length} keybinding entries, matched chord, when: ${$P(s.when)}, source: ${UP(s)}.`),{enterChord:!0,leaveChord:!1,commandId:null,commandArgs:null,bubble:!1}):(this._log(`\\ From ${n.length} keybinding entries, matched ${s.command}, when: ${$P(s.when)}, source: ${UP(s)}.`),{enterChord:!1,leaveChord:s.keypressParts.length>1,commandId:s.command,commandArgs:s.commandArgs,bubble:s.bubble}):(this._log(`\\ From ${n.length} keybinding entries, no when clauses matched the context.`),null)}_findCommand(e,t){for(let i=t.length-1;i>=0;i--){let n=t[i];if(!!rf.contextMatchesRules(e,n.when))return n}return null}static contextMatchesRules(e,t){return t?t.evaluate(e):!0}}function $P(r){return r?`${r.serialize()}`:"no when condition"}function UP(r){return r.extensionId?r.isBuiltinExtension?`built-in extension ${r.extensionId}`:`user extension ${r.extensionId}`:r.isDefault?"built-in":"user"}class pC{constructor(){this._coreKeybindings=[],this._extensionKeybindings=[],this._cachedMergedKeybindings=null}static bindToCurrentPlatform(e){if(bs===1){if(e&&e.win)return e.win}else if(bs===2){if(e&&e.mac)return e.mac}else if(e&&e.linux)return e.linux;return e}registerKeybindingRule(e){const t=pC.bindToCurrentPlatform(e);if(t&&t.primary){const i=OS(t.primary,bs);i&&this._registerDefaultKeybinding(i,e.id,e.args,e.weight,0,e.when)}if(t&&Array.isArray(t.secondary))for(let i=0,n=t.secondary.length;i<n;i++){const s=t.secondary[i],o=OS(s,bs);o&&this._registerDefaultKeybinding(o,e.id,e.args,e.weight,-i-1,e.when)}}registerCommandAndKeybindingRule(e){this.registerKeybindingRule(e),lt.registerCommand(e)}static _mightProduceChar(e){return e>=21&&e<=30||e>=31&&e<=56?!0:e===80||e===81||e===82||e===83||e===84||e===85||e===86||e===110||e===111||e===87||e===88||e===89||e===90||e===91||e===92}_assertNoCtrlAlt(e,t){e.ctrlKey&&e.altKey&&!e.metaKey&&pC._mightProduceChar(e.keyCode)&&console.warn("Ctrl+Alt+ keybindings should not be used by default under Windows. Offender: ",e," for ",t)}_registerDefaultKeybinding(e,t,i,n,s,o){bs===1&&this._assertNoCtrlAlt(e.parts[0],t),this._coreKeybindings.push({keybinding:e,command:t,commandArgs:i,when:o,weight1:n,weight2:s,extensionId:null,isBuiltinExtension:!1}),this._cachedMergedKeybindings=null}getDefaultKeybindings(){return this._cachedMergedKeybindings||(this._cachedMergedKeybindings=[].concat(this._coreKeybindings).concat(this._extensionKeybindings),this._cachedMergedKeybindings.sort(nZ)),this._cachedMergedKeybindings.slice(0)}}const Bn=new pC,iZ={EditorModes:"platform.keybindingsRegistry"};mi.add(iZ.EditorModes,Bn);function nZ(r,e){return r.weight1!==e.weight1?r.weight1-e.weight1:r.command<e.command?-1:r.command>e.command?1:r.weight2-e.weight2}class jP{constructor(e,t,i,n,s,o,a){this._resolvedKeybindingItemBrand=void 0,this.resolvedKeybinding=e,this.keypressParts=e?KP(e.getDispatchParts()):[],e&&this.keypressParts.length===0&&(this.keypressParts=KP(e.getSingleModifierDispatchParts())),this.bubble=t?t.charCodeAt(0)===94:!1,this.command=this.bubble?t.substr(1):t,this.commandArgs=i,this.when=n,this.isDefault=s,this.extensionId=o,this.isBuiltinExtension=a}}function KP(r){let e=[];for(let t=0,i=r.length;t<i;t++){const n=r[t];if(!n)return e;e.push(n)}return e}class hk{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(t.length===0)return null;const n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=i(a);if(l===null)return null;n[s]=oZ(a,l,this.modifierLabels[e])}return n.join(" ")}}const uk=new hk({ctrlKey:"\u2303",shiftKey:"\u21E7",altKey:"\u2325",metaKey:"\u2318",separator:""},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey",comment:["This is the short form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey",comment:["This is the short form for the Control key on the keyboard"]},"Ctrl"),shiftKey:m({key:"shiftKey",comment:["This is the short form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey",comment:["This is the short form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey",comment:["This is the short form for the Super key on the keyboard"]},"Super"),separator:"+"}),rZ=new hk({ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"cmdKey.long",comment:["This is the long form for the Command key on the keyboard"]},"Command"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"windowsKey.long",comment:["This is the long form for the Windows key on the keyboard"]},"Windows"),separator:"+"},{ctrlKey:m({key:"ctrlKey.long",comment:["This is the long form for the Control key on the keyboard"]},"Control"),shiftKey:m({key:"shiftKey.long",comment:["This is the long form for the Shift key on the keyboard"]},"Shift"),altKey:m({key:"altKey.long",comment:["This is the long form for the Alt key on the keyboard"]},"Alt"),metaKey:m({key:"superKey.long",comment:["This is the long form for the Super key on the keyboard"]},"Super"),separator:"+"}),sZ=new hk({ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Cmd",separator:"+"},{ctrlKey:"Ctrl",shiftKey:"Shift",altKey:"Alt",metaKey:"Super",separator:"+"});function oZ(r,e,t){if(e===null)return"";const i=[];return r.ctrlKey&&i.push(t.ctrlKey),r.shiftKey&&i.push(t.shiftKey),r.altKey&&i.push(t.altKey),r.metaKey&&i.push(t.metaKey),e!==""&&i.push(e),i.join(t.separator)}class aZ extends HU{constructor(e,t){super();if(t.length===0)throw Er("parts");this._os=e,this._parts=t}getLabel(){return uk.toLabel(this._os,this._parts,e=>this._getLabel(e))}getAriaLabel(){return rZ.toLabel(this._os,this._parts,e=>this._getAriaLabel(e))}getElectronAccelerator(){return this._parts.length>1?null:sZ.toLabel(this._os,this._parts,e=>this._getElectronAccelerator(e))}isChord(){return this._parts.length>1}getParts(){return this._parts.map(e=>this._getPart(e))}_getPart(e){return new VU(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,this._getLabel(e),this._getAriaLabel(e))}getDispatchParts(){return this._parts.map(e=>this._getDispatchPart(e))}getSingleModifierDispatchParts(){return this._parts.map(e=>this._getSingleModifierDispatchPart(e))}}class mC extends aZ{constructor(e,t){super(t,e.parts)}_keyCodeToUILabel(e){if(this._os===2)switch(e){case 15:return"\u2190";case 16:return"\u2191";case 17:return"\u2192";case 18:return"\u2193"}return hh.toString(e)}_getLabel(e){return e.isDuplicateModifierCase()?"":this._keyCodeToUILabel(e.keyCode)}_getAriaLabel(e){return e.isDuplicateModifierCase()?"":hh.toString(e.keyCode)}_keyCodeToElectronAccelerator(e){if(e>=93&&e<=108)return null;switch(e){case 16:return"Up";case 18:return"Down";case 15:return"Left";case 17:return"Right"}return hh.toString(e)}_getElectronAccelerator(e){return e.isDuplicateModifierCase()?null:this._keyCodeToElectronAccelerator(e.keyCode)}_getDispatchPart(e){return mC.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+=hh.toString(e.keyCode),t}_getSingleModifierDispatchPart(e){return e.keyCode===5&&!e.shiftKey&&!e.altKey&&!e.metaKey?"ctrl":e.keyCode===4&&!e.ctrlKey&&!e.altKey&&!e.metaKey?"shift":e.keyCode===6&&!e.ctrlKey&&!e.shiftKey&&!e.metaKey?"alt":e.keyCode===57&&!e.ctrlKey&&!e.shiftKey&&!e.altKey?"meta":null}}const Di=bt("notificationService");class lZ{}const qP=bt("contextService");class cZ{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}}}var yi;(function(r){r.noSelection=m("noSelection","No selection"),r.singleSelectionRange=m("singleSelectionRange","Line {0}, Column {1} ({2} selected)"),r.singleSelection=m("singleSelection","Line {0}, Column {1}"),r.multiSelectionRange=m("multiSelectionRange","{0} selections ({1} characters selected)"),r.multiSelection=m("multiSelection","{0} selections"),r.emergencyConfOn=m("emergencyConfOn","Now changing the setting `accessibilitySupport` to 'on'."),r.openingDocs=m("openingDocs","Now opening the Editor Accessibility documentation page."),r.readonlyDiffEditor=m("readonlyDiffEditor"," in a read-only pane of a diff editor."),r.editableDiffEditor=m("editableDiffEditor"," in a pane of a diff editor."),r.readonlyEditor=m("readonlyEditor"," in a read-only code editor"),r.editableEditor=m("editableEditor"," in a code editor"),r.changeConfigToOnMac=m("changeConfigToOnMac","To configure the editor to be optimized for usage with a Screen Reader press Command+E now."),r.changeConfigToOnWinLinux=m("changeConfigToOnWinLinux","To configure the editor to be optimized for usage with a Screen Reader press Control+E now."),r.auto_on=m("auto_on","The editor is configured to be optimized for usage with a Screen Reader."),r.auto_off=m("auto_off","The editor is configured to never be optimized for usage with a Screen Reader, which is not the case at this time."),r.tabFocusModeOnMsg=m("tabFocusModeOnMsg","Pressing Tab in the current editor will move focus to the next focusable element. Toggle this behavior by pressing {0}."),r.tabFocusModeOnMsgNoKb=m("tabFocusModeOnMsgNoKb","Pressing Tab in the current editor will move focus to the next focusable element. The command {0} is currently not triggerable by a keybinding."),r.tabFocusModeOffMsg=m("tabFocusModeOffMsg","Pressing Tab in the current editor will insert the tab character. Toggle this behavior by pressing {0}."),r.tabFocusModeOffMsgNoKb=m("tabFocusModeOffMsgNoKb","Pressing Tab in the current editor will insert the tab character. The command {0} is currently not triggerable by a keybinding."),r.openDocMac=m("openDocMac","Press Command+H now to open a browser window with more information related to editor accessibility."),r.openDocWinLinux=m("openDocWinLinux","Press Control+H now to open a browser window with more information related to editor accessibility."),r.outroMsg=m("outroMsg","You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape."),r.showAccessibilityHelpAction=m("showAccessibilityHelpAction","Show Accessibility Help")})(yi||(yi={}));var dk;(function(r){r.inspectTokensAction=m("inspectTokens","Developer: Inspect Tokens")})(dk||(dk={}));var _C;(function(r){r.gotoLineActionLabel=m("gotoLineActionLabel","Go to Line/Column...")})(_C||(_C={}));var fk;(function(r){r.helpQuickAccessActionLabel=m("helpQuickAccess","Show all Quick Access Providers")})(fk||(fk={}));var bC;(function(r){r.quickCommandActionLabel=m("quickCommandActionLabel","Command Palette"),r.quickCommandHelp=m("quickCommandActionHelp","Show And Run Commands")})(bC||(bC={}));var Fp;(function(r){r.quickOutlineActionLabel=m("quickOutlineActionLabel","Go to Symbol..."),r.quickOutlineByCategoryActionLabel=m("quickOutlineByCategoryActionLabel","Go to Symbol by Category...")})(Fp||(Fp={}));var vC;(function(r){r.editorViewAccessibleLabel=m("editorViewAccessibleLabel","Editor content"),r.accessibilityHelpMessage=m("accessibilityHelpMessage","Press Alt+F1 for Accessibility Options.")})(vC||(vC={}));var gk;(function(r){r.toggleHighContrast=m("toggleHighContrast","Toggle High Contrast Theme")})(gk||(gk={}));var pk;(function(r){r.bulkEditServiceSummary=m("bulkEditServiceSummary","Made {0} edits in {1} files")})(pk||(pk={}));var GP=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ZP=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},YP=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class hZ{constructor(e){this.disposed=!1,this.model=e,this._onWillDispose=new H}get textEditorModel(){return this.model}dispose(){this.disposed=!0,this._onWillDispose.fire()}}function uZ(r,e,t){return qo(r)?e(r):t(r)}let mk=class{constructor(e){this.modelService=e}setEditor(e){this.editor=e}createModelReference(e){let t=null;return this.editor&&(t=uZ(this.editor,i=>this.findModel(i,e),i=>this.findModel(i.getOriginalEditor(),e)||this.findModel(i.getModifiedEditor(),e))),t?Promise.resolve(new FU(new hZ(t))):Promise.reject(new Error("Model not found"))}findModel(e,t){let i=this.modelService.getModel(t);return i&&i.uri.toString()!==t.toString()?null:i}};mk=GP([ZP(0,gi)],mk);class CC{show(){return CC.NULL_PROGRESS_RUNNER}showWhile(e,t){return YP(this,void 0,void 0,function*(){yield e})}}CC.NULL_PROGRESS_RUNNER={done:()=>{},total:()=>{},worked:()=>{}};class dZ{confirm(e){return this.doConfirm(e).then(t=>({confirmed:t,checkboxChecked:!1}))}doConfirm(e){let t=e.message;return e.detail&&(t=t+` - -`+e.detail),Promise.resolve(window.confirm(t))}show(e,t,i,n){return Promise.resolve({choice:0})}}class wC{info(e){return this.notify({severity:si.Info,message:e})}warn(e){return this.notify({severity:si.Warning,message:e})}error(e){return this.notify({severity:si.Error,message:e})}notify(e){switch(e.severity){case si.Error:console.error(e.message);break;case si.Warning:console.warn(e.message);break;default:console.log(e.message);break}return wC.NO_OP}status(e,t){return Y.None}}wC.NO_OP=new lZ;class fZ{constructor(e){this._onWillExecuteCommand=new H,this._onDidExecuteCommand=new H,this.onDidExecuteCommand=this._onDidExecuteCommand.event,this._instantiationService=e}executeCommand(e,...t){const i=lt.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)}}}class XP extends QG{constructor(e,t,i,n,s,o){super(e,t,i,n,s);this._cachedResolver=null,this._dynamicKeybindings=[],this._register(J(o,Ee.KEY_DOWN,a=>{const l=new ei(a);this._dispatch(l,l.target)&&(l.preventDefault(),l.stopPropagation())})),this._register(J(window,Ee.KEY_UP,a=>{const l=new ei(a);this._singleModifierDispatch(l,l.target)&&l.preventDefault()}))}addDynamicKeybinding(e,t,i,n){const s=OS(t,bs),o=new le;return s&&(this._dynamicKeybindings.push({keybinding:s,command:e,when:n,weight1:1e3,weight2:0,extensionId:null,isBuiltinExtension:!1}),o.add(Xe(()=>{for(let a=0;a<this._dynamicKeybindings.length;a++)if(this._dynamicKeybindings[a].command===e){this._dynamicKeybindings.splice(a,1),this.updateResolver({source:1});return}}))),o.add(lt.registerCommand(e,i)),this.updateResolver({source:1}),o}updateResolver(e){this._cachedResolver=null,this._onDidUpdateKeybindings.fire(e)}_getResolver(){if(!this._cachedResolver){const e=this._toNormalizedKeybindingItems(Bn.getDefaultKeybindings(),!0),t=this._toNormalizedKeybindingItems(this._dynamicKeybindings,!1);this._cachedResolver=new rf(e,t,i=>this._log(i))}return this._cachedResolver}_documentHasFocus(){return document.hasFocus()}_toNormalizedKeybindingItems(e,t){let i=[],n=0;for(const s of e){const o=s.when||void 0,a=s.keybinding;if(!a)i[n++]=new jP(void 0,s.command,s.commandArgs,o,t,null,!1);else{const l=this.resolveKeybinding(a);for(const c of l)i[n++]=new jP(c,s.command,s.commandArgs,o,t,null,!1)}}return i}resolveKeybinding(e){return[new mC(e,bs)]}resolveKeyboardEvent(e){let t=new rp(e.ctrlKey,e.shiftKey,e.altKey,e.metaKey,e.keyCode).toChord();return new mC(t,bs)}}function QP(r){return r&&typeof r=="object"&&(!r.overrideIdentifier||typeof r.overrideIdentifier=="string")&&(!r.resource||r.resource instanceof Ie)}class JP{constructor(){this._onDidChangeConfiguration=new H,this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._configuration=new oC(new ZG,new Jr)}getValue(e,t){const i=typeof e=="string"?e:void 0,n=QP(e)?e:QP(t)?t:{};return this._configuration.getValue(i,n,void 0)}updateValues(e){const t={data:this._configuration.toData()};let i=[];for(const n of e){const[s,o]=n;this.getValue(s)!==o&&(this._configuration.updateValue(s,o),i.push(s))}if(i.length>0){const n=new YG({keys:i,overrides:[]},t,this._configuration);n.source=7,n.sourceConfig=null,this._onDidChangeConfiguration.fire(n)}return Promise.resolve()}}class gZ{constructor(e){this.configurationService=e,this._onDidChangeConfiguration=new H,this.configurationService.onDidChangeConfiguration(t=>{this._onDidChangeConfiguration.fire({affectedKeys:t.affectedKeys,affectsConfiguration:(i,n)=>t.affectsConfiguration(n)})})}getValue(e,t,i){const s=($.isIPosition(t)?t:null)?typeof i=="string"?i:void 0:typeof t=="string"?t:void 0;return typeof s=="undefined"?this.configurationService.getValue():this.configurationService.getValue(s)}}let _k=class{constructor(e){this.configurationService=e}getEOL(e,t){const i=this.configurationService.getValue("files.eol",{overrideIdentifier:t,resource:e});return i&&typeof i=="string"&&i!=="auto"?i:Zn||Je?` -`:`\r -`}};_k=GP([ZP(0,hi)],_k);class pZ{publicLog(e,t){return Promise.resolve(void 0)}publicLog2(e,t){return this.publicLog(e,t)}}class yC{constructor(){const e=Ie.from({scheme:yC.SCHEME,authority:"model",path:"/"});this.workspace={id:"4064f6ec-cb38-4ad0-af64-ee6467e63c82",folders:[new cZ({uri:e,name:"",index:0})]}}getWorkspace(){return this.workspace}}yC.SCHEME="inmemory";function SC(r,e,t){if(!e||!(r instanceof JP))return;let i=[];Object.keys(e).forEach(n=>{$G(n)&&i.push([`editor.${n}`,e[n]]),t&&UG(n)&&i.push([`diffEditor.${n}`,e[n]])}),i.length>0&&r.updateValues(i)}class mZ{constructor(e){this._modelService=e}hasPreviewHandler(){return!1}apply(e,t){return YP(this,void 0,void 0,function*(){const i=new Map;for(let o of e){if(!(o instanceof DP))throw new Error("bad edit - only text edits are supported");const a=this._modelService.getModel(o.resource);if(!a)throw new Error("bad edit - model not found");if(typeof o.versionId=="number"&&a.getVersionId()!==o.versionId)throw new Error("bad state - model changed in the meantime");let l=i.get(a);l||(l=[],i.set(a,l)),l.push(ci.replaceMove(k.lift(o.textEdit.range),o.textEdit.text))}let n=0,s=0;for(const[o,a]of i)o.pushStackElement(),o.pushEditOperations([],a,()=>[]),o.pushStackElement(),s+=1,n+=a.length;return{ariaSummary:gn(pk.bulkEditServiceSummary,n,s)}})}}class _Z{getUriLabel(e,t){return e.scheme==="file"?e.fsPath:e.path}}class bZ{constructor(e,t){this._codeEditorService=e,this._container=t,this.onDidLayout=ke.None}get dimension(){return this._dimension||(this._dimension=av(window.document.body)),this._dimension}get container(){return this._container}focus(){var e;(e=this._codeEditorService.getFocusedCodeEditor())===null||e===void 0||e.focus()}}const eO=2e4;let Nh,LC,bk,xC,vk;function vZ(r){Nh=document.createElement("div"),Nh.className="monaco-aria-container";const e=()=>{const i=document.createElement("div");return i.className="monaco-alert",i.setAttribute("role","alert"),i.setAttribute("aria-atomic","true"),Nh.appendChild(i),i};LC=e(),bk=e();const t=()=>{const i=document.createElement("div");return i.className="monaco-status",i.setAttribute("role","complementary"),i.setAttribute("aria-live","polite"),i.setAttribute("aria-atomic","true"),Nh.appendChild(i),i};xC=t(),vk=t(),r.appendChild(Nh)}function Ji(r){!Nh||(LC.textContent!==r?(Ui(bk),DC(LC,r)):(Ui(LC),DC(bk,r)))}function kC(r){!Nh||(Je?Ji(r):xC.textContent!==r?(Ui(vk),DC(xC,r)):(Ui(xC),DC(vk,r)))}function DC(r,e){Ui(r),e.length>eO&&(e=e.substr(0,eO)),r.textContent=e,r.style.visibility="hidden",r.style.visibility="visible"}const Ck=bt("markerDecorationsService");var EC=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Ns extends Y{constructor(e,t="",i="",n=!0,s){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._checked=!1,this._id=e,this._label=t,this._cssClass=i,this._enabled=n,this._actionCallback=s}get id(){return this._id}get label(){return this._label}set label(e){this._setLabel(e)}_setLabel(e){this._label!==e&&(this._label=e,this._onDidChange.fire({label:e}))}get tooltip(){return this._tooltip||""}set tooltip(e){this._setTooltip(e)}_setTooltip(e){this._tooltip!==e&&(this._tooltip=e,this._onDidChange.fire({tooltip:e}))}get class(){return this._cssClass}set class(e){this._setClass(e)}_setClass(e){this._cssClass!==e&&(this._cssClass=e,this._onDidChange.fire({class:e}))}get enabled(){return this._enabled}set enabled(e){this._setEnabled(e)}_setEnabled(e){this._enabled!==e&&(this._enabled=e,this._onDidChange.fire({enabled:e}))}get checked(){return this._checked}set checked(e){this._setChecked(e)}_setChecked(e){this._checked!==e&&(this._checked=e,this._onDidChange.fire({checked:e}))}run(e,t){return EC(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(e))})}}class sf extends Y{constructor(){super(...arguments);this._onBeforeRun=this._register(new H),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new H),this.onDidRun=this._onDidRun.event}run(e,t){return EC(this,void 0,void 0,function*(){if(!e.enabled)return;this._onBeforeRun.fire({action:e});let i;try{yield this.runAction(e,t)}catch(n){i=n}this._onDidRun.fire({action:e,error:i})})}runAction(e,t){return EC(this,void 0,void 0,function*(){yield e.run(t)})}}class Ts extends Ns{constructor(e){super(Ts.ID,e,e?"separator text":"separator");this.checked=!1,this.enabled=!1}}Ts.ID="vs.actions.separator";class IC{constructor(e,t,i,n){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=e,this.label=t,this.class=n,this._actions=i}get actions(){return this._actions}dispose(){}run(){return EC(this,void 0,void 0,function*(){})}}class NC extends Ns{constructor(){super(NC.ID,m("submenu.empty","(empty)"),void 0,!1)}}NC.ID="vs.actions.empty";var is;(function(r){r.DARK="dark",r.LIGHT="light",r.HIGH_CONTRAST="hc"})(is||(is={}));const qt=bt("themeService");var wk;(function(r){function e(t){return t&&typeof t=="object"&&typeof t.id=="string"}r.isThemeColor=e})(wk||(wk={}));function ui(r){return{id:r}}var Gt;(function(r){function e(a){return a&&typeof a=="object"&&typeof a.id=="string"&&(typeof a.color=="undefined"||wk.isThemeColor(a.color))}r.isThemeIcon=e;const t=new RegExp(`^\\$\\((${fr.iconNameExpression}(?:${fr.iconModifierExpression})?)\\)$`);function i(a){const l=t.exec(a);if(!l)return;let[,c]=l;return{id:c}}r.fromString=i;function n(a,l){let c=a.id;const h=c.lastIndexOf("~");return h!==-1&&(c=c.substring(0,h)),l&&(c=`${c}~${l}`),{id:c}}r.modify=n;function s(a,l){var c,h;return a.id===l.id&&((c=a.color)===null||c===void 0?void 0:c.id)===((h=l.color)===null||h===void 0?void 0:h.id)}r.isEqual=s;function o(a,l){return{id:a.id,color:l?ui(l):void 0}}r.asThemeIcon=o,r.asClassNameArray=fr.asClassNameArray,r.asClassName=fr.asClassName,r.asCSSSelector=fr.asCSSSelector})(Gt||(Gt={}));function TC(r){switch(r){case is.DARK:return"vs-dark";case is.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const tO={ThemingContribution:"base.contributions.theming"};class CZ{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new H}onColorThemeChange(e){return this.themingParticipants.push(e),this.onThemingParticipantAddedEmitter.fire(e),Xe(()=>{const t=this.themingParticipants.indexOf(e);this.themingParticipants.splice(t,1)})}getThemingParticipants(){return this.themingParticipants}}let iO=new CZ;mi.add(tO.ThemingContribution,iO);function Lt(r){return iO.onColorThemeChange(r)}class wZ extends Y{constructor(e){super();this.themeService=e,this.theme=e.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(t=>this.onThemeChange(t)))}onThemeChange(e){this.theme=e,this.updateStyles()}updateStyles(){}}var yZ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nO=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function Bp(r){return r.command!==void 0}class xe{constructor(e){this.id=xe._idPool++,this._debugName=e}}xe._idPool=0;xe.CommandPalette=new xe("CommandPalette");xe.EditorContext=new xe("EditorContext");xe.SimpleEditorContext=new xe("SimpleEditorContext");xe.EditorContextCopy=new xe("EditorContextCopy");xe.EditorContextPeek=new xe("EditorContextPeek");xe.MenubarEditMenu=new xe("MenubarEditMenu");xe.MenubarCopy=new xe("MenubarCopy");xe.MenubarGoMenu=new xe("MenubarGoMenu");xe.MenubarSelectionMenu=new xe("MenubarSelectionMenu");xe.InlineCompletionsActions=new xe("InlineCompletionsActions");const Th=bt("menuService"),ns=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new H,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:r=>r===xe.CommandPalette}}addCommand(r){return this.addCommands(at.single(r))}addCommands(r){for(const e of r)this._commands.set(e.id,e);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),Xe(()=>{let e=!1;for(const t of r)e=this._commands.delete(t.id)||e;e&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(r){return this._commands.get(r)}getCommands(){const r=new Map;return this._commands.forEach((e,t)=>r.set(t,e)),r}appendMenuItem(r,e){return this.appendMenuItems(at.single({id:r,item:e}))}appendMenuItems(r){const e=new Set,t=new Ir;for(const{id:i,item:n}of r){let s=this._menuItems.get(i);s||(s=new Ir,this._menuItems.set(i,s)),t.push(s.push(n)),e.add(i)}return this._onDidChangeMenu.fire(e),Xe(()=>{if(t.size>0){for(let i of t)i();this._onDidChangeMenu.fire(e),t.clear()}})}getMenuItems(r){let e;return this._menuItems.has(r)?e=[...this._menuItems.get(r)]:e=[],r===xe.CommandPalette&&this._appendImplicitItems(e),e}_appendImplicitItems(r){const e=new Set;for(const t of r)Bp(t)&&(e.add(t.command.id),t.alt&&e.add(t.alt.id));this._commands.forEach((t,i)=>{e.has(i)||r.push({command:t})})}};class yk extends IC{constructor(e,t,i,n){super(`submenuitem.${e.submenu.id}`,typeof e.title=="string"?e.title:e.title.value,[],"submenu");this.item=e,this._menuService=t,this._contextKeyService=i,this._options=n}get actions(){const e=[],t=this._menuService.createMenu(this.item.submenu,this._contextKeyService),i=t.getActions(this._options);t.dispose();for(const[,n]of i)n.length>0&&(e.push(...n),e.push(new Ts));return e.length&&e.pop(),e}}let Jl=class rO{constructor(e,t,i,n,s){var o,a;if(this._commandService=s,this.id=e.id,this.label=(i==null?void 0:i.renderShortTitle)&&e.shortTitle?typeof e.shortTitle=="string"?e.shortTitle:e.shortTitle.value:typeof e.title=="string"?e.title:e.title.value,this.tooltip=(a=typeof e.tooltip=="string"?e.tooltip:(o=e.tooltip)===null||o===void 0?void 0:o.value)!==null&&a!==void 0?a:"",this.enabled=!e.precondition||n.contextMatchesRules(e.precondition),this.checked=!1,e.toggled){const l=e.toggled.condition?e.toggled:{condition:e.toggled};this.checked=n.contextMatchesRules(l.condition),this.checked&&l.tooltip&&(this.tooltip=typeof l.tooltip=="string"?l.tooltip:l.tooltip.value),l.title&&(this.label=typeof l.title=="string"?l.title:l.title.value)}this.item=e,this.alt=t?new rO(t,void 0,i,n,s):void 0,this._options=i,Gt.isThemeIcon(e.icon)&&(this.class=fr.asClassName(e.icon))}dispose(){}run(...e){var t,i;let n=[];return((t=this._options)===null||t===void 0?void 0:t.arg)&&(n=[...n,this._options.arg]),((i=this._options)===null||i===void 0?void 0:i.shouldForwardArgs)&&(n=[...n,...e]),this._commandService.executeCommand(this.id,...n)}};Jl=yZ([nO(3,Fe),nO(4,fi)],Jl);const ec=bt("telemetryService");class AC{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 i=t.kbExpr;this.precondition&&(i?i=_e.and(i,this.precondition):i=this.precondition);const n={id:this.id,weight:t.weight,args:t.args,when:i,primary:t.primary,secondary:t.secondary,win:t.win,linux:t.linux,mac:t.mac};Bn.registerKeybindingRule(n)}}lt.registerCommand({id:this.id,handler:(e,t)=>this.runCommand(e,t),description:this._description})}_registerMenuItem(e){ns.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 of extends AC{constructor(){super(...arguments);this._implementations=[]}addImplementation(e,t,i){return this._implementations.push({priority:e,name:t,implementation:i}),this._implementations.sort((n,s)=>s.priority-n.priority),{dispose:()=>{for(let n=0;n<this._implementations.length;n++)if(this._implementations[n].implementation===i){this._implementations.splice(n,1);return}}}}runCommand(e,t){const i=e.get(Va);i.trace(`Executing Command '${this.id}' which has ${this._implementations.length} bound.`);for(const n of this._implementations){const s=n.implementation(e,t);if(s)return i.trace(`Command '${this.id}' was handled by '${n.name}'.`),typeof s=="boolean"?void 0:s}i.trace(`The Command '${this.id}' was not handled by any implementation.`)}}class sO extends AC{constructor(e,t){super(t);this.command=e}runCommand(e,t){return this.command.runCommand(e,t)}}class en extends AC{static bindToContribution(e){return class extends en{constructor(i){super(i);this._callback=i.handler}runEditorCommand(i,n,s){e(n)&&this._callback(e(n),s)}}}runCommand(e,t){const i=e.get(Ct),n=i.getFocusedCodeEditor()||i.getActiveCodeEditor();if(!!n)return n.invokeWithinContext(s=>{if(!!s.get(Fe).contextMatchesRules(Rr(this.precondition)))return this.runEditorCommand(s,n,t)})}}class Se extends en{constructor(e){super(Se.convertOptions(e));this.label=e.label,this.alias=e.alias}static convertOptions(e){let t;Array.isArray(e.menuOpts)?t=e.menuOpts:e.menuOpts?t=[e.menuOpts]:t=[];function i(n){return n.menuId||(n.menuId=xe.EditorContext),n.title||(n.title=e.label),n.when=_e.and(e.precondition,n.when),n}return Array.isArray(e.contextMenuOpts)?t.push(...e.contextMenuOpts.map(i)):e.contextMenuOpts&&t.push(i(e.contextMenuOpts)),e.menuOpts=t,e}runEditorCommand(e,t,i){return this.reportTelemetry(e,t),this.run(e,t,i||{})}reportTelemetry(e,t){e.get(ec).publicLog2("editorActionInvoked",{name:this.label,id:this.id})}}class oO extends Se{constructor(){super(...arguments);this._implementations=[]}addImplementation(e,t){return this._implementations.push([e,t]),this._implementations.sort((i,n)=>n[0]-i[0]),{dispose:()=>{for(let i=0;i<this._implementations.length;i++)if(this._implementations[i][1]===t){this._implementations.splice(i,1);return}}}}run(e,t,i){for(const n of this._implementations){const s=n[1](e,t,i);if(s)return typeof s=="boolean"?void 0:s}}}function Go(r,e){lt.registerCommand(r,function(t,...i){const[n,s]=i;Nt(Ie.isUri(n)),Nt($.isIPosition(s));const o=t.get(gi).getModel(n);if(o){const a=$.lift(s);return e(o,a,...i.slice(2))}return t.get(so).createModelReference(n).then(a=>new Promise((l,c)=>{try{const h=e(a.object.textEditorModel,$.lift(s),i.slice(2));l(h)}catch(h){c(h)}}).finally(()=>{a.dispose()}))})}function SZ(r,e){lt.registerCommand(r,function(t,...i){const[n]=i;Nt(Ie.isUri(n));const s=t.get(gi).getModel(n);return s?e(s,...i.slice(1)):t.get(so).createModelReference(n).then(o=>new Promise((a,l)=>{try{const c=e(o.object.textEditorModel,i.slice(1));a(c)}catch(c){l(c)}}).finally(()=>{o.dispose()}))})}function fe(r){return rs.INSTANCE.registerEditorCommand(r),r}function me(r){const e=new r;return rs.INSTANCE.registerEditorAction(e),e}function aO(r){return rs.INSTANCE.registerEditorAction(r),r}function lO(r){rs.INSTANCE.registerEditorAction(r)}function wt(r,e){rs.INSTANCE.registerEditorContribution(r,e)}var af;(function(r){function e(o){return rs.INSTANCE.getEditorCommand(o)}r.getEditorCommand=e;function t(){return rs.INSTANCE.getEditorActions()}r.getEditorActions=t;function i(){return rs.INSTANCE.getEditorContributions()}r.getEditorContributions=i;function n(o){return rs.INSTANCE.getEditorContributions().filter(a=>o.indexOf(a.id)>=0)}r.getSomeEditorContributions=n;function s(){return rs.INSTANCE.getDiffEditorContributions()}r.getDiffEditorContributions=s})(af||(af={}));const LZ={EditorCommonContributions:"editor.contributions"};class rs{constructor(){this.editorContributions=[],this.diffEditorContributions=[],this.editorActions=[],this.editorCommands=Object.create(null)}registerEditorContribution(e,t){this.editorContributions.push({id:e,ctor:t})}getEditorContributions(){return this.editorContributions.slice(0)}getDiffEditorContributions(){return this.diffEditorContributions.slice(0)}registerEditorAction(e){e.register(),this.editorActions.push(e)}getEditorActions(){return this.editorActions.slice(0)}registerEditorCommand(e){e.register(),this.editorCommands[e.id]=e}getEditorCommand(e){return this.editorCommands[e]||null}}rs.INSTANCE=new rs;mi.add(LZ.EditorCommonContributions,rs.INSTANCE);function Wp(r){return r.register(),r}const Sk=Wp(new of({id:"undo",precondition:void 0,kbOpts:{weight:0,primary:2048|56},menuOpts:[{menuId:xe.MenubarEditMenu,group:"1_do",title:m({key:"miUndo",comment:["&& denotes a mnemonic"]},"&&Undo"),order:1},{menuId:xe.CommandPalette,group:"",title:m("undo","Undo"),order:1}]}));Wp(new sO(Sk,{id:"default:undo",precondition:void 0}));const Lk=Wp(new of({id:"redo",precondition:void 0,kbOpts:{weight:0,primary:2048|55,secondary:[2048|1024|56],mac:{primary:2048|1024|56}},menuOpts:[{menuId:xe.MenubarEditMenu,group:"1_do",title:m({key:"miRedo",comment:["&& denotes a mnemonic"]},"&&Redo"),order:2},{menuId:xe.CommandPalette,group:"",title:m("redo","Redo"),order:1}]}));Wp(new sO(Lk,{id:"default:redo",precondition:void 0}));const xZ=Wp(new of({id:"editor.action.selectAll",precondition:void 0,kbOpts:{weight:0,kbExpr:null,primary:2048|31},menuOpts:[{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSelectAll",comment:["&& denotes a mnemonic"]},"&&Select All"),order:1},{menuId:xe.CommandPalette,group:"",title:m("selectAll","Select All"),order:1}]}));var kZ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},DZ=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Vp=class{constructor(e,t){}dispose(){}};Vp.ID="editor.contrib.markerDecorations";Vp=kZ([DZ(1,Ck)],Vp);wt(Vp.ID,Vp);class EZ{constructor(e,t){this.chr=e,this.type=t,this.width=0}fulfill(e){this.width=e}}class xk{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=this._bareFontInfo.getMassagedFontFamily(Po?hr.fontFamily:null),t=document.createElement("div");t.style.position="absolute",t.style.top="-50000px",t.style.width="50000px";const i=document.createElement("div");i.style.fontFamily=e,i.style.fontWeight=this._bareFontInfo.fontWeight,i.style.fontSize=this._bareFontInfo.fontSize+"px",i.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,i.style.lineHeight=this._bareFontInfo.lineHeight+"px",i.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(i);const n=document.createElement("div");n.style.fontFamily=e,n.style.fontWeight="bold",n.style.fontSize=this._bareFontInfo.fontSize+"px",n.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,n.style.lineHeight=this._bareFontInfo.lineHeight+"px",n.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",t.appendChild(n);const s=document.createElement("div");s.style.fontFamily=e,s.style.fontWeight=this._bareFontInfo.fontWeight,s.style.fontSize=this._bareFontInfo.fontSize+"px",s.style.fontFeatureSettings=this._bareFontInfo.fontFeatureSettings,s.style.lineHeight=this._bareFontInfo.lineHeight+"px",s.style.letterSpacing=this._bareFontInfo.letterSpacing+"px",s.style.fontStyle="italic",t.appendChild(s);const o=[];for(const a of this._requests){let l;a.type===0&&(l=i),a.type===2&&(l=n),a.type===1&&(l=s),l.appendChild(document.createElement("br"));const c=document.createElement("span");xk._render(c,a),l.appendChild(c),o.push(c)}this._container=t,this._testElements=o}static _render(e,t){if(t.chr===" "){let i="\xA0";for(let n=0;n<8;n++)i+=i;e.innerText=i}else{let i=t.chr;for(let n=0;n<8;n++)i+=i;e.textContent=i}}_readFromDomElements(){for(let e=0,t=this._requests.length;e<t;e++){const i=this._requests[e],n=this._testElements[e];i.fulfill(n.offsetWidth/256)}}}function IZ(r,e){new xk(r,e).read()}class cO extends Y{constructor(e,t,i){super();this.referenceDomElement=e,this.changeCallback=i,this.width=-1,this.height=-1,this.resizeObserver=null,this.measureReferenceDomElementToken=-1,this.measureReferenceDomElement(!1,t)}dispose(){this.stopObserving(),super.dispose()}getWidth(){return this.width}getHeight(){return this.height}startObserving(){typeof ResizeObserver!="undefined"?!this.resizeObserver&&this.referenceDomElement&&(this.resizeObserver=new ResizeObserver(e=>{e&&e[0]&&e[0].contentRect?this.observe({width:e[0].contentRect.width,height:e[0].contentRect.height}):this.observe()}),this.resizeObserver.observe(this.referenceDomElement)):this.measureReferenceDomElementToken===-1&&(this.measureReferenceDomElementToken=setInterval(()=>this.observe(),100))}stopObserving(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.measureReferenceDomElementToken!==-1&&(clearInterval(this.measureReferenceDomElementToken),this.measureReferenceDomElementToken=-1)}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.changeCallback())}}class hO{constructor(){this._keys=Object.create(null),this._values=Object.create(null)}has(e){const t=e.getId();return!!this._values[t]}get(e){const t=e.getId();return this._values[t]}put(e,t){const i=e.getId();this._keys[i]=e,this._values[i]=t}remove(e){const t=e.getId();delete this._keys[t],delete this._values[t]}getValues(){return Object.keys(this._keys).map(e=>this._values[e])}}function NZ(){Ah.INSTANCE.clearCache()}class Ah extends Y{constructor(){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._cache=new hO,this._evictUntrustedReadingsTimeout=-1}dispose(){this._evictUntrustedReadingsTimeout!==-1&&(clearTimeout(this._evictUntrustedReadingsTimeout),this._evictUntrustedReadingsTimeout=-1),super.dispose()}clearCache(){this._cache=new hO,this._onDidChange.fire()}_writeToCache(e,t){this._cache.put(e,t),!t.isTrusted&&this._evictUntrustedReadingsTimeout===-1&&(this._evictUntrustedReadingsTimeout=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()}readConfiguration(e){if(!this._cache.has(e)){let t=Ah._actualReadConfiguration(e);(t.typicalHalfwidthCharacterWidth<=2||t.typicalFullwidthCharacterWidth<=2||t.spaceWidth<=2||t.maxDigitWidth<=2)&&(t=new cx({zoomLevel:xL(),pixelRatio:nv(),fontFamily:t.fontFamily,fontWeight:t.fontWeight,fontSize:t.fontSize,fontFeatureSettings:t.fontFeatureSettings,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)}static createRequest(e,t,i,n){const s=new EZ(e,t);return i.push(s),n&&n.push(s),s}static _actualReadConfiguration(e){const t=[],i=[],n=this.createRequest("n",0,t,i),s=this.createRequest("\uFF4D",0,t,null),o=this.createRequest(" ",0,t,i),a=this.createRequest("0",0,t,i),l=this.createRequest("1",0,t,i),c=this.createRequest("2",0,t,i),h=this.createRequest("3",0,t,i),u=this.createRequest("4",0,t,i),d=this.createRequest("5",0,t,i),f=this.createRequest("6",0,t,i),g=this.createRequest("7",0,t,i),p=this.createRequest("8",0,t,i),_=this.createRequest("9",0,t,i),v=this.createRequest("\u2192",0,t,i),b=this.createRequest("\uFFEB",0,t,null),C=this.createRequest("\xB7",0,t,i),y=this.createRequest(String.fromCharCode(11825),0,t,null);this.createRequest("|",0,t,i),this.createRequest("/",0,t,i),this.createRequest("-",0,t,i),this.createRequest("_",0,t,i),this.createRequest("i",0,t,i),this.createRequest("l",0,t,i),this.createRequest("m",0,t,i),this.createRequest("|",1,t,i),this.createRequest("_",1,t,i),this.createRequest("i",1,t,i),this.createRequest("l",1,t,i),this.createRequest("m",1,t,i),this.createRequest("n",1,t,i),this.createRequest("|",2,t,i),this.createRequest("_",2,t,i),this.createRequest("i",2,t,i),this.createRequest("l",2,t,i),this.createRequest("m",2,t,i),this.createRequest("n",2,t,i),IZ(e,t);const x=Math.max(a.width,l.width,c.width,h.width,u.width,d.width,f.width,g.width,p.width,_.width);let S=e.fontFeatureSettings===Dr.OFF;const w=i[0].width;for(let P=1,B=i.length;S&&P<B;P++){const U=w-i[P].width;if(U<-.001||U>.001){S=!1;break}}let L=!0;S&&b.width!==w&&(L=!1),b.width>v.width&&(L=!1);const N=sj()>2e3;return new cx({zoomLevel:xL(),pixelRatio:nv(),fontFamily:e.fontFamily,fontWeight:e.fontWeight,fontSize:e.fontSize,fontFeatureSettings:e.fontFeatureSettings,lineHeight:e.lineHeight,letterSpacing:e.letterSpacing,isMonospace:S,typicalHalfwidthCharacterWidth:n.width,typicalFullwidthCharacterWidth:s.width,canUseHalfwidthRightwardsArrow:L,spaceWidth:o.width,middotWidth:C.width,wsmiddotWidth:y.width,maxDigitWidth:x},N)}}Ah.INSTANCE=new Ah;class Dn extends nC{constructor(e,t,i=null,n){super(e,t);this.accessibilityService=n,this._elementSizeObserver=this._register(new cO(i,t.dimension,()=>this._recomputeOptions())),this._register(Ah.INSTANCE.onDidChange(()=>this._recomputeOptions())),this._validatedOptions.get(10)&&this._elementSizeObserver.startObserving(),this._register(BM(s=>this._recomputeOptions())),this._register(this.accessibilityService.onDidChangeScreenReaderOptimized(()=>this._recomputeOptions())),this._recomputeOptions()}static applyFontInfoSlow(e,t){e.style.fontFamily=t.getMassagedFontFamily(Po?hr.fontFamily:null),e.style.fontWeight=t.fontWeight,e.style.fontSize=t.fontSize+"px",e.style.fontFeatureSettings=t.fontFeatureSettings,e.style.lineHeight=t.lineHeight+"px",e.style.letterSpacing=t.letterSpacing+"px"}static applyFontInfo(e,t){e.setFontFamily(t.getMassagedFontFamily(Po?hr.fontFamily:null)),e.setFontWeight(t.fontWeight),e.setFontSize(t.fontSize),e.setFontFeatureSettings(t.fontFeatureSettings),e.setLineHeight(t.lineHeight),e.setLetterSpacing(t.letterSpacing)}observeReferenceElement(e){this._elementSizeObserver.observe(e)}updatePixelRatio(){this._recomputeOptions()}static _getExtraEditorClassName(){let e="";return!Po&&!aj&&(e+="no-user-select "),Po&&(e+="no-minimap-shadow "),Je&&(e+="mac "),e}_getEnvConfiguration(){return{extraEditorClassName:Dn._getExtraEditorClassName(),outerWidth:this._elementSizeObserver.getWidth(),outerHeight:this._elementSizeObserver.getHeight(),emptySelectionClipboard:ph||Mn,pixelRatio:nv(),zoomLevel:xL(),accessibilitySupport:this.accessibilityService.isScreenReaderOptimized()?2:this.accessibilityService.getAccessibilitySupport()}}readConfiguration(e){return Ah.INSTANCE.readConfiguration(e)}}class uO{constructor(e){this.domNode=e,this._maxWidth=-1,this._width=-1,this._height=-1,this._top=-1,this._left=-1,this._bottom=-1,this._right=-1,this._fontFamily="",this._fontWeight="",this._fontSize=-1,this._fontFeatureSettings="",this._lineHeight=-1,this._letterSpacing=-100,this._className="",this._display="",this._position="",this._visibility="",this._backgroundColor="",this._layerHint=!1,this._contain="none",this._boxShadow=""}setMaxWidth(e){this._maxWidth!==e&&(this._maxWidth=e,this.domNode.style.maxWidth=this._maxWidth+"px")}setWidth(e){this._width!==e&&(this._width=e,this.domNode.style.width=this._width+"px")}setHeight(e){this._height!==e&&(this._height=e,this.domNode.style.height=this._height+"px")}setTop(e){this._top!==e&&(this._top=e,this.domNode.style.top=this._top+"px")}unsetTop(){this._top!==-1&&(this._top=-1,this.domNode.style.top="")}setLeft(e){this._left!==e&&(this._left=e,this.domNode.style.left=this._left+"px")}setBottom(e){this._bottom!==e&&(this._bottom=e,this.domNode.style.bottom=this._bottom+"px")}setRight(e){this._right!==e&&(this._right=e,this.domNode.style.right=this._right+"px")}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){this._fontSize!==e&&(this._fontSize=e,this.domNode.style.fontSize=this._fontSize+"px")}setFontFeatureSettings(e){this._fontFeatureSettings!==e&&(this._fontFeatureSettings=e,this.domNode.style.fontFeatureSettings=this._fontFeatureSettings)}setLineHeight(e){this._lineHeight!==e&&(this._lineHeight=e,this.domNode.style.lineHeight=this._lineHeight+"px")}setLetterSpacing(e){this._letterSpacing!==e&&(this._letterSpacing=e,this.domNode.style.letterSpacing=this._letterSpacing+"px")}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)}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 dt(r){return new uO(r)}function Ei(r,e,t){let i=null,n=null;if(typeof t.value=="function"?(i="value",n=t.value,n.length!==0&&console.warn("Memoize should only be used in functions with zero parameters")):typeof t.get=="function"&&(i="get",n=t.get),!n)throw new Error("not supported");const s=`$memoize$${e}`;t[i]=function(...o){return this.hasOwnProperty(s)||Object.defineProperty(this,s,{configurable:!1,enumerable:!1,writable:!1,value:n.apply(this,o)}),this[s]}}var TZ=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vt;(function(r){r.Tap="-monaco-gesturetap",r.Change="-monaco-gesturechange",r.Start="-monaco-gesturestart",r.End="-monaco-gesturesend",r.Contextmenu="-monaco-gesturecontextmenu"})(Vt||(Vt={}));class Et extends Y{constructor(){super();this.dispatched=!1,this.activeTouches={},this.handle=null,this.targets=[],this.ignoreTargets=[],this._lastSetTapCountTime=0,this._register(J(document,"touchstart",e=>this.onTouchStart(e),{passive:!1})),this._register(J(document,"touchend",e=>this.onTouchEnd(e))),this._register(J(document,"touchmove",e=>this.onTouchMove(e),{passive:!1}))}static addTarget(e){return Et.isTouchDevice()?(Et.INSTANCE||(Et.INSTANCE=new Et),Et.INSTANCE.targets.push(e),{dispose:()=>{Et.INSTANCE.targets=Et.INSTANCE.targets.filter(t=>t!==e)}}):Y.None}static ignoreTarget(e){return Et.isTouchDevice()?(Et.INSTANCE||(Et.INSTANCE=new Et),Et.INSTANCE.ignoreTargets.push(e),{dispose:()=>{Et.INSTANCE.ignoreTargets=Et.INSTANCE.ignoreTargets.filter(t=>t!==e)}}):Y.None}static isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints>0}dispose(){this.handle&&(this.handle.dispose(),this.handle=null),super.dispose()}onTouchStart(e){let t=Date.now();this.handle&&(this.handle.dispose(),this.handle=null);for(let i=0,n=e.targetTouches.length;i<n;i++){let s=e.targetTouches.item(i);this.activeTouches[s.identifier]={id:s.identifier,initialTarget:s.target,initialTimeStamp:t,initialPageX:s.pageX,initialPageY:s.pageY,rollingTimestamps:[t],rollingPageX:[s.pageX],rollingPageY:[s.pageY]};let o=this.newGestureEvent(Vt.Start,s.target);o.pageX=s.pageX,o.pageY=s.pageY,this.dispatchEvent(o)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}onTouchEnd(e){let t=Date.now(),i=Object.keys(this.activeTouches).length;for(let n=0,s=e.changedTouches.length;n<s;n++){let o=e.changedTouches.item(n);if(!this.activeTouches.hasOwnProperty(String(o.identifier))){console.warn("move of an UNKNOWN touch",o);continue}let a=this.activeTouches[o.identifier],l=Date.now()-a.initialTimeStamp;if(l<Et.HOLD_DELAY&&Math.abs(a.initialPageX-Qr(a.rollingPageX))<30&&Math.abs(a.initialPageY-Qr(a.rollingPageY))<30){let c=this.newGestureEvent(Vt.Tap,a.initialTarget);c.pageX=Qr(a.rollingPageX),c.pageY=Qr(a.rollingPageY),this.dispatchEvent(c)}else if(l>=Et.HOLD_DELAY&&Math.abs(a.initialPageX-Qr(a.rollingPageX))<30&&Math.abs(a.initialPageY-Qr(a.rollingPageY))<30){let c=this.newGestureEvent(Vt.Contextmenu,a.initialTarget);c.pageX=Qr(a.rollingPageX),c.pageY=Qr(a.rollingPageY),this.dispatchEvent(c)}else if(i===1){let c=Qr(a.rollingPageX),h=Qr(a.rollingPageY),u=Qr(a.rollingTimestamps)-a.rollingTimestamps[0],d=c-a.rollingPageX[0],f=h-a.rollingPageY[0];const g=this.targets.filter(p=>a.initialTarget instanceof Node&&p.contains(a.initialTarget));this.inertia(g,t,Math.abs(d)/u,d>0?1:-1,c,Math.abs(f)/u,f>0?1:-1,h)}this.dispatchEvent(this.newGestureEvent(Vt.End,a.initialTarget)),delete this.activeTouches[o.identifier]}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}newGestureEvent(e,t){let i=document.createEvent("CustomEvent");return i.initEvent(e,!1,!0),i.initialTarget=t,i.tapCount=0,i}dispatchEvent(e){if(e.type===Vt.Tap){const t=new Date().getTime();let i=0;t-this._lastSetTapCountTime>Et.CLEAR_TAP_COUNT_TIME?i=1:i=2,this._lastSetTapCountTime=t,e.tapCount=i}else(e.type===Vt.Change||e.type===Vt.Contextmenu)&&(this._lastSetTapCountTime=0);for(let t=0;t<this.ignoreTargets.length;t++)if(e.initialTarget instanceof Node&&this.ignoreTargets[t].contains(e.initialTarget))return;this.targets.forEach(t=>{e.initialTarget instanceof Node&&t.contains(e.initialTarget)&&(t.dispatchEvent(e),this.dispatched=!0)})}inertia(e,t,i,n,s,o,a,l){this.handle=Oo(()=>{let c=Date.now(),h=c-t,u=0,d=0,f=!0;i+=Et.SCROLL_FRICTION*h,o+=Et.SCROLL_FRICTION*h,i>0&&(f=!1,u=n*i*h),o>0&&(f=!1,d=a*o*h);let g=this.newGestureEvent(Vt.Change);g.translationX=u,g.translationY=d,e.forEach(p=>p.dispatchEvent(g)),f||this.inertia(e,c,i,n,s+u,o,a,l+d)})}onTouchMove(e){let t=Date.now();for(let i=0,n=e.changedTouches.length;i<n;i++){let s=e.changedTouches.item(i);if(!this.activeTouches.hasOwnProperty(String(s.identifier))){console.warn("end of an UNKNOWN touch",s);continue}let o=this.activeTouches[s.identifier],a=this.newGestureEvent(Vt.Change,o.initialTarget);a.translationX=s.pageX-Qr(o.rollingPageX),a.translationY=s.pageY-Qr(o.rollingPageY),a.pageX=s.pageX,a.pageY=s.pageY,this.dispatchEvent(a),o.rollingPageX.length>3&&(o.rollingPageX.shift(),o.rollingPageY.shift(),o.rollingTimestamps.shift()),o.rollingPageX.push(s.pageX),o.rollingPageY.push(s.pageY),o.rollingTimestamps.push(t)}this.dispatched&&(e.preventDefault(),e.stopPropagation(),this.dispatched=!1)}}Et.SCROLL_FRICTION=-.005;Et.HOLD_DELAY=700;Et.CLEAR_TAP_COUNT_TIME=400;TZ([Ei],Et,"isTouchDevice",null);function lf(r,e){let t=new Gr(e);return t.preventDefault(),{leftButton:t.leftButton,buttons:t.buttons,posx:t.posx,posy:t.posy}}class Rh{constructor(){this._hooks=new le,this._mouseMoveEventMerger=null,this._mouseMoveCallback=null,this._onStopCallback=null}dispose(){this.stopMonitoring(!1),this._hooks.dispose()}stopMonitoring(e,t){if(!this.isMonitoring())return;this._hooks.clear(),this._mouseMoveEventMerger=null,this._mouseMoveCallback=null;const i=this._onStopCallback;this._onStopCallback=null,e&&i&&i(t)}isMonitoring(){return!!this._mouseMoveEventMerger}startMonitoring(e,t,i,n,s){if(this.isMonitoring())return;this._mouseMoveEventMerger=i,this._mouseMoveCallback=n,this._onStopCallback=s;const o=EL.getSameOriginWindowChain(),a=No?"pointermove":"mousemove",l="mouseup",c=o.map(u=>u.window.document),h=_h(e);h&&c.unshift(h);for(const u of c)this._hooks.add(OL(u,a,d=>{if(d.buttons!==t){this.stopMonitoring(!0);return}this._mouseMoveCallback(d)},(d,f)=>this._mouseMoveEventMerger(d,f))),this._hooks.add(J(u,l,d=>this.stopMonitoring(!0)));if(EL.hasDifferentOriginAncestor()){let u=o[o.length-1];this._hooks.add(J(u.window.document,"mouseout",d=>{new Gr(d).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(J(u.window.document,"mouseover",d=>{new Gr(d).target.tagName.toLowerCase()==="html"&&this.stopMonitoring(!0)})),this._hooks.add(J(u.window.document.body,"mouseleave",d=>{this.stopMonitoring(!0)}))}}}class kk{constructor(e,t){this.x=e,this.y=t,this._pageCoordinatesBrand=void 0}toClientCoordinates(){return new dO(this.x-Aa.scrollX,this.y-Aa.scrollY)}}class dO{constructor(e,t){this.clientX=e,this.clientY=t,this._clientCoordinatesBrand=void 0}toPageCoordinates(){return new kk(this.clientX+Aa.scrollX,this.clientY+Aa.scrollY)}}class AZ{constructor(e,t,i,n){this.x=e,this.y=t,this.width=i,this.height=n,this._editorPagePositionBrand=void 0}}function fO(r){const e=Qi(r);return new AZ(e.left,e.top,e.width,e.height)}class Mh extends Gr{constructor(e,t){super(e);this._editorMouseEventBrand=void 0,this.pos=new kk(this.posx,this.posy),this.editorPos=fO(t)}}class RZ{constructor(e){this._editorViewDomNode=e}_create(e){return new Mh(e,this._editorViewDomNode)}onContextMenu(e,t){return J(e,"contextmenu",i=>{t(this._create(i))})}onMouseUp(e,t){return J(e,"mouseup",i=>{t(this._create(i))})}onMouseDown(e,t){return J(e,"mousedown",i=>{t(this._create(i))})}onMouseLeave(e,t){return RL(e,i=>{t(this._create(i))})}onMouseMoveThrottled(e,t,i,n){return OL(e,"mousemove",t,(o,a)=>i(o,this._create(a)),n)}}class MZ{constructor(e){this._editorViewDomNode=e}_create(e){return new Mh(e,this._editorViewDomNode)}onPointerUp(e,t){return J(e,"pointerup",i=>{t(this._create(i))})}onPointerDown(e,t){return J(e,"pointerdown",i=>{t(this._create(i))})}onPointerLeave(e,t){return yj(e,i=>{t(this._create(i))})}onPointerMoveThrottled(e,t,i,n){return OL(e,"pointermove",t,(o,a)=>i(o,this._create(a)),n)}}class PZ extends Y{constructor(e){super();this._editorViewDomNode=e,this._globalMouseMoveMonitor=this._register(new Rh),this._keydownListener=null}startMonitoring(e,t,i,n,s){this._keydownListener=ki(document,"keydown",a=>{a.toKeybinding().isModifierKey()||this._globalMouseMoveMonitor.stopMonitoring(!0,a.browserEvent)},!0);const o=(a,l)=>i(a,new Mh(l,this._editorViewDomNode));this._globalMouseMoveMonitor.startMonitoring(e,t,o,n,a=>{this._keydownListener.dispose(),s(a)})}stopMonitoring(){this._globalMouseMoveMonitor.stopMonitoring(!0)}}class Hp extends Y{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<n;i++){let s=e[i];switch(s.type){case 0:this.onCompositionStart(s)&&(t=!0);break;case 1:this.onCompositionEnd(s)&&(t=!0);break;case 2:this.onConfigurationChanged(s)&&(t=!0);break;case 3:this.onCursorStateChanged(s)&&(t=!0);break;case 4:this.onDecorationsChanged(s)&&(t=!0);break;case 5:this.onFlushed(s)&&(t=!0);break;case 6:this.onFocusChanged(s)&&(t=!0);break;case 7:this.onLanguageConfigurationChanged(s)&&(t=!0);break;case 8:this.onLineMappingChanged(s)&&(t=!0);break;case 9:this.onLinesChanged(s)&&(t=!0);break;case 10:this.onLinesDeleted(s)&&(t=!0);break;case 11:this.onLinesInserted(s)&&(t=!0);break;case 12:this.onRevealRangeRequest(s)&&(t=!0);break;case 13:this.onScrollChanged(s)&&(t=!0);break;case 15:this.onTokensChanged(s)&&(t=!0);break;case 14:this.onThemeChanged(s)&&(t=!0);break;case 16:this.onTokensColorsChanged(s)&&(t=!0);break;case 17:this.onZonesChanged(s)&&(t=!0);break;default:console.info("View received unknown event: "),console.info(s)}}t&&(this._shouldRender=!0)}}class ss extends Hp{constructor(e){super();this._context=e,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}}class Zo{static write(e,t){e instanceof uO,e.setAttribute("data-mprt",String(t))}static read(e){const t=e.getAttribute("data-mprt");return t===null?0:parseInt(t,10)}static collect(e,t){let i=[],n=0;for(;e&&e!==document.body&&e!==t;)e.nodeType===e.ELEMENT_NODE&&(i[n++]=this.read(e)),e=e.parentElement;const s=new Uint8Array(n);for(let o=0;o<n;o++)s[o]=i[n-o-1];return s}}class OZ{constructor(e,t){this._restrictedRenderingContextBrand=void 0,this._viewLayout=e,this.viewportData=t,this.scrollWidth=this._viewLayout.getScrollWidth(),this.scrollHeight=this._viewLayout.getScrollHeight(),this.visibleRange=this.viewportData.visibleRange,this.bigNumbersDelta=this.viewportData.bigNumbersDelta;const i=this._viewLayout.getCurrentViewport();this.scrollTop=i.top,this.scrollLeft=i.left,this.viewportWidth=i.width,this.viewportHeight=i.height}getScrolledTopFromAbsoluteTop(e){return e-this.scrollTop}getVerticalOffsetForLineNumber(e){return this._viewLayout.getVerticalOffsetForLineNumber(e)}getDecorationsInViewport(){return this.viewportData.getDecorationsInViewport()}}class FZ extends OZ{constructor(e,t,i){super(e,t);this._renderingContextBrand=void 0,this._viewLines=i}linesVisibleRangesForRange(e,t){return this._viewLines.linesVisibleRangesForRange(e,t)}visibleRangeForPosition(e){return this._viewLines.visibleRangeForPosition(e)}}class BZ{constructor(e,t,i){this.outsideRenderedLine=e,this.lineNumber=t,this.ranges=i}}class RC{constructor(e,t){this._horizontalRangeBrand=void 0,this.left=Math.round(e),this.width=Math.round(t)}static from(e){const t=new Array(e.length);for(let i=0,n=e.length;i<n;i++){const s=e[i];t[i]=new RC(s.left,s.width)}return t}toString(){return`[${this.left},${this.width}]`}}class cf{constructor(e,t){this._floatHorizontalRangeBrand=void 0,this.left=e,this.width=t}toString(){return`[${this.left},${this.width}]`}static compare(e,t){return e.left-t.left}}class WZ{constructor(e,t){this.outsideRenderedLine=e,this.originalLeft=t,this.left=Math.round(this.originalLeft)}}class VZ{constructor(e,t){this.outsideRenderedLine=e,this.ranges=t}}class Dk{static _createRange(){return this._handyReadyRange||(this._handyReadyRange=document.createRange()),this._handyReadyRange}static _detachRange(e,t){e.selectNodeContents(t)}static _readClientRects(e,t,i,n,s){const o=this._createRange();try{return o.setStart(e,t),o.setEnd(i,n),o.getClientRects()}catch{return null}finally{this._detachRange(o,s)}}static _mergeAdjacentRanges(e){if(e.length===1)return e;e.sort(cf.compare);let t=[],i=0,n=e[0];for(let s=1,o=e.length;s<o;s++){const a=e[s];n.left+n.width+.9>=a.left?n.width=Math.max(n.width,a.left+a.width-n.left):(t[i++]=n,n=a)}return t[i++]=n,t}static _createHorizontalRangesFromClientRects(e,t){if(!e||e.length===0)return null;const i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];i[n]=new cf(Math.max(0,o.left-t),o.width)}return this._mergeAdjacentRanges(i)}static readHorizontalRanges(e,t,i,n,s,o,a){const l=0,c=e.children.length-1;if(l>c)return null;if(t=Math.min(c,Math.max(l,t)),n=Math.min(c,Math.max(l,n)),t===n&&i===s&&i===0&&!e.children[t].firstChild){const f=e.children[t].getClientRects();return this._createHorizontalRangesFromClientRects(f,o)}t!==n&&n>0&&s===0&&(n--,s=1073741824);let h=e.children[t].firstChild,u=e.children[n].firstChild;if((!h||!u)&&(!h&&i===0&&t>0&&(h=e.children[t-1].firstChild,i=1073741824),!u&&s===0&&n>0&&(u=e.children[n-1].firstChild,s=1073741824)),!h||!u)return null;i=Math.min(h.textContent.length,Math.max(0,i)),s=Math.min(u.textContent.length,Math.max(0,s));const d=this._readClientRects(h,i,u,s,a);return this._createHorizontalRangesFromClientRects(d,o)}}const HZ=function(){return js?!0:!(Zn||Mn||Po)}();let hf=!0;class gO{constructor(e,t){this._domNode=e,this._clientRectDeltaLeft=0,this._clientRectDeltaLeftRead=!1,this.endNode=t}get clientRectDeltaLeft(){return this._clientRectDeltaLeftRead||(this._clientRectDeltaLeftRead=!0,this._clientRectDeltaLeft=this._domNode.getBoundingClientRect().left),this._clientRectDeltaLeft}}class pO{constructor(e,t){this.themeType=t;const i=e.options,n=i.get(43);this.renderWhitespace=i.get(87),this.renderControlCharacters=i.get(82),this.spaceWidth=n.spaceWidth,this.middotWidth=n.middotWidth,this.wsmiddotWidth=n.wsmiddotWidth,this.useMonospaceOptimizations=n.isMonospace&&!i.get(29),this.canUseHalfwidthRightwardsArrow=n.canUseHalfwidthRightwardsArrow,this.lineHeight=i.get(58),this.stopRenderingLineAfter=i.get(104),this.fontLigatures=i.get(44)}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 Yo{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)this._renderedViewLine.domNode=dt(e);else throw new Error("I have no rendered view line to set the dom node to...")}onContentChanged(){this._isMaybeInvalid=!0}onTokensChanged(){this._isMaybeInvalid=!0}onDecorationsChanged(){this._isMaybeInvalid=!0}onOptionsChanged(e){this._isMaybeInvalid=!0,this._options=e}onSelectionChanged(){return this._options.themeType===is.HIGH_CONTRAST||this._options.renderWhitespace==="selection"?(this._isMaybeInvalid=!0,!0):!1}renderLine(e,t,i,n){if(this._isMaybeInvalid===!1)return!1;this._isMaybeInvalid=!1;const s=i.getViewLineRenderingData(e),o=this._options,a=Pr.filter(s.inlineDecorations,e,s.minColumn,s.maxColumn);let l=null;if(o.themeType===is.HIGH_CONTRAST||this._options.renderWhitespace==="selection"){const d=i.selections;for(const f of d){if(f.endLineNumber<e||f.startLineNumber>e)continue;const g=f.startLineNumber===e?f.startColumn:s.minColumn,p=f.endLineNumber===e?f.endColumn:s.maxColumn;g<p&&(o.themeType===is.HIGH_CONTRAST||this._options.renderWhitespace!=="selection"?a.push(new Pr(g,p,"inline-selected-text",0)):(l||(l=[]),l.push(new iG(g-1,p-1))))}}const c=new kh(o.useMonospaceOptimizations,o.canUseHalfwidthRightwardsArrow,s.content,s.continuesWithWrappedLine,s.isBasicASCII,s.containsRTL,s.minColumn-1,s.tokens,a,s.tabSize,s.startVisibleColumn,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,o.stopRenderingLineAfter,o.renderWhitespace,o.renderControlCharacters,o.fontLigatures!==Dr.OFF,l);if(this._renderedViewLine&&this._renderedViewLine.input.equals(c))return!1;n.appendASCIIString('<div style="top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;height:"),n.appendASCIIString(String(this._options.lineHeight)),n.appendASCIIString('px;" class="'),n.appendASCIIString(Yo.CLASS_NAME),n.appendASCIIString('">');const h=Zv(c,n);n.appendASCIIString("</div>");let u=null;return hf&&HZ&&s.isBasicASCII&&o.useMonospaceOptimizations&&h.containsForeignElements===0&&s.content.length<300&&c.lineTokens.getCount()<100&&(u=new MC(this._renderedViewLine?this._renderedViewLine.domNode:null,c,h.characterMapping)),u||(u=_O(this._renderedViewLine?this._renderedViewLine.domNode:null,c,h.characterMapping,h.containsRTL,h.containsForeignElements)),this._renderedViewLine=u,!0}layoutLine(e,t){this._renderedViewLine&&this._renderedViewLine.domNode&&(this._renderedViewLine.domNode.setTop(t),this._renderedViewLine.domNode.setHeight(this._options.lineHeight))}getWidth(){return this._renderedViewLine?this._renderedViewLine.getWidth():0}getWidthIsFast(){return this._renderedViewLine?this._renderedViewLine.getWidthIsFast():!0}needsMonospaceFontCheck(){return this._renderedViewLine?this._renderedViewLine instanceof MC:!1}monospaceAssumptionsAreValid(){return this._renderedViewLine&&this._renderedViewLine instanceof MC?this._renderedViewLine.monospaceAssumptionsAreValid():hf}onMonospaceAssumptionsInvalidated(){this._renderedViewLine&&this._renderedViewLine instanceof MC&&(this._renderedViewLine=this._renderedViewLine.toSlowRenderedLine())}getVisibleRangesForRange(e,t,i,n){if(!this._renderedViewLine)return null;t=t|0,i=i|0,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|0;let o=!1;s!==-1&&t>s+1&&i>s+1&&(o=!0),s!==-1&&t>s+1&&(t=s+1),s!==-1&&i>s+1&&(i=s+1);const a=this._renderedViewLine.getVisibleRangesForRange(e,t,i,n);return a&&a.length>0?new VZ(o,a):null}getColumnOfNodeOffset(e,t,i){return this._renderedViewLine?this._renderedViewLine.getColumnOfNodeOffset(e,t,i):1}}Yo.CLASS_NAME="view-line";class MC{constructor(e,t,i){this.domNode=e,this.input=t,this._characterMapping=i,this._charWidth=t.spaceWidth}getWidth(){return Math.round(this._getCharPosition(this._characterMapping.length))}getWidthIsFast(){return!0}monospaceAssumptionsAreValid(){if(!this.domNode)return hf;const e=this.getWidth(),t=this.domNode.domNode.firstChild.offsetWidth;return Math.abs(e-t)>=2&&(console.warn("monospace assumptions have been violated, therefore disabling monospace optimizations!"),hf=!1),hf}toSlowRenderedLine(){return _O(this.domNode,this.input,this._characterMapping,!1,0)}getVisibleRangesForRange(e,t,i,n){const s=this._getCharPosition(t),o=this._getCharPosition(i);return[new cf(s,o-s)]}_getCharPosition(e){const t=this._characterMapping.getAbsoluteOffset(e);return this._charWidth*t}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new Zx(s,i),n)}}class mO{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||this._characterMapping.length===0){this._pixelOffsetCache=new Float32Array(Math.max(2,this._characterMapping.length+1));for(let o=0,a=this._characterMapping.length;o<=a;o++)this._pixelOffsetCache[o]=-1}}_getReadingTarget(e){return e.domNode.firstChild}getWidth(){return this.domNode?(this._cachedWidth===-1&&(this._cachedWidth=this._getReadingTarget(this.domNode).offsetWidth),this._cachedWidth):0}getWidthIsFast(){return this._cachedWidth!==-1}getVisibleRangesForRange(e,t,i,n){if(!this.domNode)return null;if(this._pixelOffsetCache!==null){const s=this._readPixelOffset(this.domNode,e,t,n);if(s===-1)return null;const o=this._readPixelOffset(this.domNode,e,i,n);return o===-1?null:[new cf(s,o-s)]}return this._readVisibleRangesForRange(this.domNode,e,t,i,n)}_readVisibleRangesForRange(e,t,i,n,s){if(i===n){const o=this._readPixelOffset(e,t,i,s);return o===-1?null:[new cf(o,0)]}else return this._readRawVisibleRangesForRange(e,i,n,s)}_readPixelOffset(e,t,i,n){if(this._characterMapping.length===0){if(this._containsForeignElements===0||this._containsForeignElements===2)return 0;if(this._containsForeignElements===1)return this.getWidth();const s=this._getReadingTarget(e);return s.firstChild?s.firstChild.offsetWidth:0}if(this._pixelOffsetCache!==null){const s=this._pixelOffsetCache[i];if(s!==-1)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(this._characterMapping.length===0){const l=Dk.readHorizontalRanges(this._getReadingTarget(e),0,0,0,0,n.clientRectDeltaLeft,n.endNode);return!l||l.length===0?-1:l[0].left}if(i===this._characterMapping.length&&this._isWhitespaceOnly&&this._containsForeignElements===0)return this.getWidth();const s=this._characterMapping.getDomPosition(i),o=Dk.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,s.partIndex,s.charIndex,n.clientRectDeltaLeft,n.endNode);if(!o||o.length===0)return-1;const a=o[0].left;if(this.input.isBasicASCII){const l=this._characterMapping.getAbsoluteOffset(i),c=Math.round(this.input.spaceWidth*l);if(Math.abs(c-a)<=1)return c}return a}_readRawVisibleRangesForRange(e,t,i,n){if(t===1&&i===this._characterMapping.length)return[new cf(0,this.getWidth())];const s=this._characterMapping.getDomPosition(t),o=this._characterMapping.getDomPosition(i);return Dk.readHorizontalRanges(this._getReadingTarget(e),s.partIndex,s.charIndex,o.partIndex,o.charIndex,n.clientRectDeltaLeft,n.endNode)}getColumnOfNodeOffset(e,t,i){const n=t.textContent.length;let s=-1;for(;t;)t=t.previousSibling,s++;return this._characterMapping.getColumn(new Zx(s,i),n)}}class zZ extends mO{_readVisibleRangesForRange(e,t,i,n,s){const o=super._readVisibleRangesForRange(e,t,i,n,s);if(!o||o.length===0||i===n||i===1&&n===this._characterMapping.length)return o;if(!this.input.containsRTL){const a=this._readPixelOffset(e,t,n,s);if(a!==-1){const l=o[o.length-1];l.left<a&&(l.width=a-l.left)}}return o}}const _O=function(){return ph?$Z:UZ}();function $Z(r,e,t,i,n){return new zZ(r,e,t,i,n)}function UZ(r,e,t,i,n){return new mO(r,e,t,i,n)}function PC(r){return r.replace(/\n/g,"\\n").replace(/\r/g,"\\r")}class tn{constructor(e,t,i,n){this.oldPosition=e,this.oldText=t,this.newPosition=i,this.newText=n}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}toString(){return this.oldText.length===0?`(insert@${this.oldPosition} "${PC(this.newText)}")`:this.newText.length===0?`(delete@${this.oldPosition} "${PC(this.oldText)}")`:`(replace@${this.oldPosition} "${PC(this.oldText)}" with "${PC(this.newText)}")`}static _writeStringSize(e){return 4+2*e.length}static _writeString(e,t,i){const n=t.length;Qs(e,n,i),i+=4;for(let s=0;s<n;s++)aK(e,t.charCodeAt(s),i),i+=2;return i}static _readString(e,t){const i=Xs(e,t);return t+=4,Nx(e,t,i)}writeSize(){return 4+4+tn._writeStringSize(this.oldText)+tn._writeStringSize(this.newText)}write(e,t){return Qs(e,this.oldPosition,t),t+=4,Qs(e,this.newPosition,t),t+=4,t=tn._writeString(e,this.oldText,t),t=tn._writeString(e,this.newText,t),t}static read(e,t,i){const n=Xs(e,t);t+=4;const s=Xs(e,t);t+=4;const o=tn._readString(e,t);t+=tn._writeStringSize(o);const a=tn._readString(e,t);return t+=tn._writeStringSize(a),i.push(new tn(n,o,s,a)),t}}function jZ(r,e){return r===null||r.length===0?e:new Xo(r,e).compress()}class Xo{constructor(e,t){this._prevEdits=e,this._currEdits=t,this._result=[],this._resultLen=0,this._prevLen=this._prevEdits.length,this._prevDeltaOffset=0,this._currLen=this._currEdits.length,this._currDeltaOffset=0}compress(){let e=0,t=0,i=this._getPrev(e),n=this._getCurr(t);for(;e<this._prevLen||t<this._currLen;){if(i===null){this._acceptCurr(n),n=this._getCurr(++t);continue}if(n===null){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldEnd<=i.newPosition){this._acceptCurr(n),n=this._getCurr(++t);continue}if(i.newEnd<=n.oldPosition){this._acceptPrev(i),i=this._getPrev(++e);continue}if(n.oldPosition<i.newPosition){const[c,h]=Xo._splitCurr(n,i.newPosition-n.oldPosition);this._acceptCurr(c),n=h;continue}if(i.newPosition<n.oldPosition){const[c,h]=Xo._splitPrev(i,n.oldPosition-i.newPosition);this._acceptPrev(c),i=h;continue}let a,l;if(n.oldEnd===i.newEnd)a=i,l=n,i=this._getPrev(++e),n=this._getCurr(++t);else if(n.oldEnd<i.newEnd){const[c,h]=Xo._splitPrev(i,n.oldLength);a=c,l=n,i=h,n=this._getCurr(++t)}else{const[c,h]=Xo._splitCurr(n,i.newLength);a=i,l=c,i=this._getPrev(++e),n=h}this._result[this._resultLen++]=new tn(a.oldPosition,a.oldText,l.newPosition,l.newText),this._prevDeltaOffset+=a.newLength-a.oldLength,this._currDeltaOffset+=l.newLength-l.oldLength}const s=Xo._merge(this._result);return Xo._removeNoOps(s)}_acceptCurr(e){this._result[this._resultLen++]=Xo._rebaseCurr(this._prevDeltaOffset,e),this._currDeltaOffset+=e.newLength-e.oldLength}_getCurr(e){return e<this._currLen?this._currEdits[e]:null}_acceptPrev(e){this._result[this._resultLen++]=Xo._rebasePrev(this._currDeltaOffset,e),this._prevDeltaOffset+=e.newLength-e.oldLength}_getPrev(e){return e<this._prevLen?this._prevEdits[e]:null}static _rebaseCurr(e,t){return new tn(t.oldPosition-e,t.oldText,t.newPosition,t.newText)}static _rebasePrev(e,t){return new tn(t.oldPosition,t.oldText,t.newPosition+e,t.newText)}static _splitPrev(e,t){const i=e.newText.substr(0,t),n=e.newText.substr(t);return[new tn(e.oldPosition,e.oldText,e.newPosition,i),new tn(e.oldEnd,"",e.newPosition+t,n)]}static _splitCurr(e,t){const i=e.oldText.substr(0,t),n=e.oldText.substr(t);return[new tn(e.oldPosition,i,e.newPosition,e.newText),new tn(e.oldPosition+t,n,e.newEnd,"")]}static _merge(e){if(e.length===0)return e;let t=[],i=0,n=e[0];for(let s=1;s<e.length;s++){const o=e[s];n.oldEnd===o.oldPosition?n=new tn(n.oldPosition,n.oldText+o.oldText,n.newPosition,n.newText+o.newText):(t[i++]=n,n=o)}return t[i++]=n,t}static _removeNoOps(e){if(e.length===0)return e;let t=[],i=0;for(let n=0;n<e.length;n++){const s=e[n];s.oldText!==s.newText&&(t[i++]=s)}return t}}function uf(r){return r.toString()}class Fi{constructor(e,t,i,n,s,o,a){this.beforeVersionId=e,this.afterVersionId=t,this.beforeEOL=i,this.afterEOL=n,this.beforeCursorState=s,this.afterCursorState=o,this.changes=a}static create(e,t){const i=e.getAlternativeVersionId(),n=Ek(e);return new Fi(i,i,n,n,t,t,[])}append(e,t,i,n,s){t.length>0&&(this.changes=jZ(this.changes,t)),this.afterEOL=i,this.afterVersionId=n,this.afterCursorState=s}static _writeSelectionsSize(e){return 4+4*4*(e?e.length:0)}static _writeSelections(e,t,i){if(Qs(e,t?t.length:0,i),i+=4,t)for(const n of t)Qs(e,n.selectionStartLineNumber,i),i+=4,Qs(e,n.selectionStartColumn,i),i+=4,Qs(e,n.positionLineNumber,i),i+=4,Qs(e,n.positionColumn,i),i+=4;return i}static _readSelections(e,t,i){const n=Xs(e,t);t+=4;for(let s=0;s<n;s++){const o=Xs(e,t);t+=4;const a=Xs(e,t);t+=4;const l=Xs(e,t);t+=4;const c=Xs(e,t);t+=4,i.push(new be(o,a,l,c))}return t}serialize(){let e=4+4+1+1+Fi._writeSelectionsSize(this.beforeCursorState)+Fi._writeSelectionsSize(this.afterCursorState)+4;for(const n of this.changes)e+=n.writeSize();const t=new Uint8Array(e);let i=0;Qs(t,this.beforeVersionId,i),i+=4,Qs(t,this.afterVersionId,i),i+=4,p2(t,this.beforeEOL,i),i+=1,p2(t,this.afterEOL,i),i+=1,i=Fi._writeSelections(t,this.beforeCursorState,i),i=Fi._writeSelections(t,this.afterCursorState,i),Qs(t,this.changes.length,i),i+=4;for(const n of this.changes)i=n.write(t,i);return t.buffer}static deserialize(e){const t=new Uint8Array(e);let i=0;const n=Xs(t,i);i+=4;const s=Xs(t,i);i+=4;const o=g2(t,i);i+=1;const a=g2(t,i);i+=1;const l=[];i=Fi._readSelections(t,i,l);const c=[];i=Fi._readSelections(t,i,c);const h=Xs(t,i);i+=4;const u=[];for(let d=0;d<h;d++)i=tn.read(t,i,u);return new Fi(n,s,o,a,l,c,u)}}class bO{constructor(e,t){this.model=e,this._data=Fi.create(e,t)}get type(){return 0}get resource(){return Ie.isUri(this.model)?this.model:this.model.uri}get label(){return m("edit","Typing")}toString(){return(this._data instanceof Fi?this._data:Fi.deserialize(this._data)).changes.map(t=>t.toString()).join(", ")}matchesResource(e){return(Ie.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 Fi}append(e,t,i,n,s){this._data instanceof Fi&&this._data.append(e,t,i,n,s)}close(){this._data instanceof Fi&&(this._data=this._data.serialize())}open(){this._data instanceof Fi||(this._data=Fi.deserialize(this._data))}undo(){if(Ie.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Fi&&(this._data=this._data.serialize());const e=Fi.deserialize(this._data);this.model._applyUndo(e.changes,e.beforeEOL,e.beforeVersionId,e.beforeCursorState)}redo(){if(Ie.isUri(this.model))throw new Error("Invalid SingleModelEditStackElement");this._data instanceof Fi&&(this._data=this._data.serialize());const e=Fi.deserialize(this._data);this.model._applyRedo(e.changes,e.afterEOL,e.afterVersionId,e.afterCursorState)}heapSize(){return this._data instanceof Fi&&(this._data=this._data.serialize()),this._data.byteLength+168}}class KZ{constructor(e,t){this.type=1,this.label=e,this._isOpen=!0,this._editStackElementsArr=t.slice(0),this._editStackElementsMap=new Map;for(const i of this._editStackElementsArr){const n=uf(i.resource);this._editStackElementsMap.set(n,i)}this._delegate=null}get resources(){return this._editStackElementsArr.map(e=>e.resource)}prepareUndoRedo(){if(this._delegate)return this._delegate.prepareUndoRedo(this)}matchesResource(e){const t=uf(e);return this._editStackElementsMap.has(t)}setModel(e){const t=uf(Ie.isUri(e)?e:e.uri);this._editStackElementsMap.has(t)&&this._editStackElementsMap.get(t).setModel(e)}canAppend(e){if(!this._isOpen)return!1;const t=uf(e.uri);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).canAppend(e):!1}append(e,t,i,n,s){const o=uf(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=uf(e);return this._editStackElementsMap.has(t)?this._editStackElementsMap.get(t).heapSize():0}split(){return this._editStackElementsArr}toString(){let e=[];for(const t of this._editStackElementsArr)e.push(`${ws(t.resource)}: ${t}`);return`{${e.join(", ")}}`}}function Ek(r){return r.getEOL()===` -`?0:1}function $a(r){return r?r instanceof bO||r instanceof KZ:!1}class Ik{constructor(e,t){this._model=e,this._undoRedoService=t}pushStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);$a(e)&&e.close()}popStackElement(){const e=this._undoRedoService.getLastElement(this._model.uri);$a(e)&&e.open()}clear(){this._undoRedoService.removeElements(this._model.uri)}_getOrCreateEditStackElement(e){const t=this._undoRedoService.getLastElement(this._model.uri);if($a(t)&&t.canAppend(this._model))return t;const i=new bO(this._model,e);return this._undoRedoService.pushElement(i),i}pushEOL(e){const t=this._getOrCreateEditStackElement(null);this._model.setEOL(e),t.append(this._model,[],Ek(this._model),this._model.getAlternativeVersionId(),null)}pushEditOperation(e,t,i){const n=this._getOrCreateEditStackElement(e),s=this._model.applyEdits(t,!0),o=Ik._computeCursorState(i,s),a=s.map((l,c)=>({index:c,textChange:l.textChange}));return a.sort((l,c)=>l.textChange.oldPosition===c.textChange.oldPosition?l.index-c.index:l.textChange.oldPosition-c.textChange.oldPosition),n.append(this._model,a.map(l=>l.textChange),Ek(this._model),this._model.getAlternativeVersionId(),o),o}static _computeCursorState(e,t){try{return e?e(t):null}catch(i){return Oe(i),null}}}class qZ{constructor(){this.spacesDiff=0,this.looksLikeAlignment=!1}}function GZ(r,e,t,i,n){n.spacesDiff=0,n.looksLikeAlignment=!1;let s;for(s=0;s<e&&s<i;s++){let d=r.charCodeAt(s),f=t.charCodeAt(s);if(d!==f)break}let o=0,a=0;for(let d=s;d<e;d++)r.charCodeAt(d)===32?o++:a++;let l=0,c=0;for(let d=s;d<i;d++)t.charCodeAt(d)===32?l++:c++;if(o>0&&a>0||l>0&&c>0)return;let h=Math.abs(a-c),u=Math.abs(o-l);if(h===0){n.spacesDiff=u,u>0&&0<=l-1&&l-1<r.length&&l<t.length&&t.charCodeAt(l)!==32&&r.charCodeAt(l-1)===32&&r.charCodeAt(r.length-1)===44&&(n.looksLikeAlignment=!0);return}if(u%h==0){n.spacesDiff=u/h;return}}function vO(r,e,t){const i=Math.min(r.getLineCount(),1e4);let n=0,s=0,o="",a=0;const l=[2,4,6,8,3,5,7],c=8;let h=[0,0,0,0,0,0,0,0,0],u=new qZ;for(let g=1;g<=i;g++){let p=r.getLineLength(g),_=r.getLineContent(g);const v=p<=65536;let b=!1,C=0,y=0,x=0;for(let w=0,L=p;w<L;w++){let N=v?_.charCodeAt(w):r.getLineCharCode(g,w);if(N===9)x++;else if(N===32)y++;else{b=!0,C=w;break}}if(!b||(x>0?n++:y>1&&s++,GZ(o,a,_,C,u),u.looksLikeAlignment&&!(t&&e===u.spacesDiff)))continue;let S=u.spacesDiff;S<=c&&h[S]++,o=_,a=C}let d=t;n!==s&&(d=n<s);let f=e;if(d){let g=d?0:.1*i;l.forEach(p=>{let _=h[p];_>g&&(g=_,f=p)}),f===4&&h[4]>0&&h[2]>0&&h[2]>=h[4]/2&&(f=2)}return{insertSpaces:d,tabSize:f}}function tr(r){return(r.metadata&1)>>>0}function Pt(r,e){r.metadata=r.metadata&254|e<<0}function nn(r){return(r.metadata&2)>>>1==1}function Tt(r,e){r.metadata=r.metadata&253|(e?1:0)<<1}function CO(r){return(r.metadata&4)>>>2==1}function wO(r,e){r.metadata=r.metadata&251|(e?1:0)<<2}function ZZ(r){return(r.metadata&24)>>>3}function yO(r,e){r.metadata=r.metadata&231|e<<3}function YZ(r){return(r.metadata&32)>>>5==1}function SO(r,e){r.metadata=r.metadata&223|(e?1:0)<<5}class LO{constructor(e,t,i){this.metadata=0,this.parent=this,this.left=this,this.right=this,Pt(this,1),this.start=t,this.end=i,this.delta=0,this.maxEnd=i,this.id=e,this.ownerId=0,this.options=null,wO(this,!1),yO(this,1),SO(this,!1),this.cachedVersionId=0,this.cachedAbsoluteStart=t,this.cachedAbsoluteEnd=i,this.range=null,Tt(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;let t=this.options.className;wO(this,t==="squiggly-error"||t==="squiggly-warning"||t==="squiggly-info"),yO(this,this.options.stickiness),SO(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 $e=new LO(null,0,0);$e.parent=$e;$e.left=$e;$e.right=$e;Pt($e,0);class Nk{constructor(){this.root=$e,this.requestNormalizeDelta=!1}intervalSearch(e,t,i,n,s){return this.root===$e?[]:rY(this,e,t,i,n,s)}search(e,t,i){return this.root===$e?[]:nY(this,e,t,i)}collectNodesFromOwner(e){return tY(this,e)}collectNodesPostOrder(){return iY(this)}insert(e){xO(this,e),this._normalizeDeltaIfNecessary()}delete(e){kO(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=JZ(this,e,e+t);for(let o=0,a=s.length;o<a;o++){const l=s[o];kO(this,l)}this._normalizeDeltaIfNecessary(),eY(this,e,e+t,i),this._normalizeDeltaIfNecessary();for(let o=0,a=s.length;o<a;o++){const l=s[o];l.start=l.cachedAbsoluteStart,l.end=l.cachedAbsoluteEnd,QZ(l,e,e+t,i,n),l.maxEnd=l.end,xO(this,l)}this._normalizeDeltaIfNecessary()}_normalizeDeltaIfNecessary(){!this.requestNormalizeDelta||(this.requestNormalizeDelta=!1,XZ(this))}}function XZ(r){let e=r.root,t=0;for(;e!==$e;){if(e.left!==$e&&!nn(e.left)){e=e.left;continue}if(e.right!==$e&&!nn(e.right)){t+=e.delta,e=e.right;continue}e.start=t+e.start,e.end=t+e.end,e.delta=0,tc(e),Tt(e,!0),Tt(e.left,!1),Tt(e.right,!1),e===e.parent.right&&(t-=e.parent.delta),e=e.parent}Tt(r.root,!1)}function df(r,e,t,i){return r<t?!0:r>t||i===1?!1:i===2?!0:e}function QZ(r,e,t,i,n){const s=ZZ(r),o=s===0||s===2,a=s===1||s===2,l=t-e,c=i,h=Math.min(l,c),u=r.start;let d=!1;const f=r.end;let g=!1;e<=u&&f<=t&&YZ(r)&&(r.start=e,d=!0,r.end=e,g=!0);{const _=n?1:l>0?2:0;!d&&df(u,o,e,_)&&(d=!0),!g&&df(f,a,e,_)&&(g=!0)}if(h>0&&!n){const _=l>c?2:0;!d&&df(u,o,e+h,_)&&(d=!0),!g&&df(f,a,e+h,_)&&(g=!0)}{const _=n?1:0;!d&&df(u,o,t,_)&&(r.start=e+c,d=!0),!g&&df(f,a,t,_)&&(r.end=e+c,g=!0)}const p=c-l;d||(r.start=Math.max(0,u+p)),g||(r.end=Math.max(0,f+p)),r.start>r.end&&(r.end=r.start)}function JZ(r,e,t){let i=r.root,n=0,s=0,o=0,a=0,l=[],c=0;for(;i!==$e;){if(nn(i)){Tt(i.left,!1),Tt(i.right,!1),i===i.parent.right&&(n-=i.parent.delta),i=i.parent;continue}if(!nn(i.left)){if(s=n+i.maxEnd,s<e){Tt(i,!0);continue}if(i.left!==$e){i=i.left;continue}}if(o=n+i.start,o>t){Tt(i,!0);continue}if(a=n+i.end,a>=e&&(i.setCachedOffsets(o,a,0),l[c++]=i),Tt(i,!0),i.right!==$e&&!nn(i.right)){n+=i.delta,i=i.right;continue}}return Tt(r.root,!1),l}function eY(r,e,t,i){let n=r.root,s=0,o=0,a=0;const l=i-(t-e);for(;n!==$e;){if(nn(n)){Tt(n.left,!1),Tt(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),tc(n),n=n.parent;continue}if(!nn(n.left)){if(o=s+n.maxEnd,o<e){Tt(n,!0);continue}if(n.left!==$e){n=n.left;continue}}if(a=s+n.start,a>t){n.start+=l,n.end+=l,n.delta+=l,(n.delta<-1073741824||n.delta>1073741824)&&(r.requestNormalizeDelta=!0),Tt(n,!0);continue}if(Tt(n,!0),n.right!==$e&&!nn(n.right)){s+=n.delta,n=n.right;continue}}Tt(r.root,!1)}function tY(r,e){let t=r.root,i=[],n=0;for(;t!==$e;){if(nn(t)){Tt(t.left,!1),Tt(t.right,!1),t=t.parent;continue}if(t.left!==$e&&!nn(t.left)){t=t.left;continue}if(t.ownerId===e&&(i[n++]=t),Tt(t,!0),t.right!==$e&&!nn(t.right)){t=t.right;continue}}return Tt(r.root,!1),i}function iY(r){let e=r.root,t=[],i=0;for(;e!==$e;){if(nn(e)){Tt(e.left,!1),Tt(e.right,!1),e=e.parent;continue}if(e.left!==$e&&!nn(e.left)){e=e.left;continue}if(e.right!==$e&&!nn(e.right)){e=e.right;continue}t[i++]=e,Tt(e,!0)}return Tt(r.root,!1),t}function nY(r,e,t,i){let n=r.root,s=0,o=0,a=0,l=[],c=0;for(;n!==$e;){if(nn(n)){Tt(n.left,!1),Tt(n.right,!1),n===n.parent.right&&(s-=n.parent.delta),n=n.parent;continue}if(n.left!==$e&&!nn(n.left)){n=n.left;continue}o=s+n.start,a=s+n.end,n.setCachedOffsets(o,a,i);let h=!0;if(e&&n.ownerId&&n.ownerId!==e&&(h=!1),t&&CO(n)&&(h=!1),h&&(l[c++]=n),Tt(n,!0),n.right!==$e&&!nn(n.right)){s+=n.delta,n=n.right;continue}}return Tt(r.root,!1),l}function rY(r,e,t,i,n,s){let o=r.root,a=0,l=0,c=0,h=0,u=[],d=0;for(;o!==$e;){if(nn(o)){Tt(o.left,!1),Tt(o.right,!1),o===o.parent.right&&(a-=o.parent.delta),o=o.parent;continue}if(!nn(o.left)){if(l=a+o.maxEnd,l<e){Tt(o,!0);continue}if(o.left!==$e){o=o.left;continue}}if(c=a+o.start,c>t){Tt(o,!0);continue}if(h=a+o.end,h>=e){o.setCachedOffsets(c,h,s);let f=!0;i&&o.ownerId&&o.ownerId!==i&&(f=!1),n&&CO(o)&&(f=!1),f&&(u[d++]=o)}if(Tt(o,!0),o.right!==$e&&!nn(o.right)){a+=o.delta,o=o.right;continue}}return Tt(r.root,!1),u}function xO(r,e){if(r.root===$e)return e.parent=$e,e.left=$e,e.right=$e,Pt(e,0),r.root=e,r.root;sY(r,e),ic(e.parent);let t=e;for(;t!==r.root&&tr(t.parent)===1;)if(t.parent===t.parent.parent.left){const i=t.parent.parent.right;tr(i)===1?(Pt(t.parent,0),Pt(i,0),Pt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.right&&(t=t.parent,zp(r,t)),Pt(t.parent,0),Pt(t.parent.parent,1),$p(r,t.parent.parent))}else{const i=t.parent.parent.left;tr(i)===1?(Pt(t.parent,0),Pt(i,0),Pt(t.parent.parent,1),t=t.parent.parent):(t===t.parent.left&&(t=t.parent,$p(r,t)),Pt(t.parent,0),Pt(t.parent.parent,1),zp(r,t.parent.parent))}return Pt(r.root,0),e}function sY(r,e){let t=0,i=r.root;const n=e.start,s=e.end;for(;;)if(aY(n,s,i.start+t,i.end+t)<0)if(i.left===$e){e.start-=t,e.end-=t,e.maxEnd-=t,i.left=e;break}else i=i.left;else if(i.right===$e){e.start-=t+i.delta,e.end-=t+i.delta,e.maxEnd-=t+i.delta,i.right=e;break}else t+=i.delta,i=i.right;e.parent=i,e.left=$e,e.right=$e,Pt(e,1)}function kO(r,e){let t,i;if(e.left===$e?(t=e.right,i=e,t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta):e.right===$e?(t=e.left,i=e):(i=oY(e.right),t=i.right,t.start+=i.delta,t.end+=i.delta,t.delta+=i.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),i.start+=e.delta,i.end+=e.delta,i.delta=e.delta,(i.delta<-1073741824||i.delta>1073741824)&&(r.requestNormalizeDelta=!0)),i===r.root){r.root=t,Pt(t,0),e.detach(),Tk(),tc(t),r.root.parent=$e;return}let n=tr(i)===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?t.parent=i.parent:(i.parent===e?t.parent=i:t.parent=i.parent,i.left=e.left,i.right=e.right,i.parent=e.parent,Pt(i,tr(e)),e===r.root?r.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==$e&&(i.left.parent=i),i.right!==$e&&(i.right.parent=i)),e.detach(),n){ic(t.parent),i!==e&&(ic(i),ic(i.parent)),Tk();return}ic(t),ic(t.parent),i!==e&&(ic(i),ic(i.parent));let s;for(;t!==r.root&&tr(t)===0;)t===t.parent.left?(s=t.parent.right,tr(s)===1&&(Pt(s,0),Pt(t.parent,1),zp(r,t.parent),s=t.parent.right),tr(s.left)===0&&tr(s.right)===0?(Pt(s,1),t=t.parent):(tr(s.right)===0&&(Pt(s.left,0),Pt(s,1),$p(r,s),s=t.parent.right),Pt(s,tr(t.parent)),Pt(t.parent,0),Pt(s.right,0),zp(r,t.parent),t=r.root)):(s=t.parent.left,tr(s)===1&&(Pt(s,0),Pt(t.parent,1),$p(r,t.parent),s=t.parent.left),tr(s.left)===0&&tr(s.right)===0?(Pt(s,1),t=t.parent):(tr(s.left)===0&&(Pt(s.right,0),Pt(s,1),zp(r,s),s=t.parent.left),Pt(s,tr(t.parent)),Pt(t.parent,0),Pt(s.left,0),$p(r,t.parent),t=r.root));Pt(t,0),Tk()}function oY(r){for(;r.left!==$e;)r=r.left;return r}function Tk(){$e.parent=$e,$e.delta=0,$e.start=0,$e.end=0}function zp(r,e){const t=e.right;t.delta+=e.delta,(t.delta<-1073741824||t.delta>1073741824)&&(r.requestNormalizeDelta=!0),t.start+=e.delta,t.end+=e.delta,e.right=t.left,t.left!==$e&&(t.left.parent=e),t.parent=e.parent,e.parent===$e?r.root=t:e===e.parent.left?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t,tc(e),tc(t)}function $p(r,e){const t=e.left;e.delta-=t.delta,(e.delta<-1073741824||e.delta>1073741824)&&(r.requestNormalizeDelta=!0),e.start-=t.delta,e.end-=t.delta,e.left=t.right,t.right!==$e&&(t.right.parent=e),t.parent=e.parent,e.parent===$e?r.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t,tc(e),tc(t)}function DO(r){let e=r.end;if(r.left!==$e){const t=r.left.maxEnd;t>e&&(e=t)}if(r.right!==$e){const t=r.right.maxEnd+r.delta;t>e&&(e=t)}return e}function tc(r){r.maxEnd=DO(r)}function ic(r){for(;r!==$e;){const e=DO(r);if(r.maxEnd===e)return;r.maxEnd=e,r=r.parent}}function aY(r,e,t,i){return r===t?e-i:r-t}class Ak{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!==Me)return Rk(this.right);let e=this;for(;e.parent!==Me&&e.parent.left!==e;)e=e.parent;return e.parent===Me?Me:e.parent}prev(){if(this.left!==Me)return EO(this.left);let e=this;for(;e.parent!==Me&&e.parent.right!==e;)e=e.parent;return e.parent===Me?Me:e.parent}detach(){this.parent=null,this.left=null,this.right=null}}const Me=new Ak(null,0);Me.parent=Me;Me.left=Me;Me.right=Me;Me.color=0;function Rk(r){for(;r.left!==Me;)r=r.left;return r}function EO(r){for(;r.right!==Me;)r=r.right;return r}function Mk(r){return r===Me?0:r.size_left+r.piece.length+Mk(r.right)}function Pk(r){return r===Me?0:r.lf_left+r.piece.lineFeedCnt+Pk(r.right)}function Ok(){Me.parent=Me}function Up(r,e){let t=e.right;t.size_left+=e.size_left+(e.piece?e.piece.length:0),t.lf_left+=e.lf_left+(e.piece?e.piece.lineFeedCnt:0),e.right=t.left,t.left!==Me&&(t.left.parent=e),t.parent=e.parent,e.parent===Me?r.root=t:e.parent.left===e?e.parent.left=t:e.parent.right=t,t.left=e,e.parent=t}function jp(r,e){let t=e.left;e.left=t.right,t.right!==Me&&(t.right.parent=e),t.parent=e.parent,e.size_left-=t.size_left+(t.piece?t.piece.length:0),e.lf_left-=t.lf_left+(t.piece?t.piece.lineFeedCnt:0),e.parent===Me?r.root=t:e===e.parent.right?e.parent.right=t:e.parent.left=t,t.right=e,e.parent=t}function OC(r,e){let t,i;if(e.left===Me?(i=e,t=i.right):e.right===Me?(i=e,t=i.left):(i=Rk(e.right),t=i.right),i===r.root){r.root=t,t.color=0,e.detach(),Ok(),r.root.parent=Me;return}let n=i.color===1;if(i===i.parent.left?i.parent.left=t:i.parent.right=t,i===e?(t.parent=i.parent,Kp(r,t)):(i.parent===e?t.parent=i:t.parent=i.parent,Kp(r,t),i.left=e.left,i.right=e.right,i.parent=e.parent,i.color=e.color,e===r.root?r.root=i:e===e.parent.left?e.parent.left=i:e.parent.right=i,i.left!==Me&&(i.left.parent=i),i.right!==Me&&(i.right.parent=i),i.size_left=e.size_left,i.lf_left=e.lf_left,Kp(r,i)),e.detach(),t.parent.left===t){let o=Mk(t),a=Pk(t);if(o!==t.parent.size_left||a!==t.parent.lf_left){let l=o-t.parent.size_left,c=a-t.parent.lf_left;t.parent.size_left=o,t.parent.lf_left=a,Ua(r,t.parent,l,c)}}if(Kp(r,t.parent),n){Ok();return}let s;for(;t!==r.root&&t.color===0;)t===t.parent.left?(s=t.parent.right,s.color===1&&(s.color=0,t.parent.color=1,Up(r,t.parent),s=t.parent.right),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.right.color===0&&(s.left.color=0,s.color=1,jp(r,s),s=t.parent.right),s.color=t.parent.color,t.parent.color=0,s.right.color=0,Up(r,t.parent),t=r.root)):(s=t.parent.left,s.color===1&&(s.color=0,t.parent.color=1,jp(r,t.parent),s=t.parent.left),s.left.color===0&&s.right.color===0?(s.color=1,t=t.parent):(s.left.color===0&&(s.right.color=0,s.color=1,Up(r,s),s=t.parent.left),s.color=t.parent.color,t.parent.color=0,s.left.color=0,jp(r,t.parent),t=r.root));t.color=0,Ok()}function IO(r,e){for(Kp(r,e);e!==r.root&&e.parent.color===1;)if(e.parent===e.parent.parent.left){const t=e.parent.parent.right;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.right&&(e=e.parent,Up(r,e)),e.parent.color=0,e.parent.parent.color=1,jp(r,e.parent.parent))}else{const t=e.parent.parent.left;t.color===1?(e.parent.color=0,t.color=0,e.parent.parent.color=1,e=e.parent.parent):(e===e.parent.left&&(e=e.parent,jp(r,e)),e.parent.color=0,e.parent.parent.color=1,Up(r,e.parent.parent))}r.root.color=0}function Ua(r,e,t,i){for(;e!==r.root&&e!==Me;)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}function Kp(r,e){let t=0,i=0;if(e!==r.root){if(t===0){for(;e!==r.root&&e===e.parent.right;)e=e.parent;if(e===r.root)return;e=e.parent,t=Mk(e.left)-e.size_left,i=Pk(e.left)-e.lf_left,e.size_left+=t,e.lf_left+=i}for(;e!==r.root&&(t!==0||i!==0);)e.parent.left===e&&(e.parent.size_left+=t,e.parent.lf_left+=i),e=e.parent}}class lY extends Gd{constructor(e){super(0);for(let t=0,i=e.length;t<i;t++)this.set(e.charCodeAt(t),2);this.set(32,1),this.set(9,1)}}function cY(r){let e={};return t=>(e.hasOwnProperty(t)||(e[t]=r(t)),e[t])}const os=cY(r=>new lY(r)),hY=999;class Ph{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;this.isRegex?e=uY(this.searchString):e=this.searchString.indexOf(` -`)>=0;let t=null;try{t=s2(this.searchString,this.isRegex,{matchCase:this.matchCase,wholeWord:!1,multiline:e,global:!0,unicode:!0})}catch{return null}if(!t)return null;let i=!this.isRegex&&!e;return i&&this.searchString.toLowerCase()!==this.searchString.toUpperCase()&&(i=this.matchCase),new dY(t,this.wordSeparators?os(this.wordSeparators):null,i?this.searchString:null)}}function uY(r){if(!r||r.length===0)return!1;for(let e=0,t=r.length;e<t;e++)if(r.charCodeAt(e)===92){if(e++,e>=t)break;const n=r.charCodeAt(e);if(n===110||n===114||n===87)return!0}return!1}class dY{constructor(e,t,i){this.regex=e,this.wordSeparators=t,this.simpleSearch=i}}function Oh(r,e,t){if(!t)return new _p(r,null);let i=[];for(let n=0,s=e.length;n<s;n++)i[n]=e[n];return new _p(r,i)}class NO{constructor(e){let t=[],i=0;for(let n=0,s=e.length;n<s;n++)e.charCodeAt(n)===10&&(t[i++]=n);this._lineFeedsOffsets=t}findLineFeedCountBeforeOffset(e){const t=this._lineFeedsOffsets;let i=0,n=t.length-1;if(n===-1||e<=t[0])return 0;for(;i<n;){const s=i+((n-i)/2>>0);t[s]>=e?n=s-1:t[s+1]>=e?(i=s,n=s):i=s+1}return i+1}}class FC{static findMatches(e,t,i,n,s){const o=t.parseSearchRequest();return o?o.regex.multiline?this._doFindMatchesMultiline(e,i,new qp(o.wordSeparators,o.regex),n,s):this._doFindMatchesLineByLine(e,i,o,n,s):[]}static _getMultilineMatchRange(e,t,i,n,s,o){let a,l=0;n?(l=n.findLineFeedCountBeforeOffset(s),a=t+s+l):a=t+s;let c;if(n){let f=n.findLineFeedCountBeforeOffset(s+o.length)-l;c=a+o.length+f}else c=a+o.length;const h=e.getPositionAt(a),u=e.getPositionAt(c);return new k(h.lineNumber,h.column,u.lineNumber,u.column)}static _doFindMatchesMultiline(e,t,i,n,s){const o=e.getOffsetAt(t.getStartPosition()),a=e.getValueInRange(t,1),l=e.getEOL()===`\r -`?new NO(a):null,c=[];let h=0,u;for(i.reset(0);u=i.next(a);)if(c[h++]=Oh(this._getMultilineMatchRange(e,o,a,l,u.index,u[0]),u,n),h>=s)return c;return c}static _doFindMatchesLineByLine(e,t,i,n,s){const o=[];let a=0;if(t.startLineNumber===t.endLineNumber){const c=e.getLineContent(t.startLineNumber).substring(t.startColumn-1,t.endColumn-1);return a=this._findMatchesInLine(i,c,t.startLineNumber,t.startColumn-1,a,o,n,s),o}const l=e.getLineContent(t.startLineNumber).substring(t.startColumn-1);a=this._findMatchesInLine(i,l,t.startLineNumber,t.startColumn-1,a,o,n,s);for(let c=t.startLineNumber+1;c<t.endLineNumber&&a<s;c++)a=this._findMatchesInLine(i,e.getLineContent(c),c,0,a,o,n,s);if(a<s){const c=e.getLineContent(t.endLineNumber).substring(0,t.endColumn-1);a=this._findMatchesInLine(i,c,t.endLineNumber,0,a,o,n,s)}return o}static _findMatchesInLine(e,t,i,n,s,o,a,l){const c=e.wordSeparators;if(!a&&e.simpleSearch){const d=e.simpleSearch,f=d.length,g=t.length;let p=-f;for(;(p=t.indexOf(d,p+f))!==-1;)if((!c||Fk(c,t,g,p,f))&&(o[s++]=new _p(new k(i,p+1+n,i,p+1+f+n),null),s>=l))return s;return s}const h=new qp(e.wordSeparators,e.regex);let u;h.reset(0);do if(u=h.next(t),u&&(o[s++]=Oh(new k(i,u.index+1+n,i,u.index+1+u[0].length+n),u,a),s>=l))return s;while(u);return s}static findNextMatch(e,t,i,n){const s=t.parseSearchRequest();if(!s)return null;const o=new qp(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 $(t.lineNumber,1),o=e.getOffsetAt(s),a=e.getLineCount(),l=e.getValueInRange(new k(s.lineNumber,s.column,a,e.getLineMaxColumn(a)),1),c=e.getEOL()===`\r -`?new NO(l):null;i.reset(t.column-1);let h=i.next(l);return h?Oh(this._getMultilineMatchRange(e,o,l,c,h.index,h[0]),h,n):t.lineNumber!==1||t.column!==1?this._doFindNextMatchMultiline(e,new $(1,1),i,n):null}static _doFindNextMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o),l=this._findFirstMatchInLine(i,a,o,t.column,n);if(l)return l;for(let c=1;c<=s;c++){const h=(o+c-1)%s,u=e.getLineContent(h+1),d=this._findFirstMatchInLine(i,u,h+1,1,n);if(d)return d}return null}static _findFirstMatchInLine(e,t,i,n,s){e.reset(n-1);const o=e.next(t);return o?Oh(new k(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 qp(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 k(1,1,t.lineNumber,t.column),i,n,10*hY);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 $(o,e.getLineMaxColumn(o)),i,n):null}static _doFindPreviousMatchLineByLine(e,t,i,n){const s=e.getLineCount(),o=t.lineNumber,a=e.getLineContent(o).substring(0,t.column-1),l=this._findLastMatchInLine(i,a,o,n);if(l)return l;for(let c=1;c<=s;c++){const h=(s+o-c-1)%s,u=e.getLineContent(h+1),d=this._findLastMatchInLine(i,u,h+1,n);if(d)return d}return null}static _findLastMatchInLine(e,t,i,n){let s=null,o;for(e.reset(0);o=e.next(t);)s=Oh(new k(i,o.index+1,i,o.index+1+o[0].length),o,n);return s}}function fY(r,e,t,i,n){if(i===0)return!0;const s=e.charCodeAt(i-1);if(r.get(s)!==0||s===13||s===10)return!0;if(n>0){const o=e.charCodeAt(i);if(r.get(o)!==0)return!0}return!1}function gY(r,e,t,i,n){if(i+n===t)return!0;const s=e.charCodeAt(i+n);if(r.get(s)!==0||s===13||s===10)return!0;if(n>0){const o=e.charCodeAt(i+n-1);if(r.get(o)!==0)return!0}return!1}function Fk(r,e,t,i,n){return fY(r,e,t,i,n)&&gY(r,e,t,i,n)}class qp{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||(i=this._searchRegex.exec(e),!i))return null;const n=i.index,s=i[0].length;if(n===this._prevMatchStartIndex&&s===this._prevMatchLength){if(s===0){Pa(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||Fk(this._wordSeparators,e,t,n,s))return i}while(i);return null}}const ja=65535;function TO(r){let e;return r[r.length-1]<65536?e=new Uint16Array(r.length):e=new Uint32Array(r.length),e.set(r,0),e}class pY{constructor(e,t,i,n,s){this.lineStarts=e,this.cr=t,this.lf=i,this.crlf=n,this.isBasicASCII=s}}function Ka(r,e=!0){let t=[0],i=1;for(let n=0,s=r.length;n<s;n++){const o=r.charCodeAt(n);o===13?n+1<s&&r.charCodeAt(n+1)===10?(t[i++]=n+2,n++):t[i++]=n+1:o===10&&(t[i++]=n+1)}return e?TO(t):t}function mY(r,e){r.length=0,r[0]=0;let t=1,i=0,n=0,s=0,o=!0;for(let l=0,c=e.length;l<c;l++){const h=e.charCodeAt(l);h===13?l+1<c&&e.charCodeAt(l+1)===10?(s++,r[t++]=l+2,l++):(i++,r[t++]=l+1):h===10?(n++,r[t++]=l+1):o&&h!==9&&(h<32||h>126)&&(o=!1)}const a=new pY(TO(r),i,n,s,o);return r.length=0,a}class pr{constructor(e,t,i,n,s){this.bufferIndex=e,this.start=t,this.end=i,this.lineFeedCnt=n,this.length=s}}class Fh{constructor(e,t){this.buffer=e,this.lineStarts=t}}class _Y{constructor(e,t){this._pieces=[],this._tree=e,this._BOM=t,this._index=0,e.root!==Me&&e.iterate(e.root,i=>(i!==Me&&this._pieces.push(i.piece),!0))}read(){return this._pieces.length===0?this._index===0?(this._index++,this._BOM):null:this._index>this._pieces.length-1?null:this._index===0?this._BOM+this._tree.getPieceContent(this._pieces[this._index++]):this._tree.getPieceContent(this._pieces[this._index++])}}class bY{constructor(e){this._limit=e,this._cache=[]}get(e){for(let t=this._cache.length-1;t>=0;t--){let 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--){let i=this._cache[t];if(i.nodeStartLineNumber&&i.nodeStartLineNumber<e&&i.nodeStartLineNumber+i.node.piece.lineFeedCnt>=e)return i}return null}set(e){this._cache.length>=this._limit&&this._cache.shift(),this._cache.push(e)}validate(e){let t=!1,i=this._cache;for(let n=0;n<i.length;n++){let s=i[n];if(s.node.parent===null||s.nodeStartOffset>=e){i[n]=null,t=!0;continue}}if(t){let n=[];for(const s of i)s!==null&&n.push(s);this._cache=n}}}class vY{constructor(e,t,i){this.create(e,t,i)}create(e,t,i){this._buffers=[new Fh("",[0])],this._lastChangeBufferPos={line:0,column:0},this.root=Me,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;s<o;s++)if(e[s].buffer.length>0){e[s].lineStarts||(e[s].lineStarts=Ka(e[s].buffer));let a=new pr(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,a)}this._searchCache=new bY(1),this._lastVisitedLine={lineNumber:0,value:""},this.computeBufferMetadata()}normalizeEOL(e){let t=ja,i=t-Math.floor(t/3),n=i*2,s="",o=0,a=[];if(this.iterate(this.root,l=>{let c=this.getNodeContent(l),h=c.length;if(o<=i||o+h<n)return s+=c,o+=h,!0;let u=s.replace(/\r\n|\r|\n/g,e);return a.push(new Fh(u,Ka(u))),s=c,o=h,!0}),o>0){let l=s.replace(/\r\n|\r|\n/g,e);a.push(new Fh(l,Ka(l)))}this.create(a,e,!0)}getEOL(){return this._EOL}setEOL(e){this._EOL=e,this._EOLLength=this._EOL.length,this.normalizeEOL(e)}createSnapshot(e){return new _Y(this,e)}getOffsetAt(e,t){let i=0,n=this.root;for(;n!==Me;)if(n.left!==Me&&n.lf_left+1>=e)n=n.left;else{if(n.lf_left+n.piece.lineFeedCnt+1>=e)return i+=n.size_left,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,n=e;for(;t!==Me;)if(t.size_left!==0&&t.size_left>=e)t=t.left;else if(t.size_left+t.piece.length>=e){let s=this.getIndexOf(t,e-t.size_left);if(i+=t.lf_left+s.index,s.index===0){let o=this.getOffsetAt(i+1,1),a=n-o;return new $(i+1,a+1)}return new $(i+1,s.remainder+1)}else if(e-=t.size_left+t.piece.length,i+=t.lf_left+t.piece.lineFeedCnt,t.right===Me){let s=this.getOffsetAt(i+1,1),o=n-e-s;return new $(i+1,o+1)}else t=t.right;return new $(1,1)}getValueInRange(e,t){if(e.startLineNumber===e.endLineNumber&&e.startColumn===e.endColumn)return"";let 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?s.replace(/\r\n|\r|\n/g,t):t===this.getEOL()&&this._EOLNormalized?s:s.replace(/\r\n|\r|\n/g,t):s}getValueInRange2(e,t){if(e.node===t.node){let a=e.node,l=this._buffers[a.piece.bufferIndex].buffer,c=this.offsetInBuffer(a.piece.bufferIndex,a.piece.start);return l.substring(c+e.remainder,c+t.remainder)}let i=e.node,n=this._buffers[i.piece.bufferIndex].buffer,s=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start),o=n.substring(s+e.remainder,s+i.piece.length);for(i=i.next();i!==Me;){let a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(i===t.node){o+=a.substring(l,l+t.remainder);break}else o+=a.substr(l,i.piece.length);i=i.next()}return o}getLinesContent(){let e=[],t=0,i="",n=!1;return this.iterate(this.root,s=>{if(s===Me)return!0;const o=s.piece;let a=o.length;if(a===0)return!0;const l=this._buffers[o.bufferIndex].buffer,c=this._buffers[o.bufferIndex].lineStarts,h=o.start.line,u=o.end.line;let d=c[h]+o.start.column;if(n&&(l.charCodeAt(d)===10&&(d++,a--),e[t++]=i,i="",n=!1,a===0))return!0;if(h===u)return!this._EOLNormalized&&l.charCodeAt(d+a-1)===13?(n=!0,i+=l.substr(d,a-1)):i+=l.substr(d,a),!0;i+=this._EOLNormalized?l.substring(d,Math.max(d,c[h+1]-this._EOLLength)):l.substring(d,c[h+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;for(let f=h+1;f<u;f++)i=this._EOLNormalized?l.substring(c[f],c[f+1]-this._EOLLength):l.substring(c[f],c[f+1]).replace(/(\r\n|\r|\n)$/,""),e[t++]=i;return!this._EOLNormalized&&l.charCodeAt(c[u]+o.end.column-1)===13?(n=!0,o.end.column===0?t--:i=l.substr(c[u],o.end.column-1)):i=l.substr(c[u],o.end.column),!0}),n&&(e[t++]=i,i=""),e[t++]=i,e}getLength(){return this._length}getLineCount(){return this._lineCnt}getLineContent(e){return this._lastVisitedLine.lineNumber===e?this._lastVisitedLine.value:(this._lastVisitedLine.lineNumber=e,e===this._lineCnt?this._lastVisitedLine.value=this.getLineRawContent(e):this._EOLNormalized?this._lastVisitedLine.value=this.getLineRawContent(e,this._EOLLength):this._lastVisitedLine.value=this.getLineRawContent(e).replace(/(\r\n|\r|\n)$/,""),this._lastVisitedLine.value)}_getCharCode(e){if(e.remainder===e.node.piece.length){let t=e.node.next();if(!t)return 0;let i=this._buffers[t.piece.bufferIndex],n=this.offsetInBuffer(t.piece.bufferIndex,t.piece.start);return i.buffer.charCodeAt(n)}else{let t=this._buffers[e.node.piece.bufferIndex],n=this.offsetInBuffer(e.node.piece.bufferIndex,e.node.piece.start)+e.remainder;return t.buffer.charCodeAt(n)}}getLineCharCode(e,t){let i=this.nodeAt2(e,t+1);return this._getCharCode(i)}getLineLength(e){if(e===this.getLineCount()){let t=this.getOffsetAt(e,1);return this.getLength()-t}return this.getOffsetAt(e+1,1)-this.getOffsetAt(e,1)-this._EOLLength}findMatchesInNode(e,t,i,n,s,o,a,l,c,h,u){let d=this._buffers[e.piece.bufferIndex],f=this.offsetInBuffer(e.piece.bufferIndex,e.piece.start),g=this.offsetInBuffer(e.piece.bufferIndex,s),p=this.offsetInBuffer(e.piece.bufferIndex,o),_,v={line:0,column:0},b,C;t._wordSeparators?(b=d.buffer.substring(g,p),C=y=>y+g,t.reset(0)):(b=d.buffer,C=y=>y,t.reset(g));do if(_=t.next(b),_){if(C(_.index)>=p)return h;this.positionInBuffer(e,C(_.index)-f,v);let y=this.getLineFeedCnt(e.piece.bufferIndex,s,v),x=v.line===s.line?v.column-s.column+n:v.column+1,S=x+_[0].length;if(u[h++]=Oh(new k(i+y,x,i+y,S),_,l),C(_.index)+_[0].length>=p||h>=c)return h}while(_);return h}findMatchesLineByLine(e,t,i,n){const s=[];let o=0;const a=new qp(t.wordSeparators,t.regex);let l=this.nodeAt2(e.startLineNumber,e.startColumn);if(l===null)return[];let c=this.nodeAt2(e.endLineNumber,e.endColumn);if(c===null)return[];let h=this.positionInBuffer(l.node,l.remainder),u=this.positionInBuffer(c.node,c.remainder);if(l.node===c.node)return this.findMatchesInNode(l.node,a,e.startLineNumber,e.startColumn,h,u,t,i,n,o,s),s;let d=e.startLineNumber,f=l.node;for(;f!==c.node;){let p=this.getLineFeedCnt(f.piece.bufferIndex,h,f.piece.end);if(p>=1){let v=this._buffers[f.piece.bufferIndex].lineStarts,b=this.offsetInBuffer(f.piece.bufferIndex,f.piece.start),C=v[h.line+p],y=d===e.startLineNumber?e.startColumn:1;if(o=this.findMatchesInNode(f,a,d,y,h,this.positionInBuffer(f,C-b),t,i,n,o,s),o>=n)return s;d+=p}let _=d===e.startLineNumber?e.startColumn-1:0;if(d===e.endLineNumber){const v=this.getLineContent(d).substring(_,e.endColumn-1);return o=this._findMatchesInLine(t,a,v,e.endLineNumber,_,o,s,i,n),s}if(o=this._findMatchesInLine(t,a,this.getLineContent(d).substr(_),d,_,o,s,i,n),o>=n)return s;d++,l=this.nodeAt2(d,1),f=l.node,h=this.positionInBuffer(l.node,l.remainder)}if(d===e.endLineNumber){let p=d===e.startLineNumber?e.startColumn-1:0;const _=this.getLineContent(d).substring(p,e.endColumn-1);return o=this._findMatchesInLine(t,a,_,e.endLineNumber,p,o,s,i,n),s}let g=d===e.startLineNumber?e.startColumn:1;return o=this.findMatchesInNode(c.node,a,d,g,h,u,t,i,n,o,s),s}_findMatchesInLine(e,t,i,n,s,o,a,l,c){const h=e.wordSeparators;if(!l&&e.simpleSearch){const d=e.simpleSearch,f=d.length,g=i.length;let p=-f;for(;(p=i.indexOf(d,p+f))!==-1;)if((!h||Fk(h,i,g,p,f))&&(a[o++]=new _p(new k(n,p+1+s,n,p+1+f+s),null),o>=c))return o;return o}let u;t.reset(0);do if(u=t.next(i),u&&(a[o++]=Oh(new k(n,u.index+1+s,n,u.index+1+u[0].length+s),u,l),o>=c))return o;while(u);return o}insert(e,t,i=!1){if(this._EOLNormalized=this._EOLNormalized&&i,this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",this.root!==Me){let{node:n,remainder:s,nodeStartOffset:o}=this.nodeAt(e),a=n.piece,l=a.bufferIndex,c=this.positionInBuffer(n,s);if(n.piece.bufferIndex===0&&a.end.line===this._lastChangeBufferPos.line&&a.end.column===this._lastChangeBufferPos.column&&o+a.length===e&&t.length<ja){this.appendToNode(n,t),this.computeBufferMetadata();return}if(o===e)this.insertContentToNodeLeft(t,n),this._searchCache.validate(e);else if(o+n.piece.length>e){let h=[],u=new pr(a.bufferIndex,c,a.end,this.getLineFeedCnt(a.bufferIndex,c,a.end),this.offsetInBuffer(l,a.end)-this.offsetInBuffer(l,c));if(this.shouldCheckCRLF()&&this.endWithCR(t)&&this.nodeCharCodeAt(n,s)===10){let p={line:u.start.line+1,column:0};u=new pr(u.bufferIndex,p,u.end,this.getLineFeedCnt(u.bufferIndex,p,u.end),u.length-1),t+=` -`}if(this.shouldCheckCRLF()&&this.startWithLF(t))if(this.nodeCharCodeAt(n,s-1)===13){let p=this.positionInBuffer(n,s-1);this.deleteNodeTail(n,p),t="\r"+t,n.piece.length===0&&h.push(n)}else this.deleteNodeTail(n,c);else this.deleteNodeTail(n,c);let d=this.createNewPieces(t);u.length>0&&this.rbInsertRight(n,u);let f=n;for(let g=0;g<d.length;g++)f=this.rbInsertRight(f,d[g]);this.deleteNodes(h)}else this.insertContentToNodeRight(t,n)}else{let n=this.createNewPieces(t),s=this.rbInsertLeft(null,n[0]);for(let o=1;o<n.length;o++)s=this.rbInsertRight(s,n[o])}this.computeBufferMetadata()}delete(e,t){if(this._lastVisitedLine.lineNumber=0,this._lastVisitedLine.value="",t<=0||this.root===Me)return;let i=this.nodeAt(e),n=this.nodeAt(e+t),s=i.node,o=n.node;if(s===o){let d=this.positionInBuffer(s,i.remainder),f=this.positionInBuffer(s,n.remainder);if(i.nodeStartOffset===e){if(t===s.piece.length){let g=s.next();OC(this,s),this.validateCRLFWithPrevNode(g),this.computeBufferMetadata();return}this.deleteNodeHead(s,f),this._searchCache.validate(e),this.validateCRLFWithPrevNode(s),this.computeBufferMetadata();return}if(i.nodeStartOffset+s.piece.length===e+t){this.deleteNodeTail(s,d),this.validateCRLFWithNextNode(s),this.computeBufferMetadata();return}this.shrinkNode(s,d,f),this.computeBufferMetadata();return}let a=[],l=this.positionInBuffer(s,i.remainder);this.deleteNodeTail(s,l),this._searchCache.validate(e),s.piece.length===0&&a.push(s);let c=this.positionInBuffer(o,n.remainder);this.deleteNodeHead(o,c),o.piece.length===0&&a.push(o);let h=s.next();for(let d=h;d!==Me&&d!==o;d=d.next())a.push(d);let u=s.piece.length===0?s.prev():s;this.deleteNodes(a),this.validateCRLFWithNextNode(u),this.computeBufferMetadata()}insertContentToNodeLeft(e,t){let i=[];if(this.shouldCheckCRLF()&&this.endWithCR(e)&&this.startWithLF(t)){let o=t.piece,a={line:o.start.line+1,column:0},l=new pr(o.bufferIndex,a,o.end,this.getLineFeedCnt(o.bufferIndex,a,o.end),o.length-1);t.piece=l,e+=` -`,Ua(this,t,-1,-1),t.piece.length===0&&i.push(t)}let n=this.createNewPieces(e),s=this.rbInsertLeft(t,n[n.length-1]);for(let o=n.length-2;o>=0;o--)s=this.rbInsertLeft(s,n[o]);this.validateCRLFWithPrevNode(s),this.deleteNodes(i)}insertContentToNodeRight(e,t){this.adjustCarriageReturnFromNext(e,t)&&(e+=` -`);let i=this.createNewPieces(e),n=this.rbInsertRight(t,i[0]),s=n;for(let o=1;o<i.length;o++)s=this.rbInsertRight(s,i[o]);this.validateCRLFWithPrevNode(n)}positionInBuffer(e,t,i){let n=e.piece,s=e.piece.bufferIndex,o=this._buffers[s].lineStarts,l=o[n.start.line]+n.start.column+t,c=n.start.line,h=n.end.line,u=0,d=0,f=0;for(;c<=h&&(u=c+(h-c)/2|0,f=o[u],u!==h);)if(d=o[u+1],l<f)h=u-1;else if(l>=d)c=u+1;else break;return i?(i.line=u,i.column=l-f,null):{line:u,column:l-f}}getLineFeedCnt(e,t,i){if(i.column===0)return i.line-t.line;let n=this._buffers[e].lineStarts;if(i.line===n.length-1)return i.line-t.line;let s=n[i.line+1],o=n[i.line]+i.column;if(s>o+1)return i.line-t.line;let a=o-1;return this._buffers[e].buffer.charCodeAt(a)===13?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;t<e.length;t++)OC(this,e[t])}createNewPieces(e){if(e.length>ja){let h=[];for(;e.length>ja;){const d=e.charCodeAt(ja-1);let f;d===13||d>=55296&&d<=56319?(f=e.substring(0,ja-1),e=e.substring(ja-1)):(f=e.substring(0,ja),e=e.substring(ja));let g=Ka(f);h.push(new pr(this._buffers.length,{line:0,column:0},{line:g.length-1,column:f.length-g[g.length-1]},g.length-1,f.length)),this._buffers.push(new Fh(f,g))}let u=Ka(e);return h.push(new pr(this._buffers.length,{line:0,column:0},{line:u.length-1,column:e.length-u[u.length-1]},u.length-1,e.length)),this._buffers.push(new Fh(e,u)),h}let t=this._buffers[0].buffer.length;const i=Ka(e,!1);let n=this._lastChangeBufferPos;if(this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-1]===t&&t!==0&&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 h=0;h<i.length;h++)i[h]+=t+1;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+="_"+e,t+=1}else{if(t!==0)for(let h=0;h<i.length;h++)i[h]+=t;this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(i.slice(1)),this._buffers[0].buffer+=e}const s=this._buffers[0].buffer.length;let o=this._buffers[0].lineStarts.length-1,a=s-this._buffers[0].lineStarts[o],l={line:o,column:a},c=new pr(0,n,l,this.getLineFeedCnt(0,n,l),s-t);return this._lastChangeBufferPos=l,[c]}getLineRawContent(e,t=0){let i=this.root,n="",s=this._searchCache.get2(e);if(s){i=s.node;let o=this.getAccumulatedValue(i,e-s.nodeStartLineNumber-1),a=this._buffers[i.piece.bufferIndex].buffer,l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);if(s.nodeStartLineNumber+i.piece.lineFeedCnt===e)n=a.substring(l+o,l+i.piece.length);else{let c=this.getAccumulatedValue(i,e-s.nodeStartLineNumber);return a.substring(l+o,l+c-t)}}else{let o=0;const a=e;for(;i!==Me;)if(i.left!==Me&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this.getAccumulatedValue(i,e-i.lf_left-1),h=this._buffers[i.piece.bufferIndex].buffer,u=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return o+=i.size_left,this._searchCache.set({node:i,nodeStartOffset:o,nodeStartLineNumber:a-(e-1-i.lf_left)}),h.substring(u+l,u+c-t)}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let l=this.getAccumulatedValue(i,e-i.lf_left-2),c=this._buffers[i.piece.bufferIndex].buffer,h=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n=c.substring(h+l,h+i.piece.length);break}else e-=i.lf_left+i.piece.lineFeedCnt,o+=i.size_left+i.piece.length,i=i.right}for(i=i.next();i!==Me;){let o=this._buffers[i.piece.bufferIndex].buffer;if(i.piece.lineFeedCnt>0){let a=this.getAccumulatedValue(i,0),l=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);return n+=o.substring(l,l+a-t),n}else{let a=this.offsetInBuffer(i.piece.bufferIndex,i.piece.start);n+=o.substr(a,i.piece.length)}i=i.next()}return n}computeBufferMetadata(){let e=this.root,t=1,i=0;for(;e!==Me;)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){let 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){let o=this.getLineFeedCnt(e.piece.bufferIndex,i.start,n);if(o!==s)return{index:o,remainder:0}}return{index:s,remainder:n.column}}getAccumulatedValue(e,t){if(t<0)return 0;let 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,a=this.offsetInBuffer(i.bufferIndex,o),l=this.getLineFeedCnt(i.bufferIndex,i.start,o),c=l-n,h=a-s,u=i.length+h;e.piece=new pr(i.bufferIndex,i.start,o,l,u),Ua(this,e,h,c)}deleteNodeHead(e,t){const i=e.piece,n=i.lineFeedCnt,s=this.offsetInBuffer(i.bufferIndex,i.start),o=t,a=this.getLineFeedCnt(i.bufferIndex,o,i.end),l=this.offsetInBuffer(i.bufferIndex,o),c=a-n,h=s-l,u=i.length+h;e.piece=new pr(i.bufferIndex,o,i.end,a,u),Ua(this,e,h,c)}shrinkNode(e,t,i){const n=e.piece,s=n.start,o=n.end,a=n.length,l=n.lineFeedCnt,c=t,h=this.getLineFeedCnt(n.bufferIndex,n.start,c),u=this.offsetInBuffer(n.bufferIndex,t)-this.offsetInBuffer(n.bufferIndex,s);e.piece=new pr(n.bufferIndex,n.start,c,h,u),Ua(this,e,u-a,h-l);let d=new pr(n.bufferIndex,i,o,this.getLineFeedCnt(n.bufferIndex,i,o),this.offsetInBuffer(n.bufferIndex,o)-this.offsetInBuffer(n.bufferIndex,i)),f=this.rbInsertRight(e,d);this.validateCRLFWithPrevNode(f)}appendToNode(e,t){this.adjustCarriageReturnFromNext(t,e)&&(t+=` -`);const i=this.shouldCheckCRLF()&&this.startWithLF(t)&&this.endWithCR(e),n=this._buffers[0].buffer.length;this._buffers[0].buffer+=t;const s=Ka(t,!1);for(let f=0;f<s.length;f++)s[f]+=n;if(i){let f=this._buffers[0].lineStarts[this._buffers[0].lineStarts.length-2];this._buffers[0].lineStarts.pop(),this._lastChangeBufferPos={line:this._lastChangeBufferPos.line-1,column:n-f}}this._buffers[0].lineStarts=this._buffers[0].lineStarts.concat(s.slice(1));const o=this._buffers[0].lineStarts.length-1,a=this._buffers[0].buffer.length-this._buffers[0].lineStarts[o],l={line:o,column:a},c=e.piece.length+t.length,h=e.piece.lineFeedCnt,u=this.getLineFeedCnt(0,e.piece.start,l),d=u-h;e.piece=new pr(e.piece.bufferIndex,e.piece.start,l,u,c),this._lastChangeBufferPos=l,Ua(this,e,t.length,d)}nodeAt(e){let t=this.root,i=this._searchCache.get(e);if(i)return{node:i.node,nodeStartOffset:i.nodeStartOffset,remainder:e-i.nodeStartOffset};let n=0;for(;t!==Me;)if(t.size_left>e)t=t.left;else if(t.size_left+t.piece.length>=e){n+=t.size_left;let s={node:t,remainder:e-t.size_left,nodeStartOffset:n};return this._searchCache.set(s),s}else 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!==Me;)if(i.left!==Me&&i.lf_left>=e-1)i=i.left;else if(i.lf_left+i.piece.lineFeedCnt>e-1){let 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}}else if(i.lf_left+i.piece.lineFeedCnt===e-1){let 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}else e-=i.lf_left+i.piece.lineFeedCnt,n+=i.size_left+i.piece.length,i=i.right;for(i=i.next();i!==Me;){if(i.piece.lineFeedCnt>0){let s=this.getAccumulatedValue(i,0),o=this.offsetOfNode(i);return{node:i,remainder:Math.min(t-1,s),nodeStartOffset:o}}else if(i.piece.length>=t-1){let s=this.offsetOfNode(i);return{node:i,remainder:t-1,nodeStartOffset:s}}else t-=i.piece.length;i=i.next()}return null}nodeCharCodeAt(e,t){if(e.piece.lineFeedCnt<1)return-1;let 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&&this._EOL===` -`)}startWithLF(e){if(typeof e=="string")return e.charCodeAt(0)===10;if(e===Me||e.piece.lineFeedCnt===0)return!1;let t=e.piece,i=this._buffers[t.bufferIndex].lineStarts,n=t.start.line,s=i[n]+t.start.column;return n===i.length-1||i[n+1]>s+1?!1:this._buffers[t.bufferIndex].buffer.charCodeAt(s)===10}endWithCR(e){return typeof e=="string"?e.charCodeAt(e.length-1)===13:e===Me||e.piece.lineFeedCnt===0?!1:this.nodeCharCodeAt(e,e.piece.length-1)===13}validateCRLFWithPrevNode(e){if(this.shouldCheckCRLF()&&this.startWithLF(e)){let t=e.prev();this.endWithCR(t)&&this.fixCRLF(t,e)}}validateCRLFWithNextNode(e){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let t=e.next();this.startWithLF(t)&&this.fixCRLF(e,t)}}fixCRLF(e,t){let i=[],n=this._buffers[e.piece.bufferIndex].lineStarts,s;e.piece.end.column===0?s={line:e.piece.end.line-1,column:n[e.piece.end.line]-n[e.piece.end.line-1]-1}:s={line:e.piece.end.line,column:e.piece.end.column-1};const o=e.piece.length-1,a=e.piece.lineFeedCnt-1;e.piece=new pr(e.piece.bufferIndex,e.piece.start,s,a,o),Ua(this,e,-1,-1),e.piece.length===0&&i.push(e);let l={line:t.piece.start.line+1,column:0};const c=t.piece.length-1,h=this.getLineFeedCnt(t.piece.bufferIndex,l,t.piece.end);t.piece=new pr(t.piece.bufferIndex,l,t.piece.end,h,c),Ua(this,t,-1,-1),t.piece.length===0&&i.push(t);let u=this.createNewPieces(`\r -`);this.rbInsertRight(e,u[0]);for(let d=0;d<i.length;d++)OC(this,i[d])}adjustCarriageReturnFromNext(e,t){if(this.shouldCheckCRLF()&&this.endWithCR(e)){let i=t.next();if(this.startWithLF(i)){if(e+=` -`,i.piece.length===1)OC(this,i);else{const n=i.piece,s={line:n.start.line+1,column:0},o=n.length-1,a=this.getLineFeedCnt(n.bufferIndex,s,n.end);i.piece=new pr(n.bufferIndex,s,n.end,a,o),Ua(this,i,-1,-1)}return!0}}return!1}iterate(e,t){if(e===Me)return t(Me);let i=this.iterate(e.left,t);return i&&t(e)&&this.iterate(e.right,t)}getNodeContent(e){if(e===Me)return"";let t=this._buffers[e.piece.bufferIndex],i,n=e.piece,s=this.offsetInBuffer(n.bufferIndex,n.start),o=this.offsetInBuffer(n.bufferIndex,n.end);return i=t.buffer.substring(s,o),i}getPieceContent(e){let t=this._buffers[e.bufferIndex],i=this.offsetInBuffer(e.bufferIndex,e.start),n=this.offsetInBuffer(e.bufferIndex,e.end);return t.buffer.substring(i,n)}rbInsertRight(e,t){let i=new Ak(t,1);if(i.left=Me,i.right=Me,i.parent=Me,i.size_left=0,i.lf_left=0,this.root===Me)this.root=i,i.color=0;else if(e.right===Me)e.right=i,i.parent=e;else{let s=Rk(e.right);s.left=i,i.parent=s}return IO(this,i),i}rbInsertLeft(e,t){let i=new Ak(t,1);if(i.left=Me,i.right=Me,i.parent=Me,i.size_left=0,i.lf_left=0,this.root===Me)this.root=i,i.color=0;else if(e.left===Me)e.left=i,i.parent=e;else{let n=EO(e.left);n.right=i,i.parent=n}return IO(this,i),i}}function ff(r){let e=0,t=0,i=0,n=0;for(let s=0,o=r.length;s<o;s++){const a=r.charCodeAt(s);a===13?(e===0&&(t=s),e++,s+1<o&&r.charCodeAt(s+1)===10?(n|=2,s++):n|=3,i=s+1):a===10&&(n|=1,e===0&&(t=s),e++,i=s+1)}return e===0&&(t=r.length),[e,t,r.length-i,n]}function AO(r){return(r<<0|0<<8|0<<11|1<<14|2<<23)>>>0}const qa=new Uint32Array(0).buffer;class Bk{constructor(){this.tokens=[]}add(e,t){if(this.tokens.length>0){const i=this.tokens[this.tokens.length-1];if(i.startLineNumber+i.tokens.length-1+1===e){i.tokens.push(t);return}}this.tokens.push(new CY(e,[t]))}}class BC{constructor(e){this._tokens=e,this._tokenCount=e.length/4}toString(e){let t=[];for(let i=0;i<this._tokenCount;i++)t.push(`(${this._getDeltaLine(i)+e},${this._getStartCharacter(i)}-${this._getEndCharacter(i)})`);return`[${t.join(",")}]`}getMaxDeltaLine(){const e=this._getTokenCount();return e===0?-1:this._getDeltaLine(e-1)}getRange(){const e=this._getTokenCount();if(e===0)return null;const t=this._getStartCharacter(0),i=this._getDeltaLine(e-1),n=this._getEndCharacter(e-1);return new k(0,t+1,i,n+1)}_getTokenCount(){return this._tokenCount}_getDeltaLine(e){return this._tokens[4*e]}_getStartCharacter(e){return this._tokens[4*e+1]}_getEndCharacter(e){return this._tokens[4*e+2]}isEmpty(){return this._getTokenCount()===0}getLineTokens(e){let t=0,i=this._getTokenCount()-1;for(;t<i;){const n=t+Math.floor((i-t)/2),s=this._getDeltaLine(n);if(s<e)t=n+1;else if(s>e)i=n-1;else{let o=n;for(;o>t&&this._getDeltaLine(o-1)===e;)o--;let a=n;for(;a<i&&this._getDeltaLine(a+1)===e;)a++;return new RO(this._tokens.subarray(4*o,4*a+4))}}return this._getDeltaLine(t)===e?new RO(this._tokens.subarray(4*t,4*t+4)):null}clear(){this._tokenCount=0}removeTokens(e,t,i,n){const s=this._tokens,o=this._tokenCount;let a=0,l=!1,c=0;for(let h=0;h<o;h++){const u=4*h,d=s[u],f=s[u+1],g=s[u+2],p=s[u+3];if((d>e||d===e&&g>=t)&&(d<i||d===i&&f<=n))l=!0;else{if(a===0&&(c=d),l){const _=4*a;s[_]=d-c,s[_+1]=f,s[_+2]=g,s[_+3]=p}a++}}return this._tokenCount=a,c}split(e,t,i,n){const s=this._tokens,o=this._tokenCount;let a=[],l=[],c=a,h=0,u=0;for(let d=0;d<o;d++){const f=4*d,g=s[f],p=s[f+1],_=s[f+2],v=s[f+3];if(g>e||g===e&&_>=t){if(g<i||g===i&&p<=n)continue;c!==l&&(c=l,h=0,u=g)}c[h++]=g-u,c[h++]=p,c[h++]=_,c[h++]=v}return[new BC(new Uint32Array(a)),new BC(new Uint32Array(l)),u]}acceptDeleteRange(e,t,i,n,s){const o=this._tokens,a=this._tokenCount,l=n-t;let c=0,h=!1;for(let u=0;u<a;u++){const d=4*u;let f=o[d],g=o[d+1],p=o[d+2];const _=o[d+3];if(f<t||f===t&&p<=i){c++;continue}else if(f===t&&g<i)f===n&&p>s?p-=s-i:p=i;else if(f===t&&g===i)if(f===n&&p>s)p-=s-i;else{h=!0;continue}else if(f<n||f===n&&g<s)if(f===n&&p>s)f===t?(g=i,p=g+(p-s)):(g=0,p=g+(p-s));else{h=!0;continue}else if(f>n){if(l===0&&!h){c=a;break}f-=l}else if(f===n&&g>=s)e&&f===0&&(g+=e,p+=e),f-=l,g-=s-i,p-=s-i;else throw new Error("Not possible!");const v=4*c;o[v]=f,o[v+1]=g,o[v+2]=p,o[v+3]=_,c++}this._tokenCount=c}acceptInsertText(e,t,i,n,s,o){const a=i===0&&n===1&&(o>=48&&o<=57||o>=65&&o<=90||o>=97&&o<=122),l=this._tokens,c=this._tokenCount;for(let h=0;h<c;h++){const u=4*h;let d=l[u],f=l[u+1],g=l[u+2];if(!(d<e||d===e&&g<t)){if(d===e&&g===t)if(a)g+=1;else continue;else if(d===e&&f<t&&t<g)i===0?g+=n:g=t;else{if(d===e&&f===t&&a)continue;if(d===e)if(d+=i,i===0)f+=n,g+=n;else{const p=g-f;f=s+(f-t),g=f+p}else d+=i}l[u]=d,l[u+1]=f,l[u+2]=g}}}}class RO{constructor(e){this._tokens=e}getCount(){return this._tokens.length/4}getStartCharacter(e){return this._tokens[4*e+1]}getEndCharacter(e){return this._tokens[4*e+2]}getMetadata(e){return this._tokens[4*e+3]}}class WC{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 k(this.startLineNumber+e.startLineNumber,e.startColumn,this.startLineNumber+e.endLineNumber,e.endColumn)}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 WC(this.startLineNumber,n),new WC(this.startLineNumber+o,s)]}applyEdit(e,t){const[i,n,s]=ff(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 $(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 s=i-t;this.startLineNumber-=s;return}const n=this.tokens.getMaxDeltaLine();if(!(t>=n+1)){if(t<0&&i>=n+1){this.startLineNumber=0,this.tokens.clear();return}if(t<0){const s=-t;this.startLineNumber-=s,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(t===0&&i===0)return;const o=e.lineNumber-this.startLineNumber;if(o<0){this.startLineNumber+=t;return}const a=this.tokens.getMaxDeltaLine();o>=a+1||this.tokens.acceptInsertText(o,e.column-1,t,i,n,s)}}class CY{constructor(e,t){this.startLineNumber=e,this.tokens=t}}function Ga(r){return r instanceof Uint32Array?r:new Uint32Array(r)}class Wk{constructor(){this._pieces=[],this._isComplete=!1}flush(){this._pieces=[],this._isComplete=!1}isEmpty(){return this._pieces.length===0}set(e,t){this._pieces=e||[],this._isComplete=t}setPartial(e,t){let i=e;if(t.length>0){const s=t[0].getRange(),o=t[t.length-1].getRange();if(!s||!o)return e;i=e.plusRange(s).plusRange(o)}let n=null;for(let s=0,o=this._pieces.length;s<o;s++){const a=this._pieces[s];if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){n=n||{index:s};break}if(a.removeTokens(i),a.isEmpty()){this._pieces.splice(s,1),s--,o--;continue}if(a.endLineNumber<i.startLineNumber)continue;if(a.startLineNumber>i.endLineNumber){n=n||{index:s};continue}const[l,c]=a.split(i);if(l.isEmpty()){n=n||{index:s};continue}c.isEmpty()||(this._pieces.splice(s,1,l,c),s++,o++,n=n||{index:s})}return n=n||{index:this._pieces.length},t.length>0&&(this._pieces=Ip(this._pieces,n.index,t)),i}isComplete(){return this._isComplete}addSemanticTokens(e,t){const i=this._pieces;if(i.length===0)return t;const n=Wk._findFirstPieceWithLine(i,e),s=i[n].getLineTokens(e);if(!s)return t;const o=t.getCount(),a=s.getCount();let l=0,c=[],h=0,u=0;const d=(f,g)=>{f!==u&&(u=f,c[h++]=f,c[h++]=g)};for(let f=0;f<a;f++){const g=s.getStartCharacter(f),p=s.getEndCharacter(f),_=s.getMetadata(f),v=((_&1?2048:0)|(_&2?4096:0)|(_&4?8192:0)|(_&8?8372224:0)|(_&16?4286578688:0))>>>0,b=~v>>>0;for(;l<o&&t.getEndOffset(l)<=g;)d(t.getEndOffset(l),t.getMetadata(l)),l++;for(l<o&&t.getStartOffset(l)<g&&d(g,t.getMetadata(l));l<o&&t.getEndOffset(l)<p;)d(t.getEndOffset(l),t.getMetadata(l)&b|_&v),l++;if(l<o)d(p,t.getMetadata(l)&b|_&v),t.getEndOffset(l)===p&&l++;else{const C=Math.min(Math.max(0,l-1),o-1);d(p,t.getMetadata(C)&b|_&v)}}for(;l<o;)d(t.getEndOffset(l),t.getMetadata(l)),l++;return new Ki(new Uint32Array(c),t.getLineContent())}static _findFirstPieceWithLine(e,t){let i=0,n=e.length-1;for(;i<n;){let s=i+Math.floor((n-i)/2);if(e[s].endLineNumber<t)i=s+1;else if(e[s].startLineNumber>t)n=s-1;else{for(;s>i&&e[s-1].startLineNumber<=t&&t<=e[s-1].endLineNumber;)s--;return s}}return i}acceptEdit(e,t,i,n,s){for(const o of this._pieces)o.acceptEdit(e,t,i,n,s)}}class as{constructor(){this._lineTokens=[],this._len=0}flush(){this._lineTokens=[],this._len=0}getTokens(e,t,i){let n=null;if(t<this._len&&(n=this._lineTokens[t]),n!==null&&n!==qa)return new Ki(Ga(n),i);let s=new Uint32Array(2);return s[0]=i.length,s[1]=AO(e),new Ki(s,i)}static _massageTokens(e,t,i){const n=i?Ga(i):null;if(t===0){let s=!1;if(n&&n.length>1&&(s=xn.getLanguageId(n[1])!==e),!s)return qa}if(!n||n.length===0){const s=new Uint32Array(2);return s[0]=t,s[1]=AO(e),s.buffer}return n[n.length-2]=t,n.byteOffset===0&&n.byteLength===n.buffer.byteLength?n.buffer:n}_ensureLine(e){for(;e>=this._len;)this._lineTokens[this._len]=null,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._lineTokens.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let i=[];for(let n=0;n<t;n++)i[n]=null;this._lineTokens=Ip(this._lineTokens,e,i),this._len+=t}setTokens(e,t,i,n,s){const o=as._massageTokens(e,i,n);this._ensureLine(t);const a=this._lineTokens[t];return this._lineTokens[t]=o,s?!as._equals(a,o):!1}static _equals(e,t){if(!e||!t)return!e&&!t;const i=Ga(e),n=Ga(t);if(i.length!==n.length)return!1;for(let s=0,o=i.length;s<o;s++)if(i[s]!==n[s])return!1;return!0}acceptEdit(e,t,i){this._acceptDeleteRange(e),this._acceptInsertText(new $(e.startLineNumber,e.startColumn),t,i)}_acceptDeleteRange(e){const t=e.startLineNumber-1;if(t>=this._len)return;if(e.startLineNumber===e.endLineNumber){if(e.startColumn===e.endColumn)return;this._lineTokens[t]=as._delete(this._lineTokens[t],e.startColumn-1,e.endColumn-1);return}this._lineTokens[t]=as._deleteEnding(this._lineTokens[t],e.startColumn-1);const i=e.endLineNumber-1;let n=null;i<this._len&&(n=as._deleteBeginning(this._lineTokens[i],e.endColumn-1)),this._lineTokens[t]=as._append(this._lineTokens[t],n),this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t,i){if(t===0&&i===0)return;const n=e.lineNumber-1;if(!(n>=this._len)){if(t===0){this._lineTokens[n]=as._insert(this._lineTokens[n],e.column-1,i);return}this._lineTokens[n]=as._deleteEnding(this._lineTokens[n],e.column-1),this._lineTokens[n]=as._insert(this._lineTokens[n],e.column-1,i),this._insertLines(e.lineNumber,t)}}static _deleteBeginning(e,t){return e===null||e===qa?e:as._delete(e,0,t)}static _deleteEnding(e,t){if(e===null||e===qa)return e;const i=Ga(e),n=i[i.length-2];return as._delete(e,t,n)}static _delete(e,t,i){if(e===null||e===qa||t===i)return e;const n=Ga(e),s=n.length>>>1;if(t===0&&n[n.length-2]===i)return qa;const o=Ki.findIndexInTokensArray(n,t),a=o>0?n[o-1<<1]:0,l=n[o<<1];if(i<l){const f=i-t;for(let g=o;g<s;g++)n[g<<1]-=f;return e}let c,h;a!==t?(n[o<<1]=t,c=o+1<<1,h=t):(c=o<<1,h=a);const u=i-t;for(let f=o+1;f<s;f++){const g=n[f<<1]-u;g>h&&(n[c++]=g,n[c++]=n[(f<<1)+1],h=g)}if(c===n.length)return e;let d=new Uint32Array(c);return d.set(n.subarray(0,c),0),d.buffer}static _append(e,t){if(t===qa)return e;if(e===qa)return t;if(e===null)return e;if(t===null)return null;const i=Ga(e),n=Ga(t),s=n.length>>>1;let o=new Uint32Array(i.length+n.length);o.set(i,0);let a=i.length;const l=i[i.length-2];for(let c=0;c<s;c++)o[a++]=n[c<<1]+l,o[a++]=n[(c<<1)+1];return o.buffer}static _insert(e,t,i){if(e===null||e===qa)return e;const n=Ga(e),s=n.length>>>1;let o=Ki.findIndexInTokensArray(n,t);o>0&&n[o-1<<1]===t&&o--;for(let a=o;a<s;a++)n[a<<1]+=i;return e}}class gf extends Y{constructor(e,t,i,n,s,o,a){super();this._onDidChangeContent=this._register(new H),this._BOM=t,this._mightContainNonBasicASCII=!o,this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._pieceTree=new vY(e,i,a)}mightContainRTL(){return this._mightContainRTL}mightContainUnusualLineTerminators(){return this._mightContainUnusualLineTerminators}resetMightContainUnusualLineTerminators(){this._mightContainUnusualLineTerminators=!1}mightContainNonBasicASCII(){return this._mightContainNonBasicASCII}getBOM(){return this._BOM}getEOL(){return this._pieceTree.getEOL()}createSnapshot(e){return this._pieceTree.createSnapshot(e?this._BOM:"")}getOffsetAt(e,t){return this._pieceTree.getOffsetAt(e,t)}getPositionAt(e){return this._pieceTree.getPositionAt(e)}getRangeAt(e,t){let i=e+t;const n=this.getPositionAt(e),s=this.getPositionAt(i);return new k(n.lineNumber,n.column,s.lineNumber,s.column)}getValueInRange(e,t=0){if(e.isEmpty())return"";const i=this._getEndOfLine(t);return this._pieceTree.getValueInRange(e,i)}getValueLengthInRange(e,t=0){if(e.isEmpty())return 0;if(e.startLineNumber===e.endLineNumber)return e.endColumn-e.startColumn;let i=this.getOffsetAt(e.startLineNumber,e.startColumn);return this.getOffsetAt(e.endLineNumber,e.endColumn)-i}getCharacterCountInRange(e,t=0){if(this._mightContainNonBasicASCII){let i=0;const n=e.startLineNumber,s=e.endLineNumber;for(let o=n;o<=s;o++){const a=this.getLineContent(o),l=o===n?e.startColumn-1:0,c=o===s?e.endColumn-1:a.length;for(let h=l;h<c;h++)ji(a.charCodeAt(h))?(i=i+1,h=h+1):i=i+1}return i+=this._getEndOfLine(t).length*(s-n),i}return this.getValueLengthInRange(e,t)}getLength(){return this._pieceTree.getLength()}getLineCount(){return this._pieceTree.getLineCount()}getLinesContent(){return this._pieceTree.getLinesContent()}getLineContent(e){return this._pieceTree.getLineContent(e)}getLineCharCode(e,t){return this._pieceTree.getLineCharCode(e,t)}getLineLength(e){return this._pieceTree.getLineLength(e)}getLineFirstNonWhitespaceColumn(e){const t=dr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Wo(this.getLineContent(e));return t===-1?0:t+2}_getEndOfLine(e){switch(e){case 1:return` -`;case 2:return`\r -`;case 0:return this.getEOL();default:throw new Error("Unknown EOL preference")}}setEOL(e){this._pieceTree.setEOL(e)}applyEdits(e,t,i){let n=this._mightContainRTL,s=this._mightContainUnusualLineTerminators,o=this._mightContainNonBasicASCII,a=!0,l=[];for(let p=0;p<e.length;p++){let _=e[p];a&&_._isTracked&&(a=!1);let v=_.range;if(_.text){let S=!0;o||(S=!YL(_.text),o=S),!n&&S&&(n=dv(_.text)),!s&&S&&(s=c2(_.text))}let b="",C=0,y=0,x=0;if(_.text){let S;[C,y,x,S]=ff(_.text);const w=this.getEOL();S===0||S===(w===`\r -`?2:1)?b=_.text:b=_.text.replace(/\r\n|\r|\n/g,w)}l[p]={sortIndex:p,identifier:_.identifier||null,range:v,rangeOffset:this.getOffsetAt(v.startLineNumber,v.startColumn),rangeLength:this.getValueLengthInRange(v),text:b,eolCount:C,firstLineLength:y,lastLineLength:x,forceMoveMarkers:Boolean(_.forceMoveMarkers),isAutoWhitespaceEdit:_.isAutoWhitespaceEdit||!1}}l.sort(gf._sortOpsAscending);let c=!1;for(let p=0,_=l.length-1;p<_;p++){let v=l[p].range.getEndPosition(),b=l[p+1].range.getStartPosition();if(b.isBeforeOrEqual(v)){if(b.isBefore(v))throw new Error("Overlapping ranges are not allowed!");c=!0}}a&&(l=this._reduceOperations(l));let h=i||t?gf._getInverseEditRanges(l):[],u=[];if(t)for(let p=0;p<l.length;p++){let _=l[p],v=h[p];if(_.isAutoWhitespaceEdit&&_.range.isEmpty())for(let b=v.startLineNumber;b<=v.endLineNumber;b++){let C="";b===v.startLineNumber&&(C=this.getLineContent(_.range.startLineNumber),dr(C)!==-1)||u.push({lineNumber:b,oldContent:C})}}let d=null;if(i){let p=0;d=[];for(let _=0;_<l.length;_++){const v=l[_],b=h[_],C=this.getValueInRange(v.range),y=v.rangeOffset+p;p+=v.text.length-C.length,d[_]={sortIndex:v.sortIndex,identifier:v.identifier,range:b,text:C,textChange:new tn(v.rangeOffset,C,y,v.text)}}c||d.sort((_,v)=>_.sortIndex-v.sortIndex)}this._mightContainRTL=n,this._mightContainUnusualLineTerminators=s,this._mightContainNonBasicASCII=o;const f=this._doApplyEdits(l);let g=null;if(t&&u.length>0){u.sort((p,_)=>_.lineNumber-p.lineNumber),g=[];for(let p=0,_=u.length;p<_;p++){let v=u[p].lineNumber;if(p>0&&u[p-1].lineNumber===v)continue;let b=u[p].oldContent,C=this.getLineContent(v);C.length===0||C===b||dr(C)!==-1||g.push(v)}}return this._onDidChangeContent.fire(),new IK(d,f,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 k(i.startLineNumber,i.startColumn,n.endLineNumber,n.endColumn);let o=i.startLineNumber,a=i.startColumn;const l=[];for(let f=0,g=e.length;f<g;f++){const p=e[f],_=p.range;t=t||p.forceMoveMarkers,l.push(this.getValueInRange(new k(o,a,_.startLineNumber,_.startColumn))),p.text.length>0&&l.push(p.text),o=_.endLineNumber,a=_.endColumn}const c=l.join(""),[h,u,d]=ff(c);return{sortIndex:0,identifier:e[0].identifier,range:s,rangeOffset:this.getOffsetAt(s.startLineNumber,s.startColumn),rangeLength:this.getValueLengthInRange(s,0),text:c,eolCount:h,firstLineLength:u,lastLineLength:d,forceMoveMarkers:t,isAutoWhitespaceEdit:!1}}_doApplyEdits(e){e.sort(gf._sortOpsDescending);let t=[];for(let i=0;i<e.length;i++){let n=e[i];const s=n.range.startLineNumber,o=n.range.startColumn,a=n.range.endLineNumber,l=n.range.endColumn;if(s===a&&o===l&&n.text.length===0)continue;n.text?(this._pieceTree.delete(n.rangeOffset,n.rangeLength),this._pieceTree.insert(n.rangeOffset,n.text,!0)):this._pieceTree.delete(n.rangeOffset,n.rangeLength);const c=new k(s,o,a,l);t.push({range:c,rangeLength:n.rangeLength,text:n.text,rangeOffset:n.rangeOffset,forceMoveMarkers:n.forceMoveMarkers})}return t}findMatchesLineByLine(e,t,i,n){return this._pieceTree.findMatchesLineByLine(e,t,i,n)}static _getInverseEditRanges(e){let t=[],i=0,n=0,s=null;for(let o=0,a=e.length;o<a;o++){let l=e[o],c,h;s?s.range.endLineNumber===l.range.startLineNumber?(c=i,h=n+(l.range.startColumn-s.range.endColumn)):(c=i+(l.range.startLineNumber-s.range.endLineNumber),h=l.range.startColumn):(c=l.range.startLineNumber,h=l.range.startColumn);let u;if(l.text.length>0){const d=l.eolCount+1;d===1?u=new k(c,h,c,h+l.firstLineLength):u=new k(c,h,c+d-1,l.lastLineLength+1)}else u=new k(c,h,c,h);i=u.endLineNumber,n=u.endColumn,t.push(u),s=l}return t}static _sortOpsAscending(e,t){let i=k.compareRangesUsingEnds(e.range,t.range);return i===0?e.sortIndex-t.sortIndex:i}static _sortOpsDescending(e,t){let i=k.compareRangesUsingEnds(e.range,t.range);return i===0?t.sortIndex-e.sortIndex:-i}}class wY{constructor(e,t,i,n,s,o,a,l,c){this._chunks=e,this._bom=t,this._cr=i,this._lf=n,this._crlf=s,this._containsRTL=o,this._containsUnusualLineTerminators=a,this._isBasicASCII=l,this._normalizeEOL=c}_getEOL(e){const t=this._cr+this._lf+this._crlf,i=this._cr+this._crlf;return t===0?e===1?` -`:`\r -`:i>t/2?`\r -`:` -`}create(e){const t=this._getEOL(e);let i=this._chunks;if(this._normalizeEOL&&(t===`\r -`&&(this._cr>0||this._lf>0)||t===` -`&&(this._cr>0||this._crlf>0)))for(let s=0,o=i.length;s<o;s++){let a=i[s].buffer.replace(/\r\n|\r|\n/g,t),l=Ka(a);i[s]=new Fh(a,l)}const n=new gf(i,this._bom,t,this._containsRTL,this._containsUnusualLineTerminators,this._isBasicASCII,this._normalizeEOL);return{textBuffer:n,disposable:n}}}class yY{constructor(){this.chunks=[],this.BOM="",this._hasPreviousChar=!1,this._previousChar=0,this._tmpLineStarts=[],this.cr=0,this.lf=0,this.crlf=0,this.containsRTL=!1,this.containsUnusualLineTerminators=!1,this.isBasicASCII=!0}acceptChunk(e){if(e.length===0)return;this.chunks.length===0&&XL(e)&&(this.BOM=Zj,e=e.substr(1));const t=e.charCodeAt(e.length-1);t===13||t>=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&&e.length===0||(this._hasPreviousChar?this._acceptChunk2(String.fromCharCode(this._previousChar)+e):this._acceptChunk2(e))}_acceptChunk2(e){const t=mY(this._tmpLineStarts,e);this.chunks.push(new Fh(e,t.lineStarts)),this.cr+=t.cr,this.lf+=t.lf,this.crlf+=t.crlf,this.isBasicASCII&&(this.isBasicASCII=t.isBasicASCII),!this.isBasicASCII&&!this.containsRTL&&(this.containsRTL=dv(e)),!this.isBasicASCII&&!this.containsUnusualLineTerminators&&(this.containsUnusualLineTerminators=c2(e))}finish(e=!0){return this._finish(),new wY(this.chunks,this.BOM,this.cr,this.lf,this.crlf,this.containsRTL,this.containsUnusualLineTerminators,this.isBasicASCII,e)}_finish(){if(this.chunks.length===0&&this._acceptChunk1("",!0),this._hasPreviousChar){this._hasPreviousChar=!1;let e=this.chunks[this.chunks.length-1];e.buffer+=String.fromCharCode(this._previousChar);let t=Ka(e.buffer);e.lineStarts=t,this._previousChar===13&&this.cr++}}}class SY{constructor(){this.changeType=1}}class ao{constructor(e,t,i,n,s){this.ownerId=e,this.lineNumber=t,this.column=i,this.options=n,this.order=s}static applyInjectedText(e,t){if(!t||t.length===0)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 ao(i.ownerId,i.range.startLineNumber,i.range.startColumn,i.options.before,0)),i.options.after&&i.options.after.content.length>0&&t.push(new ao(i.ownerId,i.range.endLineNumber,i.range.endColumn,i.options.after,1));return t.sort((i,n)=>i.lineNumber===n.lineNumber?i.column===n.column?i.order-n.order:i.column-n.column:i.lineNumber-n.lineNumber),t}}class MO{constructor(e,t,i){this.changeType=2,this.lineNumber=e,this.detail=t,this.injectedText=i}}class LY{constructor(e,t){this.changeType=3,this.fromLineNumber=e,this.toLineNumber=t}}class xY{constructor(e,t,i,n){this.changeType=4,this.injectedTexts=n,this.fromLineNumber=e,this.toLineNumber=t,this.detail=i}}class kY{constructor(){this.changeType=5}}class Bh{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<i;t++)if(this.changes[t].changeType===e)return!0;return!1}static merge(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.versionId,s=e.isUndoing||t.isUndoing,o=e.isRedoing||t.isRedoing;return new Bh(i,n,s,o)}}class PO{constructor(e){this.changes=e}}class VC{constructor(e,t){this.rawContentChangedEvent=e,this.contentChangedEvent=t}merge(e){const t=Bh.merge(this.rawContentChangedEvent,e.rawContentChangedEvent),i=VC._mergeChangeEvents(this.contentChangedEvent,e.contentChangedEvent);return new VC(t,i)}static _mergeChangeEvents(e,t){const i=[].concat(e.changes).concat(t.changes),n=t.eol,s=t.versionId,o=e.isUndoing||t.isUndoing,a=e.isRedoing||t.isRedoing,l=e.isFlush||t.isFlush;return{changes:i,eol:n,versionId:s,isUndoing:o,isRedoing:a,isFlush:l}}}class DY{constructor(){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0}_reset(e){this._beginState=[],this._valid=[],this._len=0,this._invalidLineStartIndex=0,e&&this._setBeginState(0,e)}flush(e){this._reset(e)}get invalidLineStartIndex(){return this._invalidLineStartIndex}_invalidateLine(e){e<this._len&&(this._valid[e]=!1),e<this._invalidLineStartIndex&&(this._invalidLineStartIndex=e)}_isValid(e){return e<this._len?this._valid[e]:!1}getBeginState(e){return e<this._len?this._beginState[e]:null}_ensureLine(e){for(;e>=this._len;)this._beginState[this._len]=null,this._valid[this._len]=!1,this._len++}_deleteLines(e,t){t!==0&&(e+t>this._len&&(t=this._len-e),this._beginState.splice(e,t),this._valid.splice(e,t),this._len-=t)}_insertLines(e,t){if(t===0)return;let i=[],n=[];for(let s=0;s<t;s++)i[s]=null,n[s]=!1;this._beginState=Ip(this._beginState,e,i),this._valid=Ip(this._valid,e,n),this._len+=t}_setValid(e,t){this._ensureLine(e),this._valid[e]=t}_setBeginState(e,t){this._ensureLine(e),this._beginState[e]=t}setEndState(e,t,i){if(this._setValid(t,!0),this._invalidLineStartIndex=t+1,t===e-1)return;const n=this.getBeginState(t+1);if(n===null||!i.equals(n)){this._setBeginState(t+1,i),this._invalidateLine(t+1);return}let s=t+1;for(;s<e&&this._isValid(s);)s++;this._invalidLineStartIndex=s}setFakeTokens(e){this._setValid(e,!1)}applyEdits(e,t){const i=e.endLineNumber-e.startLineNumber,s=Math.min(i,t);for(let o=s;o>=0;o--)this._invalidateLine(e.startLineNumber+o-1);this._acceptDeleteRange(e),this._acceptInsertText(new $(e.startLineNumber,e.startColumn),t)}_acceptDeleteRange(e){e.startLineNumber-1>=this._len||this._deleteLines(e.startLineNumber,e.endLineNumber-e.startLineNumber)}_acceptInsertText(e,t){e.lineNumber-1>=this._len||this._insertLines(e.lineNumber,t)}}class EY extends Y{constructor(e){super();this._isDisposed=!1,this._textModel=e,this._tokenizationStateStore=new DY,this._tokenizationSupport=null,this._register(ti.onDidChange(t=>{const i=this._textModel.getLanguageIdentifier();t.changedLanguages.indexOf(i.language)!==-1&&(this._resetTokenizationState(),this._textModel.clearTokens())})),this._register(this._textModel.onDidChangeContentFast(t=>{if(t.isFlush){this._resetTokenizationState();return}for(let i=0,n=t.changes.length;i<n;i++){const s=t.changes[i],[o]=ff(s.text);this._tokenizationStateStore.applyEdits(s.range,o)}this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeAttached(()=>{this._beginBackgroundTokenization()})),this._register(this._textModel.onDidChangeLanguage(()=>{this._resetTokenizationState(),this._textModel.clearTokens()})),this._resetTokenizationState()}dispose(){this._isDisposed=!0,super.dispose()}_resetTokenizationState(){const[e,t]=IY(this._textModel);this._tokenizationSupport=e,this._tokenizationStateStore.flush(t),this._beginBackgroundTokenization()}_beginBackgroundTokenization(){this._textModel.isAttachedToEditor()&&this._hasLinesToTokenize()&&xS(()=>{this._isDisposed||this._revalidateTokensNow()})}_revalidateTokensNow(){const e=this._textModel.getLineCount(),t=1,i=new Bk,n=Mo.create(!1);let s=-1;for(;this._hasLinesToTokenize()&&!(n.elapsed()>t||(s=this._tokenizeOneInvalidLine(i),s>=e)););this._beginBackgroundTokenization(),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}tokenizeViewport(e,t){const i=new Bk;this._tokenizeViewport(i,e,t),this._textModel.setTokens(i.tokens,!this._hasLinesToTokenize())}reset(){this._resetTokenizationState(),this._textModel.clearTokens()}forceTokenization(e){const t=new Bk;this._updateTokensUntilLine(t,e),this._textModel.setTokens(t.tokens,!this._hasLinesToTokenize())}isCheapToTokenize(e){if(!this._tokenizationSupport)return!0;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return e>t?!1:e<t||this._textModel.getLineLength(e)<2048}_hasLinesToTokenize(){return this._tokenizationSupport?this._tokenizationStateStore.invalidLineStartIndex<this._textModel.getLineCount():!1}_tokenizeOneInvalidLine(e){if(!this._hasLinesToTokenize())return this._textModel.getLineCount()+1;const t=this._tokenizationStateStore.invalidLineStartIndex+1;return this._updateTokensUntilLine(e,t),t}_updateTokensUntilLine(e,t){if(!this._tokenizationSupport)return;const i=this._textModel.getLanguageIdentifier(),n=this._textModel.getLineCount(),s=t-1;for(let o=this._tokenizationStateStore.invalidLineStartIndex;o<=s;o++){const a=this._textModel.getLineContent(o+1),l=this._tokenizationStateStore.getBeginState(o),c=Vk(i,this._tokenizationSupport,a,!0,l);e.add(o+1,c.tokens),this._tokenizationStateStore.setEndState(n,o,c.endState),o=this._tokenizationStateStore.invalidLineStartIndex-1}}_tokenizeViewport(e,t,i){if(!this._tokenizationSupport||i<=this._tokenizationStateStore.invalidLineStartIndex)return;if(t<=this._tokenizationStateStore.invalidLineStartIndex){this._updateTokensUntilLine(e,i);return}let n=this._textModel.getLineFirstNonWhitespaceColumn(t),s=[],o=null;for(let c=t-1;n>0&&c>=1;c--){let h=this._textModel.getLineFirstNonWhitespaceColumn(c);if(h!==0&&h<n){if(o=this._tokenizationStateStore.getBeginState(c-1),o)break;s.push(this._textModel.getLineContent(c)),n=h}}o||(o=this._tokenizationSupport.getInitialState());const a=this._textModel.getLanguageIdentifier();let l=o;for(let c=s.length-1;c>=0;c--)l=Vk(a,this._tokenizationSupport,s[c],!1,l).endState;for(let c=t;c<=i;c++){let h=this._textModel.getLineContent(c),u=Vk(a,this._tokenizationSupport,h,!0,l);e.add(c,u.tokens),this._tokenizationStateStore.setFakeTokens(c-1),l=u.endState}}}function IY(r){const e=r.getLanguageIdentifier();let t=r.isTooLargeForTokenization()?null:ti.get(e.language),i=null;if(t)try{i=t.getInitialState()}catch(n){Oe(n),t=null}return[t,i]}function Vk(r,e,t,i,n){let s=null;if(e)try{s=e.tokenize2(t,i,n.clone(),0)}catch(o){Oe(o)}return s||(s=Sx(r.id,t,n,0)),Ki.convertToEndOffset(s.tokens,t.length),s}function nc(r,e){const t=Math.pow(10,e);return Math.round(r*t)/t}class tt{constructor(e,t,i,n=1){this._rgbaBrand=void 0,this.r=Math.min(255,Math.max(0,e))|0,this.g=Math.min(255,Math.max(0,t))|0,this.b=Math.min(255,Math.max(0,i))|0,this.a=nc(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 lo{constructor(e,t,i,n){this._hslaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=nc(Math.max(Math.min(1,t),0),3),this.l=nc(Math.max(Math.min(1,i),0),3),this.a=nc(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),a=Math.min(t,i,n);let l=0,c=0;const h=(a+o)/2,u=o-a;if(u>0){switch(c=Math.min(h<=.5?u/(2*h):u/(2-2*h),1),o){case t:l=(i-n)/u+(i<n?6:0);break;case i:l=(n-t)/u+2;break;case n:l=(t-i)/u+4;break}l*=60,l=Math.round(l)}return new lo(l,c,h,s)}static _hue2rgb(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?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,a,l;if(i===0)o=a=l=n;else{const c=n<.5?n*(1+i):n+i-n*i,h=2*n-c;o=lo._hue2rgb(h,c,t+1/3),a=lo._hue2rgb(h,c,t),l=lo._hue2rgb(h,c,t-1/3)}return new tt(Math.round(o*255),Math.round(a*255),Math.round(l*255),s)}}class Qo{constructor(e,t,i,n){this._hsvaBrand=void 0,this.h=Math.max(Math.min(360,e),0)|0,this.s=nc(Math.max(Math.min(1,t),0),3),this.v=nc(Math.max(Math.min(1,i),0),3),this.a=nc(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=Math.min(t,i,n),a=s-o,l=s===0?0:a/s;let c;return a===0?c=0:s===t?c=((i-n)/a%6+6)%6:s===i?c=(n-t)/a+2:c=(t-i)/a+4,new Qo(Math.round(c*60),l,s,e.a)}static toRGBA(e){const{h:t,s:i,v:n,a:s}=e,o=n*i,a=o*(1-Math.abs(t/60%2-1)),l=n-o;let[c,h,u]=[0,0,0];return t<60?(c=o,h=a):t<120?(c=a,h=o):t<180?(h=o,u=a):t<240?(h=a,u=o):t<300?(c=a,u=o):t<=360&&(c=o,u=a),c=Math.round((c+l)*255),h=Math.round((h+l)*255),u=Math.round((u+l)*255),new tt(c,h,u,s)}}class K{constructor(e){if(e)if(e instanceof tt)this.rgba=e;else if(e instanceof lo)this._hsla=e,this.rgba=lo.toRGBA(e);else if(e instanceof Qo)this._hsva=e,this.rgba=Qo.toRGBA(e);else throw new Error("Invalid color ctor argument");else throw new Error("Color needs a value")}static fromHex(e){return K.Format.CSS.parseHex(e)||K.red}get hsla(){return this._hsla?this._hsla:lo.fromRGBA(this.rgba)}get hsva(){return this._hsva?this._hsva:Qo.fromRGBA(this.rgba)}equals(e){return!!e&&tt.equals(this.rgba,e.rgba)&&lo.equals(this.hsla,e.hsla)&&Qo.equals(this.hsva,e.hsva)}getRelativeLuminance(){const e=K._relativeLuminanceForComponent(this.rgba.r),t=K._relativeLuminanceForComponent(this.rgba.g),i=K._relativeLuminanceForComponent(this.rgba.b),n=.2126*e+.7152*t+.0722*i;return nc(n,4)}static _relativeLuminanceForComponent(e){const t=e/255;return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}isLighter(){return(this.rgba.r*299+this.rgba.g*587+this.rgba.b*114)/1e3>=128}isLighterThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t>i}isDarkerThan(e){const t=this.getRelativeLuminance(),i=e.getRelativeLuminance();return t<i}lighten(e){return new K(new lo(this.hsla.h,this.hsla.s,this.hsla.l+this.hsla.l*e,this.hsla.a))}darken(e){return new K(new lo(this.hsla.h,this.hsla.s,this.hsla.l-this.hsla.l*e,this.hsla.a))}transparent(e){const{r:t,g:i,b:n,a:s}=this.rgba;return new K(new tt(t,i,n,s*e))}isTransparent(){return this.rgba.a===0}isOpaque(){return this.rgba.a===1}opposite(){return new K(new tt(255-this.rgba.r,255-this.rgba.g,255-this.rgba.b,this.rgba.a))}toString(){return this._toString||(this._toString=K.Format.CSS.format(this)),this._toString}static getLighterColor(e,t,i){if(e.isLighterThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(s-n)/s,e.lighten(i)}static getDarkerColor(e,t,i){if(e.isDarkerThan(t))return e;i=i||.5;const n=e.getRelativeLuminance(),s=t.getRelativeLuminance();return i=i*(n-s)/n,e.darken(i)}}K.white=new K(new tt(255,255,255,1));K.black=new K(new tt(0,0,0,1));K.red=new K(new tt(255,0,0,1));K.blue=new K(new tt(0,0,255,1));K.cyan=new K(new tt(0,255,255,1));K.lightgrey=new K(new tt(211,211,211,1));K.transparent=new K(new tt(0,0,0,0));(function(r){(function(e){(function(t){function i(f){return f.rgba.a===1?`rgb(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b})`:r.Format.CSS.formatRGBA(f)}t.formatRGB=i;function n(f){return`rgba(${f.rgba.r}, ${f.rgba.g}, ${f.rgba.b}, ${+f.rgba.a.toFixed(2)})`}t.formatRGBA=n;function s(f){return f.hsla.a===1?`hsl(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%)`:r.Format.CSS.formatHSLA(f)}t.formatHSL=s;function o(f){return`hsla(${f.hsla.h}, ${(f.hsla.s*100).toFixed(2)}%, ${(f.hsla.l*100).toFixed(2)}%, ${f.hsla.a.toFixed(2)})`}t.formatHSLA=o;function a(f){const g=f.toString(16);return g.length!==2?"0"+g:g}function l(f){return`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}`}t.formatHex=l;function c(f,g=!1){return g&&f.rgba.a===1?r.Format.CSS.formatHex(f):`#${a(f.rgba.r)}${a(f.rgba.g)}${a(f.rgba.b)}${a(Math.round(f.rgba.a*255))}`}t.formatHexA=c;function h(f){return f.isOpaque()?r.Format.CSS.formatHex(f):r.Format.CSS.formatRGBA(f)}t.format=h;function u(f){const g=f.length;if(g===0||f.charCodeAt(0)!==35)return null;if(g===7){const p=16*d(f.charCodeAt(1))+d(f.charCodeAt(2)),_=16*d(f.charCodeAt(3))+d(f.charCodeAt(4)),v=16*d(f.charCodeAt(5))+d(f.charCodeAt(6));return new r(new tt(p,_,v,1))}if(g===9){const p=16*d(f.charCodeAt(1))+d(f.charCodeAt(2)),_=16*d(f.charCodeAt(3))+d(f.charCodeAt(4)),v=16*d(f.charCodeAt(5))+d(f.charCodeAt(6)),b=16*d(f.charCodeAt(7))+d(f.charCodeAt(8));return new r(new tt(p,_,v,b/255))}if(g===4){const p=d(f.charCodeAt(1)),_=d(f.charCodeAt(2)),v=d(f.charCodeAt(3));return new r(new tt(16*p+p,16*_+_,16*v+v))}if(g===5){const p=d(f.charCodeAt(1)),_=d(f.charCodeAt(2)),v=d(f.charCodeAt(3)),b=d(f.charCodeAt(4));return new r(new tt(16*p+p,16*_+_,16*v+v,(16*b+b)/255))}return null}t.parseHex=u;function d(f){switch(f){case 48:return 0;case 49:return 1;case 50:return 2;case 51:return 3;case 52:return 4;case 53:return 5;case 54:return 6;case 55:return 7;case 56:return 8;case 57:return 9;case 97:return 10;case 65:return 10;case 98:return 11;case 66:return 11;case 99:return 12;case 67:return 12;case 100:return 13;case 68:return 13;case 101:return 14;case 69:return 14;case 102:return 15;case 70:return 15}return 0}})(e.CSS||(e.CSS={}))})(r.Format||(r.Format={}))})(K||(K={}));const HC=new Array;class Si{constructor(e,t){this.items=e,this.additionalItems=t}static create(e,t){if(e<=128&&t.length===0){let i=Si.cache[e];return i||(i=new Si(e,t),Si.cache[e]=i),i}return new Si(e,t)}static getEmpty(){return this.empty}add(e,t){const i=t.getKey(e);let n=i>>5;if(n===0){const o=1<<i|this.items;return o===this.items?this:Si.create(o,this.additionalItems)}n--;const s=this.additionalItems.slice(0);for(;s.length<n;)s.push(0);return s[n]|=1<<(i&31),Si.create(this.items,s)}merge(e){const t=this.items|e.items;if(this.additionalItems===HC&&e.additionalItems===HC)return t===this.items?this:t===e.items?e:Si.create(t,HC);const i=new Array;for(let n=0;n<Math.max(this.additionalItems.length,e.additionalItems.length);n++){const s=this.additionalItems[n]||0,o=e.additionalItems[n]||0;i.push(s|o)}return Si.create(t,i)}intersects(e){if((this.items&e.items)!=0)return!0;for(let t=0;t<Math.min(this.additionalItems.length,e.additionalItems.length);t++)if((this.additionalItems[t]&e.additionalItems[t])!=0)return!0;return!1}}Si.cache=new Array(129);Si.empty=Si.create(0,HC);const OO={getKey(r){return r}};class NY{constructor(){this.items=new Map}getKey(e){let t=this.items.get(e);return t===void 0&&(t=this.items.size,this.items.set(e,t)),t}}const FO={ColorContribution:"base.contributions.colors"};class TY{constructor(){this._onDidChangeSchema=new H,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){let o={id:e,description:i,defaults:t,needsTransparency:n,deprecationMessage:s};this.colorsById[e]=o;let a={type:"string",description:i,format:"color-hex",defaultSnippets:[{body:"${1:#ff0000}"}]};return s&&(a.deprecationMessage=s),this.colorSchema.properties[e]=a,this.colorReferenceSchema.enum.push(e),this.colorReferenceSchema.enumDescriptions.push(i),this._onDidChangeSchema.fire(),e}resolveDefaultColor(e,t){const i=this.colorsById[e];if(i&&i.defaults){const n=i.defaults[t.type];return Xa(n,t)}}getColorSchema(){return this.colorSchema}toString(){let e=(t,i)=>{let n=t.indexOf(".")===-1?0:1,s=i.indexOf(".")===-1?0:1;return n!==s?n-s:t.localeCompare(i)};return Object.keys(this.colorsById).sort(e).map(t=>`- \`${t}\`: ${this.colorsById[t].description}`).join(` -`)}}const zC=new TY;mi.add(FO.ColorContribution,zC);function V(r,e,t,i,n){return zC.registerColor(r,e,t,i,n)}const Ne=V("foreground",{dark:"#CCCCCC",light:"#616161",hc:"#FFFFFF"},m("foreground","Overall foreground color. This color is only used if not overridden by a component.")),AY=V("errorForeground",{dark:"#F48771",light:"#A1260D",hc:"#F48771"},m("errorForeground","Overall foreground color for error messages. This color is only used if not overridden by a component.")),Hk=V("icon.foreground",{dark:"#C5C5C5",light:"#424242",hc:"#FFFFFF"},m("iconForeground","The default color for icons in the workbench.")),rc=V("focusBorder",{dark:"#007FD4",light:"#0090F1",hc:"#F38518"},m("focusBorder","Overall border color for focused elements. This color is only used if not overridden by a component.")),_i=V("contrastBorder",{light:null,dark:null,hc:"#6FC3DF"},m("contrastBorder","An extra border around elements to separate them from others for greater contrast.")),En=V("contrastActiveBorder",{light:null,dark:null,hc:rc},m("activeContrastBorder","An extra border around active elements to separate them from others for greater contrast.")),Gp=V("textLink.foreground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkForeground","Foreground color for links in text.")),Zp=V("textLink.activeForeground",{light:"#006AB1",dark:"#3794FF",hc:"#3794FF"},m("textLinkActiveForeground","Foreground color for links in text when clicked on and on mouse hover.")),zk=V("textCodeBlock.background",{light:"#dcdcdc66",dark:"#0a0a0a66",hc:K.black},m("textCodeBlockBackground","Background color for code blocks in text.")),sc=V("widget.shadow",{dark:Ht(K.black,.36),light:Ht(K.black,.16),hc:null},m("widgetShadow","Shadow color of widgets such as find/replace inside the editor.")),$k=V("input.background",{dark:"#3C3C3C",light:K.white,hc:K.black},m("inputBoxBackground","Input box background.")),Uk=V("input.foreground",{dark:Ne,light:Ne,hc:Ne},m("inputBoxForeground","Input box foreground.")),jk=V("input.border",{dark:null,light:null,hc:_i},m("inputBoxBorder","Input box border.")),Kk=V("inputOption.activeBorder",{dark:"#007ACC00",light:"#007ACC00",hc:_i},m("inputBoxActiveOptionBorder","Border color of activated options in input fields.")),qk=V("inputOption.activeBackground",{dark:Ht(rc,.4),light:Ht(rc,.2),hc:K.transparent},m("inputOption.activeBackground","Background color of activated options in input fields.")),Gk=V("inputOption.activeForeground",{dark:K.white,light:K.black,hc:null},m("inputOption.activeForeground","Foreground color of activated options in input fields.")),Zk=V("inputValidation.infoBackground",{dark:"#063B49",light:"#D6ECF2",hc:K.black},m("inputValidationInfoBackground","Input validation background color for information severity.")),Yk=V("inputValidation.infoForeground",{dark:null,light:null,hc:null},m("inputValidationInfoForeground","Input validation foreground color for information severity.")),Xk=V("inputValidation.infoBorder",{dark:"#007acc",light:"#007acc",hc:_i},m("inputValidationInfoBorder","Input validation border color for information severity.")),BO=V("inputValidation.warningBackground",{dark:"#352A05",light:"#F6F5D2",hc:K.black},m("inputValidationWarningBackground","Input validation background color for warning severity.")),WO=V("inputValidation.warningForeground",{dark:null,light:null,hc:null},m("inputValidationWarningForeground","Input validation foreground color for warning severity.")),VO=V("inputValidation.warningBorder",{dark:"#B89500",light:"#B89500",hc:_i},m("inputValidationWarningBorder","Input validation border color for warning severity.")),HO=V("inputValidation.errorBackground",{dark:"#5A1D1D",light:"#F2DEDE",hc:K.black},m("inputValidationErrorBackground","Input validation background color for error severity.")),zO=V("inputValidation.errorForeground",{dark:null,light:null,hc:null},m("inputValidationErrorForeground","Input validation foreground color for error severity.")),$O=V("inputValidation.errorBorder",{dark:"#BE1100",light:"#BE1100",hc:_i},m("inputValidationErrorBorder","Input validation border color for error severity.")),Qk=V("dropdown.background",{dark:"#3C3C3C",light:K.white,hc:K.black},m("dropdownBackground","Dropdown background.")),UO=V("dropdown.foreground",{dark:"#F0F0F0",light:null,hc:K.white},m("dropdownForeground","Dropdown foreground.")),RY=V("button.foreground",{dark:K.white,light:K.white,hc:K.white},m("buttonForeground","Button foreground color.")),Jk=V("button.background",{dark:"#0E639C",light:"#007ACC",hc:null},m("buttonBackground","Button background color.")),MY=V("button.hoverBackground",{dark:eF(Jk,.2),light:JO(Jk,.2),hc:null},m("buttonHoverBackground","Button background color when hovering.")),Yp=V("badge.background",{dark:"#4D4D4D",light:"#C4C4C4",hc:K.black},m("badgeBackground","Badge background color. Badges are small information labels, e.g. for search results count.")),Xp=V("badge.foreground",{dark:K.white,light:"#333",hc:K.white},m("badgeForeground","Badge foreground color. Badges are small information labels, e.g. for search results count.")),$C=V("scrollbar.shadow",{dark:"#000000",light:"#DDDDDD",hc:null},m("scrollbarShadow","Scrollbar shadow to indicate that the view is scrolled.")),UC=V("scrollbarSlider.background",{dark:K.fromHex("#797979").transparent(.4),light:K.fromHex("#646464").transparent(.4),hc:Ht(_i,.6)},m("scrollbarSliderBackground","Scrollbar slider background color.")),jC=V("scrollbarSlider.hoverBackground",{dark:K.fromHex("#646464").transparent(.7),light:K.fromHex("#646464").transparent(.7),hc:Ht(_i,.8)},m("scrollbarSliderHoverBackground","Scrollbar slider background color when hovering.")),KC=V("scrollbarSlider.activeBackground",{dark:K.fromHex("#BFBFBF").transparent(.4),light:K.fromHex("#000000").transparent(.6),hc:_i},m("scrollbarSliderActiveBackground","Scrollbar slider background color when clicked on.")),PY=V("progressBar.background",{dark:K.fromHex("#0E70C0"),light:K.fromHex("#0E70C0"),hc:_i},m("progressBarBackground","Background color of the progress bar that can show for long running operations.")),OY=V("editorError.background",{dark:null,light:null,hc:null},m("editorError.background","Background color of error text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Qp=V("editorError.foreground",{dark:"#F14C4C",light:"#E51400",hc:null},m("editorError.foreground","Foreground color of error squigglies in the editor.")),jO=V("editorError.border",{dark:null,light:null,hc:K.fromHex("#E47777").transparent(.8)},m("errorBorder","Border color of error boxes in the editor.")),FY=V("editorWarning.background",{dark:null,light:null,hc:null},m("editorWarning.background","Background color of warning text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),Za=V("editorWarning.foreground",{dark:"#CCA700",light:"#BF8803",hc:null},m("editorWarning.foreground","Foreground color of warning squigglies in the editor.")),qC=V("editorWarning.border",{dark:null,light:null,hc:K.fromHex("#FFCC00").transparent(.8)},m("warningBorder","Border color of warning boxes in the editor.")),BY=V("editorInfo.background",{dark:null,light:null,hc:null},m("editorInfo.background","Background color of info text in the editor. The color must not be opaque so as not to hide underlying decorations."),!0),co=V("editorInfo.foreground",{dark:"#3794FF",light:"#1a85ff",hc:"#3794FF"},m("editorInfo.foreground","Foreground color of info squigglies in the editor.")),eD=V("editorInfo.border",{dark:null,light:null,hc:K.fromHex("#3794FF").transparent(.8)},m("infoBorder","Border color of info boxes in the editor.")),WY=V("editorHint.foreground",{dark:K.fromHex("#eeeeee").transparent(.7),light:"#6c6c6c",hc:null},m("editorHint.foreground","Foreground color of hint squigglies in the editor.")),VY=V("editorHint.border",{dark:null,light:null,hc:K.fromHex("#eeeeee").transparent(.8)},m("hintBorder","Border color of hint boxes in the editor.")),ls=V("editor.background",{light:"#fffffe",dark:"#1E1E1E",hc:K.black},m("editorBackground","Editor background color.")),oc=V("editor.foreground",{light:"#333333",dark:"#BBBBBB",hc:K.white},m("editorForeground","Editor default foreground color.")),Fr=V("editorWidget.background",{dark:"#252526",light:"#F3F3F3",hc:"#0C141F"},m("editorWidgetBackground","Background color of editor widgets, such as find/replace.")),Ya=V("editorWidget.foreground",{dark:Ne,light:Ne,hc:Ne},m("editorWidgetForeground","Foreground color of editor widgets, such as find/replace.")),Wh=V("editorWidget.border",{dark:"#454545",light:"#C8C8C8",hc:_i},m("editorWidgetBorder","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.")),HY=V("editorWidget.resizeBorder",{light:null,dark:null,hc:null},m("editorWidgetResizeBorder","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.")),KO=V("quickInput.background",{dark:Fr,light:Fr,hc:Fr},m("pickerBackground","Quick picker background color. The quick picker widget is the container for pickers like the command palette.")),zY=V("quickInput.foreground",{dark:Ya,light:Ya,hc:Ya},m("pickerForeground","Quick picker foreground color. The quick picker widget is the container for pickers like the command palette.")),$Y=V("quickInputTitle.background",{dark:new K(new tt(255,255,255,.105)),light:new K(new tt(0,0,0,.06)),hc:"#000000"},m("pickerTitleBackground","Quick picker title background color. The quick picker widget is the container for pickers like the command palette.")),UY=V("pickerGroup.foreground",{dark:"#3794FF",light:"#0066BF",hc:K.white},m("pickerGroupForeground","Quick picker color for grouping labels.")),jY=V("pickerGroup.border",{dark:"#3F3F46",light:"#CCCEDB",hc:K.white},m("pickerGroupBorder","Quick picker color for grouping borders.")),KY=V("keybindingLabel.background",{dark:new K(new tt(128,128,128,.17)),light:new K(new tt(221,221,221,.4)),hc:K.transparent},m("keybindingLabelBackground","Keybinding label background color. The keybinding label is used to represent a keyboard shortcut.")),qY=V("keybindingLabel.foreground",{dark:K.fromHex("#CCCCCC"),light:K.fromHex("#555555"),hc:K.white},m("keybindingLabelForeground","Keybinding label foreground color. The keybinding label is used to represent a keyboard shortcut.")),GY=V("keybindingLabel.border",{dark:new K(new tt(51,51,51,.6)),light:new K(new tt(204,204,204,.4)),hc:new K(new tt(111,195,223))},m("keybindingLabelBorder","Keybinding label border color. The keybinding label is used to represent a keyboard shortcut.")),ZY=V("keybindingLabel.bottomBorder",{dark:new K(new tt(68,68,68,.6)),light:new K(new tt(187,187,187,.4)),hc:new K(new tt(111,195,223))},m("keybindingLabelBottomBorder","Keybinding label border bottom color. The keybinding label is used to represent a keyboard shortcut.")),ac=V("editor.selectionBackground",{light:"#ADD6FF",dark:"#264F78",hc:"#f3f518"},m("editorSelectionBackground","Color of the editor selection.")),YY=V("editor.selectionForeground",{light:null,dark:null,hc:"#000000"},m("editorSelectionForeground","Color of the selected text for high contrast.")),tD=V("editor.inactiveSelectionBackground",{light:Ht(ac,.5),dark:Ht(ac,.5),hc:Ht(ac,.5)},m("editorInactiveSelection","Color of the selection in an inactive editor. The color must not be opaque so as not to hide underlying decorations."),!0),iD=V("editor.selectionHighlightBackground",{light:tF(ac,ls,.3,.6),dark:tF(ac,ls,.3,.6),hc:null},m("editorSelectionHighlight","Color for regions with the same content as the selection. The color must not be opaque so as not to hide underlying decorations."),!0),XY=V("editor.selectionHighlightBorder",{light:null,dark:null,hc:En},m("editorSelectionHighlightBorder","Border color for regions with the same content as the selection.")),QY=V("editor.findMatchBackground",{light:"#A8AC94",dark:"#515C6A",hc:null},m("editorFindMatch","Color of the current search match.")),nD=V("editor.findMatchHighlightBackground",{light:"#EA5C0055",dark:"#EA5C0055",hc:null},m("findMatchHighlight","Color of the other search matches. The color must not be opaque so as not to hide underlying decorations."),!0),JY=V("editor.findRangeHighlightBackground",{dark:"#3a3d4166",light:"#b4b4b44d",hc:null},m("findRangeHighlight","Color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),eX=V("editor.findMatchBorder",{light:null,dark:null,hc:En},m("editorFindMatchBorder","Border color of the current search match.")),tX=V("editor.findMatchHighlightBorder",{light:null,dark:null,hc:En},m("findMatchHighlightBorder","Border color of the other search matches.")),iX=V("editor.findRangeHighlightBorder",{dark:null,light:null,hc:Ht(En,.4)},m("findRangeHighlightBorder","Border color of the range limiting the search. The color must not be opaque so as not to hide underlying decorations."),!0),nX=V("editor.hoverHighlightBackground",{light:"#ADD6FF26",dark:"#264f7840",hc:"#ADD6FF26"},m("hoverHighlight","Highlight below the word for which a hover is shown. The color must not be opaque so as not to hide underlying decorations."),!0),Vh=V("editorHoverWidget.background",{light:Fr,dark:Fr,hc:Fr},m("hoverBackground","Background color of the editor hover.")),rD=V("editorHoverWidget.foreground",{light:Ya,dark:Ya,hc:Ya},m("hoverForeground","Foreground color of the editor hover.")),sD=V("editorHoverWidget.border",{light:Wh,dark:Wh,hc:Wh},m("hoverBorder","Border color of the editor hover.")),rX=V("editorHoverWidget.statusBarBackground",{dark:eF(Vh,.2),light:JO(Vh,.05),hc:Fr},m("statusBarBackground","Background color of the editor hover status bar.")),oD=V("editorLink.activeForeground",{dark:"#4E94CE",light:K.blue,hc:K.cyan},m("activeLinkForeground","Color of active links.")),Hh=V("editorInlayHint.foreground",{dark:Ht(Xp,.8),light:Ht(Xp,.8),hc:Xp},m("editorInlayHintForeground","Foreground color of inline hints")),zh=V("editorInlayHint.background",{dark:Ht(Yp,.6),light:Ht(Yp,.3),hc:Yp},m("editorInlayHintBackground","Background color of inline hints")),sX=V("editorInlayHint.typeForeground",{dark:Hh,light:Hh,hc:Hh},m("editorInlayHintForegroundTypes","Foreground color of inline hints for types")),oX=V("editorInlayHint.typeBackground",{dark:zh,light:zh,hc:zh},m("editorInlayHintBackgroundTypes","Background color of inline hints for types")),aX=V("editorInlayHint.parameterForeground",{dark:Hh,light:Hh,hc:Hh},m("editorInlayHintForegroundParameter","Foreground color of inline hints for parameters")),lX=V("editorInlayHint.parameterBackground",{dark:zh,light:zh,hc:zh},m("editorInlayHintBackgroundParameter","Background color of inline hints for parameters")),cX=V("editorLightBulb.foreground",{dark:"#FFCC00",light:"#DDB100",hc:"#FFCC00"},m("editorLightBulbForeground","The color used for the lightbulb actions icon.")),hX=V("editorLightBulbAutoFix.foreground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("editorLightBulbAutoFixForeground","The color used for the lightbulb auto fix actions icon.")),aD=new K(new tt(155,185,85,.2)),lD=new K(new tt(255,0,0,.2)),qO=V("diffEditor.insertedTextBackground",{dark:aD,light:aD,hc:null},m("diffEditorInserted","Background color for text that got inserted. The color must not be opaque so as not to hide underlying decorations."),!0),GO=V("diffEditor.removedTextBackground",{dark:lD,light:lD,hc:null},m("diffEditorRemoved","Background color for text that got removed. The color must not be opaque so as not to hide underlying decorations."),!0),uX=V("diffEditor.insertedTextBorder",{dark:null,light:null,hc:"#33ff2eff"},m("diffEditorInsertedOutline","Outline color for the text that got inserted.")),dX=V("diffEditor.removedTextBorder",{dark:null,light:null,hc:"#FF008F"},m("diffEditorRemovedOutline","Outline color for text that got removed.")),fX=V("diffEditor.border",{dark:null,light:null,hc:_i},m("diffEditorBorder","Border color between the two text editors.")),gX=V("diffEditor.diagonalFill",{dark:"#cccccc33",light:"#22222233",hc:null},m("diffDiagonalFill","Color of the diff editor's diagonal fill. The diagonal fill is used in side-by-side diff views.")),pX=V("list.focusBackground",{dark:null,light:null,hc:null},m("listFocusBackground","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.")),mX=V("list.focusForeground",{dark:null,light:null,hc:null},m("listFocusForeground","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.")),_X=V("list.focusOutline",{dark:rc,light:rc,hc:En},m("listFocusOutline","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.")),lc=V("list.activeSelectionBackground",{dark:"#094771",light:"#0060C0",hc:null},m("listActiveSelectionBackground","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.")),cc=V("list.activeSelectionForeground",{dark:K.white,light:K.white,hc:null},m("listActiveSelectionForeground","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.")),GC=V("list.activeSelectionIconForeground",{dark:null,light:null,hc:null},m("listActiveSelectionIconForeground","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.")),bX=V("list.inactiveSelectionBackground",{dark:"#37373D",light:"#E4E6F1",hc:null},m("listInactiveSelectionBackground","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.")),vX=V("list.inactiveSelectionForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionForeground","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.")),CX=V("list.inactiveSelectionIconForeground",{dark:null,light:null,hc:null},m("listInactiveSelectionIconForeground","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.")),wX=V("list.inactiveFocusBackground",{dark:null,light:null,hc:null},m("listInactiveFocusBackground","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.")),yX=V("list.inactiveFocusOutline",{dark:null,light:null,hc:null},m("listInactiveFocusOutline","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.")),SX=V("list.hoverBackground",{dark:"#2A2D2E",light:"#F0F0F0",hc:null},m("listHoverBackground","List/Tree background when hovering over items using the mouse.")),LX=V("list.hoverForeground",{dark:null,light:null,hc:null},m("listHoverForeground","List/Tree foreground when hovering over items using the mouse.")),xX=V("list.dropBackground",{dark:"#062F4A",light:"#D6EBFF",hc:null},m("listDropBackground","List/Tree drag and drop background when moving items around using the mouse.")),pf=V("list.highlightForeground",{dark:"#18A3FF",light:"#0066BF",hc:rc},m("highlight","List/Tree foreground color of the match highlights when searching inside the list/tree.")),cD=V("list.focusHighlightForeground",{dark:pf,light:eQ(lc,pf,"#9DDDFF"),hc:pf},m("listFocusHighlightForeground","List/Tree foreground color of the match highlights on actively focused items when searching inside the list/tree.")),kX=V("listFilterWidget.background",{light:"#efc1ad",dark:"#653723",hc:K.black},m("listFilterWidgetBackground","Background color of the type filter widget in lists and trees.")),DX=V("listFilterWidget.outline",{dark:K.transparent,light:K.transparent,hc:"#f38518"},m("listFilterWidgetOutline","Outline color of the type filter widget in lists and trees.")),EX=V("listFilterWidget.noMatchesOutline",{dark:"#BE1100",light:"#BE1100",hc:_i},m("listFilterWidgetNoMatchesOutline","Outline color of the type filter widget in lists and trees, when there are no matches.")),IX=V("tree.indentGuidesStroke",{dark:"#585858",light:"#a9a9a9",hc:"#a9a9a9"},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),NX=V("tree.tableColumnsBorder",{dark:"#CCCCCC20",light:"#61616120",hc:null},m("treeIndentGuidesStroke","Tree stroke color for the indentation guides.")),ZO=V("quickInput.list.focusBackground",{dark:null,light:null,hc:null},"",void 0,m("quickInput.list.focusBackground deprecation","Please use quickInputList.focusBackground instead")),ZC=V("quickInputList.focusForeground",{dark:cc,light:cc,hc:cc},m("quickInput.listFocusForeground","Quick picker foreground color for the focused item.")),YC=V("quickInputList.focusIconForeground",{dark:GC,light:GC,hc:GC},m("quickInput.listFocusIconForeground","Quick picker icon foreground color for the focused item.")),XC=V("quickInputList.focusBackground",{dark:Jp(ZO,lc),light:Jp(ZO,lc),hc:null},m("quickInput.listFocusBackground","Quick picker background color for the focused item.")),TX=V("menu.border",{dark:null,light:null,hc:_i},m("menuBorder","Border color of menus.")),AX=V("menu.foreground",{dark:UO,light:Ne,hc:UO},m("menuForeground","Foreground color of menu items.")),RX=V("menu.background",{dark:Qk,light:Qk,hc:Qk},m("menuBackground","Background color of menu items.")),MX=V("menu.selectionForeground",{dark:cc,light:cc,hc:cc},m("menuSelectionForeground","Foreground color of the selected menu item in menus.")),PX=V("menu.selectionBackground",{dark:lc,light:lc,hc:lc},m("menuSelectionBackground","Background color of the selected menu item in menus.")),OX=V("menu.selectionBorder",{dark:null,light:null,hc:En},m("menuSelectionBorder","Border color of the selected menu item in menus.")),FX=V("menu.separatorBackground",{dark:"#BBBBBB",light:"#888888",hc:_i},m("menuSeparatorBackground","Color of a separator menu item in menus.")),BX=V("toolbar.hoverBackground",{dark:"#5a5d5e50",light:"#b8b8b850",hc:null},m("toolbarHoverBackground","Toolbar background when hovering over actions using the mouse")),WX=V("editor.snippetTabstopHighlightBackground",{dark:new K(new tt(124,124,124,.3)),light:new K(new tt(10,50,100,.2)),hc:new K(new tt(124,124,124,.3))},m("snippetTabstopHighlightBackground","Highlight background color of a snippet tabstop.")),VX=V("editor.snippetTabstopHighlightBorder",{dark:null,light:null,hc:null},m("snippetTabstopHighlightBorder","Highlight border color of a snippet tabstop.")),HX=V("editor.snippetFinalTabstopHighlightBackground",{dark:null,light:null,hc:null},m("snippetFinalTabstopHighlightBackground","Highlight background color of the final tabstop of a snippet.")),zX=V("editor.snippetFinalTabstopHighlightBorder",{dark:"#525252",light:new K(new tt(10,50,100,.5)),hc:"#525252"},m("snippetFinalTabstopHighlightBorder","Highlight border color of the final tabstop of a snippet.")),hD=V("editorOverviewRuler.findMatchForeground",{dark:"#d186167e",light:"#d186167e",hc:"#AB5A00"},m("overviewRulerFindMatchForeground","Overview ruler marker color for find matches. The color must not be opaque so as not to hide underlying decorations."),!0),YO=V("editorOverviewRuler.selectionHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerSelectionHighlightForeground","Overview ruler marker color for selection highlights. The color must not be opaque so as not to hide underlying decorations."),!0),XO=V("minimap.findMatchHighlight",{light:"#d18616",dark:"#d18616",hc:"#AB5A00"},m("minimapFindMatchHighlight","Minimap marker color for find matches."),!0),QC=V("minimap.selectionOccurrenceHighlight",{light:"#c9c9c9",dark:"#676767",hc:"#ffffff"},m("minimapSelectionOccurrenceHighlight","Minimap marker color for repeating editor selections."),!0),QO=V("minimap.selectionHighlight",{light:"#ADD6FF",dark:"#264F78",hc:"#ffffff"},m("minimapSelectionHighlight","Minimap marker color for the editor selection."),!0),$X=V("minimap.errorHighlight",{dark:new K(new tt(255,18,18,.7)),light:new K(new tt(255,18,18,.7)),hc:new K(new tt(255,50,50,1))},m("minimapError","Minimap marker color for errors.")),UX=V("minimap.warningHighlight",{dark:Za,light:Za,hc:qC},m("overviewRuleWarning","Minimap marker color for warnings.")),jX=V("minimap.background",{dark:null,light:null,hc:null},m("minimapBackground","Minimap background color.")),KX=V("minimap.foregroundOpacity",{dark:K.fromHex("#000f"),light:K.fromHex("#000f"),hc:K.fromHex("#000f")},m("minimapForegroundOpacity",'Opacity of foreground elements rendered in the minimap. For example, "#000000c0" will render the elements with 75% opacity.')),qX=V("minimapSlider.background",{light:Ht(UC,.5),dark:Ht(UC,.5),hc:Ht(UC,.5)},m("minimapSliderBackground","Minimap slider background color.")),GX=V("minimapSlider.hoverBackground",{light:Ht(jC,.5),dark:Ht(jC,.5),hc:Ht(jC,.5)},m("minimapSliderHoverBackground","Minimap slider background color when hovering.")),ZX=V("minimapSlider.activeBackground",{light:Ht(KC,.5),dark:Ht(KC,.5),hc:Ht(KC,.5)},m("minimapSliderActiveBackground","Minimap slider background color when clicked on.")),YX=V("problemsErrorIcon.foreground",{dark:Qp,light:Qp,hc:Qp},m("problemsErrorIconForeground","The color used for the problems error icon.")),XX=V("problemsWarningIcon.foreground",{dark:Za,light:Za,hc:Za},m("problemsWarningIconForeground","The color used for the problems warning icon.")),QX=V("problemsInfoIcon.foreground",{dark:co,light:co,hc:co},m("problemsInfoIconForeground","The color used for the problems info icon."));function JX(r,e){var t,i,n;switch(r.op){case 0:return(t=Xa(r.value,e))===null||t===void 0?void 0:t.darken(r.factor);case 1:return(i=Xa(r.value,e))===null||i===void 0?void 0:i.lighten(r.factor);case 2:return(n=Xa(r.value,e))===null||n===void 0?void 0:n.transparent(r.factor);case 3:for(const a of r.values){const l=Xa(a,e);if(l)return l}return;case 5:return Xa(e.defines(r.if)?r.then:r.else,e);case 4:const s=Xa(r.value,e);if(!s)return;const o=Xa(r.background,e);return o?s.isDarkerThan(o)?K.getLighterColor(s,o,r.factor).transparent(r.transparency):K.getDarkerColor(s,o,r.factor).transparent(r.transparency):s.transparent(r.factor*r.transparency);default:throw vK()}}function JO(r,e){return{op:0,value:r,factor:e}}function eF(r,e){return{op:1,value:r,factor:e}}function Ht(r,e){return{op:2,value:r,factor:e}}function Jp(...r){return{op:3,values:r}}function eQ(r,e,t){return{op:5,if:r,then:e,else:t}}function tF(r,e,t,i){return{op:4,value:r,background:e,factor:t,transparency:i}}function Xa(r,e){if(r!==null){if(typeof r=="string")return r[0]==="#"?K.fromHex(r):e.getColor(r);if(r instanceof K)return r;if(typeof r=="object")return JX(r,e)}}const iF="vscode://schemas/workbench-colors";let nF=mi.as(tC.JSONContribution);nF.registerSchema(iF,zC.getColorSchema());const rF=new Bt(()=>nF.notifySchemaChanged(iF),200);zC.onDidChangeSchema(()=>{rF.isScheduled()||rF.schedule()});const tQ=V("editor.lineHighlightBackground",{dark:null,light:null,hc:null},m("lineHighlight","Background color for the highlight of line at the cursor position.")),sF=V("editor.lineHighlightBorder",{dark:"#282828",light:"#eeeeee",hc:"#f38518"},m("lineHighlightBorderBox","Background color for the border around the line at the cursor position.")),iQ=V("editor.rangeHighlightBackground",{dark:"#ffffff0b",light:"#fdff0033",hc:null},m("rangeHighlight","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),nQ=V("editor.rangeHighlightBorder",{dark:null,light:null,hc:En},m("rangeHighlightBorder","Background color of the border around highlighted ranges."),!0),rQ=V("editor.symbolHighlightBackground",{dark:nD,light:nD,hc:null},m("symbolHighlight","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),sQ=V("editor.symbolHighlightBorder",{dark:null,light:null,hc:En},m("symbolHighlightBorder","Background color of the border around highlighted symbols."),!0),oF=V("editorCursor.foreground",{dark:"#AEAFAD",light:K.black,hc:K.white},m("caret","Color of the editor cursor.")),oQ=V("editorCursor.background",null,m("editorCursorBackground","The background color of the editor cursor. Allows customizing the color of a character overlapped by a block cursor.")),$h=V("editorWhitespace.foreground",{dark:"#e3e4e229",light:"#33333333",hc:"#e3e4e229"},m("editorWhitespaces","Color of whitespace characters in the editor.")),JC=V("editorIndentGuide.background",{dark:$h,light:$h,hc:$h},m("editorIndentGuides","Color of the editor indentation guides.")),ew=V("editorIndentGuide.activeBackground",{dark:$h,light:$h,hc:$h},m("editorActiveIndentGuide","Color of the active editor indentation guides.")),aF=V("editorLineNumber.foreground",{dark:"#858585",light:"#237893",hc:K.white},m("editorLineNumbers","Color of editor line numbers.")),uD=V("editorActiveLineNumber.foreground",{dark:"#c6c6c6",light:"#0B216F",hc:En},m("editorActiveLineNumber","Color of editor active line number"),!1,m("deprecatedEditorActiveLineNumber","Id is deprecated. Use 'editorLineNumber.activeForeground' instead.")),aQ=V("editorLineNumber.activeForeground",{dark:uD,light:uD,hc:uD},m("editorActiveLineNumber","Color of editor active line number")),lQ=V("editorRuler.foreground",{dark:"#5A5A5A",light:K.lightgrey,hc:K.white},m("editorRuler","Color of the editor rulers.")),cQ=V("editorCodeLens.foreground",{dark:"#999999",light:"#919191",hc:"#999999"},m("editorCodeLensForeground","Foreground color of editor CodeLens")),hQ=V("editorBracketMatch.background",{dark:"#0064001a",light:"#0064001a",hc:"#0064001a"},m("editorBracketMatchBackground","Background color behind matching brackets")),lF=V("editorBracketMatch.border",{dark:"#888",light:"#B9B9B9",hc:_i},m("editorBracketMatchBorder","Color for matching brackets boxes")),uQ=V("editorOverviewRuler.border",{dark:"#7f7f7f4d",light:"#7f7f7f4d",hc:"#7f7f7f4d"},m("editorOverviewRulerBorder","Color of the overview ruler border.")),dQ=V("editorOverviewRuler.background",null,m("editorOverviewRulerBackground","Background color of the editor overview ruler. Only used when the minimap is enabled and placed on the right side of the editor.")),fQ=V("editorGutter.background",{dark:ls,light:ls,hc:ls},m("editorGutter","Background color of the editor gutter. The gutter contains the glyph margins and the line numbers.")),gQ=V("editorUnnecessaryCode.border",{dark:null,light:null,hc:K.fromHex("#fff").transparent(.8)},m("unnecessaryCodeBorder","Border color of unnecessary (unused) source code in the editor.")),pQ=V("editorUnnecessaryCode.opacity",{dark:K.fromHex("#000a"),light:K.fromHex("#0007"),hc:null},m("unnecessaryCodeOpacity",`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.`)),cF=V("editorGhostText.border",{dark:null,light:null,hc:K.fromHex("#fff").transparent(.8)},m("editorGhostTextBorder","Border color of ghost text in the editor.")),hF=V("editorGhostText.foreground",{dark:K.fromHex("#ffffff56"),light:K.fromHex("#0007"),hc:null},m("editorGhostTextForeground","Foreground color of the ghost text in the editor.")),dD=new K(new tt(0,122,204,.6)),mQ=V("editorOverviewRuler.rangeHighlightForeground",{dark:dD,light:dD,hc:dD},m("overviewRulerRangeHighlight","Overview ruler marker color for range highlights. The color must not be opaque so as not to hide underlying decorations."),!0),_Q=V("editorOverviewRuler.errorForeground",{dark:new K(new tt(255,18,18,.7)),light:new K(new tt(255,18,18,.7)),hc:new K(new tt(255,50,50,1))},m("overviewRuleError","Overview ruler marker color for errors.")),bQ=V("editorOverviewRuler.warningForeground",{dark:Za,light:Za,hc:qC},m("overviewRuleWarning","Overview ruler marker color for warnings.")),vQ=V("editorOverviewRuler.infoForeground",{dark:co,light:co,hc:eD},m("overviewRuleInfo","Overview ruler marker color for infos.")),uF=V("editorBracketHighlight.foreground1",{dark:"#FFD700",light:"#0431FAFF",hc:"#FFD700"},m("editorBracketHighlightForeground1","Foreground color of brackets (1). Requires enabling bracket pair colorization.")),dF=V("editorBracketHighlight.foreground2",{dark:"#DA70D6",light:"#319331FF",hc:"#DA70D6"},m("editorBracketHighlightForeground2","Foreground color of brackets (2). Requires enabling bracket pair colorization.")),fF=V("editorBracketHighlight.foreground3",{dark:"#179FFF",light:"#7B3814FF",hc:"#87CEFA"},m("editorBracketHighlightForeground3","Foreground color of brackets (3). Requires enabling bracket pair colorization.")),gF=V("editorBracketHighlight.foreground4",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground4","Foreground color of brackets (4). Requires enabling bracket pair colorization.")),pF=V("editorBracketHighlight.foreground5",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground5","Foreground color of brackets (5). Requires enabling bracket pair colorization.")),mF=V("editorBracketHighlight.foreground6",{dark:"#00000000",light:"#00000000",hc:"#00000000"},m("editorBracketHighlightForeground6","Foreground color of brackets (6). Requires enabling bracket pair colorization.")),CQ=V("editorBracketHighlight.unexpectedBracket.foreground",{dark:new K(new tt(255,18,18,.8)),light:new K(new tt(255,18,18,.8)),hc:new K(new tt(255,50,50,1))},m("editorBracketHighlightUnexpectedBracketForeground","Foreground color of unexpected brackets."));Lt((r,e)=>{const t=r.getColor(ls);t&&e.addRule(`.monaco-editor, .monaco-editor-background, .monaco-editor .inputarea.ime-input { background-color: ${t}; }`);const i=r.getColor(oc);i&&e.addRule(`.monaco-editor, .monaco-editor .inputarea.ime-input { color: ${i}; }`);const n=r.getColor(fQ);n&&e.addRule(`.monaco-editor .margin { background-color: ${n}; }`);const s=r.getColor(iQ);s&&e.addRule(`.monaco-editor .rangeHighlight { background-color: ${s}; }`);const o=r.getColor(nQ);o&&e.addRule(`.monaco-editor .rangeHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${o}; }`);const a=r.getColor(rQ);a&&e.addRule(`.monaco-editor .symbolHighlight { background-color: ${a}; }`);const l=r.getColor(sQ);l&&e.addRule(`.monaco-editor .symbolHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${l}; }`);const c=r.getColor($h);c&&(e.addRule(`.monaco-editor .mtkw { color: ${c} !important; }`),e.addRule(`.monaco-editor .mtkz { color: ${c} !important; }`))});class wQ{constructor(e,t){this.lineCount=e,this.columnCount=t}toString(){return`${this.lineCount},${this.columnCount}`}}function yQ(r,e,t,i){return r!==t?di(t-r,i):di(0,i-e)}const Qa=0;function SQ(r){return r===0}const Br=Math.pow(2,26);function di(r,e){return r*Br+e}function Uh(r){const e=r,t=Math.floor(e/Br),i=e-t*Br;return new wQ(t,i)}function _F(r){return Math.floor(r/Br)}function bF(r){return r}function Wn(r,e){return e<Br?r+e:r-r%Br+e}function LQ(r,e){const t=r,i=e;if(i-t<=0)return Qa;const s=Math.floor(t/Br),o=Math.floor(i/Br),a=i-o*Br;if(s===o){const l=t-s*Br;return di(0,a-l)}else return di(o-s,a)}function fD(r,e){return r<e}function hc(r,e){return r<=e}function tw(r,e){return r>=e}function iw(r){return di(r.lineNumber-1,r.column-1)}function em(r,e){const t=r,i=Math.floor(t/Br),n=t-i*Br,s=e,o=Math.floor(s/Br),a=s-o*Br;return new k(i+1,n+1,o+1,a+1)}function xQ(r){const e=Bo(r);return di(e.length-1,e[e.length-1].length)}function kQ(r){return r}class vF{constructor(e,t,i){this.startOffset=e,this.endOffset=t,this.newLength=i}}class DQ{constructor(e,t){this.documentLength=t,this.nextEditIdx=0,this.deltaOldToNewLineCount=0,this.deltaOldToNewColumnCount=0,this.deltaLineIdxInOld=-1,this.edits=e.map(i=>gD.from(i))}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):this.documentLength;return LQ(e,i)}translateOldToCur(e){return e.lineCount===this.deltaLineIdxInOld?di(e.lineCount+this.deltaOldToNewLineCount,e.columnCount+this.deltaOldToNewColumnCount):di(e.lineCount+this.deltaOldToNewLineCount,e.columnCount)}translateCurToOld(e){const t=Uh(e);return t.lineCount-this.deltaOldToNewLineCount===this.deltaLineIdxInOld?di(t.lineCount-this.deltaOldToNewLineCount,t.columnCount-this.deltaOldToNewColumnCount):di(t.lineCount-this.deltaOldToNewLineCount,t.columnCount)}adjustNextEdit(e){for(;this.nextEditIdx<this.edits.length;){const t=this.edits[this.nextEditIdx],i=this.translateOldToCur(t.endOffsetAfterObj);if(hc(i,e)){this.nextEditIdx++;const n=Uh(i),s=Uh(this.translateOldToCur(t.endOffsetBeforeObj)),o=n.lineCount-s.lineCount;this.deltaOldToNewLineCount+=o;const a=this.deltaLineIdxInOld===t.endOffsetBeforeObj.lineCount?this.deltaOldToNewColumnCount:0,l=n.columnCount-s.columnCount;this.deltaOldToNewColumnCount=a+l,this.deltaLineIdxInOld=t.endOffsetBeforeObj.lineCount}else break}}}class gD{constructor(e,t,i){this.endOffsetBeforeObj=Uh(t),this.endOffsetAfterObj=Uh(Wn(e,i)),this.offsetObj=Uh(e)}static from(e){return new gD(e.startOffset,e.endOffset,e.newLength)}}class pD{constructor(e){this._length=e}get length(){return this._length}}class tm extends pD{constructor(e,t,i,n,s){super(e);this.openingBracket=t,this.child=i,this.closingBracket=n,this.missingOpeningBracketIds=s}static create(e,t,i){let n=e.length;return t&&(n=Wn(n,t.length)),i&&(n=Wn(n,i.length)),new tm(n,e,t,i,t?t.missingOpeningBracketIds:Si.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=new Array;return e.push(this.openingBracket),this.child&&e.push(this.child),this.closingBracket&&e.push(this.closingBracket),e}canBeReused(e,t){return!(this.closingBracket===null||e.intersects(this.missingOpeningBracketIds))}deepClone(){return new tm(this.length,this.openingBracket.deepClone(),this.child&&this.child.deepClone(),this.closingBracket&&this.closingBracket.deepClone(),this.missingOpeningBracketIds)}}class Jo extends pD{constructor(e,t,i){super(e);this.listHeight=t,this._missingOpeningBracketIds=i}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=Wn(s,t.length),o=o.merge(t.missingOpeningBracketIds),i){if(e.listHeight!==i.listHeight)throw new Error("Invalid list heights");s=Wn(s,i.length),o=o.merge(i.missingOpeningBracketIds)}return n?new EQ(s,e.listHeight+1,e,t,i,o):new im(s,e.listHeight+1,e,t,i,o)}static getEmpty(){return new IQ(Qa,0,[],Si.getEmpty())}get kind(){return 4}get missingOpeningBracketIds(){return this._missingOpeningBracketIds}throwIfImmutable(){}makeLastElementMutable(){this.throwIfImmutable();const e=this.childrenLength;if(e===0)return;const t=this.getChild(e-1),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(e-1,i),i}makeFirstElementMutable(){if(this.throwIfImmutable(),this.childrenLength===0)return;const t=this.getChild(0),i=t.kind===4?t.toMutable():t;return t!==i&&this.setChild(0,i),i}canBeReused(e,t){if(e.intersects(this.missingOpeningBracketIds))return!1;let i=this,n;for(;i.kind===4&&(n=i.childrenLength)>0;)i=i.getChild(n-1);return i.canBeReused(e,t)}handleChildrenChanged(){this.throwIfImmutable();const e=this.childrenLength;let t=this.getChild(0).length,i=this.getChild(0).missingOpeningBracketIds;for(let n=1;n<e;n++){const s=this.getChild(n);t=Wn(t,s.length),i=i.merge(s.missingOpeningBracketIds)}this._length=t,this._missingOpeningBracketIds=i}}class im extends Jo{constructor(e,t,i,n,s,o){super(e,t,o);this._item1=i,this._item2=n,this._item3=s}get childrenLength(){return this._item3!==null?3:2}getChild(e){switch(e){case 0:return this._item1;case 1:return this._item2;case 2:return this._item3}throw new Error("Invalid child index")}setChild(e,t){switch(e){case 0:this._item1=t;return;case 1:this._item2=t;return;case 2:this._item3=t;return}throw new Error("Invalid child index")}get children(){return this._item3?[this._item1,this._item2,this._item3]:[this._item1,this._item2]}get item1(){return this._item1}get item2(){return this._item2}get item3(){return this._item3}deepClone(){return new im(this.length,this.listHeight,this._item1.deepClone(),this._item2.deepClone(),this._item3?this._item3.deepClone():null,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){if(this._item3)throw new Error("Cannot append to a full (2,3) tree node");this.throwIfImmutable(),this._item3=e,this.handleChildrenChanged()}unappendChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item3;return this._item3=null,this.handleChildrenChanged(),e}prependChildOfSameHeight(e){if(this._item3)throw new Error("Cannot prepend to a full (2,3) tree node");this.throwIfImmutable(),this._item3=this._item2,this._item2=this._item1,this._item1=e,this.handleChildrenChanged()}unprependChild(){if(!this._item3)throw new Error("Cannot remove from a non-full (2,3) tree node");this.throwIfImmutable();const e=this._item1;return this._item1=this._item2,this._item2=this._item3,this._item3=null,this.handleChildrenChanged(),e}toMutable(){return this}}class EQ extends im{toMutable(){return new im(this.length,this.listHeight,this.item1,this.item2,this.item3,this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}class nw extends Jo{constructor(e,t,i,n){super(e,t,n);this._children=i}get childrenLength(){return this._children.length}getChild(e){return this._children[e]}setChild(e,t){this._children[e]=t}get children(){return this._children}deepClone(){const e=new Array(this._children.length);for(let t=0;t<this._children.length;t++)e[t]=this._children[t].deepClone();return new nw(this.length,this.listHeight,e,this.missingOpeningBracketIds)}appendChildOfSameHeight(e){this.throwIfImmutable(),this._children.push(e),this.handleChildrenChanged()}unappendChild(){this.throwIfImmutable();const e=this._children.pop();return this.handleChildrenChanged(),e}prependChildOfSameHeight(e){this.throwIfImmutable(),this._children.unshift(e),this.handleChildrenChanged()}unprependChild(){this.throwIfImmutable();const e=this._children.shift();return this.handleChildrenChanged(),e}toMutable(){return this}}class IQ extends nw{toMutable(){return new nw(this.length,this.listHeight,[...this.children],this.missingOpeningBracketIds)}throwIfImmutable(){throw new Error("this instance is immutable")}}const NQ=[];class mD extends pD{get listHeight(){return 0}get childrenLength(){return 0}getChild(e){return null}get children(){return NQ}deepClone(){return this}}class mf extends mD{get kind(){return 0}get missingOpeningBracketIds(){return Si.getEmpty()}canBeReused(e,t){return!t}}class jh extends mD{constructor(e){super(e)}static create(e){const t=kQ(e),i=jh.cacheByLength.get(t);if(i)return i;const n=new jh(e);return jh.cacheByLength.set(t,n),n}get kind(){return 1}get missingOpeningBracketIds(){return Si.getEmpty()}canBeReused(e,t){return!1}}jh.cacheByLength=new Map;class TQ extends mD{constructor(e,t){super(t);this.missingOpeningBracketIds=e}get kind(){return 3}canBeReused(e,t){return!e.intersects(this.missingOpeningBracketIds)}}class uc{constructor(e,t,i,n,s){this.length=e,this.kind=t,this.bracketId=i,this.bracketIds=n,this.astNode=s}}class AQ{constructor(e,t){this.textModel=e,this.bracketTokens=t,this.reader=new RQ(this.textModel,this.bracketTokens),this._offset=Qa,this.didPeek=!1,this.peeked=null,this.textBufferLineCount=e.getLineCount(),this.textBufferLastLineLength=e.getLineLength(this.textBufferLineCount)}get offset(){return this._offset}get length(){return di(this.textBufferLineCount,this.textBufferLastLineLength)}skip(e){this.didPeek=!1,this._offset=Wn(this._offset,e);const t=Uh(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=Wn(this._offset,e.length)),e}peek(){return this.didPeek||(this.peeked=this.reader.read(),this.didPeek=!0),this.peeked}}class RQ{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,this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset)):(this.lineIdx=e,this.lineCharOffset=t,this.line=null),this.peekedToken=null}read(){if(this.peekedToken){const s=this.peekedToken;return this.peekedToken=null,this.lineCharOffset+=bF(s.length),s}if(this.lineIdx>this.textBufferLineCount-1||this.lineIdx===this.textBufferLineCount-1&&this.lineCharOffset>=this.textBufferLastLineLength)return null;this.line===null&&(this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.line=this.lineTokens.getLineContent(),this.lineTokenOffset=this.lineCharOffset===0?0:this.lineTokens.findTokenIndexAtOffset(this.lineCharOffset));const e=this.lineIdx,t=this.lineCharOffset;let i=0;for(;i<1e3;){const s=this.lineTokens,o=s.getCount();let a=null;if(this.lineTokenOffset<o){const l=s.getMetadata(this.lineTokenOffset);for(;this.lineTokenOffset+1<o&&l===s.getMetadata(this.lineTokenOffset+1);)this.lineTokenOffset++;const c=xn.getTokenType(l)===0,h=s.getEndOffset(this.lineTokenOffset);if(c&&h!==this.lineCharOffset){const u=s.getLanguageId(this.lineTokenOffset),d=this.line.substring(this.lineCharOffset,h),f=this.bracketTokens.getSingleLanguageBracketTokens(u),g=f.regExpGlobal;if(g){g.lastIndex=0;const p=g.exec(d);p&&(a=f.getToken(p[0]),a&&(this.lineCharOffset+=p.index))}}if(i+=h-this.lineCharOffset,a)if(e!==this.lineIdx||t!==this.lineCharOffset){this.peekedToken=a;break}else return this.lineCharOffset+=bF(a.length),a;else this.lineTokenOffset++,this.lineCharOffset=h}else{if(this.lineIdx===this.textBufferLineCount-1)break;this.lineIdx++,this.lineTokens=this.textModel.getLineTokens(this.lineIdx+1),this.lineTokenOffset=0,this.line=this.lineTokens.getLineContent(),this.lineCharOffset=0,i++}}const n=yQ(e,t,this.lineIdx,this.lineCharOffset);return new uc(n,0,-1,Si.getEmpty(),new mf(n))}}class MQ{constructor(e,t){this.text=e,this._offset=Qa,this.idx=0;const n=t.getRegExpStr()?new RegExp(t.getRegExpStr()+`| -`,"g"):null,s=[];let o,a=0,l=0,c=0,h=0;const u=new Array;for(let g=0;g<60;g++)u.push(new uc(di(0,g),0,-1,Si.getEmpty(),new mf(di(0,g))));const d=new Array;for(let g=0;g<60;g++)d.push(new uc(di(1,g),0,-1,Si.getEmpty(),new mf(di(1,g))));if(n)for(n.lastIndex=0;(o=n.exec(e))!==null;){const g=o.index,p=o[0];if(p===` -`)a++,l=g+1;else{if(c!==g){let _;if(h===a){const v=g-c;if(v<u.length)_=u[v];else{const b=di(0,v);_=new uc(b,0,-1,Si.getEmpty(),new mf(b))}}else{const v=a-h,b=g-l;if(v===1&&b<d.length)_=d[b];else{const C=di(v,b);_=new uc(C,0,-1,Si.getEmpty(),new mf(C))}}s.push(_)}s.push(t.getToken(p)),c=g+p.length,h=a}}const f=e.length;if(c!==f){const g=h===a?di(0,f-c):di(a-h,f-l);s.push(new uc(g,0,-1,Si.getEmpty(),new mf(g)))}this.length=di(a,f-l),this.tokens=s}get offset(){return this._offset}read(){return this.tokens[this.idx++]||null}peek(){return this.tokens[this.idx]||null}skip(e){throw new AU}}class rw{constructor(e){this.map=e,this.hasRegExp=!1,this._regExpGlobal=null}static createFromLanguage(e,t){function i(l,c){return t.getKey(`${l}:::${c}`)}const n=[...ze.getColorizedBracketPairs(e)],s=new Map,o=new Set;for(const[l,c]of n){o.add(l);let h=s.get(c);const u=i(e,l);h||(h={openingBrackets:Si.getEmpty(),first:u},s.set(c,h)),h.openingBrackets=h.openingBrackets.add(u,OO)}const a=new Map;for(const[l,c]of s){const h=di(0,l.length);a.set(l,new uc(h,2,c.first,c.openingBrackets,jh.create(h)))}for(const l of o){const c=di(0,l.length),h=i(e,l);a.set(l,new uc(c,1,h,Si.getEmpty().add(h,OO),jh.create(c)))}return new rw(a)}getRegExpStr(){if(this.isEmpty)return null;{const e=[...this.map.keys()];return e.sort(),e.reverse(),e.map(t=>Cs(t)).join("|")}}get regExpGlobal(){if(!this.hasRegExp){const e=this.getRegExpStr();this._regExpGlobal=e?new RegExp(e,"g"):null,this.hasRegExp=!0}return this._regExpGlobal}getToken(e){return this.map.get(e)}get isEmpty(){return this.map.size===0}}class PQ{constructor(e){this.denseKeyProvider=e,this.languageIdToBracketTokens=new Map}didLanguageChange(e){const t=this.languageIdToBracketTokens.get(e);if(!t)return!1;const i=rw.createFromLanguage(e,this.denseKeyProvider).getRegExpStr();return t.getRegExpStr()!==i}getSingleLanguageBracketTokens(e){let t=this.languageIdToBracketTokens.get(e);return t||(t=rw.createFromLanguage(e,this.denseKeyProvider),this.languageIdToBracketTokens.set(e,t)),t}}function OQ(r){if(r.length===0)return null;if(r.length===1)return r[0];let e=0;function t(){if(e>=r.length)return null;const o=e,a=r[o].listHeight;for(e++;e<r.length&&r[e].listHeight===a;)e++;return e-o>=2?CF(o===0&&e===r.length?r:r.slice(o,e),!1):r[o]}let i=t(),n=t();if(!n)return i;for(let o=t();o;o=t())wF(i,n)<=wF(n,o)?(i=_D(i,n),n=o):n=_D(n,o);return _D(i,n)}function CF(r,e=!1){if(r.length===0)return null;if(r.length===1)return r[0];let t=r.length;for(;t>3;){const i=t>>1;for(let n=0;n<i;n++){const s=n<<1;r[n]=Jo.create23(r[s],r[s+1],s+3===t?r[s+2]:null,e)}t=i}return Jo.create23(r[0],r[1],t>=3?r[2]:null,e)}function wF(r,e){return Math.abs(r.listHeight-e.listHeight)}function _D(r,e){return r.listHeight===e.listHeight?Jo.create23(r,e,null,!1):r.listHeight>e.listHeight?FQ(r,e):BQ(e,r)}function FQ(r,e){r=r.toMutable();let t=r;const i=new Array;let n;for(;;){if(e.listHeight===t.listHeight){n=e;break}if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeLastElementMutable()}for(let s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=Jo.create23(o.unappendChild(),n,null,!1):(o.appendChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?Jo.create23(r,n,null,!1):r}function BQ(r,e){r=r.toMutable();let t=r;const i=new Array;for(;e.listHeight!==t.listHeight;){if(t.kind!==4)throw new Error("unexpected");i.push(t),t=t.makeFirstElementMutable()}let n=e;for(let s=i.length-1;s>=0;s--){const o=i[s];n?o.childrenLength>=3?n=Jo.create23(n,o.unprependChild(),null,!1):(o.prependChildOfSameHeight(n),n=void 0):o.handleChildrenChanged()}return n?Jo.create23(n,r,null,!1):r}class WQ{constructor(e){this.lastOffset=Qa,this.nextNodes=[e],this.offsets=[Qa],this.idxs=[]}readLongestNodeAt(e,t){if(fD(e,this.lastOffset))throw new Error("Invalid offset");for(this.lastOffset=e;;){const i=nm(this.nextNodes);if(!i)return;const n=nm(this.offsets);if(fD(e,n))return;if(fD(n,e))if(Wn(n,i.length)<=e)this.nextNodeAfterCurrent();else{const s=bD(i);s!==-1?(this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)):this.nextNodeAfterCurrent()}else{if(t(i))return this.nextNodeAfterCurrent(),i;{const s=bD(i);if(s===-1){this.nextNodeAfterCurrent();return}else this.nextNodes.push(i.getChild(s)),this.offsets.push(n),this.idxs.push(s)}}}}nextNodeAfterCurrent(){for(;;){const e=nm(this.offsets),t=nm(this.nextNodes);if(this.nextNodes.pop(),this.offsets.pop(),this.idxs.length===0)break;const i=nm(this.nextNodes),n=bD(i,this.idxs[this.idxs.length-1]);if(n!==-1){this.nextNodes.push(i.getChild(n)),this.offsets.push(Wn(e,t.length)),this.idxs[this.idxs.length-1]=n;break}else this.idxs.pop()}}}function bD(r,e=-1){for(;;){if(e++,e>=r.childrenLength)return-1;if(r.getChild(e))return e}}function nm(r){return r.length>0?r[r.length-1]:void 0}function yF(r,e,t,i){return new VQ(r,e,t,i).parseDocument()}class VQ{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 WQ(i):void 0,this.positionMapper=new DQ(t,e.length)}parseDocument(){this._itemsConstructed=0,this._itemsFromCache=0;let e=this.parseList(Si.getEmpty());return e||(e=Jo.getEmpty()),e}parseList(e){const t=new Array;for(;;){const n=this.tokenizer.peek();if(!n||n.kind===2&&n.bracketIds.intersects(e))break;const s=this.parseChild(e);s.kind===4&&s.childrenLength===0||t.push(s)}return this.oldNodeReader?OQ(t):CF(t,this.createImmutableLists)}parseChild(e){if(this.oldNodeReader){const i=this.positionMapper.getDistanceToNextChange(this.tokenizer.offset);if(!SQ(i)){const n=this.oldNodeReader.readLongestNodeAt(this.positionMapper.getOffsetBeforeChange(this.tokenizer.offset),s=>{if(!hc(s.length,i))return!1;const o=_F(s.length)===_F(i);return s.canBeReused(e,o)});if(n)return this._itemsFromCache++,this.tokenizer.skip(n.length),n}}this._itemsConstructed++;const t=this.tokenizer.read();switch(t.kind){case 2:return new TQ(t.bracketIds,t.length);case 0:return t.astNode;case 1:const i=e.merge(t.bracketIds),n=this.parseList(i),s=this.tokenizer.peek();return s&&s.kind===2&&(s.bracketId===t.bracketId||s.bracketIds.intersects(t.bracketIds))?(this.tokenizer.read(),tm.create(t.astNode,n,s.astNode)):tm.create(t.astNode,n,null);default:throw new Error("unexpected")}}}class HQ extends Y{constructor(e){super();this.textModel=e,this.didChangeDecorationsEmitter=new H,this.cache=this._register(new An),this.bracketsRequested=!1,this.options=e.getOptions().bracketPairColorizationOptions,this._register(ze.onDidChange(t=>{var i;((i=this.cache.value)===null||i===void 0?void 0:i.object.didLanguageChange(t.languageIdentifier.id))&&(this.cache.clear(),this.updateCache())})),this._register(e.onDidChangeOptions(t=>{this.options=e.getOptions().bracketPairColorizationOptions,this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeLanguage(t=>{this.cache.clear(),this.updateCache()})),this._register(e.onDidChangeAttached(()=>{this.updateCache()}))}get isDocumentSupported(){const e=5e4*100;return this.textModel.getValueLength()<=e}updateCache(){if(this.bracketsRequested||this.textModel.isAttachedToEditor()&&this.isDocumentSupported&&this.options.enabled){if(!this.cache.value){const e=new le;this.cache.value=zQ(e.add(new $Q(this.textModel)),e),e.add(this.cache.value.object.onDidChangeDecorations(t=>this.didChangeDecorationsEmitter.fire(t))),this.didChangeDecorationsEmitter.fire()}}else this.cache.clear(),this.didChangeDecorationsEmitter.fire()}handleContentChanged(e){var t;(t=this.cache.value)===null||t===void 0||t.object.handleContentChanged(e)}getDecorationsInRange(e,t,i){var n;return t===void 0?[]:this.options.enabled?((n=this.cache.value)===null||n===void 0?void 0:n.object.getDecorationsInRange(e,t,i))||[]:[]}getAllDecorations(e,t){var i;return e===void 0?[]:this.options.enabled?((i=this.cache.value)===null||i===void 0?void 0:i.object.getAllDecorations(e,t))||[]:[]}onDidChangeDecorations(e){return this.didChangeDecorationsEmitter.event(e)}getBracketPairsInRange(e){var t;return this.bracketsRequested=!0,this.updateCache(),((t=this.cache.value)===null||t===void 0?void 0:t.object.getBracketPairsInRange(e))||[]}}function zQ(r,e){return{object:r,dispose:()=>e==null?void 0:e.dispose()}}class $Q extends Y{constructor(e){super();if(this.textModel=e,this.didChangeDecorationsEmitter=new H,this.colorProvider=new xF,this.denseKeyProvider=new NY,this.brackets=new PQ(this.denseKeyProvider),this.onDidChangeDecorations=this.didChangeDecorationsEmitter.event,this._register(e.onBackgroundTokenizationStateChanged(()=>{if(e.backgroundTokenizationState===2){const t=this.initialAstWithoutTokens===void 0;this.initialAstWithoutTokens=void 0,t||this.didChangeDecorationsEmitter.fire()}})),this._register(e.onDidChangeTokens(({ranges:t})=>{const i=t.map(n=>new vF(di(n.fromLineNumber-1,0),di(n.toLineNumber,0),di(n.toLineNumber-n.fromLineNumber+1,0)));this.astWithTokens=this.parseDocumentFromTextBuffer(i,this.astWithTokens,!1),this.initialAstWithoutTokens||this.didChangeDecorationsEmitter.fire()})),e.backgroundTokenizationState===0){const t=this.brackets.getSingleLanguageBracketTokens(this.textModel.getLanguageIdentifier().id),i=new MQ(this.textModel.getValue(),t);this.initialAstWithoutTokens=yF(i,[],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens}else e.backgroundTokenizationState===2?(this.initialAstWithoutTokens=void 0,this.astWithTokens=this.parseDocumentFromTextBuffer([],void 0,!1)):e.backgroundTokenizationState===1&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer([],void 0,!0),this.astWithTokens=this.initialAstWithoutTokens)}didLanguageChange(e){return this.brackets.didLanguageChange(e)}handleContentChanged(e){const t=e.changes.map(i=>{const n=k.lift(i.range);return new vF(iw(n.getStartPosition()),iw(n.getEndPosition()),xQ(i.text))}).reverse();this.astWithTokens=this.parseDocumentFromTextBuffer(t,this.astWithTokens,!1),this.initialAstWithoutTokens&&(this.initialAstWithoutTokens=this.parseDocumentFromTextBuffer(t,this.initialAstWithoutTokens,!1))}parseDocumentFromTextBuffer(e,t,i){const n=t,s=new AQ(this.textModel,this.brackets);return yF(s,e,n,i)}getBracketsInRange(e){const t=di(e.startLineNumber-1,e.startColumn-1),i=di(e.endLineNumber-1,e.endColumn-1),n=new Array,s=this.initialAstWithoutTokens||this.astWithTokens;return rm(s,Qa,s.length,t,i,n),n}getDecorationsInRange(e,t,i){const n=new Array,s=this.getBracketsInRange(e);for(const o of s)n.push({id:`bracket${o.hash()}`,options:{description:"BracketPairColorization",inlineClassName:this.colorProvider.getInlineClassName(o)},ownerId:0,range:o.range});return n}getAllDecorations(e,t){return this.getDecorationsInRange(new k(1,1,this.textModel.getLineCount(),1),e,t)}getBracketPairsInRange(e){const t=new Array,i=iw(e.getStartPosition()),n=iw(e.getEndPosition()),s=this.initialAstWithoutTokens||this.astWithTokens;return SF(s,Qa,s.length,i,n,t),t}}function rm(r,e,t,i,n,s,o=0){if(r.kind===1){const a=em(e,t);s.push(new LF(a,o-1,!1))}else if(r.kind===3){const a=em(e,t);s.push(new LF(a,o-1,!0))}else if(r.kind===4)for(const a of r.children)t=Wn(e,a.length),hc(e,n)&&tw(t,i)&&rm(a,e,t,i,n,s,o),e=t;else if(r.kind===2){o++;{const a=r.openingBracket;t=Wn(e,a.length),hc(e,n)&&tw(t,i)&&rm(a,e,t,i,n,s,o),e=t}if(r.child){const a=r.child;t=Wn(e,a.length),hc(e,n)&&tw(t,i)&&rm(a,e,t,i,n,s,o),e=t}if(r.closingBracket){const a=r.closingBracket;t=Wn(e,a.length),hc(e,n)&&tw(t,i)&&rm(a,e,t,i,n,s,o),e=t}}}function SF(r,e,t,i,n,s,o=0){var a;if(r.kind===2){const c=Wn(e,r.openingBracket.length);s.push(new EK(em(e,t),em(e,c),r.closingBracket?em(Wn(c,((a=r.child)===null||a===void 0?void 0:a.length)||Qa),t):void 0,o)),o++}let l=e;for(const c of r.children){const h=l;l=Wn(l,c.length),hc(h,n)&&hc(i,l)&&SF(c,h,l,i,n,s,o)}}class LF{constructor(e,t,i){this.range=e,this.level=t,this.isInvalid=i}hash(){return`${this.range.toString()}-${this.level}`}}class xF{constructor(){this.unexpectedClosingBracketClassName="unexpected-closing-bracket"}getInlineClassName(e){return e.isInvalid?this.unexpectedClosingBracketClassName:this.getInlineClassNameOfLevel(e.level)}getInlineClassNameOfLevel(e){return`bracket-highlighting-${e%30}`}}Lt((r,e)=>{const t=[uF,dF,fF,gF,pF,mF],i=new xF;e.addRule(`.monaco-editor .${i.unexpectedClosingBracketClassName} { color: ${r.getColor(CQ)}; }`);let n=t.map(s=>r.getColor(s)).filter(s=>!!s).filter(s=>!s.isTransparent());for(let s=0;s<30;s++){const o=n[s%n.length];e.addRule(`.monaco-editor .${i.getInlineClassNameOfLevel(s)} { color: ${o}; }`)}});class Ot{static visibleColumnFromColumn(e,t,i){const n=e.length,s=t-1<n?t-1:n;let o=0,a=0;for(;a<s;){const l=Pa(e,s,a);if(a+=l>=65536?2:1,l===9)o=Ot.nextRenderTabStop(o,i);else{let c=Bd(l);for(;a<s;){const h=Pa(e,s,a),u=Bd(h);if(gp(c,u))break;a+=h>=65536?2:1,c=u}Ys(l)||fp(l)?o=o+2:o=o+1}}return o}static visibleColumnsByColumns(e,t){const i=e.length;let n=new Array;n.push(-1);let s=0,o=0;for(;o<i;){const a=Pa(e,i,o);if(o+=a>=65536?2:1,n.push(s),a>=65536&&n.push(s),a===9)s=Ot.nextRenderTabStop(s,t);else{let l=Bd(a);for(;o<i;){const c=Pa(e,i,o),h=Bd(c);if(gp(l,h))break;o+=c>=65536?2:1,n.push(s),a>=65536&&n.push(s),l=h}Ys(a)||fp(a)?s=s+2:s=s+1}}return n.push(s),n}static visibleColumnFromColumn2(e,t,i){return this.visibleColumnFromColumn(t.getLineContent(i.lineNumber),i.column,e.tabSize)}static columnFromVisibleColumn(e,t,i){if(t<=0)return 1;const n=e.length;let s=0,o=1,a=0;for(;a<n;){const l=Pa(e,n,a);a+=l>=65536?2:1;let c;if(l===9)c=Ot.nextRenderTabStop(s,i);else{let u=Bd(l);for(;a<n;){const d=Pa(e,n,a),f=Bd(d);if(gp(u,f))break;a+=d>=65536?2:1,u=f}Ys(l)||fp(l)?c=s+2:c=s+1}const h=a+1;if(c>=t){const u=t-s;return c-t<u?h:o}s=c,o=h}return n+1}static columnFromVisibleColumn2(e,t,i,n){let s=this.columnFromVisibleColumn(t.getLineContent(i),n,e.tabSize),o=t.getLineMinColumn(i);if(s<o)return o;let a=t.getLineMaxColumn(i);return s>a?a:s}static nextRenderTabStop(e,t){return e+t-e%t}static nextIndentTabStop(e,t){return e+t-e%t}static prevRenderTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}static prevIndentTabStop(e,t){return Math.max(0,e-1-(e-1)%t)}}function UQ(){return new yY}function jQ(r){const e=UQ();return e.acceptChunk(r),e.finish()}function kF(r,e){return(typeof r=="string"?jQ(r):r).create(e)}let sw=0;const KQ=999,qQ=1e4;class GQ{constructor(e){this._source=e,this._eos=!1}read(){if(this._eos)return null;let e=[],t=0,i=0;do{let n=this._source.read();if(n===null)return this._eos=!0,t===0?null:e.join("");if(n.length>0&&(e[t++]=n,i+=n.length),i>=64*1024)return e.join("")}while(!0)}}const sm=()=>{throw new Error("Invalid change accessor")};class Ja{constructor(){this._searchCanceledBrand=void 0}}Ja.INSTANCE=new Ja;function ow(r){return r instanceof Ja?null:r}class Ti extends Y{constructor(e,t,i,n=null,s){super();this._onWillDispose=this._register(new H),this.onWillDispose=this._onWillDispose.event,this._onDidChangeDecorations=this._register(new QQ(h=>this.handleBeforeFireDecorationsChangedEvent(h))),this.onDidChangeDecorations=this._onDidChangeDecorations.event,this._onDidChangeLanguage=this._register(new H),this.onDidChangeLanguage=this._onDidChangeLanguage.event,this._onDidChangeLanguageConfiguration=this._register(new H),this.onDidChangeLanguageConfiguration=this._onDidChangeLanguageConfiguration.event,this._onDidChangeTokens=this._register(new H),this.onDidChangeTokens=this._onDidChangeTokens.event,this._onDidChangeOptions=this._register(new H),this.onDidChangeOptions=this._onDidChangeOptions.event,this._onDidChangeAttached=this._register(new H),this.onDidChangeAttached=this._onDidChangeAttached.event,this._onDidChangeContentOrInjectedText=this._register(new H),this.onDidChangeContentOrInjectedText=this._onDidChangeContentOrInjectedText.event,this._eventEmitter=this._register(new JQ),this._backgroundTokenizationState=0,this._onBackgroundTokenizationStateChanged=this._register(new H),this.onBackgroundTokenizationStateChanged=this._onBackgroundTokenizationStateChanged.event,this._register(this._eventEmitter.fastEvent(h=>{this._onDidChangeContentOrInjectedText.fire(h.rawContentChangedEvent)})),sw++,this.id="$model"+sw,this.isForSimpleWidget=t.isForSimpleWidget,typeof n=="undefined"||n===null?this._associatedResource=Ie.parse("inmemory://model/"+sw):this._associatedResource=n,this._undoRedoService=s,this._attachedEditorCount=0;const{textBuffer:o,disposable:a}=kF(e,t.defaultEOL);this._buffer=o,this._bufferDisposable=a,this._options=Ti.resolveOptions(this._buffer,t);const l=this._buffer.getLineCount(),c=this._buffer.getValueLengthInRange(new k(1,1,l,this._buffer.getLineLength(l)+1),0);t.largeFileOptimizations?this._isTooLargeForTokenization=c>Ti.LARGE_FILE_SIZE_THRESHOLD||l>Ti.LARGE_FILE_LINE_COUNT_THRESHOLD:this._isTooLargeForTokenization=!1,this._isTooLargeForSyncing=c>Ti.MODEL_SYNC_LIMIT,this._versionId=1,this._alternativeVersionId=1,this._initialUndoRedoSnapshot=null,this._isDisposed=!1,this._isDisposing=!1,this._languageIdentifier=i||Bv,this._languageRegistryListener=ze.onDidChange(h=>{h.languageIdentifier.id===this._languageIdentifier.id&&this._onDidChangeLanguageConfiguration.fire({})}),this._instanceId=h2(sw),this._lastDecorationId=0,this._decorations=Object.create(null),this._decorationsTree=new EF,this._commandManager=new Ik(this,s),this._isUndoing=!1,this._isRedoing=!1,this._trimAutoWhitespaceLines=null,this._tokens=new as,this._tokens2=new Wk,this._tokenization=new EY(this),this._bracketPairColorizer=this._register(new HQ(this)),this._decorationProvider=this._bracketPairColorizer,this._register(this._decorationProvider.onDidChangeDecorations(()=>{this._onDidChangeDecorations.beginDeferredEmit(),this._onDidChangeDecorations.fire(),this._onDidChangeDecorations.endDeferredEmit()}))}static resolveOptions(e,t){if(t.detectIndentation){const i=vO(e,t.tabSize,t.insertSpaces);return new wv({tabSize:i.tabSize,indentSize:i.tabSize,insertSpaces:i.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}return new wv({tabSize:t.tabSize,indentSize:t.indentSize,insertSpaces:t.insertSpaces,trimAutoWhitespace:t.trimAutoWhitespace,defaultEOL:t.defaultEOL,bracketPairColorizationOptions:t.bracketPairColorizationOptions})}onDidChangeContentFast(e){return this._eventEmitter.fastEvent(t=>e(t.contentChangedEvent))}onDidChangeContent(e){return this._eventEmitter.slowEvent(t=>e(t.contentChangedEvent))}get backgroundTokenizationState(){return this._backgroundTokenizationState}handleTokenizationProgress(e){if(this._backgroundTokenizationState===2)return;const t=e?2:1;this._backgroundTokenizationState!==t&&(this._backgroundTokenizationState=t,this._onBackgroundTokenizationStateChanged.fire())}dispose(){this._isDisposing=!0,this._onWillDispose.fire(),this._languageRegistryListener.dispose(),this._tokenization.dispose(),this._isDisposed=!0,super.dispose(),this._bufferDisposable.dispose(),this._isDisposing=!1;const e=new gf([],"",` -`,!1,!1,!0,!0);e.dispose(),this._buffer=e}_assertNotDisposed(){if(this._isDisposed)throw new Error("Model is disposed!")}_emitContentChangedEvent(e,t){this._bracketPairColorizer.handleContentChanged(t),!this._isDisposing&&this._eventEmitter.fire(new VC(e,t))}setValue(e){if(this._assertNotDisposed(),e===null)return;const{textBuffer:t,disposable:i}=kF(e,this._options.defaultEOL);this._setValueFromTextBuffer(t,i)}_createContentChanged2(e,t,i,n,s,o,a){return{changes:[{range:e,rangeOffset:t,rangeLength:i,text:n}],eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:s,isRedoing:o,isFlush:a}}_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._tokens.flush(),this._tokens2.flush(),this._decorations=Object.create(null),this._decorationsTree=new EF,this._commandManager.clear(),this._trimAutoWhitespaceLines=null,this._emitContentChangedEvent(new Bh([new SY],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,o),0,n,this.getValue(),!1,!1,!0))}setEOL(e){this._assertNotDisposed();const t=e===1?`\r -`:` -`;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 Bh([new kY],this._versionId,!1,!1),this._createContentChanged2(new k(1,1,s,o),0,n,this.getValue(),!1,!1,!1))}_onBeforeEOLChange(){this._decorationsTree.ensureAllNodesHaveRanges(this)}_onAfterEOLChange(){const e=this.getVersionId(),t=this._decorationsTree.collectNodesPostOrder();for(let i=0,n=t.length;i<n;i++){const s=t[i],o=s.range,a=s.cachedAbsoluteStart-s.start,l=this._buffer.getOffsetAt(o.startLineNumber,o.startColumn),c=this._buffer.getOffsetAt(o.endLineNumber,o.endColumn);s.cachedAbsoluteStart=l,s.cachedAbsoluteEnd=c,s.cachedVersionId=e,s.start=l-a,s.end=c-a,tc(s)}}onBeforeAttached(){this._attachedEditorCount++,this._attachedEditorCount===1&&this._onDidChangeAttached.fire(void 0)}onBeforeDetached(){this._attachedEditorCount--,this._attachedEditorCount===0&&this._onDidChangeAttached.fire(void 0)}isAttachedToEditor(){return this._attachedEditorCount>0}getAttachedEditorCount(){return this._attachedEditorCount}isTooLargeForSyncing(){return this._isTooLargeForSyncing}isTooLargeForTokenization(){return this._isTooLargeForTokenization}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 s=this._buffer.getLineLength(n);s>=qQ?t+=s:e+=s}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();let t=typeof e.tabSize!="undefined"?e.tabSize:this._options.tabSize,i=typeof e.indentSize!="undefined"?e.indentSize:this._options.indentSize,n=typeof e.insertSpaces!="undefined"?e.insertSpaces:this._options.insertSpaces,s=typeof e.trimAutoWhitespace!="undefined"?e.trimAutoWhitespace:this._options.trimAutoWhitespace,o=typeof e.bracketColorizationOptions!="undefined"?e.bracketColorizationOptions:this._options.bracketPairColorizationOptions,a=new wv({tabSize:t,indentSize:i,insertSpaces:n,defaultEOL:this._options.defaultEOL,trimAutoWhitespace:s,bracketPairColorizationOptions:o});if(this._options.equals(a))return;let l=this._options.createChangeEvent(a);this._options=a,this._onDidChangeOptions.fire(l)}detectIndentation(e,t){this._assertNotDisposed();let i=vO(this._buffer,t,e);this.updateOptions({insertSpaces:i.insertSpaces,tabSize:i.tabSize,indentSize:i.tabSize})}static _normalizeIndentationFromWhitespace(e,t,i){let n=0;for(let o=0;o<e.length;o++)e.charAt(o)===" "?n+=t:n++;let s="";if(!i){let o=Math.floor(n/t);n=n%t;for(let a=0;a<o;a++)s+=" "}for(let o=0;o<n;o++)s+=" ";return s}static normalizeIndentation(e,t,i){let n=dr(e);return n===-1&&(n=e.length),Ti._normalizeIndentationFromWhitespace(e.substring(0,n),t,i)+e.substring(n)}normalizeIndentation(e){return this._assertNotDisposed(),Ti.normalizeIndentation(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(l2.source,!1,!0,!1,null,!1,1073741824);this._buffer.resetMightContainUnusualLineTerminators(),this.pushEditOperations(e,t.map(i=>({range:i.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();let t=this._validatePosition(e.lineNumber,e.column,0);return this._buffer.getOffsetAt(t.lineNumber,t.column)}getPositionAt(e){this._assertNotDisposed();let 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){this._assertNotDisposed();const i=this.getFullModelRange(),n=this.getValueInRange(i,e);return t?this._buffer.getBOM()+n:n}createSnapshot(e=!1){return new GQ(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 Error("Illegal value for lineNumber");return this._buffer.getLineContent(e)}getLineLength(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)}getLinesContent(){return this._assertNotDisposed(),this._buffer.getLinesContent()}getEOL(){return this._assertNotDisposed(),this._buffer.getEOL()}getEndOfLineSequence(){return this._assertNotDisposed(),this._buffer.getEOL()===` -`?0:1}getLineMinColumn(e){return this._assertNotDisposed(),1}getLineMaxColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineLength(e)+1}getLineFirstNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._buffer.getLineFirstNonWhitespaceColumn(e)}getLineLastNonWhitespaceColumn(e){if(this._assertNotDisposed(),e<1||e>this.getLineCount())throw new Error("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(typeof i=="number"&&!isNaN(i)?i:1),o=Math.floor(typeof n=="number"&&!isNaN(n)?n:1);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 u=this.getLineMaxColumn(s);o>=u&&(o=u)}const a=e.endLineNumber,l=e.endColumn;let c=Math.floor(typeof a=="number"&&!isNaN(a)?a:1),h=Math.floor(typeof l=="number"&&!isNaN(l)?l:1);if(c<1)c=1,h=1;else if(c>t)c=t,h=this.getLineMaxColumn(c);else if(h<=1)h=1;else{const u=this.getLineMaxColumn(c);h>=u&&(h=u)}return i===s&&n===o&&a===c&&l===h&&e instanceof k&&!(e instanceof be)?e:new k(s,o,c,h)}_isValidPosition(e,t,i){if(typeof e!="number"||typeof t!="number"||isNaN(e)||isNaN(t)||e<1||t<1||(e|0)!==e||(t|0)!==t)return!1;const n=this._buffer.getLineCount();if(e>n)return!1;if(t===1)return!0;const s=this.getLineMaxColumn(e);if(t>s)return!1;if(i===1){const o=this._buffer.getLineCharCode(e,t-2);if(ji(o))return!1}return!0}_validatePosition(e,t,i){const n=Math.floor(typeof e=="number"&&!isNaN(e)?e:1),s=Math.floor(typeof t=="number"&&!isNaN(t)?t:1),o=this._buffer.getLineCount();if(n<1)return new $(1,1);if(n>o)return new $(o,this.getLineMaxColumn(o));if(s<=1)return new $(n,1);const a=this.getLineMaxColumn(n);if(s>=a)return new $(n,a);if(i===1){const l=this._buffer.getLineCharCode(n,s-2);if(ji(l))return new $(n,s-1)}return new $(n,s)}validatePosition(e){const t=1;return this._assertNotDisposed(),e instanceof $&&this._isValidPosition(e.lineNumber,e.column,t)?e:this._validatePosition(e.lineNumber,e.column,t)}_isValidRange(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn;if(!this._isValidPosition(i,n,0)||!this._isValidPosition(s,o,0))return!1;if(t===1){const a=n>1?this._buffer.getLineCharCode(i,n-2):0,l=o>1&&o<=this._buffer.getLineLength(s)?this._buffer.getLineCharCode(s,o-2):0,c=ji(a),h=ji(l);return!c&&!h}return!0}validateRange(e){const t=1;if(this._assertNotDisposed(),e instanceof k&&!(e instanceof be)&&this._isValidRange(e,t))return e;const i=this._validatePosition(e.startLineNumber,e.startColumn,0),n=this._validatePosition(e.endLineNumber,e.endColumn,0),s=i.lineNumber,o=i.column,a=n.lineNumber,l=n.column;{const c=o>1?this._buffer.getLineCharCode(s,o-2):0,h=l>1&&l<=this._buffer.getLineLength(a)?this._buffer.getLineCharCode(a,l-2):0,u=ji(c),d=ji(h);return!u&&!d?new k(s,o,a,l):s===a&&o===l?new k(s,o-1,a,l-1):u&&d?new k(s,o-1,a,l+1):u?new k(s,o-1,a,l):new k(s,o,a,l+1)}}modifyPosition(e,t){this._assertNotDisposed();let 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 k(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,a=KQ){this._assertNotDisposed();let l=null;t!==null&&(Array.isArray(t)||(t=[t]),t.every(u=>k.isIRange(u))&&(l=t.map(u=>this.validateRange(u)))),l===null&&(l=[this.getFullModelRange()]),l=l.sort((u,d)=>u.startLineNumber-d.startLineNumber||u.startColumn-d.startColumn);const c=[];c.push(l.reduce((u,d)=>k.areIntersecting(u,d)?u.plusRange(d):(c.push(u),d)));let h;if(!i&&e.indexOf(` -`)<0){const d=new Ph(e,i,n,s).parseSearchRequest();if(!d)return[];h=f=>this.findMatchesLineByLine(f,d,o,a)}else h=u=>FC.findMatches(this,new Ph(e,i,n,s),u,o,a);return c.map(h).reduce((u,d)=>u.concat(d),[])}findNextMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);if(!i&&e.indexOf(` -`)<0){const c=new Ph(e,i,n,s).parseSearchRequest();if(!c)return null;const h=this.getLineCount();let u=new k(a.lineNumber,a.column,h,this.getLineMaxColumn(h)),d=this.findMatchesLineByLine(u,c,o,1);return FC.findNextMatch(this,new Ph(e,i,n,s),a,o),d.length>0||(u=new k(1,1,a.lineNumber,this.getLineMaxColumn(a.lineNumber)),d=this.findMatchesLineByLine(u,c,o,1),d.length>0)?d[0]:null}return FC.findNextMatch(this,new Ph(e,i,n,s),a,o)}findPreviousMatch(e,t,i,n,s,o){this._assertNotDisposed();const a=this.validatePosition(t);return FC.findPreviousMatch(this,new Ph(e,i,n,s),a,o)}pushStackElement(){this._commandManager.pushStackElement()}popStackElement(){this._commandManager.popStackElement()}pushEOL(e){if((this.getEOL()===` -`?0:1)!==e)try{this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEOL(e)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_validateEditOperation(e){return e instanceof hx?e:new hx(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<n;i++)t[i]=this._validateEditOperation(e[i]);return t}pushEditOperations(e,t,i){try{return this._onDidChangeDecorations.beginDeferredEmit(),this._eventEmitter.beginDeferredEmit(),this._pushEditOperations(e,this._validateEditOperations(t),i)}finally{this._eventEmitter.endDeferredEmit(),this._onDidChangeDecorations.endDeferredEmit()}}_pushEditOperations(e,t,i){if(this._options.trimAutoWhitespace&&this._trimAutoWhitespaceLines){let n=t.map(o=>({range:this.validateRange(o.range),text:o.text})),s=!0;if(e)for(let o=0,a=e.length;o<a;o++){let l=e[o],c=!1;for(let h=0,u=n.length;h<u;h++){let d=n[h].range,f=d.startLineNumber>l.endLineNumber,g=l.startLineNumber>d.endLineNumber;if(!f&&!g){c=!0;break}}if(!c){s=!1;break}}if(s)for(let o=0,a=this._trimAutoWhitespaceLines.length;o<a;o++){let l=this._trimAutoWhitespaceLines[o],c=this.getLineMaxColumn(l),h=!0;for(let u=0,d=n.length;u<d;u++){let f=n[u].range,g=n[u].text;if(!(l<f.startLineNumber||l>f.endLineNumber)&&!(l===f.startLineNumber&&f.startColumn===c&&f.isEmpty()&&g&&g.length>0&&g.charAt(0)===` -`)&&!(l===f.startLineNumber&&f.startColumn===1&&f.isEmpty()&&g&&g.length>0&&g.charAt(g.length-1)===` -`)){h=!1;break}}if(h){const u=new k(l,1,l,c);t.push(new hx(null,u,null,!1,!1,!1))}}this._trimAutoWhitespaceLines=null}return this._initialUndoRedoSnapshot===null&&(this._initialUndoRedoSnapshot=this._undoRedoService.createSnapshot(this.uri)),this._commandManager.pushEditOperation(e,t,i)}_applyUndo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.newPosition),l=this.getPositionAt(o.newEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:o.oldText}});this._applyUndoRedoEdits(s,t,!0,!1,i,n)}_applyRedo(e,t,i,n){const s=e.map(o=>{const a=this.getPositionAt(o.oldPosition),l=this.getPositionAt(o.oldEnd);return{range:new k(a.lineNumber,a.column,l.lineNumber,l.column),text:o.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,o.length!==0){for(let c=0,h=o.length;c<h;c++){const u=o[c],[d,f,g]=ff(u.text);this._tokens.acceptEdit(u.range,d,f),this._tokens2.acceptEdit(u.range,d,f,g,u.text.length>0?u.text.charCodeAt(0):0),this._decorationsTree.acceptReplace(u.rangeOffset,u.rangeLength,u.text.length,u.forceMoveMarkers)}let a=[];this._increaseVersionId();let l=i;for(let c=0,h=o.length;c<h;c++){const u=o[c],[d]=ff(u.text);this._onDidChangeDecorations.fire();const f=u.range.startLineNumber,g=u.range.endLineNumber,p=g-f,_=d,v=Math.min(p,_),b=_-p,C=s-l-b+f,y=C,x=C+_,S=this._decorationsTree.getInjectedTextInInterval(this,this.getOffsetAt(new $(y,1)),this.getOffsetAt(new $(x,this.getLineMaxColumn(x))),0),w=ao.fromDecorations(S),L=new Np(w);for(let N=v;N>=0;N--){const P=f+N,B=C+N;L.takeFromEndWhile(j=>j.lineNumber>B);const U=L.takeFromEndWhile(j=>j.lineNumber===B);a.push(new MO(P,this.getLineContent(B),U))}if(v<p){const N=f+v;a.push(new LY(N+1,g))}if(v<_){const N=new Np(w),P=f+v,B=_-v,U=s-l-B+P+1;let j=[],re=[];for(let te=0;te<B;te++){let A=U+te;re[te]=this.getLineContent(A),N.takeWhile(D=>D.lineNumber<A),j[te]=N.takeWhile(D=>D.lineNumber===A)}a.push(new xY(P+1,f+_,re,j))}l+=b}this._emitContentChangedEvent(new Bh(a,this.getVersionId(),this._isUndoing,this._isRedoing),{changes:o,eol:this._buffer.getEOL(),versionId:this.getVersionId(),isUndoing:this._isUndoing,isRedoing:this._isRedoing,isFlush:!1})}return n.reverseEdits===null?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(e===null||e.size===0)return;const i=[...e].map(n=>new MO(n,this.getLineContent(n),this._getInjectedTextInLine(n)));this._onDidChangeContentOrInjectedText.fire(new PO(i))}changeDecorations(e,t=0){this._assertNotDisposed();try{return this._onDidChangeDecorations.beginDeferredEmit(),this._changeDecorations(t,e)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_changeDecorations(e,t){let i={addDecoration:(s,o)=>this._deltaDecorationsImpl(e,[],[{range:s,options:o}])[0],changeDecoration:(s,o)=>{this._changeDecorationImpl(s,o)},changeDecorationOptions:(s,o)=>{this._changeDecorationOptionsImpl(s,TF(o))},removeDecoration:s=>{this._deltaDecorationsImpl(e,[s],[])},deltaDecorations:(s,o)=>s.length===0&&o.length===0?[]:this._deltaDecorationsImpl(e,s,o)},n=null;try{n=t(i)}catch(s){Oe(s)}return i.addDecoration=sm,i.changeDecoration=sm,i.changeDecorationOptions=sm,i.removeDecoration=sm,i.deltaDecorations=sm,n}deltaDecorations(e,t,i=0){if(this._assertNotDisposed(),e||(e=[]),e.length===0&&t.length===0)return[];try{return this._onDidChangeDecorations.beginDeferredEmit(),this._deltaDecorationsImpl(i,e,t)}finally{this._onDidChangeDecorations.endDeferredEmit()}}_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:NF[i]}])[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),a=this._buffer.getOffsetAt(s.endLineNumber,s.endColumn);return this._decorationsTree.delete(n),n.reset(this.getVersionId(),o,a,s),n.setOptions(NF[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;i<n;i++){const s=t[i];this._decorationsTree.delete(s),delete this._decorations[s.id]}}getDecorationOptions(e){const t=this._decorations[e];return t?t.options:null}getDecorationRange(e){const t=this._decorations[e];return t?this._decorationsTree.getNodeRange(this,t):null}getLineDecorations(e,t=0,i=!1){return e<1||e>this.getLineCount()?[]:this.getLinesDecorations(e,e,t,i)}getLinesDecorations(e,t,i=0,n=!1){let s=this.getLineCount(),o=Math.min(s,Math.max(1,e)),a=Math.min(s,Math.max(1,t)),l=this.getLineMaxColumn(a);const c=new k(o,1,a,l),h=this._getDecorationsInRange(c,i,n);return h.push(...this._decorationProvider.getDecorationsInRange(c,i,n)),h}getDecorationsInRange(e,t=0,i=!1){let n=this.validateRange(e);const s=this._getDecorationsInRange(n,t,i);return s.push(...this._decorationProvider.getDecorationsInRange(n,t,i)),s}getOverviewRulerDecorations(e=0,t=!1){return this._decorationsTree.getAll(this,e,t,!0)}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 ao.fromDecorations(n).filter(s=>s.lineNumber===e)}getAllDecorations(e=0,t=!1){let i=this._decorationsTree.getAll(this,e,t,!1);return i=i.concat(this._decorationProvider.getAllDecorations(e,t)),i}_getDecorationsInRange(e,t,i){const n=this._buffer.getOffsetAt(e.startLineNumber,e.startColumn),s=this._buffer.getOffsetAt(e.endLineNumber,e.endColumn);return this._decorationsTree.getAllInInterval(this,n,s,t,i)}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 a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.endLineNumber)}if(i.options.before){const a=this.getDecorationRange(e);this._onDidChangeDecorations.recordLineAffectedByInjectedText(a.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 o=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.endLineNumber)}if(i.options.before||t.before){const o=this._decorationsTree.getNodeRange(this,i);this._onDidChangeDecorations.recordLineAffectedByInjectedText(o.startLineNumber)}n!==s?(this._decorationsTree.delete(i),i.setOptions(t),this._decorationsTree.insert(i)):i.setOptions(t)}_deltaDecorationsImpl(e,t,i){const n=this.getVersionId(),s=t.length;let o=0;const a=i.length;let l=0,c=new Array(a);for(;o<s||l<a;){let h=null;if(o<s){do h=this._decorations[t[o++]];while(!h&&o<s);if(h){if(h.options.after){const u=this._decorationsTree.getNodeRange(this,h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.endLineNumber)}if(h.options.before){const u=this._decorationsTree.getNodeRange(this,h);this._onDidChangeDecorations.recordLineAffectedByInjectedText(u.startLineNumber)}this._decorationsTree.delete(h),this._onDidChangeDecorations.checkAffectedAndFire(h.options)}}if(l<a){if(!h){const _=++this._lastDecorationId,v=`${this._instanceId};${_}`;h=new LO(v,0,0),this._decorations[v]=h}const u=i[l],d=this._validateRangeRelaxedNoAllocations(u.range),f=TF(u.options),g=this._buffer.getOffsetAt(d.startLineNumber,d.startColumn),p=this._buffer.getOffsetAt(d.endLineNumber,d.endColumn);h.ownerId=e,h.reset(n,g,p,d),h.setOptions(f),h.options.after&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(d.endLineNumber),h.options.before&&this._onDidChangeDecorations.recordLineAffectedByInjectedText(d.startLineNumber),this._onDidChangeDecorations.checkAffectedAndFire(f),this._decorationsTree.insert(h),c[l]=h.id,l++}else h&&delete this._decorations[h.id]}return c}setTokens(e,t=!1){if(e.length!==0){let i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];let a=0,l=0,c=!1;for(let h=0,u=o.tokens.length;h<u;h++){const d=o.startLineNumber+h;c?(this._tokens.setTokens(this._languageIdentifier.id,d-1,this._buffer.getLineLength(d),o.tokens[h],!1),l=d):this._tokens.setTokens(this._languageIdentifier.id,d-1,this._buffer.getLineLength(d),o.tokens[h],!0)&&(c=!0,a=d,l=d)}c&&i.push({fromLineNumber:a,toLineNumber:l})}i.length>0&&this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!1,ranges:i})}this.handleTokenizationProgress(t)}setSemanticTokens(e,t){this._tokens2.set(e,t),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:e!==null,ranges:[{fromLineNumber:1,toLineNumber:this.getLineCount()}]})}hasCompleteSemanticTokens(){return this._tokens2.isComplete()}hasSomeSemanticTokens(){return!this._tokens2.isEmpty()}setPartialSemanticTokens(e,t){if(this.hasCompleteSemanticTokens())return;const i=this._tokens2.setPartial(e,t);this._emitModelTokensChangedEvent({tokenizationSupportChanged:!1,semanticTokensApplied:!0,ranges:[{fromLineNumber:i.startLineNumber,toLineNumber:i.endLineNumber}]})}tokenizeViewport(e,t){e=Math.max(1,e),t=Math.min(this._buffer.getLineCount(),t),this._tokenization.tokenizeViewport(e,t)}clearTokens(){this._tokens.flush(),this._emitModelTokensChangedEvent({tokenizationSupportChanged:!0,semanticTokensApplied:!1,ranges:[{fromLineNumber:1,toLineNumber:this._buffer.getLineCount()}]})}_emitModelTokensChangedEvent(e){this._isDisposing||this._onDidChangeTokens.fire(e)}resetTokenization(){this._tokenization.reset()}forceTokenization(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");this._tokenization.forceTokenization(e)}isCheapToTokenize(e){return this._tokenization.isCheapToTokenize(e)}tokenizeIfCheap(e){this.isCheapToTokenize(e)&&this.forceTokenization(e)}getLineTokens(e){if(e<1||e>this.getLineCount())throw new Error("Illegal value for lineNumber");return this._getLineTokens(e)}_getLineTokens(e){const t=this.getLineContent(e),i=this._tokens.getTokens(this._languageIdentifier.id,e-1,t);return this._tokens2.addSemanticTokens(e,i)}getLanguageIdentifier(){return this._languageIdentifier}getModeId(){return this._languageIdentifier.language}setMode(e){if(this._languageIdentifier.id===e.id)return;let t={oldLanguage:this._languageIdentifier.language,newLanguage:e.language};this._languageIdentifier=e,this._onDidChangeLanguage.fire(t),this._onDidChangeLanguageConfiguration.fire({})}getLanguageIdAtPosition(e,t){const i=this.validatePosition(new $(e,t)),n=this.getLineTokens(i.lineNumber);return n.getLanguageId(n.findTokenIndexAtOffset(i.column-1))}getWordAtPosition(e){this._assertNotDisposed();const t=this.validatePosition(e),i=this.getLineContent(t.lineNumber),n=this._getLineTokens(t.lineNumber),s=n.findTokenIndexAtOffset(t.column-1),[o,a]=Ti._findLanguageBoundaries(n,s),l=Gb(t.column,ze.getWordDefinition(n.getLanguageId(s)),i.substring(o,a),o);if(l&&l.startColumn<=e.column&&e.column<=l.endColumn)return l;if(s>0&&o===t.column-1){const[c,h]=Ti._findLanguageBoundaries(n,s-1),u=Gb(t.column,ze.getWordDefinition(n.getLanguageId(s-1)),i.substring(c,h),c);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn)return u}return null}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,a=e.getCount();o<a&&e.getLanguageId(o)===i;o++)s=e.getEndOffset(o);return[n,s]}getWordUntilPosition(e){const t=this.getWordAtPosition(e);return t?{word:t.word.substr(0,e.column-t.startColumn),startColumn:t.startColumn,endColumn:e.column}:{word:"",startColumn:e.column,endColumn:e.column}}findMatchingBracketUp(e,t){let i=e.toLowerCase(),n=this.validatePosition(t),s=this._getLineTokens(n.lineNumber),o=s.getLanguageId(s.findTokenIndexAtOffset(n.column-1)),a=ze.getBracketsSupport(o);if(!a)return null;let l=a.textIsBracket[i];return l?ow(this._findMatchingBracketUp(l,n,null)):null}matchBracket(e){return this._matchBracket(this.validatePosition(e))}_establishBracketSearchOffsets(e,t,i,n){const s=t.getCount(),o=t.getLanguageId(n);let a=Math.max(0,e.column-1-i.maxBracketLength);for(let c=n-1;c>=0;c--){const h=t.getEndOffset(c);if(h<=a)break;if(Uo(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){a=h;break}}let l=Math.min(t.getLineContent().length,e.column-1+i.maxBracketLength);for(let c=n+1;c<s;c++){const h=t.getStartOffset(c);if(h>=l)break;if(Uo(t.getStandardTokenType(c))||t.getLanguageId(c)!==o){l=h;break}}return{searchStartOffset:a,searchEndOffset:l}}_matchBracket(e){const t=e.lineNumber,i=this._getLineTokens(t),n=this._buffer.getLineContent(t),s=i.findTokenIndexAtOffset(e.column-1);if(s<0)return null;const o=ze.getBracketsSupport(i.getLanguageId(s));if(o&&!Uo(i.getStandardTokenType(s))){let{searchStartOffset:a,searchEndOffset:l}=this._establishBracketSearchOffsets(e,i,o,s),c=null;for(;;){const h=Es.findNextBracketInRange(o.forwardRegex,t,n,a,l);if(!h)break;if(h.startColumn<=e.column&&e.column<=h.endColumn){const u=n.substring(h.startColumn-1,h.endColumn-1).toLowerCase(),d=this._matchFoundBracket(h,o.textIsBracket[u],o.textIsOpenBracket[u],null);if(d){if(d instanceof Ja)return null;c=d}}a=h.endColumn-1}if(c)return c}if(s>0&&i.getStartOffset(s)===e.column-1){const a=s-1,l=ze.getBracketsSupport(i.getLanguageId(a));if(l&&!Uo(i.getStandardTokenType(a))){let{searchStartOffset:c,searchEndOffset:h}=this._establishBracketSearchOffsets(e,i,l,a);const u=Es.findPrevBracketInRange(l.reversedRegex,t,n,c,h);if(u&&u.startColumn<=e.column&&e.column<=u.endColumn){const d=n.substring(u.startColumn-1,u.endColumn-1).toLowerCase(),f=this._matchFoundBracket(u,l.textIsBracket[d],l.textIsOpenBracket[d],null);if(f)return f instanceof Ja?null:f}}}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 Ja?s:[e,s]:null}_findMatchingBracketUp(e,t,i){const n=e.languageIdentifier.id,s=e.reversedRegex;let o=-1,a=0;const l=(c,h,u,d)=>{for(;;){if(i&&++a%100==0&&!i())return Ja.INSTANCE;const f=Es.findPrevBracketInRange(s,c,h,u,d);if(!f)break;const g=h.substring(f.startColumn-1,f.endColumn-1).toLowerCase();if(e.isOpen(g)?o++:e.isClose(g)&&o--,o===0)return f;d=f.startColumn-1}return null};for(let c=t.lineNumber;c>=1;c--){const h=this._getLineTokens(c),u=h.getCount(),d=this._buffer.getLineContent(c);let f=u-1,g=d.length,p=d.length;c===t.lineNumber&&(f=h.findTokenIndexAtOffset(t.column-1),g=t.column-1,p=t.column-1);let _=!0;for(;f>=0;f--){const v=h.getLanguageId(f)===n&&!Uo(h.getStandardTokenType(f));if(v)_?g=h.getStartOffset(f):(g=h.getStartOffset(f),p=h.getEndOffset(f));else if(_&&g!==p){const b=l(c,d,g,p);if(b)return b}_=v}if(_&&g!==p){const v=l(c,d,g,p);if(v)return v}}return null}_findMatchingBracketDown(e,t,i){const n=e.languageIdentifier.id,s=e.forwardRegex;let o=1,a=0;const l=(h,u,d,f)=>{for(;;){if(i&&++a%100==0&&!i())return Ja.INSTANCE;const g=Es.findNextBracketInRange(s,h,u,d,f);if(!g)break;const p=u.substring(g.startColumn-1,g.endColumn-1).toLowerCase();if(e.isOpen(p)?o++:e.isClose(p)&&o--,o===0)return g;d=g.endColumn-1}return null},c=this.getLineCount();for(let h=t.lineNumber;h<=c;h++){const u=this._getLineTokens(h),d=u.getCount(),f=this._buffer.getLineContent(h);let g=0,p=0,_=0;h===t.lineNumber&&(g=u.findTokenIndexAtOffset(t.column-1),p=t.column-1,_=t.column-1);let v=!0;for(;g<d;g++){const b=u.getLanguageId(g)===n&&!Uo(u.getStandardTokenType(g));if(b)v||(p=u.getStartOffset(g)),_=u.getEndOffset(g);else if(v&&p!==_){const C=l(h,f,p,_);if(C)return C}v=b}if(v&&p!==_){const b=l(h,f,p,_);if(b)return b}}return null}findPrevBracket(e){const t=this.validatePosition(e);let i=-1,n=null;for(let s=t.lineNumber;s>=1;s--){const o=this._getLineTokens(s),a=o.getCount(),l=this._buffer.getLineContent(s);let c=a-1,h=l.length,u=l.length;if(s===t.lineNumber){c=o.findTokenIndexAtOffset(t.column-1),h=t.column-1,u=t.column-1;const f=o.getLanguageId(c);i!==f&&(i=f,n=ze.getBracketsSupport(i))}let d=!0;for(;c>=0;c--){const f=o.getLanguageId(c);if(i!==f){if(n&&d&&h!==u){const p=Es.findPrevBracketInRange(n.reversedRegex,s,l,h,u);if(p)return this._toFoundBracket(n,p);d=!1}i=f,n=ze.getBracketsSupport(i)}const g=!!n&&!Uo(o.getStandardTokenType(c));if(g)d?h=o.getStartOffset(c):(h=o.getStartOffset(c),u=o.getEndOffset(c));else if(n&&d&&h!==u){const p=Es.findPrevBracketInRange(n.reversedRegex,s,l,h,u);if(p)return this._toFoundBracket(n,p)}d=g}if(n&&d&&h!==u){const f=Es.findPrevBracketInRange(n.reversedRegex,s,l,h,u);if(f)return this._toFoundBracket(n,f)}}return null}findNextBracket(e){const t=this.validatePosition(e),i=this.getLineCount();let n=-1,s=null;for(let o=t.lineNumber;o<=i;o++){const a=this._getLineTokens(o),l=a.getCount(),c=this._buffer.getLineContent(o);let h=0,u=0,d=0;if(o===t.lineNumber){h=a.findTokenIndexAtOffset(t.column-1),u=t.column-1,d=t.column-1;const g=a.getLanguageId(h);n!==g&&(n=g,s=ze.getBracketsSupport(n))}let f=!0;for(;h<l;h++){const g=a.getLanguageId(h);if(n!==g){if(s&&f&&u!==d){const _=Es.findNextBracketInRange(s.forwardRegex,o,c,u,d);if(_)return this._toFoundBracket(s,_);f=!1}n=g,s=ze.getBracketsSupport(n)}const p=!!s&&!Uo(a.getStandardTokenType(h));if(p)f||(u=a.getStartOffset(h)),d=a.getEndOffset(h);else if(s&&f&&u!==d){const _=Es.findNextBracketInRange(s.forwardRegex,o,c,u,d);if(_)return this._toFoundBracket(s,_)}f=p}if(s&&f&&u!==d){const g=Es.findNextBracketInRange(s.forwardRegex,o,c,u,d);if(g)return this._toFoundBracket(s,g)}}return null}findEnclosingBrackets(e,t){let i;if(typeof t=="undefined")i=null;else{const f=Date.now();i=()=>Date.now()-f<=t}const n=this.validatePosition(e),s=this.getLineCount(),o=new Map;let a=[];const l=(f,g)=>{if(!o.has(f)){let p=[];for(let _=0,v=g?g.brackets.length:0;_<v;_++)p[_]=0;o.set(f,p)}a=o.get(f)};let c=0;const h=(f,g,p,_,v)=>{for(;;){if(i&&++c%100==0&&!i())return Ja.INSTANCE;const b=Es.findNextBracketInRange(f.forwardRegex,g,p,_,v);if(!b)break;const C=p.substring(b.startColumn-1,b.endColumn-1).toLowerCase(),y=f.textIsBracket[C];if(y&&(y.isOpen(C)?a[y.index]++:y.isClose(C)&&a[y.index]--,a[y.index]===-1))return this._matchFoundBracket(b,y,!1,i);_=b.endColumn-1}return null};let u=-1,d=null;for(let f=n.lineNumber;f<=s;f++){const g=this._getLineTokens(f),p=g.getCount(),_=this._buffer.getLineContent(f);let v=0,b=0,C=0;if(f===n.lineNumber){v=g.findTokenIndexAtOffset(n.column-1),b=n.column-1,C=n.column-1;const x=g.getLanguageId(v);u!==x&&(u=x,d=ze.getBracketsSupport(u),l(u,d))}let y=!0;for(;v<p;v++){const x=g.getLanguageId(v);if(u!==x){if(d&&y&&b!==C){const w=h(d,f,_,b,C);if(w)return ow(w);y=!1}u=x,d=ze.getBracketsSupport(u),l(u,d)}const S=!!d&&!Uo(g.getStandardTokenType(v));if(S)y||(b=g.getStartOffset(v)),C=g.getEndOffset(v);else if(d&&y&&b!==C){const w=h(d,f,_,b,C);if(w)return ow(w)}y=S}if(d&&y&&b!==C){const x=h(d,f,_,b,C);if(x)return ow(x)}}return null}_toFoundBracket(e,t){if(!t)return null;let i=this.getValueInRange(t);i=i.toLowerCase();let n=e.textIsBracket[i];return n?{range:t,open:n.open,close:n.close,isOpen:e.textIsOpenBracket[i]}:null}static computeIndentLevel(e,t){let i=0,n=0,s=e.length;for(;n<s;){let o=e.charCodeAt(n);if(o===32)i++;else if(o===9)i=i-i%t+t;else break;n++}return n===s?-1:i}_computeIndentLevel(e){return Ti.computeIndentLevel(this._buffer.getLineContent(e+1),this._options.tabSize)}getActiveIndentGuide(e,t,i){this._assertNotDisposed();const n=this.getLineCount();if(e<1||e>n)throw new Error("Illegal value for lineNumber");const s=ze.getFoldingRules(this._languageIdentifier.id),o=Boolean(s&&s.offSide);let a=-2,l=-1,c=-2,h=-1;const u=w=>{if(a!==-1&&(a===-2||a>w-1)){a=-1,l=-1;for(let L=w-2;L>=0;L--){let N=this._computeIndentLevel(L);if(N>=0){a=L,l=N;break}}}if(c===-2){c=-1,h=-1;for(let L=w;L<n;L++){let N=this._computeIndentLevel(L);if(N>=0){c=L,h=N;break}}}};let d=-2,f=-1,g=-2,p=-1;const _=w=>{if(d===-2){d=-1,f=-1;for(let L=w-2;L>=0;L--){let N=this._computeIndentLevel(L);if(N>=0){d=L,f=N;break}}}if(g!==-1&&(g===-2||g<w-1)){g=-1,p=-1;for(let L=w;L<n;L++){let N=this._computeIndentLevel(L);if(N>=0){g=L,p=N;break}}}};let v=0,b=!0,C=0,y=!0,x=0,S=0;for(let w=0;b||y;w++){const L=e-w,N=e+w;w>1&&(L<1||L<t)&&(b=!1),w>1&&(N>n||N>i)&&(y=!1),w>5e4&&(b=!1,y=!1);let P=-1;if(b){const U=this._computeIndentLevel(L-1);U>=0?(c=L-1,h=U,P=Math.ceil(U/this._options.indentSize)):(u(L),P=this._getIndentLevelForWhitespaceLine(o,l,h))}let B=-1;if(y){const U=this._computeIndentLevel(N-1);U>=0?(d=N-1,f=U,B=Math.ceil(U/this._options.indentSize)):(_(N),B=this._getIndentLevelForWhitespaceLine(o,f,p))}if(w===0){S=P;continue}if(w===1){if(N<=n&&B>=0&&S+1===B){b=!1,v=N,C=N,x=B;continue}if(L>=1&&P>=0&&P-1===S){y=!1,v=L,C=L,x=P;continue}if(v=e,C=e,x=S,x===0)return{startLineNumber:v,endLineNumber:C,indent:x}}b&&(P>=x?v=L:b=!1),y&&(B>=x?C=N:y=!1)}return{startLineNumber:v,endLineNumber:C,indent:x}}getLinesBracketGuides(e,t,i,n,s){var o,a,l;const c=[],h=this._bracketPairColorizer.getBracketPairsInRange(new k(e,1,t,this.getLineMaxColumn(t)));let u;if(i&&h.length>0){const p=e<=i.lineNumber&&i.lineNumber<=t?h.filter(_=>_.range.containsPosition(i)):this._bracketPairColorizer.getBracketPairsInRange(k.fromPositions(i));u=(o=zq(p,_=>_.range.startLineNumber!==_.range.endLineNumber))===null||o===void 0?void 0:o.range}const d=new Np(h),f=new Array,g=new DF;for(let p=e;p<=t;p++){const _=new Array;c.push(_);for(const b of d.takeWhile(C=>C.openingBracketRange.startLineNumber<p)||[])f[b.nestingLevel]=b;let v=Number.MAX_SAFE_INTEGER;for(let b=f.length-1;b>=0;b--){const C=f[b];if(C.range.endLineNumber<=p)continue;const y=Math.min(this.getVisibleColumnFromPosition(C.openingBracketRange.getStartPosition()),this.getVisibleColumnFromPosition((l=(a=C.closingBracketRange)===null||a===void 0?void 0:a.getStartPosition())!==null&&l!==void 0?l:C.range.getEndPosition()));if(y>v)continue;v=y;const x=n&&u&&C.range.equalsRange(u),S=g.getInlineClassNameOfLevel(C.nestingLevel)+(x?" "+g.activeClassName:"");(x||s)&&_.push(new x2(y,S))}_.reverse()}return c}getVisibleColumnFromPosition(e){return Ot.visibleColumnFromColumn(this.getLineContent(e.lineNumber),e.column,this._options.tabSize)+1}getLinesIndentGuides(e,t){this._assertNotDisposed();const i=this.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=ze.getFoldingRules(this._languageIdentifier.id),s=Boolean(n&&n.offSide);let o=new Array(t-e+1),a=-2,l=-1,c=-2,h=-1;for(let u=e;u<=t;u++){let d=u-e;const f=this._computeIndentLevel(u-1);if(f>=0){a=u-1,l=f,o[d]=Math.ceil(f/this._options.indentSize);continue}if(a===-2){a=-1,l=-1;for(let g=u-2;g>=0;g--){let p=this._computeIndentLevel(g);if(p>=0){a=g,l=p;break}}}if(c!==-1&&(c===-2||c<u-1)){c=-1,h=-1;for(let g=u;g<i;g++){let p=this._computeIndentLevel(g);if(p>=0){c=g,h=p;break}}}o[d]=this._getIndentLevelForWhitespaceLine(s,l,h)}return o}_getIndentLevelForWhitespaceLine(e,t,i){return t===-1||i===-1?0:t<i?1+Math.floor(t/this._options.indentSize):t===i?Math.ceil(i/this._options.indentSize):e?Math.ceil(i/this._options.indentSize):1+Math.floor(i/this._options.indentSize)}normalizePosition(e,t){return e}getLineIndentColumn(e){return ZQ(this.getLineContent(e))+1}}Ti.MODEL_SYNC_LIMIT=50*1024*1024;Ti.LARGE_FILE_SIZE_THRESHOLD=20*1024*1024;Ti.LARGE_FILE_LINE_COUNT_THRESHOLD=300*1e3;Ti.DEFAULT_CREATION_OPTIONS={isForSimpleWidget:!1,tabSize:Sn.tabSize,indentSize:Sn.indentSize,insertSpaces:Sn.insertSpaces,detectIndentation:!1,defaultEOL:1,trimAutoWhitespace:Sn.trimAutoWhitespace,largeFileOptimizations:Sn.largeFileOptimizations,bracketPairColorizationOptions:Sn.bracketPairColorizationOptions};function ZQ(r){let e=0;for(const t of r)if(t===" "||t===" ")e++;else break;return e}class DF{constructor(){this.activeClassName="indent-active"}getInlineClassNameOfLevel(e){return`bracket-indent-guide lvl-${e%30}`}}function vD(r){return!!(r.options.overviewRuler&&r.options.overviewRuler.color)}function CD(r){return!!r.options.after||!!r.options.before}class EF{constructor(){this._decorationsTree0=new Nk,this._decorationsTree1=new Nk,this._injectedTextDecorationsTree=new Nk}ensureAllNodesHaveRanges(e){this.getAll(e,0,!1,!1)}_ensureNodesHaveRanges(e,t){for(const i of t)i.range===null&&(i.range=e.getRangeAt(i.cachedAbsoluteStart,i.cachedAbsoluteEnd));return t}getAllInInterval(e,t,i,n,s){const o=e.getVersionId(),a=this._intervalSearch(t,i,n,s,o);return this._ensureNodesHaveRanges(e,a)}_intervalSearch(e,t,i,n,s){const o=this._decorationsTree0.intervalSearch(e,t,i,n,s),a=this._decorationsTree1.intervalSearch(e,t,i,n,s),l=this._injectedTextDecorationsTree.intervalSearch(e,t,i,n,s);return o.concat(a).concat(l)}getInjectedTextInInterval(e,t,i,n){const s=e.getVersionId(),o=this._injectedTextDecorationsTree.intervalSearch(t,i,n,!1,s);return this._ensureNodesHaveRanges(e,o).filter(a=>a.options.showIfCollapsed||!a.range.isEmpty())}getAllInjectedText(e,t){const i=e.getVersionId(),n=this._injectedTextDecorationsTree.search(t,!1,i);return this._ensureNodesHaveRanges(e,n).filter(s=>s.options.showIfCollapsed||!s.range.isEmpty())}getAll(e,t,i,n){const s=e.getVersionId(),o=this._search(t,i,n,s);return this._ensureNodesHaveRanges(e,o)}_search(e,t,i,n){if(i)return this._decorationsTree1.search(e,t,n);{const s=this._decorationsTree0.search(e,t,n),o=this._decorationsTree1.search(e,t,n),a=this._injectedTextDecorationsTree.search(e,t,n);return s.concat(o).concat(a)}}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){CD(e)?this._injectedTextDecorationsTree.insert(e):vD(e)?this._decorationsTree1.insert(e):this._decorationsTree0.insert(e)}delete(e){CD(e)?this._injectedTextDecorationsTree.delete(e):vD(e)?this._decorationsTree1.delete(e):this._decorationsTree0.delete(e)}getNodeRange(e,t){const i=e.getVersionId();return t.cachedVersionId!==i&&this._resolveNode(t,i),t.range===null&&(t.range=e.getRangeAt(t.cachedAbsoluteStart,t.cachedAbsoluteEnd)),t.range}_resolveNode(e,t){CD(e)?this._injectedTextDecorationsTree.resolveNode(e,t):vD(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 dc(r){return r.replace(/[^a-z0-9\-_]/gi," ")}class IF{constructor(e){this.color=e.color||"",this.darkColor=e.darkColor||""}}class YQ extends IF{constructor(e){super(e);this._resolvedColor=null,this.position=typeof e.position=="number"?e.position:Mr.Center}getColor(e){return this._resolvedColor||(e.type!=="light"&&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(typeof e=="string")return e;let i=e?t.getColor(e.id):null;return i?i.toString():""}}class XQ extends IF{constructor(e){super(e);this.position=e.position}getColor(e){return this._resolvedColor||(e.type!=="light"&&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 typeof e=="string"?K.fromHex(e):t.getColor(e.id)}}class om{constructor(e){this.content=e.content||"",this.inlineClassName=e.inlineClassName||null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1}static from(e){return e instanceof om?e:new om(e)}}class Ke{constructor(e){this.description=e.description,this.stickiness=e.stickiness||0,this.zIndex=e.zIndex||0,this.className=e.className?dc(e.className):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 YQ(e.overviewRuler):null,this.minimap=e.minimap?new XQ(e.minimap):null,this.glyphMarginClassName=e.glyphMarginClassName?dc(e.glyphMarginClassName):null,this.linesDecorationsClassName=e.linesDecorationsClassName?dc(e.linesDecorationsClassName):null,this.firstLineDecorationClassName=e.firstLineDecorationClassName?dc(e.firstLineDecorationClassName):null,this.marginClassName=e.marginClassName?dc(e.marginClassName):null,this.inlineClassName=e.inlineClassName?dc(e.inlineClassName):null,this.inlineClassNameAffectsLetterSpacing=e.inlineClassNameAffectsLetterSpacing||!1,this.beforeContentClassName=e.beforeContentClassName?dc(e.beforeContentClassName):null,this.afterContentClassName=e.afterContentClassName?dc(e.afterContentClassName):null,this.after=e.after?om.from(e.after):null,this.before=e.before?om.from(e.before):null}static register(e){return new Ke(e)}static createDynamic(e){return new Ke(e)}}Ke.EMPTY=Ke.register({description:"empty"});const NF=[Ke.register({description:"tracked-range-always-grows-when-typing-at-edges",stickiness:0}),Ke.register({description:"tracked-range-never-grows-when-typing-at-edges",stickiness:1}),Ke.register({description:"tracked-range-grows-only-when-typing-before",stickiness:2}),Ke.register({description:"tracked-range-grows-only-when-typing-after",stickiness:3})];function TF(r){return r instanceof Ke?r:Ke.createDynamic(r)}class QQ extends Y{constructor(e){super();this.handleBeforeFire=e,this._actual=this._register(new H),this.event=this._actual.event,this._affectedInjectedTextLines=null,this._deferredCnt=0,this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(){var e;if(this._deferredCnt--,this._deferredCnt===0){if(this._shouldFire){this.handleBeforeFire(this._affectedInjectedTextLines);const t={affectsMinimap:this._affectsMinimap,affectsOverviewRuler:this._affectsOverviewRuler};this._shouldFire=!1,this._affectsMinimap=!1,this._affectsOverviewRuler=!1,this._actual.fire(t)}(e=this._affectedInjectedTextLines)===null||e===void 0||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._shouldFire=!0}fire(){this._affectsMinimap=!0,this._affectsOverviewRuler=!0,this._shouldFire=!0}}class JQ extends Y{constructor(){super();this._fastEmitter=this._register(new H),this.fastEvent=this._fastEmitter.event,this._slowEmitter=this._register(new H),this.slowEvent=this._slowEmitter.event,this._deferredCnt=0,this._deferredEvent=null}beginDeferredEmit(){this._deferredCnt++}endDeferredEmit(e=null){if(this._deferredCnt--,this._deferredCnt===0&&this._deferredEvent!==null){this._deferredEvent.rawContentChangedEvent.resultingSelection=e;const t=this._deferredEvent;this._deferredEvent=null,this._fastEmitter.fire(t),this._slowEmitter.fire(t)}}fire(e){if(this._deferredCnt>0){this._deferredEvent?this._deferredEvent=this._deferredEvent.merge(e):this._deferredEvent=e;return}this._fastEmitter.fire(e),this._slowEmitter.fire(e)}}const eJ=()=>!0,AF=()=>!1,tJ=r=>r===" "||r===" ";class As{constructor(e,t,i){this._cursorMoveConfigurationBrand=void 0,this._languageIdentifier=e;const n=i.options,s=n.get(129);this.readOnly=n.get(80),this.tabSize=t.tabSize,this.indentSize=t.indentSize,this.insertSpaces=t.insertSpaces,this.stickyTabStops=n.get(103),this.lineHeight=n.get(58),this.pageSize=Math.max(1,Math.floor(s.height/this.lineHeight)-2),this.useTabStops=n.get(114),this.wordSeparators=n.get(115),this.emptySelectionClipboard=n.get(32),this.copyWithSyntaxHighlighting=n.get(21),this.multiCursorMergeOverlapping=n.get(68),this.multiCursorPaste=n.get(70),this.autoClosingBrackets=n.get(5),this.autoClosingQuotes=n.get(8),this.autoClosingDelete=n.get(6),this.autoClosingOvertype=n.get(7),this.autoSurround=n.get(11),this.autoIndent=n.get(9),this.surroundingPairs={},this._electricChars=null,this.shouldAutoCloseBefore={quote:As._getShouldAutoClose(e,this.autoClosingQuotes),bracket:As._getShouldAutoClose(e,this.autoClosingBrackets)},this.autoClosingPairs=ze.getAutoClosingPairs(e.id);let o=As._getSurroundingPairs(e);if(o)for(const a of o)this.surroundingPairs[a.open]=a.close}static shouldRecreate(e){return e.hasChanged(129)||e.hasChanged(115)||e.hasChanged(32)||e.hasChanged(68)||e.hasChanged(70)||e.hasChanged(5)||e.hasChanged(8)||e.hasChanged(6)||e.hasChanged(7)||e.hasChanged(11)||e.hasChanged(114)||e.hasChanged(58)||e.hasChanged(80)}get electricChars(){if(!this._electricChars){this._electricChars={};let e=As._getElectricCharacters(this._languageIdentifier);if(e)for(const t of e)this._electricChars[t]=!0}return this._electricChars}normalizeIndentation(e){return Ti.normalizeIndentation(e,this.indentSize,this.insertSpaces)}static _getElectricCharacters(e){try{return ze.getElectricCharacters(e.id)}catch(t){return Oe(t),null}}static _getShouldAutoClose(e,t){switch(t){case"beforeWhitespace":return tJ;case"languageDefined":return As._getLanguageDefinedShouldAutoClose(e);case"always":return eJ;case"never":return AF}}static _getLanguageDefinedShouldAutoClose(e){try{const t=ze.getAutoCloseBeforeSet(e.id);return i=>t.indexOf(i)!==-1}catch(t){return Oe(t),AF}}static _getSurroundingPairs(e){try{return ze.getSurroundingPairs(e.id)}catch(t){return Oe(t),null}}}class qi{constructor(e,t,i,n){this._singleCursorStateBrand=void 0,this.selectionStart=e,this.selectionStartLeftoverVisibleColumns=t,this.position=i,this.leftoverVisibleColumns=n,this.selection=qi._computeSelection(this.selectionStart,this.position)}equals(e){return this.selectionStartLeftoverVisibleColumns===e.selectionStartLeftoverVisibleColumns&&this.leftoverVisibleColumns===e.leftoverVisibleColumns&&this.position.equals(e.position)&&this.selectionStart.equalsRange(e.selectionStart)}hasSelection(){return!this.selection.isEmpty()||!this.selectionStart.isEmpty()}move(e,t,i,n){return e?new qi(this.selectionStart,this.selectionStartLeftoverVisibleColumns,new $(t,i),n):new qi(new k(t,i,t,i),n,new $(t,i),n)}static _computeSelection(e,t){let i,n,s,o;return e.isEmpty()?(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column):t.isBeforeOrEqual(e.getStartPosition())?(i=e.endLineNumber,n=e.endColumn,s=t.lineNumber,o=t.column):(i=e.startLineNumber,n=e.startColumn,s=t.lineNumber,o=t.column),new be(i,n,s,o)}}class RF{constructor(e,t,i,n){this._cursorContextBrand=void 0,this.model=e,this.viewModel=t,this.coordinatesConverter=i,this.cursorConfig=n}}class iJ{constructor(e){this.modelState=e,this.viewState=null}}class nJ{constructor(e){this.modelState=null,this.viewState=e}}class qe{constructor(e,t){this._cursorStateBrand=void 0,this.modelState=e,this.viewState=t}static fromModelState(e){return new iJ(e)}static fromViewState(e){return new nJ(e)}static fromModelSelection(e){const t=e.selectionStartLineNumber,i=e.selectionStartColumn,n=e.positionLineNumber,s=e.positionColumn,o=new qi(new k(t,i,t,i),0,new $(n,s),0);return qe.fromModelState(o)}static fromModelSelections(e){let t=[];for(let i=0,n=e.length;i<n;i++)t[i]=this.fromModelSelection(e[i]);return t}equals(e){return this.viewState.equals(e.viewState)&&this.modelState.equals(e.modelState)}}class mr{constructor(e,t,i){this._editOperationResultBrand=void 0,this.type=e,this.commands=t,this.shouldPushStackElementBefore=i.shouldPushStackElementBefore,this.shouldPushStackElementAfter=i.shouldPushStackElementAfter}}function _f(r){return r==="'"||r==='"'||r==="`"}class am{static whitespaceVisibleColumn(e,t,i){const n=e.length;let s=0,o=-1,a=-1;for(let l=0;l<n;l++){if(l===t)return[o,a,s];switch(s%i==0&&(o=l,a=s),e.charCodeAt(l)){case 32:s+=1;break;case 9:s=Ot.nextRenderTabStop(s,i);break;default:return[-1,-1,-1]}}return t===n?[o,a,s]:[-1,-1,-1]}static atomicPosition(e,t,i,n){const s=e.length,[o,a,l]=am.whitespaceVisibleColumn(e,t,i);if(l===-1)return-1;let c;switch(n){case 0:c=!0;break;case 1:c=!1;break;case 2:if(l%i==0)return t;c=l%i<=i/2;break}if(c){if(o===-1)return-1;let d=a;for(let f=o;f<s;++f){if(d===a+i)return o;switch(e.charCodeAt(f)){case 32:d+=1;break;case 9:d=Ot.nextRenderTabStop(d,i);break;default:return-1}}return d===a+i?o:-1}const h=Ot.nextRenderTabStop(l,i);let u=l;for(let d=t;d<s;d++){if(u===h)return d;switch(e.charCodeAt(d)){case 32:u+=1;break;case 9:u=Ot.nextRenderTabStop(u,i);break;default:return-1}}return u===h?s:-1}}class fc{constructor(e=null){this.hitTarget=e,this.type=0}}class wD{constructor(e,t,i){this.position=e,this.spanNode=t,this.injectedText=i,this.type=1}}var Kh;(function(r){function e(t,i,n){const s=t.getPositionFromDOMInfo(i,n);return s?new wD(s,i,null):new fc(i)}r.createFromDOMInfo=e})(Kh||(Kh={}));class rJ{constructor(e,t){this.lastViewCursorsRenderData=e,this.lastTextareaPosition=t}}class ho{constructor(e,t,i=0,n=null,s=null,o=null){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,!s&&n&&(s=new k(n.lineNumber,n.column,n.lineNumber,n.column)),this.range=s,this.detail=o}static _typeToString(e){return e===1?"TEXTAREA":e===2?"GUTTER_GLYPH_MARGIN":e===3?"GUTTER_LINE_NUMBERS":e===4?"GUTTER_LINE_DECORATIONS":e===5?"GUTTER_VIEW_ZONE":e===6?"CONTENT_TEXT":e===7?"CONTENT_EMPTY":e===8?"CONTENT_VIEW_ZONE":e===9?"CONTENT_WIDGET":e===10?"OVERVIEW_RULER":e===11?"SCROLLBAR":e===12?"OVERLAY_WIDGET":"UNKNOWN"}static toString(e){return this._typeToString(e.type)+": "+e.position+" - "+e.range+" - "+e.detail}toString(){return ho.toString(this)}}class Rs{static isTextArea(e){return e.length===2&&e[0]===3&&e[1]===6}static isChildOfViewLines(e){return e.length>=4&&e[0]===3&&e[3]===7}static isStrictChildOfViewLines(e){return e.length>4&&e[0]===3&&e[3]===7}static isChildOfScrollableElement(e){return e.length>=2&&e[0]===3&&e[1]===5}static isChildOfMinimap(e){return e.length>=2&&e[0]===3&&e[1]===8}static isChildOfContentWidgets(e){return e.length>=4&&e[0]===3&&e[3]===1}static isChildOfOverflowingContentWidgets(e){return e.length>=1&&e[0]===2}static isChildOfOverlayWidgets(e){return e.length>=2&&e[0]===3&&e[1]===4}}class bf{constructor(e,t,i){this.model=e.model;const n=e.configuration.options;this.layoutInfo=n.get(129),this.viewDomNode=t.viewDomNode,this.lineHeight=n.get(58),this.stickyTabStops=n.get(103),this.typicalHalfwidthCharacterWidth=n.get(43).typicalHalfwidthCharacterWidth,this.lastRenderData=i,this._context=e,this._viewHelper=t}getZoneAtCoord(e){return bf.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.model.getLineCount();let o=null,a,l=null;return i.afterLineNumber!==s&&(l=new $(i.afterLineNumber+1,1)),i.afterLineNumber>0&&(o=new $(i.afterLineNumber,e.model.getLineMaxColumn(i.afterLineNumber))),l===null?a=o:o===null?a=l:t<n?a=o:a=l,{viewZoneId:i.id,afterLineNumber:i.afterLineNumber,positionBefore:o,positionAfter:l,position:a}}return null}getFullLineRangeAtCoord(e){if(this._context.viewLayout.isAfterLines(e)){const n=this._context.model.getLineCount(),s=this._context.model.getLineMaxColumn(n);return{range:new k(n,s,n,s),isAfterLines:!0}}const t=this._context.viewLayout.getLineNumberAtVerticalOffset(e),i=this._context.model.getLineMaxColumn(t);return{range:new k(t,1,t,i),isAfterLines:!1}}getLineNumberAtVerticalOffset(e){return this._context.viewLayout.getLineNumberAtVerticalOffset(e)}isAfterLines(e){return this._context.viewLayout.isAfterLines(e)}isInTopPadding(e){return this._context.viewLayout.isInTopPadding(e)}isInBottomPadding(e){return this._context.viewLayout.isInBottomPadding(e)}getVerticalOffsetForLineNumber(e){return this._context.viewLayout.getVerticalOffsetForLineNumber(e)}findAttribute(e,t){return bf._findAttribute(e,t,this._viewHelper.viewDomNode)}static _findAttribute(e,t,i){for(;e&&e!==document.body;){if(e.hasAttribute&&e.hasAttribute(t))return e.getAttribute(t);if(e===i)return null;e=e.parentNode}return null}getLineWidth(e){return this._viewHelper.getLineWidth(e)}visibleRangeForPosition(e,t){return this._viewHelper.visibleRangeForPosition(e,t)}getPositionFromDOMInfo(e,t){return this._viewHelper.getPositionFromDOMInfo(e,t)}getCurrentScrollTop(){return this._context.viewLayout.getCurrentScrollTop()}getCurrentScrollLeft(){return this._context.viewLayout.getCurrentScrollLeft()}}class sJ{constructor(e,t,i){this.editorPos=t,this.pos=i,this.mouseVerticalOffset=Math.max(0,e.getCurrentScrollTop()+i.y-t.y),this.mouseContentHorizontalOffset=e.getCurrentScrollLeft()+i.x-t.x-e.layoutInfo.contentLeft,this.isInMarginArea=i.x-t.x<e.layoutInfo.contentLeft&&i.x-t.x>=e.layoutInfo.glyphMarginLeft,this.isInContentArea=!this.isInMarginArea,this.mouseColumn=Math.max(0,mn._getMouseColumn(this.mouseContentHorizontalOffset,e.typicalHalfwidthCharacterWidth))}}class yD extends sJ{constructor(e,t,i,n){super(e,t,i);this._ctx=e,n?(this.target=n,this.targetPath=Zo.collect(n,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}), mouseVerticalOffset: ${this.mouseVerticalOffset}, mouseContentHorizontalOffset: ${this.mouseContentHorizontalOffset} - target: ${this.target?this.target.outerHTML:null}`}fulfill(e,t=null,i=null,n=null){let s=this.mouseColumn;return t&&t.column<this._ctx.model.getLineMaxColumn(t.lineNumber)&&(s=Ot.visibleColumnFromColumn(this._ctx.model.getLineContent(t.lineNumber),t.column,this._ctx.model.getTextModelOptions().tabSize)+1),new ho(this.target,e,s,t,i,n)}withTarget(e){return new yD(this._ctx,this.editorPos,this.pos,e)}}const MF={isAfterLines:!0};function SD(r){return{isAfterLines:!1,horizontalDistanceToText:r}}class mn{constructor(e,t){this._context=e,this._viewHelper=t}mouseTargetIsWidget(e){const t=e.target,i=Zo.collect(t,this._viewHelper.viewDomNode);return!!(Rs.isChildOfContentWidgets(i)||Rs.isChildOfOverflowingContentWidgets(i)||Rs.isChildOfOverlayWidgets(i))}createMouseTarget(e,t,i,n){const s=new bf(this._context,this._viewHelper,e),o=new yD(s,t,i,n);try{return mn._createMouseTarget(s,o,!1)}catch{return o.fulfill(0)}}static _createMouseTarget(e,t,i){if(t.target===null){if(i)return t.fulfill(0);const o=mn._doHitTest(e,t);return o.type===1?mn.createMouseTargetFromHitTestPosition(e,t,o.spanNode,o.position,o.injectedText):this._createMouseTarget(e,t.withTarget(o.hitTarget),!0)}const n=t;let s=null;return s=s||mn._hitTestContentWidget(e,n),s=s||mn._hitTestOverlayWidget(e,n),s=s||mn._hitTestMinimap(e,n),s=s||mn._hitTestScrollbarSlider(e,n),s=s||mn._hitTestViewZone(e,n),s=s||mn._hitTestMargin(e,n),s=s||mn._hitTestViewCursor(e,n),s=s||mn._hitTestTextArea(e,n),s=s||mn._hitTestViewLines(e,n,i),s=s||mn._hitTestScrollbar(e,n),s||t.fulfill(0)}static _hitTestContentWidget(e,t){if(Rs.isChildOfContentWidgets(t.targetPath)||Rs.isChildOfOverflowingContentWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(9,null,null,i):t.fulfill(0)}return null}static _hitTestOverlayWidget(e,t){if(Rs.isChildOfOverlayWidgets(t.targetPath)){const i=e.findAttribute(t.target,"widgetId");return i?t.fulfill(12,null,null,i):t.fulfill(0)}return null}static _hitTestViewCursor(e,t){if(t.target){const i=e.lastRenderData.lastViewCursorsRenderData;for(const n of i)if(t.target===n.domNode)return t.fulfill(6,n.position,null,{mightBeForeignElement:!1})}if(t.isInContentArea){const i=e.lastRenderData.lastViewCursorsRenderData,n=t.mouseContentHorizontalOffset,s=t.mouseVerticalOffset;for(const o of i){if(n<o.contentLeft||n>o.contentLeft+o.width)continue;const a=e.getVerticalOffsetForLineNumber(o.position.lineNumber);if(a<=s&&s<=a+o.height)return t.fulfill(6,o.position,null,{mightBeForeignElement:!1})}}return null}static _hitTestViewZone(e,t){const i=e.getZoneAtCoord(t.mouseVerticalOffset);if(i){const n=t.isInContentArea?8:5;return t.fulfill(n,i.position,null,i)}return null}static _hitTestTextArea(e,t){return Rs.isTextArea(t.targetPath)?e.lastRenderData.lastTextareaPosition?t.fulfill(6,e.lastRenderData.lastTextareaPosition,null,{mightBeForeignElement:!1}):t.fulfill(1,e.lastRenderData.lastTextareaPosition):null}static _hitTestMargin(e,t){if(t.isInMarginArea){const i=e.getFullLineRangeAtCoord(t.mouseVerticalOffset),n=i.range.getStartPosition();let s=Math.abs(t.pos.x-t.editorPos.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.fulfill(2,n,i.range,o):(s-=e.layoutInfo.glyphMarginWidth,s<=e.layoutInfo.lineNumbersWidth?t.fulfill(3,n,i.range,o):(s-=e.layoutInfo.lineNumbersWidth,t.fulfill(4,n,i.range,o)))}return null}static _hitTestViewLines(e,t,i){if(!Rs.isChildOfViewLines(t.targetPath))return null;if(e.isInTopPadding(t.mouseVerticalOffset))return t.fulfill(7,new $(1,1),null,MF);if(e.isAfterLines(t.mouseVerticalOffset)||e.isInBottomPadding(t.mouseVerticalOffset)){const s=e.model.getLineCount(),o=e.model.getLineMaxColumn(s);return t.fulfill(7,new $(s,o),null,MF)}if(i){if(Rs.isStrictChildOfViewLines(t.targetPath)){const s=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset);if(e.model.getLineLength(s)===0){const a=e.getLineWidth(s),l=SD(t.mouseContentHorizontalOffset-a);return t.fulfill(7,new $(s,1),null,l)}const o=e.getLineWidth(s);if(t.mouseContentHorizontalOffset>=o){const a=SD(t.mouseContentHorizontalOffset-o),l=new $(s,e.model.getLineMaxColumn(s));return t.fulfill(7,l,null,a)}}return t.fulfill(0)}const n=mn._doHitTest(e,t);return n.type===1?mn.createMouseTargetFromHitTestPosition(e,t,n.spanNode,n.position,n.injectedText):this._createMouseTarget(e,t.withTarget(n.hitTarget),!0)}static _hitTestMinimap(e,t){if(Rs.isChildOfMinimap(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new $(i,n))}return null}static _hitTestScrollbarSlider(e,t){if(Rs.isChildOfScrollableElement(t.targetPath)&&t.target&&t.target.nodeType===1){const i=t.target.className;if(i&&/\b(slider|scrollbar)\b/.test(i)){const n=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.model.getLineMaxColumn(n);return t.fulfill(11,new $(n,s))}}return null}static _hitTestScrollbar(e,t){if(Rs.isChildOfScrollableElement(t.targetPath)){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),n=e.model.getLineMaxColumn(i);return t.fulfill(11,new $(i,n))}return null}getMouseColumn(e,t){const i=this._context.configuration.options,n=i.get(129),s=this._context.viewLayout.getCurrentScrollLeft()+t.x-e.x-n.contentLeft;return mn._getMouseColumn(s,i.get(43).typicalHalfwidthCharacterWidth)}static _getMouseColumn(e,t){return e<0?1:Math.round(e/t)+1}static createMouseTargetFromHitTestPosition(e,t,i,n,s){const o=n.lineNumber,a=n.column,l=e.getLineWidth(o);if(t.mouseContentHorizontalOffset>l){const _=SD(t.mouseContentHorizontalOffset-l);return t.fulfill(7,n,null,_)}const c=e.visibleRangeForPosition(o,a);if(!c)return t.fulfill(0,n);const h=c.left;if(t.mouseContentHorizontalOffset===h)return t.fulfill(6,n,null,{mightBeForeignElement:!!s});const u=[];if(u.push({offset:c.left,column:a}),a>1){const _=e.visibleRangeForPosition(o,a-1);_&&u.push({offset:_.left,column:a-1})}const d=e.model.getLineMaxColumn(o);if(a<d){const _=e.visibleRangeForPosition(o,a+1);_&&u.push({offset:_.left,column:a+1})}u.sort((_,v)=>_.offset-v.offset);const f=t.pos.toClientCoordinates(),g=i.getBoundingClientRect(),p=g.left<=f.clientX&&f.clientX<=g.right;for(let _=1;_<u.length;_++){const v=u[_-1],b=u[_];if(v.offset<=t.mouseContentHorizontalOffset&&t.mouseContentHorizontalOffset<=b.offset){const C=new k(o,v.column,o,b.column);return t.fulfill(6,n,C,{mightBeForeignElement:!p||!!s})}}return t.fulfill(6,n,null,{mightBeForeignElement:!p||!!s})}static _doHitTestWithCaretRangeFromPoint(e,t){const i=e.getLineNumberAtVerticalOffset(t.mouseVerticalOffset),s=e.getVerticalOffsetForLineNumber(i)+Math.floor(e.lineHeight/2);let o=t.pos.y+(s-t.mouseVerticalOffset);o<=t.editorPos.y&&(o=t.editorPos.y+1),o>=t.editorPos.y+e.layoutInfo.height&&(o=t.editorPos.y+e.layoutInfo.height-1);const a=new kk(t.pos.x,o),l=this._actualDoHitTestWithCaretRangeFromPoint(e,a.toClientCoordinates());return l.type===1?l:this._actualDoHitTestWithCaretRangeFromPoint(e,t.pos.toClientCoordinates())}static _actualDoHitTestWithCaretRangeFromPoint(e,t){const i=_h(e.viewDomNode);let n;if(i?typeof i.caretRangeFromPoint=="undefined"?n=oJ(i,t.clientX,t.clientY):n=i.caretRangeFromPoint(t.clientX,t.clientY):n=document.caretRangeFromPoint(t.clientX,t.clientY),!n||!n.startContainer)return new fc;const s=n.startContainer;if(s.nodeType===s.TEXT_NODE){const o=s.parentNode,a=o?o.parentNode:null,l=a?a.parentNode:null;return(l&&l.nodeType===l.ELEMENT_NODE?l.className:null)===Yo.CLASS_NAME?Kh.createFromDOMInfo(e,o,n.startOffset):new fc(s.parentNode)}else if(s.nodeType===s.ELEMENT_NODE){const o=s.parentNode,a=o?o.parentNode:null;return(a&&a.nodeType===a.ELEMENT_NODE?a.className:null)===Yo.CLASS_NAME?Kh.createFromDOMInfo(e,s,s.textContent.length):new fc(s)}return new fc}static _doHitTestWithCaretPositionFromPoint(e,t){const i=document.caretPositionFromPoint(t.clientX,t.clientY);if(i.offsetNode.nodeType===i.offsetNode.TEXT_NODE){const n=i.offsetNode.parentNode,s=n?n.parentNode:null,o=s?s.parentNode:null;return(o&&o.nodeType===o.ELEMENT_NODE?o.className:null)===Yo.CLASS_NAME?Kh.createFromDOMInfo(e,i.offsetNode.parentNode,i.offset):new fc(i.offsetNode.parentNode)}if(i.offsetNode.nodeType===i.offsetNode.ELEMENT_NODE){const n=i.offsetNode.parentNode,s=n&&n.nodeType===n.ELEMENT_NODE?n.className:null,o=n?n.parentNode:null,a=o&&o.nodeType===o.ELEMENT_NODE?o.className:null;if(s===Yo.CLASS_NAME){const l=i.offsetNode.childNodes[Math.min(i.offset,i.offsetNode.childNodes.length-1)];if(l)return Kh.createFromDOMInfo(e,l,0)}else if(a===Yo.CLASS_NAME)return Kh.createFromDOMInfo(e,i.offsetNode,0)}return new fc(i.offsetNode)}static _snapToSoftTabBoundary(e,t){const i=t.getLineContent(e.lineNumber),{tabSize:n}=t.getTextModelOptions(),s=am.atomicPosition(i,e.column-1,n,2);return s!==-1?new $(e.lineNumber,s+1):e}static _doHitTest(e,t){let i=new fc;if(typeof document.caretRangeFromPoint=="function"?i=this._doHitTestWithCaretRangeFromPoint(e,t):document.caretPositionFromPoint&&(i=this._doHitTestWithCaretPositionFromPoint(e,t.pos.toClientCoordinates())),i.type===1){const n=e.model.getInjectedTextAt(i.position),s=e.model.normalizePosition(i.position,2);(n||!s.equals(i.position))&&(i=new wD(s,i.spanNode,n))}return i.type===1&&e.stickyTabStops&&(i=new wD(this._snapToSoftTabBoundary(i.position,e.model),i.spanNode,i.injectedText)),i}}function oJ(r,e,t){const i=document.createRange();let n=r.elementFromPoint(e,t);if(n!==null){for(;n&&n.firstChild&&n.firstChild.nodeType!==n.firstChild.TEXT_NODE&&n.lastChild&&n.lastChild.firstChild;)n=n.lastChild;const s=n.getBoundingClientRect(),o=window.getComputedStyle(n,null).getPropertyValue("font"),a=n.innerText;let l=s.left,c=0,h;if(e>s.left+s.width)c=a.length;else{const u=qh.getInstance();for(let d=0;d<a.length+1;d++){if(h=u.getCharWidth(a.charAt(d),o)/2,l+=h,e<l){c=d;break}l+=h}}i.setStart(n.firstChild,c),i.setEnd(n.firstChild,c)}return i}class qh{constructor(){this._cache={},this._canvas=document.createElement("canvas")}static getInstance(){return qh._INSTANCE||(qh._INSTANCE=new qh),qh._INSTANCE}getCharWidth(e,t){const i=e+t;if(this._cache[i])return this._cache[i];const n=this._canvas.getContext("2d");n.font=t;const o=n.measureText(e).width;return this._cache[i]=o,o}}qh._INSTANCE=null;function aw(r){return function(e,t){let i=!1;return r&&(i=r.mouseTargetIsWidget(t)),i||t.preventDefault(),t}}class Gh extends Hp{constructor(e,t,i){super();this._context=e,this.viewController=t,this.viewHelper=i,this.mouseTargetFactory=new mn(this._context,i),this._mouseDownOperation=this._register(new aJ(this._context,this.viewController,this.viewHelper,(o,a)=>this._createMouseTarget(o,a),o=>this._getMouseColumn(o))),this.lastMouseLeaveTime=-1,this._height=this._context.configuration.options.get(129).height;const n=new RZ(this.viewHelper.viewDomNode);this._register(n.onContextMenu(this.viewHelper.viewDomNode,o=>this._onContextMenu(o,!0))),this._register(n.onMouseMoveThrottled(this.viewHelper.viewDomNode,o=>this._onMouseMove(o),aw(this.mouseTargetFactory),Gh.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onMouseUp(this.viewHelper.viewDomNode,o=>this._onMouseUp(o))),this._register(n.onMouseLeave(this.viewHelper.viewDomNode,o=>this._onMouseLeave(o))),this._register(n.onMouseDown(this.viewHelper.viewDomNode,o=>this._onMouseDown(o)));const s=o=>{if(this.viewController.emitMouseWheel(o),!this._context.configuration.options.get(67))return;const a=new Td(o);if(Je?(o.metaKey||o.ctrlKey)&&!o.shiftKey&&!o.altKey:o.ctrlKey&&!o.metaKey&&!o.shiftKey&&!o.altKey){const c=Fa.getZoomLevel(),h=a.deltaY>0?1:-1;Fa.setZoomLevel(c+h),a.preventDefault(),a.stopPropagation()}};this._register(J(this.viewHelper.viewDomNode,Ee.MOUSE_WHEEL,s,{capture:!0,passive:!1})),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){if(e.hasChanged(129)){const t=this._context.configuration.options.get(129).height;this._height!==t&&(this._height=t,this._mouseDownOperation.onHeightChanged())}return!1}onCursorStateChanged(e){return this._mouseDownOperation.onCursorStateChanged(e),!1}onFocusChanged(e){return!1}onScrollChanged(e){return this._mouseDownOperation.onScrollChanged(),!1}getTargetAtClientPoint(e,t){const n=new dO(e,t).toPageCoordinates(),s=fO(this.viewHelper.viewDomNode);return n.y<s.y||n.y>s.y+s.height||n.x<s.x||n.x>s.x+s.width?null:this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),s,n,null)}_createMouseTarget(e,t){let i=e.target;if(!this.viewHelper.viewDomNode.contains(i)){const n=_h(this.viewHelper.viewDomNode);n&&(i=n.elementsFromPoint(e.posx,e.posy).find(s=>this.viewHelper.viewDomNode.contains(s)))}return this.mouseTargetFactory.createMouseTarget(this.viewHelper.getLastRenderData(),e.editorPos,e.pos,t?i:null)}_getMouseColumn(e){return this.mouseTargetFactory.getMouseColumn(e.editorPos,e.pos)}_onContextMenu(e,t){this.viewController.emitContextMenu({event:e,target:this._createMouseTarget(e,t)})}_onMouseMove(e){this._mouseDownOperation.isActive()||e.timestamp<this.lastMouseLeaveTime||this.viewController.emitMouseMove({event:e,target:this._createMouseTarget(e,!0)})}_onMouseLeave(e){this.lastMouseLeaveTime=new Date().getTime(),this.viewController.emitMouseLeave({event:e,target:null})}_onMouseUp(e){this.viewController.emitMouseUp({event:e,target:this._createMouseTarget(e,!0)})}_onMouseDown(e){const t=this._createMouseTarget(e,!0),i=t.type===6||t.type===7,n=t.type===2||t.type===3||t.type===4,s=t.type===3,o=this._context.configuration.options.get(97),a=t.type===8||t.type===5,l=t.type===9;let c=e.leftButton||e.middleButton;Je&&e.leftButton&&e.ctrlKey&&(c=!1);const h=()=>{e.preventDefault(),this.viewHelper.focusTextArea()};if(c&&(i||s&&o))h(),this._mouseDownOperation.start(t.type,e);else if(n)e.preventDefault();else if(a){const u=t.detail;this.viewHelper.shouldSuppressMouseDownOnViewZone(u.viewZoneId)&&(h(),this._mouseDownOperation.start(t.type,e),e.preventDefault())}else l&&this.viewHelper.shouldSuppressMouseDownOnWidget(t.detail)&&(h(),e.preventDefault());this.viewController.emitMouseDown({event:e,target:t})}}Gh.MOUSE_MOVE_MINIMUM_TIME=100;class aJ extends Y{constructor(e,t,i,n,s){super();this._context=e,this._viewController=t,this._viewHelper=i,this._createMouseTarget=n,this._getMouseColumn=s,this._mouseMoveMonitor=this._register(new PZ(this._viewHelper.viewDomNode)),this._onScrollTimeout=this._register(new Xn),this._mouseState=new lw,this._currentSelection=new be(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,!0);!t||(this._mouseState.isDragAndDrop?this._viewController.emitMouseDrag({event:e,target:t}):this._dispatchMouse(t,!0))}start(e,t){this._lastMouseEvent=t,this._mouseState.setStartedOnLineNumbers(e===3),this._mouseState.setStartButtons(t),this._mouseState.setModifiers(t);const i=this._findMousePosition(t,!0);if(!i||!i.position)return;this._mouseState.trySetCount(t.detail,i.position),t.detail=this._mouseState.count;const n=this._context.configuration.options;if(!n.get(80)&&n.get(31)&&!n.get(18)&&!this._mouseState.altKey&&t.detail<2&&!this._isActive&&!this._currentSelection.isEmpty()&&i.type===6&&i.position&&this._currentSelection.containsPosition(i.position)){this._mouseState.isDragAndDrop=!0,this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,aw(null),s=>this._onMouseDownThenMove(s),s=>{const o=this._findMousePosition(this._lastMouseEvent,!0);s&&s instanceof KeyboardEvent?this._viewController.emitMouseDropCanceled():this._viewController.emitMouseDrop({event:this._lastMouseEvent,target:o?this._createMouseTarget(this._lastMouseEvent,!0):null}),this._stop()});return}this._mouseState.isDragAndDrop=!1,this._dispatchMouse(i,t.shiftKey),this._isActive||(this._isActive=!0,this._mouseMoveMonitor.startMonitoring(t.target,t.buttons,aw(null),s=>this._onMouseDownThenMove(s),()=>this._stop()))}_stop(){this._isActive=!1,this._onScrollTimeout.cancel()}onHeightChanged(){this._mouseMoveMonitor.stopMonitoring()}onScrollChanged(){!this._isActive||this._onScrollTimeout.setIfNotSet(()=>{if(!this._lastMouseEvent)return;const e=this._findMousePosition(this._lastMouseEvent,!1);!e||this._mouseState.isDragAndDrop||this._dispatchMouse(e,!0)},10)}onCursorStateChanged(e){this._currentSelection=e.selections[0]}_getPositionOutsideEditor(e){const t=e.editorPos,i=this._context.model,n=this._context.viewLayout,s=this._getMouseColumn(e);if(e.posy<t.y){const a=Math.max(n.getCurrentScrollTop()-(t.y-e.posy),0),l=bf.getZoneAtCoord(this._context,a);if(l){const h=this._helpPositionJumpOverViewZone(l);if(h)return new ho(null,13,s,h)}const c=n.getLineNumberAtVerticalOffset(a);return new ho(null,13,s,new $(c,1))}if(e.posy>t.y+t.height){const a=n.getCurrentScrollTop()+(e.posy-t.y),l=bf.getZoneAtCoord(this._context,a);if(l){const h=this._helpPositionJumpOverViewZone(l);if(h)return new ho(null,13,s,h)}const c=n.getLineNumberAtVerticalOffset(a);return new ho(null,13,s,new $(c,i.getLineMaxColumn(c)))}const o=n.getLineNumberAtVerticalOffset(n.getCurrentScrollTop()+(e.posy-t.y));return e.posx<t.x?new ho(null,13,s,new $(o,1)):e.posx>t.x+t.width?new ho(null,13,s,new $(o,i.getLineMaxColumn(o))):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(n.type===8||n.type===5){const o=this._helpPositionJumpOverViewZone(n.detail);if(o)return new ho(n.element,n.type,n.mouseColumn,o,null,n.detail)}return n}_helpPositionJumpOverViewZone(e){const t=new $(this._currentSelection.selectionStartLineNumber,this._currentSelection.selectionStartColumn),i=e.positionBefore,n=e.positionAfter;return i&&n?i.isBefore(t)?i:n:null}_dispatchMouse(e,t){!e.position||this._viewController.dispatchMouse({position:e.position,mouseColumn:e.mouseColumn,startedOnLineNumbers:this._mouseState.startedOnLineNumbers,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})}}class lw{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 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}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>lw.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)}}lw.CLEAR_MOUSE_DOWN_COUNT_TIME=400;var Ms;(function(r){r.text="text/plain",r.binary="application/octet-stream",r.unknown="application/unknown",r.markdown="text/markdown",r.latex="text/latex"})(Ms||(Ms={}));let cw=[],PF=[],OF=[];function hw(r,e=!1){const t=lJ(r);cw.push(t),t.userConfigured?OF.push(t):PF.push(t),e&&!t.userConfigured&&cw.forEach(i=>{i.mime===t.mime||i.userConfigured||(t.extension&&i.extension===t.extension&&console.warn(`Overwriting extension <<${t.extension}>> to now point to mime <<${t.mime}>>`),t.filename&&i.filename===t.filename&&console.warn(`Overwriting filename <<${t.filename}>> to now point to mime <<${t.mime}>>`),t.filepattern&&i.filepattern===t.filepattern&&console.warn(`Overwriting filepattern <<${t.filepattern}>> to now point to mime <<${t.mime}>>`),t.firstline&&i.firstline===t.firstline&&console.warn(`Overwriting firstline <<${t.firstline}>> to now point to mime <<${t.mime}>>`))})}function lJ(r){return{id:r.id,mime:r.mime,filename:r.filename,extension:r.extension,filepattern:r.filepattern,firstline:r.firstline,userConfigured:r.userConfigured,filenameLowercase:r.filename?r.filename.toLowerCase():void 0,extensionLowercase:r.extension?r.extension.toLowerCase():void 0,filepatternLowercase:r.filepattern?P2(r.filepattern.toLowerCase()):void 0,filepatternOnPath:r.filepattern?r.filepattern.indexOf(Ni.sep)>=0:!1}}function cJ(r,e){let t;if(r)switch(r.scheme){case Ze.file:t=r.fsPath;break;case Ze.data:t=Ul.parseMetaData(r).get(Ul.META_DATA_LABEL);break;default:t=r.path}if(!t)return[Ms.unknown];t=t.toLowerCase();const i=dh(t),n=FF(t,i,OF);if(n)return[n,Ms.text];const s=FF(t,i,PF);if(s)return[s,Ms.text];if(e){const o=hJ(e);if(o)return[o,Ms.text]}return[Ms.unknown]}function FF(r,e,t){var i;let n=null,s=null,o=null;for(let a=t.length-1;a>=0;a--){const l=t[a];if(e===l.filenameLowercase){n=l;break}if(l.filepattern&&(!s||l.filepattern.length>s.filepattern.length)){const c=l.filepatternOnPath?r:e;((i=l.filepatternLowercase)===null||i===void 0?void 0:i.call(l,c))&&(s=l)}l.extension&&(!o||l.extension.length>o.extension.length)&&e.endsWith(l.extensionLowercase)&&(o=l)}return n?n.mime:s?s.mime:o?o.mime:null}function hJ(r){if(XL(r)&&(r=r.substr(1)),r.length>0)for(let e=cw.length-1;e>=0;e--){const t=cw[e];if(!t.firstline)continue;const i=r.match(t.firstline);if(i&&i.length>0)return t.mime}return null}class Bi{constructor(e,t,i,n,s){this.value=e,this.selectionStart=t,this.selectionEnd=i,this.selectionStartPosition=n,this.selectionEndPosition=s}toString(){return"[ <"+this.value+">, selectionStart: "+this.selectionStart+", selectionEnd: "+this.selectionEnd+"]"}static readFromTextArea(e){return new Bi(e.getValue(),e.getSelectionStart(),e.getSelectionEnd(),null,null)}collapseSelection(){return new Bi(this.value,this.value.length,this.value.length,null,null)}writeToTextArea(e,t,i){t.setValue(e,this.value),i&&t.setSelectionRange(e,this.selectionStart,this.selectionEnd)}deduceEditorPosition(e){if(e<=this.selectionStart){const n=this.value.substring(e,this.selectionStart);return this._finishDeduceEditorPosition(this.selectionStartPosition,n,-1)}if(e>=this.selectionEnd){const n=this.value.substring(this.selectionEnd,e);return this._finishDeduceEditorPosition(this.selectionEndPosition,n,1)}const t=this.value.substring(this.selectionStart,e);if(t.indexOf(String.fromCharCode(8230))===-1)return this._finishDeduceEditorPosition(this.selectionStartPosition,t,1);const i=this.value.substring(e,this.selectionEnd);return this._finishDeduceEditorPosition(this.selectionEndPosition,i,-1)}_finishDeduceEditorPosition(e,t,i){let n=0,s=-1;for(;(s=t.indexOf(` -`,s+1))!==-1;)n++;return[e,i*t.length,n]}static selectedText(e){return new Bi(e,0,e.length,null,null)}static deduceInput(e,t,i){if(!e)return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};let n=e.value,s=e.selectionStart,o=e.selectionEnd,a=t.value,l=t.selectionStart,c=t.selectionEnd;const h=n.substring(o),u=a.substring(c),d=hv(h,u);a=a.substring(0,a.length-d),n=n.substring(0,n.length-d);const f=n.substring(0,s),g=a.substring(0,l),p=Pd(f,g);if(a=a.substring(p),n=n.substring(p),l-=p,s-=p,c-=p,o-=p,i&&l===c&&n.length>0){let v=null;if(l===a.length?a.startsWith(n)&&(v=a.substring(n.length)):a.endsWith(n)&&(v=a.substring(0,a.length-n.length)),v!==null&&v.length>0&&(/\uFE0F/.test(v)||Kj(v)))return{text:v,replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0}}if(l===c){if(n===a&&s===0&&o===n.length&&l===a.length&&a.indexOf(` -`)===-1&&Gj(a))return{text:"",replacePrevCharCnt:0,replaceNextCharCnt:0,positionDelta:0};const v=f.length-p;return{text:a,replacePrevCharCnt:v,replaceNextCharCnt:0,positionDelta:0}}const _=o-s;return{text:a,replacePrevCharCnt:_,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(Pd(e.value,t.value),e.selectionEnd),n=Math.min(hv(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);e.selectionStart-i;const a=e.selectionEnd-i;t.selectionStart-i;const l=t.selectionEnd-i;return{text:o,replacePrevCharCnt:a,replaceNextCharCnt:s.length-a,positionDelta:l-o.length}}}Bi.EMPTY=new Bi("",0,0,null,null);class vf{static _getPageOfLine(e,t){return Math.floor((e-1)/t)}static _getRangeForPage(e,t){const i=e*t,n=i+1,s=i+t;return new k(n,1,s+1,1)}static fromEditorSelection(e,t,i,n,s){const o=vf._getPageOfLine(i.startLineNumber,n),a=vf._getRangeForPage(o,n),l=vf._getPageOfLine(i.endLineNumber,n),c=vf._getRangeForPage(l,n),h=a.intersectRanges(new k(1,1,i.startLineNumber,i.startColumn));let u=t.getValueInRange(h,1);const d=t.getLineCount(),f=t.getLineMaxColumn(d),g=c.intersectRanges(new k(i.endLineNumber,i.endColumn,d,f));let p=t.getValueInRange(g,1),_;if(o===l||o+1===l)_=t.getValueInRange(i,1);else{const v=a.intersectRanges(i),b=c.intersectRanges(i);_=t.getValueInRange(v,1)+String.fromCharCode(8230)+t.getValueInRange(b,1)}if(s){const v=500;u.length>v&&(u=u.substring(u.length-v,u.length)),p.length>v&&(p=p.substring(0,v)),_.length>2*v&&(_=_.substring(0,v)+String.fromCharCode(8230)+_.substring(_.length-v,_.length))}return new Bi(u+_+p,u.length,u.length+_.length,new $(i.startLineNumber,i.startColumn),new $(i.endLineNumber,i.endColumn))}}var uw;(function(r){r.Tap="-monaco-textarea-synthetic-tap"})(uw||(uw={}));const LD={forceCopyWithSyntaxHighlighting:!1};class lm{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)}}lm.INSTANCE=new lm;class uJ extends Y{constructor(e,t){super();this.textArea=t,this._onFocus=this._register(new H),this.onFocus=this._onFocus.event,this._onBlur=this._register(new H),this.onBlur=this._onBlur.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onKeyUp=this._register(new H),this.onKeyUp=this._onKeyUp.event,this._onCut=this._register(new H),this.onCut=this._onCut.event,this._onPaste=this._register(new H),this.onPaste=this._onPaste.event,this._onType=this._register(new H),this.onType=this._onType.event,this._onCompositionStart=this._register(new H),this.onCompositionStart=this._onCompositionStart.event,this._onCompositionUpdate=this._register(new H),this.onCompositionUpdate=this._onCompositionUpdate.event,this._onCompositionEnd=this._register(new H),this.onCompositionEnd=this._onCompositionEnd.event,this._onSelectionChangeRequest=this._register(new H),this.onSelectionChangeRequest=this._onSelectionChangeRequest.event,this._host=e,this._textArea=this._register(new dJ(t)),this._asyncTriggerCut=this._register(new Bt(()=>this._onCut.fire(),0)),this._asyncFocusGainWriteScreenReaderContent=this._register(new Bt(()=>this.writeScreenReaderContent("asyncFocusGain"),0)),this._textAreaState=Bi.EMPTY,this._selectionChangeListener=null,this.writeScreenReaderContent("ctor"),this._hasFocus=!1,this._isDoingComposition=!1,this._nextCommand=0;let i=null;this._register(ki(t.domNode,"keydown",a=>{(a.keyCode===109||this._isDoingComposition&&a.keyCode===1)&&a.stopPropagation(),a.equals(9)&&a.preventDefault(),i=a,this._onKeyDown.fire(a)})),this._register(ki(t.domNode,"keyup",a=>{this._onKeyUp.fire(a)})),this._register(J(t.domNode,"compositionstart",a=>{if(!this._isDoingComposition){if(this._isDoingComposition=!0,Je&&this._textAreaState.selectionStart===this._textAreaState.selectionEnd&&this._textAreaState.selectionStart>0&&this._textAreaState.value.substr(this._textAreaState.selectionStart-1,1)===a.data&&(i&&i.equals(109)&&(i.code==="ArrowRight"||i.code==="ArrowLeft")||Mn)){this._textAreaState=new Bi(this._textAreaState.value,this._textAreaState.selectionStart-1,this._textAreaState.selectionEnd,this._textAreaState.selectionStartPosition?new $(this._textAreaState.selectionStartPosition.lineNumber,this._textAreaState.selectionStartPosition.column-1):null,this._textAreaState.selectionEndPosition),this._onCompositionStart.fire({revealDeltaColumns:-1});return}if(ap){this._onCompositionStart.fire({revealDeltaColumns:-this._textAreaState.selectionStart});return}this._setAndWriteTextAreaState("compositionstart",Bi.EMPTY),this._onCompositionStart.fire({revealDeltaColumns:0})}}));const n=a=>{const l=this._textAreaState,c=Bi.readFromTextArea(this._textArea);return[c,Bi.deduceInput(l,c,a)]},s=()=>{const a=this._textAreaState,l=Bi.readFromTextArea(this._textArea);return[l,Bi.deduceAndroidCompositionInput(a,l)]},o=a=>{const l=this._textAreaState,c=Bi.selectedText(a),h={text:c.value,replacePrevCharCnt:l.selectionEnd-l.selectionStart,replaceNextCharCnt:0,positionDelta:0};return[c,h]};this._register(J(t.domNode,"compositionupdate",a=>{if(ap){const[h,u]=s();this._textAreaState=h,this._onType.fire(u),this._onCompositionUpdate.fire(a);return}const[l,c]=o(a.data||"");this._textAreaState=l,this._onType.fire(c),this._onCompositionUpdate.fire(a)})),this._register(J(t.domNode,"compositionend",a=>{if(!this._isDoingComposition)return;if(this._isDoingComposition=!1,ap){const[h,u]=s();this._textAreaState=h,this._onType.fire(u),this._onCompositionEnd.fire();return}const[l,c]=o(a.data||"");this._textAreaState=l,this._onType.fire(c),(rv||Mn)&&(this._textAreaState=Bi.readFromTextArea(this._textArea)),this._onCompositionEnd.fire()})),this._register(J(t.domNode,"input",()=>{if(this._textArea.setIgnoreSelectionChangeTime("received input event"),this._isDoingComposition)return;const[a,l]=n(Je);l.replacePrevCharCnt===0&&l.text.length===1&&ji(l.text.charCodeAt(0))||(this._textAreaState=a,this._nextCommand===0?(l.text!==""||l.replacePrevCharCnt!==0)&&this._onType.fire(l):((l.text!==""||l.replacePrevCharCnt!==0)&&this._firePaste(l.text,null),this._nextCommand=0))})),this._register(J(t.domNode,"cut",a=>{this._textArea.setIgnoreSelectionChangeTime("received cut event"),this._ensureClipboardGetsEditorSelection(a),this._asyncTriggerCut.schedule()})),this._register(J(t.domNode,"copy",a=>{this._ensureClipboardGetsEditorSelection(a)})),this._register(J(t.domNode,"paste",a=>{if(this._textArea.setIgnoreSelectionChangeTime("received paste event"),cm.canUseTextData(a)){const[l,c]=cm.getTextData(a);l!==""&&this._firePaste(l,c)}else this._textArea.getSelectionStart()!==this._textArea.getSelectionEnd()&&this._setAndWriteTextAreaState("paste",Bi.EMPTY),this._nextCommand=1})),this._register(J(t.domNode,"focus",()=>{const a=this._hasFocus;this._setHasFocus(!0),Po&&!a&&this._hasFocus&&this._asyncFocusGainWriteScreenReaderContent.schedule()})),this._register(J(t.domNode,"blur",()=>{this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("blurWithoutCompositionEnd"),this._onCompositionEnd.fire()),this._setHasFocus(!1)})),this._register(J(t.domNode,uw.Tap,()=>{ap&&this._isDoingComposition&&(this._isDoingComposition=!1,this.writeScreenReaderContent("tapWithoutCompositionEnd"),this._onCompositionEnd.fire())}))}_installSelectionChangeListener(){let e=0;return J(document,"selectionchange",t=>{if(!this._hasFocus||this._isDoingComposition||!rv)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||!this._textAreaState.selectionStartPosition||!this._textAreaState.selectionEndPosition)return;const o=this._textArea.getValue();if(this._textAreaState.value!==o)return;const a=this._textArea.getSelectionStart(),l=this._textArea.getSelectionEnd();if(this._textAreaState.selectionStart===a&&this._textAreaState.selectionEnd===l)return;const c=this._textAreaState.deduceEditorPosition(a),h=this._host.deduceModelPosition(c[0],c[1],c[2]),u=this._textAreaState.deduceEditorPosition(l),d=this._host.deduceModelPosition(u[0],u[1],u[2]),f=new be(h.lineNumber,h.column,d.lineNumber,d.column);this._onSelectionChangeRequest.fire(f)})}dispose(){super.dispose(),this._selectionChangeListener&&(this._selectionChangeListener.dispose(),this._selectionChangeListener=null)}focusTextArea(){this._setHasFocus(!0),this.refreshFocusState()}isFocused(){return this._hasFocus}refreshFocusState(){const e=_h(this.textArea.domNode);e?this._setHasFocus(e.activeElement===this.textArea.domNode):TL(this.textArea.domNode)?this._setHasFocus(document.activeElement===this.textArea.domNode):this._setHasFocus(!1)}_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._isDoingComposition||this._setAndWriteTextAreaState(e,this._host.getScreenReaderContent(this._textAreaState))}_ensureClipboardGetsEditorSelection(e){const t=this._host.getDataToCopy(cm.canUseTextData(e)),i={version:1,isFromEmptySelection:t.isFromEmptySelection,multicursorText:t.multicursorText,mode:t.mode};if(lm.INSTANCE.set(Mn?t.text.replace(/\r\n/g,` -`):t.text,i),!cm.canUseTextData(e)){this._setAndWriteTextAreaState("copy or cut",Bi.selectedText(t.text));return}cm.setTextData(e,t.text,t.html,i)}_firePaste(e,t){t||(t=lm.INSTANCE.get(e)),this._onPaste.fire({text:e,metadata:t})}}class cm{static canUseTextData(e){return!!e.clipboardData}static getTextData(e){if(e.clipboardData){e.preventDefault();const t=e.clipboardData.getData(Ms.text);let i=null;const n=e.clipboardData.getData("vscode-editor-data");if(typeof n=="string")try{i=JSON.parse(n),i.version!==1&&(i=null)}catch{}return[t,i]}throw new Error("ClipboardEventUtils.getTextData: Cannot use text data!")}static setTextData(e,t,i,n){if(e.clipboardData){e.clipboardData.setData(Ms.text,t),typeof i=="string"&&e.clipboardData.setData("text/html",i),e.clipboardData.setData("vscode-editor-data",JSON.stringify(n)),e.preventDefault();return}throw new Error("ClipboardEventUtils.setTextData: Cannot use text data!")}}class dJ extends Y{constructor(e){super();this._actual=e,this._ignoreSelectionChangeTime=0}setIgnoreSelectionChangeTime(e){this._ignoreSelectionChangeTime=Date.now()}getIgnoreSelectionChangeTime(){return this._ignoreSelectionChangeTime}resetSelectionChangeTime(){this._ignoreSelectionChangeTime=0}getValue(){return this._actual.domNode.value}setValue(e,t){const i=this._actual.domNode;i.value!==t&&(this.setIgnoreSelectionChangeTime("setValue"),i.value=t)}getSelectionStart(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionEnd:this._actual.domNode.selectionStart}getSelectionEnd(){return this._actual.domNode.selectionDirection==="backward"?this._actual.domNode.selectionStart:this._actual.domNode.selectionEnd}setSelectionRange(e,t,i){const n=this._actual.domNode;let s=null;const o=_h(n);o?s=o.activeElement:s=document.activeElement;const a=s===n,l=n.selectionStart,c=n.selectionEnd;if(a&&l===t&&c===i){Mn&&window.parent!==window&&n.focus();return}if(a){this.setIgnoreSelectionChangeTime("setSelectionRange"),n.setSelectionRange(t,i),Mn&&window.parent!==window&&n.focus();return}try{const h=Nj(n);this.setIgnoreSelectionChangeTime("setSelectionRange"),n.focus(),n.setSelectionRange(t,i),Tj(n,h)}catch{}}}class fJ extends Gh{constructor(e,t,i){super(e,t,i);this._register(Et.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,Vt.Tap,s=>this.onTap(s))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Change,s=>this.onChange(s))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Contextmenu,s=>this._onContextMenu(new Mh(s,this.viewHelper.viewDomNode),!1))),this._lastPointerType="mouse",this._register(J(this.viewHelper.linesContentDomNode,"pointerdown",s=>{const o=s.pointerType;if(o==="mouse"){this._lastPointerType="mouse";return}else o==="touch"?this._lastPointerType="touch":this._lastPointerType="pen"}));const n=new MZ(this.viewHelper.viewDomNode);this._register(n.onPointerMoveThrottled(this.viewHelper.viewDomNode,s=>this._onMouseMove(s),aw(this.mouseTargetFactory),Gh.MOUSE_MOVE_MINIMUM_TIME)),this._register(n.onPointerUp(this.viewHelper.viewDomNode,s=>this._onMouseUp(s))),this._register(n.onPointerLeave(this.viewHelper.viewDomNode,s=>this._onMouseLeave(s))),this._register(n.onPointerDown(this.viewHelper.viewDomNode,s=>this._onMouseDown(s)))}onTap(e){if(!e.initialTarget||!this.viewHelper.linesContentDomNode.contains(e.initialTarget))return;e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Mh(e,this.viewHelper.viewDomNode),!1);t.position&&this.viewController.dispatchMouse({position:t.position,mouseColumn:t.position.column,startedOnLineNumbers:!1,mouseDownCount:e.tapCount,inSelectionMode:!1,altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,leftButton:!1,middleButton:!1})}onChange(e){this._lastPointerType==="touch"&&this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}_onMouseDown(e){e.browserEvent.pointerType!=="touch"&&super._onMouseDown(e)}}class gJ extends Gh{constructor(e,t,i){super(e,t,i);this._register(Et.addTarget(this.viewHelper.linesContentDomNode)),this._register(J(this.viewHelper.linesContentDomNode,Vt.Tap,n=>this.onTap(n))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Change,n=>this.onChange(n))),this._register(J(this.viewHelper.linesContentDomNode,Vt.Contextmenu,n=>this._onContextMenu(new Mh(n,this.viewHelper.viewDomNode),!1)))}onTap(e){e.preventDefault(),this.viewHelper.focusTextArea();const t=this._createMouseTarget(new Mh(e,this.viewHelper.viewDomNode),!1);if(t.position){const i=document.createEvent("CustomEvent");i.initEvent(uw.Tap,!1,!0),this.viewHelper.dispatchTextAreaEvent(i),this.viewController.moveTo(t.position)}}onChange(e){this._context.model.deltaScrollNow(-e.translationX,-e.translationY)}}class pJ extends Y{constructor(e,t,i){super();No&&sv.pointerEvents?this.handler=this._register(new fJ(e,t,i)):window.TouchEvent?this.handler=this._register(new gJ(e,t,i)):this.handler=this._register(new Gh(e,t,i))}getTargetAtClientPoint(e,t){return this.handler.getTargetAtClientPoint(e,t)}}class Cf extends Hp{}class wf extends Cf{constructor(e){super();this._context=e,this._readConfig(),this._lastCursorModelPosition=new $(1,1),this._renderResult=null,this._activeLineNumber=1,this._context.addEventHandler(this)}_readConfig(){const e=this._context.configuration.options;this._lineHeight=e.get(58);const t=e.get(59);this._renderLineNumbers=t.renderType,this._renderCustomLineNumbers=t.renderFn,this._renderFinalNewline=e.get(83);const i=e.get(129);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.model.coordinatesConverter.convertViewPositionToModelPosition(t);let i=!1;return this._activeLineNumber!==t.lineNumber&&(this._activeLineNumber=t.lineNumber,i=!0),(this._renderLineNumbers===2||this._renderLineNumbers===3)&&(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.model.coordinatesConverter.convertViewPositionToModelPosition(new $(e,1));if(t.column!==1)return"";const i=t.lineNumber;if(this._renderCustomLineNumbers)return this._renderCustomLineNumbers(i);if(this._renderLineNumbers===2){const n=Math.abs(this._lastCursorModelPosition.lineNumber-i);return n===0?'<span class="relative-current-line-number">'+i+"</span>":String(n)}return this._renderLineNumbers===3?this._lastCursorModelPosition.lineNumber===i||i%10==0?String(i):"":String(i)}prepareRender(e){if(this._renderLineNumbers===0){this._renderResult=null;return}const t=Zn?this._lineHeight%2==0?" lh-even":" lh-odd":"",i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s='<div class="'+wf.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">',o=this._context.model.getLineCount(),a=[];for(let l=i;l<=n;l++){const c=l-i;if(!this._renderFinalNewline&&l===o&&this._context.model.getLineLength(l)===0){a[c]="";continue}const h=this._getLineRenderLineNumber(l);h?l===this._activeLineNumber?a[c]='<div class="active-line-number '+wf.CLASS_NAME+t+'" style="left:'+this._lineNumbersLeft+"px;width:"+this._lineNumbersWidth+'px;">'+h+"</div>":a[c]=s+h+"</div>":a[c]=""}this._renderResult=a}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}wf.CLASS_NAME="line-numbers";Lt((r,e)=>{const t=r.getColor(aF);t&&e.addRule(`.monaco-editor .line-numbers { color: ${t}; }`);const i=r.getColor(aQ);i&&e.addRule(`.monaco-editor .line-numbers.active-line-number { color: ${i}; }`)});class Zh extends ss{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._canUseLayerHinting=!t.get(28),this._contentLeft=i.contentLeft,this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,this._domNode=dt(document.createElement("div")),this._domNode.setClassName(Zh.OUTER_CLASS_NAME),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._glyphMarginBackgroundDomNode=dt(document.createElement("div")),this._glyphMarginBackgroundDomNode.setClassName(Zh.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(129);return this._canUseLayerHinting=!t.get(28),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)}}Zh.CLASS_NAME="glyph-margin";Zh.OUTER_CLASS_NAME="margin";const Yh="monaco-mouse-cursor-text";class xD{constructor(e,t,i){this._visibleTextAreaBrand=void 0,this.top=e,this.left=t,this.width=i}setWidth(e){return new xD(this.top,this.left,e)}}const hm=Mn;class mJ extends ss{constructor(e,t,i){super(e);this._primaryCursorPosition=new $(1,1),this._primaryCursorVisibleRange=null,this._viewController=t,this._viewHelper=i,this._scrollLeft=0,this._scrollTop=0;const n=this._context.configuration.options,s=n.get(129);this._setAccessibilityOptions(n),this._contentLeft=s.contentLeft,this._contentWidth=s.contentWidth,this._contentHeight=s.height,this._fontInfo=n.get(43),this._lineHeight=n.get(58),this._emptySelectionClipboard=n.get(32),this._copyWithSyntaxHighlighting=n.get(21),this._visibleTextArea=null,this._selections=[new be(1,1,1,1)],this._modelSelections=[new be(1,1,1,1)],this._lastRenderPosition=null,this.textArea=dt(document.createElement("textarea")),Zo.write(this.textArea,6),this.textArea.setClassName(`inputarea ${Yh}`),this.textArea.setAttribute("wrap","off"),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(n)),this.textArea.setAttribute("tabindex",String(n.get(111))),this.textArea.setAttribute("role","textbox"),this.textArea.setAttribute("aria-roledescription",m("editor","editor")),this.textArea.setAttribute("aria-multiline","true"),this.textArea.setAttribute("aria-haspopup","false"),this.textArea.setAttribute("aria-autocomplete","both"),n.get(30)&&n.get(80)&&this.textArea.setAttribute("readonly","true"),this.textAreaCover=dt(document.createElement("div")),this.textAreaCover.setPosition("absolute");const o={getLineCount:()=>this._context.model.getLineCount(),getLineMaxColumn:l=>this._context.model.getLineMaxColumn(l),getValueInRange:(l,c)=>this._context.model.getValueInRange(l,c)},a={getDataToCopy:l=>{const c=this._context.model.getPlainTextToCopy(this._modelSelections,this._emptySelectionClipboard,Xi),h=this._context.model.getEOL(),u=this._emptySelectionClipboard&&this._modelSelections.length===1&&this._modelSelections[0].isEmpty(),d=Array.isArray(c)?c:null,f=Array.isArray(c)?c.join(h):c;let g,p=null;if(l&&(LD.forceCopyWithSyntaxHighlighting||this._copyWithSyntaxHighlighting&&f.length<65536)){const _=this._context.model.getRichTextToCopy(this._modelSelections,this._emptySelectionClipboard);_&&(g=_.html,p=_.mode)}return{isFromEmptySelection:u,multicursorText:d,text:f,html:g,mode:p}},getScreenReaderContent:l=>{if(this._accessibilitySupport===1){if(Je){const c=this._selections[0];if(c.isEmpty()){const h=c.getStartPosition();let u=this._getWordBeforePosition(h);if(u.length===0&&(u=this._getCharacterBeforePosition(h)),u.length>0)return new Bi(u,u.length,u.length,h,h)}}return Bi.EMPTY}if(ap){const c=this._selections[0];if(c.isEmpty()){const h=c.getStartPosition(),[u,d]=this._getAndroidWordAtPosition(h);if(u.length>0)return new Bi(u,d,d,h,h)}return Bi.EMPTY}return vf.fromEditorSelection(l,o,this._selections[0],this._accessibilityPageSize,this._accessibilitySupport===0)},deduceModelPosition:(l,c,h)=>this._context.model.deduceModelPositionRelativeToViewPosition(l,c,h)};this._textAreaInput=this._register(new uJ(a,this.textArea)),this._register(this._textAreaInput.onKeyDown(l=>{this._viewController.emitKeyDown(l)})),this._register(this._textAreaInput.onKeyUp(l=>{this._viewController.emitKeyUp(l)})),this._register(this._textAreaInput.onPaste(l=>{let c=!1,h=null,u=null;l.metadata&&(c=this._emptySelectionClipboard&&!!l.metadata.isFromEmptySelection,h=typeof l.metadata.multicursorText!="undefined"?l.metadata.multicursorText:null,u=l.metadata.mode),this._viewController.paste(l.text,c,h,u)})),this._register(this._textAreaInput.onCut(()=>{this._viewController.cut()})),this._register(this._textAreaInput.onType(l=>{l.replacePrevCharCnt||l.replaceNextCharCnt||l.positionDelta?this._viewController.compositionType(l.text,l.replacePrevCharCnt,l.replaceNextCharCnt,l.positionDelta):this._viewController.type(l.text)})),this._register(this._textAreaInput.onSelectionChangeRequest(l=>{this._viewController.setSelection(l)})),this._register(this._textAreaInput.onCompositionStart(l=>{const c=this._selections[0].startLineNumber,h=this._selections[0].startColumn+l.revealDeltaColumns;this._context.model.revealRange("keyboard",!0,new k(c,h,c,h),0,1);const u=this._viewHelper.visibleRangeForPositionRelativeToEditor(c,h);u&&(this._visibleTextArea=new xD(this._context.viewLayout.getVerticalOffsetForLineNumber(c),u.left,hm?0:1),this._render()),this.textArea.setClassName(`inputarea ${Yh} ime-input`),this._viewController.compositionStart(),this._context.model.onCompositionStart()})),this._register(this._textAreaInput.onCompositionUpdate(l=>{!this._visibleTextArea||(this._visibleTextArea=this._visibleTextArea.setWidth(_J(l.data,this._fontInfo)),this._render())})),this._register(this._textAreaInput.onCompositionEnd(()=>{this._visibleTextArea=null,this._render(),this.textArea.setClassName(`inputarea ${Yh}`),this._viewController.compositionEnd(),this._context.model.onCompositionEnd()})),this._register(this._textAreaInput.onFocus(()=>{this._context.model.setHasFocus(!0)})),this._register(this._textAreaInput.onBlur(()=>{this._context.model.setHasFocus(!1)}))}dispose(){super.dispose()}_getAndroidWordAtPosition(e){const t='`~!@#$%^&*()-=+[{]}\\|;:",.<>/?',i=this._context.model.getLineContent(e.lineNumber),n=os(t);let s=!0,o=e.column,a=!0,l=e.column,c=0;for(;c<50&&(s||a);){if(s&&o<=1&&(s=!1),s){const h=i.charCodeAt(o-2);n.get(h)!==0?s=!1:o--}if(a&&l>i.length&&(a=!1),a){const h=i.charCodeAt(l-1);n.get(h)!==0?a=!1:l++}c++}return[i.substring(o-1,l-1),e.column-o]}_getWordBeforePosition(e){const t=this._context.model.getLineContent(e.lineNumber),i=os(this._context.configuration.options.get(115));let n=e.column,s=0;for(;n>1;){const o=t.charCodeAt(n-2);if(i.get(o)!==0||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 i=this._context.model.getLineContent(e.lineNumber).charAt(e.column-2);if(!ji(i.charCodeAt(0)))return i}return""}_getAriaLabel(e){return e.get(2)===1?m("accessibilityOffAriaLabel","The editor is not accessible at this time. Press {0} for options.",Zn?"Shift+Alt+F1":"Alt+F1"):e.get(4)}_setAccessibilityOptions(e){this._accessibilitySupport=e.get(2);const t=e.get(3);this._accessibilitySupport===2&&t===Ks.accessibilityPageSize.defaultValue?this._accessibilityPageSize=500:this._accessibilityPageSize=t}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._setAccessibilityOptions(t),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._contentHeight=i.height,this._fontInfo=t.get(43),this._lineHeight=t.get(58),this._emptySelectionClipboard=t.get(32),this._copyWithSyntaxHighlighting=t.get(21),this.textArea.setAttribute("aria-label",this._getAriaLabel(t)),this.textArea.setAttribute("tabindex",String(t.get(111))),(e.hasChanged(30)||e.hasChanged(80))&&(t.get(30)&&t.get(80)?this.textArea.setAttribute("readonly","true"):this.textArea.removeAttribute("readonly")),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)}prepareRender(e){this._primaryCursorPosition=new $(this._selections[0].positionLineNumber,this._selections[0].positionColumn),this._primaryCursorVisibleRange=e.visibleRangeForPosition(this._primaryCursorPosition)}render(e){this._textAreaInput.writeScreenReaderContent("render"),this._render()}_render(){if(this._visibleTextArea){this._renderInsideEditor(null,this._visibleTextArea.top-this._scrollTop,this._contentLeft+this._visibleTextArea.left-this._scrollLeft,this._visibleTextArea.width,this._lineHeight);return}if(!this._primaryCursorVisibleRange){this._renderAtTopLeft();return}const e=this._contentLeft+this._primaryCursorVisibleRange.left-this._scrollLeft;if(e<this._contentLeft||e>this._contentLeft+this._contentWidth){this._renderAtTopLeft();return}const t=this._context.viewLayout.getVerticalOffsetForLineNumber(this._selections[0].positionLineNumber)-this._scrollTop;if(t<0||t>this._contentHeight){this._renderAtTopLeft();return}if(Je){this._renderInsideEditor(this._primaryCursorPosition,t,e,hm?0:1,this._lineHeight);return}this._renderInsideEditor(this._primaryCursorPosition,t,e,hm?0:1,hm?0:1)}_renderInsideEditor(e,t,i,n,s){this._lastRenderPosition=e;const o=this.textArea,a=this.textAreaCover;Dn.applyFontInfo(o,this._fontInfo),o.setTop(t),o.setLeft(i),o.setWidth(n),o.setHeight(s),a.setTop(0),a.setLeft(0),a.setWidth(0),a.setHeight(0)}_renderAtTopLeft(){this._lastRenderPosition=null;const e=this.textArea,t=this.textAreaCover;if(Dn.applyFontInfo(e,this._fontInfo),e.setTop(0),e.setLeft(0),t.setTop(0),t.setLeft(0),hm){e.setWidth(0),e.setHeight(0),t.setWidth(0),t.setHeight(0);return}e.setWidth(1),e.setHeight(1),t.setWidth(1),t.setHeight(1);const i=this._context.configuration.options;i.get(49)?t.setClassName("monaco-editor-background textAreaCover "+Zh.OUTER_CLASS_NAME):i.get(59).renderType!==0?t.setClassName("monaco-editor-background textAreaCover "+wf.CLASS_NAME):t.setClassName("monaco-editor-background textAreaCover")}}function _J(r,e){const i=document.createElement("canvas").getContext("2d");i.font=bJ(e);const n=i.measureText(r);return Mn?n.width+2:n.width}function bJ(r){return vJ("normal",r.fontWeight,r.fontSize,r.lineHeight,r.fontFamily)}function vJ(r,e,t,i,n){return`${r} normal ${e} ${t}px / ${i}px ${n}`}class Xh{static columnSelect(e,t,i,n,s,o){let a=Math.abs(s-i)+1,l=i>s,c=n>o,h=n<o,u=[];for(let d=0;d<a;d++){let f=i+(l?-d:d),g=Ot.columnFromVisibleColumn2(e,t,f,n),p=Ot.columnFromVisibleColumn2(e,t,f,o),_=Ot.visibleColumnFromColumn2(e,t,new $(f,g)),v=Ot.visibleColumnFromColumn2(e,t,new $(f,p));h&&(_>o||v<n)||c&&(v>n||_<o)||u.push(new qi(new k(f,g,f,g),0,new $(f,p),0))}if(u.length===0)for(let d=0;d<a;d++){const f=i+(l?-d:d),g=t.getLineMaxColumn(f);u.push(new qi(new k(f,g,f,g),0,new $(f,g),0))}return{viewStates:u,reversed:l,fromLineNumber:i,fromVisualColumn:n,toLineNumber:s,toVisualColumn:o}}static columnSelectLeft(e,t,i){let n=i.toViewVisualColumn;return n>0&&n--,Xh.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 l=s;l<=o;l++){const c=t.getLineMaxColumn(l),h=Ot.visibleColumnFromColumn2(e,t,new $(l,c));n=Math.max(n,h)}let a=i.toViewVisualColumn;return a<n&&a++,this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,i.toViewLineNumber,a)}static columnSelectUp(e,t,i,n){const s=n?e.pageSize:1,o=Math.max(1,i.toViewLineNumber-s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}static columnSelectDown(e,t,i,n){const s=n?e.pageSize:1,o=Math.min(t.getLineCount(),i.toViewLineNumber+s);return this.columnSelect(e,t,i.fromViewLineNumber,i.fromViewVisualColumn,o,i.toViewVisualColumn)}}class rn{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new be(n.endLineNumber,n.endColumn,n.endLineNumber,n.endColumn)}}class CJ{constructor(e,t){this._range=e,this._text=t}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){const n=t.getInverseEditOperations()[0].range;return new be(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn)}}class dw{constructor(e,t,i=!1){this._range=e,this._text=t,this.insertsAutoWhitespace=i}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new be(n.startLineNumber,n.startColumn,n.startLineNumber,n.startColumn)}}class fw{constructor(e,t,i,n,s=!1){this._range=e,this._text=t,this._columnDeltaOffset=n,this._lineNumberDeltaOffset=i,this.insertsAutoWhitespace=s}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text)}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return new be(n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset,n.endLineNumber+this._lineNumberDeltaOffset,n.endColumn+this._columnDeltaOffset)}}class kD{constructor(e,t,i,n=!1){this._range=e,this._text=t,this._initialSelection=i,this._forceMoveMarkers=n,this._selectionId=null}getEditOperations(e,t){t.addTrackedEditOperation(this._range,this._text,this._forceMoveMarkers),this._selectionId=t.trackSelection(this._initialSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}class DD{constructor(e,t,i){this._cursorPositionBrand=void 0,this.lineNumber=e,this.column=t,this.leftoverVisibleColumns=i}}class mt{static leftPosition(e,t){if(t.column>e.getLineMinColumn(t.lineNumber))return t.delta(void 0,-$j(e.getLineContent(t.lineNumber),t.column-1));if(t.lineNumber>1){const i=t.lineNumber-1;return new $(i,e.getLineMaxColumn(i))}else 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=am.atomicPosition(s,t.column-1,i,0);if(o!==-1&&o+1>=n)return new $(t.lineNumber,o+1)}return this.leftPosition(e,t)}static left(e,t,i){const n=e.stickyTabStops?mt.leftPositionAtomicSoftTabs(t,i,e.tabSize):mt.leftPosition(t,i);return new DD(n.lineNumber,n.column,0)}static moveLeft(e,t,i,n,s){let o,a;if(i.hasSelection()&&!n)o=i.selection.startLineNumber,a=i.selection.startColumn;else{const l=i.position.delta(void 0,-(s-1)),c=t.normalizePosition(mt.clipPositionColumn(l,t),0),h=mt.left(e,t,c);o=h.lineNumber,a=h.column}return i.move(n,o,a,0)}static clipPositionColumn(e,t){return new $(e.lineNumber,mt.clipRange(e.column,t.getLineMinColumn(e.lineNumber),t.getLineMaxColumn(e.lineNumber)))}static clipRange(e,t,i){return e<t?t:e>i?i:e}static rightPosition(e,t,i){return i<e.getLineMaxColumn(t)?i=i+uv(e.getLineContent(t),i-1):t<e.getLineCount()&&(t=t+1,i=e.getLineMinColumn(t)),new $(t,i)}static rightPositionAtomicSoftTabs(e,t,i,n,s){if(i<e.getLineIndentColumn(t)){const o=e.getLineContent(t),a=am.atomicPosition(o,i-1,n,1);if(a!==-1)return new $(t,a+1)}return this.rightPosition(e,t,i)}static right(e,t,i){const n=e.stickyTabStops?mt.rightPositionAtomicSoftTabs(t,i.lineNumber,i.column,e.tabSize,e.indentSize):mt.rightPosition(t,i.lineNumber,i.column);return new DD(n.lineNumber,n.column,0)}static moveRight(e,t,i,n,s){let o,a;if(i.hasSelection()&&!n)o=i.selection.endLineNumber,a=i.selection.endColumn;else{const l=i.position.delta(void 0,s-1),c=t.normalizePosition(mt.clipPositionColumn(l,t),1),h=mt.right(e,t,c);o=h.lineNumber,a=h.column}return i.move(n,o,a,0)}static vertical(e,t,i,n,s,o,a){const l=Ot.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize)+s,c=t.getLineCount(),h=i===1&&n===1,u=i===c&&n===t.getLineMaxColumn(i),d=o<i?h:u;return i=o,i<1?(i=1,a?n=t.getLineMinColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):i>c?(i=c,a?n=t.getLineMaxColumn(i):n=Math.min(t.getLineMaxColumn(i),n)):n=Ot.columnFromVisibleColumn2(e,t,i,l),d?s=0:s=l-Ot.visibleColumnFromColumn(t.getLineContent(i),n,e.tabSize),new DD(i,n,s)}static down(e,t,i,n,s,o,a){return this.vertical(e,t,i,n,s,i+o,a)}static moveDown(e,t,i,n,s){let o,a;i.hasSelection()&&!n?(o=i.selection.endLineNumber,a=i.selection.endColumn):(o=i.position.lineNumber,a=i.position.column);let l=mt.down(e,t,o,a,i.leftoverVisibleColumns,s,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateDown(e,t,i){let n=i.selection,s=mt.down(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=mt.down(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new qi(new k(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new $(o.lineNumber,o.column),o.leftoverVisibleColumns)}static up(e,t,i,n,s,o,a){return this.vertical(e,t,i,n,s,i-o,a)}static moveUp(e,t,i,n,s){let o,a;i.hasSelection()&&!n?(o=i.selection.startLineNumber,a=i.selection.startColumn):(o=i.position.lineNumber,a=i.position.column);let l=mt.up(e,t,o,a,i.leftoverVisibleColumns,s,!0);return i.move(n,l.lineNumber,l.column,l.leftoverVisibleColumns)}static translateUp(e,t,i){let n=i.selection,s=mt.up(e,t,n.selectionStartLineNumber,n.selectionStartColumn,i.selectionStartLeftoverVisibleColumns,1,!1),o=mt.up(e,t,n.positionLineNumber,n.positionColumn,i.leftoverVisibleColumns,1,!1);return new qi(new k(s.lineNumber,s.column,s.lineNumber,s.column),s.leftoverVisibleColumns,new $(o.lineNumber,o.column),o.leftoverVisibleColumns)}static _isBlankLine(e,t){return e.getLineFirstNonWhitespaceColumn(t)===0}static moveToPrevBlankLine(e,t,i,n){let s=i.position.lineNumber;for(;s>1&&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<s&&this._isBlankLine(t,o);)o++;for(;o<s&&!this._isBlankLine(t,o);)o++;return i.move(n,o,t.getLineMinColumn(o),0)}static moveToBeginningOfLine(e,t,i,n){let s=i.position.lineNumber,o=t.getLineMinColumn(s),a=t.getLineFirstNonWhitespaceColumn(s)||o,l;return i.position.column===a?l=o:l=a,i.move(n,s,l,0)}static moveToEndOfLine(e,t,i,n,s){let o=i.position.lineNumber,a=t.getLineMaxColumn(o);return i.move(n,o,a,s?1073741824-a:0)}static moveToBeginningOfBuffer(e,t,i,n){return i.move(n,1,1,0)}static moveToEndOfBuffer(e,t,i,n){let s=t.getLineCount(),o=t.getLineMaxColumn(s);return i.move(n,s,o,0)}}class Qh{static deleteRight(e,t,i,n){let s=[],o=e!==3;for(let a=0,l=n.length;a<l;a++){const c=n[a];let h=c;if(h.isEmpty()){let u=c.getPosition(),d=mt.right(t,i,u);h=new k(d.lineNumber,d.column,u.lineNumber,u.column)}if(h.isEmpty()){s[a]=null;continue}h.startLineNumber!==h.endLineNumber&&(o=!0),s[a]=new rn(h,"")}return[o,s]}static isAutoClosingPairDelete(e,t,i,n,s,o,a){if(t==="never"&&i==="never"||e==="never")return!1;for(let l=0,c=o.length;l<c;l++){const h=o[l],u=h.getPosition();if(!h.isEmpty())return!1;const d=s.getLineContent(u.lineNumber);if(u.column<2||u.column>=d.length+1)return!1;const f=d.charAt(u.column-2),g=n.get(f);if(!g)return!1;if(_f(f)){if(i==="never")return!1}else if(t==="never")return!1;const p=d.charAt(u.column-1);let _=!1;for(const v of g)v.open===f&&v.close===p&&(_=!0);if(!_)return!1;if(e==="auto"){let v=!1;for(let b=0,C=a.length;b<C;b++){const y=a[b];if(u.lineNumber===y.startLineNumber&&u.column===y.startColumn){v=!0;break}}if(!v)return!1}}return!0}static _runAutoClosingPairDelete(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s].getPosition(),l=new k(a.lineNumber,a.column-1,a.lineNumber,a.column+1);n[s]=new rn(l,"")}return[!0,n]}static deleteLeft(e,t,i,n,s){if(this.isAutoClosingPairDelete(t.autoClosingDelete,t.autoClosingBrackets,t.autoClosingQuotes,t.autoClosingPairs.autoClosingPairsOpenByEnd,i,n,s))return this._runAutoClosingPairDelete(t,i,n);const o=[];let a=e!==2;for(let l=0,c=n.length;l<c;l++){let h=Qh.getDeleteRange(n[l],i,t);if(h.isEmpty()){o[l]=null;continue}h.startLineNumber!==h.endLineNumber&&(a=!0),o[l]=new rn(h,"")}return[a,o]}static getDeleteRange(e,t,i){if(!e.isEmpty())return e;const n=e.getPosition();if(i.useTabStops&&n.column>1){const s=t.getLineContent(n.lineNumber),o=dr(s),a=o===-1?s.length+1:o+1;if(n.column<=a){const l=Ot.visibleColumnFromColumn2(i,t,n),c=Ot.prevIndentTabStop(l,i.indentSize),h=Ot.columnFromVisibleColumn2(i,t,n.lineNumber,c);return new k(n.lineNumber,h,n.lineNumber,n.column)}}return k.fromPositions(Qh.getPositionAfterDeleteLeft(n,t),n)}static getPositionAfterDeleteLeft(e,t){if(e.column>1){const i=Qj(e.column-1,t.getLineContent(e.lineNumber));return e.with(void 0,i+1)}else if(e.lineNumber>1){const i=e.lineNumber-1;return new $(i,t.getLineMaxColumn(i))}else return e}static cut(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s];if(a.isEmpty())if(e.emptySelectionClipboard){let l=a.getPosition(),c,h,u,d;l.lineNumber<t.getLineCount()?(c=l.lineNumber,h=1,u=l.lineNumber+1,d=1):l.lineNumber>1?(c=l.lineNumber-1,h=t.getLineMaxColumn(l.lineNumber-1),u=l.lineNumber,d=t.getLineMaxColumn(l.lineNumber)):(c=l.lineNumber,h=1,u=l.lineNumber,d=t.getLineMaxColumn(l.lineNumber));let f=new k(c,h,u,d);f.isEmpty()?n[s]=null:n[s]=new rn(f,"")}else n[s]=null;else n[s]=new rn(a,"")}return new mr(0,n,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}}class ft{static _createWord(e,t,i,n,s){return{start:n,end:s,wordType:t,nextCharClass:i}}static _findPreviousWordOnLine(e,t,i){let 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--){let o=e.charCodeAt(s),a=t.get(o);if(a===0){if(n===2)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=1}else if(a===2){if(n===1)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1));n=2}else if(a===1&&n!==0)return this._createWord(e,n,a,s+1,this._findEndOfWord(e,t,n,s+1))}return n!==0?this._createWord(e,n,1,0,this._findEndOfWord(e,t,n,0)):null}static _findEndOfWord(e,t,i,n){let s=e.length;for(let o=n;o<s;o++){let a=e.charCodeAt(o),l=t.get(a);if(l===1||i===1&&l===2||i===2&&l===0)return o}return s}static _findNextWordOnLine(e,t,i){let n=t.getLineContent(i.lineNumber);return this._doFindNextWordOnLine(n,e,i)}static _doFindNextWordOnLine(e,t,i){let n=0,s=e.length;for(let o=i.column-1;o<s;o++){let a=e.charCodeAt(o),l=t.get(a);if(l===0){if(n===2)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o);n=1}else if(l===2){if(n===1)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o);n=2}else if(l===1&&n!==0)return this._createWord(e,n,l,this._findStartOfWord(e,t,n,o-1),o)}return n!==0?this._createWord(e,n,1,this._findStartOfWord(e,t,n,s-1),s):null}static _findStartOfWord(e,t,i,n){for(let s=n;s>=0;s--){let o=e.charCodeAt(s),a=t.get(o);if(a===1||i===1&&a===2||i===2&&a===0)return s+1}return 0}static moveWordLeft(e,t,i,n){let s=i.lineNumber,o=i.column;o===1&&s>1&&(s=s-1,o=t.getLineMaxColumn(s));let a=ft._findPreviousWordOnLine(e,t,new $(s,o));if(n===0)return new $(s,a?a.start+1:1);if(n===1)return a&&a.wordType===2&&a.end-a.start==1&&a.nextCharClass===0&&(a=ft._findPreviousWordOnLine(e,t,new $(s,a.start+1))),new $(s,a?a.start+1:1);if(n===3){for(;a&&a.wordType===2;)a=ft._findPreviousWordOnLine(e,t,new $(s,a.start+1));return new $(s,a?a.start+1:1)}return a&&o<=a.end+1&&(a=ft._findPreviousWordOnLine(e,t,new $(s,a.start+1))),new $(s,a?a.end+1:1)}static _moveWordPartLeft(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===1)return i>1?new $(i-1,e.getLineMaxColumn(i-1)):t;const s=e.getLineContent(i);for(let o=t.column-1;o>1;o--){const a=s.charCodeAt(o-2),l=s.charCodeAt(o-1);if(a===95&&l!==95)return new $(i,o);if(Ma(a)&&Zs(l))return new $(i,o);if(Zs(a)&&Zs(l)&&o+1<n){const c=s.charCodeAt(o);if(Ma(c))return new $(i,o)}}return new $(i,1)}static moveWordRight(e,t,i,n){let s=i.lineNumber,o=i.column,a=!1;o===t.getLineMaxColumn(s)&&s<t.getLineCount()&&(a=!0,s=s+1,o=1);let l=ft._findNextWordOnLine(e,t,new $(s,o));if(n===2)l&&l.wordType===2&&l.end-l.start==1&&l.nextCharClass===0&&(l=ft._findNextWordOnLine(e,t,new $(s,l.end+1))),l?o=l.end+1:o=t.getLineMaxColumn(s);else if(n===3){for(a&&(o=0);l&&(l.wordType===2||l.start+1<=o);)l=ft._findNextWordOnLine(e,t,new $(s,l.end+1));l?o=l.start+1:o=t.getLineMaxColumn(s)}else l&&!a&&o>=l.start+1&&(l=ft._findNextWordOnLine(e,t,new $(s,l.end+1))),l?o=l.start+1:o=t.getLineMaxColumn(s);return new $(s,o)}static _moveWordPartRight(e,t){const i=t.lineNumber,n=e.getLineMaxColumn(i);if(t.column===n)return i<e.getLineCount()?new $(i+1,1):t;const s=e.getLineContent(i);for(let o=t.column+1;o<n;o++){const a=s.charCodeAt(o-2),l=s.charCodeAt(o-1);if(a!==95&&l===95)return new $(i,o);if(Ma(a)&&Zs(l))return new $(i,o);if(Zs(a)&&Zs(l)&&o+1<n){const c=s.charCodeAt(o);if(Ma(c))return new $(i,o)}}return new $(i,n)}static _deleteWordLeftWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-2,s=Wo(i,n);return s+1<n?new k(t.lineNumber,s+2,t.lineNumber,t.column):null}static deleteWordLeft(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;if(Qh.isAutoClosingPairDelete(e.autoClosingDelete,e.autoClosingBrackets,e.autoClosingQuotes,e.autoClosingPairs.autoClosingPairsOpenByEnd,e.model,[e.selection],e.autoClosedCharacters)){const u=e.selection.getPosition();return new k(u.lineNumber,u.column-1,u.lineNumber,u.column+1)}const a=new $(s.positionLineNumber,s.positionColumn);let l=a.lineNumber,c=a.column;if(l===1&&c===1)return null;if(o){let u=this._deleteWordLeftWhitespace(n,a);if(u)return u}let h=ft._findPreviousWordOnLine(i,n,a);return t===0?h?c=h.start+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l)):(h&&c<=h.end+1&&(h=ft._findPreviousWordOnLine(i,n,new $(l,h.start+1))),h?c=h.end+1:c>1?c=1:(l--,c=n.getLineMaxColumn(l))),new k(l,c,a.lineNumber,a.column)}static deleteInsideWord(e,t,i){if(!i.isEmpty())return i;const n=new $(i.positionLineNumber,i.positionColumn);let s=this._deleteInsideWordWhitespace(t,n);return s||this._deleteInsideWordDetermineDeleteRange(e,t,n)}static _charAtIsWhitespace(e,t){const i=e.charCodeAt(t);return i===32||i===9}static _deleteInsideWordWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=i.length;if(n===0)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+1<n&&this._charAtIsWhitespace(i,o+1);)o++;return new k(t.lineNumber,s+1,t.lineNumber,o+2)}static _deleteInsideWordDetermineDeleteRange(e,t,i){const n=t.getLineContent(i.lineNumber),s=n.length;if(s===0)return i.lineNumber>1?new k(i.lineNumber-1,t.getLineMaxColumn(i.lineNumber-1),i.lineNumber,1):i.lineNumber<t.getLineCount()?new k(i.lineNumber,1,i.lineNumber+1,1):new k(i.lineNumber,1,i.lineNumber,1);const o=u=>u.start+1<=i.column&&i.column<=u.end+1,a=(u,d)=>(u=Math.min(u,i.column),d=Math.max(d,i.column),new k(i.lineNumber,u,i.lineNumber,d)),l=u=>{let d=u.start+1,f=u.end+1,g=!1;for(;f-1<s&&this._charAtIsWhitespace(n,f-1);)g=!0,f++;if(!g)for(;d>1&&this._charAtIsWhitespace(n,d-2);)d--;return a(d,f)},c=ft._findPreviousWordOnLine(e,t,i);if(c&&o(c))return l(c);const h=ft._findNextWordOnLine(e,t,i);return h&&o(h)?l(h):c&&h?a(c.end+1,h.start+1):c?a(c.start+1,c.end+1):h?a(h.start+1,h.end+1):a(1,s+1)}static _deleteWordPartLeft(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ft._moveWordPartLeft(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _findFirstNonWhitespaceChar(e,t){let i=e.length;for(let n=t;n<i;n++){let s=e.charAt(n);if(s!==" "&&s!==" ")return n}return i}static _deleteWordRightWhitespace(e,t){const i=e.getLineContent(t.lineNumber),n=t.column-1,s=this._findFirstNonWhitespaceChar(i,n);return n+1<s?new k(t.lineNumber,t.column,t.lineNumber,s+1):null}static deleteWordRight(e,t){const i=e.wordSeparators,n=e.model,s=e.selection,o=e.whitespaceHeuristics;if(!s.isEmpty())return s;const a=new $(s.positionLineNumber,s.positionColumn);let l=a.lineNumber,c=a.column;const h=n.getLineCount(),u=n.getLineMaxColumn(l);if(l===h&&c===u)return null;if(o){let f=this._deleteWordRightWhitespace(n,a);if(f)return f}let d=ft._findNextWordOnLine(i,n,a);return t===2?d?c=d.end+1:c<u||l===h?c=u:(l++,d=ft._findNextWordOnLine(i,n,new $(l,1)),d?c=d.start+1:c=n.getLineMaxColumn(l)):(d&&c>=d.start+1&&(d=ft._findNextWordOnLine(i,n,new $(l,d.end+1))),d?c=d.start+1:c<u||l===h?c=u:(l++,d=ft._findNextWordOnLine(i,n,new $(l,1)),d?c=d.start+1:c=n.getLineMaxColumn(l))),new k(l,c,a.lineNumber,a.column)}static _deleteWordPartRight(e,t){if(!t.isEmpty())return t;const i=t.getPosition(),n=ft._moveWordPartRight(e,i);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}static _createWordAtPosition(e,t,i){const n=new k(t,i.start+1,t,i.end+1);return{word:e.getValueInRange(n),startColumn:n.startColumn,endColumn:n.endColumn}}static getWordAtPosition(e,t,i){const n=os(t),s=ft._findPreviousWordOnLine(n,e,i);if(s&&s.wordType===1&&s.start<=i.column-1&&i.column-1<=s.end)return ft._createWordAtPosition(e,i.lineNumber,s);const o=ft._findNextWordOnLine(n,e,i);return o&&o.wordType===1&&o.start<=i.column-1&&i.column-1<=o.end?ft._createWordAtPosition(e,i.lineNumber,o):null}static word(e,t,i,n,s){const o=os(e.wordSeparators);let a=ft._findPreviousWordOnLine(o,t,s),l=ft._findNextWordOnLine(o,t,s);if(!n){let f,g;return a&&a.wordType===1&&a.start<=s.column-1&&s.column-1<=a.end?(f=a.start+1,g=a.end+1):l&&l.wordType===1&&l.start<=s.column-1&&s.column-1<=l.end?(f=l.start+1,g=l.end+1):(a?f=a.end+1:f=1,l?g=l.start+1:g=t.getLineMaxColumn(s.lineNumber)),new qi(new k(s.lineNumber,f,s.lineNumber,g),0,new $(s.lineNumber,g),0)}let c,h;a&&a.wordType===1&&a.start<s.column-1&&s.column-1<a.end?(c=a.start+1,h=a.end+1):l&&l.wordType===1&&l.start<s.column-1&&s.column-1<l.end?(c=l.start+1,h=l.end+1):(c=s.column,h=s.column);let u=s.lineNumber,d;if(i.selectionStart.containsPosition(s))d=i.selectionStart.endColumn;else if(s.isBeforeOrEqual(i.selectionStart.getStartPosition())){d=c;let f=new $(u,d);i.selectionStart.containsPosition(f)&&(d=i.selectionStart.endColumn)}else{d=h;let f=new $(u,d);i.selectionStart.containsPosition(f)&&(d=i.selectionStart.startColumn)}return i.move(!0,u,d,0)}}class gw extends ft{static deleteWordPartLeft(e){const t=pw([ft.deleteWordLeft(e,0),ft.deleteWordLeft(e,2),ft._deleteWordPartLeft(e.model,e.selection)]);return t.sort(k.compareRangesUsingEnds),t[2]}static deleteWordPartRight(e){const t=pw([ft.deleteWordRight(e,0),ft.deleteWordRight(e,2),ft._deleteWordPartRight(e.model,e.selection)]);return t.sort(k.compareRangesUsingStarts),t[0]}static moveWordPartLeft(e,t,i){const n=pw([ft.moveWordLeft(e,t,i,0),ft.moveWordLeft(e,t,i,2),ft._moveWordPartLeft(t,i)]);return n.sort($.compare),n[2]}static moveWordPartRight(e,t,i){const n=pw([ft.moveWordRight(e,t,i,0),ft.moveWordRight(e,t,i,2),ft._moveWordPartRight(t,i)]);return n.sort($.compare),n[0]}}function pw(r){return r.filter(e=>Boolean(e))}class Gi{static addCursorDown(e,t,i){let n=[],s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];n[s++]=new qe(l.modelState,l.viewState),i?n[s++]=qe.fromModelState(mt.translateDown(e.cursorConfig,e.model,l.modelState)):n[s++]=qe.fromViewState(mt.translateDown(e.cursorConfig,e,l.viewState))}return n}static addCursorUp(e,t,i){let n=[],s=0;for(let o=0,a=t.length;o<a;o++){const l=t[o];n[s++]=new qe(l.modelState,l.viewState),i?n[s++]=qe.fromModelState(mt.translateUp(e.cursorConfig,e.model,l.modelState)):n[s++]=qe.fromViewState(mt.translateUp(e.cursorConfig,e,l.viewState))}return n}static moveToBeginningOfLine(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=this._moveToLineStart(e,a,i)}return n}static _moveToLineStart(e,t,i){const n=t.viewState.position.column,s=t.modelState.position.column,o=n===s,a=t.viewState.position.lineNumber,l=e.getLineFirstNonWhitespaceColumn(a);return!o&&!(n===l)?this._moveToLineStartByView(e,t,i):this._moveToLineStartByModel(e,t,i)}static _moveToLineStartByView(e,t,i){return qe.fromViewState(mt.moveToBeginningOfLine(e.cursorConfig,e,t.viewState,i))}static _moveToLineStartByModel(e,t,i){return qe.fromModelState(mt.moveToBeginningOfLine(e.cursorConfig,e.model,t.modelState,i))}static moveToEndOfLine(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=this._moveToLineEnd(e,l,i,n)}return s}static _moveToLineEnd(e,t,i,n){const s=t.viewState.position,o=e.getLineMaxColumn(s.lineNumber),a=s.column===o,l=t.modelState.position,c=e.model.getLineMaxColumn(l.lineNumber),h=o-s.column==c-l.column;return a||h?this._moveToLineEndByModel(e,t,i,n):this._moveToLineEndByView(e,t,i,n)}static _moveToLineEndByView(e,t,i,n){return qe.fromViewState(mt.moveToEndOfLine(e.cursorConfig,e,t.viewState,i,n))}static _moveToLineEndByModel(e,t,i,n){return qe.fromModelState(mt.moveToEndOfLine(e.cursorConfig,e.model,t.modelState,i,n))}static expandLineSelection(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const o=t[n],a=o.modelState.selection.startLineNumber,l=e.model.getLineCount();let c=o.modelState.selection.endLineNumber,h;c===l?h=e.model.getLineMaxColumn(l):(c++,h=1),i[n]=qe.fromModelState(new qi(new k(a,1,a,1),0,new $(c,h),0))}return i}static moveToBeginningOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=qe.fromModelState(mt.moveToBeginningOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static moveToEndOfBuffer(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s];n[s]=qe.fromModelState(mt.moveToEndOfBuffer(e.cursorConfig,e.model,a.modelState,i))}return n}static selectAll(e,t){const i=e.model.getLineCount(),n=e.model.getLineMaxColumn(i);return qe.fromModelState(new qi(new k(1,1,1,1),0,new $(i,n),0))}static line(e,t,i,n,s){const o=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new $(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);if(!i||!t.modelState.hasSelection()){const c=e.model.getLineCount();let h=o.lineNumber+1,u=1;return h>c&&(h=c,u=e.model.getLineMaxColumn(h)),qe.fromModelState(new qi(new k(o.lineNumber,1,h,u),0,new $(h,u),0))}const l=t.modelState.selectionStart.getStartPosition().lineNumber;if(o.lineNumber<l)return qe.fromViewState(t.viewState.move(t.modelState.hasSelection(),a.lineNumber,1,0));if(o.lineNumber>l){const c=e.getLineCount();let h=a.lineNumber+1,u=1;return h>c&&(h=c,u=e.getLineMaxColumn(h)),qe.fromViewState(t.viewState.move(t.modelState.hasSelection(),h,u,0))}else{const c=t.modelState.selectionStart.getEndPosition();return qe.fromModelState(t.modelState.move(t.modelState.hasSelection(),c.lineNumber,c.column,0))}}static word(e,t,i,n){const s=e.model.validatePosition(n);return qe.fromModelState(ft.word(e.cursorConfig,e.model,t.modelState,i,s))}static cancelSelection(e,t){if(!t.modelState.hasSelection())return new qe(t.modelState,t.viewState);const i=t.viewState.position.lineNumber,n=t.viewState.position.column;return qe.fromViewState(new qi(new k(i,n,i,n),0,new $(i,n),0))}static moveTo(e,t,i,n,s){const o=e.model.validatePosition(n),a=s?e.coordinatesConverter.validateViewPosition(new $(s.lineNumber,s.column),o):e.coordinatesConverter.convertModelPositionToViewPosition(o);return qe.fromViewState(t.viewState.move(i,a.lineNumber,a.column,0))}static simpleMove(e,t,i,n,s,o){switch(i){case 0:return o===4?this._moveHalfLineLeft(e,t,n):this._moveLeft(e,t,n,s);case 1:return o===4?this._moveHalfLineRight(e,t,n):this._moveRight(e,t,n,s);case 2:return o===2?this._moveUpByViewLines(e,t,n,s):this._moveUpByModelLines(e,t,n,s);case 3:return o===2?this._moveDownByViewLines(e,t,n,s):this._moveDownByModelLines(e,t,n,s);case 4:return o===2?t.map(a=>qe.fromViewState(mt.moveToPrevBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>qe.fromModelState(mt.moveToPrevBlankLine(e.cursorConfig,e.model,a.modelState,n)));case 5:return o===2?t.map(a=>qe.fromViewState(mt.moveToNextBlankLine(e.cursorConfig,e,a.viewState,n))):t.map(a=>qe.fromModelState(mt.moveToNextBlankLine(e.cursorConfig,e.model,a.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(),a=e.coordinatesConverter.convertViewRangeToModelRange(o);switch(i){case 11:{const l=this._firstLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 13:{const l=this._lastLineNumberInRange(e.model,a,s),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 12:{const l=Math.round((a.startLineNumber+a.endLineNumber)/2),c=e.model.getLineFirstNonWhitespaceColumn(l);return[this._moveToModelPosition(e,t[0],n,l,c)]}case 14:{let l=[];for(let c=0,h=t.length;c<h;c++){const u=t[c];l[c]=this.findPositionInViewportIfOutside(e,u,o,n)}return l}default:return null}}static findPositionInViewportIfOutside(e,t,i,n){let s=t.viewState.position.lineNumber;if(i.startLineNumber<=s&&s<=i.endLineNumber-1)return new qe(t.modelState,t.viewState);{let o;s>i.endLineNumber-1?o=i.endLineNumber-1:s<i.startLineNumber?o=i.startLineNumber:o=s;const a=mt.vertical(e.cursorConfig,e,s,t.viewState.position.column,t.viewState.leftoverVisibleColumns,o,!1);return qe.fromViewState(t.viewState.move(n,a.lineNumber,a.column,a.leftoverVisibleColumns))}}static _firstLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.min(t.endLineNumber,n+i-1)}static _lastLineNumberInRange(e,t,i){let n=t.startLineNumber;return t.startColumn!==e.getLineMinColumn(n)&&n++,Math.max(n,t.endLineNumber-i+1)}static _moveLeft(e,t,i,n){return t.map(s=>qe.fromViewState(mt.moveLeft(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineLeft(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[s]=qe.fromViewState(mt.moveLeft(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveRight(e,t,i,n){return t.map(s=>qe.fromViewState(mt.moveRight(e.cursorConfig,e,s.viewState,i,n)))}static _moveHalfLineRight(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round(e.getLineContent(l).length/2);n[s]=qe.fromViewState(mt.moveRight(e.cursorConfig,e,a.viewState,i,c))}return n}static _moveDownByViewLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=qe.fromViewState(mt.moveDown(e.cursorConfig,e,l.viewState,i,n))}return s}static _moveDownByModelLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=qe.fromModelState(mt.moveDown(e.cursorConfig,e.model,l.modelState,i,n))}return s}static _moveUpByViewLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=qe.fromViewState(mt.moveUp(e.cursorConfig,e,l.viewState,i,n))}return s}static _moveUpByModelLines(e,t,i,n){let s=[];for(let o=0,a=t.length;o<a;o++){const l=t[o];s[o]=qe.fromModelState(mt.moveUp(e.cursorConfig,e.model,l.modelState,i,n))}return s}static _moveToViewPosition(e,t,i,n,s){return qe.fromViewState(t.viewState.move(i,n,s,0))}static _moveToModelPosition(e,t,i,n,s){return qe.fromModelState(t.modelState.move(i,n,s,0))}static _moveToViewMinColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineMinColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewFirstNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineFirstNonWhitespaceColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewCenterColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=Math.round((e.getLineMaxColumn(l)+e.getLineMinColumn(l))/2);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewMaxColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineMaxColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}static _moveToViewLastNonWhitespaceColumn(e,t,i){let n=[];for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.viewState.position.lineNumber,c=e.getLineLastNonWhitespaceColumn(l);n[s]=this._moveToViewPosition(e,a,i,l,c)}return n}}var mw;(function(r){const e=function(i){if(!er(i))return!1;let n=i;return!(!ys(n.to)||!On(n.select)&&!w2(n.select)||!On(n.by)&&!ys(n.by)||!On(n.value)&&!vh(n.value))};r.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: - * 'to': A mandatory logical position value providing where to move the cursor. - \`\`\` - 'left', 'right', 'up', 'down', 'prevBlankLine', 'nextBlankLine', - 'wrappedLineStart', 'wrappedLineEnd', 'wrappedLineColumnCenter' - 'wrappedLineFirstNonWhitespaceCharacter', 'wrappedLineLastNonWhitespaceCharacter' - 'viewPortTop', 'viewPortCenter', 'viewPortBottom', 'viewPortIfOutside' - \`\`\` - * 'by': Unit to move. Default is computed based on 'to' value. - \`\`\` - 'line', 'wrappedLine', 'character', 'halfLine' - \`\`\` - * 'value': Number of units to move. Default is '1'. - * 'select': If 'true' makes the selection. Default is 'false'. - `,constraint:e,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}}}}]},r.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"},r.RawUnit={Line:"line",WrappedLine:"wrappedLine",Character:"character",HalfLine:"halfLine"};function t(i){if(!i.to)return null;let n;switch(i.to){case r.RawDirection.Left:n=0;break;case r.RawDirection.Right:n=1;break;case r.RawDirection.Up:n=2;break;case r.RawDirection.Down:n=3;break;case r.RawDirection.PrevBlankLine:n=4;break;case r.RawDirection.NextBlankLine:n=5;break;case r.RawDirection.WrappedLineStart:n=6;break;case r.RawDirection.WrappedLineFirstNonWhitespaceCharacter:n=7;break;case r.RawDirection.WrappedLineColumnCenter:n=8;break;case r.RawDirection.WrappedLineEnd:n=9;break;case r.RawDirection.WrappedLineLastNonWhitespaceCharacter:n=10;break;case r.RawDirection.ViewPortTop:n=11;break;case r.RawDirection.ViewPortBottom:n=13;break;case r.RawDirection.ViewPortCenter:n=12;break;case r.RawDirection.ViewPortIfOutside:n=14;break;default:return null}let s=0;switch(i.by){case r.RawUnit.Line:s=1;break;case r.RawUnit.WrappedLine:s=2;break;case r.RawUnit.Character:s=3;break;case r.RawUnit.HalfLine:s=4;break}return{direction:n,unit:s,select:!!i.select,value:i.value||1}}r.parse=t})(mw||(mw={}));const ED=Object.create(null);function Jh(r,e){if(e<=0)return"";ED[r]||(ED[r]=["",r]);const t=ED[r];for(let i=t.length;i<=e;i++)t[i]=t[i-1]+r;return t[e]}class Wr{constructor(e,t){this._opts=t,this._selection=e,this._selectionId=null,this._useLastEditRangeForCursorEndPosition=!1,this._selectionStartColumnStaysPut=!1}static unshiftIndent(e,t,i,n,s){const o=Ot.visibleColumnFromColumn(e,t,i);if(s){const a=Jh(" ",n),c=Ot.prevIndentTabStop(o,n)/n;return Jh(a,c)}else{const a=" ",c=Ot.prevRenderTabStop(o,i)/i;return Jh(a,c)}}static shiftIndent(e,t,i,n,s){const o=Ot.visibleColumnFromColumn(e,t,i);if(s){const a=Jh(" ",n),c=Ot.nextIndentTabStop(o,n)/n;return Jh(a,c)}else{const a=" ",c=Ot.nextRenderTabStop(o,i)/i;return Jh(a,c)}}_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;this._selection.endColumn===1&&i!==n&&(n=n-1);const{tabSize:s,indentSize:o,insertSpaces:a}=this._opts,l=i===n;if(this._opts.useTabStops){this._selection.isEmpty()&&/^\s*$/.test(e.getLineContent(i))&&(this._useLastEditRangeForCursorEndPosition=!0);let c=0,h=0;for(let u=i;u<=n;u++,c=h){h=0;let d=e.getLineContent(u),f=dr(d);if(this._opts.isUnshift&&(d.length===0||f===0)||!l&&!this._opts.isUnshift&&d.length===0)continue;if(f===-1&&(f=d.length),u>1&&Ot.visibleColumnFromColumn(d,f+1,s)%o!=0&&e.isCheapToTokenize(u-1)){let _=ze.getEnterAction(this._opts.autoIndent,e,new k(u-1,e.getLineMaxColumn(u-1),u-1,e.getLineMaxColumn(u-1)));if(_){if(h=c,_.appendText)for(let v=0,b=_.appendText.length;v<b&&h<o&&_.appendText.charCodeAt(v)===32;v++)h++;_.removeText&&(h=Math.max(0,h-_.removeText));for(let v=0;v<h&&!(f===0||d.charCodeAt(f-1)!==32);v++)f--}}if(this._opts.isUnshift&&f===0)continue;let g;this._opts.isUnshift?g=Wr.unshiftIndent(d,f+1,s,o,a):g=Wr.shiftIndent(d,f+1,s,o,a),this._addEditOperation(t,new k(u,1,u,f+1),g),u===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn<=f+1)}}else{!this._opts.isUnshift&&this._selection.isEmpty()&&e.getLineLength(i)===0&&(this._useLastEditRangeForCursorEndPosition=!0);const c=a?Jh(" ",o):" ";for(let h=i;h<=n;h++){const u=e.getLineContent(h);let d=dr(u);if(!(this._opts.isUnshift&&(u.length===0||d===0))&&!(!l&&!this._opts.isUnshift&&u.length===0)&&(d===-1&&(d=u.length),!(this._opts.isUnshift&&d===0)))if(this._opts.isUnshift){d=Math.min(d,o);for(let f=0;f<d;f++)if(u.charCodeAt(f)===9){d=f+1;break}this._addEditOperation(t,new k(h,1,h,d+1),"")}else this._addEditOperation(t,new k(h,1,h,1),c),h===i&&!this._selection.isEmpty()&&(this._selectionStartColumnStaysPut=this._selection.startColumn===1)}}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){if(this._useLastEditRangeForCursorEndPosition){let n=t.getInverseEditOperations()[0];return new be(n.range.endLineNumber,n.range.endColumn,n.range.endLineNumber,n.range.endColumn)}const i=t.getTrackedSelection(this._selectionId);if(this._selectionStartColumnStaysPut){let n=this._selection.startColumn;return i.startColumn<=n?i:i.getDirection()===0?new be(i.startLineNumber,n,i.endLineNumber,i.endColumn):new be(i.endLineNumber,i.endColumn,i.startLineNumber,n)}return i}}class wJ{constructor(e,t,i){this._range=e,this._charBeforeSelection=t,this._charAfterSelection=i}getEditOperations(e,t){t.addTrackedEditOperation(new k(this._range.startLineNumber,this._range.startColumn,this._range.startLineNumber,this._range.startColumn),this._charBeforeSelection),t.addTrackedEditOperation(new k(this._range.endLineNumber,this._range.endColumn,this._range.endLineNumber,this._range.endColumn),this._charAfterSelection)}computeCursorState(e,t){let i=t.getInverseEditOperations(),n=i[0].range,s=i[1].range;return new be(n.endLineNumber,n.endColumn,s.endLineNumber,s.endColumn-this._charAfterSelection.length)}}class Xt{static indent(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new Wr(i[s],{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static outdent(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new Wr(i[s],{isUnshift:!0,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent});return n}static shiftIndent(e,t,i){return i=i||1,Wr.shiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static unshiftIndent(e,t,i){return i=i||1,Wr.unshiftIndent(t,t.length+i,e.tabSize,e.indentSize,e.insertSpaces)}static _distributedPaste(e,t,i,n){let s=[];for(let o=0,a=i.length;o<a;o++)s[o]=new rn(i[o],n[o]);return new mr(0,s,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _simplePaste(e,t,i,n,s){let o=[];for(let a=0,l=i.length;a<l;a++){const c=i[a];let h=c.getPosition();if(s&&!c.isEmpty()&&(s=!1),s&&n.indexOf(` -`)!==n.length-1&&(s=!1),s){let u=new k(h.lineNumber,1,h.lineNumber,1);o[a]=new kD(u,n,c,!0)}else o[a]=new rn(c,n)}return new mr(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _distributePasteToCursors(e,t,i,n,s){if(n||t.length===1)return null;if(s&&s.length===t.length)return s;if(e.multiCursorPaste==="spread"){i.charCodeAt(i.length-1)===10&&(i=i.substr(0,i.length-1)),i.charCodeAt(i.length-1)===13&&(i=i.substr(0,i.length-1));let o=Bo(i);if(o.length===t.length)return o}return null}static paste(e,t,i,n,s,o){const a=this._distributePasteToCursors(e,i,n,s,o);return a?(i=i.sort(k.compareRangesUsingStarts),this._distributedPaste(e,t,i,a)):this._simplePaste(e,t,i,n,s)}static _goodIndentForLine(e,t,i){let n=null,s="";const o=ze.getInheritIndentForLine(e.autoIndent,t,i,!1);if(o)n=o.action,s=o.indentation;else if(i>1){let a;for(a=i-1;a>=1;a--){const h=t.getLineContent(a);if(Wo(h)>=0)break}if(a<1)return null;const l=t.getLineMaxColumn(a),c=ze.getEnterAction(e.autoIndent,t,new k(a,l,a,l));c&&(s=c.indentation+c.appendText)}return n&&(n===pi.Indent&&(s=Xt.shiftIndent(e,s)),n===pi.Outdent&&(s=Xt.unshiftIndent(e,s)),s=e.normalizeIndentation(s)),s||null}static _replaceJumpToNextIndent(e,t,i,n){let s="",o=i.getStartPosition();if(e.insertSpaces){let a=Ot.visibleColumnFromColumn2(e,t,o),l=e.indentSize,c=l-a%l;for(let h=0;h<c;h++)s+=" "}else s=" ";return new rn(i,s,n)}static tab(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s];if(a.isEmpty()){let l=t.getLineContent(a.startLineNumber);if(/^\s*$/.test(l)&&t.isCheapToTokenize(a.startLineNumber)){let c=this._goodIndentForLine(e,t,a.startLineNumber);c=c||" ";let h=e.normalizeIndentation(c);if(!l.startsWith(h)){n[s]=new rn(new k(a.startLineNumber,1,a.startLineNumber,l.length+1),h,!0);continue}}n[s]=this._replaceJumpToNextIndent(e,t,a,!0)}else{if(a.startLineNumber===a.endLineNumber){let l=t.getLineMaxColumn(a.startLineNumber);if(a.startColumn!==1||a.endColumn!==l){n[s]=this._replaceJumpToNextIndent(e,t,a,!1);continue}}n[s]=new Wr(a,{isUnshift:!1,tabSize:e.tabSize,indentSize:e.indentSize,insertSpaces:e.insertSpaces,useTabStops:e.useTabStops,autoIndent:e.autoIndent})}}return n}static compositionType(e,t,i,n,s,o,a,l){const c=n.map(h=>this._compositionType(i,h,s,o,a,l));return new mr(4,c,{shouldPushStackElementBefore:_w(e,4),shouldPushStackElementAfter:!1})}static _compositionType(e,t,i,n,s,o){if(!t.isEmpty())return null;const a=t.getPosition(),l=Math.max(1,a.column-n),c=Math.min(e.getLineMaxColumn(a.lineNumber),a.column+s),h=new k(a.lineNumber,l,a.lineNumber,c);return e.getValueInRange(h)===i&&o===0?null:new fw(h,i,0,o)}static _typeCommand(e,t,i){return i?new dw(e,t,!0):new rn(e,t,!0)}static _enter(e,t,i,n){if(e.autoIndent===0)return Xt._typeCommand(n,` -`,i);if(!t.isCheapToTokenize(n.getStartPosition().lineNumber)||e.autoIndent===1){let l=t.getLineContent(n.startLineNumber),c=Dt(l).substring(0,n.startColumn-1);return Xt._typeCommand(n,` -`+e.normalizeIndentation(c),i)}const s=ze.getEnterAction(e.autoIndent,t,n);if(s){if(s.indentAction===pi.None)return Xt._typeCommand(n,` -`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===pi.Indent)return Xt._typeCommand(n,` -`+e.normalizeIndentation(s.indentation+s.appendText),i);if(s.indentAction===pi.IndentOutdent){const l=e.normalizeIndentation(s.indentation),c=e.normalizeIndentation(s.indentation+s.appendText),h=` -`+c+` -`+l;return i?new dw(n,h,!0):new fw(n,h,-1,c.length-l.length,!0)}else if(s.indentAction===pi.Outdent){const l=Xt.unshiftIndent(e,s.indentation);return Xt._typeCommand(n,` -`+e.normalizeIndentation(l+s.appendText),i)}}const o=t.getLineContent(n.startLineNumber),a=Dt(o).substring(0,n.startColumn-1);if(e.autoIndent>=4){const l=ze.getIndentForEnter(e.autoIndent,t,n,{unshiftIndent:c=>Xt.unshiftIndent(e,c),shiftIndent:c=>Xt.shiftIndent(e,c),normalizeIndentation:c=>e.normalizeIndentation(c)});if(l){let c=Ot.visibleColumnFromColumn2(e,t,n.getEndPosition());const h=n.endColumn,u=t.getLineContent(n.endLineNumber),d=dr(u);if(d>=0?n=n.setEndPosition(n.endLineNumber,Math.max(n.endColumn,d+1)):n=n.setEndPosition(n.endLineNumber,t.getLineMaxColumn(n.endLineNumber)),i)return new dw(n,` -`+e.normalizeIndentation(l.afterEnter),!0);{let f=0;return h<=d+1&&(e.insertSpaces||(c=Math.ceil(c/e.indentSize)),f=Math.min(c+1-e.normalizeIndentation(l.afterEnter).length-1,0)),new fw(n,` -`+e.normalizeIndentation(l.afterEnter),0,f,!0)}}}return Xt._typeCommand(n,` -`+e.normalizeIndentation(a),i)}static _isAutoIndentType(e,t,i){if(e.autoIndent<4)return!1;for(let n=0,s=i.length;n<s;n++)if(!t.isCheapToTokenize(i[n].getEndPosition().lineNumber))return!1;return!0}static _runAutoIndentType(e,t,i,n){const s=ze.getIndentationAtPosition(t,i.startLineNumber,i.startColumn),o=ze.getIndentActionForType(e.autoIndent,t,i,n,{shiftIndent:a=>Xt.shiftIndent(e,a),unshiftIndent:a=>Xt.unshiftIndent(e,a)});if(o===null)return null;if(o!==e.normalizeIndentation(s)){const a=t.getLineFirstNonWhitespaceColumn(i.startLineNumber);return a===0?Xt._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+n,!1):Xt._typeCommand(new k(i.startLineNumber,1,i.endLineNumber,i.endColumn),e.normalizeIndentation(o)+t.getLineContent(i.startLineNumber).substring(a-1,i.startColumn-1)+n,!1)}return null}static _isAutoClosingOvertype(e,t,i,n,s){if(e.autoClosingOvertype==="never"||!e.autoClosingPairs.autoClosingPairsCloseSingleChar.has(s))return!1;for(let o=0,a=i.length;o<a;o++){const l=i[o];if(!l.isEmpty())return!1;const c=l.getPosition(),h=t.getLineContent(c.lineNumber);if(h.charAt(c.column-1)!==s)return!1;const d=_f(s);if((c.column>2?h.charCodeAt(c.column-2):0)===92&&d)return!1;if(e.autoClosingOvertype==="auto"){let g=!1;for(let p=0,_=n.length;p<_;p++){const v=n[p];if(c.lineNumber===v.startLineNumber&&c.column===v.startColumn){g=!0;break}}if(!g)return!1}}return!0}static _runAutoClosingOvertype(e,t,i,n,s){let o=[];for(let a=0,l=n.length;a<l;a++){const h=n[a].getPosition(),u=new k(h.lineNumber,h.column,h.lineNumber,h.column+1);o[a]=new rn(u,s)}return new mr(4,o,{shouldPushStackElementBefore:_w(e,4),shouldPushStackElementAfter:!1})}static _isBeforeClosingBrace(e,t){const i=t.charAt(0),n=e.autoClosingPairs.autoClosingPairsOpenByStart.get(i)||[],s=e.autoClosingPairs.autoClosingPairsCloseByStart.get(i)||[],o=n.some(l=>t.startsWith(l.open)),a=s.some(l=>t.startsWith(l.close));return!o&&a}static _findAutoClosingPairOpen(e,t,i,n){const s=e.autoClosingPairs.autoClosingPairsOpenByEnd.get(n);if(!s)return null;let o=null;for(const a of s)if(o===null||a.open.length>o.open.length){let l=!0;for(const c of i)if(t.getValueInRange(new k(c.lineNumber,c.column-a.open.length+1,c.lineNumber,c.column))+n!==a.open){l=!1;break}l&&(o=a)}return o}static _findSubAutoClosingPairClose(e,t){if(t.open.length<=1)return"";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?s.close:""}static _getAutoClosingPairClose(e,t,i,n,s){const o=_f(n),a=o?e.autoClosingQuotes:e.autoClosingBrackets;if(a==="never")return null;const l=this._findAutoClosingPairOpen(e,t,i.map(d=>d.getPosition()),n);if(!l)return null;const c=this._findSubAutoClosingPairClose(e,l);let h=!0;const u=o?e.shouldAutoCloseBefore.quote:e.shouldAutoCloseBefore.bracket;for(let d=0,f=i.length;d<f;d++){const g=i[d];if(!g.isEmpty())return null;const p=g.getPosition(),_=t.getLineContent(p.lineNumber),v=_.substring(p.column-1);if(v.startsWith(c)||(h=!1),_.length>p.column-1){const y=_.charAt(p.column-1);if(!Xt._isBeforeClosingBrace(e,v)&&!u(y))return null}if(!t.isCheapToTokenize(p.lineNumber))return null;if(l.open.length===1&&o&&a!=="always"){const y=os(e.wordSeparators);if(s&&p.column>1&&y.get(_.charCodeAt(p.column-2))===0||!s&&p.column>2&&y.get(_.charCodeAt(p.column-3))===0)return null}t.forceTokenization(p.lineNumber);const b=t.getLineTokens(p.lineNumber);let C=!1;try{C=ze.shouldAutoClosePair(l,b,s?p.column:p.column-1)}catch(y){Oe(y)}if(!C)return null}return h?l.close.substring(0,l.close.length-c.length):l.close}static _runAutoClosingOpenCharType(e,t,i,n,s,o,a){let l=[];for(let c=0,h=n.length;c<h;c++){const u=n[c];l[c]=new BF(u,s,o,a)}return new mr(4,l,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}static _shouldSurroundChar(e,t){return _f(t)?e.autoSurround==="quotes"||e.autoSurround==="languageDefined":e.autoSurround==="brackets"||e.autoSurround==="languageDefined"}static _isSurroundSelectionType(e,t,i,n){if(!Xt._shouldSurroundChar(e,n)||!e.surroundingPairs.hasOwnProperty(n))return!1;const s=_f(n);for(let o=0,a=i.length;o<a;o++){const l=i[o];if(l.isEmpty())return!1;let c=!0;for(let h=l.startLineNumber;h<=l.endLineNumber;h++){const u=t.getLineContent(h),d=h===l.startLineNumber?l.startColumn-1:0,f=h===l.endLineNumber?l.endColumn-1:u.length,g=u.substring(d,f);if(/[^ \t]/.test(g)){c=!1;break}}if(c)return!1;if(s&&l.startLineNumber===l.endLineNumber&&l.startColumn+1===l.endColumn){const h=t.getValueInRange(l);if(_f(h))return!1}}return!0}static _runSurroundSelectionType(e,t,i,n,s){let o=[];for(let a=0,l=n.length;a<l;a++){const c=n[a],h=t.surroundingPairs[s];o[a]=new wJ(c,s,h)}return new mr(0,o,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!0})}static _isTypeInterceptorElectricChar(e,t,i){return!!(i.length===1&&t.isCheapToTokenize(i[0].getEndPosition().lineNumber))}static _typeInterceptorElectricChar(e,t,i,n,s){if(!t.electricChars.hasOwnProperty(s)||!n.isEmpty())return null;let o=n.getPosition();i.forceTokenization(o.lineNumber);let a=i.getLineTokens(o.lineNumber),l;try{l=ze.onElectricCharacter(s,a,o.column)}catch(c){return Oe(c),null}if(!l)return null;if(l.matchOpenBracket){let c=(a.getLineContent()+s).lastIndexOf(l.matchOpenBracket)+1,h=i.findMatchingBracketUp(l.matchOpenBracket,{lineNumber:o.lineNumber,column:c});if(h){if(h.startLineNumber===o.lineNumber)return null;let u=i.getLineContent(h.startLineNumber),d=Dt(u),f=t.normalizeIndentation(d),g=i.getLineContent(o.lineNumber),p=i.getLineFirstNonWhitespaceColumn(o.lineNumber)||o.column,_=g.substring(p-1,o.column-1),v=f+_+s,b=new k(o.lineNumber,1,o.lineNumber,o.column);const C=new rn(b,v);return new mr(ID(v,e),[C],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!0})}}return null}static compositionEndWithInterceptors(e,t,i,n,s,o){if(!n||be.selectionsArrEqual(n,s))return null;let a=null;for(const c of s){if(!c.isEmpty())return null;const h=c.getPosition(),u=i.getValueInRange(new k(h.lineNumber,h.column-1,h.lineNumber,h.column));if(a===null)a=u;else if(a!==u)return null}if(!a)return null;if(this._isAutoClosingOvertype(t,i,s,o,a)){const c=s.map(h=>new rn(new k(h.positionLineNumber,h.positionColumn,h.positionLineNumber,h.positionColumn+1),"",!1));return new mr(4,c,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}const l=this._getAutoClosingPairClose(t,i,s,a,!1);return l!==null?this._runAutoClosingOpenCharType(e,t,i,s,a,!1,l):null}static typeWithInterceptors(e,t,i,n,s,o,a){if(!e&&a===` -`){let h=[];for(let u=0,d=s.length;u<d;u++)h[u]=Xt._enter(i,n,!1,s[u]);return new mr(4,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoIndentType(i,n,s)){let h=[],u=!1;for(let d=0,f=s.length;d<f;d++)if(h[d]=this._runAutoIndentType(i,n,s[d],a),!h[d]){u=!0;break}if(!u)return new mr(4,h,{shouldPushStackElementBefore:!0,shouldPushStackElementAfter:!1})}if(!e&&this._isAutoClosingOvertype(i,n,s,o,a))return this._runAutoClosingOvertype(t,i,n,s,a);if(!e){const h=this._getAutoClosingPairClose(i,n,s,a,!0);if(h)return this._runAutoClosingOpenCharType(t,i,n,s,a,!0,h)}if(this._isSurroundSelectionType(i,n,s,a))return this._runSurroundSelectionType(t,i,n,s,a);if(!e&&this._isTypeInterceptorElectricChar(i,n,s)){const h=this._typeInterceptorElectricChar(t,i,n,s[0],a);if(h)return h}let l=[];for(let h=0,u=s.length;h<u;h++)l[h]=new rn(s[h],a);const c=ID(a,t);return new mr(c,l,{shouldPushStackElementBefore:_w(t,c),shouldPushStackElementAfter:!1})}static typeWithoutInterceptors(e,t,i,n,s){let o=[];for(let l=0,c=n.length;l<c;l++)o[l]=new rn(n[l],s);const a=ID(s,e);return new mr(a,o,{shouldPushStackElementBefore:_w(e,a),shouldPushStackElementAfter:!1})}static lineInsertBefore(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++){let a=i[s].positionLineNumber;if(a===1)n[s]=new dw(new k(1,1,1,1),` -`);else{a--;let l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}}return n}static lineInsertAfter(e,t,i){if(t===null||i===null)return[];let n=[];for(let s=0,o=i.length;s<o;s++){const a=i[s].positionLineNumber;let l=t.getLineMaxColumn(a);n[s]=this._enter(e,t,!1,new k(a,l,a,l))}return n}static lineBreakInsert(e,t,i){let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=this._enter(e,t,!0,i[s]);return n}}class BF extends fw{constructor(e,t,i,n){super(e,(i?t:"")+n,0,-n.length);this._openCharacter=t,this._closeCharacter=n,this.closeCharacterRange=null,this.enclosingRange=null}computeCursorState(e,t){let n=t.getInverseEditOperations()[0].range;return this.closeCharacterRange=new k(n.startLineNumber,n.endColumn-this._closeCharacter.length,n.endLineNumber,n.endColumn),this.enclosingRange=new k(n.startLineNumber,n.endColumn-this._openCharacter.length-this._closeCharacter.length,n.endLineNumber,n.endColumn),super.computeCursorState(e,t)}}function ID(r,e){return r===" "?e===5||e===6?6:5:4}function _w(r,e){return VF(r)&&!VF(e)?!0:r===5?!1:WF(r)!==WF(e)}function WF(r){return r===6||r===5?"space":r}function VF(r){return r===4||r===5||r===6}var R;(function(r){r.editorSimpleInput=new Le("editorSimpleInput",!1,!0),r.editorTextFocus=new Le("editorTextFocus",!1,m("editorTextFocus","Whether the editor text has focus (cursor is blinking)")),r.focus=new Le("editorFocus",!1,m("editorFocus","Whether the editor or an editor widget has focus (e.g. focus is in the find widget)")),r.textInputFocus=new Le("textInputFocus",!1,m("textInputFocus","Whether an editor or a rich text input has focus (cursor is blinking)")),r.readOnly=new Le("editorReadonly",!1,m("editorReadonly","Whether the editor is read only")),r.inDiffEditor=new Le("inDiffEditor",!1,m("inDiffEditor","Whether the context is a diff editor")),r.columnSelection=new Le("editorColumnSelection",!1,m("editorColumnSelection","Whether `editor.columnSelection` is enabled")),r.writable=r.readOnly.toNegated(),r.hasNonEmptySelection=new Le("editorHasSelection",!1,m("editorHasSelection","Whether the editor has text selected")),r.hasOnlyEmptySelection=r.hasNonEmptySelection.toNegated(),r.hasMultipleSelections=new Le("editorHasMultipleSelections",!1,m("editorHasMultipleSelections","Whether the editor has multiple selections")),r.hasSingleSelection=r.hasMultipleSelections.toNegated(),r.tabMovesFocus=new Le("editorTabMovesFocus",!1,m("editorTabMovesFocus","Whether `Tab` will move focus out of the editor")),r.tabDoesNotMoveFocus=r.tabMovesFocus.toNegated(),r.isInWalkThroughSnippet=new Le("isInEmbeddedEditor",!1,!0),r.canUndo=new Le("canUndo",!1,!0),r.canRedo=new Le("canRedo",!1,!0),r.hoverVisible=new Le("editorHoverVisible",!1,m("editorHoverVisible","Whether the editor hover is visible")),r.inCompositeEditor=new Le("inCompositeEditor",void 0,m("inCompositeEditor","Whether the editor is part of a larger editor (e.g. notebooks)")),r.notInCompositeEditor=r.inCompositeEditor.toNegated(),r.languageId=new Le("editorLangId","",m("editorLangId","The language identifier of the editor")),r.hasCompletionItemProvider=new Le("editorHasCompletionItemProvider",!1,m("editorHasCompletionItemProvider","Whether the editor has a completion item provider")),r.hasCodeActionsProvider=new Le("editorHasCodeActionsProvider",!1,m("editorHasCodeActionsProvider","Whether the editor has a code actions provider")),r.hasCodeLensProvider=new Le("editorHasCodeLensProvider",!1,m("editorHasCodeLensProvider","Whether the editor has a code lens provider")),r.hasDefinitionProvider=new Le("editorHasDefinitionProvider",!1,m("editorHasDefinitionProvider","Whether the editor has a definition provider")),r.hasDeclarationProvider=new Le("editorHasDeclarationProvider",!1,m("editorHasDeclarationProvider","Whether the editor has a declaration provider")),r.hasImplementationProvider=new Le("editorHasImplementationProvider",!1,m("editorHasImplementationProvider","Whether the editor has an implementation provider")),r.hasTypeDefinitionProvider=new Le("editorHasTypeDefinitionProvider",!1,m("editorHasTypeDefinitionProvider","Whether the editor has a type definition provider")),r.hasHoverProvider=new Le("editorHasHoverProvider",!1,m("editorHasHoverProvider","Whether the editor has a hover provider")),r.hasDocumentHighlightProvider=new Le("editorHasDocumentHighlightProvider",!1,m("editorHasDocumentHighlightProvider","Whether the editor has a document highlight provider")),r.hasDocumentSymbolProvider=new Le("editorHasDocumentSymbolProvider",!1,m("editorHasDocumentSymbolProvider","Whether the editor has a document symbol provider")),r.hasReferenceProvider=new Le("editorHasReferenceProvider",!1,m("editorHasReferenceProvider","Whether the editor has a reference provider")),r.hasRenameProvider=new Le("editorHasRenameProvider",!1,m("editorHasRenameProvider","Whether the editor has a rename provider")),r.hasSignatureHelpProvider=new Le("editorHasSignatureHelpProvider",!1,m("editorHasSignatureHelpProvider","Whether the editor has a signature help provider")),r.hasInlayHintsProvider=new Le("editorHasInlayHintsProvider",!1,m("editorHasInlayHintsProvider","Whether the editor has an inline hints provider")),r.hasDocumentFormattingProvider=new Le("editorHasDocumentFormattingProvider",!1,m("editorHasDocumentFormattingProvider","Whether the editor has a document formatting provider")),r.hasDocumentSelectionFormattingProvider=new Le("editorHasDocumentSelectionFormattingProvider",!1,m("editorHasDocumentSelectionFormattingProvider","Whether the editor has a document selection formatting provider")),r.hasMultipleDocumentFormattingProvider=new Le("editorHasMultipleDocumentFormattingProvider",!1,m("editorHasMultipleDocumentFormattingProvider","Whether the editor has multiple document formatting providers")),r.hasMultipleDocumentSelectionFormattingProvider=new Le("editorHasMultipleDocumentSelectionFormattingProvider",!1,m("editorHasMultipleDocumentSelectionFormattingProvider","Whether the editor has multiple document selection formatting providers"))})(R||(R={}));const _t=0;class bi extends en{runEditorCommand(e,t,i){const n=t._getViewModel();!n||this.runCoreEditorCommand(n,i||{})}}var bw;(function(r){const e=function(i){if(!er(i))return!1;const n=i;return!(!ys(n.to)||!On(n.by)&&!ys(n.by)||!On(n.value)&&!vh(n.value)||!On(n.revealCursor)&&!w2(n.revealCursor))};r.description={description:"Scroll editor in the given direction",args:[{name:"Editor scroll argument object",description:"Property-value pairs that can be passed through this argument:\n * 'to': A mandatory direction value.\n ```\n 'up', 'down'\n ```\n * 'by': Unit to move. Default is computed based on 'to' value.\n ```\n 'line', 'wrappedLine', 'page', 'halfPage'\n ```\n * 'value': Number of units to move. Default is '1'.\n * 'revealCursor': If 'true' reveals the cursor if it is outside view port.\n ",constraint:e,schema:{type:"object",required:["to"],properties:{to:{type:"string",enum:["up","down"]},by:{type:"string",enum:["line","wrappedLine","page","halfPage"]},value:{type:"number",default:1},revealCursor:{type:"boolean"}}}}]},r.RawDirection={Up:"up",Down:"down"},r.RawUnit={Line:"line",WrappedLine:"wrappedLine",Page:"page",HalfPage:"halfPage"};function t(i){let n;switch(i.to){case r.RawDirection.Up:n=1;break;case r.RawDirection.Down:n=2;break;default:return null}let s;switch(i.by){case r.RawUnit.Line:s=1;break;case r.RawUnit.WrappedLine:s=2;break;case r.RawUnit.Page:s=3;break;case r.RawUnit.HalfPage:s=4;break;default:s=2}const o=Math.floor(i.value||1),a=!!i.revealCursor;return{direction:n,unit:s,value:o,revealCursor:a,select:!!i.select}}r.parse=t})(bw||(bw={}));var yf;(function(r){const e=function(t){if(!er(t))return!1;const i=t;return!(!vh(i.lineNumber)&&!ys(i.lineNumber)||!On(i.at)&&!ys(i.at))};r.description={description:"Reveal the given line at the given logical position",args:[{name:"Reveal line argument object",description:"Property-value pairs that can be passed through this argument:\n * 'lineNumber': A mandatory line number value.\n * 'at': Logical position at which line has to be revealed.\n ```\n 'top', 'center', 'bottom'\n ```\n ",constraint:e,schema:{type:"object",required:["lineNumber"],properties:{lineNumber:{type:["number","string"]},at:{type:"string",enum:["top","center","bottom"]}}}}]},r.RawAtArgument={Top:"top",Center:"center",Bottom:"bottom"}})(yf||(yf={}));class ND{constructor(e){e.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ct).getFocusedCodeEditor();return n&&n.hasTextFocus()?this._runEditorCommand(t,n,i):!1}),e.addImplementation(1e3,"generic-dom-input-textarea",(t,i)=>{const n=document.activeElement;return n&&["input","textarea"].indexOf(n.tagName.toLowerCase())>=0?(this.runDOMCommand(),!0):!1}),e.addImplementation(0,"generic-dom",(t,i)=>{const n=t.get(Ct).getActiveCodeEditor();return n?(n.focus(),this._runEditorCommand(t,n,i)):!1})}_runEditorCommand(e,t,i){const n=this.runEditorCommand(e,t,i);return n||!0}}var Wi;(function(r){class e extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[Gi.moveTo(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)]),b.revealPrimaryCursor(C.source,!0)}}r.MoveTo=fe(new e({id:"_moveTo",inSelectionMode:!1,precondition:void 0})),r.MoveToSelect=fe(new e({id:"_moveToSelect",inSelectionMode:!0,precondition:void 0}));class t extends bi{runCoreEditorCommand(b,C){b.model.pushStackElement();const y=this._getColumnSelectResult(b,b.getPrimaryCursorState(),b.getCursorColumnSelectData(),C);b.setCursorStates(C.source,3,y.viewStates.map(x=>qe.fromViewState(x))),b.setCursorColumnSelectData({isReal:!0,fromViewLineNumber:y.fromLineNumber,fromViewVisualColumn:y.fromVisualColumn,toViewLineNumber:y.toLineNumber,toViewVisualColumn:y.toVisualColumn}),y.reversed?b.revealTopMostCursor(C.source):b.revealBottomMostCursor(C.source)}}r.ColumnSelect=fe(new class extends t{constructor(){super({id:"columnSelect",precondition:void 0})}_getColumnSelectResult(v,b,C,y){const x=v.model.validatePosition(y.position),S=v.coordinatesConverter.validateViewPosition(new $(y.viewPosition.lineNumber,y.viewPosition.column),x);let w=y.doColumnSelect?C.fromViewLineNumber:S.lineNumber,L=y.doColumnSelect?C.fromViewVisualColumn:y.mouseColumn-1;return Xh.columnSelect(v.cursorConfig,v,w,L,S.lineNumber,y.mouseColumn-1)}}),r.CursorColumnSelectLeft=fe(new class extends t{constructor(){super({id:"cursorColumnSelectLeft",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|15,linux:{primary:0}}})}_getColumnSelectResult(v,b,C,y){return Xh.columnSelectLeft(v.cursorConfig,v,C)}}),r.CursorColumnSelectRight=fe(new class extends t{constructor(){super({id:"cursorColumnSelectRight",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|17,linux:{primary:0}}})}_getColumnSelectResult(v,b,C,y){return Xh.columnSelectRight(v.cursorConfig,v,C)}});class i extends t{constructor(b){super(b);this._isPaged=b.isPaged}_getColumnSelectResult(b,C,y,x){return Xh.columnSelectUp(b.cursorConfig,b,y,this._isPaged)}}r.CursorColumnSelectUp=fe(new i({isPaged:!1,id:"cursorColumnSelectUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|16,linux:{primary:0}}})),r.CursorColumnSelectPageUp=fe(new i({isPaged:!0,id:"cursorColumnSelectPageUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|11,linux:{primary:0}}}));class n extends t{constructor(b){super(b);this._isPaged=b.isPaged}_getColumnSelectResult(b,C,y,x){return Xh.columnSelectDown(b.cursorConfig,b,y,this._isPaged)}}r.CursorColumnSelectDown=fe(new n({isPaged:!1,id:"cursorColumnSelectDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|18,linux:{primary:0}}})),r.CursorColumnSelectPageDown=fe(new n({isPaged:!0,id:"cursorColumnSelectPageDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|512|12,linux:{primary:0}}}));class s extends bi{constructor(){super({id:"cursorMove",precondition:void 0,description:mw.description})}runCoreEditorCommand(b,C){const y=mw.parse(C);!y||this._runCursorMove(b,C.source,y)}_runCursorMove(b,C,y){b.model.pushStackElement(),b.setCursorStates(C,3,s._move(b,b.getCursorStates(),y)),b.revealPrimaryCursor(C,!0)}static _move(b,C,y){const x=y.select,S=y.value;switch(y.direction){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:return Gi.simpleMove(b,C,y.direction,x,S,y.unit);case 11:case 13:case 12:case 14:return Gi.viewportMove(b,C,y.direction,x,S);default:return null}}}r.CursorMoveImpl=s,r.CursorMove=fe(new s);class o extends bi{constructor(b){super(b);this._staticArgs=b.args}runCoreEditorCommand(b,C){let y=this._staticArgs;this._staticArgs.value===-1&&(y={direction:this._staticArgs.direction,unit:this._staticArgs.unit,select:this._staticArgs.select,value:b.cursorConfig.pageSize}),b.model.pushStackElement(),b.setCursorStates(C.source,3,Gi.simpleMove(b,b.getCursorStates(),y.direction,y.select,y.value,y.unit)),b.revealPrimaryCursor(C.source,!0)}}r.CursorLeft=fe(new o({args:{direction:0,unit:0,select:!1,value:1},id:"cursorLeft",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:15,mac:{primary:15,secondary:[256|32]}}})),r.CursorLeftSelect=fe(new o({args:{direction:0,unit:0,select:!0,value:1},id:"cursorLeftSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|15}})),r.CursorRight=fe(new o({args:{direction:1,unit:0,select:!1,value:1},id:"cursorRight",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:17,mac:{primary:17,secondary:[256|36]}}})),r.CursorRightSelect=fe(new o({args:{direction:1,unit:0,select:!0,value:1},id:"cursorRightSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|17}})),r.CursorUp=fe(new o({args:{direction:2,unit:2,select:!1,value:1},id:"cursorUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:16,mac:{primary:16,secondary:[256|46]}}})),r.CursorUpSelect=fe(new o({args:{direction:2,unit:2,select:!0,value:1},id:"cursorUpSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|16,secondary:[2048|1024|16],mac:{primary:1024|16},linux:{primary:1024|16}}})),r.CursorPageUp=fe(new o({args:{direction:2,unit:2,select:!1,value:-1},id:"cursorPageUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:11}})),r.CursorPageUpSelect=fe(new o({args:{direction:2,unit:2,select:!0,value:-1},id:"cursorPageUpSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|11}})),r.CursorDown=fe(new o({args:{direction:3,unit:2,select:!1,value:1},id:"cursorDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:18,mac:{primary:18,secondary:[256|44]}}})),r.CursorDownSelect=fe(new o({args:{direction:3,unit:2,select:!0,value:1},id:"cursorDownSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|18,secondary:[2048|1024|18],mac:{primary:1024|18},linux:{primary:1024|18}}})),r.CursorPageDown=fe(new o({args:{direction:3,unit:2,select:!1,value:-1},id:"cursorPageDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:12}})),r.CursorPageDownSelect=fe(new o({args:{direction:3,unit:2,select:!0,value:-1},id:"cursorPageDownSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|12}})),r.CreateCursor=fe(new class extends bi{constructor(){super({id:"createCursor",precondition:void 0})}runCoreEditorCommand(v,b){let C;b.wholeLine?C=Gi.line(v,v.getPrimaryCursorState(),!1,b.position,b.viewPosition):C=Gi.moveTo(v,v.getPrimaryCursorState(),!1,b.position,b.viewPosition);const y=v.getCursorStates();if(y.length>1){const x=C.modelState?C.modelState.position:null,S=C.viewState?C.viewState.position:null;for(let w=0,L=y.length;w<L;w++){const N=y[w];if(!(x&&!N.modelState.selection.containsPosition(x))&&!(S&&!N.viewState.selection.containsPosition(S))){y.splice(w,1),v.model.pushStackElement(),v.setCursorStates(b.source,3,y);return}}}y.push(C),v.model.pushStackElement(),v.setCursorStates(b.source,3,y)}}),r.LastCursorMoveToSelect=fe(new class extends bi{constructor(){super({id:"_lastCursorMoveToSelect",precondition:void 0})}runCoreEditorCommand(v,b){const C=v.getLastAddedCursorIndex(),y=v.getCursorStates(),x=y.slice(0);x[C]=Gi.moveTo(v,y[C],!0,b.position,b.viewPosition),v.model.pushStackElement(),v.setCursorStates(b.source,3,x)}});class a extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,Gi.moveToBeginningOfLine(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorHome=fe(new a({inSelectionMode:!1,id:"cursorHome",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:14,mac:{primary:14,secondary:[2048|15]}}})),r.CursorHomeSelect=fe(new a({inSelectionMode:!0,id:"cursorHomeSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1024|14,mac:{primary:1024|14,secondary:[2048|1024|15]}}}));class l extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,this._exec(b.getCursorStates())),b.revealPrimaryCursor(C.source,!0)}_exec(b){const C=[];for(let y=0,x=b.length;y<x;y++){const S=b[y],w=S.modelState.position.lineNumber;C[y]=qe.fromModelState(S.modelState.move(this._inSelectionMode,w,1,0))}return C}}r.CursorLineStart=fe(new l({inSelectionMode:!1,id:"cursorLineStart",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:0,mac:{primary:256|31}}})),r.CursorLineStartSelect=fe(new l({inSelectionMode:!0,id:"cursorLineStartSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:0,mac:{primary:256|1024|31}}}));class c extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,Gi.moveToEndOfLine(b,b.getCursorStates(),this._inSelectionMode,C.sticky||!1)),b.revealPrimaryCursor(C.source,!0)}}r.CursorEnd=fe(new c({inSelectionMode:!1,id:"cursorEnd",precondition:void 0,kbOpts:{args:{sticky:!1},weight:_t,kbExpr:R.textInputFocus,primary:13,mac:{primary:13,secondary:[2048|17]}},description:{description:"Go to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}})),r.CursorEndSelect=fe(new c({inSelectionMode:!0,id:"cursorEndSelect",precondition:void 0,kbOpts:{args:{sticky:!1},weight:_t,kbExpr:R.textInputFocus,primary:1024|13,mac:{primary:1024|13,secondary:[2048|1024|17]}},description:{description:"Select to End",args:[{name:"args",schema:{type:"object",properties:{sticky:{description:m("stickydesc","Stick to the end even when going to longer lines"),type:"boolean",default:!1}}}}]}}));class h extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,this._exec(b,b.getCursorStates())),b.revealPrimaryCursor(C.source,!0)}_exec(b,C){const y=[];for(let x=0,S=C.length;x<S;x++){const w=C[x],L=w.modelState.position.lineNumber,N=b.model.getLineMaxColumn(L);y[x]=qe.fromModelState(w.modelState.move(this._inSelectionMode,L,N,0))}return y}}r.CursorLineEnd=fe(new h({inSelectionMode:!1,id:"cursorLineEnd",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:0,mac:{primary:256|35}}})),r.CursorLineEndSelect=fe(new h({inSelectionMode:!0,id:"cursorLineEndSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:0,mac:{primary:256|1024|35}}}));class u extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,Gi.moveToBeginningOfBuffer(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorTop=fe(new u({inSelectionMode:!1,id:"cursorTop",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|14,mac:{primary:2048|16}}})),r.CursorTopSelect=fe(new u({inSelectionMode:!0,id:"cursorTopSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|14,mac:{primary:2048|1024|16}}}));class d extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,Gi.moveToEndOfBuffer(b,b.getCursorStates(),this._inSelectionMode)),b.revealPrimaryCursor(C.source,!0)}}r.CursorBottom=fe(new d({inSelectionMode:!1,id:"cursorBottom",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|13,mac:{primary:2048|18}}})),r.CursorBottomSelect=fe(new d({inSelectionMode:!0,id:"cursorBottomSelect",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|1024|13,mac:{primary:2048|1024|18}}}));class f extends bi{constructor(){super({id:"editorScroll",precondition:void 0,description:bw.description})}runCoreEditorCommand(b,C){const y=bw.parse(C);!y||this._runEditorScroll(b,C.source,y)}_runEditorScroll(b,C,y){const x=this._computeDesiredScrollTop(b,y);if(y.revealCursor){const S=b.getCompletelyVisibleViewRangeAtScrollTop(x);b.setCursorStates(C,3,[Gi.findPositionInViewportIfOutside(b,b.getPrimaryCursorState(),S,y.select)])}b.setScrollTop(x,0)}_computeDesiredScrollTop(b,C){if(C.unit===1){const S=b.getCompletelyVisibleViewRange(),w=b.coordinatesConverter.convertViewRangeToModelRange(S);let L;C.direction===1?L=Math.max(1,w.startLineNumber-C.value):L=Math.min(b.model.getLineCount(),w.startLineNumber+C.value);const N=b.coordinatesConverter.convertModelPositionToViewPosition(new $(L,1));return b.getVerticalOffsetForLineNumber(N.lineNumber)}let y;C.unit===3?y=b.cursorConfig.pageSize*C.value:C.unit===4?y=Math.round(b.cursorConfig.pageSize/2)*C.value:y=C.value;const x=(C.direction===1?-1:1)*y;return b.getScrollTop()+x*b.cursorConfig.lineHeight}}r.EditorScrollImpl=f,r.EditorScroll=fe(new f),r.ScrollLineUp=fe(new class extends bi{constructor(){super({id:"scrollLineUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|16,mac:{primary:256|11}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:1,unit:2,value:1,revealCursor:!1,select:!1})}}),r.ScrollPageUp=fe(new class extends bi{constructor(){super({id:"scrollPageUp",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|11,win:{primary:512|11},linux:{primary:512|11}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:1,unit:3,value:1,revealCursor:!1,select:!1})}}),r.ScrollLineDown=fe(new class extends bi{constructor(){super({id:"scrollLineDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|18,mac:{primary:256|12}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:2,unit:2,value:1,revealCursor:!1,select:!1})}}),r.ScrollPageDown=fe(new class extends bi{constructor(){super({id:"scrollPageDown",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|12,win:{primary:512|12},linux:{primary:512|12}}})}runCoreEditorCommand(v,b){r.EditorScroll._runEditorScroll(v,b.source,{direction:2,unit:3,value:1,revealCursor:!1,select:!1})}});class g extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[Gi.word(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position)]),b.revealPrimaryCursor(C.source,!0)}}r.WordSelect=fe(new g({inSelectionMode:!1,id:"_wordSelect",precondition:void 0})),r.WordSelectDrag=fe(new g({inSelectionMode:!0,id:"_wordSelectDrag",precondition:void 0})),r.LastCursorWordSelect=fe(new class extends bi{constructor(){super({id:"lastCursorWordSelect",precondition:void 0})}runCoreEditorCommand(v,b){const C=v.getLastAddedCursorIndex(),y=v.getCursorStates(),x=y.slice(0),S=y[C];x[C]=Gi.word(v,S,S.modelState.hasSelection(),b.position),v.model.pushStackElement(),v.setCursorStates(b.source,3,x)}});class p extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){b.model.pushStackElement(),b.setCursorStates(C.source,3,[Gi.line(b,b.getPrimaryCursorState(),this._inSelectionMode,C.position,C.viewPosition)]),b.revealPrimaryCursor(C.source,!1)}}r.LineSelect=fe(new p({inSelectionMode:!1,id:"_lineSelect",precondition:void 0})),r.LineSelectDrag=fe(new p({inSelectionMode:!0,id:"_lineSelectDrag",precondition:void 0}));class _ extends bi{constructor(b){super(b);this._inSelectionMode=b.inSelectionMode}runCoreEditorCommand(b,C){const y=b.getLastAddedCursorIndex(),x=b.getCursorStates(),S=x.slice(0);S[y]=Gi.line(b,x[y],this._inSelectionMode,C.position,C.viewPosition),b.model.pushStackElement(),b.setCursorStates(C.source,3,S)}}r.LastCursorLineSelect=fe(new _({inSelectionMode:!1,id:"lastCursorLineSelect",precondition:void 0})),r.LastCursorLineSelectDrag=fe(new _({inSelectionMode:!0,id:"lastCursorLineSelectDrag",precondition:void 0})),r.ExpandLineSelection=fe(new class extends bi{constructor(){super({id:"expandLineSelection",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:2048|42}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,Gi.expandLineSelection(v,v.getCursorStates())),v.revealPrimaryCursor(b.source,!0)}}),r.CancelSelection=fe(new class extends bi{constructor(){super({id:"cancelSelection",precondition:R.hasNonEmptySelection,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[Gi.cancelSelection(v,v.getPrimaryCursorState())]),v.revealPrimaryCursor(b.source,!0)}}),r.RemoveSecondaryCursors=fe(new class extends bi{constructor(){super({id:"removeSecondaryCursors",precondition:R.hasMultipleSelections,kbOpts:{weight:_t+1,kbExpr:R.textInputFocus,primary:9,secondary:[1024|9]}})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[v.getPrimaryCursorState()]),v.revealPrimaryCursor(b.source,!0),kC(m("removedCursor","Removed secondary cursors"))}}),r.RevealLine=fe(new class extends bi{constructor(){super({id:"revealLine",precondition:void 0,description:yf.description})}runCoreEditorCommand(v,b){const C=b,y=C.lineNumber||0;let x=typeof y=="number"?y+1:parseInt(y)+1;x<1&&(x=1);const S=v.model.getLineCount();x>S&&(x=S);const w=new k(x,1,x,v.model.getLineMaxColumn(x));let L=0;if(C.at)switch(C.at){case yf.RawAtArgument.Top:L=3;break;case yf.RawAtArgument.Center:L=1;break;case yf.RawAtArgument.Bottom:L=4;break}const N=v.coordinatesConverter.convertModelRangeToViewRange(w);v.revealRange(b.source,!1,N,L,0)}}),r.SelectAll=new class extends ND{constructor(){super(xZ)}runDOMCommand(){Mn&&(document.activeElement.focus(),document.activeElement.select()),document.execCommand("selectAll")}runEditorCommand(v,b,C){const y=b._getViewModel();!y||this.runCoreEditorCommand(y,C)}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates("keyboard",3,[Gi.selectAll(v,v.getPrimaryCursorState())])}},r.SetSelection=fe(new class extends bi{constructor(){super({id:"setSelection",precondition:void 0})}runCoreEditorCommand(v,b){v.model.pushStackElement(),v.setCursorStates(b.source,3,[qe.fromModelSelection(b.selection)])}})})(Wi||(Wi={}));const yJ=_e.and(R.textInputFocus,R.columnSelection);function Sf(r,e){Bn.registerKeybindingRule({id:r,primary:e,when:yJ,weight:_t+1})}Sf(Wi.CursorColumnSelectLeft.id,1024|15);Sf(Wi.CursorColumnSelectRight.id,1024|17);Sf(Wi.CursorColumnSelectUp.id,1024|16);Sf(Wi.CursorColumnSelectPageUp.id,1024|11);Sf(Wi.CursorColumnSelectDown.id,1024|18);Sf(Wi.CursorColumnSelectPageDown.id,1024|12);function HF(r){return r.register(),r}var Lf;(function(r){class e extends en{runEditorCommand(i,n,s){const o=n._getViewModel();!o||this.runCoreEditingCommand(n,o,s||{})}}r.CoreEditingCommand=e,r.LineBreakInsert=fe(new class extends e{constructor(){super({id:"lineBreakInsert",precondition:R.writable,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:0,mac:{primary:256|45}}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Xt.lineBreakInsert(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection)))}}),r.Outdent=fe(new class extends e{constructor(){super({id:"outdent",precondition:R.writable,kbOpts:{weight:_t,kbExpr:_e.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:1024|2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Xt.outdent(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),r.Tab=fe(new class extends e{constructor(){super({id:"tab",precondition:R.writable,kbOpts:{weight:_t,kbExpr:_e.and(R.editorTextFocus,R.tabDoesNotMoveFocus),primary:2}})}runCoreEditingCommand(t,i,n){t.pushUndoStop(),t.executeCommands(this.id,Xt.tab(i.cursorConfig,i.model,i.getCursorStates().map(s=>s.modelState.selection))),t.pushUndoStop()}}),r.DeleteLeft=fe(new class extends e{constructor(){super({id:"deleteLeft",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:1,secondary:[1024|1],mac:{primary:1,secondary:[1024|1,256|38,256|1]}}})}runCoreEditingCommand(t,i,n){const[s,o]=Qh.deleteLeft(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection),i.getCursorAutoClosedCharacters());s&&t.pushUndoStop(),t.executeCommands(this.id,o),i.setPrevEditOperationType(2)}}),r.DeleteRight=fe(new class extends e{constructor(){super({id:"deleteRight",precondition:void 0,kbOpts:{weight:_t,kbExpr:R.textInputFocus,primary:20,mac:{primary:20,secondary:[256|34,256|20]}}})}runCoreEditingCommand(t,i,n){const[s,o]=Qh.deleteRight(i.getPrevEditOperationType(),i.cursorConfig,i.model,i.getCursorStates().map(a=>a.modelState.selection));s&&t.pushUndoStop(),t.executeCommands(this.id,o),i.setPrevEditOperationType(3)}}),r.Undo=new class extends ND{constructor(){super(Sk)}runDOMCommand(){document.execCommand("undo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(80)===!0))return i.getModel().undo()}},r.Redo=new class extends ND{constructor(){super(Lk)}runDOMCommand(){document.execCommand("redo")}runEditorCommand(t,i,n){if(!(!i.hasModel()||i.getOption(80)===!0))return i.getModel().redo()}}})(Lf||(Lf={}));class zF extends AC{constructor(e,t,i){super({id:e,precondition:void 0,description:i});this._handlerId=t}runCommand(e,t){const i=e.get(Ct).getFocusedCodeEditor();!i||i.trigger("keyboard",this._handlerId,t)}}function eu(r,e){HF(new zF("default:"+r,r)),HF(new zF(r,r,e))}eu("type",{description:"Type",args:[{name:"args",schema:{type:"object",required:["text"],properties:{text:{type:"string"}}}}]});eu("replacePreviousChar");eu("compositionType");eu("compositionStart");eu("compositionEnd");eu("paste");eu("cut");class SJ{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){Wi.SetSelection.runCoreEditorCommand(this.viewModel,{source:"keyboard",selection:e})}_validateViewColumn(e){const t=this.viewModel.getLineMinColumn(e.lineNumber);return e.column<t?new $(e.lineNumber,t):e}_hasMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.altKey;case"ctrlKey":return e.ctrlKey;case"metaKey":return e.metaKey;default:return!1}}_hasNonMulticursorModifier(e){switch(this.configuration.options.get(69)){case"altKey":return e.ctrlKey||e.metaKey;case"ctrlKey":return e.altKey||e.metaKey;case"metaKey":return e.ctrlKey||e.altKey;default:return!1}}dispatchMouse(e){const t=this.configuration.options,i=Zn&&t.get(95),n=t.get(18);e.middleButton&&!i?this._columnSelect(e.position,e.mouseColumn,e.inSelectionMode):e.startedOnLineNumbers?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelect(e.position):this._createCursor(e.position,!0):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount>=4?this._selectAll():e.mouseDownCount===3?this._hasMulticursorModifier(e)?e.inSelectionMode?this._lastCursorLineSelectDrag(e.position):this._lastCursorLineSelect(e.position):e.inSelectionMode?this._lineSelectDrag(e.position):this._lineSelect(e.position):e.mouseDownCount===2?this._hasMulticursorModifier(e)?this._lastCursorWordSelect(e.position):e.inSelectionMode?this._wordSelectDrag(e.position):this._wordSelect(e.position):this._hasMulticursorModifier(e)?this._hasNonMulticursorModifier(e)||(e.shiftKey?this._columnSelect(e.position,e.mouseColumn,!0):e.inSelectionMode?this._lastCursorMoveToSelect(e.position):this._createCursor(e.position,!1)):e.inSelectionMode?e.altKey?this._columnSelect(e.position,e.mouseColumn,!0):n?this._columnSelect(e.position,e.mouseColumn,!0):this._moveToSelect(e.position):this.moveTo(e.position)}_usualArgs(e){return e=this._validateViewColumn(e),{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e}}moveTo(e){Wi.MoveTo.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_moveToSelect(e){Wi.MoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_columnSelect(e,t,i){e=this._validateViewColumn(e),Wi.ColumnSelect.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,mouseColumn:t,doColumnSelect:i})}_createCursor(e,t){e=this._validateViewColumn(e),Wi.CreateCursor.runCoreEditorCommand(this.viewModel,{source:"mouse",position:this._convertViewToModelPosition(e),viewPosition:e,wholeLine:t})}_lastCursorMoveToSelect(e){Wi.LastCursorMoveToSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelect(e){Wi.WordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_wordSelectDrag(e){Wi.WordSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorWordSelect(e){Wi.LastCursorWordSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelect(e){Wi.LineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lineSelectDrag(e){Wi.LineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelect(e){Wi.LastCursorLineSelect.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_lastCursorLineSelectDrag(e){Wi.LastCursorLineSelectDrag.runCoreEditorCommand(this.viewModel,this._usualArgs(e))}_selectAll(){Wi.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 vw{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){this.onKeyDown&&this.onKeyDown(e)}emitKeyUp(e){this.onKeyUp&&this.onKeyUp(e)}emitContextMenu(e){this.onContextMenu&&this.onContextMenu(this._convertViewToModelMouseEvent(e))}emitMouseMove(e){this.onMouseMove&&this.onMouseMove(this._convertViewToModelMouseEvent(e))}emitMouseLeave(e){this.onMouseLeave&&this.onMouseLeave(this._convertViewToModelMouseEvent(e))}emitMouseDown(e){this.onMouseDown&&this.onMouseDown(this._convertViewToModelMouseEvent(e))}emitMouseUp(e){this.onMouseUp&&this.onMouseUp(this._convertViewToModelMouseEvent(e))}emitMouseDrag(e){this.onMouseDrag&&this.onMouseDrag(this._convertViewToModelMouseEvent(e))}emitMouseDrop(e){this.onMouseDrop&&this.onMouseDrop(this._convertViewToModelMouseEvent(e))}emitMouseDropCanceled(){this.onMouseDropCanceled&&this.onMouseDropCanceled()}emitMouseWheel(e){this.onMouseWheel&&this.onMouseWheel(e)}_convertViewToModelMouseEvent(e){return e.target?{event:e.event,target:this._convertViewToModelMouseTarget(e.target)}:e}_convertViewToModelMouseTarget(e){return vw.convertViewToModelMouseTarget(e,this._coordinatesConverter)}static convertViewToModelMouseTarget(e,t){return new LJ(e.element,e.type,e.mouseColumn,e.position?t.convertViewPositionToModelPosition(e.position):null,e.range?t.convertViewRangeToModelRange(e.range):null,e.detail)}}class LJ{constructor(e,t,i,n,s,o){this.element=e,this.type=t,this.mouseColumn=i,this.position=n,this.range=s,this.detail=o}toString(){return ho.toString(this)}}var TD;class $F{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 Error("Illegal value for lineNumber");return this._lines[t]}onLinesDeleted(e,t){if(this.getCount()===0)return null;const i=this.getStartLineNumber(),n=this.getEndLineNumber();if(t<i){const l=t-e+1;return this._rendLineNumberStart-=l,null}if(e>n)return null;let s=0,o=0;for(let l=i;l<=n;l++){const c=l-this._rendLineNumberStart;e<=l&&l<=t&&(o===0?(s=c,o=1):o++)}if(e<i){let l=0;t<i?l=t-e+1:l=i-e,this._rendLineNumberStart-=l}return this._lines.splice(s,o)}onLinesChanged(e,t){if(this.getCount()===0)return!1;const i=this.getStartLineNumber(),n=this.getEndLineNumber();let s=!1;for(let o=e;o<=t;o++)o>=i&&o<=n&&(this._lines[o-this._rendLineNumberStart].onContentChanged(),s=!0);return s}onLinesInserted(e,t){if(this.getCount()===0)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 u=0;u<i;u++)o[u]=this._createLine();const a=e-this._rendLineNumberStart,l=this._lines.slice(0,a),c=this._lines.slice(a,this._lines.length-i),h=this._lines.slice(this._lines.length-i,this._lines.length);return this._lines=l.concat(o).concat(c),h}onTokensChanged(e){if(this.getCount()===0)return!1;const t=this.getStartLineNumber(),i=this.getEndLineNumber();let n=!1;for(let s=0,o=e.length;s<o;s++){const a=e[s];if(a.toLineNumber<t||a.fromLineNumber>i)continue;const l=Math.max(t,a.fromLineNumber),c=Math.min(i,a.toLineNumber);for(let h=l;h<=c;h++){const u=h-this._rendLineNumberStart;this._lines[u].onTokensChanged(),n=!0}}return n}}class UF{constructor(e){this._host=e,this.domNode=this._createDomNode(),this._linesCollection=new $F(()=>this._host.createVisibleLine())}_createDomNode(){const e=dt(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(129)}onFlushed(e){return this._linesCollection.flush(),!0}onLinesChanged(e){return this._linesCollection.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){const t=this._linesCollection.onLinesDeleted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const s=t[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onLinesInserted(e){const t=this._linesCollection.onLinesInserted(e.fromLineNumber,e.toLineNumber);if(t)for(let i=0,n=t.length;i<n;i++){const s=t[i].getDomNode();s&&this.domNode.domNode.removeChild(s)}return!0}onScrollChanged(e){return e.scrollTopChanged}onTokensChanged(e){return this._linesCollection.onTokensChanged(e.ranges)}onZonesChanged(e){return!0}getStartLineNumber(){return this._linesCollection.getStartLineNumber()}getEndLineNumber(){return this._linesCollection.getEndLineNumber()}getVisibleLine(e){return this._linesCollection.getLine(e)}renderLines(e){const t=this._linesCollection._get(),i=new el(this.domNode.domNode,this._host,e),n={rendLineNumberStart:t.rendLineNumberStart,lines:t.lines,linesLength:t.lines.length},s=i.render(n,e.startLineNumber,e.endLineNumber,e.relativeVerticalOffset);this._linesCollection._set(s.rendLineNumberStart,s.lines)}}class el{constructor(e,t,i){this.domNode=e,this.host=t,this.viewportData=i}render(e,t,i,n){const s={rendLineNumberStart:e.rendLineNumberStart,lines:e.lines.slice(0),linesLength:e.linesLength};if(s.rendLineNumberStart+s.linesLength-1<t||i<s.rendLineNumberStart){s.rendLineNumberStart=t,s.linesLength=i-t+1,s.lines=[];for(let o=t;o<=i;o++)s.lines[o-t]=this.host.createVisibleLine();return this._finishRendering(s,!0,n),s}if(this._renderUntouchedLines(s,Math.max(t-s.rendLineNumberStart,0),Math.min(i-s.rendLineNumberStart,s.linesLength-1),n,t),s.rendLineNumberStart>t){const o=t,a=Math.min(i,s.rendLineNumberStart-1);o<=a&&(this._insertLinesBefore(s,o,a,n,t),s.linesLength+=a-o+1)}else if(s.rendLineNumberStart<t){const o=Math.min(s.linesLength,t-s.rendLineNumberStart);o>0&&(this._removeLinesBefore(s,o),s.linesLength-=o)}if(s.rendLineNumberStart=t,s.rendLineNumberStart+s.linesLength-1<i){const o=s.rendLineNumberStart+s.linesLength,a=i;o<=a&&(this._insertLinesAfter(s,o,a,n,t),s.linesLength+=a-o+1)}else if(s.rendLineNumberStart+s.linesLength-1>i){const o=Math.max(0,i-s.rendLineNumberStart+1),l=s.linesLength-1-o+1;l>0&&(this._removeLinesAfter(s,l),s.linesLength-=l)}return this._finishRendering(s,!1,n),s}_renderUntouchedLines(e,t,i,n,s){const o=e.rendLineNumberStart,a=e.lines;for(let l=t;l<=i;l++){const c=o+l;a[l].layoutLine(c,n[c-s])}}_insertLinesBefore(e,t,i,n,s){const o=[];let a=0;for(let l=t;l<=i;l++)o[a++]=this.host.createVisibleLine();e.lines=o.concat(e.lines)}_removeLinesBefore(e,t){for(let i=0;i<t;i++){const n=e.lines[i].getDomNode();n&&this.domNode.removeChild(n)}e.lines.splice(0,t)}_insertLinesAfter(e,t,i,n,s){const o=[];let a=0;for(let l=t;l<=i;l++)o[a++]=this.host.createVisibleLine();e.lines=e.lines.concat(o)}_removeLinesAfter(e,t){const i=e.linesLength-t;for(let n=0;n<t;n++){const s=e.lines[i+n].getDomNode();s&&this.domNode.removeChild(s)}e.lines.splice(i,t)}_finishRenderingNewLines(e,t,i,n){el._ttPolicy&&(i=el._ttPolicy.createHTML(i));const s=this.domNode.lastChild;t||!s?this.domNode.innerHTML=i:s.insertAdjacentHTML("afterend",i);let o=this.domNode.lastChild;for(let a=e.linesLength-1;a>=0;a--){const l=e.lines[a];n[a]&&(l.setDomNode(o),o=o.previousSibling)}}_finishRenderingInvalidLines(e,t,i){const n=document.createElement("div");el._ttPolicy&&(t=el._ttPolicy.createHTML(t)),n.innerHTML=t;for(let s=0;s<e.linesLength;s++){const o=e.lines[s];if(i[s]){const a=n.firstChild,l=o.getDomNode();l.parentNode.replaceChild(a,l),o.setDomNode(a)}}}_finishRendering(e,t,i){const n=el._sb,s=e.linesLength,o=e.lines,a=e.rendLineNumberStart,l=[];{n.reset();let c=!1;for(let h=0;h<s;h++){const u=o[h];l[h]=!1,!(u.getDomNode()||!u.renderLine(h+a,i[h],this.viewportData,n))&&(l[h]=!0,c=!0)}c&&this._finishRenderingNewLines(e,t,n.build(),l)}{n.reset();let c=!1;const h=[];for(let u=0;u<s;u++){const d=o[u];h[u]=!1,!(l[u]||!d.renderLine(u+a,i[u],this.viewportData,n))&&(h[u]=!0,c=!0)}c&&this._finishRenderingInvalidLines(e,n.build(),h)}}}el._ttPolicy=(TD=window.trustedTypes)===null||TD===void 0?void 0:TD.createPolicy("editorViewLayer",{createHTML:r=>r});el._sb=Sh(1e5);class jF extends ss{constructor(e){super(e);this._visibleLines=new UF(this),this.domNode=this._visibleLines.domNode,this._dynamicOverlays=[],this._isFocused=!1,this.domNode.setClassName("view-overlays")}shouldRender(){if(super.shouldRender())return!0;for(let e=0,t=this._dynamicOverlays.length;e<t;e++)if(this._dynamicOverlays[e].shouldRender())return!0;return!1}dispose(){super.dispose();for(let e=0,t=this._dynamicOverlays.length;e<t;e++)this._dynamicOverlays[e].dispose();this._dynamicOverlays=[]}getDomNode(){return this.domNode}createVisibleLine(){return new xJ(this._context.configuration,this._dynamicOverlays)}addDynamicOverlay(e){this._dynamicOverlays.push(e)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e);const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).onConfigurationChanged(e);return!0}onFlushed(e){return this._visibleLines.onFlushed(e)}onFocusChanged(e){return this._isFocused=e.isFocused,!0}onLinesChanged(e){return this._visibleLines.onLinesChanged(e)}onLinesDeleted(e){return this._visibleLines.onLinesDeleted(e)}onLinesInserted(e){return this._visibleLines.onLinesInserted(e)}onScrollChanged(e){return this._visibleLines.onScrollChanged(e)||!0}onTokensChanged(e){return this._visibleLines.onTokensChanged(e)}onZonesChanged(e){return this._visibleLines.onZonesChanged(e)}prepareRender(e){const t=this._dynamicOverlays.filter(i=>i.shouldRender());for(let i=0,n=t.length;i<n;i++){const s=t[i];s.prepareRender(e),s.onDidRender()}}render(e){this._viewOverlaysRender(e),this.domNode.toggleClassName("focused",this._isFocused)}_viewOverlaysRender(e){this._visibleLines.renderLines(e.viewportData)}}class xJ{constructor(e,t){this._configuration=e,this._lineHeight=this._configuration.options.get(58),this._dynamicOverlays=t,this._domNode=null,this._renderedContent=null}getDomNode(){return this._domNode?this._domNode.domNode:null}setDomNode(e){this._domNode=dt(e)}onContentChanged(){}onTokensChanged(){}onConfigurationChanged(e){this._lineHeight=this._configuration.options.get(58)}renderLine(e,t,i,n){let s="";for(let o=0,a=this._dynamicOverlays.length;o<a;o++)s+=this._dynamicOverlays[o].render(i.startLineNumber,e);return this._renderedContent===s?!1:(this._renderedContent=s,n.appendASCIIString('<div style="position:absolute;top:'),n.appendASCIIString(String(t)),n.appendASCIIString("px;width:100%;height:"),n.appendASCIIString(String(this._lineHeight)),n.appendASCIIString('px;">'),n.appendASCIIString(s),n.appendASCIIString("</div>"),!0)}layoutLine(e,t){this._domNode&&(this._domNode.setTop(t),this._domNode.setHeight(this._lineHeight))}}class kJ extends jF{constructor(e){super(e);const i=this._context.configuration.options.get(129);this._contentWidth=i.contentWidth,this.domNode.setHeight(0)}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._contentWidth=i.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 DJ extends jF{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._contentLeft=i.contentLeft,this.domNode.setClassName("margin-view-overlays"),this.domNode.setWidth(1),Dn.applyFontInfo(this.domNode,t.get(43))}onConfigurationChanged(e){const t=this._context.configuration.options;Dn.applyFontInfo(this.domNode,t.get(43));const i=t.get(129);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 um{constructor(e,t){this._coordinateBrand=void 0,this.top=e,this.left=t}}class EJ extends ss{constructor(e,t){super(e);this._viewDomNode=t,this._widgets={},this.domNode=dt(document.createElement("div")),Zo.write(this.domNode,1),this.domNode.setClassName("contentWidgets"),this.domNode.setPosition("absolute"),this.domNode.setTop(0),this.overflowingContentWidgetsDomNode=dt(document.createElement("div")),Zo.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){const t=Object.keys(this._widgets);for(const i of t)this._widgets[i].onLineMappingChanged(e);return!0}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onZonesChanged(e){return!0}addWidget(e){const t=new IJ(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){this._widgets[e.getId()].setPosition(t,i),this.setShouldRender()}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const i=this._widgets[t];delete this._widgets[t];const n=i.domNode.domNode;n.parentNode.removeChild(n),n.removeAttribute("monaco-visible-content-widget"),this.setShouldRender()}}shouldSuppressMouseDownOnWidget(e){return this._widgets.hasOwnProperty(e)?this._widgets[e].suppressMouseDown:!1}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 IJ{constructor(e,t,i){this._context=e,this._viewDomNode=t,this._actual=i,this.domNode=dt(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(129);this._fixedOverflowWidgets=n.get(36),this._contentWidth=s.contentWidth,this._contentLeft=s.contentLeft,this._lineHeight=n.get(58),this._range=null,this._viewRange=null,this._preference=[],this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1,this._maxWidth=this._getMaxWidth(),this._isVisible=!1,this._renderData=null,this.domNode.setPosition(this._fixedOverflowWidgets&&this.allowEditorOverflow?"fixed":"absolute"),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(58),e.hasChanged(129)){const i=t.get(129);this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._maxWidth=this._getMaxWidth()}}onLineMappingChanged(e){this._setPosition(this._range)}_setPosition(e){if(this._range=e,this._viewRange=null,this._range){const t=this._context.model.validateModelRange(this._range);(this._context.model.coordinatesConverter.modelPositionIsVisible(t.getStartPosition())||this._context.model.coordinatesConverter.modelPositionIsVisible(t.getEndPosition()))&&(this._viewRange=this._context.model.coordinatesConverter.convertModelRangeToViewRange(t))}}_getMaxWidth(){return this.allowEditorOverflow?window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth:this._contentWidth}setPosition(e,t){this._setPosition(e),this._preference=t,this._cachedDomNodeClientWidth=-1,this._cachedDomNodeClientHeight=-1}_layoutBoxInViewport(e,t,i,n,s){const o=e.top,a=o,l=t.top+this._lineHeight,c=s.viewportHeight-l,h=o-n,u=a>=n,d=l,f=c>=n;let g=e.left,p=t.left;return g+i>s.scrollLeft+s.viewportWidth&&(g=s.scrollLeft+s.viewportWidth-i),p+i>s.scrollLeft+s.viewportWidth&&(p=s.scrollLeft+s.viewportWidth-i),g<s.scrollLeft&&(g=s.scrollLeft),p<s.scrollLeft&&(p=s.scrollLeft),{fitsAbove:u,aboveTop:h,aboveLeft:g,fitsBelow:f,belowTop:d,belowLeft:p}}_layoutHorizontalSegmentInPage(e,t,i,n){const s=Math.max(0,t.left-n),o=Math.min(t.left+t.width+n,e.width);let a=t.left+i-Aa.scrollX;if(a+n>o){const l=a-(o-n);a-=l,i-=l}if(a<s){const l=a-s;a-=l,i-=l}return[i,a]}_layoutBoxInPage(e,t,i,n,s){const o=e.top-n,a=t.top+this._lineHeight,l=Qi(this._viewDomNode.domNode),c=l.top+o-Aa.scrollY,h=l.top+a-Aa.scrollY,u=av(document.body),[d,f]=this._layoutHorizontalSegmentInPage(u,l,e.left-s.scrollLeft+this._contentLeft,i),[g,p]=this._layoutHorizontalSegmentInPage(u,l,t.left-s.scrollLeft+this._contentLeft,i),_=22,v=22,b=c>=_,C=h+n<=u.height-v;return this._fixedOverflowWidgets?{fitsAbove:b,aboveTop:Math.max(c,_),aboveLeft:f,fitsBelow:C,belowTop:h,belowLeft:p}:{fitsAbove:b,aboveTop:o,aboveLeft:d,fitsBelow:C,belowTop:a,belowLeft:g}}_prepareRenderWidgetAtExactPositionOverflowing(e){return new um(e.top,e.left+this._contentLeft)}_getTopAndBottomLeft(e){if(!this._viewRange)return[null,null];const t=e.linesVisibleRangesForRange(this._viewRange,!1);if(!t||t.length===0)return[null,null];let i=t[0],n=t[0];for(const u of t)u.lineNumber<i.lineNumber&&(i=u),u.lineNumber>n.lineNumber&&(n=u);let s=1073741824;for(const u of i.ranges)u.left<s&&(s=u.left);let o=1073741824;for(const u of n.ranges)u.left<o&&(o=u.left);const a=e.getVerticalOffsetForLineNumber(i.lineNumber)-e.scrollTop,l=new um(a,s),c=e.getVerticalOffsetForLineNumber(n.lineNumber)-e.scrollTop,h=new um(c,o);return[l,h]}_prepareRenderWidget(e){const[t,i]=this._getTopAndBottomLeft(e);if(!t||!i)return null;if(this._cachedDomNodeClientWidth===-1||this._cachedDomNodeClientHeight===-1){let s=null;if(typeof this._actual.beforeRender=="function"&&(s=AD(this._actual.beforeRender,this._actual)),s)this._cachedDomNodeClientWidth=s.width,this._cachedDomNodeClientHeight=s.height;else{const o=this.domNode.domNode;this._cachedDomNodeClientWidth=o.clientWidth,this._cachedDomNodeClientHeight=o.clientHeight}}let n;if(this.allowEditorOverflow?n=this._layoutBoxInPage(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e):n=this._layoutBoxInViewport(t,i,this._cachedDomNodeClientWidth,this._cachedDomNodeClientHeight,e),this._preference)for(let s=1;s<=2;s++)for(const o of this._preference)if(o===1){if(!n)return null;if(s===2||n.fitsAbove)return{coordinate:new um(n.aboveTop,n.aboveLeft),position:1}}else if(o===2){if(!n)return null;if(s===2||n.fitsBelow)return{coordinate:new um(n.belowTop,n.belowLeft),position:2}}else return this.allowEditorOverflow?{coordinate:this._prepareRenderWidgetAtExactPositionOverflowing(t),position:0}:{coordinate:t,position:0};return null}onBeforeRender(e){!this._viewRange||!this._preference||this._viewRange.endLineNumber<e.startLineNumber||this._viewRange.startLineNumber>e.endLineNumber||this.domNode.setMaxWidth(this._maxWidth)}prepareRender(e){this._renderData=this._prepareRenderWidget(e)}render(e){if(!this._renderData){this._isVisible&&(this.domNode.removeAttribute("monaco-visible-content-widget"),this._isVisible=!1,this.domNode.setVisibility("hidden")),typeof this._actual.afterRender=="function"&&AD(this._actual.afterRender,this._actual,null);return}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),typeof this._actual.afterRender=="function"&&AD(this._actual.afterRender,this._actual,this._renderData.position)}}function AD(r,e,...t){try{return r.call(e,...t)}catch{return null}}let RD=!0;class KF extends Cf{constructor(e){super();this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),this._contentLeft=i.contentLeft,this._contentWidth=i.contentWidth,this._selectionIsEmpty=!0,this._focused=!1,this._cursorLineNumbers=[1],this._selections=[new be(1,1,1,1)],this._renderData=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}_readFromSelections(){let e=!1;const t=RD?this._selections.slice(0,1):this._selections,i=t.map(s=>s.positionLineNumber);i.sort((s,o)=>s-o),Is(this._cursorLineNumbers,i)||(this._cursorLineNumbers=i,e=!0);const n=t.every(s=>s.isEmpty());return this._selectionIsEmpty!==n&&(this._selectionIsEmpty=n,e=!0),e}onThemeChanged(e){return this._readFromSelections()}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._renderLineHighlight=t.get(84),this._renderLineHighlightOnlyWhenFocus=t.get(85),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):!1}prepareRender(e){if(!this._shouldRenderThis()){this._renderData=null;return}const t=this._renderOne(e),i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber,s=this._cursorLineNumbers.length;let o=0;const a=[];for(let l=i;l<=n;l++){const c=l-i;for(;o<s&&this._cursorLineNumbers[o]<l;)o++;o<s&&this._cursorLineNumbers[o]===l?a[c]=t:a[c]=""}this._renderData=a}render(e,t){if(!this._renderData)return"";const i=t-e;return i>=this._renderData.length?"":this._renderData[i]}}class NJ extends KF{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderOther()?" current-line-both":"")}" style="width:${Math.max(e.scrollWidth,this._contentWidth)}px; height:${this._lineHeight}px;"></div>`}_shouldRenderThis(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderOther(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}class TJ extends KF{_renderOne(e){return`<div class="${"current-line"+(this._shouldRenderMargin()?" current-line-margin":"")+(this._shouldRenderOther()?" current-line-margin-both":"")}" style="width:${this._contentLeft}px; height:${this._lineHeight}px;"></div>`}_shouldRenderMargin(){return(this._renderLineHighlight==="gutter"||this._renderLineHighlight==="all")&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}_shouldRenderThis(){return!0}_shouldRenderOther(){return(this._renderLineHighlight==="line"||this._renderLineHighlight==="all")&&this._selectionIsEmpty&&(!this._renderLineHighlightOnlyWhenFocus||this._focused)}}Lt((r,e)=>{RD=!1;const t=r.getColor(tQ);if(t&&(e.addRule(`.monaco-editor .view-overlays .current-line { background-color: ${t}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { background-color: ${t}; border: none; }`)),!t||t.isTransparent()||r.defines(sF)){const i=r.getColor(sF);i&&(RD=!0,e.addRule(`.monaco-editor .view-overlays .current-line { border: 2px solid ${i}; }`),e.addRule(`.monaco-editor .margin-view-overlays .current-line-margin { border: 2px solid ${i}; }`),r.type==="hc"&&(e.addRule(".monaco-editor .view-overlays .current-line { border-width: 1px; }"),e.addRule(".monaco-editor .margin-view-overlays .current-line-margin { border-width: 1px; }")))}});class AJ extends Cf{constructor(e){super();this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=t.get(43).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(58),this._typicalHalfwidthCharacterWidth=t.get(43).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 l=0,c=t.length;l<c;l++){const h=t[l];h.options.className&&(i[n++]=h)}i=i.sort((l,c)=>{if(l.options.zIndex<c.options.zIndex)return-1;if(l.options.zIndex>c.options.zIndex)return 1;const h=l.options.className,u=c.options.className;return h<u?-1:h>u?1:k.compareRangesUsingStarts(l.range,c.range)});const s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber,a=[];for(let l=s;l<=o;l++){const c=l-s;a[c]=""}this._renderWholeLineDecorations(e,i,a),this._renderNormalDecorations(e,i,a),this._renderResult=a}_renderWholeLineDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber,o=e.visibleRange.endLineNumber;for(let a=0,l=t.length;a<l;a++){const c=t[a];if(!c.options.isWholeLine)continue;const h='<div class="cdr '+c.options.className+'" style="left:0;width:100%;height:'+n+'px;"></div>',u=Math.max(c.range.startLineNumber,s),d=Math.min(c.range.endLineNumber,o);for(let f=u;f<=d;f++){const g=f-s;i[g]+=h}}}_renderNormalDecorations(e,t,i){const n=String(this._lineHeight),s=e.visibleRange.startLineNumber;let o=null,a=!1,l=null;for(let c=0,h=t.length;c<h;c++){const u=t[c];if(u.options.isWholeLine)continue;const d=u.options.className,f=Boolean(u.options.showIfCollapsed);let g=u.range;if(f&&g.endColumn===1&&g.endLineNumber!==g.startLineNumber&&(g=new k(g.startLineNumber,g.startColumn,g.endLineNumber-1,this._context.model.getLineMaxColumn(g.endLineNumber-1))),o===d&&a===f&&k.areIntersectingOrTouching(l,g)){l=k.plusRange(l,g);continue}o!==null&&this._renderNormalDecoration(e,l,o,a,n,s,i),o=d,a=f,l=g}o!==null&&this._renderNormalDecoration(e,l,o,a,n,s,i)}_renderNormalDecoration(e,t,i,n,s,o,a){const l=e.linesVisibleRangesForRange(t,i==="findMatch");if(!!l)for(let c=0,h=l.length;c<h;c++){const u=l[c];if(u.outsideRenderedLine)continue;const d=u.lineNumber-o;if(n&&u.ranges.length===1){const f=u.ranges[0];f.width===0&&(u.ranges[0]=new RC(f.left,this._typicalHalfwidthCharacterWidth))}for(let f=0,g=u.ranges.length;f<g;f++){const p=u.ranges[f],_='<div class="cdr '+i+'" style="left:'+String(p.left)+"px;width:"+String(p.width)+"px;height:"+s+'px;"></div>';a[d]+=_}}}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class Vr extends Y{onclick(e,t){this._register(J(e,Ee.CLICK,i=>t(new Gr(i))))}onmousedown(e,t){this._register(J(e,Ee.MOUSE_DOWN,i=>t(new Gr(i))))}onmouseover(e,t){this._register(J(e,Ee.MOUSE_OVER,i=>t(new Gr(i))))}onnonbubblingmouseout(e,t){this._register(RL(e,i=>t(new Gr(i))))}onkeydown(e,t){this._register(J(e,Ee.KEY_DOWN,i=>t(new ei(i))))}onkeyup(e,t){this._register(J(e,Ee.KEY_UP,i=>t(new ei(i))))}oninput(e,t){this._register(J(e,Ee.INPUT,t))}onblur(e,t){this._register(J(e,Ee.BLUR,t))}onfocus(e,t){this._register(J(e,Ee.FOCUS,t))}ignoreGesture(e){Et.ignoreTarget(e)}}const xf=11;class RJ extends Vr{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",typeof e.top!="undefined"&&(this.bgDomNode.style.top="0px"),typeof e.left!="undefined"&&(this.bgDomNode.style.left="0px"),typeof e.bottom!="undefined"&&(this.bgDomNode.style.bottom="0px"),typeof e.right!="undefined"&&(this.bgDomNode.style.right="0px"),this.domNode=document.createElement("div"),this.domNode.className=e.className,this.domNode.classList.add(...e.icon.classNamesArray),this.domNode.style.position="absolute",this.domNode.style.width=xf+"px",this.domNode.style.height=xf+"px",typeof e.top!="undefined"&&(this.domNode.style.top=e.top+"px"),typeof e.left!="undefined"&&(this.domNode.style.left=e.left+"px"),typeof e.bottom!="undefined"&&(this.domNode.style.bottom=e.bottom+"px"),typeof e.right!="undefined"&&(this.domNode.style.right=e.right+"px"),this._mouseMoveMonitor=this._register(new Rh),this.onmousedown(this.bgDomNode,t=>this._arrowMouseDown(t)),this.onmousedown(this.domNode,t=>this._arrowMouseDown(t)),this._mousedownRepeatTimer=this._register(new lp),this._mousedownScheduleRepeatTimer=this._register(new Xn)}_arrowMouseDown(e){const t=()=>{this._mousedownRepeatTimer.cancelAndSet(()=>this._onActivate(),1e3/24)};this._onActivate(),this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancelAndSet(t,200),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,lf,i=>{},()=>{this._mousedownRepeatTimer.cancel(),this._mousedownScheduleRepeatTimer.cancel()}),e.preventDefault()}}class MJ extends Y{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 Xn)}setVisibility(e){this._visibility!==e&&(this._visibility=e,this._updateShouldBeVisible())}setShouldBeVisible(e){this._rawShouldBeVisible=e,this._updateShouldBeVisible()}_applyVisibilitySetting(){return this._visibility===2?!1:this._visibility===3?!0: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(){if(!this._isNeeded){this._hide(!1);return}this._shouldBeVisible?this._reveal():this._hide(!0)}_reveal(){this._isVisible||(this._isVisible=!0,this._revealTimer.setIfNotSet(()=>{this._domNode&&this._domNode.setClassName(this._visibleClassName)},0))}_hide(e){this._revealTimer.cancel(),!!this._isVisible&&(this._isVisible=!1,this._domNode&&this._domNode.setClassName(this._invisibleClassName+(e?" fade":"")))}}const PJ=140;class qF extends Vr{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 MJ(e.visibility,"visible scrollbar "+e.extraScrollbarClassName,"invisible scrollbar "+e.extraScrollbarClassName)),this._visibilityController.setIsNeeded(this._scrollbarState.isNeeded()),this._mouseMoveMonitor=this._register(new Rh),this._shouldRender=!0,this.domNode=dt(document.createElement("div")),this.domNode.setAttribute("role","presentation"),this.domNode.setAttribute("aria-hidden","true"),this._visibilityController.setDomNode(this.domNode),this.domNode.setPosition("absolute"),this.onmousedown(this.domNode.domNode,t=>this._domNodeMouseDown(t))}_createArrow(e){const t=this._register(new RJ(e));this.domNode.domNode.appendChild(t.bgDomNode),this.domNode.domNode.appendChild(t.domNode)}_createSlider(e,t,i,n){this.slider=dt(document.createElement("div")),this.slider.setClassName("slider"),this.slider.setPosition("absolute"),this.slider.setTop(e),this.slider.setLeft(t),typeof i=="number"&&this.slider.setWidth(i),typeof n=="number"&&this.slider.setHeight(n),this.slider.setLayerHinting(!0),this.slider.setContain("strict"),this.domNode.domNode.appendChild(this.slider.domNode),this.onmousedown(this.slider.domNode,s=>{s.leftButton&&(s.preventDefault(),this._sliderMouseDown(s,()=>{}))}),this.onclick(this.slider.domNode,s=>{s.leftButton&&s.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()))}_domNodeMouseDown(e){e.target===this.domNode.domNode&&this._onMouseDown(e)}delegateMouseDown(e){const t=this.domNode.domNode.getClientRects()[0].top,i=t+this._scrollbarState.getSliderPosition(),n=t+this._scrollbarState.getSliderPosition()+this._scrollbarState.getSliderSize(),s=this._sliderMousePosition(e);i<=s&&s<=n?e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{})):this._onMouseDown(e)}_onMouseDown(e){let t,i;if(e.target===this.domNode.domNode&&typeof e.browserEvent.offsetX=="number"&&typeof e.browserEvent.offsetY=="number")t=e.browserEvent.offsetX,i=e.browserEvent.offsetY;else{const s=Qi(this.domNode.domNode);t=e.posx-s.left,i=e.posy-s.top}const n=this._mouseDownRelativePosition(t,i);this._setDesiredScrollPositionNow(this._scrollByPage?this._scrollbarState.getDesiredScrollPositionFromOffsetPaged(n):this._scrollbarState.getDesiredScrollPositionFromOffset(n)),e.leftButton&&(e.preventDefault(),this._sliderMouseDown(e,()=>{}))}_sliderMouseDown(e,t){const i=this._sliderMousePosition(e),n=this._sliderOrthogonalMousePosition(e),s=this._scrollbarState.clone();this.slider.toggleClassName("active",!0),this._mouseMoveMonitor.startMonitoring(e.target,e.buttons,lf,o=>{const a=this._sliderOrthogonalMousePosition(o),l=Math.abs(a-n);if(Xi&&l>PJ){this._setDesiredScrollPositionNow(s.getScrollPosition());return}const h=this._sliderMousePosition(o)-i;this._setDesiredScrollPositionNow(s.getDesiredScrollPositionFromDelta(h))},()=>{this.slider.toggleClassName("active",!1),this._host.onDragEnd(),t()}),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()}}const OJ=20;class dm{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 dm(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):!1}setScrollSize(e){const t=Math.round(e);return this._scrollSize!==t?(this._scrollSize=t,this._refreshComputedValues(),!0):!1}setScrollPosition(e){const t=Math.round(e);return this._scrollPosition!==t?(this._scrollPosition=t,this._refreshComputedValues(),!0):!1}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),a=Math.max(0,o-2*t),l=n>0&&n>i;if(!l)return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(a),computedSliderRatio:0,computedSliderPosition:0};const c=Math.round(Math.max(OJ,Math.floor(i*a/n))),h=(a-c)/(n-i),u=s*h;return{computedAvailableSize:Math.round(o),computedIsNeeded:l,computedSliderSize:Math.round(c),computedSliderRatio:h,computedSliderPosition:Math.round(u)}}_refreshComputedValues(){const e=dm._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 t<this._computedSliderPosition?i-=this._visibleSize:i+=this._visibleSize,i}getDesiredScrollPositionFromDelta(e){if(!this._computedIsNeeded)return 0;const t=this._computedSliderPosition+e;return Math.round(t/this._computedSliderRatio)}}const FJ=Ls("scrollbar-button-left",ve.triangleLeft),BJ=Ls("scrollbar-button-right",ve.triangleRight);class WJ extends qF{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();super({lazyRender:t.lazyRender,host:i,scrollbarState:new dm(t.horizontalHasArrows?t.arrowSize:0,t.horizontal===2?0:t.horizontalScrollbarSize,t.vertical===2?0:t.verticalScrollbarSize,n.width,n.scrollWidth,s.scrollLeft),visibility:t.horizontal,extraScrollbarClassName:"horizontal",scrollable:e,scrollByPage:t.scrollByPage});if(t.horizontalHasArrows){const o=(t.arrowSize-xf)/2,a=(t.horizontalScrollbarSize-xf)/2;this._createArrow({className:"scra",icon:FJ,top:a,left:o,bottom:void 0,right:void 0,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Td(null,1,0))}),this._createArrow({className:"scra",icon:BJ,top:a,left:void 0,bottom:void 0,right:o,bgWidth:t.arrowSize,bgHeight:t.horizontalScrollbarSize,onActivate:()=>this._host.onMouseWheel(new Td(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}_mouseDownRelativePosition(e,t){return e}_sliderMousePosition(e){return e.posx}_sliderOrthogonalMousePosition(e){return e.posy}_updateScrollbarSize(e){this.slider.setHeight(e)}writeScrollPosition(e,t){e.scrollLeft=t}updateOptions(e){this.updateScrollbarSize(e.horizontal===2?0:e.horizontalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._visibilityController.setVisibility(e.horizontal),this._scrollByPage=e.scrollByPage}}const VJ=Ls("scrollbar-button-up",ve.triangleUp),HJ=Ls("scrollbar-button-down",ve.triangleDown);class zJ extends qF{constructor(e,t,i){const n=e.getScrollDimensions(),s=e.getCurrentScrollPosition();super({lazyRender:t.lazyRender,host:i,scrollbarState:new dm(t.verticalHasArrows?t.arrowSize:0,t.vertical===2?0:t.verticalScrollbarSize,0,n.height,n.scrollHeight,s.scrollTop),visibility:t.vertical,extraScrollbarClassName:"vertical",scrollable:e,scrollByPage:t.scrollByPage});if(t.verticalHasArrows){const o=(t.arrowSize-xf)/2,a=(t.verticalScrollbarSize-xf)/2;this._createArrow({className:"scra",icon:VJ,top:o,left:a,bottom:void 0,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Td(null,0,1))}),this._createArrow({className:"scra",icon:HJ,top:void 0,left:a,bottom:o,right:void 0,bgWidth:t.verticalScrollbarSize,bgHeight:t.arrowSize,onActivate:()=>this._host.onMouseWheel(new Td(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}_mouseDownRelativePosition(e,t){return t}_sliderMousePosition(e){return e.posy}_sliderOrthogonalMousePosition(e){return e.posx}_updateScrollbarSize(e){this.slider.setWidth(e)}writeScrollPosition(e,t){e.scrollTop=t}updateOptions(e){this.updateScrollbarSize(e.vertical===2?0:e.verticalScrollbarSize),this._scrollbarState.setOppositeScrollbarSize(0),this._visibilityController.setVisibility(e.vertical),this._scrollByPage=e.scrollByPage}}class Cw{constructor(e,t,i,n,s,o){this._scrollStateBrand=void 0,e=e|0,t=t|0,i=i|0,n=n|0,s=s|0,o=o|0,this.rawScrollLeft=i,this.rawScrollTop=o,e<0&&(e=0),i+e>t&&(i=t-e),i<0&&(i=0),n<0&&(n=0),o+n>s&&(o=s-n),o<0&&(o=0),this.width=e,this.scrollWidth=t,this.scrollLeft=i,this.height=n,this.scrollHeight=s,this.scrollTop=o}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 Cw(typeof e.width!="undefined"?e.width:this.width,typeof e.scrollWidth!="undefined"?e.scrollWidth:this.scrollWidth,t?this.rawScrollLeft:this.scrollLeft,typeof e.height!="undefined"?e.height:this.height,typeof e.scrollHeight!="undefined"?e.scrollHeight:this.scrollHeight,t?this.rawScrollTop:this.scrollTop)}withScrollPosition(e){return new Cw(this.width,this.scrollWidth,typeof e.scrollLeft!="undefined"?e.scrollLeft:this.rawScrollLeft,this.height,this.scrollHeight,typeof e.scrollTop!="undefined"?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,a=this.scrollHeight!==e.scrollHeight,l=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:a,scrollTopChanged:l}}}class ww extends Y{constructor(e,t){super();this._scrollableBrand=void 0,this._onScroll=this._register(new H),this.onScroll=this._onScroll.event,this._smoothScrollDuration=e,this._scheduleAtNextAnimationFrame=t,this._state=new Cw(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){const i=this._state.withScrollDimensions(e,t);this._setState(i,Boolean(this._smoothScrolling)),this._smoothScrolling&&this._smoothScrolling.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(this._smoothScrollDuration===0)return this.setScrollPositionNow(e);if(this._smoothScrolling){e={scrollLeft:typeof e.scrollLeft=="undefined"?this._smoothScrolling.to.scrollLeft:e.scrollLeft,scrollTop:typeof e.scrollTop=="undefined"?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;t?n=new fm(this._smoothScrolling.from,i,this._smoothScrolling.startTime,this._smoothScrolling.duration):n=this._smoothScrolling.combine(this._state,i,this._smoothScrollDuration),this._smoothScrolling.dispose(),this._smoothScrolling=n}else{const i=this._state.withScrollPosition(e);this._smoothScrolling=fm.start(this._state,i,this._smoothScrollDuration)}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}_performSmoothScrolling(){if(!this._smoothScrolling)return;const e=this._smoothScrolling.tick(),t=this._state.withScrollPosition(e);if(this._setState(t,!0),!!this._smoothScrolling){if(e.isDone){this._smoothScrolling.dispose(),this._smoothScrolling=null;return}this._smoothScrolling.animationFrameDisposable=this._scheduleAtNextAnimationFrame(()=>{!this._smoothScrolling||(this._smoothScrolling.animationFrameDisposable=null,this._performSmoothScrolling())})}}_setState(e,t){const i=this._state;i.equals(e)||(this._state=e,this._onScroll.fire(this._state.createScrollEvent(i,t)))}}class GF{constructor(e,t,i){this.scrollLeft=e,this.scrollTop=t,this.isDone=i}}function MD(r,e){const t=e-r;return function(i){return r+t*jJ(i)}}function $J(r,e,t){return function(i){return i<t?r(i/t):e((i-t)/(1-t))}}class fm{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 s,o;return e<t?(s=e+.75*i,o=t-.75*i):(s=e-.75*i,o=t+.75*i),$J(MD(e,s),MD(o,t),.33)}return MD(e,t)}dispose(){this.animationFrameDisposable!==null&&(this.animationFrameDisposable.dispose(),this.animationFrameDisposable=null)}acceptScrollDimensions(e){this.to=e.withScrollPosition(this.to),this._initAnimations()}tick(){return this._tick(Date.now())}_tick(e){const t=(e-this.startTime)/this.duration;if(t<1){const i=this.scrollLeft(t),n=this.scrollTop(t);return new GF(i,n,!1)}return new GF(this.to.scrollLeft,this.to.scrollTop,!0)}combine(e,t,i){return fm.start(e,t,i)}static start(e,t,i){i=i+10;const n=Date.now()-10;return new fm(e,t,n,i)}}function UJ(r){return Math.pow(r,3)}function jJ(r){return 1-UJ(1-r)}const KJ=500,ZF=50;class qJ{constructor(e,t,i){this.timestamp=e,this.deltaX=t,this.deltaY=i,this.score=0}}class PD{constructor(){this._capacity=5,this._memory=[],this._front=-1,this._rear=-1}isPhysicalMouseWheel(){if(this._front===-1&&this._rear===-1)return!1;let e=1,t=0,i=1,n=this._rear;do{const s=n===this._front?e:Math.pow(2,-i);if(e-=s,t+=this._memory[n].score*s,n===this._front)break;n=(this._capacity+n-1)%this._capacity,i++}while(!0);return t<=.5}accept(e,t,i){const n=new qJ(e,t,i);n.score=this._computeScore(n),this._front===-1&&this._rear===-1?(this._memory[0]=n,this._front=0,this._rear=0):(this._rear=(this._rear+1)%this._capacity,this._rear===this._front&&(this._front=(this._front+1)%this._capacity),this._memory[this._rear]=n)}_computeScore(e){if(Math.abs(e.deltaX)>0&&Math.abs(e.deltaY)>0)return 1;let t=.5;return this._front===-1&&this._rear===-1||this._memory[this._rear],(!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}}PD.INSTANCE=new PD;class YF extends Vr{constructor(e,t,i){super();this._onScroll=this._register(new H),this.onScroll=this._onScroll.event,this._onWillScroll=this._register(new H),e.style.overflow="hidden",this._options=GJ(t),this._scrollable=i,this._register(this._scrollable.onScroll(s=>{this._onWillScroll.fire(s),this._onDidScroll(s),this._onScroll.fire(s)}));const n={onMouseWheel:s=>this._onMouseWheel(s),onDragStart:()=>this._onDragStart(),onDragEnd:()=>this._onDragEnd()};this._verticalScrollbar=this._register(new zJ(this._scrollable,this._options,n)),this._horizontalScrollbar=this._register(new WJ(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=dt(document.createElement("div")),this._leftShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._leftShadowDomNode.domNode),this._topShadowDomNode=dt(document.createElement("div")),this._topShadowDomNode.setClassName("shadow"),this._domNode.appendChild(this._topShadowDomNode.domNode),this._topLeftShadowDomNode=dt(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,s=>this._onMouseOver(s)),this.onnonbubblingmouseout(this._listenOnDomNode,s=>this._onMouseOut(s)),this._hideTimeout=this._register(new Xn),this._isDragging=!1,this._mouseIsOver=!1,this._shouldRender=!0,this._revealOnScroll=!0}dispose(){this._mouseWheelToDispose=ht(this._mouseWheelToDispose),super.dispose()}getDomNode(){return this._domNode}getOverviewRulerLayoutInfo(){return{parent:this._domNode,insertBefore:this._verticalScrollbar.domNode.domNode}}delegateVerticalScrollbarMouseDown(e){this._verticalScrollbar.delegateMouseDown(e)}getScrollDimensions(){return this._scrollable.getScrollDimensions()}setScrollDimensions(e){this._scrollable.setScrollDimensions(e,!1)}updateClassName(e){this._options.className=e,Je&&(this._options.className+=" mac"),this._domNode.className="monaco-scrollable-element "+this._options.className}updateOptions(e){typeof e.handleMouseWheel!="undefined"&&(this._options.handleMouseWheel=e.handleMouseWheel,this._setListeningToMouseWheel(this._options.handleMouseWheel)),typeof e.mouseWheelScrollSensitivity!="undefined"&&(this._options.mouseWheelScrollSensitivity=e.mouseWheelScrollSensitivity),typeof e.fastScrollSensitivity!="undefined"&&(this._options.fastScrollSensitivity=e.fastScrollSensitivity),typeof e.scrollPredominantAxis!="undefined"&&(this._options.scrollPredominantAxis=e.scrollPredominantAxis),typeof e.horizontal!="undefined"&&(this._options.horizontal=e.horizontal),typeof e.vertical!="undefined"&&(this._options.vertical=e.vertical),typeof e.horizontalScrollbarSize!="undefined"&&(this._options.horizontalScrollbarSize=e.horizontalScrollbarSize),typeof e.verticalScrollbarSize!="undefined"&&(this._options.verticalScrollbarSize=e.verticalScrollbarSize),typeof e.scrollByPage!="undefined"&&(this._options.scrollByPage=e.scrollByPage),this._horizontalScrollbar.updateOptions(this._options),this._verticalScrollbar.updateOptions(this._options),this._options.lazyRender||this._render()}_setListeningToMouseWheel(e){if(this._mouseWheelToDispose.length>0!==e&&(this._mouseWheelToDispose=ht(this._mouseWheelToDispose),e)){const i=n=>{this._onMouseWheel(new Td(n))};this._mouseWheelToDispose.push(J(this._listenOnDomNode,Ee.MOUSE_WHEEL,i,{passive:!1}))}}_onMouseWheel(e){const t=PD.INSTANCE;{const s=window.devicePixelRatio/oj();Xi||Zn?t.accept(Date.now(),e.deltaX/s,e.deltaY/s):t.accept(Date.now(),e.deltaX,e.deltaY)}let i=!1;if(e.deltaY||e.deltaX){let s=e.deltaY*this._options.mouseWheelScrollSensitivity,o=e.deltaX*this._options.mouseWheelScrollSensitivity;this._options.scrollPredominantAxis&&(Math.abs(s)>=Math.abs(o)?o=0:s=0),this._options.flipAxes&&([s,o]=[o,s]);const a=!Je&&e.browserEvent&&e.browserEvent.shiftKey;(this._options.scrollYToX||a)&&!o&&(o=s,s=0),e.browserEvent&&e.browserEvent.altKey&&(o=o*this._options.fastScrollSensitivity,s=s*this._options.fastScrollSensitivity);const l=this._scrollable.getFutureScrollPosition();let c={};if(s){const h=ZF*s,u=l.scrollTop-(h<0?Math.floor(h):Math.ceil(h));this._verticalScrollbar.writeScrollPosition(c,u)}if(o){const h=ZF*o,u=l.scrollLeft-(h<0?Math.floor(h):Math.ceil(h));this._horizontalScrollbar.writeScrollPosition(c,u)}c=this._scrollable.validateScrollPosition(c),(l.scrollLeft!==c.scrollLeft||l.scrollTop!==c.scrollTop)&&(this._options.mouseWheelSmoothScroll&&t.isPhysicalMouseWheel()?this._scrollable.setScrollPositionSmooth(c):this._scrollable.setScrollPositionNow(c),i=!0)}let n=i;!n&&this._options.alwaysConsumeMouseWheel&&(n=!0),!n&&this._options.consumeMouseWheelIfScrollbarIsNeeded&&(this._verticalScrollbar.isNeeded()||this._horizontalScrollbar.isNeeded())&&(n=!0),n&&(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()}_onMouseOut(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(),KJ)}}class OD extends YF{constructor(e,t){t=t||{},t.mouseWheelSmoothScroll=!1;const i=new ww(0,n=>Oo(n));super(e,t,i);this._register(i)}setScrollPosition(e){this._scrollable.setScrollPositionNow(e)}getScrollPosition(){return this._scrollable.getCurrentScrollPosition()}}class FD extends YF{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 gm extends OD{constructor(e,t){super(e,t);this._element=e,this.onScroll(i=>{i.scrollTopChanged&&(this._element.scrollTop=i.scrollTop),i.scrollLeftChanged&&(this._element.scrollLeft=i.scrollLeft)}),this.scanDomNode()}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})}}function GJ(r){const e={lazyRender:typeof r.lazyRender!="undefined"?r.lazyRender:!1,className:typeof r.className!="undefined"?r.className:"",useShadows:typeof r.useShadows!="undefined"?r.useShadows:!0,handleMouseWheel:typeof r.handleMouseWheel!="undefined"?r.handleMouseWheel:!0,flipAxes:typeof r.flipAxes!="undefined"?r.flipAxes:!1,consumeMouseWheelIfScrollbarIsNeeded:typeof r.consumeMouseWheelIfScrollbarIsNeeded!="undefined"?r.consumeMouseWheelIfScrollbarIsNeeded:!1,alwaysConsumeMouseWheel:typeof r.alwaysConsumeMouseWheel!="undefined"?r.alwaysConsumeMouseWheel:!1,scrollYToX:typeof r.scrollYToX!="undefined"?r.scrollYToX:!1,mouseWheelScrollSensitivity:typeof r.mouseWheelScrollSensitivity!="undefined"?r.mouseWheelScrollSensitivity:1,fastScrollSensitivity:typeof r.fastScrollSensitivity!="undefined"?r.fastScrollSensitivity:5,scrollPredominantAxis:typeof r.scrollPredominantAxis!="undefined"?r.scrollPredominantAxis:!0,mouseWheelSmoothScroll:typeof r.mouseWheelSmoothScroll!="undefined"?r.mouseWheelSmoothScroll:!0,arrowSize:typeof r.arrowSize!="undefined"?r.arrowSize:11,listenOnDomNode:typeof r.listenOnDomNode!="undefined"?r.listenOnDomNode:null,horizontal:typeof r.horizontal!="undefined"?r.horizontal:1,horizontalScrollbarSize:typeof r.horizontalScrollbarSize!="undefined"?r.horizontalScrollbarSize:10,horizontalSliderSize:typeof r.horizontalSliderSize!="undefined"?r.horizontalSliderSize:0,horizontalHasArrows:typeof r.horizontalHasArrows!="undefined"?r.horizontalHasArrows:!1,vertical:typeof r.vertical!="undefined"?r.vertical:1,verticalScrollbarSize:typeof r.verticalScrollbarSize!="undefined"?r.verticalScrollbarSize:10,verticalHasArrows:typeof r.verticalHasArrows!="undefined"?r.verticalHasArrows:!1,verticalSliderSize:typeof r.verticalSliderSize!="undefined"?r.verticalSliderSize:0,scrollByPage:typeof r.scrollByPage!="undefined"?r.scrollByPage:!1};return e.horizontalSliderSize=typeof r.horizontalSliderSize!="undefined"?r.horizontalSliderSize:e.horizontalScrollbarSize,e.verticalSliderSize=typeof r.verticalSliderSize!="undefined"?r.verticalSliderSize:e.verticalScrollbarSize,Je&&(e.className+=" mac"),e}class ZJ extends ss{constructor(e,t,i,n){super(e);const s=this._context.configuration.options,o=s.get(91),a=s.get(66),l=s.get(34),c=s.get(94),h={listenOnDomNode:i.domNode,className:"editor-scrollable "+TC(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:a,fastScrollSensitivity:l,scrollPredominantAxis:c,scrollByPage:o.scrollByPage};this.scrollbar=this._register(new FD(t.domNode,h,this._context.viewLayout.getScrollable())),Zo.write(this.scrollbar.getDomNode(),5),this.scrollbarDomNode=dt(this.scrollbar.getDomNode()),this.scrollbarDomNode.setPosition("absolute"),this._setLayout();const u=(d,f,g)=>{const p={};if(f){const _=d.scrollTop;_&&(p.scrollTop=this._context.viewLayout.getCurrentScrollTop()+_,d.scrollTop=0)}if(g){const _=d.scrollLeft;_&&(p.scrollLeft=this._context.viewLayout.getCurrentScrollLeft()+_,d.scrollLeft=0)}this._context.model.setScrollPosition(p,1)};this._register(J(i.domNode,"scroll",d=>u(i.domNode,!0,!0))),this._register(J(t.domNode,"scroll",d=>u(t.domNode,!0,!1))),this._register(J(n.domNode,"scroll",d=>u(n.domNode,!0,!1))),this._register(J(this.scrollbarDomNode.domNode,"scroll",d=>u(this.scrollbarDomNode.domNode,!0,!1)))}dispose(){super.dispose()}_setLayout(){const e=this._context.configuration.options,t=e.get(129);this.scrollbarDomNode.setLeft(t.contentLeft),e.get(64).side==="right"?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}delegateVerticalScrollbarMouseDown(e){this.scrollbar.delegateVerticalScrollbarMouseDown(e)}onConfigurationChanged(e){if(e.hasChanged(91)||e.hasChanged(66)||e.hasChanged(34)){const t=this._context.configuration.options,i=t.get(91),n=t.get(66),s=t.get(34),o=t.get(94),a={vertical:i.vertical,horizontal:i.horizontal,verticalScrollbarSize:i.verticalScrollbarSize,horizontalScrollbarSize:i.horizontalScrollbarSize,scrollByPage:i.scrollByPage,handleMouseWheel:i.handleMouseWheel,mouseWheelScrollSensitivity:n,fastScrollSensitivity:s,scrollPredominantAxis:o};this.scrollbar.updateOptions(a)}return e.hasChanged(129)&&this._setLayout(),!0}onScrollChanged(e){return!0}onThemeChanged(e){return this.scrollbar.updateClassName("editor-scrollable "+TC(this._context.theme.type)),!0}prepareRender(e){}render(e){this.scrollbar.renderNow()}}class yw{constructor(e,t,i){this._decorationToRenderBrand=void 0,this.startLineNumber=+e,this.endLineNumber=+t,this.className=String(i)}}class BD extends Cf{_render(e,t,i){const n=[];for(let a=e;a<=t;a++){const l=a-e;n[l]=[]}if(i.length===0)return n;i.sort((a,l)=>a.className===l.className?a.startLineNumber===l.startLineNumber?a.endLineNumber-l.endLineNumber:a.startLineNumber-l.startLineNumber:a.className<l.className?-1:1);let s=null,o=0;for(let a=0,l=i.length;a<l;a++){const c=i[a],h=c.className;let u=Math.max(c.startLineNumber,e)-e;const d=Math.min(c.endLineNumber,t)-e;s===h?(u=Math.max(o+1,u),o=Math.max(o,d)):(s=h,o=d);for(let f=u;f<=o;f++)n[f].push(s)}return n}}class YJ extends BD{constructor(e){super();this._context=e;const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,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(129);return this._lineHeight=t.get(58),this._glyphMargin=t.get(49),this._glyphMarginLeft=i.glyphMarginLeft,this._glyphMarginWidth=i.glyphMarginWidth,!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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.glyphMarginClassName;l&&(i[n++]=new yw(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){if(!this._glyphMargin){this._renderResult=null;return}const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._lineHeight.toString(),o=this._glyphMarginLeft.toString(),a=this._glyphMarginWidth.toString(),l='" style="left:'+o+"px;width:"+a+"px;height:"+s+'px;"></div>',c=[];for(let h=t;h<=i;h++){const u=h-t,d=n[u];d.length===0?c[u]="":c[u]='<div class="cgmr codicon '+d.join(" ")+l}this._renderResult=c}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}class XJ extends Cf{constructor(e){super();this._context=e,this._primaryPosition=null;const t=this._context.configuration.options,i=t.get(130),n=t.get(43);this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),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(130),n=t.get(43);return this._lineHeight=t.get(58),this._spaceWidth=n.spaceWidth,this._maxIndentLeft=i.wrappingColumn===-1?-1:i.wrappingColumn*n.typicalHalfwidthCharacterWidth,this._bracketPairGuideOptions=t.get(13),!0}onCursorStateChanged(e){var t;const n=e.selections[0].getPosition();return((t=this._primaryPosition)===null||t===void 0?void 0:t.equals(n))?!1:(this._primaryPosition=n,!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;if(!this._bracketPairGuideOptions.indentation&&!this._bracketPairGuideOptions.bracketPairs){this._renderResult=null;return}const n=e.visibleRange.startLineNumber,s=e.visibleRange.endLineNumber,o=e.scrollWidth,a=this._lineHeight,l=this._primaryPosition,c=this.getGuidesByLine(n,s,l),h=[];for(let u=n;u<=s;u++){const d=u-n,f=c[d];let g="";const p=(i=(t=e.visibleRangeForPosition(new $(u,1)))===null||t===void 0?void 0:t.left)!==null&&i!==void 0?i:0;for(const _ of f){const v=p+(_.visibleColumn-1)*this._spaceWidth;if(v>o||this._maxIndentLeft>0&&v>this._maxIndentLeft)break;g+=`<div class="core-guide ${_.className}" style="left:${v}px;height:${a}px;width:${this._spaceWidth}px"></div>`}h[d]=g}this._renderResult=h}getGuidesByLine(e,t,i){var n;const s=this._bracketPairGuideOptions.bracketPairs?this._context.model.getBracketGuidesInRangeByLine(e,t,i,!0,!0):null,o=this._bracketPairGuideOptions.indentation?this._context.model.getLinesIndentGuides(e,t):null;let a=0,l=0,c=0;if(this._bracketPairGuideOptions.highlightActiveIndentation&&i){const d=this._context.model.getActiveIndentGuide(i.lineNumber,e,t);a=d.startLineNumber,l=d.endLineNumber,c=d.indent}const{indentSize:h}=this._context.model.getTextModelOptions(),u=[];for(let d=e;d<=t;d++){const f=new Array;u.push(f);const g=s?s[d-e]:[],p=new Np(g),_=o?o[d-e]:[];for(let v=1;v<=_;v++){const b=(v-1)*h+1,C=g.length===0&&a<=d&&d<=l&&v===c;f.push(...p.takeWhile(y=>y.visibleColumn<b)||[]),((n=p.peek())===null||n===void 0?void 0:n.visibleColumn)!==b&&f.push(new x2(b,C?"core-guide-indent-active":"core-guide-indent"))}f.push(...p.takeWhile(v=>!0)||[])}return u}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}Lt((r,e)=>{const t=r.getColor(JC);t&&e.addRule(`.monaco-editor .lines-content .core-guide-indent { box-shadow: 1px 0 0 0 ${t} inset; }`);const i=r.getColor(ew)||t;i&&e.addRule(`.monaco-editor .lines-content .core-guide-indent-active { box-shadow: 1px 0 0 0 ${i} inset; }`);const n=[uF,dF,fF,gF,pF,mF],s=new DF;let o=n.map(a=>r.getColor(a)).filter(a=>!!a).filter(a=>!a.isTransparent());for(let a=0;a<30;a++){const l=o[a%o.length];e.addRule(`.monaco-editor .${s.getInlineClassNameOfLevel(a).replace(/ /g,".")} { opacity: 0.3; box-shadow: 1px 0 0 0 ${l} inset; }`)}e.addRule(`.monaco-editor .${s.activeClassName} { opacity: 1 !important; }`)});class QJ{constructor(){this._currentVisibleRange=new k(1,1,1,1)}getCurrentVisibleRange(){return this._currentVisibleRange}setCurrentVisibleRange(e){this._currentVisibleRange=e}}class JJ{constructor(e,t,i,n,s,o){this.lineNumber=e,this.startColumn=t,this.endColumn=i,this.startScrollTop=n,this.stopScrollTop=s,this.scrollType=o,this.type="range",this.minLineNumber=e,this.maxLineNumber=e}}class eee{constructor(e,t,i,n){this.selections=e,this.startScrollTop=t,this.stopScrollTop=i,this.scrollType=n,this.type="selections";let s=e[0].startLineNumber,o=e[0].endLineNumber;for(let a=1,l=e.length;a<l;a++){const c=e[a];s=Math.min(s,c.startLineNumber),o=Math.max(o,c.endLineNumber)}this.minLineNumber=s,this.maxLineNumber=o}}class Sw extends ss{constructor(e,t){super(e);this._linesContent=t,this._textRangeRestingSpot=document.createElement("div"),this._visibleLines=new UF(this),this.domNode=this._visibleLines.domNode;const i=this._context.configuration,n=this._context.configuration.options,s=n.get(43),o=n.get(130);this._lineHeight=n.get(58),this._typicalHalfwidthCharacterWidth=s.typicalHalfwidthCharacterWidth,this._isViewportWrapping=o.isViewportWrapping,this._revealHorizontalRightPadding=n.get(88),this._cursorSurroundingLines=n.get(25),this._cursorSurroundingLinesStyle=n.get(26),this._canUseLayerHinting=!n.get(28),this._viewLineOptions=new pO(i,this._context.theme.type),Zo.write(this.domNode,7),this.domNode.setClassName(`view-lines ${Yh}`),Dn.applyFontInfo(this.domNode,s),this._maxLineWidth=0,this._asyncUpdateLineWidths=new Bt(()=>{this._updateLineWidthsSlow()},200),this._asyncCheckMonospaceFontAssumptions=new Bt(()=>{this._checkMonospaceFontAssumptions()},2e3),this._lastRenderedData=new QJ,this._horizontalRevealRequest=null}dispose(){this._asyncUpdateLineWidths.dispose(),this._asyncCheckMonospaceFontAssumptions.dispose(),super.dispose()}getDomNode(){return this.domNode}createVisibleLine(){return new Yo(this._viewLineOptions)}onConfigurationChanged(e){this._visibleLines.onConfigurationChanged(e),e.hasChanged(130)&&(this._maxLineWidth=0);const t=this._context.configuration.options,i=t.get(43),n=t.get(130);return this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._isViewportWrapping=n.isViewportWrapping,this._revealHorizontalRightPadding=t.get(88),this._cursorSurroundingLines=t.get(25),this._cursorSurroundingLinesStyle=t.get(26),this._canUseLayerHinting=!t.get(28),Dn.applyFontInfo(this.domNode,i),this._onOptionsMaybeChanged(),e.hasChanged(129)&&(this._maxLineWidth=0),!0}_onOptionsMaybeChanged(){const e=this._context.configuration,t=new pO(e,this._context.theme.type);if(!this._viewLineOptions.equals(t)){this._viewLineOptions=t;const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)this._visibleLines.getVisibleLine(s).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 t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++)this._visibleLines.getVisibleLine(n).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.range,e.selections,e.verticalType);if(t===-1)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 JJ(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 eee(e.selections,this._context.viewLayout.getCurrentScrollTop(),i.scrollTop,e.scrollType)):this._horizontalRevealRequest=null;const s=Math.abs(this._context.viewLayout.getCurrentScrollTop()-i.scrollTop)<=this._lineHeight?1:e.scrollType;return this._context.model.setScrollPosition(i,s),!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.scrollTop<t||e.scrollTop>i)&&(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.model.setMaxLineWidth(this._maxLineWidth),this._visibleLines.onZonesChanged(e)}onThemeChanged(e){return this._onOptionsMaybeChanged()}getPositionFromDOMInfo(e,t){const i=this._getViewLineDomNode(e);if(i===null)return null;const n=this._getLineNumberFor(i);if(n===-1||n<1||n>this._context.model.getLineCount())return null;if(this._context.model.getLineMaxColumn(n)===1)return new $(n,1);const s=this._visibleLines.getStartLineNumber(),o=this._visibleLines.getEndLineNumber();if(n<s||n>o)return null;let a=this._visibleLines.getVisibleLine(n).getColumnOfNodeOffset(n,e,t);const l=this._context.model.getLineMinColumn(n);return a<l&&(a=l),new $(n,a)}_getViewLineDomNode(e){for(;e&&e.nodeType===1;){if(e.className===Yo.CLASS_NAME)return e;e=e.parentElement}return null}_getLineNumberFor(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();for(let n=t;n<=i;n++){const s=this._visibleLines.getVisibleLine(n);if(e===s.getDomNode())return n}return-1}getLineWidth(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();return e<t||e>i?-1:this._visibleLines.getVisibleLine(e).getWidth()}linesVisibleRangesForRange(e,t){if(this.shouldRender())return null;const i=e.endLineNumber,n=k.intersectRanges(e,this._lastRenderedData.getCurrentVisibleRange());if(!n)return null;let s=[],o=0;const a=new gO(this.domNode.domNode,this._textRangeRestingSpot);let l=0;t&&(l=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new $(n.startLineNumber,1)).lineNumber);const c=this._visibleLines.getStartLineNumber(),h=this._visibleLines.getEndLineNumber();for(let u=n.startLineNumber;u<=n.endLineNumber;u++){if(u<c||u>h)continue;const d=u===n.startLineNumber?n.startColumn:1,f=u===n.endLineNumber?n.endColumn:this._context.model.getLineMaxColumn(u),g=this._visibleLines.getVisibleLine(u).getVisibleRangesForRange(u,d,f,a);if(!!g){if(t&&u<i){const p=l;l=this._context.model.coordinatesConverter.convertViewPositionToModelPosition(new $(u+1,1)).lineNumber,p!==l&&(g.ranges[g.ranges.length-1].width+=this._typicalHalfwidthCharacterWidth)}s[o++]=new BZ(g.outsideRenderedLine,u,RC.from(g.ranges))}}return o===0?null:s}_visibleRangesForLineRange(e,t,i){return this.shouldRender()||e<this._visibleLines.getStartLineNumber()||e>this._visibleLines.getEndLineNumber()?null:this._visibleLines.getVisibleLine(e).getVisibleRangesForRange(e,t,i,new gO(this.domNode.domNode,this._textRangeRestingSpot))}visibleRangeForPosition(e){const t=this._visibleRangesForLineRange(e.lineNumber,e.column,e.column);return t?new WZ(t.outsideRenderedLine,t.ranges[0].left):null}updateLineWidths(){this._updateLineWidths(!1)}_updateLineWidthsFast(){return this._updateLineWidths(!0)}_updateLineWidthsSlow(){this._updateLineWidths(!1)}_updateLineWidths(e){const t=this._visibleLines.getStartLineNumber(),i=this._visibleLines.getEndLineNumber();let n=1,s=!0;for(let o=t;o<=i;o++){const a=this._visibleLines.getVisibleLine(o);if(e&&!a.getWidthIsFast()){s=!1;continue}n=Math.max(n,a.getWidth())}return s&&t===1&&i===this._context.model.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 o=this._visibleLines.getVisibleLine(s);if(o.needsMonospaceFontCheck()){const a=o.getWidth();a>t&&(t=a,e=s)}}if(e!==-1&&!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 i=this._horizontalRevealRequest;if(e.startLineNumber<=i.minLineNumber&&i.maxLineNumber<=e.endLineNumber){this._horizontalRevealRequest=null,this.onDidRender();const n=this._computeScrollLeftToReveal(i);n&&(this._isViewportWrapping||this._ensureMaxLineWidth(n.maxHorizontalOffset),this._context.model.setScrollPosition({scrollLeft:n.scrollLeft},i.scrollType))}}if(this._updateLineWidthsFast()||this._asyncUpdateLineWidths.schedule(),Zn&&!this._asyncCheckMonospaceFontAssumptions.isScheduled()){const i=this._visibleLines.getStartLineNumber(),n=this._visibleLines.getEndLineNumber();for(let s=i;s<=n;s++)if(this._visibleLines.getVisibleLine(s).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._maxLineWidth<t&&(this._maxLineWidth=t,this._context.model.setMaxLineWidth(this._maxLineWidth))}_computeScrollTopToRevealRange(e,t,i,n,s){const o=e.top,a=e.height,l=o+a;let c,h,u;if(n&&n.length>0){let g=n[0].startLineNumber,p=n[0].endLineNumber;for(let _=1,v=n.length;_<v;_++){const b=n[_];g=Math.min(g,b.startLineNumber),p=Math.max(p,b.endLineNumber)}c=!1,h=this._context.viewLayout.getVerticalOffsetForLineNumber(g),u=this._context.viewLayout.getVerticalOffsetForLineNumber(p)+this._lineHeight}else if(i)c=!0,h=this._context.viewLayout.getVerticalOffsetForLineNumber(i.startLineNumber),u=this._context.viewLayout.getVerticalOffsetForLineNumber(i.endLineNumber)+this._lineHeight;else return-1;if(!(t==="mouse"&&this._cursorSurroundingLinesStyle==="default")){const g=Math.min(a/this._lineHeight/2,this._cursorSurroundingLines);h-=g*this._lineHeight,u+=Math.max(0,g-1)*this._lineHeight}(s===0||s===4)&&(u+=this._lineHeight);let f;if(u-h>a){if(!c)return-1;f=h}else if(s===5||s===6)if(s===6&&o<=h&&u<=l)f=o;else{const g=Math.max(5*this._lineHeight,a*.2),p=h-g,_=u-a;f=Math.max(_,p)}else if(s===1||s===2)if(s===2&&o<=h&&u<=l)f=o;else{const g=(h+u)/2;f=Math.max(0,g-a/2)}else f=this._computeMinimumScrolling(o,l,h,u,s===3,s===4);return f}_computeScrollLeftToReveal(e){const t=this._context.viewLayout.getCurrentViewport(),i=t.left,n=i+t.width;let s=1073741824,o=0;if(e.type==="range"){const l=this._visibleRangesForLineRange(e.lineNumber,e.startColumn,e.endColumn);if(!l)return null;for(const c of l.ranges)s=Math.min(s,Math.round(c.left)),o=Math.max(o,Math.round(c.left+c.width))}else for(const l of e.selections){if(l.startLineNumber!==l.endLineNumber)return null;const c=this._visibleRangesForLineRange(l.startLineNumber,l.startColumn,l.endColumn);if(!c)return null;for(const h of c.ranges)s=Math.min(s,Math.round(h.left)),o=Math.max(o,Math.round(h.left+h.width))}return s=Math.max(0,s-Sw.HORIZONTAL_EXTRA_PX),o+=this._revealHorizontalRightPadding,e.type==="selections"&&o-s>t.width?null:{scrollLeft:this._computeMinimumScrolling(i,n,s,o),maxHorizontalOffset:o}}_computeMinimumScrolling(e,t,i,n,s,o){e=e|0,t=t|0,i=i|0,n=n|0,s=!!s,o=!!o;const a=t-e;if(n-i<a){if(s)return i;if(o)return Math.max(0,n-a);if(i<e)return i;if(n>t)return Math.max(0,n-a)}else return i;return e}}Sw.HORIZONTAL_EXTRA_PX=30;class tee extends BD{constructor(e){super();this._context=e;const i=this._context.configuration.options.get(129);this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.decorationsWidth,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._decorationsLeft=i.decorationsLeft,this._decorationsWidth=i.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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.linesDecorationsClassName;l&&(i[n++]=new yw(a.range.startLineNumber,a.range.endLineNumber,l));const c=a.options.firstLineDecorationClassName;c&&(i[n++]=new yw(a.range.startLineNumber,a.range.startLineNumber,c))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=this._decorationsLeft.toString(),o=this._decorationsWidth.toString(),a='" style="left:'+s+"px;width:"+o+'px;"></div>',l=[];for(let c=t;c<=i;c++){const h=c-t,u=n[h];let d="";for(let f=0,g=u.length;f<g;f++)d+='<div class="cldr '+u[f]+a;l[h]=d}this._renderResult=l}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class iee extends BD{constructor(e){super();this._context=e,this._renderResult=null,this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),this._renderResult=null,super.dispose()}onConfigurationChanged(e){return!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();let i=[],n=0;for(let s=0,o=t.length;s<o;s++){const a=t[s],l=a.options.marginClassName;l&&(i[n++]=new yw(a.range.startLineNumber,a.range.endLineNumber,l))}return i}prepareRender(e){const t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber,n=this._render(t,i,this._getDecorations(e)),s=[];for(let o=t;o<=i;o++){const a=o-t,l=n[a];let c="";for(let h=0,u=l.length;h<u;h++)c+='<div class="cmdr '+l[h]+'" style=""></div>';s[a]=c}this._renderResult=s}render(e,t){return this._renderResult?this._renderResult[t-e]:""}}class cs{constructor(e,t,i,n){this._rgba8Brand=void 0,this.r=cs._clamp(e),this.g=cs._clamp(t),this.b=cs._clamp(i),this.a=cs._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:e|0}}cs.Empty=new cs(0,0,0,0);class pm extends Y{constructor(){super();this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._updateColorMap(),this._register(ti.onDidChange(e=>{e.changedColorMap&&this._updateColorMap()}))}static getInstance(){return this._INSTANCE||(this._INSTANCE=PU(new pm)),this._INSTANCE}_updateColorMap(){const e=ti.getColorMap();if(!e){this._colors=[cs.Empty],this._backgroundIsLight=!0;return}this._colors=[cs.Empty];for(let i=1;i<e.length;i++){const n=e[i].rgba;this._colors[i]=new cs(n.r,n.g,n.b,Math.round(n.a*255))}let t=e[2].getRelativeLuminance();this._backgroundIsLight=t>=.5,this._onDidChange.fire(void 0)}getColor(e){return(e<1||e>=this._colors.length)&&(e=2),this._colors[e]}backgroundIsLight(){return this._backgroundIsLight}}pm._INSTANCE=null;const nee=(()=>{const r=[];for(let e=32;e<=126;e++)r.push(e);return r.push(65533),r})(),ree=(r,e)=>(r-=32,r<0||r>96?e<=2?(r+96)%96:96-1:r);class mm{constructor(e,t){this.scale=t,this._minimapCharRendererBrand=void 0,this.charDataNormal=mm.soften(e,12/15),this.charDataLight=mm.soften(e,50/60)}static soften(e,t){let i=new Uint8ClampedArray(e.length);for(let n=0,s=e.length;n<s;n++)i[n]=jv(e[n]*t);return i}renderChar(e,t,i,n,s,o,a,l,c,h,u){const d=1*this.scale,f=2*this.scale,g=u?1:f;if(t+d>e.width||i+g>e.height){console.warn("bad render request outside image data");return}const p=h?this.charDataLight:this.charDataNormal,_=ree(n,c),v=e.width*4,b=a.r,C=a.g,y=a.b,x=s.r-b,S=s.g-C,w=s.b-y,L=Math.max(o,l),N=e.data;let P=_*d*f,B=i*v+t*4;for(let U=0;U<g;U++){let j=B;for(let re=0;re<d;re++){const te=p[P++]/255*(o/255);N[j++]=b+x*te,N[j++]=C+S*te,N[j++]=y+w*te,N[j++]=L}B+=v}}blockRenderChar(e,t,i,n,s,o,a,l){const c=1*this.scale,h=2*this.scale,u=l?1:h;if(t+c>e.width||i+u>e.height){console.warn("bad render request outside image data");return}const d=e.width*4,f=.5*(s/255),g=o.r,p=o.g,_=o.b,v=n.r-g,b=n.g-p,C=n.b-_,y=g+v*f,x=p+b*f,S=_+C*f,w=Math.max(s,a),L=e.data;let N=i*d+t*4;for(let P=0;P<u;P++){let B=N;for(let U=0;U<c;U++)L[B++]=y,L[B++]=x,L[B++]=S,L[B++]=w;N+=d}}}const XF={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,A:10,B:11,C:12,D:13,E:14,F:15},QF=r=>{const e=new Uint8ClampedArray(r.length/2);for(let t=0;t<r.length;t+=2)e[t>>1]=XF[r[t]]<<4|XF[r[t+1]]&15;return e},JF={1:Na(()=>QF("0000511D6300CF609C709645A78432005642574171487021003C451900274D35D762755E8B629C5BA856AF57BA649530C167D1512A272A3F6038604460398526BCA2A968DB6F8957C768BE5FBE2FB467CF5D8D5B795DC7625B5DFF50DE64C466DB2FC47CD860A65E9A2EB96CB54CE06DA763AB2EA26860524D3763536601005116008177A8705E53AB738E6A982F88BAA35B5F5B626D9C636B449B737E5B7B678598869A662F6B5B8542706C704C80736A607578685B70594A49715A4522E792")),2:Na(()=>QF("000000000000000055394F383D2800008B8B1F210002000081B1CBCBCC820000847AAF6B9AAF2119BE08B8881AD60000A44FD07DCCF107015338130C00000000385972265F390B406E2437634B4B48031B12B8A0847000001E15B29A402F0000000000004B33460B00007A752C2A0000000000004D3900000084394B82013400ABA5CFC7AD9C0302A45A3E5A98AB000089A43382D97900008BA54AA087A70A0248A6A7AE6DBE0000BF6F94987EA40A01A06DCFA7A7A9030496C32F77891D0000A99FB1A0AFA80603B29AB9CA75930D010C0948354D3900000C0948354F37460D0028BE673D8400000000AF9D7B6E00002B007AA8933400007AA642675C2700007984CFB9C3985B768772A8A6B7B20000CAAECAAFC4B700009F94A6009F840009D09F9BA4CA9C0000CC8FC76DC87F0000C991C472A2000000A894A48CA7B501079BA2C9C69BA20000B19A5D3FA89000005CA6009DA2960901B0A7F0669FB200009D009E00B7890000DAD0F5D092820000D294D4C48BD10000B5A7A4A3B1A50402CAB6CBA6A2000000B5A7A4A3B1A8044FCDADD19D9CB00000B7778F7B8AAE0803C9AB5D3F5D3F00009EA09EA0BAB006039EA0989A8C7900009B9EF4D6B7C00000A9A7816CACA80000ABAC84705D3F000096DA635CDC8C00006F486F266F263D4784006124097B00374F6D2D6D2D6D4A3A95872322000000030000000000008D8939130000000000002E22A5C9CBC70600AB25C0B5C9B400061A2DB04CA67001082AA6BEBEBFC606002321DACBC19E03087AA08B6768380000282FBAC0B8CA7A88AD25BBA5A29900004C396C5894A6000040485A6E356E9442A32CD17EADA70000B4237923628600003E2DE9C1D7B500002F25BBA5A2990000231DB6AFB4A804023025C0B5CAB588062B2CBDBEC0C706882435A75CA20000002326BD6A82A908048B4B9A5A668000002423A09CB4BB060025259C9D8A7900001C1FCAB2C7C700002A2A9387ABA200002626A4A47D6E9D14333163A0C87500004B6F9C2D643A257049364936493647358A34438355497F1A0000A24C1D590000D38DFFBDD4CD3126"))};class _m{static create(e,t){if(this.lastCreated&&e===this.lastCreated.scale&&t===this.lastFontFamily)return this.lastCreated;let i;return JF[e]?i=new mm(JF[e](),e):i=_m.createFromSampleData(_m.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=`${16}px`,t.height=16,t.width=96*10,t.style.width=96*10+"px",i.fillStyle="#ffffff",i.font=`bold ${16}px ${e}`,i.textBaseline="middle";let n=0;for(const s of nee)i.fillText(String.fromCharCode(s),n,16/2),n+=10;return i.getImageData(0,0,96*10,16)}static createFromSampleData(e,t){const i=16*10*4*96;if(e.length!==i)throw new Error("Unexpected source in MinimapCharRenderer");let n=_m._downsample(e,t);return new mm(n,t)}static _downsampleChar(e,t,i,n,s){const o=1*s,a=2*s;let l=n,c=0;for(let h=0;h<a;h++){const u=h/a*16,d=(h+1)/a*16;for(let f=0;f<o;f++){const g=f/o*10,p=(f+1)/o*10;let _=0,v=0;for(let C=u;C<d;C++){const y=t+Math.floor(C)*3840,x=1-(C-Math.floor(C));for(let S=g;S<p;S++){const w=1-(S-Math.floor(S)),L=y+Math.floor(S)*4,N=w*x;v+=N,_+=e[L]*e[L+3]/255*N}}const b=_/v;c=Math.max(c,b),i[l++]=jv(b)}}return c}static _downsample(e,t){const i=2*t*1*t,n=i*96,s=new Uint8ClampedArray(n);let o=0,a=0,l=0;for(let c=0;c<96;c++)l=Math.max(l,this._downsampleChar(e,a,s,o,t)),o+=i,a+=10*4;if(l>0){const c=255/l;for(let h=0;h<n;h++)s[h]*=c}return s}}const see=140,oee=2;class bm{constructor(e,t,i){const n=e.options,s=n.get(127),o=n.get(129),a=o.minimap,l=n.get(43),c=n.get(64);this.renderMinimap=a.renderMinimap,this.size=c.size,this.minimapHeightIsEditorHeight=a.minimapHeightIsEditorHeight,this.scrollBeyondLastLine=n.get(93),this.showSlider=c.showSlider,this.pixelRatio=s,this.typicalHalfwidthCharacterWidth=l.typicalHalfwidthCharacterWidth,this.lineHeight=n.get(58),this.minimapLeft=a.minimapLeft,this.minimapWidth=a.minimapWidth,this.minimapHeight=o.height,this.canvasInnerWidth=a.minimapCanvasInnerWidth,this.canvasInnerHeight=a.minimapCanvasInnerHeight,this.canvasOuterWidth=a.minimapCanvasOuterWidth,this.canvasOuterHeight=a.minimapCanvasOuterHeight,this.isSampling=a.minimapIsSampling,this.editorHeight=o.height,this.fontScale=a.minimapScale,this.minimapLineHeight=a.minimapLineHeight,this.minimapCharWidth=1*this.fontScale,this.charRenderer=Na(()=>_m.create(this.fontScale,l.fontFamily)),this.defaultBackgroundColor=i.getColor(2),this.backgroundColor=bm._getMinimapBackground(t,this.defaultBackgroundColor),this.foregroundAlpha=bm._getMinimapForegroundOpacity(t)}static _getMinimapBackground(e,t){const i=e.getColor(jX);return i?new cs(i.rgba.r,i.rgba.g,i.rgba.b,Math.round(255*i.rgba.a)):t}static _getMinimapForegroundOpacity(e){const t=e.getColor(KX);return t?cs._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.showSlider===e.showSlider&&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 vm{constructor(e,t,i,n,s,o,a,l){this.scrollTop=e,this.scrollHeight=t,this.sliderNeeded=i,this._computedSliderRatio=n,this.sliderTop=s,this.sliderHeight=o,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)}static create(e,t,i,n,s,o,a,l,c,h,u){const d=e.pixelRatio,f=e.minimapLineHeight,g=Math.floor(e.canvasInnerHeight/f),p=e.lineHeight;if(e.minimapHeightIsEditorHeight){const x=l*e.lineHeight+(e.scrollBeyondLastLine?s-e.lineHeight:0),S=Math.max(1,Math.floor(s*s/x)),w=Math.max(0,e.minimapHeight-S),L=w/(h-s),N=c*L,P=w>0,B=Math.floor(e.canvasInnerHeight/e.minimapLineHeight);return new vm(c,h,P,L,N,S,1,Math.min(a,B))}let _;if(o&&i!==a){const x=i-t+1;_=Math.floor(x*f/d)}else{const x=s/p;_=Math.floor(x*f/d)}let v;e.scrollBeyondLastLine?v=(a-1)*f/d:v=Math.max(0,a*f/d-_),v=Math.min(e.minimapHeight-_,v);const b=v/(h-s),C=c*b;let y=0;if(e.scrollBeyondLastLine&&(y=s/p-1),g>=a+y){const x=1,S=a,w=v>0;return new vm(c,h,w,b,C,_,x,S)}else{let x=Math.max(1,Math.floor(t-C*d/f));u&&u.scrollHeight===h&&(u.scrollTop>c&&(x=Math.min(x,u.startLineNumber)),u.scrollTop<c&&(x=Math.max(x,u.startLineNumber)));const S=Math.min(a,x+g-1),w=(c-n)/p,L=(t-x+w)*f/d;return new vm(c,h,!0,b,L,_,x,S)}}}class Lw{constructor(e){this.dy=e}onContentChanged(){this.dy=-1}onTokensChanged(){this.dy=-1}}Lw.INVALID=new Lw(-1);class e4{constructor(e,t,i){this.renderedLayout=e,this._imageData=t,this._renderedLines=new $F(()=>Lw.INVALID),this._renderedLines._set(e.startLineNumber,i)}linesEquals(e){if(!this.scrollEquals(e))return!1;const i=this._renderedLines._get().lines;for(let n=0,s=i.length;n<s;n++)if(i[n].dy===-1)return!1;return!0}scrollEquals(e){return this.renderedLayout.startLineNumber===e.startLineNumber&&this.renderedLayout.endLineNumber===e.endLineNumber}_get(){const e=this._renderedLines._get();return{imageData:this._imageData,rendLineNumberStart:e.rendLineNumberStart,lines:e.lines}}onLinesChanged(e,t){return this._renderedLines.onLinesChanged(e,t)}onLinesDeleted(e,t){this._renderedLines.onLinesDeleted(e,t)}onLinesInserted(e,t){this._renderedLines.onLinesInserted(e,t)}onTokensChanged(e){return this._renderedLines.onTokensChanged(e)}}class WD{constructor(e,t,i,n){this._backgroundFillData=WD._createBackgroundFillData(t,i,n),this._buffers=[e.createImageData(t,i),e.createImageData(t,i)],this._lastUsedBuffer=0}getBuffer(){this._lastUsedBuffer=1-this._lastUsedBuffer;const e=this._buffers[this._lastUsedBuffer];return e.data.set(this._backgroundFillData),e}static _createBackgroundFillData(e,t,i){const n=i.r,s=i.g,o=i.b,a=i.a,l=new Uint8ClampedArray(e*t*4);let c=0;for(let h=0;h<t;h++)for(let u=0;u<e;u++)l[c]=n,l[c+1]=s,l[c+2]=o,l[c+3]=a,c+=4;return l}}class Cm{constructor(e,t){this.samplingRatio=e,this.minimapLines=t}static compute(e,t,i){if(e.renderMinimap===0||!e.isSampling)return[null,[]];const n=e.pixelRatio,s=e.lineHeight,o=e.scrollBeyondLastLine,{minimapLineCount:a}=xd.computeContainedMinimapLineCount({viewLineCount:t,scrollBeyondLastLine:o,height:e.editorHeight,lineHeight:s,pixelRatio:n}),l=t/a,c=l/2;if(!i||i.minimapLines.length===0){let C=[];if(C[0]=1,a>1){for(let y=0,x=a-1;y<x;y++)C[y]=Math.round(y*l+c);C[a-1]=t}return[new Cm(l,C),[]]}const h=i.minimapLines,u=h.length;let d=[],f=0,g=0,p=1;const _=10;let v=[],b=null;for(let C=0;C<a;C++){const y=Math.max(p,Math.round(C*l)),x=Math.max(y,Math.round((C+1)*l));for(;f<u&&h[f]<y;){if(v.length<_){const w=f+1+g;b&&b.type==="deleted"&&b._oldIndex===f-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:f,deleteFromLineNumber:w,deleteToLineNumber:w},v.push(b)),g--}f++}let S;if(f<u&&h[f]<=x)S=h[f],f++;else if(C===0?S=1:C+1===a?S=t:S=Math.round(C*l+c),v.length<_){const w=f+1+g;b&&b.type==="inserted"&&b._i===C-1?b.insertToLineNumber++:(b={type:"inserted",_i:C,insertFromLineNumber:w,insertToLineNumber:w},v.push(b)),g++}d[C]=S,p=S}if(v.length<_)for(;f<u;){const C=f+1+g;b&&b.type==="deleted"&&b._oldIndex===f-1?b.deleteToLineNumber++:(b={type:"deleted",_oldIndex:f,deleteFromLineNumber:C,deleteToLineNumber:C},v.push(b)),g--,f++}else v=[{type:"flush"}];return[new Cm(l,d),v]}modelLineToMinimapLine(e){return Math.min(this.minimapLines.length,Math.max(1,Math.round(e/this.samplingRatio)))}modelLineRangeToMinimapLineRange(e,t){let i=this.modelLineToMinimapLine(e)-1;for(;i>0&&this.minimapLines[i-1]>=e;)i--;let n=this.modelLineToMinimapLine(t)-1;for(;n+1<this.minimapLines.length&&this.minimapLines[n+1]<=t;)n++;if(i===n){const s=this.minimapLines[i];if(s<e||s>t)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]<e.fromLineNumber);s--)this.minimapLines[s]<=e.toLineNumber?(this.minimapLines[s]=Math.max(1,e.fromLineNumber-1),i=Math.min(i,s),n=Math.max(n,s)):this.minimapLines[s]-=t;return[i,n]}onLinesInserted(e){const t=e.toLineNumber-e.fromLineNumber+1;for(let i=this.minimapLines.length-1;i>=0&&!(this.minimapLines[i]<e.fromLineNumber);i--)this.minimapLines[i]+=t}}class aee extends ss{constructor(e){super(e);this.tokensColorTracker=pm.getInstance(),this._selections=[],this._minimapSelections=null,this.options=new bm(this._context.configuration,this._context.theme,this.tokensColorTracker);const[t]=Cm.compute(this.options,this._context.model.getLineCount(),null);this._samplingState=t,this._shouldCheckSampling=!1,this._actual=new xw(e.theme,this)}dispose(){this._actual.dispose(),super.dispose()}getDomNode(){return this._actual.getDomNode()}_onOptionsMaybeChanged(){const e=new bm(this._context.configuration,this._context.theme,this.tokensColorTracker);return this.options.equals(e)?!1:(this.options=e,this._recreateLineSampling(),this._actual.onDidChangeOptions(),!0)}onConfigurationChanged(e){return this._onOptionsMaybeChanged()}onCursorStateChanged(e){return this._selections=e.selections,this._minimapSelections=null,this._actual.onSelectionChanged()}onDecorationsChanged(e){return e.affectsMinimap?this._actual.onDecorationsChanged():!1}onFlushed(e){return this._samplingState&&(this._shouldCheckSampling=!0),this._actual.onFlushed()}onLinesChanged(e){if(this._samplingState){const t=this._samplingState.modelLineRangeToMinimapLineRange(e.fromLineNumber,e.toLineNumber);return t?this._actual.onLinesChanged(t[0],t[1]):!1}else return this._actual.onLinesChanged(e.fromLineNumber,e.toLineNumber)}onLinesDeleted(e){if(this._samplingState){const[t,i]=this._samplingState.onLinesDeleted(e);return t<=i&&this._actual.onLinesChanged(t+1,i+1),this._shouldCheckSampling=!0,!0}else return this._actual.onLinesDeleted(e.fromLineNumber,e.toLineNumber)}onLinesInserted(e){return this._samplingState?(this._samplingState.onLinesInserted(e),this._shouldCheckSampling=!0,!0):this._actual.onLinesInserted(e.fromLineNumber,e.toLineNumber)}onScrollChanged(e){return this._actual.onScrollChanged()}onThemeChanged(e){return this._context.model.invalidateMinimapColorCache(),this._actual.onThemeChanged(),this._onOptionsMaybeChanged(),!0}onTokensChanged(e){if(this._samplingState){let t=[];for(const i of e.ranges){const n=this._samplingState.modelLineRangeToMinimapLineRange(i.fromLineNumber,i.toLineNumber);n&&t.push({fromLineNumber:n[0],toLineNumber:n[1]})}return t.length?this._actual.onTokensChanged(t):!1}else return this._actual.onTokensChanged(e.ranges)}onTokensColorsChanged(e){return this._onOptionsMaybeChanged(),this._actual.onTokensColorsChanged()}onZonesChanged(e){return this._actual.onZonesChanged()}prepareRender(e){this._shouldCheckSampling&&(this._shouldCheckSampling=!1,this._recreateLineSampling())}render(e){let t=e.visibleRange.startLineNumber,i=e.visibleRange.endLineNumber;this._samplingState&&(t=this._samplingState.modelLineToMinimapLine(t),i=this._samplingState.modelLineToMinimapLine(i));const n={viewportContainsWhitespaceGaps:e.viewportData.whitespaceViewportData.length>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]=Cm.compute(this.options,this._context.model.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();break}}getLineCount(){return this._samplingState?this._samplingState.minimapLines.length:this._context.model.getLineCount()}getRealLineCount(){return this._context.model.getLineCount()}getLineContent(e){return this._samplingState?this._context.model.getLineContent(this._samplingState.minimapLines[e-1]):this._context.model.getLineContent(e)}getLineMaxColumn(e){return this._samplingState?this._context.model.getLineMaxColumn(this._samplingState.minimapLines[e-1]):this._context.model.getLineMaxColumn(e)}getMinimapLinesRenderingData(e,t,i){if(this._samplingState){let n=[];for(let s=0,o=t-e+1;s<o;s++)i[s]?n[s]=this._context.model.getViewLineData(this._samplingState.minimapLines[e+s-1]):n[s]=null;return n}return this._context.model.getMinimapLinesRenderingData(e,t,i).data}getSelections(){if(this._minimapSelections===null)if(this._samplingState){this._minimapSelections=[];for(const e of this._selections){const[t,i]=this._samplingState.decorationLineRangeToMinimapLineRange(e.startLineNumber,e.endLineNumber);this._minimapSelections.push(new be(t,e.startColumn,i,e.endColumn))}}else this._minimapSelections=this._selections;return this._minimapSelections}getMinimapDecorationsInViewport(e,t){let i;if(this._samplingState){const s=this._samplingState.minimapLines[e-1],o=this._samplingState.minimapLines[t-1];i=new k(s,1,o,this._context.model.getLineMaxColumn(o))}else i=new k(e,1,t,this._context.model.getLineMaxColumn(t));const n=this._context.model.getDecorationsInViewport(i);if(this._samplingState){let s=[];for(const o of n){if(!o.options.minimap)continue;const a=o.range,l=this._samplingState.modelLineToMinimapLine(a.startLineNumber),c=this._samplingState.modelLineToMinimapLine(a.endLineNumber);s.push(new vP(new k(l,a.startColumn,c,a.endColumn),o.options))}return s}return n}getOptions(){return this._context.model.getTextModelOptions()}revealLineNumber(e){this._samplingState&&(e=this._samplingState.minimapLines[e-1]),this._context.model.revealRange("mouse",!1,new k(e,1,e,1),1,0)}setScrollTop(e){this._context.model.setScrollPosition({scrollTop:e},1)}}class xw extends Y{constructor(e,t){super();this._renderDecorations=!1,this._gestureInProgress=!1,this._theme=e,this._model=t,this._lastRenderData=null,this._buffers=null,this._selectionColor=this._theme.getColor(QO),this._domNode=dt(document.createElement("div")),Zo.write(this._domNode,8),this._domNode.setClassName(this._getMinimapDomNodeClassName()),this._domNode.setPosition("absolute"),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true"),this._shadow=dt(document.createElement("div")),this._shadow.setClassName("minimap-shadow-hidden"),this._domNode.appendChild(this._shadow),this._canvas=dt(document.createElement("canvas")),this._canvas.setPosition("absolute"),this._canvas.setLeft(0),this._domNode.appendChild(this._canvas),this._decorationsCanvas=dt(document.createElement("canvas")),this._decorationsCanvas.setPosition("absolute"),this._decorationsCanvas.setClassName("minimap-decorations-layer"),this._decorationsCanvas.setLeft(0),this._domNode.appendChild(this._decorationsCanvas),this._slider=dt(document.createElement("div")),this._slider.setPosition("absolute"),this._slider.setClassName("minimap-slider"),this._slider.setLayerHinting(!0),this._slider.setContain("strict"),this._domNode.appendChild(this._slider),this._sliderHorizontal=dt(document.createElement("div")),this._sliderHorizontal.setPosition("absolute"),this._sliderHorizontal.setClassName("minimap-slider-horizontal"),this._slider.appendChild(this._sliderHorizontal),this._applyLayout(),this._mouseDownListener=ki(this._domNode.domNode,"mousedown",i=>{if(i.preventDefault(),this._model.options.renderMinimap===0||!this._lastRenderData)return;if(this._model.options.size!=="proportional"){if(i.leftButton&&this._lastRenderData){const c=Qi(this._slider.domNode),h=c.top+c.height/2;this._startSliderDragging(i.buttons,i.posx,h,i.posy,this._lastRenderData.renderedLayout)}return}const s=this._model.options.minimapLineHeight,o=this._model.options.canvasInnerHeight/this._model.options.canvasOuterHeight*i.browserEvent.offsetY;let l=Math.floor(o/s)+this._lastRenderData.renderedLayout.startLineNumber;l=Math.min(l,this._model.getLineCount()),this._model.revealLineNumber(l)}),this._sliderMouseMoveMonitor=new Rh,this._sliderMouseDownListener=ki(this._slider.domNode,"mousedown",i=>{i.preventDefault(),i.stopPropagation(),i.leftButton&&this._lastRenderData&&this._startSliderDragging(i.buttons,i.posx,i.posy,i.posy,this._lastRenderData.renderedLayout)}),this._gestureDisposable=Et.addTarget(this._domNode.domNode),this._sliderTouchStartListener=J(this._domNode.domNode,Vt.Start,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&(this._slider.toggleClassName("active",!0),this._gestureInProgress=!0,this.scrollDueToTouchEvent(i))},{passive:!1}),this._sliderTouchMoveListener=J(this._domNode.domNode,Vt.Change,i=>{i.preventDefault(),i.stopPropagation(),this._lastRenderData&&this._gestureInProgress&&this.scrollDueToTouchEvent(i)},{passive:!1}),this._sliderTouchEndListener=ki(this._domNode.domNode,Vt.End,i=>{i.preventDefault(),i.stopPropagation(),this._gestureInProgress=!1,this._slider.toggleClassName("active",!1)})}_startSliderDragging(e,t,i,n,s){this._slider.toggleClassName("active",!0);const o=(a,l)=>{const c=Math.abs(l-t);if(Xi&&c>see){this._model.setScrollTop(s.scrollTop);return}const h=a-i;this._model.setScrollTop(s.getDesiredScrollTopFromDelta(h))};n!==i&&o(n,t),this._sliderMouseMoveMonitor.startMonitoring(this._slider.domNode,e,lf,a=>o(a.posy,a.posx),()=>{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._mouseDownListener.dispose(),this._sliderMouseMoveMonitor.dispose(),this._sliderMouseDownListener.dispose(),this._gestureDisposable.dispose(),this._sliderTouchStartListener.dispose(),this._sliderTouchMoveListener.dispose(),this._sliderTouchEndListener.dispose(),super.dispose()}_getMinimapDomNodeClassName(){return this._model.options.showSlider==="always"?"minimap slider-always":"minimap slider-mouseover"}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 WD(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):!1}onLinesDeleted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesDeleted(e,t),!0}onLinesInserted(e,t){return this._lastRenderData&&this._lastRenderData.onLinesInserted(e,t),!0}onScrollChanged(){return this._renderDecorations=!0,!0}onThemeChanged(){return this._selectionColor=this._theme.getColor(QO),this._renderDecorations=!0,!0}onTokensChanged(e){return this._lastRenderData?this._lastRenderData.onTokensChanged(e):!1}onTokensColorsChanged(){return this._lastRenderData=null,this._buffers=null,!0}onZonesChanged(){return this._lastRenderData=null,!0}render(e){if(this._model.options.renderMinimap===0){this._shadow.setClassName("minimap-shadow-hidden"),this._sliderHorizontal.setWidth(0),this._sliderHorizontal.setHeight(0);return}e.scrollLeft+e.viewportWidth>=e.scrollWidth?this._shadow.setClassName("minimap-shadow-hidden"):this._shadow.setClassName("minimap-shadow-visible");const i=vm.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(i.sliderNeeded?"block":"none"),this._slider.setTop(i.sliderTop),this._slider.setHeight(i.sliderHeight);const n=e.scrollLeft/this._model.options.typicalHalfwidthCharacterWidth,s=Math.min(this._model.options.minimapWidth,Math.round(n*this._model.options.minimapCharWidth/this._model.options.pixelRatio));this._sliderHorizontal.setLeft(s),this._sliderHorizontal.setWidth(this._model.options.minimapWidth-s),this._sliderHorizontal.setTop(0),this._sliderHorizontal.setHeight(i.sliderHeight),this.renderDecorations(i),this._lastRenderData=this.renderLines(i)}renderDecorations(e){if(this._renderDecorations){this._renderDecorations=!1;const t=this._model.getSelections();t.sort(k.compareRangesUsingStarts);const i=this._model.getMinimapDecorationsInViewport(e.startLineNumber,e.endLineNumber);i.sort((d,f)=>(d.options.zIndex||0)-(f.options.zIndex||0));const{canvasInnerWidth:n,canvasInnerHeight:s}=this._model.options,o=this._model.options.minimapLineHeight,a=this._model.options.minimapCharWidth,l=this._model.getOptions().tabSize,c=this._decorationsCanvas.domNode.getContext("2d");c.clearRect(0,0,n,s);const h=new t4(e.startLineNumber,e.endLineNumber,!1);this._renderSelectionLineHighlights(c,t,h,e,o),this._renderDecorationsLineHighlights(c,i,h,e,o);const u=new t4(e.startLineNumber,e.endLineNumber,null);this._renderSelectionsHighlights(c,t,u,e,o,l,a,n),this._renderDecorationsHighlights(c,i,u,e,o,l,a,n)}}_renderSelectionLineHighlights(e,t,i,n,s){if(!this._selectionColor||this._selectionColor.isTransparent())return;e.fillStyle=this._selectionColor.transparent(.5).toString();let o=0,a=0;for(const l of t){const c=Math.max(n.startLineNumber,l.startLineNumber),h=Math.min(n.endLineNumber,l.endLineNumber);if(c>h)continue;for(let f=c;f<=h;f++)i.set(f,!0);const u=(c-n.startLineNumber)*s,d=(h-n.startLineNumber)*s+s;a>=u||(a>o&&e.fillRect(Ol,o,e.canvas.width,a-o),o=u),a=d}a>o&&e.fillRect(Ol,o,e.canvas.width,a-o)}_renderDecorationsLineHighlights(e,t,i,n,s){const o=new Map;for(let a=t.length-1;a>=0;a--){const l=t[a],c=l.options.minimap;if(!c||c.position!==Yr.Inline)continue;const h=Math.max(n.startLineNumber,l.range.startLineNumber),u=Math.min(n.endLineNumber,l.range.endLineNumber);if(h>u)continue;const d=c.getColor(this._theme);if(!d||d.isTransparent())continue;let f=o.get(d.toString());f||(f=d.transparent(.5).toString(),o.set(d.toString(),f)),e.fillStyle=f;for(let g=h;g<=u;g++){if(i.has(g))continue;i.set(g,!0);const p=(h-n.startLineNumber)*s;e.fillRect(Ol,p,e.canvas.width,s)}}}_renderSelectionsHighlights(e,t,i,n,s,o,a,l){if(!(!this._selectionColor||this._selectionColor.isTransparent()))for(const c of t){const h=Math.max(n.startLineNumber,c.startLineNumber),u=Math.min(n.endLineNumber,c.endLineNumber);if(!(h>u))for(let d=h;d<=u;d++)this.renderDecorationOnLine(e,i,c,this._selectionColor,n,d,s,s,o,a,l)}}_renderDecorationsHighlights(e,t,i,n,s,o,a,l){for(const c of t){const h=c.options.minimap;if(!h)continue;const u=Math.max(n.startLineNumber,c.range.startLineNumber),d=Math.min(n.endLineNumber,c.range.endLineNumber);if(u>d)continue;const f=h.getColor(this._theme);if(!(!f||f.isTransparent()))for(let g=u;g<=d;g++)switch(h.position){case Yr.Inline:this.renderDecorationOnLine(e,i,c.range,f,n,g,s,s,o,a,l);continue;case Yr.Gutter:const p=(g-n.startLineNumber)*s,_=2;this.renderDecoration(e,f,_,p,oee,s);continue}}}renderDecorationOnLine(e,t,i,n,s,o,a,l,c,h,u){const d=(o-s.startLineNumber)*l;if(d+a<0||d>this._model.options.canvasInnerHeight)return;const{startLineNumber:f,endLineNumber:g}=i,p=f===o?i.startColumn:1,_=g===o?i.endColumn:this._model.getLineMaxColumn(o),v=this.getXOffsetForPosition(t,o,p,c,h,u),b=this.getXOffsetForPosition(t,o,_,c,h,u);this.renderDecoration(e,n,v,d,b-v,a)}getXOffsetForPosition(e,t,i,n,s,o){if(i===1)return Ol;if((i-1)*s>=o)return o;let l=e.get(t);if(!l){const c=this._model.getLineContent(t);l=[Ol];let h=Ol;for(let u=1;u<c.length+1;u++){const d=c.charCodeAt(u-1),f=d===9?n*s:Ys(d)?2*s:s,g=h+f;if(g>=o){l[u]=o;break}l[u]=g,h=g}e.set(t,l)}return i-1<l.length?l[i-1]:o}renderDecoration(e,t,i,n,s,o){e.fillStyle=t&&t.toString()||"",e.fillRect(i,n,s,o)}renderLines(e){const t=e.startLineNumber,i=e.endLineNumber,n=this._model.options.minimapLineHeight;if(this._lastRenderData&&this._lastRenderData.linesEquals(e)){const te=this._lastRenderData._get();return new e4(e,te.imageData,te.lines)}const s=this._getBuffer();if(!s)return null;let[o,a,l]=xw._renderUntouchedLines(s,t,i,n,this._lastRenderData);const c=this._model.getMinimapLinesRenderingData(t,i,l),h=this._model.getOptions().tabSize,u=this._model.options.defaultBackgroundColor,d=this._model.options.backgroundColor,f=this._model.options.foregroundAlpha,g=this._model.tokensColorTracker,p=g.backgroundIsLight(),_=this._model.options.renderMinimap,v=this._model.options.charRenderer(),b=this._model.options.fontScale,C=this._model.options.minimapCharWidth,x=(_===1?2:2+1)*b,S=n>x?Math.floor((n-x)/2):0,w=d.a/255,L=new cs(Math.round((d.r-u.r)*w+u.r),Math.round((d.g-u.g)*w+u.g),Math.round((d.b-u.b)*w+u.b),255);let N=0;const P=[];for(let te=0,A=i-t+1;te<A;te++)l[te]&&xw._renderLine(s,L,d.a,p,_,C,g,f,v,N,S,h,c[te],b,n),P[te]=new Lw(N),N+=n;const B=o===-1?0:o,j=(a===-1?s.height:a)-B;return this._canvas.domNode.getContext("2d").putImageData(s,0,0,0,B,s.width,j),new e4(e,s,P)}static _renderUntouchedLines(e,t,i,n,s){const o=[];if(!s){for(let L=0,N=i-t+1;L<N;L++)o[L]=!0;return[-1,-1,o]}const a=s._get(),l=a.imageData.data,c=a.rendLineNumberStart,h=a.lines,u=h.length,d=e.width,f=e.data,g=(i-t+1)*n*d*4;let p=-1,_=-1,v=-1,b=-1,C=-1,y=-1,x=0;for(let L=t;L<=i;L++){const N=L-t,P=L-c,B=P>=0&&P<u?h[P].dy:-1;if(B===-1){o[N]=!0,x+=n;continue}const U=B*d*4,j=(B+n)*d*4,re=x*d*4,te=(x+n)*d*4;b===U&&y===re?(b=j,y=te):(v!==-1&&(f.set(l.subarray(v,b),C),p===-1&&v===0&&v===C&&(p=b),_===-1&&b===g&&v===C&&(_=v)),v=U,b=j,C=re,y=te),o[N]=!1,x+=n}v!==-1&&(f.set(l.subarray(v,b),C),p===-1&&v===0&&v===C&&(p=b),_===-1&&b===g&&v===C&&(_=v));const S=p===-1?-1:p/(d*4),w=_===-1?-1:_/(d*4);return[S,w,o]}static _renderLine(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p){const _=f.content,v=f.tokens,b=e.width-o,C=p===1;let y=Ol,x=0,S=0;for(let w=0,L=v.getCount();w<L;w++){const N=v.getEndOffset(w),P=v.getForeground(w),B=a.getColor(P);for(;x<N;x++){if(y>b)return;const U=_.charCodeAt(x);if(U===9){const j=d-(x+S)%d;S+=j-1,y+=j*o}else if(U===32)y+=o;else{const j=Ys(U)?2:1;for(let re=0;re<j;re++)if(s===2?c.blockRenderChar(e,y,h+u,B,l,t,i,C):c.renderChar(e,y,h+u,U,B,l,t,i,g,n,C),y+=o,y>b)return}}}}}class t4{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;n<s;n++)this._values[n]=i}has(e){return this.get(e)!==this._defaultValue}set(e,t){e<this._startLineNumber||e>this._endLineNumber||(this._values[e-this._startLineNumber]=t)}get(e){return e<this._startLineNumber||e>this._endLineNumber?this._defaultValue:this._values[e-this._startLineNumber]}}Lt((r,e)=>{const t=r.getColor(qX);t&&e.addRule(`.monaco-editor .minimap-slider .minimap-slider-horizontal { background: ${t}; }`);const i=r.getColor(GX);i&&e.addRule(`.monaco-editor .minimap-slider:hover .minimap-slider-horizontal { background: ${i}; }`);const n=r.getColor(ZX);n&&e.addRule(`.monaco-editor .minimap-slider.active .minimap-slider-horizontal { background: ${n}; }`);const s=r.getColor($C);s&&e.addRule(`.monaco-editor .minimap-shadow-visible { box-shadow: ${s} -6px 0 6px -6px inset; }`)});class lee extends ss{constructor(e){super(e);const i=this._context.configuration.options.get(129);this._widgets={},this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,this._domNode=dt(document.createElement("div")),Zo.write(this._domNode,4),this._domNode.setClassName("overlayWidgets")}dispose(){super.dispose(),this._widgets={}}getDomNode(){return this._domNode}onConfigurationChanged(e){const i=this._context.configuration.options.get(129);return this._verticalScrollbarWidth=i.verticalScrollbarWidth,this._minimapWidth=i.minimap.minimapWidth,this._horizontalScrollbarHeight=i.horizontalScrollbarHeight,this._editorHeight=i.height,this._editorWidth=i.width,!0}addWidget(e){const t=dt(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()}setWidgetPosition(e,t){const i=this._widgets[e.getId()];return i.preference===t?!1:(i.preference=t,this.setShouldRender(),!0)}removeWidget(e){const t=e.getId();if(this._widgets.hasOwnProperty(t)){const n=this._widgets[t].domNode.domNode;delete this._widgets[t],n.parentNode.removeChild(n),this.setShouldRender()}}_renderWidget(e){const t=e.domNode;if(e.preference===null){t.unsetTop();return}if(e.preference===0)t.setTop(0),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth);else if(e.preference===1){const i=t.domNode.clientHeight;t.setTop(this._editorHeight-i-2*this._horizontalScrollbarHeight),t.setRight(2*this._verticalScrollbarWidth+this._minimapWidth)}else e.preference===2&&(t.setTop(0),t.domNode.style.right="50%")}prepareRender(e){}render(e){this._domNode.setWidth(this._editorWidth);const t=Object.keys(this._widgets);for(let i=0,n=t.length;i<n;i++){const s=t[i];this._renderWidget(this._widgets[s])}}}class cee{constructor(e,t){const i=e.options;this.lineHeight=i.get(58),this.pixelRatio=i.get(127),this.overviewRulerLanes=i.get(73),this.renderBorder=i.get(72);const n=t.getColor(uQ);this.borderColor=n?n.toString():null,this.hideCursor=i.get(51);const s=t.getColor(oF);this.cursorColor=s?s.transparent(.7).toString():null,this.themeType=t.type;const o=i.get(64),a=o.enabled,l=o.side,c=a?t.getColor(dQ)||ti.getDefaultBackground():null;c===null||l==="left"?this.backgroundColor=null:this.backgroundColor=K.Format.CSS.formatHex(c);const u=i.get(129).overviewRuler;this.top=u.top,this.right=u.right,this.domWidth=u.width,this.domHeight=u.height,this.overviewRulerLanes===0?(this.canvasWidth=0,this.canvasHeight=0):(this.canvasWidth=this.domWidth*this.pixelRatio|0,this.canvasHeight=this.domHeight*this.pixelRatio|0);const[d,f]=this._initLanes(1,this.canvasWidth,this.overviewRulerLanes);this.x=d,this.w=f}_initLanes(e,t,i){const n=t-e;if(i>=3){const s=Math.floor(n/3),o=Math.floor(n/3),a=n-s-o,l=e,c=l+s,h=l+s+a;return[[0,l,c,l,h,l,c,l],[0,s,a,s+a,o,s+a+o,a+o,s+a+o]]}else if(i===2){const s=Math.floor(n/2),o=n-s,a=e,l=a+s;return[[0,a,a,a,l,a,a,a],[0,s,s,s,o,s+o,s+o,s+o]]}else{const s=e,o=n;return[[0,s,s,s,s,s,s,s],[0,o,o,o,o,o,o,o]]}}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&&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 hee extends ss{constructor(e){super(e);this._domNode=dt(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=ti.onDidChange(t=>{t.changedColorMap&&this._updateSettings(!0)}),this._cursorPositions=[]}dispose(){super.dispose(),this._tokensColorTrackerListener.dispose()}_updateSettings(e){const t=new cee(this._context.configuration,this._context.theme);return this._settings&&this._settings.equals(t)?!1:(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)}onConfigurationChanged(e){return this._updateSettings(!1)}onCursorStateChanged(e){this._cursorPositions=[];for(let t=0,i=e.selections.length;t<i;t++)this._cursorPositions[t]=e.selections[t].getPosition();return this._cursorPositions.sort($.compare),!0}onDecorationsChanged(e){return!!e.affectsOverviewRuler}onFlushed(e){return!0}onScrollChanged(e){return e.scrollHeightChanged}onZonesChanged(e){return!0}onThemeChanged(e){return this._context.model.invalidateOverviewRulerColorCache(),this._updateSettings(!1)}getDomNode(){return this._domNode.domNode}prepareRender(e){}render(e){this._render()}_render(){if(this._settings.overviewRulerLanes===0){this._domNode.setBackgroundColor(this._settings.backgroundColor?this._settings.backgroundColor:"");return}const e=this._settings.canvasWidth,t=this._settings.canvasHeight,i=this._settings.lineHeight,n=this._context.viewLayout,s=this._context.viewLayout.getScrollHeight(),o=t/s,a=this._context.model.getAllOverviewRulerDecorations(this._context.theme),l=6*this._settings.pixelRatio|0,c=l/2|0,h=this._domNode.domNode.getContext("2d");this._settings.backgroundColor===null?h.clearRect(0,0,e,t):(h.fillStyle=this._settings.backgroundColor,h.fillRect(0,0,e,t));const u=this._settings.x,d=this._settings.w,f=Object.keys(a);f.sort();for(let g=0,p=f.length;g<p;g++){const _=f[g],v=a[_];h.fillStyle=_;let b=0,C=0,y=0;for(let x=0,S=v.length;x<S;x++){const w=v[3*x],L=v[3*x+1],N=v[3*x+2];let P=n.getVerticalOffsetForLineNumber(L)*o|0,B=(n.getVerticalOffsetForLineNumber(N)+i)*o|0;if(B-P<l){let j=(P+B)/2|0;j<c?j=c:j+c>t&&(j=t-c),P=j-c,B=j+c}P>y+1||w!==b?(x!==0&&h.fillRect(u[b],C,d[b],y-C),b=w,C=P,y=B):B>y&&(y=B)}h.fillRect(u[b],C,d[b],y-C)}if(!this._settings.hideCursor&&this._settings.cursorColor){const g=2*this._settings.pixelRatio|0,p=g/2|0,_=this._settings.x[7],v=this._settings.w[7];h.fillStyle=this._settings.cursorColor;let b=-100,C=-100;for(let y=0,x=this._cursorPositions.length;y<x;y++){const S=this._cursorPositions[y];let w=n.getVerticalOffsetForLineNumber(S.lineNumber)*o|0;w<p?w=p:w+p>t&&(w=t-p);const L=w-p,N=L+g;L>C+1?(y!==0&&h.fillRect(_,b,v,C-b),b=L,C=N):N>C&&(C=N)}h.fillRect(_,b,v,C-b)}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,t),h.stroke(),h.moveTo(0,0),h.lineTo(e,0),h.stroke())}}class i4{constructor(e,t,i){this._colorZoneBrand=void 0,this.from=e|0,this.to=t|0,this.colorId=i|0}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 wm{constructor(e,t,i){this._overviewRulerZoneBrand=void 0,this.startLineNumber=e,this.endLineNumber=t,this.color=i,this._colorZone=null}static compare(e,t){return e.color===t.color?e.startLineNumber===t.startLineNumber?e.endLineNumber-t.endLineNumber:e.startLineNumber-t.startLineNumber:e.color<t.color?-1:1}setColorZone(e){this._colorZone=e}getColorZones(){return this._colorZone}}class uee{constructor(e){this._getVerticalOffsetForLine=e,this._zones=[],this._colorZonesInvalid=!1,this._lineHeight=0,this._domWidth=0,this._domHeight=0,this._outerHeight=0,this._pixelRatio=1,this._lastAssignedId=0,this._color2Id=Object.create(null),this._id2Color=[]}getId2Color(){return this._id2Color}setZones(e){this._zones=e,this._zones.sort(wm.compare)}setLineHeight(e){return this._lineHeight===e?!1:(this._lineHeight=e,this._colorZonesInvalid=!0,!0)}setPixelRatio(e){this._pixelRatio=e,this._colorZonesInvalid=!0}getDOMWidth(){return this._domWidth}getCanvasWidth(){return this._domWidth*this._pixelRatio}setDOMWidth(e){return this._domWidth===e?!1:(this._domWidth=e,this._colorZonesInvalid=!0,!0)}getDOMHeight(){return this._domHeight}getCanvasHeight(){return this._domHeight*this._pixelRatio}setDOMHeight(e){return this._domHeight===e?!1:(this._domHeight=e,this._colorZonesInvalid=!0,!0)}getOuterHeight(){return this._outerHeight}setOuterHeight(e){return this._outerHeight===e?!1:(this._outerHeight=e,this._colorZonesInvalid=!0,!0)}resolveColorZones(){const e=this._colorZonesInvalid,t=Math.floor(this._lineHeight),i=Math.floor(this.getCanvasHeight()),n=Math.floor(this._outerHeight),s=i/n,o=Math.floor(4*this._pixelRatio/2);let a=[];for(let l=0,c=this._zones.length;l<c;l++){const h=this._zones[l];if(!e){const b=h.getColorZones();if(b){a.push(b);continue}}const u=Math.floor(s*this._getVerticalOffsetForLine(h.startLineNumber)),d=Math.floor(s*(this._getVerticalOffsetForLine(h.endLineNumber)+t));let f=Math.floor((u+d)/2),g=d-f;g<o&&(g=o),f-g<0&&(f=g),f+g>i&&(f=i-g);const p=h.color;let _=this._color2Id[p];_||(_=++this._lastAssignedId,this._color2Id[p]=_,this._id2Color[_]=p);const v=new i4(f-g,f+g,_);h.setColorZone(v),a.push(v)}return this._colorZonesInvalid=!1,a.sort(i4.compare),a}}class dee extends Hp{constructor(e,t){super();this._context=e;const i=this._context.configuration.options;this._domNode=dt(document.createElement("canvas")),this._domNode.setClassName(t),this._domNode.setPosition("absolute"),this._domNode.setLayerHinting(!0),this._domNode.setContain("strict"),this._zoneManager=new uee(n=>this._context.viewLayout.getVerticalOffsetForLineNumber(n)),this._zoneManager.setDOMWidth(0),this._zoneManager.setDOMHeight(0),this._zoneManager.setOuterHeight(this._context.viewLayout.getScrollHeight()),this._zoneManager.setLineHeight(i.get(58)),this._zoneManager.setPixelRatio(i.get(127)),this._context.addEventHandler(this)}dispose(){this._context.removeEventHandler(this),super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return e.hasChanged(58)&&(this._zoneManager.setLineHeight(t.get(58)),this._render()),e.hasChanged(127)&&(this._zoneManager.setPixelRatio(t.get(127)),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(this._zoneManager.getOuterHeight()===0)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,a=0;for(const l of t){const c=l.colorId,h=l.from,u=l.to;c!==s?(e.fillRect(0,o,n,a-o),s=c,e.fillStyle=i[s],o=h,a=u):a>=h?a=Math.max(a,u):(e.fillRect(0,o,n,a-o),o=h,a=u)}e.fillRect(0,o,n,a-o)}}class fee extends ss{constructor(e){super(e);this.domNode=dt(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(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth}dispose(){super.dispose()}onConfigurationChanged(e){const t=this._context.configuration.options;return this._rulers=t.get(90),this._typicalHalfwidthCharacterWidth=t.get(43).typicalHalfwidthCharacterWidth,!0}onScrollChanged(e){return e.scrollHeightChanged}prepareRender(e){}_ensureRulersCount(){const e=this._renderedRulers.length,t=this._rulers.length;if(e===t)return;if(e<t){const{tabSize:n}=this._context.model.getTextModelOptions(),s=n;let o=t-e;for(;o>0;){const a=dt(document.createElement("div"));a.setClassName("view-ruler"),a.setWidth(s),this.domNode.appendChild(a),this._renderedRulers.push(a),o--}return}let i=e-t;for(;i>0;){const n=this._renderedRulers.pop();this.domNode.removeChild(n),i--}}render(e){this._ensureRulersCount();for(let t=0,i=this._rulers.length;t<i;t++){const n=this._renderedRulers[t],s=this._rulers[t];n.setBoxShadow(s.color?`1px 0 0 0 ${s.color} inset`:""),n.setHeight(Math.min(e.scrollHeight,1e6)),n.setLeft(s.column*this._typicalHalfwidthCharacterWidth)}}}Lt((r,e)=>{const t=r.getColor(lQ);t&&e.addRule(`.monaco-editor .view-ruler { box-shadow: 1px 0 0 0 ${t} inset; }`)});class gee extends ss{constructor(e){super(e);this._scrollTop=0,this._width=0,this._updateWidth(),this._shouldShow=!1;const i=this._context.configuration.options.get(91);this._useShadows=i.useShadows,this._domNode=dt(document.createElement("div")),this._domNode.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true")}dispose(){super.dispose()}_updateShouldShow(){const e=this._useShadows&&this._scrollTop>0;return this._shouldShow!==e?(this._shouldShow=e,!0):!1}getDomNode(){return this._domNode}_updateWidth(){const t=this._context.configuration.options.get(129);t.minimap.renderMinimap===0||t.minimap.minimapWidth>0&&t.minimap.minimapLeft===0?this._width=t.width:this._width=t.width-t.minimap.minimapWidth-t.verticalScrollbarWidth}onConfigurationChanged(e){const i=this._context.configuration.options.get(91);return this._useShadows=i.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":"")}}Lt((r,e)=>{const t=r.getColor($C);t&&e.addRule(`.monaco-editor .scroll-decoration { box-shadow: ${t} 0 6px 6px -6px inset; }`)});class pee{constructor(e){this.left=e.left,this.width=e.width,this.startStyle=null,this.endStyle=null}}class mee{constructor(e,t){this.lineNumber=e,this.ranges=t}}function _ee(r){return new pee(r)}function bee(r){return new mee(r.lineNumber,r.ranges.map(_ee))}class oi extends Cf{constructor(e){super();this._previousFrameVisibleRangesWithStyle=[],this._context=e;const t=this._context.configuration.options;this._lineHeight=t.get(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).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(58),this._roundedSelection=t.get(89),this._typicalHalfwidthCharacterWidth=t.get(43).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;t<i;t++)if(e[t].ranges.length>1)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 a=t[0].lineNumber;if(a===e.startLineNumber)for(let c=0;!s&&c<i.length;c++)i[c].lineNumber===a&&(s=i[c].ranges[0]);const l=t[t.length-1].lineNumber;if(l===e.endLineNumber)for(let c=i.length-1;!o&&c>=0;c--)i[c].lineNumber===l&&(o=i[c].ranges[0]);s&&!s.startStyle&&(s=null),o&&!o.startStyle&&(o=null)}for(let a=0,l=t.length;a<l;a++){const c=t[a].ranges[0],h=c.left,u=c.left+c.width,d={top:0,bottom:0},f={top:0,bottom:0};if(a>0){const g=t[a-1].ranges[0].left,p=t[a-1].ranges[0].left+t[a-1].ranges[0].width;kw(h-g)<n?d.top=2:h>g&&(d.top=1),kw(u-p)<n?f.top=2:g<u&&u<p&&(f.top=1)}else s&&(d.top=s.startStyle.top,f.top=s.endStyle.top);if(a+1<l){const g=t[a+1].ranges[0].left,p=t[a+1].ranges[0].left+t[a+1].ranges[0].width;kw(h-g)<n?d.bottom=2:g<h&&h<p&&(d.bottom=1),kw(u-p)<n?f.bottom=2:u<p&&(f.bottom=1)}else o&&(d.bottom=o.startStyle.bottom,f.bottom=o.endStyle.bottom);c.startStyle=d,c.endStyle=f}}_getVisibleRangesWithStyle(e,t,i){const s=(t.linesVisibleRangesForRange(e,!0)||[]).map(bee);return!this._visibleRangesHaveGaps(s)&&this._roundedSelection&&this._enrichVisibleRangesWithStyle(t.visibleRange,s,i),s}_createSelectionPiece(e,t,i,n,s){return'<div class="cslr '+i+'" style="top:'+e.toString()+"px;left:"+n.toString()+"px;width:"+s.toString()+"px;height:"+t+'px;"></div>'}_actualRenderOneSelection(e,t,i,n){if(n.length===0)return;const s=!!n[0].ranges[0].startStyle,o=this._lineHeight.toString(),a=(this._lineHeight-1).toString(),l=n[0].lineNumber,c=n[n.length-1].lineNumber;for(let h=0,u=n.length;h<u;h++){const d=n[h],f=d.lineNumber,g=f-t,p=i&&(f===c||f===l)?a:o,_=i&&f===l?1:0;let v="",b="";for(let C=0,y=d.ranges.length;C<y;C++){const x=d.ranges[C];if(s){const w=x.startStyle,L=x.endStyle;if(w.top===1||w.bottom===1){v+=this._createSelectionPiece(_,p,oi.SELECTION_CLASS_NAME,x.left-oi.ROUNDED_PIECE_WIDTH,oi.ROUNDED_PIECE_WIDTH);let N=oi.EDITOR_BACKGROUND_CLASS_NAME;w.top===1&&(N+=" "+oi.SELECTION_TOP_RIGHT),w.bottom===1&&(N+=" "+oi.SELECTION_BOTTOM_RIGHT),v+=this._createSelectionPiece(_,p,N,x.left-oi.ROUNDED_PIECE_WIDTH,oi.ROUNDED_PIECE_WIDTH)}if(L.top===1||L.bottom===1){v+=this._createSelectionPiece(_,p,oi.SELECTION_CLASS_NAME,x.left+x.width,oi.ROUNDED_PIECE_WIDTH);let N=oi.EDITOR_BACKGROUND_CLASS_NAME;L.top===1&&(N+=" "+oi.SELECTION_TOP_LEFT),L.bottom===1&&(N+=" "+oi.SELECTION_BOTTOM_LEFT),v+=this._createSelectionPiece(_,p,N,x.left+x.width,oi.ROUNDED_PIECE_WIDTH)}}let S=oi.SELECTION_CLASS_NAME;if(s){const w=x.startStyle,L=x.endStyle;w.top===0&&(S+=" "+oi.SELECTION_TOP_LEFT),w.bottom===0&&(S+=" "+oi.SELECTION_BOTTOM_LEFT),L.top===0&&(S+=" "+oi.SELECTION_TOP_RIGHT),L.bottom===0&&(S+=" "+oi.SELECTION_BOTTOM_RIGHT)}b+=this._createSelectionPiece(_,p,S,x.left,x.width)}e[g][0]+=v,e[g][1]+=b}}prepareRender(e){const t=[],i=e.visibleRange.startLineNumber,n=e.visibleRange.endLineNumber;for(let o=i;o<=n;o++){const a=o-i;t[a]=["",""]}const s=[];for(let o=0,a=this._selections.length;o<a;o++){const l=this._selections[o];if(l.isEmpty()){s[o]=null;continue}const c=this._getVisibleRangesWithStyle(l,e,this._previousFrameVisibleRangesWithStyle[o]);s[o]=c,this._actualRenderOneSelection(t,i,this._selections.length>1,c)}this._previousFrameVisibleRangesWithStyle=s,this._renderResult=t.map(([o,a])=>o+a)}render(e,t){if(!this._renderResult)return"";const i=t-e;return i<0||i>=this._renderResult.length?"":this._renderResult[i]}}oi.SELECTION_CLASS_NAME="selected-text";oi.SELECTION_TOP_LEFT="top-left-radius";oi.SELECTION_BOTTOM_LEFT="bottom-left-radius";oi.SELECTION_TOP_RIGHT="top-right-radius";oi.SELECTION_BOTTOM_RIGHT="bottom-right-radius";oi.EDITOR_BACKGROUND_CLASS_NAME="monaco-editor-background";oi.ROUNDED_PIECE_WIDTH=10;Lt((r,e)=>{const t=r.getColor(ac);t&&e.addRule(`.monaco-editor .focused .selected-text { background-color: ${t}; }`);const i=r.getColor(tD);i&&e.addRule(`.monaco-editor .selected-text { background-color: ${i}; }`);const n=r.getColor(YY);n&&!n.isTransparent()&&e.addRule(`.monaco-editor .view-line span.inline-selected-text { color: ${n}; }`)});function kw(r){return r<0?-r:r}class n4{constructor(e,t,i,n,s,o){this.top=e,this.left=t,this.width=i,this.height=n,this.textContent=s,this.textContentClassName=o}}class r4{constructor(e){this._context=e;const t=this._context.configuration.options,i=t.get(43);this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),this._isVisible=!0,this._domNode=dt(document.createElement("div")),this._domNode.setClassName(`cursor ${Yh}`),this._domNode.setHeight(this._lineHeight),this._domNode.setTop(0),this._domNode.setLeft(0),Dn.applyFontInfo(this._domNode,i),this._domNode.setDisplay("none"),this._position=new $(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(43);return this._cursorStyle=t.get(24),this._lineHeight=t.get(58),this._typicalHalfwidthCharacterWidth=i.typicalHalfwidthCharacterWidth,this._lineCursorWidth=Math.min(t.get(27),this._typicalHalfwidthCharacterWidth),Dn.applyFontInfo(this._domNode,i),!0}onCursorPositionChanged(e){return this._position=e,!0}_prepareRender(e){let t="";if(this._cursorStyle===zi.Line||this._cursorStyle===zi.LineThin){const d=e.visibleRangeForPosition(this._position);if(!d||d.outsideRenderedLine)return null;let f;if(this._cursorStyle===zi.Line){if(f=e2(this._lineCursorWidth>0?this._lineCursorWidth:2),f>2){const _=this._context.model.getLineContent(this._position.lineNumber),v=uv(_,this._position.column-1);t=_.substr(this._position.column-1,v)}}else f=e2(1);let g=d.left;f>=2&&g>=1&&(g-=1);const p=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta;return new n4(p,g,f,this._lineHeight,t,"")}const i=this._context.model.getLineContent(this._position.lineNumber),n=uv(i,this._position.column-1),s=e.linesVisibleRangesForRange(new k(this._position.lineNumber,this._position.column,this._position.lineNumber,this._position.column+n),!1);if(!s||s.length===0)return null;const o=s[0];if(o.outsideRenderedLine||o.ranges.length===0)return null;const a=o.ranges[0],l=a.width<1?this._typicalHalfwidthCharacterWidth:a.width;let c="";if(this._cursorStyle===zi.Block){const d=this._context.model.getViewLineData(this._position.lineNumber);t=i.substr(this._position.column-1,n);const f=d.tokens.findTokenIndexAtOffset(this._position.column-1);c=d.tokens.getClassName(f)}let h=e.getVerticalOffsetForLineNumber(this._position.lineNumber)-e.bigNumbersDelta,u=this._lineHeight;return(this._cursorStyle===zi.Underline||this._cursorStyle===zi.UnderlineThin)&&(h+=this._lineHeight-2,u=2),new n4(h,a.left,l,u,t,c)}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 ${Yh} ${this._renderData.textContentClassName}`),this._domNode.setDisplay("block"),this._domNode.setTop(this._renderData.top),this._domNode.setLeft(this._renderData.left),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 ym extends ss{constructor(e){super(e);const t=this._context.configuration.options;this._readOnly=t.get(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._selectionIsEmpty=!0,this._isComposingInput=!1,this._isVisible=!1,this._primaryCursor=new r4(this._context),this._secondaryCursors=[],this._renderData=[],this._domNode=dt(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 Xn,this._cursorFlatBlinkInterval=new lp,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(80),this._cursorBlinking=t.get(22),this._cursorStyle=t.get(24),this._cursorSmoothCaretAnimation=t.get(23),this._updateBlinking(),this._updateDomClassName(),this._primaryCursor.onConfigurationChanged(e);for(let i=0,n=this._secondaryCursors.length;i<n;i++)this._secondaryCursors[i].onConfigurationChanged(e);return!0}_onCursorPositionChanged(e,t){if(this._primaryCursor.onCursorPositionChanged(e),this._updateBlinking(),this._secondaryCursors.length<t.length){const i=t.length-this._secondaryCursors.length;for(let n=0;n<i;n++){const s=new r4(this._context);this._domNode.domNode.insertBefore(s.getDomNode().domNode,this._primaryCursor.getDomNode().domNode.nextSibling),this._secondaryCursors.push(s)}}else if(this._secondaryCursors.length>t.length){const i=this._secondaryCursors.length-t.length;for(let n=0;n<i;n++)this._domNode.removeChild(this._secondaryCursors[0].getDomNode()),this._secondaryCursors.splice(0,1)}for(let i=0;i<t.length;i++)this._secondaryCursors[i].onCursorPositionChanged(t[i])}onCursorStateChanged(e){const t=[];for(let n=0,s=e.selections.length;n<s;n++)t[n]=e.selections[n].getPosition();this._onCursorPositionChanged(t[0],t.slice(1));const i=e.selections[0].isEmpty();return this._selectionIsEmpty!==i&&(this._selectionIsEmpty=i,this._updateDomClassName()),!0}onDecorationsChanged(e){return!0}onFlushed(e){return!0}onFocusChanged(e){return this._editorHasFocus=e.isFocused,this._updateBlinking(),!1}onLinesChanged(e){return!0}onLinesDeleted(e){return!0}onLinesInserted(e){return!0}onScrollChanged(e){return!0}onTokensChanged(e){const t=i=>{for(let n=0,s=e.ranges.length;n<s;n++)if(e.ranges[n].fromLineNumber<=i.lineNumber&&i.lineNumber<=e.ranges[n].toLineNumber)return!0;return!1};if(t(this._primaryCursor.getPosition()))return!0;for(const i of this._secondaryCursors)if(t(i.getPosition()))return!0;return!1}onZonesChanged(e){return!0}_getCursorBlinking(){return this._isComposingInput||!this._editorHasFocus?0:this._readOnly?5:this._cursorBlinking}_updateBlinking(){this._startCursorBlinkAnimation.cancel(),this._cursorFlatBlinkInterval.cancel();const e=this._getCursorBlinking(),t=e===0,i=e===5;t?this._hide():this._show(),this._blinkingEnabled=!1,this._updateDomClassName(),!t&&!i&&(e===1?this._cursorFlatBlinkInterval.cancelAndSet(()=>{this._isVisible?this._hide():this._show()},ym.BLINK_INTERVAL):this._startCursorBlinkAnimation.setIfNotSet(()=>{this._blinkingEnabled=!0,this._updateDomClassName()},ym.BLINK_INTERVAL))}_updateDomClassName(){this._domNode.setClassName(this._getClassName())}_getClassName(){let e="cursors-layer";switch(this._selectionIsEmpty||(e+=" has-selection"),this._cursorStyle){case zi.Line:e+=" cursor-line-style";break;case zi.Block:e+=" cursor-block-style";break;case zi.Underline:e+=" cursor-underline-style";break;case zi.LineThin:e+=" cursor-line-thin-style";break;case zi.BlockOutline:e+=" cursor-block-outline-style";break;case zi.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;case 5:e+=" cursor-solid";break;default:e+=" cursor-solid"}else e+=" cursor-solid";return this._cursorSmoothCaretAnimation&&(e+=" cursor-smooth-caret-animation"),e}_show(){this._primaryCursor.show();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].show();this._isVisible=!0}_hide(){this._primaryCursor.hide();for(let e=0,t=this._secondaryCursors.length;e<t;e++)this._secondaryCursors[e].hide();this._isVisible=!1}prepareRender(e){this._primaryCursor.prepareRender(e);for(let t=0,i=this._secondaryCursors.length;t<i;t++)this._secondaryCursors[t].prepareRender(e)}render(e){let t=[],i=0;const n=this._primaryCursor.render(e);n&&(t[i++]=n);for(let s=0,o=this._secondaryCursors.length;s<o;s++){const a=this._secondaryCursors[s].render(e);a&&(t[i++]=a)}this._renderData=t}getLastRenderData(){return this._renderData}}ym.BLINK_INTERVAL=500;Lt((r,e)=>{const t=r.getColor(oF);if(t){let i=r.getColor(oQ);i||(i=t.opposite()),e.addRule(`.monaco-editor .cursors-layer .cursor { background-color: ${t}; border-color: ${t}; color: ${i}; }`),r.type==="hc"&&e.addRule(`.monaco-editor .cursors-layer.has-selection .cursor { border-left: 1px solid ${i}; border-right: 1px solid ${i}; }`)}});const VD=()=>{throw new Error("Invalid change accessor")};class vee extends ss{constructor(e){super(e);const t=this._context.configuration.options,i=t.get(129);this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,this.domNode=dt(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=dt(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.model.changeWhitespace(n=>{const s=Object.keys(this._zones);for(let o=0,a=s.length;o<a;o++){const l=s[o],c=this._zones[l],h=this._computeWhitespaceProps(c.delegate),u=t.get(l);u&&(u.afterLineNumber!==h.afterViewLineNumber||u.height!==h.heightInPx)&&(n.changeOneWhitespace(l,h.afterViewLineNumber,h.heightInPx),this._safeCallOnComputedHeight(c.delegate,h.heightInPx),i=!0)}}),i}onConfigurationChanged(e){const t=this._context.configuration.options,i=t.get(129);return this._lineHeight=t.get(58),this._contentWidth=i.contentWidth,this._contentLeft=i.contentLeft,e.hasChanged(58)&&this._recomputeWhitespacesProps(),!0}onLineMappingChanged(e){return this._recomputeWhitespacesProps()}onLinesDeleted(e){return!0}onScrollChanged(e){return e.scrollTopChanged||e.scrollWidthChanged}onZonesChanged(e){return!0}onLinesInserted(e){return!0}_getZoneOrdinal(e){return typeof e.afterColumn!="undefined"?e.afterColumn:1e4}_computeWhitespaceProps(e){if(e.afterLineNumber===0)return{afterViewLineNumber:0,heightInPx:this._heightInPixels(e),minWidthInPx:this._minWidthInPixels(e)};let t;if(typeof e.afterColumn!="undefined")t=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:e.afterColumn});else{const o=this._context.model.validateModelPosition({lineNumber:e.afterLineNumber,column:1}).lineNumber;t=new $(o,this._context.model.getModelLineMaxColumn(o))}let i;t.column===this._context.model.getModelLineMaxColumn(t.lineNumber)?i=this._context.model.validateModelPosition({lineNumber:t.lineNumber+1,column:1}):i=this._context.model.validateModelPosition({lineNumber:t.lineNumber,column:t.column+1});const n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(t),s=this._context.model.coordinatesConverter.modelPositionIsVisible(i);return{afterViewLineNumber:n.lineNumber,heightInPx:s?this._heightInPixels(e):0,minWidthInPx:this._minWidthInPixels(e)}}changeViewZones(e){let t=!1;return this._context.model.changeWhitespace(i=>{const n={addZone:s=>(t=!0,this._addZone(i,s)),removeZone:s=>{!s||(t=this._removeZone(i,s)||t)},layoutZone:s=>{!s||(t=this._layoutZone(i,s)||t)}};Cee(e,n),n.addZone=VD,n.removeZone=VD,n.layoutZone=VD}),t}_addZone(e,t){const i=this._computeWhitespaceProps(t),s={whitespaceId:e.insertWhitespace(i.afterViewLineNumber,this._getZoneOrdinal(t),i.heightInPx,i.minWidthInPx),delegate:t,isVisible:!1,domNode:dt(t.domNode),marginDomNode:t.marginDomNode?dt(t.marginDomNode):null};return this._safeCallOnComputedHeight(s.delegate,i.heightInPx),s.domNode.setPosition("absolute"),s.domNode.domNode.style.width="100%",s.domNode.setDisplay("none"),s.domNode.setAttribute("monaco-view-zone",s.whitespaceId),this.domNode.appendChild(s.domNode),s.marginDomNode&&(s.marginDomNode.setPosition("absolute"),s.marginDomNode.domNode.style.width="100%",s.marginDomNode.setDisplay("none"),s.marginDomNode.setAttribute("monaco-view-zone",s.whitespaceId),this.marginDomNode.appendChild(s.marginDomNode)),this._zones[s.whitespaceId]=s,this.setShouldRender(),s.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 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 typeof e.heightInPx=="number"?e.heightInPx:typeof e.heightInLines=="number"?this._lineHeight*e.heightInLines:this._lineHeight}_minWidthInPixels(e){return typeof e.minWidthInPx=="number"?e.minWidthInPx:0}_safeCallOnComputedHeight(e,t){if(typeof e.onComputedHeight=="function")try{e.onComputedHeight(t)}catch(i){Oe(i)}}_safeCallOnDomNodeTop(e,t){if(typeof e.onDomNodeTop=="function")try{e.onDomNodeTop(t)}catch(i){Oe(i)}}prepareRender(e){}render(e){const t=e.viewportData.whitespaceViewportData,i={};let n=!1;for(let o=0,a=t.length;o<a;o++)i[t[o].id]=t[o],n=!0;const s=Object.keys(this._zones);for(let o=0,a=s.length;o<a;o++){const l=s[o],c=this._zones[l];let h=0,u=0,d="none";i.hasOwnProperty(l)?(h=i[l].verticalOffset-e.bigNumbersDelta,u=i[l].height,d="block",c.isVisible||(c.domNode.setAttribute("monaco-visible-view-zone","true"),c.isVisible=!0),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(i[l].verticalOffset))):(c.isVisible&&(c.domNode.removeAttribute("monaco-visible-view-zone"),c.isVisible=!1),this._safeCallOnDomNodeTop(c.delegate,e.getScrolledTopFromAbsoluteTop(-1e6))),c.domNode.setTop(h),c.domNode.setHeight(u),c.domNode.setDisplay(d),c.marginDomNode&&(c.marginDomNode.setTop(h),c.marginDomNode.setHeight(u),c.marginDomNode.setDisplay(d))}n&&(this.domNode.setWidth(Math.max(e.scrollWidth,this._contentWidth)),this.marginDomNode.setWidth(this._contentLeft))}}function Cee(r,e){try{return r(e)}catch(t){Oe(t)}}class wee{constructor(e){this._theme=e}get type(){return this._theme.type}update(e){this._theme=e}getColor(e){return this._theme.getColor(e)}}class yee{constructor(e,t,i){this.configuration=e,this.theme=new wee(t),this.model=i,this.viewLayout=i.viewLayout}addEventHandler(e){this.model.addViewEventHandler(e)}removeEventHandler(e){this.model.removeViewEventHandler(e)}}class See{constructor(e,t,i,n){this.selections=e,this.startLineNumber=t.startLineNumber|0,this.endLineNumber=t.endLineNumber|0,this.relativeVerticalOffset=t.relativeVerticalOffset,this.bigNumbersDelta=t.bigNumbersDelta|0,this.whitespaceViewportData=i,this._model=n,this.visibleRange=new k(t.startLineNumber,this._model.getLineMinColumn(t.startLineNumber),t.endLineNumber,this._model.getLineMaxColumn(t.endLineNumber))}getViewLineRenderingData(e){return this._model.getViewLineRenderingData(this.visibleRange,e)}getDecorationsInViewport(){return this._model.getDecorationsInViewport(this.visibleRange)}}class Lee extends Hp{constructor(e,t,i,n,s,o){super();this._selections=[new be(1,1,1,1)],this._renderAnimationFrame=null;const a=new SJ(t,n,s,e);this._context=new yee(t,i.getColorTheme(),n),this._configPixelRatio=this._context.configuration.options.get(127),this._context.addEventHandler(this),this._register(i.onDidColorThemeChange(p=>{this._context.theme.update(p),this._context.model.onDidColorThemeChange(),this.render(!0,!1)})),this._viewParts=[],this._textAreaHandler=new mJ(this._context,a,this._createTextAreaHandlerHelper()),this._viewParts.push(this._textAreaHandler),this._linesContent=dt(document.createElement("div")),this._linesContent.setClassName("lines-content monaco-editor-background"),this._linesContent.setPosition("absolute"),this.domNode=dt(document.createElement("div")),this.domNode.setClassName(this._getEditorClassName()),this.domNode.setAttribute("role","code"),this._overflowGuardContainer=dt(document.createElement("div")),Zo.write(this._overflowGuardContainer,3),this._overflowGuardContainer.setClassName("overflow-guard"),this._scrollbar=new ZJ(this._context,this._linesContent,this.domNode,this._overflowGuardContainer),this._viewParts.push(this._scrollbar),this._viewLines=new Sw(this._context,this._linesContent),this._viewZones=new vee(this._context),this._viewParts.push(this._viewZones);const l=new hee(this._context);this._viewParts.push(l);const c=new gee(this._context);this._viewParts.push(c);const h=new kJ(this._context);this._viewParts.push(h),h.addDynamicOverlay(new NJ(this._context)),h.addDynamicOverlay(new oi(this._context)),h.addDynamicOverlay(new XJ(this._context)),h.addDynamicOverlay(new AJ(this._context));const u=new DJ(this._context);this._viewParts.push(u),u.addDynamicOverlay(new TJ(this._context)),u.addDynamicOverlay(new YJ(this._context)),u.addDynamicOverlay(new iee(this._context)),u.addDynamicOverlay(new tee(this._context)),u.addDynamicOverlay(new wf(this._context));const d=new Zh(this._context);d.getDomNode().appendChild(this._viewZones.marginDomNode),d.getDomNode().appendChild(u.getDomNode()),this._viewParts.push(d),this._contentWidgets=new EJ(this._context,this.domNode),this._viewParts.push(this._contentWidgets),this._viewCursors=new ym(this._context),this._viewParts.push(this._viewCursors),this._overlayWidgets=new lee(this._context),this._viewParts.push(this._overlayWidgets);const f=new fee(this._context);this._viewParts.push(f);const g=new aee(this._context);if(this._viewParts.push(g),l){const p=this._scrollbar.getOverviewRulerLayoutInfo();p.parent.insertBefore(l.getDomNode(),p.insertBefore)}this._linesContent.appendChild(h.getDomNode()),this._linesContent.appendChild(f.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(d.getDomNode()),this._overflowGuardContainer.appendChild(this._scrollbar.getDomNode()),this._overflowGuardContainer.appendChild(c.getDomNode()),this._overflowGuardContainer.appendChild(this._textAreaHandler.textArea),this._overflowGuardContainer.appendChild(this._textAreaHandler.textAreaCover),this._overflowGuardContainer.appendChild(this._overlayWidgets.getDomNode()),this._overflowGuardContainer.appendChild(g.getDomNode()),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 pJ(this._context,a,this._createPointerHandlerHelper()))}_flushAccumulatedAndRenderNow(){this._renderNow()}_createPointerHandlerHelper(){return{viewDomNode:this.domNode.domNode,linesContentDomNode:this._linesContent.domNode,focusTextArea:()=>{this.focus()},dispatchTextAreaEvent:e=>{this._textAreaHandler.textArea.domNode.dispatchEvent(e)},getLastRenderData:()=>{const e=this._viewCursors.getLastRenderData()||[],t=this._textAreaHandler.getLastRenderData();return new rJ(e,t)},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 $(e,t))),getLineWidth:e=>(this._flushAccumulatedAndRenderNow(),this._viewLines.getLineWidth(e))}}_createTextAreaHandlerHelper(){return{visibleRangeForPositionRelativeToEditor:(e,t)=>(this._flushAccumulatedAndRenderNow(),this._viewLines.visibleRangeForPosition(new $(e,t)))}}_applyLayout(){const t=this._context.configuration.options.get(129);this.domNode.setWidth(t.width),this.domNode.setHeight(t.height),this._overflowGuardContainer.setWidth(t.width),this._overflowGuardContainer.setHeight(t.height),this._linesContent.setWidth(1e6),this._linesContent.setHeight(1e6)}_getEditorClassName(){const e=this._textAreaHandler.isFocused()?" focused":"";return this._context.configuration.options.get(126)+" "+TC(this._context.theme.type)+e}handleEvents(e){super.handleEvents(e),this._scheduleRender()}onConfigurationChanged(e){return this._configPixelRatio=this._context.configuration.options.get(127),this.domNode.setClassName(this._getEditorClassName()),this._applyLayout(),!1}onCursorStateChanged(e){return this._selections=e.selections,!1}onFocusChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}onThemeChanged(e){return this.domNode.setClassName(this._getEditorClassName()),!1}dispose(){this._renderAnimationFrame!==null&&(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(){this._renderAnimationFrame===null&&(this._renderAnimationFrame=KM(this._onRenderScheduled.bind(this),100))}_onRenderScheduled(){this._renderAnimationFrame=null,this._flushAccumulatedAndRenderNow()}_renderNow(){xee(()=>this._actualRender())}_getViewPartsToRender(){let e=[],t=0;for(const i of this._viewParts)i.shouldRender()&&(e[t++]=i);return e}_actualRender(){if(!TL(this.domNode.domNode))return;let e=this._getViewPartsToRender();if(!this._viewLines.shouldRender()&&e.length===0)return;const t=this._context.viewLayout.getLinesViewportData();this._context.model.setViewport(t.startLineNumber,t.endLineNumber,t.centeredLineNumber);const i=new See(this._selections,t,this._context.viewLayout.getWhitespaceViewportData(),this._context.model);this._contentWidgets.shouldRender()&&this._contentWidgets.onBeforeRender(i),this._viewLines.shouldRender()&&(this._viewLines.renderText(i),this._viewLines.onDidRender(),e=this._getViewPartsToRender());const n=new FZ(this._context.viewLayout,i,this._viewLines);for(const s of e)s.prepareRender(n);for(const s of e)s.render(n),s.onDidRender();Math.abs(nv()-this._configPixelRatio)>.001&&this._context.configuration.updatePixelRatio()}delegateVerticalScrollbarMouseDown(e){this._scrollbar.delegateVerticalScrollbarMouseDown(e)}restoreState(e){this._context.model.setScrollPosition({scrollTop:e.scrollTop},1),this._context.model.tokenizeViewport(),this._renderNow(),this._viewLines.updateLineWidths(),this._context.model.setScrollPosition({scrollLeft:e.scrollLeft},1)}getOffsetForColumn(e,t){const i=this._context.model.validateModelPosition({lineNumber:e,column:t}),n=this._context.model.coordinatesConverter.convertModelPositionToViewPosition(i);this._flushAccumulatedAndRenderNow();const s=this._viewLines.visibleRangeForPosition(new $(n.lineNumber,n.column));return s?s.left:-1}getTargetAtClientPoint(e,t){const i=this._pointerHandler.getTargetAtClientPoint(e,t);return i?vw.convertViewToModelMouseTarget(i,this._context.model.coordinatesConverter):null}createOverviewRuler(e){return new dee(this._context,e)}change(e){this._viewZones.changeViewZones(e),this._scheduleRender()}render(e,t){if(t){this._viewLines.forceShouldRender();for(const i of this._viewParts)i.forceShouldRender()}e?this._flushAccumulatedAndRenderNow():this._scheduleRender()}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){let t=e.position&&e.position.range||null;if(t===null){const n=e.position?e.position.position:null;n!==null&&(t=new k(n.lineNumber,n.column,n.lineNumber,n.column))}const i=e.position?e.position.preference:null;this._contentWidgets.setWidgetPosition(e.widget,t,i),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()}}function xee(r){try{return r()}catch(e){Oe(e)}}class Dw{constructor(e){this._selTrackedRange=null,this._trackSelection=!0,this._setState(e,new qi(new k(1,1,1,1),0,new $(1,1),0),new qi(new k(1,1,1,1),0,new $(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 qe(this.modelState,this.viewState)}readSelectionFromMarkers(e){const t=e.model._getTrackedRange(this._selTrackedRange);return this.modelState.selection.getDirection()===0?new be(t.startLineNumber,t.startColumn,t.endLineNumber,t.endColumn):new be(t.endLineNumber,t.endColumn,t.startLineNumber,t.startColumn)}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),a=this._validatePositionWithCache(e,n,i,o),l=this._validatePositionWithCache(e,s,n,a);return i.equals(o)&&n.equals(a)&&s.equals(l)?t:new qi(k.fromPositions(a,l),t.selectionStartLeftoverVisibleColumns+n.column-a.column,o,t.leftoverVisibleColumns+i.column-o.column)}_setState(e,t,i){if(i&&(i=Dw._validateViewState(e.viewModel,i)),t){const n=e.model.validateRange(t.selectionStart),s=t.selectionStart.equalsRange(n)?t.selectionStartLeftoverVisibleColumns:0,o=e.model.validatePosition(t.position),a=t.position.equals(o)?t.leftoverVisibleColumns:0;t=new qi(n,s,o,a)}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 qi(n,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 qi(n,t.selectionStartLeftoverVisibleColumns,s,t.leftoverVisibleColumns)}else{const n=e.coordinatesConverter.convertModelPositionToViewPosition(new $(t.selectionStart.startLineNumber,t.selectionStart.startColumn)),s=e.coordinatesConverter.convertModelPositionToViewPosition(new $(t.selectionStart.endLineNumber,t.selectionStart.endColumn)),o=new k(n.lineNumber,n.column,s.lineNumber,s.column),a=e.coordinatesConverter.convertModelPositionToViewPosition(t.position);i=new qi(o,t.selectionStartLeftoverVisibleColumns,a,t.leftoverVisibleColumns)}this.modelState=t,this.viewState=i,this._updateTrackedRange(e)}}class s4{constructor(e){this.context=e,this.primaryCursor=new Dw(e),this.secondaryCursors=[],this.lastAddedCursorIndex=0}dispose(){this.primaryCursor.dispose(this.context),this.killSecondaryCursors()}startTrackingSelections(){this.primaryCursor.startTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].startTrackingSelection(this.context)}stopTrackingSelections(){this.primaryCursor.stopTrackingSelection(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].stopTrackingSelection(this.context)}updateContext(e){this.context=e}ensureValidState(){this.primaryCursor.ensureValidState(this.context);for(let e=0,t=this.secondaryCursors.length;e<t;e++)this.secondaryCursors[e].ensureValidState(this.context)}readSelectionFromMarkers(){let e=[];e[0]=this.primaryCursor.readSelectionFromMarkers(this.context);for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].readSelectionFromMarkers(this.context);return e}getAll(){let e=[];e[0]=this.primaryCursor.asCursorState();for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].asCursorState();return e}getViewPositions(){let e=[];e[0]=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.position;return e}getTopMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const n=this.secondaryCursors[t].viewState.position;n.isBefore(e)&&(e=n)}return e}getBottomMostViewPosition(){let e=this.primaryCursor.viewState.position;for(let t=0,i=this.secondaryCursors.length;t<i;t++){const n=this.secondaryCursors[t].viewState.position;e.isBeforeOrEqual(n)&&(e=n)}return e}getSelections(){let e=[];e[0]=this.primaryCursor.modelState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].modelState.selection;return e}getViewSelections(){let e=[];e[0]=this.primaryCursor.viewState.selection;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t].viewState.selection;return e}setSelections(e){this.setStates(qe.fromModelSelections(e))}getPrimaryCursor(){return this.primaryCursor.asCursorState()}setStates(e){e!==null&&(this.primaryCursor.setState(this.context,e[0].modelState,e[0].viewState),this._setSecondaryStates(e.slice(1)))}_setSecondaryStates(e){const t=this.secondaryCursors.length,i=e.length;if(t<i){let n=i-t;for(let s=0;s<n;s++)this._addSecondaryCursor()}else if(t>i){let n=t-i;for(let s=0;s<n;s++)this._removeSecondaryCursor(this.secondaryCursors.length-1)}for(let n=0;n<i;n++)this.secondaryCursors[n].setState(this.context,e[n].modelState,e[n].viewState)}killSecondaryCursors(){this._setSecondaryStates([])}_addSecondaryCursor(){this.secondaryCursors.push(new Dw(this.context)),this.lastAddedCursorIndex=this.secondaryCursors.length}getLastAddedCursorIndex(){return this.secondaryCursors.length===0||this.lastAddedCursorIndex===0?0:this.lastAddedCursorIndex}_removeSecondaryCursor(e){this.lastAddedCursorIndex>=e+1&&this.lastAddedCursorIndex--,this.secondaryCursors[e].dispose(this.context),this.secondaryCursors.splice(e,1)}_getAll(){let e=[];e[0]=this.primaryCursor;for(let t=0,i=this.secondaryCursors.length;t<i;t++)e[t+1]=this.secondaryCursors[t];return e}normalize(){if(this.secondaryCursors.length===0)return;let e=this._getAll(),t=[];for(let i=0,n=e.length;i<n;i++)t.push({index:i,selection:e[i].modelState.selection});t.sort((i,n)=>i.selection.startLineNumber===n.selection.startLineNumber?i.selection.startColumn-n.selection.startColumn:i.selection.startLineNumber-n.selection.startLineNumber);for(let i=0;i<t.length-1;i++){const n=t[i],s=t[i+1],o=n.selection,a=s.selection;if(!this.context.cursorConfig.multiCursorMergeOverlapping)continue;let l;if(a.isEmpty()||o.isEmpty()?l=a.getStartPosition().isBeforeOrEqual(o.getEndPosition()):l=a.getStartPosition().isBefore(o.getEndPosition()),l){const c=n.index<s.index?i:i+1,h=n.index<s.index?i+1:i,u=t[h].index,d=t[c].index,f=t[h].selection,g=t[c].selection;if(!f.equalsSelection(g)){const p=f.plusRange(g),_=f.selectionStartLineNumber===f.startLineNumber&&f.selectionStartColumn===f.startColumn,v=g.selectionStartLineNumber===g.startLineNumber&&g.selectionStartColumn===g.startColumn;let b;u===this.lastAddedCursorIndex?(b=_,this.lastAddedCursorIndex=d):b=v;let C;b?C=new be(p.startLineNumber,p.startColumn,p.endLineNumber,p.endColumn):C=new be(p.endLineNumber,p.endColumn,p.startLineNumber,p.startColumn),t[c].selection=C;const y=qe.fromModelSelection(C);e[d].setState(this.context,y.modelState,y.viewState)}for(const p of t)p.index>u&&p.index--;e.splice(u,1),t.splice(h,1),this._removeSecondaryCursor(u-1),i--}}}}class kee{constructor(){this.type=0}}class Dee{constructor(){this.type=1}}class Eee{constructor(e){this.type=2,this._source=e}hasChanged(e){return this._source.hasChanged(e)}}class Iee{constructor(e,t){this.type=3,this.selections=e,this.modelSelections=t}}class kf{constructor(e){this.type=4,e?(this.affectsMinimap=e.affectsMinimap,this.affectsOverviewRuler=e.affectsOverviewRuler):(this.affectsMinimap=!0,this.affectsOverviewRuler=!0)}}class Ew{constructor(){this.type=5}}class Nee{constructor(e){this.type=6,this.isFocused=e}}class Tee{constructor(){this.type=7}}class Iw{constructor(){this.type=8}}class o4{constructor(e,t){this.type=9,this.fromLineNumber=e,this.toLineNumber=t}}class HD{constructor(e,t){this.type=10,this.fromLineNumber=e,this.toLineNumber=t}}class zD{constructor(e,t){this.type=11,this.fromLineNumber=e,this.toLineNumber=t}}class Nw{constructor(e,t,i,n,s,o){this.type=12,this.source=e,this.range=t,this.selections=i,this.verticalType=n,this.revealHorizontal=s,this.scrollType=o}}class Aee{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 Ree{constructor(){this.type=14}}class Mee{constructor(e){this.type=15,this.ranges=e}}class Pee{constructor(){this.type=16}}class Oee{constructor(){this.type=17}}class Fee extends Y{constructor(){super();this._onEvent=this._register(new H),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;t<i;t++)if(this._outgoingEvents[t].kind===e.kind){this._outgoingEvents[t]=this._outgoingEvents[t].merge(e);return}this._outgoingEvents.push(e)}_emitOutgoingEvents(){for(;this._outgoingEvents.length>0;){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;t<i;t++)this._eventHandlers[t]===e&&console.warn("Detected duplicate listener in ViewEventDispatcher",e);this._eventHandlers.push(e)}removeViewEventHandler(e){for(let t=0;t<this._eventHandlers.length;t++)if(this._eventHandlers[t]===e){this._eventHandlers.splice(t,1);break}}beginEmitViewEvents(){return this._collectorCnt++,this._collectorCnt===1&&(this._collector=new Bee),this._collector}endEmitViewEvents(){if(this._collectorCnt--,this._collectorCnt===0){const e=this._collector.outgoingEvents,t=this._collector.viewEvents;this._collector=null;for(const i of e)this._addOutgoingEvent(i);t.length>0&&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 Bee{constructor(){this.viewEvents=[],this.outgoingEvents=[]}emitViewEvent(e){this.viewEvents.push(e)}emitOutgoingEvent(e){this.outgoingEvents.push(e)}}class $D{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}merge(e){return e.kind!==0?this:new $D(this._oldContentWidth,this._oldContentHeight,e.contentWidth,e.contentHeight)}}class UD{constructor(e,t){this.kind=1,this.oldHasFocus=e,this.hasFocus=t}isNoOp(){return this.oldHasFocus===this.hasFocus}merge(e){return e.kind!==1?this:new UD(this.oldHasFocus,e.hasFocus)}}class jD{constructor(e,t,i,n,s,o,a,l){this.kind=2,this._oldScrollWidth=e,this._oldScrollLeft=t,this._oldScrollHeight=i,this._oldScrollTop=n,this.scrollWidth=s,this.scrollLeft=o,this.scrollHeight=a,this.scrollTop=l,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}merge(e){return e.kind!==2?this:new jD(this._oldScrollWidth,this._oldScrollLeft,this._oldScrollHeight,this._oldScrollTop,e.scrollWidth,e.scrollLeft,e.scrollHeight,e.scrollTop)}}class Wee{constructor(){this.kind=3}isNoOp(){return!1}merge(e){return this}}class Tw{constructor(e,t,i,n,s,o,a){this.kind=5,this.oldSelections=e,this.selections=t,this.oldModelVersionId=i,this.modelVersionId=n,this.source=s,this.reason=o,this.reachedMaxCursorCount=a}static _selectionsAreEqual(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;const i=e.length,n=t.length;if(i!==n)return!1;for(let s=0;s<i;s++)if(!e[s].equalsSelection(t[s]))return!1;return!0}isNoOp(){return Tw._selectionsAreEqual(this.oldSelections,this.selections)&&this.oldModelVersionId===this.modelVersionId}merge(e){return e.kind!==5?this:new Tw(this.oldSelections,e.selections,this.oldModelVersionId,e.modelVersionId,e.source,e.reason,this.reachedMaxCursorCount||e.reachedMaxCursorCount)}}class Vee{constructor(){this.kind=4}isNoOp(){return!1}merge(e){return this}}class KD{constructor(e,t){this.modelVersionId=e.getVersionId(),this.cursorState=t.getCursorStates()}equals(e){if(!e||this.modelVersionId!==e.modelVersionId||this.cursorState.length!==e.cursorState.length)return!1;for(let t=0,i=this.cursorState.length;t<i;t++)if(!this.cursorState[t].equals(e.cursorState[t]))return!1;return!0}}class a4{constructor(e,t,i){this._model=e,this._autoClosedCharactersDecorations=t,this._autoClosedEnclosingDecorations=i}static getAllAutoClosedCharacters(e){let t=[];for(const i of e)t=t.concat(i.getAutoClosedCharactersRanges());return t}dispose(){this._autoClosedCharactersDecorations=this._model.deltaDecorations(this._autoClosedCharactersDecorations,[]),this._autoClosedEnclosingDecorations=this._model.deltaDecorations(this._autoClosedEnclosingDecorations,[])}getAutoClosedCharactersRanges(){let e=[];for(let t=0;t<this._autoClosedCharactersDecorations.length;t++){const i=this._model.getDecorationRange(this._autoClosedCharactersDecorations[t]);i&&e.push(i)}return e}isValid(e){let t=[];for(let i=0;i<this._autoClosedEnclosingDecorations.length;i++){const n=this._model.getDecorationRange(this._autoClosedEnclosingDecorations[i]);if(n&&(t.push(n),n.startLineNumber!==n.endLineNumber))return!1}t.sort(k.compareRangesUsingStarts),e.sort(k.compareRangesUsingStarts);for(let i=0;i<e.length;i++)if(i>=t.length||!t[i].strictContainsRange(e[i]))return!1;return!0}}class Df extends Y{constructor(e,t,i,n){super();this._model=e,this._knownModelVersionId=this._model.getVersionId(),this._viewModel=t,this._coordinatesConverter=i,this.context=new RF(this._model,this._viewModel,this._coordinatesConverter,n),this._cursors=new s4(this.context),this._hasFocus=!1,this._isHandling=!1,this._isDoingComposition=!1,this._selectionsWhenCompositionStarted=null,this._columnSelectData=null,this._autoClosedActions=[],this._prevEditOperationType=0}dispose(){this._cursors.dispose(),this._autoClosedActions=ht(this._autoClosedActions),super.dispose()}updateConfiguration(e){this.context=new RF(this._model,this._viewModel,this._coordinatesConverter,e),this._cursors.updateContext(this.context)}onLineMappingChanged(e){this._knownModelVersionId===this._model.getVersionId()&&this.setStates(e,"viewModel",0,this.getCursorStates())}setHasFocus(e){this._hasFocus=e}_validateAutoClosedActions(){if(this._autoClosedActions.length>0){let e=this._cursors.getSelections();for(let t=0;t<this._autoClosedActions.length;t++){const i=this._autoClosedActions[t];i.isValid(e)||(i.dispose(),this._autoClosedActions.splice(t,1),t--)}}}getPrimaryCursorState(){return this._cursors.getPrimaryCursor()}getLastAddedCursorIndex(){return this._cursors.getLastAddedCursorIndex()}getCursorStates(){return this._cursors.getAll()}setStates(e,t,i,n){let s=!1;n!==null&&n.length>Df.MAX_CURSOR_COUNT&&(n=n.slice(0,Df.MAX_CURSOR_COUNT),s=!0);const o=new KD(this._model,this);return this._cursors.setStates(n),this._cursors.normalize(),this._columnSelectData=null,this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,t,i,o,s)}setCursorColumnSelectData(e){this._columnSelectData=e}revealPrimary(e,t,i,n){const s=this._cursors.getViewPositions();if(s.length>1){this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),0,i,n);return}else{const o=s[0],a=new k(o.lineNumber,o.column,o.lineNumber,o.column);this._emitCursorRevealRange(e,t,a,null,0,i,n)}}_revealPrimaryCursor(e,t,i,n,s){const o=this._cursors.getViewPositions();if(o.length>1)this._emitCursorRevealRange(e,t,null,this._cursors.getViewSelections(),i,n,s);else{const a=o[0],l=new k(a.lineNumber,a.column,a.lineNumber,a.column);this._emitCursorRevealRange(e,t,l,null,i,n,s)}}_emitCursorRevealRange(e,t,i,n,s,o,a){e.emitViewEvent(new Nw(t,i,n,s,o,a))}saveState(){let e=[];const t=this._cursors.getSelections();for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push({inSelectionMode:!s.isEmpty(),selectionStart:{lineNumber:s.selectionStartLineNumber,column:s.selectionStartColumn},position:{lineNumber:s.positionLineNumber,column:s.positionColumn}})}return e}restoreState(e,t){let i=[];for(let n=0,s=t.length;n<s;n++){const o=t[n];let a=1,l=1;o.position&&o.position.lineNumber&&(a=o.position.lineNumber),o.position&&o.position.column&&(l=o.position.column);let c=a,h=l;o.selectionStart&&o.selectionStart.lineNumber&&(c=o.selectionStart.lineNumber),o.selectionStart&&o.selectionStart.column&&(h=o.selectionStart.column),i.push({selectionStartLineNumber:c,selectionStartColumn:h,positionLineNumber:a,positionColumn:l})}this.setStates(e,"restoreState",0,qe.fromModelSelections(i)),this.revealPrimary(e,"restoreState",!0,1)}onModelContentChanged(e,t){if(t instanceof PO){if(this._isHandling)return;this._isHandling=!0;try{this.setStates(e,"modelChange",0,this.getCursorStates())}finally{this._isHandling=!1}}else{if(this._knownModelVersionId=t.versionId,this._isHandling)return;const i=t.containsEvent(1);if(this._prevEditOperationType=0,i)this._cursors.dispose(),this._cursors=new s4(this.context),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(e,"model",1,null,!1);else if(this._hasFocus&&t.resultingSelection&&t.resultingSelection.length>0){const n=qe.fromModelSelections(t.resultingSelection);this.setStates(e,"modelChange",t.isUndoing?5:t.isRedoing?6:2,n)&&this._revealPrimaryCursor(e,"modelChange",0,!0,0)}else{const n=this._cursors.readSelectionFromMarkers();this.setStates(e,"modelChange",2,qe.fromModelSelections(n))}}}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:Ot.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,t),toViewLineNumber:i.lineNumber,toViewVisualColumn:Ot.visibleColumnFromColumn2(this.context.cursorConfig,this._viewModel,i)}}getSelections(){return this._cursors.getSelections()}setSelections(e,t,i,n){this.setStates(e,t,n,qe.fromModelSelections(i))}getPrevEditOperationType(){return this._prevEditOperationType}setPrevEditOperationType(e){this._prevEditOperationType=e}_pushAutoClosedAction(e,t){let i=[],n=[];for(let a=0,l=e.length;a<l;a++)i.push({range:e[a],options:{description:"auto-closed-character",inlineClassName:"auto-closed-character",stickiness:1}}),n.push({range:t[a],options:{description:"auto-closed-enclosing",stickiness:1}});const s=this._model.deltaDecorations([],i),o=this._model.deltaDecorations([],n);this._autoClosedActions.push(new a4(this._model,s,o))}_executeEditOperation(e){if(!e)return;e.shouldPushStackElementBefore&&this._model.pushStackElement();const t=Hee.executeCommands(this._model,this._cursors.getSelections(),e.commands);if(t){this._interpretCommandResult(t);let i=[],n=[];for(let s=0;s<e.commands.length;s++){const o=e.commands[s];o instanceof BF&&o.enclosingRange&&o.closeCharacterRange&&(i.push(o.closeCharacterRange),n.push(o.enclosingRange))}i.length>0&&this._pushAutoClosedAction(i,n),this._prevEditOperationType=e.type}e.shouldPushStackElementAfter&&this._model.pushStackElement()}_interpretCommandResult(e){(!e||e.length===0)&&(e=this._cursors.readSelectionFromMarkers()),this._columnSelectData=null,this._cursors.setSelections(e),this._cursors.normalize()}_emitStateChangedIfNecessary(e,t,i,n,s){const o=new KD(this._model,this);if(o.equals(n))return!1;const a=this._cursors.getSelections(),l=this._cursors.getViewSelections();if(e.emitViewEvent(new Iee(l,a)),!n||n.cursorState.length!==o.cursorState.length||o.cursorState.some((c,h)=>!c.modelState.equals(n.cursorState[h].modelState))){const c=n?n.cursorState.map(u=>u.modelState.selection):null,h=n?n.modelVersionId:0;e.emitOutgoingEvent(new Tw(c,a,h,o.modelVersionId,t||"keyboard",i,s))}return!0}_findAutoClosingPairs(e){if(!e.length)return null;let t=[];for(let i=0,n=e.length;i<n;i++){const s=e[i];if(!s.text||s.text.indexOf(` -`)>=0)return null;const o=s.text.match(/([)\]}>'"`])([^)\]}>'"`]*)$/);if(!o)return null;const a=o[1],l=this.context.cursorConfig.autoClosingPairs.autoClosingPairsCloseSingleChar.get(a);if(!l||l.length!==1)return null;const c=l[0].open,h=s.text.length-o[2].length-1,u=s.text.lastIndexOf(c,h-1);if(u===-1)return null;t.push([u,h])}return t}executeEdits(e,t,i,n){let s=null;t==="snippet"&&(s=this._findAutoClosingPairs(i)),s&&(i[0]._isTracked=!0);let o=[],a=[];const l=this._model.pushEditOperations(this.getSelections(),i,c=>{if(s)for(let u=0,d=s.length;u<d;u++){const[f,g]=s[u],p=c[u],_=p.range.startLineNumber,v=p.range.startColumn-1+f,b=p.range.startColumn-1+g;o.push(new k(_,b+1,_,b+2)),a.push(new k(_,v+1,_,b+2))}const h=n(c);return h&&(this._isHandling=!0),h});l&&(this._isHandling=!1,this.setSelections(e,t,l,0)),o.length>0&&this._pushAutoClosedAction(o,a)}_executeEdit(e,t,i,n=0){if(this.context.cursorConfig.readOnly)return;const s=new KD(this._model,this);this._cursors.stopTrackingSelections(),this._isHandling=!0;try{this._cursors.ensureValidState(),e()}catch(o){Oe(o)}this._isHandling=!1,this._cursors.startTrackingSelections(),this._validateAutoClosedActions(),this._emitStateChangedIfNecessary(t,i,n,s,!1)&&this._revealPrimaryCursor(t,i,0,!0,0)}setIsDoingComposition(e){this._isDoingComposition=e}getAutoClosedCharacters(){return a4.getAllAutoClosedCharacters(this._autoClosedActions)}startComposition(e){this._selectionsWhenCompositionStarted=this.getSelections().slice(0)}endComposition(e,t){this._executeEdit(()=>{t==="keyboard"&&(this._executeEditOperation(Xt.compositionEndWithInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this._selectionsWhenCompositionStarted,this.getSelections(),this.getAutoClosedCharacters())),this._selectionsWhenCompositionStarted=null)},e,t)}type(e,t,i){this._executeEdit(()=>{if(i==="keyboard"){const n=t.length;let s=0;for(;s<n;){const o=uv(t,s),a=t.substr(s,o);this._executeEditOperation(Xt.typeWithInterceptors(this._isDoingComposition,this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),this.getAutoClosedCharacters(),a)),s+=o}}else this._executeEditOperation(Xt.typeWithoutInterceptors(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t))},e,i)}compositionType(e,t,i,n,s,o){if(t.length===0&&i===0&&n===0){if(s!==0){const a=this.getSelections().map(l=>{const c=l.getPosition();return new be(c.lineNumber,c.column+s,c.lineNumber,c.column+s)});this.setSelections(e,o,a,0)}return}this._executeEdit(()=>{this._executeEditOperation(Xt.compositionType(this._prevEditOperationType,this.context.cursorConfig,this._model,this.getSelections(),t,i,n,s))},e,o)}paste(e,t,i,n,s){this._executeEdit(()=>{this._executeEditOperation(Xt.paste(this.context.cursorConfig,this._model,this.getSelections(),t,i,n||[]))},e,s,4)}cut(e,t){this._executeEdit(()=>{this._executeEditOperation(Qh.cut(this.context.cursorConfig,this._model,this.getSelections()))},e,t)}executeCommand(e,t,i){this._executeEdit(()=>{this._cursors.killSecondaryCursors(),this._executeEditOperation(new mr(0,[t],{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}executeCommands(e,t,i){this._executeEdit(()=>{this._executeEditOperation(new mr(0,t,{shouldPushStackElementBefore:!1,shouldPushStackElementAfter:!1}))},e,i)}}Df.MAX_CURSOR_COUNT=1e4;class Hee{static executeCommands(e,t,i){const n={model:e,selectionsBefore:t,trackedRanges:[],trackedRangesDirection:[]},s=this._innerExecuteCommands(n,i);for(let o=0,a=n.trackedRanges.length;o<a;o++)n.model._setTrackedRange(n.trackedRanges[o],null,0);return s}static _innerExecuteCommands(e,t){if(this._arrayIsEmpty(t))return null;const i=this._getEditOperations(e,t);if(i.operations.length===0)return null;const n=i.operations,s=this._getLoserCursorMap(n);if(s.hasOwnProperty("0"))return console.warn("Ignoring commands"),null;let o=[];for(let c=0,h=n.length;c<h;c++)s.hasOwnProperty(n[c].identifier.major.toString())||o.push(n[c]);i.hadTrackedEditOperation&&o.length>0&&(o[0]._isTracked=!0);let a=e.model.pushEditOperations(e.selectionsBefore,o,c=>{let h=[];for(let f=0;f<e.selectionsBefore.length;f++)h[f]=[];for(const f of c)!f.identifier||h[f.identifier.major].push(f);const u=(f,g)=>f.identifier.minor-g.identifier.minor;let d=[];for(let f=0;f<e.selectionsBefore.length;f++)h[f].length>0?(h[f].sort(u),d[f]=t[f].computeCursorState(e.model,{getInverseEditOperations:()=>h[f],getTrackedSelection:g=>{const p=parseInt(g,10),_=e.model._getTrackedRange(e.trackedRanges[p]);return e.trackedRangesDirection[p]===0?new be(_.startLineNumber,_.startColumn,_.endLineNumber,_.endColumn):new be(_.endLineNumber,_.endColumn,_.startLineNumber,_.startColumn)}})):d[f]=e.selectionsBefore[f];return d});a||(a=e.selectionsBefore);let l=[];for(let c in s)s.hasOwnProperty(c)&&l.push(parseInt(c,10));l.sort((c,h)=>h-c);for(const c of l)a.splice(c,1);return a}static _arrayIsEmpty(e){for(let t=0,i=e.length;t<i;t++)if(e[t])return!1;return!0}static _getEditOperations(e,t){let i=[],n=!1;for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a){const l=this._getEditOperationsFromCommand(e,s,a);i=i.concat(l.operations),n=n||l.hadTrackedEditOperation}}return{operations:i,hadTrackedEditOperation:n}}static _getEditOperationsFromCommand(e,t,i){let n=[],s=0;const o=(u,d,f=!1)=>{k.isEmpty(u)&&d===""||n.push({identifier:{major:t,minor:s++},range:u,text:d,forceMoveMarkers:f,isAutoWhitespaceEdit:i.insertsAutoWhitespace})};let a=!1;const h={addEditOperation:o,addTrackedEditOperation:(u,d,f)=>{a=!0,o(u,d,f)},trackSelection:(u,d)=>{const f=be.liftSelection(u);let g;if(f.isEmpty())if(typeof d=="boolean")d?g=2:g=3;else{const v=e.model.getLineMaxColumn(f.startLineNumber);f.startColumn===v?g=2:g=3}else g=1;const p=e.trackedRanges.length,_=e.model._setTrackedRange(null,f,g);return e.trackedRanges[p]=_,e.trackedRangesDirection[p]=f.getDirection(),p.toString()}};try{i.getEditOperations(e.model,h)}catch(u){return Oe(u),{operations:[],hadTrackedEditOperation:!1}}return{operations:n,hadTrackedEditOperation:a}}static _getLoserCursorMap(e){e=e.slice(0),e.sort((i,n)=>-k.compareRangesUsingEnds(i.range,n.range));let t={};for(let i=1;i<e.length;i++){const n=e[i-1],s=e[i];if(k.getStartPosition(n.range).isBefore(k.getEndPosition(s.range))){let o;n.identifier.major>s.identifier.major?o=n.identifier.major:o=s.identifier.major,t[o.toString()]=!0;for(let a=0;a<e.length;a++)e[a].identifier.major===o&&(e.splice(a,1),a<i&&i--,a--);i>0&&i--}}return t}}class l4{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(){return this.isSupported()?this._run():Promise.resolve(void 0)}}const c4={getInitialState:()=>Lp,tokenize2:(r,e,t,i)=>Sx(0,r,t,i)};function h4(r,e=c4){return $ee(r,e||c4)}function zee(r,e,t,i,n,s,o){let a="<div>",l=i,c=0,h=!0;for(let u=0,d=e.getCount();u<d;u++){const f=e.getEndOffset(u);if(f<=i)continue;let g="";for(;l<f&&l<n;l++){const p=r.charCodeAt(l);switch(p){case 9:let _=s-(l+c)%s;for(c+=_-1;_>0;)o&&h?(g+=" ",h=!1):(g+=" ",h=!0),_--;break;case 60:g+="<",h=!1;break;case 62:g+=">",h=!1;break;case 38:g+="&",h=!1;break;case 0:g+="�",h=!1;break;case 65279:case 8232:case 8233:case 133:g+="\uFFFD",h=!1;break;case 13:g+="​",h=!1;break;case 32:o&&h?(g+=" ",h=!1):(g+=" ",h=!0);break;default:g+=String.fromCharCode(p),h=!1}}if(a+=`<span style="${e.getInlineStyle(u,t)}">${g}</span>`,f>n||l>=n)break}return a+="</div>",a}function $ee(r,e){let t='<div class="monaco-tokenized-source">',i=Bo(r),n=e.getInitialState();for(let s=0,o=i.length;s<o;s++){let a=i[s];s>0&&(t+="<br/>");let l=e.tokenize2(a,!0,n,0);Ki.convertToEndOffset(l.tokens,a.length);let h=new Ki(l.tokens,a).inflate(),u=0;for(let d=0,f=h.getCount();d<f;d++){const g=h.getClassName(d),p=h.getEndOffset(d);t+=`<span class="${g}">${zL(a.substring(u,p))}</span>`,u=p}n=l.endState}return t+="</div>",t}class Uee{constructor(){this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[]}insert(e){this._hasPending=!0,this._inserts.push(e)}change(e){this._hasPending=!0,this._changes.push(e)}remove(e){this._hasPending=!0,this._removes.push(e)}mustCommit(){return this._hasPending}commit(e){if(!this._hasPending)return;const t=this._inserts,i=this._changes,n=this._removes;this._hasPending=!1,this._inserts=[],this._changes=[],this._removes=[],e._commitPendingChanges(t,i,n)}}class jee{constructor(e,t,i,n,s){this.id=e,this.afterLineNumber=t,this.ordinal=i,this.height=n,this.minWidth=s,this.prefixSum=0}}class Sm{constructor(e,t,i,n){this._instanceId=h2(++Sm.INSTANCE_COUNT),this._pendingChanges=new Uee,this._lastWhitespaceId=0,this._arr=[],this._prefixSumValidIndex=-1,this._minWidth=-1,this._lineCount=e,this._lineHeight=t,this._paddingTop=i,this._paddingBottom=n}static findInsertionIndex(e,t,i){let n=0,s=e.length;for(;n<s;){const o=n+s>>>1;t===e[o].afterLineNumber?i<e[o].ordinal?s=o:n=o+1:t<e[o].afterLineNumber?s=o:n=o+1}return n}setLineHeight(e){this._checkPendingChanges(),this._lineHeight=e}setPadding(e,t){this._paddingTop=e,this._paddingBottom=t}onFlushed(e){this._checkPendingChanges(),this._lineCount=e}changeWhitespace(e){let t=!1;try{e({insertWhitespace:(n,s,o,a)=>{t=!0,n=n|0,s=s|0,o=o|0,a=a|0;const l=this._instanceId+ ++this._lastWhitespaceId;return this._pendingChanges.insert(new jee(l,n,s,o,a)),l},changeOneWhitespace:(n,s,o)=>{t=!0,s=s|0,o=o|0,this._pendingChanges.change({id:n,newAfterLineNumber:s,newHeight:o})},removeWhitespace:n=>{t=!0,this._pendingChanges.remove({id:n})}})}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 l of e)this._insertWhitespace(l);for(const l of t)this._changeOneWhitespace(l.id,l.newAfterLineNumber,l.newHeight);for(const l of i){const c=this._findWhitespaceIndex(l.id);c!==-1&&this._removeWhitespace(c)}return}const n=new Set;for(const l of i)n.add(l.id);const s=new Map;for(const l of t)s.set(l.id,l);const o=l=>{let c=[];for(const h of l)if(!n.has(h.id)){if(s.has(h.id)){const u=s.get(h.id);h.afterLineNumber=u.newAfterLineNumber,h.height=u.newHeight}c.push(h)}return c},a=o(this._arr).concat(o(e));a.sort((l,c)=>l.afterLineNumber===c.afterLineNumber?l.ordinal-c.ordinal:l.afterLineNumber-c.afterLineNumber),this._arr=a,this._prefixSumValidIndex=-1}_checkPendingChanges(){this._pendingChanges.mustCommit()&&this._pendingChanges.commit(this)}_insertWhitespace(e){const t=Sm.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;i<n;i++)if(t[i].id===e)return i;return-1}_changeOneWhitespace(e,t,i){const n=this._findWhitespaceIndex(e);if(n!==-1&&(this._arr[n].height!==i&&(this._arr[n].height=i,this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,n-1)),this._arr[n].afterLineNumber!==t)){const s=this._arr[n];this._removeWhitespace(n),s.afterLineNumber=t,this._insertWhitespace(s)}}_removeWhitespace(e){this._arr.splice(e,1),this._prefixSumValidIndex=Math.min(this._prefixSumValidIndex,e-1)}onLinesDeleted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount-=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const s=this._arr[i].afterLineNumber;e<=s&&s<=t?this._arr[i].afterLineNumber=e-1:s>t&&(this._arr[i].afterLineNumber-=t-e+1)}}onLinesInserted(e,t){this._checkPendingChanges(),e=e|0,t=t|0,this._lineCount+=t-e+1;for(let i=0,n=this._arr.length;i<n;i++){const s=this._arr[i].afterLineNumber;e<=s&&(this._arr[i].afterLineNumber+=t-e+1)}}getWhitespacesTotalHeight(){return this._checkPendingChanges(),this._arr.length===0?0:this.getWhitespacesAccumulatedHeight(this._arr.length-1)}getWhitespacesAccumulatedHeight(e){this._checkPendingChanges(),e=e|0;let t=Math.max(0,this._prefixSumValidIndex+1);t===0&&(this._arr[0].prefixSum=this._arr[0].height,t++);for(let i=t;i<=e;i++)this._arr[i].prefixSum=this._arr[i-1].prefixSum+this._arr[i].height;return this._prefixSumValidIndex=Math.max(this._prefixSumValidIndex,e),this._arr[e].prefixSum}getLinesTotalHeight(){this._checkPendingChanges();const e=this._lineHeight*this._lineCount,t=this.getWhitespacesTotalHeight();return e+t+this._paddingTop+this._paddingBottom}getWhitespaceAccumulatedHeightBeforeLineNumber(e){this._checkPendingChanges(),e=e|0;const t=this._findLastWhitespaceBeforeLineNumber(e);return t===-1?0:this.getWhitespacesAccumulatedHeight(t)}_findLastWhitespaceBeforeLineNumber(e){e=e|0;const t=this._arr;let i=0,n=t.length-1;for(;i<=n;){const o=(n-i|0)/2|0,a=i+o|0;if(t[a].afterLineNumber<e){if(a+1>=t.length||t[a+1].afterLineNumber>=e)return a;i=a+1|0}else n=a-1|0}return-1}_findFirstWhitespaceAfterLineNumber(e){e=e|0;const i=this._findLastWhitespaceBeforeLineNumber(e)+1;return i<this._arr.length?i:-1}getFirstWhitespaceIndexAfterLineNumber(e){return this._checkPendingChanges(),e=e|0,this._findFirstWhitespaceAfterLineNumber(e)}getVerticalOffsetForLineNumber(e){this._checkPendingChanges(),e=e|0;let t;e>1?t=this._lineHeight*(e-1):t=0;const i=this.getWhitespaceAccumulatedHeightBeforeLineNumber(e);return t+i+this._paddingTop}getWhitespaceMinWidth(){if(this._checkPendingChanges(),this._minWidth===-1){let e=0;for(let t=0,i=this._arr.length;t<i;t++)e=Math.max(e,this._arr[t].minWidth);this._minWidth=e}return this._minWidth}isAfterLines(e){this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>t}isInTopPadding(e){return this._paddingTop===0?!1:(this._checkPendingChanges(),e<this._paddingTop)}isInBottomPadding(e){if(this._paddingBottom===0)return!1;this._checkPendingChanges();const t=this.getLinesTotalHeight();return e>=t-this._paddingBottom}getLineNumberAtOrAfterVerticalOffset(e){if(this._checkPendingChanges(),e=e|0,e<0)return 1;const t=this._lineCount|0,i=this._lineHeight;let n=1,s=t;for(;n<s;){const o=(n+s)/2|0,a=this.getVerticalOffsetForLineNumber(o)|0;if(e>=a+i)n=o+1;else{if(e>=a)return o;s=o}}return n>t?t:n}getLinesViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this._lineHeight,n=this.getLineNumberAtOrAfterVerticalOffset(e)|0,s=this.getVerticalOffsetForLineNumber(n)|0;let o=this._lineCount|0,a=this.getFirstWhitespaceIndexAfterLineNumber(n)|0;const l=this.getWhitespacesCount()|0;let c,h;a===-1?(a=l,h=o+1,c=0):(h=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);let u=s,d=u;const f=5e5;let g=0;s>=f&&(g=Math.floor(s/f)*f,g=Math.floor(g/i)*i,d-=g);const p=[],_=e+(t-e)/2;let v=-1;for(let x=n;x<=o;x++){if(v===-1){const S=u,w=u+i;(S<=_&&_<w||S>_)&&(v=x)}for(u+=i,p[x-n]=d,d+=i;h===x;)d+=c,u+=c,a++,a>=l?h=o+1:(h=this.getAfterLineNumberForWhitespaceIndex(a)|0,c=this.getHeightForWhitespaceIndex(a)|0);if(u>=t){o=x;break}}v===-1&&(v=o);const b=this.getVerticalOffsetForLineNumber(o)|0;let C=n,y=o;return C<y&&s<e&&C++,C<y&&b+i>t&&y--,{bigNumbersDelta:g,startLineNumber:n,endLineNumber:o,relativeVerticalOffset:p,centeredLineNumber:v,completelyVisibleStartLineNumber:C,completelyVisibleEndLineNumber:y}}getVerticalOffsetForWhitespaceIndex(e){this._checkPendingChanges(),e=e|0;const t=this.getAfterLineNumberForWhitespaceIndex(e);let i;t>=1?i=this._lineHeight*t:i=0;let n;return e>0?n=this.getWhitespacesAccumulatedHeight(e-1):n=0,i+n+this._paddingTop}getWhitespaceIndexAtOrAfterVerticallOffset(e){this._checkPendingChanges(),e=e|0;let t=0,i=this.getWhitespacesCount()-1;if(i<0)return-1;const n=this.getVerticalOffsetForWhitespaceIndex(i),s=this.getHeightForWhitespaceIndex(i);if(e>=n+s)return-1;for(;t<i;){const o=Math.floor((t+i)/2),a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(e>=a+l)t=o+1;else{if(e>=a)return o;i=o}}return t}getWhitespaceAtVerticalOffset(e){this._checkPendingChanges(),e=e|0;const t=this.getWhitespaceIndexAtOrAfterVerticallOffset(e);if(t<0||t>=this.getWhitespacesCount())return null;const i=this.getVerticalOffsetForWhitespaceIndex(t);if(i>e)return null;const n=this.getHeightForWhitespaceIndex(t),s=this.getIdForWhitespaceIndex(t),o=this.getAfterLineNumberForWhitespaceIndex(t);return{id:s,afterLineNumber:o,verticalOffset:i,height:n}}getWhitespaceViewportData(e,t){this._checkPendingChanges(),e=e|0,t=t|0;const i=this.getWhitespaceIndexAtOrAfterVerticallOffset(e),n=this.getWhitespacesCount()-1;if(i<0)return[];let s=[];for(let o=i;o<=n;o++){const a=this.getVerticalOffsetForWhitespaceIndex(o),l=this.getHeightForWhitespaceIndex(o);if(a>=t)break;s.push({id:this.getIdForWhitespaceIndex(o),afterLineNumber:this.getAfterLineNumberForWhitespaceIndex(o),verticalOffset:a,height:l})}return s}getWhitespaces(){return this._checkPendingChanges(),this._arr.slice(0)}getWhitespacesCount(){return this._checkPendingChanges(),this._arr.length}getIdForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].id}getAfterLineNumberForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].afterLineNumber}getHeightForWhitespaceIndex(e){return this._checkPendingChanges(),e=e|0,this._arr[e].height}}Sm.INSTANCE_COUNT=0;const Kee=125;class Lm{constructor(e,t,i,n){e=e|0,t=t|0,i=i|0,n=n|0,e<0&&(e=0),t<0&&(t=0),i<0&&(i=0),n<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 qee extends Y{constructor(e,t){super();this._onDidContentSizeChange=this._register(new H),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._dimensions=new Lm(0,0,0,0),this._scrollable=this._register(new ww(e,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 $D(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)}}class Gee extends Y{constructor(e,t,i){super();this._configuration=e;const n=this._configuration.options,s=n.get(129),o=n.get(74);this._linesLayout=new Sm(t,n.get(58),o.top,o.bottom),this._scrollable=this._register(new qee(0,i)),this._configureSmoothScrollDuration(),this._scrollable.setScrollDimensions(new Lm(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(102)?Kee:0)}onConfigurationChanged(e){const t=this._configuration.options;if(e.hasChanged(58)&&this._linesLayout.setLineHeight(t.get(58)),e.hasChanged(74)){const i=t.get(74);this._linesLayout.setPadding(i.top,i.bottom)}if(e.hasChanged(129)){const i=t.get(129),n=i.contentWidth,s=i.height,o=this._scrollable.getScrollDimensions(),a=o.contentWidth;this._scrollable.setScrollDimensions(new Lm(n,o.contentWidth,s,this._getContentHeight(n,s,a)))}else this._updateHeight();e.hasChanged(102)&&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 n=this._configuration.options.get(91);return n.horizontal===2||e>=t?0:n.horizontalScrollbarSize}_getContentHeight(e,t,i){const n=this._configuration.options;let s=this._linesLayout.getLinesTotalHeight();return n.get(93)?s+=Math.max(0,t-n.get(58)-n.get(74).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 Lm(t,e.contentWidth,i,this._getContentHeight(t,i,n)))}getCurrentViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getCurrentScrollPosition();return new bP(t.scrollTop,t.scrollLeft,e.width,e.height)}getFutureViewport(){const e=this._scrollable.getScrollDimensions(),t=this._scrollable.getFutureScrollPosition();return new bP(t.scrollTop,t.scrollLeft,e.width,e.height)}_computeContentWidth(e){const t=this._configuration.options,i=t.get(130),n=t.get(43);if(i.isViewportWrapping){const s=t.get(129),o=t.get(64);return e>s.contentWidth+n.typicalHalfwidthCharacterWidth&&o.enabled&&o.side==="right"?e+s.verticalScrollbarWidth:e}else{const s=t.get(92)*n.typicalHalfwidthCharacterWidth,o=this._linesLayout.getWhitespaceMinWidth();return Math.max(e+s,o)}}setMaxLineWidth(e){const t=this._scrollable.getScrollDimensions();this._scrollable.setScrollDimensions(new Lm(t.width,this._computeContentWidth(e),t.height,t.contentHeight)),this._updateHeight()}saveState(){const e=this._scrollable.getFutureScrollPosition();let t=e.scrollTop,i=this._linesLayout.getLineNumberAtOrAfterVerticalOffset(t),n=this._linesLayout.getWhitespaceAccumulatedHeightBeforeLineNumber(i);return{scrollTop:t,scrollTopWithoutViewZones:t-n,scrollLeft:e.scrollLeft}}changeWhitespace(e){const t=this._linesLayout.changeWhitespace(e);return t&&this.onHeightMaybeChanged(),t}getVerticalOffsetForLineNumber(e){return this._linesLayout.getVerticalOffsetForLineNumber(e)}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){t===1?this._scrollable.setScrollPositionNow(e):this._scrollable.setScrollPositionSmooth(e)}deltaScrollNow(e,t){const i=this._scrollable.getCurrentScrollPosition();this._scrollable.setScrollPositionNow({scrollLeft:i.scrollLeft+e,scrollTop:i.scrollTop+t})}}class Zee{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){return this._lines.convertModelPositionToViewPosition(e.lineNumber,e.column,t)}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)}}class Yee{constructor(e){this._counts=e,this._isValid=!1,this._validEndIndex=-1,this._modelToView=[],this._viewToModel=[]}_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._counts.length;e<t;e++){const i=this._counts[e],n=e>0?this._modelToView[e-1]:0;this._modelToView[e]=n+i;for(let s=0;s<i;s++)this._viewToModel[n+s]=e}this._modelToView.length=this._counts.length,this._viewToModel.length=this._modelToView[this._modelToView.length-1],this._isValid=!0,this._validEndIndex=this._counts.length-1}}changeValue(e,t){this._counts[e]!==t&&(this._counts[e]=t,this._invalidate(e))}removeValues(e,t){this._counts.splice(e,t),this._invalidate(e)}insertValues(e,t){this._counts=Ip(this._counts,e,t),this._invalidate(e)}getTotalValue(){return this._ensureValid(),this._viewToModel.length}getAccumulatedValue(e){return this._ensureValid(),this._modelToView[e]}getIndexOf(e){this._ensureValid();const t=this._viewToModel[e],i=t>0?this._modelToView[t-1]:0;return new rP(t,e-i)}}class Xee{constructor(e,t,i,n,s,o,a,l,c){this._editorId=e,this.model=t,this._validModelVersionId=-1,this._domLineBreaksComputerFactory=i,this._monospaceLineBreaksComputerFactory=n,this.fontInfo=s,this.tabSize=o,this.wrappingStrategy=a,this.wrappingColumn=l,this.wrappingIndent=c,this._constructLines(!0,null)}dispose(){this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,[])}createCoordinatesConverter(){return new Zee(this)}_constructLines(e,t){this.lines=[],e&&(this.hiddenAreasIds=[]);const i=this.model.getLinesContent(),n=this.model.getInjectedTextDecorations(this._editorId),s=i.length,o=this.createLineBreaksComputer(),a=new Np(ao.fromDecorations(n));for(let p=0;p<s;p++){const _=a.takeWhile(v=>v.lineNumber===p+1);o.addRequest(i[p],_,t?t[p]:null)}const l=o.finalize();let c=[],h=this.hiddenAreasIds.map(p=>this.model.getDecorationRange(p)).sort(k.compareRangesUsingStarts),u=1,d=0,f=-1,g=f+1<h.length?d+1:s+2;for(let p=0;p<s;p++){let _=p+1;_===g&&(f++,u=h[f].startLineNumber,d=h[f].endLineNumber,g=f+1<h.length?d+1:s+2);let v=_>=u&&_<=d,b=GD(l[p],!v);c[p]=b.getViewLineCount(),this.lines[p]=b}this._validModelVersionId=this.model.getVersionId(),this.prefixSumComputer=new Yee(c)}getHiddenAreas(){return this.hiddenAreasIds.map(e=>this.model.getDecorationRange(e))}_reduceRanges(e){if(e.length===0)return[];let t=e.map(o=>this.model.validateRange(o)).sort(k.compareRangesUsingStarts),i=[],n=t[0].startLineNumber,s=t[0].endLineNumber;for(let o=1,a=t.length;o<a;o++){let l=t[o];l.startLineNumber>s+1?(i.push(new k(n,1,s,1)),n=l.startLineNumber,s=l.endLineNumber):l.endLineNumber>s&&(s=l.endLineNumber)}return i.push(new k(n,1,s,1)),i}setHiddenAreas(e){let t=this._reduceRanges(e),i=this.hiddenAreasIds.map(u=>this.model.getDecorationRange(u)).sort(k.compareRangesUsingStarts);if(t.length===i.length){let u=!1;for(let d=0;d<t.length;d++)if(!t[d].equalsRange(i[d])){u=!0;break}if(!u)return!1}let n=[];for(const u of t)n.push({range:u,options:Ke.EMPTY});this.hiddenAreasIds=this.model.deltaDecorations(this.hiddenAreasIds,n);let s=t,o=1,a=0,l=-1,c=l+1<s.length?a+1:this.lines.length+2,h=!1;for(let u=0;u<this.lines.length;u++){let d=u+1;d===c&&(l++,o=s[l].startLineNumber,a=s[l].endLineNumber,c=l+1<s.length?a+1:this.lines.length+2);let f=!1;if(d>=o&&d<=a?this.lines[u].isVisible()&&(this.lines[u]=this.lines[u].setVisible(!1),f=!0):(h=!0,this.lines[u].isVisible()||(this.lines[u]=this.lines[u].setVisible(!0),f=!0)),f){let g=this.lines[u].getViewLineCount();this.prefixSumComputer.changeValue(u,g)}}return h||this.setHiddenAreas([]),!0}modelPositionIsVisible(e,t){return e<1||e>this.lines.length?!1:this.lines[e-1].isVisible()}getModelLineViewLineCount(e){return e<1||e>this.lines.length?1:this.lines[e-1].getViewLineCount()}setTabSize(e){return this.tabSize===e?!1:(this.tabSize=e,this._constructLines(!1,null),!0)}setWrappingSettings(e,t,i,n){const s=this.fontInfo.equals(e),o=this.wrappingStrategy===t,a=this.wrappingColumn===i,l=this.wrappingIndent===n;if(s&&o&&a&&l)return!1;const c=s&&o&&!a&&l;this.fontInfo=e,this.wrappingStrategy=t,this.wrappingColumn=i,this.wrappingIndent=n;let h=null;if(c){h=[];for(let u=0,d=this.lines.length;u<d;u++)h[u]=this.lines[u].getLineBreakData()}return this._constructLines(!1,h),!0}createLineBreaksComputer(){return(this.wrappingStrategy==="advanced"?this._domLineBreaksComputerFactory:this._monospaceLineBreaksComputerFactory).createLineBreaksComputer(this.fontInfo,this.tabSize,this.wrappingColumn,this.wrappingIndent)}onModelFlushed(){this._constructLines(!0,null)}onModelLinesDeleted(e,t,i){if(!e||e<=this._validModelVersionId)return null;let n=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,s=this.prefixSumComputer.getAccumulatedValue(i-1);return this.lines.splice(t-1,i-t+1),this.prefixSumComputer.removeValues(t-1,i-t+1),new HD(n,s)}onModelLinesInserted(e,t,i,n){if(!e||e<=this._validModelVersionId)return null;const s=t>2&&!this.lines[t-2].isVisible();let o=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,a=0,l=[],c=[];for(let h=0,u=n.length;h<u;h++){let d=GD(n[h],!s);l.push(d);let f=d.getViewLineCount();a+=f,c[h]=f}return this.lines=this.lines.slice(0,t-1).concat(l).concat(this.lines.slice(t-1)),this.prefixSumComputer.insertValues(t-1,c),new zD(o,o+a-1)}onModelLineChanged(e,t,i){if(e!==null&&e<=this._validModelVersionId)return[!1,null,null,null];let n=t-1,s=this.lines[n].getViewLineCount(),o=this.lines[n].isVisible(),a=GD(i,o);this.lines[n]=a;let l=this.lines[n].getViewLineCount(),c=!1,h=0,u=-1,d=0,f=-1,g=0,p=-1;s>l?(h=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=h+l-1,g=u+1,p=g+(s-l)-1,c=!0):s<l?(h=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=h+s-1,d=u+1,f=d+(l-s)-1,c=!0):(h=t===1?1:this.prefixSumComputer.getAccumulatedValue(t-2)+1,u=h+l-1),this.prefixSumComputer.changeValue(n,l);const _=h<=u?new o4(h,u):null,v=d<=f?new zD(d,f):null,b=g<=p?new HD(g,p):null;return[c,_,v,b]}acceptVersionId(e){this._validModelVersionId=e,this.lines.length===1&&!this.lines[0].isVisible()&&this.setHiddenAreas([])}getViewLineCount(){return this.prefixSumComputer.getTotalValue()}_toValidViewLineNumber(e){if(e<1)return 1;const t=this.getViewLineCount();return e>t?t:e|0}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)),a=this.model.getActiveIndentGuide(n.lineNumber,s.lineNumber,o.lineNumber),l=this.convertModelPositionToViewPosition(a.startLineNumber,1),c=this.convertModelPositionToViewPosition(a.endLineNumber,this.model.getLineMaxColumn(a.endLineNumber));return{startLineNumber:l.lineNumber,endLineNumber:c.lineNumber,indent:a.indent}}getViewLineInfo(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return new u4(i+1,n)}getMinColumnOfViewLine(e){return this.lines[e.modelLineNumber-1].getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx)}getModelStartPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMinColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new $(e.modelLineNumber,n)}getModelEndPositionOfViewLine(e){const t=this.lines[e.modelLineNumber-1],i=t.getViewLineMaxColumn(this.model,e.modelLineNumber,e.modelLineWrappedLineIdx),n=t.getModelColumnOfViewPosition(e.modelLineWrappedLineIdx,i);return new $(e.modelLineNumber,n)}getViewLineInfosGroupedByModelRanges(e,t){const i=this.getViewLineInfo(e),n=this.getViewLineInfo(t),s=new Array;let o=this.getModelStartPositionOfViewLine(i),a=new Array;for(let l=i.modelLineNumber;l<=n.modelLineNumber;l++){const c=this.lines[l-1];if(c.isVisible()){let h=l===i.modelLineNumber?i.modelLineWrappedLineIdx:0,u=l===n.modelLineNumber?n.modelLineWrappedLineIdx+1:c.getViewLineCount();for(let d=h;d<u;d++)a.push(new u4(l,d))}if(!c.isVisible()&&o){const h=new $(l-1,this.model.getLineMaxColumn(l-1)+1),u=k.fromPositions(o,h);s.push(new d4(u,a)),a=[],o=null}else c.isVisible()&&!o&&(o=new $(l,1))}if(o){const l=k.fromPositions(o,this.getModelEndPositionOfViewLine(n));s.push(new d4(l,a))}return s}getViewLinesBracketGuides(e,t,i,n,s){const o=i?this.convertViewPositionToModelPosition(i.lineNumber,i.column):null,a=[];for(const l of this.getViewLineInfosGroupedByModelRanges(e,t)){const c=l.modelRange.startLineNumber,h=this.model.getLinesBracketGuides(c,l.modelRange.endLineNumber,o,n,s);for(const u of l.viewLines)if(u.isWrappedLineContinuation&&this.getMinColumnOfViewLine(u)===1)a.push([]);else{const d=h[u.modelLineNumber-c];a.push(d)}}return a}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=[],o=[],a=[];const l=i.lineNumber-1,c=n.lineNumber-1;let h=null;for(let g=l;g<=c;g++){const p=this.lines[g];if(p.isVisible()){let _=p.getViewLineNumberOfModelPosition(0,g===l?i.column:1),v=p.getViewLineNumberOfModelPosition(0,this.model.getLineMaxColumn(g+1)),b=v-_+1,C=0;b>1&&p.getViewLineMinColumn(this.model,g+1,v)===1&&(C=_===0?1:2),o.push(b),a.push(C),h===null&&(h=new $(g+1,0))}else h!==null&&(s=s.concat(this.model.getLinesIndentGuides(h.lineNumber,g)),h=null)}h!==null&&(s=s.concat(this.model.getLinesIndentGuides(h.lineNumber,n.lineNumber)),h=null);const u=t-e+1;let d=new Array(u),f=0;for(let g=0,p=s.length;g<p;g++){let _=s[g],v=Math.min(u-f,o[g]),b=a[g],C;b===2?C=0:b===1?C=1:C=v;for(let y=0;y<v;y++)y===C&&(_=0),d[f++]=_}return d}getViewLineContent(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineContent(this.model,i+1,n)}getViewLineLength(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineLength(this.model,i+1,n)}getViewLineMinColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMinColumn(this.model,i+1,n)}getViewLineMaxColumn(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineMaxColumn(this.model,i+1,n)}getViewLineData(e){e=this._toValidViewLineNumber(e);let t=this.prefixSumComputer.getIndexOf(e-1),i=t.index,n=t.remainder;return this.lines[i].getViewLineData(this.model,i+1,n)}getViewLinesData(e,t,i){e=this._toValidViewLineNumber(e),t=this._toValidViewLineNumber(t);let n=this.prefixSumComputer.getIndexOf(e-1),s=e,o=n.index,a=n.remainder,l=[];for(let c=o,h=this.model.getLineCount();c<h;c++){let u=this.lines[c];if(!u.isVisible())continue;let d=c===o?a:0,f=u.getViewLineCount()-d,g=!1;s+f>t&&(g=!0,f=t-s+1);let p=d+f;if(u.getViewLinesData(this.model,c+1,d,p,s-e,i,l),s+=f,g)break}return l}validateViewPosition(e,t,i){e=this._toValidViewLineNumber(e);let n=this.prefixSumComputer.getIndexOf(e-1),s=n.index,o=n.remainder,a=this.lines[s],l=a.getViewLineMinColumn(this.model,s+1,o),c=a.getViewLineMaxColumn(this.model,s+1,o);t<l&&(t=l),t>c&&(t=c);let h=a.getModelColumnOfViewPosition(o,t);return this.model.validatePosition(new $(s+1,h)).equals(i)?new $(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 k(i.lineNumber,i.column,n.lineNumber,n.column)}convertViewPositionToModelPosition(e,t){e=this._toValidViewLineNumber(e);let i=this.prefixSumComputer.getIndexOf(e-1),n=i.index,s=i.remainder,o=this.lines[n].getModelColumnOfViewPosition(s,t);return this.model.validatePosition(new $(n+1,o))}convertViewRangeToModelRange(e){const t=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),i=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);return new k(t.lineNumber,t.column,i.lineNumber,i.column)}convertModelPositionToViewPosition(e,t,i=2){const n=this.model.validatePosition(new $(e,t)),s=n.lineNumber,o=n.column;let a=s-1,l=!1;for(;a>0&&!this.lines[a].isVisible();)a--,l=!0;if(a===0&&!this.lines[a].isVisible())return new $(1,1);const c=1+(a===0?0:this.prefixSumComputer.getAccumulatedValue(a-1));let h;return l?h=this.lines[a].getViewPositionOfModelPosition(c,this.model.getLineMaxColumn(a+1),i):h=this.lines[s-1].getViewPositionOfModelPosition(c,o,i),h}convertModelRangeToViewRange(e,t=0){if(e.isEmpty()){const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,t);return k.fromPositions(i)}else{const i=this.convertModelPositionToViewPosition(e.startLineNumber,e.startColumn,1),n=this.convertModelPositionToViewPosition(e.endLineNumber,e.endColumn,0);return new k(i.lineNumber,i.column,n.lineNumber,n.column)}}_getViewLineNumberForModelPosition(e,t){let i=e-1;if(this.lines[i].isVisible()){const s=1+(i===0?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(s,t)}for(;i>0&&!this.lines[i].isVisible();)i--;if(i===0&&!this.lines[i].isVisible())return 1;const n=1+(i===0?0:this.prefixSumComputer.getAccumulatedValue(i-1));return this.lines[i].getViewLineNumberOfModelPosition(n,this.model.getLineMaxColumn(i+1))}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new g4;for(const o of n){const a=o.options.overviewRuler,l=a?a.position:0;if(l===0)continue;const c=a.getColor(i),h=this._getViewLineNumberForModelPosition(o.range.startLineNumber,o.range.startColumn),u=this._getViewLineNumberForModelPosition(o.range.endLineNumber,o.range.endColumn);s.accept(c,h,u,l)}return s.result}getDecorationsInRange(e,t,i){const n=this.convertViewPositionToModelPosition(e.startLineNumber,e.startColumn),s=this.convertViewPositionToModelPosition(e.endLineNumber,e.endColumn);if(s.lineNumber-n.lineNumber<=e.endLineNumber-e.startLineNumber)return this.model.getDecorationsInRange(new k(n.lineNumber,1,s.lineNumber,s.column),t,i);let o=[];const a=n.lineNumber-1,l=s.lineNumber-1;let c=null;for(let f=a;f<=l;f++)if(this.lines[f].isVisible())c===null&&(c=new $(f+1,f===a?n.column:1));else if(c!==null){const p=this.model.getLineMaxColumn(f);o=o.concat(this.model.getDecorationsInRange(new k(c.lineNumber,c.column,f,p),t,i)),c=null}c!==null&&(o=o.concat(this.model.getDecorationsInRange(new k(c.lineNumber,c.column,s.lineNumber,s.column),t,i)),c=null),o.sort((f,g)=>{const p=k.compareRangesUsingStarts(f.range,g.range);return p===0?f.id<g.id?-1:f.id>g.id?1:0:p});let h=[],u=0,d=null;for(const f of o){const g=f.id;d!==g&&(d=g,h[u++]=f)}return h}getInjectedTextAt(e){const t=this._toValidViewLineNumber(e.lineNumber),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index,s=i.remainder;return this.lines[n].getInjectedTextAt(s,e.column)}normalizePosition(e,t){const i=this._toValidViewLineNumber(e.lineNumber),n=this.prefixSumComputer.getIndexOf(i-1),s=n.index,o=n.remainder;return this.lines[s].normalizePosition(this.model,s+1,o,e,t)}getLineIndentColumn(e){const t=this._toValidViewLineNumber(e),i=this.prefixSumComputer.getIndexOf(t-1),n=i.index;return i.remainder===0?this.model.getLineIndentColumn(n+1):0}}class u4{constructor(e,t){this.modelLineNumber=e,this.modelLineWrappedLineIdx=t}get isWrappedLineContinuation(){return this.modelLineWrappedLineIdx>0}}class d4{constructor(e,t){this.modelRange=e,this.viewLines=t}}class Aw{constructor(){}isVisible(){return!0}setVisible(e){return e?this:Rw.INSTANCE}getLineBreakData(){return null}getViewLineCount(){return 1}getViewLineContent(e,t,i){return e.getLineContent(t)}getViewLineLength(e,t,i){return e.getLineLength(t)}getViewLineMinColumn(e,t,i){return e.getLineMinColumn(t)}getViewLineMaxColumn(e,t,i){return e.getLineMaxColumn(t)}getViewLineData(e,t,i){let n=e.getLineTokens(t),s=n.getLineContent();return new Xx(s,!1,1,s.length+1,0,n.inflate(),null)}getViewLinesData(e,t,i,n,s,o,a){if(!o[s]){a[s]=null;return}a[s]=this.getViewLineData(e,t,0)}getModelColumnOfViewPosition(e,t){return t}getViewPositionOfModelPosition(e,t){return new $(e,t)}getViewLineNumberOfModelPosition(e,t){return e}normalizePosition(e,t,i,n,s){return n}getInjectedTextAt(e,t){return null}}Aw.INSTANCE=new Aw;class Rw{constructor(){}isVisible(){return!1}setVisible(e){return e?Aw.INSTANCE:this}getLineBreakData(){return null}getViewLineCount(){return 0}getViewLineContent(e,t,i){throw new Error("Not supported")}getViewLineLength(e,t,i){throw new Error("Not supported")}getViewLineMinColumn(e,t,i){throw new Error("Not supported")}getViewLineMaxColumn(e,t,i){throw new Error("Not supported")}getViewLineData(e,t,i){throw new Error("Not supported")}getViewLinesData(e,t,i,n,s,o,a){throw new Error("Not supported")}getModelColumnOfViewPosition(e,t){throw new Error("Not supported")}getViewPositionOfModelPosition(e,t){throw new Error("Not supported")}getViewLineNumberOfModelPosition(e,t){throw new Error("Not supported")}normalizePosition(e,t,i,n,s){throw new Error("Not supported")}getInjectedTextAt(e,t){throw new Error("Not supported")}}Rw.INSTANCE=new Rw;class Qee{constructor(e,t){this._lineBreakData=e,this._isVisible=t}isVisible(){return this._isVisible}setVisible(e){return this._isVisible=e,this}getLineBreakData(){return this._lineBreakData}getViewLineCount(){return this._isVisible?this._lineBreakData.breakOffsets.length:0}getInputStartOffsetOfOutputLineIndex(e){return this._lineBreakData.getInputOffsetOfOutputPosition(e,0)}getInputEndOffsetOfOutputLineIndex(e,t,i){return i+1===this._lineBreakData.breakOffsets.length?e.getLineMaxColumn(t)-1:this._lineBreakData.getInputOffsetOfOutputPosition(i+1,0)}getViewLineContent(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0,s=i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1];let o;if(this._lineBreakData.injectionOffsets!==null){const a=this._lineBreakData.injectionOffsets.map((l,c)=>new ao(0,0,l+1,this._lineBreakData.injectionOptions[c],0));o=ao.applyInjectedText(e.getLineContent(t),a).substring(n,s)}else o=e.getValueInRange({startLineNumber:t,startColumn:n+1,endLineNumber:t,endColumn:s+1});return i>0&&(o=f4(this._lineBreakData.wrappedTextIndentLength)+o),o}getViewLineLength(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=i>0?this._lineBreakData.breakOffsets[i-1]:0;let o=(i<this._lineBreakData.breakOffsets.length?this._lineBreakData.breakOffsets[i]:this._lineBreakData.breakOffsets[this._lineBreakData.breakOffsets.length-1])-n;return i>0&&(o=this._lineBreakData.wrappedTextIndentLength+o),o}getViewLineMinColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this._getViewLineMinColumn(i)}_getViewLineMinColumn(e){return e>0?this._lineBreakData.wrappedTextIndentLength+1:1}getViewLineMaxColumn(e,t,i){if(!this._isVisible)throw new Error("Not supported");return this.getViewLineLength(e,t,i)+1}getViewLineData(e,t,i){if(!this._isVisible)throw new Error("Not supported");const n=this._lineBreakData,s=i>0?n.wrappedTextIndentLength:0,o=n.injectionOffsets,a=n.injectionOptions;let l,c,h;if(o){const p=e.getLineTokens(t).withInserted(o.map((C,y)=>({offset:C,text:a[y].content,tokenMetadata:Ki.defaultTokenMetadata}))),_=i>0?n.breakOffsets[i-1]:0,v=n.breakOffsets[i];l=p.getLineContent().substring(_,v),c=p.sliceAndInflate(_,v,s),h=new Array;let b=0;for(let C=0;C<o.length;C++){const y=a[C].content.length,x=o[C]+b,S=o[C]+b+y;if(x>v)break;if(_<S){const w=a[C];if(w.inlineClassName){const L=i>0?n.wrappedTextIndentLength:0,N=L+Math.max(x-_,0),P=L+Math.min(S-_,v);N!==P&&h.push(new fG(N,P,w.inlineClassName,w.inlineClassNameAffectsLetterSpacing))}}b+=y}}else{const p=this.getInputStartOffsetOfOutputLineIndex(i),_=this.getInputEndOffsetOfOutputLineIndex(e,t,i),v=e.getLineTokens(t);l=e.getValueInRange({startLineNumber:t,startColumn:p+1,endLineNumber:t,endColumn:_+1}),c=v.sliceAndInflate(p,_,s),h=null}i>0&&(l=f4(n.wrappedTextIndentLength)+l);const u=i>0?n.wrappedTextIndentLength+1:1,d=l.length+1,f=i+1<this.getViewLineCount(),g=i===0?0:n.breakOffsetsVisibleColumn[i-1];return new Xx(l,f,u,d,g,c,h)}getViewLinesData(e,t,i,n,s,o,a){if(!this._isVisible)throw new Error("Not supported");for(let l=i;l<n;l++){let c=s+l-i;if(!o[c]){a[c]=null;continue}a[c]=this.getViewLineData(e,t,l)}}getModelColumnOfViewPosition(e,t){if(!this._isVisible)throw new Error("Not supported");let i=t-1;return e>0&&(i<this._lineBreakData.wrappedTextIndentLength?i=0:i-=this._lineBreakData.wrappedTextIndentLength),this._lineBreakData.getInputOffsetOfOutputPosition(e,i)+1}getViewPositionOfModelPosition(e,t,i=2){if(!this._isVisible)throw new Error("Not supported");let n=this._lineBreakData.getOutputPositionOfInputOffset(t-1,i),s=n.outputLineIndex,o=n.outputOffset+1;return s>0&&(o+=this._lineBreakData.wrappedTextIndentLength),new $(e+s,o)}getViewLineNumberOfModelPosition(e,t){if(!this._isVisible)throw new Error("Not supported");const i=this._lineBreakData.getOutputPositionOfInputOffset(t-1);return e+i.outputLineIndex}normalizePosition(e,t,i,n,s){if(this._lineBreakData.injectionOffsets!==null){const o=n.lineNumber-i,a=this._lineBreakData.outputPositionToOffsetInUnwrappedLine(i,n.column-1),l=this._lineBreakData.normalizeOffsetAroundInjections(a,s);if(l!==a)return this._lineBreakData.getOutputPositionOfOffsetInUnwrappedLine(l,s).toPosition(o,this._lineBreakData.wrappedTextIndentLength)}if(s===0){if(i>0&&n.column===this._getViewLineMinColumn(i))return new $(n.lineNumber-1,this.getViewLineMaxColumn(e,t,i-1))}else if(s===1){const o=this.getViewLineCount()-1;if(i<o&&n.column===this.getViewLineMaxColumn(e,t,i))return new $(n.lineNumber+1,this._getViewLineMinColumn(i+1))}return n}getInjectedTextAt(e,t){return this._lineBreakData.getInjectedText(e,t-1)}}let qD=[""];function f4(r){if(r>=qD.length)for(let e=1;e<=r;e++)qD[e]=Jee(e);return qD[r]}function Jee(r){return new Array(r+1).join(" ")}function GD(r,e){return r===null?e?Aw.INSTANCE:Rw.INSTANCE:new Qee(r,e)}class ete{constructor(e){this._lines=e}_validPosition(e){return this._lines.model.validatePosition(e)}_validRange(e){return this._lines.model.validateRange(e)}convertViewPositionToModelPosition(e){return this._validPosition(e)}convertViewRangeToModelRange(e){return this._validRange(e)}validateViewPosition(e,t){return this._validPosition(t)}validateViewRange(e,t){return this._validRange(t)}convertModelPositionToViewPosition(e){return this._validPosition(e)}convertModelRangeToViewRange(e){return this._validRange(e)}modelPositionIsVisible(e){const t=this._lines.model.getLineCount();return!(e.lineNumber<1||e.lineNumber>t)}getModelLineViewLineCount(e){return 1}}class tte{constructor(e){this.model=e}dispose(){}createCoordinatesConverter(){return new ete(this)}getHiddenAreas(){return[]}setHiddenAreas(e){return!1}setTabSize(e){return!1}setWrappingSettings(e,t,i,n){return!1}createLineBreaksComputer(){let e=[];return{addRequest:(t,i,n)=>{e.push(null)},finalize:()=>e}}onModelFlushed(){}onModelLinesDeleted(e,t,i){return new HD(t,i)}onModelLinesInserted(e,t,i,n){return new zD(t,i)}onModelLineChanged(e,t,i){return[!1,new o4(t,t),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;let n=new Array(i);for(let s=0;s<i;s++)n[s]=0;return n}getViewLineContent(e){return this.model.getLineContent(e)}getViewLineLength(e){return this.model.getLineLength(e)}getViewLineMinColumn(e){return this.model.getLineMinColumn(e)}getViewLineMaxColumn(e){return this.model.getLineMaxColumn(e)}getViewLineData(e){let t=this.model.getLineTokens(e),i=t.getLineContent();return new Xx(i,!1,1,i.length+1,0,t.inflate(),null)}getViewLinesData(e,t,i){const n=this.model.getLineCount();e=Math.min(Math.max(1,e),n),t=Math.min(Math.max(1,t),n);let s=[];for(let o=e;o<=t;o++){let a=o-e;i[a]||(s[a]=null),s[a]=this.getViewLineData(o)}return s}getAllOverviewRulerDecorations(e,t,i){const n=this.model.getOverviewRulerDecorations(e,t),s=new g4;for(const o of n){const a=o.options.overviewRuler,l=a?a.position:0;if(l===0)continue;const c=a.getColor(i),h=o.range.startLineNumber,u=o.range.endLineNumber;s.accept(c,h,u,l)}return s.result}getDecorationsInRange(e,t,i){return this.model.getDecorationsInRange(e,t,i)}normalizePosition(e,t){return this.model.normalizePosition(e,t)}getLineIndentColumn(e){return this.model.getLineIndentColumn(e)}getInjectedTextAt(e){return null}}class g4{constructor(){this.result=Object.create(null)}accept(e,t,i,n){let s=this.result[e];if(s){const o=s[s.length-3],a=s[s.length-1];if(o===n&&a+1>=t){i>a&&(s[s.length-1]=i);return}s.push(n,t,i)}else this.result[e]=[n,t,i]}}class ite{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 a=this._coordinatesConverter.convertModelPositionToViewPosition(new $(n.startLineNumber,1),0),l=this._coordinatesConverter.convertModelPositionToViewPosition(new $(n.endLineNumber,this.model.getLineMaxColumn(n.endLineNumber)),1);o=new k(a.lineNumber,a.column,l.lineNumber,l.column)}else o=this._coordinatesConverter.convertModelRangeToViewRange(n,1);i=new vP(o,s),this._decorationsCache[t]=i}return i}getDecorationsViewportData(e){let t=this._cachedModelDecorationsResolver!==null;return t=t&&e.equalsRange(this._cachedModelDecorationsResolverViewRange),t||(this._cachedModelDecorationsResolver=this._getDecorationsViewportData(e),this._cachedModelDecorationsResolverViewRange=e),this._cachedModelDecorationsResolver}_getDecorationsViewportData(e){const t=this._linesCollection.getDecorationsInRange(e,this.editorId,ES(this.configuration.options)),i=e.startLineNumber,n=e.endLineNumber;let s=[],o=0,a=[];for(let l=i;l<=n;l++)a[l-i]=[];for(let l=0,c=t.length;l<c;l++){let h=t[l],u=h.options,d=this._getOrCreateViewModelDecoration(h),f=d.range;if(s[o++]=d,u.inlineClassName){let g=new Ap(f,u.inlineClassName,u.inlineClassNameAffectsLetterSpacing?3:0),p=Math.max(i,f.startLineNumber),_=Math.min(n,f.endLineNumber);for(let v=p;v<=_;v++)a[v-i].push(g)}if(u.beforeContentClassName&&i<=f.startLineNumber&&f.startLineNumber<=n){let g=new Ap(new k(f.startLineNumber,f.startColumn,f.startLineNumber,f.startColumn),u.beforeContentClassName,1);a[f.startLineNumber-i].push(g)}if(u.afterContentClassName&&i<=f.endLineNumber&&f.endLineNumber<=n){let g=new Ap(new k(f.endLineNumber,f.endColumn,f.endLineNumber,f.endColumn),u.afterContentClassName,2);a[f.endLineNumber-i].push(g)}}return{decorations:s,inlineDecorations:a}}}class nte extends Y{constructor(e,t,i,n,s,o){super();if(this._editorId=e,this._configuration=t,this.model=i,this._eventDispatcher=new Fee,this.onEvent=this._eventDispatcher.onEvent,this.cursorConfig=new As(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._tokenizeViewportSoon=this._register(new Bt(()=>this.tokenizeViewport(),50)),this._updateConfigurationViewLineCount=this._register(new Bt(()=>this._updateConfigurationViewLineCountNow(),0)),this._hasFocus=!1,this._viewportStartLine=-1,this._viewportStartLineTrackedRange=null,this._viewportStartLineDelta=0,this.model.isTooLargeForTokenization())this._lines=new tte(this.model);else{const a=this._configuration.options,l=a.get(43),c=a.get(123),h=a.get(130),u=a.get(122);this._lines=new Xee(this._editorId,this.model,n,s,l,this.model.getOptions().tabSize,c,h.wrappingColumn,u)}this.coordinatesConverter=this._lines.createCoordinatesConverter(),this._cursor=this._register(new Df(i,this,this.coordinatesConverter,this.cursorConfig)),this.viewLayout=this._register(new Gee(this._configuration,this.getLineCount(),o)),this._register(this.viewLayout.onDidScroll(a=>{a.scrollTopChanged&&this._tokenizeViewportSoon.schedule(),this._eventDispatcher.emitSingleViewEvent(new Aee(a)),this._eventDispatcher.emitOutgoingEvent(new jD(a.oldScrollWidth,a.oldScrollLeft,a.oldScrollHeight,a.oldScrollTop,a.scrollWidth,a.scrollLeft,a.scrollHeight,a.scrollTop))})),this._register(this.viewLayout.onDidContentSizeChange(a=>{this._eventDispatcher.emitOutgoingEvent(a)})),this._decorations=new ite(this._editorId,this.model,this._configuration,this._lines,this.coordinatesConverter),this._registerModelEvents(),this._register(this._configuration.onDidChangeFast(a=>{try{const l=this._eventDispatcher.beginEmitViewEvents();this._onConfigurationChanged(l,a)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(pm.getInstance().onDidChange(()=>{this._eventDispatcher.emitSingleViewEvent(new Pee)})),this._updateConfigurationViewLineCountNow()}dispose(){super.dispose(),this._decorations.dispose(),this._lines.dispose(),this.invalidateMinimapColorCache(),this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,null,1),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())}tokenizeViewport(){const e=this.viewLayout.getLinesViewportData(),t=this.coordinatesConverter.convertViewPositionToModelPosition(new $(e.startLineNumber,1)),i=this.coordinatesConverter.convertViewPositionToModelPosition(new $(e.endLineNumber,1));this.model.tokenizeViewport(t.lineNumber,i.lineNumber)}setHasFocus(e){this._hasFocus=e,this._cursor.setHasFocus(e),this._eventDispatcher.emitSingleViewEvent(new Nee(e)),this._eventDispatcher.emitOutgoingEvent(new UD(!e,e))}onCompositionStart(){this._eventDispatcher.emitSingleViewEvent(new kee)}onCompositionEnd(){this._eventDispatcher.emitSingleViewEvent(new Dee)}onDidColorThemeChange(){this._eventDispatcher.emitSingleViewEvent(new Ree)}_onConfigurationChanged(e,t){let i=null;if(this._viewportStartLine!==-1){let h=new $(this._viewportStartLine,this.getLineMinColumn(this._viewportStartLine));i=this.coordinatesConverter.convertViewPositionToModelPosition(h)}let n=!1;const s=this._configuration.options,o=s.get(43),a=s.get(123),l=s.get(130),c=s.get(122);if(this._lines.setWrappingSettings(o,a,l.wrappingColumn,c)&&(e.emitViewEvent(new Ew),e.emitViewEvent(new Iw),e.emitViewEvent(new kf(null)),this._cursor.onLineMappingChanged(e),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.getCurrentScrollTop()!==0&&(n=!0),this._updateConfigurationViewLineCount.schedule()),t.hasChanged(80)&&(this._decorations.reset(),e.emitViewEvent(new kf(null))),e.emitViewEvent(new Eee(t)),this.viewLayout.onConfigurationChanged(t),n&&i){const h=this.coordinatesConverter.convertModelPositionToViewPosition(i),u=this.viewLayout.getVerticalOffsetForLineNumber(h.lineNumber);this.viewLayout.setScrollPosition({scrollTop:u+this._viewportStartLineDelta},1)}As.shouldRecreate(t)&&(this.cursorConfig=new As(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),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.changes,o=e instanceof Bh?e.versionId:null,a=this._lines.createLineBreaksComputer();for(const h of s)switch(h.changeType){case 4:{for(let u=0;u<h.detail.length;u++){const d=h.detail[u];let f=h.injectedTexts[u];f&&(f=f.filter(g=>!g.ownerId||g.ownerId===this._editorId)),a.addRequest(d,f,null)}break}case 2:{let u=null;h.injectedText&&(u=h.injectedText.filter(d=>!d.ownerId||d.ownerId===this._editorId)),a.addRequest(h.detail,u,null);break}}const l=a.finalize();let c=0;for(const h of s)switch(h.changeType){case 1:{this._lines.onModelFlushed(),t.emitViewEvent(new Ew),this._decorations.reset(),this.viewLayout.onFlushed(this.getLineCount()),i=!0;break}case 3:{const u=this._lines.onModelLinesDeleted(o,h.fromLineNumber,h.toLineNumber);u!==null&&(t.emitViewEvent(u),this.viewLayout.onLinesDeleted(u.fromLineNumber,u.toLineNumber)),i=!0;break}case 4:{const u=l.slice(c,c+h.detail.length);c+=h.detail.length;const d=this._lines.onModelLinesInserted(o,h.fromLineNumber,h.toLineNumber,u);d!==null&&(t.emitViewEvent(d),this.viewLayout.onLinesInserted(d.fromLineNumber,d.toLineNumber)),i=!0;break}case 2:{const u=l[c];c++;const[d,f,g,p]=this._lines.onModelLineChanged(o,h.lineNumber,u);n=d,f&&t.emitViewEvent(f),g&&(t.emitViewEvent(g),this.viewLayout.onLinesInserted(g.fromLineNumber,g.toLineNumber)),p&&(t.emitViewEvent(p),this.viewLayout.onLinesDeleted(p.fromLineNumber,p.toLineNumber));break}case 5:break}o!==null&&this._lines.acceptVersionId(o),this.viewLayout.onHeightMaybeChanged(),!i&&n&&(t.emitViewEvent(new Iw),t.emitViewEvent(new kf(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged())}finally{this._eventDispatcher.endEmitViewEvents()}if(this._viewportStartLine=-1,this._configuration.setMaxLineNumber(this.model.getLineCount()),this._updateConfigurationViewLineCountNow(),!this._hasFocus&&this.model.getAttachedEditorCount()>=2&&this._viewportStartLineTrackedRange){const t=this.model._getTrackedRange(this._viewportStartLineTrackedRange);if(t){const i=this.coordinatesConverter.convertModelPositionToViewPosition(t.getStartPosition()),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber);this.viewLayout.setScrollPosition({scrollTop:n+this._viewportStartLineDelta},1)}}try{const t=this._eventDispatcher.beginEmitViewEvents();this._cursor.onModelContentChanged(t,e)}finally{this._eventDispatcher.endEmitViewEvents()}})),this._register(this.model.onDidChangeTokens(e=>{let t=[];for(let i=0,n=e.ranges.length;i<n;i++){const s=e.ranges[i],o=this.coordinatesConverter.convertModelPositionToViewPosition(new $(s.fromLineNumber,1)).lineNumber,a=this.coordinatesConverter.convertModelPositionToViewPosition(new $(s.toLineNumber,this.model.getLineMaxColumn(s.toLineNumber))).lineNumber;t[i]={fromLineNumber:o,toLineNumber:a}}this._eventDispatcher.emitSingleViewEvent(new Mee(t)),e.tokenizationSupportChanged&&this._tokenizeViewportSoon.schedule()})),this._register(this.model.onDidChangeLanguageConfiguration(e=>{this._eventDispatcher.emitSingleViewEvent(new Tee),this.cursorConfig=new As(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeLanguage(e=>{this.cursorConfig=new As(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeOptions(e=>{if(this._lines.setTabSize(this.model.getOptions().tabSize)){try{const t=this._eventDispatcher.beginEmitViewEvents();t.emitViewEvent(new Ew),t.emitViewEvent(new Iw),t.emitViewEvent(new kf(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}this.cursorConfig=new As(this.model.getLanguageIdentifier(),this.model.getOptions(),this._configuration),this._cursor.updateConfiguration(this.cursorConfig)})),this._register(this.model.onDidChangeDecorations(e=>{this._decorations.onModelDecorationsChanged(),this._eventDispatcher.emitSingleViewEvent(new kf(e))}))}setHiddenAreas(e){try{const t=this._eventDispatcher.beginEmitViewEvents();this._lines.setHiddenAreas(e)&&(t.emitViewEvent(new Ew),t.emitViewEvent(new Iw),t.emitViewEvent(new kf(null)),this._cursor.onLineMappingChanged(t),this._decorations.onLineMappingChanged(),this.viewLayout.onFlushed(this.getLineCount()),this.viewLayout.onHeightMaybeChanged())}finally{this._eventDispatcher.endEmitViewEvents()}this._updateConfigurationViewLineCount.schedule()}getVisibleRangesPlusViewportAboveBelow(){const e=this._configuration.options.get(129),t=this._configuration.options.get(58),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 k(s,this.getLineMinColumn(s),o,this.getLineMaxColumn(o)))}getVisibleRanges(){const e=this.getCompletelyVisibleViewRange();return this._toModelVisibleRanges(e)}_toModelVisibleRanges(e){const t=this.coordinatesConverter.convertViewRangeToModelRange(e),i=this._lines.getHiddenAreas();if(i.length===0)return[t];let n=[],s=0,o=t.startLineNumber,a=t.startColumn,l=t.endLineNumber,c=t.endColumn;for(let h=0,u=i.length;h<u;h++){const d=i[h].startLineNumber,f=i[h].endLineNumber;f<o||d>l||(o<d&&(n[s++]=new k(o,a,d-1,this.model.getLineMaxColumn(d-1))),o=f+1,a=1)}return(o<l||o===l&&a<c)&&(n[s++]=new k(o,a,l,c)),n}getCompletelyVisibleViewRange(){const e=this.viewLayout.getLinesViewportData(),t=e.completelyVisibleStartLineNumber,i=e.completelyVisibleEndLineNumber;return new k(t,this.getLineMinColumn(t),i,this.getLineMaxColumn(i))}getCompletelyVisibleViewRangeAtScrollTop(e){const t=this.viewLayout.getLinesViewportDataAtScrollTop(e),i=t.completelyVisibleStartLineNumber,n=t.completelyVisibleEndLineNumber;return new k(i,this.getLineMinColumn(i),n,this.getLineMaxColumn(n))}saveState(){const e=this.viewLayout.saveState(),t=e.scrollTop,i=this.viewLayout.getLineNumberAtVerticalOffset(t),n=this.coordinatesConverter.convertViewPositionToModelPosition(new $(i,this.getLineMinColumn(i))),s=this.viewLayout.getVerticalOffsetForLineNumber(i)-t;return{scrollLeft:e.scrollLeft,firstPosition:n,firstPositionDeltaTop:s}}reduceRestoreState(e){if(typeof e.firstPosition=="undefined")return this._reduceRestoreStateCompatibility(e);const t=this.model.validatePosition(e.firstPosition),i=this.coordinatesConverter.convertModelPositionToViewPosition(t),n=this.viewLayout.getVerticalOffsetForLineNumber(i.lineNumber)-e.firstPositionDeltaTop;return{scrollLeft:e.scrollLeft,scrollTop:n}}_reduceRestoreStateCompatibility(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTopWithoutViewZones}}getTabSize(){return this.model.getOptions().tabSize}getTextModelOptions(){return this.model.getOptions()}getLineCount(){return this._lines.getViewLineCount()}setViewport(e,t,i){this._viewportStartLine=e;let n=this.coordinatesConverter.convertViewPositionToModelPosition(new $(e,this.getLineMinColumn(e)));this._viewportStartLineTrackedRange=this.model._setTrackedRange(this._viewportStartLineTrackedRange,new k(n.lineNumber,n.column,n.lineNumber,n.column),1);const s=this.viewLayout.getVerticalOffsetForLineNumber(e),o=this.viewLayout.getCurrentScrollTop();this._viewportStartLineDelta=o-s}getActiveIndentGuide(e,t,i){return this._lines.getActiveIndentGuide(e,t,i)}getLinesIndentGuides(e,t){return this._lines.getViewLinesIndentGuides(e,t)}getBracketGuidesInRangeByLine(e,t,i,n,s){return this._lines.getViewLinesBracketGuides(e,t,i,n,s)}getLineContent(e){return this._lines.getViewLineContent(e)}getLineLength(e){return this._lines.getViewLineLength(e)}getLineMinColumn(e){return this._lines.getViewLineMinColumn(e)}getLineMaxColumn(e){return this._lines.getViewLineMaxColumn(e)}getLineFirstNonWhitespaceColumn(e){const t=dr(this.getLineContent(e));return t===-1?0:t+1}getLineLastNonWhitespaceColumn(e){const t=Wo(this.getLineContent(e));return t===-1?0:t+2}getDecorationsInViewport(e){return this._decorations.getDecorationsViewportData(e).decorations}getInjectedTextAt(e){return this._lines.getInjectedTextAt(e)}getViewLineRenderingData(e,t){let i=this.model.mightContainRTL(),n=this.model.mightContainNonBasicASCII(),s=this.getTabSize(),o=this._lines.getViewLineData(t),l=this._decorations.getDecorationsViewportData(e).inlineDecorations[t-e.startLineNumber];return o.inlineDecorations&&(l=[...l,...o.inlineDecorations.map(c=>c.toInlineDecoration(t))]),new Or(o.minColumn,o.maxColumn,o.content,o.continuesWithWrappedLine,i,n,o.tokens,l,s,o.startVisibleColumn)}getViewLineData(e){return this._lines.getViewLineData(e)}getMinimapLinesRenderingData(e,t,i){let n=this._lines.getViewLinesData(e,t,i);return new dG(this.getTabSize(),n)}getAllOverviewRulerDecorations(e){return this._lines.getAllOverviewRulerDecorations(this._editorId,ES(this._configuration.options),e)}invalidateOverviewRulerColorCache(){const e=this.model.getOverviewRulerDecorations();for(const t of e){const i=t.options.overviewRuler;i&&i.invalidateCachedColor()}}invalidateMinimapColorCache(){const e=this.model.getAllDecorations();for(const t of e){const i=t.options.minimap;i&&i.invalidateCachedColor()}}getValueInRange(e,t){const i=this.coordinatesConverter.convertViewRangeToModelRange(e);return this.model.getValueInRange(i,t)}getModelLineMaxColumn(e){return this.model.getLineMaxColumn(e)}validateModelPosition(e){return this.model.validatePosition(e)}validateModelRange(e){return this.model.validateRange(e)}deduceModelPositionRelativeToViewPosition(e,t,i){const n=this.coordinatesConverter.convertViewPositionToModelPosition(e);this.model.getEOL().length===2&&(t<0?t-=i:t+=i);const o=this.model.getOffsetAt(n)+t;return this.model.getPositionAt(o)}getEOL(){return this.model.getEOL()}getPlainTextToCopy(e,t,i){const n=i?`\r -`:this.model.getEOL();e=e.slice(0),e.sort(k.compareRangesUsingStarts);let s=!1,o=!1;for(const l of e)l.isEmpty()?s=!0:o=!0;if(!o){if(!t)return"";const l=e.map(h=>h.startLineNumber);let c="";for(let h=0;h<l.length;h++)h>0&&l[h-1]===l[h]||(c+=this.model.getLineContent(l[h])+n);return c}if(s&&t){let l=[],c=0;for(const h of e){const u=h.startLineNumber;h.isEmpty()?u!==c&&l.push(this.model.getLineContent(u)):l.push(this.model.getValueInRange(h,i?2:0)),c=u}return l.length===1?l[0]:l}let a=[];for(const l of e)l.isEmpty()||a.push(this.model.getValueInRange(l,i?2:0));return a.length===1?a[0]:a}getRichTextToCopy(e,t){const i=this.model.getLanguageIdentifier();if(i.id===1||e.length!==1)return null;let n=e[0];if(n.isEmpty()){if(!t)return null;const h=n.startLineNumber;n=new k(h,this.model.getLineMinColumn(h),h,this.model.getLineMaxColumn(h))}const s=this._configuration.options.get(43),o=this._getColorMap(),l=/[:;\\\/<>]/.test(s.fontFamily)||s.fontFamily===hr.fontFamily;let c;return l?c=hr.fontFamily:(c=s.fontFamily,c=c.replace(/"/g,"'"),/[,']/.test(c)||/[+ ]/.test(c)&&(c=`'${c}'`),c=`${c}, ${hr.fontFamily}`),{mode:i.language,html:`<div style="color: ${o[1]};background-color: ${o[2]};font-family: ${c};font-weight: ${s.fontWeight};font-size: ${s.fontSize}px;line-height: ${s.lineHeight}px;white-space: pre;">`+this._getHTMLToCopy(n,o)+"</div>"}}_getHTMLToCopy(e,t){const i=e.startLineNumber,n=e.startColumn,s=e.endLineNumber,o=e.endColumn,a=this.getTabSize();let l="";for(let c=i;c<=s;c++){const h=this.model.getLineTokens(c),u=h.getLineContent(),d=c===i?n-1:0,f=c===s?o-1:u.length;u===""?l+="<br>":l+=zee(u,h.inflate(),t,d,f,a,Xi)}return l}_getColorMap(){let e=ti.getColorMap(),t=["#000000"];if(e)for(let i=1,n=e.length;i<n;i++)t[i]=K.Format.CSS.formatHex(e[i]);return t}pushStackElement(){this.model.pushStackElement()}getPrimaryCursorState(){return this._cursor.getPrimaryCursorState()}getLastAddedCursorIndex(){return this._cursor.getLastAddedCursorIndex()}getCursorStates(){return this._cursor.getCursorStates()}setCursorStates(e,t,i){this._withViewEventsCollector(n=>this._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){if(this._cursor.context.cursorConfig.readOnly){this._eventDispatcher.emitOutgoingEvent(new Vee);return}this._withViewEventsCollector(e)}executeEdits(e,t,i){this._executeCursorEdit(n=>this._cursor.executeEdits(n,e,t,i))}startComposition(){this._cursor.setIsDoingComposition(!0),this._executeCursorEdit(e=>this._cursor.startComposition(e))}endComposition(e){this._cursor.setIsDoingComposition(!1),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){this._withViewEventsCollector(i=>this._cursor.revealPrimary(i,e,t,0))}revealTopMostCursor(e){const t=this._cursor.getTopMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Nw(e,i,null,0,!0,0)))}revealBottomMostCursor(e){const t=this._cursor.getBottomMostViewPosition(),i=new k(t.lineNumber,t.column,t.lineNumber,t.column);this._withViewEventsCollector(n=>n.emitViewEvent(new Nw(e,i,null,0,!0,0)))}revealRange(e,t,i,n,s){this._withViewEventsCollector(o=>o.emitViewEvent(new Nw(e,i,null,n,t,s)))}getVerticalOffsetForLineNumber(e){return this.viewLayout.getVerticalOffsetForLineNumber(e)}getScrollTop(){return this.viewLayout.getCurrentScrollTop()}setScrollTop(e,t){this.viewLayout.setScrollPosition({scrollTop:e},t)}setScrollPosition(e,t){this.viewLayout.setScrollPosition(e,t)}deltaScrollNow(e,t){this.viewLayout.deltaScrollNow(e,t)}changeWhitespace(e){this.viewLayout.changeWhitespace(e)&&(this._eventDispatcher.emitSingleViewEvent(new Oee),this._eventDispatcher.emitOutgoingEvent(new Wee))}setMaxLineWidth(e){this.viewLayout.setMaxLineWidth(e)}_withViewEventsCollector(e){try{const t=this._eventDispatcher.beginEmitViewEvents();e(t)}finally{this._eventDispatcher.endEmitViewEvents()}}normalizePosition(e,t){return this._lines.normalizePosition(e,t)}getLineIndentColumn(e){return this._lines.getLineIndentColumn(e)}}class xm{constructor(...e){this._entries=new Map;for(let[t,i]of e)this.set(t,i)}set(e,t){const i=this._entries.get(e);return this._entries.set(e,t),i}has(e){return this._entries.has(e)}get(e){return this._entries.get(e)}}const _r=bt("accessibilityService"),km=new Le("accessibilityModeEnabled",!1);class rte extends Gd{constructor(e,t){super(0);for(let i=0;i<e.length;i++)this.set(e.charCodeAt(i),1);for(let i=0;i<t.length;i++)this.set(t.charCodeAt(i),2)}get(e){return 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 ZD=[],YD=[];class XD{constructor(e,t){this.classifier=new rte(e,t)}static create(e){return new XD(e.get(118),e.get(117))}createLineBreaksComputer(e,t,i,n){t=t|0,i=+i;const s=[],o=[],a=[];return{addRequest:(l,c,h)=>{s.push(l),o.push(c),a.push(h)},finalize:()=>{const l=e.typicalFullwidthCharacterWidth/e.typicalHalfwidthCharacterWidth;let c=[];for(let h=0,u=s.length;h<u;h++){const d=o[h],f=a[h];f&&!f.injectionOptions&&!d?c[h]=ste(this.classifier,f,s[h],t,i,l,n):c[h]=ote(this.classifier,s[h],d,t,i,l,n)}return ZD.length=0,YD.length=0,c}}}}function ste(r,e,t,i,n,s,o){if(n===-1)return null;const a=t.length;if(a<=1)return null;const l=e.breakOffsets,c=e.breakOffsetsVisibleColumn,h=m4(t,i,n,s,o),u=n-h;let d=ZD,f=YD,g=0,p=0,_=0,v=n;const b=l.length;let C=0;if(C>=0){let y=Math.abs(c[C]-v);for(;C+1<b;){const x=Math.abs(c[C+1]-v);if(x>=y)break;y=x,C++}}for(;C<b;){let y=C<0?0:l[C],x=C<0?0:c[C];p>y&&(y=p,x=_);let S=0,w=0,L=0,N=0;if(x<=v){let B=x,U=y===0?0:t.charCodeAt(y-1),j=y===0?0:r.get(U),re=!0;for(let te=y;te<a;te++){const A=te,D=t.charCodeAt(te);let M,W;if(ji(D)?(te++,M=0,W=2):(M=r.get(D),W=Dm(D,B,i,s)),A>p&&QD(U,j,D,M)&&(S=A,w=B),B+=W,B>v){A>p?(L=A,N=B-W):(L=te+1,N=B),B-w>u&&(S=0),re=!1;break}U=D,j=M}if(re){g>0&&(d[g]=l[l.length-1],f[g]=c[l.length-1],g++);break}}if(S===0){let B=x,U=t.charCodeAt(y),j=r.get(U),re=!1;for(let te=y-1;te>=p;te--){const A=te+1,D=t.charCodeAt(te);if(D===9){re=!0;break}let M,W;if(Od(D)?(te--,M=0,W=2):(M=r.get(D),W=Ys(D)?s:1),B<=v){if(L===0&&(L=A,N=B),B<=v-u)break;if(QD(D,M,U,j)){S=A,w=B;break}}B-=W,U=D,j=M}if(S!==0){const te=u-(N-w);if(te<=i){const A=t.charCodeAt(L);let D;ji(A)?D=2:D=Dm(A,N,i,s),te-D<0&&(S=0)}}if(re){C--;continue}}if(S===0&&(S=L,w=N),S<=p){const B=t.charCodeAt(p);ji(B)?(S=p+2,w=_+2):(S=p+1,w=_+Dm(B,_,i,s))}for(p=S,d[g]=S,_=w,f[g]=w,g++,v=w+u;C<0||C<b&&c[C]<w;)C++;let P=Math.abs(c[C]-v);for(;C+1<b;){const B=Math.abs(c[C+1]-v);if(B>=P)break;P=B,C++}}return g===0?null:(d.length=g,f.length=g,ZD=e.breakOffsets,YD=e.breakOffsetsVisibleColumn,e.breakOffsets=d,e.breakOffsetsVisibleColumn=f,e.wrappedTextIndentLength=h,e)}function ote(r,e,t,i,n,s,o){const a=ao.applyInjectedText(e,t);let l,c;if(t&&t.length>0?(l=t.map(w=>w.options),c=t.map(w=>w.column-1)):(l=null,c=null),n===-1)return l?new Tp([a.length],[],0,c,l):null;const h=a.length;if(h<=1)return l?new Tp([a.length],[],0,c,l):null;const u=m4(a,i,n,s,o),d=n-u;let f=[],g=[],p=0,_=0,v=0,b=n,C=a.charCodeAt(0),y=r.get(C),x=Dm(C,0,i,s),S=1;ji(C)&&(x+=1,C=a.charCodeAt(1),y=r.get(C),S++);for(let w=S;w<h;w++){const L=w,N=a.charCodeAt(w);let P,B;ji(N)?(w++,P=0,B=2):(P=r.get(N),B=Dm(N,x,i,s)),QD(C,y,N,P)&&(_=L,v=x),x+=B,x>b&&((_===0||x-v>d)&&(_=L,v=x-B),f[p]=_,g[p]=v,p++,b=v+d,_=0),C=N,y=P}return p===0&&(!t||t.length===0)?null:(f[p]=h,g[p]=x,new Tp(f,g,u,c,l))}function Dm(r,e,t,i){return r===9?t-e%t:Ys(r)||r<32?i:1}function p4(r,e){return e-r%e}function QD(r,e,t,i){return t!==32&&(e===2||e===3&&i!==2||i===1||i===3&&e!==1)}function m4(r,e,t,i,n){let s=0;if(n!==0){const o=dr(r);if(o!==-1){for(let l=0;l<o;l++)s+=r.charCodeAt(l)===9?p4(s,e):1;const a=n===3?2:n===2?1:0;for(let l=0;l<a;l++)s+=p4(s,e);s+i>t&&(s=0)}}return s}var JD;const eE=(JD=window.trustedTypes)===null||JD===void 0?void 0:JD.createPolicy("domLineBreaksComputer",{createHTML:r=>r});class tE{static create(){return new tE}constructor(){}createLineBreaksComputer(e,t,i,n){t=t|0,i=+i;let s=[],o=[];return{addRequest:(a,l,c)=>{s.push(a),o.push(l)},finalize:()=>ate(s,e,t,i,n,o)}}}function ate(r,e,t,i,n,s){var o;function a(x){const S=s[x];if(S){const w=ao.applyInjectedText(r[x],S),L=S.map(P=>P.options),N=S.map(P=>P.column-1);return new Tp([w.length],[],0,N,L)}else return null}if(i===-1){const x=[];for(let S=0,w=r.length;S<w;S++)x[S]=a(S);return x}const l=Math.round(i*e.typicalHalfwidthCharacterWidth);(n===2||n===3)&&(n=1);const c=document.createElement("div");Dn.applyFontInfoSlow(c,e);const h=Sh(1e4),u=[],d=[],f=[],g=[],p=[];for(let x=0;x<r.length;x++){const S=ao.applyInjectedText(r[x],s[x]);let w=0,L=0,N=l;if(n!==0)if(w=dr(S),w===-1)w=0;else{for(let j=0;j<w;j++)L+=S.charCodeAt(j)===9?t-L%t:1;const U=Math.ceil(e.spaceWidth*L);U+e.typicalFullwidthCharacterWidth>l?(w=0,L=0):N=l-U}const P=S.substr(w),B=lte(P,L,t,N,h);u[x]=w,d[x]=L,f[x]=P,g[x]=B[0],p[x]=B[1]}const _=h.build(),v=(o=eE==null?void 0:eE.createHTML(_))!==null&&o!==void 0?o:_;c.innerHTML=v,c.style.position="absolute",c.style.top="10000",c.style.wordWrap="break-word",document.body.appendChild(c);let b=document.createRange();const C=Array.prototype.slice.call(c.children,0);let y=[];for(let x=0;x<r.length;x++){const S=C[x],w=cte(b,S,f[x],g[x]);if(w===null){y[x]=a(x);continue}const L=u[x],N=d[x],P=p[x],B=[];for(let te=0,A=w.length;te<A;te++)B[te]=P[w[te]];if(L!==0)for(let te=0,A=w.length;te<A;te++)w[te]+=L;let U,j;const re=s[x];re?(U=re.map(te=>te.options),j=re.map(te=>te.column-1)):(U=null,j=null),y[x]=new Tp(w,B,N,j,U)}return document.body.removeChild(c),y}function lte(r,e,t,i,n){n.appendASCIIString('<div style="width:'),n.appendASCIIString(String(i)),n.appendASCIIString('px;">');const s=r.length;let o=e,a=0,l=[],c=[],h=0<s?r.charCodeAt(0):0;n.appendASCIIString("<span>");for(let u=0;u<s;u++){u!==0&&u%16384==0&&n.appendASCIIString("</span><span>"),l[u]=a,c[u]=o;const d=h;h=u+1<s?r.charCodeAt(u+1):0;let f=1,g=1;switch(d){case 9:f=t-o%t,g=f;for(let p=1;p<=f;p++)p<f?n.write1(160):n.appendASCII(32);break;case 32:h===32?n.write1(160):n.appendASCII(32);break;case 60:n.appendASCIIString("<");break;case 62:n.appendASCIIString(">");break;case 38:n.appendASCIIString("&");break;case 0:n.appendASCIIString("�");break;case 65279:case 8232:case 8233:case 133:n.write1(65533);break;default:Ys(d)&&g++,d<32?n.write1(9216+d):n.write1(d)}a+=f,o+=g}return n.appendASCIIString("</span>"),l[r.length]=a,c[r.length]=o,n.appendASCIIString("</div>"),[l,c]}function cte(r,e,t,i){if(t.length<=1)return null;const n=Array.prototype.slice.call(e.children,0),s=[];try{iE(r,n,i,0,null,t.length-1,null,s)}catch(o){return console.log(o),null}return s.length===0?null:(s.push(t.length),s)}function iE(r,e,t,i,n,s,o,a){if(i===s||(n=n||nE(r,e,t[i],t[i+1]),o=o||nE(r,e,t[s],t[s+1]),Math.abs(n[0].top-o[0].top)<=.1))return;if(i+1===s){a.push(s);return}const l=i+(s-i)/2|0,c=nE(r,e,t[l],t[l+1]);iE(r,e,t,i,n,l,c,a),iE(r,e,t,l,c,s,o,a)}function nE(r,e,t,i){return r.setStart(e[t/16384|0].firstChild,t%16384),r.setEnd(e[i/16384|0].firstChild,i%16384),r.getClientRects()}var hte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},tu=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let ute=0;class dte{constructor(e,t,i,n,s){this.model=e,this.viewModel=t,this.view=i,this.hasRealView=n,this.listenersToRemove=s}dispose(){ht(this.listenersToRemove),this.model.onBeforeDetached(),this.hasRealView&&this.view.dispose(),this.viewModel.dispose()}}let Em=class Mw extends Y{constructor(e,t,i,n,s,o,a,l,c,h){super();this._onDidDispose=this._register(new H),this.onDidDispose=this._onDidDispose.event,this._onDidChangeModelContent=this._register(new H),this.onDidChangeModelContent=this._onDidChangeModelContent.event,this._onDidChangeModelLanguage=this._register(new H),this.onDidChangeModelLanguage=this._onDidChangeModelLanguage.event,this._onDidChangeModelLanguageConfiguration=this._register(new H),this.onDidChangeModelLanguageConfiguration=this._onDidChangeModelLanguageConfiguration.event,this._onDidChangeModelOptions=this._register(new H),this.onDidChangeModelOptions=this._onDidChangeModelOptions.event,this._onDidChangeModelDecorations=this._register(new H),this.onDidChangeModelDecorations=this._onDidChangeModelDecorations.event,this._onDidChangeConfiguration=this._register(new H),this.onDidChangeConfiguration=this._onDidChangeConfiguration.event,this._onDidChangeModel=this._register(new H),this.onDidChangeModel=this._onDidChangeModel.event,this._onDidChangeCursorPosition=this._register(new H),this.onDidChangeCursorPosition=this._onDidChangeCursorPosition.event,this._onDidChangeCursorSelection=this._register(new H),this.onDidChangeCursorSelection=this._onDidChangeCursorSelection.event,this._onDidAttemptReadOnlyEdit=this._register(new H),this.onDidAttemptReadOnlyEdit=this._onDidAttemptReadOnlyEdit.event,this._onDidLayoutChange=this._register(new H),this.onDidLayoutChange=this._onDidLayoutChange.event,this._editorTextFocus=this._register(new _4),this.onDidFocusEditorText=this._editorTextFocus.onDidChangeToTrue,this.onDidBlurEditorText=this._editorTextFocus.onDidChangeToFalse,this._editorWidgetFocus=this._register(new _4),this.onDidFocusEditorWidget=this._editorWidgetFocus.onDidChangeToTrue,this.onDidBlurEditorWidget=this._editorWidgetFocus.onDidChangeToFalse,this._onWillType=this._register(new H),this.onWillType=this._onWillType.event,this._onDidType=this._register(new H),this.onDidType=this._onDidType.event,this._onDidCompositionStart=this._register(new H),this.onDidCompositionStart=this._onDidCompositionStart.event,this._onDidCompositionEnd=this._register(new H),this.onDidCompositionEnd=this._onDidCompositionEnd.event,this._onDidPaste=this._register(new H),this.onDidPaste=this._onDidPaste.event,this._onMouseUp=this._register(new H),this.onMouseUp=this._onMouseUp.event,this._onMouseDown=this._register(new H),this.onMouseDown=this._onMouseDown.event,this._onMouseDrag=this._register(new H),this.onMouseDrag=this._onMouseDrag.event,this._onMouseDrop=this._register(new H),this.onMouseDrop=this._onMouseDrop.event,this._onMouseDropCanceled=this._register(new H),this.onMouseDropCanceled=this._onMouseDropCanceled.event,this._onContextMenu=this._register(new H),this.onContextMenu=this._onContextMenu.event,this._onMouseMove=this._register(new H),this.onMouseMove=this._onMouseMove.event,this._onMouseLeave=this._register(new H),this.onMouseLeave=this._onMouseLeave.event,this._onMouseWheel=this._register(new H),this.onMouseWheel=this._onMouseWheel.event,this._onKeyUp=this._register(new H),this.onKeyUp=this._onKeyUp.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onDidContentSizeChange=this._register(new H),this.onDidContentSizeChange=this._onDidContentSizeChange.event,this._onDidScrollChange=this._register(new H),this.onDidScrollChange=this._onDidScrollChange.event,this._onDidChangeViewZones=this._register(new H),this.onDidChangeViewZones=this._onDidChangeViewZones.event;const u=Object.assign({},t);this._domElement=e,this._overflowWidgetsDomNode=u.overflowWidgetsDomNode,delete u.overflowWidgetsDomNode,this._id=++ute,this._decorationTypeKeysToIds={},this._decorationTypeSubtypes={},this.isSimpleWidget=i.isSimpleWidget||!1,this._telemetryData=i.telemetryData,this._configuration=this._register(this._createConfiguration(u,h)),this._register(this._configuration.onDidChange(f=>{this._onDidChangeConfiguration.fire(f);const g=this._configuration.options;if(f.hasChanged(129)){const p=g.get(129);this._onDidLayoutChange.fire(p)}})),this._contextKeyService=this._register(a.createScoped(this._domElement)),this._notificationService=c,this._codeEditorService=s,this._commandService=o,this._themeService=l,this._register(new fte(this,this._contextKeyService)),this._register(new gte(this,this._contextKeyService)),this._instantiationService=n.createChild(new xm([Fe,this._contextKeyService])),this._modelData=null,this._contributions={},this._actions={},this._focusTracker=new pte(e),this._register(this._focusTracker.onChange(()=>{this._editorWidgetFocus.setValue(this._focusTracker.hasFocus())})),this._contentWidgets={},this._overlayWidgets={};let d;Array.isArray(i.contributions)?d=i.contributions:d=af.getEditorContributions();for(const f of d){if(this._contributions[f.id]){Oe(new Error(`Cannot have two contributions with the same id ${f.id}`));continue}try{const g=this._instantiationService.createInstance(f.ctor,this);this._contributions[f.id]=g}catch(g){Oe(g)}}af.getEditorActions().forEach(f=>{if(this._actions[f.id]){Oe(new Error(`Cannot have two actions with the same id ${f.id}`));return}const g=new l4(f.id,f.label,f.alias,Rr(f.precondition),()=>this._instantiationService.invokeFunction(p=>Promise.resolve(f.runEditorCommand(p,this,null))),this._contextKeyService);this._actions[g.id]=g}),this._codeEditorService.addCodeEditor(this)}_createConfiguration(e,t){return new Dn(this.isSimpleWidget,e,this._domElement,t)}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return mp.ICodeEditor}dispose(){this._codeEditorService.removeCodeEditor(this),this._focusTracker.dispose();const e=Object.keys(this._contributions);for(let t=0,i=e.length;t<i;t++){const n=e[t];this._contributions[n].dispose()}this._contributions={},this._actions={},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?ft.getWordAtPosition(this._modelData.model,this._configuration.options.get(115),e):null}getValue(e=null){if(!this._modelData)return"";const t=!!(e&&e.preserveBOM);let i=0;return e&&e.lineEnding&&e.lineEnding===` -`?i=1:e&&e.lineEnding&&e.lineEnding===`\r -`&&(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(this._modelData===null&&t===null||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)}_removeDecorationTypes(){if(this._decorationTypeKeysToIds={},this._decorationTypeSubtypes){for(let e in this._decorationTypeSubtypes){const t=this._decorationTypeSubtypes[e];for(let 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 _getVerticalOffsetForPosition(e,t,i){const n=e.model.validatePosition({lineNumber:t,column:i}),s=e.viewModel.coordinatesConverter.convertModelPositionToViewPosition(n);return e.viewModel.viewLayout.getVerticalOffsetForLineNumber(s.lineNumber)}getTopForLineNumber(e){return this._modelData?Mw._getVerticalOffsetForPosition(this._modelData,e,1):-1}getTopForPosition(e,t){return this._modelData?Mw._getVerticalOffsetForPosition(this._modelData,e,t):-1}setHiddenAreas(e){this._modelData&&this._modelData.viewModel.setHiddenAreas(e.map(t=>k.lift(t)))}getVisibleColumnFromPosition(e){if(!this._modelData)return e.column;const t=this._modelData.model.validatePosition(e),i=this._modelData.model.getOptions().tabSize;return Ot.visibleColumnFromColumn(this._modelData.model.getLineContent(t.lineNumber),t.column,i)+1}getPosition(){return this._modelData?this._modelData.viewModel.getPosition():null}setPosition(e){if(!!this._modelData){if(!$.isIPosition(e))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections("api",[{selectionStartLineNumber:e.lineNumber,selectionStartColumn:e.column,positionLineNumber:e.lineNumber,positionColumn:e.column}])}}_sendRevealRange(e,t,i,n){if(!this._modelData)return;if(!k.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(typeof e!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(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(!$.isIPosition(e))throw new Error("Invalid arguments");this._sendRevealRange(new k(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){const t=be.isISelection(e),i=k.isIRange(e);if(!t&&!i)throw new Error("Invalid arguments");if(t)this._setSelectionImpl(e);else if(i){const n={selectionStartLineNumber:e.startLineNumber,selectionStartColumn:e.startColumn,positionLineNumber:e.endLineNumber,positionColumn:e.endColumn};this._setSelectionImpl(n)}}_setSelectionImpl(e){if(!this._modelData)return;const t=new be(e.selectionStartLineNumber,e.selectionStartColumn,e.positionLineNumber,e.positionColumn);this._modelData.viewModel.setSelections("api",[t])}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(typeof e!="number"||typeof t!="number")throw new Error("Invalid arguments");this._sendRevealRange(new k(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(!k.isIRange(e))throw new Error("Invalid arguments");this._sendRevealRange(k.lift(e),t,i,n)}setSelections(e,t="api",i=0){if(!!this._modelData){if(!e||e.length===0)throw new Error("Invalid arguments");for(let n=0,s=e.length;n<s;n++)if(!be.isISelection(e[n]))throw new Error("Invalid arguments");this._modelData.viewModel.setSelections(t,e,i)}}getContentWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getContentWidth():-1}getScrollWidth(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollWidth():-1}getScrollLeft(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollLeft():-1}getContentHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getContentHeight():-1}getScrollHeight(){return this._modelData?this._modelData.viewModel.viewLayout.getScrollHeight():-1}getScrollTop(){return this._modelData?this._modelData.viewModel.viewLayout.getCurrentScrollTop():-1}setScrollLeft(e,t=1){if(!!this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollLeft:e},t)}}setScrollTop(e,t=1){if(!!this._modelData){if(typeof e!="number")throw new Error("Invalid arguments");this._modelData.viewModel.setScrollPosition({scrollTop:e},t)}}setScrollPosition(e,t=1){!this._modelData||this._modelData.viewModel.setScrollPosition(e,t)}saveViewState(){if(!this._modelData)return null;const e={},t=Object.keys(this._contributions);for(const s of t){const o=this._contributions[s];typeof o.saveViewState=="function"&&(e[s]=o.saveViewState())}const i=this._modelData.viewModel.saveCursorState(),n=this._modelData.viewModel.saveState();return{cursorState:i,viewState:n,contributionsState:e}}restoreViewState(e){if(!this._modelData||!this._modelData.hasRealView)return;const t=e;if(t&&t.cursorState&&t.viewState){const i=t.cursorState;Array.isArray(i)?this._modelData.viewModel.restoreCursorState(i):this._modelData.viewModel.restoreCursorState([i]);const n=t.contributionsState||{},s=Object.keys(this._contributions);for(let a=0,l=s.length;a<l;a++){const c=s[a],h=this._contributions[c];typeof h.restoreViewState=="function"&&h.restoreViewState(n[c])}const o=this._modelData.viewModel.reduceRestoreState(t.viewState);this._modelData.view.restoreState(o)}}getContribution(e){return this._contributions[e]||null}getActions(){const e=[],t=Object.keys(this._actions);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._actions[s])}return e}getSupportedActions(){let e=this.getActions();return e=e.filter(t=>t.isSupported()),e}getAction(e){return this._actions[e]||null}trigger(e,t,i){switch(i=i||{},t){case"compositionStart":this._startComposition();return;case"compositionEnd":this._endComposition(e);return;case"type":{const s=i;this._type(e,s.text||"");return}case"replacePreviousChar":{const s=i;this._compositionType(e,s.text||"",s.replaceCharCnt||0,0,0);return}case"compositionType":{const s=i;this._compositionType(e,s.text||"",s.replacePrevCharCnt||0,s.replaceNextCharCnt||0,s.positionDelta||0);return}case"paste":{const s=i;this._paste(e,s.text||"",s.pasteOnNewLine||!1,s.multicursorText||null,s.mode||null);return}case"cut":this._cut(e);return}const n=this.getAction(t);if(n){Promise.resolve(n.run()).then(void 0,Oe);return}!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||t.length===0||(e==="keyboard"&&this._onWillType.fire(t),this._modelData.viewModel.type(t,e),e==="keyboard"&&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||t.length===0)return;const o=this._modelData.viewModel.getSelection().getStartPosition();this._modelData.viewModel.paste(t,i,n,e);const a=this._modelData.viewModel.getSelection().getStartPosition();e==="keyboard"&&this._onDidPaste.fire({range:new k(o.lineNumber,o.column,a.lineNumber,a.column),mode:s})}_cut(e){!this._modelData||this._modelData.viewModel.cut(e)}_triggerEditorCommand(e,t,i){const n=af.getEditorCommand(t);return n?(i=i||{},i.source=e,this._instantiationService.invokeFunction(s=>{Promise.resolve(n.runEditorCommand(s,this,i)).then(void 0,Oe)}),!0):!1}_getViewModel(){return this._modelData?this._modelData.viewModel:null}pushUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.pushStackElement(),!0)}popUndoStop(){return!this._modelData||this._configuration.options.get(80)?!1:(this._modelData.model.popStackElement(),!0)}executeEdits(e,t,i){if(!this._modelData||this._configuration.options.get(80))return!1;let n;return i?Array.isArray(i)?n=()=>i:n=i:n=()=>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)}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,ES(this._configuration.options)):null}deltaDecorations(e,t){return this._modelData?e.length===0&&t.length===0?e:this._modelData.model.deltaDecorations(e,t,this._id):[]}removeDecorations(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(129)}createOverviewRuler(e){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.createOverviewRuler(e)}getContainerDomNode(){return this._domElement}getDomNode(){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.domNode.domNode}delegateVerticalScrollbarMouseDown(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.delegateVerticalScrollbarMouseDown(e)}layout(e){this._configuration.observeReferenceElement(e),this.render()}focus(){!this._modelData||!this._modelData.hasRealView||this._modelData.view.focus()}hasTextFocus(){return!this._modelData||!this._modelData.hasRealView?!1: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 i=this._contentWidgets[t];delete this._contentWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeContentWidget(i)}}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 i=this._overlayWidgets[t];delete this._overlayWidgets[t],this._modelData&&this._modelData.hasRealView&&this._modelData.view.removeOverlayWidget(i)}}changeViewZones(e){!this._modelData||!this._modelData.hasRealView||this._modelData.view.change(e)}getTargetAtClientPoint(e,t){return!this._modelData||!this._modelData.hasRealView?null:this._modelData.view.getTargetAtClientPoint(e,t)}getScrolledVisiblePosition(e){if(!this._modelData||!this._modelData.hasRealView)return null;const t=this._modelData.model.validatePosition(e),i=this._configuration.options,n=i.get(129),s=Mw._getVerticalOffsetForPosition(this._modelData,t.lineNumber,t.column)-this.getScrollTop(),o=this._modelData.view.getOffsetForColumn(t.lineNumber,t.column)+n.glyphMarginWidth+n.lineNumbersWidth+n.decorationsWidth-this.getScrollLeft();return{top:s,left:o,height:i.get(58)}}getOffsetForColumn(e,t){return!this._modelData||!this._modelData.hasRealView?-1:this._modelData.view.getOffsetForColumn(e,t)}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){Dn.applyFontInfoSlow(e,this._configuration.options.get(43))}_attachModel(e){if(!e){this._modelData=null;return}const t=[];this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._configuration.setIsDominatedByLongLines(e.isDominatedByLongLines()),this._configuration.setMaxLineNumber(e.getLineCount()),e.onBeforeAttached();const i=new nte(this._id,this._configuration,e,tE.create(),XD.create(this._configuration.options),o=>Oo(o));t.push(e.onDidChangeDecorations(o=>this._onDidChangeModelDecorations.fire(o))),t.push(e.onDidChangeLanguage(o=>{this._domElement.setAttribute("data-mode-id",e.getLanguageIdentifier().language),this._onDidChangeModelLanguage.fire(o)})),t.push(e.onDidChangeLanguageConfiguration(o=>this._onDidChangeModelLanguageConfiguration.fire(o))),t.push(e.onDidChangeContent(o=>this._onDidChangeModelContent.fire(o))),t.push(e.onDidChangeOptions(o=>this._onDidChangeModelOptions.fire(o))),t.push(e.onWillDispose(()=>this.setModel(null))),t.push(i.onEvent(o=>{switch(o.kind){case 0:this._onDidContentSizeChange.fire(o);break;case 1:this._editorTextFocus.setValue(o.hasFocus);break;case 2:this._onDidScrollChange.fire(o);break;case 3:this._onDidChangeViewZones.fire();break;case 4:this._onDidAttemptReadOnlyEdit.fire();break;case 5:{o.reachedMaxCursorCount&&this._notificationService.warn(m("cursors.maximum","The number of cursors has been limited to {0}.",Df.MAX_CURSOR_COUNT));const a=[];for(let h=0,u=o.selections.length;h<u;h++)a[h]=o.selections[h].getPosition();const l={position:a[0],secondaryPositions:a.slice(1),reason:o.reason,source:o.source};this._onDidChangeCursorPosition.fire(l);const c={selection:o.selections[0],secondarySelections:o.selections.slice(1),modelVersionId:o.modelVersionId,oldSelections:o.oldSelections,oldModelVersionId:o.oldModelVersionId,source:o.source,reason:o.reason};this._onDidChangeCursorSelection.fire(c);break}}}));const[n,s]=this._createView(i);if(s){this._domElement.appendChild(n.domNode.domNode);let o=Object.keys(this._contentWidgets);for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addContentWidget(this._contentWidgets[c])}o=Object.keys(this._overlayWidgets);for(let a=0,l=o.length;a<l;a++){const c=o[a];n.addOverlayWidget(this._overlayWidgets[c])}n.render(!1,!0),n.domNode.domNode.setAttribute("data-uri",e.uri.toString())}this._modelData=new dte(e,i,n,s,t)}_createView(e){let t;this.isSimpleWidget?t={paste:(s,o,a,l)=>{this._paste("keyboard",s,o,a,l)},type:s=>{this._type("keyboard",s)},compositionType:(s,o,a,l)=>{this._compositionType("keyboard",s,o,a,l)},startComposition:()=>{this._startComposition()},endComposition:()=>{this._endComposition("keyboard")},cut:()=>{this._cut("keyboard")}}:t={paste:(s,o,a,l)=>{const c={text:s,pasteOnNewLine:o,multicursorText:a,mode:l};this._commandService.executeCommand("paste",c)},type:s=>{const o={text:s};this._commandService.executeCommand("type",o)},compositionType:(s,o,a,l)=>{if(a||l){const c={text:s,replacePrevCharCnt:o,replaceNextCharCnt:a,positionDelta:l};this._commandService.executeCommand("compositionType",c)}else{const c={text:s,replaceCharCnt:o};this._commandService.executeCommand("replacePreviousChar",c)}},startComposition:()=>{this._commandService.executeCommand("compositionStart",{})},endComposition:()=>{this._commandService.executeCommand("compositionEnd",{})},cut:()=>{this._commandService.executeCommand("cut",{})}};const i=new vw(e.coordinatesConverter);return i.onKeyDown=s=>this._onKeyDown.fire(s),i.onKeyUp=s=>this._onKeyUp.fire(s),i.onContextMenu=s=>this._onContextMenu.fire(s),i.onMouseMove=s=>this._onMouseMove.fire(s),i.onMouseLeave=s=>this._onMouseLeave.fire(s),i.onMouseDown=s=>this._onMouseDown.fire(s),i.onMouseUp=s=>this._onMouseUp.fire(s),i.onMouseDrag=s=>this._onMouseDrag.fire(s),i.onMouseDrop=s=>this._onMouseDrop.fire(s),i.onMouseDropCanceled=s=>this._onMouseDropCanceled.fire(s),i.onMouseWheel=s=>this._onMouseWheel.fire(s),[new Lee(t,this._configuration,this._themeService,e,i,this._overflowWidgetsDomNode),!0]}_postDetachModelCleanup(e){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),e}_removeDecorationType(e){this._codeEditorService.removeDecorationType(e)}hasModel(){return this._modelData!==null}};Em=hte([tu(3,ut),tu(4,Ct),tu(5,fi),tu(6,Fe),tu(7,qt),tu(8,Di),tu(9,_r)],Em);class _4 extends Y{constructor(){super();this._onDidChangeToTrue=this._register(new H),this.onDidChangeToTrue=this._onDidChangeToTrue.event,this._onDidChangeToFalse=this._register(new H),this.onDidChangeToFalse=this._onDidChangeToFalse.event,this._value=0}setValue(e){const t=e?2:1;this._value!==t&&(this._value=t,this._value===2?this._onDidChangeToTrue.fire():this._value===1&&this._onDidChangeToFalse.fire())}}class fte extends Y{constructor(e,t){super();this._editor=e,t.createKey("editorId",e.getId()),this._editorSimpleInput=R.editorSimpleInput.bindTo(t),this._editorFocus=R.focus.bindTo(t),this._textInputFocus=R.textInputFocus.bindTo(t),this._editorTextFocus=R.editorTextFocus.bindTo(t),this._editorTabMovesFocus=R.tabMovesFocus.bindTo(t),this._editorReadonly=R.readOnly.bindTo(t),this._inDiffEditor=R.inDiffEditor.bindTo(t),this._editorColumnSelection=R.columnSelection.bindTo(t),this._hasMultipleSelections=R.hasMultipleSelections.bindTo(t),this._hasNonEmptySelection=R.hasNonEmptySelection.bindTo(t),this._canUndo=R.canUndo.bindTo(t),this._canRedo=R.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._updateFromConfig(),this._updateFromSelection(),this._updateFromFocus(),this._updateFromModel(),this._editorSimpleInput.set(this._editor.isSimpleWidget)}_updateFromConfig(){const e=this._editor.getOptions();this._editorTabMovesFocus.set(e.get(128)),this._editorReadonly.set(e.get(80)),this._inDiffEditor.set(e.get(53)),this._editorColumnSelection.set(e.get(18))}_updateFromSelection(){const e=this._editor.getSelections();e?(this._hasMultipleSelections.set(e.length>1),this._hasNonEmptySelection.set(e.some(t=>!t.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 gte extends Y{constructor(e,t){super();this._editor=e,this._contextKeyService=t,this._langId=R.languageId.bindTo(t),this._hasCompletionItemProvider=R.hasCompletionItemProvider.bindTo(t),this._hasCodeActionsProvider=R.hasCodeActionsProvider.bindTo(t),this._hasCodeLensProvider=R.hasCodeLensProvider.bindTo(t),this._hasDefinitionProvider=R.hasDefinitionProvider.bindTo(t),this._hasDeclarationProvider=R.hasDeclarationProvider.bindTo(t),this._hasImplementationProvider=R.hasImplementationProvider.bindTo(t),this._hasTypeDefinitionProvider=R.hasTypeDefinitionProvider.bindTo(t),this._hasHoverProvider=R.hasHoverProvider.bindTo(t),this._hasDocumentHighlightProvider=R.hasDocumentHighlightProvider.bindTo(t),this._hasDocumentSymbolProvider=R.hasDocumentSymbolProvider.bindTo(t),this._hasReferenceProvider=R.hasReferenceProvider.bindTo(t),this._hasRenameProvider=R.hasRenameProvider.bindTo(t),this._hasSignatureHelpProvider=R.hasSignatureHelpProvider.bindTo(t),this._hasInlayHintsProvider=R.hasInlayHintsProvider.bindTo(t),this._hasDocumentFormattingProvider=R.hasDocumentFormattingProvider.bindTo(t),this._hasDocumentSelectionFormattingProvider=R.hasDocumentSelectionFormattingProvider.bindTo(t),this._hasMultipleDocumentFormattingProvider=R.hasMultipleDocumentFormattingProvider.bindTo(t),this._hasMultipleDocumentSelectionFormattingProvider=R.hasMultipleDocumentSelectionFormattingProvider.bindTo(t),this._isInWalkThrough=R.isInWalkThroughSnippet.bindTo(t);const i=()=>this._update();this._register(e.onDidChangeModel(i)),this._register(e.onDidChangeModelLanguage(i)),this._register(no.onDidChange(i)),this._register($o.onDidChange(i)),this._register(Wa.onDidChange(i)),this._register(wp.onDidChange(i)),this._register(Av.onDidChange(i)),this._register(Rv.onDidChange(i)),this._register(Mv.onDidChange(i)),this._register(Cp.onDidChange(i)),this._register(Hd.onDidChange(i)),this._register(xs.onDidChange(i)),this._register(Iv.onDidChange(i)),this._register(Nv.onDidChange(i)),this._register(yp.onDidChange(i)),this._register(ro.onDidChange(i)),this._register(yh.onDidChange(i)),this._register(Kl.onDidChange(i)),i()}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();if(!e){this.reset();return}this._contextKeyService.bufferChangeEvents(()=>{this._langId.set(e.getLanguageIdentifier().language),this._hasCompletionItemProvider.set(no.has(e)),this._hasCodeActionsProvider.set($o.has(e)),this._hasCodeLensProvider.set(Wa.has(e)),this._hasDefinitionProvider.set(wp.has(e)),this._hasDeclarationProvider.set(Av.has(e)),this._hasImplementationProvider.set(Rv.has(e)),this._hasTypeDefinitionProvider.set(Mv.has(e)),this._hasHoverProvider.set(Cp.has(e)),this._hasDocumentHighlightProvider.set(Hd.has(e)),this._hasDocumentSymbolProvider.set(xs.has(e)),this._hasReferenceProvider.set(Iv.has(e)),this._hasRenameProvider.set(Nv.has(e)),this._hasSignatureHelpProvider.set(yh.has(e)),this._hasInlayHintsProvider.set(Kl.has(e)),this._hasDocumentFormattingProvider.set(yp.has(e)||ro.has(e)),this._hasDocumentSelectionFormattingProvider.set(ro.has(e)),this._hasMultipleDocumentFormattingProvider.set(yp.all(e).length+ro.all(e).length>1),this._hasMultipleDocumentSelectionFormattingProvider.set(ro.all(e).length>1),this._isInWalkThrough.set(e.uri.scheme===Ze.walkThroughSnippet)})}}class pte extends Y{constructor(e){super();this._onChange=this._register(new H),this.onChange=this._onChange.event,this._hasFocus=!1,this._domFocusTracker=this._register(Md(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}}const mte=encodeURIComponent("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 3' enable-background='new 0 0 6 3' height='3' width='6'><g fill='"),_te=encodeURIComponent("'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>");function rE(r){return mte+encodeURIComponent(r.toString())+_te}const bte=encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" height="3" width="12"><g fill="'),vte=encodeURIComponent('"><circle cx="1" cy="1" r="1"/><circle cx="5" cy="1" r="1"/><circle cx="9" cy="1" r="1"/></g></svg>');function Cte(r){return bte+encodeURIComponent(r.toString())+vte}Lt((r,e)=>{const t=r.getColor(jO);t&&e.addRule(`.monaco-editor .squiggly-error { border-bottom: 4px double ${t}; }`);const i=r.getColor(Qp);i&&e.addRule(`.monaco-editor .squiggly-error { background: url("data:image/svg+xml,${rE(i)}") repeat-x bottom left; }`);const n=r.getColor(OY);n&&e.addRule(`.monaco-editor .squiggly-error::before { display: block; content: ''; width: 100%; height: 100%; background: ${n}; }`);const s=r.getColor(qC);s&&e.addRule(`.monaco-editor .squiggly-warning { border-bottom: 4px double ${s}; }`);const o=r.getColor(Za);o&&e.addRule(`.monaco-editor .squiggly-warning { background: url("data:image/svg+xml,${rE(o)}") repeat-x bottom left; }`);const a=r.getColor(FY);a&&e.addRule(`.monaco-editor .squiggly-warning::before { display: block; content: ''; width: 100%; height: 100%; background: ${a}; }`);const l=r.getColor(eD);l&&e.addRule(`.monaco-editor .squiggly-info { border-bottom: 4px double ${l}; }`);const c=r.getColor(co);c&&e.addRule(`.monaco-editor .squiggly-info { background: url("data:image/svg+xml,${rE(c)}") repeat-x bottom left; }`);const h=r.getColor(BY);h&&e.addRule(`.monaco-editor .squiggly-info::before { display: block; content: ''; width: 100%; height: 100%; background: ${h}; }`);const u=r.getColor(VY);u&&e.addRule(`.monaco-editor .squiggly-hint { border-bottom: 2px dotted ${u}; }`);const d=r.getColor(WY);d&&e.addRule(`.monaco-editor .squiggly-hint { background: url("data:image/svg+xml,${Cte(d)}") no-repeat bottom left; }`);const f=r.getColor(pQ);f&&e.addRule(`.monaco-editor.showUnused .squiggly-inline-unnecessary { opacity: ${f.rgba.a}; }`);const g=r.getColor(gQ);g&&e.addRule(`.monaco-editor.showUnused .squiggly-unnecessary { border-bottom: 2px dashed ${g}; }`);const p=r.getColor(oc)||"inherit";e.addRule(`.monaco-editor.showDeprecated .squiggly-inline-deprecated { text-decoration: line-through; text-decoration-color: ${p}}`)});class Ft{constructor(e,t,i){const n=s=>this.emitter.fire(s);this.emitter=new H({onFirstListenerAdd:()=>e.addEventListener(t,n,i),onLastListenerRemove:()=>e.removeEventListener(t,n,i)})}get event(){return this.emitter.event}dispose(){this.emitter.dispose()}}function b4(r){return r.preventDefault(),r.stopPropagation(),r}var Ef=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};let wte=!1;var Pw;(function(r){r.North="north",r.South="south",r.East="east",r.West="west"})(Pw||(Pw={}));let yte=4;const Ste=new H;let Lte=300;const xte=new H;class sE{constructor(){this.disposables=new le}get onPointerMove(){return this.disposables.add(new Ft(window,"mousemove")).event}get onPointerUp(){return this.disposables.add(new Ft(window,"mouseup")).event}dispose(){this.disposables.dispose()}}Ef([Ei],sE.prototype,"onPointerMove",null);Ef([Ei],sE.prototype,"onPointerUp",null);class oE{constructor(e){this.el=e,this.disposables=new le}get onPointerMove(){return this.disposables.add(new Ft(this.el,Vt.Change)).event}get onPointerUp(){return this.disposables.add(new Ft(this.el,Vt.End)).event}dispose(){this.disposables.dispose()}}Ef([Ei],oE.prototype,"onPointerMove",null);Ef([Ei],oE.prototype,"onPointerUp",null);class Ow{constructor(e){this.factory=e}get onPointerMove(){return this.factory.onPointerMove}get onPointerUp(){return this.factory.onPointerUp}dispose(){}}Ef([Ei],Ow.prototype,"onPointerMove",null);Ef([Ei],Ow.prototype,"onPointerUp",null);class _n extends Y{constructor(e,t,i){super();this.hoverDelay=Lte,this.hoverDelayer=this._register(new Ta(this.hoverDelay)),this._state=3,this._onDidEnablementChange=this._register(new H),this.onDidEnablementChange=this._onDidEnablementChange.event,this._onDidStart=this._register(new H),this.onDidStart=this._onDidStart.event,this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidReset=this._register(new H),this.onDidReset=this._onDidReset.event,this._onDidEnd=this._register(new H),this.onDidEnd=this._onDidEnd.event,this.linkedSash=void 0,this.orthogonalStartSashDisposables=this._register(new le),this.orthogonalStartDragHandleDisposables=this._register(new le),this.orthogonalEndSashDisposables=this._register(new le),this.orthogonalEndDragHandleDisposables=this._register(new le),this.el=X(e,oe(".monaco-sash")),i.orthogonalEdge&&this.el.classList.add(`orthogonal-edge-${i.orthogonalEdge}`),Je&&this.el.classList.add("mac");const n=this._register(new Ft(this.el,"mousedown")).event;this._register(n(u=>this.onPointerStart(u,new sE),this));const s=this._register(new Ft(this.el,"dblclick")).event;this._register(s(this.onPointerDoublePress,this));const o=this._register(new Ft(this.el,"mouseenter")).event;this._register(o(()=>_n.onMouseEnter(this)));const a=this._register(new Ft(this.el,"mouseleave")).event;this._register(a(()=>_n.onMouseLeave(this))),this._register(Et.addTarget(this.el));const l=ke.map(this._register(new Ft(this.el,Vt.Start)).event,u=>{var d;return Object.assign(Object.assign({},u),{target:(d=u.initialTarget)!==null&&d!==void 0?d:null})});this._register(l(u=>this.onPointerStart(u,new oE(this.el)),this));const c=this._register(new Ft(this.el,Vt.Tap)).event,h=ke.map(ke.filter(ke.debounce(c,(u,d)=>{var f;return{event:d,count:((f=u==null?void 0:u.count)!==null&&f!==void 0?f:0)+1}},250),({count:u})=>u===2),({event:u})=>{var d;return Object.assign(Object.assign({},u),{target:(d=u.initialTarget)!==null&&d!==void 0?d:null})});this._register(h(this.onPointerDoublePress,this)),typeof i.size=="number"?(this.size=i.size,i.orientation===0?this.el.style.width=`${this.size}px`:this.el.style.height=`${this.size}px`):(this.size=yte,this._register(Ste.event(u=>{this.size=u,this.layout()}))),this._register(xte.event(u=>this.hoverDelay=u)),this.hidden=!1,this.layoutProvider=t,this.orthogonalStartSash=i.orthogonalStartSash,this.orthogonalEndSash=i.orthogonalEndSash,this.orientation=i.orientation||0,this.orientation===1?(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",wte),this.layout()}get state(){return this._state}set state(e){this._state!==e&&(this.el.classList.toggle("disabled",e===0),this.el.classList.toggle("minimum",e===1),this.el.classList.toggle("maximum",e===2),this._state=e,this._onDidEnablementChange.fire(e))}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){if(this.orthogonalStartDragHandleDisposables.clear(),this.orthogonalStartSashDisposables.clear(),e){const t=i=>{this.orthogonalStartDragHandleDisposables.clear(),i!==0&&(this._orthogonalStartDragHandle=X(this.el,oe(".orthogonal-drag-handle.start")),this.orthogonalStartDragHandleDisposables.add(Xe(()=>this._orthogonalStartDragHandle.remove())),this.orthogonalStartDragHandleDisposables.add(new Ft(this._orthogonalStartDragHandle,"mouseenter")).event(()=>_n.onMouseEnter(e),void 0,this.orthogonalStartDragHandleDisposables),this.orthogonalStartDragHandleDisposables.add(new Ft(this._orthogonalStartDragHandle,"mouseleave")).event(()=>_n.onMouseLeave(e),void 0,this.orthogonalStartDragHandleDisposables))};this.orthogonalStartSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){if(this.orthogonalEndDragHandleDisposables.clear(),this.orthogonalEndSashDisposables.clear(),e){const t=i=>{this.orthogonalEndDragHandleDisposables.clear(),i!==0&&(this._orthogonalEndDragHandle=X(this.el,oe(".orthogonal-drag-handle.end")),this.orthogonalEndDragHandleDisposables.add(Xe(()=>this._orthogonalEndDragHandle.remove())),this.orthogonalEndDragHandleDisposables.add(new Ft(this._orthogonalEndDragHandle,"mouseenter")).event(()=>_n.onMouseEnter(e),void 0,this.orthogonalEndDragHandleDisposables),this.orthogonalEndDragHandleDisposables.add(new Ft(this._orthogonalEndDragHandle,"mouseleave")).event(()=>_n.onMouseLeave(e),void 0,this.orthogonalEndDragHandleDisposables))};this.orthogonalEndSashDisposables.add(e.onDidEnablementChange(t,this)),t(e.state)}this._orthogonalEndSash=e}onPointerStart(e,t){St.stop(e);let i=!1;if(!e.__orthogonalSashEvent){const g=this.getOrthogonalSash(e);g&&(i=!0,e.__orthogonalSashEvent=!0,g.onPointerStart(e,new Ow(t)))}if(this.linkedSash&&!e.__linkedSashEvent&&(e.__linkedSashEvent=!0,this.linkedSash.onPointerStart(e,new Ow(t))),!this.state)return;const n=Pj("iframe");for(const g of n)g.style.pointerEvents="none";const s=e.pageX,o=e.pageY,a=e.altKey,l={startX:s,currentX:s,startY:o,currentY:o,altKey:a};this.el.classList.add("active"),this._onDidStart.fire(l);const c=Tr(this.el),h=()=>{let g="";i?g="all-scroll":this.orientation===1?this.state===1?g="s-resize":this.state===2?g="n-resize":g=Je?"row-resize":"ns-resize":this.state===1?g="e-resize":this.state===2?g="w-resize":g=Je?"col-resize":"ew-resize",c.textContent=`* { cursor: ${g} !important; }`},u=new le;h(),i||this.onDidEnablementChange(h,null,u);const d=g=>{St.stop(g,!1);const p={startX:s,currentX:g.pageX,startY:o,currentY:g.pageY,altKey:a};this._onDidChange.fire(p)},f=g=>{St.stop(g,!1),this.el.removeChild(c),this.el.classList.remove("active"),this._onDidEnd.fire(),u.dispose();for(const p of n)p.style.pointerEvents="auto"};t.onPointerMove(d,null,u),t.onPointerUp(f,null,u),u.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&&_n.onMouseEnter(e.linkedSash,!0)}static onMouseLeave(e,t=!1){e.hoverDelayer.cancel(),e.el.classList.remove("hover"),!t&&e.linkedSash&&_n.onMouseLeave(e.linkedSash,!0)}clearSashHoverState(){_n.onMouseLeave(this)}layout(){if(this.orientation===0){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")}}hide(){this.hidden=!0,this.el.style.display="none",this.el.setAttribute("aria-hidden","true")}getOrthogonalSash(e){if(!(!e.target||!(e.target instanceof HTMLElement))&&e.target.classList.contains("orthogonal-drag-handle"))return e.target.classList.contains("start")?this.orthogonalStartSash:this.orthogonalEndSash}dispose(){super.dispose(),this.el.remove()}}class gc{constructor(e,t=[],i=!1){this.ctor=e,this.staticArguments=t,this.supportsDelayedInstantiation=i}}const v4=[];function iu(r,e,t){e instanceof gc||(e=new gc(e,[],t)),v4.push([r,e])}function kte(){return v4}const aE=bt("IEditorCancelService"),C4=new Le("cancellableOperation",!1,m("cancellableOperation","Whether the editor runs a cancellable operation, e.g. like 'Peek References'"));iu(aE,class{constructor(){this._tokens=new WeakMap}add(r,e){let t=this._tokens.get(r);t||(t=r.invokeWithinContext(n=>{const s=C4.bindTo(n.get(Fe)),o=new Ir;return{key:s,tokens:o}}),this._tokens.set(r,t));let i;return t.key.set(!0),i=t.tokens.push(e),()=>{i&&(i(),t.key.set(!t.tokens.isEmpty()),i=void 0)}}cancel(r){const e=this._tokens.get(r);if(!e)return;const t=e.tokens.pop();t&&(t.cancel(),e.key.set(!e.tokens.isEmpty()))}},!0);class Dte extends Rn{constructor(e,t){super(t);this.editor=e,this._unregister=e.invokeWithinContext(i=>i.get(aE).add(e,this))}dispose(){this._unregister(),super.dispose()}}fe(new class extends en{constructor(){super({id:"editor.cancelOperation",kbOpts:{weight:100,primary:9},precondition:C4})}runEditorCommand(r,e){r.get(aE).cancel(e)}});class Im{constructor(e,t){if(this.flags=t,(this.flags&1)!=0){const i=e.getModel();this.modelVersionId=i?gn("{0}#{1}",i.uri.toString(),i.getVersionId()):null}else this.modelVersionId=null;(this.flags&4)!=0?this.position=e.getPosition():this.position=null,(this.flags&2)!=0?this.selection=e.getSelection():this.selection=null,(this.flags&8)!=0?(this.scrollLeft=e.getScrollLeft(),this.scrollTop=e.getScrollTop()):(this.scrollLeft=-1,this.scrollTop=-1)}_equals(e){if(!(e instanceof Im))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 Im(e,this.flags))}}class Nm extends Dte{constructor(e,t,i,n){super(e,n);this._listener=new le,t&4&&this._listener.add(e.onDidChangeCursorPosition(s=>{(!i||!k.containsPosition(i,s.position))&&this.cancel()})),t&2&&this._listener.add(e.onDidChangeCursorSelection(s=>{(!i||!k.containsRange(i,s.selection))&&this.cancel()})),t&8&&this._listener.add(e.onDidScrollChange(s=>this.cancel())),t&1&&(this._listener.add(e.onDidChangeModel(s=>this.cancel())),this._listener.add(e.onDidChangeModelContent(s=>this.cancel())))}dispose(){this._listener.dispose(),super.dispose()}}class lE extends Rn{constructor(e,t){super(t);this._listener=e.onDidChangeContent(()=>this.cancel())}dispose(){this._listener.dispose(),super.dispose()}}class pc{constructor(e,t,i){this._visiblePosition=e,this._visiblePositionScrollDelta=t,this._cursorPosition=i}static capture(e){let t=null,i=0;if(e.getScrollTop()!==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 pc(t,i,e.getPosition())}restore(e){if(this._visiblePosition){const t=e.getTopForPosition(this._visiblePosition.lineNumber,this._visiblePosition.column);e.setScrollTop(t+this._visiblePositionScrollDelta)}}restoreRelativeVerticalPositionOfCursor(e){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)}}const w4={RESOURCES:"ResourceURLs",DOWNLOAD_URL:"DownloadURL",FILES:"Files",TEXT:Ms.text,TERMINALS:"Terminals"};class Ete{constructor(e){this.data=e}update(){}getData(){return this.data}}const tl={CurrentDragAndDropData:void 0};class nu extends Y{constructor(e,t,i={}){super();this.options=i,this._context=e||this,this._action=t,t instanceof Ns&&this._register(t.onDidChange(n=>{!this.element||this.handleActionChangeEvent(n)}))}handleActionChangeEvent(e){e.enabled!==void 0&&this.updateEnabled(),e.checked!==void 0&&this.updateChecked(),e.class!==void 0&&this.updateClass(),e.label!==void 0&&(this.updateLabel(),this.updateTooltip()),e.tooltip!==void 0&&this.updateTooltip()}get actionRunner(){return this._actionRunner||(this._actionRunner=this._register(new sf)),this._actionRunner}set actionRunner(e){this._actionRunner=e}getAction(){return this._action}isEnabled(){return this._action.enabled}setActionContext(e){this._context=e}render(e){const t=this.element=e;this._register(Et.addTarget(e));const i=this.options&&this.options.draggable;i&&(e.draggable=!0,Mn&&this._register(J(e,Ee.DRAG_START,n=>{var s;return(s=n.dataTransfer)===null||s===void 0?void 0:s.setData(w4.TEXT,this._action.label)}))),this._register(J(t,Vt.Tap,n=>this.onClick(n,!0))),this._register(J(t,Ee.MOUSE_DOWN,n=>{i||St.stop(n,!0),this._action.enabled&&n.button===0&&t.classList.add("active")})),Je&&this._register(J(t,Ee.CONTEXT_MENU,n=>{n.button===0&&n.ctrlKey===!0&&this.onClick(n)})),this._register(J(t,Ee.CLICK,n=>{St.stop(n,!0),this.options&&this.options.isMenu||this.onClick(n)})),this._register(J(t,Ee.DBLCLICK,n=>{St.stop(n,!0)})),[Ee.MOUSE_UP,Ee.MOUSE_OUT].forEach(n=>{this._register(J(t,n,s=>{St.stop(s),t.classList.remove("active")}))})}onClick(e,t=!1){var i;St.stop(e,!0);const n=Zr(this._context)?((i=this.options)===null||i===void 0?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(){}updateTooltip(){}updateClass(){}updateChecked(){}dispose(){this.element&&(this.element.remove(),this.element=void 0),super.dispose()}}class Tm extends nu{constructor(e,t,i={}){super(e,t,i);this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass=""}render(e){super.render(e),this.element&&(this.label=X(this.element,oe("a.action-label"))),this.label&&(this._action.id===Ts.ID?this.label.setAttribute("role","presentation"):this.options.isMenu?this.label.setAttribute("role","menuitem"):this.label.setAttribute("role","button")),this.options.label&&this.options.keybinding&&this.element&&(X(this.element,oe("span.keybinding")).textContent=this.options.keybinding),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked()}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.getAction().label)}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.label&&(this.label.title=e)}updateClass(){this.cssClass&&this.label&&this.label.classList.remove(...this.cssClass.split(" ")),this.options.icon?(this.cssClass=this.getAction().class,this.label&&(this.label.classList.add("codicon"),this.cssClass&&this.label.classList.add(...this.cssClass.split(" "))),this.updateEnabled()):this.label&&this.label.classList.remove("codicon")}updateEnabled(){this.getAction().enabled?(this.label&&(this.label.removeAttribute("aria-disabled"),this.label.classList.remove("disabled")),this.element&&this.element.classList.remove("disabled")):(this.label&&(this.label.setAttribute("aria-disabled","true"),this.label.classList.add("disabled")),this.element&&this.element.classList.add("disabled"))}updateChecked(){this.label&&(this.getAction().checked?this.label.classList.add("checked"):this.label.classList.remove("checked"))}}var Ite=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class il extends Y{constructor(e,t={}){var i,n,s,o,a,l;super();this.triggerKeyDown=!1,this.focusable=!0,this._onDidBlur=this._register(new H),this.onDidBlur=this._onDidBlur.event,this._onDidCancel=this._register(new H({onFirstListenerAdd:()=>this.cancelHasListener=!0})),this.onDidCancel=this._onDidCancel.event,this.cancelHasListener=!1,this._onDidRun=this._register(new H),this.onDidRun=this._onDidRun.event,this._onBeforeRun=this._register(new H),this.onBeforeRun=this._onBeforeRun.event,this.options=t,this._context=(i=t.context)!==null&&i!==void 0?i:null,this._orientation=(n=this.options.orientation)!==null&&n!==void 0?n:0,this._triggerKeys={keyDown:(o=(s=this.options.triggerKeys)===null||s===void 0?void 0:s.keyDown)!==null&&o!==void 0?o:!1,keys:(l=(a=this.options.triggerKeys)===null||a===void 0?void 0:a.keys)!==null&&l!==void 0?l:[3,10]},this.options.actionRunner?this._actionRunner=this.options.actionRunner:(this._actionRunner=new sf,this._register(this._actionRunner)),this._register(this._actionRunner.onDidRun(u=>this._onDidRun.fire(u))),this._register(this._actionRunner.onBeforeRun(u=>this._onBeforeRun.fire(u))),this._actionIds=[],this.viewItems=[],this.focusedItem=void 0,this.domNode=document.createElement("div"),this.domNode.className="monaco-action-bar",t.animated!==!1&&this.domNode.classList.add("animated");let c,h;switch(this._orientation){case 0:c=[15],h=[17];break;case 1:c=[16],h=[18],this.domNode.className+=" vertical";break}this._register(J(this.domNode,Ee.KEY_DOWN,u=>{const d=new ei(u);let f=!0;const g=typeof this.focusedItem=="number"?this.viewItems[this.focusedItem]:void 0;c&&(d.equals(c[0])||d.equals(c[1]))?f=this.focusPrevious():h&&(d.equals(h[0])||d.equals(h[1]))?f=this.focusNext():d.equals(9)&&this.cancelHasListener?this._onDidCancel.fire():d.equals(14)?f=this.focusFirst():d.equals(13)?f=this.focusLast():d.equals(2)&&g instanceof nu&&g.trapsArrowNavigation?f=this.focusNext():this.isTriggerKeyEvent(d)?this._triggerKeys.keyDown?this.doTrigger(d):this.triggerKeyDown=!0:f=!1,f&&(d.preventDefault(),d.stopPropagation())})),this._register(J(this.domNode,Ee.KEY_UP,u=>{const d=new ei(u);this.isTriggerKeyEvent(d)?(!this._triggerKeys.keyDown&&this.triggerKeyDown&&(this.triggerKeyDown=!1,this.doTrigger(d)),d.preventDefault(),d.stopPropagation()):(d.equals(2)||d.equals(1024|2))&&this.updateFocusedItem()})),this.focusTracker=this._register(Md(this.domNode)),this._register(this.focusTracker.onDidBlur(()=>{(Rd()===this.domNode||!Fo(Rd(),this.domNode))&&(this._onDidBlur.fire(),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.actionsList.setAttribute("role","toolbar"),this.options.ariaLabel&&this.actionsList.setAttribute("aria-label",this.options.ariaLabel),this.domNode.appendChild(this.actionsList),e.appendChild(this.domNode)}isTriggerKeyEvent(e){let t=!1;return this._triggerKeys.keys.forEach(i=>{t=t||e.equals(i)}),t}updateFocusedItem(){for(let e=0;e<this.actionsList.children.length;e++){const t=this.actionsList.children[e];if(Fo(Rd(),t)){this.focusedItem=e;break}}}get context(){return this._context}set context(e){this._context=e,this.viewItems.forEach(t=>t.setActionContext(e))}get actionRunner(){return this._actionRunner}set actionRunner(e){e&&(this._actionRunner=e,this.viewItems.forEach(t=>t.actionRunner=e))}getContainer(){return this.domNode}push(e,t={}){const i=Array.isArray(e)?e:[e];let n=vh(t.index)?t.index:null;i.forEach(s=>{const o=document.createElement("li");o.className="action-item",o.setAttribute("role","presentation"),this.options.allowContextMenu||this._register(J(o,Ee.CONTEXT_MENU,l=>{St.stop(l,!0)}));let a;this.options.actionViewItemProvider&&(a=this.options.actionViewItemProvider(s)),a||(a=new Tm(this.context,s,t)),a.actionRunner=this._actionRunner,a.setActionContext(this.context),a.render(o),this.focusable&&a instanceof nu&&this.viewItems.length===0&&a.setFocusable(!0),n===null||n<0||n>=this.actionsList.children.length?(this.actionsList.appendChild(o),this.viewItems.push(a),this._actionIds.push(s.id)):(this.actionsList.insertBefore(o,this.actionsList.children[n]),this.viewItems.splice(n,0,a),this._actionIds.splice(n,0,s.id),n++)}),typeof this.focusedItem=="number"&&this.focus(this.focusedItem)}clear(){ht(this.viewItems),this.viewItems=[],this._actionIds=[],Ui(this.actionsList)}length(){return this.viewItems.length}focus(e){let t=!1,i;if(e===void 0?t=!0:typeof e=="number"?i=e:typeof e=="boolean"&&(t=e),t&&typeof this.focusedItem=="undefined"){const n=this.viewItems.findIndex(s=>s.isEnabled());this.focusedItem=n===-1?void 0:n,this.updateFocus()}else i!==void 0&&(this.focusedItem=i),this.updateFocus()}focusFirst(){return this.focusedItem=this.length()>1?1:0,this.focusPrevious()}focusLast(){return this.focusedItem=this.length()<2?0:this.length()-2,this.focusNext()}focusNext(){if(typeof this.focusedItem=="undefined")this.focusedItem=this.viewItems.length-1;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.options.preventLoopNavigation&&this.focusedItem+1>=this.viewItems.length)return this.focusedItem=e,!1;this.focusedItem=(this.focusedItem+1)%this.viewItems.length,t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(),!0}focusPrevious(){if(typeof this.focusedItem=="undefined")this.focusedItem=0;else if(this.viewItems.length<=1)return!1;const e=this.focusedItem;let t;do{if(this.focusedItem=this.focusedItem-1,this.focusedItem<0){if(this.options.preventLoopNavigation)return this.focusedItem=e,!1;this.focusedItem=this.viewItems.length-1}t=this.viewItems[this.focusedItem]}while(this.focusedItem!==e&&this.options.focusOnlyEnabledItems&&!t.isEnabled());return this.updateFocus(!0),!0}updateFocus(e,t){typeof this.focusedItem=="undefined"&&this.actionsList.focus({preventScroll:t});for(let i=0;i<this.viewItems.length;i++){const n=this.viewItems[i],s=n;if(i===this.focusedItem){let o=!0;pp(s.focus)||(o=!1),this.options.focusOnlyEnabledItems&&pp(n.isEnabled)&&!n.isEnabled()&&(o=!1),o?s.focus(e):this.actionsList.focus({preventScroll:t})}else pp(s.blur)&&s.blur()}}doTrigger(e){if(typeof this.focusedItem=="undefined")return;const t=this.viewItems[this.focusedItem];if(t instanceof nu){const i=t._context===null||t._context===void 0?e:t._context;this.run(t._action,i)}}run(e,t){return Ite(this,void 0,void 0,function*(){yield this._actionRunner.run(e,t)})}dispose(){ht(this.viewItems),this.viewItems=[],this._actionIds=[],this.getContainer().remove(),super.dispose()}}const Nte={IconContribution:"base.contributions.icons"};class Tte{constructor(){this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this.iconSchema={definitions:{icons:{type:"object",properties:{fontId:{type:"string",description:m("iconDefintion.fontId","The id of the font to use. If not set, the font that is defined first is used.")},fontCharacter:{type:"string",description:m("iconDefintion.fontCharacter","The font character associated with the icon definition.")}},additionalProperties:!1,defaultSnippets:[{body:{fontCharacter:"\\\\e030"}}]}},type:"object",properties:{}},this.iconReferenceSchema={type:"string",pattern:`^${fr.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 l=this.iconReferenceSchema.enum.indexOf(e);l!==-1&&(this.iconReferenceSchema.enumDescriptions[l]=i),this._onDidChange.fire()}return s}let o={id:e,description:i,defaults:t,deprecationMessage:n};this.iconsById[e]=o;let a={$ref:"#/definitions/icons"};return n&&(a.deprecationMessage=n),i&&(a.markdownDescription=`${i}: $(${e})`),this.iconSchema.properties[e]=a,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}getIconFont(e){return this.iconFontsById[e]}toString(){const e=(s,o)=>s.id.localeCompare(o.id),t=s=>{for(;Gt.isThemeIcon(s.defaults);)s=this.iconsById[s.defaults.id];return`codicon codicon-${s?s.id:""}`};let i=[];i.push("| preview | identifier | default codicon ID | description"),i.push("| ----------- | --------------------------------- | --------------------------------- | --------------------------------- |");const n=Object.keys(this.iconsById).map(s=>this.iconsById[s]);for(const s of n.filter(o=>!!o.description).sort(e))i.push(`|<i class="${t(s)}"></i>|${s.id}|${Gt.isThemeIcon(s.defaults)?s.defaults.id:s.id}|${s.description||""}|`);i.push("| preview | identifier "),i.push("| ----------- | --------------------------------- |");for(const s of n.filter(o=>!Gt.isThemeIcon(o.defaults)).sort(e))i.push(`|<i class="${t(s)}"></i>|${s.id}|`);return i.join(` -`)}}const ru=new Tte;mi.add(Nte.IconContribution,ru);function sn(r,e,t,i){return ru.registerIcon(r,e,t,i)}function Ate(){return ru}function Rte(){for(const r of Dv.all)ru.registerIcon(r.id,r.definition,r.description);Dv.onDidRegister(r=>ru.registerIcon(r.id,r.definition,r.description))}Rte();const y4="vscode://schemas/icons";let S4=mi.as(tC.JSONContribution);S4.registerSchema(y4,ru.getIconSchema());const L4=new Bt(()=>S4.notifySchemaChanged(y4),200);ru.onDidChange(()=>{L4.isScheduled()||L4.schedule()});const Mte=sn("widget-close",ve.close,m("widgetClose","Icon for the close action in widgets."));var Pte=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},cE;const Fw=3;class Am{constructor(e,t,i,n){this.originalLineStart=e,this.originalLineEnd=t,this.modifiedLineStart=i,this.modifiedLineEnd=n}getType(){return this.originalLineStart===0?1:this.modifiedLineStart===0?2:0}}class hE{constructor(e){this.entries=e}}const Ote=sn("diff-review-insert",ve.add,m("diffReviewInsertIcon","Icon for 'Insert' in diff review.")),Fte=sn("diff-review-remove",ve.remove,m("diffReviewRemoveIcon","Icon for 'Remove' in diff review.")),Bte=sn("diff-review-close",ve.close,m("diffReviewCloseIcon","Icon for 'Close' in diff review."));class nl extends Y{constructor(e){super();this._width=0,this._diffEditor=e,this._isVisible=!1,this.shadow=dt(document.createElement("div")),this.shadow.setClassName("diff-review-shadow"),this.actionBarContainer=dt(document.createElement("div")),this.actionBarContainer.setClassName("diff-review-actions"),this._actionBar=this._register(new il(this.actionBarContainer.domNode)),this._actionBar.push(new Ns("diffreview.close",m("label.close","Close"),"close-diff-review "+Gt.asClassName(Bte),!0,()=>Pte(this,void 0,void 0,function*(){return this.hide()})),{label:!1,icon:!0}),this.domNode=dt(document.createElement("div")),this.domNode.setClassName("diff-review monaco-editor-background"),this._content=dt(document.createElement("div")),this._content.setClassName("diff-review-content"),this._content.setAttribute("role","code"),this.scrollbar=this._register(new gm(this._content.domNode,{})),this.domNode.domNode.appendChild(this.scrollbar.getDomNode()),this._register(e.onDidUpdateDiff(()=>{!this._isVisible||(this._diffs=this._compute(),this._render())})),this._register(e.getModifiedEditor().onDidChangeCursorPosition(()=>{!this._isVisible||this._render()})),this._register(ki(this.domNode.domNode,"click",t=>{t.preventDefault();let i=GM(t.target,"diff-review-row");i&&this._goToRow(i)})),this._register(ki(this.domNode.domNode,"keydown",t=>{(t.equals(18)||t.equals(2048|18)||t.equals(512|18))&&(t.preventDefault(),this._goToRow(this._getNextRow())),(t.equals(16)||t.equals(2048|16)||t.equals(512|16))&&(t.preventDefault(),this._goToRow(this._getPrevRow())),(t.equals(9)||t.equals(2048|9)||t.equals(512|9)||t.equals(1024|9))&&(t.preventDefault(),this.hide()),(t.equals(10)||t.equals(3))&&(t.preventDefault(),this.accept())})),this._diffs=[],this._currentDiff=null}prev(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=this._diffs.length+i-1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new $(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}next(){let e=0;if(this._isVisible||(this._diffs=this._compute()),this._isVisible){let i=-1;for(let n=0,s=this._diffs.length;n<s;n++)if(this._diffs[n]===this._currentDiff){i=n;break}e=i+1}else e=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs.length===0)return;e=e%this._diffs.length;const t=this._diffs[e].entries;this._diffEditor.setPosition(new $(t[0].modifiedLineStart,1)),this._diffEditor.setSelection({startColumn:1,startLineNumber:t[0].modifiedLineStart,endColumn:1073741824,endLineNumber:t[t.length-1].modifiedLineEnd}),this._isVisible=!0,this._diffEditor.doLayout(),this._render(),this._goToRow(this._getNextRow())}accept(){let e=-1,t=this._getCurrentFocusedRow();if(t){let i=parseInt(t.getAttribute("data-line"),10);isNaN(i)||(e=i)}this.hide(),e!==-1&&(this._diffEditor.setPosition(new $(e,1)),this._diffEditor.revealPosition(new $(e,1),1))}hide(){this._isVisible=!1,this._diffEditor.updateOptions({readOnly:!1}),this._diffEditor.focus(),this._diffEditor.doLayout(),this._render()}_getPrevRow(){let e=this._getCurrentFocusedRow();return e?e.previousElementSibling?e.previousElementSibling:e:this._getFirstRow()}_getNextRow(){let e=this._getCurrentFocusedRow();return e?e.nextElementSibling?e.nextElementSibling:e:this._getFirstRow()}_getFirstRow(){return this.domNode.domNode.querySelector(".diff-review-row")}_getCurrentFocusedRow(){let e=document.activeElement;return e&&/diff-review-row/.test(e.className)?e:null}_goToRow(e){let t=this._getCurrentFocusedRow();e.tabIndex=0,e.focus(),t&&t!==e&&(t.tabIndex=-1),this.scrollbar.scanDomNode()}isVisible(){return this._isVisible}layout(e,t,i){this._width=t,this.shadow.setTop(e-6),this.shadow.setWidth(t),this.shadow.setHeight(this._isVisible?6:0),this.domNode.setTop(e),this.domNode.setWidth(t),this.domNode.setHeight(i),this._content.setHeight(i),this._content.setWidth(t),this._isVisible?(this.actionBarContainer.setAttribute("aria-hidden","false"),this.actionBarContainer.setDisplay("block")):(this.actionBarContainer.setAttribute("aria-hidden","true"),this.actionBarContainer.setDisplay("none"))}_compute(){const e=this._diffEditor.getLineChanges();if(!e||e.length===0)return[];const t=this._diffEditor.getOriginalEditor().getModel(),i=this._diffEditor.getModifiedEditor().getModel();return!t||!i?[]:nl._mergeAdjacent(e,t.getLineCount(),i.getLineCount())}static _mergeAdjacent(e,t,i){if(!e||e.length===0)return[];let n=[],s=0;for(let c=0,h=e.length;c<h;c++){const u=e[c],d=u.originalStartLineNumber,f=u.originalEndLineNumber,g=u.modifiedStartLineNumber,p=u.modifiedEndLineNumber;let _=[],v=0;{const b=f===0?d:d-1,C=p===0?g:g-1;let y=1,x=1;if(c>0){const L=e[c-1];L.originalEndLineNumber===0?y=L.originalStartLineNumber+1:y=L.originalEndLineNumber+1,L.modifiedEndLineNumber===0?x=L.modifiedStartLineNumber+1:x=L.modifiedEndLineNumber+1}let S=b-Fw+1,w=C-Fw+1;if(S<y){const L=y-S;S=S+L,w=w+L}if(w<x){const L=x-w;S=S+L,w=w+L}_[v++]=new Am(S,b,w,C)}f!==0&&(_[v++]=new Am(d,f,0,0)),p!==0&&(_[v++]=new Am(0,0,g,p));{const b=f===0?d+1:f+1,C=p===0?g+1:p+1;let y=t,x=i;if(c+1<h){const L=e[c+1];L.originalEndLineNumber===0?y=L.originalStartLineNumber:y=L.originalStartLineNumber-1,L.modifiedEndLineNumber===0?x=L.modifiedStartLineNumber:x=L.modifiedStartLineNumber-1}let S=b+Fw-1,w=C+Fw-1;if(S>y){const L=y-S;S=S+L,w=w+L}if(w>x){const L=x-w;S=S+L,w=w+L}_[v++]=new Am(b,S,C,w)}n[s++]=new hE(_)}let o=n[0].entries,a=[],l=0;for(let c=1,h=n.length;c<h;c++){const u=n[c].entries,d=o[o.length-1],f=u[0];if(d.getType()===0&&f.getType()===0&&f.originalLineStart<=d.originalLineEnd){o[o.length-1]=new Am(d.originalLineStart,f.originalLineEnd,d.modifiedLineStart,f.modifiedLineEnd),o=o.concat(u.slice(1));continue}a[l++]=new hE(o),o=u}return a[l++]=new hE(o),a}_findDiffIndex(e){const t=e.lineNumber;for(let i=0,n=this._diffs.length;i<n;i++){const s=this._diffs[i].entries,o=s[s.length-1].modifiedLineEnd;if(t<=o)return i}return 0}_render(){const e=this._diffEditor.getOriginalEditor().getOptions(),t=this._diffEditor.getModifiedEditor().getOptions(),i=this._diffEditor.getOriginalEditor().getModel(),n=this._diffEditor.getModifiedEditor().getModel(),s=i.getOptions(),o=n.getOptions();if(!this._isVisible||!i||!n){Ui(this._content.domNode),this._currentDiff=null,this.scrollbar.scanDomNode();return}this._diffEditor.updateOptions({readOnly:!0});const a=this._findDiffIndex(this._diffEditor.getPosition());if(this._diffs[a]===this._currentDiff)return;this._currentDiff=this._diffs[a];const l=this._diffs[a].entries;let c=document.createElement("div");c.className="diff-review-table",c.setAttribute("role","list"),c.setAttribute("aria-label",'Difference review. Use "Stage | Unstage | Revert Selected Ranges" commands'),Dn.applyFontInfoSlow(c,t.get(43));let h=0,u=0,d=0,f=0;for(let w=0,L=l.length;w<L;w++){const N=l[w],P=N.originalLineStart,B=N.originalLineEnd,U=N.modifiedLineStart,j=N.modifiedLineEnd;P!==0&&(h===0||P<h)&&(h=P),B!==0&&(u===0||B>u)&&(u=B),U!==0&&(d===0||U<d)&&(d=U),j!==0&&(f===0||j>f)&&(f=j)}let g=document.createElement("div");g.className="diff-review-row";let p=document.createElement("div");p.className="diff-review-cell diff-review-summary";const _=u-h+1,v=f-d+1;p.appendChild(document.createTextNode(`${a+1}/${this._diffs.length}: @@ -${h},${_} +${d},${v} @@`)),g.setAttribute("data-line",String(d));const b=w=>w===0?m("no_lines_changed","no lines changed"):w===1?m("one_line_changed","1 line changed"):m("more_lines_changed","{0} lines changed",w),C=b(_),y=b(v);g.setAttribute("aria-label",m({key:"header",comment:["This is the ARIA label for a git diff header.","A git diff header looks like this: @@ -154,12 +159,39 @@.","That encodes that at original line 154 (which is now line 159), 12 lines were removed/changed with 39 lines.","Variables 0 and 1 refer to the diff index out of total number of diffs.","Variables 2 and 4 will be numbers (a line number).",'Variables 3 and 5 will be "no lines changed", "1 line changed" or "X lines changed", localized separately.']},"Difference {0} of {1}: original line {2}, {3}, modified line {4}, {5}",a+1,this._diffs.length,h,C,d,y)),g.appendChild(p),g.setAttribute("role","listitem"),c.appendChild(g);const x=t.get(58);let S=d;for(let w=0,L=l.length;w<L;w++){const N=l[w];nl._renderSection(c,N,S,x,this._width,e,i,s,t,n,o),N.modifiedLineStart!==0&&(S=N.modifiedLineEnd)}Ui(this._content.domNode),this._content.domNode.appendChild(c),this.scrollbar.scanDomNode()}static _renderSection(e,t,i,n,s,o,a,l,c,h,u){const d=t.getType();let f="diff-review-row",g="";const p="diff-review-spacer";let _=null;switch(d){case 1:f="diff-review-row line-insert",g=" char-insert",_=Ote;break;case 2:f="diff-review-row line-delete",g=" char-delete",_=Fte;break}const v=t.originalLineStart,b=t.originalLineEnd,C=t.modifiedLineStart,y=t.modifiedLineEnd,x=Math.max(y-C,b-v),S=o.get(129),w=S.glyphMarginWidth+S.lineNumbersWidth,L=c.get(129),N=10+L.glyphMarginWidth+L.lineNumbersWidth;for(let P=0;P<=x;P++){const B=v===0?0:v+P,U=C===0?0:C+P,j=document.createElement("div");j.style.minWidth=s+"px",j.className=f,j.setAttribute("role","listitem"),U!==0&&(i=U),j.setAttribute("data-line",String(i));let re=document.createElement("div");re.className="diff-review-cell",re.style.height=`${n}px`,j.appendChild(re);const te=document.createElement("span");te.style.width=w+"px",te.style.minWidth=w+"px",te.className="diff-review-line-number"+g,B!==0?te.appendChild(document.createTextNode(String(B))):te.innerText="\xA0",re.appendChild(te);const A=document.createElement("span");A.style.width=N+"px",A.style.minWidth=N+"px",A.style.paddingRight="10px",A.className="diff-review-line-number"+g,U!==0?A.appendChild(document.createTextNode(String(U))):A.innerText="\xA0",re.appendChild(A);const D=document.createElement("span");if(D.className=p,_){const ge=document.createElement("span");ge.className=Gt.asClassName(_),ge.innerText="\xA0\xA0",D.appendChild(ge)}else D.innerText="\xA0\xA0";re.appendChild(D);let M;if(U!==0){let ge=this._renderLine(h,c,u.tabSize,U);nl._ttPolicy&&(ge=nl._ttPolicy.createHTML(ge)),re.insertAdjacentHTML("beforeend",ge),M=h.getLineContent(U)}else{let ge=this._renderLine(a,o,l.tabSize,B);nl._ttPolicy&&(ge=nl._ttPolicy.createHTML(ge)),re.insertAdjacentHTML("beforeend",ge),M=a.getLineContent(B)}M.length===0&&(M=m("blankLine","blank"));let W="";switch(d){case 0:B===U?W=m({key:"unchangedLine",comment:["The placeholders are contents of the line and should not be translated."]},"{0} unchanged line {1}",M,B):W=m("equalLine","{0} original line {1} modified line {2}",M,B,U);break;case 1:W=m("insertLine","+ {0} modified line {1}",M,U);break;case 2:W=m("deleteLine","- {0} original line {1}",M,B);break}j.setAttribute("aria-label",W),e.appendChild(j)}}static _renderLine(e,t,i,n){const s=e.getLineContent(n),o=t.get(43),a=Ki.createEmpty(s),l=Or.isBasicASCII(s,e.mightContainNonBasicASCII()),c=Or.containsRTL(s,l,e.mightContainRTL());return Yv(new kh(o.isMonospace&&!t.get(29),o.canUseHalfwidthRightwardsArrow,s,!1,l,c,0,a,[],i,0,o.spaceWidth,o.middotWidth,o.wsmiddotWidth,t.get(104),t.get(87),t.get(82),t.get(44)!==Dr.OFF,null)).html}}nl._ttPolicy=(cE=window.trustedTypes)===null||cE===void 0?void 0:cE.createPolicy("diffReview",{createHTML:r=>r});Lt((r,e)=>{const t=r.getColor(aF);t&&e.addRule(`.monaco-diff-editor .diff-review-line-number { color: ${t}; }`);const i=r.getColor($C);i&&e.addRule(`.monaco-diff-editor .diff-review-shadow { box-shadow: ${i} 0 -6px 6px -6px inset; }`)});class Wte extends Se{constructor(){super({id:"editor.action.diffReview.next",label:m("editor.action.diffReview.next","Go to Next Difference"),alias:"Go to Next Difference",precondition:_e.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:65,weight:100}})}run(e,t){const i=x4(e);i&&i.diffReviewNext()}}class Vte extends Se{constructor(){super({id:"editor.action.diffReview.prev",label:m("editor.action.diffReview.prev","Go to Previous Difference"),alias:"Go to Previous Difference",precondition:_e.has("isInDiffEditor"),kbOpts:{kbExpr:null,primary:1024|65,weight:100}})}run(e,t){const i=x4(e);i&&i.diffReviewPrev()}}function x4(r){const e=r.get(Ct),t=e.listDiffEditors(),i=e.getActiveCodeEditor();if(!i)return null;for(let n=0,s=t.length;n<s;n++){const o=t[n];if(o.getModifiedEditor().getId()===i.getId()||o.getOriginalEditor().getId()===i.getId())return o}return null}me(Wte);me(Vte);const mc=bt("contextViewService"),_c=bt("contextMenuService");var uE=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Hte extends Y{constructor(e,t,i,n,s,o){super();this._viewZoneId=e,this._marginDomNode=t,this.editor=i,this.diff=n,this._contextMenuService=s,this._clipboardService=o,this._visibility=!1,this._marginDomNode.style.zIndex="10",this._diffActions=document.createElement("div"),this._diffActions.className=ve.lightBulb.classNames+" lightbulb-glyph",this._diffActions.style.position="absolute";const a=i.getOption(58),l=i.getModel().getEOL();this._diffActions.style.right="0px",this._diffActions.style.visibility="hidden",this._diffActions.style.height=`${a}px`,this._diffActions.style.lineHeight=`${a}px`,this._marginDomNode.appendChild(this._diffActions);const c=[];c.push(new Ns("diff.clipboard.copyDeletedContent",n.originalEndLineNumber>n.modifiedStartLineNumber?m("diff.clipboard.copyDeletedLinesContent.label","Copy deleted lines"):m("diff.clipboard.copyDeletedLinesContent.single.label","Copy deleted line"),void 0,!0,()=>uE(this,void 0,void 0,function*(){const g=new k(n.originalStartLineNumber,1,n.originalEndLineNumber+1,1),p=n.originalModel.getValueInRange(g);yield this._clipboardService.writeText(p)})));let h=0,u;n.originalEndLineNumber>n.modifiedStartLineNumber&&(u=new Ns("diff.clipboard.copyDeletedLineContent",m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber),void 0,!0,()=>uE(this,void 0,void 0,function*(){const g=n.originalModel.getLineContent(n.originalStartLineNumber+h);yield this._clipboardService.writeText(g)})),c.push(u)),i.getOption(80)||c.push(new Ns("diff.inline.revertChange",m("diff.inline.revertChange.label","Revert this change"),void 0,!0,()=>uE(this,void 0,void 0,function*(){const g=new k(n.originalStartLineNumber,1,n.originalEndLineNumber,n.originalModel.getLineMaxColumn(n.originalEndLineNumber)),p=n.originalModel.getValueInRange(g);if(n.modifiedEndLineNumber===0){const _=i.getModel().getLineMaxColumn(n.modifiedStartLineNumber);i.executeEdits("diffEditor",[{range:new k(n.modifiedStartLineNumber,_,n.modifiedStartLineNumber,_),text:l+p}])}else{const _=i.getModel().getLineMaxColumn(n.modifiedEndLineNumber);i.executeEdits("diffEditor",[{range:new k(n.modifiedStartLineNumber,1,n.modifiedEndLineNumber,_),text:p}])}})));const f=(g,p)=>{this._contextMenuService.showContextMenu({getAnchor:()=>({x:g,y:p}),getActions:()=>(u&&(u.label=m("diff.clipboard.copyDeletedLineContent.label","Copy deleted line ({0})",n.originalStartLineNumber+h)),c),autoSelectFirstItem:!0})};this._register(ki(this._diffActions,"mousedown",g=>{const{top:p,height:_}=Qi(this._diffActions);let v=Math.floor(a/3);g.preventDefault(),f(g.posx,p+_+v)})),this._register(i.onMouseMove(g=>{g.target.type===8||g.target.type===5?g.target.detail.viewZoneId===this._viewZoneId?(this.visibility=!0,h=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,a)):this.visibility=!1:this.visibility=!1})),this._register(i.onMouseDown(g=>{!g.event.rightButton||(g.target.type===8||g.target.type===5)&&g.target.detail.viewZoneId===this._viewZoneId&&(g.event.preventDefault(),h=this._updateLightBulbPosition(this._marginDomNode,g.event.browserEvent.y,a),f(g.event.posx,g.event.posy+a))}))}get visibility(){return this._visibility}set visibility(e){this._visibility!==e&&(this._visibility=e,e?this._diffActions.style.visibility="visible":this._diffActions.style.visibility="hidden")}_updateLightBulbPosition(e,t,i){const{top:n}=Qi(e),s=t-n,o=Math.floor(s/i),a=o*i;if(this._diffActions.style.top=`${a}px`,this.diff.viewLineCounts){let l=0;for(let c=0;c<this.diff.viewLineCounts.length;c++)if(l+=this.diff.viewLineCounts[c],o<l)return c}return o}}const bc=bt("clipboardService");class su{constructor(e){this.callback=e}report(e){this._value=e,this.callback(this._value)}}su.None=Object.freeze({report(){}});const rl=bt("editorProgressService");var zte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sl=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},dE;class k4{constructor(e,t){this._contextMenuService=e,this._clipboardService=t,this._zones=[],this._inlineDiffMargins=[],this._zonesMap={},this._decorations=[]}getForeignViewZones(e){return e.filter(t=>!this._zonesMap[String(t.id)])}clean(e){this._zones.length>0&&e.changeViewZones(t=>{for(const i of this._zones)t.removeZone(i)}),this._zones=[],this._zonesMap={},this._decorations=e.deltaDecorations(this._decorations,[])}apply(e,t,i,n){const s=n?pc.capture(e):null;e.changeViewZones(o=>{for(const a of this._zones)o.removeZone(a);for(const a of this._inlineDiffMargins)a.dispose();this._zones=[],this._zonesMap={},this._inlineDiffMargins=[];for(let a=0,l=i.zones.length;a<l;a++){const c=i.zones[a];c.suppressMouseDown=!0;const h=o.addZone(c);this._zones.push(h),this._zonesMap[String(h)]=!0,i.zones[a].diff&&c.marginDomNode&&(c.suppressMouseDown=!1,this._inlineDiffMargins.push(new Hte(h,c.marginDomNode,e,i.zones[a].diff,this._contextMenuService,this._clipboardService)))}}),s&&s.restore(e),this._decorations=e.deltaDecorations(this._decorations,i.decorations),t&&t.setZones(i.overviewZones)}}let $te=0;const Ute=sn("diff-insert",ve.add,m("diffInsertIcon","Line decoration for inserts in the diff editor.")),D4=sn("diff-remove",ve.remove,m("diffRemoveIcon","Line decoration for removals in the diff editor.")),E4=(dE=window.trustedTypes)===null||dE===void 0?void 0:dE.createPolicy("diffEditorWidget",{createHTML:r=>r});let vc=class bn extends Y{constructor(e,t,i,n,s,o,a,l,c,h,u,d){super();this._editorProgressService=d,this._onDidDispose=this._register(new H),this.onDidDispose=this._onDidDispose.event,this._onDidUpdateDiff=this._register(new H),this.onDidUpdateDiff=this._onDidUpdateDiff.event,this._onDidContentSizeChange=this._register(new H),this._lastOriginalWarning=null,this._lastModifiedWarning=null,this._editorWorkerService=s,this._codeEditorService=l,this._contextKeyService=this._register(o.createScoped(e)),this._instantiationService=a.createChild(new xm([Fe,this._contextKeyService])),this._contextKeyService.createKey("isInDiffEditor",!0),this._themeService=c,this._notificationService=h,this._id=++$te,this._state=0,this._updatingDiffProgress=null,this._domElement=e,t=t||{},this._options=R4(t,{enableSplitViewResizing:!0,renderSideBySide:!0,maxComputationTime:5e3,maxFileSize:50,ignoreTrimWhitespace:!0,renderIndicators:!0,originalEditable:!1,diffCodeLens:!1,renderOverviewRuler:!0,diffWordWrap:"inherit"}),typeof t.isInEmbeddedEditor!="undefined"?this._contextKeyService.createKey("isInEmbeddedDiffEditor",t.isInEmbeddedEditor):this._contextKeyService.createKey("isInEmbeddedDiffEditor",!1),this._updateDecorationsRunner=this._register(new Bt(()=>this._updateDecorations(),0)),this._containerDomElement=document.createElement("div"),this._containerDomElement.className=bn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide),this._containerDomElement.style.position="relative",this._containerDomElement.style.height="100%",this._domElement.appendChild(this._containerDomElement),this._overviewViewportDomElement=dt(document.createElement("div")),this._overviewViewportDomElement.setClassName("diffViewport"),this._overviewViewportDomElement.setPosition("absolute"),this._overviewDomElement=document.createElement("div"),this._overviewDomElement.className="diffOverview",this._overviewDomElement.style.position="absolute",this._overviewDomElement.appendChild(this._overviewViewportDomElement.domNode),this._register(ki(this._overviewDomElement,"mousedown",g=>{this._modifiedEditor.delegateVerticalScrollbarMouseDown(g)})),this._options.renderOverviewRuler&&this._containerDomElement.appendChild(this._overviewDomElement),this._originalDomNode=document.createElement("div"),this._originalDomNode.className="editor original",this._originalDomNode.style.position="absolute",this._originalDomNode.style.height="100%",this._containerDomElement.appendChild(this._originalDomNode),this._modifiedDomNode=document.createElement("div"),this._modifiedDomNode.className="editor modified",this._modifiedDomNode.style.position="absolute",this._modifiedDomNode.style.height="100%",this._containerDomElement.appendChild(this._modifiedDomNode),this._beginUpdateDecorationsTimeout=-1,this._currentlyChangingViewZones=!1,this._diffComputationToken=0,this._originalEditorState=new k4(u,n),this._modifiedEditorState=new k4(u,n),this._isVisible=!0,this._isHandlingScrollEvent=!1,this._elementSizeObserver=this._register(new cO(this._containerDomElement,t.dimension,()=>this._onDidContainerSizeChanged())),t.automaticLayout&&this._elementSizeObserver.startObserving(),this._diffComputationResult=null,this._originalEditor=this._createLeftHandSideEditor(t,i.originalEditor||{}),this._modifiedEditor=this._createRightHandSideEditor(t,i.modifiedEditor||{}),this._originalOverviewRuler=null,this._modifiedOverviewRuler=null,this._reviewPane=new nl(this),this._containerDomElement.appendChild(this._reviewPane.domNode.domNode),this._containerDomElement.appendChild(this._reviewPane.shadow.domNode),this._containerDomElement.appendChild(this._reviewPane.actionBarContainer.domNode),this._options.renderSideBySide?this._setStrategy(new al(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new T4(this._createDataSource(),this._options.enableSplitViewResizing)),this._register(c.onDidColorThemeChange(g=>{this._strategy&&this._strategy.applyColors(g)&&this._updateDecorationsRunner.schedule(),this._containerDomElement.className=bn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)}));const f=af.getDiffEditorContributions();for(const g of f)try{this._register(a.createInstance(g.ctor,this))}catch(p){Oe(p)}this._codeEditorService.addDiffEditor(this)}_setState(e){this._state!==e&&(this._state=e,this._updatingDiffProgress&&(this._updatingDiffProgress.done(),this._updatingDiffProgress=null),this._state===1&&(this._updatingDiffProgress=this._editorProgressService.show(!0,1e3)))}diffReviewNext(){this._reviewPane.next()}diffReviewPrev(){this._reviewPane.prev()}static _getClassName(e,t){let i="monaco-diff-editor monaco-editor-background ";return t&&(i+="side-by-side "),i+=TC(e.type),i}_recreateOverviewRulers(){!this._options.renderOverviewRuler||(this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._originalEditor.hasModel()&&(this._originalOverviewRuler=this._originalEditor.createOverviewRuler("original diffOverviewRuler"),this._overviewDomElement.appendChild(this._originalOverviewRuler.getDomNode())),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._modifiedEditor.hasModel()&&(this._modifiedOverviewRuler=this._modifiedEditor.createOverviewRuler("modified diffOverviewRuler"),this._overviewDomElement.appendChild(this._modifiedOverviewRuler.getDomNode())),this._layoutOverviewRulers())}_createLeftHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._originalDomNode,this._adjustOptionsForLeftHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._modifiedEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(43)&&this._updateDecorationsRunner.schedule(),s.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()}));const n=this._contextKeyService.createKey("isInDiffLeftEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+bn.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createRightHandSideEditor(e,t){const i=this._createInnerEditor(this._instantiationService,this._modifiedDomNode,this._adjustOptionsForRightHandSide(e),t);this._register(i.onDidScrollChange(s=>{this._isHandlingScrollEvent||!s.scrollTopChanged&&!s.scrollLeftChanged&&!s.scrollHeightChanged||(this._isHandlingScrollEvent=!0,this._originalEditor.setScrollPosition({scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}),this._isHandlingScrollEvent=!1,this._layoutOverviewViewport())})),this._register(i.onDidChangeViewZones(()=>{this._onViewZonesChanged()})),this._register(i.onDidChangeConfiguration(s=>{!i.getModel()||(s.hasChanged(43)&&this._updateDecorationsRunner.schedule(),s.hasChanged(130)&&(this._updateDecorationsRunner.cancel(),this._updateDecorations()))})),this._register(i.onDidChangeModelContent(()=>{this._isVisible&&this._beginUpdateDecorationsSoon()})),this._register(i.onDidChangeModelOptions(s=>{s.tabSize&&this._updateDecorationsRunner.schedule()}));const n=this._contextKeyService.createKey("isInDiffRightEditor",i.hasWidgetFocus());return this._register(i.onDidFocusEditorWidget(()=>n.set(!0))),this._register(i.onDidBlurEditorWidget(()=>n.set(!1))),this._register(i.onDidContentSizeChange(s=>{const o=this._originalEditor.getContentWidth()+this._modifiedEditor.getContentWidth()+bn.ONE_OVERVIEW_WIDTH,a=Math.max(this._modifiedEditor.getContentHeight(),this._originalEditor.getContentHeight());this._onDidContentSizeChange.fire({contentHeight:a,contentWidth:o,contentHeightChanged:s.contentHeightChanged,contentWidthChanged:s.contentWidthChanged})})),i}_createInnerEditor(e,t,i,n){return e.createInstance(Em,t,i,n)}dispose(){this._codeEditorService.removeDiffEditor(this),this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._cleanViewZonesAndDecorations(),this._originalOverviewRuler&&(this._overviewDomElement.removeChild(this._originalOverviewRuler.getDomNode()),this._originalOverviewRuler.dispose()),this._modifiedOverviewRuler&&(this._overviewDomElement.removeChild(this._modifiedOverviewRuler.getDomNode()),this._modifiedOverviewRuler.dispose()),this._overviewDomElement.removeChild(this._overviewViewportDomElement.domNode),this._options.renderOverviewRuler&&this._containerDomElement.removeChild(this._overviewDomElement),this._containerDomElement.removeChild(this._originalDomNode),this._originalEditor.dispose(),this._containerDomElement.removeChild(this._modifiedDomNode),this._modifiedEditor.dispose(),this._strategy.dispose(),this._containerDomElement.removeChild(this._reviewPane.domNode.domNode),this._containerDomElement.removeChild(this._reviewPane.shadow.domNode),this._containerDomElement.removeChild(this._reviewPane.actionBarContainer.domNode),this._reviewPane.dispose(),this._domElement.removeChild(this._containerDomElement),this._onDidDispose.fire(),super.dispose()}getId(){return this.getEditorType()+":"+this._id}getEditorType(){return mp.IDiffEditor}getLineChanges(){return this._diffComputationResult?this._diffComputationResult.changes:null}getOriginalEditor(){return this._originalEditor}getModifiedEditor(){return this._modifiedEditor}updateOptions(e){const t=R4(e,this._options),i=Gte(this._options,t);this._options=t;const n=i.ignoreTrimWhitespace||i.renderIndicators,s=this._isVisible&&(i.maxComputationTime||i.maxFileSize);n?this._beginUpdateDecorations():s&&this._beginUpdateDecorationsSoon(),this._modifiedEditor.updateOptions(this._adjustOptionsForRightHandSide(e)),this._originalEditor.updateOptions(this._adjustOptionsForLeftHandSide(e)),this._strategy.setEnableSplitViewResizing(this._options.enableSplitViewResizing),i.renderSideBySide&&(this._options.renderSideBySide?this._setStrategy(new al(this._createDataSource(),this._options.enableSplitViewResizing)):this._setStrategy(new T4(this._createDataSource(),this._options.enableSplitViewResizing)),this._containerDomElement.className=bn._getClassName(this._themeService.getColorTheme(),this._options.renderSideBySide)),i.renderOverviewRuler&&(this._options.renderOverviewRuler?this._containerDomElement.appendChild(this._overviewDomElement):this._containerDomElement.removeChild(this._overviewDomElement))}getModel(){return{original:this._originalEditor.getModel(),modified:this._modifiedEditor.getModel()}}setModel(e){if(e&&(!e.original||!e.modified))throw new Error(e.original?"DiffEditorWidget.setModel: Modified model is null":"DiffEditorWidget.setModel: Original model is null");this._cleanViewZonesAndDecorations(),this._originalEditor.setModel(e?e.original:null),this._modifiedEditor.setModel(e?e.modified:null),this._updateDecorationsRunner.cancel(),e&&(this._originalEditor.setScrollTop(0),this._modifiedEditor.setScrollTop(0)),this._diffComputationResult=null,this._diffComputationToken++,this._setState(0),e&&(this._recreateOverviewRulers(),this._beginUpdateDecorations()),this._layoutOverviewViewport()}getDomNode(){return this._domElement}getVisibleColumnFromPosition(e){return this._modifiedEditor.getVisibleColumnFromPosition(e)}getPosition(){return this._modifiedEditor.getPosition()}setPosition(e){this._modifiedEditor.setPosition(e)}revealLine(e,t=0){this._modifiedEditor.revealLine(e,t)}revealLineInCenter(e,t=0){this._modifiedEditor.revealLineInCenter(e,t)}revealLineInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealLineInCenterIfOutsideViewport(e,t)}revealLineNearTop(e,t=0){this._modifiedEditor.revealLineNearTop(e,t)}revealPosition(e,t=0){this._modifiedEditor.revealPosition(e,t)}revealPositionInCenter(e,t=0){this._modifiedEditor.revealPositionInCenter(e,t)}revealPositionInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealPositionInCenterIfOutsideViewport(e,t)}revealPositionNearTop(e,t=0){this._modifiedEditor.revealPositionNearTop(e,t)}getSelection(){return this._modifiedEditor.getSelection()}getSelections(){return this._modifiedEditor.getSelections()}setSelection(e){this._modifiedEditor.setSelection(e)}setSelections(e){this._modifiedEditor.setSelections(e)}revealLines(e,t,i=0){this._modifiedEditor.revealLines(e,t,i)}revealLinesInCenter(e,t,i=0){this._modifiedEditor.revealLinesInCenter(e,t,i)}revealLinesInCenterIfOutsideViewport(e,t,i=0){this._modifiedEditor.revealLinesInCenterIfOutsideViewport(e,t,i)}revealLinesNearTop(e,t,i=0){this._modifiedEditor.revealLinesNearTop(e,t,i)}revealRange(e,t=0,i=!1,n=!0){this._modifiedEditor.revealRange(e,t,i,n)}revealRangeInCenter(e,t=0){this._modifiedEditor.revealRangeInCenter(e,t)}revealRangeInCenterIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeInCenterIfOutsideViewport(e,t)}revealRangeNearTop(e,t=0){this._modifiedEditor.revealRangeNearTop(e,t)}revealRangeNearTopIfOutsideViewport(e,t=0){this._modifiedEditor.revealRangeNearTopIfOutsideViewport(e,t)}revealRangeAtTop(e,t=0){this._modifiedEditor.revealRangeAtTop(e,t)}getSupportedActions(){return this._modifiedEditor.getSupportedActions()}saveViewState(){const e=this._originalEditor.saveViewState(),t=this._modifiedEditor.saveViewState();return{original:e,modified:t}}restoreViewState(e){if(e&&e.original&&e.modified){const t=e;this._originalEditor.restoreViewState(t.original),this._modifiedEditor.restoreViewState(t.modified)}}layout(e){this._elementSizeObserver.observe(e)}focus(){this._modifiedEditor.focus()}hasTextFocus(){return this._originalEditor.hasTextFocus()||this._modifiedEditor.hasTextFocus()}trigger(e,t,i){this._modifiedEditor.trigger(e,t,i)}changeDecorations(e){return this._modifiedEditor.changeDecorations(e)}_onDidContainerSizeChanged(){this._doLayout()}_getReviewHeight(){return this._reviewPane.isVisible()?this._elementSizeObserver.getHeight():0}_layoutOverviewRulers(){if(!this._options.renderOverviewRuler||!this._originalOverviewRuler||!this._modifiedOverviewRuler)return;const e=this._elementSizeObserver.getHeight(),t=this._getReviewHeight(),i=bn.ENTIRE_DIFF_OVERVIEW_WIDTH-2*bn.ONE_OVERVIEW_WIDTH;this._modifiedEditor.getLayoutInfo()&&(this._originalOverviewRuler.setLayout({top:0,width:bn.ONE_OVERVIEW_WIDTH,right:i+bn.ONE_OVERVIEW_WIDTH,height:e-t}),this._modifiedOverviewRuler.setLayout({top:0,right:0,width:bn.ONE_OVERVIEW_WIDTH,height:e-t}))}_onViewZonesChanged(){this._currentlyChangingViewZones||this._updateDecorationsRunner.schedule()}_beginUpdateDecorationsSoon(){this._beginUpdateDecorationsTimeout!==-1&&(window.clearTimeout(this._beginUpdateDecorationsTimeout),this._beginUpdateDecorationsTimeout=-1),this._beginUpdateDecorationsTimeout=window.setTimeout(()=>this._beginUpdateDecorations(),bn.UPDATE_DIFF_DECORATIONS_DELAY)}static _equals(e,t){return!e&&!t?!0:!e||!t?!1:e.toString()===t.toString()}_beginUpdateDecorations(){this._beginUpdateDecorationsTimeout=-1;const e=this._originalEditor.getModel(),t=this._modifiedEditor.getModel();if(!e||!t)return;this._diffComputationToken++;const i=this._diffComputationToken,n=this._options.maxFileSize*1024*1024,s=o=>{const a=o.getValueLength();return n===0||a<=n};if(!s(e)||!s(t)){(!bn._equals(e.uri,this._lastOriginalWarning)||!bn._equals(t.uri,this._lastModifiedWarning))&&(this._lastOriginalWarning=e.uri,this._lastModifiedWarning=t.uri,this._notificationService.warn(m("diff.tooLarge","Cannot compare files because one file is too large.")));return}this._setState(1),this._editorWorkerService.computeDiff(e.uri,t.uri,this._options.ignoreTrimWhitespace,this._options.maxComputationTime).then(o=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=o,this._updateDecorationsRunner.schedule(),this._onDidUpdateDiff.fire())},o=>{i===this._diffComputationToken&&e===this._originalEditor.getModel()&&t===this._modifiedEditor.getModel()&&(this._setState(2),this._diffComputationResult=null,this._updateDecorationsRunner.schedule())})}_cleanViewZonesAndDecorations(){this._originalEditorState.clean(this._originalEditor),this._modifiedEditorState.clean(this._modifiedEditor)}_updateDecorations(){if(!this._originalEditor.getModel()||!this._modifiedEditor.getModel())return;const e=this._diffComputationResult?this._diffComputationResult.changes:[],t=this._originalEditorState.getForeignViewZones(this._originalEditor.getWhitespaces()),i=this._modifiedEditorState.getForeignViewZones(this._modifiedEditor.getWhitespaces()),n=this._strategy.getEditorsDiffDecorations(e,this._options.ignoreTrimWhitespace,this._options.renderIndicators,t,i);try{this._currentlyChangingViewZones=!0,this._originalEditorState.apply(this._originalEditor,this._originalOverviewRuler,n.original,!1),this._modifiedEditorState.apply(this._modifiedEditor,this._modifiedOverviewRuler,n.modified,!0)}finally{this._currentlyChangingViewZones=!1}}_adjustOptionsForSubEditor(e){const t=Object.assign({},e);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,t.fixedOverflowWidgets=!0,t.minimap=Object.assign({},t.minimap||{}),t.minimap.enabled=!1,t}_adjustOptionsForLeftHandSide(e){const t=this._adjustOptionsForSubEditor(e);return this._options.renderSideBySide?t.wordWrapOverride1=this._options.diffWordWrap:t.wordWrapOverride1="off",e.originalAriaLabel&&(t.ariaLabel=e.originalAriaLabel),t.readOnly=!this._options.originalEditable,t.extraEditorClassName="original-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}_adjustOptionsForRightHandSide(e){const t=this._adjustOptionsForSubEditor(e);return e.modifiedAriaLabel&&(t.ariaLabel=e.modifiedAriaLabel),t.wordWrapOverride1=this._options.diffWordWrap,t.revealHorizontalRightPadding=Ks.revealHorizontalRightPadding.defaultValue+bn.ENTIRE_DIFF_OVERVIEW_WIDTH,t.scrollbar.verticalHasArrows=!1,t.extraEditorClassName="modified-in-monaco-diff-editor",Object.assign(Object.assign({},t),{dimension:{height:0,width:0}})}doLayout(){this._elementSizeObserver.observe(),this._doLayout()}_doLayout(){const e=this._elementSizeObserver.getWidth(),t=this._elementSizeObserver.getHeight(),i=this._getReviewHeight(),n=this._strategy.layout();this._originalDomNode.style.width=n+"px",this._originalDomNode.style.left="0px",this._modifiedDomNode.style.width=e-n+"px",this._modifiedDomNode.style.left=n+"px",this._overviewDomElement.style.top="0px",this._overviewDomElement.style.height=t-i+"px",this._overviewDomElement.style.width=bn.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewDomElement.style.left=e-bn.ENTIRE_DIFF_OVERVIEW_WIDTH+"px",this._overviewViewportDomElement.setWidth(bn.ENTIRE_DIFF_OVERVIEW_WIDTH),this._overviewViewportDomElement.setHeight(30),this._originalEditor.layout({width:n,height:t-i}),this._modifiedEditor.layout({width:e-n-(this._options.renderOverviewRuler?bn.ENTIRE_DIFF_OVERVIEW_WIDTH:0),height:t-i}),(this._originalOverviewRuler||this._modifiedOverviewRuler)&&this._layoutOverviewRulers(),this._reviewPane.layout(t-i,e,i),this._layoutOverviewViewport()}_layoutOverviewViewport(){const e=this._computeOverviewViewport();e?(this._overviewViewportDomElement.setTop(e.top),this._overviewViewportDomElement.setHeight(e.height)):(this._overviewViewportDomElement.setTop(0),this._overviewViewportDomElement.setHeight(0))}_computeOverviewViewport(){const e=this._modifiedEditor.getLayoutInfo();if(!e)return null;const t=this._modifiedEditor.getScrollTop(),i=this._modifiedEditor.getScrollHeight(),n=Math.max(0,e.height),s=Math.max(0,n-2*0),o=i>0?s/i:0,a=Math.max(0,Math.floor(e.height*o)),l=Math.floor(t*o);return{height:a,top:l}}_createDataSource(){return{getWidth:()=>this._elementSizeObserver.getWidth(),getHeight:()=>this._elementSizeObserver.getHeight()-this._getReviewHeight(),getOptions:()=>({renderOverviewRuler:this._options.renderOverviewRuler}),getContainerDomNode:()=>this._containerDomElement,relayoutEditors:()=>{this._doLayout()},getOriginalEditor:()=>this._originalEditor,getModifiedEditor:()=>this._modifiedEditor}}_setStrategy(e){this._strategy&&this._strategy.dispose(),this._strategy=e,e.applyColors(this._themeService.getColorTheme()),this._diffComputationResult&&this._updateDecorations(),this._doLayout()}_getLineChangeAtOrBeforeLineNumber(e,t){const i=this._diffComputationResult?this._diffComputationResult.changes:[];if(i.length===0||e<t(i[0]))return null;let n=0,s=i.length-1;for(;n<s;){const o=Math.floor((n+s)/2),a=t(i[o]),l=o+1<=s?t(i[o+1]):1073741824;e<a?s=o-1:e>=l?n=o+1:(n=o,s=o)}return i[n]}_getEquivalentLineForOriginalLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.originalStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-i;return a<=s?n+Math.min(a,o):n+o-s+a}_getEquivalentLineForModifiedLineNumber(e){const t=this._getLineChangeAtOrBeforeLineNumber(e,l=>l.modifiedStartLineNumber);if(!t)return e;const i=t.originalStartLineNumber+(t.originalEndLineNumber>0?-1:0),n=t.modifiedStartLineNumber+(t.modifiedEndLineNumber>0?-1:0),s=t.originalEndLineNumber>0?t.originalEndLineNumber-t.originalStartLineNumber+1:0,o=t.modifiedEndLineNumber>0?t.modifiedEndLineNumber-t.modifiedStartLineNumber+1:0,a=e-n;return a<=o?i+Math.min(a,s):i+s-o+a}getDiffLineInformationForOriginal(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForOriginalLineNumber(e)}:null}getDiffLineInformationForModified(e){return this._diffComputationResult?{equivalentLineNumber:this._getEquivalentLineForModifiedLineNumber(e)}:null}};vc.ONE_OVERVIEW_WIDTH=15;vc.ENTIRE_DIFF_OVERVIEW_WIDTH=30;vc.UPDATE_DIFF_DECORATIONS_DELAY=200;vc=zte([sl(3,bc),sl(4,ks),sl(5,Fe),sl(6,ut),sl(7,Ct),sl(8,qt),sl(9,Di),sl(10,_c),sl(11,rl)],vc);class I4 extends Y{constructor(e){super();this._dataSource=e,this._insertColor=null,this._removeColor=null}applyColors(e){const t=(e.getColor(qO)||aD).transparent(2),i=(e.getColor(GO)||lD).transparent(2),n=!t.equals(this._insertColor)||!i.equals(this._removeColor);return this._insertColor=t,this._removeColor=i,n}getEditorsDiffDecorations(e,t,i,n,s){s=s.sort((c,h)=>c.afterLineNumber-h.afterLineNumber),n=n.sort((c,h)=>c.afterLineNumber-h.afterLineNumber);const o=this._getViewZones(e,n,s,i),a=this._getOriginalEditorDecorations(e,t,i),l=this._getModifiedEditorDecorations(e,t,i);return{original:{decorations:a.decorations,overviewZones:a.overviewZones,zones:o.original},modified:{decorations:l.decorations,overviewZones:l.overviewZones,zones:o.modified}}}}class N4{constructor(e){this._source=e,this._index=-1,this.current=null,this.advance()}advance(){this._index++,this._index<this._source.length?this.current=this._source[this._index]:this.current=null}}class ou{constructor(e,t,i,n,s){this._lineChanges=e,this._originalForeignVZ=t,this._modifiedForeignVZ=i,this._originalEditor=n,this._modifiedEditor=s}static _getViewLineCount(e,t,i){const n=e.getModel(),s=e._getViewModel();if(n&&s){const o=Rm(n,s,t,i);return o.endLineNumber-o.startLineNumber+1}return i-t+1}getViewZones(){const e=this._originalEditor.getOption(58),t=this._modifiedEditor.getOption(58),i=this._originalEditor.getOption(130).wrappingColumn!==-1,n=this._modifiedEditor.getOption(130).wrappingColumn!==-1,s=i||n,o=this._originalEditor.getModel(),a=this._originalEditor._getViewModel().coordinatesConverter,l=this._modifiedEditor._getViewModel().coordinatesConverter,c={original:[],modified:[]};let h=0,u=0,d=0,f=0,g=0,p=0;const _=(S,w)=>S.afterLineNumber-w.afterLineNumber,v=(S,w)=>{if(w.domNode===null&&S.length>0){const L=S[S.length-1];if(L.afterLineNumber===w.afterLineNumber&&L.domNode===null){L.heightInLines+=w.heightInLines;return}}S.push(w)},b=new N4(this._modifiedForeignVZ),C=new N4(this._originalForeignVZ);let y=1,x=1;for(let S=0,w=this._lineChanges.length;S<=w;S++){const L=S<w?this._lineChanges[S]:null;L!==null?(d=L.originalStartLineNumber+(L.originalEndLineNumber>0?-1:0),f=L.modifiedStartLineNumber+(L.modifiedEndLineNumber>0?-1:0),u=L.originalEndLineNumber>0?ou._getViewLineCount(this._originalEditor,L.originalStartLineNumber,L.originalEndLineNumber):0,h=L.modifiedEndLineNumber>0?ou._getViewLineCount(this._modifiedEditor,L.modifiedStartLineNumber,L.modifiedEndLineNumber):0,g=Math.max(L.originalStartLineNumber,L.originalEndLineNumber),p=Math.max(L.modifiedStartLineNumber,L.modifiedEndLineNumber)):(d+=1e7+u,f+=1e7+h,g=d,p=f);let N=[],P=[];if(s){let j;L?L.originalEndLineNumber>0?j=L.originalStartLineNumber-y:j=L.modifiedStartLineNumber-x:j=o.getLineCount()-y;for(let re=0;re<j;re++){const te=y+re,A=x+re,D=a.getModelLineViewLineCount(te),M=l.getModelLineViewLineCount(A);D<M?N.push({afterLineNumber:te,heightInLines:M-D,domNode:null,marginDomNode:null}):D>M&&P.push({afterLineNumber:A,heightInLines:D-M,domNode:null,marginDomNode:null})}L&&(y=(L.originalEndLineNumber>0?L.originalEndLineNumber:L.originalStartLineNumber)+1,x=(L.modifiedEndLineNumber>0?L.modifiedEndLineNumber:L.modifiedStartLineNumber)+1)}for(;b.current&&b.current.afterLineNumber<=p;){let j;b.current.afterLineNumber<=f?j=d-f+b.current.afterLineNumber:j=g;let re=null;L&&L.modifiedStartLineNumber<=b.current.afterLineNumber&&b.current.afterLineNumber<=L.modifiedEndLineNumber&&(re=this._createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion()),N.push({afterLineNumber:j,heightInLines:b.current.height/t,domNode:null,marginDomNode:re}),b.advance()}for(;C.current&&C.current.afterLineNumber<=g;){let j;C.current.afterLineNumber<=d?j=f-d+C.current.afterLineNumber:j=p,P.push({afterLineNumber:j,heightInLines:C.current.height/e,domNode:null}),C.advance()}if(L!==null&&If(L)){const j=this._produceOriginalFromDiff(L,u,h);j&&N.push(j)}if(L!==null&&Nf(L)){const j=this._produceModifiedFromDiff(L,u,h);j&&P.push(j)}let B=0,U=0;for(N=N.sort(_),P=P.sort(_);B<N.length&&U<P.length;){const j=N[B],re=P[U],te=j.afterLineNumber-d,A=re.afterLineNumber-f;te<A?(v(c.original,j),B++):A<te?(v(c.modified,re),U++):j.shouldNotShrink?(v(c.original,j),B++):re.shouldNotShrink?(v(c.modified,re),U++):j.heightInLines>=re.heightInLines?(j.heightInLines-=re.heightInLines,U++):(re.heightInLines-=j.heightInLines,B++)}for(;B<N.length;)v(c.original,N[B]),B++;for(;U<P.length;)v(c.modified,P[U]),U++}return{original:ou._ensureDomNodes(c.original),modified:ou._ensureDomNodes(c.modified)}}static _ensureDomNodes(e){return e.map(t=>(t.domNode||(t.domNode=A4()),t))}}function ol(r,e,t,i,n){return{range:new k(r,e,t,i),options:n}}const ir={charDelete:Ke.register({description:"diff-editor-char-delete",className:"char-delete"}),charDeleteWholeLine:Ke.register({description:"diff-editor-char-delete-whole-line",className:"char-delete",isWholeLine:!0}),charInsert:Ke.register({description:"diff-editor-char-insert",className:"char-insert"}),charInsertWholeLine:Ke.register({description:"diff-editor-char-insert-whole-line",className:"char-insert",isWholeLine:!0}),lineInsert:Ke.register({description:"diff-editor-line-insert",className:"line-insert",marginClassName:"line-insert",isWholeLine:!0}),lineInsertWithSign:Ke.register({description:"diff-editor-line-insert-with-sign",className:"line-insert",linesDecorationsClassName:"insert-sign "+Gt.asClassName(Ute),marginClassName:"line-insert",isWholeLine:!0}),lineDelete:Ke.register({description:"diff-editor-line-delete",className:"line-delete",marginClassName:"line-delete",isWholeLine:!0}),lineDeleteWithSign:Ke.register({description:"diff-editor-line-delete-with-sign",className:"line-delete",linesDecorationsClassName:"delete-sign "+Gt.asClassName(D4),marginClassName:"line-delete",isWholeLine:!0}),lineDeleteMargin:Ke.register({description:"diff-editor-line-delete-margin",marginClassName:"line-delete"})};class al extends I4{constructor(e,t){super(e);this._disableSash=t===!1,this._sashRatio=null,this._sashPosition=null,this._startSashPosition=null,this._sash=this._register(new _n(this._dataSource.getContainerDomNode(),this,{orientation:0})),this._disableSash&&(this._sash.state=0),this._sash.onDidStart(()=>this._onSashDragStart()),this._sash.onDidChange(i=>this._onSashDrag(i)),this._sash.onDidEnd(()=>this._onSashDragEnd()),this._sash.onDidReset(()=>this._onSashReset())}setEnableSplitViewResizing(e){const t=e===!1;this._disableSash!==t&&(this._disableSash=t,this._sash.state=this._disableSash?0:3)}layout(e=this._sashRatio){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?vc.ENTIRE_DIFF_OVERVIEW_WIDTH:0);let n=Math.floor((e||.5)*i);const s=Math.floor(.5*i);return n=this._disableSash?s:n||s,i>al.MINIMUM_EDITOR_WIDTH*2?(n<al.MINIMUM_EDITOR_WIDTH&&(n=al.MINIMUM_EDITOR_WIDTH),n>i-al.MINIMUM_EDITOR_WIDTH&&(n=i-al.MINIMUM_EDITOR_WIDTH)):n=s,this._sashPosition!==n&&(this._sashPosition=n,this._sash.layout()),this._sashPosition}_onSashDragStart(){this._startSashPosition=this._sashPosition}_onSashDrag(e){const i=this._dataSource.getWidth()-(this._dataSource.getOptions().renderOverviewRuler?vc.ENTIRE_DIFF_OVERVIEW_WIDTH:0),n=this.layout((this._startSashPosition+(e.currentX-e.startX))/i);this._sashRatio=n/i,this._dataSource.relayoutEditors()}_onSashDragEnd(){this._sash.layout()}_onSashReset(){this._sashRatio=.5,this._dataSource.relayoutEditors(),this._sash.layout()}getVerticalSashTop(e){return 0}getVerticalSashLeft(e){return this._sashPosition}getVerticalSashHeight(e){return this._dataSource.getHeight()}_getViewZones(e,t,i){const n=this._dataSource.getOriginalEditor(),s=this._dataSource.getModifiedEditor();return new jte(e,t,i,n,s).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=this._dataSource.getOriginalEditor(),s=String(this._removeColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(Nf(c)){o.decorations.push({range:new k(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:i?ir.lineDeleteWithSign:ir.lineDelete}),(!If(c)||!c.charChanges)&&o.decorations.push(ol(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824,ir.charDeleteWholeLine));const h=Rm(a,l,c.originalStartLineNumber,c.originalEndLineNumber);if(o.overviewZones.push(new wm(h.startLineNumber,h.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(Nf(u))if(t)for(let d=u.originalStartLineNumber;d<=u.originalEndLineNumber;d++){let f,g;d===u.originalStartLineNumber?f=u.originalStartColumn:f=a.getLineFirstNonWhitespaceColumn(d),d===u.originalEndLineNumber?g=u.originalEndColumn:g=a.getLineLastNonWhitespaceColumn(d),o.decorations.push(ol(d,f,d,g,ir.charDelete))}else o.decorations.push(ol(u.originalStartLineNumber,u.originalStartColumn,u.originalEndLineNumber,u.originalEndColumn,ir.charDelete))}}return o}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(If(c)){o.decorations.push({range:new k(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:i?ir.lineInsertWithSign:ir.lineInsert}),(!Nf(c)||!c.charChanges)&&o.decorations.push(ol(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,ir.charInsertWholeLine));const h=Rm(a,l,c.modifiedStartLineNumber,c.modifiedEndLineNumber);if(o.overviewZones.push(new wm(h.startLineNumber,h.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(If(u))if(t)for(let d=u.modifiedStartLineNumber;d<=u.modifiedEndLineNumber;d++){let f,g;d===u.modifiedStartLineNumber?f=u.modifiedStartColumn:f=a.getLineFirstNonWhitespaceColumn(d),d===u.modifiedEndLineNumber?g=u.modifiedEndColumn:g=a.getLineLastNonWhitespaceColumn(d),o.decorations.push(ol(d,f,d,g,ir.charInsert))}else o.decorations.push(ol(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn,ir.charInsert))}}return o}}al.MINIMUM_EDITOR_WIDTH=100;class jte extends ou{constructor(e,t,i,n,s){super(e,t,i,n,s)}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){return null}_produceOriginalFromDiff(e,t,i){return i>t?{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i-t,domNode:null}:null}_produceModifiedFromDiff(e,t,i){return t>i?{afterLineNumber:Math.max(e.modifiedStartLineNumber,e.modifiedEndLineNumber),heightInLines:t-i,domNode:null}:null}}class T4 extends I4{constructor(e,t){super(e);this._decorationsLeft=e.getOriginalEditor().getLayoutInfo().decorationsLeft,this._register(e.getOriginalEditor().onDidLayoutChange(i=>{this._decorationsLeft!==i.decorationsLeft&&(this._decorationsLeft=i.decorationsLeft,e.relayoutEditors())}))}setEnableSplitViewResizing(e){}_getViewZones(e,t,i,n){const s=this._dataSource.getOriginalEditor(),o=this._dataSource.getModifiedEditor();return new Kte(e,t,i,s,o,n).getViewZones()}_getOriginalEditorDecorations(e,t,i){const n=String(this._removeColor),s={decorations:[],overviewZones:[]},o=this._dataSource.getOriginalEditor(),a=o.getModel(),l=o._getViewModel();for(const c of e)if(Nf(c)){s.decorations.push({range:new k(c.originalStartLineNumber,1,c.originalEndLineNumber,1073741824),options:ir.lineDeleteMargin});const h=Rm(a,l,c.originalStartLineNumber,c.originalEndLineNumber);s.overviewZones.push(new wm(h.startLineNumber,h.endLineNumber,n))}return s}_getModifiedEditorDecorations(e,t,i){const n=this._dataSource.getModifiedEditor(),s=String(this._insertColor),o={decorations:[],overviewZones:[]},a=n.getModel(),l=n._getViewModel();for(const c of e)if(If(c)){o.decorations.push({range:new k(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824),options:i?ir.lineInsertWithSign:ir.lineInsert});const h=Rm(a,l,c.modifiedStartLineNumber,c.modifiedEndLineNumber);if(o.overviewZones.push(new wm(h.startLineNumber,h.endLineNumber,s)),c.charChanges){for(const u of c.charChanges)if(If(u))if(t)for(let d=u.modifiedStartLineNumber;d<=u.modifiedEndLineNumber;d++){let f,g;d===u.modifiedStartLineNumber?f=u.modifiedStartColumn:f=a.getLineFirstNonWhitespaceColumn(d),d===u.modifiedEndLineNumber?g=u.modifiedEndColumn:g=a.getLineLastNonWhitespaceColumn(d),o.decorations.push(ol(d,f,d,g,ir.charInsert))}else o.decorations.push(ol(u.modifiedStartLineNumber,u.modifiedStartColumn,u.modifiedEndLineNumber,u.modifiedEndColumn,ir.charInsert))}else o.decorations.push(ol(c.modifiedStartLineNumber,1,c.modifiedEndLineNumber,1073741824,ir.charInsertWholeLine))}return o}layout(){return Math.max(5,this._decorationsLeft)}}class Kte extends ou{constructor(e,t,i,n,s,o){super(e,t,i,n,s);this._originalModel=n.getModel(),this._renderIndicators=o,this._pendingLineChange=[],this._pendingViewZones=[],this._lineBreaksComputer=this._modifiedEditor._getViewModel().createLineBreaksComputer()}getViewZones(){const e=super.getViewZones();return this._finalize(e),e}_createOriginalMarginDomNodeForModifiedForeignViewZoneInAddedRegion(){const e=document.createElement("div");return e.className="inline-added-margin-view-zone",e}_produceOriginalFromDiff(e,t,i){const n=document.createElement("div");return n.className="inline-added-margin-view-zone",{afterLineNumber:Math.max(e.originalStartLineNumber,e.originalEndLineNumber),heightInLines:i,domNode:document.createElement("div"),marginDomNode:n}}_produceModifiedFromDiff(e,t,i){const n=document.createElement("div");n.className=`view-lines line-delete ${Yh}`;const s=document.createElement("div");s.className="inline-deleted-margin-view-zone";const o={shouldNotShrink:!0,afterLineNumber:e.modifiedEndLineNumber===0?e.modifiedStartLineNumber:e.modifiedStartLineNumber-1,heightInLines:t,minWidthInPx:0,domNode:n,marginDomNode:s,diff:{originalStartLineNumber:e.originalStartLineNumber,originalEndLineNumber:e.originalEndLineNumber,modifiedStartLineNumber:e.modifiedStartLineNumber,modifiedEndLineNumber:e.modifiedEndLineNumber,originalModel:this._originalModel,viewLineCounts:null}};for(let a=e.originalStartLineNumber;a<=e.originalEndLineNumber;a++)this._lineBreaksComputer.addRequest(this._originalModel.getLineContent(a),null,null);return this._pendingLineChange.push(e),this._pendingViewZones.push(o),o}_finalize(e){const t=this._modifiedEditor.getOptions(),i=this._modifiedEditor.getModel().getOptions().tabSize,n=t.get(43),s=t.get(29),o=n.typicalHalfwidthCharacterWidth,a=t.get(92),l=this._originalModel.mightContainNonBasicASCII(),c=this._originalModel.mightContainRTL(),h=t.get(58),d=t.get(129).decorationsWidth,f=t.get(104),g=t.get(87),p=t.get(82),_=t.get(44),v=this._lineBreaksComputer.finalize();let b=0;for(let C=0;C<this._pendingLineChange.length;C++){const y=this._pendingLineChange[C],x=this._pendingViewZones[C],S=x.domNode;Dn.applyFontInfoSlow(S,n);const w=x.marginDomNode;Dn.applyFontInfoSlow(w,n);const L=[];if(y.charChanges)for(const A of y.charChanges)Nf(A)&&L.push(new Ap(new k(A.originalStartLineNumber,A.originalStartColumn,A.originalEndLineNumber,A.originalEndColumn),"char-delete",0));const N=L.length>0,P=Sh(1e4);let B=0,U=0,j=null;for(let A=y.originalStartLineNumber;A<=y.originalEndLineNumber;A++){const D=A-y.originalStartLineNumber,M=this._originalModel.getLineTokens(A),W=M.getLineContent(),ge=v[b++],se=Pr.filter(L,A,1,W.length+1);if(ge){let ae=0;for(const De of ge.breakOffsets){const ct=M.sliceAndInflate(ae,De,0),Ci=W.substring(ae,De);B=Math.max(B,this._renderOriginalLine(U++,Ci,ct,Pr.extractWrapped(se,ae,De),N,l,c,n,s,h,d,f,g,p,_,i,P,w)),ae=De}for(j||(j=[]);j.length<D;)j[j.length]=1;j[D]=ge.breakOffsets.length,x.heightInLines+=ge.breakOffsets.length-1;const we=document.createElement("div");we.className="line-delete",e.original.push({afterLineNumber:A,afterColumn:0,heightInLines:ge.breakOffsets.length-1,domNode:A4(),marginDomNode:we})}else B=Math.max(B,this._renderOriginalLine(U++,W,M,se,N,l,c,n,s,h,d,f,g,p,_,i,P,w))}B+=a;const re=P.build(),te=E4?E4.createHTML(re):re;if(S.innerHTML=te,x.minWidthInPx=B*o,j){const A=y.originalEndLineNumber-y.originalStartLineNumber;for(;j.length<=A;)j[j.length]=1}x.diff.viewLineCounts=j}e.original.sort((C,y)=>C.afterLineNumber-y.afterLineNumber)}_renderOriginalLine(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p,_,v,b){v.appendASCIIString('<div class="view-line'),s||v.appendASCIIString(" char-delete"),v.appendASCIIString('" style="top:'),v.appendASCIIString(String(e*h)),v.appendASCIIString('px;width:1000000px;">');const C=Or.isBasicASCII(t,o),y=Or.containsRTL(t,C,a),x=Zv(new kh(l.isMonospace&&!c,l.canUseHalfwidthRightwardsArrow,t,!1,C,y,0,i,n,_,0,l.spaceWidth,l.middotWidth,l.wsmiddotWidth,d,f,g,p!==Dr.OFF,null),v);if(v.appendASCIIString("</div>"),this._renderIndicators){const S=document.createElement("div");S.className=`delete-sign ${Gt.asClassName(D4)}`,S.setAttribute("style",`position:absolute;top:${e*h}px;width:${u}px;height:${h}px;right:0;`),b.appendChild(S)}return x.characterMapping.getAbsoluteOffset(x.characterMapping.length)}}function qte(r,e){return Yn(r,e,["off","on","inherit"])}function If(r){return r.modifiedEndLineNumber>0}function Nf(r){return r.originalEndLineNumber>0}function A4(){const r=document.createElement("div");return r.className="diagonal-fill",r}function Rm(r,e,t,i){const n=r.getLineCount();return t=Math.min(n,Math.max(1,t)),i=Math.min(n,Math.max(1,i)),e.coordinatesConverter.convertModelRangeToViewRange(new k(t,r.getLineMinColumn(t),i,r.getLineMaxColumn(i)))}function R4(r,e){return{enableSplitViewResizing:Te(r.enableSplitViewResizing,e.enableSplitViewResizing),renderSideBySide:Te(r.renderSideBySide,e.renderSideBySide),maxComputationTime:DS(r.maxComputationTime,e.maxComputationTime,0,1073741824),maxFileSize:DS(r.maxFileSize,e.maxFileSize,0,1073741824),ignoreTrimWhitespace:Te(r.ignoreTrimWhitespace,e.ignoreTrimWhitespace),renderIndicators:Te(r.renderIndicators,e.renderIndicators),originalEditable:Te(r.originalEditable,e.originalEditable),diffCodeLens:Te(r.diffCodeLens,e.diffCodeLens),renderOverviewRuler:Te(r.renderOverviewRuler,e.renderOverviewRuler),diffWordWrap:qte(r.diffWordWrap,e.diffWordWrap)}}function Gte(r,e){return{enableSplitViewResizing:r.enableSplitViewResizing!==e.enableSplitViewResizing,renderSideBySide:r.renderSideBySide!==e.renderSideBySide,maxComputationTime:r.maxComputationTime!==e.maxComputationTime,maxFileSize:r.maxFileSize!==e.maxFileSize,ignoreTrimWhitespace:r.ignoreTrimWhitespace!==e.ignoreTrimWhitespace,renderIndicators:r.renderIndicators!==e.renderIndicators,originalEditable:r.originalEditable!==e.originalEditable,diffCodeLens:r.diffCodeLens!==e.diffCodeLens,renderOverviewRuler:r.renderOverviewRuler!==e.renderOverviewRuler,diffWordWrap:r.diffWordWrap!==e.diffWordWrap}}Lt((r,e)=>{const t=r.getColor(qO);t&&(e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { background-color: ${t}; }`),e.addRule(`.monaco-diff-editor .line-insert, .monaco-diff-editor .char-insert { background-color: ${t}; }`),e.addRule(`.monaco-editor .inline-added-margin-view-zone { background-color: ${t}; }`));const i=r.getColor(GO);i&&(e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { background-color: ${i}; }`),e.addRule(`.monaco-diff-editor .line-delete, .monaco-diff-editor .char-delete { background-color: ${i}; }`),e.addRule(`.monaco-editor .inline-deleted-margin-view-zone { background-color: ${i}; }`));const n=r.getColor(uX);n&&e.addRule(`.monaco-editor .line-insert, .monaco-editor .char-insert { border: 1px ${r.type==="hc"?"dashed":"solid"} ${n}; }`);const s=r.getColor(dX);s&&e.addRule(`.monaco-editor .line-delete, .monaco-editor .char-delete { border: 1px ${r.type==="hc"?"dashed":"solid"} ${s}; }`);const o=r.getColor($C);o&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { box-shadow: -6px 0 5px -5px ${o}; }`);const a=r.getColor(fX);a&&e.addRule(`.monaco-diff-editor.side-by-side .editor.modified { border-left: 1px solid ${a}; }`);const l=r.getColor(UC);l&&e.addRule(` - .monaco-diff-editor .diffViewport { - background: ${l}; - } - `);const c=r.getColor(jC);c&&e.addRule(` - .monaco-diff-editor .diffViewport:hover { - background: ${c}; - } - `);const h=r.getColor(KC);h&&e.addRule(` - .monaco-diff-editor .diffViewport:active { - background: ${h}; - } - `);const u=r.getColor(gX);e.addRule(` - .monaco-editor .diagonal-fill { - background-image: linear-gradient( - -45deg, - ${u} 12.5%, - #0000 12.5%, #0000 50%, - ${u} 50%, ${u} 62.5%, - #0000 62.5%, #0000 100% - ); - background-size: 8px 8px; - } - `)});const au=bt("themeService"),Qt=bt("keybindingService");class Zte extends Y{constructor(){super();this._onCodeEditorAdd=this._register(new H),this.onCodeEditorAdd=this._onCodeEditorAdd.event,this._onCodeEditorRemove=this._register(new H),this.onCodeEditorRemove=this._onCodeEditorRemove.event,this._onDiffEditorAdd=this._register(new H),this._onDiffEditorRemove=this._register(new H),this._onDecorationTypeRegistered=this._register(new H),this._modelProperties=new Map,this._codeEditors=Object.create(null),this._diffEditors=Object.create(null)}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])}addDiffEditor(e){this._diffEditors[e.getId()]=e,this._onDiffEditorAdd.fire(e)}removeDiffEditor(e){delete this._diffEditors[e.getId()]&&this._onDiffEditorRemove.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}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)}}var Yte=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Xte=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Qte{constructor(e,t,i){this._parent=e,this._editorId=t,this._styleSheet=i,this._refCount=0}ref(){this._refCount++}unref(){var e;this._refCount--,this._refCount===0&&((e=this._styleSheet.parentNode)===null||e===void 0||e.removeChild(this._styleSheet),this._parent._removeEditorStyleSheets(this._editorId))}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){cv(e,this._styleSheet)}}class Jte{constructor(e){this._styleSheet=e}ref(){}unref(){}insertRule(e,t){this._styleSheet.sheet.insertRule(e,t)}removeRulesContainingSelector(e){cv(e,this._styleSheet)}}let fE=class extends Zte{constructor(e,t){super();this._decorationOptionProviders=new Map,this._editorStyleSheets=new Map,this._globalStyleSheet=e||null,this._themeService=t}_getOrCreateGlobalStyleSheet(){return this._globalStyleSheet||(this._globalStyleSheet=new Jte(Tr())),this._globalStyleSheet}_getOrCreateStyleSheet(e){if(!e)return this._getOrCreateGlobalStyleSheet();const t=e.getContainerDomNode();if(!lv(t))return this._getOrCreateGlobalStyleSheet();const i=e.getId();if(!this._editorStyleSheets.has(i)){const n=new Qte(this,i,Tr(t));this._editorStyleSheets.set(i,n)}return this._editorStyleSheets.get(i)}_removeEditorStyleSheets(e){this._editorStyleSheets.delete(e)}registerDecorationType(e,t,i,n,s){let o=this._decorationOptionProviders.get(t);if(!o){const a=this._getOrCreateStyleSheet(s),l={styleSheet:a,key:t,parentTypeKey:n,options:i||Object.create(null)};n?o=new eie(this._themeService,a,l):o=new tie(e,this._themeService,a,l),this._decorationOptionProviders.set(t,o),this._onDecorationTypeRegistered.fire(t)}o.refCount++}removeDecorationType(e){const t=this._decorationOptionProviders.get(e);t&&(t.refCount--,t.refCount<=0&&(this._decorationOptionProviders.delete(e),t.dispose(),this.listCodeEditors().forEach(i=>i.removeDecorations(e))))}resolveDecorationOptions(e,t){const i=this._decorationOptionProviders.get(e);if(!i)throw new Error("Unknown decoration type key: "+e);return i.getOptions(this,t)}};fE=Yte([Xte(1,qt)],fE);class eie{constructor(e,t,i){this._styleSheet=t,this._styleSheet.ref(),this._parentTypeKey=i.parentTypeKey,this.refCount=0,this._beforeContentRules=new Bw(3,i,e),this._afterContentRules=new Bw(4,i,e)}getOptions(e,t){const i=e.resolveDecorationOptions(this._parentTypeKey,!0);return this._beforeContentRules&&(i.beforeContentClassName=this._beforeContentRules.className),this._afterContentRules&&(i.afterContentClassName=this._afterContentRules.className),i}dispose(){this._beforeContentRules&&(this._beforeContentRules.dispose(),this._beforeContentRules=null),this._afterContentRules&&(this._afterContentRules.dispose(),this._afterContentRules=null),this._styleSheet.unref()}}class tie{constructor(e,t,i,n){this._disposables=new le,this.description=e,this._styleSheet=i,this._styleSheet.ref(),this.refCount=0;const s=u=>{const d=new Bw(u,n,t);if(this._disposables.add(d),d.hasContent)return d.className},o=u=>{const d=new Bw(u,n,t);return this._disposables.add(d),d.hasContent?{className:d.className,hasLetterSpacing:d.hasLetterSpacing}:null};this.className=s(0);const a=o(1);if(a&&(this.inlineClassName=a.className,this.inlineClassNameAffectsLetterSpacing=a.hasLetterSpacing),this.beforeContentClassName=s(3),this.afterContentClassName=s(4),n.options.beforeInjectedText&&n.options.beforeInjectedText.contentText){const u=o(5);this.beforeInjectedText={content:n.options.beforeInjectedText.contentText,inlineClassName:u==null?void 0:u.className,inlineClassNameAffectsLetterSpacing:(u==null?void 0:u.hasLetterSpacing)||n.options.beforeInjectedText.affectsLetterSpacing}}if(n.options.afterInjectedText&&n.options.afterInjectedText.contentText){const u=o(6);this.afterInjectedText={content:n.options.afterInjectedText.contentText,inlineClassName:u==null?void 0:u.className,inlineClassNameAffectsLetterSpacing:(u==null?void 0:u.hasLetterSpacing)||n.options.afterInjectedText.affectsLetterSpacing}}this.glyphMarginClassName=s(2);const l=n.options;this.isWholeLine=Boolean(l.isWholeLine),this.stickiness=l.rangeBehavior;const c=l.light&&l.light.overviewRulerColor||l.overviewRulerColor,h=l.dark&&l.dark.overviewRulerColor||l.overviewRulerColor;(typeof c!="undefined"||typeof h!="undefined")&&(this.overviewRuler={color:c||h,darkColor:h||c,position:l.overviewRulerLane||Mr.Center})}getOptions(e,t){return t?{description:this.description,inlineClassName:this.inlineClassName,beforeContentClassName:this.beforeContentClassName,afterContentClassName:this.afterContentClassName,className:this.className,glyphMarginClassName:this.glyphMarginClassName,isWholeLine:this.isWholeLine,overviewRuler:this.overviewRuler,stickiness:this.stickiness,before:this.beforeInjectedText,after:this.afterInjectedText}:this}dispose(){this._disposables.dispose(),this._styleSheet.unref()}}const Mm={color:"color:{0} !important;",opacity:"opacity:{0};",backgroundColor:"background-color:{0};",outline:"outline:{0};",outlineColor:"outline-color:{0};",outlineStyle:"outline-style:{0};",outlineWidth:"outline-width:{0};",border:"border:{0};",borderColor:"border-color:{0};",borderRadius:"border-radius:{0};",borderSpacing:"border-spacing:{0};",borderStyle:"border-style:{0};",borderWidth:"border-width:{0};",fontStyle:"font-style:{0};",fontWeight:"font-weight:{0};",fontSize:"font-size:{0};",fontFamily:"font-family:{0};",textDecoration:"text-decoration:{0};",cursor:"cursor:{0};",letterSpacing:"letter-spacing:{0};",gutterIconPath:"background:{0} center center no-repeat;",gutterIconSize:"background-size:{0};",contentText:"content:'{0}';",contentIconPath:"content:{0};",margin:"margin:{0};",padding:"padding:{0};",width:"width:{0};",height:"height:{0};",verticalAlign:"vertical-align:{0};"};class Bw{constructor(e,t,i){this._theme=i.getColorTheme(),this._ruleType=e,this._providerArgs=t,this._usesThemeColors=!1,this._hasContent=!1,this._hasLetterSpacing=!1;let n=gE.getClassName(this._providerArgs.key,e);this._providerArgs.parentTypeKey&&(n=n+" "+gE.getClassName(this._providerArgs.parentTypeKey,e)),this._className=n,this._unThemedSelector=gE.getSelector(this._providerArgs.key,this._providerArgs.parentTypeKey,e),this._buildCSS(),this._usesThemeColors?this._themeListener=i.onDidColorThemeChange(s=>{this._theme=i.getColorTheme(),this._removeCSS(),this._buildCSS()}):this._themeListener=null}dispose(){this._hasContent&&(this._removeCSS(),this._hasContent=!1),this._themeListener&&(this._themeListener.dispose(),this._themeListener=null)}get hasContent(){return this._hasContent}get hasLetterSpacing(){return this._hasLetterSpacing}get className(){return this._className}_buildCSS(){const e=this._providerArgs.options;let t,i,n;switch(this._ruleType){case 0:t=this.getCSSTextForModelDecorationClassName(e),i=this.getCSSTextForModelDecorationClassName(e.light),n=this.getCSSTextForModelDecorationClassName(e.dark);break;case 1:t=this.getCSSTextForModelDecorationInlineClassName(e),i=this.getCSSTextForModelDecorationInlineClassName(e.light),n=this.getCSSTextForModelDecorationInlineClassName(e.dark);break;case 2:t=this.getCSSTextForModelDecorationGlyphMarginClassName(e),i=this.getCSSTextForModelDecorationGlyphMarginClassName(e.light),n=this.getCSSTextForModelDecorationGlyphMarginClassName(e.dark);break;case 3:t=this.getCSSTextForModelDecorationContentClassName(e.before),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.before),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.before);break;case 4:t=this.getCSSTextForModelDecorationContentClassName(e.after),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.after),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.after);break;case 5:t=this.getCSSTextForModelDecorationContentClassName(e.beforeInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.beforeInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.beforeInjectedText);break;case 6:t=this.getCSSTextForModelDecorationContentClassName(e.afterInjectedText),i=this.getCSSTextForModelDecorationContentClassName(e.light&&e.light.afterInjectedText),n=this.getCSSTextForModelDecorationContentClassName(e.dark&&e.dark.afterInjectedText);break;default:throw new Error("Unknown rule type: "+this._ruleType)}const s=this._providerArgs.styleSheet;let o=!1;t.length>0&&(s.insertRule(`${this._unThemedSelector} {${t}}`,0),o=!0),i.length>0&&(s.insertRule(`.vs${this._unThemedSelector} {${i}}`,0),o=!0),n.length>0&&(s.insertRule(`.vs-dark${this._unThemedSelector}, .hc-black${this._unThemedSelector} {${n}}`,0),o=!0),this._hasContent=o}_removeCSS(){this._providerArgs.styleSheet.removeRulesContainingSelector(this._unThemedSelector)}getCSSTextForModelDecorationClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["backgroundColor"],t),this.collectCSSText(e,["outline","outlineColor","outlineStyle","outlineWidth"],t),this.collectBorderSettingsCSSText(e,t),t.join("")}getCSSTextForModelDecorationInlineClassName(e){if(!e)return"";const t=[];return this.collectCSSText(e,["fontStyle","fontWeight","textDecoration","cursor","color","opacity","letterSpacing"],t),e.letterSpacing&&(this._hasLetterSpacing=!0),t.join("")}getCSSTextForModelDecorationContentClassName(e){if(!e)return"";const t=[];if(typeof e!="undefined"){if(this.collectBorderSettingsCSSText(e,t),typeof e.contentIconPath!="undefined"&&t.push(gn(Mm.contentIconPath,Ra(Ie.revive(e.contentIconPath)))),typeof e.contentText=="string"){const n=e.contentText.match(/^.*$/m)[0].replace(/['\\]/g,"\\$&");t.push(gn(Mm.contentText,n))}this.collectCSSText(e,["verticalAlign","fontStyle","fontWeight","fontSize","fontFamily","textDecoration","color","opacity","backgroundColor","margin","padding"],t),this.collectCSSText(e,["width","height"],t)&&t.push("display:inline-block;")}return t.join("")}getCSSTextForModelDecorationGlyphMarginClassName(e){if(!e)return"";const t=[];return typeof e.gutterIconPath!="undefined"&&(t.push(gn(Mm.gutterIconPath,Ra(Ie.revive(e.gutterIconPath)))),typeof e.gutterIconSize!="undefined"&&t.push(gn(Mm.gutterIconSize,e.gutterIconSize))),t.join("")}collectBorderSettingsCSSText(e,t){return this.collectCSSText(e,["border","borderColor","borderRadius","borderSpacing","borderStyle","borderWidth"],t)?(t.push(gn("box-sizing: border-box;")),!0):!1}collectCSSText(e,t,i){const n=i.length;for(let s of t){const o=this.resolveValue(e[s]);typeof o=="string"&&i.push(gn(Mm[s],o))}return i.length!==n}resolveValue(e){if(DK(e)){this._usesThemeColors=!0;const t=this._theme.getColor(e.id);return t?t.toString():"transparent"}return e}}class gE{static getClassName(e,t){return"ced-"+e+"-"+t}static getSelector(e,t,i){let n=".monaco-editor ."+this.getClassName(e,i);return t&&(n=n+"."+this.getClassName(t,i)),i===3?n+="::before":i===4&&(n+="::after"),n}}var iie=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},M4=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Ww=class extends fE{constructor(e,t,i){super(e,i);this.onCodeEditorAdd(()=>this._checkContextKey()),this.onCodeEditorRemove(()=>this._checkContextKey()),this._editorIsOpen=t.createKey("editorIsOpen",!1),this._activeCodeEditor=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}openCodeEditor(e,t,i){return t?Promise.resolve(this.doOpenEditor(t,e)):Promise.resolve(null)}doOpenEditor(e,t){if(!this.findModel(e,t.resource)){if(t.resource){const s=t.resource.scheme;if(s===Ze.http||s===Ze.https)return t2(t.resource.toString()),e}return null}const n=t.options?t.options.selection:null;if(n)if(typeof n.endLineNumber=="number"&&typeof n.endColumn=="number")e.setSelection(n),e.revealRangeInCenter(n,1);else{const s={lineNumber:n.startLineNumber,column:n.startColumn};e.setPosition(s),e.revealPositionInCenter(s,1)}return e}findModel(e,t){const i=e.getModel();return i&&i.uri.toString()!==t.toString()?null:i}};Ww=iie([M4(1,Fe),M4(2,qt)],Ww);var pE=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kt=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let nie=0,P4=!1;function rie(r){if(!r){if(P4)return;P4=!0}vZ(r||document.body)}let Vw=class extends Em{constructor(e,t,i,n,s,o,a,l,c,h){const u=Object.assign({},t);u.ariaLabel=u.ariaLabel||vC.editorViewAccessibleLabel,u.ariaLabel=u.ariaLabel+";"+vC.accessibilityHelpMessage;super(e,u,{},i,n,s,o,l,c,h);a instanceof XP?this._standaloneKeybindingService=a:this._standaloneKeybindingService=null,rie(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;let n="DYNAMIC_"+ ++nie,s=_e.deserialize(i);return this._standaloneKeybindingService.addDynamicKeybinding(n,e,t,s),n}createContextKey(e,t){return this._contextKeyService.createKey(e,t)}addAction(e){if(typeof e.id!="string"||typeof e.label!="string"||typeof e.run!="function")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"),Y.None;const t=e.id,i=e.label,n=_e.and(_e.equals("editorId",this.getId()),_e.deserialize(e.precondition)),s=e.keybindings,o=_e.and(n,_e.deserialize(e.keybindingContext)),a=e.contextMenuGroupId||null,l=e.contextMenuOrder||0,c=(f,...g)=>Promise.resolve(e.run(this,...g)),h=new le,u=this.getId()+":"+t;if(h.add(lt.registerCommand(u,c)),a){let f={command:{id:u,title:i},when:n,group:a,order:l};h.add(ns.appendMenuItem(xe.EditorContext,f))}if(Array.isArray(s))for(const f of s)h.add(this._standaloneKeybindingService.addDynamicKeybinding(u,f,c,o));let d=new l4(u,i,i,n,c,this._contextKeyService);return this._actions[t]=d,h.add(Xe(()=>{delete this._actions[t]})),h}_triggerCommand(e,t){if(this._codeEditorService instanceof Ww)try{this._codeEditorService.setActiveCodeEditor(this),super._triggerCommand(e,t)}finally{this._codeEditorService.setActiveCodeEditor(null)}else super._triggerCommand(e,t)}};Vw=pE([Kt(2,ut),Kt(3,Ct),Kt(4,fi),Kt(5,Fe),Kt(6,Qt),Kt(7,qt),Kt(8,Di),Kt(9,_r)],Vw);let mE=class extends Vw{constructor(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p){const _=Object.assign({},t);SC(d,_,!1);const v=h.registerEditorContainer(e);typeof _.theme=="string"&&h.setTheme(_.theme),typeof _.autoDetectHighContrast!="undefined"&&h.setAutoDetectHighContrast(Boolean(_.autoDetectHighContrast));let b=_.model;delete _.model;super(e,_,n,s,o,a,l,h,u,f);this._contextViewService=c,this._configurationService=d,this._standaloneThemeService=h,this._register(i),this._register(v);let C;if(typeof b=="undefined"?(C=O4(g,p,_.value||"",_.language||Ms.text,void 0),this._ownsModel=!0):(C=b,this._ownsModel=!1),this._attachModel(C),C){let y={oldModelUrl:null,newModelUrl:C.uri};this._onDidChangeModel.fire(y)}}dispose(){super.dispose()}updateOptions(e){SC(this._configurationService,e,!1),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_attachModel(e){super._attachModel(e),this._modelData&&this._contextViewService.setContainer(this._modelData.view.domNode.domNode)}_postDetachModelCleanup(e){super._postDetachModelCleanup(e),e&&this._ownsModel&&(e.dispose(),this._ownsModel=!1)}};mE=pE([Kt(3,ut),Kt(4,Ct),Kt(5,fi),Kt(6,Fe),Kt(7,Qt),Kt(8,mc),Kt(9,au),Kt(10,Di),Kt(11,hi),Kt(12,_r),Kt(13,gi),Kt(14,Ds)],mE);let _E=class extends vc{constructor(e,t,i,n,s,o,a,l,c,h,u,d,f,g,p){const _=Object.assign({},t);SC(d,_,!0);const v=h.registerEditorContainer(e);typeof _.theme=="string"&&h.setTheme(_.theme),typeof _.autoDetectHighContrast!="undefined"&&h.setAutoDetectHighContrast(Boolean(_.autoDetectHighContrast));super(e,_,{},p,l,s,n,c,h,u,f,g);this._contextViewService=a,this._configurationService=d,this._standaloneThemeService=h,this._register(i),this._register(v),this._contextViewService.setContainer(this._containerDomElement)}dispose(){super.dispose()}updateOptions(e){SC(this._configurationService,e,!0),typeof e.theme=="string"&&this._standaloneThemeService.setTheme(e.theme),typeof e.autoDetectHighContrast!="undefined"&&this._standaloneThemeService.setAutoDetectHighContrast(Boolean(e.autoDetectHighContrast)),super.updateOptions(e)}_createInnerEditor(e,t,i){return e.createInstance(Vw,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)}};_E=pE([Kt(3,ut),Kt(4,Fe),Kt(5,Qt),Kt(6,mc),Kt(7,ks),Kt(8,Ct),Kt(9,au),Kt(10,Di),Kt(11,hi),Kt(12,_c),Kt(13,rl),Kt(14,bc)],_E);function O4(r,e,t,i,n){if(t=t||"",!i){const s=t.indexOf(` -`);let o=t;return s!==-1&&(o=t.substring(0,s)),F4(r,t,e.createByFilepathOrFirstLine(n||null,o),n)}return F4(r,t,e.create(i),n)}function F4(r,e,t,i){return r.createModel(e,t,i)}const sie={ModesRegistry:"editor.modesRegistry"};class oie{constructor(){this._onDidChangeLanguages=new H,this.onDidChangeLanguages=this._onDidChangeLanguages.event,this._languages=[],this._dynamicLanguages=[]}registerLanguage(e){return this._languages.push(e),this._onDidChangeLanguages.fire(void 0),{dispose:()=>{for(let t=0,i=this._languages.length;t<i;t++)if(this._languages[t]===e){this._languages.splice(t,1);return}}}}getLanguages(){return[].concat(this._languages).concat(this._dynamicLanguages)}}const lu=new oie;mi.add(sie.ModesRegistry,lu);const bE="plaintext",aie=".txt",B4=new _x(bE,1);lu.registerLanguage({id:bE,extensions:[aie],aliases:[m("plainText.alias","Plain Text"),"text"],mimetypes:[Ms.text]});ze.register(B4,{brackets:[["(",")"],["[","]"],["{","}"]],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:'"',close:'"'},{open:"'",close:"'"},{open:"`",close:"`"}],colorizedBracketPairs:[],folding:{offSide:!0}},0);const cu=Object.prototype.hasOwnProperty;class lie extends Y{constructor(e=!0,t=!1){super();this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._warnOnOverwrite=t,this._nextLanguageId2=1,this._languageIdToLanguage=[],this._languageToLanguageId=Object.create(null),this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},e&&(this._initializeFromRegistry(),this._register(lu.onDidChangeLanguages(i=>this._initializeFromRegistry())))}_initializeFromRegistry(){this._languages={},this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={};const e=lu.getLanguages();this._registerLanguages(e)}_registerLanguages(e){for(const t of e)this._registerLanguage(t);this._mimeTypesMap={},this._nameMap={},this._lowercaseNameMap={},Object.keys(this._languages).forEach(t=>{let i=this._languages[t];i.name&&(this._nameMap[i.name]=i.identifier),i.aliases.forEach(n=>{this._lowercaseNameMap[n.toLowerCase()]=i.identifier}),i.mimetypes.forEach(n=>{this._mimeTypesMap[n]=i.identifier})}),mi.as(Dh.Configuration).registerOverrideIdentifiers(lu.getLanguages().map(t=>t.id)),this._onDidChange.fire()}_getLanguageId(e){if(this._languageToLanguageId[e])return this._languageToLanguageId[e];const t=this._nextLanguageId2++;return this._languageIdToLanguage[t]=e,this._languageToLanguageId[e]=t,t}_registerLanguage(e){const t=e.id;let i;if(cu.call(this._languages,t))i=this._languages[t];else{const n=this._getLanguageId(t);i={identifier:new _x(t,n),name:null,mimetypes:[],aliases:[],extensions:[],filenames:[],configurationFiles:[]},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(let a of t.extensions)hw({id:i,mime:n,extension:a},this._warnOnOverwrite)}if(Array.isArray(t.filenames))for(let a of t.filenames)hw({id:i,mime:n,filename:a},this._warnOnOverwrite),e.filenames.push(a);if(Array.isArray(t.filenamePatterns))for(let a of t.filenamePatterns)hw({id:i,mime:n,filepattern:a},this._warnOnOverwrite);if(typeof t.firstLine=="string"&&t.firstLine.length>0){let a=t.firstLine;a.charAt(0)!=="^"&&(a="^"+a);try{let l=new RegExp(a);zj(l)||hw({id:i,mime:n,firstline:l},this._warnOnOverwrite)}catch(l){Oe(l)}}e.aliases.push(i);let s=null;if(typeof t.aliases!="undefined"&&Array.isArray(t.aliases)&&(t.aliases.length===0?s=[null]:s=t.aliases),s!==null)for(const a of s)!a||a.length===0||e.aliases.push(a);let o=s!==null&&s.length>0;if(!(o&&s[0]===null)){let a=(o?s[0]:null)||i;(o||!e.name)&&(e.name=a)}t.configuration&&e.configurationFiles.push(t.configuration)}isRegisteredMode(e){return cu.call(this._mimeTypesMap,e)?!0:cu.call(this._languages,e)}getModeIdForLanguageNameLowercase(e){return cu.call(this._lowercaseNameMap,e)?this._lowercaseNameMap[e].language:null}extractModeIds(e){return e?e.split(",").map(t=>t.trim()).map(t=>cu.call(this._mimeTypesMap,t)?this._mimeTypesMap[t].language:t).filter(t=>cu.call(this._languages,t)):[]}getLanguageIdentifier(e){if(e===yx||e===0)return Bv;let t;if(typeof e=="string")t=e;else if(t=this._languageIdToLanguage[e],!t)return null;return cu.call(this._languages,t)?this._languages[t].identifier:null}getModeIdsFromFilepathOrFirstLine(e,t){if(!e&&!t)return[];let i=cJ(e,t);return this.extractModeIds(i.join(","))}}class W4{constructor(e,t){this._selector=t,this.languageIdentifier=this._selector();let i;this._onDidChange=new H({onFirstListenerAdd:()=>{i=e(()=>this._evaluate())},onLastListenerRemove:()=>{i.dispose()}}),this.onDidChange=this._onDidChange.event}_evaluate(){let e=this._selector();e.id!==this.languageIdentifier.id&&(this.languageIdentifier=e,this._onDidChange.fire(this.languageIdentifier))}}class cie extends Y{constructor(e=!1){super();this._onDidEncounterLanguage=this._register(new H),this.onDidEncounterLanguage=this._onDidEncounterLanguage.event,this._onLanguagesMaybeChanged=this._register(new H({leakWarningThreshold:200})),this.onLanguagesMaybeChanged=this._onLanguagesMaybeChanged.event,this._encounteredLanguages=new Set,this._registry=this._register(new lie(!0,e)),this._register(this._registry.onDidChange(()=>this._onLanguagesMaybeChanged.fire()))}isRegisteredMode(e){return this._registry.isRegisteredMode(e)}getModeIdForLanguageName(e){return this._registry.getModeIdForLanguageNameLowercase(e)}getModeIdByFilepathOrFirstLine(e,t){const i=this._registry.getModeIdsFromFilepathOrFirstLine(e,t);return Vx(i,null)}getModeId(e){const t=this._registry.extractModeIds(e);return Vx(t,null)}getLanguageIdentifier(e){return this._registry.getLanguageIdentifier(e)}create(e){return new W4(this.onLanguagesMaybeChanged,()=>{const t=this.getModeId(e);return this._createModeAndGetLanguageIdentifier(t)})}createByFilepathOrFirstLine(e,t){return new W4(this.onLanguagesMaybeChanged,()=>{const i=this.getModeIdByFilepathOrFirstLine(e,t);return this._createModeAndGetLanguageIdentifier(i)})}_createModeAndGetLanguageIdentifier(e){const t=this.getLanguageIdentifier(e||"plaintext")||Bv;return this._getOrCreateMode(t.language),t}triggerMode(e){const t=this.getModeId(e);this._getOrCreateMode(t||"plaintext")}_getOrCreateMode(e){if(!this._encounteredLanguages.has(e)){this._encounteredLanguages.add(e);const t=this.getLanguageIdentifier(e)||Bv;this._onDidEncounterLanguage.fire(t)}}}const Hw=bt("undoRedoService");class V4{constructor(e,t){this.resource=e,this.elements=t}}class Tf{constructor(){this.id=Tf._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}Tf._ID=0;Tf.None=new Tf;class ea{constructor(){this.id=ea._ID++,this.order=1}nextOrder(){return this.id===0?0:this.order++}}ea._ID=0;ea.None=new ea;class hie{constructor(e,t,i){this._legend=e,this._themeService=t,this._logService=i,this._hashTable=new ll,this._hasWarnedOverlappingTokens=!1}getMetadata(e,t,i){const n=this._hashTable.get(e,t,i.id);let s;if(n)s=n.metadata,this._logService.getLevel()===oo.Trace&&this._logService.trace(`SemanticTokensProviderStyling [CACHED] ${e} / ${t}: foreground ${xn.getForeground(s)}, fontStyle ${xn.getFontStyle(s).toString(2)}`);else{let o=this._legend.tokenTypes[e];const a=[];if(o){let l=t;for(let h=0;l>0&&h<this._legend.tokenModifiers.length;h++)l&1&&a.push(this._legend.tokenModifiers[h]),l=l>>1;l>0&&this._logService.getLevel()===oo.Trace&&(this._logService.trace(`SemanticTokensProviderStyling: unknown token modifier index: ${t.toString(2)} for legend: ${JSON.stringify(this._legend.tokenModifiers)}`),a.push("not-in-legend"));const c=this._themeService.getColorTheme().getTokenStyleMetadata(o,a,i.language);typeof c=="undefined"?s=2147483647:(s=0,typeof c.italic!="undefined"&&(s|=(c.italic?1:0)<<11|1),typeof c.bold!="undefined"&&(s|=(c.bold?2:0)<<11|2),typeof c.underline!="undefined"&&(s|=(c.underline?4:0)<<11|4),c.foreground&&(s|=c.foreground<<14|8),s===0&&(s=2147483647))}else this._logService.getLevel()===oo.Trace&&this._logService.trace(`SemanticTokensProviderStyling: unknown token type index: ${e} for legend: ${JSON.stringify(this._legend.tokenTypes)}`),s=2147483647,o="not-in-legend";this._hashTable.add(e,t,i.id,s),this._logService.getLevel()===oo.Trace&&this._logService.trace(`SemanticTokensProviderStyling ${e} (${o}) / ${t} (${a.join(" ")}): foreground ${xn.getForeground(s)}, fontStyle ${xn.getFontStyle(s).toString(2)}`)}return s}warnOverlappingSemanticTokens(e,t){this._hasWarnedOverlappingTokens||(this._hasWarnedOverlappingTokens=!0,console.warn(`Overlapping semantic tokens detected at lineNumber ${e}, column ${t}`))}}function H4(r,e,t){const i=r.data,n=r.data.length/5|0,s=Math.max(Math.ceil(n/1024),400),o=[];let a=0,l=1,c=0;for(;a<n;){const h=a;let u=Math.min(h+s,n);if(u<n){let C=u;for(;C-1>h&&i[5*C]===0;)C--;if(C-1===h){let y=u;for(;y+1<n&&i[5*y]===0;)y++;u=y}else u=C}let d=new Uint32Array((u-h)*4),f=0,g=0,p=0,_=0,v=0;for(;a<u;){const C=5*a,y=i[C],x=i[C+1],S=l+y,w=y===0?c+x:x,L=i[C+2],N=i[C+3],P=i[C+4],B=e.getMetadata(N,P,t);B!==2147483647&&(g===0&&(g=S),p===S&&v>w&&(e.warnOverlappingSemanticTokens(S,w+1),_<w?d[f-4+2]=w:f-=4),d[f]=S-g,d[f+1]=w,d[f+2]=w+L,d[f+3]=B,f+=4,p=S,_=w,v=w+L),l=S,c=w,a++}f!==d.length&&(d=d.subarray(0,f));const b=new WC(g,new BC(d));o.push(b)}return o}class uie{constructor(e,t,i,n){this.tokenTypeIndex=e,this.tokenModifierSet=t,this.languageId=i,this.metadata=n,this.next=null}}class ll{constructor(){this._elementsCount=0,this._currentLengthIndex=0,this._currentLength=ll._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<ll._SIZES.length?2/3*this._currentLength:0),this._elements=[],ll._nullOutEntries(this._elements,this._currentLength)}static _nullOutEntries(e,t){for(let i=0;i<t;i++)e[i]=null}_hash2(e,t){return(e<<5)-e+t|0}_hashFunc(e,t,i){return this._hash2(this._hash2(e,t),i)%this._currentLength}get(e,t,i){const n=this._hashFunc(e,t,i);let s=this._elements[n];for(;s;){if(s.tokenTypeIndex===e&&s.tokenModifierSet===t&&s.languageId===i)return s;s=s.next}return null}add(e,t,i,n){if(this._elementsCount++,this._growCount!==0&&this._elementsCount>=this._growCount){const s=this._elements;this._currentLengthIndex++,this._currentLength=ll._SIZES[this._currentLengthIndex],this._growCount=Math.round(this._currentLengthIndex+1<ll._SIZES.length?2/3*this._currentLength:0),this._elements=[],ll._nullOutEntries(this._elements,this._currentLength);for(const o of s){let a=o;for(;a;){const l=a.next;a.next=null,this._add(a),a=l}}}this._add(new uie(e,t,i,n))}_add(e){const t=this._hashFunc(e.tokenTypeIndex,e.tokenModifierSet,e.languageId);e.next=this._elements[t],this._elements[t]=e}}ll._SIZES=[3,7,13,31,61,127,251,509,1021,2039,4093,8191,16381,32749,65521,131071,262139,524287,1048573,2097143];function die(r){for(let e=0,t=r.length;e<t;e+=4){const i=r[e+0],n=r[e+1],s=r[e+2],o=r[e+3];r[e+0]=o,r[e+1]=s,r[e+2]=n,r[e+3]=i}}function fie(r){const e=new Uint8Array(r.buffer,r.byteOffset,r.length*4);return _M()||die(e),pv.wrap(e)}function z4(r){const e=new Uint32Array(gie(r));let t=0;if(e[t++]=r.id,r.type==="full")e[t++]=1,e[t++]=r.data.length,e.set(r.data,t),t+=r.data.length;else{e[t++]=2,e[t++]=r.deltas.length;for(const i of r.deltas)e[t++]=i.start,e[t++]=i.deleteCount,i.data?(e[t++]=i.data.length,e.set(i.data,t),t+=i.data.length):e[t++]=0}return fie(e)}function gie(r){let e=0;if(e+=1+1,r.type==="full")e+=1+r.data.length;else{e+=1,e+=(1+1+1)*r.deltas.length;for(const t of r.deltas)t.data&&(e+=t.data.length)}return e}var zw=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function vE(r){return r&&!!r.data}function pie(r){return r&&Array.isArray(r.edits)}function $4(r,e,t){const i=U4(r);return i?{provider:i,request:Promise.resolve(i.provideDocumentSemanticTokens(r,e,t))}:null}function U4(r){const e=Fv.ordered(r);return e.length>0?e[0]:null}function CE(r){const e=wx.ordered(r);return e.length>0?e[0]:null}lt.registerCommand("_provideDocumentSemanticTokensLegend",(r,...e)=>zw(void 0,void 0,void 0,function*(){const[t]=e;Nt(t instanceof Ie);const i=r.get(gi).getModel(t);if(!i)return;const n=U4(i);return n?n.getLegend():r.get(fi).executeCommand("_provideDocumentRangeSemanticTokensLegend",t)}));lt.registerCommand("_provideDocumentSemanticTokens",(r,...e)=>zw(void 0,void 0,void 0,function*(){const[t]=e;Nt(t instanceof Ie);const i=r.get(gi).getModel(t);if(!i)return;const n=$4(i,null,et.None);if(!n)return r.get(fi).executeCommand("_provideDocumentRangeSemanticTokens",t,i.getFullModelRange());const{provider:s,request:o}=n;let a;try{a=yield o}catch(c){$i(c);return}if(!a||!vE(a))return;const l=z4({id:0,type:"full",data:a.data});return a.resultId&&s.releaseDocumentSemanticTokens(a.resultId),l}));lt.registerCommand("_provideDocumentRangeSemanticTokensLegend",(r,...e)=>zw(void 0,void 0,void 0,function*(){const[t]=e;Nt(t instanceof Ie);const i=r.get(gi).getModel(t);if(!i)return;const n=CE(i);if(!!n)return n.getLegend()}));lt.registerCommand("_provideDocumentRangeSemanticTokens",(r,...e)=>zw(void 0,void 0,void 0,function*(){const[t,i]=e;Nt(t instanceof Ie),Nt(k.isIRange(i));const n=r.get(gi).getModel(t);if(!n)return;const s=CE(n);if(!s)return;let o;try{o=yield s.provideDocumentRangeSemanticTokens(n,k.lift(i),et.None)}catch(a){$i(a);return}if(!(!o||!vE(o)))return z4({id:0,type:"full",data:o.data})}));var mie=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Pm=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function Cc(r){return r.toString()}function j4(r){const e=new Sv,t=r.createSnapshot();let i;for(;i=t.read();)e.update(i);return e.digest()}class _ie{constructor(e,t,i){this._modelEventListeners=new le,this.model=e,this._languageSelection=null,this._languageSelectionListener=null,this._modelEventListeners.add(e.onWillDispose(()=>t(e))),this._modelEventListeners.add(e.onDidChangeLanguage(n=>i(e,n)))}_disposeLanguageSelection(){this._languageSelectionListener&&(this._languageSelectionListener.dispose(),this._languageSelectionListener=null)}dispose(){this._modelEventListeners.dispose(),this._disposeLanguageSelection()}setLanguage(e){this._disposeLanguageSelection(),this._languageSelection=e,this._languageSelectionListener=this._languageSelection.onDidChange(()=>this.model.setMode(e.languageIdentifier)),this.model.setMode(e.languageIdentifier)}}const bie=Zn||Je?1:2;class vie{constructor(e,t,i,n,s,o,a,l){this.uri=e,this.initialUndoRedoSnapshot=t,this.time=i,this.sharesUndoRedoStack=n,this.heapSize=s,this.sha1=o,this.versionId=a,this.alternativeVersionId=l}}let $w=class Om extends Y{constructor(e,t,i,n,s){super();this._configurationService=e,this._resourcePropertiesService=t,this._themeService=i,this._logService=n,this._undoRedoService=s,this._onModelAdded=this._register(new H),this.onModelAdded=this._onModelAdded.event,this._onModelRemoved=this._register(new H),this.onModelRemoved=this._onModelRemoved.event,this._onModelModeChanged=this._register(new H),this.onModelModeChanged=this._onModelModeChanged.event,this._modelCreationOptionsByLanguageAndResource=Object.create(null),this._models={},this._disposedModels=new Map,this._disposedModelsHeapSize=0,this._semanticStyling=this._register(new wie(this._themeService,this._logService)),this._register(this._configurationService.onDidChangeConfiguration(()=>this._updateModelOptions())),this._updateModelOptions(),this._register(new Cie(this,this._themeService,this._configurationService,this._semanticStyling))}static _readModelOptions(e,t){var i;let n=Sn.tabSize;if(e.editor&&typeof e.editor.tabSize!="undefined"){const f=parseInt(e.editor.tabSize,10);isNaN(f)||(n=f),n<1&&(n=1)}let s=n;if(e.editor&&typeof e.editor.indentSize!="undefined"&&e.editor.indentSize!=="tabSize"){const f=parseInt(e.editor.indentSize,10);isNaN(f)||(s=f),s<1&&(s=1)}let o=Sn.insertSpaces;e.editor&&typeof e.editor.insertSpaces!="undefined"&&(o=e.editor.insertSpaces==="false"?!1:Boolean(e.editor.insertSpaces));let a=bie;const l=e.eol;l===`\r -`?a=2:l===` -`&&(a=1);let c=Sn.trimAutoWhitespace;e.editor&&typeof e.editor.trimAutoWhitespace!="undefined"&&(c=e.editor.trimAutoWhitespace==="false"?!1:Boolean(e.editor.trimAutoWhitespace));let h=Sn.detectIndentation;e.editor&&typeof e.editor.detectIndentation!="undefined"&&(h=e.editor.detectIndentation==="false"?!1:Boolean(e.editor.detectIndentation));let u=Sn.largeFileOptimizations;e.editor&&typeof e.editor.largeFileOptimizations!="undefined"&&(u=e.editor.largeFileOptimizations==="false"?!1:Boolean(e.editor.largeFileOptimizations));let d=Sn.bracketPairColorizationOptions;return((i=e.editor)===null||i===void 0?void 0:i.bracketPairColorization)&&typeof e.editor.bracketPairColorization=="object"&&(d={enabled:!!e.editor.bracketPairColorization.enabled}),{isForSimpleWidget:t,tabSize:n,indentSize:s,insertSpaces:o,detectIndentation:h,defaultEOL:a,trimAutoWhitespace:c,largeFileOptimizations:u,bracketPairColorizationOptions:d}}_getEOL(e,t){if(e)return this._resourcePropertiesService.getEOL(e,t);const i=this._configurationService.getValue("files.eol",{overrideIdentifier:t});return i&&typeof i=="string"&&i!=="auto"?i:bs===3||bs===2?` -`:`\r -`}_shouldRestoreUndoStack(){const e=this._configurationService.getValue("files.restoreUndoStack");return typeof e=="boolean"?e:!0}getCreationOptions(e,t,i){let n=this._modelCreationOptionsByLanguageAndResource[e+t];if(!n){const s=this._configurationService.getValue("editor",{overrideIdentifier:e,resource:t}),o=this._getEOL(t,e);n=Om._readModelOptions({editor:s,eol:o},i),this._modelCreationOptionsByLanguageAndResource[e+t]=n}return n}_updateModelOptions(){const e=this._modelCreationOptionsByLanguageAndResource;this._modelCreationOptionsByLanguageAndResource=Object.create(null);const t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i],o=this._models[s],a=o.model.getLanguageIdentifier().language,l=o.model.uri,c=e[a+l],h=this.getCreationOptions(a,l,o.model.isForSimpleWidget);Om._setModelOptionsForModel(o.model,h,c)}}static _setModelOptionsForModel(e,t,i){i&&i.defaultEOL!==t.defaultEOL&&e.getLineCount()===1&&e.setEOL(t.defaultEOL===1?0:1),!(i&&i.detectIndentation===t.detectIndentation&&i.insertSpaces===t.insertSpaces&&i.tabSize===t.tabSize&&i.indentSize===t.indentSize&&i.trimAutoWhitespace===t.trimAutoWhitespace&&to(i.bracketPairColorizationOptions,t.bracketPairColorizationOptions))&&(t.detectIndentation?(e.detectIndentation(t.insertSpaces,t.tabSize),e.updateOptions({trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions})):e.updateOptions({insertSpaces:t.insertSpaces,tabSize:t.tabSize,indentSize:t.indentSize,trimAutoWhitespace:t.trimAutoWhitespace,bracketColorizationOptions:t.bracketPairColorizationOptions}))}_insertDisposedModel(e){this._disposedModels.set(Cc(e.uri),e),this._disposedModelsHeapSize+=e.heapSize}_removeDisposedModel(e){const t=this._disposedModels.get(Cc(e));return t&&(this._disposedModelsHeapSize-=t.heapSize),this._disposedModels.delete(Cc(e)),t}_ensureDisposedModelsHeapSize(e){if(this._disposedModelsHeapSize>e){const t=[];for(this._disposedModels.forEach(i=>{i.sharesUndoRedoStack||t.push(i)}),t.sort((i,n)=>i.time-n.time);t.length>0&&this._disposedModelsHeapSize>e;){const i=t.shift();this._removeDisposedModel(i.uri),i.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(i.initialUndoRedoSnapshot)}}}_createModelData(e,t,i,n){const s=this.getCreationOptions(t.language,i,n),o=new Ti(e,s,t,i,this._undoRedoService);if(i&&this._disposedModels.has(Cc(i))){const c=this._removeDisposedModel(i),h=this._undoRedoService.getElements(i),u=j4(o)===c.sha1;if(u||c.sharesUndoRedoStack){for(const d of h.past)$a(d)&&d.matchesResource(i)&&d.setModel(o);for(const d of h.future)$a(d)&&d.matchesResource(i)&&d.setModel(o);this._undoRedoService.setElementsValidFlag(i,!0,d=>$a(d)&&d.matchesResource(i)),u&&(o._overwriteVersionId(c.versionId),o._overwriteAlternativeVersionId(c.alternativeVersionId),o._overwriteInitialUndoRedoSnapshot(c.initialUndoRedoSnapshot))}else c.initialUndoRedoSnapshot!==null&&this._undoRedoService.restoreSnapshot(c.initialUndoRedoSnapshot)}const a=Cc(o.uri);if(this._models[a])throw new Error("ModelService: Cannot add model because it already exists!");const l=new _ie(o,c=>this._onWillDispose(c),(c,h)=>this._onDidChangeLanguage(c,h));return this._models[a]=l,l}createModel(e,t,i,n=!1){let s;return t?(s=this._createModelData(e,t.languageIdentifier,i,n),this.setMode(s.model,t)):s=this._createModelData(e,B4,i,n),this._onModelAdded.fire(s.model),s.model}setMode(e,t){if(!t)return;const i=this._models[Cc(e.uri)];!i||i.setLanguage(t)}getModels(){const e=[],t=Object.keys(this._models);for(let i=0,n=t.length;i<n;i++){const s=t[i];e.push(this._models[s].model)}return e}getModel(e){const t=Cc(e),i=this._models[t];return i?i.model:null}getSemanticTokensProviderStyling(e){return this._semanticStyling.get(e)}_schemaShouldMaintainUndoRedoElements(e){return e.scheme===Ze.file||e.scheme===Ze.vscodeRemote||e.scheme===Ze.userData||e.scheme===Ze.vscodeNotebookCell||e.scheme==="fake-fs"}_onWillDispose(e){const t=Cc(e.uri),i=this._models[t],n=this._undoRedoService.getUriComparisonKey(e.uri)!==e.uri.toString();let s=!1,o=0;if(n||this._shouldRestoreUndoStack()&&this._schemaShouldMaintainUndoRedoElements(e.uri)){const l=this._undoRedoService.getElements(e.uri);if(l.past.length>0||l.future.length>0){for(const c of l.past)$a(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri));for(const c of l.future)$a(c)&&c.matchesResource(e.uri)&&(s=!0,o+=c.heapSize(e.uri),c.setModel(e.uri))}}const a=Om.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK;if(s)if(!n&&o>a){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}else this._ensureDisposedModelsHeapSize(a-o),this._undoRedoService.setElementsValidFlag(e.uri,!1,l=>$a(l)&&l.matchesResource(e.uri)),this._insertDisposedModel(new vie(e.uri,i.model.getInitialUndoRedoSnapshot(),Date.now(),n,o,j4(e),e.getVersionId(),e.getAlternativeVersionId()));else if(!n){const l=i.model.getInitialUndoRedoSnapshot();l!==null&&this._undoRedoService.restoreSnapshot(l)}delete this._models[t],i.dispose(),delete this._modelCreationOptionsByLanguageAndResource[e.getLanguageIdentifier().language+e.uri],this._onModelRemoved.fire(e)}_onDidChangeLanguage(e,t){const i=t.oldLanguage,n=e.getLanguageIdentifier().language,s=this.getCreationOptions(i,e.uri,e.isForSimpleWidget),o=this.getCreationOptions(n,e.uri,e.isForSimpleWidget);Om._setModelOptionsForModel(e,o,s),this._onModelModeChanged.fire({model:e,oldModeId:i})}};$w.MAX_MEMORY_FOR_CLOSED_FILES_UNDO_STACK=20*1024*1024;$w=mie([Pm(0,hi),Pm(1,sP),Pm(2,qt),Pm(3,Va),Pm(4,Hw)],$w);const wE="editor.semanticHighlighting";function yE(r,e,t){var i;const n=(i=t.getValue(wE,{overrideIdentifier:r.getLanguageIdentifier().language,resource:r.uri}))===null||i===void 0?void 0:i.enabled;return typeof n=="boolean"?n:e.getColorTheme().semanticHighlighting}class Cie extends Y{constructor(e,t,i,n){super();this._watchers=Object.create(null),this._semanticStyling=n;const s=l=>{this._watchers[l.uri.toString()]=new hu(l,t,this._semanticStyling)},o=(l,c)=>{c.dispose(),delete this._watchers[l.uri.toString()]},a=()=>{for(let l of e.getModels()){const c=this._watchers[l.uri.toString()];yE(l,t,i)?c||s(l):c&&o(l,c)}};this._register(e.onModelAdded(l=>{yE(l,t,i)&&s(l)})),this._register(e.onModelRemoved(l=>{const c=this._watchers[l.uri.toString()];c&&o(l,c)})),this._register(i.onDidChangeConfiguration(l=>{l.affectsConfiguration(wE)&&a()})),this._register(t.onDidColorThemeChange(a))}}class wie extends Y{constructor(e,t){super();this._themeService=e,this._logService=t,this._caches=new WeakMap,this._register(this._themeService.onDidColorThemeChange(()=>{this._caches=new WeakMap}))}get(e){return this._caches.has(e)||this._caches.set(e,new hie(e.getLegend(),this._themeService,this._logService)),this._caches.get(e)}}class yie{constructor(e,t,i){this._provider=e,this.resultId=t,this.data=i}dispose(){this._provider.releaseDocumentSemanticTokens(this.resultId)}}class hu extends Y{constructor(e,t,i){super();this._isDisposed=!1,this._model=e,this._semanticStyling=i,this._fetchDocumentSemanticTokens=this._register(new Bt(()=>this._fetchDocumentSemanticTokensNow(),hu.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY)),this._currentDocumentResponse=null,this._currentDocumentRequestCancellationTokenSource=null,this._documentProvidersChangeListeners=[],this._register(this._model.onDidChangeContent(()=>{this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule()})),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 n=()=>{ht(this._documentProvidersChangeListeners),this._documentProvidersChangeListeners=[];for(const s of Fv.all(e))typeof s.onDidChange=="function"&&this._documentProvidersChangeListeners.push(s.onDidChange(()=>this._fetchDocumentSemanticTokens.schedule(0)))};n(),this._register(Fv.onDidChange(()=>{n(),this._fetchDocumentSemanticTokens.schedule()})),this._register(t.onDidColorThemeChange(s=>{this._setDocumentSemanticTokens(null,null,null,[]),this._fetchDocumentSemanticTokens.schedule()})),this._fetchDocumentSemanticTokens.schedule(0)}dispose(){this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._currentDocumentRequestCancellationTokenSource&&(this._currentDocumentRequestCancellationTokenSource.cancel(),this._currentDocumentRequestCancellationTokenSource=null),this._setDocumentSemanticTokens(null,null,null,[]),this._isDisposed=!0,super.dispose()}_fetchDocumentSemanticTokensNow(){if(this._currentDocumentRequestCancellationTokenSource)return;const e=new Rn,t=this._currentDocumentResponse&&this._currentDocumentResponse.resultId||null,i=$4(this._model,t,e.token);if(!i){this._currentDocumentResponse&&this._model.setSemanticTokens(null,!1);return}const{provider:n,request:s}=i;this._currentDocumentRequestCancellationTokenSource=e;const o=[],a=this._model.onDidChangeContent(c=>{o.push(c)}),l=this._semanticStyling.get(n);s.then(c=>{this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),this._setDocumentSemanticTokens(n,c||null,l,o)},c=>{c&&(Ro(c)||typeof c.message=="string"&&c.message.indexOf("busy")!==-1)||Oe(c),this._currentDocumentRequestCancellationTokenSource=null,a.dispose(),o.length>0&&(this._fetchDocumentSemanticTokens.isScheduled()||this._fetchDocumentSemanticTokens.schedule())})}static _copy(e,t,i,n,s){for(let o=0;o<s;o++)i[n+o]=e[t+o]}_setDocumentSemanticTokens(e,t,i,n){const s=this._currentDocumentResponse,o=()=>{n.length>0&&!this._fetchDocumentSemanticTokens.isScheduled()&&this._fetchDocumentSemanticTokens.schedule()};if(this._currentDocumentResponse&&(this._currentDocumentResponse.dispose(),this._currentDocumentResponse=null),this._isDisposed){e&&t&&e.releaseDocumentSemanticTokens(t.resultId);return}if(!e||!i){this._model.setSemanticTokens(null,!1);return}if(!t){this._model.setSemanticTokens(null,!0),o();return}if(pie(t)){if(!s){this._model.setSemanticTokens(null,!0);return}if(t.edits.length===0)t={resultId:t.resultId,data:s.data};else{let a=0;for(const d of t.edits)a+=(d.data?d.data.length:0)-d.deleteCount;const l=s.data,c=new Uint32Array(l.length+a);let h=l.length,u=c.length;for(let d=t.edits.length-1;d>=0;d--){const f=t.edits[d],g=h-(f.start+f.deleteCount);g>0&&(hu._copy(l,h-g,c,u-g,g),u-=g),f.data&&(hu._copy(f.data,0,c,u-f.data.length,f.data.length),u-=f.data.length),h=f.start}h>0&&hu._copy(l,0,c,0,h),t={resultId:t.resultId,data:c}}}if(vE(t)){this._currentDocumentResponse=new yie(e,t.resultId,t.data);const a=H4(t,i,this._model.getLanguageIdentifier());if(n.length>0)for(const l of n)for(const c of a)for(const h of l.changes)c.applyEdit(h.range,h.text);this._model.setSemanticTokens(a,!0)}else this._model.setSemanticTokens(null,!0);o()}}hu.FETCH_DOCUMENT_SEMANTIC_TOKENS_DELAY=300;class Sie{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}}function Lie(r){if(!r||!Array.isArray(r))return[];let e=[],t=0;for(let i=0,n=r.length;i<n;i++){let s=r[i],o=-1;if(typeof s.fontStyle=="string"){o=0;let c=s.fontStyle.split(" ");for(let h=0,u=c.length;h<u;h++)switch(c[h]){case"italic":o=o|1;break;case"bold":o=o|2;break;case"underline":o=o|4;break}}let a=null;typeof s.foreground=="string"&&(a=s.foreground);let l=null;typeof s.background=="string"&&(l=s.background),e[t++]=new Sie(s.token||"",i,o,a,l)}return e}function xie(r,e){r.sort((h,u)=>{let d=Nie(h.token,u.token);return d!==0?d:h.index-u.index});let t=0,i="000000",n="ffffff";for(;r.length>=1&&r[0].token==="";){let h=r.shift();h.fontStyle!==-1&&(t=h.fontStyle),h.foreground!==null&&(i=h.foreground),h.background!==null&&(n=h.background)}let s=new Die;for(let h of e)s.getId(h);let o=s.getId(i),a=s.getId(n),l=new SE(t,o,a),c=new LE(l);for(let h=0,u=r.length;h<u;h++){let d=r[h];c.insert(d.token,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new K4(s,c)}const kie=/^#?([0-9A-Fa-f]{6})([0-9A-Fa-f]{2})?$/;class Die{constructor(){this._lastColorId=0,this._id2color=[],this._color2id=new Map}getId(e){if(e===null)return 0;const t=e.match(kie);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]=K.fromHex("#"+e),i)}getColorMap(){return this._id2color.slice(0)}}class K4{constructor(e,t){this._colorMap=e,this._root=t,this._cache=new Map}static createFromRawTokenTheme(e,t){return this.createFromParsedTokenTheme(Lie(e),t)}static createFromParsedTokenTheme(e,t){return xie(e,t)}getColorMap(){return this._colorMap.getColorMap()}_match(e){return this._root.match(e)}match(e,t){let i=this._cache.get(t);if(typeof i=="undefined"){let n=this._match(t),s=Iie(t);i=(n.metadata|s<<8)>>>0,this._cache.set(t,i)}return(i|e<<0)>>>0}}const Eie=/\b(comment|string|regex|regexp)\b/;function Iie(r){let e=r.match(Eie);if(!e)return 0;switch(e[1]){case"comment":return 1;case"string":return 2;case"regex":return 4;case"regexp":return 4}throw new Error("Unexpected match for standard token type!")}function Nie(r,e){return r<e?-1:r>e?1:0}class SE{constructor(e,t,i){this._themeTrieElementRuleBrand=void 0,this._fontStyle=e,this._foreground=t,this._background=i,this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}clone(){return new SE(this._fontStyle,this._foreground,this._background)}acceptOverwrite(e,t,i){e!==-1&&(this._fontStyle=e),t!==0&&(this._foreground=t),i!==0&&(this._background=i),this.metadata=(this._fontStyle<<11|this._foreground<<14|this._background<<23)>>>0}}class LE{constructor(e){this._themeTrieElementBrand=void 0,this._mainRule=e,this._children=new Map}match(e){if(e==="")return this._mainRule;let t=e.indexOf("."),i,n;t===-1?(i=e,n=""):(i=e.substring(0,t),n=e.substring(t+1));let s=this._children.get(i);return typeof s!="undefined"?s.match(n):this._mainRule}insert(e,t,i,n){if(e===""){this._mainRule.acceptOverwrite(t,i,n);return}let s=e.indexOf("."),o,a;s===-1?(o=e,a=""):(o=e.substring(0,s),a=e.substring(s+1));let l=this._children.get(o);typeof l=="undefined"&&(l=new LE(this._mainRule.clone()),this._children.set(o,l)),l.insert(a,t,i,n)}}function Tie(r){let e=[];for(let t=1,i=r.length;t<i;t++){let n=r[t];e[t]=`.mtk${t} { color: ${n}; }`}return e.push(".mtki { font-style: italic; }"),e.push(".mtkb { font-weight: bold; }"),e.push(".mtku { text-decoration: underline; text-underline-position: under; }"),e.join(` -`)}const Aie={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:{[ls]:"#FFFFFE",[oc]:"#000000",[tD]:"#E5EBF1",[JC]:"#D3D3D3",[ew]:"#939393",[iD]:"#ADD6FF4D"}},Rie={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:{[ls]:"#1E1E1E",[oc]:"#D4D4D4",[tD]:"#3A3D41",[JC]:"#404040",[ew]:"#707070",[iD]:"#ADD6FF26"}},Mie={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:{[ls]:"#000000",[oc]:"#FFFFFF",[JC]:"#FFFFFF",[ew]:"#FFFFFF"}};function Pie(){const r=new H,e=Ate();return e.onDidChange(()=>r.fire()),{onDidChange:r.event,getCSS(){const t={},i=s=>{let o=s.defaults;for(;Gt.isThemeIcon(o);){const l=e.getIcon(o.id);if(!l)return;o=l.defaults}const a=o.fontId;if(a){const l=e.getIconFont(a);if(l)return t[a]=l,`.codicon-${s.id}:before { content: '${o.fontCharacter}'; font-family: ${i2(a)}; }`}return`.codicon-${s.id}:before { content: '${o.fontCharacter}'; }`},n=[];for(let s of e.getIcons()){const o=i(s);o&&n.push(o)}for(let s in t){const a=t[s].definition.src.map(l=>`${Ra(l.location)} format('${l.format}')`).join(", ");n.push(`@font-face { src: ${a}; font-family: ${i2(s)}; font-display: block; }`)}return n.join(` -`)}}}const uu="vs",Uw="vs-dark",Af="hc-black",Oie=mi.as(FO.ColorContribution),Fie=mi.as(tO.ThemingContribution);class q4{constructor(e,t){this.semanticHighlighting=!1,this.themeData=t;let i=t.base;e.length>0?(jw(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(let t in this.themeData.colors)e.set(t,K.fromHex(this.themeData.colors[t]));if(this.themeData.inherit){let t=xE(this.themeData.base);for(let i in t.colors)e.has(i)||e.set(i,K.fromHex(t.colors[i]))}this.colors=e}return this.colors}getColor(e,t){const i=this.getColors().get(e);if(i)return i;if(t!==!1)return this.getDefault(e)}getDefault(e){let t=this.defaultColors[e];return t||(t=Oie.resolveDefaultColor(e,this),this.defaultColors[e]=t,t)}defines(e){return Object.prototype.hasOwnProperty.call(this.getColors(),e)}get type(){switch(this.base){case uu:return is.LIGHT;case Af:return is.HIGH_CONTRAST;default:return is.DARK}}get tokenTheme(){if(!this._tokenTheme){let e=[],t=[];if(this.themeData.inherit){let i=xE(this.themeData.base);e=i.rules,i.encodedTokensColors&&(t=i.encodedTokensColors)}e=e.concat(this.themeData.rules),this.themeData.encodedTokensColors&&(t=this.themeData.encodedTokensColors),this._tokenTheme=K4.createFromRawTokenTheme(e,t)}return this._tokenTheme}getTokenStyleMetadata(e,t,i){const s=this.tokenTheme._match([e].concat(t).join(".")).metadata,o=xn.getForeground(s),a=xn.getFontStyle(s);return{foreground:o,italic:Boolean(a&1),bold:Boolean(a&2),underline:Boolean(a&4)}}}function jw(r){return r===uu||r===Uw||r===Af}function xE(r){switch(r){case uu:return Aie;case Uw:return Rie;case Af:return Mie}}function kE(r){let e=xE(r);return new q4(r,e)}class Bie extends Y{constructor(){super();this._onColorThemeChange=this._register(new H),this.onDidColorThemeChange=this._onColorThemeChange.event,this._environment=Object.create(null),this._autoDetectHighContrast=!0,this._knownThemes=new Map,this._knownThemes.set(uu,kE(uu)),this._knownThemes.set(Uw,kE(Uw)),this._knownThemes.set(Af,kE(Af));const e=Pie();this._codiconCSS=e.getCSS(),this._themeCSS="",this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._globalStyleElement=null,this._styleElements=[],this._colorMapOverride=null,this.setTheme(uu),e.onDidChange(()=>{this._codiconCSS=e.getCSS(),this._updateCSS()}),Fj("(forced-colors: active)",()=>{this._updateActualTheme()})}registerEditorContainer(e){return lv(e)?this._registerShadowDomContainer(e):this._registerRegularEditorContainer()}_registerRegularEditorContainer(){return this._globalStyleElement||(this._globalStyleElement=Tr(),this._globalStyleElement.className="monaco-colors",this._globalStyleElement.textContent=this._allCSS,this._styleElements.push(this._globalStyleElement)),Y.None}_registerShadowDomContainer(e){const t=Tr(e);return t.className="monaco-colors",t.textContent=this._allCSS,this._styleElements.push(t),{dispose:()=>{for(let i=0;i<this._styleElements.length;i++)if(this._styleElements[i]===t){this._styleElements.splice(i,1);return}}}}defineTheme(e,t){if(!/^[a-z0-9\-]+$/i.test(e))throw new Error("Illegal theme name!");if(!jw(t.base)&&!jw(e))throw new Error("Illegal theme base!");this._knownThemes.set(e,new q4(e,t)),jw(e)&&this._knownThemes.forEach(i=>{i.base===e&&i.notifyBaseUpdated()}),this._theme.themeName===e&&this.setTheme(e)}getColorTheme(){return this._theme}setColorMapOverride(e){this._colorMapOverride=e,this._updateThemeOrColorMap()}setTheme(e){let t;this._knownThemes.has(e)?t=this._knownThemes.get(e):t=this._knownThemes.get(uu),this._desiredTheme=t,this._updateActualTheme()}_updateActualTheme(){const e=this._autoDetectHighContrast&&window.matchMedia("(forced-colors: active)").matches?this._knownThemes.get(Af):this._desiredTheme;this._theme!==e&&(this._theme=e,this._updateThemeOrColorMap())}setAutoDetectHighContrast(e){this._autoDetectHighContrast=e,this._updateActualTheme()}_updateThemeOrColorMap(){let e=[],t={},i={addRule:s=>{t[s]||(e.push(s),t[s]=!0)}};Fie.getThemingParticipants().forEach(s=>s(this._theme,i,this._environment));const n=this._colorMapOverride||this._theme.tokenTheme.getColorMap();i.addRule(Tie(n)),this._themeCSS=e.join(` -`),this._updateCSS(),ti.setColorMap(n),this._onColorThemeChange.fire(this._theme)}_updateCSS(){this._allCSS=`${this._codiconCSS} -${this._themeCSS}`,this._styleElements.forEach(e=>e.textContent=this._allCSS)}getFileIconTheme(){return{hasFileIcons:!1,hasFolderIcons:!1,hidesExplorerArrows:!1}}}var Wie=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vie=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Fm="data-keybinding-context";class DE{constructor(e,t){this._id=e,this._parent=t,this._value=Object.create(null),this._value._contextId=e}setValue(e,t){return this._value[e]!==t?(this._value[e]=t,!0):!1}removeValue(e){return e in this._value?(delete this._value[e],!0):!1}getValue(e){const t=this._value[e];return typeof t=="undefined"&&this._parent?this._parent.getValue(e):t}}class Rf extends DE{constructor(){super(-1,null)}setValue(e,t){return!1}removeValue(e){return!1}getValue(e){}}Rf.INSTANCE=new Rf;class Bm extends DE{constructor(e,t,i){super(e,null);this._configurationService=t,this._values=Wd.forConfigKeys(),this._listener=this._configurationService.onDidChangeConfiguration(n=>{if(n.source===6){const s=Array.from(at.map(this._values,([o])=>o));this._values.clear(),i.fire(new Z4(s))}else{const s=[];for(const o of n.affectedKeys){const a=`config.${o}`,l=this._values.findSuperstr(a);l!==void 0&&(s.push(...at.map(l,([c])=>c)),this._values.deleteSuperstr(a)),this._values.has(a)&&(s.push(a),this._values.delete(a))}i.fire(new Z4(s))}})}dispose(){this._listener.dispose()}getValue(e){if(e.indexOf(Bm._keyPrefix)!==0)return super.getValue(e);if(this._values.has(e))return this._values.get(e);const t=e.substr(Bm._keyPrefix.length),i=this._configurationService.getValue(t);let n;switch(typeof i){case"number":case"boolean":case"string":n=i;break;default:Array.isArray(i)?n=JSON.stringify(i):n=i}return this._values.set(e,n),n}setValue(e,t){return super.setValue(e,t)}removeValue(e){return super.removeValue(e)}}Bm._keyPrefix="config.";class Hie{constructor(e,t,i){this._service=e,this._key=t,this._defaultValue=i,this.reset()}set(e){this._service.setContext(this._key,e)}reset(){typeof this._defaultValue=="undefined"?this._service.removeContext(this._key):this._service.setContext(this._key,this._defaultValue)}get(){return this._service.getContextKeyValue(this._key)}}class G4{constructor(e){this.key=e}affectsSome(e){return e.has(this.key)}}class Z4{constructor(e){this.keys=e}affectsSome(e){for(const t of this.keys)if(e.has(t))return!0;return!1}}class zie{constructor(e){this.events=e}affectsSome(e){for(const t of this.events)if(t.affectsSome(e))return!0;return!1}}class Y4{constructor(e){this._onDidChangeContext=new Yb({merge:t=>new zie(t)}),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 Hie(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 $ie(this,e)}contextMatchesRules(e){if(this._isDisposed)throw new Error("AbstractContextKeyService has been disposed");const t=this.getContextValuesContainer(this._myContextId);return rf.contextMatchesRules(t,e)}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 G4(e))}removeContext(e){this._isDisposed||this.getContextValuesContainer(this._myContextId).removeValue(e)&&this._onDidChangeContext.fire(new G4(e))}getContext(e){return this._isDisposed?Rf.INSTANCE:this.getContextValuesContainer(Uie(e))}}let EE=class extends Y4{constructor(e){super(0);this._contexts=new Map,this._toDispose=new le,this._lastContextId=0;const t=new Bm(this._myContextId,e,this._onDidChangeContext);this._contexts.set(this._myContextId,t),this._toDispose.add(t)}dispose(){this._onDidChangeContext.dispose(),this._isDisposed=!0,this._toDispose.dispose()}getContextValuesContainer(e){return this._isDisposed?Rf.INSTANCE:this._contexts.get(e)||Rf.INSTANCE}createChildContext(e=this._myContextId){if(this._isDisposed)throw new Error("ContextKeyService has been disposed");let t=++this._lastContextId;return this._contexts.set(t,new DE(t,this.getContextValuesContainer(e))),t}disposeContext(e){this._isDisposed||this._contexts.delete(e)}};EE=Wie([Vie(0,hi)],EE);class $ie extends Y4{constructor(e,t){super(e.createChildContext());if(this._parentChangeListener=new An,this._parent=e,this._updateParentChangeListener(),this._domNode=t,this._domNode.hasAttribute(Fm)){let i="";this._domNode.classList&&(i=Array.from(this._domNode.classList.values()).join(", ")),console.error(`Element already has context attribute${i?": "+i:""}`)}this._domNode.setAttribute(Fm,String(this._myContextId))}_updateParentChangeListener(){this._parentChangeListener.value=this._parent.onDidChangeContext(this._onDidChangeContext.fire,this._onDidChangeContext)}dispose(){this._isDisposed||(this._onDidChangeContext.dispose(),this._parent.disposeContext(this._myContextId),this._parentChangeListener.dispose(),this._domNode.removeAttribute(Fm),this._isDisposed=!0)}getContextValuesContainer(e){return this._isDisposed?Rf.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)}}function Uie(r){for(;r;){if(r.hasAttribute(Fm)){const e=r.getAttribute(Fm);return e?parseInt(e,10):NaN}r=r.parentElement}return 0}lt.registerCommand(tZ,function(r,e,t){r.get(Fe).createKey(String(e),t)});lt.registerCommand({id:"getContextKeyInfo",handler(){return[...Le.all()].sort((r,e)=>r.key.localeCompare(e.key))},description:{description:m("getContextKeyInfo","A command that returns information about context keys"),args:[]}});lt.registerCommand("_generateContextKeyInfo",function(){const r=[],e=new Set;for(let t of Le.all())e.has(t.key)||(e.add(t.key),r.push(t));r.sort((t,i)=>t.key.localeCompare(i.key)),console.log(JSON.stringify(r,void 0,2))});function X4(r){let e=r.definition;for(;e instanceof ve;)e=e.definition;return`.codicon-${r.id}:before { content: '${e.fontCharacter}'; }`}var vn;(function(r){function e(s,o){if(s.start>=o.end||o.start>=s.end)return{start:0,end:0};const a=Math.max(s.start,o.start),l=Math.min(s.end,o.end);return l-a<=0?{start:0,end:0}:{start:a,end:l}}r.intersect=e;function t(s){return s.end-s.start<=0}r.isEmpty=t;function i(s,o){return!t(e(s,o))}r.intersects=i;function n(s,o){const a=[],l={start:s.start,end:Math.min(o.start,s.end)},c={start:Math.max(o.end,s.start),end:s.end};return t(l)||a.push(l),t(c)||a.push(c),a}r.relativeComplement=n})(vn||(vn={}));var wc;(function(r){r[r.AVOID=0]="AVOID",r[r.ALIGN=1]="ALIGN"})(wc||(wc={}));function Mf(r,e,t){const i=t.mode===wc.ALIGN?t.offset:t.offset+t.size,n=t.mode===wc.ALIGN?t.offset+t.size:t.offset;return t.position===0?e<=r-i?i:e<=n?n-e:Math.max(r-e,0):e<=n?n-e:e<=r-i?i:0}class Pf extends Y{constructor(e,t){super();this.container=null,this.delegate=null,this.toDisposeOnClean=Y.None,this.toDisposeOnSetContainer=Y.None,this.shadowRoot=null,this.shadowRootHostElement=null,this.view=oe(".context-view"),this.useFixedPosition=!1,this.useShadowDOM=!1,Qn(this.view),this.setContainer(e,t),this._register(Xe(()=>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,(i=this.shadowRootHostElement)===null||i===void 0||i.remove(),this.shadowRootHostElement=null):this.container.removeChild(this.view),this.container=null),e){if(this.container=e,this.useFixedPosition=t!==1,this.useShadowDOM=t===3,this.useShadowDOM){this.shadowRootHostElement=oe(".shadow-root-host"),this.container.appendChild(this.shadowRootHostElement),this.shadowRoot=this.shadowRootHostElement.attachShadow({mode:"open"});const s=document.createElement("style");s.textContent=jie,this.shadowRoot.appendChild(s),this.shadowRoot.appendChild(this.view),this.shadowRoot.appendChild(oe("slot"))}else this.container.appendChild(this.view);const n=new le;Pf.BUBBLE_UP_EVENTS.forEach(s=>{n.add(ki(this.container,s,o=>{this.onDOMEvent(o,!1)}))}),Pf.BUBBLE_DOWN_EVENTS.forEach(s=>{n.add(ki(this.container,s,o=>{this.onDOMEvent(o,!0)},!0))}),this.toDisposeOnSetContainer=n}}show(e){this.isVisible()&&this.hide(),Ui(this.view),this.view.className="context-view",this.view.style.top="0px",this.view.style.left="0px",this.view.style.zIndex="2500",this.view.style.position=this.useFixedPosition?"fixed":"absolute",Ar(this.view),this.toDisposeOnClean=e.render(this.view)||Y.None,this.delegate=e,this.doLayout(),this.delegate.focus&&this.delegate.focus()}getViewElement(){return this.view}layout(){if(!!this.isVisible()){if(this.delegate.canRelayout===!1&&!(No&&sv.pointerEvents)){this.hide();return}this.delegate.layout&&this.delegate.layout(),this.doLayout()}}doLayout(){if(!this.isVisible())return;let e=this.delegate.getAnchor(),t;if(QM(e)){let u=Qi(e);t={top:u.top,left:u.left,width:u.width,height:u.height}}else t={top:e.y,left:e.x,width:e.width||1,height:e.height||2};const i=vs(this.view),n=WL(this.view),s=this.delegate.anchorPosition||0,o=this.delegate.anchorAlignment||0,a=this.delegate.anchorAxisAlignment||0;let l,c;if(a===0){const u={offset:t.top-window.pageYOffset,size:t.height,position:s===0?0:1},d={offset:t.left,size:t.width,position:o===0?0:1,mode:wc.ALIGN};l=Mf(window.innerHeight,n,u)+window.pageYOffset,vn.intersects({start:l,end:l+n},{start:u.offset,end:u.offset+u.size})&&(d.mode=wc.AVOID),c=Mf(window.innerWidth,i,d)}else{const u={offset:t.left,size:t.width,position:o===0?0:1},d={offset:t.top,size:t.height,position:s===0?0:1,mode:wc.ALIGN};c=Mf(window.innerWidth,i,u),vn.intersects({start:c,end:c+i},{start:u.offset,end:u.offset+u.size})&&(d.mode=wc.AVOID),l=Mf(window.innerHeight,n,d)+window.pageYOffset}this.view.classList.remove("top","bottom","left","right"),this.view.classList.add(s===0?"bottom":"top"),this.view.classList.add(o===0?"left":"right"),this.view.classList.toggle("fixed",this.useFixedPosition);const h=Qi(this.container);this.view.style.top=`${l-(this.useFixedPosition?Qi(this.view).top:h.top)}px`,this.view.style.left=`${c-(this.useFixedPosition?Qi(this.view).left:h.left)}px`,this.view.style.width="initial"}hide(e){const t=this.delegate;this.delegate=null,(t==null?void 0:t.onHide)&&t.onHide(e),this.toDisposeOnClean.dispose(),Qn(this.view)}isVisible(){return!!this.delegate}onDOMEvent(e,t){this.delegate&&(this.delegate.onDOMEvent?this.delegate.onDOMEvent(e,document.activeElement):t&&!Fo(e.target,this.container)&&this.hide())}dispose(){this.hide(),super.dispose()}}Pf.BUBBLE_UP_EVENTS=["click","keydown","focus","blur"];Pf.BUBBLE_DOWN_EVENTS=["click"];let jie=` - :host { - all: initial; /* 1st rule so subsequent properties are reset. */ - } - - @font-face { - font-family: "codicon"; - font-display: block; - src: url("./codicon.ttf?5d4d76ab2ce5108968ad644d591a16a6") format("truetype"); - } - - .codicon[class*='codicon-'] { - font: normal normal normal 16px/1 codicon; - display: inline-block; - text-decoration: none; - text-rendering: auto; - text-align: center; - -webkit-font-smoothing: antialiased; - -moz-osx-font-smoothing: grayscale; - user-select: none; - -webkit-user-select: none; - -ms-user-select: none; - } - - :host { - font-family: -apple-system, BlinkMacSystemFont, "Segoe WPC", "Segoe UI", "HelveticaNeue-Light", system-ui, "Ubuntu", "Droid Sans", sans-serif; - } - - :host-context(.mac) { font-family: -apple-system, BlinkMacSystemFont, sans-serif; } - :host-context(.mac:lang(zh-Hans)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", sans-serif; } - :host-context(.mac:lang(zh-Hant)) { font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif; } - :host-context(.mac:lang(ja)) { font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic Pro", sans-serif; } - :host-context(.mac:lang(ko)) { font-family: -apple-system, BlinkMacSystemFont, "Nanum Gothic", "Apple SD Gothic Neo", "AppleGothic", sans-serif; } - - :host-context(.windows) { font-family: "Segoe WPC", "Segoe UI", sans-serif; } - :host-context(.windows:lang(zh-Hans)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft YaHei", sans-serif; } - :host-context(.windows:lang(zh-Hant)) { font-family: "Segoe WPC", "Segoe UI", "Microsoft Jhenghei", sans-serif; } - :host-context(.windows:lang(ja)) { font-family: "Segoe WPC", "Segoe UI", "Yu Gothic UI", "Meiryo UI", sans-serif; } - :host-context(.windows:lang(ko)) { font-family: "Segoe WPC", "Segoe UI", "Malgun Gothic", "Dotom", sans-serif; } - - :host-context(.linux) { font-family: system-ui, "Ubuntu", "Droid Sans", sans-serif; } - :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; } - :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; } - :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; } - :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; } -`;function IE(...r){return function(e,t){for(let i=0,n=r.length;i<n;i++){const s=r[i](e,t);if(s)return s}return null}}const Kw=Kie.bind(void 0,!0);function Kie(r,e,t){if(!t||t.length<e.length)return null;let i;return r?i=GL(t,e):i=t.indexOf(e)===0,i?e.length>0?[{start:0,end:e.length}]:[]:null}function Q4(r,e){const t=e.toLowerCase().indexOf(r.toLowerCase());return t===-1?null:[{start:t,end:t+r.length}]}function qie(r,e){return NE(r.toLowerCase(),e.toLowerCase(),0,0)}function NE(r,e,t,i){if(t===r.length)return[];if(i===e.length)return null;if(r[t]===e[i]){let n=null;return(n=NE(r,e,t+1,i+1))?RE({start:i,end:i+1},n):null}return NE(r,e,t,i+1)}function TE(r){return 97<=r&&r<=122}function qw(r){return 65<=r&&r<=90}function AE(r){return 48<=r&&r<=57}function J4(r){return r===32||r===9||r===10||r===13}const e5=new Set;"`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?".split("").forEach(r=>e5.add(r.charCodeAt(0)));function Gw(r){return J4(r)||e5.has(r)}function Gie(r,e){return r===e||Gw(r)&&Gw(e)}function t5(r){return TE(r)||qw(r)||AE(r)}function RE(r,e){return e.length===0?e=[r]:r.end===e[0].start?e[0].start=r.start:e.unshift(r),e}function i5(r,e){for(let t=e;t<r.length;t++){const i=r.charCodeAt(t);if(qw(i)||AE(i)||t>0&&!t5(r.charCodeAt(t-1)))return t}return r.length}function ME(r,e,t,i){if(t===r.length)return[];if(i===e.length)return null;if(r[t]!==e[i].toLowerCase())return null;{let n=null,s=i+1;for(n=ME(r,e,t+1,i+1);!n&&(s=i5(e,s))<e.length;)n=ME(r,e,t+1,s),s++;return n===null?null:RE({start:i,end:i+1},n)}}function Zie(r){let e=0,t=0,i=0,n=0,s=0;for(let h=0;h<r.length;h++)s=r.charCodeAt(h),qw(s)&&e++,TE(s)&&t++,t5(s)&&i++,AE(s)&&n++;const o=e/r.length,a=t/r.length,l=i/r.length,c=n/r.length;return{upperPercent:o,lowerPercent:a,alphaPercent:l,numericPercent:c}}function Yie(r){const{upperPercent:e,lowerPercent:t}=r;return t===0&&e>.6}function Xie(r){const{upperPercent:e,lowerPercent:t,alphaPercent:i,numericPercent:n}=r;return t>.2&&e<.8&&i>.6&&n<.2}function Qie(r){let e=0,t=0,i=0,n=0;for(let s=0;s<r.length;s++)i=r.charCodeAt(s),qw(i)&&e++,TE(i)&&t++,J4(i)&&n++;return(e===0||t===0)&&n===0?r.length<=30:e<=5}function n5(r,e){if(!e||(e=e.trim(),e.length===0)||!Qie(r)||e.length>60)return null;const t=Zie(e);if(!Xie(t)){if(!Yie(t))return null;e=e.toLowerCase()}let i=null,n=0;for(r=r.toLowerCase();n<e.length&&(i=ME(r,e,0,n))===null;)n=i5(e,n+1);return i}function Jie(r,e,t=!1){if(!e||e.length===0)return null;let i=null,n=0;for(r=r.toLowerCase(),e=e.toLowerCase();n<e.length&&(i=PE(r,e,0,n,t))===null;)n=r5(e,n+1);return i}function PE(r,e,t,i,n){if(t===r.length)return[];if(i===e.length)return null;if(Gie(r.charCodeAt(t),e.charCodeAt(i))){let s=null,o=i+1;if(s=PE(r,e,t+1,i+1,n),!n)for(;!s&&(o=r5(e,o))<e.length;)s=PE(r,e,t+1,o,n),o++;return s===null?null:RE({start:i,end:i+1},s)}else return null}function r5(r,e){for(let t=e;t<r.length;t++)if(Gw(r.charCodeAt(t))||t>0&&Gw(r.charCodeAt(t-1)))return t;return r.length}const ene=IE(Kw,n5,Q4),tne=IE(Kw,n5,qie),s5=new $l(1e4);function o5(r,e,t=!1){if(typeof r!="string"||typeof e!="string")return null;let i=s5.get(r);i||(i=new RegExp(Vj(r),"i"),s5.set(r,i));const n=i.exec(e);return n?[{start:n.index,end:n.index+n[0].length}]:t?tne(r,e):ene(r,e)}function ine(r,e,t,i,n,s){const o=Math.min(13,r.length);for(;t<o;t++){const a=Of(r,e,t,i,n,s,!1);if(a)return a}return[0,s]}function Zw(r){if(typeof r=="undefined")return[];const e=[],t=r[1];for(let i=r.length-1;i>1;i--){const n=r[i]+t,s=e[e.length-1];s&&s.end===n?s.end=n+1:e.push({start:n,end:n+1})}return e}const yc=128;function OE(){const r=[],e=[];for(let t=0;t<=yc;t++)e[t]=0;for(let t=0;t<=yc;t++)r.push(e.slice(0));return r}function a5(r){const e=[];for(let t=0;t<=r;t++)e[t]=0;return e}const l5=a5(2*yc),FE=a5(2*yc),cl=OE(),du=OE(),Yw=OE();function Xw(r,e){if(e<0||e>=r.length)return!1;const t=r.codePointAt(e);switch(t){case 95:case 45:case 46:case 32:case 47:case 92:case 39:case 34:case 58:case 36:case 60:case 40:case 91:return!0;case void 0:return!1;default:return!!fp(t)}}function c5(r,e){if(e<0||e>=r.length)return!1;switch(r.charCodeAt(e)){case 32:case 9:return!0;default:return!1}}function Qw(r,e,t){return e[r]!==t[r]}function nne(r,e,t,i,n,s,o=!1){for(;e<t&&n<s;)r[e]===i[n]&&(o&&(l5[e]=n),e+=1),n+=1;return e===t}var uo;(function(r){r.Default=[-100,0];function e(t){return!t||t.length===2&&t[0]===-100&&t[1]===0}r.isDefault=e})(uo||(uo={}));function Of(r,e,t,i,n,s,o){const a=r.length>yc?yc:r.length,l=i.length>yc?yc:i.length;if(t>=a||s>=l||a-t>l-s||!nne(e,t,a,n,s,l,!0))return;rne(a,l,t,s,e,n);let c=1,h=1,u=t,d=s;const f=[!1];for(c=1,u=t;u<a;c++,u++){const b=l5[u],C=FE[u],y=u+1<a?FE[u+1]:l;for(h=b-s+1,d=b;d<y;h++,d++){let x=Number.MIN_SAFE_INTEGER,S=!1;d<=C&&(x=sne(r,e,u,t,i,n,d,l,s,cl[c-1][h-1]===0,f));let w=0;x!==Number.MAX_SAFE_INTEGER&&(S=!0,w=x+du[c-1][h-1]);const L=d>b,N=L?du[c][h-1]+(cl[c][h-1]>0?-5:0):0,P=d>b+1&&cl[c][h-1]>0,B=P?du[c][h-2]+(cl[c][h-2]>0?-5:0):0;if(P&&(!L||B>=N)&&(!S||B>=w))du[c][h]=B,Yw[c][h]=3,cl[c][h]=0;else if(L&&(!S||N>=w))du[c][h]=N,Yw[c][h]=2,cl[c][h]=0;else if(S)du[c][h]=w,Yw[c][h]=1,cl[c][h]=cl[c-1][h-1]+1;else throw new Error("not possible")}}if(!f[0]&&!o)return;c--,h--;const g=[du[c][h],s];let p=0,_=0;for(;c>=1;){let b=h;do{const C=Yw[c][b];if(C===3)b=b-2;else if(C===2)b=b-1;else break}while(b>=1);p>1&&e[t+c-1]===n[s+h-1]&&!Qw(b+s-1,i,n)&&p+1>cl[c][b]&&(b=h),b===h?p++:p=1,_||(_=b),c--,h=b-1,g.push(h)}l===a&&(g[0]+=2);const v=_-a;return g[0]-=v,g}function rne(r,e,t,i,n,s){let o=r-1,a=e-1;for(;o>=t&&a>=i;)n[o]===s[a]&&(FE[o]=a,o--),a--}function sne(r,e,t,i,n,s,o,a,l,c,h){if(e[t]!==s[o])return Number.MIN_SAFE_INTEGER;let u=1,d=!1;return o===t-i?u=r[t]===n[o]?7:5:Qw(o,n,s)&&(o===0||!Qw(o-1,n,s))?(u=r[t]===n[o]?7:5,d=!0):Xw(s,o)&&(o===0||!Xw(s,o-1))?u=5:(Xw(s,o-1)||c5(s,o-1))&&(u=5,d=!0),u>1&&t===i&&(h[0]=!0),d||(d=Qw(o,n,s)||Xw(s,o-1)||c5(s,o-1)),t===i?o>l&&(u-=d?3:5):c?u+=d?2:0:u+=d?0:1,o+1===a&&(u-=d?3:5),u}function one(r,e,t,i,n,s,o){return ane(r,e,t,i,n,s,!0,o)}function ane(r,e,t,i,n,s,o,a){let l=Of(r,e,t,i,n,s,a);if(l&&!o)return l;if(r.length>=3){const c=Math.min(7,r.length-1);for(let h=t+1;h<c;h++){const u=lne(r,h);if(u){const d=Of(u,u.toLowerCase(),t,i,n,s,a);d&&(d[0]-=3,(!l||d[0]>l[0])&&(l=d))}}}return l}function lne(r,e){if(e+1>=r.length)return;const t=r[e],i=r[e+1];if(t!==i)return r.slice(0,e)+i+t+r.slice(e+2)}const Wm="$(",BE=new RegExp(`\\$\\(${fr.iconNameExpression}(?:${fr.iconModifierExpression})?\\)`,"g"),cne=new RegExp(`(\\\\)?${BE.source}`,"g");function hne(r){return r.replace(cne,(e,t)=>t?e:`\\${e}`)}const une=new RegExp(`\\\\${BE.source}`,"g");function dne(r){return r.replace(une,e=>`\\${e}`)}const fne=new RegExp(`(\\s)?(\\\\)?${BE.source}(\\s)?`,"g");function h5(r){return r.indexOf(Wm)===-1?r:r.replace(fne,(e,t,i,n)=>i?e:t||n||"")}function Jw(r){const e=r.indexOf(Wm);return e===-1?{text:r}:gne(r,e)}function gne(r,e){const t=[];let i="";function n(d){if(d){i+=d;for(const f of d)t.push(a)}}let s=-1,o="",a=0,l,c,h=e;const u=r.length;for(n(r.substr(0,e));h<u;)l=r[h],c=r[h+1],l===Wm[0]&&c===Wm[1]?(s=h,n(o),o=Wm,h++):l===")"&&s!==-1?(a+=h-s+1,s=-1,o=""):s!==-1?/^[a-z0-9\-]$/i.test(l)?o+=l:(n(o),s=-1,o=""):n(l),h++;return n(o),{text:i,iconOffsets:t}}function e0(r,e,t=!1){const{text:i,iconOffsets:n}=e;if(!n||n.length===0)return o5(r,i,t);const s=$L(i," "),o=i.length-s.length,a=o5(r,s,t);if(a)for(const l of a){const c=n[l.start+o]+o;l.start+=c,l.end+=c}return a}const WE=/\(&([^\s&])\)|(^|[^&])&([^\s&])/,VE=/(&)?(&)([^\s&])/g,u5=Ls("menu-selection",ve.check),d5=Ls("menu-submenu",ve.chevronRight);var t0;(function(r){r[r.Right=0]="Right",r[r.Left=1]="Left"})(t0||(t0={}));class fu extends il{constructor(e,t,i={}){e.classList.add("monaco-menu-container"),e.setAttribute("role","presentation");const n=document.createElement("div");n.classList.add("monaco-menu"),n.setAttribute("role","presentation");super(n,{orientation:1,actionViewItemProvider:a=>this.doGetActionViewItem(a,i,s),context:i.context,actionRunner:i.actionRunner,ariaLabel:i.ariaLabel,focusOnlyEnabledItems:!0,triggerKeys:{keys:[3,...Je||Zn?[10]:[]],keyDown:!0}});this.menuElement=n,this.actionsList.setAttribute("role","menu"),this.actionsList.tabIndex=0,this.menuDisposables=this._register(new le),this.initializeStyleSheet(e),this._register(Et.addTarget(n)),J(n,Ee.KEY_DOWN,a=>{new ei(a).equals(2)&&a.preventDefault()}),i.enableMnemonics&&this.menuDisposables.add(J(n,Ee.KEY_DOWN,a=>{const l=a.key.toLocaleLowerCase();if(this.mnemonics.has(l)){St.stop(a,!0);const c=this.mnemonics.get(l);if(c.length===1&&(c[0]instanceof f5&&c[0].container&&this.focusItemByElement(c[0].container),c[0].onClick(a)),c.length>1){const h=c.shift();h&&h.container&&(this.focusItemByElement(h.container),c.push(h)),this.mnemonics.set(l,c)}}})),Zn&&this._register(J(n,Ee.KEY_DOWN,a=>{const l=new ei(a);l.equals(14)||l.equals(11)?(this.focusedItem=this.viewItems.length-1,this.focusNext(),St.stop(a,!0)):(l.equals(13)||l.equals(12))&&(this.focusedItem=0,this.focusPrevious(),St.stop(a,!0))})),this._register(J(this.domNode,Ee.MOUSE_OUT,a=>{let l=a.relatedTarget;Fo(l,this.domNode)||(this.focusedItem=void 0,this.updateFocus(),a.stopPropagation())})),this._register(J(this.actionsList,Ee.MOUSE_OVER,a=>{let l=a.target;if(!(!l||!Fo(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}})),this._register(Et.addTarget(this.actionsList)),this._register(J(this.actionsList,Vt.Tap,a=>{let l=a.initialTarget;if(!(!l||!Fo(l,this.actionsList)||l===this.actionsList)){for(;l.parentElement!==this.actionsList&&l.parentElement!==null;)l=l.parentElement;if(l.classList.contains("action-item")){const c=this.focusedItem;this.setFocusedItem(l),c!==this.focusedItem&&this.updateFocus()}}}));let s={parent:this};this.mnemonics=new Map,this.scrollableElement=this._register(new gm(n,{alwaysConsumeMouseWheel:!0,horizontal:2,vertical:3,verticalScrollbarSize:7,handleMouseWheel:!0,useShadows:!0}));const o=this.scrollableElement.getDomNode();o.style.position="",this._register(J(n,Vt.Change,a=>{St.stop(a,!0);const l=this.scrollableElement.getScrollPosition().scrollTop;this.scrollableElement.setScrollPosition({scrollTop:l-a.translationY})})),this._register(J(o,Ee.MOUSE_UP,a=>{a.preventDefault()})),n.style.maxHeight=`${Math.max(10,window.innerHeight-e.getBoundingClientRect().top-35)}px`,t=t.filter(a=>{var l;return((l=i.submenuIds)===null||l===void 0?void 0:l.has(a.id))?(console.warn(`Found submenu cycle: ${a.id}`),!1):!0}),this.push(t,{icon:!0,label:!0,isMenu:!0}),e.appendChild(this.scrollableElement.getDomNode()),this.scrollableElement.scanDomNode(),this.viewItems.filter(a=>!(a instanceof zE)).forEach((a,l,c)=>{a.updatePositionInSet(l+1,c.length)})}initializeStyleSheet(e){lv(e)?(this.styleSheet=Tr(e),this.styleSheet.textContent=g5):(fu.globalStyleSheet||(fu.globalStyleSheet=Tr(),fu.globalStyleSheet.textContent=g5),this.styleSheet=fu.globalStyleSheet)}style(e){const t=this.getContainer(),i=e.foregroundColor?`${e.foregroundColor}`:"",n=e.backgroundColor?`${e.backgroundColor}`:"",s=e.borderColor?`1px solid ${e.borderColor}`:"",o=e.shadowColor?`0 2px 4px ${e.shadowColor}`:"";t.style.border=s,this.domNode.style.color=i,this.domNode.style.backgroundColor=n,t.style.boxShadow=o,this.viewItems&&this.viewItems.forEach(a=>{(a instanceof HE||a instanceof zE)&&a.style(e)})}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.actionsList.children.length;t++){let i=this.actionsList.children[t];if(e===i){this.focusedItem=t;break}}}updateFocus(e){super.updateFocus(e,!0),typeof this.focusedItem!="undefined"&&this.scrollableElement.setScrollPosition({scrollTop:Math.round(this.menuElement.scrollTop)})}doGetActionViewItem(e,t,i){if(e instanceof Ts)return new zE(t.context,e,{icon:!0});if(e instanceof IC){const n=new f5(e,e.actions,i,Object.assign(Object.assign({},t),{submenuIds:new Set([...t.submenuIds||[],e.id])}));if(t.enableMnemonics){const s=n.getMnemonic();if(s&&n.isEnabled()){let o=[];this.mnemonics.has(s)&&(o=this.mnemonics.get(s)),o.push(n),this.mnemonics.set(s,o)}}return n}else{const n={enableMnemonics:t.enableMnemonics,useEventAsContext:t.useEventAsContext};if(t.getKeyBinding){const o=t.getKeyBinding(e);if(o){const a=o.getLabel();a&&(n.keybinding=a)}}const s=new HE(t.context,e,n);if(t.enableMnemonics){const o=s.getMnemonic();if(o&&s.isEnabled()){let a=[];this.mnemonics.has(o)&&(a=this.mnemonics.get(o)),a.push(s),this.mnemonics.set(o,a)}}return s}}}class HE extends nu{constructor(e,t,i={}){i.isMenu=!0;super(t,t,i);if(this.options=i,this.options.icon=i.icon!==void 0?i.icon:!1,this.options.label=i.label!==void 0?i.label:!0,this.cssClass="",this.options.label&&i.enableMnemonics){let n=this.getAction().label;if(n){let s=WE.exec(n);s&&(this.mnemonic=(s[1]?s[1]:s[3]).toLocaleLowerCase())}}this.runOnceToEnableMouseUp=new Bt(()=>{!this.element||(this._register(J(this.element,Ee.MOUSE_UP,n=>{if(St.stop(n,!0),Mn){if(new Gr(n).rightButton)return;this.onClick(n)}else setTimeout(()=>{this.onClick(n)},0)})),this._register(J(this.element,Ee.CONTEXT_MENU,n=>{St.stop(n,!0)})))},100),this._register(this.runOnceToEnableMouseUp)}render(e){super.render(e),!!this.element&&(this.container=e,this.item=X(this.element,oe("a.action-menu-item")),this._action.id===Ts.ID?this.item.setAttribute("role","presentation"):(this.item.setAttribute("role","menuitem"),this.mnemonic&&this.item.setAttribute("aria-keyshortcuts",`${this.mnemonic}`)),this.check=X(this.item,oe("span.menu-item-check"+u5.cssSelector)),this.check.setAttribute("role","none"),this.label=X(this.item,oe("span.action-label")),this.options.label&&this.options.keybinding&&(X(this.item,oe("span.keybinding")).textContent=this.options.keybinding),this.runOnceToEnableMouseUp.schedule(),this.updateClass(),this.updateLabel(),this.updateTooltip(),this.updateEnabled(),this.updateChecked())}blur(){super.blur(),this.applyStyle()}focus(){super.focus(),this.item&&this.item.focus(),this.applyStyle()}updatePositionInSet(e,t){this.item&&(this.item.setAttribute("aria-posinset",`${e}`),this.item.setAttribute("aria-setsize",`${t}`))}updateLabel(){if(!!this.label&&this.options.label){Ui(this.label);let e=h5(this.getAction().label);if(e){const t=pne(e);this.options.enableMnemonics||(e=t),this.label.setAttribute("aria-label",t.replace(/&&/g,"&"));const i=WE.exec(e);if(i){e=zL(e),VE.lastIndex=0;let n=VE.exec(e);for(;n&&n[1];)n=VE.exec(e);const s=o=>o.replace(/&&/g,"&");n?this.label.append($L(s(e.substr(0,n.index))," "),oe("u",{"aria-hidden":"true"},n[3]),r2(s(e.substr(n.index+n[0].length))," ")):this.label.innerText=s(e).trim(),this.item&&this.item.setAttribute("aria-keyshortcuts",(i[1]?i[1]:i[3]).toLocaleLowerCase())}else this.label.innerText=e.replace(/&&/g,"&").trim()}}}updateTooltip(){let e=null;this.getAction().tooltip?e=this.getAction().tooltip:!this.options.label&&this.getAction().label&&this.options.icon&&(e=this.getAction().label,this.options.keybinding&&(e=m({key:"titleLabel",comment:["action title","action keybinding"]},"{0} ({1})",e,this.options.keybinding))),e&&this.item&&(this.item.title=e)}updateClass(){this.cssClass&&this.item&&this.item.classList.remove(...this.cssClass.split(" ")),this.options.icon&&this.label?(this.cssClass=this.getAction().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.getAction().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(){!this.item||(this.getAction().checked?(this.item.classList.add("checked"),this.item.setAttribute("role","menuitemcheckbox"),this.item.setAttribute("aria-checked","true")):(this.item.classList.remove("checked"),this.item.setAttribute("role","menuitem"),this.item.setAttribute("aria-checked","false")))}getMnemonic(){return this.mnemonic}applyStyle(){if(!this.menuStyle)return;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?`thin solid ${this.menuStyle.selectionBorderColor}`:"";this.item&&(this.item.style.color=t?t.toString():"",this.item.style.backgroundColor=i?i.toString():""),this.check&&(this.check.style.color=t?t.toString():""),this.container&&(this.container.style.border=n)}style(e){this.menuStyle=e,this.applyStyle()}}class f5 extends HE{constructor(e,t,i,n){super(e,e,n);this.submenuActions=t,this.parentData=i,this.submenuOptions=n,this.mysubmenu=null,this.submenuDisposables=this._register(new le),this.mouseOver=!1,this.expandDirection=n&&n.expandDirection!==void 0?n.expandDirection:t0.Right,this.showScheduler=new Bt(()=>{this.mouseOver&&(this.cleanupExistingSubmenu(!1),this.createSubmenu(!1))},250),this.hideScheduler=new Bt(()=>{this.element&&!Fo(Rd(),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=X(this.item,oe("span.submenu-indicator"+d5.cssSelector)),this.submenuIndicator.setAttribute("aria-hidden","true")),this._register(J(this.element,Ee.KEY_UP,t=>{let i=new ei(t);(i.equals(17)||i.equals(3))&&(St.stop(t,!0),this.createSubmenu(!0))})),this._register(J(this.element,Ee.KEY_DOWN,t=>{let i=new ei(t);Rd()===this.item&&(i.equals(17)||i.equals(3))&&St.stop(t,!0)})),this._register(J(this.element,Ee.MOUSE_OVER,t=>{this.mouseOver||(this.mouseOver=!0,this.showScheduler.schedule())})),this._register(J(this.element,Ee.MOUSE_LEAVE,t=>{this.mouseOver=!1})),this._register(J(this.element,Ee.FOCUS_OUT,t=>{this.element&&!Fo(Rd(),this.element)&&this.hideScheduler.schedule()})),this._register(this.parentData.parent.onScroll(()=>{this.parentData.parent.focus(!1),this.cleanupExistingSubmenu(!1)})))}updateEnabled(){}onClick(e){St.stop(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{}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=Mf(e.width,t.width,{position:n===t0.Right?0:1,offset:i.left,size:i.width}),s.left>=i.left&&s.left<i.left+i.width&&(i.left+10+t.width<=e.width&&(s.left=i.left+10),i.top+=10,i.height=0),s.top=Mf(e.height,t.height,{position:0,offset:i.top,size:0}),s.top+t.height===i.top&&s.top+i.height+t.height<=e.height&&(s.top+=i.height),s}createSubmenu(e=!0){if(!!this.element)if(this.parentData.submenu)this.parentData.submenu.focus(!1);else{this.updateAriaExpanded("true"),this.submenuContainer=X(this.element,oe("div.monaco-submenu")),this.submenuContainer.classList.add("menubar-menu-items-holder","context-view");const t=getComputedStyle(this.parentData.parent.domNode),i=parseFloat(t.paddingTop||"0")||0;this.submenuContainer.style.zIndex="1",this.submenuContainer.style.position="fixed",this.submenuContainer.style.top="0",this.submenuContainer.style.left="0",this.parentData.submenu=new fu(this.submenuContainer,this.submenuActions.length?this.submenuActions:[new NC],this.submenuOptions),this.menuStyle&&this.parentData.submenu.style(this.menuStyle);const n=this.element.getBoundingClientRect(),s={top:n.top-i,left:n.left,height:n.height+2*i,width:n.width},o=this.submenuContainer.getBoundingClientRect(),{top:a,left:l}=this.calculateSubmenuMenuLayout(new Wt(window.innerWidth,window.innerHeight),Wt.lift(o),s,this.expandDirection);this.submenuContainer.style.left=`${l-o.left}px`,this.submenuContainer.style.top=`${a-o.top}px`,this.submenuDisposables.add(J(this.submenuContainer,Ee.KEY_UP,c=>{new ei(c).equals(15)&&(St.stop(c,!0),this.parentData.parent.focus(),this.cleanupExistingSubmenu(!0))})),this.submenuDisposables.add(J(this.submenuContainer,Ee.KEY_DOWN,c=>{new ei(c).equals(15)&&St.stop(c,!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&&((t=this.item)===null||t===void 0||t.setAttribute("aria-expanded",e))}applyStyle(){if(super.applyStyle(),!this.menuStyle)return;const t=this.element&&this.element.classList.contains("focused")&&this.menuStyle.selectionForegroundColor?this.menuStyle.selectionForegroundColor:this.menuStyle.foregroundColor;this.submenuIndicator&&(this.submenuIndicator.style.color=t?`${t}`:""),this.parentData.submenu&&this.parentData.submenu.style(this.menuStyle)}dispose(){super.dispose(),this.hideScheduler.dispose(),this.mysubmenu&&(this.mysubmenu.dispose(),this.mysubmenu=null),this.submenuContainer&&(this.submenuContainer=void 0)}}class zE extends Tm{style(e){this.label&&(this.label.style.borderBottomColor=e.separatorColor?`${e.separatorColor}`:"")}}function pne(r){const e=WE,t=e.exec(r);if(!t)return r;const i=!t[1];return r.replace(e,i?"$2$3":"").trim()}let g5=` -.monaco-menu { - font-size: 13px; - -} - -${X4(u5)} -${X4(d5)} - -.monaco-menu .monaco-action-bar { - text-align: right; - overflow: hidden; - white-space: nowrap; -} - -.monaco-menu .monaco-action-bar .actions-container { - display: flex; - margin: 0 auto; - padding: 0; - width: 100%; - justify-content: flex-end; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: inline-block; -} - -.monaco-menu .monaco-action-bar.reverse .actions-container { - flex-direction: row-reverse; -} - -.monaco-menu .monaco-action-bar .action-item { - cursor: pointer; - display: inline-block; - transition: transform 50ms ease; - position: relative; /* DO NOT REMOVE - this is the key to preventing the ghosting icon bug in Chrome 42 */ -} - -.monaco-menu .monaco-action-bar .action-item.disabled { - cursor: default; -} - -.monaco-menu .monaco-action-bar.animated .action-item.active { - transform: scale(1.272019649, 1.272019649); /* 1.272019649 = \u221A\u03C6 */ -} - -.monaco-menu .monaco-action-bar .action-item .icon, -.monaco-menu .monaco-action-bar .action-item .codicon { - display: inline-block; -} - -.monaco-menu .monaco-action-bar .action-item .codicon { - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar .action-label { - font-size: 11px; - margin-right: 4px; -} - -.monaco-menu .monaco-action-bar .action-item.disabled .action-label, -.monaco-menu .monaco-action-bar .action-item.disabled .action-label:hover { - opacity: 0.4; -} - -/* Vertical actions */ - -.monaco-menu .monaco-action-bar.vertical { - text-align: left; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - display: block; - border-bottom: 1px solid #bbb; - padding-top: 1px; - margin-left: .8em; - margin-right: .8em; -} - -.monaco-menu .secondary-actions .monaco-action-bar .action-label { - margin-left: 6px; -} - -/* Action Items */ -.monaco-menu .monaco-action-bar .action-item.select-container { - overflow: hidden; /* somehow the dropdown overflows its container, we prevent it here to not push */ - flex: 1; - max-width: 170px; - min-width: 60px; - display: flex; - align-items: center; - justify-content: center; - margin-right: 10px; -} - -.monaco-menu .monaco-action-bar.vertical { - margin-left: 0; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .actions-container { - display: block; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - padding: 0; - transform: none; - display: flex; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.active { - transform: none; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - flex: 1 1 auto; - display: flex; - height: 2em; - align-items: center; - position: relative; -} - -.monaco-menu .monaco-action-bar.vertical .action-label { - flex: 1 1 auto; - text-decoration: none; - padding: 0 1em; - background: none; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .keybinding, -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - display: inline-block; - flex: 2 1 auto; - padding: 0 1em; - text-align: right; - font-size: 12px; - line-height: 1; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon { - font-size: 16px !important; - display: flex; - align-items: center; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator.codicon::before { - margin-left: auto; - margin-right: -20px; -} - -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .keybinding, -.monaco-menu .monaco-action-bar.vertical .action-item.disabled .submenu-indicator { - opacity: 0.4; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator) { - display: inline-block; - box-sizing: border-box; - margin: 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - position: static; - overflow: visible; -} - -.monaco-menu .monaco-action-bar.vertical .action-item .monaco-submenu { - position: absolute; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - padding: 0.5em 0 0 0; - margin-bottom: 0.5em; - width: 100%; - height: 0px !important; - margin-left: .8em !important; - margin-right: .8em !important; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator.text { - padding: 0.7em 1em 0.1em 1em; - font-weight: bold; - opacity: 1; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:hover { - color: inherit; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - position: absolute; - visibility: hidden; - width: 1em; - height: 100%; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item.checked .menu-item-check { - visibility: visible; - display: flex; - align-items: center; - justify-content: center; -} - -/* Context Menu */ - -.context-view.monaco-menu-container { - outline: 0; - border: none; - animation: fadeIn 0.083s linear; - -webkit-app-region: no-drag; -} - -.context-view.monaco-menu-container :focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical:focus, -.context-view.monaco-menu-container .monaco-action-bar.vertical :focus { - outline: 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-item { - border: thin solid transparent; /* prevents jumping behaviour on hover or focus */ -} - - -/* High Contrast Theming */ -:host-context(.hc-black) .context-view.monaco-menu-container { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-menu .monaco-action-bar.vertical .action-item.focused { - background: none; -} - -/* Vertical Action Bar Styles */ - -.monaco-menu .monaco-action-bar.vertical { - padding: .5em 0; -} - -.monaco-menu .monaco-action-bar.vertical .action-menu-item { - height: 1.8em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label:not(.separator), -.monaco-menu .monaco-action-bar.vertical .keybinding { - font-size: inherit; - padding: 0 2em; -} - -.monaco-menu .monaco-action-bar.vertical .menu-item-check { - font-size: inherit; - width: 2em; -} - -.monaco-menu .monaco-action-bar.vertical .action-label.separator { - font-size: inherit; - padding: 0.2em 0 0 0; - margin-bottom: 0.2em; -} - -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .action-label.separator { - margin-left: 0; - margin-right: 0; -} - -.monaco-menu .monaco-action-bar.vertical .submenu-indicator { - font-size: 60%; - padding: 0 1.8em; -} - -:host-context(.linux) .monaco-menu .monaco-action-bar.vertical .submenu-indicator { - height: 100%; - mask-size: 10px 10px; - -webkit-mask-size: 10px 10px; -} - -.monaco-menu .action-item { - cursor: default; -} - -/* Arrows */ -.monaco-scrollable-element > .scrollbar > .scra { - cursor: pointer; - font-size: 11px !important; -} - -.monaco-scrollable-element > .visible { - opacity: 1; - - /* Background rule added for IE9 - to allow clicks on dom node */ - background:rgba(0,0,0,0); - - transition: opacity 100ms linear; -} -.monaco-scrollable-element > .invisible { - opacity: 0; - pointer-events: none; -} -.monaco-scrollable-element > .invisible.fade { - transition: opacity 800ms linear; -} - -/* Scrollable Content Inset Shadow */ -.monaco-scrollable-element > .shadow { - position: absolute; - display: none; -} -.monaco-scrollable-element > .shadow.top { - display: block; - top: 0; - left: 3px; - height: 3px; - width: 100%; - box-shadow: #DDD 0 6px 6px -6px inset; -} -.monaco-scrollable-element > .shadow.left { - display: block; - top: 3px; - left: 0; - height: 100%; - width: 3px; - box-shadow: #DDD 6px 0 6px -6px inset; -} -.monaco-scrollable-element > .shadow.top-left-corner { - display: block; - top: 0; - left: 0; - height: 3px; - width: 3px; -} -.monaco-scrollable-element > .shadow.top.left { - box-shadow: #DDD 6px 6px 6px -6px inset; -} - -/* ---------- Default Style ---------- */ - -:host-context(.vs) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(100, 100, 100, .4); -} -:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(121, 121, 121, .4); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider { - background: rgba(111, 195, 223, .6); -} - -.monaco-scrollable-element > .scrollbar > .slider:hover { - background: rgba(100, 100, 100, .7); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider:hover { - background: rgba(111, 195, 223, .8); -} - -.monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(0, 0, 0, .6); -} -:host-context(.vs-dark) .monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(191, 191, 191, .4); -} -:host-context(.hc-black) .monaco-scrollable-element > .scrollbar > .slider.active { - background: rgba(111, 195, 223, 1); -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.top { - box-shadow: none; -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.left { - box-shadow: #000 6px 0 6px -6px inset; -} - -:host-context(.vs-dark) .monaco-scrollable-element .shadow.top.left { - box-shadow: #000 6px 6px 6px -6px inset; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.top { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.left { - box-shadow: none; -} - -:host-context(.hc-black) .monaco-scrollable-element .shadow.top.left { - box-shadow: none; -} -`;function fo(r,e){const t=Object.create(null);for(let i in e){const n=e[i];n&&(t[i]=Xa(n,r))}return t}function $E(r,e,t){function i(){const n=fo(r.getColorTheme(),e);typeof t=="function"?t(n):t.style(n)}return i(),r.onDidColorThemeChange(i)}function mne(r,e,t){return $E(e,{badgeBackground:(t==null?void 0:t.badgeBackground)||Yp,badgeForeground:(t==null?void 0:t.badgeForeground)||Xp,badgeBorder:_i},r)}function gu(r,e,t){return $E(e,Object.assign(Object.assign({},i0),t||{}),r)}const i0={listFocusBackground:pX,listFocusForeground:mX,listFocusOutline:_X,listActiveSelectionBackground:lc,listActiveSelectionForeground:cc,listActiveSelectionIconForeground:GC,listFocusAndSelectionBackground:lc,listFocusAndSelectionForeground:cc,listInactiveSelectionBackground:bX,listInactiveSelectionIconForeground:CX,listInactiveSelectionForeground:vX,listInactiveFocusBackground:wX,listInactiveFocusOutline:yX,listHoverBackground:SX,listHoverForeground:LX,listDropBackground:xX,listSelectionOutline:En,listHoverOutline:En,listFilterWidgetBackground:kX,listFilterWidgetOutline:DX,listFilterWidgetNoMatchesOutline:EX,listMatchesShadow:sc,treeIndentGuidesStroke:IX,tableColumnsBorder:NX},_ne={shadowColor:sc,borderColor:TX,foregroundColor:AX,backgroundColor:RX,selectionForegroundColor:MX,selectionBackgroundColor:PX,selectionBorderColor:OX,separatorColor:FX};function bne(r,e,t){return $E(e,Object.assign(Object.assign({},_ne),t),r)}class vne{constructor(e,t,i,n,s){this.contextViewService=e,this.telemetryService=t,this.notificationService=i,this.keybindingService=n,this.themeService=s,this.focusToReturn=null,this.block=null,this.options={blockMouse:!0}}configure(e){this.options=e}showContextMenu(e){const t=e.getActions();if(!t.length)return;this.focusToReturn=document.activeElement;let i,n=QM(e.domForShadowRoot)?e.domForShadowRoot:void 0;this.contextViewService.showContextView({getAnchor:()=>e.getAnchor(),canRelayout:!1,anchorAlignment:e.anchorAlignment,anchorAxisAlignment:e.anchorAxisAlignment,render:s=>{let o=e.getMenuClassName?e.getMenuClassName():"";o&&(s.className+=" "+o),this.options.blockMouse&&(this.block=s.appendChild(oe(".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",J(this.block,Ee.MOUSE_DOWN,c=>c.stopPropagation()));const a=new le,l=e.actionRunner||new sf;return l.onBeforeRun(this.onActionRun,this,a),l.onDidRun(this.onDidActionRun,this,a),i=new fu(s,t,{actionViewItemProvider:e.getActionViewItem,context:e.getActionsContext?e.getActionsContext():null,actionRunner:l,getKeyBinding:e.getKeyBinding?e.getKeyBinding:c=>this.keybindingService.lookupKeybinding(c.id)}),a.add(bne(i,this.themeService)),i.onDidCancel(()=>this.contextViewService.hideContextView(!0),null,a),i.onDidBlur(()=>this.contextViewService.hideContextView(!0),null,a),a.add(J(window,Ee.BLUR,()=>this.contextViewService.hideContextView(!0))),a.add(J(window,Ee.MOUSE_DOWN,c=>{if(c.defaultPrevented)return;let h=new Gr(c),u=h.target;if(!h.rightButton){for(;u;){if(u===s)return;u=u.parentElement}this.contextViewService.hideContextView(!0)}})),Fl(a,i)},focus:()=>{i&&i.focus(!!e.autoSelectFirstItem)},onHide:s=>{e.onHide&&e.onHide(!!s),this.block&&(this.block.remove(),this.block=null),this.focusToReturn&&this.focusToReturn.focus()}},n,!!n)}onActionRun(e){this.telemetryService.publicLog2("workbenchActionExecuted",{id:e.action.id,from:"contextMenu"}),this.contextViewService.hideContextView(!1),this.focusToReturn&&this.focusToReturn.focus()}onDidActionRun(e){e.error&&!Ro(e.error)&&this.notificationService.error(e.error)}}var Cne=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Vm=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let UE=class extends Y{constructor(e,t,i,n,s){super();this.contextMenuHandler=new vne(i,e,t,n,s)}configure(e){this.contextMenuHandler.configure(e)}showContextMenu(e){this.contextMenuHandler.showContextMenu(e),bh.getInstance().resetKeyStatus()}};UE=Cne([Vm(0,ec),Vm(1,Di),Vm(2,mc),Vm(3,Qt),Vm(4,qt)],UE);const n0=bt("layoutService");var wne=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},yne=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let jE=class extends Y{constructor(e){super();this.layoutService=e,this.currentViewDisposable=Y.None,this.container=e.container,this.contextView=this._register(new Pf(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.container=t,this.setContainer(t,i?3:2)):this.container!==this.layoutService.container&&(this.container=this.layoutService.container,this.setContainer(this.container,1)),this.contextView.show(e);const n=Xe(()=>{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)}};jE=wne([yne(0,n0)],jE);const Hm=bt("dialogService");class Sne{constructor(e){this.incoming=new Map,this.outgoing=new Map,this.data=e}}class Lne{constructor(e){this._hashFn=e,this._nodes=new Map}roots(){const e=[];for(let t of this._nodes.values())t.outgoing.size===0&&e.push(t);return e}insertEdge(e,t){const i=this.lookupOrInsertNode(e),n=this.lookupOrInsertNode(t);i.outgoing.set(this._hashFn(t),n),n.incoming.set(this._hashFn(e),i)}removeNode(e){const t=this._hashFn(e);this._nodes.delete(t);for(let 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 Sne(e),this._nodes.set(t,i)),i}isEmpty(){return this._nodes.size===0}toString(){let e=[];for(let[t,i]of this._nodes)e.push(`${t}, (incoming)[${[...i.incoming.keys()].join(", ")}], (outgoing)[${[...i.outgoing.keys()].join(",")}]`);return e.join(` -`)}findCycleSlow(){for(let[e,t]of this._nodes){const i=new Set([e]),n=this._findCycle(t,i);if(n)return n}}_findCycle(e,t){for(let[i,n]of e.outgoing){if(t.has(i))return[...t,i].join(" -> ");t.add(i);const s=this._findCycle(n,t);if(s)return s;t.delete(i)}}}class p5 extends Error{constructor(e){var t;super("cyclic dependency between services");this.message=(t=e.findCycleSlow())!==null&&t!==void 0?t:`UNABLE to detect cycle, dumping graph: -${e.toString()}`}}class r0{constructor(e=new xm,t=!1,i){this._activeInstantiations=new Set,this._services=e,this._strict=t,this._parent=i,this._services.set(ut,this)}createChild(e){return new r0(e,this._strict,this)}invokeFunction(e,...t){let i=Ps.traceInvocation(e),n=!1;try{return e({get:(o,a)=>{if(n)throw TU("service accessor is only valid during the invocation of its target method");const l=this._getOrCreateServiceInstance(o,i);if(!l&&a!==rj)throw new Error(`[invokeFunction] unknown service '${o}'`);return l}},...t)}finally{n=!0,i.stop()}}createInstance(e,...t){let i,n;return e instanceof gc?(i=Ps.traceCreation(e.ctor),n=this._createInstance(e.ctor,e.staticArguments.concat(t),i)):(i=Ps.traceCreation(e),n=this._createInstance(e,t,i)),i.stop(),n}_createInstance(e,t=[],i){let n=Gs.getServiceDependencies(e).sort((a,l)=>a.index-l.index),s=[];for(const a of n){let l=this._getOrCreateServiceInstance(a.id,i);if(!l&&this._strict&&!a.optional)throw new Error(`[createInstance] ${e.name} depends on UNKNOWN service ${a.id}.`);s.push(l)}let o=n.length>0?n[0].index:t.length;if(t.length!==o){console.warn(`[createInstance] First service dependency of ${e.name} at position ${o+1} conflicts with ${t.length} static arguments`);let a=o-t.length;a>0?t=t.concat(new Array(a)):t=t.slice(0,o)}return new e(...[...t,...s])}_setServiceInstance(e,t){if(this._services.get(e)instanceof gc)this._services.set(e,t);else if(this._parent)this._parent._setServiceInstance(e,t);else throw new Error("illegalState - setting UNKNOWN service instance")}_getServiceInstanceOrDescriptor(e){let t=this._services.get(e);return!t&&this._parent?this._parent._getServiceInstanceOrDescriptor(e):t}_getOrCreateServiceInstance(e,t){let i=this._getServiceInstanceOrDescriptor(e);return i instanceof gc?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){const n=new Lne(a=>a.id.toString());let s=0;const o=[{id:e,desc:t,_trace:i}];for(;o.length;){const a=o.pop();if(n.lookupOrInsertNode(a),s++>1e3)throw new p5(n);for(let l of Gs.getServiceDependencies(a.desc.ctor)){let c=this._getServiceInstanceOrDescriptor(l.id);if(!c&&!l.optional&&console.warn(`[createInstance] ${e} depends on ${l.id} which is NOT registered.`),c instanceof gc){const h={id:l.id,desc:c,_trace:a._trace.branch(l.id,!0)};n.insertEdge(a,h),o.push(h)}}}for(;;){const a=n.roots();if(a.length===0){if(!n.isEmpty())throw new p5(n);break}for(const{data:l}of a){if(this._getServiceInstanceOrDescriptor(l.id)instanceof gc){const h=this._createServiceInstanceWithOwner(l.id,l.desc.ctor,l.desc.staticArguments,l.desc.supportsDelayedInstantiation,l._trace);this._setServiceInstance(l.id,h)}n.removeNode(l)}}return this._getServiceInstanceOrDescriptor(e)}_createServiceInstanceWithOwner(e,t,i=[],n,s){if(this._services.get(e)instanceof gc)return this._createServiceInstance(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){if(i){const s=new Ad(()=>this._createInstance(e,t,n));return new Proxy(Object.create(null),{get(o,a){if(a in o)return o[a];let l=s.value,c=l[a];return typeof c!="function"||(c=c.bind(l),o[a]=c),c},set(o,a,l){return s.value[a]=l,!0}})}else return this._createInstance(e,t,n)}}class Ps{constructor(e,t){this.type=e,this.name=t,this._start=Date.now(),this._dep=[]}static traceInvocation(e){return Ps._None}static traceCreation(e){return Ps._None}branch(e,t){let i=new Ps(2,e.toString());return this._dep.push([e,t,i]),i}stop(){let e=Date.now()-this._start;Ps._totals+=e;let t=!1;function i(s,o){let a=[],l=new Array(s+1).join(" ");for(const[c,h,u]of o._dep)if(h&&u){t=!0,a.push(`${l}CREATES -> ${c}`);let d=i(s+1,u);d&&a.push(d)}else a.push(`${l}uses -> ${c}`);return a.join(` -`)}let n=[`${this.type===0?"CREATE":"CALL"} ${this.name}`,`${i(1,this)}`,`DONE, took ${e.toFixed(2)}ms (grand total ${Ps._totals.toFixed(2)}ms)`];(e>2||t)&&console.log(n.join(` -`))}}Ps._None=new class extends Ps{constructor(){super(-1,null)}stop(){}branch(){return this}};Ps._totals=0;const zm=bt("labelService");class xne{constructor(e){this.spliceables=e}splice(e,t,i){this.spliceables.forEach(n=>n.splice(e,t,i))}}class pu extends Error{constructor(e,t){super(`ListError [${e}] ${t}`)}}function m5(r,e){const t=[];for(let i of e){if(r.start>=i.range.end)continue;if(r.end<i.range.start)break;const n=vn.intersect(r,i.range);vn.isEmpty(n)||t.push({range:n,size:i.size})}return t}function KE({start:r,end:e},t){return{start:r+t,end:e+t}}function kne(r){const e=[];let t=null;for(let i of r){const n=i.range.start,s=i.range.end,o=i.size;if(t&&o===t.size){t.range.end=s;continue}t={range:{start:n,end:s},size:o},e.push(t)}return e}function Dne(...r){return kne(r.reduce((e,t)=>e.concat(t),[]))}class _5{constructor(){this.groups=[],this._size=0}splice(e,t,i=[]){const n=i.length-t,s=m5({start:0,end:e},this.groups),o=m5({start:e+t,end:Number.POSITIVE_INFINITY},this.groups).map(l=>({range:KE(l.range,n),size:l.size})),a=i.map((l,c)=>({range:{start:e+c,end:e+c+1},size:l.size}));this.groups=Dne(s,a,o),this._size=this.groups.reduce((l,c)=>l+c.size*(c.range.end-c.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;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s*n.size;if(e<o)return t+Math.floor((e-i)/n.size);t+=s,i=o}return t}indexAfter(e){return Math.min(this.indexAt(e)+1,this.count)}positionAt(e){if(e<0)return-1;let t=0,i=0;for(let n of this.groups){const s=n.range.end-n.range.start,o=i+s;if(e<o)return t+(e-i)*n.size;t+=s*n.size,i=o}return-1}}function Ene(r){try{r.parentElement&&r.parentElement.removeChild(r)}catch{}}class Ine{constructor(e){this.renderers=e,this.cache=new Map}alloc(e){let t=this.getTemplateCache(e).pop();if(!t){const i=oe(".monaco-list-row"),s=this.getRenderer(e).renderTemplate(i);t={domNode:i,templateId:e,templateData:s}}return t}release(e){!e||this.releaseRow(e)}releaseRow(e){const{domNode:t,templateId:i}=e;t&&(t.classList.remove("scrolling"),Ene(t)),this.getTemplateCache(i).push(e)}getTemplateCache(e){let t=this.cache.get(e);return t||(t=[],this.cache.set(e,t)),t}dispose(){this.cache.forEach((e,t)=>{for(const i of e)this.getRenderer(t).disposeTemplate(i.templateData),i.templateData=null}),this.cache.clear()}getRenderer(e){const t=this.renderers.get(e);if(!t)throw new Error(`No renderer found for ${e}`);return t}}var mu=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};const ta={useShadows:!0,verticalScrollMode:1,setRowLineHeight:!0,setRowHeight:!0,supportDynamicHeights:!1,dnd:{getDragElements(r){return[r]},getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}},horizontalScrolling:!1,transformOptimization:!0,alwaysConsumeMouseWheel:!0};class $m{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Nne{constructor(e){this.elements=e}update(){}getData(){return this.elements}}class Tne{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;t<e.files.length;t++){const i=e.files.item(t);i&&(i.size||i.type)&&this.files.push(i)}}}getData(){return{types:this.types,files:this.files}}}function Ane(r,e){return Array.isArray(r)&&Array.isArray(e)?Is(r,e):r===e}class Rne{constructor(e){(e==null?void 0:e.getSetSize)?this.getSetSize=e.getSetSize.bind(e):this.getSetSize=(t,i,n)=>n,(e==null?void 0:e.getPosInSet)?this.getPosInSet=e.getPosInSet.bind(e):this.getPosInSet=(t,i)=>i+1,(e==null?void 0:e.getRole)?this.getRole=e.getRole.bind(e):this.getRole=t=>"listitem",(e==null?void 0:e.isChecked)?this.isChecked=e.isChecked.bind(e):this.isChecked=t=>{}}}class go{constructor(e,t,i,n=ta){if(this.virtualDelegate=t,this.domId=`list_id_${++go.InstanceCount}`,this.renderers=new Map,this.renderWidth=0,this._scrollHeight=0,this.scrollableElementUpdateDisposable=null,this.scrollableElementWidthDelayer=new Ta(50),this.splicing=!1,this.dragOverAnimationStopDisposable=Y.None,this.dragOverMouseY=0,this.canDrop=!1,this.currentDragFeedbackDisposable=Y.None,this.onDragLeaveTimeout=Y.None,this.disposables=new le,this._onDidChangeContentHeight=new H,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 _5;for(const o of i)this.renderers.set(o.templateId,o);this.cache=this.disposables.add(new Ine(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",typeof n.mouseSupport=="boolean"?n.mouseSupport:!0),this._horizontalScrolling=Vo(n,o=>o.horizontalScrolling,ta.horizontalScrolling),this.domNode.classList.toggle("horizontal-scrolling",this._horizontalScrolling),this.additionalScrollHeight=typeof n.additionalScrollHeight=="undefined"?0:n.additionalScrollHeight,this.accessibilityProvider=new Rne(n.accessibilityProvider),this.rowsContainer=document.createElement("div"),this.rowsContainer.className="monaco-list-rows",Vo(n,o=>o.transformOptimization,ta.transformOptimization)&&(this.rowsContainer.style.transform="translate3d(0px, 0px, 0px)"),this.disposables.add(Et.addTarget(this.rowsContainer)),this.scrollable=new ww(Vo(n,o=>o.smoothScrolling,!1)?125:0,o=>Oo(o)),this.scrollableElement=this.disposables.add(new FD(this.rowsContainer,{alwaysConsumeMouseWheel:Vo(n,o=>o.alwaysConsumeMouseWheel,ta.alwaysConsumeMouseWheel),horizontal:1,vertical:Vo(n,o=>o.verticalScrollMode,ta.verticalScrollMode),useShadows:Vo(n,o=>o.useShadows,ta.useShadows),mouseWheelScrollSensitivity:n.mouseWheelScrollSensitivity,fastScrollSensitivity:n.fastScrollSensitivity},this.scrollable)),this.domNode.appendChild(this.scrollableElement.getDomNode()),e.appendChild(this.domNode),this.scrollableElement.onScroll(this.onScroll,this,this.disposables),this.disposables.add(J(this.rowsContainer,Vt.Change,o=>this.onTouchChange(o))),this.disposables.add(J(this.scrollableElement.getDomNode(),"scroll",o=>o.target.scrollTop=0)),this.disposables.add(J(this.domNode,"dragover",o=>this.onDragOver(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"drop",o=>this.onDrop(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"dragleave",o=>this.onDragLeave(this.toDragEvent(o)))),this.disposables.add(J(this.domNode,"dragend",o=>this.onDragEnd(o))),this.setRowLineHeight=Vo(n,o=>o.setRowLineHeight,ta.setRowLineHeight),this.setRowHeight=Vo(n,o=>o.setRowHeight,ta.setRowHeight),this.supportDynamicHeights=Vo(n,o=>o.supportDynamicHeights,ta.supportDynamicHeights),this.dnd=Vo(n,o=>o.dnd,ta.dnd),this.layout()}get contentHeight(){return this.rangeMap.size}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 t of this.items)this.measureItemWidth(t);this.updateScrollWidth(),this.scrollableElement.setScrollDimensions({width:BL(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=""}}updateOptions(e){e.additionalScrollHeight!==void 0&&(this.additionalScrollHeight=e.additionalScrollHeight,this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight})),e.smoothScrolling!==void 0&&this.scrollable.setSmoothScrollDuration(e.smoothScrolling?125:0),e.horizontalScrolling!==void 0&&(this.horizontalScrolling=e.horizontalScrolling),e.mouseWheelScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({mouseWheelScrollSensitivity:e.mouseWheelScrollSensitivity}),e.fastScrollSensitivity!==void 0&&this.scrollableElement.updateOptions({fastScrollSensitivity:e.fastScrollSensitivity})}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=vn.intersect(n,s),a=new Map;for(let S=o.start;S<o.end;S++){const w=this.items[S];if(w.dragStartDisposable.dispose(),w.row){let L=a.get(w.templateId);L||(L=[],a.set(w.templateId,L));const N=this.renderers.get(w.templateId);N&&N.disposeElement&&N.disposeElement(w.element,S,w.row.templateData,w.size),L.push(w.row)}w.row=null}const l={start:e+t,end:this.items.length},c=vn.intersect(l,n),h=vn.relativeComplement(l,n),u=i.map(S=>({id:String(this.itemId++),element:S,templateId:this.virtualDelegate.getTemplateId(S),size:this.virtualDelegate.getHeight(S),width:void 0,hasDynamicHeight:!!this.virtualDelegate.hasDynamicHeight&&this.virtualDelegate.hasDynamicHeight(S),lastDynamicHeightWidth:void 0,row:null,uri:void 0,dropTarget:!1,dragStartDisposable:Y.None}));let d;e===0&&t>=this.items.length?(this.rangeMap=new _5,this.rangeMap.splice(0,0,u),d=this.items,this.items=u):(this.rangeMap.splice(e,t,u),d=this.items.splice(e,t,...u));const f=i.length-t,g=this.getRenderRange(this.lastRenderTop,this.lastRenderHeight),p=KE(c,f),_=vn.intersect(g,p);for(let S=_.start;S<_.end;S++)this.updateItemInDOM(this.items[S],S);const v=vn.relativeComplement(p,g);for(const S of v)for(let w=S.start;w<S.end;w++)this.removeItemFromDOM(w);const b=h.map(S=>KE(S,f)),y=[{start:e,end:e+i.length},...b].map(S=>vn.intersect(g,S)),x=this.getNextToLastElement(y);for(const S of y)for(let w=S.start;w<S.end;w++){const L=this.items[w],N=a.get(L.templateId),P=N==null?void 0:N.pop();this.insertItemInDOM(w,x,P)}for(const S of a.values())for(const w of S)this.cache.release(w);return this.eventuallyUpdateScrollDimensions(),this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight),d.map(S=>S.element)}eventuallyUpdateScrollDimensions(){this._scrollHeight=this.contentHeight,this.rowsContainer.style.height=`${this._scrollHeight}px`,this.scrollableElementUpdateDisposable||(this.scrollableElementUpdateDisposable=Oo(()=>{this.scrollableElement.setScrollDimensions({scrollHeight:this.scrollHeight}),this.updateScrollWidth(),this.scrollableElementUpdateDisposable=null}))}eventuallyUpdateScrollWidth(){if(!this.horizontalScrolling){this.scrollableElementWidthDelayer.cancel();return}this.scrollableElementWidthDelayer.trigger(()=>this.updateScrollWidth())}updateScrollWidth(){if(!this.horizontalScrolling)return;let e=0;for(const t of this.items)typeof t.width!="undefined"&&(e=Math.max(e,t.width));this.scrollWidth=e,this.scrollableElement.setScrollDimensions({scrollWidth:e===0?0:e+10})}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}element(e){return this.items[e].element}domElement(e){const t=this.items[e].row;return t&&t.domNode}elementHeight(e){return this.items[e].size}elementTop(e){return this.rangeMap.positionAt(e)}indexAt(e){return this.rangeMap.indexAt(e)}indexAfter(e){return this.rangeMap.indexAfter(e)}layout(e,t){let i={height:typeof e=="number"?e:Ej(this.domNode)};this.scrollableElementUpdateDisposable&&(this.scrollableElementUpdateDisposable.dispose(),this.scrollableElementUpdateDisposable=null,i.scrollHeight=this.scrollHeight),this.scrollableElement.setScrollDimensions(i),typeof t!="undefined"&&(this.renderWidth=t,this.supportDynamicHeights&&this._rerender(this.scrollTop,this.renderHeight)),this.horizontalScrolling&&this.scrollableElement.setScrollDimensions({width:typeof t=="number"?t:BL(this.domNode)})}render(e,t,i,n,s,o=!1){const a=this.getRenderRange(t,i),l=vn.relativeComplement(a,e),c=vn.relativeComplement(e,a),h=this.getNextToLastElement(l);if(o){const u=vn.intersect(e,a);for(let d=u.start;d<u.end;d++)this.updateItemInDOM(this.items[d],d)}for(const u of l)for(let d=u.start;d<u.end;d++)this.insertItemInDOM(d,h);for(const u of c)for(let d=u.start;d<u.end;d++)this.removeItemFromDOM(d);n!==void 0&&(this.rowsContainer.style.left=`-${n}px`),this.rowsContainer.style.top=`-${t}px`,this.horizontalScrolling&&s!==void 0&&(this.rowsContainer.style.width=`${Math.max(s,this.renderWidth)}px`),this.lastRenderTop=t,this.lastRenderHeight=i}insertItemInDOM(e,t,i){const n=this.items[e];n.row||(n.row=i!=null?i:this.cache.alloc(n.templateId));const s=this.accessibilityProvider.getRole(n.element)||"listitem";n.row.domNode.setAttribute("role",s);const o=this.accessibilityProvider.isChecked(n.element);typeof o!="undefined"&&n.row.domNode.setAttribute("aria-checked",String(!!o)),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}`);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=J(n.row.domNode,"dragstart",c=>this.onDragStart(n.element,l,c))),this.horizontalScrolling&&(this.measureItemWidth(n),this.eventuallyUpdateScrollWidth())}measureItemWidth(e){if(!e.row||!e.row.domNode)return;e.row.domNode.style.width=Mn?"-moz-fit-content":"fit-content",e.width=BL(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.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.additionalScrollHeight}get onMouseClick(){return ke.map(this.disposables.add(new Ft(this.domNode,"click")).event,e=>this.toMouseEvent(e))}get onMouseDblClick(){return ke.map(this.disposables.add(new Ft(this.domNode,"dblclick")).event,e=>this.toMouseEvent(e))}get onMouseMiddleClick(){return ke.filter(ke.map(this.disposables.add(new Ft(this.domNode,"auxclick")).event,e=>this.toMouseEvent(e)),e=>e.browserEvent.button===1)}get onMouseDown(){return ke.map(this.disposables.add(new Ft(this.domNode,"mousedown")).event,e=>this.toMouseEvent(e))}get onContextMenu(){return ke.any(ke.map(this.disposables.add(new Ft(this.domNode,"contextmenu")).event,e=>this.toMouseEvent(e)),ke.map(this.disposables.add(new Ft(this.domNode,Vt.Contextmenu)).event,e=>this.toGestureEvent(e)))}get onTouchStart(){return ke.map(this.disposables.add(new Ft(this.domNode,"touchstart")).event,e=>this.toTouchEvent(e))}get onTap(){return ke.map(this.disposables.add(new Ft(this.rowsContainer,Vt.Tap)).event,e=>this.toGestureEvent(e))}toMouseEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toTouchEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toGestureEvent(e){const t=this.getItemIndexFromEventTarget(e.initialTarget||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}toDragEvent(e){const t=this.getItemIndexFromEventTarget(e.target||null),i=typeof t=="undefined"?void 0:this.items[t],n=i&&i.element;return{browserEvent:e,index:t,element:n}}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){if(!i.dataTransfer)return;const n=this.dnd.getDragElements(e);if(i.dataTransfer.effectAllowed="copyMove",i.dataTransfer.setData(w4.TEXT,t),i.dataTransfer.setDragImage){let s;this.dnd.getDragLabel&&(s=this.dnd.getDragLabel(n,i)),typeof s=="undefined"&&(s=String(n.length));const o=oe(".monaco-drag-image");o.textContent=s,document.body.appendChild(o),i.dataTransfer.setDragImage(o,-10,-10),setTimeout(()=>document.body.removeChild(o),0)}this.currentDragData=new $m(n),tl.CurrentDragAndDropData=new Nne(n),this.dnd.onDragStart&&this.dnd.onDragStart(this.currentDragData,i)}onDragOver(e){if(e.browserEvent.preventDefault(),this.onDragLeaveTimeout.dispose(),tl.CurrentDragAndDropData&&tl.CurrentDragAndDropData.getData()==="vscode-ui"||(this.setupDragAndDropScrollTopAnimation(e.browserEvent),!e.browserEvent.dataTransfer))return!1;if(!this.currentDragData)if(tl.CurrentDragAndDropData)this.currentDragData=tl.CurrentDragAndDropData;else{if(!e.browserEvent.dataTransfer.types)return!1;this.currentDragData=new Tne}const t=this.dnd.onDragOver(this.currentDragData,e.element,e.index,e.browserEvent);if(this.canDrop=typeof t=="boolean"?t:t.accept,!this.canDrop)return this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),!1;e.browserEvent.dataTransfer.dropEffect=typeof t!="boolean"&&t.effect===0?"copy":"move";let i;if(typeof t!="boolean"&&t.feedback?i=t.feedback:typeof e.index=="undefined"?i=[-1]:i=[e.index],i=cP(i).filter(n=>n>=-1&&n<this.length).sort((n,s)=>n-s),i=i[0]===-1?[-1]:i,Ane(this.currentDragFeedback,i))return!0;if(this.currentDragFeedback=i,this.currentDragFeedbackDisposable.dispose(),i[0]===-1)this.domNode.classList.add("drop-target"),this.rowsContainer.classList.add("drop-target"),this.currentDragFeedbackDisposable=Xe(()=>{this.domNode.classList.remove("drop-target"),this.rowsContainer.classList.remove("drop-target")});else{for(const n of i){const s=this.items[n];s.dropTarget=!0,s.row&&s.row.domNode.classList.add("drop-target")}this.currentDragFeedbackDisposable=Xe(()=>{for(const n of i){const s=this.items[n];s.dropTarget=!1,s.row&&s.row.domNode.classList.remove("drop-target")}})}return!0}onDragLeave(e){var t,i;this.onDragLeaveTimeout.dispose(),this.onDragLeaveTimeout=mh(()=>this.clearDragOverFeedback(),100),this.currentDragData&&((i=(t=this.dnd).onDragLeave)===null||i===void 0||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.currentDragData=void 0,tl.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){this.canDrop=!1,this.teardownDragAndDropScrollTopAnimation(),this.clearDragOverFeedback(),this.currentDragData=void 0,tl.CurrentDragAndDropData=void 0,this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}clearDragOverFeedback(){this.currentDragFeedback=void 0,this.currentDragFeedbackDisposable.dispose(),this.currentDragFeedbackDisposable=Y.None}setupDragAndDropScrollTopAnimation(e){if(!this.dragOverAnimationDisposable){const t=qM(this.domNode).top;this.dragOverAnimationDisposable=Oj(this.animateDragAndDropScrollTop.bind(this,t))}this.dragOverAnimationStopDisposable.dispose(),this.dragOverAnimationStopDisposable=mh(()=>{this.dragOverAnimationDisposable&&(this.dragOverAnimationDisposable.dispose(),this.dragOverAnimationDisposable=void 0)},1e3),this.dragOverMouseY=e.pageY}animateDragAndDropScrollTop(e){if(this.dragOverMouseY===void 0)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 n=i.getAttribute("data-index");if(n){const s=Number(n);if(!isNaN(s))return s}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 a=0;for(;;){const l=this.getRenderRange(e,t);let c=!1;for(let h=l.start;h<l.end;h++){const u=this.probeDynamicHeight(h);u!==0&&this.rangeMap.splice(h,1,[this.items[h]]),a+=u,c=c||u!==0}if(!c){a!==0&&this.eventuallyUpdateScrollDimensions();const h=vn.relativeComplement(n,l);for(const d of h)for(let f=d.start;f<d.end;f++)this.items[f].row&&this.removeItemFromDOM(f);const u=vn.relativeComplement(l,n);for(const d of u)for(let f=d.start;f<d.end;f++){const g=f+1,p=g<this.items.length?this.items[g].row:null,_=p?p.domNode:null;this.insertItemInDOM(f,_)}for(let d=l.start;d<l.end;d++)this.items[d].row&&this.updateItemInDOM(this.items[d],d);if(typeof s=="number"){const d=this.scrollable.getFutureScrollPosition().scrollTop-e,f=this.elementTop(s)-o+d;this.setScrollTop(f,i)}this._onDidChangeContentHeight.fire(this.contentHeight);return}}}probeDynamicHeight(e){const t=this.items[e];if(this.virtualDelegate.getDynamicHeight){const o=this.virtualDelegate.getDynamicHeight(t.element);if(o!==null){const a=t.size;return t.size=o,t.lastDynamicHeightWidth=this.renderWidth,o-a}}if(!t.hasDynamicHeight||t.lastDynamicHeightWidth===this.renderWidth||!!this.virtualDelegate.hasDynamicHeight&&!this.virtualDelegate.hasDynamicHeight(t.element))return 0;const i=t.size;if(!this.setRowHeight&&t.row){let o=t.row.domNode.offsetHeight;return t.size=o,t.lastDynamicHeightWidth=this.renderWidth,o-i}const n=this.cache.alloc(t.templateId);n.domNode.style.height="",this.rowsContainer.appendChild(n.domNode);const s=this.renderers.get(t.templateId);return s&&(s.renderElement(t.element,e,n.templateData,void 0),s.disposeElement&&s.disposeElement(t.element,e,n.templateData,void 0)),t.size=n.domNode.offsetHeight,this.virtualDelegate.setDynamicHeight&&this.virtualDelegate.setDynamicHeight(t.element,t.size),t.lastDynamicHeightWidth=this.renderWidth,this.rowsContainer.removeChild(n.domNode),this.cache.release(n),t.size-i}getNextToLastElement(e){const t=e[e.length-1];if(!t)return null;const i=this.items[t.end];return!i||!i.row?null:i.row.domNode}getElementDomId(e){return`${this.domId}_${e}`}dispose(){if(this.items){for(const e of this.items)if(e.row){const t=this.renderers.get(e.row.templateId);t&&(t.disposeElement&&t.disposeElement(e.element,-1,e.row.templateData,void 0),t.disposeTemplate(e.row.templateData))}this.items=[]}this.domNode&&this.domNode.parentNode&&this.domNode.parentNode.removeChild(this.domNode),ht(this.disposables)}}go.InstanceCount=0;mu([Ei],go.prototype,"onMouseClick",null);mu([Ei],go.prototype,"onMouseDblClick",null);mu([Ei],go.prototype,"onMouseMiddleClick",null);mu([Ei],go.prototype,"onMouseDown",null);mu([Ei],go.prototype,"onContextMenu",null);mu([Ei],go.prototype,"onTouchStart",null);mu([Ei],go.prototype,"onTap",null);var _u=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},b5=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Mne{constructor(e){this.trait=e,this.renderedElements=[]}get templateId(){return`template:${this.trait.trait}`}renderTemplate(e){return e}renderElement(e,t,i){const n=this.renderedElements.findIndex(s=>s.templateData===i);if(n>=0){const s=this.renderedElements[n];this.trait.unrender(i),s.index=t}else{const s={index:t,templateData:i};this.renderedElements.push(s)}this.trait.renderIndex(t,i)}splice(e,t,i){const n=[];for(const s of this.renderedElements)s.index<e?n.push(s):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(i=>i.templateData===e);t<0||this.renderedElements.splice(t,1)}}class s0{constructor(e){this._trait=e,this.length=0,this.indexes=[],this.sortedIndexes=[],this._onChange=new H,this.onChange=this._onChange.event}get trait(){return this._trait}get renderer(){return new Mne(this)}splice(e,t,i){var n;t=Math.max(0,Math.min(t,this.length-e));const s=i.length-t,o=e+t,a=[...this.sortedIndexes.filter(c=>c<e),...i.map((c,h)=>c?h+e:-1).filter(c=>c!==-1),...this.sortedIndexes.filter(c=>c>=o).map(c=>c+s)],l=this.length+s;if(this.sortedIndexes.length>0&&a.length===0&&l>0){const c=(n=this.sortedIndexes.find(h=>h>=e))!==null&&n!==void 0?n:l-1;a.push(Math.min(c,l-1))}this.renderer.splice(e,t,i.length),this._set(a,a),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(k5),t)}_set(e,t,i){const n=this.indexes,s=this.sortedIndexes;this.indexes=e,this.sortedIndexes=t;const o=GE(s,e);return this.renderer.renderIndexes(o),this._onChange.fire({indexes:e,browserEvent:i}),n}get(){return this.indexes}contains(e){return Bx(this.sortedIndexes,e,k5)>=0}dispose(){ht(this._onChange)}}_u([Ei],s0.prototype,"renderer",null);class Pne extends s0{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 qE{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,i.map(()=>!1));const n=this.trait.get().map(o=>this.identityProvider.getId(this.view.element(o)).toString()),s=i.map(o=>n.indexOf(this.identityProvider.getId(o).toString())>-1);this.trait.splice(e,t,s)}}function Sc(r){return r.tagName==="INPUT"||r.tagName==="TEXTAREA"}function Ff(r){return r.classList.contains("monaco-editor")?!0:r.classList.contains("monaco-list")||!r.parentElement?!1:Ff(r.parentElement)}class v5{constructor(e,t,i){this.list=e,this.view=t,this.disposables=new le,this.multipleSelectionDisposables=new le,this.onKeyDown.filter(n=>n.keyCode===3).on(this.onEnter,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===16).on(this.onUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===18).on(this.onDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===11).on(this.onPageUpArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===12).on(this.onPageDownArrow,this,this.disposables),this.onKeyDown.filter(n=>n.keyCode===9).on(this.onEscape,this,this.disposables),i.multipleSelectionSupport!==!1&&this.onKeyDown.filter(n=>(Je?n.metaKey:n.ctrlKey)&&n.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables)}get onKeyDown(){return ke.chain(this.disposables.add(new Ft(this.view.domNode,"keydown")).event).filter(e=>!Sc(e.target)).map(e=>new ei(e))}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionDisposables.clear(),e.multipleSelectionSupport&&this.onKeyDown.filter(t=>(Je?t.metaKey:t.ctrlKey)&&t.keyCode===31).on(this.onCtrlA,this,this.multipleSelectionDisposables))}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(Fn(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()}}_u([Ei],v5.prototype,"onKeyDown",null);var Bf;(function(r){r[r.Idle=0]="Idle",r[r.Typing=1]="Typing"})(Bf||(Bf={}));const C5=new class{mightProducePrintableCharacter(r){return r.ctrlKey||r.metaKey||r.altKey?!1:r.keyCode>=31&&r.keyCode<=56||r.keyCode>=21&&r.keyCode<=30||r.keyCode>=93&&r.keyCode<=102||r.keyCode>=80&&r.keyCode<=90}};class One{constructor(e,t,i,n){this.list=e,this.view=t,this.keyboardNavigationLabelProvider=i,this.delegate=n,this.enabled=!1,this.state=Bf.Idle,this.automaticKeyboardNavigation=!0,this.triggered=!1,this.previouslyFocused=-1,this.enabledDisposables=new le,this.disposables=new le,this.updateOptions(e.options)}updateOptions(e){(typeof e.enableKeyboardNavigation=="undefined"?!0:!!e.enableKeyboardNavigation)?this.enable():this.disable(),typeof e.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation)}enable(){if(this.enabled)return;const e=ke.chain(this.enabledDisposables.add(new Ft(this.view.domNode,"keydown")).event).filter(n=>!Sc(n.target)).filter(()=>this.automaticKeyboardNavigation||this.triggered).map(n=>new ei(n)).filter(n=>this.delegate.mightProducePrintableCharacter(n)).forEach(n=>{n.stopPropagation(),n.preventDefault()}).map(n=>n.browserEvent.key).event,t=ke.debounce(e,()=>null,800);ke.reduce(ke.any(e,t),(n,s)=>s===null?null:(n||"")+s)(this.onInput,this,this.enabledDisposables),t(this.onClear,this,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=(e=this.list.options.accessibilityProvider)===null||e===void 0?void 0:e.getAriaLabel(this.list.element(t[0]));i&&Ji(i)}this.previouslyFocused=-1}onInput(e){if(!e){this.state=Bf.Idle,this.triggered=!1;return}const t=this.list.getFocus(),i=t.length>0?t[0]:0,n=this.state===Bf.Idle?1:0;this.state=Bf.Typing;for(let s=0;s<this.list.length;s++){const o=(i+s+n)%this.list.length,a=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(this.view.element(o)),l=a&&a.toString();if(typeof l=="undefined"||Kw(e,l)){this.previouslyFocused=i,this.list.setFocus([o]),this.list.reveal(o);return}}}dispose(){this.disable(),this.enabledDisposables.dispose(),this.disposables.dispose()}}class Fne{constructor(e,t){this.list=e,this.view=t,this.disposables=new le,ke.chain(this.disposables.add(new Ft(t.domNode,"keydown")).event).filter(n=>!Sc(n.target)).map(n=>new ei(n)).filter(n=>n.keyCode===2&&!n.ctrlKey&&!n.metaKey&&!n.shiftKey&&!n.altKey).on(this.onTab,this,this.disposables)}onTab(e){if(e.target!==this.view.domNode)return;const t=this.list.getFocus();if(t.length===0)return;const i=this.view.domElement(t[0]);if(!i)return;const n=i.querySelector("[tabIndex]");if(!n||!(n instanceof HTMLElement)||n.tabIndex===-1)return;const s=window.getComputedStyle(n);s.visibility==="hidden"||s.display==="none"||(e.preventDefault(),e.stopPropagation(),n.focus())}dispose(){this.disposables.dispose()}}function w5(r){return Je?r.browserEvent.metaKey:r.browserEvent.ctrlKey}function y5(r){return r.browserEvent.shiftKey}function Bne(r){return r instanceof MouseEvent&&r.button===2}const S5={isSelectionSingleChangeEvent:w5,isSelectionRangeChangeEvent:y5};class L5{constructor(e){this.list=e,this.disposables=new le,this._onPointer=new H,this.onPointer=this._onPointer.event,e.options.multipleSelectionSupport!==!1&&(this.multipleSelectionController=this.list.options.multipleSelectionController||S5),this.mouseSupport=typeof e.options.mouseSupport=="undefined"||!!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(Et.addTarget(e.getHTMLElement()))),ke.any(e.onMouseClick,e.onMouseMiddleClick,e.onTap)(this.onViewPointer,this,this.disposables)}updateOptions(e){e.multipleSelectionSupport!==void 0&&(this.multipleSelectionController=void 0,e.multipleSelectionSupport&&(this.multipleSelectionController=this.list.options.multipleSelectionController||S5))}isSelectionSingleChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionSingleChangeEvent(e):!1}isSelectionRangeChangeEvent(e){return this.multipleSelectionController?this.multipleSelectionController.isSelectionRangeChangeEvent(e):!1}isSelectionChangeEvent(e){return this.isSelectionSingleChangeEvent(e)||this.isSelectionRangeChangeEvent(e)}onMouseDown(e){Ff(e.browserEvent.target)||document.activeElement!==e.browserEvent.target&&this.list.domFocus()}onContextMenu(e){if(Ff(e.browserEvent.target))return;const t=typeof e.index=="undefined"?[]:[e.index];this.list.setFocus(t,e.browserEvent)}onViewPointer(e){if(!this.mouseSupport||Sc(e.browserEvent.target)||Ff(e.browserEvent.target))return;const t=e.index;if(typeof t=="undefined"){this.list.setFocus([],e.browserEvent),this.list.setSelection([],e.browserEvent),this.list.setAnchor(void 0);return}if(this.isSelectionRangeChangeEvent(e))return this.changeSelection(e);if(this.isSelectionChangeEvent(e))return this.changeSelection(e);this.list.setFocus([t],e.browserEvent),this.list.setAnchor(t),Bne(e.browserEvent)||this.list.setSelection([t],e.browserEvent),this._onPointer.fire(e)}onDoubleClick(e){if(Sc(e.browserEvent.target)||Ff(e.browserEvent.target)||this.isSelectionChangeEvent(e))return;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(typeof i=="undefined"){const h=this.list.getFocus()[0];i=h!=null?h:t,this.list.setAnchor(i)}const n=Math.min(i,t),s=Math.max(i,t),o=Fn(n,s+1),a=this.list.getSelection(),l=Hne(GE(a,[i]),i);if(l.length===0)return;const c=GE(o,zne(a,l));this.list.setSelection(c,e.browserEvent),this.list.setFocus([t],e.browserEvent)}else if(this.isSelectionSingleChangeEvent(e)){const n=this.list.getSelection(),s=n.filter(o=>o!==t);this.list.setFocus([t]),this.list.setAnchor(t),n.length===s.length?this.list.setSelection([...s,t],e.browserEvent):this.list.setSelection(s,e.browserEvent)}}dispose(){this.disposables.dispose()}}class x5{constructor(e,t){this.styleElement=e,this.selectorSuffix=t}style(e){const t=this.selectorSuffix&&`.${this.selectorSuffix}`,i=[];e.listBackground&&(e.listBackground.isOpaque()?i.push(`.monaco-list${t} .monaco-list-rows { background: ${e.listBackground}; }`):Je||console.warn(`List with id '${this.selectorSuffix}' was styled with a non-opaque background color. This will break sub-pixel antialiasing.`)),e.listFocusBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.focused { background-color: ${e.listFocusBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.focused:hover { background-color: ${e.listFocusBackground}; }`)),e.listFocusForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.focused { color: ${e.listFocusForeground}; }`),e.listActiveSelectionBackground&&(i.push(`.monaco-list${t}:focus .monaco-list-row.selected { background-color: ${e.listActiveSelectionBackground}; }`),i.push(`.monaco-list${t}:focus .monaco-list-row.selected:hover { background-color: ${e.listActiveSelectionBackground}; }`)),e.listActiveSelectionForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected { color: ${e.listActiveSelectionForeground}; }`),e.listActiveSelectionIconForeground&&i.push(`.monaco-list${t}:focus .monaco-list-row.selected .codicon { color: ${e.listActiveSelectionIconForeground}; }`),e.listFocusAndSelectionBackground&&i.push(` - .monaco-drag-image, - .monaco-list${t}:focus .monaco-list-row.selected.focused { background-color: ${e.listFocusAndSelectionBackground}; } - `),e.listFocusAndSelectionForeground&&i.push(` - .monaco-drag-image, - .monaco-list${t}:focus .monaco-list-row.selected.focused { color: ${e.listFocusAndSelectionForeground}; } - `),e.listInactiveFocusForeground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { color: ${e.listInactiveFocusForeground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { color: ${e.listInactiveFocusForeground}; }`)),e.listInactiveSelectionIconForeground&&i.push(`.monaco-list${t} .monaco-list-row.focused .codicon { color: ${e.listInactiveSelectionIconForeground}; }`),e.listInactiveFocusBackground&&(i.push(`.monaco-list${t} .monaco-list-row.focused { background-color: ${e.listInactiveFocusBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.focused:hover { background-color: ${e.listInactiveFocusBackground}; }`)),e.listInactiveSelectionBackground&&(i.push(`.monaco-list${t} .monaco-list-row.selected { background-color: ${e.listInactiveSelectionBackground}; }`),i.push(`.monaco-list${t} .monaco-list-row.selected:hover { background-color: ${e.listInactiveSelectionBackground}; }`)),e.listInactiveSelectionForeground&&i.push(`.monaco-list${t} .monaco-list-row.selected { color: ${e.listInactiveSelectionForeground}; }`),e.listHoverBackground&&i.push(`.monaco-list${t}:not(.drop-target) .monaco-list-row:hover:not(.selected):not(.focused) { background-color: ${e.listHoverBackground}; }`),e.listHoverForeground&&i.push(`.monaco-list${t} .monaco-list-row:hover:not(.selected):not(.focused) { color: ${e.listHoverForeground}; }`),e.listSelectionOutline&&i.push(`.monaco-list${t} .monaco-list-row.selected { outline: 1px dotted ${e.listSelectionOutline}; outline-offset: -1px; }`),e.listFocusOutline&&i.push(` - .monaco-drag-image, - .monaco-list${t}:focus .monaco-list-row.focused { outline: 1px solid ${e.listFocusOutline}; outline-offset: -1px; } - `),e.listInactiveFocusOutline&&i.push(`.monaco-list${t} .monaco-list-row.focused { outline: 1px dotted ${e.listInactiveFocusOutline}; outline-offset: -1px; }`),e.listHoverOutline&&i.push(`.monaco-list${t} .monaco-list-row:hover { outline: 1px dashed ${e.listHoverOutline}; outline-offset: -1px; }`),e.listDropBackground&&i.push(` - .monaco-list${t}.drop-target, - .monaco-list${t} .monaco-list-rows.drop-target, - .monaco-list${t} .monaco-list-row.drop-target { background-color: ${e.listDropBackground} !important; color: inherit !important; } - `),e.listFilterWidgetBackground&&i.push(`.monaco-list-type-filter { background-color: ${e.listFilterWidgetBackground} }`),e.listFilterWidgetOutline&&i.push(`.monaco-list-type-filter { border: 1px solid ${e.listFilterWidgetOutline}; }`),e.listFilterWidgetNoMatchesOutline&&i.push(`.monaco-list-type-filter.no-matches { border: 1px solid ${e.listFilterWidgetNoMatchesOutline}; }`),e.listMatchesShadow&&i.push(`.monaco-list-type-filter { box-shadow: 1px 1px 1px ${e.listMatchesShadow}; }`),e.tableColumnsBorder&&i.push(` - .monaco-table:hover > .monaco-split-view2, - .monaco-table:hover > .monaco-split-view2 .monaco-sash.vertical::before { - border-color: ${e.tableColumnsBorder}; - }`),this.styleElement.textContent=i.join(` -`)}}const Wne={listFocusBackground:K.fromHex("#7FB0D0"),listActiveSelectionBackground:K.fromHex("#0E639C"),listActiveSelectionForeground:K.fromHex("#FFFFFF"),listActiveSelectionIconForeground:K.fromHex("#FFFFFF"),listFocusAndSelectionBackground:K.fromHex("#094771"),listFocusAndSelectionForeground:K.fromHex("#FFFFFF"),listInactiveSelectionBackground:K.fromHex("#3F3F46"),listInactiveSelectionIconForeground:K.fromHex("#FFFFFF"),listHoverBackground:K.fromHex("#2A2D2E"),listDropBackground:K.fromHex("#383B3D"),treeIndentGuidesStroke:K.fromHex("#a9a9a9"),tableColumnsBorder:K.fromHex("#cccccc").transparent(.2)},Vne={keyboardSupport:!0,mouseSupport:!0,multipleSelectionSupport:!0,dnd:{getDragURI(){return null},onDragStart(){},onDragOver(){return!1},drop(){}}};function Hne(r,e){const t=r.indexOf(e);if(t===-1)return[];const i=[];let n=t-1;for(;n>=0&&r[n]===e-(t-n);)i.push(r[n--]);for(i.reverse(),n=t;n<r.length&&r[n]===e+(n-t);)i.push(r[n++]);return i}function GE(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){t.push(r[i]),i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):t.push(e[n++]);return t}function zne(r,e){const t=[];let i=0,n=0;for(;i<r.length||n<e.length;)if(i>=r.length)t.push(e[n++]);else if(n>=e.length)t.push(r[i++]);else if(r[i]===e[n]){i++,n++;continue}else r[i]<e[n]?t.push(r[i++]):n++;return t}const k5=(r,e)=>r-e;class $ne{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){let s=0;for(const o of this.renderers)o.disposeElement&&o.disposeElement(e,t,i[s],n),s+=1}disposeTemplate(e){let t=0;for(const i of this.renderers)i.disposeTemplate(e[t++])}}class Une{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);typeof s=="number"?i.setAttribute("aria-level",`${s}`):i.removeAttribute("aria-level")}disposeTemplate(e){}}class jne{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){this.dnd.onDragStart&&this.dnd.onDragStart(e,t)}onDragOver(e,t,i,n){return this.dnd.onDragOver(e,t,i,n)}onDragLeave(e,t,i,n){var s,o;(o=(s=this.dnd).onDragLeave)===null||o===void 0||o.call(s,e,t,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}drop(e,t,i,n){this.dnd.drop(e,t,i,n)}}class ia{constructor(e,t,i,n,s=Vne){var o;this.user=e,this._options=s,this.focus=new s0("focused"),this.anchor=new s0("anchor"),this.eventBufferer=new TS,this._ariaLabel="",this.disposables=new le,this._onDidDispose=new H,this.onDidDispose=this._onDidDispose.event;const a=this._options.accessibilityProvider&&this._options.accessibilityProvider.getWidgetRole?(o=this._options.accessibilityProvider)===null||o===void 0?void 0:o.getWidgetRole():"list";this.selection=new Pne(a!=="listbox"),eo(s,Wne,!1);const l=[this.focus.renderer,this.selection.renderer];this.accessibilityProvider=s.accessibilityProvider,this.accessibilityProvider&&(l.push(new Une(this.accessibilityProvider)),this.accessibilityProvider.onDidChangeActiveDescendant&&this.accessibilityProvider.onDidChangeActiveDescendant(this.onDidChangeActiveDescendant,this,this.disposables)),n=n.map(h=>new $ne(h.templateId,[...l,h]));const c=Object.assign(Object.assign({},s),{dnd:s.dnd&&new jne(this,s.dnd)});if(this.view=new go(t,i,n,c),this.view.domNode.setAttribute("role",a),s.styleController)this.styleController=s.styleController(this.view.domId);else{const h=Tr(this.view.domNode);this.styleController=new x5(h,this.view.domId)}if(this.spliceable=new xne([new qE(this.focus,this.view,s.identityProvider),new qE(this.selection,this.view,s.identityProvider),new qE(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 Fne(this,this.view)),(typeof s.keyboardSupport!="boolean"||s.keyboardSupport)&&(this.keyboardController=new v5(this,this.view,s),this.disposables.add(this.keyboardController)),s.keyboardNavigationLabelProvider){const h=s.keyboardNavigationDelegate||C5;this.typeLabelController=new One(this,this.view,s.keyboardNavigationLabelProvider,h),this.disposables.add(this.typeLabelController)}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()),this._options.multipleSelectionSupport!==!1&&this.view.domNode.setAttribute("aria-multiselectable","true")}get onDidChangeFocus(){return ke.map(this.eventBufferer.wrapEvent(this.focus.onChange),e=>this.toListEvent(e))}get onDidChangeSelection(){return ke.map(this.eventBufferer.wrapEvent(this.selection.onChange),e=>this.toListEvent(e))}get domId(){return this.view.domId}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 onTouchStart(){return this.view.onTouchStart}get onTap(){return this.view.onTap}get onContextMenu(){let e=!1;const t=ke.chain(this.disposables.add(new Ft(this.view.domNode,"keydown")).event).map(s=>new ei(s)).filter(s=>e=s.keyCode===58||s.shiftKey&&s.keyCode===68).map(b4).filter(()=>!1).event,i=ke.chain(this.disposables.add(new Ft(this.view.domNode,"keyup")).event).forEach(()=>e=!1).map(s=>new ei(s)).filter(s=>s.keyCode===58||s.shiftKey&&s.keyCode===68).map(b4).map(({browserEvent:s})=>{const o=this.getFocus(),a=o.length?o[0]:void 0,l=typeof a!="undefined"?this.view.element(a):void 0,c=typeof a!="undefined"?this.view.domElement(a):this.view.domNode;return{index:a,element:l,anchor:c,browserEvent:s}}).event,n=ke.chain(this.view.onContextMenu).filter(s=>!e).map(({element:s,index:o,browserEvent:a})=>({element:s,index:o,anchor:{x:a.pageX+1,y:a.pageY},browserEvent:a})).event;return ke.any(t,i,n)}get onKeyDown(){return this.disposables.add(new Ft(this.view.domNode,"keydown")).event}get onDidFocus(){return ke.signal(this.disposables.add(new Ft(this.view.domNode,"focus",!0)).event)}createMouseController(e){return new L5(this)}updateOptions(e={}){var t;this._options=Object.assign(Object.assign({},this._options),e),this.typeLabelController&&this.typeLabelController.updateOptions(this._options),this._options.multipleSelectionController!==void 0&&(this._options.multipleSelectionSupport?this.view.domNode.setAttribute("aria-multiselectable","true"):this.view.domNode.removeAttribute("aria-multiselectable")),this.mouseController.updateOptions(e),(t=this.keyboardController)===null||t===void 0||t.updateOptions(e),this.view.updateOptions(e)}get options(){return this._options}splice(e,t,i=[]){if(e<0||e>this.view.length)throw new pu(this.user,`Invalid start index: ${e}`);if(t<0)throw new pu(this.user,`Invalid delete count: ${t}`);t===0&&i.length===0||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 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 pu(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(typeof e=="undefined"){this.anchor.set([]);return}if(e<0||e>=this.length)throw new pu(this.user,`Invalid index ${e}`);this.anchor.set([e])}getAnchor(){return Vx(this.anchor.get(),void 0)}getAnchorElement(){const e=this.getAnchor();return typeof e=="undefined"?void 0:this.element(e)}setFocus(e,t){for(const i of e)if(i<0||i>=this.length)throw new pu(this.user,`Invalid index ${i}`);this.focus.set(e,t)}focusNext(e=1,t=!1,i,n){if(this.length===0)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(this.length===0)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 b5(this,void 0,void 0,function*(){let i=this.view.indexAt(this.view.getScrollTop()+this.view.renderHeight);i=i===0?0:i-1;const n=this.view.element(i),s=this.getFocusedElements()[0];if(s!==n){const o=this.findPreviousIndex(i,!1,t);o>-1&&s!==this.view.element(o)?this.setFocus([o],e):this.setFocus([i],e)}else{const o=this.view.getScrollTop();this.view.setScrollTop(o+this.view.renderHeight-this.view.elementHeight(i)),this.view.getScrollTop()!==o&&(this.setFocus([]),yield Hl(0),yield this.focusNextPage(e,t))}})}focusPreviousPage(e,t){return b5(this,void 0,void 0,function*(){let i;const n=this.view.getScrollTop();n===0?i=this.view.indexAt(n):i=this.view.indexAfter(n-1);const s=this.view.element(i),o=this.getFocusedElements()[0];if(o!==s){const a=this.findNextIndex(i,!1,t);a>-1&&o!==this.view.element(a)?this.setFocus([a],e):this.setFocus([i],e)}else{const a=n;this.view.setScrollTop(n-this.view.renderHeight),this.view.getScrollTop()!==a&&(this.setFocus([]),yield Hl(0),yield this.focusPreviousPage(e,t))}})}focusLast(e,t){if(this.length===0)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(this.length===0)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;n++){if(e>=this.length&&!t)return-1;if(e=e%this.length,!i||i(this.element(e)))return e;e++}return-1}findPreviousIndex(e,t=!1,i){for(let n=0;n<this.length;n++){if(e<0&&!t)return-1;if(e=(this.length+e%this.length)%this.length,!i||i(this.element(e)))return e;e--}return-1}getFocus(){return this.focus.get()}getFocusedElements(){return this.getFocus().map(e=>this.view.element(e))}reveal(e,t){if(e<0||e>=this.length)throw new pu(this.user,`Invalid index ${e}`);const i=this.view.getScrollTop(),n=this.view.elementTop(e),s=this.view.elementHeight(e);if(vh(t)){const o=s-this.view.renderHeight;this.view.setScrollTop(o*Ss(t,0,1)+n)}else{const o=n+s,a=i+this.view.renderHeight;n<i&&o>=a||(n<i||o>=a&&s>=this.view.renderHeight?this.view.setScrollTop(n):o>=a&&this.view.setScrollTop(o-this.view.renderHeight))}}getRelativeTop(e){if(e<0||e>=this.length)throw new pu(this.user,`Invalid index ${e}`);const t=this.view.getScrollTop(),i=this.view.elementTop(e),n=this.view.elementHeight(e);if(i<t||i+n>t+this.view.renderHeight)return null;const s=n-this.view.renderHeight;return Math.abs((t-i)/s)}getHTMLElement(){return this.view.domNode}style(e){this.styleController.style(e)}toListEvent({indexes:e,browserEvent:t}){return{indexes:e,elements:e.map(i=>this.view.element(i)),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;((e=this.accessibilityProvider)===null||e===void 0?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",e.length===0),this.view.domNode.classList.toggle("selection-single",e.length===1),this.view.domNode.classList.toggle("selection-multiple",e.length>1)}dispose(){this._onDidDispose.fire(),this.disposables.dispose(),this._onDidDispose.dispose()}}_u([Ei],ia.prototype,"onDidChangeFocus",null);_u([Ei],ia.prototype,"onDidChangeSelection",null);_u([Ei],ia.prototype,"onContextMenu",null);_u([Ei],ia.prototype,"onKeyDown",null);_u([Ei],ia.prototype,"onDidFocus",null);class Kne{constructor(e,t){this.renderer=e,this.modelProvider=t}get templateId(){return this.renderer.templateId}renderTemplate(e){return{data:this.renderer.renderTemplate(e),disposable:Y.None}}renderElement(e,t,i,n){if(i.disposable&&i.disposable.dispose(),!i.data)return;const s=this.modelProvider();if(s.isResolved(e))return this.renderer.renderElement(s.get(e),e,i.data,n);const o=new Rn,a=s.resolve(e,o.token);i.disposable={dispose:()=>o.cancel()},this.renderer.renderPlaceholder(e,i.data),a.then(l=>this.renderer.renderElement(l,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 qne{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}}function Gne(r,e){return Object.assign(Object.assign({},e),{accessibilityProvider:e.accessibilityProvider&&new qne(r,e.accessibilityProvider)})}class Zne{constructor(e,t,i,n,s={}){const o=()=>this.model,a=n.map(l=>new Kne(l,o));this.list=new ia(e,t,i,a,Gne(o,s))}updateOptions(e){this.list.updateOptions(e)}getHTMLElement(){return this.list.getHTMLElement()}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}get onMouseDblClick(){return ke.map(this.list.onMouseDblClick,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onPointer(){return ke.map(this.list.onPointer,({element:e,index:t,browserEvent:i})=>({element:e===void 0?void 0:this._model.get(e),index:t,browserEvent:i}))}get onDidChangeSelection(){return ke.map(this.list.onDidChangeSelection,({elements:e,indexes:t,browserEvent:i})=>({elements:e.map(n=>this._model.get(n)),indexes:t,browserEvent:i}))}get model(){return this._model}set model(e){this._model=e,this.list.splice(0,this.list.length,Fn(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 Yne={separatorBorder:K.transparent};class D5{constructor(e,t,i,n){this.container=e,this.view=t,this.disposable=n,this._cachedVisibleSize=void 0,typeof i=="number"?(this._size=i,this._cachedVisibleSize=void 0,e.classList.add("visible")):(this._size=0,this._cachedVisibleSize=i.cachedVisibleSize)}set size(e){this._size=e}get size(){return this._size}get visible(){return typeof this._cachedVisibleSize=="undefined"}setVisible(e,t){e!==this.visible&&(e?(this.size=Ss(this._cachedVisibleSize,this.viewMinimumSize,this.viewMaximumSize),this._cachedVisibleSize=void 0):(this._cachedVisibleSize=typeof t=="number"?t:this.size,this.size=0),this.container.classList.toggle("visible",e),this.view.setVisible&&this.view.setVisible(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 snap(){return!!this.view.snap}set enabled(e){this.container.style.pointerEvents=e?"":"none"}layout(e,t){this.layoutContainer(e),this.view.layout(this.size,e,t)}dispose(){return this.disposable.dispose(),this.view}}class Xne extends D5{layoutContainer(e){this.container.style.top=`${e}px`,this.container.style.height=`${this.size}px`}}class Qne extends D5{layoutContainer(e){this.container.style.left=`${e}px`,this.container.style.width=`${this.size}px`}}var hl;(function(r){r[r.Idle=0]="Idle",r[r.Busy=1]="Busy"})(hl||(hl={}));var o0;(function(r){r.Distribute={type:"distribute"};function e(i){return{type:"split",index:i}}r.Split=e;function t(i){return{type:"invisible",cachedVisibleSize:i}}r.Invisible=t})(o0||(o0={}));class E5 extends Y{constructor(e,t={}){var i,n;super();this.size=0,this.contentSize=0,this.proportions=void 0,this.viewItems=[],this.sashItems=[],this.state=hl.Idle,this._onDidSashChange=this._register(new H),this.onDidSashChange=this._onDidSashChange.event,this._onDidSashReset=this._register(new H),this._startSnappingEnabled=!0,this._endSnappingEnabled=!0,this.orientation=On(t.orientation)?0:t.orientation,this.inverseAltBehavior=!!t.inverseAltBehavior,this.proportionalLayout=On(t.proportionalLayout)?!0:!!t.proportionalLayout,this.getSashOrthogonalSize=t.getSashOrthogonalSize,this.el=document.createElement("div"),this.el.classList.add("monaco-split-view2"),this.el.classList.add(this.orientation===0?"vertical":"horizontal"),e.appendChild(this.el),this.sashContainer=X(this.el,oe(".sash-container")),this.viewContainer=oe(".split-view-container"),this.scrollable=new ww(125,Oo),this.scrollableElement=this._register(new FD(this.viewContainer,{vertical:this.orientation===0?(i=t.scrollbarVisibility)!==null&&i!==void 0?i:1:2,horizontal:this.orientation===1?(n=t.scrollbarVisibility)!==null&&n!==void 0?n:1:2},this.scrollable)),this.onDidScroll=this.scrollableElement.onScroll,this._register(this.onDidScroll(s=>{this.viewContainer.scrollTop=s.scrollTop,this.viewContainer.scrollLeft=s.scrollLeft})),X(this.el,this.scrollableElement.getDomNode()),this.style(t.styles||Yne),t.descriptor&&(this.size=t.descriptor.size,t.descriptor.views.forEach((s,o)=>{const a=On(s.visible)||s.visible?s.size:{type:"invisible",cachedVisibleSize:s.size},l=s.view;this.doAddView(l,a,o,!0)}),this.contentSize=this.viewItems.reduce((s,o)=>s+o.size,0),this.saveProportions())}get orthogonalStartSash(){return this._orthogonalStartSash}set orthogonalStartSash(e){for(const t of this.sashItems)t.sash.orthogonalStartSash=e;this._orthogonalStartSash=e}get orthogonalEndSash(){return this._orthogonalEndSash}set orthogonalEndSash(e){for(const t of this.sashItems)t.sash.orthogonalEndSash=e;this._orthogonalEndSash=e}get startSnappingEnabled(){return this._startSnappingEnabled}set startSnappingEnabled(e){this._startSnappingEnabled!==e&&(this._startSnappingEnabled=e,this.updateSashEnablement())}get endSnappingEnabled(){return this._endSnappingEnabled}set endSnappingEnabled(e){this._endSnappingEnabled!==e&&(this._endSnappingEnabled=e,this.updateSashEnablement())}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)for(let n=0;n<this.viewItems.length;n++){const s=this.viewItems[n];s.size=Ss(Math.round(this.proportions[n]*e),s.minimumSize,s.maximumSize)}else{const n=Fn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);this.resize(this.viewItems.length-1,e-i,void 0,s,o)}this.distributeEmptySpace(),this.layoutViews()}saveProportions(){this.proportionalLayout&&this.contentSize>0&&(this.proportions=this.viewItems.map(e=>e.size/this.contentSize))}onSashStart({sash:e,start:t,alt:i}){for(const a of this.viewItems)a.enabled=!1;const n=this.sashItems.findIndex(a=>a.sash===e),s=Fl(J(document.body,"keydown",a=>o(this.sashDragState.current,a.altKey)),J(document.body,"keyup",()=>o(this.sashDragState.current,!1))),o=(a,l)=>{const c=this.viewItems.map(g=>g.size);let h=Number.NEGATIVE_INFINITY,u=Number.POSITIVE_INFINITY;if(this.inverseAltBehavior&&(l=!l),l)if(n===this.sashItems.length-1){const p=this.viewItems[n];h=(p.minimumSize-p.size)/2,u=(p.maximumSize-p.size)/2}else{const p=this.viewItems[n+1];h=(p.size-p.maximumSize)/2,u=(p.size-p.minimumSize)/2}let d,f;if(!l){const g=Fn(n,-1),p=Fn(n+1,this.viewItems.length),_=g.reduce((L,N)=>L+(this.viewItems[N].minimumSize-c[N]),0),v=g.reduce((L,N)=>L+(this.viewItems[N].viewMaximumSize-c[N]),0),b=p.length===0?Number.POSITIVE_INFINITY:p.reduce((L,N)=>L+(c[N]-this.viewItems[N].minimumSize),0),C=p.length===0?Number.NEGATIVE_INFINITY:p.reduce((L,N)=>L+(c[N]-this.viewItems[N].viewMaximumSize),0),y=Math.max(_,C),x=Math.min(b,v),S=this.findFirstSnapIndex(g),w=this.findFirstSnapIndex(p);if(typeof S=="number"){const L=this.viewItems[S],N=Math.floor(L.viewMinimumSize/2);d={index:S,limitDelta:L.visible?y-N:y+N,size:L.size}}if(typeof w=="number"){const L=this.viewItems[w],N=Math.floor(L.viewMinimumSize/2);f={index:w,limitDelta:L.visible?x+N:x-N,size:L.size}}}this.sashDragState={start:a,current:a,index:n,sizes:c,minDelta:h,maxDelta:u,alt:l,snapBefore:d,snapAfter:f,disposable:s}};o(t,i)}onSashChange({current:e}){const{index:t,start:i,sizes:n,alt:s,minDelta:o,maxDelta:a,snapBefore:l,snapAfter:c}=this.sashDragState;this.sashDragState.current=e;const h=e-i,u=this.resize(t,h,n,void 0,void 0,o,a,l,c);if(s){const d=t===this.sashItems.length-1,f=this.viewItems.map(C=>C.size),g=d?t:t+1,p=this.viewItems[g],_=p.size-p.maximumSize,v=p.size-p.minimumSize,b=d?t-1:t+1;this.resize(b,-u,f,void 0,void 0,_,v)}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=typeof t=="number"?t:e.size,t=Ss(t,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!==hl.Idle)throw new Error("Cant modify splitview");if(this.state=hl.Busy,e<0||e>=this.viewItems.length)return;const i=Fn(this.viewItems.length).filter(a=>a!==e),n=[...i.filter(a=>this.viewItems[a].priority===1),e],s=i.filter(a=>this.viewItems[a].priority===2),o=this.viewItems[e];t=Math.round(t),t=Ss(t,o.minimumSize,Math.min(o.maximumSize,this.size)),o.size=t,this.relayout(n,s),this.state=hl.Idle}distributeViewSizes(){const e=[];let t=0;for(const a of this.viewItems)a.maximumSize-a.minimumSize>0&&(e.push(a),t+=a.size);const i=Math.floor(t/e.length);for(const a of e)a.size=Ss(i,a.minimumSize,a.maximumSize);const n=Fn(this.viewItems.length),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);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!==hl.Idle)throw new Error("Cant modify splitview");this.state=hl.Busy;const s=oe(".split-view-view");i===this.viewItems.length?this.viewContainer.appendChild(s):this.viewContainer.insertBefore(s,this.viewContainer.children.item(i));const o=e.onDidChange(d=>this.onViewChange(h,d)),a=Xe(()=>this.viewContainer.removeChild(s)),l=Fl(o,a);let c;typeof t=="number"?c=t:t.type==="split"?c=this.getViewSize(t.index)/2:t.type==="invisible"?c={cachedVisibleSize:t.cachedVisibleSize}:c=e.minimumSize;const h=this.orientation===0?new Xne(s,e,c,l):new Qne(s,e,c,l);if(this.viewItems.splice(i,0,h),this.viewItems.length>1){let d={orthogonalStartSash:this.orthogonalStartSash,orthogonalEndSash:this.orthogonalEndSash};const f=this.orientation===0?new _n(this.sashContainer,{getHorizontalSashTop:L=>this.getSashPosition(L),getHorizontalSashWidth:this.getSashOrthogonalSize},Object.assign(Object.assign({},d),{orientation:1})):new _n(this.sashContainer,{getVerticalSashLeft:L=>this.getSashPosition(L),getVerticalSashHeight:this.getSashOrthogonalSize},Object.assign(Object.assign({},d),{orientation:0})),g=this.orientation===0?L=>({sash:f,start:L.startY,current:L.currentY,alt:L.altKey}):L=>({sash:f,start:L.startX,current:L.currentX,alt:L.altKey}),_=ke.map(f.onDidStart,g)(this.onSashStart,this),b=ke.map(f.onDidChange,g)(this.onSashChange,this),y=ke.map(f.onDidEnd,()=>this.sashItems.findIndex(L=>L.sash===f))(this.onSashEnd,this),x=f.onDidReset(()=>{const L=this.sashItems.findIndex(j=>j.sash===f),N=Fn(L,-1),P=Fn(L+1,this.viewItems.length),B=this.findFirstSnapIndex(N),U=this.findFirstSnapIndex(P);typeof B=="number"&&!this.viewItems[B].visible||typeof U=="number"&&!this.viewItems[U].visible||this._onDidSashReset.fire(L)}),S=Fl(_,b,y,x,f),w={sash:f,disposable:S};this.sashItems.splice(i-1,0,w)}s.appendChild(e.element);let u;typeof t!="number"&&t.type==="split"&&(u=[t.index]),n||this.relayout([i],u),this.state=hl.Idle,!n&&typeof t!="number"&&t.type==="distribute"&&this.distributeViewSizes()}relayout(e,t){const i=this.viewItems.reduce((n,s)=>n+s.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(h=>h.size),n,s,o=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY,l,c){if(e<0||e>=this.viewItems.length)return 0;const h=Fn(e,-1),u=Fn(e+1,this.viewItems.length);if(s)for(const w of s)zx(h,w),zx(u,w);if(n)for(const w of n)qv(h,w),qv(u,w);const d=h.map(w=>this.viewItems[w]),f=h.map(w=>i[w]),g=u.map(w=>this.viewItems[w]),p=u.map(w=>i[w]),_=h.reduce((w,L)=>w+(this.viewItems[L].minimumSize-i[L]),0),v=h.reduce((w,L)=>w+(this.viewItems[L].maximumSize-i[L]),0),b=u.length===0?Number.POSITIVE_INFINITY:u.reduce((w,L)=>w+(i[L]-this.viewItems[L].minimumSize),0),C=u.length===0?Number.NEGATIVE_INFINITY:u.reduce((w,L)=>w+(i[L]-this.viewItems[L].maximumSize),0),y=Math.max(_,C,o),x=Math.min(b,v,a);let S=!1;if(l){const w=this.viewItems[l.index],L=t>=l.limitDelta;S=L!==w.visible,w.setVisible(L,l.size)}if(!S&&c){const w=this.viewItems[c.index],L=t<c.limitDelta;S=L!==w.visible,w.setVisible(L,c.size)}if(S)return this.resize(e,t,i,n,s,o,a);t=Ss(t,y,x);for(let w=0,L=t;w<d.length;w++){const N=d[w],P=Ss(f[w]+L,N.minimumSize,N.maximumSize);L-=P-f[w],N.size=P}for(let w=0,L=t;w<g.length;w++){const N=g[w],P=Ss(p[w]-L,N.minimumSize,N.maximumSize);L+=P-p[w],N.size=P}return t}distributeEmptySpace(e){const t=this.viewItems.reduce((a,l)=>a+l.size,0);let i=this.size-t;const n=Fn(this.viewItems.length-1,-1),s=n.filter(a=>this.viewItems[a].priority===1),o=n.filter(a=>this.viewItems[a].priority===2);for(const a of o)zx(n,a);for(const a of s)qv(n,a);typeof e=="number"&&qv(n,e);for(let a=0;i!==0&&a<n.length;a++){const l=this.viewItems[n[a]],c=Ss(l.size+i,l.minimumSize,l.maximumSize);i-=c-l.size,l.size=c}}layoutViews(){this.contentSize=this.viewItems.reduce((t,i)=>t+i.size,0);let e=0;for(const t of this.viewItems)t.layout(e,this.layoutContext),e+=t.size;this.sashItems.forEach(t=>t.sash.layout()),this.updateSashEnablement(),this.updateScrollableElement()}updateScrollableElement(){this.orientation===0?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(l=>e=l.size-l.minimumSize>0||e);e=!1;const i=this.viewItems.map(l=>e=l.maximumSize-l.size>0||e),n=[...this.viewItems].reverse();e=!1;const s=n.map(l=>e=l.size-l.minimumSize>0||e).reverse();e=!1;const o=n.map(l=>e=l.maximumSize-l.size>0||e).reverse();let a=0;for(let l=0;l<this.sashItems.length;l++){const{sash:c}=this.sashItems[l];a+=this.viewItems[l].size;const u=!(t[l]&&o[l+1]),d=!(i[l]&&s[l+1]);if(u&&d){const f=Fn(l,-1),g=Fn(l+1,this.viewItems.length),p=this.findFirstSnapIndex(f),_=this.findFirstSnapIndex(g),v=typeof p=="number"&&!this.viewItems[p].visible,b=typeof _=="number"&&!this.viewItems[_].visible;v&&s[l]&&(a>0||this.startSnappingEnabled)?c.state=1:b&&t[l]&&(a<this.contentSize||this.endSnappingEnabled)?c.state=2:c.state=0}else u&&!d?c.state=1:!u&&d?c.state=2:c.state=3}}getSashPosition(e){let t=0;for(let i=0;i<this.sashItems.length;i++)if(t+=this.viewItems[i].size,this.sashItems[i].sash===e)return t;return 0}findFirstSnapIndex(e){for(const t of e){const i=this.viewItems[t];if(!!i.visible&&i.snap)return t}for(const t of e){const i=this.viewItems[t];if(i.visible&&i.maximumSize-i.minimumSize>0)return;if(!i.visible&&i.snap)return t}}dispose(){super.dispose(),this.viewItems.forEach(e=>e.dispose()),this.viewItems=[],this.sashItems.forEach(e=>e.disposable.dispose()),this.sashItems=[]}}class Um{constructor(e,t,i){this.columns=e,this.getColumnSize=i,this.templateId=Um.TemplateId,this.renderedTemplates=new Set;const n=new Map(t.map(s=>[s.templateId,s]));this.renderers=[];for(const s of e){const o=n.get(s.templateId);if(!o)throw new Error(`Table cell renderer for template id ${s.templateId} not found.`);this.renderers.push(o)}}renderTemplate(e){const t=X(e,oe(".monaco-table-tr")),i=[],n=[];for(let o=0;o<this.columns.length;o++){const a=this.renderers[o],l=X(t,oe(".monaco-table-td",{"data-col-index":o}));l.style.width=`${this.getColumnSize(o)}px`,i.push(l),n.push(a.renderTemplate(l))}const s={container:e,cellContainers:i,cellTemplateData:n};return this.renderedTemplates.add(s),s}renderElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const a=this.columns[s].project(e);this.renderers[s].renderElement(a,t,i.cellTemplateData[s],n)}}disposeElement(e,t,i,n){for(let s=0;s<this.columns.length;s++){const o=this.renderers[s];if(o.disposeElement){const l=this.columns[s].project(e);o.disposeElement(l,t,i.cellTemplateData[s],n)}}}disposeTemplate(e){for(let t=0;t<this.columns.length;t++)this.renderers[t].disposeTemplate(e.cellTemplateData[t]);Ui(e.container),this.renderedTemplates.delete(e)}layoutColumn(e,t){for(const{cellContainers:i}of this.renderedTemplates)i[e].style.width=`${t}px`}}Um.TemplateId="row";function Jne(r){return{getHeight(e){return r.getHeight(e)},getTemplateId(){return Um.TemplateId}}}class ere{constructor(e,t){this.column=e,this.index=t,this._onDidLayout=new H,this.onDidLayout=this._onDidLayout.event,this.element=oe(".monaco-table-th",{"data-col-index":t,title:e.tooltip},e.label)}get minimumSize(){var e;return(e=this.column.minimumWidth)!==null&&e!==void 0?e:120}get maximumSize(){var e;return(e=this.column.maximumWidth)!==null&&e!==void 0?e:Number.POSITIVE_INFINITY}get onDidChange(){var e;return(e=this.column.onDidChangeWidthConstraints)!==null&&e!==void 0?e:ke.None}layout(e){this._onDidLayout.fire([this.index,e])}}class a0{constructor(e,t,i,n,s,o){this.virtualDelegate=i,this.domId=`table_id_${++a0.InstanceCount}`,this.cachedHeight=0,this.domNode=X(t,oe(`.monaco-table.${this.domId}`));const a=n.map((h,u)=>new ere(h,u)),l={size:a.reduce((h,u)=>h+u.column.weight,0),views:a.map(h=>({size:h.column.weight,view:h}))};this.splitview=new E5(this.domNode,{orientation:1,scrollbarVisibility:2,getSashOrthogonalSize:()=>this.cachedHeight,descriptor:l}),this.splitview.el.style.height=`${i.headerRowHeight}px`,this.splitview.el.style.lineHeight=`${i.headerRowHeight}px`;const c=new Um(n,s,h=>this.splitview.getViewSize(h));this.list=new ia(e,this.domNode,Jne(i),[c],o),this.columnLayoutDisposable=ke.any(...a.map(h=>h.onDidLayout))(([h,u])=>c.layoutColumn(h,u)),this.styleElement=Tr(this.domNode),this.style({})}get onDidChangeFocus(){return this.list.onDidChangeFocus}get onDidChangeSelection(){return this.list.onDidChangeSelection}get onMouseDblClick(){return this.list.onMouseDblClick}get onPointer(){return this.list.onPointer}get onDidFocus(){return this.list.onDidFocus}get onDidDispose(){return this.list.onDidDispose}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 { - top: ${this.virtualDelegate.headerRowHeight+1}px; - height: calc(100% - ${this.virtualDelegate.headerRowHeight}px); - }`),this.styleElement.textContent=t.join(` -`),this.list.style(e)}getSelectedElements(){return this.list.getSelectedElements()}getSelection(){return this.list.getSelection()}getFocus(){return this.list.getFocus()}dispose(){this.splitview.dispose(),this.list.dispose(),this.columnLayoutDisposable.dispose()}}a0.InstanceCount=0;var jm;(function(r){r[r.Unknown=0]="Unknown",r[r.Twistie=1]="Twistie",r[r.Element=2]="Element"})(jm||(jm={}));class hs extends Error{constructor(e,t){super(`TreeError [${e}] ${t}`)}}class ZE{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 YE(r){return typeof r=="object"&&"visibility"in r&&"data"in r}function Km(r){switch(r){case!0:return 1;case!1:return 0;default:return r}}function XE(r){return typeof r.collapsible=="boolean"}class tre{constructor(e,t,i,n={}){this.user=e,this.list=t,this.rootRef=[],this.eventBufferer=new TS,this._onDidChangeCollapseState=new H,this.onDidChangeCollapseState=this.eventBufferer.wrapEvent(this._onDidChangeCollapseState.event),this._onDidChangeRenderNodeCount=new H,this.onDidChangeRenderNodeCount=this.eventBufferer.wrapEvent(this._onDidChangeRenderNodeCount.event),this._onDidSplice=new H,this.onDidSplice=this._onDidSplice.event,this.collapseByDefault=typeof n.collapseByDefault=="undefined"?!1:n.collapseByDefault,this.filter=n.filter,this.autoExpandSingleChildren=typeof n.autoExpandSingleChildren=="undefined"?!1: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=at.empty(),n={}){if(e.length===0)throw new hs(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 a;n===void 0&&(n=at.empty()),o===void 0&&(o=(a=s.diffDepth)!==null&&a!==void 0?a:0);const{parentNode:l}=this.getParentNodeWithListIndex(t),c=[...n],h=t[t.length-1],u=new jo({getElements:()=>l.children.map(_=>e.getId(_.element).toString())},{getElements:()=>[...l.children.slice(0,h),...c,...l.children.slice(h+i)].map(_=>e.getId(_.element).toString())}).ComputeDiff(!1);if(u.quitEarly)return this.spliceSimple(t,i,c,s);const d=t.slice(0,-1),f=(_,v,b)=>{if(o>0)for(let C=0;C<b;C++)_--,v--,this.spliceSmart(e,[...d,_,0],Number.MAX_SAFE_INTEGER,c[v].children,s,o-1)};let g=Math.min(l.children.length,h+i),p=c.length;for(const _ of u.changes.sort((v,b)=>b.originalStart-v.originalStart))f(g,p,g-(_.originalStart+_.originalLength)),g=_.originalStart,p=_.modifiedStart-h,this.spliceSimple([...d,g],_.originalLength,at.slice(c,p,p+_.modifiedLength),s);f(g,p,g)}spliceSimple(e,t,i=at.empty(),{onDidCreateNode:n,onDidDeleteNode:s}){const{parentNode:o,listIndex:a,revealed:l,visible:c}=this.getParentNodeWithListIndex(e),h=[],u=at.map(i,S=>this.createTreeNode(S,o,o.visible?1:0,l,h,n)),d=e[e.length-1],f=o.children.length>0;let g=0;for(let S=d;S>=0&&S<o.children.length;S--){const w=o.children[S];if(w.visible){g=w.visibleChildIndex;break}}const p=[];let _=0,v=0;for(const S of u)p.push(S),v+=S.renderNodeCount,S.visible&&(S.visibleChildIndex=g+_++);const b=jq(o.children,d,t,p);let C=0;for(const S of b)S.visible&&C++;if(C!==0)for(let S=d+p.length;S<o.children.length;S++){const w=o.children[S];w.visible&&(w.visibleChildIndex-=C)}if(o.visibleChildrenCount+=_-C,l&&c){const S=b.reduce((w,L)=>w+(L.visible?L.renderNodeCount:0),0);this._updateAncestorsRenderNodeCount(o,v-S),this.list.splice(a,S,h)}if(b.length>0&&s){const S=w=>{s(w),w.children.forEach(S)};b.forEach(S)}const y=o.children.length>0;f!==y&&this.setCollapsible(e.slice(0,-1),y),this._onDidSplice.fire({insertedNodes:p,deletedNodes:b});let x=o;for(;x;){if(x.visibility===2){this.refilter();break}x=x.parent}}rerender(e){if(e.length===0)throw new hs(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);typeof t=="undefined"&&(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);typeof t=="undefined"&&(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&&!XE(t)&&i.collapsible&&!i.collapsed&&!t.recursive){let a=-1;for(let l=0;l<i.children.length;l++)if(i.children[l].visible)if(a>-1){a=-1;break}else a=l;a>-1&&this._setCollapseState([...e,a],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,a=this.updateNodeAfterCollapseChange(e),l=o-(t===-1?0:1);return this.list.splice(t+1,l,a.slice(1)),s}_setNodeCollapseState(e,t,i){let n;if(e===this.root?n=!1:(XE(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})),!XE(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)}createTreeNode(e,t,i,n,s,o){const a={parent:t,element:e.element,children:[],depth:t.depth+1,visibleChildrenCount:0,visibleChildIndex:-1,collapsible:typeof e.collapsible=="boolean"?e.collapsible:typeof e.collapsed!="undefined",collapsed:typeof e.collapsed=="undefined"?this.collapseByDefault:e.collapsed,renderNodeCount:1,visibility:1,visible:!0,filterData:void 0},l=this._filterNode(a,i);a.visibility=l,n&&s.push(a);const c=e.children||at.empty(),h=n&&l!==0&&!a.collapsed,u=at.map(c,g=>this.createTreeNode(g,a,l,h,s,o));let d=0,f=1;for(const g of u)a.children.push(g),f+=g.renderNodeCount,g.visible&&(g.visibleChildIndex=d++);return a.collapsible=a.collapsible||a.children.length>0,a.visibleChildrenCount=d,a.visible=l===2?d>0:l===1,a.visible?a.collapsed||(a.renderNodeCount=f):(a.renderNodeCount=0,n&&s.pop()),o&&o(a),a}updateNodeAfterCollapseChange(e){const t=e.renderNodeCount,i=[];return this._updateNodeAfterCollapseChange(e,i),this._updateAncestorsRenderNodeCount(e.parent,i.length-t),i}_updateNodeAfterCollapseChange(e,t){if(e.visible===!1)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),s===0)return e.visible=!1,e.renderNodeCount=0,!1;n&&i.push(e)}const o=i.length;e.renderNodeCount=e===this.root?0:1;let a=!1;if(!e.collapsed||s!==0){let l=0;for(const c of e.children)a=this._updateNodeAfterFilterChange(c,s,i,n&&!e.collapsed)||a,c.visible&&(c.visibleChildIndex=l++);e.visibleChildrenCount=l}else e.visibleChildrenCount=0;return e!==this.root&&(e.visible=s===2?a:s===1),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(t!==0)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 typeof i=="boolean"?(e.filterData=void 0,i?1:0):YE(i)?(e.filterData=i.data,Km(i.visibility)):(e.filterData=void 0,Km(i))}hasTreeNode(e,t=this.root){if(!e||e.length===0)return!0;const[i,...n]=e;return i<0||i>t.children.length?!1:this.hasTreeNode(n,t.children[i])}getTreeNode(e,t=this.root){if(!e||e.length===0)return t;const[i,...n]=e;if(i<0||i>t.children.length)throw new hs(this.user,"Invalid tree location");return this.getTreeNode(n,t.children[i])}getTreeNodeWithListIndex(e){if(e.length===0)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 hs(this.user,"Invalid tree location");const a=t.children[o];return{node:a,listIndex:i,revealed:n,visible:s&&a.visible}}getParentNodeWithListIndex(e,t=this.root,i=0,n=!0,s=!0){const[o,...a]=e;if(o<0||o>t.children.length)throw new hs(this.user,"Invalid tree location");for(let l=0;l<o;l++)i+=t.children[l].renderNodeCount;return n=n&&!t.collapsed,s=s&&t.visible,a.length===0?{parentNode:t,listIndex:i,revealed:n,visible:s}:this.getParentNodeWithListIndex(a,t.children[o],i+1,n,s)}getNode(e=[]){return this.getTreeNode(e)}getNodeLocation(e){const t=[];let i=e;for(;i.parent;)t.push(i.parent.children.indexOf(i)),i=i.parent;return t.reverse()}getParentNodeLocation(e){if(e.length!==0)return e.length===1?[]:Hq(e)[0]}}const I5=Ls("tree-item-expanded",ve.chevronDown),N5=Ls("tree-filter-on-type-on",ve.listFilter),T5=Ls("tree-filter-on-type-off",ve.listSelection),ire=Ls("tree-filter-clear",ve.close),l0=Ls("tree-item-loading",ve.loading);class nre extends $m{constructor(e){super(e.elements.map(t=>t.element));this.data=e}}function QE(r){return r instanceof $m?new nre(r):r}class rre{constructor(e,t){this.modelProvider=e,this.dnd=t,this.autoExpandDisposable=Y.None}getDragURI(e){return this.dnd.getDragURI(e.element)}getDragLabel(e,t){if(this.dnd.getDragLabel)return this.dnd.getDragLabel(e.map(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(QE(e),t)}onDragOver(e,t,i,n,s=!0){const o=this.dnd.onDragOver(QE(e),t&&t.element,i,n),a=this.autoExpandNode!==t;if(a&&(this.autoExpandDisposable.dispose(),this.autoExpandNode=t),typeof t=="undefined")return o;if(a&&typeof o!="boolean"&&o.autoExpand&&(this.autoExpandDisposable=mh(()=>{const d=this.modelProvider(),f=d.getNodeLocation(t);d.isCollapsed(f)&&d.setCollapsed(f,!1),this.autoExpandNode=void 0},500)),typeof o=="boolean"||!o.accept||typeof o.bubble=="undefined"||o.feedback){if(!s){const d=typeof o=="boolean"?o:o.accept,f=typeof o=="boolean"?void 0:o.effect;return{accept:d,effect:f,feedback:[i]}}return o}if(o.bubble===1){const d=this.modelProvider(),f=d.getNodeLocation(t),g=d.getParentNodeLocation(f),p=d.getNode(g),_=g&&d.getListIndex(g);return this.onDragOver(e,p,_,n,!1)}const l=this.modelProvider(),c=l.getNodeLocation(t),h=l.getListIndex(c),u=l.getListRenderCount(c);return Object.assign(Object.assign({},o),{feedback:Fn(h,h+u)})}drop(e,t,i,n){this.autoExpandDisposable.dispose(),this.autoExpandNode=void 0,this.dnd.drop(QE(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function sre(r,e){return e&&Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(t.element)}},dnd:e.dnd&&new rre(r,e.dnd),multipleSelectionController:e.multipleSelectionController&&{isSelectionSingleChangeEvent(t){return e.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))},isSelectionRangeChangeEvent(t){return e.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},t),{element:t.element}))}},accessibilityProvider:e.accessibilityProvider&&Object.assign(Object.assign({},e.accessibilityProvider),{getSetSize(t){const i=r(),n=i.getNodeLocation(t),s=i.getParentNodeLocation(n);return i.getNode(s).visibleChildrenCount},getPosInSet(t){return t.visibleChildIndex+1},isChecked:e.accessibilityProvider&&e.accessibilityProvider.isChecked?t=>e.accessibilityProvider.isChecked(t.element):void 0,getRole:e.accessibilityProvider&&e.accessibilityProvider.getRole?t=>e.accessibilityProvider.getRole(t.element):()=>"treeitem",getAriaLabel(t){return e.accessibilityProvider.getAriaLabel(t.element)},getWidgetAriaLabel(){return e.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:e.accessibilityProvider&&e.accessibilityProvider.getWidgetRole?()=>e.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:e.accessibilityProvider&&e.accessibilityProvider.getAriaLevel?t=>e.accessibilityProvider.getAriaLevel(t.element):t=>t.depth,getActiveDescendantId:e.accessibilityProvider.getActiveDescendantId&&(t=>e.accessibilityProvider.getActiveDescendantId(t.element))}),keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(t){return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t.element)}}),enableKeyboardNavigation:e.simpleKeyboardNavigation})}class JE{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){this.delegate.setDynamicHeight&&this.delegate.setDynamicHeight(e.element,t)}}var qm;(function(r){r.None="none",r.OnHover="onHover",r.Always="always"})(qm||(qm={}));class ore{constructor(e,t=[]){this._elements=t,this.onDidChange=ke.forEach(e,i=>this._elements=i)}get elements(){return this._elements}}class Gm{constructor(e,t,i,n,s={}){this.renderer=e,this.modelProvider=t,this.activeNodes=n,this.renderedElements=new Map,this.renderedNodes=new Map,this.indent=Gm.DefaultIndent,this.hideTwistiesOfChildlessElements=!1,this.shouldRenderIndentGuides=!1,this.renderedIndentGuides=new OG,this.activeIndentNodes=new Set,this.indentGuidesDisposable=Y.None,this.disposables=new le,this.templateId=e.templateId,this.updateOptions(s),ke.map(i,o=>o.node)(this.onDidChangeNodeTwistieState,this,this.disposables),e.onDidChangeTwistieState&&e.onDidChangeTwistieState(this.onDidChangeTwistieState,this,this.disposables)}updateOptions(e={}){if(typeof e.indent!="undefined"&&(this.indent=Ss(e.indent,0,40)),typeof e.renderIndentGuides!="undefined"){const t=e.renderIndentGuides!==qm.None;if(t!==this.shouldRenderIndentGuides&&(this.shouldRenderIndentGuides=t,this.indentGuidesDisposable.dispose(),t)){const i=new le;this.activeNodes.onDidChange(this._onDidChangeActiveNodes,this,i),this.indentGuidesDisposable=i,this._onDidChangeActiveNodes(this.activeNodes.elements)}}typeof e.hideTwistiesOfChildlessElements!="undefined"&&(this.hideTwistiesOfChildlessElements=e.hideTwistiesOfChildlessElements)}renderTemplate(e){const t=X(e,oe(".monaco-tl-row")),i=X(t,oe(".monaco-tl-indent")),n=X(t,oe(".monaco-tl-twistie")),s=X(t,oe(".monaco-tl-contents")),o=this.renderer.renderTemplate(s);return{container:e,indent:i,twistie:n,indentGuidesDisposable:Y.None,templateData:o}}renderElement(e,t,i,n){typeof n=="number"&&(this.renderedNodes.set(e,{templateData:i,height:n}),this.renderedElements.set(e.element,e));const s=Gm.DefaultIndent+(e.depth-1)*this.indent;i.twistie.style.paddingLeft=`${s}px`,i.indent.style.width=`${s+this.indent-16}px`,this.renderTwistie(e,i),typeof n=="number"&&this.renderIndentGuides(e,i),this.renderer.renderElement(e,t,i.templateData,n)}disposeElement(e,t,i,n){i.indentGuidesDisposable.dispose(),this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.templateData,n),typeof n=="number"&&(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.renderTwistie(e,t.templateData),this._onDidChangeActiveNodes(this.activeNodes.elements),this.renderIndentGuides(e,t.templateData))}renderTwistie(e,t){t.twistie.classList.remove(...I5.classNamesArray);let i=!1;this.renderer.renderTwistie&&(i=this.renderer.renderTwistie(e.element,t.twistie)),e.collapsible&&(!this.hideTwistiesOfChildlessElements||e.visibleChildrenCount>0)?(i||t.twistie.classList.add(...I5.classNamesArray),t.twistie.classList.add("collapsible"),t.twistie.classList.toggle("collapsed",e.collapsed)):t.twistie.classList.remove("collapsible","collapsed"),e.collapsible?t.container.setAttribute("aria-expanded",String(!e.collapsed)):t.container.removeAttribute("aria-expanded")}renderIndentGuides(e,t){if(Ui(t.indent),t.indentGuidesDisposable.dispose(),!this.shouldRenderIndentGuides)return;const i=new le,n=this.modelProvider();let s=e;for(;;){const o=n.getNodeLocation(s),a=n.getParentNodeLocation(o);if(!a)break;const l=n.getNode(a),c=oe(".indent-guide",{style:`width: ${this.indent}px`});this.activeIndentNodes.has(l)&&c.classList.add("active"),t.indent.childElementCount===0?t.indent.appendChild(c):t.indent.insertBefore(c,t.indent.firstElementChild),this.renderedIndentGuides.add(l,c),i.add(Xe(()=>this.renderedIndentGuides.delete(l,c))),s=l}t.indentGuidesDisposable=i}_onDidChangeActiveNodes(e){if(!this.shouldRenderIndentGuides)return;const t=new Set,i=this.modelProvider();e.forEach(n=>{const s=i.getNodeLocation(n);try{const o=i.getParentNodeLocation(s);n.collapsible&&n.children.length>0&&!n.collapsed?t.add(n):o&&t.add(i.getNode(o))}catch{}}),this.activeIndentNodes.forEach(n=>{t.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.remove("active"))}),t.forEach(n=>{this.activeIndentNodes.has(n)||this.renderedIndentGuides.forEach(n,s=>s.classList.add("active"))}),this.activeIndentNodes=t}dispose(){this.renderedNodes.clear(),this.renderedElements.clear(),this.indentGuidesDisposable.dispose(),ht(this.disposables)}}Gm.DefaultIndent=8;class are{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 le,e.onWillRefilter(this.reset,this,this.disposables)}get totalCount(){return this._totalCount}get matchCount(){return this._matchCount}set pattern(e){this._pattern=e,this._lowercasePattern=e.toLowerCase()}filter(e,t){if(this._filter){const s=this._filter.filter(e,t);if(this.tree.options.simpleKeyboardNavigation)return s;let o;if(typeof s=="boolean"?o=s?1:0:YE(s)?o=Km(s.visibility):o=s,o===0)return!1}if(this._totalCount++,this.tree.options.simpleKeyboardNavigation||!this._pattern)return this._matchCount++,{data:uo.Default,visibility:!0};const i=this.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e),n=Array.isArray(i)?i:[i];for(const s of n){const o=s&&s.toString();if(typeof o=="undefined")return{data:uo.Default,visibility:!0};const a=Of(this._pattern,this._lowercasePattern,0,o,o.toLowerCase(),0,!0);if(a)return this._matchCount++,n.length===1?{data:a,visibility:!0}:{data:{label:o,score:a},visibility:!0}}return this.tree.options.filterOnType?2:{data:uo.Default,visibility:!0}}reset(){this._totalCount=0,this._matchCount=0}dispose(){ht(this.disposables)}}class lre{constructor(e,t,i,n,s){this.tree=e,this.view=i,this.filter=n,this.keyboardNavigationDelegate=s,this._enabled=!1,this._pattern="",this._empty=!1,this._onDidChangeEmptyState=new H,this.positionClassName="ne",this.automaticKeyboardNavigation=!0,this.triggered=!1,this._onDidChangePattern=new H,this.enabledDisposables=new le,this.disposables=new le,this.domNode=oe(`.monaco-list-type-filter.${this.positionClassName}`),this.domNode.draggable=!0,this.disposables.add(J(this.domNode,"dragstart",()=>this.onDragStart())),this.messageDomNode=X(i.getHTMLElement(),oe(".monaco-list-type-filter-message")),this.labelDomNode=X(this.domNode,oe("span.label"));const o=X(this.domNode,oe(".controls"));this._filterOnType=!!e.options.filterOnType,this.filterOnTypeDomNode=X(o,oe("input.filter")),this.filterOnTypeDomNode.type="checkbox",this.filterOnTypeDomNode.checked=this._filterOnType,this.filterOnTypeDomNode.tabIndex=-1,this.updateFilterOnTypeTitleAndIcon(),this.disposables.add(J(this.filterOnTypeDomNode,"input",()=>this.onDidChangeFilterOnType())),this.clearDomNode=X(o,oe("button.clear"+ire.cssSelector)),this.clearDomNode.tabIndex=-1,this.clearDomNode.title=m("clear","Clear"),this.keyboardNavigationEventFilter=e.options.keyboardNavigationEventFilter,t.onDidSplice(this.onDidSpliceModel,this,this.disposables),this.updateOptions(e.options)}get enabled(){return this._enabled}get pattern(){return this._pattern}get filterOnType(){return this._filterOnType}updateOptions(e){e.simpleKeyboardNavigation?this.disable():this.enable(),typeof e.filterOnType!="undefined"&&(this._filterOnType=!!e.filterOnType,this.filterOnTypeDomNode.checked=this._filterOnType,this.updateFilterOnTypeTitleAndIcon()),typeof e.automaticKeyboardNavigation!="undefined"&&(this.automaticKeyboardNavigation=e.automaticKeyboardNavigation),this.tree.refilter(),this.render(),this.automaticKeyboardNavigation||this.onEventOrInput("")}enable(){if(this._enabled)return;const e=this.enabledDisposables.add(new Ft(this.view.getHTMLElement(),"keydown")),t=ke.chain(e.event).filter(n=>!Sc(n.target)||n.target===this.filterOnTypeDomNode).filter(n=>n.key!=="Dead"&&!/^Media/.test(n.key)).map(n=>new ei(n)).filter(this.keyboardNavigationEventFilter||(()=>!0)).filter(()=>this.automaticKeyboardNavigation||this.triggered).filter(n=>this.keyboardNavigationDelegate.mightProducePrintableCharacter(n)&&!(n.keyCode===18||n.keyCode===16||n.keyCode===15||n.keyCode===17)||(this.pattern.length>0||this.triggered)&&(n.keyCode===9||n.keyCode===1)&&!n.altKey&&!n.ctrlKey&&!n.metaKey||n.keyCode===1&&(Je?n.altKey&&!n.metaKey:n.ctrlKey)&&!n.shiftKey).forEach(n=>{n.stopPropagation(),n.preventDefault()}).event,i=this.enabledDisposables.add(new Ft(this.clearDomNode,"click"));ke.chain(ke.any(t,i.event)).event(this.onEventOrInput,this,this.enabledDisposables),this.filter.pattern="",this.tree.refilter(),this.render(),this._enabled=!0,this.triggered=!1}disable(){!this._enabled||(this.domNode.remove(),this.enabledDisposables.clear(),this.tree.refilter(),this.render(),this._enabled=!1,this.triggered=!1)}onEventOrInput(e){typeof e=="string"?this.onInput(e):e instanceof MouseEvent||e.keyCode===9||e.keyCode===1&&(Je?e.altKey:e.ctrlKey)?this.onInput(""):e.keyCode===1?this.onInput(this.pattern.length===0?"":this.pattern.substr(0,this.pattern.length-1)):this.onInput(this.pattern+e.browserEvent.key)}onInput(e){const t=this.view.getHTMLElement();e&&!this.domNode.parentElement?t.append(this.domNode):!e&&this.domNode.parentElement&&(this.domNode.remove(),this.tree.domFocus()),this._pattern=e,this._onDidChangePattern.fire(e),this.filter.pattern=e,this.tree.refilter(),e&&this.tree.focusNext(0,!0,void 0,n=>!uo.isDefault(n.filterData));const i=this.tree.getFocus();if(i.length>0){const n=i[0];this.tree.getRelativeTop(n)===null&&this.tree.reveal(n,.5)}this.render(),e||(this.triggered=!1)}onDragStart(){const e=this.view.getHTMLElement(),{left:t}=Qi(e),i=e.clientWidth,n=i/2,s=this.domNode.clientWidth,o=new le;let a=this.positionClassName;const l=()=>{switch(a){case"nw":this.domNode.style.top="4px",this.domNode.style.left="4px";break;case"ne":this.domNode.style.top="4px",this.domNode.style.left=`${i-s-6}px`;break}},c=u=>{u.preventDefault();const d=u.clientX-t;u.dataTransfer&&(u.dataTransfer.dropEffect="none"),d<n?a="nw":a="ne",l()},h=()=>{this.positionClassName=a,this.domNode.className=`monaco-list-type-filter ${this.positionClassName}`,this.domNode.style.top="",this.domNode.style.left="",ht(o)};l(),this.domNode.classList.remove(a),this.domNode.classList.add("dragging"),o.add(Xe(()=>this.domNode.classList.remove("dragging"))),o.add(J(document,"dragover",u=>c(u))),o.add(J(this.domNode,"dragend",()=>h())),tl.CurrentDragAndDropData=new Ete("vscode-ui"),o.add(Xe(()=>tl.CurrentDragAndDropData=void 0))}onDidSpliceModel(){!this._enabled||this.pattern.length===0||(this.tree.refilter(),this.render())}onDidChangeFilterOnType(){this.tree.updateOptions({filterOnType:this.filterOnTypeDomNode.checked}),this.tree.refilter(),this.tree.domFocus(),this.render(),this.updateFilterOnTypeTitleAndIcon()}updateFilterOnTypeTitleAndIcon(){this.filterOnType?(this.filterOnTypeDomNode.classList.remove(...T5.classNamesArray),this.filterOnTypeDomNode.classList.add(...N5.classNamesArray),this.filterOnTypeDomNode.title=m("disable filter on type","Disable Filter on Type")):(this.filterOnTypeDomNode.classList.remove(...N5.classNamesArray),this.filterOnTypeDomNode.classList.add(...T5.classNamesArray),this.filterOnTypeDomNode.title=m("enable filter on type","Enable Filter on Type"))}render(){const e=this.filter.totalCount>0&&this.filter.matchCount===0;this.pattern&&this.tree.options.filterOnType&&e?(this.messageDomNode.textContent=m("empty","No elements found"),this._empty=!0):(this.messageDomNode.innerText="",this._empty=!1),this.domNode.classList.toggle("no-matches",e),this.domNode.title=m("found","Matched {0} out of {1} elements",this.filter.matchCount,this.filter.totalCount),this.labelDomNode.textContent=this.pattern.length>16?"\u2026"+this.pattern.substr(this.pattern.length-16):this.pattern,this._onDidChangeEmptyState.fire(this._empty)}shouldAllowFocus(e){return!this.enabled||!this.pattern||this.filterOnType||this.filter.totalCount>0&&this.filter.matchCount<=1?!0:!uo.isDefault(e.filterData)}dispose(){this._enabled&&(this.domNode.remove(),this.enabledDisposables.dispose(),this._enabled=!1,this.triggered=!1),this._onDidChangePattern.dispose(),ht(this.disposables)}}function A5(r){let e=jm.Unknown;return ZM(r.browserEvent.target,"monaco-tl-twistie","monaco-tl-row")?e=jm.Twistie:ZM(r.browserEvent.target,"monaco-tl-contents","monaco-tl-row")&&(e=jm.Element),{browserEvent:r.browserEvent,element:r.element?r.element.element:null,target:e}}function c0(r,e){e(r),r.children.forEach(t=>c0(t,e))}class eI{constructor(e,t){this.getFirstViewElementWithTrait=e,this.identityProvider=t,this.nodes=[],this._onDidChange=new H,this.onDidChange=this._onDidChange.event}get nodeSet(){return this._nodeSet||(this._nodeSet=this.createNodeSet()),this._nodeSet}set(e,t){var i;!((i=t)===null||i===void 0?void 0:i.__forceEvent)&&Is(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 n=this;this._onDidChange.fire({get elements(){return n.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 l=this.createNodeSet(),c=h=>l.delete(h);t.forEach(h=>c0(h,c)),this.set([...l.values()]);return}const i=new Set,n=l=>i.add(this.identityProvider.getId(l.element).toString());t.forEach(l=>c0(l,n));const s=new Map,o=l=>s.set(this.identityProvider.getId(l.element).toString(),l);e.forEach(l=>c0(l,o));const a=[];for(const l of this.nodes){const c=this.identityProvider.getId(l.element).toString();if(!i.has(c))a.push(l);else{const u=s.get(c);u&&a.push(u)}}if(this.nodes.length>0&&a.length===0){const l=this.getFirstViewElementWithTrait();l&&a.push(l)}this._set(a,!0)}createNodeSet(){const e=new Set;for(const t of this.nodes)e.add(t);return e}}class cre extends L5{constructor(e,t){super(e);this.tree=t}onViewPointer(e){if(Sc(e.browserEvent.target)||Ff(e.browserEvent.target))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(typeof this.tree.expandOnlyOnTwistieClick=="function"?s=this.tree.expandOnlyOnTwistieClick(t.element):s=!!this.tree.expandOnlyOnTwistieClick,s&&!n&&e.browserEvent.detail!==2)return super.onViewPointer(e);if(!this.tree.expandOnDoubleClick&&e.browserEvent.detail===2)return super.onViewPointer(e);if(t.collapsible){const o=this.tree.model,a=o.getNodeLocation(t),l=e.browserEvent.altKey;if(this.tree.setFocus([a]),o.setCollapsed(a,void 0,l),s&&n)return}super.onViewPointer(e)}onDoubleClick(e){e.browserEvent.target.classList.contains("monaco-tl-twistie")||!this.tree.expandOnDoubleClick||super.onDoubleClick(e)}}class hre extends ia{constructor(e,t,i,n,s,o,a,l){super(e,t,i,n,l);this.focusTrait=s,this.selectionTrait=o,this.anchorTrait=a}createMouseController(e){return new cre(this,e.tree)}splice(e,t,i=[]){if(super.splice(e,t,i),i.length===0)return;const n=[],s=[];let o;i.forEach((a,l)=>{this.focusTrait.has(a)&&n.push(e+l),this.selectionTrait.has(a)&&s.push(e+l),this.anchorTrait.has(a)&&(o=e+l)}),n.length>0&&super.setFocus(hP([...super.getFocus(),...n])),s.length>0&&super.setSelection(hP([...super.getSelection(),...s])),typeof o=="number"&&super.setAnchor(o)}setFocus(e,t,i=!1){super.setFocus(e,t),i||this.focusTrait.set(e.map(n=>this.element(n)),t)}setSelection(e,t,i=!1){super.setSelection(e,t),i||this.selectionTrait.set(e.map(n=>this.element(n)),t)}setAnchor(e,t=!1){super.setAnchor(e),t||(typeof e=="undefined"?this.anchorTrait.set([]):this.anchorTrait.set([this.element(e)]))}}class R5{constructor(e,t,i,n,s={}){this._options=s,this.eventBufferer=new TS,this.disposables=new le,this._onWillRefilter=new H,this.onWillRefilter=this._onWillRefilter.event,this._onDidUpdateOptions=new H;const o=new JE(i),a=new xM,l=new xM,c=new ore(l.event);this.renderers=n.map(d=>new Gm(d,()=>this.model,a.event,c,s));for(let d of this.renderers)this.disposables.add(d);let h;s.keyboardNavigationLabelProvider&&(h=new are(this,s.keyboardNavigationLabelProvider,s.filter),s=Object.assign(Object.assign({},s),{filter:h}),this.disposables.add(h)),this.focus=new eI(()=>this.view.getFocusedElements()[0],s.identityProvider),this.selection=new eI(()=>this.view.getSelectedElements()[0],s.identityProvider),this.anchor=new eI(()=>this.view.getAnchorElement(),s.identityProvider),this.view=new hre(e,t,o,this.renderers,this.focus,this.selection,this.anchor,Object.assign(Object.assign({},sre(()=>this.model,s)),{tree:this})),this.model=this.createModel(e,this.view,s),a.input=this.model.onDidChangeCollapseState;const u=ke.forEach(this.model.onDidSplice,d=>{this.eventBufferer.bufferEvents(()=>{this.focus.onDidModelSplice(d),this.selection.onDidModelSplice(d)})});if(u(()=>null,null,this.disposables),l.input=ke.chain(ke.any(u,this.focus.onDidChange,this.selection.onDidChange)).debounce(()=>null,0).map(()=>{const d=new Set;for(const f of this.focus.getNodes())d.add(f);for(const f of this.selection.getNodes())d.add(f);return[...d.values()]}).event,s.keyboardSupport!==!1){const d=ke.chain(this.view.onKeyDown).filter(f=>!Sc(f.target)).map(f=>new ei(f));d.filter(f=>f.keyCode===15).on(this.onLeftArrow,this,this.disposables),d.filter(f=>f.keyCode===17).on(this.onRightArrow,this,this.disposables),d.filter(f=>f.keyCode===10).on(this.onSpace,this,this.disposables)}if(s.keyboardNavigationLabelProvider){const d=s.keyboardNavigationDelegate||C5;this.typeFilterController=new lre(this,this.model,this.view,h,d),this.focusNavigationFilter=f=>this.typeFilterController.shouldAllowFocus(f),this.disposables.add(this.typeFilterController)}this.styleElement=Tr(this.view.getHTMLElement()),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===qm.Always)}get onDidChangeFocus(){return this.eventBufferer.wrapEvent(this.focus.onDidChange)}get onDidChangeSelection(){return this.eventBufferer.wrapEvent(this.selection.onDidChange)}get onMouseDblClick(){return ke.map(this.view.onMouseDblClick,A5)}get onPointer(){return ke.map(this.view.onPointer,A5)}get onDidFocus(){return this.view.onDidFocus}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get expandOnDoubleClick(){return typeof this._options.expandOnDoubleClick=="undefined"?!0:this._options.expandOnDoubleClick}get expandOnlyOnTwistieClick(){return typeof this._options.expandOnlyOnTwistieClick=="undefined"?!0:this._options.expandOnlyOnTwistieClick}get onDidDispose(){return this.view.onDidDispose}updateOptions(e={}){this._options=Object.assign(Object.assign({},this._options),e);for(const t of this.renderers)t.updateOptions(e);this.view.updateOptions(Object.assign(Object.assign({},this._options),{enableKeyboardNavigation:this._options.simpleKeyboardNavigation})),this.typeFilterController&&this.typeFilterController.updateOptions(this._options),this._onDidUpdateOptions.fire(this._options),this.getHTMLElement().classList.toggle("always",this._options.renderIndentGuides===qm.Always)}get options(){return this._options}getHTMLElement(){return this.view.getHTMLElement()}get scrollTop(){return this.view.scrollTop}set scrollTop(e){this.view.scrollTop=e}domFocus(){this.view.domFocus()}layout(e,t){this.view.layout(e,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.treeIndentGuidesStroke.transparent(.4)}; }`),i.push(`.monaco-list${t} .monaco-tl-indent > .indent-guide.active { border-color: ${e.treeIndentGuidesStroke}; }`)),this.styleElement.textContent=i.join(` -`),this.view.style(e)}collapse(e,t=!1){return this.model.setCollapsed(e,!0,t)}expand(e,t=!1){return this.model.setCollapsed(e,!1,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(s=>this.model.getNode(s));this.selection.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setSelection(n,t,!0)}getSelection(){return this.selection.get()}setFocus(e,t){const i=e.map(s=>this.model.getNode(s));this.focus.set(i,t);const n=e.map(s=>this.model.getListIndex(s)).filter(s=>s>-1);this.view.setFocus(n,t,!0)}focusNext(e=1,t=!1,i,n=this.focusNavigationFilter){this.view.focusNext(e,t,i,n)}getFocus(){return this.focus.get()}reveal(e,t){this.model.expandTo(e);const i=this.model.getListIndex(e);i!==-1&&this.view.reveal(i,t)}getRelativeTop(e){const t=this.model.getListIndex(e);return t===-1?null:this.view.getRelativeTop(t)}onLeftArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!0)){const o=this.model.getParentNodeLocation(n);if(!o)return;const a=this.model.getListIndex(o);this.view.reveal(a),this.view.setFocus([a])}}onRightArrow(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i);if(!this.model.setCollapsed(n,!1)){if(!i.children.some(l=>l.visible))return;const[o]=this.view.getFocus(),a=o+1;this.view.reveal(a),this.view.setFocus([a])}}onSpace(e){e.preventDefault(),e.stopPropagation();const t=this.view.getFocusedElements();if(t.length===0)return;const i=t[0],n=this.model.getNodeLocation(i),s=e.browserEvent.altKey;this.model.setCollapsed(n,void 0,s)}dispose(){ht(this.disposables),this.view.dispose()}}class tI{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.nodesByIdentity=new Map,this.model=new tre(e,t,null,i),this.onDidSplice=this.model.onDidSplice,this.onDidChangeCollapseState=this.model.onDidChangeCollapseState,this.onDidChangeRenderNodeCount=this.model.onDidChangeRenderNodeCount,i.sorter&&(this.sorter={compare(n,s){return i.sorter.compare(n.element,s.element)}}),this.identityProvider=i.identityProvider}setChildren(e,t=at.empty(),i={}){const n=this.getElementLocation(e);this._setChildren(n,this.preserveCollapseState(t),i)}_setChildren(e,t=at.empty(),i){const n=new Set,s=new Set,o=l=>{var c;if(l.element===null)return;const h=l;if(n.add(h.element),this.nodes.set(h.element,h),this.identityProvider){const u=this.identityProvider.getId(h.element).toString();s.add(u),this.nodesByIdentity.set(u,h)}(c=i.onDidCreateNode)===null||c===void 0||c.call(i,h)},a=l=>{var c;if(l.element===null)return;const h=l;if(n.has(h.element)||this.nodes.delete(h.element),this.identityProvider){const u=this.identityProvider.getId(h.element).toString();s.has(u)||this.nodesByIdentity.delete(u)}(c=i.onDidDeleteNode)===null||c===void 0||c.call(i,h)};this.model.splice([...e,0],Number.MAX_VALUE,t,Object.assign(Object.assign({},i),{onDidCreateNode:o,onDidDeleteNode:a}))}preserveCollapseState(e=at.empty()){return this.sorter&&(e=[...e].sort(this.sorter.compare.bind(this.sorter))),at.map(e,t=>{let i=this.nodes.get(t.element);if(!i&&this.identityProvider){const o=this.identityProvider.getId(t.element).toString();i=this.nodesByIdentity.get(o)}if(!i)return Object.assign(Object.assign({},t),{children:this.preserveCollapseState(t.children)});const n=typeof t.collapsible=="boolean"?t.collapsible:i.collapsible,s=typeof t.collapsed!="undefined"?t.collapsed:i.collapsed;return Object.assign(Object.assign({},t),{collapsible:n,collapsed:s,children:this.preserveCollapseState(t.children)})})}rerender(e){const t=this.getElementLocation(e);this.model.rerender(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(e===null)return this.model.getNode(this.model.rootRef);const t=this.nodes.get(e);if(!t)throw new hs(this.user,`Tree element not found: ${e}`);return t}getNodeLocation(e){return e.element}getParentNodeLocation(e){if(e===null)throw new hs(this.user,"Invalid getParentNodeLocation call");const t=this.nodes.get(e);if(!t)throw new hs(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(e===null)return[];const t=this.nodes.get(e);if(!t)throw new hs(this.user,`Tree element not found: ${e}`);return this.model.getNodeLocation(t)}}function h0(r){const e=[r.element],t=r.incompressible||!1;return{element:{elements:e,incompressible:t},children:at.map(at.from(r.children),h0),collapsible:r.collapsible,collapsed:r.collapsed}}function u0(r){const e=[r.element],t=r.incompressible||!1;let i,n;for(;[n,i]=at.consume(at.from(r.children),2),!(n.length!==1||n[0].incompressible);)r=n[0],e.push(r.element);return{element:{elements:e,incompressible:t},children:at.map(at.concat(n,i),u0),collapsible:r.collapsible,collapsed:r.collapsed}}function iI(r,e=0){let t;return e<r.element.elements.length-1?t=[iI(r,e+1)]:t=at.map(at.from(r.children),i=>iI(i,0)),e===0&&r.element.incompressible?{element:r.element.elements[e],children:t,incompressible:!0,collapsible:r.collapsible,collapsed:r.collapsed}:{element:r.element.elements[e],children:t,collapsible:r.collapsible,collapsed:r.collapsed}}function M5(r){return iI(r,0)}function P5(r,e,t){return r.element===e?Object.assign(Object.assign({},r),{children:t}):Object.assign(Object.assign({},r),{children:at.map(at.from(r.children),i=>P5(i,e,t))})}const ure=r=>({getId(e){return e.elements.map(t=>r.getId(t).toString()).join("\0")}});class dre{constructor(e,t,i={}){this.user=e,this.rootRef=null,this.nodes=new Map,this.model=new tI(e,t,i),this.enabled=typeof i.compressionEnabled=="undefined"?!0:i.compressionEnabled,this.identityProvider=i.identityProvider}get onDidSplice(){return this.model.onDidSplice}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}get onDidChangeRenderNodeCount(){return this.model.onDidChangeRenderNodeCount}setChildren(e,t=at.empty(),i){const n=i.diffIdentityProvider&&ure(i.diffIdentityProvider);if(e===null){const f=at.map(t,this.enabled?u0:h0);this._setChildren(null,f,{diffIdentityProvider:n,diffDepth:1/0});return}const s=this.nodes.get(e);if(!s)throw new Error("Unknown compressed tree node");const o=this.model.getNode(s),a=this.model.getParentNodeLocation(s),l=this.model.getNode(a),c=M5(o),h=P5(c,e,t),u=(this.enabled?u0:h0)(h),d=l.children.map(f=>f===o?u:f);this._setChildren(l.element,d,{diffIdentityProvider:n,diffDepth:o.depth-l.depth})}setCompressionEnabled(e){if(e===this.enabled)return;this.enabled=e;const i=this.model.getNode().children,n=at.map(i,M5),s=at.map(n,e?u0:h0);this._setChildren(null,s,{diffIdentityProvider:this.identityProvider,diffDepth:1/0})}_setChildren(e,t,i){const n=new Set,s=a=>{for(const l of a.element.elements)n.add(l),this.nodes.set(l,a.element)},o=a=>{for(const l of a.element.elements)n.has(l)||this.nodes.delete(l)};this.model.setChildren(e,t,Object.assign(Object.assign({},i),{onDidCreateNode:s,onDidDeleteNode:o}))}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(typeof e=="undefined")return this.model.getNode();const t=this.getCompressedNode(e);return this.model.getNode(t)}getNodeLocation(e){const t=this.model.getNodeLocation(e);return t===null?null:t.elements[t.elements.length-1]}getParentNodeLocation(e){const t=this.getCompressedNode(e),i=this.model.getParentNodeLocation(t);return i===null?null:i.elements[i.elements.length-1]}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(e===null)return null;const t=this.nodes.get(e);if(!t)throw new hs(this.user,`Tree element not found: ${e}`);return t}}const fre=r=>r[r.length-1];class nI{constructor(e,t){this.unwrapper=e,this.node=t}get element(){return this.node.element===null?null:this.unwrapper(this.node.element)}get children(){return this.node.children.map(e=>new nI(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}}function gre(r,e){return{splice(t,i,n){e.splice(t,i,n.map(s=>r.map(s)))},updateElementHeight(t,i){e.updateElementHeight(t,i)}}}function pre(r,e){return Object.assign(Object.assign({},e),{identityProvider:e.identityProvider&&{getId(t){return e.identityProvider.getId(r(t))}},sorter:e.sorter&&{compare(t,i){return e.sorter.compare(t.elements[0],i.elements[0])}},filter:e.filter&&{filter(t,i){return e.filter.filter(r(t),i)}}})}class mre{constructor(e,t,i={}){this.rootRef=null,this.elementMapper=i.elementMapper||fre;const n=s=>this.elementMapper(s.elements);this.nodeMapper=new ZE(s=>new nI(n,s)),this.model=new dre(e,gre(this.nodeMapper,t),pre(n,i))}get onDidSplice(){return ke.map(this.model.onDidSplice,({insertedNodes:e,deletedNodes:t})=>({insertedNodes:e.map(i=>this.nodeMapper.map(i)),deletedNodes:t.map(i=>this.nodeMapper.map(i))}))}get onDidChangeCollapseState(){return ke.map(this.model.onDidChangeCollapseState,({node:e,deep:t})=>({node:this.nodeMapper.map(e),deep:t}))}get onDidChangeRenderNodeCount(){return ke.map(this.model.onDidChangeRenderNodeCount,e=>this.nodeMapper.map(e))}setChildren(e,t=at.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)}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 _re=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s};class rI extends R5{constructor(e,t,i,n,s={}){super(e,t,i,n,s)}get onDidChangeCollapseState(){return this.model.onDidChangeCollapseState}setChildren(e,t=at.empty(),i){this.model.setChildren(e,t,i)}rerender(e){if(e===void 0){this.view.rerender();return}this.model.rerender(e)}hasElement(e){return this.model.has(e)}createModel(e,t,i){return new tI(e,t,i)}}class O5{constructor(e,t){this._compressedTreeNodeProvider=e,this.renderer=t,this.templateId=t.templateId,t.onDidChangeTwistieState&&(this.onDidChangeTwistieState=t.onDidChangeTwistieState)}get compressedTreeNodeProvider(){return this._compressedTreeNodeProvider()}renderTemplate(e){const t=this.renderer.renderTemplate(e);return{compressedTreeNode:void 0,data:t}}renderElement(e,t,i,n){const s=this.compressedTreeNodeProvider.getCompressedTreeNode(e.element);s.element.elements.length===1?(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){i.compressedTreeNode?this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(i.compressedTreeNode,t,i.data,n):this.renderer.disposeElement&&this.renderer.disposeElement(e,t,i.data,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.data)}renderTwistie(e,t){return this.renderer.renderTwistie?this.renderer.renderTwistie(e,t):!1}}_re([Ei],O5.prototype,"compressedTreeNodeProvider",null);function bre(r,e){return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&{getKeyboardNavigationLabel(t){let i;try{i=r().getCompressedTreeNode(t)}catch{return e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t)}return i.element.elements.length===1?e.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(t):e.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(i.element.elements)}}})}class F5 extends rI{constructor(e,t,i,n,s={}){const o=()=>this,a=n.map(l=>new O5(o,l));super(e,t,i,a,bre(o,s))}setChildren(e,t=at.empty(),i){this.model.setChildren(e,t,i)}createModel(e,t,i){return new mre(e,t,i)}updateOptions(e={}){super.updateOptions(e),typeof e.compressionEnabled!="undefined"&&this.model.setCompressionEnabled(e.compressionEnabled)}getCompressedTreeNode(e=null){return this.model.getCompressedTreeNode(e)}}var Lc=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function sI(r){return Object.assign(Object.assign({},r),{children:[],refreshPromise:void 0,stale:!0,slow:!1,collapsedByDefault:void 0})}function oI(r,e){return e.parent?e.parent===r?!0:oI(r,e.parent):!1}function vre(r,e){return r===e||oI(r,e)||oI(e,r)}class aI{constructor(e){this.node=e}get element(){return this.node.element.element}get children(){return this.node.children.map(e=>new aI(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}}class Cre{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(...l0.classNamesArray),!0):(t.classList.remove(...l0.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear()}}function B5(r){return{browserEvent:r.browserEvent,elements:r.elements.map(e=>e.element)}}function W5(r){return{browserEvent:r.browserEvent,element:r.element&&r.element.element,target:r.target}}class wre extends $m{constructor(e){super(e.elements.map(t=>t.element));this.data=e}}function lI(r){return r instanceof $m?new wre(r):r}class yre{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(i=>i.element),t)}onDragStart(e,t){this.dnd.onDragStart&&this.dnd.onDragStart(lI(e),t)}onDragOver(e,t,i,n,s=!0){return this.dnd.onDragOver(lI(e),t&&t.element,i,n)}drop(e,t,i,n){this.dnd.drop(lI(e),t&&t.element,i,n)}onDragEnd(e){this.dnd.onDragEnd&&this.dnd.onDragEnd(e)}}function V5(r){return r&&Object.assign(Object.assign({},r),{collapseByDefault:!0,identityProvider:r.identityProvider&&{getId(e){return r.identityProvider.getId(e.element)}},dnd:r.dnd&&new yre(r.dnd),multipleSelectionController:r.multipleSelectionController&&{isSelectionSingleChangeEvent(e){return r.multipleSelectionController.isSelectionSingleChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))},isSelectionRangeChangeEvent(e){return r.multipleSelectionController.isSelectionRangeChangeEvent(Object.assign(Object.assign({},e),{element:e.element}))}},accessibilityProvider:r.accessibilityProvider&&Object.assign(Object.assign({},r.accessibilityProvider),{getPosInSet:void 0,getSetSize:void 0,getRole:r.accessibilityProvider.getRole?e=>r.accessibilityProvider.getRole(e.element):()=>"treeitem",isChecked:r.accessibilityProvider.isChecked?e=>{var t;return!!((t=r.accessibilityProvider)===null||t===void 0?void 0:t.isChecked(e.element))}:void 0,getAriaLabel(e){return r.accessibilityProvider.getAriaLabel(e.element)},getWidgetAriaLabel(){return r.accessibilityProvider.getWidgetAriaLabel()},getWidgetRole:r.accessibilityProvider.getWidgetRole?()=>r.accessibilityProvider.getWidgetRole():()=>"tree",getAriaLevel:r.accessibilityProvider.getAriaLevel&&(e=>r.accessibilityProvider.getAriaLevel(e.element)),getActiveDescendantId:r.accessibilityProvider.getActiveDescendantId&&(e=>r.accessibilityProvider.getActiveDescendantId(e.element))}),filter:r.filter&&{filter(e,t){return r.filter.filter(e.element,t)}},keyboardNavigationLabelProvider:r.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},r.keyboardNavigationLabelProvider),{getKeyboardNavigationLabel(e){return r.keyboardNavigationLabelProvider.getKeyboardNavigationLabel(e.element)}}),sorter:void 0,expandOnlyOnTwistieClick:typeof r.expandOnlyOnTwistieClick=="undefined"?void 0:typeof r.expandOnlyOnTwistieClick!="function"?r.expandOnlyOnTwistieClick:e=>r.expandOnlyOnTwistieClick(e.element),additionalScrollHeight:r.additionalScrollHeight})}function cI(r,e){e(r),r.children.forEach(t=>cI(t,e))}class H5{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 H,this._onDidChangeNodeSlowState=new H,this.nodeMapper=new ZE(a=>new aI(a)),this.disposables=new le,this.identityProvider=o.identityProvider,this.autoExpandSingleChildren=typeof o.autoExpandSingleChildren=="undefined"?!1:o.autoExpandSingleChildren,this.sorter=o.sorter,this.collapseByDefault=o.collapseByDefault,this.tree=this.createTree(e,t,i,n,o),this.root=sI({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)}get onDidChangeFocus(){return ke.map(this.tree.onDidChangeFocus,B5)}get onDidChangeSelection(){return ke.map(this.tree.onDidChangeSelection,B5)}get onMouseDblClick(){return ke.map(this.tree.onMouseDblClick,W5)}get onPointer(){return ke.map(this.tree.onPointer,W5)}get onDidFocus(){return this.tree.onDidFocus}get onDidDispose(){return this.tree.onDidDispose}createTree(e,t,i,n,s){const o=new JE(i),a=n.map(c=>new Cre(c,this.nodeMapper,this._onDidChangeNodeSlowState.event)),l=V5(s)||{};return new rI(e,t,o,a,l)}updateOptions(e={}){this.tree.updateOptions(e)}getHTMLElement(){return this.tree.getHTMLElement()}get scrollTop(){return this.tree.scrollTop}set scrollTop(e){this.tree.scrollTop=e}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 Lc(this,void 0,void 0,function*(){this.refreshPromises.forEach(n=>n.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&&typeof t.scrollTop=="number"&&(this.scrollTop=t.scrollTop)})}_updateChildren(e=this.root.element,t=!0,i=!1,n,s){return Lc(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new hs(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ke.toPromise(this._onDidRender.event));const o=this.getDataNode(e);if(yield this.refreshAndRenderNode(o,t,n,s),i)try{this.tree.rerender(o)}catch{}})}rerender(e){if(e===void 0||e===this.root.element){this.tree.rerender();return}const t=this.getDataNode(e);this.tree.rerender(t)}collapse(e,t=!1){const i=this.getDataNode(e);return this.tree.collapse(i===this.root?null:i,t)}expand(e,t=!1){return Lc(this,void 0,void 0,function*(){if(typeof this.root.element=="undefined")throw new hs(this.user,"Tree input not set");this.root.refreshPromise&&(yield this.root.refreshPromise,yield ke.toPromise(this._onDidRender.event));const i=this.getDataNode(e);if(this.tree.hasElement(i)&&!this.tree.isCollapsible(i)||(i.refreshPromise&&(yield this.root.refreshPromise,yield ke.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 ke.toPromise(this._onDidRender.event)),n})}setSelection(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setSelection(i,t)}getSelection(){return this.tree.getSelection().map(t=>t.element)}setFocus(e,t){const i=e.map(n=>this.getDataNode(n));this.tree.setFocus(i,t)}getFocus(){return this.tree.getFocus().map(t=>t.element)}reveal(e,t){this.tree.reveal(this.getDataNode(e),t)}getDataNode(e){const t=this.nodes.get(e===this.root.element?null:e);if(!t)throw new hs(this.user,`Data tree node not found: ${e}`);return t}refreshAndRenderNode(e,t,i,n){return Lc(this,void 0,void 0,function*(){yield this.refreshNode(e,t,i),this.render(e,i,n)})}refreshNode(e,t,i){return Lc(this,void 0,void 0,function*(){let n;return this.subTreeRefreshPromises.forEach((s,o)=>{!n&&vre(o,e)&&(n=s.then(()=>this.refreshNode(e,t,i)))}),n||this.doRefreshSubTree(e,t,i)})}doRefreshSubTree(e,t,i){return Lc(this,void 0,void 0,function*(){let n;e.refreshPromise=new Promise(s=>n=s),this.subTreeRefreshPromises.set(e,e.refreshPromise),e.refreshPromise.finally(()=>{e.refreshPromise=void 0,this.subTreeRefreshPromises.delete(e)});try{const s=yield this.doRefreshNode(e,t,i);e.stale=!1,yield NL.settled(s.map(o=>this.doRefreshSubTree(o,t,i)))}finally{n()}})}doRefreshNode(e,t,i){return Lc(this,void 0,void 0,function*(){e.hasChildren=!!this.dataSource.hasChildren(e.element);let n;if(!e.hasChildren)n=Promise.resolve(at.empty());else{const s=Hl(800);s.then(()=>{e.slow=!0,this._onDidChangeNodeSlowState.fire(e)},o=>null),n=this.doGetChildren(e).finally(()=>s.cancel())}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),Ro(s))return[];throw s}finally{e.slow&&(e.slow=!1,this._onDidChangeNodeSlowState.fire(e))}})}doGetChildren(e){let t=this.refreshPromises.get(e);return t||(t=Oi(()=>Lc(this,void 0,void 0,function*(){const i=yield this.dataSource.getChildren(e.element);return this.processChildren(i)})),this.refreshPromises.set(e,t),t.finally(()=>{this.refreshPromises.delete(e)}))}_onDidChangeCollapseState({node:e,deep:t}){e.element!==null&&!e.collapsed&&e.element.stale&&(t?this.collapse(e.element.element):this.refreshAndRenderNode(e.element,!1).catch(Oe))}setChildren(e,t,i,n){const s=[...t];if(e.children.length===0&&s.length===0)return[];const o=new Map,a=new Map;for(const h of e.children)if(o.set(h.element,h),this.identityProvider){const u=this.tree.isCollapsed(h);a.set(h.id,{node:h,collapsed:u})}const l=[],c=s.map(h=>{const u=!!this.dataSource.hasChildren(h);if(!this.identityProvider){const p=sI({element:h,parent:e,hasChildren:u});return u&&this.collapseByDefault&&!this.collapseByDefault(h)&&(p.collapsedByDefault=!1,l.push(p)),p}const d=this.identityProvider.getId(h).toString(),f=a.get(d);if(f){const p=f.node;return o.delete(p.element),this.nodes.delete(p.element),this.nodes.set(h,p),p.element=h,p.hasChildren=u,i?f.collapsed?(p.children.forEach(_=>cI(_,v=>this.nodes.delete(v.element))),p.children.splice(0,p.children.length),p.stale=!0):l.push(p):u&&this.collapseByDefault&&!this.collapseByDefault(h)&&(p.collapsedByDefault=!1,l.push(p)),p}const g=sI({element:h,parent:e,id:d,hasChildren:u});return n&&n.viewState.focus&&n.viewState.focus.indexOf(d)>-1&&n.focus.push(g),n&&n.viewState.selection&&n.viewState.selection.indexOf(d)>-1&&n.selection.push(g),n&&n.viewState.expanded&&n.viewState.expanded.indexOf(d)>-1?l.push(g):u&&this.collapseByDefault&&!this.collapseByDefault(h)&&(g.collapsedByDefault=!1,l.push(g)),g});for(const h of o.values())cI(h,u=>this.nodes.delete(u.element));for(const h of c)this.nodes.set(h.element,h);return e.children.splice(0,e.children.length,...c),e!==this.root&&this.autoExpandSingleChildren&&c.length===1&&l.length===0&&(c[0].collapsedByDefault=!1,l.push(c[0])),l}render(e,t,i){const n=e.children.map(o=>this.asTreeElement(o,t)),s=i&&Object.assign(Object.assign({},i),{diffIdentityProvider:i.diffIdentityProvider&&{getId(o){return i.diffIdentityProvider.getId(o.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 t&&t.viewState.expanded&&e.id&&t.viewState.expanded.indexOf(e.id)>-1?i=!1:i=e.collapsedByDefault,e.collapsedByDefault=void 0,{element:e,children:e.hasChildren?at.map(e.children,n=>this.asTreeElement(n,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()}}class hI{constructor(e){this.node=e}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 hI(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}}class Sre{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(...l0.classNamesArray),!0):(t.classList.remove(...l0.classNamesArray),!1)}disposeElement(e,t,i,n){this.renderer.disposeElement&&this.renderer.disposeElement(this.nodeMapper.map(e),t,i.templateData,n)}disposeCompressedElements(e,t,i,n){this.renderer.disposeCompressedElements&&this.renderer.disposeCompressedElements(this.compressibleNodeMapperProvider().map(e),t,i.templateData,n)}disposeTemplate(e){this.renderer.disposeTemplate(e.templateData)}dispose(){this.renderedNodes.clear(),this.disposables=ht(this.disposables)}}function Lre(r){const e=r&&V5(r);return e&&Object.assign(Object.assign({},e),{keyboardNavigationLabelProvider:e.keyboardNavigationLabelProvider&&Object.assign(Object.assign({},e.keyboardNavigationLabelProvider),{getCompressedNodeKeyboardNavigationLabel(t){return r.keyboardNavigationLabelProvider.getCompressedNodeKeyboardNavigationLabel(t.map(i=>i.element))}})})}class xre extends H5{constructor(e,t,i,n,s,o,a={}){super(e,t,i,s,o,a);this.compressionDelegate=n,this.compressibleNodeMapper=new ZE(l=>new hI(l)),this.filter=a.filter}createTree(e,t,i,n,s){const o=new JE(i),a=n.map(c=>new Sre(c,this.nodeMapper,()=>this.compressibleNodeMapper,this._onDidChangeNodeSlowState.event)),l=Lre(s)||{};return new F5(e,t,o,a,l)}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=d=>this.identityProvider.getId(d).toString(),n=d=>{const f=new Set;for(const g of d){const p=this.tree.getCompressedTreeNode(g===this.root?null:g);if(!!p.element)for(const _ of p.element.elements)f.add(i(_.element))}return f},s=n(this.tree.getSelection()),o=n(this.tree.getFocus());super.render(e,t);const a=this.getSelection();let l=!1;const c=this.getFocus();let h=!1;const u=d=>{const f=d.element;if(f)for(let g=0;g<f.elements.length;g++){const p=i(f.elements[g].element),_=f.elements[f.elements.length-1].element;s.has(p)&&a.indexOf(_)===-1&&(a.push(_),l=!0),o.has(p)&&c.indexOf(_)===-1&&(c.push(_),h=!0)}d.children.forEach(u)};u(this.tree.getCompressedTreeNode(e===this.root?null:e)),l&&this.setSelection(a),h&&this.setFocus(c)}processChildren(e){return this.filter&&(e=at.filter(e,t=>{const i=this.filter.filter(t,1),n=kre(i);if(n===2)throw new Error("Recursive tree visibility not supported in async data compressed trees");return n===1})),super.processChildren(e)}}function kre(r){return typeof r=="boolean"?r?1:0:YE(r)?Km(r.visibility):Km(r)}class Dre extends R5{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 tI(e,t,i)}}const d0=new Le("isWindows",Xi,m("isWindows","Whether the operating system is Windows")),Ere="inputFocus";var na=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ye=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const us=bt("listService");let uI=class{constructor(e){this._themeService=e,this.disposables=new le,this.lists=[],this._lastFocusedWidget=void 0,this._hasCreatedStyleController=!1}get lastFocusedList(){return this._lastFocusedWidget}register(e,t){if(!this._hasCreatedStyleController){this._hasCreatedStyleController=!0;const n=new x5(Tr(),"");this.disposables.add(gu(n,this._themeService))}if(this.lists.some(n=>n.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._lastFocusedWidget=e),Fl(e.onDidFocus(()=>this._lastFocusedWidget=e),Xe(()=>this.lists.splice(this.lists.indexOf(i),1)),e.onDidDispose(()=>{this.lists=this.lists.filter(n=>n!==i),this._lastFocusedWidget===e&&(this._lastFocusedWidget=void 0)}))}dispose(){this.disposables.dispose()}};uI=na([Ye(0,qt)],uI);const z5=new Le("listFocus",!0),f0=new Le("listSupportsMultiselect",!0),$5=_e.and(z5,_e.not(Ere)),dI=new Le("listHasSelectionOrFocus",!1),fI=new Le("listDoubleSelection",!1),gI=new Le("listMultiSelection",!1),g0=new Le("listSelectionNavigation",!1),U5="listAutomaticKeyboardNavigation";function p0(r,e){const t=r.createScoped(e.getHTMLElement());return z5.bindTo(t),t}const bu="workbench.list.multiSelectModifier",pI="workbench.list.openMode",ds="workbench.list.horizontalScrolling",m0="workbench.list.keyboardNavigation",mI="workbench.list.automaticKeyboardNavigation",Zm="workbench.tree.indent",_0="workbench.tree.renderIndentGuides",po="workbench.list.smoothScrolling",ra="workbench.list.mouseWheelScrollSensitivity",sa="workbench.list.fastScrollSensitivity",b0="workbench.tree.expandMode";function oa(r){return r.getValue(bu)==="alt"}class Ire extends Y{constructor(e){super();this.configurationService=e,this.useAltAsMultipleSelectionModifier=oa(e),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(e=>{e.affectsConfiguration(bu)&&(this.useAltAsMultipleSelectionModifier=oa(this.configurationService))}))}isSelectionSingleChangeEvent(e){return this.useAltAsMultipleSelectionModifier?e.browserEvent.altKey:w5(e)}isSelectionRangeChangeEvent(e){return y5(e)}}function v0(r,e,t){var i;const n=new le;return[Object.assign(Object.assign({},r),{keyboardNavigationDelegate:{mightProducePrintableCharacter(o){return t.mightProducePrintableCharacter(o)}},smoothScrolling:Boolean(e.getValue(po)),mouseWheelScrollSensitivity:e.getValue(ra),fastScrollSensitivity:e.getValue(sa),multipleSelectionController:(i=r.multipleSelectionController)!==null&&i!==void 0?i:n.add(new Ire(e))}),n]}let _I=class extends ia{constructor(e,t,i,n,s,o,a,l,c,h){const u=typeof s.horizontalScrolling!="undefined"?s.horizontalScrolling:Boolean(c.getValue(ds)),[d,f]=v0(s,c,h);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},fo(l.getColorTheme(),i0)),d),{horizontalScrolling:u}));this.disposables.add(f),this.contextKeyService=p0(o,this),this.themeService=l,this.listSupportsMultiSelect=f0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),g0.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this.listHasSelectionOrFocus=dI.bindTo(this.contextKeyService),this.listDoubleSelection=fI.bindTo(this.contextKeyService),this.listMultiSelection=gI.bindTo(this.contextKeyService),this.horizontalScrolling=s.horizontalScrolling,this._useAltAsMultipleSelectionModifier=oa(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const p=this.getSelection(),_=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(p.length>0||_.length>0),this.listMultiSelection.set(p.length>1),this.listDoubleSelection.set(p.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const p=this.getSelection(),_=this.getFocus();this.listHasSelectionOrFocus.set(p.length>0||_.length>0)})),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(bu)&&(this._useAltAsMultipleSelectionModifier=oa(c));let _={};if(p.affectsConfiguration(ds)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(ds));_=Object.assign(Object.assign({},_),{horizontalScrolling:v})}if(p.affectsConfiguration(po)){const v=Boolean(c.getValue(po));_=Object.assign(Object.assign({},_),{smoothScrolling:v})}if(p.affectsConfiguration(ra)){const v=c.getValue(ra);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:v})}if(p.affectsConfiguration(sa)){const v=c.getValue(sa);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:v})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new q5(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=gu(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),super.dispose()}};_I=na([Ye(5,Fe),Ye(6,us),Ye(7,qt),Ye(8,hi),Ye(9,Qt)],_I);let j5=class extends Zne{constructor(e,t,i,n,s,o,a,l,c,h){const u=typeof s.horizontalScrolling!="undefined"?s.horizontalScrolling:Boolean(c.getValue(ds)),[d,f]=v0(s,c,h);super(e,t,i,n,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},fo(l.getColorTheme(),i0)),d),{horizontalScrolling:u}));this.disposables=new le,this.disposables.add(f),this.contextKeyService=p0(o,this),this.themeService=l,this.horizontalScrolling=s.horizontalScrolling,this.listSupportsMultiSelect=f0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(s.multipleSelectionSupport!==!1),g0.bindTo(this.contextKeyService).set(Boolean(s.selectionNavigation)),this._useAltAsMultipleSelectionModifier=oa(c),this.disposables.add(this.contextKeyService),this.disposables.add(a.register(this)),s.overrideStyles&&this.updateStyles(s.overrideStyles),s.overrideStyles&&this.disposables.add(gu(this,l,s.overrideStyles)),this.disposables.add(c.onDidChangeConfiguration(p=>{p.affectsConfiguration(bu)&&(this._useAltAsMultipleSelectionModifier=oa(c));let _={};if(p.affectsConfiguration(ds)&&this.horizontalScrolling===void 0){const v=Boolean(c.getValue(ds));_=Object.assign(Object.assign({},_),{horizontalScrolling:v})}if(p.affectsConfiguration(po)){const v=Boolean(c.getValue(po));_=Object.assign(Object.assign({},_),{smoothScrolling:v})}if(p.affectsConfiguration(ra)){const v=c.getValue(ra);_=Object.assign(Object.assign({},_),{mouseWheelScrollSensitivity:v})}if(p.affectsConfiguration(sa)){const v=c.getValue(sa);_=Object.assign(Object.assign({},_),{fastScrollSensitivity:v})}Object.keys(_).length>0&&this.updateOptions(_)})),this.navigator=new q5(this,Object.assign({configurationService:c},s)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=gu(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};j5=na([Ye(5,Fe),Ye(6,us),Ye(7,qt),Ye(8,hi),Ye(9,Qt)],j5);let K5=class extends a0{constructor(e,t,i,n,s,o,a,l,c,h,u){const d=typeof o.horizontalScrolling!="undefined"?o.horizontalScrolling:Boolean(h.getValue(ds)),[f,g]=v0(o,h,u);super(e,t,i,n,s,Object.assign(Object.assign(Object.assign({keyboardSupport:!1},fo(c.getColorTheme(),i0)),f),{horizontalScrolling:d}));this.disposables=new le,this.disposables.add(g),this.contextKeyService=p0(a,this),this.themeService=c,this.listSupportsMultiSelect=f0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(o.multipleSelectionSupport!==!1),g0.bindTo(this.contextKeyService).set(Boolean(o.selectionNavigation)),this.listHasSelectionOrFocus=dI.bindTo(this.contextKeyService),this.listDoubleSelection=fI.bindTo(this.contextKeyService),this.listMultiSelection=gI.bindTo(this.contextKeyService),this.horizontalScrolling=o.horizontalScrolling,this._useAltAsMultipleSelectionModifier=oa(h),this.disposables.add(this.contextKeyService),this.disposables.add(l.register(this)),o.overrideStyles&&this.updateStyles(o.overrideStyles),this.disposables.add(this.onDidChangeSelection(()=>{const _=this.getSelection(),v=this.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.listHasSelectionOrFocus.set(_.length>0||v.length>0),this.listMultiSelection.set(_.length>1),this.listDoubleSelection.set(_.length===2)})})),this.disposables.add(this.onDidChangeFocus(()=>{const _=this.getSelection(),v=this.getFocus();this.listHasSelectionOrFocus.set(_.length>0||v.length>0)})),this.disposables.add(h.onDidChangeConfiguration(_=>{_.affectsConfiguration(bu)&&(this._useAltAsMultipleSelectionModifier=oa(h));let v={};if(_.affectsConfiguration(ds)&&this.horizontalScrolling===void 0){const b=Boolean(h.getValue(ds));v=Object.assign(Object.assign({},v),{horizontalScrolling:b})}if(_.affectsConfiguration(po)){const b=Boolean(h.getValue(po));v=Object.assign(Object.assign({},v),{smoothScrolling:b})}if(_.affectsConfiguration(ra)){const b=h.getValue(ra);v=Object.assign(Object.assign({},v),{mouseWheelScrollSensitivity:b})}if(_.affectsConfiguration(sa)){const b=h.getValue(sa);v=Object.assign(Object.assign({},v),{fastScrollSensitivity:b})}Object.keys(v).length>0&&this.updateOptions(v)})),this.navigator=new Nre(this,Object.assign({configurationService:h},o)),this.disposables.add(this.navigator)}updateOptions(e){super.updateOptions(e),e.overrideStyles&&this.updateStyles(e.overrideStyles),e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyles(e){var t;(t=this._styler)===null||t===void 0||t.dispose(),this._styler=gu(this,this.themeService,e)}dispose(){var e;(e=this._styler)===null||e===void 0||e.dispose(),this.disposables.dispose(),super.dispose()}};K5=na([Ye(6,Fe),Ye(7,us),Ye(8,qt),Ye(9,hi),Ye(10,Qt)],K5);class bI extends Y{constructor(e,t){var i;super();this.widget=e,this._onDidOpen=this._register(new H),this.onDidOpen=this._onDidOpen.event,this._register(ke.filter(this.widget.onDidChangeSelection,n=>n.browserEvent instanceof KeyboardEvent)(n=>this.onSelectionFromKeyboard(n))),this._register(this.widget.onPointer(n=>this.onPointer(n.element,n.browserEvent))),this._register(this.widget.onMouseDblClick(n=>this.onMouseDblClick(n.element,n.browserEvent))),typeof(t==null?void 0:t.openOnSingleClick)!="boolean"&&(t==null?void 0:t.configurationService)?(this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(pI))!=="doubleClick",this._register(t==null?void 0:t.configurationService.onDidChangeConfiguration(()=>{this.openOnSingleClick=(t==null?void 0:t.configurationService.getValue(pI))!=="doubleClick"}))):this.openOnSingleClick=(i=t==null?void 0:t.openOnSingleClick)!==null&&i!==void 0?i:!0}onSelectionFromKeyboard(e){if(e.elements.length!==1)return;const t=e.browserEvent,i=typeof t.preserveFocus=="boolean"?t.preserveFocus:!0,n=typeof t.pinned=="boolean"?t.pinned:!i,s=!1;this._open(this.getSelectedElement(),i,n,s,e.browserEvent)}onPointer(e,t){if(!this.openOnSingleClick||t.detail===2)return;const n=t.button===1,s=!0,o=n,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,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 s=!1,o=!0,a=t.ctrlKey||t.metaKey||t.altKey;this._open(e,s,o,a,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 q5 extends bI{constructor(e,t){super(e,t);this.widget=e}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Nre extends bI{constructor(e,t){super(e,t)}getSelectedElement(){return this.widget.getSelectedElements()[0]}}class Tre extends bI{constructor(e,t){super(e,t)}getSelectedElement(){var e;return(e=this.widget.getSelection()[0])!==null&&e!==void 0?e:void 0}}function Are(r,e){let t=!1;return i=>{if(t)return t=!1,!1;const n=e.softDispatch(i,r);return n&&n.enterChord?(t=!0,!1):(t=!1,!0)}}let G5=class extends rI{constructor(e,t,i,n,s,o,a,l,c,h,u){const{options:d,getAutomaticKeyboardNavigation:f,disposable:g}=Ym(t,s,o,c,h,u);super(e,t,i,n,d);this.disposables.add(g),this.internals=new vu(this,s,f,s.overrideStyles,o,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};G5=na([Ye(5,Fe),Ye(6,us),Ye(7,qt),Ye(8,hi),Ye(9,Qt),Ye(10,_r)],G5);let Z5=class extends F5{constructor(e,t,i,n,s,o,a,l,c,h,u){const{options:d,getAutomaticKeyboardNavigation:f,disposable:g}=Ym(t,s,o,c,h,u);super(e,t,i,n,d);this.disposables.add(g),this.internals=new vu(this,s,f,s.overrideStyles,o,a,l,c,u),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Z5=na([Ye(5,Fe),Ye(6,us),Ye(7,qt),Ye(8,hi),Ye(9,Qt),Ye(10,_r)],Z5);let Y5=class extends Dre{constructor(e,t,i,n,s,o,a,l,c,h,u,d){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=Ym(t,o,a,h,u,d);super(e,t,i,n,s,f);this.disposables.add(p),this.internals=new vu(this,o,g,o.overrideStyles,a,l,c,h,d),this.disposables.add(this.internals)}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};Y5=na([Ye(6,Fe),Ye(7,us),Ye(8,qt),Ye(9,hi),Ye(10,Qt),Ye(11,_r)],Y5);let vI=class extends H5{constructor(e,t,i,n,s,o,a,l,c,h,u,d){const{options:f,getAutomaticKeyboardNavigation:g,disposable:p}=Ym(t,o,a,h,u,d);super(e,t,i,n,s,f);this.disposables.add(p),this.internals=new vu(this,o,g,o.overrideStyles,a,l,c,h,d),this.disposables.add(this.internals)}get onDidOpen(){return this.internals.onDidOpen}updateOptions(e={}){super.updateOptions(e),e.overrideStyles&&this.internals.updateStyleOverrides(e.overrideStyles),this.internals.updateOptions(e)}};vI=na([Ye(6,Fe),Ye(7,us),Ye(8,qt),Ye(9,hi),Ye(10,Qt),Ye(11,_r)],vI);let X5=class extends xre{constructor(e,t,i,n,s,o,a,l,c,h,u,d,f){const{options:g,getAutomaticKeyboardNavigation:p,disposable:_}=Ym(t,a,l,u,d,f);super(e,t,i,n,s,o,g);this.disposables.add(_),this.internals=new vu(this,a,p,a.overrideStyles,l,c,h,u,f),this.disposables.add(this.internals)}updateOptions(e){super.updateOptions(e),this.internals.updateOptions(e)}};X5=na([Ye(7,Fe),Ye(8,us),Ye(9,qt),Ye(10,hi),Ye(11,Qt),Ye(12,_r)],X5);function Ym(r,e,t,i,n,s){var o;const a=()=>{let g=Boolean(t.getContextKeyValue(U5));return g&&(g=Boolean(i.getValue(mI))),g},l=s.isScreenReaderOptimized(),c=e.simpleKeyboardNavigation||l?"simple":i.getValue(m0),h=e.horizontalScrolling!==void 0?e.horizontalScrolling:Boolean(i.getValue(ds)),[u,d]=v0(e,i,n),f=e.additionalScrollHeight;return{getAutomaticKeyboardNavigation:a,disposable:d,options:Object.assign(Object.assign({keyboardSupport:!1},u),{indent:typeof i.getValue(Zm)=="number"?i.getValue(Zm):void 0,renderIndentGuides:i.getValue(_0),smoothScrolling:Boolean(i.getValue(po)),automaticKeyboardNavigation:a(),simpleKeyboardNavigation:c==="simple",filterOnType:c==="filter",horizontalScrolling:h,keyboardNavigationEventFilter:Are(r,n),additionalScrollHeight:f,hideTwistiesOfChildlessElements:e.hideTwistiesOfChildlessElements,expandOnlyOnTwistieClick:(o=e.expandOnlyOnTwistieClick)!==null&&o!==void 0?o:i.getValue(b0)==="doubleClick"})}}let vu=class{constructor(e,t,i,n,s,o,a,l,c){this.tree=e,this.themeService=a,this.disposables=[],this.contextKeyService=p0(s,e),this.listSupportsMultiSelect=f0.bindTo(this.contextKeyService),this.listSupportsMultiSelect.set(t.multipleSelectionSupport!==!1),g0.bindTo(this.contextKeyService).set(Boolean(t.selectionNavigation)),this.hasSelectionOrFocus=dI.bindTo(this.contextKeyService),this.hasDoubleSelection=fI.bindTo(this.contextKeyService),this.hasMultiSelection=gI.bindTo(this.contextKeyService),this._useAltAsMultipleSelectionModifier=oa(l);const u=new Set;u.add(U5);const d=()=>{const g=c.isScreenReaderOptimized()?"simple":l.getValue(m0);e.updateOptions({simpleKeyboardNavigation:g==="simple",filterOnType:g==="filter"})};this.updateStyleOverrides(n),this.disposables.push(this.contextKeyService,o.register(e),e.onDidChangeSelection(()=>{const f=e.getSelection(),g=e.getFocus();this.contextKeyService.bufferChangeEvents(()=>{this.hasSelectionOrFocus.set(f.length>0||g.length>0),this.hasMultiSelection.set(f.length>1),this.hasDoubleSelection.set(f.length===2)})}),e.onDidChangeFocus(()=>{const f=e.getSelection(),g=e.getFocus();this.hasSelectionOrFocus.set(f.length>0||g.length>0)}),l.onDidChangeConfiguration(f=>{let g={};if(f.affectsConfiguration(bu)&&(this._useAltAsMultipleSelectionModifier=oa(l)),f.affectsConfiguration(Zm)){const p=l.getValue(Zm);g=Object.assign(Object.assign({},g),{indent:p})}if(f.affectsConfiguration(_0)){const p=l.getValue(_0);g=Object.assign(Object.assign({},g),{renderIndentGuides:p})}if(f.affectsConfiguration(po)){const p=Boolean(l.getValue(po));g=Object.assign(Object.assign({},g),{smoothScrolling:p})}if(f.affectsConfiguration(m0)&&d(),f.affectsConfiguration(mI)&&(g=Object.assign(Object.assign({},g),{automaticKeyboardNavigation:i()})),f.affectsConfiguration(ds)&&t.horizontalScrolling===void 0){const p=Boolean(l.getValue(ds));g=Object.assign(Object.assign({},g),{horizontalScrolling:p})}if(f.affectsConfiguration(b0)&&t.expandOnlyOnTwistieClick===void 0&&(g=Object.assign(Object.assign({},g),{expandOnlyOnTwistieClick:l.getValue(b0)==="doubleClick"})),f.affectsConfiguration(ra)){const p=l.getValue(ra);g=Object.assign(Object.assign({},g),{mouseWheelScrollSensitivity:p})}if(f.affectsConfiguration(sa)){const p=l.getValue(sa);g=Object.assign(Object.assign({},g),{fastScrollSensitivity:p})}Object.keys(g).length>0&&e.updateOptions(g)}),this.contextKeyService.onDidChangeContext(f=>{f.affectsSome(u)&&e.updateOptions({automaticKeyboardNavigation:i()})}),c.onDidChangeScreenReaderOptimized(()=>d())),this.navigator=new Tre(e,Object.assign({configurationService:l},t)),this.disposables.push(this.navigator)}get onDidOpen(){return this.navigator.onDidOpen}updateOptions(e){e.multipleSelectionSupport!==void 0&&this.listSupportsMultiSelect.set(!!e.multipleSelectionSupport)}updateStyleOverrides(e){ht(this.styler),this.styler=e?gu(this.tree,this.themeService,e):Y.None}dispose(){this.disposables=ht(this.disposables),ht(this.styler),this.styler=void 0}};vu=na([Ye(4,Fe),Ye(5,us),Ye(6,qt),Ye(7,hi),Ye(8,_r)],vu);const Rre=mi.as(Dh.Configuration);Rre.registerConfiguration({id:"workbench",order:7,title:m("workbenchConfigurationTitle","Workbench"),type:"object",properties:{[bu]:{type:"string",enum:["ctrlCmd","alt"],enumDescriptions:[m("multiSelectModifier.ctrlCmd","Maps to `Control` on Windows and Linux and to `Command` on macOS."),m("multiSelectModifier.alt","Maps to `Alt` on Windows and Linux and to `Option` on macOS.")],default:"ctrlCmd",description:m({key:"multiSelectModifier",comment:["- `ctrlCmd` refers to a value the setting can take and should not be localized.","- `Control` and `Command` refer to the modifier keys Ctrl or Cmd on the keyboard and can be localized."]},"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.")},[pI]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m({key:"openModeModifier",comment:["`singleClick` and `doubleClick` refers to a value the setting can take and should not be localized."]},"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.")},[ds]:{type:"boolean",default:!1,description:m("horizontalScrolling setting","Controls whether lists and trees support horizontal scrolling in the workbench. Warning: turning on this setting has a performance implication.")},[Zm]:{type:"number",default:8,minimum:0,maximum:40,description:m("tree indent setting","Controls tree indentation in pixels.")},[_0]:{type:"string",enum:["none","onHover","always"],default:"onHover",description:m("render tree indent guides","Controls whether the tree should render indent guides.")},[po]:{type:"boolean",default:!1,description:m("list smoothScrolling setting","Controls whether lists and trees have smooth scrolling.")},[ra]:{type:"number",default:1,description:m("Mouse Wheel Scroll Sensitivity","A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events.")},[sa]:{type:"number",default:5,description:m("Fast Scroll Sensitivity","Scrolling speed multiplier when pressing `Alt`.")},[m0]:{type:"string",enum:["simple","highlight","filter"],enumDescriptions:[m("keyboardNavigationSettingKey.simple","Simple keyboard navigation focuses elements which match the keyboard input. Matching is done only on prefixes."),m("keyboardNavigationSettingKey.highlight","Highlight keyboard navigation highlights elements which match the keyboard input. Further up and down navigation will traverse only the highlighted elements."),m("keyboardNavigationSettingKey.filter","Filter keyboard navigation will filter out and hide all the elements which do not match the keyboard input.")],default:"highlight",description:m("keyboardNavigationSettingKey","Controls the keyboard navigation style for lists and trees in the workbench. Can be simple, highlight and filter.")},[mI]:{type:"boolean",default:!0,markdownDescription:m("automatic keyboard navigation setting","Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to `false`, keyboard navigation is only triggered when executing the `list.toggleKeyboardNavigation` command, for which you can assign a keyboard shortcut.")},[b0]:{type:"string",enum:["singleClick","doubleClick"],default:"singleClick",description:m("expand mode","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.")}}});var ii;(function(r){r[r.Hint=1]="Hint",r[r.Info=2]="Info",r[r.Warning=4]="Warning",r[r.Error=8]="Error"})(ii||(ii={}));(function(r){function e(o,a){return a-o}r.compare=e;const t=Object.create(null);t[r.Error]=m("sev.error","Error"),t[r.Warning]=m("sev.warning","Warning"),t[r.Info]=m("sev.info","Info");function i(o){return t[o]||""}r.toString=i;function n(o){switch(o){case si.Error:return r.Error;case si.Warning:return r.Warning;case si.Info:return r.Info;case si.Ignore:return r.Hint}}r.fromSeverity=n;function s(o){switch(o){case r.Error:return si.Error;case r.Warning:return si.Warning;case r.Info:return si.Info;case r.Hint:return si.Ignore}}r.toSeverity=s})(ii||(ii={}));var C0;(function(r){const e="";function t(n){return i(n,!0)}r.makeKey=t;function i(n,s){let o=[e];return n.source?o.push(n.source.replace("\xA6","\\\xA6")):o.push(e),n.code?typeof n.code=="string"?o.push(n.code.replace("\xA6","\\\xA6")):o.push(n.code.value.replace("\xA6","\\\xA6")):o.push(e),n.severity!==void 0&&n.severity!==null?o.push(ii.toString(n.severity)):o.push(e),n.message&&s?o.push(n.message.replace("\xA6","\\\xA6")):o.push(e),n.startLineNumber!==void 0&&n.startLineNumber!==null?o.push(n.startLineNumber.toString()):o.push(e),n.startColumn!==void 0&&n.startColumn!==null?o.push(n.startColumn.toString()):o.push(e),n.endLineNumber!==void 0&&n.endLineNumber!==null?o.push(n.endLineNumber.toString()):o.push(e),n.endColumn!==void 0&&n.endColumn!==null?o.push(n.endColumn.toString()):o.push(e),o.push(e),o.join("\xA6")}r.makeKeyOptionalMessage=i})(C0||(C0={}));const Xm=bt("markerService");class Mre{constructor(){this._byResource=new Pn,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 Pn,this._byOwner.set(t,s)),s.set(e,i)}get(e,t){let i=this._byResource.get(e);return i==null?void 0:i.get(t)}delete(e,t){let i=!1,n=!1,s=this._byResource.get(e);s&&(i=s.delete(t));let 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 typeof e=="string"?(i=(t=this._byOwner.get(e))===null||t===void 0?void 0:t.values())!==null&&i!==void 0?i:at.empty():Ie.isUri(e)?(s=(n=this._byResource.get(e))===null||n===void 0?void 0:n.values())!==null&&s!==void 0?s:at.empty():at.map(at.concat(...this._byOwner.values()),o=>o[1])}}class Pre{constructor(e){this.errors=0,this.infos=0,this.warnings=0,this.unknowns=0,this._data=new Pn,this._service=e,this._subscription=e.onMarkerChanged(this._update,this)}dispose(){this._subscription.dispose()}_update(e){for(const t of e){const i=this._data.get(t);i&&this._substract(i);const n=this._resourceStats(t);this._add(n),this._data.set(t,n)}}_resourceStats(e){const t={errors:0,warnings:0,infos:0,unknowns:0};if(e.scheme===Ze.inMemory||e.scheme===Ze.walkThrough||e.scheme===Ze.walkThroughSnippet)return t;for(const{severity:i}of this._service.read({resource:e}))i===ii.Error?t.errors+=1:i===ii.Warning?t.warnings+=1:i===ii.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 Cu{constructor(){this._onMarkerChanged=new WU({delay:0,merge:Cu._merge}),this.onMarkerChanged=this._onMarkerChanged.event,this._data=new Mre,this._stats=new Pre(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(lP(i))this._data.delete(t,e)&&this._onMarkerChanged.fire([t]);else{const n=[];for(const s of i){const o=Cu._toMarker(e,t,s);o&&n.push(o)}this._data.set(t,e,n),this._onMarkerChanged.fire([t])}}static _toMarker(e,t,i){let{code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:h,endColumn:u,relatedInformation:d,tags:f}=i;if(!!o)return l=l>0?l:1,c=c>0?c:1,h=h>=l?h:l,u=u>0?u:c,{resource:t,owner:e,code:n,severity:s,message:o,source:a,startLineNumber:l,startColumn:c,endLineNumber:h,endColumn:u,relatedInformation:d,tags:f}}read(e=Object.create(null)){let{owner:t,resource:i,severities:n,take:s}=e;if((!s||s<0)&&(s=-1),t&&i){const o=this._data.get(i,t);if(o){const a=[];for(const l of o)if(Cu._accept(l,n)){const c=a.push(l);if(s>0&&c===s)break}return a}else return[]}else if(!t&&!i){const o=[];for(let a of this._data.values())for(let l of a)if(Cu._accept(l,n)){const c=o.push(l);if(s>0&&c===s)return o}return o}else{const o=this._data.values(i!=null?i:t),a=[];for(const l of o)for(const c of l)if(Cu._accept(c,n)){const h=a.push(c);if(s>0&&h===s)return a}return a}}static _accept(e,t){return t===void 0||(t&e.severity)===e.severity}static _merge(e){const t=new Pn;for(let i of e)for(let n of i)t.set(n,!0);return Array.from(t.keys())}}var w0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Wf;(function(r){r[r.None=0]="None",r[r.Initialized=1]="Initialized",r[r.Closed=2]="Closed"})(Wf||(Wf={}));class Qm extends Y{constructor(e,t=Object.create(null)){super();this.database=e,this.options=t,this._onDidChangeStorage=this._register(new H),this.onDidChangeStorage=this._onDidChangeStorage.event,this.state=Wf.None,this.cache=new Map,this.flushDelayer=new _j(Qm.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;(t=e.changed)===null||t===void 0||t.forEach((n,s)=>this.accept(s,n)),(i=e.deleted)===null||i===void 0||i.forEach(n=>this.accept(n,void 0))}accept(e,t){if(this.state===Wf.Closed)return;let i=!1;Zr(t)?i=this.cache.delete(e):this.cache.get(e)!==t&&(this.cache.set(e,t),i=!0),i&&this._onDidChangeStorage.fire(e)}get(e,t){const i=this.cache.get(e);return Zr(i)?t:i}getBoolean(e,t){const i=this.get(e);return Zr(i)?t:i==="true"}getNumber(e,t){const i=this.get(e);return Zr(i)?t:parseInt(i,10)}set(e,t){return w0(this,void 0,void 0,function*(){if(this.state===Wf.Closed)return;if(Zr(t))return this.delete(e);const i=String(t);if(this.cache.get(e)!==i)return this.cache.set(e,i),this.pendingInserts.set(e,i),this.pendingDeletes.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())})}delete(e){return w0(this,void 0,void 0,function*(){if(!(this.state===Wf.Closed||!this.cache.delete(e)))return this.pendingDeletes.has(e)||this.pendingDeletes.add(e),this.pendingInserts.delete(e),this._onDidChangeStorage.fire(e),this.flushDelayer.trigger(()=>this.flushPending())})}get hasPending(){return this.pendingInserts.size>0||this.pendingDeletes.size>0}flushPending(){return w0(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 t;if(!this.hasPending)for(;this.whenFlushedCallbacks.length;)(t=this.whenFlushedCallbacks.pop())===null||t===void 0||t()})})}dispose(){this.flushDelayer.dispose(),super.dispose()}}Qm.DEFAULT_FLUSH_DELAY=100;class Q5{constructor(){this.onDidChangeItemsExternal=ke.None,this.items=new Map}updateItems(e){return w0(this,void 0,void 0,function*(){e.insert&&e.insert.forEach((t,i)=>this.items.set(i,t)),e.delete&&e.delete.forEach(t=>this.items.delete(t))})}}const y0="__$__targetStorageMarker",aa=bt("storageService");var S0;(function(r){r[r.NONE=0]="NONE",r[r.SHUTDOWN=1]="SHUTDOWN"})(S0||(S0={}));class L0 extends Y{constructor(e={flushInterval:L0.DEFAULT_FLUSH_INTERVAL}){super();this.options=e,this._onDidChangeValue=this._register(new Yb),this._onDidChangeTarget=this._register(new Yb),this._onWillSaveState=this._register(new H),this.onWillSaveState=this._onWillSaveState.event,this._workspaceKeyTargets=void 0,this._globalKeyTargets=void 0}emitDidChangeValue(e,t){t===y0?(e===0?this._globalKeyTargets=void 0:e===1&&(this._workspaceKeyTargets=void 0),this._onDidChangeTarget.fire({scope:e})):this._onDidChangeValue.fire({scope:e,key:t,target:this.getKeyTargets(e)[t]})}get(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.get(e,i)}getBoolean(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getBoolean(e,i)}getNumber(e,t,i){var n;return(n=this.getStorage(t))===null||n===void 0?void 0:n.getNumber(e,i)}store(e,t,i,n){if(Zr(t)){this.remove(e,i);return}this.withPausedEmitters(()=>{var s;this.updateKeyTarget(e,i,n),(s=this.getStorage(i))===null||s===void 0||s.set(e,t)})}remove(e,t){this.withPausedEmitters(()=>{var i;this.updateKeyTarget(e,t,void 0),(i=this.getStorage(t))===null||i===void 0||i.delete(e)})}withPausedEmitters(e){this._onDidChangeValue.pause(),this._onDidChangeTarget.pause();try{e()}finally{this._onDidChangeValue.resume(),this._onDidChangeTarget.resume()}}updateKeyTarget(e,t,i){var n,s;const o=this.getKeyTargets(t);typeof i=="number"?o[e]!==i&&(o[e]=i,(n=this.getStorage(t))===null||n===void 0||n.set(y0,JSON.stringify(o))):typeof o[e]=="number"&&(delete o[e],(s=this.getStorage(t))===null||s===void 0||s.set(y0,JSON.stringify(o)))}get workspaceKeyTargets(){return this._workspaceKeyTargets||(this._workspaceKeyTargets=this.loadKeyTargets(1)),this._workspaceKeyTargets}get globalKeyTargets(){return this._globalKeyTargets||(this._globalKeyTargets=this.loadKeyTargets(0)),this._globalKeyTargets}getKeyTargets(e){return e===0?this.globalKeyTargets:this.workspaceKeyTargets}loadKeyTargets(e){const t=this.get(y0,e);if(t)try{return JSON.parse(t)}catch{}return Object.create(null)}}L0.DEFAULT_FLUSH_INTERVAL=60*1e3;class Ore extends L0{constructor(){super();this.globalStorage=this._register(new Qm(new Q5)),this.workspaceStorage=this._register(new Qm(new Q5)),this._register(this.workspaceStorage.onDidChangeStorage(e=>this.emitDidChangeValue(1,e))),this._register(this.globalStorage.onDidChangeStorage(e=>this.emitDidChangeValue(0,e)))}getStorage(e){return e===0?this.globalStorage:this.workspaceStorage}}var J5=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},x0=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let CI=class{constructor(e){this._commandService=e}createMenu(e,t,i){return new wI(e,Object.assign({emitEventsForSubmenuChanges:!1,eventDebounceDelay:50},i),this._commandService,t,this)}};CI=J5([x0(0,fi)],CI);let wI=class Vf{constructor(e,t,i,n,s){this._id=e,this._options=t,this._commandService=i,this._contextKeyService=n,this._menuService=s,this._disposables=new le,this._menuGroups=[],this._contextKeys=new Set,this._build();const o=new Bt(()=>{this._build(),this._onDidChange.fire(this)},t.eventDebounceDelay);this._disposables.add(o),this._disposables.add(ns.onDidChangeMenu(c=>{c.has(e)&&o.schedule()}));const a=this._disposables.add(new le),l=()=>{const c=new Bt(()=>this._onDidChange.fire(this),t.eventDebounceDelay);a.add(c),a.add(n.onDidChangeContext(h=>{h.affectsSome(this._contextKeys)&&c.schedule()}))};this._onDidChange=new H({onFirstListenerAdd:l,onLastListenerRemove:a.clear.bind(a)}),this.onDidChange=this._onDidChange.event}dispose(){this._disposables.dispose(),this._onDidChange.dispose()}_build(){this._menuGroups.length=0,this._contextKeys.clear();const e=ns.getMenuItems(this._id);let t;e.sort(Vf._compareMenuItems);for(const i of e){const n=i.group||"";(!t||t[0]!==n)&&(t=[n,[]],this._menuGroups.push(t)),t[1].push(i),this._collectContextKeys(i)}}_collectContextKeys(e){if(Vf._fillInKbExprKeys(e.when,this._contextKeys),Bp(e)){if(e.command.precondition&&Vf._fillInKbExprKeys(e.command.precondition,this._contextKeys),e.command.toggled){const t=e.command.toggled.condition||e.command.toggled;Vf._fillInKbExprKeys(t,this._contextKeys)}}else this._options.emitEventsForSubmenuChanges&&ns.getMenuItems(e.submenu).forEach(this._collectContextKeys,this)}getActions(e){const t=[];for(let i of this._menuGroups){const[n,s]=i,o=[];for(const a of s)if(this._contextKeyService.contextMatchesRules(a.when)){const l=Bp(a)?new Jl(a.command,a.alt,e,this._contextKeyService,this._commandService):new yk(a,this._menuService,this._contextKeyService,e);o.push(l)}o.length>0&&t.push([n,o])}return t}static _fillInKbExprKeys(e,t){if(e)for(let i of e.keys())t.add(i)}static _compareMenuItems(e,t){let i=e.group,n=t.group;if(i!==n){if(i){if(!n)return-1}else return 1;if(i==="navigation")return-1;if(n==="navigation")return 1;let a=i.localeCompare(n);if(a!==0)return a}let s=e.order||0,o=t.order||0;return s<o?-1:s>o?1:Vf._compareTitles(Bp(e)?e.command.title:e.title,Bp(t)?t.command.title:t.title)}static _compareTitles(e,t){const i=typeof e=="string"?e:e.original,n=typeof t=="string"?t:t.original;return i.localeCompare(n)}};wI=J5([x0(2,fi),x0(3,Fe),x0(4,Th)],wI);var Fre=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},e3=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Bre extends Y{constructor(e){super();this.model=e,this._markersData=new Map,this._register(Xe(()=>{this.model.deltaDecorations([...this._markersData.keys()],[]),this._markersData.clear()}))}update(e,t){const i=[...this._markersData.keys()];this._markersData.clear();const n=this.model.deltaDecorations(i,t);for(let s=0;s<n.length;s++)this._markersData.set(n[s],e[s]);return i.length!==0||n.length!==0}getMarker(e){return this._markersData.get(e.id)}}let yI=class extends Y{constructor(e,t){super();this._markerService=t,this._onDidChangeMarker=this._register(new H),this._markerDecorations=new Pn,e.getModels().forEach(i=>this._onModelAdded(i)),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(t=>{const i=this._markerDecorations.get(t);i&&this._updateDecorations(i)})}_onModelAdded(e){const t=new Bre(e);this._markerDecorations.set(e.uri,t),this._updateDecorations(t)}_onModelRemoved(e){const t=this._markerDecorations.get(e.uri);t&&(t.dispose(),this._markerDecorations.delete(e.uri)),(e.uri.scheme===Ze.inMemory||e.uri.scheme===Ze.internal||e.uri.scheme===Ze.vscode)&&this._markerService&&this._markerService.read({resource:e.uri}).map(i=>i.owner).forEach(i=>this._markerService.remove(i,[e.uri]))}_updateDecorations(e){const t=this._markerService.read({resource:e.model.uri,take:500});let i=t.map(n=>({range:this._createDecorationRange(e.model,n),options:this._createDecorationOption(n)}));e.update(t,i)&&this._onDidChangeMarker.fire(e.model)}_createDecorationRange(e,t){let i=k.lift(t);if(t.severity===ii.Hint&&!this._hasMarkerTag(t,1)&&!this._hasMarkerTag(t,2)&&(i=i.setEndPosition(i.startLineNumber,i.startColumn+2)),i=e.validateRange(i),i.isEmpty()){let n=e.getWordAtPosition(i.getStartPosition());if(n)i=new k(i.startLineNumber,n.startColumn,i.endLineNumber,n.endColumn);else{let s=e.getLineLastNonWhitespaceColumn(i.startLineNumber)||e.getLineMaxColumn(i.startLineNumber);s===1||(i.endColumn>=s?i=new k(i.startLineNumber,s-1,i.endLineNumber,s):i=new k(i.startLineNumber,i.startColumn,i.endLineNumber,i.endColumn+1))}}else if(t.endColumn===Number.MAX_VALUE&&t.startColumn===1&&i.startLineNumber===i.endLineNumber){let n=e.getLineFirstNonWhitespaceColumn(t.startLineNumber);n<i.endColumn&&(i=new k(i.startLineNumber,n,i.endLineNumber,i.endColumn),t.startColumn=n)}return i}_createDecorationOption(e){let t,i,n,s,o;switch(e.severity){case ii.Hint:this._hasMarkerTag(e,2)?t=void 0:this._hasMarkerTag(e,1)?t="squiggly-unnecessary":t="squiggly-hint",n=0;break;case ii.Warning:t="squiggly-warning",i=ui(bQ),n=20,o={color:ui(UX),position:Yr.Inline};break;case ii.Info:t="squiggly-info",i=ui(vQ),n=10;break;case ii.Error:default:t="squiggly-error",i=ui(_Q),n=30,o={color:ui($X),position:Yr.Inline};break}return e.tags&&(e.tags.indexOf(1)!==-1&&(s="squiggly-inline-unnecessary"),e.tags.indexOf(2)!==-1&&(s="squiggly-inline-deprecated")),{description:"marker-decoration",stickiness:1,className:t,showIfCollapsed:!0,overviewRuler:{color:i,position:Mr.Right},minimap:o,zIndex:n,inlineClassName:s}}_hasMarkerTag(e,t){return e.tags?e.tags.indexOf(t)>=0:!1}};yI=Fre([e3(0,gi),e3(1,Xm)],yI);var Wre=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},t3=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let SI=class extends Y{constructor(e,t){super();this._contextKeyService=e,this._configurationService=t,this._accessibilitySupport=0,this._onDidChangeScreenReaderOptimized=new H,this._accessibilityModeEnabledContext=km.bindTo(this._contextKeyService);const i=()=>this._accessibilityModeEnabledContext.set(this.isScreenReaderOptimized());this._register(this._configurationService.onDidChangeConfiguration(n=>{n.affectsConfiguration("editor.accessibilitySupport")&&(i(),this._onDidChangeScreenReaderOptimized.fire())})),i(),this.onDidChangeScreenReaderOptimized(()=>i())}get onDidChangeScreenReaderOptimized(){return this._onDidChangeScreenReaderOptimized.event}isScreenReaderOptimized(){const e=this._configurationService.getValue("editor.accessibilitySupport");return e==="on"||e==="auto"&&this._accessibilitySupport===2}getAccessibilitySupport(){return this._accessibilitySupport}};SI=Wre([t3(0,Fe),t3(1,hi)],SI);var k0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Vre{constructor(){this.mapTextToType=new Map,this.findText=""}writeText(e,t){return k0(this,void 0,void 0,function*(){if(t){this.mapTextToType.set(t,e);return}try{return yield navigator.clipboard.writeText(e)}catch(s){console.error(s)}const i=document.activeElement,n=document.body.appendChild(oe("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 k0(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 k0(this,void 0,void 0,function*(){return this.findText})}writeFindText(e){return k0(this,void 0,void 0,function*(){this.findText=e})}}var Hre=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},i3=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},D0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function E0(r){return r.scheme===Ze.file?r.fsPath:r.path}let n3=0;class I0{constructor(e,t,i,n,s,o,a){this.id=++n3,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=a,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 r3{constructor(e,t){this.resourceLabel=e,this.reason=t}}class s3{constructor(){this.elements=new Map}createMessage(){const e=[],t=[];for(const[,n]of this.elements)(n.reason===0?e:t).push(n.resourceLabel);let i=[];return e.length>0&&i.push(m({key:"externalRemoval",comment:["{0} is a list of filenames"]},"The following files have been closed and modified on disk: {0}.",e.join(", "))),t.length>0&&i.push(m({key:"noParallelUniverses",comment:["{0} is a list of filenames"]},"The following files have been modified in an incompatible way: {0}.",t.join(", "))),i.join(` -`)}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 zre{constructor(e,t,i,n,s,o,a){this.id=++n3,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=a,this.removedResources=null,this.invalidatedResources=null}canSplit(){return typeof this.actual.split=="function"}removeResource(e,t,i){this.removedResources||(this.removedResources=new s3),this.removedResources.has(t)||this.removedResources.set(t,new r3(e,i))}setValid(e,t,i){i?this.invalidatedResources&&(this.invalidatedResources.delete(t),this.invalidatedResources.size===0&&(this.invalidatedResources=null)):(this.invalidatedResources||(this.invalidatedResources=new s3),this.invalidatedResources.has(t)||this.invalidatedResources.set(t,new r3(e,0)))}toString(){return`[id:${this.id}] [group:${this.groupId}] [${this.invalidatedResources?"INVALID":" VALID"}] ${this.actual.constructor.name} - ${this.actual}`}}class o3{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)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);for(const e of this._future)e.type===1&&e.removeResource(this.resourceLabel,this.strResource,0);this.versionId++}toString(){let e=[];e.push(`* ${this.strResource}:`);for(let t=0;t<this._past.length;t++)e.push(` * [UNDO] ${this._past[t]}`);for(let t=this._future.length-1;t>=0;t--)e.push(` * [REDO] ${this._future[t]}`);return e.join(` -`)}flushAllElements(){this._past=[],this._future=[],this.versionId++}_setElementValidFlag(e,t){e.type===1?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)t.type===1&&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<n;i++)t.push(this._past[i].id);for(let i=this._future.length-1;i>=0;i--)t.push(this._future[i].id);return new V4(e,t)}restoreSnapshot(e){const t=e.elements.length;let i=!0,n=0,s=-1;for(let a=0,l=this._past.length;a<l;a++,n++){const c=this._past[a];i&&(n>=t||c.id!==e.elements[n])&&(i=!1,s=0),!i&&c.type===1&&c.removeResource(this.resourceLabel,this.strResource,0)}let o=-1;for(let a=this._future.length-1;a>=0;a--,n++){const l=this._future[a];i&&(n>=t||l.id!==e.elements[n])&&(i=!1,o=a),!i&&l.type===1&&l.removeResource(this.resourceLabel,this.strResource,0)}s!==-1&&(this._past=this._past.slice(0,s)),o!==-1&&(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 this._past.length===0?null:this._past[this._past.length-1]}getSecondClosestPastElement(){return this._past.length<2?null:this._past[this._past.length-2]}getClosestFutureElement(){return this._future.length===0?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 LI{constructor(e){this.editStacks=e,this._versionIds=[];for(let t=0,i=this.editStacks.length;t<i;t++)this._versionIds[t]=this.editStacks[t].versionId}isValid(){for(let e=0,t=this.editStacks.length;e<t;e++)if(this._versionIds[e]!==this.editStacks[e].versionId)return!1;return!0}}const a3=new o3("","");a3.locked=!0;let N0=class{constructor(e,t){this._dialogService=e,this._notificationService=t,this._editStacks=new Map,this._uriComparisonKeyComputers=[]}getUriComparisonKey(e){for(const t of this._uriComparisonKeyComputers)if(t[0]===e.scheme)return t[1].getComparisonKey(e);return e.toString()}_print(e){console.log("------------------------------------"),console.log(`AFTER ${e}: `);let t=[];for(const i of this._editStacks)t.push(i[1].toString());console.log(t.join(` -`))}pushElement(e,t=Tf.None,i=ea.None){if(e.type===0){const n=E0(e.resource),s=this.getUriComparisonKey(e.resource);this._pushElement(new I0(e,n,s,t.id,t.nextOrder(),i.id,i.nextOrder()))}else{const n=new Set,s=[],o=[];for(const a of e.resources){const l=E0(a),c=this.getUriComparisonKey(a);n.has(c)||(n.add(c),s.push(l),o.push(c))}s.length===1?this._pushElement(new I0(e,s[0],o[0],t.id,t.nextOrder(),i.id,i.nextOrder())):this._pushElement(new zre(e,s,o,t.id,t.nextOrder(),i.id,i.nextOrder()))}}_pushElement(e){for(let t=0,i=e.strResources.length;t<i;t++){const n=e.resourceLabels[t],s=e.strResources[t];let o;this._editStacks.has(s)?o=this._editStacks.get(s):(o=new o3(n,s),this._editStacks.set(s,o)),o.pushElement(e)}}getLastElement(e){const t=this.getUriComparisonKey(e);if(this._editStacks.has(t)){const i=this._editStacks.get(t);if(i.hasFutureElements())return null;const n=i.getClosestPastElement();return n?n.actual:null}return null}_splitPastWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const o=E0(s.resource),a=this.getUriComparisonKey(s.resource),l=new I0(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitPastWorkspaceElement(e,n)}}_splitFutureWorkspaceElement(e,t){const i=e.actual.split(),n=new Map;for(const s of i){const o=E0(s.resource),a=this.getUriComparisonKey(s.resource),l=new I0(s,o,a,0,0,0,0);n.set(l.strResource,l)}for(const s of e.strResources){if(t&&t.has(s))continue;this._editStacks.get(s).splitFutureWorkspaceElement(e,n)}}removeElements(e){const t=typeof e=="string"?e:this.getUriComparisonKey(e);this._editStacks.has(t)&&(this._editStacks.get(t).dispose(),this._editStacks.delete(t))}setElementsValidFlag(e,t,i){const n=this.getUriComparisonKey(e);this._editStacks.has(n)&&this._editStacks.get(n).setElementsValidFlag(t,i)}createSnapshot(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).createSnapshot(e):new V4(e,[])}restoreSnapshot(e){const t=this.getUriComparisonKey(e.resource);if(this._editStacks.has(t)){const i=this._editStacks.get(t);i.restoreSnapshot(e),!i.hasPastElements()&&!i.hasFutureElements()&&(i.dispose(),this._editStacks.delete(t))}}getElements(e){const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).getElements():{past:[],future:[]}}_findClosestUndoElementWithSource(e){if(!e)return[null,null];let t=null,i=null;for(const[n,s]of this._editStacks){const o=s.getClosestPastElement();!o||o.sourceId===e&&(!t||o.sourceOrder>t.sourceOrder)&&(t=o,i=n)}return[t,i]}canUndo(e){if(e instanceof ea){const[,i]=this._findClosestUndoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasPastElements():!1}_onError(e,t){Oe(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 a;try{a=t()}catch(l){return o(),n.dispose(),this._onError(l,e)}return a?a.then(()=>(o(),n.dispose(),s()),l=>(o(),n.dispose(),this._onError(l,e))):(o(),n.dispose(),s())}_invokeWorkspacePrepare(e){return D0(this,void 0,void 0,function*(){if(typeof e.actual.prepareUndoRedo=="undefined")return Y.None;const t=e.actual.prepareUndoRedo();return typeof t=="undefined"?Y.None:t})}_invokeResourcePrepare(e,t){if(e.actual.type!==1||typeof e.actual.prepareUndoRedo=="undefined")return t(Y.None);const i=e.actual.prepareUndoRedo();return i?NS(i)?t(i):i.then(n=>t(n)):t(Y.None)}_getAffectedEditStacks(e){const t=[];for(const i of e.strResources)t.push(this._editStacks.get(i)||a3);return new LI(t)}_tryToSplitAndUndo(e,t,i,n){if(t.canSplit())return this._splitPastWorkspaceElement(t,i),this._notificationService.warn(n),new T0(this._undo(e,0,!0));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new T0}_checkWorkspaceUndo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndUndo(e,t,t.removedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndUndo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceUndo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not undo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestPastElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not undo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const a of i.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndUndo(e,t,null,m({key:"cannotWorkspaceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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,m({key:"cannotWorkspaceUndoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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 n=t.getSecondClosestPastElement();if(n&&n.groupId===e.groupId)return!0}if(i.groupId===e.groupId)return!0}}return!1}_confirmAndExecuteWorkspaceUndo(e,t,i,n){return D0(this,void 0,void 0,function*(){if(t.canSplit()&&!this._isPartOfUndoGroup(t)){const a=yield this._dialogService.show(si.Info,m("confirmWorkspace","Would you like to undo '{0}' across all files?",t.label),[m({key:"ok",comment:["{0} denotes a number that is > 1"]},"Undo in {0} Files",i.editStacks.length),m("nok","Undo this File"),m("cancel","Cancel")],{cancelId:2});if(a.choice===2)return;if(a.choice===1)return this._splitPastWorkspaceElement(t,null),this._undo(e,0,!0);const l=this._checkWorkspaceUndo(e,t,i,!1);if(l)return l.returnValue;n=!0}let s;try{s=yield this._invokeWorkspacePrepare(t)}catch(a){return this._onError(a,t)}const o=this._checkWorkspaceUndo(e,t,i,!0);if(o)return s.dispose(),o.returnValue;for(const a of i.editStacks)a.moveBackward(t);return this._safeInvokeWithLocks(t,()=>t.actual.undo(),i,s,()=>this._continueUndoInGroup(t.groupId,n))})}_resourceUndo(e,t,i){if(!t.isValid){e.flushAllElements();return}if(e.locked){const n=m({key:"cannotResourceUndoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not undo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(n);return}return this._invokeResourcePrepare(t,n=>(e.moveBackward(t),this._safeInvokeWithLocks(t,()=>t.actual.undo(),new LI([e]),n,()=>this._continueUndoInGroup(t.groupId,i))))}_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);if(i)return this._undo(i,0,t)}undo(e){if(e instanceof ea){const[,t]=this._findClosestUndoElementWithSource(e.id);return t?this._undo(t,e.id,!1):void 0}return typeof e=="string"?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[a,l]=this._findClosestUndoElementInGroup(s.groupId);if(s!==a&&l)return this._undo(l,t,i)}if((s.sourceId!==t||s.confirmBeforeUndo)&&!i)return this._confirmAndContinueUndo(e,t,s);try{return s.type===1?this._workspaceUndo(e,s,i):this._resourceUndo(n,s,i)}finally{}}_confirmAndContinueUndo(e,t,i){return D0(this,void 0,void 0,function*(){if((yield this._dialogService.show(si.Info,m("confirmDifferentSource","Would you like to undo '{0}'?",i.label),[m("confirmDifferentSource.yes","Yes"),m("cancel","Cancel")],{cancelId:1})).choice!==1)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.sourceOrder<t.sourceOrder)&&(t=o,i=n)}return[t,i]}canRedo(e){if(e instanceof ea){const[,i]=this._findClosestRedoElementWithSource(e.id);return!!i}const t=this.getUriComparisonKey(e);return this._editStacks.has(t)?this._editStacks.get(t).hasFutureElements():!1}_tryToSplitAndRedo(e,t,i,n){if(t.canSplit())return this._splitFutureWorkspaceElement(t,i),this._notificationService.warn(n),new T0(this._redo(e));for(const s of t.strResources)this.removeElements(s);return this._notificationService.warn(n),new T0}_checkWorkspaceRedo(e,t,i,n){if(t.removedResources)return this._tryToSplitAndRedo(e,t,t.removedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.removedResources.createMessage()));if(n&&t.invalidatedResources)return this._tryToSplitAndRedo(e,t,t.invalidatedResources,m({key:"cannotWorkspaceRedo",comment:["{0} is a label for an operation. {1} is another message."]},"Could not redo '{0}' across all files. {1}",t.label,t.invalidatedResources.createMessage()));const s=[];for(const a of i.editStacks)a.getClosestFutureElement()!==t&&s.push(a.resourceLabel);if(s.length>0)return this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToChanges",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"Could not redo '{0}' across all files because changes were made to {1}",t.label,s.join(", ")));const o=[];for(const a of i.editStacks)a.locked&&o.push(a.resourceLabel);return o.length>0?this._tryToSplitAndRedo(e,t,null,m({key:"cannotWorkspaceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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,m({key:"cannotWorkspaceRedoDueToInMeantimeUndoRedo",comment:["{0} is a label for an operation. {1} is a list of filenames."]},"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 D0(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 o of i.editStacks)o.moveForward(t);return this._safeInvokeWithLocks(t,()=>t.actual.redo(),i,n,()=>this._continueRedoInGroup(t.groupId))})}_resourceRedo(e,t){if(!t.isValid){e.flushAllElements();return}if(e.locked){const i=m({key:"cannotResourceRedoDueToInProgressUndoRedo",comment:["{0} is a label for an operation."]},"Could not redo '{0}' because there is already an undo or redo operation running.",t.label);this._notificationService.warn(i);return}return this._invokeResourcePrepare(t,i=>(e.moveForward(t),this._safeInvokeWithLocks(t,()=>t.actual.redo(),new LI([e]),i,()=>this._continueRedoInGroup(t.groupId))))}_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<t.groupOrder)&&(t=o,i=n)}return[t,i]}_continueRedoInGroup(e){if(!e)return;const[,t]=this._findClosestRedoElementInGroup(e);if(t)return this._redo(t)}redo(e){if(e instanceof ea){const[,t]=this._findClosestRedoElementWithSource(e.id);return t?this._redo(t):void 0}return typeof e=="string"?this._redo(e):this._redo(this.getUriComparisonKey(e))}_redo(e){if(!this._editStacks.has(e))return;const t=this._editStacks.get(e),i=t.getClosestFutureElement();if(!!i){if(i.groupId){const[n,s]=this._findClosestRedoElementInGroup(i.groupId);if(i!==n&&s)return this._redo(s)}try{return i.type===1?this._workspaceRedo(e,i):this._resourceRedo(t,i)}finally{}}}};N0=Hre([i3(0,Hm),i3(1,Di)],N0);class T0{constructor(e){this.returnValue=e}}iu(Hw,N0);const $re=new RegExp(`(\\\\)?\\$\\((${fr.iconNameExpression}(?:${fr.iconModifierExpression})?)\\)`,"g");function wu(r){const e=new Array;let t,i=0,n=0;for(;(t=$re.exec(r))!==null;){n=t.index||0,e.push(r.substring(i,n)),i=(t.index||0)+t[0].length;const[,s,o]=t;e.push(s?`$(${o})`:Ure({id:o}))}return i<r.length&&e.push(r.substring(i)),e}function Ure(r){const e=oe("span");return e.classList.add(...fr.asClassNameArray(r)),e}const jre={buttonBackground:K.fromHex("#0E639C"),buttonHoverBackground:K.fromHex("#006BB3"),buttonForeground:K.white};class l3 extends Y{constructor(e,t){super();this._onDidClick=this._register(new H),this.options=t||Object.create(null),eo(this.options,jre,!1),this.buttonForeground=this.options.buttonForeground,this.buttonBackground=this.options.buttonBackground,this.buttonHoverBackground=this.options.buttonHoverBackground,this.buttonSecondaryForeground=this.options.buttonSecondaryForeground,this.buttonSecondaryBackground=this.options.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=this.options.buttonSecondaryHoverBackground,this.buttonBorder=this.options.buttonBorder,this._element=document.createElement("a"),this._element.classList.add("monaco-button"),this._element.tabIndex=0,this._element.setAttribute("role","button"),e.appendChild(this._element),this._register(Et.addTarget(this._element)),[Ee.CLICK,Vt.Tap].forEach(i=>{this._register(J(this._element,i,n=>{if(!this.enabled){St.stop(n);return}this._onDidClick.fire(n)}))}),this._register(J(this._element,Ee.KEY_DOWN,i=>{const n=new ei(i);let s=!1;this.enabled&&(n.equals(3)||n.equals(10))?(this._onDidClick.fire(i),s=!0):n.equals(9)&&(this._element.blur(),s=!0),s&&St.stop(n,!0)})),this._register(J(this._element,Ee.MOUSE_OVER,i=>{this._element.classList.contains("disabled")||this.setHoverBackground()})),this._register(J(this._element,Ee.MOUSE_OUT,i=>{this.applyStyles()})),this.focusTracker=this._register(Md(this._element)),this._register(this.focusTracker.onDidFocus(()=>this.setHoverBackground())),this._register(this.focusTracker.onDidBlur(()=>this.applyStyles())),this.applyStyles()}get onDidClick(){return this._onDidClick.event}setHoverBackground(){let e;this.options.secondary?e=this.buttonSecondaryHoverBackground?this.buttonSecondaryHoverBackground.toString():null:e=this.buttonHoverBackground?this.buttonHoverBackground.toString():null,e&&(this._element.style.backgroundColor=e)}style(e){this.buttonForeground=e.buttonForeground,this.buttonBackground=e.buttonBackground,this.buttonHoverBackground=e.buttonHoverBackground,this.buttonSecondaryForeground=e.buttonSecondaryForeground,this.buttonSecondaryBackground=e.buttonSecondaryBackground,this.buttonSecondaryHoverBackground=e.buttonSecondaryHoverBackground,this.buttonBorder=e.buttonBorder,this.applyStyles()}applyStyles(){if(this._element){let e,t;this.options.secondary?(t=this.buttonSecondaryForeground?this.buttonSecondaryForeground.toString():"",e=this.buttonSecondaryBackground?this.buttonSecondaryBackground.toString():""):(t=this.buttonForeground?this.buttonForeground.toString():"",e=this.buttonBackground?this.buttonBackground.toString():"");const i=this.buttonBorder?this.buttonBorder.toString():"";this._element.style.color=t,this._element.style.backgroundColor=e,this._element.style.borderWidth=i?"1px":"",this._element.style.borderStyle=i?"solid":"",this._element.style.borderColor=i}}get element(){return this._element}set label(e){this._element.classList.add("monaco-text-button"),this.options.supportIcons?zl(this._element,...wu(e)):this._element.textContent=e,typeof this.options.title=="string"?this._element.title=this.options.title:this.options.title&&(this._element.title=e)}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")}}const Kre={badgeBackground:K.fromHex("#4D4D4D"),badgeForeground:K.fromHex("#FFFFFF")};class xI{constructor(e,t){this.count=0,this.options=t||Object.create(null),eo(this.options,Kre,!1),this.badgeBackground=this.options.badgeBackground,this.badgeForeground=this.options.badgeForeground,this.badgeBorder=this.options.badgeBorder,this.element=X(e,oe(".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(){this.element.textContent=gn(this.countFormat,this.count),this.element.title=gn(this.titleFormat,this.count),this.applyStyles()}style(e){this.badgeBackground=e.badgeBackground,this.badgeForeground=e.badgeForeground,this.badgeBorder=e.badgeBorder,this.applyStyles()}applyStyles(){if(this.element){const e=this.badgeBackground?this.badgeBackground.toString():"",t=this.badgeForeground?this.badgeForeground.toString():"",i=this.badgeBorder?this.badgeBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}}}const c3="done",h3="active",kI="infinite",u3="discrete",qre={progressBarBackground:K.fromHex("#0E70C0")};class Gre extends Y{constructor(e,t){super();this.options=t||Object.create(null),eo(this.options,qre,!1),this.workedVal=0,this.progressBarBackground=this.options.progressBarBackground,this._register(this.showDelayedScheduler=new Bt(()=>Ar(this.element),0)),this.create(e)}create(e){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.element.appendChild(this.bit),this.applyStyles()}off(){this.bit.style.width="inherit",this.bit.style.opacity="1",this.element.classList.remove(h3,kI,u3),this.workedVal=0,this.totalWork=void 0}stop(){return this.doDone(!1)}doDone(e){return this.element.classList.add(c3),this.element.classList.contains(kI)?(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(u3,c3),this.element.classList.add(h3,kI),this}getContainer(){return this.element}style(e){this.progressBarBackground=e.progressBarBackground,this.applyStyles()}applyStyles(){if(this.bit){const e=this.progressBarBackground?this.progressBarBackground.toString():"";this.bit.style.backgroundColor=e}}}class DI{constructor(e){this._prefix=e,this._lastId=0}nextId(){return this._prefix+ ++this._lastId}}const d3=new DI("id#");const EI={},Zre=new DI("quick-input-button-icon-");function II(r){if(!r)return;let e;const t=r.dark.toString();return EI[t]?e=EI[t]:(e=Zre.nextId(),HL(`.${e}`,`background-image: ${Ra(r.light||r.dark)}`),HL(`.vs-dark .${e}, .hc-black .${e}`,`background-image: ${Ra(r.dark)}`),EI[t]=e),e}const Yre={ctrlCmd:!1,alt:!1};var Jm;(function(r){r[r.Blur=1]="Blur",r[r.Gesture=2]="Gesture",r[r.Other=3]="Other"})(Jm||(Jm={}));var mo;(function(r){r[r.NONE=0]="NONE",r[r.FIRST=1]="FIRST",r[r.SECOND=2]="SECOND",r[r.LAST=3]="LAST"})(mo||(mo={}));function Xre(r,e={}){const t=NI(e);return t.textContent=r,t}function f3(r,e={}){const t=NI(e);return g3(t,Jre(r,!!e.renderCodeSegments),e.actionHandler,e.renderCodeSegments),t}function NI(r){const e=r.inline?"span":"div",t=document.createElement(e);return r.className&&(t.className=r.className),t}class Qre{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 g3(r,e,t,i){let n;if(e.type===2)n=document.createTextNode(e.content||"");else if(e.type===3)n=document.createElement("b");else if(e.type===4)n=document.createElement("i");else if(e.type===7&&i)n=document.createElement("code");else if(e.type===5&&t){const s=document.createElement("a");s.href="#",t.disposables.add(ki(s,"click",o=>{t.callback(String(e.index),o)})),n=s}else e.type===8?n=document.createElement("br"):e.type===1&&(n=r);n&&r!==n&&r.appendChild(n),n&&Array.isArray(e.children)&&e.children.forEach(s=>{g3(n,s,t,i)})}function Jre(r,e){const t={type:1,children:[]};let i=0,n=t;const s=[],o=new Qre(r);for(;!o.eos();){let a=o.next();const l=a==="\\"&&TI(o.peek(),e)!==0;if(l&&(a=o.next()),!l&&ese(a,e)&&a===o.peek()){o.advance(),n.type===2&&(n=s.pop());const c=TI(a,e);if(n.type===c||n.type===5&&c===6)n=s.pop();else{const h={type:c,children:[]};c===5&&(h.index=i,i++),n.children.push(h),s.push(n),n=h}}else if(a===` -`)n.type===2&&(n=s.pop()),n.children.push({type:8});else if(n.type!==2){const c={type:2,content:a};n.children.push(c),s.push(n),n=c}else n.content+=a}return n.type===2&&(n=s.pop()),t}function ese(r,e){return TI(r,e)!==0}function TI(r,e){switch(r){case"*":return 3;case"_":return 4;case"[":return 5;case"]":return 6;case"`":return e?7:0;default:return 0}}class tse{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 ise{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._currentPosition()!==this._elements.length-1?this._navigator.next():null}previous(){return this._currentPosition()!==0?this._navigator.previous():null}current(){return this._navigator.current()}first(){return this._navigator.first()}last(){return this._navigator.last()}has(e){return this._history.has(e)}_onChange(){this._reduceToLimit();const e=this._elements;this._navigator=new tse(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 e_=oe,nse={inputBackground:K.fromHex("#3C3C3C"),inputForeground:K.fromHex("#CCCCCC"),inputValidationInfoBorder:K.fromHex("#55AAFF"),inputValidationInfoBackground:K.fromHex("#063B49"),inputValidationWarningBorder:K.fromHex("#B89500"),inputValidationWarningBackground:K.fromHex("#352A05"),inputValidationErrorBorder:K.fromHex("#BE1100"),inputValidationErrorBackground:K.fromHex("#5A1D1D")};class p3 extends Vr{constructor(e,t,i){var n;super();this.state="idle",this.maxHeight=Number.POSITIVE_INFINITY,this._onDidChange=this._register(new H),this.onDidChange=this._onDidChange.event,this._onDidHeightChange=this._register(new H),this.onDidHeightChange=this._onDidHeightChange.event,this.contextViewProvider=t,this.options=i||Object.create(null),eo(this.options,nse,!1),this.message=null,this.placeholder=this.options.placeholder||"",this.tooltip=(n=this.options.tooltip)!==null&&n!==void 0?n:this.placeholder||"",this.ariaLabel=this.options.ariaLabel||"",this.inputBackground=this.options.inputBackground,this.inputForeground=this.options.inputForeground,this.inputBorder=this.options.inputBorder,this.inputValidationInfoBorder=this.options.inputValidationInfoBorder,this.inputValidationInfoBackground=this.options.inputValidationInfoBackground,this.inputValidationInfoForeground=this.options.inputValidationInfoForeground,this.inputValidationWarningBorder=this.options.inputValidationWarningBorder,this.inputValidationWarningBackground=this.options.inputValidationWarningBackground,this.inputValidationWarningForeground=this.options.inputValidationWarningForeground,this.inputValidationErrorBorder=this.options.inputValidationErrorBorder,this.inputValidationErrorBackground=this.options.inputValidationErrorBackground,this.inputValidationErrorForeground=this.options.inputValidationErrorForeground,this.options.validationOptions&&(this.validation=this.options.validationOptions.validation),this.element=X(e,e_(".monaco-inputbox.idle"));let s=this.options.flexibleHeight?"textarea":"input",o=X(this.element,e_(".ibwrapper"));if(this.input=X(o,e_(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=typeof this.options.flexibleMaxHeight=="number"?this.options.flexibleMaxHeight:Number.POSITIVE_INFINITY,this.mirror=X(o,e_("div.mirror")),this.mirror.innerText="\xA0",this.scrollableElement=new OD(this.element,{vertical:1}),this.options.flexibleWidth&&(this.input.setAttribute("wrap","off"),this.mirror.style.whiteSpace="pre",this.mirror.style.wordWrap="initial"),X(e,this.scrollableElement.getDomNode()),this._register(this.scrollableElement),this._register(this.scrollableElement.onScroll(c=>this.input.scrollTop=c.scrollTop));const a=this._register(new Ft(document,"selectionchange")),l=ke.filter(a.event,()=>{const c=document.getSelection();return(c==null?void 0:c.anchorNode)===o});this._register(l(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.ignoreGesture(this.input),setTimeout(()=>this.updateMirror(),0),this.options.actions&&(this.actionbar=this._register(new il(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}setAriaLabel(e){this.ariaLabel=e,e?this.input.setAttribute("aria-label",this.ariaLabel):this.input.removeAttribute("aria-label")}getAriaLabel(){return this.ariaLabel}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 typeof this.cachedHeight=="number"?this.cachedHeight:WL(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()}get width(){return vs(this.input)}set width(e){if(this.options.flexibleHeight&&this.options.flexibleWidth){let t=0;if(this.mirror){const i=parseFloat(this.mirror.style.paddingLeft||"")||0,n=parseFloat(this.mirror.style.paddingRight||"")||0;t=i+n}this.input.style.width=e-t+"px"}else this.input.style.width=e+"px";this.mirror&&(this.mirror.style.width=e+"px")}set paddingRight(e){this.options.flexibleHeight&&this.options.flexibleWidth?this.input.style.width=`calc(100% - ${e}px)`:this.input.style.paddingRight=e+"px",this.mirror&&(this.mirror.style.paddingRight=e+"px")}updateScrollDimensions(){if(typeof this.cachedContentHeight!="number"||typeof this.cachedHeight!="number"||!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){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=i.border?`1px solid ${i.border}`:"",(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())),e==null?void 0:e.type}stylesForType(e){switch(e){case 1:return{border:this.inputValidationInfoBorder,background:this.inputValidationInfoBackground,foreground:this.inputValidationInfoForeground};case 2:return{border:this.inputValidationWarningBorder,background:this.inputValidationWarningBackground,foreground:this.inputValidationWarningForeground};default:return{border:this.inputValidationErrorBorder,background:this.inputValidationErrorBackground,foreground:this.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,t=()=>e.style.width=vs(this.element)+"px";this.contextViewProvider.showContextView({getAnchor:()=>this.element,anchorAlignment:1,render:n=>{if(!this.message)return null;e=X(n,e_(".monaco-inputbox-container")),t();const s={inline:!0,className:"monaco-inputbox-message"},o=this.message.formatContent?f3(this.message.content,s):Xre(this.message.content,s);o.classList.add(this.classForType(this.message.type));const a=this.stylesForType(this.message.type);return o.style.backgroundColor=a.background?a.background.toString():"",o.style.color=a.foreground?a.foreground.toString():"",o.style.border=a.border?`1px solid ${a.border}`:"",X(e,o),null},onHide:()=>{this.state="closed"},layout:t});let i;this.message.type===3?i=m("alertErrorMessage","Error: {0}",this.message.content):this.message.type===2?i=m("alertWarningMessage","Warning: {0}",this.message.content):i=m("alertInfoMessage","Info: {0}",this.message.content),Ji(i),this.state="open"}_hideMessage(){!this.contextViewProvider||(this.state==="open"&&this.contextViewProvider.hideContextView(),this.state="idle")}onValueChange(){this._onDidChange.fire(this.value),this.validate(),this.updateMirror(),this.input.classList.toggle("empty",!this.value),this.state==="open"&&this.contextViewProvider&&this.contextViewProvider.layout()}updateMirror(){if(!this.mirror)return;const e=this.value,i=e.charCodeAt(e.length-1)===10?" ":"";(e+i).replace(/\u000c/g,"")?this.mirror.textContent=e+i:this.mirror.innerText="\xA0",this.layout()}style(e){this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){const e=this.inputBackground?this.inputBackground.toString():"",t=this.inputForeground?this.inputForeground.toString():"",i=this.inputBorder?this.inputBorder.toString():"";this.element.style.backgroundColor=e,this.element.style.color=t,this.input.style.backgroundColor="inherit",this.input.style.color=t,this.element.style.borderWidth=i?"1px":"",this.element.style.borderStyle=i?"solid":"",this.element.style.borderColor=i}layout(){if(!this.mirror)return;const e=this.cachedContentHeight;this.cachedContentHeight=WL(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;i!==null&&n!==null&&(this.value=s.substr(0,i)+e+s.substr(n),t.setSelectionRange(i+1,i+1),this.layout())}dispose(){this._hideMessage(),this.message=null,this.actionbar&&this.actionbar.dispose(),super.dispose()}}class m3 extends p3{constructor(e,t,i){const n=m({key:"history.inputbox.hint",comment:["Text will be prefixed with \u21C5 plus a single space, then used as a hint where input field keeps history"]},"for history"),s=` or \u21C5 ${n}`,o=` (\u21C5 ${n})`;super(e,t,i);this.history=new ise(i.history,100);const a=()=>{if(i.showHistoryHint&&i.showHistoryHint()&&!this.placeholder.endsWith(s)&&!this.placeholder.endsWith(o)&&this.history.getHistory().length){const l=this.placeholder.endsWith(")")?s:o,c=this.placeholder+l;i.showPlaceholderOnFocus&&document.activeElement!==this.input?this.placeholder=c:this.setPlaceHolder(c)}};this.observer=new MutationObserver((l,c)=>{l.forEach(h=>{h.target.textContent||a()})}),this.observer.observe(this.input,{attributeFilter:["class"]}),this.onfocus(this.input,()=>a()),this.onblur(this.input,()=>{const l=c=>{if(this.placeholder.endsWith(c)){const h=this.placeholder.slice(0,this.placeholder.length-c.length);return i.showPlaceholderOnFocus?this.placeholder=h:this.setPlaceHolder(h),!0}else return!1};l(o)||l(s)})}dispose(){super.dispose(),this.observer&&(this.observer.disconnect(),this.observer=void 0)}addToHistory(){this.value&&this.value!==this.getCurrentValue()&&this.history.add(this.value)}showNextValue(){this.history.has(this.value)||this.addToHistory();let e=this.getNextValue();e&&(e=e===this.value?this.getNextValue():e),e&&(this.value=e,kC(this.value))}showPreviousValue(){this.history.has(this.value)||this.addToHistory();let e=this.getPreviousValue();e&&(e=e===this.value?this.getPreviousValue():e),e&&(this.value=e,kC(this.value))}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()||this.history.last()}}const rse=oe;class sse extends Y{constructor(e){super();this.parent=e,this.onKeyDown=t=>J(this.inputBox.inputElement,Ee.KEY_DOWN,i=>{t(new ei(i))}),this.onMouseDown=t=>J(this.inputBox.inputElement,Ee.MOUSE_DOWN,i=>{t(new Gr(i))}),this.onDidChange=t=>this.inputBox.onDidChange(t),this.container=X(this.parent,rse(".quick-input-box")),this.inputBox=this._register(new p3(this.container,void 0))}get value(){return this.inputBox.value}set value(e){this.inputBox.value=e}select(e=null){this.inputBox.select(e)}isSelectionAtEnd(){return this.inputBox.isSelectionAtEnd()}get placeholder(){return this.inputBox.inputElement.getAttribute("placeholder")||""}set placeholder(e){this.inputBox.setPlaceHolder(e)}get ariaLabel(){return this.inputBox.getAriaLabel()}set ariaLabel(e){this.inputBox.setAriaLabel(e)}get password(){return this.inputBox.inputElement.type==="password"}set password(e){this.inputBox.inputElement.type=e?"password":"text"}setAttribute(e,t){this.inputBox.inputElement.setAttribute(e,t)}removeAttribute(e){this.inputBox.inputElement.removeAttribute(e)}showDecoration(e){e===si.Ignore?this.inputBox.hideMessage():this.inputBox.showMessage({type:e===si.Info?1:e===si.Warning?2:3,content:""})}stylesForType(e){return this.inputBox.stylesForType(e===si.Info?1:e===si.Warning?2:3)}setFocus(){this.inputBox.focus()}layout(){this.inputBox.layout()}style(e){this.inputBox.style(e)}}class xc{constructor(e,t){this.supportIcons=t,this.text="",this.title="",this.highlights=[],this.didEverRender=!1,this.domNode=document.createElement("span"),this.domNode.className="monaco-highlighted-label",e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t=[],i="",n){e||(e=""),n&&(e=xc.escapeNewLines(e,t)),!(this.didEverRender&&this.text===e&&this.title===i&&to(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<i.start){const o=this.text.substring(t,i.start);e.push(oe("span",void 0,...this.supportIcons?wu(o):[o])),t=i.end}const n=this.text.substring(i.start,i.end),s=oe("span.highlight",void 0,...this.supportIcons?wu(n):[n]);i.extraClasses&&s.classList.add(i.extraClasses),e.push(s),t=i.end}if(t<this.text.length){const i=this.text.substring(t);e.push(oe("span",void 0,...this.supportIcons?wu(i):[i]))}zl(this.domNode,...e),this.title?this.domNode.title=this.title:this.domNode.removeAttribute("title"),this.didEverRender=!0}static escapeNewLines(e,t){let i=0,n=0;return e.replace(/\r\n|\r|\n/g,(s,o)=>{n=s===`\r -`?-1:0,o+=i;for(const a of t)a.end<=o||(a.start>=o&&(a.start+=n),a.end>=o&&(a.end+=n));return i+=n,"\u23CE"})}}class ul{constructor(e="",t=!1){var i,n,s;if(this.value=e,typeof this.value!="string")throw Er("value");typeof t=="boolean"?(this.isTrusted=t,this.supportThemeIcons=!1,this.supportHtml=!1):(this.isTrusted=(i=t.isTrusted)!==null&&i!==void 0?i:void 0,this.supportThemeIcons=(n=t.supportThemeIcons)!==null&&n!==void 0?n:!1,this.supportHtml=(s=t.supportHtml)!==null&&s!==void 0?s:!1)}appendText(e,t=0){return this.value+=ose(this.supportThemeIcons?hne(e):e).replace(/([ \t]+)/g,(i,n)=>" ".repeat(n.length)).replace(/\>/gm,"\\>").replace(/\n/g,t===1?`\\ -`:` - -`),this}appendMarkdown(e){return this.value+=e,this}appendCodeblock(e,t){return this.value+="\n```",this.value+=e,this.value+=` -`,this.value+=t,this.value+="\n```\n",this}}function t_(r){return _3(r)?!r.value:Array.isArray(r)?r.every(t_):!0}function _3(r){return r instanceof ul?!0:r&&typeof r=="object"?typeof r.value=="string"&&(typeof r.isTrusted=="boolean"||r.isTrusted===void 0)&&(typeof r.supportThemeIcons=="boolean"||r.supportThemeIcons===void 0):!1}function ose(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function AI(r){return r&&r.replace(/\\([\\`*_{}[\]()#+\-.!])/g,"$1")}function ase(r){const e=[],t=r.split("|").map(n=>n.trim());r=t[0];const i=t[1];if(i){const n=/height=(\d+)/.exec(i),s=/width=(\d+)/.exec(i),o=n?n[1]:"",a=s?s[1]:"",l=isFinite(parseInt(a)),c=isFinite(parseInt(o));l&&e.push(`width="${a}"`),c&&e.push(`height="${o}"`)}return{href:r,dimensions:e}}var RI=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function lse(r,e){ys(e)?r.title=e:(e==null?void 0:e.markdownNotSupportedFallback)?r.title=e.markdownNotSupportedFallback:r.removeAttribute("title")}class cse{constructor(e,t,i){this.hoverDelegate=e,this.target=t,this.fadeInAnimation=i}update(e,t){var i;return RI(this,void 0,void 0,function*(){if(this._cancellationTokenSource&&(this._cancellationTokenSource.dispose(!0),this._cancellationTokenSource=void 0),this.isDisposed)return;let n;if(e===void 0||ys(e)||e instanceof HTMLElement)n=e;else if(!pp(e.markdown))n=(i=e.markdown)!==null&&i!==void 0?i:e.markdownNotSupportedFallback;else{this._hoverWidget||this.show(m("iconLabel.loading","Loading..."),t),this._cancellationTokenSource=new Rn;const s=this._cancellationTokenSource.token;if(n=yield e.markdown(s),this.isDisposed||s.isCancellationRequested)return}this.show(n,t)})}show(e,t){const i=this._hoverWidget;if(this.hasContent(e)){const n={content:e,target:this.target,showPointer:this.hoverDelegate.placement==="element",hoverPosition:2,skipFadeInAnimation:!this.fadeInAnimation||!!i};this._hoverWidget=this.hoverDelegate.showHover(n,t)}i==null||i.dispose()}hasContent(e){return e?_3(e)?this.hasContent(e.value):!0:!1}get isDisposed(){var e;return(e=this._hoverWidget)===null||e===void 0?void 0:e.isDisposed}dispose(){var e,t;(e=this._hoverWidget)===null||e===void 0||e.dispose(),(t=this._cancellationTokenSource)===null||t===void 0||t.dispose(!0),this._cancellationTokenSource=void 0}}function hse(r,e,t){let i,n;const s=(c,h)=>{var u;c&&(n==null||n.dispose(),n=void 0),h&&(i==null||i.dispose(),i=void 0),(u=r.onDidHideHover)===null||u===void 0||u.call(r)},o=(c,h)=>{if(i)return;const u=b=>{const C=b.type===Ee.MOUSE_DOWN;s(C,C||b.fromElement===e)},d=J(e,Ee.MOUSE_LEAVE,u,!0),f=J(e,Ee.MOUSE_DOWN,u,!0),g={targetElements:[e],dispose:()=>{}};let p;if(r.placement===void 0||r.placement==="mouse"){const b=C=>g.x=C.x+10;p=J(e,Ee.MOUSE_MOVE,b,!0)}const _=()=>RI(this,void 0,void 0,function*(){i&&(!n||n.isDisposed)&&(n=new cse(r,g,c>0),yield n.update(t,h)),p==null||p.dispose()}),v=new Bt(_,c);v.schedule(),i=Xe(()=>{v.dispose(),p==null||p.dispose(),f.dispose(),d.dispose()})},a=J(e,Ee.MOUSE_OVER,()=>o(r.delay),!0);return{show:c=>{o(0,c)},hide:()=>{s(!0,!0)},update:c=>RI(this,void 0,void 0,function*(){t=c,yield n==null?void 0:n.update(t)}),dispose:()=>{a.dispose(),s(!0,!0)}}}class MI{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 PI extends Y{constructor(e,t){super();this.customHovers=new Map,this.domNode=this._register(new MI(X(e,oe(".monaco-icon-label")))),this.labelContainer=X(this.domNode.element,oe(".monaco-icon-label-container"));const i=X(this.labelContainer,oe("span.monaco-icon-name-container"));this.descriptionContainer=this._register(new MI(X(this.labelContainer,oe("span.monaco-icon-description-container")))),(t==null?void 0:t.supportHighlights)||(t==null?void 0:t.supportIcons)?this.nameNode=new fse(i,!!t.supportIcons):this.nameNode=new use(i),(t==null?void 0:t.supportDescriptionHighlights)?this.descriptionNodeFactory=()=>new xc(X(this.descriptionContainer.element,oe("span.label-description")),!!t.supportIcons):this.descriptionNodeFactory=()=>this._register(new MI(X(this.descriptionContainer.element,oe("span.label-description")))),this.hoverDelegate=t==null?void 0:t.hoverDelegate}get element(){return this.domNode.element}setLabel(e,t,i){const n=["monaco-icon-label"];i&&(i.extraClasses&&n.push(...i.extraClasses),i.italic&&n.push("italic"),i.strikethrough&&n.push("strikethrough")),this.domNode.className=n.join(" "),this.setupHover((i==null?void 0:i.descriptionTitle)?this.labelContainer:this.element,i==null?void 0:i.title),this.nameNode.setLabel(e,i),(t||this.descriptionNode)&&(this.descriptionNode||(this.descriptionNode=this.descriptionNodeFactory()),this.descriptionNode instanceof xc?(this.descriptionNode.set(t||"",i?i.descriptionMatches:void 0),this.setupHover(this.descriptionNode.element,i==null?void 0:i.descriptionTitle)):(this.descriptionNode.textContent=t||"",this.setupHover(this.descriptionNode.element,(i==null?void 0:i.descriptionTitle)||""),this.descriptionNode.empty=!t))}setupHover(e,t){const i=this.customHovers.get(e);if(i&&(i.dispose(),this.customHovers.delete(e)),!t){e.removeAttribute("title");return}if(!this.hoverDelegate)lse(e,t);else{const n=hse(this.hoverDelegate,e,t);n&&this.customHovers.set(e,n)}}dispose(){super.dispose();for(const e of this.customHovers.values())e.dispose();this.customHovers.clear()}}class use{constructor(e){this.container=e,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&to(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=X(this.container,oe("a.label-name",{id:t==null?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<e.length;i++){const n=e[i],s=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${i}`;X(this.container,oe("a.label-name",{id:s,"data-icon-label-count":e.length,"data-icon-label-index":i,role:"treeitem"},n)),i<e.length-1&&X(this.container,oe("span.label-separator",void 0,(t==null?void 0:t.separator)||"/"))}}}}function dse(r,e,t){if(!t)return;let i=0;return r.map(n=>{const s={start:i,end:i+n.length},o=t.map(a=>vn.intersect(s,a)).filter(a=>!vn.isEmpty(a)).map(({start:a,end:l})=>({start:a-i,end:l-i}));return i=s.end+e.length,o})}class fse{constructor(e,t){this.container=e,this.supportIcons=t,this.label=void 0,this.singleLabel=void 0}setLabel(e,t){if(!(this.label===e&&to(this.options,t)))if(this.label=e,this.options=t,typeof e=="string")this.singleLabel||(this.container.innerText="",this.container.classList.remove("multiple"),this.singleLabel=new xc(X(this.container,oe("a.label-name",{id:t==null?void 0:t.domId})),this.supportIcons)),this.singleLabel.set(e,t==null?void 0:t.matches,void 0,t==null?void 0:t.labelEscapeNewLines);else{this.container.innerText="",this.container.classList.add("multiple"),this.singleLabel=void 0;const i=(t==null?void 0:t.separator)||"/",n=dse(e,i,t==null?void 0:t.matches);for(let s=0;s<e.length;s++){const o=e[s],a=n?n[s]:void 0,l=(t==null?void 0:t.domId)&&`${t==null?void 0:t.domId}_${s}`,c=oe("a.label-name",{id:l,"data-icon-label-count":e.length,"data-icon-label-index":s,role:"treeitem"});new xc(X(this.container,c),this.supportIcons).set(o,a,void 0,t==null?void 0:t.labelEscapeNewLines),s<e.length-1&&X(c,oe("span.label-separator",void 0,i))}}}}const A0=oe;class OI{constructor(e,t,i){this.os=t,this.keyElements=new Set,this.options=i||Object.create(null),this.labelBackground=this.options.keybindingLabelBackground,this.labelForeground=this.options.keybindingLabelForeground,this.labelBorder=this.options.keybindingLabelBorder,this.labelBottomBorder=this.options.keybindingLabelBottomBorder,this.labelShadow=this.options.keybindingLabelShadow,this.domNode=X(e,A0(".monaco-keybinding")),this.didEverRender=!1,e.appendChild(this.domNode)}get element(){return this.domNode}set(e,t){this.didEverRender&&this.keybinding===e&&OI.areSame(this.matches,t)||(this.keybinding=e,this.matches=t,this.render())}render(){if(this.clear(),this.keybinding){let[e,t]=this.keybinding.getParts();e&&this.renderPart(this.domNode,e,this.matches?this.matches.firstPart:null),t&&(X(this.domNode,A0("span.monaco-keybinding-key-chord-separator",void 0," ")),this.renderPart(this.domNode,t,this.matches?this.matches.chordPart:null)),this.domNode.title=this.keybinding.getAriaLabel()||""}else this.options&&this.options.renderUnboundKeybindings&&this.renderUnbound(this.domNode);this.applyStyles(),this.didEverRender=!0}clear(){Ui(this.domNode),this.keyElements.clear()}renderPart(e,t,i){const n=uk.modifierLabels[this.os];t.ctrlKey&&this.renderKey(e,n.ctrlKey,Boolean(i==null?void 0:i.ctrlKey),n.separator),t.shiftKey&&this.renderKey(e,n.shiftKey,Boolean(i==null?void 0:i.shiftKey),n.separator),t.altKey&&this.renderKey(e,n.altKey,Boolean(i==null?void 0:i.altKey),n.separator),t.metaKey&&this.renderKey(e,n.metaKey,Boolean(i==null?void 0:i.metaKey),n.separator);const s=t.keyLabel;s&&this.renderKey(e,s,Boolean(i==null?void 0:i.keyCode),"")}renderKey(e,t,i,n){X(e,this.createKeyElement(t,i?".highlight":"")),n&&X(e,A0("span.monaco-keybinding-key-separator",void 0,n))}renderUnbound(e){X(e,this.createKeyElement(m("unbound","Unbound")))}createKeyElement(e,t=""){const i=A0("span.monaco-keybinding-key"+t,void 0,e);return this.keyElements.add(i),i}style(e){this.labelBackground=e.keybindingLabelBackground,this.labelForeground=e.keybindingLabelForeground,this.labelBorder=e.keybindingLabelBorder,this.labelBottomBorder=e.keybindingLabelBottomBorder,this.labelShadow=e.keybindingLabelShadow,this.applyStyles()}applyStyles(){var e;if(this.element){for(const t of this.keyElements)this.labelBackground&&(t.style.backgroundColor=(e=this.labelBackground)===null||e===void 0?void 0:e.toString()),this.labelBorder&&(t.style.borderColor=this.labelBorder.toString()),this.labelBottomBorder&&(t.style.borderBottomColor=this.labelBottomBorder.toString()),this.labelShadow&&(t.style.boxShadow=`inset 0 -1px 0 ${this.labelShadow}`);this.labelForeground&&(this.element.style.color=this.labelForeground.toString())}}static areSame(e,t){return e===t||!e&&!t?!0:!!e&&!!t&&to(e.firstPart,t.firstPart)&&to(e.chordPart,t.chordPart)}}const b3=new Ad(()=>{const r=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"});return{collator:r,collatorIsNumeric:r.resolvedOptions().numeric}});function gse(r,e,t=!1){const i=r||"",n=e||"",s=b3.value.collator.compare(i,n);return b3.value.collatorIsNumeric&&s===0&&i!==n?i<n?-1:1:s}function pse(r,e,t){const i=r.toLowerCase(),n=e.toLowerCase(),s=mse(r,e,t);if(s)return s;const o=i.endsWith(t),a=n.endsWith(t);if(o!==a)return o?-1:1;const l=gse(i,n);return l!==0?l:i.localeCompare(n)}function mse(r,e,t){const i=r.toLowerCase(),n=e.toLowerCase(),s=i.startsWith(t),o=n.startsWith(t);if(s!==o)return s?-1:1;if(s&&o){if(i.length<n.length)return-1;if(i.length>n.length)return 1}return 0}var v3=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_se=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const la=oe;class bse{constructor(e){this.hidden=!1,this._onChecked=new H,this.onChecked=this._onChecked.event,Object.assign(this,e)}get checked(){return!!this._checked}set checked(e){e!==this._checked&&(this._checked=e,this._onChecked.fire(e))}dispose(){this._onChecked.dispose()}}class i_{get templateId(){return i_.ID}renderTemplate(e){const t=Object.create(null);t.toDisposeElement=[],t.toDisposeTemplate=[],t.entry=X(e,la(".quick-input-list-entry"));const i=X(t.entry,la("label.quick-input-list-label"));t.toDisposeTemplate.push(ki(i,Ee.CLICK,c=>{t.checkbox.offsetParent||c.preventDefault()})),t.checkbox=X(i,la("input.quick-input-list-checkbox")),t.checkbox.type="checkbox",t.toDisposeTemplate.push(ki(t.checkbox,Ee.CHANGE,c=>{t.element.checked=t.checkbox.checked}));const n=X(i,la(".quick-input-list-rows")),s=X(n,la(".quick-input-list-row")),o=X(n,la(".quick-input-list-row"));t.label=new PI(s,{supportHighlights:!0,supportDescriptionHighlights:!0,supportIcons:!0});const a=X(s,la(".quick-input-list-entry-keybinding"));t.keybinding=new OI(a,bs);const l=X(o,la(".quick-input-list-label-meta"));return t.detail=new xc(l,!0),t.separator=X(t.entry,la(".quick-input-list-separator")),t.actionBar=new il(t.entry),t.actionBar.domNode.classList.add("quick-input-list-entry-action-bar"),t.toDisposeTemplate.push(t.actionBar),t}renderElement(e,t,i){i.toDisposeElement=ht(i.toDisposeElement),i.element=e,i.checkbox.checked=e.checked,i.toDisposeElement.push(e.onChecked(c=>i.checkbox.checked=c));const{labelHighlights:n,descriptionHighlights:s,detailHighlights:o}=e,a=Object.create(null);a.matches=n||[],a.descriptionTitle=e.saneDescription,a.descriptionMatches=s||[],a.extraClasses=e.item.iconClasses,a.italic=e.item.italic,a.strikethrough=e.item.strikethrough,i.label.setLabel(e.saneLabel,e.saneDescription,a),i.keybinding.set(e.item.keybinding),i.detail.set(e.saneDetail,o),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),i.actionBar.clear();const l=e.item.buttons;l&&l.length?(i.actionBar.push(l.map((c,h)=>{let u=c.iconClass||(c.iconPath?II(c.iconPath):void 0);c.alwaysVisible&&(u=u?`${u} always-visible`:"always-visible");const d=new Ns(`id-${h}`,"",u,!0,()=>_se(this,void 0,void 0,function*(){e.fireButtonTriggered({button:c,item:e.item})}));return d.tooltip=c.tooltip||"",d}),{icon:!0,label:!1}),i.entry.classList.add("has-actions")):i.entry.classList.remove("has-actions")}disposeElement(e,t,i){i.toDisposeElement=ht(i.toDisposeElement)}disposeTemplate(e){e.toDisposeElement=ht(e.toDisposeElement),e.toDisposeTemplate=ht(e.toDisposeTemplate)}}i_.ID="listelement";class vse{getHeight(e){return e.saneDetail?44:22}getTemplateId(e){return i_.ID}}var vi;(function(r){r[r.First=1]="First",r[r.Second=2]="Second",r[r.Last=3]="Last",r[r.Next=4]="Next",r[r.Previous=5]="Previous",r[r.NextPage=6]="NextPage",r[r.PreviousPage=7]="PreviousPage"})(vi||(vi={}));class FI{constructor(e,t,i){this.parent=e,this.inputElements=[],this.elements=[],this.elementsToIndexes=new Map,this.matchOnDescription=!1,this.matchOnDetail=!1,this.matchOnLabel=!0,this.matchOnMeta=!0,this.sortByLabel=!0,this._onChangedAllVisibleChecked=new H,this.onChangedAllVisibleChecked=this._onChangedAllVisibleChecked.event,this._onChangedCheckedCount=new H,this.onChangedCheckedCount=this._onChangedCheckedCount.event,this._onChangedVisibleCount=new H,this.onChangedVisibleCount=this._onChangedVisibleCount.event,this._onChangedCheckedElements=new H,this.onChangedCheckedElements=this._onChangedCheckedElements.event,this._onButtonTriggered=new H,this.onButtonTriggered=this._onButtonTriggered.event,this._onKeyDown=new H,this.onKeyDown=this._onKeyDown.event,this._onLeave=new H,this.onLeave=this._onLeave.event,this._fireCheckedEvents=!0,this.elementDisposables=[],this.disposables=[],this.id=t,this.container=X(this.parent,la(".quick-input-list"));const n=new vse,s=new wse;this.list=i.createList("QuickInput",this.container,n,[new i_],{identityProvider:{getId:o=>o.saneLabel},setRowLineHeight:!1,multipleSelectionSupport:!1,horizontalScrolling:!1,accessibilityProvider:s}),this.list.getHTMLElement().id=t,this.disposables.push(this.list),this.disposables.push(this.list.onKeyDown(o=>{const a=new ei(o);switch(a.keyCode){case 10:this.toggleCheckbox();break;case 31:(Je?o.metaKey:o.ctrlKey)&&this.list.setFocus(Fn(this.list.length));break;case 16:const l=this.list.getFocus();l.length===1&&l[0]===0&&this._onLeave.fire();break;case 18:const c=this.list.getFocus();c.length===1&&c[0]===this.list.length-1&&this._onLeave.fire();break}this._onKeyDown.fire(a)})),this.disposables.push(this.list.onMouseDown(o=>{o.browserEvent.button!==2&&o.browserEvent.preventDefault()})),this.disposables.push(J(this.container,Ee.CLICK,o=>{(o.x||o.y)&&this._onLeave.fire()})),this.disposables.push(this.list.onMouseMiddleClick(o=>{this._onLeave.fire()})),this.disposables.push(this.list.onContextMenu(o=>{typeof o.index=="number"&&(o.browserEvent.preventDefault(),this.list.setSelection([o.index]))})),this.disposables.push(this._onChangedAllVisibleChecked,this._onChangedCheckedCount,this._onChangedVisibleCount,this._onChangedCheckedElements,this._onButtonTriggered,this._onLeave,this._onKeyDown)}get onDidChangeFocus(){return ke.map(this.list.onDidChangeFocus,e=>e.elements.map(t=>t.item))}get onDidChangeSelection(){return ke.map(this.list.onDidChangeSelection,e=>({items:e.elements.map(t=>t.item),event:e.browserEvent}))}get scrollTop(){return this.list.scrollTop}set scrollTop(e){this.list.scrollTop=e}getAllVisibleChecked(){return this.allVisibleChecked(this.elements,!1)}allVisibleChecked(e,t=!0){for(let i=0,n=e.length;i<n;i++){const s=e[i];if(!s.hidden)if(s.checked)t=!0;else return!1}return t}getCheckedCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].checked&&e++;return e}getVisibleCount(){let e=0;const t=this.elements;for(let i=0,n=t.length;i<n;i++)t[i].hidden||e++;return e}setAllVisibleChecked(e){try{this._fireCheckedEvents=!1,this.elements.forEach(t=>{t.hidden||(t.checked=e)})}finally{this._fireCheckedEvents=!0,this.fireCheckedEvents()}}setElements(e){this.elementDisposables=ht(this.elementDisposables);const t=i=>this.fireButtonTriggered(i);this.inputElements=e,this.elements=e.reduce((i,n,s)=>{var o,a,l;if(n.type!=="separator"){const c=s&&e[s-1],h=n.label&&n.label.replace(/\r?\n/g," "),u=n.meta&&n.meta.replace(/\r?\n/g," "),d=n.description&&n.description.replace(/\r?\n/g," "),f=n.detail&&n.detail.replace(/\r?\n/g," "),g=n.ariaLabel||[h,d,f].map(p=>eq(p)).filter(p=>!!p).join(", ");i.push(new bse({index:s,item:n,saneLabel:h,saneMeta:u,saneAriaLabel:g,saneDescription:d,saneDetail:f,labelHighlights:(o=n.highlights)===null||o===void 0?void 0:o.label,descriptionHighlights:(a=n.highlights)===null||a===void 0?void 0:a.description,detailHighlights:(l=n.highlights)===null||l===void 0?void 0:l.detail,checked:!1,separator:c&&c.type==="separator"?c:void 0,fireButtonTriggered:t}))}return i},[]),this.elementDisposables.push(...this.elements),this.elementDisposables.push(...this.elements.map(i=>i.onChecked(()=>this.fireCheckedEvents()))),this.elementsToIndexes=this.elements.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),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(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t))),e.length>0){const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}}getActiveDescendant(){return this.list.getHTMLElement().getAttribute("aria-activedescendant")}setSelectedElements(e){this.list.setSelection(e.filter(t=>this.elementsToIndexes.has(t)).map(t=>this.elementsToIndexes.get(t)))}getCheckedElements(){return this.elements.filter(e=>e.checked).map(e=>e.item)}setCheckedElements(e){try{this._fireCheckedEvents=!1;const t=new Set;for(const i of e)t.add(i);for(const i of this.elements)i.checked=t.has(i.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===vi.Next&&this.list.getFocus()[0]===this.list.length-1&&(e=vi.First),e===vi.Previous&&this.list.getFocus()[0]===0&&(e=vi.Last),e===vi.Second&&this.list.length<2&&(e=vi.First),e){case vi.First:this.list.focusFirst();break;case vi.Second:this.list.focusNth(1);break;case vi.Last:this.list.focusLast();break;case vi.Next:this.list.focusNext();break;case vi.Previous:this.list.focusPrevious();break;case vi.NextPage:this.list.focusNextPage();break;case vi.PreviousPage:this.list.focusPreviousPage();break}const t=this.list.getFocus()[0];typeof t=="number"&&this.list.reveal(t)}clearFocus(){this.list.setFocus([])}domFocus(){this.list.domFocus()}layout(e){this.list.getHTMLElement().style.maxHeight=e?`calc(${Math.floor(e/44)*44}px)`:"",this.list.layout()}filter(e){if(!(this.sortByLabel||this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))return this.list.layout(),!1;if(e=e.trim(),!e||!(this.matchOnLabel||this.matchOnDescription||this.matchOnDetail))this.elements.forEach(i=>{i.labelHighlights=void 0,i.descriptionHighlights=void 0,i.detailHighlights=void 0,i.hidden=!1;const n=i.index&&this.inputElements[i.index-1];i.separator=n&&n.type==="separator"?n:void 0});else{let i;this.elements.forEach(n=>{const s=this.matchOnLabel?Rr(e0(e,Jw(n.saneLabel))):void 0,o=this.matchOnDescription?Rr(e0(e,Jw(n.saneDescription||""))):void 0,a=this.matchOnDetail?Rr(e0(e,Jw(n.saneDetail||""))):void 0,l=this.matchOnMeta?Rr(e0(e,Jw(n.saneMeta||""))):void 0;if(s||o||a||l?(n.labelHighlights=s,n.descriptionHighlights=o,n.detailHighlights=a,n.hidden=!1):(n.labelHighlights=void 0,n.descriptionHighlights=void 0,n.detailHighlights=void 0,n.hidden=!n.item.alwaysShow),n.separator=void 0,!this.sortByLabel){const c=n.index&&this.inputElements[n.index-1];i=c&&c.type==="separator"?c:i,i&&!n.hidden&&(n.separator=i,i=void 0)}})}const t=this.elements.filter(i=>!i.hidden);if(this.sortByLabel&&e){const i=e.toLowerCase();t.sort((n,s)=>Cse(n,s,i))}return this.elementsToIndexes=t.reduce((i,n,s)=>(i.set(n.item,s),i),new Map),this.list.splice(0,this.list.length,t),this.list.setFocus([]),this.list.layout(),this._onChangedAllVisibleChecked.fire(this.getAllVisibleChecked()),this._onChangedVisibleCount.fire(t.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 this.container.style.display!=="none"}dispose(){this.elementDisposables=ht(this.elementDisposables),this.disposables=ht(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)}style(e){this.list.style(e)}}v3([Ei],FI.prototype,"onDidChangeFocus",null);v3([Ei],FI.prototype,"onDidChangeSelection",null);function Cse(r,e,t){const i=r.labelHighlights||[],n=e.labelHighlights||[];return i.length&&!n.length?-1:!i.length&&n.length?1:i.length===0&&n.length===0?0:pse(r.saneLabel,e.saneLabel,t)}class wse{getWidgetAriaLabel(){return m("quickInput","Quick Input")}getAriaLabel(e){return e.saneAriaLabel}getWidgetRole(){return"listbox"}getRole(){return"option"}}var C3=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Hr=oe,yse=Ls("quick-input-back",ve.arrowLeft),BI={iconClass:yse.classNames,tooltip:m("quickInput.back","Back"),handle:-1};class R0 extends Y{constructor(e){super();this.ui=e,this.visible=!1,this._enabled=!0,this._busy=!1,this._ignoreFocusOut=!1,this._buttons=[],this.noValidationMessage=R0.noPromptMessage,this._severity=si.Ignore,this.buttonsUpdated=!1,this.onDidTriggerButtonEmitter=this._register(new H),this.onDidHideEmitter=this._register(new H),this.onDisposeEmitter=this._register(new H),this.visibleDisposables=this._register(new le),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&&!No;this._ignoreFocusOut=e&&!No,t&&this.update()}get buttons(){return this._buttons}set buttons(e){this._buttons=e,this.buttonsUpdated=!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=>{this.buttons.indexOf(e)!==-1&&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.update())}hide(){!this.visible||this.ui.hide()}didHide(e=Jm.Other){this.visible=!1,this.visibleDisposables.clear(),this.onDidHideEmitter.fire({reason:e})}update(){if(!this.visible)return;const e=this.getTitle();e&&this.ui.title.textContent!==e?this.ui.title.textContent=e:!e&&this.ui.title.innerHTML!==" "&&(this.ui.title.innerText="\xA0");const t=this.getDescription();if(this.ui.description1.textContent!==t&&(this.ui.description1.textContent=t),this.ui.description2.textContent!==t&&(this.ui.description2.textContent=t),this.busy&&!this.busyDelay&&(this.busyDelay=new Xn,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 n=this.buttons.filter(o=>o===BI);this.ui.leftActionBar.push(n.map((o,a)=>{const l=new Ns(`id-${a}`,"",o.iconClass||II(o.iconPath),!0,()=>C3(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1}),this.ui.rightActionBar.clear();const s=this.buttons.filter(o=>o!==BI);this.ui.rightActionBar.push(s.map((o,a)=>{const l=new Ns(`id-${a}`,"",o.iconClass||II(o.iconPath),!0,()=>C3(this,void 0,void 0,function*(){this.onDidTriggerButtonEmitter.fire(o)}));return l.tooltip=o.tooltip||"",l}),{icon:!0,label:!1})}this.ui.ignoreFocusOut=this.ignoreFocusOut,this.ui.setEnabled(this.enabled),this.ui.setContextKey(this.contextKey);const i=this.validationMessage||this.noValidationMessage;this._lastValidationMessage!==i&&(this._lastValidationMessage=i,zl(this.ui.message,...wu(i))),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?m("quickInput.steps","{0}/{1}",this.step,this.totalSteps):this.step?String(this.step):""}showMessageDecoration(e){if(this.ui.inputBox.showDecoration(e),e!==si.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.paddingBottom="4px"}else this.ui.message.style.color="",this.ui.message.style.backgroundColor="",this.ui.message.style.border="",this.ui.message.style.paddingBottom=""}dispose(){this.hide(),this.onDisposeEmitter.fire(),super.dispose()}}R0.noPromptMessage=m("inputModeEntry","Press 'Enter' to confirm your input or 'Escape' to cancel");class n_ extends R0{constructor(){super(...arguments);this._value="",this.onDidChangeValueEmitter=this._register(new H),this.onWillAcceptEmitter=this._register(new H),this.onDidAcceptEmitter=this._register(new H),this.onDidCustomEmitter=this._register(new H),this._items=[],this.itemsUpdated=!1,this._canSelectMany=!1,this._canAcceptInBackground=!1,this._matchOnDescription=!1,this._matchOnDetail=!1,this._matchOnLabel=!0,this._sortByLabel=!0,this._autoFocusOnList=!0,this._keepScrollPosition=!1,this._itemActivation=this.ui.isScreenReaderOptimized()?mo.NONE:mo.FIRST,this._activeItems=[],this.activeItemsUpdated=!1,this.activeItemsToConfirm=[],this.onDidChangeActiveEmitter=this._register(new H),this._selectedItems=[],this.selectedItemsUpdated=!1,this.selectedItemsToConfirm=[],this.onDidChangeSelectionEmitter=this._register(new H),this.onDidTriggerItemButtonEmitter=this._register(new H),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}get quickNavigate(){return this._quickNavigate}set quickNavigate(e){this._quickNavigate=e,this.update()}get value(){return this._value}set value(e){this._value!==e&&(this._value=e||"",this.update(),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 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?Yre: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(vi.First))}show(){this.visible||(this.visibleDisposables.add(this.ui.inputBox.onDidChange(e=>{if(e===this.value)return;this._value=e,this.ui.list.filter(this.filterValue(this.ui.inputBox.value))&&this.trySelectFirst(),this.onDidChangeValueEmitter.fire(e)})),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(vi.Next),this.canSelectMany&&this.ui.list.domFocus(),St.stop(e,!0);break;case 16:this.ui.list.getFocusedElements().length?this.ui.list.focus(vi.Previous):this.ui.list.focus(vi.Last),this.canSelectMany&&this.ui.list.domFocus(),St.stop(e,!0);break;case 12:this.ui.list.focus(vi.NextPage),this.canSelectMany&&this.ui.list.domFocus(),St.stop(e,!0);break;case 11:this.ui.list.focus(vi.PreviousPage),this.canSelectMany&&this.ui.list.domFocus(),St.stop(e,!0);break;case 17:if(!this._canAcceptInBackground||!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(vi.First),St.stop(e,!0));break;case 13:(e.ctrlKey||e.metaKey)&&!e.shiftKey&&!e.altKey&&(this.ui.list.focus(vi.Last),St.stop(e,!0));break}})),this.visibleDisposables.add(this.ui.onDidAccept(()=>{!this.canSelectMany&&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&&Is(e,this._activeItems,(t,i)=>t===i)||(this._activeItems=e,this.onDidChangeActiveEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onDidChangeSelection(({items:e,event:t})=>{if(this.canSelectMany){e.length&&this.ui.list.setSelectedElements([]);return}this.selectedItemsToConfirm!==this._selectedItems&&Is(e,this._selectedItems,(i,n)=>i===n)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e),e.length&&this.handleAccept(t instanceof MouseEvent&&t.button===1))})),this.visibleDisposables.add(this.ui.list.onChangedCheckedElements(e=>{!this.canSelectMany||this.selectedItemsToConfirm!==this._selectedItems&&Is(e,this._selectedItems,(t,i)=>t===i)||(this._selectedItems=e,this.onDidChangeSelectionEmitter.fire(e))})),this.visibleDisposables.add(this.ui.list.onButtonTriggered(e=>this.onDidTriggerItemButtonEmitter.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 J(this.ui.container,Ee.KEY_UP,e=>{if(this.canSelectMany||!this._quickNavigate)return;const t=new ei(e),i=t.keyCode;this._quickNavigate.keybindings.some(o=>{const[a,l]=o.getParts();return l?!1:a.shiftKey&&i===4?!(t.ctrlKey||t.altKey||t.metaKey):!!(a.altKey&&i===6||a.ctrlKey&&i===5||a.metaKey&&i===57)})&&(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._hideInput&&this._items.length>0;this.ui.container.classList.toggle("hidden-input",t&&!this.description);const i={title:!!this.title||!!this.step||!!this.buttons.length,description:!!this.description,checkAll:this.canSelectMany&&!this._hideCheckAll,checkBox:this.canSelectMany,inputBox:!t,progressBar:!t,visibleCount:!0,count:this.canSelectMany,ok:this.ok==="default"?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||"");const n=this.ariaLabel||this.placeholder||n_.DEFAULT_ARIA_LABEL;if(this.ui.inputBox.ariaLabel!==n&&(this.ui.inputBox.ariaLabel=n),this.ui.list.matchOnDescription=this.matchOnDescription,this.ui.list.matchOnDetail=this.matchOnDetail,this.ui.list.matchOnLabel=this.matchOnLabel,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 mo.NONE:this._itemActivation=mo.FIRST;break;case mo.SECOND:this.ui.list.focus(vi.Second),this._itemActivation=mo.FIRST;break;case mo.LAST:this.ui.list.focus(vi.Last),this._itemActivation=mo.FIRST;break;default:this.trySelectFirst();break}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||"",this.ui.setComboboxAccessibility(!0),i.inputBox||(this.ui.list.domFocus(),this.canSelectMany&&this.ui.list.focus(vi.First)),this.keepScrollPosition&&(this.scrollTop=e)}}n_.DEFAULT_ARIA_LABEL=m("quickInputBox.ariaLabel","Type to narrow down results.");class M0 extends Y{constructor(e){super();this.options=e,this.comboboxAccessibility=!1,this.enabled=!0,this.onDidAcceptEmitter=this._register(new H),this.onDidCustomEmitter=this._register(new H),this.onDidTriggerButtonEmitter=this._register(new H),this.keyMods={ctrlCmd:!1,alt:!1},this.controller=null,this.onShowEmitter=this._register(new H),this.onShow=this.onShowEmitter.event,this.onHideEmitter=this._register(new H),this.onHide=this.onHideEmitter.event,this.idPrefix=e.idPrefix,this.parentElement=e.container,this.styles=e.styles,this.registerKeyModsListeners()}registerKeyModsListeners(){const e=t=>{this.keyMods.ctrlCmd=t.ctrlKey||t.metaKey,this.keyMods.alt=t.altKey};this._register(J(window,Ee.KEY_DOWN,e,!0)),this._register(J(window,Ee.KEY_UP,e,!0)),this._register(J(window,Ee.MOUSE_DOWN,e,!0))}getUI(){if(this.ui)return this.ui;const e=X(this.parentElement,Hr(".quick-input-widget.show-file-icons"));e.tabIndex=-1,e.style.display="none";const t=Tr(e),i=X(e,Hr(".quick-input-titlebar")),n=this._register(new il(i));n.domNode.classList.add("quick-input-left-action-bar");const s=X(i,Hr(".quick-input-title")),o=this._register(new il(i));o.domNode.classList.add("quick-input-right-action-bar");const a=X(e,Hr(".quick-input-description")),l=X(e,Hr(".quick-input-header")),c=X(l,Hr("input.quick-input-check-all"));c.type="checkbox",this._register(ki(c,Ee.CHANGE,P=>{const B=c.checked;w.setAllVisibleChecked(B)})),this._register(J(c,Ee.CLICK,P=>{(P.x||P.y)&&f.setFocus()}));const h=X(l,Hr(".quick-input-description")),u=X(l,Hr(".quick-input-and-message")),d=X(u,Hr(".quick-input-filter")),f=this._register(new sse(d));f.setAttribute("aria-describedby",`${this.idPrefix}message`);const g=X(d,Hr(".quick-input-visible-count"));g.setAttribute("aria-live","polite"),g.setAttribute("aria-atomic","true");const p=new xI(g,{countFormat:m({key:"quickInput.visibleCount",comment:["This tells the user how many items are shown in a list of items to select from. The items can be anything. Currently not visible, but read by screen readers."]},"{0} Results")}),_=X(d,Hr(".quick-input-count"));_.setAttribute("aria-live","polite");const v=new xI(_,{countFormat:m({key:"quickInput.countSelected",comment:["This tells the user how many items are selected in a list of items to select from. The items can be anything."]},"{0} Selected")}),b=X(l,Hr(".quick-input-action")),C=new l3(b);C.label=m("ok","OK"),this._register(C.onDidClick(P=>{this.onDidAcceptEmitter.fire()}));const y=X(l,Hr(".quick-input-action")),x=new l3(y);x.label=m("custom","Custom"),this._register(x.onDidClick(P=>{this.onDidCustomEmitter.fire()}));const S=X(u,Hr(`#${this.idPrefix}message.quick-input-message`)),w=this._register(new FI(e,this.idPrefix+"list",this.options));this._register(w.onChangedAllVisibleChecked(P=>{c.checked=P})),this._register(w.onChangedVisibleCount(P=>{p.setCount(P)})),this._register(w.onChangedCheckedCount(P=>{v.setCount(P)})),this._register(w.onLeave(()=>{setTimeout(()=>{f.setFocus(),this.controller instanceof n_&&this.controller.canSelectMany&&w.clearFocus()},0)})),this._register(w.onDidChangeFocus(()=>{this.comboboxAccessibility&&this.getUI().inputBox.setAttribute("aria-activedescendant",this.getUI().list.getActiveDescendant()||"")}));const L=new Gre(e);L.getContainer().classList.add("quick-input-progress");const N=Md(e);return this._register(N),this._register(J(e,Ee.FOCUS,P=>{this.previousFocusElement=P.relatedTarget instanceof HTMLElement?P.relatedTarget:void 0},!0)),this._register(N.onDidBlur(()=>{!this.getUI().ignoreFocusOut&&!this.options.ignoreFocusOut()&&this.hide(Jm.Blur),this.previousFocusElement=void 0})),this._register(J(e,Ee.FOCUS,P=>{f.setFocus()})),this._register(J(e,Ee.KEY_DOWN,P=>{const B=new ei(P);switch(B.keyCode){case 3:St.stop(P,!0),this.onDidAcceptEmitter.fire();break;case 9:St.stop(P,!0),this.hide(Jm.Gesture);break;case 2:if(!B.altKey&&!B.ctrlKey&&!B.metaKey){const U=[".action-label.codicon"];e.classList.contains("show-checkboxes")?U.push("input"):U.push("input[type=text]"),this.getUI().list.isDisplayed()&&U.push(".monaco-list");const j=e.querySelectorAll(U.join(", "));B.shiftKey&&B.target===j[0]?(St.stop(P,!0),j[j.length-1].focus()):!B.shiftKey&&B.target===j[j.length-1]&&(St.stop(P,!0),j[0].focus())}break}})),this.ui={container:e,styleSheet:t,leftActionBar:n,titleBar:i,title:s,description1:a,description2:h,rightActionBar:o,checkAll:c,filterContainer:d,inputBox:f,visibleCountContainer:g,visibleCount:p,countContainer:_,count:v,okContainer:b,ok:C,message:S,customButtonContainer:y,customButton:x,list:w,progressBar:L,onDidAccept:this.onDidAcceptEmitter.event,onDidCustom:this.onDidCustomEmitter.event,onDidTriggerButton:this.onDidTriggerButtonEmitter.event,ignoreFocusOut:!1,keyMods:this.keyMods,isScreenReaderOptimized:()=>this.options.isScreenReaderOptimized(),show:P=>this.show(P),hide:()=>this.hide(),setVisibilities:P=>this.setVisibilities(P),setComboboxAccessibility:P=>this.setComboboxAccessibility(P),setEnabled:P=>this.setEnabled(P),setContextKey:P=>this.options.setContextKey(P)},this.updateStyles(),this.ui}pick(e,t={},i=et.None){return new Promise((n,s)=>{let o=h=>{o=n,t.onKeyMods&&t.onKeyMods(a.keyMods),n(h)};if(i.isCancellationRequested){o(void 0);return}const a=this.createQuickPick();let l;const c=[a,a.onDidAccept(()=>{if(a.canSelectMany)o(a.selectedItems.slice()),a.hide();else{const h=a.activeItems[0];h&&(o(h),a.hide())}}),a.onDidChangeActive(h=>{const u=h[0];u&&t.onDidFocus&&t.onDidFocus(u)}),a.onDidChangeSelection(h=>{if(!a.canSelectMany){const u=h[0];u&&(o(u),a.hide())}}),a.onDidTriggerItemButton(h=>t.onDidTriggerItemButton&&t.onDidTriggerItemButton(Object.assign(Object.assign({},h),{removeItem:()=>{const u=a.items.indexOf(h.item);if(u!==-1){const d=a.items.slice(),f=d.splice(u,1),g=a.activeItems.filter(_=>_!==f[0]),p=a.keepScrollPosition;a.keepScrollPosition=!0,a.items=d,g&&(a.activeItems=g),a.keepScrollPosition=p}}}))),a.onDidChangeValue(h=>{l&&!h&&(a.activeItems.length!==1||a.activeItems[0]!==l)&&(a.activeItems=[l])}),i.onCancellationRequested(()=>{a.hide()}),a.onDidHide(()=>{ht(c),o(void 0)})];a.title=t.title,a.canSelectMany=!!t.canPickMany,a.placeholder=t.placeHolder,a.ignoreFocusOut=!!t.ignoreFocusLost,a.matchOnDescription=!!t.matchOnDescription,a.matchOnDetail=!!t.matchOnDetail,a.matchOnLabel=t.matchOnLabel===void 0||t.matchOnLabel,a.autoFocusOnList=t.autoFocusOnList===void 0||t.autoFocusOnList,a.quickNavigate=t.quickNavigate,a.contextKey=t.contextKey,a.busy=!0,Promise.all([e,t.activeItem]).then(([h,u])=>{l=u,a.busy=!1,a.items=h,a.canSelectMany&&(a.selectedItems=h.filter(d=>d.type!=="separator"&&d.picked)),l&&(a.activeItems=[l])}),a.show(),Promise.resolve(e).then(void 0,h=>{s(h),a.hide()})})}createQuickPick(){const e=this.getUI();return new n_(e)}show(e){const t=this.getUI();this.onShowEmitter.fire();const i=this.controller;this.controller=e,i&&i.didHide(),this.setEnabled(!0),t.leftActionBar.clear(),t.title.textContent="",t.description1.textContent="",t.description2.textContent="",t.rightActionBar.clear(),t.checkAll.checked=!1,t.inputBox.placeholder="",t.inputBox.password=!1,t.inputBox.showDecoration(si.Ignore),t.visibleCount.setCount(0),t.count.setCount(0),zl(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,this.setComboboxAccessibility(!1),t.inputBox.ariaLabel="";const n=this.options.backKeybindingLabel();BI.tooltip=n?m("quickInput.backWithKeybinding","Back ({0})",n):m("quickInput.back","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.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[e.checkBox?"add":"remove"]("show-checkboxes"),this.updateLayout()}setComboboxAccessibility(e){if(e!==this.comboboxAccessibility){const t=this.getUI();this.comboboxAccessibility=e,this.comboboxAccessibility?(t.inputBox.setAttribute("role","combobox"),t.inputBox.setAttribute("aria-haspopup","true"),t.inputBox.setAttribute("aria-autocomplete","list"),t.inputBox.setAttribute("aria-activedescendant",t.list.getActiveDescendant()||"")):(t.inputBox.removeAttribute("role"),t.inputBox.removeAttribute("aria-haspopup"),t.inputBox.removeAttribute("aria-autocomplete"),t.inputBox.removeAttribute("aria-activedescendant"))}}setEnabled(e){if(e!==this.enabled){this.enabled=e;for(const t of this.getUI().leftActionBar.viewItems)t.getAction().enabled=e;for(const t of this.getUI().rightActionBar.viewItems)t.getAction().enabled=e;this.getUI().checkAll.disabled=!e,this.getUI().ok.enabled=e,this.getUI().list.enabled=e}}hide(e){var t;const i=this.controller;if(i){const n=!((t=this.ui)===null||t===void 0?void 0:t.container.contains(document.activeElement));this.controller=null,this.onHideEmitter.fire(),this.getUI().container.style.display="none",n||(this.previousFocusElement&&this.previousFocusElement.offsetParent?(this.previousFocusElement.focus(),this.previousFocusElement=void 0):this.options.returnFocus()),i.didHide(e)}}layout(e,t){this.dimension=e,this.titleBarOffset=t,this.updateLayout()}updateLayout(){if(this.ui){this.ui.container.style.top=`${this.titleBarOffset}px`;const e=this.ui.container.style,t=Math.min(this.dimension.width*.62,M0.MAX_WIDTH);e.width=t+"px",e.marginLeft="-"+t/2+"px",this.ui.inputBox.layout(),this.ui.list.layout(this.dimension&&this.dimension.height*.4)}}applyStyles(e){this.styles=e,this.updateStyles()}updateStyles(){if(this.ui){const{quickInputTitleBackground:e,quickInputBackground:t,quickInputForeground:i,contrastBorder:n,widgetShadow:s}=this.styles.widget;this.ui.titleBar.style.backgroundColor=e?e.toString():"",this.ui.container.style.backgroundColor=t?t.toString():"",this.ui.container.style.color=i?i.toString():"",this.ui.container.style.border=n?`1px solid ${n}`:"",this.ui.container.style.boxShadow=s?`0 0 8px 2px ${s}`:"",this.ui.inputBox.style(this.styles.inputBox),this.ui.count.style(this.styles.countBadge),this.ui.ok.style(this.styles.button),this.ui.customButton.style(this.styles.button),this.ui.progressBar.style(this.styles.progressBar),this.ui.list.style(this.styles.list);const o=[];this.styles.list.pickerGroupBorder&&o.push(`.quick-input-list .quick-input-list-entry { border-top-color: ${this.styles.list.pickerGroupBorder}; }`),this.styles.list.pickerGroupForeground&&o.push(`.quick-input-list .quick-input-list-separator { color: ${this.styles.list.pickerGroupForeground}; }`),(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 a=o.join(` -`);a!==this.ui.styleSheet.textContent&&(this.ui.styleSheet.textContent=a)}}}M0.MAX_WIDTH=600;var WI;(function(r){r[r.PRESERVE=0]="PRESERVE",r[r.LAST=1]="LAST"})(WI||(WI={}));const yu={Quickaccess:"workbench.contributions.quickaccess"};class Sse{constructor(){this.providers=[],this.defaultProvider=void 0}registerQuickAccessProvider(e){return e.prefix.length===0?this.defaultProvider=e:this.providers.push(e),this.providers.sort((t,i)=>i.prefix.length-t.prefix.length),Xe(()=>{this.providers.splice(this.providers.indexOf(e),1),this.defaultProvider===e&&(this.defaultProvider=void 0)})}getQuickAccessProviders(){return xh([this.defaultProvider,...this.providers])}getQuickAccessProvider(e){return e&&this.providers.find(i=>e.startsWith(i.prefix))||void 0||this.defaultProvider}}mi.add(yu.Quickaccess,new Sse);const kc=bt("quickInputService");var Lse=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},w3=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let VI=class extends Y{constructor(e,t){super();this.quickInputService=e,this.instantiationService=t,this.registry=mi.as(yu.Quickaccess),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),a=this.visibleQuickAccess,l=a==null?void 0:a.descriptor;if(a&&o&&l===o){e!==o.prefix&&!(i==null?void 0:i.preserveValue)&&(a.picker.value=e),this.adjustValueSelection(a.picker,o,i);return}if(o&&!(i==null?void 0:i.preserveValue)){let g;if(a&&l&&l!==o){const p=a.value.substr(l.prefix.length);p&&(g=`${o.prefix}${p}`)}if(!g){const p=s==null?void 0:s.defaultFilterValue;p===WI.LAST?g=this.lastAcceptedPickerValues.get(o):typeof p=="string"&&(g=`${o.prefix}${p}`)}typeof g=="string"&&(e=g)}const c=new le,h=c.add(this.quickInputService.createQuickPick());h.value=e,this.adjustValueSelection(h,o,i),h.placeholder=o==null?void 0:o.placeholder,h.quickNavigate=i==null?void 0:i.quickNavigateConfiguration,h.hideInput=!!h.quickNavigate&&!a,(typeof(i==null?void 0:i.itemActivation)=="number"||(i==null?void 0:i.quickNavigateConfiguration))&&(h.itemActivation=(n=i==null?void 0:i.itemActivation)!==null&&n!==void 0?n:mo.SECOND),h.contextKey=o==null?void 0:o.contextKey,h.filterValue=g=>g.substring(o?o.prefix.length:0),(o==null?void 0:o.placeholder)&&(h.ariaLabel=o==null?void 0:o.placeholder);let u,d;t&&(u=new Promise(g=>d=g),c.add(Na(h.onWillAccept)(g=>{g.veto(),h.hide()}))),c.add(this.registerPickerListeners(h,s,o,e));const f=c.add(new Rn);if(s&&c.add(s.provide(h,f.token)),Na(h.onDidHide)(()=>{h.selectedItems.length===0&&f.cancel(),c.dispose(),d==null||d(h.selectedItems)}),h.show(),t)return u}adjustValueSelection(e,t,i){var n;let s;(i==null?void 0:i.preserveValue)?s=[e.value.length,e.value.length]:s=[(n=t==null?void 0:t.prefix.length)!==null&&n!==void 0?n:0,e.value.length],e.valueSelection=s}registerPickerListeners(e,t,i,n){const s=new le,o=this.visibleQuickAccess={picker:e,descriptor:i,value:n};return s.add(Xe(()=>{o===this.visibleQuickAccess&&(this.visibleQuickAccess=void 0)})),s.add(e.onDidChangeValue(a=>{const[l]=this.getOrInstantiateProvider(a);l!==t?this.show(a,{preserveValue:!0}):o.value=a})),i&&s.add(e.onDidAccept(()=>{this.lastAcceptedPickerValues.set(i,e.value)})),s}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]}};VI=Lse([w3(0,kc),w3(1,ut)],VI);var xse=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},r_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let HI=class extends wZ{constructor(e,t,i,n,s){super(i);this.instantiationService=e,this.contextKeyService=t,this.accessibilityService=n,this.layoutService=s,this.contexts=new Map}get controller(){return this._controller||(this._controller=this._register(this.createController())),this._controller}get quickAccess(){return this._quickAccess||(this._quickAccess=this._register(this.instantiationService.createInstance(VI))),this._quickAccess}createController(e=this.layoutService,t){var i,n;const s={idPrefix:"quickInput_",container:e.container,ignoreFocusOut:()=>!1,isScreenReaderOptimized:()=>this.accessibilityService.isScreenReaderOptimized(),backKeybindingLabel:()=>{},setContextKey:a=>this.setContextKey(a),returnFocus:()=>e.focus(),createList:(a,l,c,h,u)=>this.instantiationService.createInstance(_I,a,l,c,h,u),styles:this.computeStyles()},o=this._register(new M0(Object.assign(Object.assign({},s),t)));return o.layout(e.dimension,(n=(i=e.offset)===null||i===void 0?void 0:i.top)!==null&&n!==void 0?n:0),this._register(e.onDidLayout(a=>{var l,c;return o.layout(a,(c=(l=e.offset)===null||l===void 0?void 0:l.top)!==null&&c!==void 0?c:0)})),this._register(o.onShow(()=>this.resetContextKeys())),this._register(o.onHide(()=>this.resetContextKeys())),o}setContextKey(e){let t;e&&(t=this.contexts.get(e),t||(t=new Le(e,!1).bindTo(this.contextKeyService),this.contexts.set(e,t))),!(t&&t.get())&&(this.resetContextKeys(),t&&t.set(!0))}resetContextKeys(){this.contexts.forEach(e=>{e.get()&&e.reset()})}pick(e,t={},i=et.None){return this.controller.pick(e,t,i)}createQuickPick(){return this.controller.createQuickPick()}updateStyles(){this.controller.applyStyles(this.computeStyles())}computeStyles(){return{widget:Object.assign({},fo(this.theme,{quickInputBackground:KO,quickInputForeground:zY,quickInputTitleBackground:$Y,contrastBorder:_i,widgetShadow:sc})),inputBox:fo(this.theme,{inputForeground:Uk,inputBackground:$k,inputBorder:jk,inputValidationInfoBackground:Zk,inputValidationInfoForeground:Yk,inputValidationInfoBorder:Xk,inputValidationWarningBackground:BO,inputValidationWarningForeground:WO,inputValidationWarningBorder:VO,inputValidationErrorBackground:HO,inputValidationErrorForeground:zO,inputValidationErrorBorder:$O}),countBadge:fo(this.theme,{badgeBackground:Yp,badgeForeground:Xp,badgeBorder:_i}),button:fo(this.theme,{buttonForeground:RY,buttonBackground:Jk,buttonHoverBackground:MY,buttonBorder:_i}),progressBar:fo(this.theme,{progressBarBackground:PY}),keybindingLabel:fo(this.theme,{keybindingLabelBackground:KY,keybindingLabelForeground:qY,keybindingLabelBorder:GY,keybindingLabelBottomBorder:ZY,keybindingLabelShadow:sc}),list:fo(this.theme,{listBackground:KO,listInactiveFocusForeground:ZC,listInactiveSelectionIconForeground:YC,listInactiveFocusBackground:XC,listFocusOutline:En,listInactiveFocusOutline:En,pickerGroupBorder:jY,pickerGroupForeground:UY})}}};HI=xse([r_(0,ut),r_(1,Fe),r_(2,qt),r_(3,_r),r_(4,n0)],HI);var y3=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Su=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let zI=class extends HI{constructor(e,t,i,n,s,o){super(t,i,n,s,o);this.host=void 0;const a=Hf.get(e);this.host={_serviceBrand:void 0,get container(){return a.widget.getDomNode()},get dimension(){return e.getLayoutInfo()},get onDidLayout(){return e.onDidLayoutChange},focus:()=>e.focus()}}createController(){return super.createController(this.host)}};zI=y3([Su(1,ut),Su(2,Fe),Su(3,qt),Su(4,_r),Su(5,n0)],zI);let $I=class{constructor(e,t){this.instantiationService=e,this.codeEditorService=t,this.mapEditorToService=new Map}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(zI,e);this.mapEditorToService.set(e,t),Na(e.onDidDispose)(()=>{i.dispose(),this.mapEditorToService.delete(e)})}return t}get quickAccess(){return this.activeService.quickAccess}pick(e,t={},i=et.None){return this.activeService.pick(e,t,i)}createQuickPick(){return this.activeService.createQuickPick()}};$I=y3([Su(0,ut),Su(1,Ct)],$I);class Hf{constructor(e){this.editor=e,this.widget=new P0(this.editor)}static get(e){return e.getContribution(Hf.ID)}dispose(){this.widget.dispose()}}Hf.ID="editor.controller.quickInput";class P0{constructor(e){this.codeEditor=e,this.domNode=document.createElement("div"),this.codeEditor.addOverlayWidget(this)}getId(){return P0.ID}getDomNode(){return this.domNode}getPosition(){return{preference:2}}dispose(){this.codeEditor.removeOverlayWidget(this)}}P0.ID="editor.contrib.quickInputWidget";wt(Hf.ID,Hf);var yt;(function(r){const e=new xm;class t{constructor(l,c){this._serviceId=l,this._factory=c,this._value=null}get id(){return this._serviceId}get(l){if(!this._value){if(l&&(this._value=l[this._serviceId.toString()]),this._value||(this._value=this._factory(l)),!this._value)throw new Error("Service "+this._serviceId+" is missing!");e.set(this._serviceId,this._value)}return this._value}}r.LazyStaticService=t;let i=[];function n(a,l){let c=new t(a,l);return i.push(c),c}function s(a){let l=new xm;for(const[h,u]of kte())l.set(h,u);for(let h in a)a.hasOwnProperty(h)&&l.set(bt(h),a[h]);i.forEach(h=>l.set(h.id,h.get(a)));let c=new r0(l,!0);return l.set(ut,c),[l,c]}r.init=s,r.instantiationService=n(ut,()=>new r0(e,!0));const o=new JP;r.configurationService=n(hi,()=>o),r.resourceConfigurationService=n(Fx,()=>new gZ(o)),r.resourcePropertiesService=n(sP,()=>new _k(o)),r.contextService=n(qP,()=>new yC),r.labelService=n(zm,()=>new _Z),r.telemetryService=n(ec,()=>new pZ),r.dialogService=n(Hm,()=>new dZ),r.notificationService=n(Di,()=>new wC),r.markerService=n(Xm,()=>new Cu),r.modeService=n(Ds,a=>new cie),r.standaloneThemeService=n(au,()=>new Bie),r.logService=n(Va,()=>new Gq(new qq)),r.undoRedoService=n(Hw,a=>new N0(r.dialogService.get(a),r.notificationService.get(a))),r.modelService=n(gi,a=>new $w(r.configurationService.get(a),r.resourcePropertiesService.get(a),r.standaloneThemeService.get(a),r.logService.get(a),r.undoRedoService.get(a))),r.markerDecorationsService=n(Ck,a=>new yI(r.modelService.get(a),r.markerService.get(a))),r.contextKeyService=n(Fe,a=>new EE(r.configurationService.get(a))),r.codeEditorService=n(Ct,a=>new Ww(null,r.contextKeyService.get(a),r.standaloneThemeService.get(a))),r.editorProgressService=n(rl,()=>new CC),r.storageService=n(aa,()=>new Ore),r.editorWorkerService=n(ks,a=>new Kx(r.modelService.get(a),r.resourceConfigurationService.get(a),r.logService.get(a)))})(yt||(yt={}));class kse extends Y{constructor(e,t){super();const[i,n]=yt.init(t);this._serviceCollection=i,this._instantiationService=n;const s=this.get(hi),o=this.get(Di),a=this.get(ec),l=this.get(qt),c=this.get(Va),h=this.get(Fe);let u=(_,v)=>{let b=null;return t&&(b=t[_.toString()]),b||(b=v()),this._serviceCollection.set(_,b),b};u(_r,()=>new SI(h,s)),u(us,()=>new uI(l));let d=u(fi,()=>new fZ(this._instantiationService)),f=u(Qt,()=>this._register(new XP(h,d,a,o,c,e))),g=u(n0,()=>new bZ(yt.codeEditorService.get(Ct),e));u(kc,()=>new $I(n,yt.codeEditorService.get(Ct)));let p=u(mc,()=>this._register(new jE(g)));u(bc,()=>new Vre),u(_c,()=>{const _=new UE(a,o,p,f,l);return _.configure({blockMouse:!1}),this._register(_)}),u(Th,()=>new CI(d)),u(ik,()=>new mZ(yt.modelService.get(gi)))}get(e){let t=this._serviceCollection.get(e);if(!t)throw new Error("Missing service "+e);return t}set(e,t){this._serviceCollection.set(e,t)}has(e){return this._serviceCollection.has(e)}}function S3(r,e,t){let i=new kse(r,e),n=null;i.has(so)||(n=new mk(yt.modelService.get()),i.set(so,n)),i.has(Js)||i.set(Js,new ox(i.get(Ct),i.get(fi)));let s=t(i);return n&&n.setEditor(s),s}function Dse(r,e,t){return S3(r,t||{},i=>new mE(r,e,i,i.get(ut),i.get(Ct),i.get(fi),i.get(Fe),i.get(Qt),i.get(mc),i.get(au),i.get(Di),i.get(hi),i.get(_r),i.get(gi),i.get(Ds)))}function Ese(r){return yt.codeEditorService.get().onCodeEditorAdd(e=>{r(e)})}function Ise(r,e,t){return S3(r,t||{},i=>new _E(r,e,i,i.get(ut),i.get(Fe),i.get(Qt),i.get(mc),i.get(ks),i.get(Ct),i.get(au),i.get(Di),i.get(hi),i.get(_c),i.get(rl),i.get(bc)))}function Nse(r,e){return new LK(r,e)}function Tse(r,e,t){return O4(yt.modelService.get(),yt.modeService.get(),r,e,t)}function Ase(r,e){yt.modelService.get().setMode(r,yt.modeService.get().create(e))}function Rse(r,e,t){r&&yt.markerService.get().changeOne(e,r.uri,t)}function Mse(r){return yt.markerService.get().read(r)}function Pse(r){return yt.markerService.get().onMarkerChanged(r)}function Ose(r){return yt.modelService.get().getModel(r)}function Fse(){return yt.modelService.get().getModels()}function Bse(r){return yt.modelService.get().onModelAdded(r)}function Wse(r){return yt.modelService.get().onModelRemoved(r)}function Vse(r){return yt.modelService.get().onModelModeChanged(e=>{r({model:e.model,oldLanguage:e.oldModeId})})}function Hse(r){return Jq(yt.modelService.get(),r)}function zse(r,e){const t=yt.standaloneThemeService.get();return t.registerEditorContainer(r),ek.colorizeElement(t,yt.modeService.get(),r,e)}function $se(r,e,t){return yt.standaloneThemeService.get().registerEditorContainer(document.body),ek.colorize(yt.modeService.get(),r,e,t)}function Use(r,e,t=4){return yt.standaloneThemeService.get().registerEditorContainer(document.body),ek.colorizeModelLine(r,e,t)}function jse(r){let e=ti.get(r);return e||{getInitialState:()=>Lp,tokenize:(t,i,n,s)=>z2(r,t,n,s)}}function Kse(r,e){yt.modeService.get().triggerMode(e);let i=jse(e),n=Bo(r),s=[],o=i.getInitialState();for(let a=0,l=n.length;a<l;a++){let c=n[a],h=i.tokenize(c,!0,o,0);s[a]=h.tokens,o=h.endState}return s}function qse(r,e){yt.standaloneThemeService.get().defineTheme(r,e)}function Gse(r){yt.standaloneThemeService.get().setTheme(r)}function Zse(){NZ()}function Yse(r,e){return lt.registerCommand({id:r,handler:e})}function Xse(){return{create:Dse,onDidCreateEditor:Ese,createDiffEditor:Ise,createDiffNavigator:Nse,createModel:Tse,setModelLanguage:Ase,setModelMarkers:Rse,getModelMarkers:Mse,onDidChangeMarkers:Pse,getModels:Fse,getModel:Ose,onDidCreateModel:Bse,onWillDisposeModel:Wse,onDidChangeModelLanguage:Vse,createWebWorker:Hse,colorizeElement:zse,colorize:$se,colorizeModelLine:Use,tokenize:Kse,defineTheme:qse,setTheme:Gse,remeasureFonts:Zse,registerCommand:Yse,AccessibilitySupport:US,ContentWidgetPositionPreference:ZS,CursorChangeReason:YS,DefaultEndOfLine:XS,EditorAutoIndentStrategy:JS,EditorOption:eL,EndOfLinePreference:tL,EndOfLineSequence:iL,MinimapPosition:cL,MouseTargetType:hL,OverlayWidgetPositionPreference:uL,OverviewRulerLane:dL,RenderLineNumbersType:fL,RenderMinimap:gL,ScrollbarVisibility:mL,ScrollType:pL,TextEditorCursorBlinkingStyle:wL,TextEditorCursorStyle:yL,TrackedRangeStickiness:SL,WrappingIndent:LL,ConfigurationChangedEvent:CM,BareFontInfo:wh,FontInfo:cx,TextModelResolvedOptions:wv,FindMatch:_p,EditorType:mp,EditorOptions:Ks}}function Qse(r,e){if(!e||!Array.isArray(e))return!1;for(const t of e)if(!r(t))return!1;return!0}function O0(r,e){return typeof r=="boolean"?r:e}function L3(r,e){return typeof r=="string"?r:e}function Jse(r){const e={};for(const t of r)e[t]=!0;return e}function x3(r,e=!1){e&&(r=r.map(function(i){return i.toLowerCase()}));const t=Jse(r);return e?function(i){return t[i.toLowerCase()]!==void 0&&t.hasOwnProperty(i.toLowerCase())}:function(i){return t[i]!==void 0&&t.hasOwnProperty(i)}}function UI(r,e){e=e.replace(/@@/g,"");let t=0,i;do i=!1,e=e.replace(/@(\w+)/g,function(s,o){i=!0;let a="";if(typeof r[o]=="string")a=r[o];else if(r[o]&&r[o]instanceof RegExp)a=r[o].source;else throw r[o]===void 0?Mt(r,"language definition does not contain attribute '"+o+"', used at: "+e):Mt(r,"attribute reference '"+o+"' must be a string, used at: "+e);return Qd(a)?"":"(?:"+a+")"}),t++;while(i&&t<5);e=e.replace(/\x01/g,"@");let n=(r.ignoreCase?"i":"")+(r.unicode?"u":"");return new RegExp(e,n)}function eoe(r,e,t,i){if(i<0)return r;if(i<e.length)return e[i];if(i>=100){i=i-100;let n=t.split(".");if(n.unshift(t),i<n.length)return n[i]}return null}function toe(r,e,t,i){let n=-1,s=t,o=t.match(/^\$(([sS]?)(\d\d?)|#)(.*)$/);o&&(o[3]&&(n=parseInt(o[3]),o[2]&&(n=n+100)),s=o[4]);let a="~",l=s;!s||s.length===0?(a="!=",l=""):/^\w*$/.test(l)?a="==":(o=s.match(/^(@|!@|~|!~|==|!=)(.*)$/),o&&(a=o[1],l=o[2]));let c;if((a==="~"||a==="!~")&&/^(\w|\|)*$/.test(l)){let h=x3(l.split("|"),r.ignoreCase);c=function(u){return a==="~"?h(u):!h(u)}}else if(a==="@"||a==="!@"){let h=r[l];if(!h)throw Mt(r,"the @ match target '"+l+"' is not defined, in rule: "+e);if(!Qse(function(d){return typeof d=="string"},h))throw Mt(r,"the @ match target '"+l+"' must be an array of strings, in rule: "+e);let u=x3(h,r.ignoreCase);c=function(d){return a==="@"?u(d):!u(d)}}else if(a==="~"||a==="!~")if(l.indexOf("$")<0){let h=UI(r,"^"+l+"$");c=function(u){return a==="~"?h.test(u):!h.test(u)}}else c=function(h,u,d,f){return UI(r,"^"+Zl(r,l,u,d,f)+"$").test(h)};else if(l.indexOf("$")<0){let h=Gl(r,l);c=function(u){return a==="=="?u===h:u!==h}}else{let h=Gl(r,l);c=function(u,d,f,g,p){let _=Zl(r,h,d,f,g);return a==="=="?u===_:u!==_}}return n===-1?{name:t,value:i,test:function(h,u,d,f){return c(h,h,u,d,f)}}:{name:t,value:i,test:function(h,u,d,f){let g=eoe(h,u,d,n);return c(g||"",h,u,d,f)}}}function jI(r,e,t){if(t){if(typeof t=="string")return t;if(t.token||t.token===""){if(typeof t.token!="string")throw Mt(r,"a 'token' attribute must be of type string, in rule: "+e);{let i={token:t.token};if(t.token.indexOf("$")>=0&&(i.tokenSubst=!0),typeof t.bracket=="string")if(t.bracket==="@open")i.bracket=1;else if(t.bracket==="@close")i.bracket=-1;else throw Mt(r,"a 'bracket' attribute must be either '@open' or '@close', in rule: "+e);if(t.next){if(typeof t.next!="string")throw Mt(r,"the next state must be a string value in rule: "+e);{let n=t.next;if(!/^(@pop|@push|@popall)$/.test(n)&&(n[0]==="@"&&(n=n.substr(1)),n.indexOf("$")<0&&!_G(r,Zl(r,n,"",[],""))))throw Mt(r,"the next state '"+t.next+"' is not defined in rule: "+e);i.next=n}}return typeof t.goBack=="number"&&(i.goBack=t.goBack),typeof t.switchTo=="string"&&(i.switchTo=t.switchTo),typeof t.log=="string"&&(i.log=t.log),typeof t.nextEmbedded=="string"&&(i.nextEmbedded=t.nextEmbedded,r.usesEmbedded=!0),i}}else if(Array.isArray(t)){let i=[];for(let n=0,s=t.length;n<s;n++)i[n]=jI(r,e,t[n]);return{group:i}}else if(t.cases){let i=[];for(let s in t.cases)if(t.cases.hasOwnProperty(s)){const o=jI(r,e,t.cases[s]);s==="@default"||s==="@"||s===""?i.push({test:void 0,value:o,name:s}):s==="@eos"?i.push({test:function(a,l,c,h){return h},value:o,name:s}):i.push(toe(r,e,s,o))}const n=r.defaultToken;return{test:function(s,o,a,l){for(const c of i)if(!c.test||c.test(s,o,a,l))return c.value;return n}}}else throw Mt(r,"an action must be a string, an object with a 'token' or 'cases' attribute, or an array of actions; in rule: "+e)}else return{token:""}}class ioe{constructor(e){this.regex=new RegExp(""),this.action={token:""},this.matchOnlyAtLineStart=!1,this.name="",this.name=e}setRegex(e,t){let i;if(typeof t=="string")i=t;else if(t instanceof RegExp)i=t.source;else throw Mt(e,"rules must start with a match string or regular expression: "+this.name);this.matchOnlyAtLineStart=i.length>0&&i[0]==="^",this.name=this.name+": "+i,this.regex=UI(e,"^(?:"+(this.matchOnlyAtLineStart?i.substr(1):i)+")")}setAction(e,t){this.action=jI(e,this.name,t)}}function noe(r,e){if(!e||typeof e!="object")throw new Error("Monarch: expecting a language definition object");let t={};t.languageId=r,t.includeLF=O0(e.includeLF,!1),t.noThrow=!1,t.maxStack=100,t.start=typeof e.start=="string"?e.start:null,t.ignoreCase=O0(e.ignoreCase,!1),t.unicode=O0(e.unicode,!1),t.tokenPostfix=L3(e.tokenPostfix,"."+t.languageId),t.defaultToken=L3(e.defaultToken,"source"),t.usesEmbedded=!1;let i=e;i.languageId=r,i.includeLF=t.includeLF,i.ignoreCase=t.ignoreCase,i.unicode=t.unicode,i.noThrow=t.noThrow,i.usesEmbedded=t.usesEmbedded,i.stateNames=e.tokenizer,i.defaultToken=t.defaultToken;function n(o,a,l){for(const c of l){let h=c.include;if(h){if(typeof h!="string")throw Mt(t,"an 'include' attribute must be a string at: "+o);if(h[0]==="@"&&(h=h.substr(1)),!e.tokenizer[h])throw Mt(t,"include target '"+h+"' is not defined at: "+o);n(o+"."+h,a,e.tokenizer[h])}else{const u=new ioe(o);if(Array.isArray(c)&&c.length>=1&&c.length<=3)if(u.setRegex(i,c[0]),c.length>=3)if(typeof c[1]=="string")u.setAction(i,{token:c[1],next:c[2]});else if(typeof c[1]=="object"){const d=c[1];d.next=c[2],u.setAction(i,d)}else throw Mt(t,"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: "+o);else u.setAction(i,c[1]);else{if(!c.regex)throw Mt(t,"a rule must either be an array, or an object with a 'regex' or 'include' field at: "+o);c.name&&typeof c.name=="string"&&(u.name=c.name),c.matchOnlyAtStart&&(u.matchOnlyAtLineStart=O0(c.matchOnlyAtLineStart,!1)),u.setRegex(i,c.regex),u.setAction(i,c.action)}a.push(u)}}}if(!e.tokenizer||typeof e.tokenizer!="object")throw Mt(t,"a language definition must define the 'tokenizer' attribute as an object");t.tokenizer=[];for(let o in e.tokenizer)if(e.tokenizer.hasOwnProperty(o)){t.start||(t.start=o);const a=e.tokenizer[o];t.tokenizer[o]=new Array,n("tokenizer."+o,t.tokenizer[o],a)}if(t.usesEmbedded=i.usesEmbedded,e.brackets){if(!Array.isArray(e.brackets))throw Mt(t,"the 'brackets' attribute must be defined as an array")}else e.brackets=[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}];let s=[];for(let o of e.brackets){let a=o;if(a&&Array.isArray(a)&&a.length===3&&(a={token:a[2],open:a[0],close:a[1]}),a.open===a.close)throw Mt(t,"open and close brackets in a 'brackets' attribute must be different: "+a.open+` - hint: use the 'bracket' attribute if matching on equal brackets is required.`);if(typeof a.open=="string"&&typeof a.token=="string"&&typeof a.close=="string")s.push({token:a.token+t.tokenPostfix,open:Gl(t,a.open),close:Gl(t,a.close)});else throw Mt(t,"every element in the 'brackets' array must be a '{open,close,token}' object or array")}return t.brackets=s,t.noThrow=!0,t}function roe(r){lu.registerLanguage(r)}function soe(){let r=[];return r=r.concat(lu.getLanguages()),r}function ooe(r){let e=yt.modeService.get().getLanguageIdentifier(r);return e?e.id:0}function aoe(r,e){let t=yt.modeService.get().onDidEncounterLanguage(i=>{i.language===r&&(t.dispose(),e())});return t}function loe(r,e){let t=yt.modeService.get().getLanguageIdentifier(r);if(!t)throw new Error(`Cannot set configuration for unknown language ${r}`);return ze.register(t,e,100)}class coe{constructor(e,t){this._languageIdentifier=e,this._actual=t}getInitialState(){return this._actual.getInitialState()}tokenize(e,t,i,n){if(typeof this._actual.tokenize=="function")return s_.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n);throw new Error("Not supported!")}tokenize2(e,t,i){let n=this._actual.tokenizeEncoded(e,i);return new iv(n.tokens,n.endState)}}class s_{constructor(e,t,i){this._standaloneThemeService=e,this._languageIdentifier=t,this._actual=i}getInitialState(){return this._actual.getInitialState()}static _toClassicTokens(e,t,i){let n=[],s=0;for(let o=0,a=e.length;o<a;o++){const l=e[o];let c=l.startIndex;o===0?c=0:c<s&&(c=s),n[o]=new tv(c+i,l.scopes,t),s=c}return n}static adaptTokenize(e,t,i,n,s){let o=t.tokenize(i,n),a=s_._toClassicTokens(o.tokens,e,s),l;return o.endState.equals(n)?l=n:l=o.endState,new $S(a,l)}tokenize(e,t,i,n){return s_.adaptTokenize(this._languageIdentifier.language,this._actual,e,i,n)}_toBinaryTokens(e,t){const i=this._languageIdentifier.id,n=this._standaloneThemeService.getColorTheme().tokenTheme;let s=[],o=0,a=0;for(let c=0,h=e.length;c<h;c++){const u=e[c],d=n.match(i,u.scopes);if(o>0&&s[o-1]===d)continue;let f=u.startIndex;c===0?f=0:f<a&&(f=a),s[o++]=f+t,s[o++]=d,a=f}let l=new Uint32Array(o);for(let c=0;c<o;c++)l[c]=s[c];return l}tokenize2(e,t,i,n){let s=this._actual.tokenize(e,i),o=this._toBinaryTokens(s.tokens,n),a;return s.endState.equals(i)?a=i:a=s.endState,new iv(o,a)}}function hoe(r){return"tokenizeEncoded"in r}function k3(r){return r&&typeof r.then=="function"}function uoe(r){if(r){const e=[null];for(let t=1,i=r.length;t<i;t++)e[t]=K.fromHex(r[t]);yt.standaloneThemeService.get().setColorMapOverride(e)}else yt.standaloneThemeService.get().setColorMapOverride(null)}function doe(r,e){let t=yt.modeService.get().getLanguageIdentifier(r);if(!t)throw new Error(`Cannot set tokens provider for unknown language ${r}`);const i=n=>hoe(n)?new coe(t,n):new s_(yt.standaloneThemeService.get(),t,n);return k3(e)?ti.registerPromise(r,e.then(n=>i(n))):ti.register(r,i(e))}function foe(r,e){const t=i=>CG(yt.modeService.get(),yt.standaloneThemeService.get(),r,noe(r,i));return k3(e)?ti.registerPromise(r,e.then(i=>t(i))):ti.register(r,t(e))}function goe(r,e){return Iv.register(r,e)}function poe(r,e){return Nv.register(r,e)}function moe(r,e){return yh.register(r,e)}function _oe(r,e){return Cp.register(r,{provideHover:(t,i,n)=>{let s=t.getWordAtPosition(i);return Promise.resolve(e.provideHover(t,i,n)).then(o=>{if(!!o)return!o.range&&s&&(o.range=new k(i.lineNumber,s.startColumn,i.lineNumber,s.endColumn)),o.range||(o.range=new k(i.lineNumber,i.column,i.lineNumber,i.column)),o})}})}function boe(r,e){return xs.register(r,e)}function voe(r,e){return Hd.register(r,e)}function Coe(r,e){return Tv.register(r,e)}function woe(r,e){return wp.register(r,e)}function yoe(r,e){return Rv.register(r,e)}function Soe(r,e){return Mv.register(r,e)}function Loe(r,e){return Wa.register(r,e)}function xoe(r,e,t){return $o.register(r,{providedCodeActionKinds:t==null?void 0:t.providedCodeActionKinds,provideCodeActions:(i,n,s,o)=>{let a=yt.markerService.get().read({resource:i.uri}).filter(l=>k.areIntersectingOrTouching(l,n));return e.provideCodeActions(i,n,{markers:a,only:s.only},o)},resolveCodeAction:e.resolveCodeAction})}function koe(r,e){return yp.register(r,e)}function Doe(r,e){return ro.register(r,e)}function Eoe(r,e){return Pv.register(r,e)}function Ioe(r,e){return Sp.register(r,e)}function Noe(r,e){return no.register(r,e)}function Toe(r,e){return zd.register(r,e)}function Aoe(r,e){return Cx.register(r,e)}function Roe(r,e){return Av.register(r,e)}function Moe(r,e){return Ov.register(r,e)}function Poe(r,e){return Fv.register(r,e)}function Ooe(r,e){return wx.register(r,e)}function Foe(r,e){return vx.register(r,e)}function Boe(r,e){return Kl.register(r,e)}function Woe(){return{register:roe,getLanguages:soe,onLanguage:aoe,getEncodedLanguageId:ooe,setLanguageConfiguration:loe,setColorMap:uoe,setTokensProvider:doe,setMonarchTokensProvider:foe,registerReferenceProvider:goe,registerRenameProvider:poe,registerCompletionItemProvider:Noe,registerSignatureHelpProvider:moe,registerHoverProvider:_oe,registerDocumentSymbolProvider:boe,registerDocumentHighlightProvider:voe,registerLinkedEditingRangeProvider:Coe,registerDefinitionProvider:woe,registerImplementationProvider:yoe,registerTypeDefinitionProvider:Soe,registerCodeLensProvider:Loe,registerCodeActionProvider:xoe,registerDocumentFormattingEditProvider:koe,registerDocumentRangeFormattingEditProvider:Doe,registerOnTypeFormattingEditProvider:Eoe,registerLinkProvider:Ioe,registerColorProvider:Toe,registerFoldingRangeProvider:Aoe,registerDeclarationProvider:Roe,registerSelectionRangeProvider:Moe,registerDocumentSemanticTokensProvider:Poe,registerDocumentRangeSemanticTokensProvider:Ooe,registerInlineCompletionsProvider:Foe,registerInlayHintsProvider:Boe,DocumentHighlightKind:QS,CompletionItemKind:KS,CompletionItemTag:qS,CompletionItemInsertTextRule:jS,SymbolKind:vL,SymbolTag:CL,IndentAction:nL,CompletionTriggerKind:GS,SignatureHelpTriggerKind:bL,InlayHintKind:rL,InlineCompletionTriggerKind:sL,FoldingRangeKind:io}}class zf{static _handleEolEdits(e,t){let i,n=[];for(let s of t)typeof s.eol=="number"&&(i=s.eol),s.range&&typeof s.text=="string"&&n.push(s);return typeof i=="number"&&e.hasModel()&&e.getModel().pushEOL(i),n}static _isFullModelReplaceEdit(e,t){if(!e.hasModel())return!1;const i=e.getModel(),n=i.validateRange(t.range);return i.getFullModelRange().equalsRange(n)}static execute(e,t,i){i&&e.pushUndoStop();const n=zf._handleEolEdits(e,t);n.length===1&&zf._isFullModelReplaceEdit(e,n[0])?e.executeEdits("formatEditsCommand",n.map(s=>ci.replace(k.lift(s.range),s.text))):e.executeEdits("formatEditsCommand",n.map(s=>ci.replaceMove(k.lift(s.range),s.text))),i&&e.pushUndoStop()}}class KI{constructor(e){this.value=e,this._lower=e.toLowerCase()}static toKey(e){return typeof e=="string"?e.toLowerCase():e._lower}}var Dc=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function qI(r){if(r=r.filter(n=>n.range),!r.length)return;let{range:e}=r[0];for(let n=1;n<r.length;n++)e=k.plusRange(e,r[n].range);const{startLineNumber:t,endLineNumber:i}=e;t===i?r.length===1?Ji(m("hint11","Made 1 formatting edit on line {0}",t)):Ji(m("hintn1","Made {0} formatting edits on line {1}",r.length,t)):r.length===1?Ji(m("hint1n","Made 1 formatting edit between lines {0} and {1}",t,i)):Ji(m("hintnn","Made {0} formatting edits between lines {1} and {2}",r.length,t,i))}function D3(r){const e=[],t=new Set,i=yp.ordered(r);for(const s of i)e.push(s),s.extensionId&&t.add(KI.toKey(s.extensionId));const n=ro.ordered(r);for(const s of n){if(s.extensionId){if(t.has(KI.toKey(s.extensionId)))continue;t.add(KI.toKey(s.extensionId))}e.push({displayName:s.displayName,extensionId:s.extensionId,provideDocumentFormattingEdits(o,a,l){return s.provideDocumentRangeFormattingEdits(o,o.getFullModelRange(),a,l)}})}return e}class Lu{static setFormatterSelector(e){return{dispose:Lu._selectors.unshift(e)}}static select(e,t,i){return Dc(this,void 0,void 0,function*(){if(e.length===0)return;const n=at.first(Lu._selectors);if(n)return yield n(e,t,i)})}}Lu._selectors=new Ir;function E3(r,e,t,i,n,s){return Dc(this,void 0,void 0,function*(){const o=r.get(ut),a=qo(e)?e.getModel():e,l=ro.ordered(a),c=yield Lu.select(l,a,i);c&&(n.report(c),yield o.invokeFunction(Voe,c,e,t,s))})}function Voe(r,e,t,i,n){return Dc(this,void 0,void 0,function*(){const s=r.get(ks);let o,a;qo(t)?(o=t.getModel(),a=new Nm(t,1|4,void 0,n)):(o=t,a=new lE(t,n));let l=[],c=0;for(let g of $x(i).sort(k.compareRangesUsingStarts))c>0&&k.areIntersectingOrTouching(l[c-1],g)?l[c-1]=k.fromPositions(l[c-1].getStartPosition(),g.getEndPosition()):c=l.push(g);const h=g=>Dc(this,void 0,void 0,function*(){return(yield e.provideDocumentRangeFormattingEdits(o,g,o.getFormattingOptions(),a.token))||[]}),u=(g,p)=>{if(!g.length||!p.length)return!1;const _=g.reduce((v,b)=>k.plusRange(v,b.range),g[0].range);if(!p.some(v=>k.intersectRanges(_,v.range)))return!1;for(let v of g)for(let b of p)if(k.intersectRanges(v.range,b.range))return!0;return!1},d=[],f=[];try{for(let g of l){if(a.token.isCancellationRequested)return!0;f.push(yield h(g))}for(let g=0;g<l.length;++g)for(let p=g+1;p<l.length;++p){if(a.token.isCancellationRequested)return!0;if(u(f[g],f[p])){const _=k.plusRange(l[g],l[p]),v=yield h(_);l.splice(p,1),l.splice(g,1),l.push(_),f.splice(p,1),f.splice(g,1),f.push(v),g=0,p=0}}for(let g of f){if(a.token.isCancellationRequested)return!0;const p=yield s.computeMoreMinimalEdits(o.uri,g);p&&d.push(...p)}}finally{a.dispose()}if(d.length===0)return!1;if(qo(t))zf.execute(t,d,!0),qI(d),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1);else{const[{range:g}]=d,p=new be(g.startLineNumber,g.startColumn,g.endLineNumber,g.endColumn);o.pushEditOperations([p],d.map(_=>({text:_.text,range:k.lift(_.range),forceMoveMarkers:!0})),_=>{for(const{range:v}of _)if(k.areIntersectingOrTouching(v,p))return[new be(v.startLineNumber,v.startColumn,v.endLineNumber,v.endColumn)];return null})}return!0})}function Hoe(r,e,t,i,n){return Dc(this,void 0,void 0,function*(){const s=r.get(ut),o=qo(e)?e.getModel():e,a=D3(o),l=yield Lu.select(a,o,t);l&&(i.report(l),yield s.invokeFunction(zoe,l,e,t,n))})}function zoe(r,e,t,i,n){return Dc(this,void 0,void 0,function*(){const s=r.get(ks);let o,a;qo(t)?(o=t.getModel(),a=new Nm(t,1|4,void 0,n)):(o=t,a=new lE(t,n));let l;try{const c=yield e.provideDocumentFormattingEdits(o,o.getFormattingOptions(),a.token);if(l=yield s.computeMoreMinimalEdits(o.uri,c),a.token.isCancellationRequested)return!0}finally{a.dispose()}if(!l||l.length===0)return!1;if(qo(t))zf.execute(t,l,i!==2),i!==2&&(qI(l),t.revealPositionInCenterIfOutsideViewport(t.getPosition(),1));else{const[{range:c}]=l,h=new be(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn);o.pushEditOperations([h],l.map(u=>({text:u.text,range:k.lift(u.range),forceMoveMarkers:!0})),u=>{for(const{range:d}of u)if(k.areIntersectingOrTouching(d,h))return[new be(d.startLineNumber,d.startColumn,d.endLineNumber,d.endColumn)];return null})}return!0})}function $oe(r,e,t,i,n){return Dc(this,void 0,void 0,function*(){const s=ro.ordered(e);for(const o of s){let a=yield Promise.resolve(o.provideDocumentRangeFormattingEdits(e,t,i,n)).catch($i);if(gr(a))return yield r.computeMoreMinimalEdits(e.uri,a)}})}function Uoe(r,e,t,i){return Dc(this,void 0,void 0,function*(){const n=D3(e);for(const s of n){let o=yield Promise.resolve(s.provideDocumentFormattingEdits(e,t,i)).catch($i);if(gr(o))return yield r.computeMoreMinimalEdits(e.uri,o)}})}function I3(r,e,t,i,n){const s=Pv.ordered(e);return s.length===0||s[0].autoFormatTriggerCharacters.indexOf(i)<0?Promise.resolve(void 0):Promise.resolve(s[0].provideOnTypeFormattingEdits(e,t,i,n,et.None)).catch($i).then(o=>r.computeMoreMinimalEdits(e.uri,o))}lt.registerCommand("_executeFormatRangeProvider",function(r,...e){const[t,i,n]=e;Nt(Ie.isUri(t)),Nt(k.isIRange(i));const s=r.get(gi).getModel(t);if(!s)throw Er("resource");return $oe(r.get(ks),s,k.lift(i),n,et.None)});lt.registerCommand("_executeFormatDocumentProvider",function(r,...e){const[t,i]=e;Nt(Ie.isUri(t));const n=r.get(gi).getModel(t);if(!n)throw Er("resource");return Uoe(r.get(ks),n,i,et.None)});lt.registerCommand("_executeFormatOnTypeProvider",function(r,...e){const[t,i,n,s]=e;Nt(Ie.isUri(t)),Nt($.isIPosition(i)),Nt(typeof n=="string");const o=r.get(gi).getModel(t);if(!o)throw Er("resource");return I3(r.get(ks),o,$.lift(i),n,s)});var GI;Ks.wrappingIndent.defaultValue=0;Ks.glyphMargin.defaultValue=!1;Ks.autoIndent.defaultValue=3;Ks.overviewRulerLanes.defaultValue=2;Lu.setFormatterSelector((r,e,t)=>Promise.resolve(r[0]));const Vn=OM();Vn.editor=Xse();Vn.languages=Woe();const joe=Vn.CancellationTokenSource,$f=Vn.Emitter,Koe=Vn.KeyCode,qoe=Vn.KeyMod,Goe=Vn.Position,dl=Vn.Range,Zoe=Vn.Selection,Yoe=Vn.SelectionDirection,nr=Vn.MarkerSeverity,ZI=Vn.MarkerTag,Ec=Vn.Uri,Xoe=Vn.Token,At=Vn.editor,pe=Vn.languages;(((GI=wi.MonacoEnvironment)===null||GI===void 0?void 0:GI.globalAPI)||typeof define=="function"&&define.amd)&&(self.monaco=Vn);typeof self.require!="undefined"&&typeof self.require.config=="function"&&self.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 Qoe="4.4.3",YI;(function(r){r[r.None=0]="None",r[r.CommonJS=1]="CommonJS",r[r.AMD=2]="AMD",r[r.UMD=3]="UMD",r[r.System=4]="System",r[r.ES2015=5]="ES2015",r[r.ESNext=99]="ESNext"})(YI||(YI={}));var XI;(function(r){r[r.None=0]="None",r[r.Preserve=1]="Preserve",r[r.React=2]="React",r[r.ReactNative=3]="ReactNative",r[r.ReactJSX=4]="ReactJSX",r[r.ReactJSXDev=5]="ReactJSXDev"})(XI||(XI={}));var QI;(function(r){r[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed"})(QI||(QI={}));var o_;(function(r){r[r.ES3=0]="ES3",r[r.ES5=1]="ES5",r[r.ES2015=2]="ES2015",r[r.ES2016=3]="ES2016",r[r.ES2017=4]="ES2017",r[r.ES2018=5]="ES2018",r[r.ES2019=6]="ES2019",r[r.ES2020=7]="ES2020",r[r.ESNext=99]="ESNext",r[r.JSON=100]="JSON",r[r.Latest=99]="Latest"})(o_||(o_={}));var JI;(function(r){r[r.Classic=1]="Classic",r[r.NodeJs=2]="NodeJs"})(JI||(JI={}));var N3=function(){function r(e,t,i,n){this._onDidChange=new $f,this._onDidExtraLibsChange=new $f,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(n),this._onDidExtraLibsChangeTimeout=-1}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"onDidExtraLibsChange",{get:function(){return this._onDidExtraLibsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"workerOptions",{get:function(){return this._workerOptions},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"inlayHintsOptions",{get:function(){return this._inlayHintsOptions},enumerable:!1,configurable:!0}),r.prototype.getExtraLibs=function(){return this._extraLibs},r.prototype.addExtraLib=function(e,t){var i=this,n;if(typeof t=="undefined"?n="ts:extralib-"+Math.random().toString(36).substring(2,15):n=t,this._extraLibs[n]&&this._extraLibs[n].content===e)return{dispose:function(){}};var s=1;return this._removedExtraLibs[n]&&(s=this._removedExtraLibs[n]+1),this._extraLibs[n]&&(s=this._extraLibs[n].version+1),this._extraLibs[n]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:function(){var o=i._extraLibs[n];!o||o.version===s&&(delete i._extraLibs[n],i._removedExtraLibs[n]=s,i._fireOnDidExtraLibsChangeSoon())}}},r.prototype.setExtraLibs=function(e){for(var t in this._extraLibs)this._removedExtraLibs[t]=this._extraLibs[t].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(var i=0,n=e;i<n.length;i++){var s=n[i],t=s.filePath||"ts:extralib-"+Math.random().toString(36).substring(2,15),o=s.content,a=1;this._removedExtraLibs[t]&&(a=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:o,version:a}}this._fireOnDidExtraLibsChangeSoon()},r.prototype._fireOnDidExtraLibsChangeSoon=function(){var e=this;this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=setTimeout(function(){e._onDidExtraLibsChangeTimeout=-1,e._onDidExtraLibsChange.fire(void 0)},0))},r.prototype.getCompilerOptions=function(){return this._compilerOptions},r.prototype.setCompilerOptions=function(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},r.prototype.getDiagnosticsOptions=function(){return this._diagnosticsOptions},r.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)},r.prototype.setWorkerOptions=function(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)},r.prototype.setInlayHintsOptions=function(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)},r.prototype.setMaximumWorkerIdleTime=function(e){},r.prototype.setEagerModelSync=function(e){this._eagerModelSync=e},r.prototype.getEagerModelSync=function(){return this._eagerModelSync},r}(),Joe=Qoe,eN=new N3({allowNonTsExtensions:!0,target:o_.Latest},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{}),T3=new N3({allowNonTsExtensions:!0,allowJs:!0,target:o_.Latest},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{}),eae=function(){return F0().then(function(r){return r.getTypeScriptWorker()})},tae=function(){return F0().then(function(r){return r.getJavaScriptWorker()})};pe.typescript={ModuleKind:YI,JsxEmit:XI,NewLineKind:QI,ScriptTarget:o_,ModuleResolutionKind:JI,typescriptVersion:Joe,typescriptDefaults:eN,javascriptDefaults:T3,getTypeScriptWorker:eae,getJavaScriptWorker:tae};function F0(){return Promise.resolve().then(function(){return g_e})}pe.onLanguage("typescript",function(){return F0().then(function(r){return r.setupTypeScript(eN)})});pe.onLanguage("javascript",function(){return F0().then(function(r){return r.setupJavaScript(T3)})});var tN=function(){function r(e,t,i){this._onDidChange=new $f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"diagnosticsOptions",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),r.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setDiagnosticsOptions=function(e){this.setOptions(e)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),iN={validate:!0,lint:{compatibleVendorPrefixes:"ignore",vendorPrefix:"warning",duplicateProperties:"warning",emptyRules:"warning",importStatement:"ignore",boxModel:"ignore",universalSelector:"ignore",zeroUnits:"ignore",fontFaceProperties:"warning",hexColorLength:"error",argumentsInColorFunction:"error",unknownProperties:"warning",ieHack:"ignore",unknownVendorSpecificProperties:"ignore",propertyIgnoredDueToDisplay:"warning",important:"ignore",float:"ignore",idSelector:"ignore"},data:{useDefaultDataProvider:!0}},nN={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},A3=new tN("css",iN,nN),R3=new tN("scss",iN,nN),M3=new tN("less",iN,nN);pe.css={cssDefaults:A3,lessDefaults:M3,scssDefaults:R3};function rN(){return Promise.resolve().then(function(){return Zve})}pe.onLanguage("less",function(){rN().then(function(r){return r.setupMode(M3)})});pe.onLanguage("scss",function(){rN().then(function(r){return r.setupMode(R3)})});pe.onLanguage("css",function(){rN().then(function(r){return r.setupMode(A3)})});var iae=function(){function r(e,t,i){this._onDidChange=new $f,this._languageId=e,this.setDiagnosticsOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"diagnosticsOptions",{get:function(){return this._diagnosticsOptions},enumerable:!1,configurable:!0}),r.prototype.setDiagnosticsOptions=function(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),nae={validate:!0,allowComments:!0,schemas:[],enableSchemaRequest:!1,schemaRequest:"warning",schemaValidation:"warning",comments:"error",trailingCommas:"error"},rae={documentFormattingEdits:!0,documentRangeFormattingEdits:!0,completionItems:!0,hovers:!0,documentSymbols:!0,tokens:!0,colors:!0,foldingRanges:!0,diagnostics:!0,selectionRanges:!0},P3=new iae("json",nae,rae);pe.json={jsonDefaults:P3};function sae(){return Promise.resolve().then(function(){return QCe})}pe.register({id:"json",extensions:[".json",".bowerrc",".jshintrc",".jscsrc",".eslintrc",".babelrc",".har"],aliases:["JSON","json"],mimetypes:["application/json"]});pe.onLanguage("json",function(){sae().then(function(r){return r.setupMode(P3)})});var oae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},aae=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},lae=function(){function r(e,t,i){this._onDidChange=new $f,this._languageId=e,this.setOptions(t),this.setModeConfiguration(i)}return Object.defineProperty(r.prototype,"onDidChange",{get:function(){return this._onDidChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"options",{get:function(){return this._options},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"modeConfiguration",{get:function(){return this._modeConfiguration},enumerable:!1,configurable:!0}),r.prototype.setOptions=function(e){this._options=e||Object.create(null),this._onDidChange.fire(this)},r.prototype.setModeConfiguration=function(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(this)},r}(),cae={tabSize:4,insertSpaces:!1,wrapLineLength:120,unformatted:'default": "a, abbr, acronym, b, bdo, big, br, button, cite, code, dfn, em, i, img, input, kbd, label, map, object, q, samp, select, small, span, strong, sub, sup, textarea, tt, var',contentUnformatted:"pre",indentInnerHtml:!1,preserveNewLines:!0,maxPreserveNewLines:null,indentHandlebars:!1,endWithNewline:!1,extraLiners:"head, body, /html",wrapAttributes:"auto"},B0={format:cae,suggest:{},data:{useDefaultDataProvider:!0}};function W0(r){return{completionItems:!0,hovers:!0,documentSymbols:!0,links:!0,documentHighlights:!0,rename:!0,colors:!0,foldingRanges:!0,selectionRanges:!0,diagnostics:r===a_,documentFormattingEdits:r===a_,documentRangeFormattingEdits:r===a_}}var a_="html",O3="handlebars",F3="razor",B3=V0(a_,B0,W0(a_)),hae=B3.defaults,W3=V0(O3,B0,W0(O3)),uae=W3.defaults,V3=V0(F3,B0,W0(F3)),dae=V3.defaults;pe.html={htmlDefaults:hae,razorDefaults:dae,handlebarDefaults:uae,htmlLanguageService:B3,handlebarLanguageService:W3,razorLanguageService:V3,registerHTMLLanguageService:V0};function fae(){return Promise.resolve().then(function(){return gwe})}function V0(r,e,t){var i=this;e===void 0&&(e=B0),t===void 0&&(t=W0(r));var n=new lae(r,e,t),s,o=pe.onLanguage(r,function(){return oae(i,void 0,void 0,function(){return aae(this,function(a){switch(a.label){case 0:return[4,fae()];case 1:return s=a.sent().setupMode(n),[2]}})})});return{defaults:n,dispose:function(){o.dispose(),s==null||s.dispose(),s=void 0}}}var gae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},pae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},H0=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const z0=new Le("selectionAnchorSet",!1);let fl=class H3{constructor(e,t){this.editor=e,this.selectionAnchorSetContextKey=z0.bindTo(t),this.modelChangeListener=e.onDidChangeModel(()=>this.selectionAnchorSetContextKey.reset())}static get(e){return e.getContribution(H3.ID)}setSelectionAnchor(){if(this.editor.hasModel()){const e=this.editor.getPosition(),t=this.decorationId?[this.decorationId]:[],i=this.editor.deltaDecorations(t,[{range:be.fromPositions(e,e),options:{description:"selection-anchor",stickiness:1,hoverMessage:new ul().appendText(m("selectionAnchor","Selection Anchor")),className:"selection-anchor"}}]);this.decorationId=i[0],this.selectionAnchorSetContextKey.set(!!this.decorationId),Ji(m("anchorSet","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(be.fromPositions(e.getStartPosition(),t)),this.cancelSelectionAnchor()}}}cancelSelectionAnchor(){this.decorationId&&(this.editor.deltaDecorations([this.decorationId],[]),this.decorationId=void 0,this.selectionAnchorSetContextKey.set(!1))}dispose(){this.cancelSelectionAnchor(),this.modelChangeListener.dispose()}};fl.ID="editor.contrib.selectionAnchorController";fl=gae([pae(1,Fe)],fl);class mae extends Se{constructor(){super({id:"editor.action.setSelectionAnchor",label:m("setSelectionAnchor","Set Selection Anchor"),alias:"Set Selection Anchor",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|32),weight:100}})}run(e,t){return H0(this,void 0,void 0,function*(){fl.get(t).setSelectionAnchor()})}}class _ae extends Se{constructor(){super({id:"editor.action.goToSelectionAnchor",label:m("goToSelectionAnchor","Go to Selection Anchor"),alias:"Go to Selection Anchor",precondition:z0})}run(e,t){return H0(this,void 0,void 0,function*(){fl.get(t).goToSelectionAnchor()})}}class bae extends Se{constructor(){super({id:"editor.action.selectFromAnchorToCursor",label:m("selectFromAnchorToCursor","Select from Anchor to Cursor"),alias:"Select from Anchor to Cursor",precondition:z0,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|41),weight:100}})}run(e,t){return H0(this,void 0,void 0,function*(){fl.get(t).selectFromAnchorToCursor()})}}class vae extends Se{constructor(){super({id:"editor.action.cancelSelectionAnchor",label:m("cancelSelectionAnchor","Cancel Selection Anchor"),alias:"Cancel Selection Anchor",precondition:z0,kbOpts:{kbExpr:R.editorTextFocus,primary:9,weight:100}})}run(e,t){return H0(this,void 0,void 0,function*(){fl.get(t).cancelSelectionAnchor()})}}wt(fl.ID,fl);me(mae);me(_ae);me(bae);me(vae);const Cae=V("editorOverviewRuler.bracketMatchForeground",{dark:"#A0A0A0",light:"#A0A0A0",hc:"#A0A0A0"},m("overviewRulerBracketMatchForeground","Overview ruler marker color for matching brackets."));class wae extends Se{constructor(){super({id:"editor.action.jumpToBracket",label:m("smartSelect.jumpBracket","Go to Bracket"),alias:"Go to Bracket",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|88,weight:100}})}run(e,t){let i=_o.get(t);!i||i.jumpToBracket()}}class yae extends Se{constructor(){super({id:"editor.action.selectToBracket",label:m("smartSelect.selectToBracket","Select to Bracket"),alias:"Select to Bracket",precondition:void 0,description:{description:"Select to Bracket",args:[{name:"args",schema:{type:"object",properties:{selectBrackets:{type:"boolean",default:!0}}}}]}})}run(e,t,i){const n=_o.get(t);if(!n)return;let s=!0;i&&i.selectBrackets===!1&&(s=!1),n.selectToBracket(s)}}class Sae{constructor(e,t,i){this.position=e,this.brackets=t,this.options=i}}class _o extends Y{constructor(e){super();this._editor=e,this._lastBracketsData=[],this._lastVersionId=0,this._decorations=[],this._updateBracketsSoon=this._register(new Bt(()=>this._updateBrackets(),50)),this._matchBrackets=this._editor.getOption(63),this._updateBracketsSoon.schedule(),this._register(e.onDidChangeCursorPosition(t=>{this._matchBrackets!=="never"&&this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelContent(t=>{this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModel(t=>{this._lastBracketsData=[],this._decorations=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeModelLanguageConfiguration(t=>{this._lastBracketsData=[],this._updateBracketsSoon.schedule()})),this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(63)&&(this._matchBrackets=this._editor.getOption(63),this._decorations=this._editor.deltaDecorations(this._decorations,[]),this._lastBracketsData=[],this._lastVersionId=0,this._updateBracketsSoon.schedule())}))}static get(e){return e.getContribution(_o.ID)}jumpToBracket(){if(!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getSelections().map(i=>{const n=i.getStartPosition(),s=e.matchBracket(n);let o=null;if(s)s[0].containsPosition(n)?o=s[1].getStartPosition():s[1].containsPosition(n)&&(o=s[0].getStartPosition());else{const a=e.findEnclosingBrackets(n);if(a)o=a[0].getStartPosition();else{const l=e.findNextBracket(n);l&&l.range&&(o=l.range.getStartPosition())}}return o?new be(o.lineNumber,o.column,o.lineNumber,o.column):new be(n.lineNumber,n.column,n.lineNumber,n.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.matchBracket(s);if(!o&&(o=t.findEnclosingBrackets(s),!o)){const c=t.findNextBracket(s);c&&c.range&&(o=t.matchBracket(c.range.getStartPosition()))}let a=null,l=null;if(o){o.sort(k.compareRangesUsingStarts);const[c,h]=o;if(a=e?c.getStartPosition():c.getEndPosition(),l=e?h.getEndPosition():h.getStartPosition(),h.containsPosition(s)){const u=a;a=l,l=u}}a&&l&&i.push(new be(a.lineNumber,a.column,l.lineNumber,l.column))}),i.length>0&&(this._editor.setSelections(i),this._editor.revealRange(i[0]))}_updateBrackets(){if(this._matchBrackets==="never")return;this._recomputeBrackets();let e=[],t=0;for(const i of this._lastBracketsData){let n=i.brackets;n&&(e[t++]={range:n[0],options:i.options},e[t++]={range:n[1],options:i.options})}this._decorations=this._editor.deltaDecorations(this._decorations,e)}_recomputeBrackets(){if(!this._editor.hasModel()){this._lastBracketsData=[],this._lastVersionId=0;return}const e=this._editor.getSelections();if(e.length>100){this._lastBracketsData=[],this._lastVersionId=0;return}const t=this._editor.getModel(),i=t.getVersionId();let n=[];this._lastVersionId===i&&(n=this._lastBracketsData);let s=[],o=0;for(let u=0,d=e.length;u<d;u++){let f=e[u];f.isEmpty()&&(s[o++]=f.getStartPosition())}s.length>1&&s.sort($.compare);let a=[],l=0,c=0,h=n.length;for(let u=0,d=s.length;u<d;u++){let f=s[u];for(;c<h&&n[c].position.isBefore(f);)c++;if(c<h&&n[c].position.equals(f))a[l++]=n[c];else{let g=t.matchBracket(f),p=_o._DECORATION_OPTIONS_WITH_OVERVIEW_RULER;!g&&this._matchBrackets==="always"&&(g=t.findEnclosingBrackets(f,20),p=_o._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER),a[l++]=new Sae(f,g,p)}}this._lastBracketsData=a,this._lastVersionId=i}}_o.ID="editor.contrib.bracketMatchingController";_o._DECORATION_OPTIONS_WITH_OVERVIEW_RULER=Ke.register({description:"bracket-match-overview",stickiness:1,className:"bracket-match",overviewRuler:{color:ui(Cae),position:Mr.Center}});_o._DECORATION_OPTIONS_WITHOUT_OVERVIEW_RULER=Ke.register({description:"bracket-match-no-overview",stickiness:1,className:"bracket-match"});wt(_o.ID,_o);me(yae);me(wae);Lt((r,e)=>{const t=r.getColor(hQ);t&&e.addRule(`.monaco-editor .bracket-match { background-color: ${t}; }`);const i=r.getColor(lF);i&&e.addRule(`.monaco-editor .bracket-match { border: 1px solid ${i}; }`)});ns.appendMenuItem(xe.MenubarGoMenu,{group:"5_infile_nav",command:{id:"editor.action.jumpToBracket",title:m({key:"miGoToBracket",comment:["&& denotes a mnemonic"]},"Go to &&Bracket")},order:2});class Lae{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&&n===1)&&!(!this._isMovingLeft&&s===e.getLineMaxColumn(i)))if(this._isMovingLeft){const o=new k(i,n-1,i,n),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new k(i,s,i,s),a)}else{const o=new k(i,s,i,s+1),a=e.getValueInRange(o);t.addEditOperation(o,null),t.addEditOperation(new k(i,n,i,n),a)}}computeCursorState(e,t){return this._isMovingLeft?new be(this._selection.startLineNumber,this._selection.startColumn-1,this._selection.endLineNumber,this._selection.endColumn-1):new be(this._selection.startLineNumber,this._selection.startColumn+1,this._selection.endLineNumber,this._selection.endColumn+1)}}class z3 extends Se{constructor(e,t){super(t);this.left=e}run(e,t){if(!t.hasModel())return;let i=[],n=t.getSelections();for(const s of n)i.push(new Lae(s,this.left));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class xae extends z3{constructor(){super(!0,{id:"editor.action.moveCarretLeftAction",label:m("caret.moveLeft","Move Selected Text Left"),alias:"Move Selected Text Left",precondition:R.writable})}}class kae extends z3{constructor(){super(!1,{id:"editor.action.moveCarretRightAction",label:m("caret.moveRight","Move Selected Text Right"),alias:"Move Selected Text Right",precondition:R.writable})}}me(xae);me(kae);class Dae extends Se{constructor(){super({id:"editor.action.transposeLetters",label:m("transposeLetters.label","Transpose Letters"),alias:"Transpose Letters",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|50},weight:100}})}run(e,t){if(!t.hasModel())return;let i=t.getModel(),n=[],s=t.getSelections();for(let o of s){if(!o.isEmpty())continue;let a=o.startLineNumber,l=o.startColumn,c=i.getLineMaxColumn(a);if(a===1&&(l===1||l===2&&c===2))continue;let h=l===c?o.getPosition():mt.rightPosition(i,o.getPosition().lineNumber,o.getPosition().column),u=mt.leftPosition(i,h),d=mt.leftPosition(i,u),f=i.getValueInRange(k.fromPositions(d,u)),g=i.getValueInRange(k.fromPositions(u,h)),p=k.fromPositions(d,h);n.push(new rn(p,g+f))}n.length>0&&(t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop())}}me(Dae);var Eae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const xu="9_cutcopypaste",Iae=js||document.queryCommandSupported("cut"),$3=js||document.queryCommandSupported("copy"),Nae=typeof navigator.clipboard=="undefined"||Mn?document.queryCommandSupported("paste"):!0;function sN(r){return r.register(),r}const Tae=Iae?sN(new of({id:"editor.action.clipboardCutAction",precondition:void 0,kbOpts:js?{primary:2048|54,win:{primary:2048|54,secondary:[1024|20]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:m({key:"miCut",comment:["&& denotes a mnemonic"]},"Cu&&t"),order:1},{menuId:xe.EditorContext,group:xu,title:m("actions.clipboard.cutLabel","Cut"),when:R.writable,order:1},{menuId:xe.CommandPalette,group:"",title:m("actions.clipboard.cutLabel","Cut"),order:1},{menuId:xe.SimpleEditorContext,group:xu,title:m("actions.clipboard.cutLabel","Cut"),when:R.writable,order:1}]})):void 0,Aae=$3?sN(new of({id:"editor.action.clipboardCopyAction",precondition:void 0,kbOpts:js?{primary:2048|33,win:{primary:2048|33,secondary:[2048|19]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:m({key:"miCopy",comment:["&& denotes a mnemonic"]},"&&Copy"),order:2},{menuId:xe.EditorContext,group:xu,title:m("actions.clipboard.copyLabel","Copy"),order:2},{menuId:xe.CommandPalette,group:"",title:m("actions.clipboard.copyLabel","Copy"),order:1},{menuId:xe.SimpleEditorContext,group:xu,title:m("actions.clipboard.copyLabel","Copy"),order:2}]})):void 0;ns.appendMenuItem(xe.MenubarEditMenu,{submenu:xe.MenubarCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:"2_ccp",order:3});ns.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextCopy,title:{value:m("copy as","Copy As"),original:"Copy As"},group:xu,order:3});const oN=Nae?sN(new of({id:"editor.action.clipboardPasteAction",precondition:void 0,kbOpts:js?{primary:2048|52,win:{primary:2048|52,secondary:[1024|19]},linux:{primary:2048|52,secondary:[1024|19]},weight:100}:void 0,menuOpts:[{menuId:xe.MenubarEditMenu,group:"2_ccp",title:m({key:"miPaste",comment:["&& denotes a mnemonic"]},"&&Paste"),order:4},{menuId:xe.EditorContext,group:xu,title:m("actions.clipboard.pasteLabel","Paste"),when:R.writable,order:4},{menuId:xe.CommandPalette,group:"",title:m("actions.clipboard.pasteLabel","Paste"),order:1},{menuId:xe.SimpleEditorContext,group:xu,title:m("actions.clipboard.pasteLabel","Paste"),when:R.writable,order:4}]})):void 0;class Rae extends Se{constructor(){super({id:"editor.action.clipboardCopyWithSyntaxHighlightingAction",label:m("actions.clipboard.copyWithSyntaxHighlightingLabel","Copy With Syntax Highlighting"),alias:"Copy With Syntax Highlighting",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,weight:100}})}run(e,t){!t.hasModel()||!t.getOption(32)&&t.getSelection().isEmpty()||(LD.forceCopyWithSyntaxHighlighting=!0,t.focus(),document.execCommand("copy"),LD.forceCopyWithSyntaxHighlighting=!1)}}function U3(r,e){!r||(r.addImplementation(1e4,"code-editor",(t,i)=>{const n=t.get(Ct).getFocusedCodeEditor();if(n&&n.hasTextFocus()){const s=n.getOption(32),o=n.getSelection();return o&&o.isEmpty()&&!s||document.execCommand(e),!0}return!1}),r.addImplementation(0,"generic-dom",(t,i)=>(document.execCommand(e),!0)))}U3(Tae,"cut");U3(Aae,"copy");oN&&(oN.addImplementation(1e4,"code-editor",(r,e)=>{const t=r.get(Ct),i=r.get(bc),n=t.getFocusedCodeEditor();return n&&n.hasTextFocus()?!document.execCommand("paste")&&Sd?(()=>Eae(void 0,void 0,void 0,function*(){const o=yield i.readText();if(o!==""){const a=lm.INSTANCE.get(o);let l=!1,c=null,h=null;a&&(l=n.getOption(32)&&!!a.isFromEmptySelection,c=typeof a.multicursorText!="undefined"?a.multicursorText:null,h=a.mode),n.trigger("keyboard","paste",{text:o,pasteOnNewLine:l,multicursorText:c,mode:h})}}))():!0:!1}),oN.addImplementation(0,"generic-dom",(r,e)=>(document.execCommand("paste"),!0)));$3&&me(Rae);class $0{constructor(e){this.executor=e,this._didRun=!1}getValue(){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}}class it{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+it.sep)}intersects(e){return this.contains(e)||e.contains(this)}append(e){return new it(this.value+it.sep+e)}}it.sep=".";it.None=new it("@@none@@");it.Empty=new it("");it.QuickFix=new it("quickfix");it.Refactor=new it("refactor");it.Source=new it("source");it.SourceOrganizeImports=it.Source.append("organizeImports");it.SourceFixAll=it.Source.append("fixAll");function Mae(r,e){return!(r.include&&!r.include.intersects(e)||r.excludes&&r.excludes.some(t=>j3(e,t,r.include))||!r.includeSourceActions&&it.Source.contains(e))}function Pae(r,e){const t=e.kind?new it(e.kind):void 0;return!(r.include&&(!t||!r.include.contains(t))||r.excludes&&t&&r.excludes.some(i=>j3(t,i,r.include))||!r.includeSourceActions&&t&&it.Source.contains(t)||r.onlyIncludePreferredActions&&!e.isPreferred)}function j3(r,e,t){return!(!e.contains(r)||t&&e.contains(t))}class ca{constructor(e,t,i){this.kind=e,this.apply=t,this.preferred=i}static fromUser(e,t){return!e||typeof e!="object"?new ca(t.kind,t.apply,!1):new ca(ca.getKindFromUser(e,t.kind),ca.getApplyFromUser(e,t.apply),ca.getPreferredUser(e))}static getApplyFromUser(e,t){switch(typeof e.apply=="string"?e.apply.toLowerCase():""){case"first":return"first";case"never":return"never";case"ifsingle":return"ifSingle";default:return t}}static getKindFromUser(e,t){return typeof e.kind=="string"?new it(e.kind):t}static getPreferredUser(e){return typeof e.preferred=="boolean"?e.preferred:!1}}var aN=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const K3="editor.action.codeAction",q3="editor.action.refactor",G3="editor.action.sourceAction",lN="editor.action.organizeImports",cN="editor.action.fixAll";class Z3{constructor(e,t){this.action=e,this.provider=t}resolve(e){var t;return aN(this,void 0,void 0,function*(){if(((t=this.provider)===null||t===void 0?void 0:t.resolveCodeAction)&&!this.action.edit){let i;try{i=yield this.provider.resolveCodeAction(this.action,e)}catch(n){$i(n)}i&&(this.action.edit=i.edit)}return this})}}class hN extends Y{constructor(e,t,i){super();this.documentation=t,this._register(i),this.allActions=[...e].sort(hN.codeActionsComparator),this.validActions=this.allActions.filter(({action:n})=>!n.disabled)}static codeActionsComparator({action:e},{action:t}){return e.isPreferred&&!t.isPreferred?-1:!e.isPreferred&&t.isPreferred?1:gr(e.diagnostics)?gr(t.diagnostics)?e.diagnostics[0].message.localeCompare(t.diagnostics[0].message):-1:gr(t.diagnostics)?1:0}get hasAutoFix(){return this.validActions.some(({action:e})=>!!e.kind&&it.QuickFix.contains(new it(e.kind))&&!!e.isPreferred)}}const Y3={actions:[],documentation:void 0};function uN(r,e,t,i,n){var s;const o=t.filter||{},a={only:(s=o.include)===null||s===void 0?void 0:s.value,trigger:t.type},l=new lE(r,n),c=Oae(r,o),h=new le,u=c.map(f=>aN(this,void 0,void 0,function*(){try{i.report(f);const g=yield f.provideCodeActions(r,e,a,l.token);if(g&&h.add(g),l.token.isCancellationRequested)return Y3;const p=((g==null?void 0:g.actions)||[]).filter(v=>v&&Pae(o,v)),_=Fae(f,p,o.include);return{actions:p.map(v=>new Z3(v,f)),documentation:_}}catch(g){if(Ro(g))throw g;return $i(g),Y3}})),d=$o.onDidChange(()=>{const f=$o.all(r);Is(f,c)||l.cancel()});return Promise.all(u).then(f=>{const g=Hx(f.map(_=>_.actions)),p=xh(f.map(_=>_.documentation));return new hN(g,p,h)}).finally(()=>{d.dispose(),l.dispose()})}function Oae(r,e){return $o.all(r).filter(t=>t.providedCodeActionKinds?t.providedCodeActionKinds.some(i=>Mae(e,new it(i))):!0)}function Fae(r,e,t){if(!r.documentation)return;const i=r.documentation.map(n=>({kind:new it(n.kind),command:n.command}));if(t){let n;for(const s of i)s.kind.contains(t)&&(n?n.kind.contains(s.kind)&&(n=s):n=s);if(n)return n==null?void 0:n.command}for(const n of e)if(!!n.kind){for(const s of i)if(s.kind.contains(new it(n.kind)))return s.command}}lt.registerCommand("_executeCodeActionProvider",function(r,e,t,i,n){return aN(this,void 0,void 0,function*(){if(!(e instanceof Ie))throw Er();const s=r.get(gi).getModel(e);if(!s)throw Er();const o=be.isISelection(t)?be.liftSelection(t):k.isIRange(t)?s.validateRange(t):void 0;if(!o)throw Er();const a=typeof i=="string"?new it(i):void 0,l=yield uN(s,o,{type:1,filter:{includeSourceActions:!0,include:a}},su.None,et.None),c=[],h=Math.min(l.validActions.length,typeof n=="number"?n:0);for(let u=0;u<h;u++)c.push(l.validActions[u].resolve(et.None));try{return yield Promise.all(c),l.validActions.map(u=>u.action)}finally{setTimeout(()=>l.dispose(),100)}})});var Bae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Wae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let zr=class dN{constructor(e,t){this._messageWidget=new An,this._messageListeners=new le,this._editor=e,this._visible=dN.MESSAGE_VISIBLE.bindTo(t),this._editorListener=this._editor.onDidAttemptReadOnlyEdit(()=>this._onDidAttemptReadOnlyEdit())}static get(e){return e.getContribution(dN.ID)}dispose(){this._editorListener.dispose(),this._messageListeners.dispose(),this._messageWidget.dispose(),this._visible.reset()}showMessage(e,t){Ji(e),this._visible.set(!0),this._messageWidget.clear(),this._messageListeners.clear(),this._messageWidget.value=new X3(this._editor,t,e),this._messageListeners.add(this._editor.onDidBlurEditorText(()=>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(new Xn(()=>this.closeMessage(),3e3));let i;this._messageListeners.add(this._editor.onMouseMove(n=>{!n.target.position||(i?i.containsPosition(n.target.position)||this.closeMessage():i=new k(t.lineNumber-3,1,n.target.position.lineNumber+3,1))}))}closeMessage(){this._visible.reset(),this._messageListeners.clear(),this._messageWidget.value&&this._messageListeners.add(X3.fadeOut(this._messageWidget.value))}_onDidAttemptReadOnlyEdit(){this._editor.hasModel()&&this.showMessage(m("editor.readonly","Cannot edit in read-only editor"),this._editor.getPosition())}};zr.ID="editor.contrib.messageController";zr.MESSAGE_VISIBLE=new Le("messageVisible",!1,m("messageVisible","Whether the editor is currently showing an inline message"));zr=Bae([Wae(1,Fe)],zr);const Vae=en.bindToContribution(zr.get);fe(new Vae({id:"leaveEditorMessage",precondition:zr.MESSAGE_VISIBLE,handler:r=>r.closeMessage(),kbOpts:{weight:100+30,primary:9}}));class X3{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-1},this._domNode=document.createElement("div"),this._domNode.classList.add("monaco-editor-overlaymessage");const s=document.createElement("div");s.classList.add("anchor","top"),this._domNode.appendChild(s);const o=document.createElement("div");o.classList.add("message"),o.textContent=n,this._domNode.appendChild(o);const a=document.createElement("div");a.classList.add("anchor","below"),this._domNode.appendChild(a),this._editor.addContentWidget(this),this._domNode.classList.add("fadeIn")}static fadeOut(e){let t;const i=()=>{e.dispose(),clearTimeout(t),e.getDomNode().removeEventListener("animationend",i)};return t=setTimeout(i,110),e.getDomNode().addEventListener("animationend",i),e.getDomNode().classList.add("fadeOut"),{dispose:i}}dispose(){this._editor.removeContentWidget(this)}getId(){return"messageoverlay"}getDomNode(){return this._domNode}getPosition(){return{position:this._position,preference:[1,2]}}afterRender(e){this._domNode.classList.toggle("below",e===2)}}wt(zr.ID,zr);Lt((r,e)=>{const t=r.getColor(Xk);if(t){let s=r.type===is.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.below { border-top-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .anchor.top { border-bottom-color: ${t}; }`),e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { border: ${s}px solid ${t}; }`)}const i=r.getColor(Zk);i&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { background-color: ${i}; }`);const n=r.getColor(Yk);n&&e.addRule(`.monaco-editor .monaco-editor-overlaymessage .message { color: ${n}; }`)});var Hae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Q3=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},zae=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class J3 extends Ns{constructor(e,t){super(e.command?e.command.id:e.title,$ae(e.title),void 0,!e.disabled,t);this.action=e}}function $ae(r){return r.replace(/\r\n|\r|\n/g," ")}let fN=class extends Y{constructor(e,t,i,n){super();this._editor=e,this._delegate=t,this._contextMenuService=i,this._visible=!1,this._showingActions=this._register(new An),this._keybindingResolver=new U0({getKeybindings:()=>n.getKeybindings()})}get isVisible(){return this._visible}show(e,t,i,n){return zae(this,void 0,void 0,function*(){const s=n.includeDisabledActions?t.allActions:t.validActions;if(!s.length){this._visible=!1;return}if(!this._editor.getDomNode())throw this._visible=!1,Dd();this._visible=!0,this._showingActions.value=t;const o=this.getMenuActions(e,s,t.documentation),a=$.isIPosition(i)?this._toCoords(i):i||{x:0,y:0},l=this._keybindingResolver.getResolver(),c=this._editor.getOption(113);this._contextMenuService.showContextMenu({domForShadowRoot:c?this._editor.getDomNode():void 0,getAnchor:()=>a,getActions:()=>o,onHide:()=>{this._visible=!1,this._editor.focus()},autoSelectFirstItem:!0,getKeyBinding:h=>h instanceof J3?l(h.action):void 0})})}getMenuActions(e,t,i){var n,s;const o=h=>new J3(h.action,()=>this._delegate.onSelectCodeAction(h)),a=t.map(o),l=[...i],c=this._editor.getModel();if(c&&a.length)for(const h of $o.all(c))h._getAdditionalMenuItems&&l.push(...h._getAdditionalMenuItems({trigger:e.type,only:(s=(n=e.filter)===null||n===void 0?void 0:n.include)===null||s===void 0?void 0:s.value},t.map(u=>u.action)));return l.length&&a.push(new Ts,...l.map(h=>o(new Z3({title:h.title,command:h},void 0)))),a}_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=Qi(this._editor.getDomNode()),n=i.left+t.left,s=i.top+t.top+t.height;return{x:n,y:s}}};fN=Hae([Q3(2,_c),Q3(3,Qt)],fN);class U0{constructor(e){this._keybindingProvider=e}getResolver(){const e=new $0(()=>this._keybindingProvider.getKeybindings().filter(t=>U0.codeActionCommands.indexOf(t.command)>=0).filter(t=>t.resolvedKeybinding).map(t=>{let i=t.commandArgs;return t.command===lN?i={kind:it.SourceOrganizeImports.value}:t.command===cN&&(i={kind:it.SourceFixAll.value}),Object.assign({resolvedKeybinding:t.resolvedKeybinding},ca.fromUser(i,{kind:it.None,apply:"never"}))}));return t=>{if(t.kind){const i=this.bestKeybindingForCodeAction(t,e.getValue());return i==null?void 0:i.resolvedKeybinding}}}bestKeybindingForCodeAction(e,t){if(!e.kind)return;const i=new it(e.kind);return t.filter(n=>n.kind.contains(i)).filter(n=>n.preferred?e.isPreferred:!0).reduceRight((n,s)=>n?n.kind.contains(s.kind)?s:n:s,void 0)}}U0.codeActionCommands=[q3,K3,G3,lN,cN];var Uae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},jae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},l_;(function(r){r.Hidden={type:0};class e{constructor(i,n,s,o){this.actions=i,this.trigger=n,this.editorPosition=s,this.widgetPosition=o,this.type=1}}r.Showing=e})(l_||(l_={}));let j0=class eB extends Y{constructor(e,t,i,n){super();this._editor=e,this._quickFixActionId=t,this._preferredFixActionId=i,this._keybindingService=n,this._onClick=this._register(new H),this.onClick=this._onClick.event,this._state=l_.Hidden,this._domNode=document.createElement("div"),this._domNode.className=ve.lightBulb.classNames,this._editor.addContentWidget(this),this._register(this._editor.onDidChangeModelContent(s=>{const o=this._editor.getModel();(this.state.type!==1||!o||this.state.editorPosition.lineNumber>=o.getLineCount())&&this.hide()})),Et.ignoreTarget(this._domNode),this._register(wj(this._domNode,s=>{if(this.state.type!==1)return;this._editor.focus(),s.preventDefault();const{top:o,height:a}=Qi(this._domNode),l=this._editor.getOption(58);let c=Math.floor(l/3);this.state.widgetPosition.position!==null&&this.state.widgetPosition.position.lineNumber<this.state.editorPosition.lineNumber&&(c+=l),this._onClick.fire({x:s.posx,y:o+a+c,actions:this.state.actions,trigger:this.state.trigger})})),this._register(J(this._domNode,"mouseenter",s=>{if((s.buttons&1)!=1)return;this.hide();const o=new Rh;o.startMonitoring(s.target,s.buttons,lf,()=>{},()=>{o.dispose()})})),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(56)&&!this._editor.getOption(56).enabled&&this.hide()})),this._updateLightBulbTitleAndIcon(),this._register(this._keybindingService.onDidUpdateKeybindings(this._updateLightBulbTitleAndIcon,this))}dispose(){super.dispose(),this._editor.removeContentWidget(this)}getId(){return"LightBulbWidget"}getDomNode(){return this._domNode}getPosition(){return this._state.type===1?this._state.widgetPosition:null}update(e,t,i){if(e.validActions.length<=0)return this.hide();const n=this._editor.getOptions();if(!n.get(56).enabled)return this.hide();const s=this._editor.getModel();if(!s)return this.hide();const{lineNumber:o,column:a}=s.validatePosition(i),l=s.getOptions().tabSize,c=n.get(43),h=s.getLineContent(o),u=Ti.computeIndentLevel(h,l),d=c.spaceWidth*u>22,f=p=>p>2&&this._editor.getTopForLineNumber(p)===this._editor.getTopForLineNumber(p-1);let g=o;if(!d){if(o>1&&!f(o-1))g-=1;else if(!f(o+1))g+=1;else if(a*c.spaceWidth<22)return this.hide()}this.state=new l_.Showing(e,t,i,{position:{lineNumber:g,column:1},preference:eB._posPref}),this._editor.layoutContentWidget(this)}hide(){this.state=l_.Hidden,this._editor.layoutContentWidget(this)}get state(){return this._state}set state(e){this._state=e,this._updateLightBulbTitleAndIcon()}_updateLightBulbTitleAndIcon(){if(this.state.type===1&&this.state.actions.hasAutoFix){this._domNode.classList.remove(...ve.lightBulb.classNamesArray),this._domNode.classList.add(...ve.lightbulbAutofix.classNamesArray);const t=this._keybindingService.lookupKeybinding(this._preferredFixActionId);if(t){this.title=m("preferredcodeActionWithKb","Show Code Actions. Preferred Quick Fix Available ({0})",t.getLabel());return}}this._domNode.classList.remove(...ve.lightbulbAutofix.classNamesArray),this._domNode.classList.add(...ve.lightBulb.classNamesArray);const e=this._keybindingService.lookupKeybinding(this._quickFixActionId);e?this.title=m("codeActionWithKb","Show Code Actions ({0})",e.getLabel()):this.title=m("codeAction","Show Code Actions")}set title(e){this._domNode.title=e}};j0._posPref=[0];j0=Uae([jae(3,Qt)],j0);Lt((r,e)=>{var t;const i=(t=r.getColor(ls))===null||t===void 0?void 0:t.transparent(.7),n=r.getColor(cX);n&&e.addRule(` - .monaco-editor .contentWidgets ${ve.lightBulb.cssSelector} { - color: ${n}; - background-color: ${i}; - }`);const s=r.getColor(hX);s&&e.addRule(` - .monaco-editor .contentWidgets ${ve.lightbulbAutofix.cssSelector} { - color: ${s}; - background-color: ${i}; - }`)});var Kae=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},qae=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},gN=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Gae=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Zae=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},K0;let pN=class extends Y{constructor(e,t,i,n,s){super();this._editor=e,this.delegate=n,this._activeCodeActions=this._register(new An),K0.set(this,!1),this._codeActionWidget=new $0(()=>this._register(s.createInstance(fN,this._editor,{onSelectCodeAction:o=>gN(this,void 0,void 0,function*(){this.delegate.applyCodeAction(o,!0)})}))),this._lightBulbWidget=new $0(()=>{const o=this._register(s.createInstance(j0,this._editor,t,i));return this._register(o.onClick(a=>this.showCodeActionList(a.trigger,a.actions,a,{includeDisabledActions:!1}))),o})}dispose(){Gae(this,K0,!0,"f"),super.dispose()}update(e){var t,i,n;return gN(this,void 0,void 0,function*(){if(e.type!==1){(t=this._lightBulbWidget.rawValue)===null||t===void 0||t.hide();return}let s;try{s=yield e.actions}catch(o){Oe(o);return}if(!Zae(this,K0,"f"))if(this._lightBulbWidget.getValue().update(s,e.trigger,e.position),e.trigger.type===1){if((i=e.trigger.filter)===null||i===void 0?void 0:i.include){const a=this.tryGetValidActionToApply(e.trigger,s);if(a){try{this._lightBulbWidget.getValue().hide(),yield this.delegate.applyCodeAction(a,!1)}finally{s.dispose()}return}if(e.trigger.context){const l=this.getInvalidActionThatWouldHaveBeenApplied(e.trigger,s);if(l&&l.action.disabled){zr.get(this._editor).showMessage(l.action.disabled,e.trigger.context.position),s.dispose();return}}}const o=!!((n=e.trigger.filter)===null||n===void 0?void 0:n.include);if(e.trigger.context&&(!s.allActions.length||!o&&!s.validActions.length)){zr.get(this._editor).showMessage(e.trigger.context.notAvailableMessage,e.trigger.context.position),this._activeCodeActions.value=s,s.dispose();return}this._activeCodeActions.value=s,this._codeActionWidget.getValue().show(e.trigger,s,e.position,{includeDisabledActions:o})}else this._codeActionWidget.getValue().isVisible?s.dispose():this._activeCodeActions.value=s})}getInvalidActionThatWouldHaveBeenApplied(e,t){if(!!t.allActions.length&&(e.autoApply==="first"&&t.validActions.length===0||e.autoApply==="ifSingle"&&t.allActions.length===1))return t.allActions.find(({action:i})=>i.disabled)}tryGetValidActionToApply(e,t){if(!!t.validActions.length&&(e.autoApply==="first"&&t.validActions.length>0||e.autoApply==="ifSingle"&&t.validActions.length===1))return t.validActions[0]}showCodeActionList(e,t,i,n){return gN(this,void 0,void 0,function*(){this._codeActionWidget.getValue().show(e,t,i,n)})}};K0=new WeakMap;pN=Kae([qae(4,ut)],pN);var mN=globalThis&&globalThis.__classPrivateFieldGet||function(r,e,t,i){if(t==="a"&&!i)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?r!==e||!i:!e.has(r))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?i:t==="a"?i.call(r):i?i.value:e.get(r)},Yae=globalThis&&globalThis.__classPrivateFieldSet||function(r,e,t,i,n){if(i==="m")throw new TypeError("Private method is not writable");if(i==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?r!==e||!n:!e.has(r))throw new TypeError("Cannot write private member to an object whose class did not declare it");return i==="a"?n.call(r,t):n?n.value=t:e.set(r,t),t},Uf;const tB=new Le("supportedCodeAction","");class Xae extends Y{constructor(e,t,i,n=250){super();this._editor=e,this._markerService=t,this._signalChange=i,this._delay=n,this._autoTriggerTimer=this._register(new Xn),this._register(this._markerService.onMarkerChanged(s=>this._onMarkerChanges(s))),this._register(this._editor.onDidChangeCursorPosition(()=>this._onCursorChange()))}trigger(e){const t=this._getRangeOfSelectionUnlessWhitespaceEnclosed(e);return this._createEventAndSignalChange(e,t)}_onMarkerChanges(e){const t=this._editor.getModel();!t||e.some(i=>_2(i,t.uri))&&this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_onCursorChange(){this._autoTriggerTimer.cancelAndSet(()=>{this.trigger({type:2})},this._delay)}_getRangeOfMarker(e){const t=this._editor.getModel();if(!!t)for(const i of this._markerService.read({resource:t.uri})){const n=t.validateRange(i);if(k.intersectRanges(n,e))return k.lift(n)}}_getRangeOfSelectionUnlessWhitespaceEnclosed(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._editor.getSelection();if(i.isEmpty()&&e.type===2){const{lineNumber:n,column:s}=i.getPosition(),o=t.getLineContent(n);if(o.length===0)return;if(s===1){if(/\s/.test(o[0]))return}else if(s===t.getLineMaxColumn(n)){if(/\s/.test(o[o.length-1]))return}else if(/\s/.test(o[s-2])&&/\s/.test(o[s-1]))return}return i}_createEventAndSignalChange(e,t){const i=this._editor.getModel();if(!t||!i){this._signalChange(void 0);return}const n=this._getRangeOfMarker(t),s=n?n.getStartPosition():t.getStartPosition(),o={trigger:e,selection:t,position:s};return this._signalChange(o),o}}var ku;(function(r){r.Empty={type:0};class e{constructor(i,n,s,o){this.trigger=i,this.rangeOrSelection=n,this.position=s,this._cancellablePromise=o,this.type=1,this.actions=o.catch(a=>{if(Ro(a))return Qae;throw a})}cancel(){this._cancellablePromise.cancel()}}r.Triggered=e})(ku||(ku={}));const Qae={allActions:[],validActions:[],dispose:()=>{},documentation:[],hasAutoFix:!1};class Jae extends Y{constructor(e,t,i,n){super();this._editor=e,this._markerService=t,this._progressService=n,this._codeActionOracle=this._register(new An),this._state=ku.Empty,this._onDidChangeState=this._register(new H),this.onDidChangeState=this._onDidChangeState.event,Uf.set(this,!1),this._supportedCodeActions=tB.bindTo(i),this._register(this._editor.onDidChangeModel(()=>this._update())),this._register(this._editor.onDidChangeModelLanguage(()=>this._update())),this._register($o.onDidChange(()=>this._update())),this._update()}dispose(){mN(this,Uf,"f")||(Yae(this,Uf,!0,"f"),super.dispose(),this.setState(ku.Empty,!0))}_update(){if(mN(this,Uf,"f"))return;this._codeActionOracle.value=void 0,this.setState(ku.Empty);const e=this._editor.getModel();if(e&&$o.has(e)&&!this._editor.getOption(80)){const t=[];for(const i of $o.all(e))Array.isArray(i.providedCodeActionKinds)&&t.push(...i.providedCodeActionKinds);this._supportedCodeActions.set(t.join(" ")),this._codeActionOracle.value=new Xae(this._editor,this._markerService,i=>{var n;if(!i){this.setState(ku.Empty);return}const s=Oi(o=>uN(e,i.selection,i.trigger,su.None,o));i.trigger.type===1&&((n=this._progressService)===null||n===void 0||n.showWhile(s,250)),this.setState(new ku.Triggered(i.trigger,i.selection,i.position,s))},void 0),this._codeActionOracle.value.trigger({type:2})}else this._supportedCodeActions.reset()}trigger(e){this._codeActionOracle.value&&this._codeActionOracle.value.trigger(e)}setState(e,t){e!==this._state&&(this._state.type===1&&this._state.cancel(),this._state=e,!t&&!mN(this,Uf,"f")&&this._onDidChangeState.fire(e))}}Uf=new WeakMap;var ele=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},q0=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},iB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function c_(r){return _e.regex(tB.keys()[0],new RegExp("(\\s|^)"+Cs(r.value)+"\\b"))}const _N={type:"object",defaultSnippets:[{body:{kind:""}}],properties:{kind:{type:"string",description:m("args.schema.kind","Kind of the code action to run.")},apply:{type:"string",description:m("args.schema.apply","Controls when the returned actions are applied."),default:"ifSingle",enum:["first","ifSingle","never"],enumDescriptions:[m("args.schema.apply.first","Always apply the first returned code action."),m("args.schema.apply.ifSingle","Apply the first returned code action if it is the only one."),m("args.schema.apply.never","Do not apply the returned code actions.")]},preferred:{type:"boolean",default:!1,description:m("args.schema.preferred","Controls if only preferred code actions should be returned.")}}};let Du=class nB extends Y{constructor(e,t,i,n,s){super();this._instantiationService=s,this._editor=e,this._model=this._register(new Jae(this._editor,t,i,n)),this._register(this._model.onDidChangeState(o=>this.update(o))),this._ui=new $0(()=>this._register(new pN(e,jf.Id,h_.Id,{applyCodeAction:(o,a)=>iB(this,void 0,void 0,function*(){try{yield this._applyCodeAction(o)}finally{a&&this._trigger({type:2,filter:{}})}})},this._instantiationService)))}static get(e){return e.getContribution(nB.ID)}update(e){this._ui.getValue().update(e)}showCodeActions(e,t,i){return this._ui.getValue().showCodeActionList(e,t,i,{includeDisabledActions:!1})}manualTriggerAtCurrentPosition(e,t,i){if(!this._editor.hasModel())return;zr.get(this._editor).closeMessage();const n=this._editor.getPosition();this._trigger({type:1,filter:t,autoApply:i,context:{notAvailableMessage:e,position:n}})}_trigger(e){return this._model.trigger(e)}_applyCodeAction(e){return this._instantiationService.invokeFunction(tle,e,this._editor)}};Du.ID="editor.contrib.quickFixController";Du=ele([q0(1,Xm),q0(2,Fe),q0(3,rl),q0(4,ut)],Du);function tle(r,e,t){return iB(this,void 0,void 0,function*(){const i=r.get(ik),n=r.get(fi),s=r.get(ec),o=r.get(Di);if(s.publicLog2("codeAction.applyCodeAction",{codeActionTitle:e.action.title,codeActionKind:e.action.kind,codeActionIsPreferred:!!e.action.isPreferred}),yield e.resolve(et.None),e.action.edit&&(yield i.apply(eC.convert(e.action.edit),{editor:t,label:e.action.title})),e.action.command)try{yield n.executeCommand(e.action.command.id,...e.action.command.arguments||[])}catch(a){const l=ile(a);o.error(typeof l=="string"?l:m("applyCodeActionFailed","An unknown error occurred while applying the code action"))}})}function ile(r){return typeof r=="string"?r:r instanceof Error&&typeof r.message=="string"?r.message:void 0}function Eu(r,e,t,i){if(r.hasModel()){const n=Du.get(r);n&&n.manualTriggerAtCurrentPosition(e,t,i)}}class jf extends Se{constructor(){super({id:jf.Id,label:m("quickfix.trigger.label","Quick Fix..."),alias:"Quick Fix...",precondition:_e.and(R.writable,R.hasCodeActionsProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|84,weight:100}})}run(e,t){return Eu(t,m("editor.action.quickFix.noneMessage","No code actions available"),void 0,void 0)}}jf.Id="editor.action.quickFix";class nle extends en{constructor(){super({id:K3,precondition:_e.and(R.writable,R.hasCodeActionsProvider),description:{description:"Trigger a code action",args:[{name:"args",schema:_N}]}})}runEditorCommand(e,t,i){const n=ca.fromUser(i,{kind:it.Empty,apply:"ifSingle"});return Eu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.codeAction.noneMessage.preferred.kind","No preferred code actions for '{0}' available",i.kind):m("editor.action.codeAction.noneMessage.kind","No code actions for '{0}' available",i.kind):n.preferred?m("editor.action.codeAction.noneMessage.preferred","No preferred code actions available"):m("editor.action.codeAction.noneMessage","No code actions available"),{include:n.kind,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class rle extends Se{constructor(){super({id:q3,label:m("refactor.label","Refactor..."),alias:"Refactor...",precondition:_e.and(R.writable,R.hasCodeActionsProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|48,mac:{primary:256|1024|48},weight:100},contextMenuOpts:{group:"1_modification",order:2,when:_e.and(R.writable,c_(it.Refactor))},description:{description:"Refactor...",args:[{name:"args",schema:_N}]}})}run(e,t,i){const n=ca.fromUser(i,{kind:it.Refactor,apply:"never"});return Eu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.refactor.noneMessage.preferred.kind","No preferred refactorings for '{0}' available",i.kind):m("editor.action.refactor.noneMessage.kind","No refactorings for '{0}' available",i.kind):n.preferred?m("editor.action.refactor.noneMessage.preferred","No preferred refactorings available"):m("editor.action.refactor.noneMessage","No refactorings available"),{include:it.Refactor.contains(n.kind)?n.kind:it.None,onlyIncludePreferredActions:n.preferred},n.apply)}}class sle extends Se{constructor(){super({id:G3,label:m("source.label","Source Action..."),alias:"Source Action...",precondition:_e.and(R.writable,R.hasCodeActionsProvider),contextMenuOpts:{group:"1_modification",order:2.1,when:_e.and(R.writable,c_(it.Source))},description:{description:"Source Action...",args:[{name:"args",schema:_N}]}})}run(e,t,i){const n=ca.fromUser(i,{kind:it.Source,apply:"never"});return Eu(t,typeof(i==null?void 0:i.kind)=="string"?n.preferred?m("editor.action.source.noneMessage.preferred.kind","No preferred source actions for '{0}' available",i.kind):m("editor.action.source.noneMessage.kind","No source actions for '{0}' available",i.kind):n.preferred?m("editor.action.source.noneMessage.preferred","No preferred source actions available"):m("editor.action.source.noneMessage","No source actions available"),{include:it.Source.contains(n.kind)?n.kind:it.None,includeSourceActions:!0,onlyIncludePreferredActions:n.preferred},n.apply)}}class ole extends Se{constructor(){super({id:lN,label:m("organizeImports.label","Organize Imports"),alias:"Organize Imports",precondition:_e.and(R.writable,c_(it.SourceOrganizeImports)),kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|45,weight:100}})}run(e,t){return Eu(t,m("editor.action.organize.noneMessage","No organize imports action available"),{include:it.SourceOrganizeImports,includeSourceActions:!0},"ifSingle")}}class ale extends Se{constructor(){super({id:cN,label:m("fixAll.label","Fix All"),alias:"Fix All",precondition:_e.and(R.writable,c_(it.SourceFixAll))})}run(e,t){return Eu(t,m("fixAll.noneMessage","No fix all action available"),{include:it.SourceFixAll,includeSourceActions:!0},"ifSingle")}}class h_ extends Se{constructor(){super({id:h_.Id,label:m("autoFix.label","Auto Fix..."),alias:"Auto Fix...",precondition:_e.and(R.writable,c_(it.QuickFix)),kbOpts:{kbExpr:R.editorTextFocus,primary:512|1024|84,mac:{primary:2048|512|84},weight:100}})}run(e,t){return Eu(t,m("editor.action.autoFix.noneMessage","No auto fixes available"),{include:it.QuickFix,onlyIncludePreferredActions:!0},"ifSingle")}}h_.Id="editor.action.autoFix";wt(Du.ID,Du);me(jf);me(rle);me(sle);me(ole);me(h_);me(ale);fe(new nle);var rB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class bN{constructor(){this.lenses=[],this._disposables=new le}dispose(){this._disposables.dispose()}add(e,t){this._disposables.add(e);for(const i of e.lenses)this.lenses.push({symbol:i,provider:t})}}function sB(r,e){return rB(this,void 0,void 0,function*(){const t=Wa.ordered(r),i=new Map,n=new bN,s=t.map((o,a)=>rB(this,void 0,void 0,function*(){i.set(o,a);try{const l=yield Promise.resolve(o.provideCodeLenses(r,e));l&&n.add(l,o)}catch(l){$i(l)}}));return yield Promise.all(s),n.lenses=n.lenses.sort((o,a)=>o.symbol.range.startLineNumber<a.symbol.range.startLineNumber?-1:o.symbol.range.startLineNumber>a.symbol.range.startLineNumber?1:i.get(o.provider)<i.get(a.provider)?-1:i.get(o.provider)>i.get(a.provider)?1:o.symbol.range.startColumn<a.symbol.range.startColumn?-1:o.symbol.range.startColumn>a.symbol.range.startColumn?1:0),n})}lt.registerCommand("_executeCodeLensProvider",function(r,...e){let[t,i]=e;Nt(Ie.isUri(t)),Nt(typeof i=="number"||!i);const n=r.get(gi).getModel(t);if(!n)throw Er();const s=[],o=new le;return sB(n,et.None).then(a=>{o.add(a);let l=[];for(const c of a.lenses)i==null||Boolean(c.symbol.command)?s.push(c.symbol):i-- >0&&c.provider.resolveCodeLens&&l.push(Promise.resolve(c.provider.resolveCodeLens(n,c.symbol,et.None)).then(h=>s.push(h||c.symbol)));return Promise.all(l)}).then(()=>s).finally(()=>{setTimeout(()=>o.dispose(),100)})});var lle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cle=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const oB=bt("ICodeLensCache");class aB{constructor(e,t){this.lineCount=e,this.data=t}}let vN=class{constructor(e){this._fakeProvider=new class{provideCodeLenses(){throw new Error("not supported")}},this._cache=new $l(20,.75);const t="codelens/cache";ov(()=>e.remove(t,1));const i="codelens/cache2",n=e.get(i,1,"{}");this._deserialize(n),Na(e.onWillSaveState)(s=>{s.reason===S0.SHUTDOWN&&e.store(i,this._serialize(),1,1)})}put(e,t){const i=t.lenses.map(o=>{var a;return{range:o.symbol.range,command:o.symbol.command&&{id:"",title:(a=o.symbol.command)===null||a===void 0?void 0:a.title}}}),n=new bN;n.add({lenses:i,dispose:()=>{}},this._fakeProvider);const s=new aB(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 s of i.data.lenses)n.add(s.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 i in t){const n=t[i],s=[];for(const a of n.lines)s.push({range:new k(a,1,a,11)});const o=new bN;o.add({lenses:s,dispose(){}},this._fakeProvider),this._cache.set(i,new aB(n.lineCount,o))}}catch{}}};vN=lle([cle(0,aa)],vN);iu(oB,vN);class hle{constructor(e,t,i){this.afterLineNumber=e,this.heightInPx=t,this._onHeight=i,this.suppressMouseDown=!0,this.domNode=document.createElement("div")}onComputedHeight(e){this._lastHeight===void 0?this._lastHeight=e:this._lastHeight!==e&&(this._lastHeight=e,this._onHeight())}}class G0{constructor(e,t,i){this.allowEditorOverflow=!1,this.suppressMouseDown=!0,this._commands=new Map,this._isEmpty=!0,this._editor=e,this._id=`codelens.widget-${G0._idPool++}`,this.updatePosition(i),this._domNode=document.createElement("span"),this._domNode.className=`codelens-decoration ${t}`}withCommands(e,t){this._commands.clear();let i=[],n=!1;for(let s=0;s<e.length;s++){const o=e[s];if(!!o&&(n=!0,o.command)){const a=wu(o.command.title.trim());o.command.id?(i.push(oe("a",{id:String(s),title:o.command.tooltip},...a)),this._commands.set(String(s),o.command)):i.push(oe("span",{title:o.command.tooltip},...a)),s+1<e.length&&i.push(oe("span",void 0,"\xA0|\xA0"))}}n?(zl(this._domNode,...i),this._isEmpty&&t&&this._domNode.classList.add("fadein"),this._isEmpty=!1):zl(this._domNode,oe("span",void 0,"no commands"))}getCommand(e){return e.parentElement===this._domNode?this._commands.get(e.id):void 0}getId(){return this._id}getDomNode(){return this._domNode}updatePosition(e){const t=this._editor.getModel().getLineFirstNonWhitespaceColumn(e);this._widgetPosition={position:{lineNumber:e,column:t},preference:[1]}}getPosition(){return this._widgetPosition||null}}G0._idPool=0;class CN{constructor(){this._removeDecorations=[],this._addDecorations=[],this._addDecorationsCallbacks=[]}addDecoration(e,t){this._addDecorations.push(e),this._addDecorationsCallbacks.push(t)}removeDecoration(e){this._removeDecorations.push(e)}commit(e){let t=e.deltaDecorations(this._removeDecorations,this._addDecorations);for(let i=0,n=t.length;i<n;i++)this._addDecorationsCallbacks[i](t[i])}}class lB{constructor(e,t,i,n,s,o,a){this._isDisposed=!1,this._editor=t,this._className=i,this._data=e,this._decorationIds=[];let l,c=[];this._data.forEach((h,u)=>{h.symbol.command&&c.push(h.symbol),n.addDecoration({range:h.symbol.range,options:Ke.EMPTY},d=>this._decorationIds[u]=d),l?l=k.plusRange(l,h.symbol.range):l=k.lift(h.symbol.range)}),this._viewZone=new hle(l.startLineNumber-1,o,a),this._viewZoneId=s.addZone(this._viewZone),c.length>0&&(this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(c,!1))}_createContentWidgetIfNecessary(){this._contentWidget?this._editor.layoutContentWidget(this._contentWidget):(this._contentWidget=new G0(this._editor,this._className,this._viewZone.afterLineNumber+1),this._editor.addContentWidget(this._contentWidget))}dispose(e,t){this._decorationIds.forEach(e.removeDecoration,e),this._decorationIds=[],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&&k.isEmpty(n.range)===i.isEmpty())})}updateCodeLensSymbols(e,t){this._decorationIds.forEach(t.removeDecoration,t),this._decorationIds=[],this._data=e,this._data.forEach((i,n)=>{t.addDecoration({range:i.symbol.range,options:Ke.EMPTY},s=>this._decorationIds[n]=s)})}updateHeight(e,t){this._viewZone.heightInPx=e,t.layoutZone(this._viewZoneId),this._contentWidget&&this._editor.layoutContentWidget(this._contentWidget)}computeIfNecessary(e){if(!this._viewZone.domNode.hasAttribute("monaco-visible-view-zone"))return null;for(let t=0;t<this._decorationIds.length;t++){const i=e.getDecorationRange(this._decorationIds[t]);i&&(this._data[t].symbol.range=i)}return this._data}updateCommands(e){this._createContentWidgetIfNecessary(),this._contentWidget.withCommands(e,!0);for(let t=0;t<this._data.length;t++){const i=e[t];if(i){const{symbol:n}=this._data[t];n.command=i.command||n.command}}}getCommand(e){var t;return(t=this._contentWidget)===null||t===void 0?void 0:t.getCommand(e)}getLineNumber(){const e=this._editor.getModel().getDecorationRange(this._decorationIds[0]);return e?e.startLineNumber:-1}update(e){if(this.isValid()){const t=this._editor.getModel().getDecorationRange(this._decorationIds[0]);t&&(this._viewZone.afterLineNumber=t.startLineNumber-1,e.layoutZone(this._viewZoneId),this._contentWidget&&(this._contentWidget.updatePosition(t.startLineNumber),this._editor.layoutContentWidget(this._contentWidget)))}}getItems(){return this._data}}Lt((r,e)=>{const t=r.getColor(cQ);t&&(e.addRule(`.monaco-editor .codelens-decoration { color: ${t}; }`),e.addRule(`.monaco-editor .codelens-decoration .codicon { color: ${t}; }`));const i=r.getColor(oD);i&&(e.addRule(`.monaco-editor .codelens-decoration > a:hover { color: ${i} !important; }`),e.addRule(`.monaco-editor .codelens-decoration > a:hover .codicon { color: ${i} !important; }`))});var ule=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wN=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},dle=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let Kf=class{constructor(e,t,i,n){this._editor=e,this._commandService=t,this._notificationService=i,this._codeLensCache=n,this._disposables=new le,this._localToDispose=new le,this._lenses=[],this._getCodeLensModelDelays=new kv(Wa,250,2500),this._oldCodeLensModels=new le,this._resolveCodeLensesDelays=new kv(Wa,250,2500),this._resolveCodeLensesScheduler=new Bt(()=>this._resolveCodeLensesInViewport(),this._resolveCodeLensesDelays.min),this._disposables.add(this._editor.onDidChangeModel(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeModelLanguage(()=>this._onModelChange())),this._disposables.add(this._editor.onDidChangeConfiguration(s=>{(s.hasChanged(43)||s.hasChanged(16)||s.hasChanged(15))&&this._updateLensStyle(),s.hasChanged(14)&&this._onModelChange()})),this._disposables.add(Wa.onDidChange(this._onModelChange,this)),this._onModelChange(),this._styleClassName="_"+ux(this._editor.getId()).toString(16),this._styleElement=Tr(lv(this._editor.getContainerDomNode())?this._editor.getContainerDomNode():void 0),this._updateLensStyle()}dispose(){var e;this._localDispose(),this._disposables.dispose(),this._oldCodeLensModels.dispose(),(e=this._currentCodeLensModel)===null||e===void 0||e.dispose(),this._styleElement.remove()}_getLayoutInfo(){let e=this._editor.getOption(16),t;return!e||e<5?(e=this._editor.getOption(45)*.9|0,t=this._editor.getOption(58)):t=e*Math.max(1.3,this._editor.getOption(58)/this._editor.getOption(45))|0,{codeLensHeight:t,fontSize:e}}_updateLensStyle(){const{codeLensHeight:e,fontSize:t}=this._getLayoutInfo(),i=this._editor.getOption(15),n=this._editor.getOption(43),s=`--codelens-font-family${this._styleClassName}`,o=`--codelens-font-features${this._styleClassName}`;let a=` - .monaco-editor .codelens-decoration.${this._styleClassName} { line-height: ${e}px; font-size: ${t}px; padding-right: ${Math.round(t*.5)}px; font-feature-settings: var(${o}) } - .monaco-editor .codelens-decoration.${this._styleClassName} span.codicon { line-height: ${e}px; font-size: ${t}px; } - `;i&&(a+=`.monaco-editor .codelens-decoration.${this._styleClassName} { font-family: var(${s})}`),this._styleElement.textContent=a,this._editor.getContainerDomNode().style.setProperty(s,i!=null?i:"inherit"),this._editor.getContainerDomNode().style.setProperty(o,n.fontFeatureSettings),this._editor.changeViewZones(l=>{for(let c of this._lenses)c.updateHeight(e,l)})}_localDispose(){var e,t,i;(e=this._getCodeLensModelPromise)===null||e===void 0||e.cancel(),this._getCodeLensModelPromise=void 0,(t=this._resolveCodeLensesPromise)===null||t===void 0||t.cancel(),this._resolveCodeLensesPromise=void 0,this._localToDispose.clear(),this._oldCodeLensModels.clear(),(i=this._currentCodeLensModel)===null||i===void 0||i.dispose()}_onModelChange(){this._localDispose();const e=this._editor.getModel();if(!e||!this._editor.getOption(14))return;const t=this._codeLensCache.get(e);if(t&&this._renderCodeLensSymbols(t),!Wa.has(e)){t&&this._localToDispose.add(mh(()=>{const n=this._codeLensCache.get(e);t===n&&(this._codeLensCache.delete(e),this._onModelChange())},30*1e3));return}for(const n of Wa.all(e))if(typeof n.onDidChange=="function"){let s=n.onDidChange(()=>i.schedule());this._localToDispose.add(s)}const i=new Bt(()=>{var n;const s=Date.now();(n=this._getCodeLensModelPromise)===null||n===void 0||n.cancel(),this._getCodeLensModelPromise=Oi(o=>sB(e,o)),this._getCodeLensModelPromise.then(o=>{this._currentCodeLensModel&&this._oldCodeLensModels.add(this._currentCodeLensModel),this._currentCodeLensModel=o,this._codeLensCache.put(e,o);const a=this._getCodeLensModelDelays.update(e,Date.now()-s);i.delay=a,this._renderCodeLensSymbols(o),this._resolveCodeLensesInViewportSoon()},Oe)},this._getCodeLensModelDelays.get(e));this._localToDispose.add(i),this._localToDispose.add(Xe(()=>this._resolveCodeLensesScheduler.cancel())),this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._editor.changeDecorations(n=>{this._editor.changeViewZones(s=>{let o=[],a=-1;this._lenses.forEach(c=>{!c.isValid()||a===c.getLineNumber()?o.push(c):(c.update(s),a=c.getLineNumber())});let l=new CN;o.forEach(c=>{c.dispose(l,s),this._lenses.splice(this._lenses.indexOf(c),1)}),l.commit(n)})}),i.schedule()})),this._localToDispose.add(this._editor.onDidFocusEditorWidget(()=>{i.schedule()})),this._localToDispose.add(this._editor.onDidScrollChange(n=>{n.scrollTopChanged&&this._lenses.length>0&&this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(this._editor.onDidLayoutChange(()=>{this._resolveCodeLensesInViewportSoon()})),this._localToDispose.add(Xe(()=>{if(this._editor.getModel()){const n=pc.capture(this._editor);this._editor.changeDecorations(s=>{this._editor.changeViewZones(o=>{this._disposeAllLenses(s,o)})}),n.restore(this._editor)}else this._disposeAllLenses(void 0,void 0)})),this._localToDispose.add(this._editor.onMouseDown(n=>{if(n.target.type!==9)return;let s=n.target.element;if((s==null?void 0:s.tagName)==="SPAN"&&(s=s.parentElement),(s==null?void 0:s.tagName)==="A")for(const o of this._lenses){let a=o.getCommand(s);if(a){this._commandService.executeCommand(a.id,...a.arguments||[]).catch(l=>this._notificationService.error(l));break}}})),i.schedule()}_disposeAllLenses(e,t){const i=new CN;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;let t=this._editor.getModel().getLineCount(),i=[],n;for(let a of e.lenses){let l=a.symbol.range.startLineNumber;l<1||l>t||(n&&n[n.length-1].symbol.range.startLineNumber===l?n.push(a):(n=[a],i.push(n)))}const s=pc.capture(this._editor),o=this._getLayoutInfo();this._editor.changeDecorations(a=>{this._editor.changeViewZones(l=>{const c=new CN;let h=0,u=0;for(;u<i.length&&h<this._lenses.length;){let d=i[u][0].symbol.range.startLineNumber,f=this._lenses[h].getLineNumber();f<d?(this._lenses[h].dispose(c,l),this._lenses.splice(h,1)):f===d?(this._lenses[h].updateCodeLensSymbols(i[u],c),u++,h++):(this._lenses.splice(h,0,new lB(i[u],this._editor,this._styleClassName,c,l,o.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),h++,u++)}for(;h<this._lenses.length;)this._lenses[h].dispose(c,l),this._lenses.splice(h,1);for(;u<i.length;)this._lenses.push(new lB(i[u],this._editor,this._styleClassName,c,l,o.codeLensHeight,()=>this._resolveCodeLensesInViewportSoon())),u++;c.commit(a)})}),s.restore(this._editor)}_resolveCodeLensesInViewportSoon(){this._editor.getModel()&&this._resolveCodeLensesScheduler.schedule()}_resolveCodeLensesInViewport(){var e;(e=this._resolveCodeLensesPromise)===null||e===void 0||e.cancel(),this._resolveCodeLensesPromise=void 0;const t=this._editor.getModel();if(!t)return;const i=[],n=[];if(this._lenses.forEach(a=>{const l=a.computeIfNecessary(t);l&&(i.push(l),n.push(a))}),i.length===0)return;const s=Date.now(),o=Oi(a=>{const l=i.map((c,h)=>{const u=new Array(c.length),d=c.map((f,g)=>!f.symbol.command&&typeof f.provider.resolveCodeLens=="function"?Promise.resolve(f.provider.resolveCodeLens(t,f.symbol,a)).then(p=>{u[g]=p},$i):(u[g]=f.symbol,Promise.resolve(void 0)));return Promise.all(d).then(()=>{!a.isCancellationRequested&&!n[h].isDisposed()&&n[h].updateCommands(u)})});return Promise.all(l)});this._resolveCodeLensesPromise=o,this._resolveCodeLensesPromise.then(()=>{const a=this._resolveCodeLensesDelays.update(t,Date.now()-s);this._resolveCodeLensesScheduler.delay=a,this._currentCodeLensModel&&this._codeLensCache.put(t,this._currentCodeLensModel),this._oldCodeLensModels.clear(),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)},a=>{Oe(a),o===this._resolveCodeLensesPromise&&(this._resolveCodeLensesPromise=void 0)})}getLenses(){return this._lenses}};Kf.ID="css.editor.codeLens";Kf=ule([wN(1,fi),wN(2,Di),wN(3,oB)],Kf);wt(Kf.ID,Kf);me(class extends Se{constructor(){super({id:"codelens.showLensesInCurrentLine",precondition:R.hasCodeLensProvider,label:m("showLensOnLine","Show CodeLens Commands For Current Line"),alias:"Show CodeLens Commands For Current Line"})}run(e,t){return dle(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(kc),n=e.get(fi),s=e.get(Di),o=t.getSelection().positionLineNumber,a=t.getContribution(Kf.ID),l=[];for(let h of a.getLenses())if(h.getLineNumber()===o)for(let u of h.getItems()){const{command:d}=u.symbol;d&&l.push({label:d.title,command:d})}if(l.length===0)return;const c=yield i.pick(l,{canPickMany:!1});if(!!c)try{yield n.executeCommand(c.command.id,...c.command.arguments||[])}catch(h){s.error(h)}})}});function fle(r,e){const t=[],n=zd.ordered(r).reverse().map(s=>Promise.resolve(s.provideDocumentColors(r,e)).then(o=>{if(Array.isArray(o))for(let a of o)t.push({colorInfo:a,provider:s})}));return Promise.all(n).then(()=>t)}function cB(r,e,t,i){return Promise.resolve(t.provideColorPresentations(r,e,i))}lt.registerCommand("_executeDocumentColorProvider",function(r,...e){const[t]=e;if(!(t instanceof Ie))throw Er();const i=r.get(gi).getModel(t);if(!i)throw Er();const n=[],o=zd.ordered(i).reverse().map(a=>Promise.resolve(a.provideDocumentColors(i,et.None)).then(l=>{if(Array.isArray(l))for(let c of l)n.push({range:c.range,color:[c.color.red,c.color.green,c.color.blue,c.color.alpha]})}));return Promise.all(o).then(()=>n)});lt.registerCommand("_executeColorPresentationProvider",function(r,...e){const[t,i]=e,{uri:n,range:s}=i;if(!(n instanceof Ie)||!Array.isArray(t)||t.length!==4||!k.isIRange(s))throw Er();const[o,a,l,c]=t,h=r.get(gi).getModel(n);if(!h)throw Er();const u={range:s,color:{red:o,green:a,blue:l,alpha:c}},d=[],g=zd.ordered(h).reverse().map(p=>Promise.resolve(p.provideColorPresentations(h,u,et.None)).then(_=>{Array.isArray(_)&&d.push(..._)}));return Promise.all(g).then(()=>d)});var gle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},hB=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const ple=500;let Iu=class uB extends Y{constructor(e,t,i){super();this._editor=e,this._codeEditorService=t,this._configurationService=i,this._localToDispose=this._register(new le),this._decorationsIds=[],this._colorDatas=new Map,this._colorDecoratorIds=[],this._decorationsTypes=new Set,this._register(e.onDidChangeModel(()=>{this._isEnabled=this.isEnabled(),this.onModelChanged()})),this._register(e.onDidChangeModelLanguage(()=>this.onModelChanged())),this._register(zd.onDidChange(()=>this.onModelChanged())),this._register(e.onDidChangeConfiguration(()=>{let n=this._isEnabled;this._isEnabled=this.isEnabled(),n!==this._isEnabled&&(this._isEnabled?this.onModelChanged():this.removeAllDecorations())})),this._timeoutTimer=null,this._computePromise=null,this._isEnabled=this.isEnabled(),this.onModelChanged()}isEnabled(){const e=this._editor.getModel();if(!e)return!1;const t=e.getLanguageIdentifier(),i=this._configurationService.getValue(t.language);if(i&&typeof i=="object"){const n=i.colorDecorators;if(n&&n.enable!==void 0&&!n.enable)return n.enable}return this._editor.getOption(17)}static get(e){return e.getContribution(this.ID)}dispose(){this.stop(),this.removeAllDecorations(),super.dispose()}onModelChanged(){if(this.stop(),!this._isEnabled)return;const e=this._editor.getModel();!e||!zd.has(e)||(this._localToDispose.add(this._editor.onDidChangeModelContent(()=>{this._timeoutTimer||(this._timeoutTimer=new Xn,this._timeoutTimer.cancelAndSet(()=>{this._timeoutTimer=null,this.beginCompute()},uB.RECOMPUTE_TIME))})),this.beginCompute())}beginCompute(){this._computePromise=Oi(e=>{const t=this._editor.getModel();return t?fle(t,e):Promise.resolve([])}),this._computePromise.then(e=>{this.updateDecorations(e),this.updateColorDecorators(e),this._computePromise=null},Oe)}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(i=>({range:{startLineNumber:i.colorInfo.range.startLineNumber,startColumn:i.colorInfo.range.startColumn,endLineNumber:i.colorInfo.range.endLineNumber,endColumn:i.colorInfo.range.endColumn},options:Ke.EMPTY}));this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,t),this._colorDatas=new Map,this._decorationsIds.forEach((i,n)=>this._colorDatas.set(i,e[n]))}updateColorDecorators(e){let t=[],i={};for(let n=0;n<e.length&&t.length<ple;n++){const{red:s,green:o,blue:a,alpha:l}=e[n].colorInfo.color,c=new tt(Math.round(s*255),Math.round(o*255),Math.round(a*255),l);let h=ux(`rgba(${c.r},${c.g},${c.b},${c.a})`).toString(16),u=`rgba(${c.r}, ${c.g}, ${c.b}, ${c.a})`,d="colorBox-"+h;!this._decorationsTypes.has(d)&&!i[d]&&this._codeEditorService.registerDecorationType("color-detector-color",d,{before:{contentText:" ",border:"solid 0.1em #000",margin:"0.1em 0.2em 0 0.2em",width:"0.8em",height:"0.8em",backgroundColor:u},dark:{before:{border:"solid 0.1em #eee"}}},void 0,this._editor),i[d]=!0,t.push({range:{startLineNumber:e[n].colorInfo.range.startLineNumber,startColumn:e[n].colorInfo.range.startColumn,endLineNumber:e[n].colorInfo.range.endLineNumber,endColumn:e[n].colorInfo.range.endColumn},options:this._codeEditorService.resolveDecorationOptions(d,!0)})}this._decorationsTypes.forEach(n=>{i[n]||this._codeEditorService.removeDecorationType(n)}),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,t)}removeAllDecorations(){this._decorationsIds=this._editor.deltaDecorations(this._decorationsIds,[]),this._colorDecoratorIds=this._editor.deltaDecorations(this._colorDecoratorIds,[]),this._decorationsTypes.forEach(e=>{this._codeEditorService.removeDecorationType(e)})}getColorData(e){const t=this._editor.getModel();if(!t)return null;const i=t.getDecorationsInRange(k.fromPositions(e,e)).filter(n=>this._colorDatas.has(n.id));return i.length===0?null:this._colorDatas.get(i[0].id)}};Iu.ID="editor.contrib.colorDetector";Iu.RECOMPUTE_TIME=1e3;Iu=gle([hB(1,Ct),hB(2,hi)],Iu);wt(Iu.ID,Iu);function yN(r,e){return!!r[e]}class SN{constructor(e,t){this.target=e.target,this.hasTriggerModifier=yN(e.event,t.triggerModifier),this.hasSideBySideModifier=yN(e.event,t.triggerSideBySideModifier),this.isNoneOrSingleMouseDown=e.event.detail<=1}}class dB{constructor(e,t){this.keyCodeIsTriggerKey=e.keyCode===t.triggerKey,this.keyCodeIsSideBySideKey=e.keyCode===t.triggerSideBySideKey,this.hasTriggerModifier=yN(e,t.triggerModifier)}}class Z0{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 fB(r){return r==="altKey"?Je?new Z0(57,"metaKey",6,"altKey"):new Z0(5,"ctrlKey",6,"altKey"):Je?new Z0(6,"altKey",57,"metaKey"):new Z0(6,"altKey",5,"ctrlKey")}class gB extends Y{constructor(e){super();this._onMouseMoveOrRelevantKeyDown=this._register(new H),this.onMouseMoveOrRelevantKeyDown=this._onMouseMoveOrRelevantKeyDown.event,this._onExecute=this._register(new H),this.onExecute=this._onExecute.event,this._onCancel=this._register(new H),this.onCancel=this._onCancel.event,this._editor=e,this._opts=fB(this._editor.getOption(69)),this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._register(this._editor.onDidChangeConfiguration(t=>{if(t.hasChanged(69)){const i=fB(this._editor.getOption(69));if(this._opts.equals(i))return;this._opts=i,this._lastMouseMoveEvent=null,this._hasTriggerKeyOnMouseDown=!1,this._lineNumberOnMouseDown=0,this._onCancel.fire()}})),this._register(this._editor.onMouseMove(t=>this._onEditorMouseMove(new SN(t,this._opts)))),this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(new SN(t,this._opts)))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(new SN(t,this._opts)))),this._register(this._editor.onKeyDown(t=>this._onEditorKeyDown(new dB(t,this._opts)))),this._register(this._editor.onKeyUp(t=>this._onEditorKeyUp(new dB(t,this._opts)))),this._register(this._editor.onMouseDrag(()=>this._resetHandler())),this._register(this._editor.onDidChangeCursorSelection(t=>this._onDidChangeCursorSelection(t))),this._register(this._editor.onDidChangeModel(t=>this._resetHandler())),this._register(this._editor.onDidChangeModelContent(()=>this._resetHandler())),this._register(this._editor.onDidScrollChange(t=>{(t.scrollTopChanged||t.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=e.target.position?e.target.position.lineNumber:0}_onEditorMouseUp(e){const t=e.target.position?e.target.position.lineNumber:0;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()}}var mle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nu=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Tu=class extends Em{constructor(e,t,i,n,s,o,a,l,c,h){super(e,Object.assign(Object.assign({},i.getRawOptions()),{overflowWidgetsDomNode:i.getOverflowWidgetsDomNode()}),{},n,s,o,a,l,c,h);this._parentEditor=i,this._overwriteOptions=t,super.updateOptions(this._overwriteOptions),this._register(i.onDidChangeConfiguration(u=>this._onParentConfigurationChanged(u)))}getParentEditor(){return this._parentEditor}_onParentConfigurationChanged(e){super.updateOptions(this._parentEditor.getRawOptions()),super.updateOptions(this._overwriteOptions)}updateOptions(e){eo(this._overwriteOptions,e,!0),super.updateOptions(this._overwriteOptions)}};Tu=mle([Nu(3,ut),Nu(4,Ct),Nu(5,fi),Nu(6,Fe),Nu(7,qt),Nu(8,Di),Nu(9,_r)],Tu);const pB=new K(new tt(0,122,204)),_le={showArrow:!0,showFrame:!0,className:"",frameColor:pB,arrowColor:pB,keepEditorSelection:!1},ble="vs.editor.contrib.zoneWidget";class vle{constructor(e,t,i,n,s,o){this.id="",this.domNode=e,this.afterLineNumber=t,this.afterColumn=i,this.heightInLines=n,this._onDomNodeTop=s,this._onComputedHeight=o}onDomNodeTop(e){this._onDomNodeTop(e)}onComputedHeight(e){this._onComputedHeight(e)}}class Cle{constructor(e,t){this._id=e,this._domNode=t}getId(){return this._id}getDomNode(){return this._domNode}getPosition(){return null}}class Y0{constructor(e){this._editor=e,this._ruleName=Y0._IdGenerator.nextId(),this._decorations=[],this._color=null,this._height=-1}dispose(){this.hide(),cv(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(){cv(this._ruleName),HL(`.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){this._decorations=this._editor.deltaDecorations(this._decorations,[{range:k.fromPositions(e),options:{description:"zone-widget-arrow",className:this._ruleName,stickiness:1}}])}hide(){this._editor.deltaDecorations(this._decorations,[])}}Y0._IdGenerator=new DI(".arrow-decoration-");class wle{constructor(e,t={}){this._arrow=null,this._overlayWidget=null,this._resizeSash=null,this._positionMarkerId=[],this._viewZone=null,this._disposables=new le,this.container=null,this._isShowing=!1,this.editor=e,this.options=jl(t),eo(this.options,_le,!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(i=>{const n=this._getWidth(i);this.domNode.style.width=n+"px",this.domNode.style.left=this._getLeft(i)+"px",this._onWidth(n)}))}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.editor.deltaDecorations(this._positionMarkerId,[]),this._positionMarkerId=[],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 Y0(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){let e=this.options.frameColor.toString();this.container.style.borderTopColor=e,this.container.style.borderBottomColor=e}if(this._arrow&&this.options.arrowColor){let 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&&e.minimap.minimapLeft===0?e.minimap.minimapWidth:0}_onViewZoneTop(e){this.domNode.style.top=e+"px"}_onViewZoneHeight(e){if(this.domNode.style.height=`${e}px`,this.container){let t=e-this._decoratingElementsHeight();this.container.style.height=`${t}px`;const i=this.editor.getLayoutInfo();this._doLayout(t,this._getWidth(i))}this._resizeSash&&this._resizeSash.layout()}get position(){const[e]=this._positionMarkerId;if(!e)return;const t=this.editor.getModel();if(!t)return;const i=t.getDecorationRange(e);if(!!i)return i.getStartPosition()}show(e,t){const i=k.isIRange(e)?k.lift(e):k.fromPositions(e);this._isShowing=!0,this._showImpl(i,t),this._isShowing=!1,this._positionMarkerId=this.editor.deltaDecorations(this._positionMarkerId,[{range:i,options:Ke.EMPTY}])}hide(){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),this._arrow&&this._arrow.hide()}_decoratingElementsHeight(){let e=this.editor.getOption(58),t=0;if(this.options.showArrow){let i=Math.round(e/3);t+=2*i}if(this.options.showFrame){let i=Math.round(e/9);t+=2*i}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 a=this.editor.getOption(58),l=Math.max(12,this.editor.getLayoutInfo().height/a*.8);t=Math.min(t,l);let c=0,h=0;if(this._arrow&&this.options.showArrow&&(c=Math.round(a/3),this._arrow.height=c,this._arrow.show(i)),this.options.showFrame&&(h=Math.round(a/9)),this.editor.changeViewZones(f=>{this._viewZone&&f.removeZone(this._viewZone.id),this._overlayWidget&&(this.editor.removeOverlayWidget(this._overlayWidget),this._overlayWidget=null),this.domNode.style.top="-1000px",this._viewZone=new vle(o,i.lineNumber,i.column,t,g=>this._onViewZoneTop(g),g=>this._onViewZoneHeight(g)),this._viewZone.id=f.addZone(this._viewZone),this._overlayWidget=new Cle(ble+this._viewZone.id,this.domNode),this.editor.addOverlayWidget(this._overlayWidget)}),this.container&&this.options.showFrame){const f=this.options.frameWidth?this.options.frameWidth:h;this.container.style.borderTopWidth=f+"px",this.container.style.borderBottomWidth=f+"px"}let u=t*a-this._decoratingElementsHeight();this.container&&(this.container.style.top=c+"px",this.container.style.height=u+"px",this.container.style.overflow="hidden"),this._doLayout(u,s),this.options.keepEditorSelection||this.editor.setSelection(e);const d=this.editor.getModel();if(d){const f=e.endLineNumber+1;f<=d.getLineCount()?this.revealLine(f,!1):this.revealLine(d.getLineCount(),!0)}}revealLine(e,t){t?this.editor.revealLineInCenter(e,0):this.editor.revealLine(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;this._resizeSash=this._disposables.add(new _n(this.domNode,this,{orientation:1})),this.options.isResizeable||(this._resizeSash.hide(),this._resizeSash.state=0);let e;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){let i=(t.currentY-e.startY)/this.editor.getOption(58),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(this.domNode.style.height===null?0:parseInt(this.domNode.style.height))-this._decoratingElementsHeight()/2}getHorizontalSashWidth(){const e=this.editor.getLayoutInfo();return e.width-e.minimap.minimapWidth}}class yle extends sf{constructor(e,t){super();this._onDidChangeVisibility=this._register(new H),this.onDidChangeVisibility=this._onDidChangeVisibility.event,this._element=X(e,oe(".monaco-dropdown")),this._label=X(this._element,oe(".dropdown-label"));let i=t.labelRenderer;i||(i=s=>(s.textContent=t.label||"",null));for(const s of[Ee.CLICK,Ee.MOUSE_DOWN,Vt.Tap])this._register(J(this.element,s,o=>St.stop(o,!0)));for(const s of[Ee.MOUSE_DOWN,Vt.Tap])this._register(J(this._label,s,o=>{o instanceof MouseEvent&&o.detail>1||(this.visible?this.hide():this.show())}));this._register(J(this._label,Ee.KEY_UP,s=>{const o=new ei(s);(o.equals(3)||o.equals(10))&&(St.stop(s,!0),this.visible?this.hide():this.show())}));const n=i(this._label);n&&this._register(n),this._register(Et.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 Sle extends yle{constructor(e,t){super(e,t);this._actions=[],this._contextMenuProvider=t.contextMenuProvider,this.actions=t.actions||[],this.actionProvider=t.actionProvider,this.menuClassName=t.menuClassName||"",this.menuAsChild=!!t.menuAsChild}set menuOptions(e){this._menuOptions=e}get menuOptions(){return this._menuOptions}get actions(){return this.actionProvider?this.actionProvider.getActions():this._actions}set actions(e){this._actions=e}show(){super.show(),this.element.classList.add("active"),this._contextMenuProvider.showContextMenu({getAnchor:()=>this.element,getActions:()=>this.actions,getActionsContext:()=>this.menuOptions?this.menuOptions.context:null,getActionViewItem:e=>this.menuOptions&&this.menuOptions.actionViewItemProvider?this.menuOptions.actionViewItemProvider(e):void 0,getKeyBinding:e=>this.menuOptions&&this.menuOptions.getKeyBinding?this.menuOptions.getKeyBinding(e):void 0,getMenuClassName:()=>this.menuClassName,onHide:()=>this.onHide(),actionRunner:this.menuOptions?this.menuOptions.actionRunner:void 0,anchorAlignment:this.menuOptions?this.menuOptions.anchorAlignment:0,domForShadowRoot:this.menuAsChild?this.element:void 0})}hide(){super.hide()}onHide(){this.hide(),this.element.classList.remove("active")}}class mB extends nu{constructor(e,t,i,n=Object.create(null)){super(null,e,n);this.actionItem=null,this._onDidChangeVisibility=this._register(new H),this.menuActionsOrProvider=t,this.contextMenuProvider=i,this.options=n,this.options.actionRunner&&(this.actionRunner=this.options.actionRunner)}render(e){this.actionItem=e;const t=s=>{this.element=X(s,oe("a.action-label"));let o=[];return typeof this.options.classNames=="string"?o=this.options.classNames.split(/\s+/g).filter(a=>!!a):this.options.classNames&&(o=this.options.classNames),o.find(a=>a==="icon")||o.push("codicon"),this.element.classList.add(...o),this.element.setAttribute("role","button"),this.element.setAttribute("aria-haspopup","true"),this.element.setAttribute("aria-expanded","false"),this.element.title=this._action.label||"",null},i=Array.isArray(this.menuActionsOrProvider),n={contextMenuProvider:this.contextMenuProvider,labelRenderer:t,menuAsChild:this.options.menuAsChild,actions:i?this.menuActionsOrProvider:void 0,actionProvider:i?void 0:this.menuActionsOrProvider};if(this.dropdownMenu=this._register(new Sle(e,n)),this._register(this.dropdownMenu.onDidChangeVisibility(s=>{var o;(o=this.element)===null||o===void 0||o.setAttribute("aria-expanded",`${s}`),this._onDidChangeVisibility.fire(s)})),this.dropdownMenu.menuOptions={actionViewItemProvider:this.options.actionViewItemProvider,actionRunner:this.actionRunner,getKeyBinding:this.options.keybindingProvider,context:this._context},this.options.anchorAlignmentProvider){const s=this;this.dropdownMenu.menuOptions=Object.assign(Object.assign({},this.dropdownMenu.menuOptions),{get anchorAlignment(){return s.options.anchorAlignmentProvider()}})}this.updateEnabled()}setActionContext(e){super.setActionContext(e),this.dropdownMenu&&(this.dropdownMenu.menuOptions?this.dropdownMenu.menuOptions.context=e:this.dropdownMenu.menuOptions={context:e})}updateEnabled(){var e,t;const i=!this.getAction().enabled;(e=this.actionItem)===null||e===void 0||e.classList.toggle("disabled",i),(t=this.element)===null||t===void 0||t.classList.toggle("disabled",i)}}var LN=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},ha=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},_B=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Lle(r,e,t,i,n,s,o){const a=r.getActions(e);return kle(a,t,!1,typeof i=="string"?c=>c===i:i,n,s,o),xle(a)}function xle(r){const e=new le;for(const[,t]of r)for(const i of t)e.add(i);return e}function kle(r,e,t,i=a=>a==="navigation",n=Number.MAX_SAFE_INTEGER,s=()=>!1,o=!1){let a,l;Array.isArray(e)?(a=e,l=e):(a=e.primary,l=e.secondary);const c=new Set;for(const[h,u]of r){let d;i(h)?(d=a,d.length>0&&o&&d.push(new Ts)):(d=l,d.length>0&&d.push(new Ts));for(let f of u){t&&(f=f instanceof Jl&&f.alt?f.alt:f);const g=d.push(f);f instanceof IC&&c.add({group:h,action:f,index:g-1})}}for(const{group:h,action:u,index:d}of c){const f=i(h)?a:l,g=u.actions;(g.length<=1||f.length+g.length-2<=n)&&s(u,h,f.length)&&f.splice(d,1,...g)}if(a!==l&&a.length>n){const h=a.splice(n,a.length-n);l.unshift(...h,new Ts)}}let qf=class extends Tm{constructor(e,t,i,n,s){super(void 0,e,{icon:!!(e.class||e.item.icon),label:!e.class&&!e.item.icon,draggable:t==null?void 0:t.draggable});this._keybindingService=i,this._notificationService=n,this._contextKeyService=s,this._wantsAltCommand=!1,this._itemClassDispose=this._register(new An),this._altKey=bh.getInstance()}get _menuItemAction(){return this._action}get _commandAction(){return this._wantsAltCommand&&this._menuItemAction.alt||this._menuItemAction}onClick(e){return _B(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){super.render(e),e.classList.add("menu-entry"),this._updateItemClass(this._menuItemAction.item);let t=!1,i=this._altKey.keyStatus.altKey||(Xi||Zn)&&this._altKey.keyStatus.shiftKey;const n=()=>{const s=t&&i;s!==this._wantsAltCommand&&(this._wantsAltCommand=s,this.updateLabel(),this.updateTooltip(),this.updateClass())};this._menuItemAction.alt&&this._register(this._altKey.event(s=>{i=s.altKey||(Xi||Zn)&&s.shiftKey,n()})),this._register(J(e,"mouseleave",s=>{t=!1,n()})),this._register(J(e,"mouseenter",s=>{t=!0,n()}))}updateLabel(){this.options.label&&this.label&&(this.label.textContent=this._commandAction.label)}updateTooltip(){if(this.label){const e=this._keybindingService.lookupKeybinding(this._commandAction.id,this._contextKeyService),t=e&&e.getLabel(),i=this._commandAction.tooltip||this._commandAction.label;let n=t?m("titleAndKb","{0} ({1})",i,t):i;if(!this._wantsAltCommand&&this._menuItemAction.alt){const s=this._menuItemAction.alt.tooltip||this._menuItemAction.alt.label,o=this._keybindingService.lookupKeybinding(this._menuItemAction.alt.id,this._contextKeyService),a=o&&o.getLabel(),l=a?m("titleAndKb","{0} ({1})",s,a):s;n+=` -[${uk.modifierLabels[bs].altKey}] ${l}`}this.label.title=n}}updateClass(){this.options.icon&&(this._commandAction!==this._menuItemAction?this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.alt.item):this._menuItemAction.alt&&this._updateItemClass(this._menuItemAction.item))}_updateItemClass(e){var t;this._itemClassDispose.value=void 0;const{element:i,label:n}=this;if(!i||!n)return;const s=this._commandAction.checked&&((t=e.toggled)===null||t===void 0?void 0:t.icon)?e.toggled.icon:e.icon;if(!!s)if(Gt.isThemeIcon(s)){const o=Gt.asClassNameArray(s);n.classList.add(...o),this._itemClassDispose.value=Xe(()=>{n.classList.remove(...o)})}else s.light&&n.style.setProperty("--menu-entry-icon-light",Ra(s.light)),s.dark&&n.style.setProperty("--menu-entry-icon-dark",Ra(s.dark)),n.classList.add("icon"),this._itemClassDispose.value=Xe(()=>{n.classList.remove("icon"),n.style.removeProperty("--menu-entry-icon-light"),n.style.removeProperty("--menu-entry-icon-dark")})}};qf=LN([ha(2,Qt),ha(3,Di),ha(4,Fe)],qf);let xN=class extends mB{constructor(e,t,i){var n,s;const o=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(n=t==null?void 0:t.menuAsChild)!==null&&n!==void 0?n:!0,classNames:(s=t==null?void 0:t.classNames)!==null&&s!==void 0?s:Gt.isThemeIcon(e.item.icon)?Gt.asClassName(e.item.icon):void 0});super(e,{getActions:()=>e.actions},i,o)}render(e){if(super.render(e),this.element){e.classList.add("menu-entry");const{icon:t}=this._action.item;t&&!Gt.isThemeIcon(t)&&(this.element.classList.add("icon"),t.light&&this.element.style.setProperty("--menu-entry-icon-light",Ra(t.light)),t.dark&&this.element.style.setProperty("--menu-entry-icon-dark",Ra(t.dark)))}}};xN=LN([ha(2,_c)],xN);let kN=class extends nu{constructor(e,t,i,n,s,o,a,l){var c,h,u;super(null,e);this._keybindingService=i,this._notificationService=n,this._contextMenuService=s,this._menuService=o,this._instaService=a,this._storageService=l,this._container=null,this._storageKey=`${e.item.submenu._debugName}_lastActionId`;let d,f=l.get(this._storageKey,1);f&&(d=e.actions.find(p=>f===p.id)),d||(d=e.actions[0]),this._defaultAction=this._instaService.createInstance(qf,d,void 0);const g=Object.assign({},t!=null?t:Object.create(null),{menuAsChild:(c=t==null?void 0:t.menuAsChild)!==null&&c!==void 0?c:!0,classNames:(h=t==null?void 0:t.classNames)!==null&&h!==void 0?h:["codicon","codicon-chevron-down"],actionRunner:(u=t==null?void 0:t.actionRunner)!==null&&u!==void 0?u:new sf});this._dropdown=new mB(e,e.actions,this._contextMenuService,g),this._dropdown.actionRunner.onDidRun(p=>{p.action instanceof Jl&&this.update(p.action)})}update(e){this._storageService.store(this._storageKey,e.id,1,0),this._defaultAction.dispose(),this._defaultAction=this._instaService.createInstance(qf,e,void 0),this._defaultAction.actionRunner=new class extends sf{runAction(t,i){return _B(this,void 0,void 0,function*(){yield t.run(void 0)})}},this._container&&this._defaultAction.render(Rj(this._container,oe(".action-container")))}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=oe(".action-container");this._defaultAction.render(X(this._container,t)),this._register(J(t,Ee.KEY_DOWN,n=>{const s=new ei(n);s.equals(17)&&(this._defaultAction.element.tabIndex=-1,this._dropdown.focus(),s.stopPropagation())}));const i=oe(".dropdown-action-container");this._dropdown.render(X(this._container,i)),this._register(J(i,Ee.KEY_DOWN,n=>{var s;const o=new ei(n);o.equals(15)&&(this._defaultAction.element.tabIndex=0,this._dropdown.setFocusable(!1),(s=this._defaultAction.element)===null||s===void 0||s.focus(),o.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()}};kN=LN([ha(2,Qt),ha(3,Di),ha(4,_c),ha(5,Th),ha(6,ut),ha(7,aa)],kN);function Dle(r,e,t){return e instanceof Jl?r.createInstance(qf,e,void 0):e instanceof yk?e.item.rememberDefaultAction?r.createInstance(kN,e,t):r.createInstance(xN,e,t):void 0}var bB=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vB=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const CB=bt("IPeekViewService");iu(CB,class{constructor(){this._widgets=new Map}addExclusiveWidget(r,e){const t=this._widgets.get(r);t&&(t.listener.dispose(),t.widget.dispose());const i=()=>{const n=this._widgets.get(r);n&&n.widget===e&&(n.listener.dispose(),this._widgets.delete(r))};this._widgets.set(r,{widget:e,listener:e.onDidClose(i)})}});var br;(function(r){r.inPeekEditor=new Le("inReferenceSearchEditor",!0,m("inReferenceSearchEditor","Whether the current code editor is embedded inside peek")),r.notInPeekEditor=r.inPeekEditor.toNegated()})(br||(br={}));let u_=class{constructor(e,t){e instanceof Tu&&br.inPeekEditor.bindTo(t)}dispose(){}};u_.ID="editor.contrib.referenceController";u_=bB([vB(1,Fe)],u_);wt(u_.ID,u_);function Ele(r){let e=r.get(Ct).getFocusedCodeEditor();return e instanceof Tu?e.getParentEditor():e}const Ile={headerBackgroundColor:K.white,primaryHeadingColor:K.fromHex("#333333"),secondaryHeadingColor:K.fromHex("#6c6c6cb3")};let X0=class extends wle{constructor(e,t,i){super(e,t);this.instantiationService=i,this._onDidClose=new H,this.onDidClose=this._onDidClose.event,eo(this.options,Ile,!1)}dispose(){this.disposed||(this.disposed=!0,super.dispose(),this._onDidClose.fire(this))}style(e){let 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();let 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=oe(".head"),this._bodyElement=oe(".body"),this._fillHead(this._headElement),this._fillBody(this._bodyElement),e.appendChild(this._headElement),e.appendChild(this._bodyElement)}_fillHead(e,t){const i=oe(".peekview-title");this.options.supportOnTitleClick&&(i.classList.add("clickable"),ki(i,"click",o=>this._onTitleClick(o))),X(this._headElement,i),this._fillTitleIcon(i),this._primaryHeading=oe("span.filename"),this._secondaryHeading=oe("span.dirname"),this._metaHeading=oe("span.meta"),X(i,this._primaryHeading,this._secondaryHeading,this._metaHeading);const n=oe(".peekview-actions");X(this._headElement,n);const s=this._getActionBarOptions();this._actionbarWidget=new il(n,s),this._disposables.add(this._actionbarWidget),t||this._actionbarWidget.push(new Ns("peekview.close",m("label.close","Close"),ve.close.classNames,!0,()=>(this.dispose(),Promise.resolve())),{label:!1,icon:!0})}_fillTitleIcon(e){}_getActionBarOptions(){return{actionViewItemProvider:Dle.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:Ui(this._secondaryHeading))}setMetaTitle(e){this._metaHeading&&(e?(this._metaHeading.innerText=e,Ar(this._metaHeading)):Qn(this._metaHeading))}_doLayout(e,t){if(!this._isShowing&&e<0){this.dispose();return}const i=Math.ceil(this.editor.getOption(58)*1.2),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`)}};X0=bB([vB(2,ut)],X0);const Nle=V("peekViewTitle.background",{dark:Ht(co,.1),light:Ht(co,.1),hc:null},m("peekViewTitleBackground","Background color of the peek view title area.")),wB=V("peekViewTitleLabel.foreground",{dark:K.white,light:K.black,hc:K.white},m("peekViewTitleForeground","Color of the peek view title.")),yB=V("peekViewTitleDescription.foreground",{dark:"#ccccccb3",light:"#616161e6",hc:"#FFFFFF99"},m("peekViewTitleInfoForeground","Color of the peek view title info.")),Tle=V("peekView.border",{dark:co,light:co,hc:_i},m("peekViewBorder","Color of the peek view borders and arrow.")),SB=V("peekViewResult.background",{dark:"#252526",light:"#F3F3F3",hc:K.black},m("peekViewResultsBackground","Background color of the peek view result list.")),Ale=V("peekViewResult.lineForeground",{dark:"#bbbbbb",light:"#646465",hc:K.white},m("peekViewResultsMatchForeground","Foreground color for line nodes in the peek view result list.")),Rle=V("peekViewResult.fileForeground",{dark:K.white,light:"#1E1E1E",hc:K.white},m("peekViewResultsFileForeground","Foreground color for file nodes in the peek view result list.")),Mle=V("peekViewResult.selectionBackground",{dark:"#3399ff33",light:"#3399ff33",hc:null},m("peekViewResultsSelectionBackground","Background color of the selected entry in the peek view result list.")),Ple=V("peekViewResult.selectionForeground",{dark:K.white,light:"#6C6C6C",hc:K.white},m("peekViewResultsSelectionForeground","Foreground color of the selected entry in the peek view result list.")),Q0=V("peekViewEditor.background",{dark:"#001F33",light:"#F2F8FC",hc:K.black},m("peekViewEditorBackground","Background color of the peek view editor.")),Ole=V("peekViewEditorGutter.background",{dark:Q0,light:Q0,hc:Q0},m("peekViewEditorGutterBackground","Background color of the gutter in the peek view editor.")),Fle=V("peekViewResult.matchHighlightBackground",{dark:"#ea5c004d",light:"#ea5c004d",hc:null},m("peekViewResultsMatchHighlight","Match highlight color in the peek view result list.")),Ble=V("peekViewEditor.matchHighlightBackground",{dark:"#ff8f0099",light:"#f5d802de",hc:null},m("peekViewEditorMatchHighlight","Match highlight color in the peek view editor.")),Wle=V("peekViewEditor.matchHighlightBorder",{dark:null,light:null,hc:En},m("peekViewEditorMatchHighlightBorder","Match highlight border in the peek view editor."));var Vle=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Ic{constructor(e,t,i,n){this.isProviderFirst=e,this.parent=t,this.link=i,this._rangeCallback=n,this.id=d3.nextId()}get uri(){return this.link.uri}get range(){var e,t;return(t=(e=this._range)!==null&&e!==void 0?e:this.link.targetSelectionRange)!==null&&t!==void 0?t:this.link.range}set range(e){this._range=e,this._rangeCallback(this)}get ariaMessage(){var e;const t=(e=this.parent.getPreview(this))===null||e===void 0?void 0:e.preview(this.range);return t?m({key:"aria.oneReference.preview",comment:["Placeholders are: 0: filename, 1:line number, 2: column number, 3: preview snippet of source code"]},"symbol in {0} on line {1} at column {2}, {3}",ws(this.uri),this.range.startLineNumber,this.range.startColumn,t.value):m("aria.oneReference","symbol in {0} on line {1} at column {2}",ws(this.uri),this.range.startLineNumber,this.range.startColumn)}}class Hle{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:a}=e,l=i.getWordUntilPosition({lineNumber:n,column:s-t}),c=new k(n,l.startColumn,n,s),h=new k(o,a,o,1073741824),u=i.getValueInRange(c).replace(/^\s+/,""),d=i.getValueInRange(e),f=i.getValueInRange(h).replace(/\s+$/,"");return{value:u+d+f,highlight:{start:u.length,end:u.length+d.length}}}}class d_{constructor(e,t){this.parent=e,this.uri=t,this.children=[],this._previews=new Pn}dispose(){ht(this._previews.values()),this._previews.clear()}getPreview(e){return this._previews.get(e.uri)}get ariaMessage(){const e=this.children.length;return e===1?m("aria.fileReferences.1","1 symbol in {0}, full path {1}",ws(this.uri),this.uri.fsPath):m("aria.fileReferences.N","{0} symbols in {1}, full path {2}",e,ws(this.uri),this.uri.fsPath)}resolve(e){return Vle(this,void 0,void 0,function*(){if(this._previews.size!==0)return this;for(let t of this.children)if(!this._previews.has(t.uri))try{const i=yield e.createModelReference(t.uri);this._previews.set(t.uri,new Hle(i))}catch(i){Oe(i)}return this})}}class vr{constructor(e,t){this.groups=[],this.references=[],this._onDidChangeReferenceRange=new H,this.onDidChangeReferenceRange=this._onDidChangeReferenceRange.event,this._links=e,this._title=t;const[i]=e;e.sort(vr._compareReferences);let n;for(let s of e)if((!n||!Jn.isEqual(n.uri,s.uri,!0))&&(n=new d_(this,s.uri),this.groups.push(n)),n.children.length===0||vr._compareReferences(s,n.children[n.children.length-1])!==0){const o=new Ic(i===s,n,s,a=>this._onDidChangeReferenceRange.fire(a));this.references.push(o),n.children.push(o)}}dispose(){ht(this.groups),this._onDidChangeReferenceRange.dispose(),this.groups.length=0}clone(){return new vr(this._links,this._title)}get title(){return this._title}get isEmpty(){return this.groups.length===0}get ariaMessage(){return this.isEmpty?m("aria.result.0","No results found"):this.references.length===1?m("aria.result.1","Found 1 symbol in {0}",this.references[0].uri.fsPath):this.groups.length===1?m("aria.result.n1","Found {0} symbols in {1}",this.references.length,this.groups[0].uri.fsPath):m("aria.result.nm","Found {0} symbols in {1} files",this.references.length,this.groups.length)}nextOrPreviousReference(e,t){let{parent:i}=e,n=i.children.indexOf(e),s=i.children.length,o=i.parent.groups.length;return o===1||t&&n+1<s||!t&&n>0?(t?n=(n+1)%s:n=(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((n,s)=>({idx:s,prefixLen:Pd(n.uri.toString(),e.toString()),offsetDist:Math.abs(n.range.startLineNumber-t.lineNumber)*100+Math.abs(n.range.startColumn-t.column)})).sort((n,s)=>n.prefixLen>s.prefixLen?-1:n.prefixLen<s.prefixLen?1:n.offsetDist<s.offsetDist?-1:n.offsetDist>s.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()&&k.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 Jn.compare(e.uri,t.uri)||k.compareRangesUsingStarts(e.range,t.range)}}function LB(r){if(!r)return;typeof r=="string"&&(r=Ie.file(r));const e=ws(r)||(r.scheme===Ze.file?r.fsPath:r.path);return Xi&&dK(e)?DN(e):e}function DN(r){return m2(r)?r.charAt(0).toUpperCase()+r.slice(1):r}var J0=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let EN=class{constructor(e){this._resolverService=e}hasChildren(e){return e instanceof vr||e instanceof d_}getChildren(e){if(e instanceof vr)return e.groups;if(e instanceof d_)return e.resolve(this._resolverService).then(t=>t.children);throw new Error("bad tree")}};EN=J0([f_(0,so)],EN);class zle{getHeight(){return 23}getTemplateId(e){return e instanceof d_?g_.id:p_.id}}let IN=class{constructor(e){this._keybindingService=e}getKeyboardNavigationLabel(e){var t;if(e instanceof Ic){const i=(t=e.parent.getPreview(e))===null||t===void 0?void 0:t.preview(e.range);if(i)return i.value}return ws(e.uri)}};IN=J0([f_(0,Qt)],IN);class $le{getId(e){return e instanceof Ic?e.id:e.uri}}let NN=class extends Y{constructor(e,t,i){super();this._uriLabel=t;const n=document.createElement("div");n.classList.add("reference-file"),this.file=this._register(new PI(n,{supportHighlights:!0})),this.badge=new xI(X(n,oe(".count"))),this._register(mne(this.badge,i)),e.appendChild(n)}set(e,t){let i=tx(e.uri);this.file.setLabel(LB(e.uri),this._uriLabel.getUriLabel(i,{relative:!0}),{title:this._uriLabel.getUriLabel(e.uri),matches:t});const n=e.children.length;this.badge.setCount(n),n>1?this.badge.setTitleFormat(m("referencesCount","{0} references",n)):this.badge.setTitleFormat(m("referenceCount","{0} reference",n))}};NN=J0([f_(1,zm),f_(2,qt)],NN);let g_=class xB{constructor(e){this._instantiationService=e,this.templateId=xB.id}renderTemplate(e){return this._instantiationService.createInstance(NN,e)}renderElement(e,t,i){i.set(e.element,Zw(e.filterData))}disposeTemplate(e){e.dispose()}};g_.id="FileReferencesRenderer";g_=J0([f_(0,ut)],g_);class Ule{constructor(e){this.label=new xc(e,!1)}set(e,t){var i;const n=(i=e.parent.getPreview(e))===null||i===void 0?void 0:i.preview(e.range);if(!n||!n.value)this.label.set(`${ws(e.uri)}:${e.range.startLineNumber+1}:${e.range.startColumn+1}`);else{const{value:s,highlight:o}=n;t&&!uo.isDefault(t)?(this.label.element.classList.toggle("referenceMatch",!1),this.label.set(s,Zw(t))):(this.label.element.classList.toggle("referenceMatch",!0),this.label.set(s,[o]))}}}class p_{constructor(){this.templateId=p_.id}renderTemplate(e){return new Ule(e)}renderElement(e,t,i){i.set(e.element,e.filterData)}disposeTemplate(){}}p_.id="OneReferenceRenderer";class jle{getWidgetAriaLabel(){return m("treeAriaLabel","References")}getAriaLabel(e){return e.ariaMessage}}var Kle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Au=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},kB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class ey{constructor(e,t){this._editor=e,this._model=t,this._decorations=new Map,this._decorationIgnoreSet=new Set,this._callOnDispose=new le,this._callOnModelChange=new le,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(let t of this._model.references)if(t.uri.toString()===e.uri.toString()){this._addDecorations(t.parent);return}}}_addDecorations(e){if(!this._editor.hasModel())return;this._callOnModelChange.add(this._editor.getModel().onDidChangeDecorations(()=>this._onDecorationChanged()));const t=[],i=[];for(let s=0,o=e.children.length;s<o;s++){let a=e.children[s];this._decorationIgnoreSet.has(a.id)||a.uri.toString()===this._editor.getModel().uri.toString()&&(t.push({range:a.range,options:ey.DecorationOptions}),i.push(s))}const n=this._editor.deltaDecorations([],t);for(let s=0;s<n.length;s++)this._decorations.set(n[s],e.children[i[s]])}_onDecorationChanged(){const e=[],t=this._editor.getModel();if(!!t){for(let[i,n]of this._decorations){const s=t.getDecorationRange(i);if(!s)continue;let o=!1;if(!k.equalsRange(s,n.range)){if(k.spansMultipleLines(s))o=!0;else{const a=n.range.endColumn-n.range.startColumn,l=s.endColumn-s.startColumn;a!==l&&(o=!0)}o?(this._decorationIgnoreSet.add(n.id),e.push(i)):n.range=s}}for(let i=0,n=e.length;i<n;i++)this._decorations.delete(e[i]);this._editor.deltaDecorations(e,[])}}removeDecorations(){this._editor.deltaDecorations([...this._decorations.keys()],[]),this._decorations.clear()}}ey.DecorationOptions=Ke.register({description:"reference-decoration",stickiness:1,className:"reference-decoration"});class qle{constructor(){this.ratio=.7,this.heightInLines=18}static fromJSON(e){let t,i;try{const n=JSON.parse(e);t=n.ratio,i=n.heightInLines}catch{}return{ratio:t||.7,heightInLines:i||18}}}class Gle extends vI{}let TN=class extends X0{constructor(e,t,i,n,s,o,a,l,c,h){super(e,{showFrame:!1,showArrow:!0,isResizeable:!0,isAccessible:!0,supportOnTitleClick:!0},o);this._defaultTreeKeyboardSupport=t,this.layoutData=i,this._textModelResolverService=s,this._instantiationService=o,this._peekViewService=a,this._uriLabel=l,this._undoRedoService=c,this._keybindingService=h,this._disposeOnNewModel=new le,this._callOnDispose=new le,this._onDidSelectReference=new H,this.onDidSelectReference=this._onDidSelectReference.event,this._dim=new Wt(0,0),this._applyTheme(n.getColorTheme()),this._callOnDispose.add(n.onDidColorThemeChange(this._applyTheme.bind(this))),this._peekViewService.addExclusiveWidget(e,this),this.create()}dispose(){this.setModel(void 0),this._callOnDispose.dispose(),this._disposeOnNewModel.dispose(),ht(this._preview),ht(this._previewNotAvailableMessage),ht(this._tree),ht(this._previewModelReference),this._splitView.dispose(),super.dispose()}_applyTheme(e){const t=e.getColor(Tle)||K.transparent;this.style({arrowColor:t,frameColor:t,headerBackgroundColor:e.getColor(Nle)||K.transparent,primaryHeadingColor:e.getColor(wB),secondaryHeadingColor:e.getColor(yB)})}show(e){this.editor.revealRangeInCenterIfOutsideViewport(e,0),super.show(e,this.layoutData.heightInLines||18)}focusOnReferenceTree(){this._tree.domFocus()}focusOnPreviewEditor(){this._preview.focus()}isPreviewEditorFocused(){return this._preview.hasTextFocus()}_onTitleClick(e){this._preview&&this._preview.getModel()&&this._onDidSelectReference.fire({element:this._getFocusedReference(),kind:e.ctrlKey||e.metaKey||e.altKey?"side":"open",source:"title"})}_fillBody(e){this.setCssClass("reference-zone-widget"),this._messageContainer=X(e,oe("div.messages")),Qn(this._messageContainer),this._splitView=new E5(e,{orientation:1}),this._previewContainer=X(e,oe("div.preview.inline"));let t={scrollBeyondLastLine:!1,scrollbar:{verticalScrollbarSize:14,horizontal:"auto",useShadows:!0,verticalHasArrows:!1,horizontalHasArrows:!1,alwaysConsumeMouseWheel:!1},overviewRulerLanes:2,fixedOverflowWidgets:!0,minimap:{enabled:!1}};this._preview=this._instantiationService.createInstance(Tu,this._previewContainer,t,this.editor),Qn(this._previewContainer),this._previewNotAvailableMessage=new Ti(m("missingPreviewMessage","no preview available"),Ti.DEFAULT_CREATION_OPTIONS,null,null,this._undoRedoService),this._treeContainer=X(e,oe("div.ref-tree.inline"));const i={keyboardSupport:this._defaultTreeKeyboardSupport,accessibilityProvider:new jle,keyboardNavigationLabelProvider:this._instantiationService.createInstance(IN),identityProvider:new $le,openOnSingleClick:!0,selectionNavigation:!0,overrideStyles:{listBackground:SB}};this._defaultTreeKeyboardSupport&&this._callOnDispose.add(ki(this._treeContainer,"keydown",s=>{s.equals(9)&&(this._keybindingService.dispatchEvent(s,s.target),s.stopPropagation())},!0)),this._tree=this._instantiationService.createInstance(Gle,"ReferencesWidget",this._treeContainer,new zle,[this._instantiationService.createInstance(g_),this._instantiationService.createInstance(p_)],this._instantiationService.createInstance(EN),i),this._splitView.addView({onDidChange:ke.None,element:this._previewContainer,minimumSize:200,maximumSize:Number.MAX_VALUE,layout:s=>{this._preview.layout({height:this._dim.height,width:s})}},o0.Distribute),this._splitView.addView({onDidChange:ke.None,element:this._treeContainer,minimumSize:100,maximumSize:Number.MAX_VALUE,layout:s=>{this._treeContainer.style.height=`${this._dim.height}px`,this._treeContainer.style.width=`${s}px`,this._tree.layout(this._dim.height,s)}},o0.Distribute),this._disposables.add(this._splitView.onDidSashChange(()=>{this._dim.width&&(this.layoutData.ratio=this._splitView.getViewSize(0)/this._dim.width)},void 0));let n=(s,o)=>{s instanceof Ic&&(o==="show"&&this._revealReference(s,!1),this._onDidSelectReference.fire({element:s,kind:o,source:"tree"}))};this._tree.onDidOpen(s=>{s.sideBySide?n(s.element,"side"):s.editorOptions.pinned?n(s.element,"goto"):n(s.element,"show")}),Qn(this._treeContainer)}_onWidth(e){this._dim&&this._doLayoutBody(this._dim.height,e)}_doLayoutBody(e,t){super._doLayoutBody(e,t),this._dim=new Wt(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=m("noResults","No results"),Ar(this._messageContainer),Promise.resolve(void 0)):(Qn(this._messageContainer),this._decorationsManager=new ey(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(t.detail!==2)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"),Ar(this._treeContainer),Ar(this._previewContainer),this._splitView.layout(this._dim.width),this.focusOnReferenceTree(),this._tree.setInput(this._model.groups.length===1?this._model.groups[0]:this._model)):Promise.resolve(void 0)}_getFocusedReference(){const[e]=this._tree.getFocus();if(e instanceof Ic)return e;if(e instanceof d_&&e.children.length>0)return e.children[0]}revealReference(e){return kB(this,void 0,void 0,function*(){yield this._revealReference(e,!1),this._onDidSelectReference.fire({element:e,kind:"goto",source:"tree"})})}_revealReference(e,t){return kB(this,void 0,void 0,function*(){if(this._revealedReference===e)return;this._revealedReference=e,e.uri.scheme!==Ze.inMemory?this.setTitle(b2(e.uri),this._uriLabel.getUriLabel(tx(e.uri))):this.setTitle(m("peekView.alternateTitle","References"));const i=this._textModelResolverService.createModelReference(e.uri);this._tree.getInput()===e.parent?this._tree.reveal(e):(t&&this._tree.reveal(e.parent),yield this._tree.expand(e.parent),this._tree.reveal(e));const n=yield i;if(!this._model){n.dispose();return}ht(this._previewModelReference);const s=n.object;if(s){const o=this._preview.getModel()===s.textEditorModel?0:1,a=k.lift(e.range).collapseToStart();this._previewModelReference=n,this._preview.setModel(s.textEditorModel),this._preview.setSelection(a),this._preview.revealRangeInCenter(a,o)}else this._preview.setModel(this._previewNotAvailableMessage),n.dispose()})}};TN=Kle([Au(3,qt),Au(4,so),Au(5,ut),Au(6,CB),Au(7,zm),Au(8,Hw),Au(9,Qt)],TN);Lt((r,e)=>{const t=r.getColor(Fle);t&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { background-color: ${t}; }`);const i=r.getColor(Ble);i&&e.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { background-color: ${i}; }`);const n=r.getColor(Wle);n&&e.addRule(`.monaco-editor .reference-zone-widget .preview .reference-decoration { border: 2px solid ${n}; box-sizing: border-box; }`);const s=r.getColor(En);s&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .referenceMatch .highlight { border: 1px dotted ${s}; box-sizing: border-box; }`);const o=r.getColor(SB);o&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree { background-color: ${o}; }`);const a=r.getColor(Ale);a&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree { color: ${a}; }`);const l=r.getColor(Rle);l&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .reference-file { color: ${l}; }`);const c=r.getColor(Mle);c&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { background-color: ${c}; }`);const h=r.getColor(Ple);h&&e.addRule(`.monaco-editor .reference-zone-widget .ref-tree .monaco-list:focus .monaco-list-rows > .monaco-list-row.selected:not(.highlighted) { color: ${h} !important; }`);const u=r.getColor(Q0);u&&e.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .monaco-editor-background,.monaco-editor .reference-zone-widget .preview .monaco-editor .inputarea.ime-input { background-color: ${u};}`);const d=r.getColor(Ole);d&&e.addRule(`.monaco-editor .reference-zone-widget .preview .monaco-editor .margin { background-color: ${d};}`)});var Zle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Gf=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},DB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Ru=new Le("referenceSearchVisible",!1,m("referenceSearchVisible","Whether reference peek is visible, like 'Peek References' or 'Peek Definition'"));let Nc=class AN{constructor(e,t,i,n,s,o,a,l){this._defaultTreeKeyboardSupport=e,this._editor=t,this._editorService=n,this._notificationService=s,this._instantiationService=o,this._storageService=a,this._configurationService=l,this._disposables=new le,this._requestIdPool=0,this._ignoreModelChangeEvent=!1,this._referenceSearchVisible=Ru.bindTo(i)}static get(e){return e.getContribution(AN.ID)}dispose(){var e,t;this._referenceSearchVisible.reset(),this._disposables.dispose(),(e=this._widget)===null||e===void 0||e.dispose(),(t=this._model)===null||t===void 0||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=qle.fromJSON(this._storageService.get(s,0,"{}"));this._widget=this._instantiationService.createInstance(TN,this._editor,this._defaultTreeKeyboardSupport,o),this._widget.setTitle(m("labelLoading","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(l=>{let{element:c,kind:h}=l;if(!!c)switch(h){case"open":(l.source!=="editor"||!this._configurationService.getValue("editor.stablePeek"))&&this.openReference(c,!1,!1);break;case"side":this.openReference(c,!0,!1);break;case"goto":i?this._gotoReference(c):this.openReference(c,!1,!0);break}}));const a=++this._requestIdPool;t.then(l=>{var c;if(a!==this._requestIdPool||!this._widget){l.dispose();return}return(c=this._model)===null||c===void 0||c.dispose(),this._model=l,this._widget.setModel(this._model).then(()=>{if(this._widget&&this._model&&this._editor.hasModel()){this._model.isEmpty?this._widget.setMetaTitle(""):this._widget.setMetaTitle(m("metaTitle.N","{0} ({1})",this._model.title,this._model.references.length));let h=this._editor.getModel().uri,u=new $(e.startLineNumber,e.startColumn),d=this._model.nearestReference(h,u);if(d)return this._widget.setSelection(d).then(()=>{this._widget&&this._editor.getOption(76)==="editor"&&this._widget.focusOnPreviewEditor()})}})},l=>{this._notificationService.error(l)})}changeFocusBetweenPreviewAndReferences(){!this._widget||(this._widget.isPreviewEditorFocused()?this._widget.focusOnReferenceTree():this._widget.focusOnPreviewEditor())}goToNextOrPreviousReference(e){return DB(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),s?this._editor.focus():this._widget&&o&&this._widget.focusOnPreviewEditor()})}revealReference(e){return DB(this,void 0,void 0,function*(){!this._editor.hasModel()||!this._model||!this._widget||(yield this._widget.revealReference(e))})}closeWidget(e=!0){var t,i;(t=this._widget)===null||t===void 0||t.dispose(),(i=this._model)===null||i===void 0||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){this._widget&&this._widget.hide(),this._ignoreModelChangeEvent=!0;const t=k.lift(e.range).collapseToStart();return this._editorService.openCodeEditor({resource:e.uri,options:{selection:t}},this._editor).then(i=>{var n;if(this._ignoreModelChangeEvent=!1,!i||!this._widget){this.closeWidget();return}if(this._editor===i)this._widget.show(t),this._widget.focusOnReferenceTree();else{const s=AN.get(i),o=this._model.clone();this.closeWidget(),i.focus(),s.toggleWidget(t,Oi(a=>Promise.resolve(o)),(n=this._peekMode)!==null&&n!==void 0?n:!1)}},i=>{this._ignoreModelChangeEvent=!1,Oe(i)})}openReference(e,t,i){t||this.closeWidget();const{uri:n,range:s}=e;this._editorService.openCodeEditor({resource:n,options:{selection:s,pinned:i}},this._editor,t)}};Nc.ID="editor.contrib.referencesController";Nc=Zle([Gf(2,Fe),Gf(3,Ct),Gf(4,Di),Gf(5,ut),Gf(6,aa),Gf(7,hi)],Nc);function Mu(r,e){const t=Ele(r);if(!t)return;let i=Nc.get(t);i&&e(i)}Bn.registerCommandAndKeybindingRule({id:"togglePeekWidgetFocus",weight:100,primary:Mi(2048|41,60),when:_e.or(Ru,br.inPeekEditor),handler(r){Mu(r,e=>{e.changeFocusBetweenPreviewAndReferences()})}});Bn.registerCommandAndKeybindingRule({id:"goToNextReference",weight:100-10,primary:62,secondary:[70],when:_e.or(Ru,br.inPeekEditor),handler(r){Mu(r,e=>{e.goToNextOrPreviousReference(!0)})}});Bn.registerCommandAndKeybindingRule({id:"goToPreviousReference",weight:100-10,primary:1024|62,secondary:[1024|70],when:_e.or(Ru,br.inPeekEditor),handler(r){Mu(r,e=>{e.goToNextOrPreviousReference(!1)})}});lt.registerCommandAlias("goToNextReferenceFromEmbeddedEditor","goToNextReference");lt.registerCommandAlias("goToPreviousReferenceFromEmbeddedEditor","goToPreviousReference");lt.registerCommandAlias("closeReferenceSearchEditor","closeReferenceSearch");lt.registerCommand("closeReferenceSearch",r=>Mu(r,e=>e.closeWidget()));Bn.registerKeybindingRule({id:"closeReferenceSearch",weight:100-101,primary:9,secondary:[1024|9],when:_e.and(br.inPeekEditor,_e.not("config.editor.stablePeek"))});Bn.registerKeybindingRule({id:"closeReferenceSearch",weight:200+50,primary:9,secondary:[1024|9],when:_e.and(Ru,_e.not("config.editor.stablePeek"))});Bn.registerCommandAndKeybindingRule({id:"revealReference",weight:200,primary:3,mac:{primary:3,secondary:[2048|18]},when:_e.and(Ru,$5),handler(r){var e;const i=(e=r.get(us).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Mu(r,n=>n.revealReference(i[0]))}});Bn.registerCommandAndKeybindingRule({id:"openReferenceToSide",weight:100,primary:2048|3,mac:{primary:256|3},when:_e.and(Ru,$5),handler(r){var e;const i=(e=r.get(us).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Mu(r,n=>n.openReference(i[0],!0,!0))}});lt.registerCommand("openReference",r=>{var e;const i=(e=r.get(us).lastFocusedList)===null||e===void 0?void 0:e.getFocus();Array.isArray(i)&&i[0]instanceof Ic&&Mu(r,n=>n.openReference(i[0],!1,!0))});var EB=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},m_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const RN=new Le("hasSymbols",!1,m("hasSymbols","Whether there are symbol locations that can be navigated via keyboard-only.")),ty=bt("ISymbolNavigationService");let MN=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=RN.bindTo(e)}reset(){var e,t;this._ctxHasSymbols.reset(),(e=this._currentState)===null||e===void 0||e.dispose(),(t=this._currentMessage)===null||t===void 0||t.dispose(),this._currentModel=void 0,this._currentIdx=-1}put(e){const t=e.parent.parent;if(t.references.length<=1){this.reset();return}this._currentModel=t,this._currentIdx=t.references.indexOf(e),this._ctxHasSymbols.set(!0),this._showMessage();const i=new PN(this._editorService),n=i.onDidChange(s=>{if(this._ignoreEditorChange)return;const o=this._editorService.getActiveCodeEditor();if(!o)return;const a=o.getModel(),l=o.getPosition();if(!a||!l)return;let c=!1,h=!1;for(const u of t.references)if(_2(u.uri,a.uri))c=!0,h=h||k.containsPosition(u.range,l);else if(c)break;(!c||!h)&&this.reset()});this._currentState=Fl(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:k.collapseToStart(t.range),selectionRevealType:3}},e).finally(()=>{this._ignoreEditorChange=!1})}_showMessage(){var e;(e=this._currentMessage)===null||e===void 0||e.dispose();const t=this._keybindingService.lookupKeybinding("editor.gotoNextSymbolFromResult"),i=t?m("location.kb","Symbol {0} of {1}, {2} for next",this._currentIdx+1,this._currentModel.references.length,t.getLabel()):m("location","Symbol {0} of {1}",this._currentIdx+1,this._currentModel.references.length);this._currentMessage=this._notificationService.status(i)}};MN=EB([m_(0,Fe),m_(1,Ct),m_(2,Di),m_(3,Qt)],MN);iu(ty,MN,!0);fe(new class extends en{constructor(){super({id:"editor.gotoNextSymbolFromResult",precondition:RN,kbOpts:{weight:100,primary:70}})}runEditorCommand(r,e){return r.get(ty).revealNext(e)}});Bn.registerCommandAndKeybindingRule({id:"editor.gotoNextSymbolFromResult.cancel",weight:100,when:RN,primary:9,handler(r){r.get(ty).reset()}});let PN=class{constructor(e){this._listener=new Map,this._disposables=new le,this._onDidChange=new H,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(),ht(this._listener.values())}_onDidAddEditor(e){this._listener.set(e,Fl(e.onDidChangeCursorPosition(t=>this._onDidChange.fire({editor:e})),e.onDidChangeModelContent(t=>this._onDidChange.fire({editor:e}))))}_onDidRemoveEditor(e){var t;(t=this._listener.get(e))===null||t===void 0||t.dispose(),this._listener.delete(e)}};PN=EB([m_(0,Ct)],PN);var IB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function __(r,e,t,i){const s=t.ordered(r).map(o=>Promise.resolve(i(o,r,e)).then(void 0,a=>{$i(a)}));return Promise.all(s).then(o=>{const a=[];for(let l of o)Array.isArray(l)?a.push(...l):l&&a.push(l);return a})}function ON(r,e,t){return __(r,e,wp,(i,n,s)=>i.provideDefinition(n,s,t))}function NB(r,e,t){return __(r,e,Av,(i,n,s)=>i.provideDeclaration(n,s,t))}function TB(r,e,t){return __(r,e,Rv,(i,n,s)=>i.provideImplementation(n,s,t))}function AB(r,e,t){return __(r,e,Mv,(i,n,s)=>i.provideTypeDefinition(n,s,t))}function iy(r,e,t,i){return __(r,e,Iv,(n,s,o)=>IB(this,void 0,void 0,function*(){const a=yield n.provideReferences(s,o,{includeDeclaration:!0},i);if(!t||!a||a.length!==2)return a;const l=yield n.provideReferences(s,o,{includeDeclaration:!1},i);return l&&l.length===1?l:a}))}function b_(r){return IB(this,void 0,void 0,function*(){const e=yield r(),t=new vr(e,""),i=t.references.map(n=>n.link);return t.dispose(),i})}Go("_executeDefinitionProvider",(r,e)=>b_(()=>ON(r,e,et.None)));Go("_executeDeclarationProvider",(r,e)=>b_(()=>NB(r,e,et.None)));Go("_executeImplementationProvider",(r,e)=>b_(()=>TB(r,e,et.None)));Go("_executeTypeDefinitionProvider",(r,e)=>b_(()=>AB(r,e,et.None)));Go("_executeReferenceProvider",(r,e)=>b_(()=>iy(r,e,!1,et.None)));var Os=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},FN,BN,WN,VN,HN,zN,$N,UN;ns.appendMenuItem(xe.EditorContext,{submenu:xe.EditorContextPeek,title:m("peek.submenu","Peek"),group:"navigation",order:100});const RB=new Set;function bo(r){const e=new r;return lO(e),RB.add(e.id),e}class Zf extends Se{constructor(e,t){super(t);this._configuration=e}run(e,t){if(!t.hasModel())return Promise.resolve(void 0);const i=e.get(Di),n=e.get(Ct),s=e.get(rl),o=e.get(ty),a=t.getModel(),l=t.getPosition(),c=new Nm(t,1|4),h=IL(this._getLocationModel(a,l,c.token),c.token).then(u=>Os(this,void 0,void 0,function*(){if(!u||c.token.isCancellationRequested)return;Ji(u.ariaMessage);let d;if(u.referenceAt(a.uri,l)){const g=this._getAlternativeCommand(t);g!==this.id&&RB.has(g)&&(d=t.getAction(g))}const f=u.references.length;if(f===0){if(!this._configuration.muteMessage){const g=a.getWordAtPosition(l);zr.get(t).showMessage(this._getNoResultFoundMessage(g),l)}}else if(f===1&&d)d.run();else return this._onResult(n,o,t,u)}),u=>{i.error(u)}).finally(()=>{c.dispose()});return s.showWhile(h,250),h}_onResult(e,t,i,n){return Os(this,void 0,void 0,function*(){const s=this._getGoToPreference(i);if(!(i instanceof Tu)&&(this._configuration.openInPeek||s==="peek"&&n.references.length>1))this._openInPeek(i,n);else{const o=n.firstReference(),a=n.references.length>1&&s==="gotoAndPeek",l=yield this._openReference(i,e,o,this._configuration.openToSide,!a);a&&l?this._openInPeek(l,n):n.dispose(),s==="goto"&&t.put(o)}})}_openReference(e,t,i,n,s){return Os(this,void 0,void 0,function*(){let o;if(iq(i)&&(o=i.targetSelectionRange),o||(o=i.range),!o)return;const a=yield t.openCodeEditor({resource:i.uri,options:{selection:k.collapseToStart(o),selectionRevealType:3}},e,n);if(!!a){if(s){const l=a.getModel(),c=a.deltaDecorations([],[{range:o,options:{description:"symbol-navigate-action-highlight",className:"symbolHighlight"}}]);setTimeout(()=>{a.getModel()===l&&a.deltaDecorations(c,[])},350)}return a}})}_openInPeek(e,t){let i=Nc.get(e);i&&e.hasModel()?i.toggleWidget(e.getSelection(),Oi(n=>Promise.resolve(t)),this._configuration.openInPeek):t.dispose()}}class ny extends Zf{_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield ON(e,t,i),m("def.title","Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?m("noResultWord","No definition found for '{0}'",e.word):m("generic.noResults","No definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleDefinitions}}const MB=Sd&&!WM?2048|70:70;bo((FN=class jN extends ny{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:jN.id,label:m("actions.goToDecl.label","Go to Definition"),alias:"Go to Definition",precondition:_e.and(R.hasDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:MB,weight:100},contextMenuOpts:{group:"navigation",order:1.1}});lt.registerCommandAlias("editor.action.goToDeclaration",jN.id)}},FN.id="editor.action.revealDefinition",FN));bo((BN=class KN extends ny{constructor(){super({openToSide:!0,openInPeek:!1,muteMessage:!1},{id:KN.id,label:m("actions.goToDeclToSide.label","Open Definition to the Side"),alias:"Open Definition to the Side",precondition:_e.and(R.hasDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,MB),weight:100}});lt.registerCommandAlias("editor.action.openDeclarationToTheSide",KN.id)}},BN.id="editor.action.revealDefinitionAside",BN));bo((WN=class qN extends ny{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:qN.id,label:m("actions.previewDecl.label","Peek Definition"),alias:"Peek Definition",precondition:_e.and(R.hasDefinitionProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:512|70,linux:{primary:2048|1024|68},weight:100},contextMenuOpts:{menuId:xe.EditorContextPeek,group:"peek",order:2}});lt.registerCommandAlias("editor.action.previewDeclaration",qN.id)}},WN.id="editor.action.peekDefinition",WN));class PB extends Zf{_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield NB(e,t,i),m("decl.title","Declarations"))})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}_getAlternativeCommand(e){return e.getOption(50).alternativeDeclarationCommand}_getGoToPreference(e){return e.getOption(50).multipleDeclarations}}bo((VN=class OB extends PB{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:OB.id,label:m("actions.goToDeclaration.label","Go to Declaration"),alias:"Go to Declaration",precondition:_e.and(R.hasDeclarationProvider,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{group:"navigation",order:1.3}})}_getNoResultFoundMessage(e){return e&&e.word?m("decl.noResultWord","No declaration found for '{0}'",e.word):m("decl.generic.noResults","No declaration found")}},VN.id="editor.action.revealDeclaration",VN));bo(class extends PB{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.peekDeclaration",label:m("actions.peekDecl.label","Peek Declaration"),alias:"Peek Declaration",precondition:_e.and(R.hasDeclarationProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.EditorContextPeek,group:"peek",order:3}})}});class FB extends Zf{_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield AB(e,t,i),m("typedef.title","Type Definitions"))})}_getNoResultFoundMessage(e){return e&&e.word?m("goToTypeDefinition.noResultWord","No type definition found for '{0}'",e.word):m("goToTypeDefinition.generic.noResults","No type definition found")}_getAlternativeCommand(e){return e.getOption(50).alternativeTypeDefinitionCommand}_getGoToPreference(e){return e.getOption(50).multipleTypeDefinitions}}bo((HN=class BB extends FB{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:BB.ID,label:m("actions.goToTypeDefinition.label","Go to Type Definition"),alias:"Go to Type Definition",precondition:_e.and(R.hasTypeDefinitionProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:0,weight:100},contextMenuOpts:{group:"navigation",order:1.4}})}},HN.ID="editor.action.goToTypeDefinition",HN));bo((zN=class WB extends FB{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:WB.ID,label:m("actions.peekTypeDefinition.label","Peek Type Definition"),alias:"Peek Type Definition",precondition:_e.and(R.hasTypeDefinitionProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.EditorContextPeek,group:"peek",order:4}})}},zN.ID="editor.action.peekTypeDefinition",zN));class VB extends Zf{_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield TB(e,t,i),m("impl.title","Implementations"))})}_getNoResultFoundMessage(e){return e&&e.word?m("goToImplementation.noResultWord","No implementation found for '{0}'",e.word):m("goToImplementation.generic.noResults","No implementation found")}_getAlternativeCommand(e){return e.getOption(50).alternativeImplementationCommand}_getGoToPreference(e){return e.getOption(50).multipleImplementations}}bo(($N=class HB extends VB{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:HB.ID,label:m("actions.goToImplementation.label","Go to Implementations"),alias:"Go to Implementations",precondition:_e.and(R.hasImplementationProvider,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}},$N.ID="editor.action.goToImplementation",$N));bo((UN=class zB extends VB{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:zB.ID,label:m("actions.peekImplementation.label","Peek Implementations"),alias:"Peek Implementations",precondition:_e.and(R.hasImplementationProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|70,weight:100},contextMenuOpts:{menuId:xe.EditorContextPeek,group:"peek",order:5}})}},UN.ID="editor.action.peekImplementation",UN));class $B extends Zf{_getNoResultFoundMessage(e){return e?m("references.no","No references found for '{0}'",e.word):m("references.noGeneric","No references found")}_getAlternativeCommand(e){return e.getOption(50).alternativeReferenceCommand}_getGoToPreference(e){return e.getOption(50).multipleReferences}}bo(class extends $B{constructor(){super({openToSide:!1,openInPeek:!1,muteMessage:!1},{id:"editor.action.goToReferences",label:m("goToReferences.label","Go to References"),alias:"Go to References",precondition:_e.and(R.hasReferenceProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),kbOpts:{kbExpr:R.editorTextFocus,primary:1024|70,weight:100},contextMenuOpts:{group:"navigation",order:1.45}})}_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield iy(e,t,!0,i),m("ref.title","References"))})}});bo(class extends $B{constructor(){super({openToSide:!1,openInPeek:!0,muteMessage:!1},{id:"editor.action.referenceSearch.trigger",label:m("references.action.label","Peek References"),alias:"Peek References",precondition:_e.and(R.hasReferenceProvider,br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated()),contextMenuOpts:{menuId:xe.EditorContextPeek,group:"peek",order:6}})}_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(yield iy(e,t,!1,i),m("ref.title","References"))})}});class Yle extends Zf{constructor(e,t,i){super(e,{id:"editor.action.goToLocation",label:m("label.generic","Go To Any Symbol"),alias:"Go To Any Symbol",precondition:_e.and(br.notInPeekEditor,R.isInWalkThroughSnippet.toNegated())});this._references=t,this._gotoMultipleBehaviour=i}_getLocationModel(e,t,i){return Os(this,void 0,void 0,function*(){return new vr(this._references,m("generic.title","Locations"))})}_getNoResultFoundMessage(e){return e&&m("generic.noResult","No results for '{0}'",e.word)||""}_getGoToPreference(e){var t;return(t=this._gotoMultipleBehaviour)!==null&&t!==void 0?t:e.getOption(50).multipleReferences}_getAlternativeCommand(){return""}}lt.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:Ie},{name:"position",description:"The position at which to start",constraint:$.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:(r,e,t,i,n,s,o)=>Os(void 0,void 0,void 0,function*(){Nt(Ie.isUri(e)),Nt($.isIPosition(t)),Nt(Array.isArray(i)),Nt(typeof n=="undefined"||typeof n=="string"),Nt(typeof o=="undefined"||typeof o=="boolean");const a=r.get(Ct),l=yield a.openCodeEditor({resource:e},a.getFocusedCodeEditor());if(qo(l))return l.setPosition(t),l.revealPositionInCenterIfOutsideViewport(t,0),l.invokeWithinContext(c=>{const h=new class extends Yle{_getNoResultFoundMessage(u){return s||super._getNoResultFoundMessage(u)}}({muteMessage:!Boolean(s),openInPeek:Boolean(o),openToSide:!1},i,n);c.get(ut).invokeFunction(h.run.bind(h),l)})})});lt.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:Ie},{name:"position",description:"The position at which to start",constraint:$.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:(r,e,t,i,n)=>Os(void 0,void 0,void 0,function*(){r.get(fi).executeCommand("editor.action.goToLocations",e,t,i,n,void 0,!0)})});lt.registerCommand({id:"editor.action.findReferences",handler:(r,e,t)=>{Nt(Ie.isUri(e)),Nt($.isIPosition(t));const i=r.get(Ct);return i.openCodeEditor({resource:e},i.getFocusedCodeEditor()).then(n=>{if(!qo(n)||!n.hasModel())return;const s=Nc.get(n);if(!s)return;const o=Oi(l=>iy(n.getModel(),$.lift(t),!1,l).then(c=>new vr(c,m("ref.title","References")))),a=new k(t.lineNumber,t.column,t.lineNumber,t.column);return Promise.resolve(s.toggleWidget(a,o,!1))})}});lt.registerCommandAlias("editor.action.showReferences","editor.action.peekLocations");ns.appendMenuItems([{id:xe.MenubarGoMenu,item:{command:{id:"editor.action.revealDefinition",title:m({key:"miGotoDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Definition")},group:"4_symbol_nav",order:2}},{id:xe.MenubarGoMenu,item:{command:{id:"editor.action.revealDeclaration",title:m({key:"miGotoDeclaration",comment:["&& denotes a mnemonic"]},"Go to &&Declaration")},group:"4_symbol_nav",order:3}},{id:xe.MenubarGoMenu,item:{command:{id:"editor.action.goToTypeDefinition",title:m({key:"miGotoTypeDefinition",comment:["&& denotes a mnemonic"]},"Go to &&Type Definition")},group:"4_symbol_nav",order:3}},{id:xe.MenubarGoMenu,item:{command:{id:"editor.action.goToImplementation",title:m({key:"miGotoImplementation",comment:["&& denotes a mnemonic"]},"Go to &&Implementations")},group:"4_symbol_nav",order:4}},{id:xe.MenubarGoMenu,item:{command:{id:"editor.action.goToReferences",title:m({key:"miGotoReference",comment:["&& denotes a mnemonic"]},"Go to &&References")},group:"4_symbol_nav",order:5}}]);var Xle=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},UB=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Pu=class v_{constructor(e,t,i){this.textModelResolverService=t,this.modeService=i,this.toUnhook=new le,this.toUnhookForKeyboard=new le,this.linkDecorations=[],this.currentWordAtPosition=null,this.previousPromise=null,this.editor=e;let n=new gB(e);this.toUnhook.add(n),this.toUnhook.add(n.onMouseMoveOrRelevantKeyDown(([s,o])=>{this.startFindDefinitionFromMouse(s,Rr(o))})),this.toUnhook.add(n.onExecute(s=>{this.isEnabled(s)&&this.gotoDefinition(s.target.position,s.hasSideBySideModifier).then(()=>{this.removeLinkDecorations()},o=>{this.removeLinkDecorations(),Oe(o)})})),this.toUnhook.add(n.onCancel(()=>{this.removeLinkDecorations(),this.currentWordAtPosition=null}))}static get(e){return e.getContribution(v_.ID)}startFindDefinitionFromCursor(e){return this.startFindDefinition(e).then(()=>{this.toUnhookForKeyboard.add(this.editor.onDidChangeCursorPosition(()=>{this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear()})),this.toUnhookForKeyboard.add(this.editor.onKeyDown(t=>{t&&(this.currentWordAtPosition=null,this.removeLinkDecorations(),this.toUnhookForKeyboard.clear())}))})}startFindDefinitionFromMouse(e,t){if(e.target.type===9&&this.linkDecorations.length>0)return;if(!this.editor.hasModel()||!this.isEnabled(e,t)){this.currentWordAtPosition=null,this.removeLinkDecorations();return}const i=e.target.position;this.startFindDefinition(i)}startFindDefinition(e){var t;this.toUnhookForKeyboard.clear();const i=e?(t=this.editor.getModel())===null||t===void 0?void 0:t.getWordAtPosition(e):null;if(!i)return this.currentWordAtPosition=null,this.removeLinkDecorations(),Promise.resolve(0);if(this.currentWordAtPosition&&this.currentWordAtPosition.startColumn===i.startColumn&&this.currentWordAtPosition.endColumn===i.endColumn&&this.currentWordAtPosition.word===i.word)return Promise.resolve(0);this.currentWordAtPosition=i;let n=new Im(this.editor,4|1|2|8);return this.previousPromise&&(this.previousPromise.cancel(),this.previousPromise=null),this.previousPromise=Oi(s=>this.findDefinition(e,s)),this.previousPromise.then(s=>{if(!s||!s.length||!n.validate(this.editor)){this.removeLinkDecorations();return}if(s.length>1)this.addDecoration(new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn),new ul().appendText(m("multipleResults","Click to show {0} definitions.",s.length)));else{let o=s[0];if(!o.uri)return;this.textModelResolverService.createModelReference(o.uri).then(a=>{if(!a.object||!a.object.textEditorModel){a.dispose();return}const{object:{textEditorModel:l}}=a,{startLineNumber:c}=o.range;if(c<1||c>l.getLineCount()){a.dispose();return}const h=this.getPreviewValue(l,c,o);let u;o.originSelectionRange?u=k.lift(o.originSelectionRange):u=new k(e.lineNumber,i.startColumn,e.lineNumber,i.endColumn);const d=this.modeService.getModeIdByFilepathOrFirstLine(l.uri);this.addDecoration(u,new ul().appendCodeblock(d||"",h)),a.dispose()})}}).then(void 0,Oe)}getPreviewValue(e,t,i){let n=i.targetSelectionRange?i.range:this.getPreviewRangeBasedOnBrackets(e,t);return n.endLineNumber-n.startLineNumber>=v_.MAX_SOURCE_PREVIEW_LINES&&(n=this.getPreviewRangeBasedOnIndentation(e,t)),this.stripIndentationFromPreviewRange(e,t,n)}stripIndentationFromPreviewRange(e,t,i){let s=e.getLineFirstNonWhitespaceColumn(t);for(let a=t+1;a<i.endLineNumber;a++){const l=e.getLineFirstNonWhitespaceColumn(a);s=Math.min(s,l)}return e.getValueInRange(i).replace(new RegExp(`^\\s{${s-1}}`,"gm"),"").trim()}getPreviewRangeBasedOnIndentation(e,t){const i=e.getLineFirstNonWhitespaceColumn(t),n=Math.min(e.getLineCount(),t+v_.MAX_SOURCE_PREVIEW_LINES);let s=t+1;for(;s<n;s++){let o=e.getLineFirstNonWhitespaceColumn(s);if(i===o)break}return new k(t,1,s+1,1)}getPreviewRangeBasedOnBrackets(e,t){const i=Math.min(e.getLineCount(),t+v_.MAX_SOURCE_PREVIEW_LINES),n=[];let s=!0,o=e.findNextBracket(new $(t,1));for(;o!==null;){if(n.length===0)n.push(o);else{const h=n[n.length-1];if(h.open[0]===o.open[0]&&h.isOpen&&!o.isOpen?n.pop():n.push(o),n.length===0)if(s)s=!1;else return new k(t,1,o.range.endLineNumber+1,1)}const a=e.getLineMaxColumn(t);let l=o.range.endLineNumber,c=o.range.endColumn;if(a===o.range.endColumn&&(l++,c=1),l>i)return new k(t,1,i+1,1);o=e.findNextBracket(new $(l,c))}return new k(t,1,i+1,1)}addDecoration(e,t){const i={range:e,options:{description:"goto-definition-link",inlineClassName:"goto-definition-link",hoverMessage:t}};this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[i])}removeLinkDecorations(){this.linkDecorations.length>0&&(this.linkDecorations=this.editor.deltaDecorations(this.linkDecorations,[]))}isEnabled(e,t){return this.editor.hasModel()&&e.isNoneOrSingleMouseDown&&e.target.type===6&&(e.hasTriggerModifier||(t?t.keyCodeIsTriggerKey:!1))&&wp.has(this.editor.getModel())}findDefinition(e,t){const i=this.editor.getModel();return i?ON(i,e,t):Promise.resolve(null)}gotoDefinition(e,t){return this.editor.setPosition(e),this.editor.invokeWithinContext(i=>{const n=!t&&this.editor.getOption(77)&&!this.isInPeekEditor(i);return new ny({openToSide:t,openInPeek:n,muteMessage:!0},{alias:"",label:"",id:"",precondition:void 0}).run(i,this.editor)})}isInPeekEditor(e){const t=e.get(Fe);return br.inPeekEditor.getValue(t)}dispose(){this.toUnhook.dispose()}};Pu.ID="editor.contrib.gotodefinitionatposition";Pu.MAX_SOURCE_PREVIEW_LINES=8;Pu=Xle([UB(1,so),UB(2,Ds)],Pu);wt(Pu.ID,Pu);Lt((r,e)=>{const t=r.getColor(oD);t&&e.addRule(`.monaco-editor .goto-definition-link { color: ${t} !important; }`)});const ry=oe;class jB extends Y{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 gm(this.contentsDomNode,{consumeMouseWheelIfScrollbarIsNeeded:!0})),this.containerDomNode.appendChild(this._scrollbar.getDomNode())}onContentsChanged(){this._scrollbar.scanDomNode()}}class GN extends Y{constructor(e,t,i){super();this.actionContainer=X(e,ry("div.action-container")),this.action=X(this.actionContainer,ry("a.action")),this.action.setAttribute("href","#"),this.action.setAttribute("role","button"),t.iconClass&&X(this.action,ry(`span.icon.${t.iconClass}`));const n=X(this.action,ry("span"));n.textContent=i?`${t.label} (${i})`:t.label,this._register(J(this.actionContainer,Ee.CLICK,s=>{s.stopPropagation(),s.preventDefault(),t.run(this.actionContainer)})),this.setEnabled(!0)}static render(e,t,i){return new GN(e,t,i)}setEnabled(e){e?(this.actionContainer.classList.remove("disabled"),this.actionContainer.removeAttribute("aria-disabled")):(this.actionContainer.classList.add("disabled"),this.actionContainer.setAttribute("aria-disabled","true"))}}class Qle{constructor(e,t,i){this.presentationIndex=i,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this._onDidChangeColor=new H,this.onDidChangeColor=this._onDidChangeColor.event,this._onDidChangePresentation=new H,this.onDidChangePresentation=this._onDidChangePresentation.event,this.originalColor=e,this._color=e,this._colorPresentations=t}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)}selectNextColorPresentation(){this.presentationIndex=(this.presentationIndex+1)%this.colorPresentations.length,this.flushColor(),this._onDidChangePresentation.fire(this.presentation)}guessColorPresentation(e,t){for(let i=0;i<this.colorPresentations.length;i++)if(t.toLowerCase()===this.colorPresentations[i].label){this.presentationIndex=i,this._onDidChangePresentation.fire(this.presentation);break}}flushColor(){this._onColorFlushed.fire(this._color)}}const ua=oe;class Jle extends Y{constructor(e,t,i){super();this.model=t,this.domNode=ua(".colorpicker-header"),X(e,this.domNode),this.pickedColorNode=X(this.domNode,ua(".picked-color"));const n=X(this.domNode,ua(".original-color"));n.style.backgroundColor=K.Format.CSS.format(this.model.originalColor)||"",this.backgroundColor=i.getColorTheme().getColor(Vh)||K.white,this._register(Lt((s,o)=>{this.backgroundColor=s.getColor(Vh)||K.white})),this._register(J(this.pickedColorNode,Ee.CLICK,()=>this.model.selectNextColorPresentation())),this._register(J(n,Ee.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=K.Format.CSS.format(t.color)||"",this.pickedColorNode.classList.toggle("light",t.color.rgba.a<.5?this.backgroundColor.isLighter():t.color.isLighter())}onDidChangeColor(e){this.pickedColorNode.style.backgroundColor=K.Format.CSS.format(e)||"",this.pickedColorNode.classList.toggle("light",e.rgba.a<.5?this.backgroundColor.isLighter():e.isLighter()),this.onDidChangePresentation()}onDidChangePresentation(){this.pickedColorNode.textContent=this.model.presentation?this.model.presentation.label:""}}class ece extends Y{constructor(e,t,i){super();this.model=t,this.pixelRatio=i,this.domNode=ua(".colorpicker-body"),X(e,this.domNode),this.saturationBox=new tce(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 ice(this.domNode,this.model),this._register(this.opacityStrip),this._register(this.opacityStrip.onDidChange(this.onDidOpacityChange,this)),this._register(this.opacityStrip.onColorFlushed(this.flushColor,this)),this.hueStrip=new nce(this.domNode,this.model),this._register(this.hueStrip),this._register(this.hueStrip.onDidChange(this.onDidHueChange,this)),this._register(this.hueStrip.onColorFlushed(this.flushColor,this))}flushColor(){this.model.flushColor()}onDidSaturationValueChange({s:e,v:t}){const i=this.model.color.hsva;this.model.color=new K(new Qo(i.h,e,t,i.a))}onDidOpacityChange(e){const t=this.model.color.hsva;this.model.color=new K(new Qo(t.h,t.s,t.v,e))}onDidHueChange(e){const t=this.model.color.hsva,i=(1-e)*360;this.model.color=new K(new Qo(i===360?0:i,t.s,t.v,t.a))}layout(){this.saturationBox.layout(),this.opacityStrip.layout(),this.hueStrip.layout()}}class tce extends Y{constructor(e,t,i){super();this.model=t,this.pixelRatio=i,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this.domNode=ua(".saturation-wrap"),X(e,this.domNode),this.canvas=document.createElement("canvas"),this.canvas.className="saturation-box",X(this.domNode,this.canvas),this.selection=ua(".saturation-selection"),X(this.domNode,this.selection),this.layout(),this._register(AL(this.domNode,n=>this.onMouseDown(n))),this._register(this.model.onDidChangeColor(this.onDidChangeColor,this)),this.monitor=null}onMouseDown(e){this.monitor=this._register(new Rh);const t=Qi(this.domNode);e.target!==this.selection&&this.onDidChangePosition(e.offsetX,e.offsetY),this.monitor.startMonitoring(e.target,e.buttons,lf,n=>this.onDidChangePosition(n.posx-t.left,n.posy-t.top),()=>null);const i=jM(document,()=>{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 K(new Qo(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=K.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(){this.monitor&&this.monitor.isMonitoring()||this.paint()}}class KB extends Y{constructor(e,t){super();this.model=t,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._onColorFlushed=new H,this.onColorFlushed=this._onColorFlushed.event,this.domNode=X(e,ua(".strip")),this.overlay=X(this.domNode,ua(".overlay")),this.slider=X(this.domNode,ua(".slider")),this.slider.style.top="0px",this._register(AL(this.domNode,i=>this.onMouseDown(i))),this.layout()}layout(){this.height=this.domNode.offsetHeight-this.slider.offsetHeight;const e=this.getValue(this.model.color);this.updateSliderPosition(e)}onMouseDown(e){const t=this._register(new Rh),i=Qi(this.domNode);this.domNode.classList.add("grabbing"),e.target!==this.slider&&this.onDidChangeTop(e.offsetY),t.startMonitoring(e.target,e.buttons,lf,s=>this.onDidChangeTop(s.posy-i.top),()=>null);const n=jM(document,()=>{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 ice extends KB{constructor(e,t){super(e,t);this.domNode.classList.add("opacity-strip"),this._register(t.onDidChangeColor(this.onDidChangeColor,this)),this.onDidChangeColor(this.model.color)}onDidChangeColor(e){const{r:t,g:i,b:n}=e.rgba,s=new K(new tt(t,i,n,1)),o=new K(new tt(t,i,n,0));this.overlay.style.background=`linear-gradient(to bottom, ${s} 0%, ${o} 100%)`}getValue(e){return e.hsva.a}}class nce extends KB{constructor(e,t){super(e,t);this.domNode.classList.add("hue-strip")}getValue(e){return 1-e.hsva.h/360}}class rce extends Vr{constructor(e,t,i,n){super();this.model=t,this.pixelRatio=i,this._register(BM(()=>this.layout()));const s=ua(".colorpicker-widget");e.appendChild(s);const o=new Jle(s,this.model,n);this.body=new ece(s,this.model,this.pixelRatio),this._register(o),this._register(this.body)}layout(){this.body.layout()}}var sce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},oce=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},qB=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class ace{constructor(e,t,i,n){this.owner=e,this.range=t,this.model=i,this.provider=n,this.forceShowAtRange=!0}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let ZN=class{constructor(e,t,i){this._editor=e,this._hover=t,this._themeService=i}computeSync(e,t){return[]}computeAsync(e,t,i){return qB(this,void 0,void 0,function*(){if(!this._editor.hasModel())return[];const n=Iu.get(this._editor);for(const s of t){const o=n.getColorData(s.range.getStartPosition());if(o)return[yield this._createColorHover(this._editor.getModel(),o.colorInfo,o.provider)]}return[]})}_createColorHover(e,t,i){return qB(this,void 0,void 0,function*(){const n=e.getValueInRange(t.range),{red:s,green:o,blue:a,alpha:l}=t.color,c=new tt(Math.round(s*255),Math.round(o*255),Math.round(a*255),l),h=new K(c),u=yield cB(e,t,i,et.None),d=new Qle(h,[],0);return d.colorPresentations=u||[],d.guessColorPresentation(h,n),new ace(this,k.lift(t.range),d,i)})}renderHoverParts(e,t,i){if(e.length===0||!this._editor.hasModel())return Y.None;const n=new le,s=e[0],o=this._editor.getModel(),a=s.model,l=n.add(new rce(t,a,this._editor.getOption(127),this._themeService));let c=new k(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn);const h=()=>{let d,f;if(a.presentation.textEdit){d=[a.presentation.textEdit],f=new k(a.presentation.textEdit.range.startLineNumber,a.presentation.textEdit.range.startColumn,a.presentation.textEdit.range.endLineNumber,a.presentation.textEdit.range.endColumn);const g=this._editor.getModel()._setTrackedRange(null,f,3);this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d),f=this._editor.getModel()._getTrackedRange(g)||f}else d=[{identifier:null,range:c,text:a.presentation.label,forceMoveMarkers:!1}],f=c.setEndPosition(c.endLineNumber,c.startColumn+a.presentation.label.length),this._editor.pushUndoStop(),this._editor.executeEdits("colorpicker",d);a.presentation.additionalTextEdits&&(d=[...a.presentation.additionalTextEdits],this._editor.executeEdits("colorpicker",d),this._hover.hide()),this._editor.pushUndoStop(),c=f},u=d=>cB(o,{range:c,color:{red:d.rgba.r/255,green:d.rgba.g/255,blue:d.rgba.b/255,alpha:d.rgba.a}},s.provider,et.None).then(f=>{a.colorPresentations=f||[]});return n.add(a.onColorFlushed(d=>{u(d).then(h)})),n.add(a.onDidChangeColor(u)),this._hover.setColorPicker(l),n}};ZN=sce([oce(2,qt)],ZN);class GB{constructor(e,t,i,n,s){this._computer=e,this._state=0,this._hoverTime=s,this._firstWaitScheduler=new Bt(()=>this._triggerAsyncComputation(),0),this._secondWaitScheduler=new Bt(()=>this._triggerSyncComputation(),0),this._loadingMessageScheduler=new Bt(()=>this._showLoadingMessage(),0),this._asyncComputationPromise=null,this._asyncComputationPromiseDone=!1,this._completeCallback=t,this._errorCallback=i,this._progressCallback=n}setHoverTime(e){this._hoverTime=e}_firstWaitTime(){return this._hoverTime/2}_secondWaitTime(){return this._hoverTime/2}_loadingMessageTime(){return 3*this._hoverTime}_triggerAsyncComputation(){this._state=2,this._secondWaitScheduler.schedule(this._secondWaitTime()),this._computer.computeAsync?(this._asyncComputationPromiseDone=!1,this._asyncComputationPromise=Oi(e=>this._computer.computeAsync(e)),this._asyncComputationPromise.then(e=>{this._asyncComputationPromiseDone=!0,this._withAsyncResult(e)},e=>this._onError(e))):this._asyncComputationPromiseDone=!0}_triggerSyncComputation(){this._computer.computeSync&&this._computer.onResult(this._computer.computeSync(),!0),this._asyncComputationPromiseDone?(this._state=0,this._onComplete(this._computer.getResult())):(this._state=3,this._onProgress(this._computer.getResult()))}_showLoadingMessage(){this._state===3&&this._onProgress(this._computer.getResultWithLoadingMessage())}_withAsyncResult(e){e&&this._computer.onResult(e,!1),this._state===3&&(this._state=0,this._onComplete(this._computer.getResult()))}_onComplete(e){this._completeCallback(e)}_onError(e){this._errorCallback?this._errorCallback(e):Oe(e)}_onProgress(e){this._progressCallback(e)}start(e){if(e===0)this._state===0&&(this._state=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();break}}cancel(){this._loadingMessageScheduler.cancel(),this._state===1&&this._firstWaitScheduler.cancel(),this._state===2&&(this._secondWaitScheduler.cancel(),this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null)),this._state===3&&this._asyncComputationPromise&&(this._asyncComputationPromise.cancel(),this._asyncComputationPromise=null),this._state=0}}class ZB{constructor(e,t){this.priority=e,this.range=t,this.type=1}equals(e){return e.type===1&&this.range.equalsRange(e.range)}canAdoptVisibleHover(e,t){return e.type===1&&t.lineNumber===this.range.startLineNumber}}class YN{constructor(e,t,i){this.priority=e,this.owner=t,this.range=i,this.type=2}equals(e){return e.type===2&&this.owner===e.owner}canAdoptVisibleHover(e,t){return e.type===2&&this.owner===e.owner}}/*! @license DOMPurify 2.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.3.1/LICENSE */function lce(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var cce=Object.hasOwnProperty,YB=Object.setPrototypeOf,hce=Object.isFrozen,uce=Object.getPrototypeOf,dce=Object.getOwnPropertyDescriptor,Cr=Object.freeze,gl=Object.seal,fce=Object.create,XB=typeof Reflect!="undefined"&&Reflect,sy=XB.apply,XN=XB.construct;sy||(sy=function(e,t,i){return e.apply(t,i)});Cr||(Cr=function(e){return e});gl||(gl=function(e){return e});XN||(XN=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(lce(t))))});var gce=vo(Array.prototype.forEach),QB=vo(Array.prototype.pop),C_=vo(Array.prototype.push),Ou=vo(String.prototype.toLowerCase),JB=vo(String.prototype.match),Tc=vo(String.prototype.replace),pce=vo(String.prototype.indexOf),mce=vo(String.prototype.trim),pl=vo(RegExp.prototype.test),eW=_ce(TypeError);function vo(r){return function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];return sy(r,e,i)}}function _ce(r){return function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];return XN(r,t)}}function xt(r,e){YB&&YB(r,null);for(var t=e.length;t--;){var i=e[t];if(typeof i=="string"){var n=Ou(i);n!==i&&(hce(e)||(e[t]=n),i=n)}r[i]=!0}return r}function Fu(r){var e=fce(null),t=void 0;for(t in r)sy(cce,r,[t])&&(e[t]=r[t]);return e}function oy(r,e){for(;r!==null;){var t=dce(r,e);if(t){if(t.get)return vo(t.get);if(typeof t.value=="function")return vo(t.value)}r=uce(r)}function i(n){return console.warn("fallback value for",n),null}return i}var tW=Cr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),QN=Cr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),JN=Cr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),bce=Cr(["animate","color-profile","cursor","discard","fedropshadow","feimage","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),eT=Cr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),vce=Cr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),iW=Cr(["#text"]),nW=Cr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),tT=Cr(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),rW=Cr(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),ay=Cr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Cce=gl(/\{\{[\s\S]*|[\s\S]*\}\}/gm),wce=gl(/<%[\s\S]*|[\s\S]*%>/gm),yce=gl(/^data-[\-\w.\u00B7-\uFFFF]/),Sce=gl(/^aria-[\-\w]+$/),Lce=gl(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),xce=gl(/^(?:\w+script|data):/i),kce=gl(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),w_=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function da(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}else return Array.from(r)}var Dce=function(){return typeof window=="undefined"?null:window},Ece=function(e,t){if((typeof e=="undefined"?"undefined":w_(e))!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(i=t.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(a){return a}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function sW(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Dce(),e=function(E){return sW(E)};if(e.version="2.3.1",e.removed=[],!r||!r.document||r.document.nodeType!==9)return e.isSupported=!1,e;var t=r.document,i=r.document,n=r.DocumentFragment,s=r.HTMLTemplateElement,o=r.Node,a=r.Element,l=r.NodeFilter,c=r.NamedNodeMap,h=c===void 0?r.NamedNodeMap||r.MozNamedAttrMap:c,u=r.Text,d=r.Comment,f=r.DOMParser,g=r.trustedTypes,p=a.prototype,_=oy(p,"cloneNode"),v=oy(p,"nextSibling"),b=oy(p,"childNodes"),C=oy(p,"parentNode");if(typeof s=="function"){var y=i.createElement("template");y.content&&y.content.ownerDocument&&(i=y.content.ownerDocument)}var x=Ece(g,t),S=x&&th?x.createHTML(""):"",w=i,L=w.implementation,N=w.createNodeIterator,P=w.createDocumentFragment,B=w.getElementsByTagName,U=t.importNode,j={};try{j=Fu(i).documentMode?i.documentMode:{}}catch{}var re={};e.isSupported=typeof C=="function"&&L&&typeof L.createHTMLDocument!="undefined"&&j!==9;var te=Cce,A=wce,D=yce,M=Sce,W=xce,ge=kce,se=Lce,ae=null,we=xt({},[].concat(da(tW),da(QN),da(JN),da(eT),da(iW))),De=null,ct=xt({},[].concat(da(nW),da(tT),da(rW),da(ay))),Ci=null,Yt=null,Us=!0,Jt=!0,ko=!1,Qe=!1,Re=!1,cd=!1,$g=!1,Dl=!1,Ea=!1,El=!0,th=!1,Eb=!0,hd=!0,ih=!1,Il={},Ia=null,nh=xt({},["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"]),Ug=null,jg=xt({},["audio","video","img","source","image","track"]),ud=null,Ib=xt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Kg="http://www.w3.org/1998/Math/MathML",qg="http://www.w3.org/2000/svg",Do="http://www.w3.org/1999/xhtml",dd=Do,Gg=!1,ms=null,rh=i.createElement("form"),fd=function(E){ms&&ms===E||((!E||(typeof E=="undefined"?"undefined":w_(E))!=="object")&&(E={}),E=Fu(E),ae="ALLOWED_TAGS"in E?xt({},E.ALLOWED_TAGS):we,De="ALLOWED_ATTR"in E?xt({},E.ALLOWED_ATTR):ct,ud="ADD_URI_SAFE_ATTR"in E?xt(Fu(Ib),E.ADD_URI_SAFE_ATTR):Ib,Ug="ADD_DATA_URI_TAGS"in E?xt(Fu(jg),E.ADD_DATA_URI_TAGS):jg,Ia="FORBID_CONTENTS"in E?xt({},E.FORBID_CONTENTS):nh,Ci="FORBID_TAGS"in E?xt({},E.FORBID_TAGS):{},Yt="FORBID_ATTR"in E?xt({},E.FORBID_ATTR):{},Il="USE_PROFILES"in E?E.USE_PROFILES:!1,Us=E.ALLOW_ARIA_ATTR!==!1,Jt=E.ALLOW_DATA_ATTR!==!1,ko=E.ALLOW_UNKNOWN_PROTOCOLS||!1,Qe=E.SAFE_FOR_TEMPLATES||!1,Re=E.WHOLE_DOCUMENT||!1,Dl=E.RETURN_DOM||!1,Ea=E.RETURN_DOM_FRAGMENT||!1,El=E.RETURN_DOM_IMPORT!==!1,th=E.RETURN_TRUSTED_TYPE||!1,$g=E.FORCE_BODY||!1,Eb=E.SANITIZE_DOM!==!1,hd=E.KEEP_CONTENT!==!1,ih=E.IN_PLACE||!1,se=E.ALLOWED_URI_REGEXP||se,dd=E.NAMESPACE||Do,Qe&&(Jt=!1),Ea&&(Dl=!0),Il&&(ae=xt({},[].concat(da(iW))),De=[],Il.html===!0&&(xt(ae,tW),xt(De,nW)),Il.svg===!0&&(xt(ae,QN),xt(De,tT),xt(De,ay)),Il.svgFilters===!0&&(xt(ae,JN),xt(De,tT),xt(De,ay)),Il.mathMl===!0&&(xt(ae,eT),xt(De,rW),xt(De,ay))),E.ADD_TAGS&&(ae===we&&(ae=Fu(ae)),xt(ae,E.ADD_TAGS)),E.ADD_ATTR&&(De===ct&&(De=Fu(De)),xt(De,E.ADD_ATTR)),E.ADD_URI_SAFE_ATTR&&xt(ud,E.ADD_URI_SAFE_ATTR),E.FORBID_CONTENTS&&(Ia===nh&&(Ia=Fu(Ia)),xt(Ia,E.FORBID_CONTENTS)),hd&&(ae["#text"]=!0),Re&&xt(ae,["html","head","body"]),ae.table&&(xt(ae,["tbody"]),delete Ci.tbody),Cr&&Cr(E),ms=E)},Zg=xt({},["mi","mo","mn","ms","mtext"]),Nb=xt({},["foreignobject","desc","title","annotation-xml"]),gd=xt({},QN);xt(gd,JN),xt(gd,bce);var Nl=xt({},eT);xt(Nl,vce);var Tb=function(E){var z=C(E);(!z||!z.tagName)&&(z={namespaceURI:Do,tagName:"template"});var ie=Ou(E.tagName),ne=Ou(z.tagName);if(E.namespaceURI===qg)return z.namespaceURI===Do?ie==="svg":z.namespaceURI===Kg?ie==="svg"&&(ne==="annotation-xml"||Zg[ne]):Boolean(gd[ie]);if(E.namespaceURI===Kg)return z.namespaceURI===Do?ie==="math":z.namespaceURI===qg?ie==="math"&&Nb[ne]:Boolean(Nl[ie]);if(E.namespaceURI===Do){if(z.namespaceURI===qg&&!Nb[ne]||z.namespaceURI===Kg&&!Zg[ne])return!1;var ye=xt({},["title","style","font","a","script"]);return!Nl[ie]&&(ye[ie]||!gd[ie])}return!1},_s=function(E){C_(e.removed,{element:E});try{E.parentNode.removeChild(E)}catch{try{E.outerHTML=S}catch{E.remove()}}},Ab=function(E,z){try{C_(e.removed,{attribute:z.getAttributeNode(E),from:z})}catch{C_(e.removed,{attribute:null,from:z})}if(z.removeAttribute(E),E==="is"&&!De[E])if(Dl||Ea)try{_s(z)}catch{}else try{z.setAttribute(E,"")}catch{}},Rb=function(E){var z=void 0,ie=void 0;if($g)E="<remove></remove>"+E;else{var ne=JB(E,/^[\r\n\t ]+/);ie=ne&&ne[0]}var ye=x?x.createHTML(E):E;if(dd===Do)try{z=new f().parseFromString(ye,"text/html")}catch{}if(!z||!z.documentElement){z=L.createDocument(dd,"template",null);try{z.documentElement.innerHTML=Gg?"":ye}catch{}}var We=z.body||z.documentElement;return E&&ie&&We.insertBefore(i.createTextNode(ie),We.childNodes[0]||null),dd===Do?B.call(z,Re?"html":"body")[0]:Re?z.documentElement:We},Mb=function(E){return N.call(E.ownerDocument||E,E,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},pt=function(E){return E instanceof u||E instanceof d?!1:typeof E.nodeName!="string"||typeof E.textContent!="string"||typeof E.removeChild!="function"||!(E.attributes instanceof h)||typeof E.removeAttribute!="function"||typeof E.setAttribute!="function"||typeof E.namespaceURI!="string"||typeof E.insertBefore!="function"},sh=function(E){return(typeof o=="undefined"?"undefined":w_(o))==="object"?E instanceof o:E&&(typeof E=="undefined"?"undefined":w_(E))==="object"&&typeof E.nodeType=="number"&&typeof E.nodeName=="string"},Q=function(E,z,ie){!re[E]||gce(re[E],function(ne){ne.call(e,z,ie,ms)})},q=function(E){var z=void 0;if(Q("beforeSanitizeElements",E,null),pt(E)||JB(E.nodeName,/[\u0080-\uFFFF]/))return _s(E),!0;var ie=Ou(E.nodeName);if(Q("uponSanitizeElement",E,{tagName:ie,allowedTags:ae}),!sh(E.firstElementChild)&&(!sh(E.content)||!sh(E.content.firstElementChild))&&pl(/<[/\w]/g,E.innerHTML)&&pl(/<[/\w]/g,E.textContent)||ie==="select"&&pl(/<template/i,E.innerHTML))return _s(E),!0;if(!ae[ie]||Ci[ie]){if(hd&&!Ia[ie]){var ne=C(E)||E.parentNode,ye=b(E)||E.childNodes;if(ye&&ne)for(var We=ye.length,je=We-1;je>=0;--je)ne.insertBefore(_(ye[je],!0),v(E))}return _s(E),!0}return E instanceof a&&!Tb(E)||(ie==="noscript"||ie==="noembed")&&pl(/<\/no(script|embed)/i,E.innerHTML)?(_s(E),!0):(Qe&&E.nodeType===3&&(z=E.textContent,z=Tc(z,te," "),z=Tc(z,A," "),E.textContent!==z&&(C_(e.removed,{element:E.cloneNode()}),E.textContent=z)),Q("afterSanitizeElements",E,null),!1)},Z=function(E,z,ie){if(Eb&&(z==="id"||z==="name")&&(ie in i||ie in rh))return!1;if(!(Jt&&!Yt[z]&&pl(D,z))){if(!(Us&&pl(M,z))){if(!De[z]||Yt[z])return!1;if(!ud[z]){if(!pl(se,Tc(ie,ge,""))){if(!((z==="src"||z==="xlink:href"||z==="href")&&E!=="script"&&pce(ie,"data:")===0&&Ug[E])){if(!(ko&&!pl(W,Tc(ie,ge,"")))){if(ie)return!1}}}}}}return!0},T=function(E){var z=void 0,ie=void 0,ne=void 0,ye=void 0;Q("beforeSanitizeAttributes",E,null);var We=E.attributes;if(!!We){var je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:De};for(ye=We.length;ye--;){z=We[ye];var Ge=z,nt=Ge.name,Pe=Ge.namespaceURI;if(ie=mce(z.value),ne=Ou(nt),je.attrName=ne,je.attrValue=ie,je.keepAttr=!0,je.forceKeepAttr=void 0,Q("uponSanitizeAttribute",E,je),ie=je.attrValue,!je.forceKeepAttr&&(Ab(nt,E),!!je.keepAttr)){if(pl(/\/>/i,ie)){Ab(nt,E);continue}Qe&&(ie=Tc(ie,te," "),ie=Tc(ie,A," "));var Hi=E.nodeName.toLowerCase();if(!!Z(Hi,ne,ie))try{Pe?E.setAttributeNS(Pe,nt,ie):E.setAttribute(nt,ie),QB(e.removed)}catch{}}}Q("afterSanitizeAttributes",E,null)}},O=function F(E){var z=void 0,ie=Mb(E);for(Q("beforeSanitizeShadowDOM",E,null);z=ie.nextNode();)Q("uponSanitizeShadowNode",z,null),!q(z)&&(z.content instanceof n&&F(z.content),T(z));Q("afterSanitizeShadowDOM",E,null)};return e.sanitize=function(F,E){var z=void 0,ie=void 0,ne=void 0,ye=void 0,We=void 0;if(Gg=!F,Gg&&(F="<!-->"),typeof F!="string"&&!sh(F)){if(typeof F.toString!="function")throw eW("toString is not a function");if(F=F.toString(),typeof F!="string")throw eW("dirty is not a string, aborting")}if(!e.isSupported){if(w_(r.toStaticHTML)==="object"||typeof r.toStaticHTML=="function"){if(typeof F=="string")return r.toStaticHTML(F);if(sh(F))return r.toStaticHTML(F.outerHTML)}return F}if(cd||fd(E),e.removed=[],typeof F=="string"&&(ih=!1),!ih)if(F instanceof o)z=Rb("<!---->"),ie=z.ownerDocument.importNode(F,!0),ie.nodeType===1&&ie.nodeName==="BODY"||ie.nodeName==="HTML"?z=ie:z.appendChild(ie);else{if(!Dl&&!Qe&&!Re&&F.indexOf("<")===-1)return x&&th?x.createHTML(F):F;if(z=Rb(F),!z)return Dl?null:S}z&&$g&&_s(z.firstChild);for(var je=Mb(ih?F:z);ne=je.nextNode();)ne.nodeType===3&&ne===ye||q(ne)||(ne.content instanceof n&&O(ne.content),T(ne),ye=ne);if(ye=null,ih)return F;if(Dl){if(Ea)for(We=P.call(z.ownerDocument);z.firstChild;)We.appendChild(z.firstChild);else We=z;return El&&(We=U.call(t,We,!0)),We}var Ge=Re?z.outerHTML:z.innerHTML;return Qe&&(Ge=Tc(Ge,te," "),Ge=Tc(Ge,A," ")),x&&th?x.createHTML(Ge):Ge},e.setConfig=function(F){fd(F),cd=!0},e.clearConfig=function(){ms=null,cd=!1},e.isValidAttribute=function(F,E,z){ms||fd({});var ie=Ou(F),ne=Ou(E);return Z(ie,ne,z)},e.addHook=function(F,E){typeof E=="function"&&(re[F]=re[F]||[],C_(re[F],E))},e.removeHook=function(F){re[F]&&QB(re[F])},e.removeHooks=function(F){re[F]&&(re[F]=[])},e.removeAllHooks=function(){re={}},e}var fa=sW();fa.version;fa.isSupported;const Ice=fa.sanitize;fa.setConfig;fa.clearConfig;fa.isValidAttribute;const oW=fa.addHook,aW=fa.removeHook;fa.removeHooks;fa.removeAllHooks;let ga;(function(){function r(e){ga=e()}r.amd=!0,function(e,t){typeof exports=="object"&&typeof module!="undefined"?module.exports=t():typeof r=="function"&&r.amd?r(t):(e=typeof globalThis!="undefined"?globalThis:e||self,e.marked=t())}(this,function(){function e(Q,q){for(var Z=0;Z<q.length;Z++){var T=q[Z];T.enumerable=T.enumerable||!1,T.configurable=!0,"value"in T&&(T.writable=!0),Object.defineProperty(Q,T.key,T)}}function t(Q,q,Z){return q&&e(Q.prototype,q),Z&&e(Q,Z),Q}function i(Q,q){if(!!Q){if(typeof Q=="string")return n(Q,q);var Z=Object.prototype.toString.call(Q).slice(8,-1);if(Z==="Object"&&Q.constructor&&(Z=Q.constructor.name),Z==="Map"||Z==="Set")return Array.from(Q);if(Z==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Z))return n(Q,q)}}function n(Q,q){(q==null||q>Q.length)&&(q=Q.length);for(var Z=0,T=new Array(q);Z<q;Z++)T[Z]=Q[Z];return T}function s(Q,q){var Z=typeof Symbol!="undefined"&&Q[Symbol.iterator]||Q["@@iterator"];if(Z)return(Z=Z.call(Q)).next.bind(Z);if(Array.isArray(Q)||(Z=i(Q))||q&&Q&&typeof Q.length=="number"){Z&&(Q=Z);var T=0;return function(){return T>=Q.length?{done:!0}:{done:!1,value:Q[T++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o={exports:{}};function a(){return{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}}function l(Q){o.exports.defaults=Q}o.exports={defaults:a(),getDefaults:a,changeDefaults:l};var c=/[&<>"']/,h=/[&<>"']/g,u=/[<>"']|&(?!#?\w+;)/,d=/[<>"']|&(?!#?\w+;)/g,f={"&":"&","<":"<",">":">",'"':""","'":"'"},g=function(q){return f[q]};function p(Q,q){if(q){if(c.test(Q))return Q.replace(h,g)}else if(u.test(Q))return Q.replace(d,g);return Q}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(Q){return Q.replace(_,function(q,Z){return Z=Z.toLowerCase(),Z==="colon"?":":Z.charAt(0)==="#"?Z.charAt(1)==="x"?String.fromCharCode(parseInt(Z.substring(2),16)):String.fromCharCode(+Z.substring(1)):""})}var b=/(^|[^\[])\^/g;function C(Q,q){Q=Q.source||Q,q=q||"";var Z={replace:function(O,F){return F=F.source||F,F=F.replace(b,"$1"),Q=Q.replace(O,F),Z},getRegex:function(){return new RegExp(Q,q)}};return Z}var y=/[^\w:]/g,x=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(Q,q,Z){if(Q){var T;try{T=decodeURIComponent(v(Z)).replace(y,"").toLowerCase()}catch{return null}if(T.indexOf("javascript:")===0||T.indexOf("vbscript:")===0||T.indexOf("data:")===0)return null}q&&!x.test(Z)&&(Z=B(q,Z));try{Z=encodeURI(Z).replace(/%25/g,"%")}catch{return null}return Z}var w={},L=/^[^:]+:\/*[^/]*$/,N=/^([^:]+:)[\s\S]*$/,P=/^([^:]+:\/*[^/]*)[\s\S]*$/;function B(Q,q){w[" "+Q]||(L.test(Q)?w[" "+Q]=Q+"/":w[" "+Q]=te(Q,"/",!0)),Q=w[" "+Q];var Z=Q.indexOf(":")===-1;return q.substring(0,2)==="//"?Z?q:Q.replace(N,"$1")+q:q.charAt(0)==="/"?Z?q:Q.replace(P,"$1")+q:Q+q}var U={exec:function(){}};function j(Q){for(var q=1,Z,T;q<arguments.length;q++){Z=arguments[q];for(T in Z)Object.prototype.hasOwnProperty.call(Z,T)&&(Q[T]=Z[T])}return Q}function re(Q,q){var Z=Q.replace(/\|/g,function(F,E,z){for(var ie=!1,ne=E;--ne>=0&&z[ne]==="\\";)ie=!ie;return ie?"|":" |"}),T=Z.split(/ \|/),O=0;if(T[0].trim()||T.shift(),T[T.length-1].trim()||T.pop(),T.length>q)T.splice(q);else for(;T.length<q;)T.push("");for(;O<T.length;O++)T[O]=T[O].trim().replace(/\\\|/g,"|");return T}function te(Q,q,Z){var T=Q.length;if(T===0)return"";for(var O=0;O<T;){var F=Q.charAt(T-O-1);if(F===q&&!Z)O++;else if(F!==q&&Z)O++;else break}return Q.substr(0,T-O)}function A(Q,q){if(Q.indexOf(q[1])===-1)return-1;for(var Z=Q.length,T=0,O=0;O<Z;O++)if(Q[O]==="\\")O++;else if(Q[O]===q[0])T++;else if(Q[O]===q[1]&&(T--,T<0))return O;return-1}function D(Q){Q&&Q.sanitize&&!Q.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function M(Q,q){if(q<1)return"";for(var Z="";q>1;)q&1&&(Z+=Q),q>>=1,Q+=Q;return Z+Q}var W={escape:p,unescape:v,edit:C,cleanUrl:S,resolveUrl:B,noopTest:U,merge:j,splitCells:re,rtrim:te,findClosingBracket:A,checkSanitizeDeprecation:D,repeatString:M},ge=o.exports.defaults,se=W.rtrim,ae=W.splitCells,we=W.escape,De=W.findClosingBracket;function ct(Q,q,Z,T){var O=q.href,F=q.title?we(q.title):null,E=Q[1].replace(/\\([\[\]])/g,"$1");if(Q[0].charAt(0)!=="!"){T.state.inLink=!0;var z={type:"link",raw:Z,href:O,title:F,text:E,tokens:T.inlineTokens(E,[])};return T.state.inLink=!1,z}else return{type:"image",raw:Z,href:O,title:F,text:we(E)}}function Ci(Q,q){var Z=Q.match(/^(\s+)(?:```)/);if(Z===null)return q;var T=Z[1];return q.split(` -`).map(function(O){var F=O.match(/^\s+/);if(F===null)return O;var E=F[0];return E.length>=T.length?O.slice(T.length):O}).join(` -`)}var Yt=function(){function Q(Z){this.options=Z||ge}var q=Q.prototype;return q.space=function(T){var O=this.rules.block.newline.exec(T);if(O)return O[0].length>1?{type:"space",raw:O[0]}:{raw:` -`}},q.code=function(T){var O=this.rules.block.code.exec(T);if(O){var F=O[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:O[0],codeBlockStyle:"indented",text:this.options.pedantic?F:se(F,` -`)}}},q.fences=function(T){var O=this.rules.block.fences.exec(T);if(O){var F=O[0],E=Ci(F,O[3]||"");return{type:"code",raw:F,lang:O[2]?O[2].trim():O[2],text:E}}},q.heading=function(T){var O=this.rules.block.heading.exec(T);if(O){var F=O[2].trim();if(/#$/.test(F)){var E=se(F,"#");(this.options.pedantic||!E||/ $/.test(E))&&(F=E.trim())}var z={type:"heading",raw:O[0],depth:O[1].length,text:F,tokens:[]};return this.lexer.inline(z.text,z.tokens),z}},q.hr=function(T){var O=this.rules.block.hr.exec(T);if(O)return{type:"hr",raw:O[0]}},q.blockquote=function(T){var O=this.rules.block.blockquote.exec(T);if(O){var F=O[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:O[0],tokens:this.lexer.blockTokens(F,[]),text:F}}},q.list=function(T){var O=this.rules.block.list.exec(T);if(O){var F,E,z,ie,ne,ye,We,je,Ge,nt,Pe=O[1].trim(),Hi=Pe.length>1,kt={type:"list",raw:"",ordered:Hi,start:Hi?+Pe.slice(0,-1):"",loose:!1,items:[]};Pe=Hi?"\\d{1,9}\\"+Pe.slice(-1):"\\"+Pe,this.options.pedantic&&(Pe=Hi?Pe:"[*+-]");for(var lr=new RegExp("^( {0,3}"+Pe+")((?: [^\\n]*| *)(?:\\n[^\\n]*)*(?:\\n|$))");T&&!(this.rules.block.hr.test(T)||!(O=lr.exec(T)));){Ge=O[2].split(` -`),this.options.pedantic?(ie=2,nt=Ge[0].trimLeft()):(ie=O[2].search(/[^ ]/),ie=O[1].length+(ie>4?1:ie),nt=Ge[0].slice(ie-O[1].length)),ye=!1,F=O[0],!Ge[0]&&/^ *$/.test(Ge[1])&&(F=O[1]+Ge.slice(0,2).join(` -`)+` -`,kt.loose=!0,Ge=[]);var pd=new RegExp("^ {0,"+Math.min(3,ie-1)+"}(?:[*+-]|\\d{1,9}[.)])");for(ne=1;ne<Ge.length;ne++){if(je=Ge[ne],this.options.pedantic&&(je=je.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),pd.test(je)){F=O[1]+Ge.slice(0,ne).join(` -`)+` -`;break}if(!ye){je.trim()||(ye=!0),je.search(/[^ ]/)>=ie?nt+=` -`+je.slice(ie):nt+=` -`+je;continue}if(je.search(/[^ ]/)>=ie||!je.trim()){nt+=` -`+je.slice(ie);continue}else{F=O[1]+Ge.slice(0,ne).join(` -`)+` -`;break}}kt.loose||(We?kt.loose=!0:/\n *\n *$/.test(F)&&(We=!0)),this.options.gfm&&(E=/^\[[ xX]\] /.exec(nt),E&&(z=E[0]!=="[ ] ",nt=nt.replace(/^\[[ xX]\] +/,""))),kt.items.push({type:"list_item",raw:F,task:!!E,checked:z,loose:!1,text:nt}),kt.raw+=F,T=T.slice(F.length)}kt.items[kt.items.length-1].raw=F.trimRight(),kt.items[kt.items.length-1].text=nt.trimRight(),kt.raw=kt.raw.trimRight();var Nn=kt.items.length;for(ne=0;ne<Nn;ne++)this.lexer.state.top=!1,kt.items[ne].tokens=this.lexer.blockTokens(kt.items[ne].text,[]),kt.items[ne].tokens.some(function(Yg){return Yg.type==="space"})&&(kt.loose=!0,kt.items[ne].loose=!0);return kt}},q.html=function(T){var O=this.rules.block.html.exec(T);if(O){var F={type:"html",raw:O[0],pre:!this.options.sanitizer&&(O[1]==="pre"||O[1]==="script"||O[1]==="style"),text:O[0]};return this.options.sanitize&&(F.type="paragraph",F.text=this.options.sanitizer?this.options.sanitizer(O[0]):we(O[0]),F.tokens=[],this.lexer.inline(F.text,F.tokens)),F}},q.def=function(T){var O=this.rules.block.def.exec(T);if(O){O[3]&&(O[3]=O[3].substring(1,O[3].length-1));var F=O[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:F,raw:O[0],href:O[2],title:O[3]}}},q.table=function(T){var O=this.rules.block.table.exec(T);if(O){var F={type:"table",header:ae(O[1]).map(function(We){return{text:We}}),align:O[2].replace(/^ *|\| *$/g,"").split(/ *\| */),rows:O[3]?O[3].replace(/\n$/,"").split(` -`):[]};if(F.header.length===F.align.length){F.raw=O[0];var E=F.align.length,z,ie,ne,ye;for(z=0;z<E;z++)/^ *-+: *$/.test(F.align[z])?F.align[z]="right":/^ *:-+: *$/.test(F.align[z])?F.align[z]="center":/^ *:-+ *$/.test(F.align[z])?F.align[z]="left":F.align[z]=null;for(E=F.rows.length,z=0;z<E;z++)F.rows[z]=ae(F.rows[z],F.header.length).map(function(We){return{text:We}});for(E=F.header.length,ie=0;ie<E;ie++)F.header[ie].tokens=[],this.lexer.inlineTokens(F.header[ie].text,F.header[ie].tokens);for(E=F.rows.length,ie=0;ie<E;ie++)for(ye=F.rows[ie],ne=0;ne<ye.length;ne++)ye[ne].tokens=[],this.lexer.inlineTokens(ye[ne].text,ye[ne].tokens);return F}}},q.lheading=function(T){var O=this.rules.block.lheading.exec(T);if(O){var F={type:"heading",raw:O[0],depth:O[2].charAt(0)==="="?1:2,text:O[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},q.paragraph=function(T){var O=this.rules.block.paragraph.exec(T);if(O){var F={type:"paragraph",raw:O[0],text:O[1].charAt(O[1].length-1)===` -`?O[1].slice(0,-1):O[1],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},q.text=function(T){var O=this.rules.block.text.exec(T);if(O){var F={type:"text",raw:O[0],text:O[0],tokens:[]};return this.lexer.inline(F.text,F.tokens),F}},q.escape=function(T){var O=this.rules.inline.escape.exec(T);if(O)return{type:"escape",raw:O[0],text:we(O[1])}},q.tag=function(T){var O=this.rules.inline.tag.exec(T);if(O)return!this.lexer.state.inLink&&/^<a /i.test(O[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&/^<\/a>/i.test(O[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(O[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(O[0])&&(this.lexer.state.inRawBlock=!1),{type:this.options.sanitize?"text":"html",raw:O[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(O[0]):we(O[0]):O[0]}},q.link=function(T){var O=this.rules.inline.link.exec(T);if(O){var F=O[2].trim();if(!this.options.pedantic&&/^</.test(F)){if(!/>$/.test(F))return;var E=se(F.slice(0,-1),"\\");if((F.length-E.length)%2==0)return}else{var z=De(O[2],"()");if(z>-1){var ie=O[0].indexOf("!")===0?5:4,ne=ie+O[1].length+z;O[2]=O[2].substring(0,z),O[0]=O[0].substring(0,ne).trim(),O[3]=""}}var ye=O[2],We="";if(this.options.pedantic){var je=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(ye);je&&(ye=je[1],We=je[3])}else We=O[3]?O[3].slice(1,-1):"";return ye=ye.trim(),/^</.test(ye)&&(this.options.pedantic&&!/>$/.test(F)?ye=ye.slice(1):ye=ye.slice(1,-1)),ct(O,{href:ye&&ye.replace(this.rules.inline._escapes,"$1"),title:We&&We.replace(this.rules.inline._escapes,"$1")},O[0],this.lexer)}},q.reflink=function(T,O){var F;if((F=this.rules.inline.reflink.exec(T))||(F=this.rules.inline.nolink.exec(T))){var E=(F[2]||F[1]).replace(/\s+/g," ");if(E=O[E.toLowerCase()],!E||!E.href){var z=F[0].charAt(0);return{type:"text",raw:z,text:z}}return ct(F,E,F[0],this.lexer)}},q.emStrong=function(T,O,F){F===void 0&&(F="");var E=this.rules.inline.emStrong.lDelim.exec(T);if(!!E&&!(E[3]&&F.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\u08A0-\u08B4\u08B6-\u08C7\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\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\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-\u170C\u170E-\u1711\u1720-\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-\u1B4B\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-\u2C2E\u2C30-\u2C5E\u2C60-\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-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\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\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\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\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\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]|\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\uDEC0-\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]|[\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\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]|\uD82C[\uDC00-\uDD1E\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]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\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-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var z=E[1]||E[2]||"";if(!z||z&&(F===""||this.rules.inline.punctuation.exec(F))){var ie=E[0].length-1,ne,ye,We=ie,je=0,Ge=E[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(Ge.lastIndex=0,O=O.slice(-1*T.length+ie);(E=Ge.exec(O))!=null;)if(ne=E[1]||E[2]||E[3]||E[4]||E[5]||E[6],!!ne){if(ye=ne.length,E[3]||E[4]){We+=ye;continue}else if((E[5]||E[6])&&ie%3&&!((ie+ye)%3)){je+=ye;continue}if(We-=ye,!(We>0)){if(ye=Math.min(ye,ye+We+je),Math.min(ie,ye)%2){var nt=T.slice(1,ie+E.index+ye);return{type:"em",raw:T.slice(0,ie+E.index+ye+1),text:nt,tokens:this.lexer.inlineTokens(nt,[])}}var Pe=T.slice(2,ie+E.index+ye-1);return{type:"strong",raw:T.slice(0,ie+E.index+ye+1),text:Pe,tokens:this.lexer.inlineTokens(Pe,[])}}}}}},q.codespan=function(T){var O=this.rules.inline.code.exec(T);if(O){var F=O[2].replace(/\n/g," "),E=/[^ ]/.test(F),z=/^ /.test(F)&&/ $/.test(F);return E&&z&&(F=F.substring(1,F.length-1)),F=we(F,!0),{type:"codespan",raw:O[0],text:F}}},q.br=function(T){var O=this.rules.inline.br.exec(T);if(O)return{type:"br",raw:O[0]}},q.del=function(T){var O=this.rules.inline.del.exec(T);if(O)return{type:"del",raw:O[0],text:O[2],tokens:this.lexer.inlineTokens(O[2],[])}},q.autolink=function(T,O){var F=this.rules.inline.autolink.exec(T);if(F){var E,z;return F[2]==="@"?(E=we(this.options.mangle?O(F[1]):F[1]),z="mailto:"+E):(E=we(F[1]),z=E),{type:"link",raw:F[0],text:E,href:z,tokens:[{type:"text",raw:E,text:E}]}}},q.url=function(T,O){var F;if(F=this.rules.inline.url.exec(T)){var E,z;if(F[2]==="@")E=we(this.options.mangle?O(F[0]):F[0]),z="mailto:"+E;else{var ie;do ie=F[0],F[0]=this.rules.inline._backpedal.exec(F[0])[0];while(ie!==F[0]);E=we(F[0]),F[1]==="www."?z="http://"+E:z=E}return{type:"link",raw:F[0],text:E,href:z,tokens:[{type:"text",raw:E,text:E}]}}},q.inlineText=function(T,O){var F=this.rules.inline.text.exec(T);if(F){var E;return this.lexer.state.inRawBlock?E=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(F[0]):we(F[0]):F[0]:E=we(this.options.smartypants?O(F[0]):F[0]),{type:"text",raw:F[0],text:E}}},Q}(),Us=W.noopTest,Jt=W.edit,ko=W.merge,Qe={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}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3}bull)( [^\n]+?)?(?:\n|$)/,html:"^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,table:Us,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};Qe._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,Qe._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,Qe.def=Jt(Qe.def).replace("label",Qe._label).replace("title",Qe._title).getRegex(),Qe.bullet=/(?:[*+-]|\d{1,9}[.)])/,Qe.listItemStart=Jt(/^( *)(bull) */).replace("bull",Qe.bullet).getRegex(),Qe.list=Jt(Qe.list).replace(/bull/g,Qe.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+Qe.def.source+")").getRegex(),Qe._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",Qe._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,Qe.html=Jt(Qe.html,"i").replace("comment",Qe._comment).replace("tag",Qe._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qe.paragraph=Jt(Qe._paragraph).replace("hr",Qe.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qe._tag).getRegex(),Qe.blockquote=Jt(Qe.blockquote).replace("paragraph",Qe.paragraph).getRegex(),Qe.normal=ko({},Qe),Qe.gfm=ko({},Qe.normal,{table:"^ *([^\\n ].*\\|.*)\\n {0,3}(?:\\| *)?(:?-+:? *(?:\\| *:?-+:? *)*)\\|?(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),Qe.gfm.table=Jt(Qe.gfm.table).replace("hr",Qe.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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Qe._tag).getRegex(),Qe.pedantic=ko({},Qe.normal,{html:Jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qe._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:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Us,paragraph:Jt(Qe.normal._paragraph).replace("hr",Qe.hr).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",Qe.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var Re={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Us,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,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:Us,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};Re._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",Re.punctuation=Jt(Re.punctuation).replace(/punctuation/g,Re._punctuation).getRegex(),Re.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,Re.escapedEmSt=/\\\*|\\_/g,Re._comment=Jt(Qe._comment).replace("(?:-->|$)","-->").getRegex(),Re.emStrong.lDelim=Jt(Re.emStrong.lDelim).replace(/punct/g,Re._punctuation).getRegex(),Re.emStrong.rDelimAst=Jt(Re.emStrong.rDelimAst,"g").replace(/punct/g,Re._punctuation).getRegex(),Re.emStrong.rDelimUnd=Jt(Re.emStrong.rDelimUnd,"g").replace(/punct/g,Re._punctuation).getRegex(),Re._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,Re._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,Re._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])?)+(?![-_])/,Re.autolink=Jt(Re.autolink).replace("scheme",Re._scheme).replace("email",Re._email).getRegex(),Re._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,Re.tag=Jt(Re.tag).replace("comment",Re._comment).replace("attribute",Re._attribute).getRegex(),Re._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Re._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,Re._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,Re.link=Jt(Re.link).replace("label",Re._label).replace("href",Re._href).replace("title",Re._title).getRegex(),Re.reflink=Jt(Re.reflink).replace("label",Re._label).getRegex(),Re.reflinkSearch=Jt(Re.reflinkSearch,"g").replace("reflink",Re.reflink).replace("nolink",Re.nolink).getRegex(),Re.normal=ko({},Re),Re.pedantic=ko({},Re.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:Jt(/^!?\[(label)\]\((.*?)\)/).replace("label",Re._label).getRegex(),reflink:Jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Re._label).getRegex()}),Re.gfm=ko({},Re.normal,{escape:Jt(Re.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]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),Re.gfm.url=Jt(Re.gfm.url,"i").replace("email",Re.gfm._extended_email).getRegex(),Re.breaks=ko({},Re.gfm,{br:Jt(Re.br).replace("{2,}","*").getRegex(),text:Jt(Re.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var cd={block:Qe,inline:Re},$g=Yt,Dl=o.exports.defaults,Ea=cd.block,El=cd.inline,th=W.repeatString;function Eb(Q){return Q.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function hd(Q){var q="",Z,T,O=Q.length;for(Z=0;Z<O;Z++)T=Q.charCodeAt(Z),Math.random()>.5&&(T="x"+T.toString(16)),q+="&#"+T+";";return q}var ih=function(){function Q(Z){this.tokens=[],this.tokens.links=Object.create(null),this.options=Z||Dl,this.options.tokenizer=this.options.tokenizer||new $g,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};var T={block:Ea.normal,inline:El.normal};this.options.pedantic?(T.block=Ea.pedantic,T.inline=El.pedantic):this.options.gfm&&(T.block=Ea.gfm,this.options.breaks?T.inline=El.breaks:T.inline=El.gfm),this.tokenizer.rules=T}Q.lex=function(T,O){var F=new Q(O);return F.lex(T)},Q.lexInline=function(T,O){var F=new Q(O);return F.inlineTokens(T)};var q=Q.prototype;return q.lex=function(T){T=T.replace(/\r\n|\r/g,` -`).replace(/\t/g," "),this.blockTokens(T,this.tokens);for(var O;O=this.inlineQueue.shift();)this.inlineTokens(O.src,O.tokens);return this.tokens},q.blockTokens=function(T,O){var F=this;O===void 0&&(O=[]),this.options.pedantic&&(T=T.replace(/^ +$/gm,""));for(var E,z,ie,ne;T;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(function(We){return(E=We.call({lexer:F},T,O))?(T=T.substring(E.raw.length),O.push(E),!0):!1}))){if(E=this.tokenizer.space(T)){T=T.substring(E.raw.length),E.type&&O.push(E);continue}if(E=this.tokenizer.code(T)){T=T.substring(E.raw.length),z=O[O.length-1],z&&(z.type==="paragraph"||z.type==="text")?(z.raw+=` -`+E.raw,z.text+=` -`+E.text,this.inlineQueue[this.inlineQueue.length-1].src=z.text):O.push(E);continue}if(E=this.tokenizer.fences(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.heading(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.hr(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.blockquote(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.list(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.html(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.def(T)){T=T.substring(E.raw.length),z=O[O.length-1],z&&(z.type==="paragraph"||z.type==="text")?(z.raw+=` -`+E.raw,z.text+=` -`+E.raw,this.inlineQueue[this.inlineQueue.length-1].src=z.text):this.tokens.links[E.tag]||(this.tokens.links[E.tag]={href:E.href,title:E.title});continue}if(E=this.tokenizer.table(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.lheading(T)){T=T.substring(E.raw.length),O.push(E);continue}if(ie=T,this.options.extensions&&this.options.extensions.startBlock&&function(){var We=1/0,je=T.slice(1),Ge=void 0;F.options.extensions.startBlock.forEach(function(nt){Ge=nt.call({lexer:this},je),typeof Ge=="number"&&Ge>=0&&(We=Math.min(We,Ge))}),We<1/0&&We>=0&&(ie=T.substring(0,We+1))}(),this.state.top&&(E=this.tokenizer.paragraph(ie))){z=O[O.length-1],ne&&z.type==="paragraph"?(z.raw+=` -`+E.raw,z.text+=` -`+E.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=z.text):O.push(E),ne=ie.length!==T.length,T=T.substring(E.raw.length);continue}if(E=this.tokenizer.text(T)){T=T.substring(E.raw.length),z=O[O.length-1],z&&z.type==="text"?(z.raw+=` -`+E.raw,z.text+=` -`+E.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=z.text):O.push(E);continue}if(T){var ye="Infinite loop on byte: "+T.charCodeAt(0);if(this.options.silent){console.error(ye);break}else throw new Error(ye)}}return this.state.top=!0,O},q.inline=function(T,O){this.inlineQueue.push({src:T,tokens:O})},q.inlineTokens=function(T,O){var F=this;O===void 0&&(O=[]);var E,z,ie,ne=T,ye,We,je;if(this.tokens.links){var Ge=Object.keys(this.tokens.links);if(Ge.length>0)for(;(ye=this.tokenizer.rules.inline.reflinkSearch.exec(ne))!=null;)Ge.includes(ye[0].slice(ye[0].lastIndexOf("[")+1,-1))&&(ne=ne.slice(0,ye.index)+"["+th("a",ye[0].length-2)+"]"+ne.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(ye=this.tokenizer.rules.inline.blockSkip.exec(ne))!=null;)ne=ne.slice(0,ye.index)+"["+th("a",ye[0].length-2)+"]"+ne.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(ye=this.tokenizer.rules.inline.escapedEmSt.exec(ne))!=null;)ne=ne.slice(0,ye.index)+"++"+ne.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;T;)if(We||(je=""),We=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(function(Pe){return(E=Pe.call({lexer:F},T,O))?(T=T.substring(E.raw.length),O.push(E),!0):!1}))){if(E=this.tokenizer.escape(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.tag(T)){T=T.substring(E.raw.length),z=O[O.length-1],z&&E.type==="text"&&z.type==="text"?(z.raw+=E.raw,z.text+=E.text):O.push(E);continue}if(E=this.tokenizer.link(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.reflink(T,this.tokens.links)){T=T.substring(E.raw.length),z=O[O.length-1],z&&E.type==="text"&&z.type==="text"?(z.raw+=E.raw,z.text+=E.text):O.push(E);continue}if(E=this.tokenizer.emStrong(T,ne,je)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.codespan(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.br(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.del(T)){T=T.substring(E.raw.length),O.push(E);continue}if(E=this.tokenizer.autolink(T,hd)){T=T.substring(E.raw.length),O.push(E);continue}if(!this.state.inLink&&(E=this.tokenizer.url(T,hd))){T=T.substring(E.raw.length),O.push(E);continue}if(ie=T,this.options.extensions&&this.options.extensions.startInline&&function(){var Pe=1/0,Hi=T.slice(1),kt=void 0;F.options.extensions.startInline.forEach(function(lr){kt=lr.call({lexer:this},Hi),typeof kt=="number"&&kt>=0&&(Pe=Math.min(Pe,kt))}),Pe<1/0&&Pe>=0&&(ie=T.substring(0,Pe+1))}(),E=this.tokenizer.inlineText(ie,Eb)){T=T.substring(E.raw.length),E.raw.slice(-1)!=="_"&&(je=E.raw.slice(-1)),We=!0,z=O[O.length-1],z&&z.type==="text"?(z.raw+=E.raw,z.text+=E.text):O.push(E);continue}if(T){var nt="Infinite loop on byte: "+T.charCodeAt(0);if(this.options.silent){console.error(nt);break}else throw new Error(nt)}}return O},t(Q,null,[{key:"rules",get:function(){return{block:Ea,inline:El}}}]),Q}(),Il=o.exports.defaults,Ia=W.cleanUrl,nh=W.escape,Ug=function(){function Q(Z){this.options=Z||Il}var q=Q.prototype;return q.code=function(T,O,F){var E=(O||"").match(/\S*/)[0];if(this.options.highlight){var z=this.options.highlight(T,E);z!=null&&z!==T&&(F=!0,T=z)}return T=T.replace(/\n$/,"")+` -`,E?'<pre><code class="'+this.options.langPrefix+nh(E,!0)+'">'+(F?T:nh(T,!0))+`</code></pre> -`:"<pre><code>"+(F?T:nh(T,!0))+`</code></pre> -`},q.blockquote=function(T){return`<blockquote> -`+T+`</blockquote> -`},q.html=function(T){return T},q.heading=function(T,O,F,E){return this.options.headerIds?"<h"+O+' id="'+this.options.headerPrefix+E.slug(F)+'">'+T+"</h"+O+`> -`:"<h"+O+">"+T+"</h"+O+`> -`},q.hr=function(){return this.options.xhtml?`<hr/> -`:`<hr> -`},q.list=function(T,O,F){var E=O?"ol":"ul",z=O&&F!==1?' start="'+F+'"':"";return"<"+E+z+`> -`+T+"</"+E+`> -`},q.listitem=function(T){return"<li>"+T+`</li> -`},q.checkbox=function(T){return"<input "+(T?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},q.paragraph=function(T){return"<p>"+T+`</p> -`},q.table=function(T,O){return O&&(O="<tbody>"+O+"</tbody>"),`<table> -<thead> -`+T+`</thead> -`+O+`</table> -`},q.tablerow=function(T){return`<tr> -`+T+`</tr> -`},q.tablecell=function(T,O){var F=O.header?"th":"td",E=O.align?"<"+F+' align="'+O.align+'">':"<"+F+">";return E+T+"</"+F+`> -`},q.strong=function(T){return"<strong>"+T+"</strong>"},q.em=function(T){return"<em>"+T+"</em>"},q.codespan=function(T){return"<code>"+T+"</code>"},q.br=function(){return this.options.xhtml?"<br/>":"<br>"},q.del=function(T){return"<del>"+T+"</del>"},q.link=function(T,O,F){if(T=Ia(this.options.sanitize,this.options.baseUrl,T),T===null)return F;var E='<a href="'+nh(T)+'"';return O&&(E+=' title="'+O+'"'),E+=">"+F+"</a>",E},q.image=function(T,O,F){if(T=Ia(this.options.sanitize,this.options.baseUrl,T),T===null)return F;var E='<img src="'+T+'" alt="'+F+'"';return O&&(E+=' title="'+O+'"'),E+=this.options.xhtml?"/>":">",E},q.text=function(T){return T},Q}(),jg=function(){function Q(){}var q=Q.prototype;return q.strong=function(T){return T},q.em=function(T){return T},q.codespan=function(T){return T},q.del=function(T){return T},q.html=function(T){return T},q.text=function(T){return T},q.link=function(T,O,F){return""+F},q.image=function(T,O,F){return""+F},q.br=function(){return""},Q}(),ud=function(){function Q(){this.seen={}}var q=Q.prototype;return q.serialize=function(T){return T.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},q.getNextSafeSlug=function(T,O){var F=T,E=0;if(this.seen.hasOwnProperty(F)){E=this.seen[T];do E++,F=T+"-"+E;while(this.seen.hasOwnProperty(F))}return O||(this.seen[T]=E,this.seen[F]=0),F},q.slug=function(T,O){O===void 0&&(O={});var F=this.serialize(T);return this.getNextSafeSlug(F,O.dryrun)},Q}(),Ib=Ug,Kg=jg,qg=ud,Do=o.exports.defaults,dd=W.unescape,Gg=function(){function Q(Z){this.options=Z||Do,this.options.renderer=this.options.renderer||new Ib,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Kg,this.slugger=new qg}Q.parse=function(T,O){var F=new Q(O);return F.parse(T)},Q.parseInline=function(T,O){var F=new Q(O);return F.parseInline(T)};var q=Q.prototype;return q.parse=function(T,O){O===void 0&&(O=!0);var F="",E,z,ie,ne,ye,We,je,Ge,nt,Pe,Hi,kt,lr,pd,Nn,Yg,OR,Xg,Z1,FR=T.length;for(E=0;E<FR;E++){if(Pe=T[E],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[Pe.type]&&(Z1=this.options.extensions.renderers[Pe.type].call({parser:this},Pe),Z1!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(Pe.type))){F+=Z1||"";continue}switch(Pe.type){case"space":continue;case"hr":{F+=this.renderer.hr();continue}case"heading":{F+=this.renderer.heading(this.parseInline(Pe.tokens),Pe.depth,dd(this.parseInline(Pe.tokens,this.textRenderer)),this.slugger);continue}case"code":{F+=this.renderer.code(Pe.text,Pe.lang,Pe.escaped);continue}case"table":{for(Ge="",je="",ne=Pe.header.length,z=0;z<ne;z++)je+=this.renderer.tablecell(this.parseInline(Pe.header[z].tokens),{header:!0,align:Pe.align[z]});for(Ge+=this.renderer.tablerow(je),nt="",ne=Pe.rows.length,z=0;z<ne;z++){for(We=Pe.rows[z],je="",ye=We.length,ie=0;ie<ye;ie++)je+=this.renderer.tablecell(this.parseInline(We[ie].tokens),{header:!1,align:Pe.align[ie]});nt+=this.renderer.tablerow(je)}F+=this.renderer.table(Ge,nt);continue}case"blockquote":{nt=this.parse(Pe.tokens),F+=this.renderer.blockquote(nt);continue}case"list":{for(Hi=Pe.ordered,kt=Pe.start,lr=Pe.loose,ne=Pe.items.length,nt="",z=0;z<ne;z++)Nn=Pe.items[z],Yg=Nn.checked,OR=Nn.task,pd="",Nn.task&&(Xg=this.renderer.checkbox(Yg),lr?Nn.tokens.length>0&&Nn.tokens[0].type==="paragraph"?(Nn.tokens[0].text=Xg+" "+Nn.tokens[0].text,Nn.tokens[0].tokens&&Nn.tokens[0].tokens.length>0&&Nn.tokens[0].tokens[0].type==="text"&&(Nn.tokens[0].tokens[0].text=Xg+" "+Nn.tokens[0].tokens[0].text)):Nn.tokens.unshift({type:"text",text:Xg}):pd+=Xg),pd+=this.parse(Nn.tokens,lr),nt+=this.renderer.listitem(pd,OR,Yg);F+=this.renderer.list(nt,Hi,kt);continue}case"html":{F+=this.renderer.html(Pe.text);continue}case"paragraph":{F+=this.renderer.paragraph(this.parseInline(Pe.tokens));continue}case"text":{for(nt=Pe.tokens?this.parseInline(Pe.tokens):Pe.text;E+1<FR&&T[E+1].type==="text";)Pe=T[++E],nt+=` -`+(Pe.tokens?this.parseInline(Pe.tokens):Pe.text);F+=O?this.renderer.paragraph(nt):nt;continue}default:{var BR='Token with "'+Pe.type+'" type was not found.';if(this.options.silent){console.error(BR);return}else throw new Error(BR)}}}return F},q.parseInline=function(T,O){O=O||this.renderer;var F="",E,z,ie,ne=T.length;for(E=0;E<ne;E++){if(z=T[E],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[z.type]&&(ie=this.options.extensions.renderers[z.type].call({parser:this},z),ie!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(z.type))){F+=ie||"";continue}switch(z.type){case"escape":{F+=O.text(z.text);break}case"html":{F+=O.html(z.text);break}case"link":{F+=O.link(z.href,z.title,this.parseInline(z.tokens,O));break}case"image":{F+=O.image(z.href,z.title,z.text);break}case"strong":{F+=O.strong(this.parseInline(z.tokens,O));break}case"em":{F+=O.em(this.parseInline(z.tokens,O));break}case"codespan":{F+=O.codespan(z.text);break}case"br":{F+=O.br();break}case"del":{F+=O.del(this.parseInline(z.tokens,O));break}case"text":{F+=O.text(z.text);break}default:{var ye='Token with "'+z.type+'" type was not found.';if(this.options.silent){console.error(ye);return}else throw new Error(ye)}}}return F},Q}(),ms=ih,rh=Gg,fd=Yt,Zg=Ug,Nb=jg,gd=ud,Nl=W.merge,Tb=W.checkSanitizeDeprecation,_s=W.escape,Ab=o.exports.getDefaults,Rb=o.exports.changeDefaults,Mb=o.exports.defaults;function pt(Q,q,Z){if(typeof Q=="undefined"||Q===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Q!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Q)+", string expected");if(typeof q=="function"&&(Z=q,q=null),q=Nl({},pt.defaults,q||{}),Tb(q),Z){var T=q.highlight,O;try{O=ms.lex(Q,q)}catch(ie){return Z(ie)}var F=function(ne){var ye;if(!ne)try{q.walkTokens&&pt.walkTokens(O,q.walkTokens),ye=rh.parse(O,q)}catch(We){ne=We}return q.highlight=T,ne?Z(ne):Z(null,ye)};if(!T||T.length<3||(delete q.highlight,!O.length))return F();var E=0;pt.walkTokens(O,function(ie){ie.type==="code"&&(E++,setTimeout(function(){T(ie.text,ie.lang,function(ne,ye){if(ne)return F(ne);ye!=null&&ye!==ie.text&&(ie.text=ye,ie.escaped=!0),E--,E===0&&F()})},0))}),E===0&&F();return}try{var z=ms.lex(Q,q);return q.walkTokens&&pt.walkTokens(z,q.walkTokens),rh.parse(z,q)}catch(ie){if(ie.message+=` -Please report this to https://github.com/markedjs/marked.`,q.silent)return"<p>An error occurred:</p><pre>"+_s(ie.message+"",!0)+"</pre>";throw ie}}pt.options=pt.setOptions=function(Q){return Nl(pt.defaults,Q),Rb(pt.defaults),pt},pt.getDefaults=Ab,pt.defaults=Mb,pt.use=function(){for(var Q=this,q=arguments.length,Z=new Array(q),T=0;T<q;T++)Z[T]=arguments[T];var O=Nl.apply(void 0,[{}].concat(Z)),F=pt.defaults.extensions||{renderers:{},childTokens:{}},E;Z.forEach(function(z){if(z.extensions&&(E=!0,z.extensions.forEach(function(ne){if(!ne.name)throw new Error("extension name required");if(ne.renderer){var ye=F.renderers?F.renderers[ne.name]:null;ye?F.renderers[ne.name]=function(){for(var We=arguments.length,je=new Array(We),Ge=0;Ge<We;Ge++)je[Ge]=arguments[Ge];var nt=ne.renderer.apply(this,je);return nt===!1&&(nt=ye.apply(this,je)),nt}:F.renderers[ne.name]=ne.renderer}if(ne.tokenizer){if(!ne.level||ne.level!=="block"&&ne.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");F[ne.level]?F[ne.level].unshift(ne.tokenizer):F[ne.level]=[ne.tokenizer],ne.start&&(ne.level==="block"?F.startBlock?F.startBlock.push(ne.start):F.startBlock=[ne.start]:ne.level==="inline"&&(F.startInline?F.startInline.push(ne.start):F.startInline=[ne.start]))}ne.childTokens&&(F.childTokens[ne.name]=ne.childTokens)})),z.renderer&&function(){var ne=pt.defaults.renderer||new Zg,ye=function(Ge){var nt=ne[Ge];ne[Ge]=function(){for(var Pe=arguments.length,Hi=new Array(Pe),kt=0;kt<Pe;kt++)Hi[kt]=arguments[kt];var lr=z.renderer[Ge].apply(ne,Hi);return lr===!1&&(lr=nt.apply(ne,Hi)),lr}};for(var We in z.renderer)ye(We);O.renderer=ne}(),z.tokenizer&&function(){var ne=pt.defaults.tokenizer||new fd,ye=function(Ge){var nt=ne[Ge];ne[Ge]=function(){for(var Pe=arguments.length,Hi=new Array(Pe),kt=0;kt<Pe;kt++)Hi[kt]=arguments[kt];var lr=z.tokenizer[Ge].apply(ne,Hi);return lr===!1&&(lr=nt.apply(ne,Hi)),lr}};for(var We in z.tokenizer)ye(We);O.tokenizer=ne}(),z.walkTokens){var ie=pt.defaults.walkTokens;O.walkTokens=function(ne){z.walkTokens.call(Q,ne),ie&&ie(ne)}}E&&(O.extensions=F),pt.setOptions(O)})},pt.walkTokens=function(Q,q){for(var Z=function(){var E=O.value;switch(q(E),E.type){case"table":{for(var z=s(E.header),ie;!(ie=z()).done;){var ne=ie.value;pt.walkTokens(ne.tokens,q)}for(var ye=s(E.rows),We;!(We=ye()).done;)for(var je=We.value,Ge=s(je),nt;!(nt=Ge()).done;){var Pe=nt.value;pt.walkTokens(Pe.tokens,q)}break}case"list":{pt.walkTokens(E.items,q);break}default:pt.defaults.extensions&&pt.defaults.extensions.childTokens&&pt.defaults.extensions.childTokens[E.type]?pt.defaults.extensions.childTokens[E.type].forEach(function(Hi){pt.walkTokens(E[Hi],q)}):E.tokens&&pt.walkTokens(E.tokens,q)}},T=s(Q),O;!(O=T()).done;)Z()},pt.parseInline=function(Q,q){if(typeof Q=="undefined"||Q===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Q!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Q)+", string expected");q=Nl({},pt.defaults,q||{}),Tb(q);try{var Z=ms.lexInline(Q,q);return q.walkTokens&&pt.walkTokens(Z,q.walkTokens),rh.parseInline(Z,q)}catch(T){if(T.message+=` -Please report this to https://github.com/markedjs/marked.`,q.silent)return"<p>An error occurred:</p><pre>"+_s(T.message+"",!0)+"</pre>";throw T}},pt.Parser=rh,pt.parser=rh.parse,pt.Renderer=Zg,pt.TextRenderer=Nb,pt.Lexer=ms,pt.lexer=ms.lex,pt.Tokenizer=fd,pt.Slugger=gd,pt.parse=pt;var sh=pt;return sh})})();ga.Parser;ga.parser;var Nce=ga.Renderer;ga.TextRenderer;ga.Lexer;ga.lexer;ga.Tokenizer;ga.Slugger;var Tce=ga.parse;function Ace(r,e={},t={}){var i;const n=new le;let s=!1;const o=n.add(new Rn),a=NI(e),l=function(p){let _;try{_=JL(decodeURIComponent(p))}catch{}return _?(_=yK(_,v=>{if(r.uris&&r.uris[v])return Ie.revive(r.uris[v])}),encodeURIComponent(JSON.stringify(_))):p},c=function(p,_){const v=r.uris&&r.uris[p];if(!v)return p;let b=Ie.revive(v);return _?p.startsWith(Ze.data+":")?p:$M.asBrowserUri(b).toString(!0):Ie.parse(p).toString()===b.toString()?p:(b.query&&(b=b.with({query:l(b.query)})),b.toString())};let h;const u=new Promise(p=>h=p),d=new Nce;if(d.image=(p,_,v)=>{let b=[],C=[];if(p){({href:p,dimensions:b}=ase(p)),p=c(p,!0);try{const y=Ie.parse(p);e.baseUrl&&y.scheme===Ze.file&&(p=v2(e.baseUrl,p).toString())}catch{}C.push(`src="${p}"`)}return v&&C.push(`alt="${v}"`),_&&C.push(`title="${_}"`),b.length&&(C=C.concat(b)),"<img "+C.join(" ")+">"},d.link=(p,_,v)=>(p===v&&(v=AI(v)),p=c(p,!1),e.baseUrl&&(/^\w[\w\d+.-]*:/.test(p)||(p=v2(e.baseUrl,p).toString())),_=AI(_),p=AI(p),!p||p.match(/^data:|javascript:/i)||p.match(/^command:/i)&&!r.isTrusted||p.match(/^command:(\/\/\/)?_workbench\.downloadResource/i)?v:(p=p.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),`<a href="#" data-href="${p}" title="${_||p}">${v}</a>`)),d.paragraph=p=>(r.supportThemeIcons&&(p=wu(p).map(v=>typeof v=="string"?v:v.outerHTML).join("")),`<p>${p}</p>`),e.codeBlockRenderer&&(d.code=(p,_)=>{const v=e.codeBlockRenderer(_,p),b=d3.nextId();return IL(Promise.all([v,u]),o.token).then(C=>{var y;if(!s&&C){const x=a.querySelector(`div[data-code="${b}"]`);x&&zl(x,C[0]),(y=e.asyncRenderCallback)===null||y===void 0||y.call(e)}}).catch(()=>{}),`<div class="code" data-code="${b}">${zL(p)}</div>`}),e.actionHandler){const p=e.actionHandler.disposables.add(new Ft(a,"click")),_=e.actionHandler.disposables.add(new Ft(a,"auxclick"));e.actionHandler.disposables.add(ke.any(p.event,_.event)(v=>{const b=new Gr(v);if(!b.leftButton&&!b.middleButton)return;let C=b.target;if(!(C.tagName!=="A"&&(C=C.parentElement,!C||C.tagName!=="A")))try{const y=C.dataset.href;y&&e.actionHandler.callback(y,b)}catch(y){Oe(y)}finally{b.preventDefault()}}))}r.supportHtml||(t.sanitizer=p=>(r.isTrusted?p.match(/^(<span[^>]+>)|(<\/\s*span>)$/):void 0)?p:"",t.sanitize=!0,t.silent=!0),t.renderer=d;let f=(i=r.value)!==null&&i!==void 0?i:"";f.length>1e5&&(f=`${f.substr(0,1e5)}\u2026`),r.supportThemeIcons&&(f=dne(f));const g=Tce(f,t);if(a.innerHTML=Rce(r,g),h(),e.asyncRenderCallback)for(const p of a.getElementsByTagName("img")){const _=n.add(J(p,"load",()=>{_.dispose(),e.asyncRenderCallback()}))}return{element:a,dispose:()=>{s=!0,o.cancel(),n.dispose()}}}function Rce(r,e){const{config:t,allowedSchemes:i}=Mce(r);oW("uponSanitizeAttribute",(s,o)=>{if(o.attrName==="style"||o.attrName==="class"){if(s.tagName==="SPAN"){if(o.attrName==="style"){o.keepAttr=/^(color\:#[0-9a-fA-F]+;)?(background-color\:#[0-9a-fA-F]+;)?$/.test(o.attrValue);return}else if(o.attrName==="class"){o.keepAttr=/^codicon codicon-[a-z\-]+( codicon-modifier-[a-z\-]+)?$/.test(o.attrValue);return}}o.keepAttr=!1;return}});const n=document.createElement("a");oW("afterSanitizeAttributes",s=>{for(const o of["href","src"])s.hasAttribute(o)&&(n.href=s.getAttribute(o),i.includes(n.protocol.replace(/:$/,""))||s.removeAttribute(o))});try{return Ice(e,Object.assign(Object.assign({},t),{RETURN_TRUSTED_TYPE:!0}))}finally{aW("uponSanitizeAttribute"),aW("afterSanitizeAttributes")}}function Mce(r){const e=[Ze.http,Ze.https,Ze.mailto,Ze.data,Ze.file,Ze.vscodeFileResource,Ze.vscodeRemote,Ze.vscodeRemoteResource];return r.isTrusted&&e.push(Ze.command),{config:{ALLOWED_TAGS:["ul","li","p","b","i","code","blockquote","ol","h1","h2","h3","h4","h5","h6","hr","em","pre","table","thead","tbody","tr","th","td","div","del","a","strong","br","img","span"],ALLOWED_ATTR:["href","data-href","target","title","src","alt","class","style","data-code","width","height","align"],ALLOW_UNKNOWN_PROTOCOLS:!0},allowedSchemes:e}}var Pce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lW=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Oce=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},iT;let Ac=class cW{constructor(e,t,i){this._options=e,this._modeService=t,this._openerService=i,this._onDidRenderAsync=new H,this.onDidRenderAsync=this._onDidRenderAsync.event}dispose(){this._onDidRenderAsync.dispose()}render(e,t,i){if(!e)return{element:document.createElement("span"),dispose:()=>{}};const n=new le;return{element:n.add(Ace(e,Object.assign(Object.assign({},this._getRenderOptions(e,n)),t),i)).element,dispose:()=>n.dispose()}}_getRenderOptions(e,t){return{baseUrl:this._options.baseUrl,codeBlockRenderer:(i,n)=>Oce(this,void 0,void 0,function*(){var s,o,a,l;let c;i?c=this._modeService.getModeIdForLanguageName(i):this._options.editor&&(c=(s=this._options.editor.getModel())===null||s===void 0?void 0:s.getLanguageIdentifier().language),c||(c="plaintext"),this._modeService.triggerMode(c);const h=(o=yield ti.getPromise(c))!==null&&o!==void 0?o:void 0,u=document.createElement("span");u.innerHTML=(l=(a=cW._ttpTokenizer)===null||a===void 0?void 0:a.createHTML(n,h))!==null&&l!==void 0?l:h4(n,h);let d=this._options.codeBlockFontFamily;return this._options.editor&&(d=this._options.editor.getOption(43).fontFamily),d&&(u.style.fontFamily=d),u}),asyncRenderCallback:()=>this._onDidRenderAsync.fire(),actionHandler:{callback:i=>this._openerService.open(i,{fromUserGesture:!0,allowContributedOpeners:!0,allowCommands:e.isTrusted}).catch(Oe),disposables:t}}}};Ac._ttpTokenizer=(iT=window.trustedTypes)===null||iT===void 0?void 0:iT.createPolicy("tokenizeToString",{createHTML(r,e){return h4(r,e)}});Ac=Pce([lW(1,Ds),lW(2,Js)],Ac);function hW(r,e,t){const n=Cp.ordered(r).map(s=>Promise.resolve(s.provideHover(r,e,t)).then(o=>o&&Fce(o)?o:void 0,o=>{$i(o)}));return Promise.all(n).then(xh)}Go("_executeHoverProvider",(r,e)=>hW(r,e,et.None));function Fce(r){const e=typeof r.range!="undefined",t=typeof r.contents!="undefined"&&r.contents&&r.contents.length>0;return e&&t}var Bce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},nT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Wce=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const uW=oe;class ly{constructor(e,t,i){this.owner=e,this.range=t,this.contents=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}let rT=class{constructor(e,t,i,n,s){this._editor=e,this._hover=t,this._modeService=i,this._openerService=n,this._configurationService=s}createLoadingMessage(e){return new ly(this,e.range,[new ul().appendText(m("modesContentHover.loading","Loading..."))])}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const c of t){const h=c.range.startLineNumber===n?c.range.startColumn:1,u=c.range.endLineNumber===n?c.range.endColumn:s,d=c.options.hoverMessage;if(!d||t_(d))continue;const f=new k(e.range.startLineNumber,h,e.range.startLineNumber,u);o.push(new ly(this,f,$x(d)))}const a=this._editor.getModel().getLineLength(n),l=this._configurationService.getValue("editor.maxTokenizationLineLength");return typeof l=="number"&&a>=l&&o.push(new ly(this,new k(n,1,n,a+1),[{value:m("too many characters","Tokenization is skipped for long lines for performance reasons. This can be configured via `editor.maxTokenizationLineLength`.")}])),o}computeAsync(e,t,i){return Wce(this,void 0,void 0,function*(){if(!this._editor.hasModel()||e.type!==1)return Promise.resolve([]);const n=this._editor.getModel();if(!Cp.has(n))return Promise.resolve([]);const s=yield hW(n,new $(e.range.startLineNumber,e.range.startColumn),i),o=[];for(const a of s){if(t_(a.contents))continue;const l=a.range?k.lift(a.range):e.range;o.push(new ly(this,l,a.contents))}return o})}renderHoverParts(e,t,i){const n=new le;for(const s of e)for(const o of s.contents){if(t_(o))continue;const a=uW("div.hover-row.markdown-hover"),l=X(a,uW("div.hover-contents")),c=n.add(new Ac({editor:this._editor},this._modeService,this._openerService));n.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const h=n.add(c.render(o));l.appendChild(h.element),t.appendChild(a)}return n}};rT=Bce([nT(2,Ds),nT(3,Js),nT(4,hi)],rT);var dW=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},fW=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class gW{constructor(e,t,i){this.marker=e,this.index=t,this.total=i}}let sT=class pW{constructor(e,t){this._markerService=t,this._onDidChange=new H,this.onDidChange=this._onDidChange.event,this._dispoables=new le,this._markers=[],this._nextIdx=-1,Ie.isUri(e)?this._resourceFilter=n=>n.toString()===e.toString():e&&(this._resourceFilter=e);const i=()=>{this._markers=this._markerService.read({resource:Ie.isUri(e)?e:void 0,severities:ii.Error|ii.Warning|ii.Info}),typeof e=="function"&&(this._markers=this._markers.filter(n=>this._resourceFilter(n.resource))),this._markers.sort(pW._compareMarker)};i(),this._dispoables.add(t.onMarkerChanged(n=>{(!this._resourceFilter||n.some(s=>this._resourceFilter(s)))&&(i(),this._nextIdx=-1,this._onDidChange.fire())}))}dispose(){this._dispoables.dispose(),this._onDidChange.dispose()}matches(e){return!this._resourceFilter&&!e?!0:!this._resourceFilter||!e?!1:this._resourceFilter(e)}get selected(){const e=this._markers[this._nextIdx];return e&&new gW(e,this._nextIdx+1,this._markers.length)}_initIdx(e,t,i){let n=!1,s=this._markers.findIndex(o=>o.resource.toString()===e.uri.toString());s<0&&(s=Bx(this._markers,{resource:e.uri},(o,a)=>up(o.resource.toString(),a.resource.toString())),s<0&&(s=~s));for(let o=s;o<this._markers.length;o++){let a=k.lift(this._markers[o]);if(a.isEmpty()){const l=e.getWordAtPosition(a.getStartPosition());l&&(a=new k(a.startLineNumber,l.startColumn,a.startLineNumber,l.endColumn))}if(t&&(a.containsPosition(t)||t.isBeforeOrEqual(a.getStartPosition()))){this._nextIdx=o,n=!0;break}if(this._markers[o].resource.toString()!==e.uri.toString())break}n||(this._nextIdx=i?0:this._markers.length-1),this._nextIdx<0&&(this._nextIdx=this._markers.length-1)}resetIndex(){this._nextIdx=-1}move(e,t,i){if(this._markers.length===0)return!1;let n=this._nextIdx;return this._nextIdx===-1?this._initIdx(t,i,e):e?this._nextIdx=(this._nextIdx+1)%this._markers.length:e||(this._nextIdx=(this._nextIdx-1+this._markers.length)%this._markers.length),n!==this._nextIdx}find(e,t){let i=this._markers.findIndex(n=>n.resource.toString()===e.toString());if(!(i<0)){for(;i<this._markers.length;i++)if(k.containsPosition(this._markers[i],t))return new gW(this._markers[i],i+1,this._markers.length)}}static _compareMarker(e,t){let i=up(e.resource.toString(),t.resource.toString());return i===0&&(i=ii.compare(e.severity,t.severity)),i===0&&(i=k.compareRangesUsingStarts(e,t)),i}};sT=dW([fW(1,Xm)],sT);const mW=bt("IMarkerNavigationService");let oT=class{constructor(e){this._markerService=e,this._provider=new Ir}getMarkerList(e){for(let t of this._provider){const i=t.getMarkerList(e);if(i)return i}return new sT(e,this._markerService)}};oT=dW([fW(0,Xm)],oT);iu(mW,oT,!0);var aT;(function(r){function e(t){switch(t){case si.Ignore:return"severity-ignore "+ve.info.classNames;case si.Info:return ve.info.classNames;case si.Warning:return ve.warning.classNames;case si.Error:return ve.error.classNames;default:return""}}r.className=e})(aT||(aT={}));Lt((r,e)=>{const t=r.getColor(YX);if(t){const s=ve.error.cssSelector;e.addRule(` - .monaco-editor .zone-widget ${s}, - .markers-panel .marker-icon${s}, - .text-search-provider-messages .providerMessage ${s}, - .extensions-viewlet > .extensions ${s} { - color: ${t}; - } - `)}const i=r.getColor(XX);if(i){const s=ve.warning.cssSelector;e.addRule(` - .monaco-editor .zone-widget ${s}, - .markers-panel .marker-icon${s}, - .extensions-viewlet > .extensions ${s}, - .extension-editor ${s}, - .text-search-provider-messages .providerMessage ${s}, - .preferences-editor ${s} { - color: ${i}; - } - `)}const n=r.getColor(QX);if(n){const s=ve.info.cssSelector;e.addRule(` - .monaco-editor .zone-widget ${s}, - .markers-panel .marker-icon${s}, - .extensions-viewlet > .extensions ${s}, - .text-search-provider-messages .providerMessage ${s}, - .extension-editor ${s} { - color: ${n}; - } - `)}});var Vce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yf=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Hce{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 le,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(ki(this._relatedBlock,"click",a=>{a.preventDefault();const l=this._relatedDiagnostics.get(a.target);l&&i(l)})),this._scrollable=new OD(o,{horizontal:1,vertical:1,useShadows:!1,horizontalScrollbarSize:3,verticalScrollbarSize:3}),e.appendChild(this._scrollable.getDomNode()),this._disposables.add(this._scrollable.onScroll(a=>{o.style.left=`-${a.scrollLeft}px`,o.style.top=`-${a.scrollTop}px`})),this._disposables.add(this._scrollable)}dispose(){ht(this._disposables)}update(e){const{source:t,message:i,relatedInformation:n,code:s}=e;let o=((t==null?void 0:t.length)||0)+"()".length;s&&(typeof s=="string"?o+=s.length:o+=s.value.length);const a=Bo(i);this._lines=a.length,this._longestLineLength=0;for(const d of a)this._longestLineLength=Math.max(d.length+o,this._longestLineLength);Ui(this._messageBlock),this._messageBlock.setAttribute("aria-label",this.getAriaLabel(e)),this._editor.applyFontInfo(this._messageBlock);let l=this._messageBlock;for(const d of a)l=document.createElement("div"),l.innerText=d,d===""&&(l.style.height=this._messageBlock.style.lineHeight),this._messageBlock.appendChild(l);if(t||s){const d=document.createElement("span");if(d.classList.add("details"),l.appendChild(d),t){const f=document.createElement("span");f.innerText=t,f.classList.add("source"),d.appendChild(f)}if(s)if(typeof s=="string"){const f=document.createElement("span");f.innerText=`(${s})`,f.classList.add("code"),d.appendChild(f)}else{this._codeLink=oe("a.code-link"),this._codeLink.setAttribute("href",`${s.target.toString()}`),this._codeLink.onclick=g=>{this._openerService.open(s.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()};const f=X(this._codeLink,oe("span"));f.innerText=s.value,d.appendChild(this._codeLink)}}if(Ui(this._relatedBlock),this._editor.applyFontInfo(this._relatedBlock),gr(n)){const d=this._relatedBlock.appendChild(document.createElement("div"));d.style.paddingTop=`${Math.floor(this._editor.getOption(58)*.66)}px`,this._lines+=1;for(const f of n){let g=document.createElement("div"),p=document.createElement("a");p.classList.add("filename"),p.innerText=`${LB(f.resource)}(${f.startLineNumber}, ${f.startColumn}): `,p.title=this._labelService.getUriLabel(f.resource),this._relatedDiagnostics.set(p,f);let _=document.createElement("span");_.innerText=f.message,g.appendChild(p),g.appendChild(_),this._lines+=1,d.appendChild(g)}}const c=this._editor.getOption(43),h=Math.ceil(c.typicalFullwidthCharacterWidth*this._longestLineLength*.75),u=c.lineHeight*this._lines;this._scrollable.setScrollDimensions({scrollWidth:h,scrollHeight:u})}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 ii.Error:t=m("Error","Error");break;case ii.Warning:t=m("Warning","Warning");break;case ii.Info:t=m("Info","Info");break;case ii.Hint:t=m("Hint","Hint");break}let i=m("marker aria","{0} at {1}. ",t,e.startLineNumber+":"+e.startColumn);const n=this._editor.getModel();return n&&e.startLineNumber<=n.getLineCount()&&e.startLineNumber>=1&&(i=`${n.getLineContent(e.startLineNumber)}, ${i}`),i}}let Xf=class _W extends X0{constructor(e,t,i,n,s,o,a){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=a,this._callOnDispose=new le,this._onDidSelectRelatedInformation=new H,this.onDidSelectRelatedInformation=this._onDidSelectRelatedInformation.event,this._severity=ii.Warning,this._backgroundColor=K.white,this._applyTheme(t.getColorTheme()),this._callOnDispose.add(t.onDidColorThemeChange(this._applyTheme.bind(this))),this.create()}_applyTheme(e){this._backgroundColor=e.getColor(jce);let t=lT,i=zce;this._severity===ii.Warning?(t=cT,i=$ce):this._severity===ii.Info&&(t=hT,i=Uce);const n=e.getColor(t),s=e.getColor(i);this.style({arrowColor:n,frameColor:n,headerBackgroundColor:s,primaryHeadingColor:e.getColor(wB),secondaryHeadingColor:e.getColor(yB)})}_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.onBeforeRun(n=>this.editor.focus()));const t=[],i=this._menuService.createMenu(_W.TitleMenu,this._contextKeyService);Lle(i,void 0,t),this._actionbarWidget.push(t,{label:!1,icon:!0,index:0}),i.dispose()}_fillTitleIcon(e){this._icon=X(e,oe(""))}_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 Hce(this._container,this.editor,t=>this._onDidSelectRelatedInformation.fire(t),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());let n=k.lift(e);const s=this.editor.getPosition();let o=s&&n.containsPosition(s)?s:n.getStartPosition();super.show(o,this.computeRequiredHeight());const a=this.editor.getModel();if(a){const l=i>1?m("problems","{0} of {1} problems",t,i):m("change","{0} of {1} problem",t,i);this.setTitle(ws(a.uri),l)}this._icon.className=`codicon ${aT.className(ii.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()}};Xf.TitleMenu=new xe("gotoErrorTitleMenu");Xf=Vce([Yf(1,qt),Yf(2,Js),Yf(3,Th),Yf(4,ut),Yf(5,Fe),Yf(6,zm)],Xf);let bW=Jp(Qp,jO),vW=Jp(Za,qC),CW=Jp(co,eD);const lT=V("editorMarkerNavigationError.background",{dark:bW,light:bW,hc:_i},m("editorMarkerNavigationError","Editor marker navigation widget error color.")),zce=V("editorMarkerNavigationError.headerBackground",{dark:Ht(lT,.1),light:Ht(lT,.1),hc:null},m("editorMarkerNavigationErrorHeaderBackground","Editor marker navigation widget error heading background.")),cT=V("editorMarkerNavigationWarning.background",{dark:vW,light:vW,hc:_i},m("editorMarkerNavigationWarning","Editor marker navigation widget warning color.")),$ce=V("editorMarkerNavigationWarning.headerBackground",{dark:Ht(cT,.1),light:Ht(cT,.1),hc:"#0C141F"},m("editorMarkerNavigationWarningBackground","Editor marker navigation widget warning heading background.")),hT=V("editorMarkerNavigationInfo.background",{dark:CW,light:CW,hc:_i},m("editorMarkerNavigationInfo","Editor marker navigation widget info color.")),Uce=V("editorMarkerNavigationInfo.headerBackground",{dark:Ht(hT,.1),light:Ht(hT,.1),hc:null},m("editorMarkerNavigationInfoHeaderBackground","Editor marker navigation widget info heading background.")),jce=V("editorMarkerNavigation.background",{dark:ls,light:ls,hc:ls},m("editorMarkerNavigationBackground","Editor marker navigation widget background."));Lt((r,e)=>{const t=r.getColor(Gp);t&&e.addRule(`.monaco-editor .marker-widget a.code-link span { color: ${t}; }`);const i=r.getColor(Zp);i&&e.addRule(`.monaco-editor .marker-widget a.code-link span:hover { color: ${i}; }`)});var Kce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},cy=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},wW=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let Rc=class hy{constructor(e,t,i,n,s){this._markerNavigationService=t,this._contextKeyService=i,this._editorService=n,this._instantiationService=s,this._sessionDispoables=new le,this._editor=e,this._widgetVisible=yW.bindTo(this._contextKeyService)}static get(e){return e.getContribution(hy.ID)}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(Xf,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(i=>{var n,s,o;(!((n=this._model)===null||n===void 0?void 0:n.selected)||!k.containsPosition((s=this._model)===null||s===void 0?void 0:s.selected.marker,i.position))&&((o=this._model)===null||o===void 0||o.resetIndex())})),this._sessionDispoables.add(this._model.onDidChange(()=>{if(!this._widget||!this._widget.position||!this._model)return;const i=this._model.find(this._editor.getModel().uri,this._widget.position);i?this._widget.updateMarker(i.marker):this._widget.showStale()})),this._sessionDispoables.add(this._widget.onDidSelectRelatedInformation(i=>{this._editorService.openCodeEditor({resource:i.resource,options:{pinned:!0,revealIfOpened:!0,selection:k.lift(i).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 $(e.startLineNumber,e.startColumn)),t.selected&&this._widget.showAtMarker(t.selected.marker,t.selected.index,t.selected.total)}}nagivate(e,t){return wW(this,void 0,void 0,function*(){if(this._editor.hasModel()){const i=this._getOrCreateModel(t?void 0:this._editor.getModel().uri);if(i.move(e,this._editor.getModel(),this._editor.getPosition()),!i.selected)return;if(i.selected.marker.resource.toString()!==this._editor.getModel().uri.toString()){this._cleanUp();const n=yield this._editorService.openCodeEditor({resource:i.selected.marker.resource,options:{pinned:!1,revealIfOpened:!0,selectionRevealType:2,selection:i.selected.marker}},this._editor);n&&(hy.get(n).close(),hy.get(n).nagivate(e,t))}else this._widget.showAtMarker(i.selected.marker,i.selected.index,i.selected.total)}})}};Rc.ID="editor.contrib.markerController";Rc=Kce([cy(1,mW),cy(2,Fe),cy(3,Ct),cy(4,ut)],Rc);class uy extends Se{constructor(e,t,i){super(i);this._next=e,this._multiFile=t}run(e,t){return wW(this,void 0,void 0,function*(){t.hasModel()&&Rc.get(t).nagivate(this._next,this._multiFile)})}}class ml extends uy{constructor(){super(!0,!1,{id:ml.ID,label:ml.LABEL,alias:"Go to Next Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:512|66,weight:100},menuOpts:{menuId:Xf.TitleMenu,title:ml.LABEL,icon:sn("marker-navigation-next",ve.arrowDown,m("nextMarkerIcon","Icon for goto next marker.")),group:"navigation",order:1}})}}ml.ID="editor.action.marker.next";ml.LABEL=m("markerAction.next.label","Go to Next Problem (Error, Warning, Info)");class Qf extends uy{constructor(){super(!1,!1,{id:Qf.ID,label:Qf.LABEL,alias:"Go to Previous Problem (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:1024|512|66,weight:100},menuOpts:{menuId:Xf.TitleMenu,title:ml.LABEL,icon:sn("marker-navigation-previous",ve.arrowUp,m("previousMarkerIcon","Icon for goto previous marker.")),group:"navigation",order:2}})}}Qf.ID="editor.action.marker.prev";Qf.LABEL=m("markerAction.previous.label","Go to Previous Problem (Error, Warning, Info)");class qce extends uy{constructor(){super(!0,!0,{id:"editor.action.marker.nextInFiles",label:m("markerAction.nextInFiles.label","Go to Next Problem in Files (Error, Warning, Info)"),alias:"Go to Next Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:66,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:m({key:"miGotoNextProblem",comment:["&& denotes a mnemonic"]},"Next &&Problem"),group:"6_problem_nav",order:1}})}}class Gce extends uy{constructor(){super(!1,!0,{id:"editor.action.marker.prevInFiles",label:m("markerAction.previousInFiles.label","Go to Previous Problem in Files (Error, Warning, Info)"),alias:"Go to Previous Problem in Files (Error, Warning, Info)",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:1024|66,weight:100},menuOpts:{menuId:xe.MenubarGoMenu,title:m({key:"miGotoPreviousProblem",comment:["&& denotes a mnemonic"]},"Previous &&Problem"),group:"6_problem_nav",order:2}})}}wt(Rc.ID,Rc);me(ml);me(Qf);me(qce);me(Gce);const yW=new Le("markersNavigationVisible",!1),Zce=en.bindToContribution(Rc.get);fe(new Zce({id:"closeMarkersNavigation",precondition:yW,handler:r=>r.close(),kbOpts:{weight:100+50,kbExpr:R.focus,primary:9,secondary:[1024|9]}}));var Yce=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},SW=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Fs=oe;class Xce{constructor(e,t,i){this.owner=e,this.range=t,this.marker=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}}const LW={type:1,filter:{include:it.QuickFix}};let uT=class{constructor(e,t,i,n){this._editor=e,this._hover=t,this._markerDecorationsService=i,this._openerService=n,this.recentMarkerCodeActionsInfo=void 0}computeSync(e,t){if(!this._editor.hasModel()||e.type!==1)return[];const i=this._editor.getModel(),n=e.range.startLineNumber,s=i.getLineMaxColumn(n),o=[];for(const a of t){const l=a.range.startLineNumber===n?a.range.startColumn:1,c=a.range.endLineNumber===n?a.range.endColumn:s,h=this._markerDecorationsService.getMarker(i.uri,a);if(!h)continue;const u=new k(e.range.startLineNumber,l,e.range.startLineNumber,c);o.push(new Xce(this,u,h))}return o}renderHoverParts(e,t,i){if(!e.length)return Y.None;const n=new le;e.forEach(o=>t.appendChild(this.renderMarkerHover(o,n)));const s=e.length===1?e[0]:e.sort((o,a)=>ii.compare(o.marker.severity,a.marker.severity))[0];return this.renderMarkerStatusbar(s,i,n),n}renderMarkerHover(e,t){const i=Fs("div.hover-row"),n=X(i,Fs("div.marker.hover-contents")),{source:s,message:o,code:a,relatedInformation:l}=e.marker;this._editor.applyFontInfo(n);const c=X(n,Fs("span"));if(c.style.whiteSpace="pre-wrap",c.innerText=o,s||a)if(a&&typeof a!="string"){const h=Fs("span");if(s){const g=X(h,Fs("span"));g.innerText=s}const u=X(h,Fs("a.code-link"));u.setAttribute("href",a.target.toString()),t.add(J(u,"click",g=>{this._openerService.open(a.target,{allowCommands:!0}),g.preventDefault(),g.stopPropagation()}));const d=X(u,Fs("span"));d.innerText=a.value;const f=X(n,h);f.style.opacity="0.6",f.style.paddingLeft="6px"}else{const h=X(n,Fs("span"));h.style.opacity="0.6",h.style.paddingLeft="6px",h.innerText=s&&a?`${s}(${a})`:s||`(${a})`}if(gr(l))for(const{message:h,resource:u,startLineNumber:d,startColumn:f}of l){const g=X(n,Fs("div"));g.style.marginTop="8px";const p=X(g,Fs("a"));p.innerText=`${ws(u)}(${d}, ${f}): `,p.style.cursor="pointer",t.add(J(p,"click",v=>{v.stopPropagation(),v.preventDefault(),this._openerService&&this._openerService.open(u,{fromUserGesture:!0,editorOptions:{selection:{startLineNumber:d,startColumn:f}}}).catch(Oe)}));const _=X(g,Fs("span"));_.innerText=h,this._editor.applyFontInfo(_)}return i}renderMarkerStatusbar(e,t,i){if((e.marker.severity===ii.Error||e.marker.severity===ii.Warning||e.marker.severity===ii.Info)&&t.addAction({label:m("view problem","View Problem"),commandId:ml.ID,run:()=>{this._hover.hide(),Rc.get(this._editor).showAtMarker(e.marker),this._editor.focus()}}),!this._editor.getOption(80)){const n=t.append(Fs("div"));this.recentMarkerCodeActionsInfo&&(C0.makeKey(this.recentMarkerCodeActionsInfo.marker)===C0.makeKey(e.marker)?this.recentMarkerCodeActionsInfo.hasCodeActions||(n.textContent=m("noQuickFixes","No quick fixes available")):this.recentMarkerCodeActionsInfo=void 0);const s=this.recentMarkerCodeActionsInfo&&!this.recentMarkerCodeActionsInfo.hasCodeActions?Y.None:i.add(mh(()=>n.textContent=m("checkingForQuickFixes","Checking for quick fixes..."),200));n.textContent||(n.textContent=String.fromCharCode(160));const o=this.getCodeActions(e.marker);i.add(Xe(()=>o.cancel())),o.then(a=>{if(s.dispose(),this.recentMarkerCodeActionsInfo={marker:e.marker,hasCodeActions:a.validActions.length>0},!this.recentMarkerCodeActionsInfo.hasCodeActions){a.dispose(),n.textContent=m("noQuickFixes","No quick fixes available");return}n.style.display="none";let l=!1;i.add(Xe(()=>{l||a.dispose()})),t.addAction({label:m("quick fixes","Quick Fix..."),commandId:jf.Id,run:c=>{l=!0;const h=Du.get(this._editor),u=Qi(c);this._hover.hide(),h.showCodeActions(LW,a,{x:u.left+6,y:u.top+u.height+6})}})},Oe)}}getCodeActions(e){return Oi(t=>uN(this._editor.getModel(),new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),LW,su.None,t))}};uT=Yce([SW(2,Ck),SW(3,Js)],uT);Lt((r,e)=>{const t=r.getColor(Gp);t&&e.addRule(`.monaco-hover .hover-contents a.code-link span { color: ${t}; }`);const i=r.getColor(Zp);i&&e.addRule(`.monaco-hover .hover-contents a.code-link span:hover { color: ${i}; }`)});const xW="editor.action.inlineSuggest.commit";class kW{constructor(e,t,i=0){this.lineNumber=e,this.parts=t,this.additionalReservedLineCount=i}renderForScreenReader(e){if(this.parts.length===0)return"";const t=this.parts[this.parts.length-1],i=e.substr(0,t.column-1);return Jce(i,this.parts.map(s=>({range:{startLineNumber:1,endLineNumber:1,startColumn:s.column,endColumn:s.column},text:s.lines.join(` -`)}))).substring(this.parts[0].column-1)}}class Qce{constructor(e){this.lineStartOffsetByLineIdx=[],this.lineStartOffsetByLineIdx.push(0);for(let t=0;t<e.length;t++)e.charAt(t)===` -`&&this.lineStartOffsetByLineIdx.push(t+1)}getOffset(e){return this.lineStartOffsetByLineIdx[e.lineNumber-1]+e.column-1}}function Jce(r,e){const t=new Qce(r),i=e.map(n=>{const s=k.lift(n.range);return{startOffset:t.getOffset(s.getStartPosition()),endOffset:t.getOffset(s.getEndPosition()),text:n.text}});i.sort((n,s)=>s.startOffset-n.startOffset);for(const n of i)r=r.substring(0,n.startOffset)+n.text+r.substring(n.endOffset);return r}class DW{constructor(e,t,i){this.column=e,this.lines=t,this.preview=i}}class EW extends Y{constructor(e){super();this.editor=e,this._expanded=void 0,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this._register(e.onDidChangeConfiguration(t=>{t.hasChanged(105)&&this._expanded===void 0&&this.onDidChangeEmitter.fire()}))}setExpanded(e){this._expanded=!0,this.onDidChangeEmitter.fire()}}function ehe(r,e){return r===e?!0:!r||!e?!1:r.range.equalsRange(e.range)&&r.text===e.text&&r.command===e.command}function IW(r,e,t,i,n=0){if(r.range.startLineNumber!==r.range.endLineNumber)return;const s=e.getLineContent(r.range.startLineNumber),o=Dt(s).length;if(r.range.startColumn-1<=o){const f=Dt(r.text).length,g=s.substring(r.range.startColumn-1,o),p=k.fromPositions(r.range.getStartPosition().delta(0,g.length),r.range.getEndPosition()),_=r.text.startsWith(g)?r.text.substring(g.length):r.text.substring(f);r={range:p,text:_,command:r.command}}const l=e.getValueInRange(r.range),c=the(l,r.text),h=r.range.startLineNumber,u=new Array;if(t==="prefix"){const f=c.filter(g=>g.originalLength===0);if(f.length>1||f.length===1&&f[0].originalStart!==l.length)return}const d=r.text.length-n;for(const f of c){const g=r.range.startColumn+f.originalStart+f.originalLength;if(t==="subwordSmart"&&i&&i.lineNumber===r.range.startLineNumber&&g<i.column||f.originalLength>0)return;if(f.modifiedLength===0)continue;const p=f.modifiedStart+f.modifiedLength,_=Math.max(f.modifiedStart,Math.min(p,d)),v=r.text.substring(f.modifiedStart,_),b=r.text.substring(_,Math.max(f.modifiedStart,p));if(v.length>0){const C=Bo(v);u.push(new DW(g,C,!1))}if(b.length>0){const C=Bo(b);u.push(new DW(g,C,!0))}}return new kW(h,u,0)}let pa;function the(r,e){if((pa==null?void 0:pa.originalValue)===r&&(pa==null?void 0:pa.newValue)===e)return pa==null?void 0:pa.changes;{const t=ihe(r,e);return pa={originalValue:r,newValue:e,changes:t},t}}function ihe(r,e){function t(l){let c=0;for(let h=0,u=l.length;h<u;h++){const d=l.charCodeAt(h);d>c&&(c=d)}return c}const i=Math.max(t(r),t(e));function n(l){if(l<0)throw new Error("unexpected");return i+l+1}function s(l){let c=0,h=0;const u=new Int32Array(l.length);for(let d=0,f=l.length;d<f;d++){const g=h*100+c;l[d]==="("?(u[d]=n(2*g),c++):l[d]===")"?(u[d]=n(2*g+1),c===1&&h++,c=Math.max(c-1,0)):u[d]=l.charCodeAt(d)}return u}const o=s(r),a=s(e);return new jo({getElements:()=>o},{getElements:()=>a}).ComputeDiff(!1).changes}var nhe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rhe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},_l=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let dT=class extends Y{constructor(e,t,i){super();this.editor=e,this.cache=t,this.commandService=i,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.completionSession=this._register(new An),this.active=!1,this.disposed=!1,this._register(i.onDidExecuteCommand(n=>{new Set([Sk.id,Lk.id,Lf.Tab.id,Lf.DeleteLeft.id,Lf.DeleteRight.id,xW,"acceptSelectedSuggestion"]).has(n.commandId)&&e.hasTextFocus()&&this.handleUserInput()})),this._register(this.editor.onDidType(n=>{this.handleUserInput()})),this._register(this.editor.onDidChangeCursorPosition(n=>{this.session&&!this.session.isValid&&this.hide()})),this._register(Xe(()=>{this.disposed=!0}))}handleUserInput(){this.session&&!this.session.isValid&&this.hide(),setTimeout(()=>{this.disposed||this.startSessionIfTriggered()},0)}get session(){return this.completionSession.value}get ghostText(){var e;return(e=this.session)===null||e===void 0?void 0:e.ghostText}get minReservedLineCount(){return this.session?this.session.minReservedLineCount:0}setExpanded(e){var t;(t=this.session)===null||t===void 0||t.setExpanded(e)}setActive(e){var t;this.active=e,e&&((t=this.session)===null||t===void 0||t.scheduleAutomaticUpdate())}startSessionIfTriggered(){!this.editor.getOption(54).enabled||this.session&&this.session.isValid||this.trigger(Xr.Automatic)}trigger(e){if(this.completionSession.value){e===Xr.Explicit&&this.completionSession.value.ensureUpdateWithExplicitContext();return}this.completionSession.value=new she(this.editor,this.editor.getPosition(),()=>this.active,this.commandService,this.cache,e),this.completionSession.value.takeOwnership(this.completionSession.value.onDidChange(()=>{this.onDidChangeEmitter.fire()}))}hide(){this.completionSession.clear(),this.onDidChangeEmitter.fire()}commitCurrentSuggestion(){var e;(e=this.session)===null||e===void 0||e.commitCurrentCompletion()}showNext(){var e;(e=this.session)===null||e===void 0||e.showNextInlineCompletion()}showPrevious(){var e;(e=this.session)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return _l(this,void 0,void 0,function*(){const t=yield(e=this.session)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};dT=nhe([rhe(2,fi)],dT);class she extends EW{constructor(e,t,i,n,s,o){super(e);this.triggerPosition=t,this.shouldUpdate=i,this.commandService=n,this.cache=s,this.initialTriggerKind=o,this.minReservedLineCount=0,this.updateOperation=this._register(new An),this.updateSoon=this._register(new Bt(()=>{let l=this.initialTriggerKind;return this.initialTriggerKind=Xr.Automatic,this.update(l)},50)),this.currentlySelectedCompletionId=void 0;let a;this._register(this.onDidChange(()=>{const l=this.currentCompletion;if(l&&l.sourceInlineCompletion!==a){a=l.sourceInlineCompletion;const c=l.sourceProvider;c.handleItemDidShow&&c.handleItemDidShow(l.sourceInlineCompletions,a)}})),this._register(Xe(()=>{this.cache.clear()})),this._register(this.editor.onDidChangeCursorPosition(l=>{this.cache.value&&this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeModelContent(l=>{this.scheduleAutomaticUpdate()})),this._register(vx.onDidChange(()=>{this.updateSoon.schedule()})),this.scheduleAutomaticUpdate()}fixAndGetIndexOfCurrentSelection(){if(!this.currentlySelectedCompletionId||!this.cache.value||this.cache.value.completions.length===0)return 0;const e=this.cache.value.completions.findIndex(t=>t.semanticId===this.currentlySelectedCompletionId);return e===-1?(this.currentlySelectedCompletionId=void 0,0):e}get currentCachedCompletion(){if(!!this.cache.value)return this.cache.value.completions[this.fixAndGetIndexOfCurrentSelection()]}showNextInlineCompletion(){var e;return _l(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const t=((e=this.cache.value)===null||e===void 0?void 0:e.completions)||[];if(t.length>0){const i=(this.fixAndGetIndexOfCurrentSelection()+1)%t.length;this.currentlySelectedCompletionId=t[i].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}showPreviousInlineCompletion(){var e;return _l(this,void 0,void 0,function*(){yield this.ensureUpdateWithExplicitContext();const t=((e=this.cache.value)===null||e===void 0?void 0:e.completions)||[];if(t.length>0){const i=(this.fixAndGetIndexOfCurrentSelection()+t.length-1)%t.length;this.currentlySelectedCompletionId=t[i].semanticId}else this.currentlySelectedCompletionId=void 0;this.onDidChangeEmitter.fire()})}ensureUpdateWithExplicitContext(){var e;return _l(this,void 0,void 0,function*(){this.updateOperation.value?this.updateOperation.value.triggerKind===Xr.Explicit?yield this.updateOperation.value.promise:yield this.update(Xr.Explicit):((e=this.cache.value)===null||e===void 0?void 0:e.triggerKind)!==Xr.Explicit&&(yield this.update(Xr.Explicit))})}hasMultipleInlineCompletions(){var e;return _l(this,void 0,void 0,function*(){return yield this.ensureUpdateWithExplicitContext(),(((e=this.cache.value)===null||e===void 0?void 0:e.completions.length)||0)>1})}get ghostText(){const e=this.currentCompletion,t=this.editor.getOptions().get(54).mode;return e?IW(e,this.editor.getModel(),t,this.editor.getPosition()):void 0}get currentCompletion(){const e=this.currentCachedCompletion;if(!!e)return e.toLiveInlineCompletion()}get isValid(){return this.editor.getPosition().lineNumber===this.triggerPosition.lineNumber}scheduleAutomaticUpdate(){this.updateOperation.clear(),this.updateSoon.schedule()}update(e){return _l(this,void 0,void 0,function*(){if(!this.shouldUpdate())return;const t=this.editor.getPosition(),i=Oi(s=>_l(this,void 0,void 0,function*(){let o;try{o=yield TW(t,this.editor.getModel(),{triggerKind:e,selectedSuggestionInfo:void 0},s)}catch(a){Oe(a);return}s.isCancellationRequested||(this.cache.setValue(this.editor,o,e),this.onDidChangeEmitter.fire())})),n=new NW(i,e);this.updateOperation.value=n,yield i,this.updateOperation.value===n&&this.updateOperation.clear()})}takeOwnership(e){this._register(e)}commitCurrentCompletion(){if(!this.ghostText)return;const e=this.currentCompletion;e&&this.commit(e)}commit(e){const t=this.cache.clearAndLeak();this.editor.executeEdits("inlineSuggestion.accept",[ci.replaceMove(e.range,e.text)]),e.command?this.commandService.executeCommand(e.command.id,...e.command.arguments||[]).finally(()=>{t==null||t.dispose()}).then(void 0,$i):t==null||t.dispose(),this.onDidChangeEmitter.fire()}}class NW{constructor(e,t){this.promise=e,this.triggerKind=t}dispose(){this.promise.cancel()}}class ohe extends Y{constructor(e,t,i,n){super();this.triggerKind=n;const s=e.deltaDecorations([],t.items.map(o=>({range:o.range,options:{description:"inline-completion-tracking-range"}})));this._register(Xe(()=>{e.deltaDecorations(s,[])})),this.completions=t.items.map((o,a)=>new ahe(o,s[a])),this._register(e.onDidChangeModelContent(()=>{let o=!1;const a=e.getModel();for(const l of this.completions){const c=a.getDecorationRange(l.decorationId);if(!c){Oe(new Error("Decoration has no range"));continue}l.synchronizedRange.equalsRange(c)||(o=!0,l.synchronizedRange=c)}o&&i()})),this._register(t)}}class ahe{constructor(e,t){this.inlineCompletion=e,this.decorationId=t,this.semanticId=JSON.stringify({text:this.inlineCompletion.text,startLine:this.inlineCompletion.range.startLineNumber,startColumn:this.inlineCompletion.range.startColumn,command:this.inlineCompletion.command}),this.synchronizedRange=e.range}toLiveInlineCompletion(){return{text:this.inlineCompletion.text,range:this.synchronizedRange,command:this.inlineCompletion.command,sourceProvider:this.inlineCompletion.sourceProvider,sourceInlineCompletions:this.inlineCompletion.sourceInlineCompletions,sourceInlineCompletion:this.inlineCompletion.sourceInlineCompletion}}}function lhe(r,e){const t=e.getWordAtPosition(r),i=e.getLineMaxColumn(r.lineNumber);return t?new k(r.lineNumber,t.startColumn,r.lineNumber,i):k.fromPositions(r,r.with(void 0,i))}function TW(r,e,t,i=et.None){return _l(this,void 0,void 0,function*(){const n=lhe(r,e),s=vx.all(e),o=yield Promise.all(s.map(l=>_l(this,void 0,void 0,function*(){const c=yield l.provideInlineCompletions(e,r,t,i);return{completions:c,provider:l,dispose:()=>{c&&l.freeInlineCompletions(c)}}}))),a=new Map;for(const l of o){const c=l.completions;if(c)for(const h of c.items.map(u=>({text:u.text,range:u.range?k.lift(u.range):n,command:u.command,sourceProvider:l.provider,sourceInlineCompletions:c,sourceInlineCompletion:u})))h.range.startLineNumber===h.range.endLineNumber&&a.set(JSON.stringify({text:h.text,range:h.range}),h)}return{items:[...a.values()],dispose:()=>{for(const l of o)l.dispose()}}})}function dy(r,e){if(!e)return e;const t=r.getValueInRange(e.range),i=Pd(t,e.text),n=r.getOffsetAt(e.range.getStartPosition())+i,s=r.getPositionAt(n),o=t.substr(i),a=hv(o,e.text),l=r.getPositionAt(Math.max(n,r.getOffsetAt(e.range.getEndPosition())-a));return{range:k.fromPositions(s,l),text:e.text.substr(i,e.text.length-i-a)}}class Bs{constructor(){this.value="",this.pos=0}static isDigitCharacter(e){return e>=48&&e<=57}static isVariableCharacter(e){return e===95||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};let e=this.pos,t=0,i=this.value.charCodeAt(e),n;if(n=Bs._table[i],typeof n=="number")return this.pos+=1,{type:n,pos:e,len:1};if(Bs.isDigitCharacter(i)){n=8;do t+=1,i=this.value.charCodeAt(e+t);while(Bs.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}if(Bs.isVariableCharacter(i)){n=9;do i=this.value.charCodeAt(e+ ++t);while(Bs.isVariableCharacter(i)||Bs.isDigitCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}n=10;do t+=1,i=this.value.charCodeAt(e+t);while(!isNaN(i)&&typeof Bs._table[i]=="undefined"&&!Bs.isDigitCharacter(i)&&!Bs.isVariableCharacter(i));return this.pos+=t,{type:n,pos:e,len:t}}}Bs._table={[36]:0,[58]:1,[44]:2,[123]:3,[125]:4,[92]:5,[47]:6,[124]:7,[43]:11,[45]:12,[63]:13};class Jf{constructor(){this._children=[]}appendChild(e){return e instanceof wr&&this._children[this._children.length-1]instanceof wr?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 o(a,l){for(const c of a)c.parent=l,o(c.children,c)}(t,i)}get children(){return this._children}get snippet(){let e=this;for(;;){if(!e)return;if(e instanceof fy)return e;e=e.parent}}toString(){return this.children.reduce((e,t)=>e+t.toString(),"")}len(){return 0}}class wr extends Jf{constructor(e){super();this.value=e}toString(){return this.value}len(){return this.value.length}clone(){return new wr(this.value)}}class AW extends Jf{}class Ws extends AW{constructor(e){super();this.index=e}static compareByIndex(e,t){return e.index===t.index?0:e.isFinalTabstop?1:t.isFinalTabstop||e.index<t.index?-1:e.index>t.index?1:0}get isFinalTabstop(){return this.index===0}get choice(){return this._children.length===1&&this._children[0]instanceof y_?this._children[0]:void 0}clone(){let e=new Ws(this.index);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}class y_ extends Jf{constructor(){super(...arguments);this.options=[]}appendChild(e){return e instanceof wr&&(e.parent=this,this.options.push(e)),this}toString(){return this.options[0].value}len(){return this.options[0].len()}clone(){let e=new y_;return this.options.forEach(e.appendChild,e),e}}class fT extends Jf{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(s=>s instanceof Co&&Boolean(s.elseValue))&&(n=this._replace([])),n}_replace(e){let t="";for(const i of this._children)if(i instanceof Co){let n=e[i.index]||"";n=i.resolve(n),t+=n}else t+=i.toString();return t}toString(){return""}clone(){let e=new fT;return e.regexp=new RegExp(this.regexp.source,""+(this.regexp.ignoreCase?"i":"")+(this.regexp.global?"g":"")),e._children=this.children.map(t=>t.clone()),e}}class Co extends Jf{constructor(e,t,i,n){super();this.index=e,this.shorthandName=t,this.ifValue=i,this.elseValue=n}resolve(e){return this.shorthandName==="upcase"?e?e.toLocaleUpperCase():"":this.shorthandName==="downcase"?e?e.toLocaleLowerCase():"":this.shorthandName==="capitalize"?e?e[0].toLocaleUpperCase()+e.substr(1):"":this.shorthandName==="pascalcase"?e?this._toPascalCase(e):"":this.shorthandName==="camelcase"?e?this._toCamelCase(e):"":Boolean(e)&&typeof this.ifValue=="string"?this.ifValue:!Boolean(e)&&typeof this.elseValue=="string"?this.elseValue:e||""}_toPascalCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map(i=>i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join(""):e}_toCamelCase(e){const t=e.match(/[a-z0-9]+/gi);return t?t.map((i,n)=>n===0?i.toLowerCase():i.charAt(0).toUpperCase()+i.substr(1).toLowerCase()).join(""):e}clone(){return new Co(this.index,this.shorthandName,this.ifValue,this.elseValue)}}class S_ extends AW{constructor(e){super();this.name=e}resolve(e){let t=e.resolve(this);return this.transform&&(t=this.transform.resolve(t||"")),t!==void 0?(this._children=[new wr(t)],!0):!1}clone(){const e=new S_(this.name);return this.transform&&(e.transform=this.transform.clone()),e._children=this.children.map(t=>t.clone()),e}}function RW(r,e){const t=[...r];for(;t.length>0;){const i=t.shift();if(!e(i))break;t.unshift(...i.children)}}class fy extends Jf{get placeholderInfo(){if(!this._placeholders){let e=[],t;this.walk(function(i){return i instanceof Ws&&(e.push(i),t=!t||t.index<i.index?i:t),!0}),this._placeholders={all:e,last:t}}return this._placeholders}get placeholders(){const{all:e}=this.placeholderInfo;return e}offset(e){let t=0,i=!1;return this.walk(n=>n===e?(i=!0,!1):(t+=n.len(),!0)),i?t:-1}fullLen(e){let t=0;return RW([e],i=>(t+=i.len(),!0)),t}enclosingPlaceholders(e){let t=[],{parent:i}=e;for(;i;)i instanceof Ws&&t.push(i),i=i.parent;return t}resolveVariables(e){return this.walk(t=>(t instanceof S_&&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(){let e=new fy;return this._children=this.children.map(t=>t.clone()),e}walk(e){RW(this.children,e)}}class gy{constructor(){this._scanner=new Bs,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){this._scanner.text(e),this._token=this._scanner.next();const n=new fy;for(;this._parse(n););const s=new Map,o=[];let a=0;n.walk(l=>(l instanceof Ws&&(a+=1,l.isFinalTabstop?s.set(0,void 0):!s.has(l.index)&&l.children.length>0?s.set(l.index,l.children):o.push(l)),!0));for(const l of o){const c=s.get(l.index);if(c){const h=new Ws(l.index);h.transform=l.transform;for(const u of c)h.appendChild(u.clone());n.replace(l,[h])}}return i||(i=a>0&&t),!s.has(0)&&i&&n.appendChild(new Ws(0)),n}_accept(e,t){if(e===void 0||this._token.type===e){let i=t?this._scanner.tokenText(this._token):!0;return this._token=this._scanner.next(),i}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(this._token.type===14)return!1;if(this._token.type===5){const n=this._scanner.next();if(n.type!==0&&n.type!==4&&n.type!==5)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 wr(t)),!0):!1}_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 Ws(Number(t)):new S_(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 s=new Ws(Number(t));if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new wr("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else if(s.index>0&&this._accept(7)){const o=new y_;for(;;){if(this._parseChoiceElement(o)){if(this._accept(2))continue;if(this._accept(7)&&(s.appendChild(o),this._accept(4)))return e.appendChild(s),!0}return this._backTo(i),!1}}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseChoiceElement(e){const t=this._token,i=[];for(;!(this._token.type===2||this._token.type===7);){let n;if((n=this._accept(5,!0))?n=this._accept(2,!0)||this._accept(7,!0)||this._accept(5,!0)||n:n=this._accept(void 0,!0),!n)return this._backTo(t),!1;i.push(n)}return i.length===0?(this._backTo(t),!1):(e.appendChild(new wr(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 s=new S_(t);if(this._accept(1))for(;;){if(this._accept(4))return e.appendChild(s),!0;if(!this._parse(s))return e.appendChild(new wr("${"+t+":")),s.children.forEach(e.appendChild,e),!0}else return this._accept(6)?this._parseTransform(s)?(e.appendChild(s),!0):(this._backTo(i),!1):this._accept(4)?(e.appendChild(s),!0):this._backTo(i)}_parseTransform(e){let t=new fT,i="",n="";for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(6,!0)||s,i+=s;continue}if(this._token.type!==14){i+=this._accept(void 0,!0);continue}return!1}for(;!this._accept(6);){let s;if(s=this._accept(5,!0)){s=this._accept(5,!0)||this._accept(6,!0)||s,t.appendChild(new wr(s));continue}if(!(this._parseFormatString(t)||this._parseAnything(t)))return!1}for(;!this._accept(4);){if(this._token.type!==14){n+=this._accept(void 0,!0);continue}return!1}try{t.regexp=new RegExp(i,n)}catch{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);let n=this._accept(8,!0);if(n)if(i){if(this._accept(4))return e.appendChild(new Co(Number(n))),!0;if(!this._accept(1))return this._backTo(t),!1}else return e.appendChild(new Co(Number(n))),!0;else return this._backTo(t),!1;if(this._accept(6)){let s=this._accept(9,!0);return!s||!this._accept(4)?(this._backTo(t),!1):(e.appendChild(new Co(Number(n),s)),!0)}else if(this._accept(11)){let s=this._until(4);if(s)return e.appendChild(new Co(Number(n),void 0,s,void 0)),!0}else if(this._accept(12)){let s=this._until(4);if(s)return e.appendChild(new Co(Number(n),void 0,void 0,s)),!0}else if(this._accept(13)){let s=this._until(1);if(s){let o=this._until(4);if(o)return e.appendChild(new Co(Number(n),void 0,s,o)),!0}}else{let s=this._until(4);if(s)return e.appendChild(new Co(Number(n),void 0,void 0,s)),!0}return this._backTo(t),!1}_parseAnything(e){return this._token.type!==14?(e.appendChild(new wr(this._scanner.tokenText(this._token))),this._accept(void 0),!0):!1}}const Zi=new Uint8Array(16),Hn=[];for(let r=0;r<256;r++)Hn.push(r.toString(16).padStart(2,"0"));let gT;typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?gT=crypto.getRandomValues.bind(crypto):gT=function(r){for(let e=0;e<r.length;e++)r[e]=Math.floor(Math.random()*256);return r};function che(){gT(Zi),Zi[6]=Zi[6]&15|64,Zi[8]=Zi[8]&63|128;let r=0,e="";return e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+="-",e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+="-",e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+="-",e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+="-",e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e+=Hn[Zi[r++]],e}const MW="code-workspace";function PW(r){const e=r;return typeof(e==null?void 0:e.id)=="string"&&Ie.isUri(e.uri)}function hhe(r){if(r.configuration)return{id:r.id,configPath:r.configuration};if(r.folders.length===1)return{id:r.id,uri:r.folders[0].uri}}class uhe{constructor(e){this._delegates=e}resolve(e){for(const t of this._delegates){let i=t.resolve(e);if(i!==void 0)return i}}}class dhe{constructor(e,t,i,n){this._model=e,this._selection=t,this._selectionIdx=i,this._overtypingCapturer=n}resolve(e){const{name:t}=e;if(t==="SELECTION"||t==="TM_SELECTED_TEXT"){let i=this._model.getValueInRange(this._selection)||void 0,n=this._selection.startLineNumber!==this._selection.endLineNumber;if(!i&&this._overtypingCapturer){const s=this._overtypingCapturer.getLastOvertypedInfo(this._selectionIdx);s&&(i=s.value,n=s.multiline)}if(i&&n&&e.snippet){const s=this._model.getLineContent(this._selection.startLineNumber),o=Dt(s,0,this._selection.startColumn-1);let a=o;e.snippet.walk(c=>c===e?!1:(c instanceof wr&&(a=Dt(Bo(c.value).pop())),!0));const l=Pd(a,o);i=i.replace(/(\r\n|\r|\n)(.*)/g,(c,h,u)=>`${h}${a.substr(l)}${u}`)}return i}else{if(t==="TM_CURRENT_LINE")return this._model.getLineContent(this._selection.positionLineNumber);if(t==="TM_CURRENT_WORD"){const i=this._model.getWordAtPosition({lineNumber:this._selection.positionLineNumber,column:this._selection.positionColumn});return i&&i.word||void 0}else{if(t==="TM_LINE_INDEX")return String(this._selection.positionLineNumber-1);if(t==="TM_LINE_NUMBER")return String(this._selection.positionLineNumber)}}}}class fhe{constructor(e,t){this._labelService=e,this._model=t}resolve(e){const{name:t}=e;if(t==="TM_FILENAME")return dh(this._model.uri.fsPath);if(t==="TM_FILENAME_BASE"){const i=dh(this._model.uri.fsPath),n=i.lastIndexOf(".");return n<=0?i:i.slice(0,n)}else{if(t==="TM_DIRECTORY")return IM(this._model.uri.fsPath)==="."?"":this._labelService.getUriLabel(tx(this._model.uri));if(t==="TM_FILEPATH")return this._labelService.getUriLabel(this._model.uri);if(t==="RELATIVE_FILEPATH")return this._labelService.getUriLabel(this._model.uri,{relative:!0,noPrefix:!0})}}}class ghe{constructor(e,t,i,n){this._readClipboardText=e,this._selectionIdx=t,this._selectionCount=i,this._spread=n}resolve(e){if(e.name!=="CLIPBOARD")return;const t=this._readClipboardText();if(!!t){if(this._spread){const i=t.split(/\r\n|\n|\r/).filter(n=>!n2(n));if(i.length===this._selectionCount)return i[this._selectionIdx]}return t}}}class phe{constructor(e,t){this._model=e,this._selection=t}resolve(e){const{name:t}=e,i=this._model.getLanguageIdAtPosition(this._selection.selectionStartLineNumber,this._selection.selectionStartColumn),n=ze.getComments(i);if(!!n){if(t==="LINE_COMMENT")return n.lineCommentToken||void 0;if(t==="BLOCK_COMMENT_START")return n.blockCommentStartToken||void 0;if(t==="BLOCK_COMMENT_END")return n.blockCommentEndToken||void 0}}}class ma{constructor(){this._date=new Date}resolve(e){const{name:t}=e;if(t==="CURRENT_YEAR")return String(this._date.getFullYear());if(t==="CURRENT_YEAR_SHORT")return String(this._date.getFullYear()).slice(-2);if(t==="CURRENT_MONTH")return String(this._date.getMonth().valueOf()+1).padStart(2,"0");if(t==="CURRENT_DATE")return String(this._date.getDate().valueOf()).padStart(2,"0");if(t==="CURRENT_HOUR")return String(this._date.getHours().valueOf()).padStart(2,"0");if(t==="CURRENT_MINUTE")return String(this._date.getMinutes().valueOf()).padStart(2,"0");if(t==="CURRENT_SECOND")return String(this._date.getSeconds().valueOf()).padStart(2,"0");if(t==="CURRENT_DAY_NAME")return ma.dayNames[this._date.getDay()];if(t==="CURRENT_DAY_NAME_SHORT")return ma.dayNamesShort[this._date.getDay()];if(t==="CURRENT_MONTH_NAME")return ma.monthNames[this._date.getMonth()];if(t==="CURRENT_MONTH_NAME_SHORT")return ma.monthNamesShort[this._date.getMonth()];if(t==="CURRENT_SECONDS_UNIX")return String(Math.floor(this._date.getTime()/1e3))}}ma.dayNames=[m("Sunday","Sunday"),m("Monday","Monday"),m("Tuesday","Tuesday"),m("Wednesday","Wednesday"),m("Thursday","Thursday"),m("Friday","Friday"),m("Saturday","Saturday")];ma.dayNamesShort=[m("SundayShort","Sun"),m("MondayShort","Mon"),m("TuesdayShort","Tue"),m("WednesdayShort","Wed"),m("ThursdayShort","Thu"),m("FridayShort","Fri"),m("SaturdayShort","Sat")];ma.monthNames=[m("January","January"),m("February","February"),m("March","March"),m("April","April"),m("May","May"),m("June","June"),m("July","July"),m("August","August"),m("September","September"),m("October","October"),m("November","November"),m("December","December")];ma.monthNamesShort=[m("JanuaryShort","Jan"),m("FebruaryShort","Feb"),m("MarchShort","Mar"),m("AprilShort","Apr"),m("MayShort","May"),m("JuneShort","Jun"),m("JulyShort","Jul"),m("AugustShort","Aug"),m("SeptemberShort","Sep"),m("OctoberShort","Oct"),m("NovemberShort","Nov"),m("DecemberShort","Dec")];class mhe{constructor(e){this._workspaceService=e}resolve(e){if(!this._workspaceService)return;const t=hhe(this._workspaceService.getWorkspace());if(!!t){if(e.name==="WORKSPACE_NAME")return this._resolveWorkspaceName(t);if(e.name==="WORKSPACE_FOLDER")return this._resoveWorkspacePath(t)}}_resolveWorkspaceName(e){if(PW(e))return dh(e.uri.path);let t=dh(e.configPath.path);return t.endsWith(MW)&&(t=t.substr(0,t.length-MW.length-1)),t}_resoveWorkspacePath(e){if(PW(e))return DN(e.uri.fsPath);let t=dh(e.configPath.path),i=e.configPath.fsPath;return i.endsWith(t)&&(i=i.substr(0,i.length-t.length-1)),i?DN(i):"/"}}class _he{resolve(e){const{name:t}=e;if(t==="RANDOM")return Math.random().toString().slice(-6);if(t==="RANDOM_HEX")return Math.random().toString(16).slice(-6);if(t==="UUID")return che()}}Lt((r,e)=>{function t(i){const n=r.getColor(i);return n?n.toString():"transparent"}e.addRule(`.monaco-editor .snippet-placeholder { background-color: ${t(WX)}; outline-color: ${t(VX)}; }`),e.addRule(`.monaco-editor .finish-snippet-placeholder { background-color: ${t(HX)}; outline-color: ${t(zX)}; }`)});class Vs{constructor(e,t,i,n){this._editor=e,this._snippet=t,this._offset=i,this._snippetLineLeadingWhitespace=n,this._nestingLevel=1,this._placeholderGroups=aP(t.placeholders,Ws.compareByIndex),this._placeholderGroupsIdx=-1}dispose(){this._placeholderDecorations&&this._editor.deltaDecorations([...this._placeholderDecorations.values()],[]),this._placeholderGroups.length=0}_initDecorations(){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=k.fromPositions(e.getPositionAt(this._offset+n),e.getPositionAt(this._offset+n+s)),a=i.isFinalTabstop?Vs._decor.inactiveFinal:Vs._decor.inactive,l=t.addDecoration(o,a);this._placeholderDecorations.set(i,l)}})}move(e){if(!this._editor.hasModel())return[];if(this._initDecorations(),this._placeholderGroupsIdx>=0){let n=[];for(const s of this._placeholderGroups[this._placeholderGroupsIdx])if(s.transform){const o=this._placeholderDecorations.get(s),a=this._editor.getModel().getDecorationRange(o),l=this._editor.getModel().getValueInRange(a),c=s.transform.resolve(l).split(/\r\n|\r|\n/);for(let h=1;h<c.length;h++)c[h]=this._editor.getModel().normalizeIndentation(this._snippetLineLeadingWhitespace+c[h]);n.push(ci.replace(a,c.join(this._editor.getModel().getEOL())))}n.length>0&&this._editor.executeEdits("snippet.placeholderTransform",n)}let t=!1;e===!0&&this._placeholderGroupsIdx<this._placeholderGroups.length-1?(this._placeholderGroupsIdx+=1,t=!0):e===!1&&this._placeholderGroupsIdx>0&&(this._placeholderGroupsIdx-=1,t=!0);const i=this._editor.getModel().changeDecorations(n=>{const s=new Set,o=[];for(const a of this._placeholderGroups[this._placeholderGroupsIdx]){const l=this._placeholderDecorations.get(a),c=this._editor.getModel().getDecorationRange(l);o.push(new be(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn)),t=t&&this._hasPlaceholderBeenCollapsed(a),n.changeDecorationOptions(l,a.isFinalTabstop?Vs._decor.activeFinal:Vs._decor.active),s.add(a);for(const h of this._snippet.enclosingPlaceholders(a)){const u=this._placeholderDecorations.get(h);n.changeDecorationOptions(u,h.isFinalTabstop?Vs._decor.activeFinal:Vs._decor.active),s.add(h)}}for(const[a,l]of this._placeholderDecorations)s.has(a)||n.changeDecorationOptions(l,a.isFinalTabstop?Vs._decor.inactiveFinal:Vs._decor.inactive);return o});return t?this.move(e):i!=null?i:[]}_hasPlaceholderBeenCollapsed(e){let t=e;for(;t;){if(t instanceof Ws){const i=this._placeholderDecorations.get(t);if(this._editor.getModel().getDecorationRange(i).isEmpty()&&t.toString().length>0)return!0}t=t.parent}return!1}get isAtFirstPlaceholder(){return this._placeholderGroupsIdx<=0||this._placeholderGroups.length===0}get isAtLastPlaceholder(){return this._placeholderGroupsIdx===this._placeholderGroups.length-1}get hasPlaceholder(){return this._snippet.placeholders.length>0}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 s=this._placeholderDecorations.get(n),o=this._editor.getModel().getDecorationRange(s);if(!o){e.delete(n.index);break}i.push(o)}}return e}get choice(){return this._placeholderGroups[this._placeholderGroupsIdx][0].choice}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(!s._placeholderDecorations);const o=s._snippet.placeholderInfo.last.index;for(const l of s._snippet.placeholderInfo.all)l.isFinalTabstop?l.index=n.index+(o+1)/this._nestingLevel:l.index=n.index+l.index/this._nestingLevel;this._snippet.replace(n,s._snippet.children);const a=this._placeholderDecorations.get(n);i.removeDecoration(a),this._placeholderDecorations.delete(n);for(const l of s._snippet.placeholders){const c=s._snippet.offset(l),h=s._snippet.fullLen(l),u=k.fromPositions(t.getPositionAt(s._offset+c),t.getPositionAt(s._offset+c+h)),d=i.addDecoration(u,Vs._decor.inactive);this._placeholderDecorations.set(l,d)}}this._placeholderGroups=aP(this._snippet.placeholders,Ws.compareByIndex)})}}Vs._decor={active:Ke.register({description:"snippet-placeholder-1",stickiness:0,className:"snippet-placeholder"}),inactive:Ke.register({description:"snippet-placeholder-2",stickiness:1,className:"snippet-placeholder"}),activeFinal:Ke.register({description:"snippet-placeholder-3",stickiness:1,className:"finish-snippet-placeholder"}),inactiveFinal:Ke.register({description:"snippet-placeholder-4",stickiness:1,className:"finish-snippet-placeholder"})};const OW={overwriteBefore:0,overwriteAfter:0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};class _a{constructor(e,t,i=OW){this._templateMerges=[],this._snippets=[],this._editor=e,this._template=t,this._options=i}static adjustWhitespace(e,t,i,n,s){const o=e.getLineContent(t.lineNumber),a=Dt(o,0,t.column-1);let l;return i.walk(c=>{if(!(c instanceof wr)||c.parent instanceof y_)return!0;const h=c.value.split(/\r\n|\r|\n/);if(n){const d=i.offset(c);if(d===0)h[0]=e.normalizeIndentation(h[0]);else{l=l!=null?l:i.toString();let f=l.charCodeAt(d-1);(f===10||f===13)&&(h[0]=e.normalizeIndentation(a+h[0]))}for(let f=1;f<h.length;f++)h[f]=e.normalizeIndentation(a+h[f])}const u=h.join(e.getEOL());return u!==c.value&&(c.parent.replace(c,[new wr(u)]),l=void 0),!0}),a}static adjustSelection(e,t,i,n){if(i!==0||n!==0){const{positionLineNumber:s,positionColumn:o}=t,a=o-i,l=o+n,c=e.validateRange({startLineNumber:s,startColumn:a,endLineNumber:s,endColumn:l});t=be.createWithDirection(c.startLineNumber,c.startColumn,c.endLineNumber,c.endColumn,t.getDirection())}return t}static createEditsAndSnippets(e,t,i,n,s,o,a,l){const c=[],h=[];if(!e.hasModel())return{edits:c,snippets:h};const u=e.getModel(),d=e.invokeWithinContext(y=>y.get(qP)),f=e.invokeWithinContext(y=>new fhe(y.get(zm),u)),g=()=>a;let p=0,_=u.getValueInRange(_a.adjustSelection(u,e.getSelection(),i,0)),v=u.getValueInRange(_a.adjustSelection(u,e.getSelection(),0,n)),b=u.getLineFirstNonWhitespaceColumn(e.getSelection().positionLineNumber);const C=e.getSelections().map((y,x)=>({selection:y,idx:x})).sort((y,x)=>k.compareRangesUsingStarts(y.selection,x.selection));for(const{selection:y,idx:x}of C){let S=_a.adjustSelection(u,y,i,0),w=_a.adjustSelection(u,y,0,n);_!==u.getValueInRange(S)&&(S=y),v!==u.getValueInRange(w)&&(w=y);const L=y.setStartPosition(S.startLineNumber,S.startColumn).setEndPosition(w.endLineNumber,w.endColumn),N=new gy().parse(t,!0,s),P=L.getStartPosition(),B=_a.adjustWhitespace(u,P,N,o||x>0&&b!==u.getLineFirstNonWhitespaceColumn(y.positionLineNumber),!0);N.resolveVariables(new uhe([f,new ghe(g,x,C.length,e.getOption(70)==="spread"),new dhe(u,y,x,l),new phe(u,y),new ma,new mhe(d),new _he]));const U=u.getOffsetAt(P)+p;p+=N.toString().length-u.getValueLengthInRange(L),c[x]=ci.replace(L,N.toString()),c[x].identifier={major:x,minor:0},h[x]=new Vs(e,N,U,B)}return{edits:c,snippets:h}}dispose(){ht(this._snippets)}_logInfo(){return`template="${this._template}", merged_templates="${this._templateMerges.join(" -> ")}"`}insert(){if(!this._editor.hasModel())return;const{edits:e,snippets:t}=_a.createEditsAndSnippets(this._editor,this._template,this._options.overwriteBefore,this._options.overwriteAfter,!1,this._options.adjustWhitespace,this._options.clipboardText,this._options.overtypingCapturer);this._snippets=t,this._editor.executeEdits("snippet",e,i=>this._snippets[0].hasPlaceholder?this._move(!0):i.filter(n=>!!n.identifier).map(n=>be.fromPositions(n.range.getEndPosition()))),this._editor.revealRange(this._editor.getSelections()[0])}merge(e,t=OW){if(!this._editor.hasModel())return;this._templateMerges.push([this._snippets[0]._nestingLevel,this._snippets[0]._placeholderGroupsIdx,e]);const{edits:i,snippets:n}=_a.createEditsAndSnippets(this._editor,e,t.overwriteBefore,t.overwriteAfter,!0,t.adjustWhitespace,t.clipboardText,t.overtypingCapturer);this._editor.executeEdits("snippet",i,s=>{for(const o of this._snippets)o.merge(n);return console.assert(n.length===0),this._snippets[0].hasPlaceholder?this._move(void 0):s.filter(o=>!!o.identifier).map(o=>be.fromPositions(o.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 choice(){return this._snippets[0].choice}isSelectionWithinPlaceholders(){if(!this.hasPlaceholder)return!1;const e=this._editor.getSelections();if(e.length<this._snippets.length)return!1;let t=new Map;for(const i of this._snippets){const n=i.computePossibleSelections();if(t.size===0)for(const[s,o]of n){o.sort(k.compareRangesUsingStarts);for(const a of e)if(o[0].containsRange(a)){t.set(s,[]);break}}if(t.size===0)return!1;t.forEach((s,o)=>{s.push(...n.get(o))})}e.sort(k.compareRangesUsingStarts);for(let[i,n]of t){if(n.length!==e.length){t.delete(i);continue}n.sort(k.compareRangesUsingStarts);for(let s=0;s<n.length;s++)if(!n[s].containsRange(e[s])){t.delete(i);continue}}return t.size>0}}var L_=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const st={Visible:new Le("suggestWidgetVisible",!1,m("suggestWidgetVisible","Whether suggestion are visible")),DetailsVisible:new Le("suggestWidgetDetailsVisible",!1,m("suggestWidgetDetailsVisible","Whether suggestion details are visible")),MultipleSuggestions:new Le("suggestWidgetMultipleSuggestions",!1,m("suggestWidgetMultipleSuggestions","Whether there are multiple suggestions to pick from")),MakesTextEdit:new Le("suggestionMakesTextEdit",!0,m("suggestionMakesTextEdit","Whether inserting the current suggestion yields in a change or has everything already been typed")),AcceptSuggestionsOnEnter:new Le("acceptSuggestionOnEnter",!0,m("acceptSuggestionOnEnter","Whether suggestions are inserted when pressing Enter")),HasInsertAndReplaceRange:new Le("suggestionHasInsertAndReplaceRange",!1,m("suggestionHasInsertAndReplaceRange","Whether the current suggestion has insert and replace behaviour")),InsertMode:new Le("suggestionInsertMode",void 0,{type:"string",description:m("suggestionInsertMode","Whether the default behaviour is to insert or replace")}),CanResolve:new Le("suggestionCanResolve",!1,m("suggestionCanResolve","Whether the current suggestion supports to resolve further details"))},Mc=new xe("suggestWidgetStatusBar");class bhe{constructor(e,t,i,n){this.position=e,this.completion=t,this.container=i,this.provider=n,this.isInvalid=!1,this.score=uo.Default,this.distance=0,this.textLabel=typeof t.label=="string"?t.label:t.label.label,this.labelLow=this.textLabel.toLowerCase(),this.isInvalid=!this.textLabel,this.sortTextLow=t.sortText&&t.sortText.toLowerCase(),this.filterTextLow=t.filterText&&t.filterText.toLowerCase(),k.isIRange(t.range)?(this.editStart=new $(t.range.startLineNumber,t.range.startColumn),this.editInsertEnd=new $(t.range.endLineNumber,t.range.endColumn),this.editReplaceEnd=new $(t.range.endLineNumber,t.range.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range)||t.range.startLineNumber!==e.lineNumber):(this.editStart=new $(t.range.insert.startLineNumber,t.range.insert.startColumn),this.editInsertEnd=new $(t.range.insert.endLineNumber,t.range.insert.endColumn),this.editReplaceEnd=new $(t.range.replace.endLineNumber,t.range.replace.endColumn),this.isInvalid=this.isInvalid||k.spansMultipleLines(t.range.insert)||k.spansMultipleLines(t.range.replace)||t.range.insert.startLineNumber!==e.lineNumber||t.range.replace.startLineNumber!==e.lineNumber||t.range.insert.startColumn!==t.range.replace.startColumn),typeof n.resolveCompletionItem!="function"&&(this._resolveCache=Promise.resolve(),this._isResolved=!0)}get isResolved(){return!!this._isResolved}resolve(e){return L_(this,void 0,void 0,function*(){if(!this._resolveCache){const t=e.onCancellationRequested(()=>{this._resolveCache=void 0,this._isResolved=!1});this._resolveCache=Promise.resolve(this.provider.resolveCompletionItem(this.completion,e)).then(i=>{Object.assign(this.completion,i),this._isResolved=!0,t.dispose()},i=>{Ro(i)&&(this._resolveCache=void 0,this._isResolved=!1)})}return this._resolveCache})}}class py{constructor(e=2,t=new Set,i=new Set,n=!0){this.snippetSortOrder=e,this.kindFilter=t,this.providerFilter=i,this.showDeprecated=n}}py.default=new py;let vhe;function Che(){return vhe}class whe{constructor(e,t,i,n){this.items=e,this.needsClipboard=t,this.durations=i,this.disposable=n}}function FW(r,e,t=py.default,i={triggerKind:0},n=et.None){return L_(this,void 0,void 0,function*(){const s=new Mo(!0);e=e.clone();const o=r.getWordAtPosition(e),a=o?new k(e.lineNumber,o.startColumn,e.lineNumber,o.endColumn):k.fromPositions(e),l={replace:a,insert:a.setEndPosition(e.lineNumber,e.column)},c=[],h=new le,u=[];let d=!1;const f=(p,_,v)=>{var b,C,y;if(!!_){for(let x of _.suggestions)if(!t.kindFilter.has(x.kind)){if(!t.showDeprecated&&((b=x==null?void 0:x.tags)===null||b===void 0?void 0:b.includes(1)))continue;x.range||(x.range=l),x.sortText||(x.sortText=typeof x.label=="string"?x.label:x.label.label),!d&&x.insertTextRules&&x.insertTextRules&4&&(d=gy.guessNeedsClipboard(x.insertText)),c.push(new bhe(e,x,_,p))}NS(_)&&h.add(_),u.push({providerName:(C=p._debugDisplayName)!==null&&C!==void 0?C:"unkown_provider",elapsedProvider:(y=_.duration)!==null&&y!==void 0?y:-1,elapsedOverall:v.elapsed()})}},g=(()=>L_(this,void 0,void 0,function*(){}))();for(let p of no.orderedGroups(r)){let _=c.length;if(yield Promise.all(p.map(v=>L_(this,void 0,void 0,function*(){if(!(t.providerFilter.size>0&&!t.providerFilter.has(v)))try{const b=new Mo(!0),C=yield v.provideCompletionItems(r,e,i,n);f(v,C,b)}catch(b){$i(b)}}))),_!==c.length||n.isCancellationRequested)break}return yield g,n.isCancellationRequested?(h.dispose(),Promise.reject(Dd())):new whe(c.sort(BW(t.snippetSortOrder)),d,{entries:u,elapsed:s.elapsed()},h)})}function pT(r,e){if(r.sortTextLow&&e.sortTextLow){if(r.sortTextLow<e.sortTextLow)return-1;if(r.sortTextLow>e.sortTextLow)return 1}return r.completion.label<e.completion.label?-1:r.completion.label>e.completion.label?1:r.completion.kind-e.completion.kind}function yhe(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return-1;if(e.completion.kind===27)return 1}return pT(r,e)}function She(r,e){if(r.completion.kind!==e.completion.kind){if(r.completion.kind===27)return 1;if(e.completion.kind===27)return-1}return pT(r,e)}const my=new Map;my.set(0,yhe);my.set(2,She);my.set(1,pT);function BW(r){return my.get(r)}lt.registerCommand("_executeCompletionItemProvider",(r,...e)=>L_(void 0,void 0,void 0,function*(){const[t,i,n,s]=e;Nt(Ie.isUri(t)),Nt($.isIPosition(i)),Nt(typeof n=="string"||!n),Nt(typeof s=="number"||!s);const o=yield r.get(so).createModelReference(t);try{const a={incomplete:!1,suggestions:[]},l=[],c=yield FW(o.object.textEditorModel,$.lift(i),void 0,{triggerCharacter:n,triggerKind:n?1:0});for(const h of c.items)l.length<(s!=null?s:0)&&l.push(h.resolve(et.None)),a.incomplete=a.incomplete||h.container.incomplete,a.suggestions.push(h.completion);try{return yield Promise.all(l),a}finally{setTimeout(()=>c.disposable.dispose(),100)}}finally{o.dispose()}}));const mT=new class{constructor(){this.onlyOnceSuggestions=[]}provideCompletionItems(){let e={suggestions:this.onlyOnceSuggestions.slice(0)};return this.onlyOnceSuggestions.length=0,e}};no.register("*",mT);function Lhe(r,e){setTimeout(()=>{mT.onlyOnceSuggestions.push(...e),r.getContribution("editor.contrib.suggestController").triggerSuggest(new Set().add(mT))},0)}var xhe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},WW=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const VW={overwriteBefore:0,overwriteAfter:0,undoStopBefore:!0,undoStopAfter:!0,adjustWhitespace:!0,clipboardText:void 0,overtypingCapturer:void 0};let on=class x_{constructor(e,t,i){this._editor=e,this._logService=t,this._snippetListener=new le,this._modelVersionId=-1,this._inSnippet=x_.InSnippetMode.bindTo(i),this._hasNextTabstop=x_.HasNextTabstop.bindTo(i),this._hasPrevTabstop=x_.HasPrevTabstop.bindTo(i)}static get(e){return e.getContribution(x_.ID)}dispose(){var e;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),(e=this._session)===null||e===void 0||e.dispose(),this._snippetListener.dispose()}insert(e,t){try{this._doInsert(e,typeof t=="undefined"?VW:Object.assign(Object.assign({},VW),t))}catch(i){this.cancel(),this._logService.error(i),this._logService.error("snippet_error"),this._logService.error("insert_template=",e),this._logService.error("existing_template=",this._session?this._session._logInfo():"<no_session>")}}_doInsert(e,t){!this._editor.hasModel()||(this._snippetListener.clear(),t.undoStopBefore&&this._editor.getModel().pushStackElement(),this._session?this._session.merge(e,t):(this._modelVersionId=this._editor.getModel().getAlternativeVersionId(),this._session=new _a(this._editor,e,t),this._session.insert()),t.undoStopAfter&&this._editor.getModel().pushStackElement(),this._updateState(),this._snippetListener.add(this._editor.onDidChangeModelContent(i=>i.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.cancel();this._inSnippet.set(!0),this._hasPrevTabstop.set(!this._session.isAtFirstPlaceholder),this._hasNextTabstop.set(!this._session.isAtLastPlaceholder),this._handleChoice()}}_handleChoice(){if(!this._session||!this._editor.hasModel()){this._currentChoice=void 0;return}const{choice:e}=this._session;if(!e){this._currentChoice=void 0;return}if(this._currentChoice!==e){this._currentChoice=e,this._editor.setSelections(this._editor.getSelections().map(i=>be.fromPositions(i.getStartPosition())));const[t]=e.options;Lhe(this._editor,e.options.map((i,n)=>({kind:13,label:i.value,insertText:i.value,sortText:"a".repeat(n+1),range:k.fromPositions(this._editor.getPosition(),this._editor.getPosition().delta(0,t.value.length))})))}}finish(){for(;this._inSnippet.get();)this.next()}cancel(e=!1){var t;this._inSnippet.reset(),this._hasPrevTabstop.reset(),this._hasNextTabstop.reset(),this._snippetListener.clear(),(t=this._session)===null||t===void 0||t.dispose(),this._session=void 0,this._modelVersionId=-1,e&&this._editor.setSelections([this._editor.getSelection()])}prev(){this._session&&this._session.prev(),this._updateState()}next(){this._session&&this._session.next(),this._updateState()}isInSnippet(){return Boolean(this._inSnippet.get())}};on.ID="snippetController2";on.InSnippetMode=new Le("inSnippetMode",!1,m("inSnippetMode","Whether the editor in current in snippet mode"));on.HasNextTabstop=new Le("hasNextTabstop",!1,m("hasNextTabstop","Whether there is a next tab stop when in snippet mode"));on.HasPrevTabstop=new Le("hasPrevTabstop",!1,m("hasPrevTabstop","Whether there is a previous tab stop when in snippet mode"));on=xhe([WW(1,Va),WW(2,Fe)],on);wt(on.ID,on);const _y=en.bindToContribution(on.get);fe(new _y({id:"jumpToNextSnippetPlaceholder",precondition:_e.and(on.InSnippetMode,on.HasNextTabstop),handler:r=>r.next(),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:2}}));fe(new _y({id:"jumpToPrevSnippetPlaceholder",precondition:_e.and(on.InSnippetMode,on.HasPrevTabstop),handler:r=>r.prev(),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:1024|2}}));fe(new _y({id:"leaveSnippet",precondition:on.InSnippetMode,handler:r=>r.cancel(!0),kbOpts:{weight:100+30,kbExpr:R.editorTextFocus,primary:9,secondary:[1024|9]}}));fe(new _y({id:"acceptSnippet",precondition:on.InSnippetMode,handler:r=>r.finish()}));var khe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_T=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class bT{constructor(e){this.name=e}select(e,t,i){if(i.length===0)return 0;let n=i[0].score[0];for(let s=0;s<i.length;s++){const{score:o,completion:a}=i[s];if(o[0]!==n)break;if(a.preselect)return s}return 0}}class HW extends bT{constructor(){super("first")}memorize(e,t,i){}toJSON(){}fromJSON(){}}class Dhe extends bT{constructor(){super("recentlyUsed");this._cache=new $l(300,.66),this._seq=0}memorize(e,t,i){const n=`${e.getLanguageIdentifier().language}/${i.textLabel}`;this._cache.set(n,{touch:this._seq++,type:i.completion.kind,insertText:i.completion.insertText})}select(e,t,i){if(i.length===0)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);let s=i[0].score[0],o=-1,a=-1,l=-1;for(let c=0;c<i.length&&i[c].score[0]===s;c++){const h=`${e.getLanguageIdentifier().language}/${i[c].textLabel}`,u=this._cache.peek(h);if(u&&u.touch>l&&u.type===i[c].completion.kind&&u.insertText===i[c].completion.insertText&&(l=u.touch,a=c),i[c].completion.preselect&&o===-1)return o=c}return a!==-1?a:o!==-1?o:0}toJSON(){return this._cache.toJSON()}fromJSON(e){this._cache.clear();let t=0;for(const[i,n]of e)n.touch=t,n.type=typeof n.type=="number"?n.type:H2(n.type),this._cache.set(i,n);this._seq=this._cache.size}}class Ehe extends bT{constructor(){super("recentlyUsedByPrefix");this._trie=Wd.forStrings(),this._seq=0}memorize(e,t,i){const{word:n}=e.getWordUntilPosition(t),s=`${e.getLanguageIdentifier().language}/${n}`;this._trie.set(s,{type:i.completion.kind,insertText:i.completion.insertText,touch:this._seq++})}select(e,t,i){let{word:n}=e.getWordUntilPosition(t);if(!n)return super.select(e,t,i);let s=`${e.getLanguageIdentifier().language}/${n}`,o=this._trie.get(s);if(o||(o=this._trie.findSubstr(s)),o)for(let a=0;a<i.length;a++){let{kind:l,insertText:c}=i[a].completion;if(l===o.type&&c===o.insertText)return a}return super.select(e,t,i)}toJSON(){let e=[];return this._trie.forEach((t,i)=>e.push([i,t])),e.sort((t,i)=>-(t[1].touch-i[1].touch)).forEach((t,i)=>t[1].touch=i),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=typeof i.type=="number"?i.type:H2(i.type),this._trie.set(t,i)}}}let k_=class by{constructor(e,t,i){this._storageService=e,this._modeService=t,this._configService=i,this._disposables=new le,this._persistSoon=new Bt(()=>this._saveState(),500),this._disposables.add(e.onWillSaveState(n=>{n.reason===S0.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,n;const s=this._configService.getValue("editor.suggestSelection",{overrideIdentifier:(i=this._modeService.getLanguageIdentifier(e.getLanguageIdAtPosition(t.lineNumber,t.column)))===null||i===void 0?void 0:i.language,resource:e.uri});if(((n=this._strategy)===null||n===void 0?void 0:n.name)!==s){this._saveState();const o=by._strategyCtors.get(s)||HW;this._strategy=new o;try{const l=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,c=this._storageService.get(`${by._storagePrefix}/${s}`,l);c&&this._strategy.fromJSON(JSON.parse(c))}catch{}}return this._strategy}_saveState(){if(this._strategy){const t=this._configService.getValue("editor.suggest.shareSuggestSelections")?0:1,i=JSON.stringify(this._strategy);this._storageService.store(`${by._storagePrefix}/${this._strategy.name}`,i,t,1)}}};k_._strategyCtors=new Map([["recentlyUsedByPrefix",Ehe],["recentlyUsed",Dhe],["first",HW]]);k_._storagePrefix="suggest/memories";k_=khe([_T(0,aa),_T(1,Ds),_T(2,hi)],k_);const zW=bt("ISuggestMemories");iu(zW,k_,!0);var Ihe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nhe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let D_=class $W{constructor(e,t){this._editor=e,this._enabled=!1,this._ckAtEnd=$W.AtEnd.bindTo(t),this._configListener=this._editor.onDidChangeConfiguration(i=>i.hasChanged(110)&&this._update()),this._update()}dispose(){var e;this._configListener.dispose(),(e=this._selectionListener)===null||e===void 0||e.dispose(),this._ckAtEnd.reset()}_update(){const e=this._editor.getOption(110)==="on";if(this._enabled!==e)if(this._enabled=e,this._enabled){const t=()=>{if(!this._editor.hasModel()){this._ckAtEnd.set(!1);return}const i=this._editor.getModel(),n=this._editor.getSelection(),s=i.getWordAtPosition(n.getStartPosition());if(!s){this._ckAtEnd.set(!1);return}this._ckAtEnd.set(s.endColumn===n.getStartPosition().column)};this._selectionListener=this._editor.onDidChangeCursorSelection(t),t()}else this._selectionListener&&(this._ckAtEnd.reset(),this._selectionListener.dispose(),this._selectionListener=void 0)}};D_.AtEnd=new Le("atEndOfWord",!1);D_=Ihe([Nhe(1,Fe)],D_);var The=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ahe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Bu=class vy{constructor(e,t){this._editor=e,this._index=0,this._ckOtherSuggestions=vy.OtherSuggestions.bindTo(t)}dispose(){this.reset()}reset(){var e;this._ckOtherSuggestions.reset(),(e=this._listener)===null||e===void 0||e.dispose(),this._model=void 0,this._acceptNext=void 0,this._ignore=!1}set({model:e,index:t},i){if(e.items.length===0){this.reset();return}if(vy._moveIndex(!0,e,t)===t){this.reset();return}this._acceptNext=i,this._model=e,this._index=t,this._listener=this._editor.onDidChangeCursorPosition(()=>{this._ignore||this.reset()}),this._ckOtherSuggestions.set(!0)}static _moveIndex(e,t,i){let n=i;for(;n=(n+t.items.length+(e?1:-1))%t.items.length,!(n===i||!t.items[n].completion.additionalTextEdits););return n}next(){this._move(!0)}prev(){this._move(!1)}_move(e){if(!!this._model)try{this._ignore=!0,this._index=vy._moveIndex(e,this._model,this._index),this._acceptNext({index:this._index,item:this._model.items[this._index],model:this._model})}finally{this._ignore=!1}}};Bu.OtherSuggestions=new Le("hasOtherSuggestions",!1);Bu=The([Ahe(1,Fe)],Bu);class Rhe{constructor(e,t,i){this._disposables=new le,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(n=>{if(this._active&&!t.isFrozen()){const s=n.charCodeAt(n.length-1);this._active.acceptCharacters.has(s)&&e.getOption(0)&&i(this._active.item)}}))}_onItem(e){if(!e||!gr(e.item.completion.commitCharacters)){this.reset();return}if(this._active&&this._active.item.item===e.item)return;const t=new Zd;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 Mhe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class $r{provideSelectionRanges(e,t){return Mhe(this,void 0,void 0,function*(){const i=[];for(const n of t){const s=[];i.push(s);const o=new Map;yield new Promise(a=>$r._bracketsRightYield(a,0,e,n,o)),yield new Promise(a=>$r._bracketsLeftYield(a,0,e,n,o,s))}return i})}static _bracketsRightYield(e,t,i,n,s){const o=new Map,a=Date.now();for(;;){if(t>=$r._maxRounds){e();break}if(!n){e();break}let l=i.findNextBracket(n);if(!l){e();break}if(Date.now()-a>$r._maxDuration){setTimeout(()=>$r._bracketsRightYield(e,t+1,i,n,s));break}const h=l.close[0];if(l.isOpen){let u=o.has(h)?o.get(h):0;o.set(h,u+1)}else{let u=o.has(h)?o.get(h):0;if(u-=1,o.set(h,Math.max(0,u)),u<0){let d=s.get(h);d||(d=new Ir,s.set(h,d)),d.push(l.range)}}n=l.range.getEndPosition()}}static _bracketsLeftYield(e,t,i,n,s,o){const a=new Map,l=Date.now();for(;;){if(t>=$r._maxRounds&&s.size===0){e();break}if(!n){e();break}let c=i.findPrevBracket(n);if(!c){e();break}if(Date.now()-l>$r._maxDuration){setTimeout(()=>$r._bracketsLeftYield(e,t+1,i,n,s,o));break}const u=c.close[0];if(c.isOpen){let d=a.has(u)?a.get(u):0;if(d-=1,a.set(u,Math.max(0,d)),d<0){let f=s.get(u);if(f){let g=f.shift();f.size===0&&s.delete(u);const p=k.fromPositions(c.range.getEndPosition(),g.getStartPosition()),_=k.fromPositions(c.range.getStartPosition(),g.getEndPosition());o.push({range:p}),o.push({range:_}),$r._addBracketLeading(i,_,o)}}}else{let d=a.has(u)?a.get(u):0;a.set(u,d+1)}n=c.range.getStartPosition()}}static _addBracketLeading(e,t,i){if(t.startLineNumber===t.endLineNumber)return;const n=t.startLineNumber,s=e.getLineFirstNonWhitespaceColumn(n);s!==0&&s!==t.startColumn&&(i.push({range:k.fromPositions(new $(n,s),t.getEndPosition())}),i.push({range:k.fromPositions(new $(n,1),t.getEndPosition())}));const o=n-1;if(o>0){const a=e.getLineFirstNonWhitespaceColumn(o);a===t.startColumn&&a!==e.getLineLastNonWhitespaceColumn(o)&&(i.push({range:k.fromPositions(new $(o,a),t.getEndPosition())}),i.push({range:k.fromPositions(new $(o,1),t.getEndPosition())}))}}}$r._maxDuration=30;$r._maxRounds=2;var Phe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class ba{static create(e,t){return Phe(this,void 0,void 0,function*(){if(!t.getOption(105).localityBonus||!t.hasModel())return ba.None;const i=t.getModel(),n=t.getPosition();if(!e.canComputeWordRanges(i.uri))return ba.None;const[s]=yield new $r().provideSelectionRanges(i,[n]);if(s.length===0)return ba.None;const o=yield e.computeWordRanges(i.uri,s[0].range);if(!o)return ba.None;const a=i.getWordUntilPosition(n);return delete o[a.word],new class extends ba{distance(l,c){if(!n.equals(t.getPosition()))return 0;if(c.kind===17)return 2<<20;let h=typeof c.label=="string"?c.label:c.label.label,u=o[h];if(lP(u))return 2<<20;let d=Bx(u,k.fromPositions(l),k.compareRangesUsingStarts),f=d>=0?u[d]:u[Math.max(0,~d-1)],g=s.length;for(const p of s){if(!k.containsRange(p.range,f))break;g-=1}return g}}})}}ba.None=new class extends ba{distance(){return 0}};class Wu{constructor(e,t,i,n,s,o,a){this.clipboardText=a,this._snippetCompareFn=Wu._compareCompletionItems,this._items=e,this._column=t,this._wordDistance=n,this._options=s,this._refilterKind=1,this._lineContext=i,o==="top"?this._snippetCompareFn=Wu._compareCompletionItemsSnippetsUp:o==="bottom"&&(this._snippetCompareFn=Wu._compareCompletionItemsSnippetsDown)}get lineContext(){return this._lineContext}set lineContext(e){(this._lineContext.leadingLineContent!==e.leadingLineContent||this._lineContext.characterCountDelta!==e.characterCountDelta)&&(this._refilterKind=this._lineContext.characterCountDelta<e.characterCountDelta&&this._filteredItems?2:1,this._lineContext=e)}get items(){return this._ensureCachedState(),this._filteredItems}get allProvider(){return this._ensureCachedState(),this._providerInfo.keys()}get incomplete(){this._ensureCachedState();const e=new Set;for(let[t,i]of this._providerInfo)i&&e.add(t);return e}adopt(e){let t=[];for(let i=0;i<this._items.length;)e.has(this._items[i].provider)?i++:(t.push(this._items[i]),this._items[i]=this._items[this._items.length-1],this._items.pop());return this._refilterKind=1,t}get stats(){return this._ensureCachedState(),this._stats}_ensureCachedState(){this._refilterKind!==0&&this._createCachedState()}_createCachedState(){this._providerInfo=new Map;const e=[],{leadingLineContent:t,characterCountDelta:i}=this._lineContext;let n="",s="";const o=this._refilterKind===1?this._items:this._filteredItems,a=[],l=!this._options.filterGraceful||o.length>2e3?Of:one;for(let c=0;c<o.length;c++){const h=o[c];if(h.isInvalid)continue;this._providerInfo.set(h.provider,Boolean(h.container.incomplete));const u=h.position.column-h.editStart.column,d=u+i-(h.position.column-this._column);if(n.length!==d&&(n=d===0?"":t.slice(-d),s=n.toLowerCase()),h.word=n,d===0)h.score=uo.Default;else{let f=0;for(;f<u;){const g=n.charCodeAt(f);if(g===32||g===9)f+=1;else break}if(f>=d)h.score=uo.Default;else if(typeof h.completion.filterText=="string"){let g=l(n,s,f,h.completion.filterText,h.filterTextLow,0,!1);if(!g)continue;KL(h.completion.filterText,h.textLabel)===0?h.score=g:(h.score=ine(n,s,f,h.textLabel,h.labelLow,0),h.score[0]=g[0])}else{let g=l(n,s,f,h.textLabel,h.labelLow,0,!1);if(!g)continue;h.score=g}}h.idx=c,h.distance=this._wordDistance.distance(h.position,h.completion),a.push(h),e.push(h.textLabel.length)}this._filteredItems=a.sort(this._snippetCompareFn),this._refilterKind=0,this._stats={pLabelLen:e.length?Wx(e.length-.85,e,(c,h)=>c-h):0}}static _compareCompletionItems(e,t){return e.score[0]>t.score[0]?-1:e.score[0]<t.score[0]?1:e.distance<t.distance?-1:e.distance>t.distance?1:e.idx<t.idx?-1:e.idx>t.idx?1:0}static _compareCompletionItemsSnippetsDown(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return 1;if(t.completion.kind===27)return-1}return Wu._compareCompletionItems(e,t)}static _compareCompletionItemsSnippetsUp(e,t){if(e.completion.kind!==t.completion.kind){if(e.completion.kind===27)return-1;if(t.completion.kind===27)return 1}return Wu._compareCompletionItems(e,t)}}var Ohe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},eg=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Fhe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class tg{constructor(e,t,i,n){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.auto=i,this.shy=n}static shouldAutoTrigger(e){if(!e.hasModel())return!1;const t=e.getModel(),i=e.getPosition();t.tokenizeIfCheap(i.lineNumber);const n=t.getWordAtPosition(i);return!(!n||n.endColumn!==i.column||!isNaN(Number(n.word)))}}function Bhe(r,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowQuickSuggestions");return i!==void 0?Boolean(i):!1}function Whe(r,e,t){if(!Boolean(e.getContextKeyValue("inlineSuggestionVisible")))return!0;const i=t.getValue("editor.inlineSuggest.allowSuggestOnTriggerCharacters");return i!==void 0?Boolean(i):!1}let vT=class UW{constructor(e,t,i,n,s,o,a){this._editor=e,this._editorWorkerService=t,this._clipboardService=i,this._telemetryService=n,this._logService=s,this._contextKeyService=o,this._configurationService=a,this._toDispose=new le,this._quickSuggestDelay=10,this._triggerCharacterListener=new le,this._triggerQuickSuggest=new Xn,this._state=0,this._completionDisposables=new le,this._onDidCancel=new H,this._onDidTrigger=new H,this._onDidSuggest=new H,this.onDidCancel=this._onDidCancel.event,this.onDidTrigger=this._onDidTrigger.event,this.onDidSuggest=this._onDidSuggest.event,this._telemetryGate=0,this._currentSelection=this._editor.getSelection()||new be(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._updateQuickSuggest()})),this._toDispose.add(no.onDidChange(()=>{this._updateTriggerCharacters(),this._updateActiveSuggestSession()})),this._toDispose.add(this._editor.onDidChangeCursorSelection(c=>{this._onCursorChange(c)}));let l=!1;this._toDispose.add(this._editor.onDidCompositionStart(()=>{l=!0})),this._toDispose.add(this._editor.onDidCompositionEnd(()=>{l=!1,this._refilterCompletionItems()})),this._toDispose.add(this._editor.onDidChangeModelContent(()=>{l||this._refilterCompletionItems()})),this._updateTriggerCharacters(),this._updateQuickSuggest()}dispose(){ht(this._triggerCharacterListener),ht([this._onDidCancel,this._onDidSuggest,this._onDidTrigger,this._triggerQuickSuggest]),this._toDispose.dispose(),this._completionDisposables.dispose(),this.cancel()}_updateQuickSuggest(){this._quickSuggestDelay=this._editor.getOption(79),(isNaN(this._quickSuggestDelay)||!this._quickSuggestDelay&&this._quickSuggestDelay!==0||this._quickSuggestDelay<0)&&(this._quickSuggestDelay=10)}_updateTriggerCharacters(){if(this._triggerCharacterListener.clear(),this._editor.getOption(80)||!this._editor.hasModel()||!this._editor.getOption(108))return;const e=new Map;for(const i of no.all(this._editor.getModel()))for(const n of i.triggerCharacters||[]){let s=e.get(n);s||(s=new Set,s.add(Che()),e.set(n,s)),s.add(i)}const t=i=>{if(!Whe(this._editor,this._contextKeyService,this._configurationService)||tg.shouldAutoTrigger(this._editor))return;if(!i){const o=this._editor.getPosition();i=this._editor.getModel().getLineContent(o.lineNumber).substr(0,o.column-1)}let n="";Od(i.charCodeAt(i.length-1))?ji(i.charCodeAt(i.length-2))&&(n=i.substr(i.length-2)):n=i.charAt(i.length-1);const s=e.get(n);if(s){const o=this._completionModel?{items:this._completionModel.adopt(s),clipboardText:this._completionModel.clipboardText}:void 0;this.trigger({auto:!0,shy:!1,triggerCharacter:n},Boolean(this._completionModel),s,o)}};this._triggerCharacterListener.add(this._editor.onDidType(t)),this._triggerCharacterListener.add(this._editor.onDidCompositionEnd(t))}get state(){return this._state}cancel(e=!1){var t;this._state!==0&&(this._triggerQuickSuggest.cancel(),(t=this._requestToken)===null||t===void 0||t.cancel(),this._requestToken=void 0,this._state=0,this._completionModel=void 0,this._context=void 0,this._onDidCancel.fire({retrigger:e}))}clear(){this._completionDisposables.clear()}_updateActiveSuggestSession(){this._state!==0&&(!this._editor.hasModel()||!no.has(this._editor.getModel())?this.cancel():this.trigger({auto:this._state===2,shy:!1},!0))}_onCursorChange(e){if(!this._editor.hasModel())return;const t=this._editor.getModel(),i=this._currentSelection;if(this._currentSelection=this._editor.getSelection(),!e.selection.isEmpty()||e.reason!==0&&e.reason!==3||e.source!=="keyboard"&&e.source!=="deleteLeft"){this.cancel();return}if(!!no.has(t))if(this._state===0&&e.reason===0){if(this._editor.getOption(78)===!1||!i.containsRange(this._currentSelection)&&!i.getEndPosition().isBeforeOrEqual(this._currentSelection.getPosition())||this._editor.getOption(105).snippetsPreventQuickSuggestions&&on.get(this._editor).isInSnippet())return;this.cancel(),this._triggerQuickSuggest.cancelAndSet(()=>{if(this._state!==0||!tg.shouldAutoTrigger(this._editor)||!this._editor.hasModel())return;const n=this._editor.getModel(),s=this._editor.getPosition(),o=this._editor.getOption(78);if(o!==!1){if(o!==!0){n.tokenizeIfCheap(s.lineNumber);const a=n.getLineTokens(s.lineNumber),l=a.getStandardTokenType(a.findTokenIndexAtOffset(Math.max(s.column-1-1,0)));if(!(o.other&&l===0||o.comments&&l===1||o.strings&&l===2))return}!Bhe(this._editor,this._contextKeyService,this._configurationService)||this.trigger({auto:!0,shy:!1})}},this._quickSuggestDelay)}else this._state!==0&&e.reason===3&&this._refilterCompletionItems()}_refilterCompletionItems(){Promise.resolve().then(()=>{if(this._state===0||!this._editor.hasModel())return;const e=this._editor.getModel(),t=this._editor.getPosition(),i=new tg(e,t,this._state===2,!1);this._onNewContext(i)})}trigger(e,t=!1,i,n){var s;if(!this._editor.hasModel())return;const o=this._editor.getModel(),a=e.auto,l=new tg(o,this._editor.getPosition(),a,e.shy);this.cancel(t),this._state=a?2:1,this._onDidTrigger.fire({auto:a,shy:e.shy,position:this._editor.getPosition()}),this._context=l;let c={triggerKind:(s=e.triggerKind)!==null&&s!==void 0?s:0};e.triggerCharacter&&(c={triggerKind:1,triggerCharacter:e.triggerCharacter}),this._requestToken=new Rn;const h=this._editor.getOption(100);let u=1;switch(h){case"top":u=0;break;case"bottom":u=2;break}const{itemKind:d,showDeprecated:f}=UW._createSuggestFilter(this._editor),g=ba.create(this._editorWorkerService,this._editor),p=FW(o,this._editor.getPosition(),new py(u,d,i,f),c,this._requestToken.token);Promise.all([p,g]).then(([_,v])=>Fhe(this,void 0,void 0,function*(){var b;if((b=this._requestToken)===null||b===void 0||b.dispose(),!this._editor.hasModel())return;let C=n==null?void 0:n.clipboardText;if(!C&&_.needsClipboard&&(C=yield this._clipboardService.readText()),this._state===0)return;const y=this._editor.getModel();let x=_.items;if(n){const w=BW(u);x=x.concat(n.items).sort(w)}const S=new tg(y,this._editor.getPosition(),a,e.shy);this._completionModel=new Wu(x,this._context.column,{leadingLineContent:S.leadingLineContent,characterCountDelta:S.column-this._context.column},v,this._editor.getOption(105),this._editor.getOption(100),C),this._completionDisposables.add(_.disposable),this._onNewContext(S),this._reportDurationsTelemetry(_.durations)})).catch(Oe)}_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;e.getOption(100)==="none"&&t.add(27);const n=e.getOption(105);return n.showMethods||t.add(0),n.showFunctions||t.add(1),n.showConstructors||t.add(2),n.showFields||t.add(3),n.showVariables||t.add(4),n.showClasses||t.add(5),n.showStructs||t.add(6),n.showInterfaces||t.add(7),n.showModules||t.add(8),n.showProperties||t.add(9),n.showEvents||t.add(10),n.showOperators||t.add(11),n.showUnits||t.add(12),n.showValues||t.add(13),n.showConstants||t.add(14),n.showEnums||t.add(15),n.showEnumMembers||t.add(16),n.showKeywords||t.add(17),n.showWords||t.add(18),n.showColors||t.add(19),n.showFiles||t.add(20),n.showReferences||t.add(21),n.showColors||t.add(22),n.showFolders||t.add(23),n.showTypeParameters||t.add(24),n.showSnippets||t.add(27),n.showUsers||t.add(25),n.showIssues||t.add(26),{itemKind:t,showDeprecated:n.showDeprecated}}_onNewContext(e){if(!!this._context){if(e.lineNumber!==this._context.lineNumber){this.cancel();return}if(Dt(e.leadingLineContent)!==Dt(this._context.leadingLineContent)){this.cancel();return}if(e.column<this._context.column){e.leadingWord.word?this.trigger({auto:this._context.auto,shy:!1},!0):this.cancel();return}if(!!this._completionModel){if(e.leadingWord.word.length!==0&&e.leadingWord.startColumn>this._context.leadingWord.startColumn){const t=new Set(no.all(this._editor.getModel()));for(let n of this._completionModel.allProvider)t.delete(n);const i=this._completionModel.adopt(new Set);this.trigger({auto:this._context.auto,shy:!1},!0,t,{items:i,clipboardText:this._completionModel.clipboardText});return}if(e.column>this._context.column&&this._completionModel.incomplete.size>0&&e.leadingWord.word.length!==0){const{incomplete:t}=this._completionModel,i=this._completionModel.adopt(t);this.trigger({auto:this._state===2,shy:!1,triggerKind:2},!0,t,{items:i,clipboardText:this._completionModel.clipboardText})}else{let t=this._completionModel.lineContext,i=!1;if(this._completionModel.lineContext={leadingLineContent:e.leadingLineContent,characterCountDelta:e.column-this._context.column},this._completionModel.items.length===0){if(tg.shouldAutoTrigger(this._editor)&&this._context.leadingWord.endColumn<e.leadingWord.startColumn){this.trigger({auto:this._context.auto,shy:!1},!0);return}if(this._context.auto){this.cancel();return}else if(this._completionModel.lineContext=t,i=this._completionModel.items.length>0,i&&e.leadingWord.word.length===0){this.cancel();return}}this._onDidSuggest.fire({completionModel:this._completionModel,auto:this._context.auto,shy:this._context.shy,isFrozen:i})}}}}};vT=Ohe([eg(1,ks),eg(2,bc),eg(3,ec),eg(4,Va),eg(5,Fe),eg(6,hi)],vT);class Cy{constructor(e,t){this._disposables=new le,this._lastOvertyped=[],this._empty=!0,this._disposables.add(e.onWillType(()=>{if(!this._empty||!e.hasModel())return;const i=e.getSelections(),n=i.length;let s=!1;for(let a=0;a<n;a++)if(!i[a].isEmpty()){s=!0;break}if(!s)return;this._lastOvertyped=[];const o=e.getModel();for(let a=0;a<n;a++){const l=i[a];if(o.getValueLengthInRange(l)>Cy._maxSelectionLength)return;this._lastOvertyped[a]={value:o.getValueInRange(l),multiline:l.startLineNumber!==l.endLineNumber}}this._empty=!1})),this._disposables.add(t.onDidCancel(i=>{!this._empty&&!i.retrigger&&(this._empty=!0)}))}getLastOvertypedInfo(e){if(!this._empty&&e>=0&&e<this._lastOvertyped.length)return this._lastOvertyped[e]}dispose(){this._disposables.dispose()}}Cy._maxSelectionLength=51200;var Vhe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},CT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class wT extends qf{updateLabel(){const e=this._keybindingService.lookupKeybinding(this._action.id,this._contextKeyService);if(!e)return super.updateLabel();this.label&&(this.label.textContent=m("ddd","{0} ({1})",this._action.label,wT.symbolPrintEnter(e)))}static symbolPrintEnter(e){var t;return(t=e.getLabel())===null||t===void 0?void 0:t.replace(/\benter\b/gi,"\u23CE")}}let yT=class{constructor(e,t,i,n){this._menuService=i,this._contextKeyService=n,this._menuDisposables=new le,this.element=X(e,oe(".suggest-status-bar"));const s=o=>o instanceof Jl?t.createInstance(wT,o,void 0):void 0;this._leftActions=new il(this.element,{actionViewItemProvider:s}),this._rightActions=new il(this.element,{actionViewItemProvider:s}),this._leftActions.domNode.classList.add("left"),this._rightActions.domNode.classList.add("right")}dispose(){this._menuDisposables.dispose(),this.element.remove()}show(){const e=this._menuService.createMenu(Mc,this._contextKeyService),t=()=>{const i=[],n=[];for(let[s,o]of e.getActions())s==="left"?i.push(...o):n.push(...o);this._leftActions.clear(),this._leftActions.push(i),this._rightActions.clear(),this._rightActions.push(n)};this._menuDisposables.add(e.onDidChange(()=>t())),this._menuDisposables.add(e)}hide(){this._menuDisposables.clear()}};yT=Vhe([CT(1,ut),CT(2,Th),CT(3,Fe)],yT);const Hhe=V("symbolIcon.arrayForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.arrayForeground","The foreground color for array symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),zhe=V("symbolIcon.booleanForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.booleanForeground","The foreground color for boolean symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),$he=V("symbolIcon.classForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.classForeground","The foreground color for class symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Uhe=V("symbolIcon.colorForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.colorForeground","The foreground color for color symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),jhe=V("symbolIcon.constantForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.constantForeground","The foreground color for constant symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Khe=V("symbolIcon.constructorForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.constructorForeground","The foreground color for constructor symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),qhe=V("symbolIcon.enumeratorForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.enumeratorForeground","The foreground color for enumerator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Ghe=V("symbolIcon.enumeratorMemberForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.enumeratorMemberForeground","The foreground color for enumerator member symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Zhe=V("symbolIcon.eventForeground",{dark:"#EE9D28",light:"#D67E00",hc:"#EE9D28"},m("symbolIcon.eventForeground","The foreground color for event symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Yhe=V("symbolIcon.fieldForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.fieldForeground","The foreground color for field symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Xhe=V("symbolIcon.fileForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.fileForeground","The foreground color for file symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Qhe=V("symbolIcon.folderForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.folderForeground","The foreground color for folder symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),Jhe=V("symbolIcon.functionForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.functionForeground","The foreground color for function symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),eue=V("symbolIcon.interfaceForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.interfaceForeground","The foreground color for interface symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),tue=V("symbolIcon.keyForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.keyForeground","The foreground color for key symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),iue=V("symbolIcon.keywordForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.keywordForeground","The foreground color for keyword symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),nue=V("symbolIcon.methodForeground",{dark:"#B180D7",light:"#652D90",hc:"#B180D7"},m("symbolIcon.methodForeground","The foreground color for method symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),rue=V("symbolIcon.moduleForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.moduleForeground","The foreground color for module symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),sue=V("symbolIcon.namespaceForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.namespaceForeground","The foreground color for namespace symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),oue=V("symbolIcon.nullForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.nullForeground","The foreground color for null symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),aue=V("symbolIcon.numberForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.numberForeground","The foreground color for number symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),lue=V("symbolIcon.objectForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.objectForeground","The foreground color for object symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),cue=V("symbolIcon.operatorForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.operatorForeground","The foreground color for operator symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),hue=V("symbolIcon.packageForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.packageForeground","The foreground color for package symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),uue=V("symbolIcon.propertyForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.propertyForeground","The foreground color for property symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),due=V("symbolIcon.referenceForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.referenceForeground","The foreground color for reference symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),fue=V("symbolIcon.snippetForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.snippetForeground","The foreground color for snippet symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),gue=V("symbolIcon.stringForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.stringForeground","The foreground color for string symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),pue=V("symbolIcon.structForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.structForeground","The foreground color for struct symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),mue=V("symbolIcon.textForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.textForeground","The foreground color for text symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),_ue=V("symbolIcon.typeParameterForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.typeParameterForeground","The foreground color for type parameter symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),bue=V("symbolIcon.unitForeground",{dark:Ne,light:Ne,hc:Ne},m("symbolIcon.unitForeground","The foreground color for unit symbols. These symbols appear in the outline, breadcrumb, and suggest widget.")),vue=V("symbolIcon.variableForeground",{dark:"#75BEFF",light:"#007ACC",hc:"#75BEFF"},m("symbolIcon.variableForeground","The foreground color for variable symbols. These symbols appear in the outline, breadcrumb, and suggest widget."));Lt((r,e)=>{const t=r.getColor(Hhe);t&&e.addRule(`${ve.symbolArray.cssSelector} { color: ${t}; }`);const i=r.getColor(zhe);i&&e.addRule(`${ve.symbolBoolean.cssSelector} { color: ${i}; }`);const n=r.getColor($he);n&&e.addRule(`${ve.symbolClass.cssSelector} { color: ${n}; }`);const s=r.getColor(nue);s&&e.addRule(`${ve.symbolMethod.cssSelector} { color: ${s}; }`);const o=r.getColor(Uhe);o&&e.addRule(`${ve.symbolColor.cssSelector} { color: ${o}; }`);const a=r.getColor(jhe);a&&e.addRule(`${ve.symbolConstant.cssSelector} { color: ${a}; }`);const l=r.getColor(Khe);l&&e.addRule(`${ve.symbolConstructor.cssSelector} { color: ${l}; }`);const c=r.getColor(qhe);c&&e.addRule(` - ${ve.symbolValue.cssSelector},${ve.symbolEnum.cssSelector} { color: ${c}; }`);const h=r.getColor(Ghe);h&&e.addRule(`${ve.symbolEnumMember.cssSelector} { color: ${h}; }`);const u=r.getColor(Zhe);u&&e.addRule(`${ve.symbolEvent.cssSelector} { color: ${u}; }`);const d=r.getColor(Yhe);d&&e.addRule(`${ve.symbolField.cssSelector} { color: ${d}; }`);const f=r.getColor(Xhe);f&&e.addRule(`${ve.symbolFile.cssSelector} { color: ${f}; }`);const g=r.getColor(Qhe);g&&e.addRule(`${ve.symbolFolder.cssSelector} { color: ${g}; }`);const p=r.getColor(Jhe);p&&e.addRule(`${ve.symbolFunction.cssSelector} { color: ${p}; }`);const _=r.getColor(eue);_&&e.addRule(`${ve.symbolInterface.cssSelector} { color: ${_}; }`);const v=r.getColor(tue);v&&e.addRule(`${ve.symbolKey.cssSelector} { color: ${v}; }`);const b=r.getColor(iue);b&&e.addRule(`${ve.symbolKeyword.cssSelector} { color: ${b}; }`);const C=r.getColor(rue);C&&e.addRule(`${ve.symbolModule.cssSelector} { color: ${C}; }`);const y=r.getColor(sue);y&&e.addRule(`${ve.symbolNamespace.cssSelector} { color: ${y}; }`);const x=r.getColor(oue);x&&e.addRule(`${ve.symbolNull.cssSelector} { color: ${x}; }`);const S=r.getColor(aue);S&&e.addRule(`${ve.symbolNumber.cssSelector} { color: ${S}; }`);const w=r.getColor(lue);w&&e.addRule(`${ve.symbolObject.cssSelector} { color: ${w}; }`);const L=r.getColor(cue);L&&e.addRule(`${ve.symbolOperator.cssSelector} { color: ${L}; }`);const N=r.getColor(hue);N&&e.addRule(`${ve.symbolPackage.cssSelector} { color: ${N}; }`);const P=r.getColor(uue);P&&e.addRule(`${ve.symbolProperty.cssSelector} { color: ${P}; }`);const B=r.getColor(due);B&&e.addRule(`${ve.symbolReference.cssSelector} { color: ${B}; }`);const U=r.getColor(fue);U&&e.addRule(`${ve.symbolSnippet.cssSelector} { color: ${U}; }`);const j=r.getColor(gue);j&&e.addRule(`${ve.symbolString.cssSelector} { color: ${j}; }`);const re=r.getColor(pue);re&&e.addRule(`${ve.symbolStruct.cssSelector} { color: ${re}; }`);const te=r.getColor(mue);te&&e.addRule(`${ve.symbolText.cssSelector} { color: ${te}; }`);const A=r.getColor(_ue);A&&e.addRule(`${ve.symbolTypeParameter.cssSelector} { color: ${A}; }`);const D=r.getColor(bue);D&&e.addRule(`${ve.symbolUnit.cssSelector} { color: ${D}; }`);const M=r.getColor(vue);M&&e.addRule(`${ve.symbolVariable.cssSelector} { color: ${M}; }`)});class jW{constructor(){this._onDidWillResize=new H,this.onDidWillResize=this._onDidWillResize.event,this._onDidResize=new H,this.onDidResize=this._onDidResize.event,this._sashListener=new le,this._size=new Wt(0,0),this._minSize=new Wt(0,0),this._maxSize=new Wt(Number.MAX_SAFE_INTEGER,Number.MAX_SAFE_INTEGER),this.domNode=document.createElement("div"),this._eastSash=new _n(this.domNode,{getVerticalSashLeft:()=>this._size.width},{orientation:0}),this._westSash=new _n(this.domNode,{getVerticalSashLeft:()=>0},{orientation:0}),this._northSash=new _n(this.domNode,{getHorizontalSashTop:()=>0},{orientation:1,orthogonalEdge:Pw.North}),this._southSash=new _n(this.domNode,{getHorizontalSashTop:()=>this._size.height},{orientation:1,orthogonalEdge:Pw.South}),this._northSash.orthogonalStartSash=this._westSash,this._northSash.orthogonalEndSash=this._eastSash,this._southSash.orthogonalStartSash=this._westSash,this._southSash.orthogonalEndSash=this._eastSash;let e,t=0,i=0;this._sashListener.add(ke.any(this._northSash.onDidStart,this._eastSash.onDidStart,this._southSash.onDidStart,this._westSash.onDidStart)(()=>{e===void 0&&(this._onDidWillResize.fire(),e=this._size,t=0,i=0)})),this._sashListener.add(ke.any(this._northSash.onDidEnd,this._eastSash.onDidEnd,this._southSash.onDidEnd,this._westSash.onDidEnd)(()=>{e!==void 0&&(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(ke.any(this._eastSash.onDidReset,this._westSash.onDidReset)(n=>{this._preferredSize&&(this.layout(this._size.height,this._preferredSize.width),this._onDidResize.fire({dimension:this._size,done:!0}))})),this._sashListener.add(ke.any(this._northSash.onDidReset,this._southSash.onDidReset)(n=>{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 a=new Wt(t,e);Wt.equals(a,this._size)||(this.domNode.style.height=e+"px",this.domNode.style.width=t+"px",this._size=a,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}}var Cue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},wue=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};function ST(r){return!!r&&Boolean(r.completion.documentation||r.completion.detail&&r.completion.detail!==r.completion.label)}let LT=class{constructor(e,t){this._editor=e,this._onDidClose=new H,this.onDidClose=this._onDidClose.event,this._onDidChangeContents=new H,this.onDidChangeContents=this._onDidChangeContents.event,this._disposables=new le,this._renderDisposeable=new le,this._borderWidth=1,this._size=new Wt(330,0),this.domNode=oe(".suggest-details"),this.domNode.classList.add("no-docs"),this._markdownRenderer=t.createInstance(Ac,{editor:e}),this._body=oe(".body"),this._scrollbar=new gm(this._body,{}),X(this.domNode,this._scrollbar.getDomNode()),this._disposables.add(this._scrollbar),this._header=X(this._body,oe(".header")),this._close=X(this._header,oe("span"+ve.close.cssSelector)),this._close.title=m("details.close","Close"),this._type=X(this._header,oe("p.type")),this._docs=X(this._body,oe("p.docs")),this._configureFont(),this._disposables.add(this._editor.onDidChangeConfiguration(i=>{i.hasChanged(43)&&this._configureFont()}))}dispose(){this._disposables.dispose(),this._renderDisposeable.dispose()}_configureFont(){const e=this._editor.getOptions(),t=e.get(43),i=t.fontFamily,n=e.get(106)||t.fontSize,s=e.get(107)||t.lineHeight,o=t.fontWeight,a=`${n}px`,l=`${s}px`;this.domNode.style.fontSize=a,this.domNode.style.lineHeight=l,this.domNode.style.fontWeight=o,this.domNode.style.fontFeatureSettings=t.fontFeatureSettings,this._type.style.fontFamily=i,this._close.style.height=l,this._close.style.width=l}getLayoutInfo(){const e=this._editor.getOption(107)||this._editor.getOption(43).lineHeight,t=this._borderWidth,i=t*2;return{lineHeight:e,borderWidth:t,borderHeight:i,verticalPadding:22,horizontalPadding:14}}renderLoading(){this._type.textContent=m("loading","Loading..."),this._docs.textContent="",this.domNode.classList.remove("no-docs","no-type"),this.layout(this.size.width,this.getLayoutInfo().lineHeight*2),this._onDidChangeContents.fire(this)}renderItem(e,t){var i,n;this._renderDisposeable.clear();let{detail:s,documentation:o}=e.completion;if(t){let a="";a+=`score: ${e.score[0]} -`,a+=`prefix: ${(i=e.word)!==null&&i!==void 0?i:"(no prefix)"} -`,a+=`word: ${e.completion.filterText?e.completion.filterText+" (filterText)":e.textLabel} -`,a+=`distance: ${e.distance} (localityBonus-setting) -`,a+=`index: ${e.idx}, based on ${e.completion.sortText&&`sortText: "${e.completion.sortText}"`||"label"} -`,a+=`commit_chars: ${(n=e.completion.commitCharacters)===null||n===void 0?void 0:n.join("")} -`,o=new ul().appendCodeblock("empty",a),s=`Provider: ${e.provider._debugDisplayName}`}if(!t&&!ST(e)){this.clearContents();return}if(this.domNode.classList.remove("no-docs","no-type"),s){const a=s.length>1e5?`${s.substr(0,1e5)}\u2026`:s;this._type.textContent=a,this._type.title=a,Ar(this._type),this._type.classList.toggle("auto-wrap",!/\r?\n^\s+/gmi.test(a))}else Ui(this._type),this._type.title="",Qn(this._type),this.domNode.classList.add("no-type");if(Ui(this._docs),typeof o=="string")this._docs.classList.remove("markdown-docs"),this._docs.textContent=o;else if(o){this._docs.classList.add("markdown-docs"),Ui(this._docs);const a=this._markdownRenderer.render(o);this._docs.appendChild(a.element),this._renderDisposeable.add(a),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=a=>{a.preventDefault(),a.stopPropagation()},this._close.onclick=a=>{a.preventDefault(),a.stopPropagation(),this._onDidClose.fire()},this._body.scrollTop=0,this.layout(this._size.width,this._type.clientHeight+this._docs.clientHeight),this._onDidChangeContents.fire(this)}clearContents(){this.domNode.classList.add("no-docs"),this._type.textContent="",this._docs.textContent=""}get size(){return this._size}layout(e,t){const i=new Wt(e,t);Wt.equals(i,this._size)||(this._size=i,Dj(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}};LT=Cue([wue(1,ut)],LT);class yue{constructor(e,t){this.widget=e,this._editor=t,this._disposables=new le,this._added=!1,this._resizable=new jW,this._resizable.domNode.classList.add("suggest-details-container"),this._resizable.domNode.appendChild(e.domNode),this._resizable.enableSashes(!1,!0,!0,!1);let i,n,s=0,o=0;this._disposables.add(this._resizable.onDidWillResize(()=>{i=this._topLeft,n=this._resizable.size})),this._disposables.add(this._resizable.onDidResize(a=>{if(i&&n){this.widget.layout(a.dimension.width,a.dimension.height);let l=!1;a.west&&(o=n.width-a.dimension.width,l=!0),a.north&&(s=n.height-a.dimension.height,l=!0),l&&this._applyTopLeft({top:i.top+s,left:i.left+o})}a.done&&(i=void 0,n=void 0,s=0,o=0,this._userSize=a.dimension)})),this._disposables.add(this.widget.onDidChangeContents(()=>{var a;this._anchorBox&&this._placeAtAnchor(this._anchorBox,(a=this._userSize)!==null&&a!==void 0?a:this.widget.size)}))}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){var t;const i=Qi(e);this._anchorBox=i,this._placeAtAnchor(this._anchorBox,(t=this._userSize)!==null&&t!==void 0?t:this.widget.size)}_placeAtAnchor(e,t){const i=av(document.body),n=this.widget.getLayoutInfo();let s,o,a=new Wt(220,2*n.lineHeight),l=0,c=e.top,h=e.top+e.height-n.borderHeight,u,d,f=i.width-(e.left+e.width+n.borderWidth+n.horizontalPadding);l=-n.borderWidth+e.left+e.width,d=!0,s=new Wt(f,i.height-e.top-n.borderHeight-n.verticalPadding),o=s.with(void 0,e.top+e.height-n.borderHeight-n.verticalPadding),t.width>f&&(e.left>f&&(f=e.left-n.borderWidth-n.horizontalPadding,d=!1,l=Math.max(n.horizontalPadding,e.left-t.width-n.borderWidth),s=s.with(f),o=s.with(void 0,o.height)),e.width>f*1.3&&i.height-(e.top+e.height)>e.height&&(f=e.width,l=e.left,c=-n.borderWidth+e.top+e.height,s=new Wt(e.width-n.borderHeight,i.height-e.top-e.height-n.verticalPadding),o=s.with(void 0,e.top-n.verticalPadding),a=a.with(s.width)));let g=t.height,p=Math.max(s.height,o.height);g>p&&(g=p);let _;g<=s.height?(u=!0,_=s):(u=!1,_=o),this._applyTopLeft({left:l,top:u?c:h-g}),this.getDomNode().style.position="fixed",this._resizable.enableSashes(!u,d,u,!d),this._resizable.minSize=a,this._resizable.maxSize=_,this._resizable.layout(g,Math.min(_.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 bl;(function(r){r[r.FILE=0]="FILE",r[r.FOLDER=1]="FOLDER",r[r.ROOT_FOLDER=2]="ROOT_FOLDER"})(bl||(bl={}));function wy(r,e,t,i){const n=i===bl.ROOT_FOLDER?["rootfolder-icon"]:i===bl.FOLDER?["folder-icon"]:["file-icon"];if(t){let s;if(t.scheme===Ze.data?s=Ul.parseMetaData(t).get(Ul.META_DATA_LABEL):s=KW(b2(t).toLowerCase()),i===bl.FOLDER)n.push(`${s}-name-folder-icon`);else{if(s){if(n.push(`${s}-name-file-icon`),s.length<=255){const a=s.split(".");for(let l=1;l<a.length;l++)n.push(`${a.slice(l).join(".")}-ext-file-icon`)}n.push("ext-file-icon")}const o=Sue(r,e,t);o&&n.push(`${KW(o)}-lang-file-icon`)}}return n}function Sue(r,e,t){if(!t)return null;let i=null;if(t.scheme===Ze.data){const s=Ul.parseMetaData(t).get(Ul.META_DATA_MIME);s&&(i=e.getModeId(s))}else{const n=r.getModel(t);n&&(i=n.getModeId())}return i&&i!==bE?i:e.getModeIdByFilepathOrFirstLine(t)}function KW(r){return r.replace(/[\11\12\14\15\40]/g,"/")}var Lue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},E_;function qW(r){return`suggest-aria-id:${r}`}const xue=sn("suggest-more-info",ve.chevronRight,m("suggestMoreInfoIcon","Icon for more information in the suggest widget.")),kue=new(E_=class yy{extract(e,t){if(e.textLabel.match(yy._regexStrict))return t[0]=e.textLabel,!0;if(e.completion.detail&&e.completion.detail.match(yy._regexStrict))return t[0]=e.completion.detail,!0;if(typeof e.completion.documentation=="string"){const i=yy._regexRelaxed.exec(e.completion.documentation);if(i&&(i.index===0||i.index+i[0].length===e.completion.documentation.length))return t[0]=i[0],!0}return!1}},E_._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*\))/,E_._regexStrict=new RegExp(`^${E_._regexRelaxed.source}$`,"i"),E_);let kT=class{constructor(e,t,i,n){this._editor=e,this._modelService=t,this._modeService=i,this._themeService=n,this._onDidToggleDetails=new H,this.onDidToggleDetails=this._onDidToggleDetails.event,this.templateId="suggestion"}dispose(){this._onDidToggleDetails.dispose()}renderTemplate(e){const t=Object.create(null);t.disposables=new le,t.root=e,t.root.classList.add("show-file-icons"),t.icon=X(e,oe(".icon")),t.colorspan=X(t.icon,oe("span.colorspan"));const i=X(e,oe(".contents")),n=X(i,oe(".main"));t.iconContainer=X(n,oe(".icon-label.codicon")),t.left=X(n,oe("span.left")),t.right=X(n,oe("span.right")),t.iconLabel=new PI(t.left,{supportHighlights:!0,supportIcons:!0}),t.disposables.add(t.iconLabel),t.parametersLabel=X(t.left,oe("span.signature-label")),t.qualifierLabel=X(t.left,oe("span.qualifier-label")),t.detailsLabel=X(t.right,oe("span.details-label")),t.readMore=X(t.right,oe("span.readMore"+Gt.asCSSSelector(xue))),t.readMore.title=m("readMore","Read More");const s=()=>{const o=this._editor.getOptions(),a=o.get(43),l=a.fontFamily,c=a.fontFeatureSettings,h=o.get(106)||a.fontSize,u=o.get(107)||a.lineHeight,d=a.fontWeight,f=`${h}px`,g=`${u}px`;t.root.style.fontSize=f,t.root.style.fontWeight=d,n.style.fontFamily=l,n.style.fontFeatureSettings=c,n.style.lineHeight=g,t.icon.style.height=g,t.icon.style.width=g,t.readMore.style.height=g,t.readMore.style.width=g};return s(),t.disposables.add(this._editor.onDidChangeConfiguration(o=>{(o.hasChanged(43)||o.hasChanged(106)||o.hasChanged(107))&&s()})),t}renderElement(e,t,i){const{completion:n}=e;i.root.id=qW(t),i.colorspan.style.backgroundColor="";const s={labelEscapeNewLines:!0,matches:Zw(e.score)};let o=[];if(n.kind===19&&kue.extract(e,o))i.icon.className="icon customcolor",i.iconContainer.className="icon hide",i.colorspan.style.backgroundColor=o[0];else if(n.kind===20&&this._themeService.getFileIconTheme().hasFileIcons){i.icon.className="icon hide",i.iconContainer.className="icon hide";const a=wy(this._modelService,this._modeService,Ie.from({scheme:"fake",path:e.textLabel}),bl.FILE),l=wy(this._modelService,this._modeService,Ie.from({scheme:"fake",path:n.detail}),bl.FILE);s.extraClasses=a.length>l.length?a:l}else n.kind===23&&this._themeService.getFileIconTheme().hasFolderIcons?(i.icon.className="icon hide",i.iconContainer.className="icon hide",s.extraClasses=Hx([wy(this._modelService,this._modeService,Ie.from({scheme:"fake",path:e.textLabel}),bl.FOLDER),wy(this._modelService,this._modeService,Ie.from({scheme:"fake",path:n.detail}),bl.FOLDER)])):(i.icon.className="icon hide",i.iconContainer.className="",i.iconContainer.classList.add("suggest-icon",...tq(n.kind).split(" ")));n.tags&&n.tags.indexOf(1)>=0&&(s.extraClasses=(s.extraClasses||[]).concat(["deprecated"]),s.matches=[]),i.iconLabel.setLabel(e.textLabel,void 0,s),typeof n.label=="string"?(i.parametersLabel.textContent="",i.detailsLabel.textContent=DT(n.detail||""),i.root.classList.add("string-label")):(i.parametersLabel.textContent=DT(n.label.detail||""),i.detailsLabel.textContent=DT(n.label.description||""),i.root.classList.remove("string-label")),this._editor.getOption(105).showInlineDetails?Ar(i.detailsLabel):Qn(i.detailsLabel),ST(e)?(i.right.classList.add("can-expand-details"),Ar(i.readMore),i.readMore.onmousedown=a=>{a.stopPropagation(),a.preventDefault()},i.readMore.onclick=a=>{a.stopPropagation(),a.preventDefault(),this._onDidToggleDetails.fire()}):(i.right.classList.remove("can-expand-details"),Qn(i.readMore),i.readMore.onmousedown=null,i.readMore.onclick=null)}disposeTemplate(e){e.disposables.dispose()}};kT=Lue([xT(1,gi),xT(2,Ds),xT(3,qt)],kT);function DT(r){return r.replace(/\r\n|\r|\n/g,"")}var Due=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Sy=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Eue=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Iue=V("editorSuggestWidget.background",{dark:Fr,light:Fr,hc:Fr},m("editorSuggestWidgetBackground","Background color of the suggest widget.")),Nue=V("editorSuggestWidget.border",{dark:Wh,light:Wh,hc:Wh},m("editorSuggestWidgetBorder","Border color of the suggest widget.")),Tue=V("editorSuggestWidget.foreground",{dark:oc,light:oc,hc:oc},m("editorSuggestWidgetForeground","Foreground color of the suggest widget.")),Aue=V("editorSuggestWidget.selectedForeground",{dark:ZC,light:ZC,hc:ZC},m("editorSuggestWidgetSelectedForeground","Foreground color of the selected entry in the suggest widget.")),Rue=V("editorSuggestWidget.selectedIconForeground",{dark:YC,light:YC,hc:YC},m("editorSuggestWidgetSelectedIconForeground","Icon foreground color of the selected entry in the suggest widget.")),Mue=V("editorSuggestWidget.selectedBackground",{dark:XC,light:XC,hc:XC},m("editorSuggestWidgetSelectedBackground","Background color of the selected entry in the suggest widget.")),Pue=V("editorSuggestWidget.highlightForeground",{dark:pf,light:pf,hc:pf},m("editorSuggestWidgetHighlightForeground","Color of the match highlights in the suggest widget.")),Oue=V("editorSuggestWidget.focusHighlightForeground",{dark:cD,light:cD,hc:cD},m("editorSuggestWidgetFocusHighlightForeground","Color of the match highlights in the suggest widget when an item is focused."));class Fue{constructor(e,t){this._service=e,this._key=`suggestWidget.size/${t.getEditorType()}/${t instanceof Tu}`}restore(){var e;const t=(e=this._service.get(this._key,0))!==null&&e!==void 0?e:"";try{const i=JSON.parse(t);if(Wt.is(i))return Wt.lift(i)}catch{}}store(e){this._service.store(this._key,JSON.stringify(e),0,1)}reset(){this._service.remove(this._key,0)}}let I_=class ET{constructor(e,t,i,n,s){this.editor=e,this._storageService=t,this._state=0,this._isAuto=!1,this._ignoreFocusEvents=!1,this._forceRenderingAbove=!1,this._explainMode=!1,this._showTimeout=new Xn,this._disposables=new le,this._onDidSelect=new H,this._onDidFocus=new H,this._onDidHide=new H,this._onDidShow=new H,this.onDidSelect=this._onDidSelect.event,this.onDidFocus=this._onDidFocus.event,this.onDidHide=this._onDidHide.event,this.onDidShow=this._onDidShow.event,this._onDetailsKeydown=new H,this.onDetailsKeyDown=this._onDetailsKeydown.event,this.element=new jW,this.element.domNode.classList.add("editor-widget","suggest-widget"),this._contentWidget=new Bue(this,e),this._persistedSize=new Fue(t,e);class o{constructor(f,g,p=!1,_=!1){this.persistedSize=f,this.currentSize=g,this.persistHeight=p,this.persistWidth=_}}let a;this._disposables.add(this.element.onDidWillResize(()=>{this._contentWidget.lockPreference(),a=new o(this._persistedSize.restore(),this.element.size)})),this._disposables.add(this.element.onDidResize(d=>{var f,g,p,_;if(this._resize(d.dimension.width,d.dimension.height),a&&(a.persistHeight=a.persistHeight||!!d.north||!!d.south,a.persistWidth=a.persistWidth||!!d.east||!!d.west),!!d.done){if(a){const{itemHeight:v,defaultSize:b}=this.getLayoutInfo(),C=Math.round(v/2);let{width:y,height:x}=this.element.size;(!a.persistHeight||Math.abs(a.currentSize.height-x)<=C)&&(x=(g=(f=a.persistedSize)===null||f===void 0?void 0:f.height)!==null&&g!==void 0?g:b.height),(!a.persistWidth||Math.abs(a.currentSize.width-y)<=C)&&(y=(_=(p=a.persistedSize)===null||p===void 0?void 0:p.width)!==null&&_!==void 0?_:b.width),this._persistedSize.store(new Wt(y,x))}this._contentWidget.unlockPreference(),a=void 0}})),this._messageElement=X(this.element.domNode,oe(".message")),this._listElement=X(this.element.domNode,oe(".tree"));const l=s.createInstance(LT,this.editor);l.onDidClose(this.toggleDetails,this,this._disposables),this._details=new yue(l,this.editor);const c=()=>this.element.domNode.classList.toggle("no-icons",!this.editor.getOption(105).showIcons);c();const h=s.createInstance(kT,this.editor);this._disposables.add(h),this._disposables.add(h.onDidToggleDetails(()=>this.toggleDetails())),this._list=new ia("SuggestWidget",this._listElement,{getHeight:d=>this.getLayoutInfo().itemHeight,getTemplateId:d=>"suggestion"},[h],{alwaysConsumeMouseWheel:!0,useShadows:!1,mouseSupport:!1,accessibilityProvider:{getRole:()=>"option",getAriaLabel:d=>{if(d.isResolved&&this._isDetailsVisible()){const{documentation:f,detail:g}=d.completion,p=gn("{0}{1}",g||"",f?typeof f=="string"?f:f.value:"");return m("ariaCurrenttSuggestionReadDetails","{0}, docs: {1}",d.textLabel,p)}else return d.textLabel},getWidgetAriaLabel:()=>m("suggest","Suggest"),getWidgetRole:()=>"listbox"}}),this._status=s.createInstance(yT,this.element.domNode);const u=()=>this.element.domNode.classList.toggle("with-status-bar",this.editor.getOption(105).showStatusBar);u(),this._disposables.add(gu(this._list,n,{listInactiveFocusBackground:Mue,listInactiveFocusOutline:En})),this._disposables.add(n.onDidColorThemeChange(d=>this._onThemeChange(d))),this._onThemeChange(n.getColorTheme()),this._disposables.add(this._list.onMouseDown(d=>this._onListMouseDownOrTap(d))),this._disposables.add(this._list.onTap(d=>this._onListMouseDownOrTap(d))),this._disposables.add(this._list.onDidChangeSelection(d=>this._onListSelection(d))),this._disposables.add(this._list.onDidChangeFocus(d=>this._onListFocus(d))),this._disposables.add(this.editor.onDidChangeCursorSelection(()=>this._onCursorSelectionChanged())),this._disposables.add(this.editor.onDidChangeConfiguration(d=>{d.hasChanged(105)&&(u(),c())})),this._ctxSuggestWidgetVisible=st.Visible.bindTo(i),this._ctxSuggestWidgetDetailsVisible=st.DetailsVisible.bindTo(i),this._ctxSuggestWidgetMultipleSuggestions=st.MultipleSuggestions.bindTo(i),this._disposables.add(ki(this._details.widget.domNode,"keydown",d=>{this._onDetailsKeydown.fire(d)})),this._disposables.add(this.editor.onMouseDown(d=>this._onEditorMouseDown(d)))}dispose(){var e;this._details.widget.dispose(),this._details.dispose(),this._list.dispose(),this._status.dispose(),this._disposables.dispose(),(e=this._loadingTimeout)===null||e===void 0||e.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(){this._state!==0&&this._contentWidget.layout()}_onListMouseDownOrTap(e){typeof e.element=="undefined"||typeof e.index=="undefined"||(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){const t=e.getColor(Iue);t&&(this.element.domNode.style.backgroundColor=t.toString(),this._messageElement.style.backgroundColor=t.toString(),this._details.widget.domNode.style.backgroundColor=t.toString());const i=e.getColor(Nue);i&&(this.element.domNode.style.borderColor=i.toString(),this._messageElement.style.borderColor=i.toString(),this._status.element.style.borderTopColor=i.toString(),this._details.widget.domNode.style.borderColor=i.toString(),this._detailsBorderColor=i.toString());const n=e.getColor(rc);n&&(this._detailsFocusBorderColor=n.toString()),this._details.widget.borderWidth=e.type==="hc"?2:1}_onListFocus(e){var t;if(this._ignoreFocusEvents)return;if(!e.elements.length){this._currentSuggestionDetails&&(this._currentSuggestionDetails.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=void 0),this.editor.setAriaOptions({activeDescendant:void 0});return}if(!this._completionModel)return;const i=e.elements[0],n=e.indexes[0];i!==this._focusedItem&&((t=this._currentSuggestionDetails)===null||t===void 0||t.cancel(),this._currentSuggestionDetails=void 0,this._focusedItem=i,this._list.reveal(n),this._currentSuggestionDetails=Oi(s=>Eue(this,void 0,void 0,function*(){const o=mh(()=>{this._isDetailsVisible()&&this.showDetails(!0)},250);s.onCancellationRequested(()=>o.dispose());const a=yield i.resolve(s);return o.dispose(),a})),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:qW(n)}))}).catch(Oe)),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",e===4),this.element.domNode.classList.remove("message"),e){case 0:Qn(this._messageElement,this._listElement,this._status.element),this._details.hide(!0),this._status.hide(),this._contentWidget.hide(),this._ctxSuggestWidgetVisible.reset(),this._ctxSuggestWidgetMultipleSuggestions.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=ET.LOADING_MESSAGE,Qn(this._listElement,this._status.element),Ar(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 2:this.element.domNode.classList.add("message"),this._messageElement.textContent=ET.NO_SUGGESTIONS_MESSAGE,Qn(this._listElement,this._status.element),Ar(this._messageElement),this._details.hide(),this._show(),this._focusedItem=void 0;break;case 3:Qn(this._messageElement),Ar(this._listElement,this._status.element),this._show();break;case 4:Qn(this._messageElement),Ar(this._listElement,this._status.element),this._show();break;case 5:Qn(this._messageElement),Ar(this._listElement,this._status.element),this._details.show(),this._show();break}}_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){this._state===0&&(this._contentWidget.setPosition(this.editor.getPosition()),this._isAuto=!!e,this._isAuto||(this._loadingTimeout=mh(()=>this._setState(1),t)))}showSuggestions(e,t,i,n){var s,o;if(this._contentWidget.setPosition(this.editor.getPosition()),(s=this._loadingTimeout)===null||s===void 0||s.dispose(),(o=this._currentSuggestionDetails)===null||o===void 0||o.cancel(),this._currentSuggestionDetails=void 0,this._completionModel!==e&&(this._completionModel=e),i&&this._state!==2&&this._state!==0){this._setState(4);return}const a=this._completionModel.items.length,l=a===0;if(this._ctxSuggestWidgetMultipleSuggestions.set(a>1),l){this._setState(n?0:2),this._completionModel=void 0;return}this._focusedItem=void 0,this._list.splice(0,this._list.length,this._completionModel.items),this._setState(i?4:3),this._list.reveal(t,0),this._list.setFocus([t]),this._layout(this.element.size),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)}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(this._state!==0&&this._state!==2&&this._state!==1&&this._completionModel)return{item:this._list.getFocusedElements()[0],index:this._list.getFocus()[0],model:this._completionModel}}toggleDetailsFocus(){this._state===5?(this._setState(3),this._detailsBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsBorderColor)):this._state===3&&this._isDetailsVisible()&&(this._setState(5),this._detailsFocusBorderColor&&(this._details.widget.domNode.style.borderColor=this._detailsFocusBorderColor))}toggleDetails(){this._isDetailsVisible()?(this._ctxSuggestWidgetDetailsVisible.set(!1),this._setDetailsVisible(!1),this._details.hide(),this.element.domNode.classList.remove("shows-details")):(ST(this._list.getFocusedElements()[0])||this._explainMode)&&(this._state===3||this._state===5||this._state===4)&&(this._ctxSuggestWidgetDetailsVisible.set(!0),this._setDetailsVisible(!0),this.showDetails(!1))}showDetails(e){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;(e=this._loadingTimeout)===null||e===void 0||e.dispose(),this._setState(0),this._onDidHide.fire(this),this.element.clearSashHoverState();const t=this._persistedSize.restore(),i=Math.ceil(this.getLayoutInfo().itemHeight*4.3);t&&t.height<i&&this._persistedSize.store(t.with(void 0,i))}isFrozen(){return this._state===4}_afterRender(e){if(e===null){this._isDetailsVisible()&&this._details.hide();return}this._state===2||this._state===1||(this._isDetailsVisible()&&this._details.show(),this._positionDetails())}_layout(e){var t,i,n;if(!this.editor.hasModel()||!this.editor.getDomNode())return;const s=av(document.body),o=this.getLayoutInfo();e||(e=o.defaultSize);let a=e.height,l=e.width;if(this._status.element.style.lineHeight=`${o.itemHeight}px`,this._state===2||this._state===1)a=o.itemHeight+o.borderHeight,l=o.defaultSize.width/2,this.element.enableSashes(!1,!1,!1,!1),this.element.minSize=this.element.maxSize=new Wt(l,a),this._contentWidget.setPreference(2);else{const c=s.width-o.borderHeight-2*o.horizontalPadding;l>c&&(l=c);const h=this._completionModel?this._completionModel.stats.pLabelLen*o.typicalHalfwidthCharacterWidth:l,u=o.statusBarHeight+this._list.contentHeight+o.borderHeight,d=o.itemHeight+o.statusBarHeight,f=Qi(this.editor.getDomNode()),g=this.editor.getScrolledVisiblePosition(this.editor.getPosition()),p=f.top+g.top+g.height,_=Math.min(s.height-p-o.verticalPadding,u),v=f.top+g.top-o.verticalPadding,b=Math.min(v,u);let C=Math.min(Math.max(b,_)+o.borderHeight,u);a===((t=this._cappedHeight)===null||t===void 0?void 0:t.capped)&&(a=this._cappedHeight.wanted),a<d&&(a=d),a>C&&(a=C);const y=150;a>_||this._forceRenderingAbove&&v>y?(this._contentWidget.setPreference(1),this.element.enableSashes(!0,!0,!1,!1),C=b):(this._contentWidget.setPreference(2),this.element.enableSashes(!1,!0,!0,!1),C=_),this.element.preferredSize=new Wt(h,o.defaultSize.height),this.element.maxSize=new Wt(c,C),this.element.minSize=new Wt(220,d),this._cappedHeight=a===u?{wanted:(n=(i=this._cappedHeight)===null||i===void 0?void 0:i.wanted)!==null&&n!==void 0?n:e.height,capped:a}:void 0}this._resize(l,a)}_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(){this._isDetailsVisible()&&this._details.placeAtAnchor(this.element.domNode)}getLayoutInfo(){const e=this.editor.getOption(43),t=Ss(this.editor.getOption(107)||e.lineHeight,8,1e3),i=!this.editor.getOption(105).showStatusBar||this._state===2||this._state===1?0:t,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 Wt(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}};I_.LOADING_MESSAGE=m("suggestWidget.loading","Loading...");I_.NO_SUGGESTIONS_MESSAGE=m("suggestWidget.noSuggestions","No suggestions.");I_=Due([Sy(1,aa),Sy(2,Fe),Sy(3,qt),Sy(4,ut)],I_);class Bue{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?null:{position:this._position,preference:[this._preference]}}beforeRender(){const{height:e,width:t}=this._widget.element.size,{borderWidth:i,horizontalPadding:n}=this._widget.getLayoutInfo();return new Wt(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}}Lt((r,e)=>{const t=r.getColor(Pue);t&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row .monaco-highlighted-label .highlight { color: ${t}; }`);const i=r.getColor(Oue);t&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .monaco-highlighted-label .highlight { color: ${i}; }`);const n=r.getColor(Tue);n&&e.addRule(`.monaco-editor .suggest-widget, .monaco-editor .suggest-details { color: ${n}; }`);const s=r.getColor(Aue);s&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused { color: ${s}; }`);const o=r.getColor(Rue);o&&e.addRule(`.monaco-editor .suggest-widget .monaco-list .monaco-list-row.focused .codicon { color: ${o}; }`);const a=r.getColor(Gp);a&&e.addRule(`.monaco-editor .suggest-details a { color: ${a}; }`);const l=r.getColor(Zp);l&&e.addRule(`.monaco-editor .suggest-details a:hover { color: ${l}; }`);const c=r.getColor(zk);c&&e.addRule(`.monaco-editor .suggest-details code { background-color: ${c}; }`)});var Wue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},N_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class Vue{constructor(e,t){if(this._model=e,this._position=t,e.getLineMaxColumn(t.lineNumber)!==t.column){const n=e.getOffsetAt(t),s=e.getPositionAt(n+1);this._marker=e.deltaDecorations([],[{range:k.fromPositions(t,s),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)}else return this._model.getLineMaxColumn(e.lineNumber)-e.column}}let Hs=class GW{constructor(e,t,i,n,s,o){this._memoryService=t,this._commandService=i,this._contextKeyService=n,this._instantiationService=s,this._logService=o,this._lineSuffix=new An,this._toDispose=new le,this._selectors=new Hue(h=>h.priority),this.editor=e,this.model=s.createInstance(vT,this.editor);const a=st.InsertMode.bindTo(n);a.set(e.getOption(105).insertMode),this.model.onDidTrigger(()=>a.set(e.getOption(105).insertMode)),this.widget=this._toDispose.add(new Ad(()=>{const h=this._instantiationService.createInstance(I_,this.editor);this._toDispose.add(h),this._toDispose.add(h.onDidSelect(p=>this._insertSuggestion(p,0),this));const u=new Rhe(this.editor,h,p=>this._insertSuggestion(p,2));this._toDispose.add(u),this._toDispose.add(this.model.onDidSuggest(p=>{p.completionModel.items.length===0&&u.reset()}));const d=st.MakesTextEdit.bindTo(this._contextKeyService),f=st.HasInsertAndReplaceRange.bindTo(this._contextKeyService),g=st.CanResolve.bindTo(this._contextKeyService);return this._toDispose.add(Xe(()=>{d.reset(),f.reset(),g.reset()})),this._toDispose.add(h.onDidFocus(({item:p})=>{const _=this.editor.getPosition(),v=p.editStart.column,b=_.column;let C=!0;this.editor.getOption(1)==="smart"&&this.model.state===2&&!p.completion.command&&!p.completion.additionalTextEdits&&!(p.completion.insertTextRules&4)&&b-v===p.completion.insertText.length&&(C=this.editor.getModel().getValueInRange({startLineNumber:_.lineNumber,startColumn:v,endLineNumber:_.lineNumber,endColumn:b})!==p.completion.insertText),d.set(C),f.set(!$.equals(p.editInsertEnd,p.editReplaceEnd)),g.set(Boolean(p.provider.resolveCompletionItem)||Boolean(p.completion.documentation)||p.completion.detail!==p.completion.label)})),this._toDispose.add(h.onDetailsKeyDown(p=>{if(p.toKeybinding().equals(new rp(!0,!1,!1,!1,33))||Je&&p.toKeybinding().equals(new rp(!1,!1,!1,!0,33))){p.stopPropagation();return}p.toKeybinding().isModifierKey()||this.editor.focus()})),h})),this._overtypingCapturer=this._toDispose.add(new Ad(()=>this._toDispose.add(new Cy(this.editor,this.model)))),this._alternatives=this._toDispose.add(new Ad(()=>this._toDispose.add(new Bu(this.editor,this._contextKeyService)))),this._toDispose.add(s.createInstance(D_,e)),this._toDispose.add(this.model.onDidTrigger(h=>{this.widget.value.showTriggered(h.auto,h.shy?250:50),this._lineSuffix.value=new Vue(this.editor.getModel(),h.position)})),this._toDispose.add(this.model.onDidSuggest(h=>{if(!h.shy){let u=-1;for(const d of this._selectors.itemsOrderedByPriorityDesc)if(u=d.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items),u!==-1)break;u===-1&&(u=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),h.completionModel.items)),this.widget.value.showSuggestions(h.completionModel,u,h.isFrozen,h.auto)}})),this._toDispose.add(this.model.onDidCancel(h=>{h.retrigger||this.widget.value.hideWidget()})),this._toDispose.add(this.editor.onDidBlurEditorWidget(()=>{this.model.cancel(),this.model.clear()}));let l=st.AcceptSuggestionsOnEnter.bindTo(n),c=()=>{const h=this.editor.getOption(1);l.set(h==="on"||h==="smart")};this._toDispose.add(this.editor.onDidChangeConfiguration(()=>c())),c()}static get(e){return e.getContribution(GW.ID)}dispose(){this._alternatives.dispose(),this._toDispose.dispose(),this.widget.dispose(),this.model.dispose(),this._lineSuffix.dispose()}_insertSuggestion(e,t){if(!e||!e.item){this._alternatives.value.reset(),this.model.cancel(),this.model.clear();return}if(!this.editor.hasModel())return;const i=this.editor.getModel(),n=i.getAlternativeVersionId(),{item:s}=e,o=[],a=new Rn;t&1||this.editor.pushUndoStop();const l=this.getOverwriteInfo(s,Boolean(t&8));if(this._memoryService.memorize(i,this.editor.getPosition(),s),Array.isArray(s.completion.additionalTextEdits)){const h=pc.capture(this.editor);this.editor.executeEdits("suggestController.additionalTextEdits.sync",s.completion.additionalTextEdits.map(u=>ci.replace(k.lift(u.range),u.text))),h.restoreRelativeVerticalPositionOfCursor(this.editor)}else if(!s.isResolved){const h=new Mo(!0);let u;const d=i.onDidChangeContent(_=>{if(_.isFlush){a.cancel(),d.dispose();return}for(let v of _.changes){const b=k.getEndPosition(v.range);(!u||$.isBefore(b,u))&&(u=b)}});let f=t;t|=2;let g=!1,p=this.editor.onWillType(()=>{p.dispose(),g=!0,f&2||this.editor.pushUndoStop()});o.push(s.resolve(a.token).then(()=>{if(!s.completion.additionalTextEdits||a.token.isCancellationRequested||u&&s.completion.additionalTextEdits.some(v=>$.isBefore(u,k.getStartPosition(v.range))))return!1;g&&this.editor.pushUndoStop();const _=pc.capture(this.editor);return this.editor.executeEdits("suggestController.additionalTextEdits.async",s.completion.additionalTextEdits.map(v=>ci.replace(k.lift(v.range),v.text))),_.restoreRelativeVerticalPositionOfCursor(this.editor),(g||!(f&2))&&this.editor.pushUndoStop(),!0}).then(_=>{this._logService.trace("[suggest] async resolving of edits DONE (ms, applied?)",h.elapsed(),_),d.dispose(),p.dispose()}))}let{insertText:c}=s.completion;s.completion.insertTextRules&4||(c=gy.escape(c)),on.get(this.editor).insert(c,{overwriteBefore:l.overwriteBefore,overwriteAfter:l.overwriteAfter,undoStopBefore:!1,undoStopAfter:!1,adjustWhitespace:!(s.completion.insertTextRules&1),clipboardText:e.model.clipboardText,overtypingCapturer:this._overtypingCapturer.value}),t&2||this.editor.pushUndoStop(),s.completion.command?s.completion.command.id===T_.id?this.model.trigger({auto:!0,shy:!1},!0):(o.push(this._commandService.executeCommand(s.completion.command.id,...s.completion.command.arguments?[...s.completion.command.arguments]:[]).catch(Oe)),this.model.cancel()):this.model.cancel(),t&4&&this._alternatives.value.set(e,h=>{for(a.cancel();i.canUndo();){n!==i.getAlternativeVersionId()&&i.undo(),this._insertSuggestion(h,1|2|(t&8?8:0));break}}),this._alertCompletionItem(s),Promise.all(o).finally(()=>{this.model.clear(),a.dispose()})}getOverwriteInfo(e,t){Nt(this.editor.hasModel());let i=this.editor.getOption(105).insertMode==="replace";t&&(i=!i);const n=e.position.column-e.editStart.column,s=(i?e.editReplaceEnd.column:e.editInsertEnd.column)-e.position.column,o=this.editor.getPosition().column-e.position.column,a=this._lineSuffix.value?this._lineSuffix.value.delta(this.editor.getPosition()):0;return{overwriteBefore:n+o,overwriteAfter:s+a}}_alertCompletionItem(e){if(gr(e.completion.additionalTextEdits)){let t=m("aria.alert.snippet","Accepting '{0}' made {1} additional edits",e.textLabel,e.completion.additionalTextEdits.length);Ji(t)}}triggerSuggest(e){this.editor.hasModel()&&(this.model.trigger({auto:!1,shy:!1},!1,e),this.editor.revealLine(this.editor.getPosition().lineNumber,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=s=>{if(s.completion.insertTextRules&4||s.completion.additionalTextEdits)return!0;const o=this.editor.getPosition(),a=s.editStart.column,l=o.column;return l-a!==s.completion.insertText.length?!0:this.editor.getModel().getValueInRange({startLineNumber:o.lineNumber,startColumn:a,endLineNumber:o.lineNumber,endColumn:l})!==s.completion.insertText};ke.once(this.model.onDidTrigger)(s=>{let o=[];ke.any(this.model.onDidTrigger,this.model.onDidCancel)(()=>{ht(o),i()},void 0,o),this.model.onDidSuggest(({completionModel:a})=>{if(ht(o),a.items.length===0){i();return}const l=this._memoryService.select(this.editor.getModel(),this.editor.getPosition(),a.items),c=a.items[l];if(!n(c)){i();return}this.editor.pushUndoStop(),this._insertSuggestion({index:l,item:c,model:a},4|1|2)},void 0,o)}),this.model.trigger({auto:!1,shy:!0}),this.editor.revealLine(t.lineNumber,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()}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)}};Hs.ID="editor.contrib.suggestController";Hs=Wue([N_(1,zW),N_(2,fi),N_(3,Fe),N_(4,ut),N_(5,Va)],Hs);class Hue{constructor(e){this.prioritySelector=e,this._items=new Array}register(e){if(this._items.indexOf(e)!==-1)throw new Error("Value is already registered");return this._items.push(e),this._items.sort((t,i)=>this.prioritySelector(i)-this.prioritySelector(t)),{dispose:()=>{const t=this._items.indexOf(e);t>=0&&this._items.splice(t,1)}}}get itemsOrderedByPriorityDesc(){return this._items}}class T_ extends Se{constructor(){super({id:T_.id,label:m("suggest.trigger.label","Trigger Suggest"),alias:"Trigger Suggest",precondition:_e.and(R.writable,R.hasCompletionItemProvider),kbOpts:{kbExpr:R.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[512|9,2048|39]},weight:100}})}run(e,t){const i=Hs.get(t);!i||i.triggerSuggest()}}T_.id="editor.action.triggerSuggest";wt(Hs.ID,Hs);me(T_);const fs=100+90,yr=en.bindToContribution(Hs.get);fe(new yr({id:"acceptSelectedSuggestion",precondition:st.Visible,handler(r){r.acceptSelectedSuggestion(!0,!1)}}));Bn.registerKeybindingRule({id:"acceptSelectedSuggestion",when:_e.and(st.Visible,R.textInputFocus),primary:2,weight:fs});Bn.registerKeybindingRule({id:"acceptSelectedSuggestion",when:_e.and(st.Visible,R.textInputFocus,st.AcceptSuggestionsOnEnter,st.MakesTextEdit),primary:3,weight:fs});ns.appendMenuItem(Mc,{command:{id:"acceptSelectedSuggestion",title:m("accept.insert","Insert")},group:"left",order:1,when:st.HasInsertAndReplaceRange.toNegated()});ns.appendMenuItem(Mc,{command:{id:"acceptSelectedSuggestion",title:m("accept.insert","Insert")},group:"left",order:1,when:_e.and(st.HasInsertAndReplaceRange,st.InsertMode.isEqualTo("insert"))});ns.appendMenuItem(Mc,{command:{id:"acceptSelectedSuggestion",title:m("accept.replace","Replace")},group:"left",order:1,when:_e.and(st.HasInsertAndReplaceRange,st.InsertMode.isEqualTo("replace"))});fe(new yr({id:"acceptAlternativeSelectedSuggestion",precondition:_e.and(st.Visible,R.textInputFocus),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:1024|3,secondary:[1024|2]},handler(r){r.acceptSelectedSuggestion(!1,!0)},menuOpts:[{menuId:Mc,group:"left",order:2,when:_e.and(st.HasInsertAndReplaceRange,st.InsertMode.isEqualTo("insert")),title:m("accept.replace","Replace")},{menuId:Mc,group:"left",order:2,when:_e.and(st.HasInsertAndReplaceRange,st.InsertMode.isEqualTo("replace")),title:m("accept.insert","Insert")}]}));lt.registerCommandAlias("acceptSelectedSuggestionOnEnter","acceptSelectedSuggestion");fe(new yr({id:"hideSuggestWidget",precondition:st.Visible,handler:r=>r.cancelSuggestWidget(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:9,secondary:[1024|9]}}));fe(new yr({id:"selectNextSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectNextSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:18,secondary:[2048|18],mac:{primary:18,secondary:[2048|18,256|44]}}}));fe(new yr({id:"selectNextPageSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectNextPageSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:12,secondary:[2048|12]}}));fe(new yr({id:"selectLastSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectLastSuggestion()}));fe(new yr({id:"selectPrevSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectPrevSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:16,secondary:[2048|16],mac:{primary:16,secondary:[2048|16,256|46]}}}));fe(new yr({id:"selectPrevPageSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectPrevPageSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:11,secondary:[2048|11]}}));fe(new yr({id:"selectFirstSuggestion",precondition:_e.and(st.Visible,st.MultipleSuggestions),handler:r=>r.selectFirstSuggestion()}));fe(new yr({id:"toggleSuggestionDetails",precondition:st.Visible,handler:r=>r.toggleSuggestionDetails(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:2048|10,secondary:[2048|39],mac:{primary:256|10,secondary:[2048|39]}},menuOpts:[{menuId:Mc,group:"right",order:1,when:_e.and(st.DetailsVisible,st.CanResolve),title:m("detail.more","show less")},{menuId:Mc,group:"right",order:1,when:_e.and(st.DetailsVisible.toNegated(),st.CanResolve),title:m("detail.less","show more")}]}));fe(new yr({id:"toggleExplainMode",precondition:st.Visible,handler:r=>r.toggleExplainMode(),kbOpts:{weight:100,primary:2048|85}}));fe(new yr({id:"toggleSuggestionFocus",precondition:st.Visible,handler:r=>r.toggleSuggestionFocus(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:2048|512|10,mac:{primary:256|512|10}}}));fe(new yr({id:"insertBestCompletion",precondition:_e.and(R.textInputFocus,_e.equals("config.editor.tabCompletion","on"),D_.AtEnd,st.Visible.toNegated(),Bu.OtherSuggestions.toNegated(),on.InSnippetMode.toNegated()),handler:(r,e)=>{r.triggerSuggestAndAcceptBest(er(e)?Object.assign({fallback:"tab"},e):{fallback:"tab"})},kbOpts:{weight:fs,primary:2}}));fe(new yr({id:"insertNextSuggestion",precondition:_e.and(R.textInputFocus,_e.equals("config.editor.tabCompletion","on"),Bu.OtherSuggestions,st.Visible.toNegated(),on.InSnippetMode.toNegated()),handler:r=>r.acceptNextSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:2}}));fe(new yr({id:"insertPrevSuggestion",precondition:_e.and(R.textInputFocus,_e.equals("config.editor.tabCompletion","on"),Bu.OtherSuggestions,st.Visible.toNegated(),on.InSnippetMode.toNegated()),handler:r=>r.acceptPrevSuggestion(),kbOpts:{weight:fs,kbExpr:R.textInputFocus,primary:1024|2}}));me(class extends Se{constructor(){super({id:"editor.action.resetSuggestSize",label:m("suggest.reset.label","Reset Suggest Widget Size"),alias:"Reset Suggest Widget Size",precondition:void 0})}run(r,e){Hs.get(e).resetWidgetSize()}});function zue(r,e){return{object:r,dispose:()=>e==null?void 0:e.dispose()}}function $ue(r,e){return(t,i)=>e(r(t),r(i))}function Uue(){return(r,e)=>r-e}function jue(r,e){let t;for(const i of r)(t===void 0||e(i,t)>0)&&(t=i);return t}class Kue extends Y{constructor(e,t){super();this.editor=e,this.suggestControllerPreselector=t,this.isSuggestWidgetVisible=!1,this.isShiftKeyPressed=!1,this._isActive=!1,this._currentInlineCompletion=void 0,this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.setInactiveDelayed=this._register(new Bt(()=>{this.isSuggestWidgetVisible||this._isActive&&(this._isActive=!1,this.onDidChangeEmitter.fire())},100)),this._register(e.onKeyDown(n=>{n.shiftKey&&!this.isShiftKeyPressed&&(this.isShiftKeyPressed=!0,this.update(this._isActive))})),this._register(e.onKeyUp(n=>{n.shiftKey&&this.isShiftKeyPressed&&(this.isShiftKeyPressed=!1,this.update(this._isActive))}));const i=Hs.get(this.editor);if(i){this._register(i.registerSelector({priority:100,select:(o,a,l)=>{const c=this.editor.getModel(),h=dy(c,this.suggestControllerPreselector());if(!h)return-1;const u=$.lift(a),d=l.map((g,p)=>{const _=ZW(i,u,g,this.isShiftKeyPressed),v=dy(c,_),b=v.range.equalsRange(h.range)&&h.text.startsWith(v.text);return{index:p,valid:b,prefixLength:v.text.length,suggestItem:g}}).filter(g=>g.valid),f=jue(d,$ue(g=>g.prefixLength,Uue()));return f?f.index:-1}}));let n=!1;const s=()=>{n||(n=!0,this._register(i.widget.value.onDidShow(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})),this._register(i.widget.value.onDidHide(()=>{this.isSuggestWidgetVisible=!1,this.setInactiveDelayed.schedule(),this.update(this._isActive)})),this._register(i.widget.value.onDidFocus(()=>{this.isSuggestWidgetVisible=!0,this.update(!0)})))};this._register(ke.once(i.model.onDidTrigger)(o=>{s()}))}this.update(this._isActive)}get state(){if(!!this._isActive)return{selectedItemAsInlineCompletion:this._currentInlineCompletion}}update(e){const t=this.getInlineCompletion();let i=!1;ehe(this._currentInlineCompletion,t)||(this._currentInlineCompletion=t,i=!0),this._isActive!==e&&(this._isActive=e,i=!0),i&&this.onDidChangeEmitter.fire()}getInlineCompletion(){const e=Hs.get(this.editor);if(!e||!this.isSuggestWidgetVisible)return;const t=e.widget.value.getFocusedItem();if(!!t)return ZW(e,this.editor.getPosition(),t.item,this.isShiftKeyPressed)}stopForceRenderingAbove(){const e=Hs.get(this.editor);e&&e.stopForceRenderingAbove()}forceRenderingAbove(){const e=Hs.get(this.editor);e&&e.forceRenderingAbove()}}function ZW(r,e,t,i){if(Array.isArray(t.completion.additionalTextEdits)&&t.completion.additionalTextEdits.length>0)return{text:"",range:k.fromPositions(e,e)};let{insertText:n}=t.completion;if(t.completion.insertTextRules&4){const o=new gy().parse(n),a=r.editor.getModel();_a.adjustWhitespace(a,e,o,!0,!0),n=o.toString()}const s=r.getOverwriteInfo(t,i);return{text:n,range:k.fromPositions(e.delta(0,-s.overwriteBefore),e.delta(0,Math.max(s.overwriteAfter,0)))}}var YW=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class que extends EW{constructor(e,t){super(e);this.cache=t,this.suggestionInlineCompletionSource=this._register(new Kue(this.editor,()=>{var i,n;return(n=(i=this.cache.value)===null||i===void 0?void 0:i.completions[0])===null||n===void 0?void 0:n.toLiveInlineCompletion()})),this.updateOperation=this._register(new An),this.updateCacheSoon=this._register(new Bt(()=>this.updateCache(),50)),this.minReservedLineCount=0,this._register(this.suggestionInlineCompletionSource.onDidChange(()=>{this.updateCacheSoon.schedule(),this.suggestionInlineCompletionSource.state||(this.minReservedLineCount=0);const n=this.ghostText;n&&(this.minReservedLineCount=Math.max(this.minReservedLineCount,Gue(n.parts.map(s=>s.lines.length-1)))),this.minReservedLineCount>=1&&this.isSuggestionPreviewEnabled()?this.suggestionInlineCompletionSource.forceRenderingAbove():this.suggestionInlineCompletionSource.stopForceRenderingAbove(),this.onDidChangeEmitter.fire()})),this._register(this.cache.onDidChange(()=>{this.onDidChangeEmitter.fire()})),this._register(this.editor.onDidChangeCursorPosition(i=>{this.isSuggestionPreviewEnabled()&&(this.minReservedLineCount=0,this.updateCacheSoon.schedule(),this.onDidChangeEmitter.fire())})),this._register(Xe(()=>this.suggestionInlineCompletionSource.stopForceRenderingAbove()))}get isActive(){return this.suggestionInlineCompletionSource.state!==void 0}isSuggestionPreviewEnabled(){return this.editor.getOption(105).preview}updateCache(){return YW(this,void 0,void 0,function*(){const e=this.suggestionInlineCompletionSource.state;if(!e||!e.selectedItemAsInlineCompletion)return;const t={text:e.selectedItemAsInlineCompletion.text,range:e.selectedItemAsInlineCompletion.range},i=this.editor.getPosition(),n=Oi(o=>YW(this,void 0,void 0,function*(){let a;try{a=yield TW(i,this.editor.getModel(),{triggerKind:Xr.Automatic,selectedSuggestionInfo:t},o)}catch(l){Oe(l);return}o.isCancellationRequested||(this.cache.setValue(this.editor,a,Xr.Automatic),this.onDidChangeEmitter.fire())})),s=new NW(n,Xr.Automatic);this.updateOperation.value=s,yield n,this.updateOperation.value===s&&this.updateOperation.clear()})}get ghostText(){var e,t;const i=this.suggestionInlineCompletionSource.state,n=dy(this.editor.getModel(),i==null?void 0:i.selectedItemAsInlineCompletion),s=dy(this.editor.getModel(),(t=(e=this.cache.value)===null||e===void 0?void 0:e.completions[0])===null||t===void 0?void 0:t.toLiveInlineCompletion()),o=s&&n&&s.text.startsWith(n.text)&&s.range.equalsRange(n.range)?s:n||s,a=n?((o==null?void 0:o.text.length)||0)-n.text.length:0,c=(h=>{const u=this.editor.getOptions().get(105).previewMode;return h?IW(h,this.editor.getModel(),u,this.editor.getPosition(),a)||new kW(h.range.endLineNumber,[],this.minReservedLineCount):void 0})(o);return this.isSuggestionPreviewEnabled()?c:void 0}}function Gue(r){return r.reduce((e,t)=>e+t,0)}var Zue=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Yue=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Xue=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Que extends Y{constructor(){super(...arguments);this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.hasCachedGhostText=!1,this.currentModelRef=this._register(new An)}get targetModel(){var e;return(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object}setTargetModel(e){var t;((t=this.currentModelRef.value)===null||t===void 0?void 0:t.object)!==e&&(this.currentModelRef.clear(),this.currentModelRef.value=e?zue(e,e.onDidChange(()=>{this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire()})):void 0,this.hasCachedGhostText=!1,this.onDidChangeEmitter.fire())}get ghostText(){var e,t;return this.hasCachedGhostText||(this.cachedGhostText=(t=(e=this.currentModelRef.value)===null||e===void 0?void 0:e.object)===null||t===void 0?void 0:t.ghostText,this.hasCachedGhostText=!0),this.cachedGhostText}setExpanded(e){var t;(t=this.targetModel)===null||t===void 0||t.setExpanded(e)}get minReservedLineCount(){return this.targetModel?this.targetModel.minReservedLineCount:0}}let IT=class extends Que{constructor(e,t){super();this.editor=e,this.commandService=t,this.sharedCache=this._register(new Jue),this.suggestWidgetAdapterModel=this._register(new que(this.editor,this.sharedCache)),this.inlineCompletionsModel=this._register(new dT(this.editor,this.sharedCache,this.commandService)),this._register(this.suggestWidgetAdapterModel.onDidChange(()=>{this.updateModel()})),this.updateModel()}get activeInlineCompletionsModel(){if(this.targetModel===this.inlineCompletionsModel)return this.inlineCompletionsModel}updateModel(){this.setTargetModel(this.suggestWidgetAdapterModel.isActive?this.suggestWidgetAdapterModel:this.inlineCompletionsModel),this.inlineCompletionsModel.setActive(this.targetModel===this.inlineCompletionsModel)}shouldShowHoverAt(e){var t;const i=(t=this.activeInlineCompletionsModel)===null||t===void 0?void 0:t.ghostText;return i?i.parts.some(n=>e.containsPosition(new $(i.lineNumber,n.column))):!1}triggerInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.trigger(Xr.Explicit)}commitInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.commitCurrentSuggestion()}hideInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.hide()}showNextInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showNext()}showPreviousInlineCompletion(){var e;(e=this.activeInlineCompletionsModel)===null||e===void 0||e.showPrevious()}hasMultipleInlineCompletions(){var e;return Xue(this,void 0,void 0,function*(){const t=yield(e=this.activeInlineCompletionsModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};IT=Zue([Yue(1,fi)],IT);class Jue extends Y{constructor(){super(...arguments);this.onDidChangeEmitter=new H,this.onDidChange=this.onDidChangeEmitter.event,this.cache=this._register(new An)}get value(){return this.cache.value}setValue(e,t,i){this.cache.value=new ohe(e,t,()=>this.onDidChangeEmitter.fire(),i)}clearAndLeak(){return this.cache.clearAndLeak()}clear(){this.cache.clear()}}var XW=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ly=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},NT;const QW=(NT=window.trustedTypes)===null||NT===void 0?void 0:NT.createPolicy("editorGhostText",{createHTML:r=>r});let TT=class extends Y{constructor(e,t,i){super();this.editor=e,this.model=t,this.instantiationService=i,this.disposed=!1,this.partsWidget=this._register(this.instantiationService.createInstance(AT,this.editor)),this.additionalLinesWidget=this._register(new ede(this.editor)),this.viewMoreContentWidget=void 0,this._register(this.editor.onDidChangeConfiguration(n=>{(n.hasChanged(29)||n.hasChanged(104)||n.hasChanged(87)||n.hasChanged(82)||n.hasChanged(44)||n.hasChanged(43)||n.hasChanged(58))&&this.update()})),this._register(Xe(()=>{var n;this.disposed=!0,this.update(),(n=this.viewMoreContentWidget)===null||n===void 0||n.dispose(),this.viewMoreContentWidget=void 0})),this._register(t.onDidChange(()=>{this.update()})),this.update()}shouldShowHoverAtViewZone(e){return this.additionalLinesWidget.viewZoneId===e}update(){var e;const t=this.model.ghostText;if(!this.editor.hasModel()||!t||this.disposed){this.partsWidget.clear(),this.additionalLinesWidget.clear();return}const i=new Array,n=new Array;function s(c,h){if(n.length>0){const u=n[n.length-1];h&&u.decorations.push(new Pr(u.content.length+1,u.content.length+1+c[0].length,h,0)),u.content+=c[0],c=c.slice(1)}for(const u of c)n.push({content:u,decorations:h?[new Pr(1,u.length+1,h,0)]:[]})}const o=this.editor.getModel().getLineContent(t.lineNumber);this.editor.getModel().getLineTokens(t.lineNumber);let a,l=0;for(const c of t.parts){let h=c.lines;a===void 0?(i.push({column:c.column,text:h[0],preview:c.preview}),h=h.slice(1)):s([o.substring(l,c.column-1)],void 0),h.length>0&&(s(h,"ghost-text"),a===void 0&&c.column<=o.length&&(a=c.column)),l=c.column-1}a!==void 0&&s([o.substring(l)],void 0),this.partsWidget.setParts(t.lineNumber,i,a!==void 0?{column:a,length:o.length+1-a}:void 0),this.additionalLinesWidget.updateLines(t.lineNumber,n,t.additionalReservedLineCount),t.parts.some(c=>c.lines.length<0)?this.viewMoreContentWidget=this.renderViewMoreLines(new $(t.lineNumber,this.editor.getModel().getLineMaxColumn(t.lineNumber)),"",0):((e=this.viewMoreContentWidget)===null||e===void 0||e.dispose(),this.viewMoreContentWidget=void 0)}renderViewMoreLines(e,t,i){const n=this.editor.getOption(43),s=document.createElement("div");s.className="suggest-preview-additional-widget",Dn.applyFontInfoSlow(s,n);const o=document.createElement("span");o.className="content-spacer",o.append(t),s.append(o);const a=document.createElement("span");a.className="content-newline suggest-preview-text",a.append("\u23CE "),s.append(a);const l=new le,c=document.createElement("div");return c.className="button suggest-preview-text",c.append(`+${i} lines\u2026`),l.add(ki(c,"mousedown",h=>{var u;(u=this.model)===null||u===void 0||u.setExpanded(!0),h.preventDefault(),this.editor.focus()})),s.append(c),new rde(this.editor,e,s,l)}};TT=XW([Ly(2,ut)],TT);let AT=class{constructor(e,t,i,n){this.editor=e,this.codeEditorService=t,this.themeService=i,this.contextKeyService=n,this.decorationIds=[],this.disposableStore=new le}dispose(){this.clear(),this.disposableStore.dispose()}clear(){this.editor.deltaDecorations(this.decorationIds,[]),this.disposableStore.clear()}setParts(e,t,i){this.disposableStore.clear();const n=this.themeService.getColorTheme(),s=n.getColor(hF);let o,a;s&&(o=String(s.rgba.a),a=K.Format.CSS.format(JW(s)));const l=n.getColor(cF);let c;l&&(c=`2px dashed ${l}`);const h=this.editor.getModel();if(!h)return;const{tabSize:u}=h.getOptions(),d=h.getLineContent(e)||"";let f=0,g="";const p=new Array;i&&p.push({range:k.fromPositions(new $(e,i.column),new $(e,i.column+i.length)),options:{inlineClassName:"ghost-text-hidden",description:"ghost-text-hidden"}});const _=this.contextKeyService.getContextKeyValue("config.editor.useInjectedText"),v=_===void 0?!0:!!_;this.decorationIds=this.editor.deltaDecorations(this.decorationIds,t.map(b=>{g+=d.substring(f,b.column-1),f=b.column-1;const C=v?b.text:this.renderSingleLineText(b.text,g,u,!1),y=this.disposableStore.add(nde(this.codeEditorService,"ghost-text","0-ghost-text-",{after:{contentText:C,opacity:o,color:a,border:c,fontWeight:b.preview?"bold":"normal"}}));return{range:k.fromPositions(new $(e,b.column)),options:v?{description:"ghost-text",after:{content:C,inlineClassName:b.preview?"ghost-text-decoration-preview":"ghost-text-decoration"},showIfCollapsed:!0}:Object.assign({},y.resolve())}}).concat(p))}renderSingleLineText(e,t,i,n){const s=t+e,o=Ot.visibleColumnsByColumns(s,i);let a="",l=t.length+1;for(const c of e){if(c===" "){const h=o[l+1]-o[l];if(n){a+="\u2192";for(let u=1;u<h;u++)a+="\xA0"}else for(let u=0;u<h;u++)a+="\xA0"}else c===" "?n?a+="\xB7":a+="\xA0":a+=c;l+=1}return a}};AT=XW([Ly(1,Ct),Ly(2,qt),Ly(3,Fe)],AT);function JW(r){const{r:e,b:t,g:i}=r.rgba;return new K(new tt(e,i,t,255))}class ede{constructor(e){this.editor=e,this._viewZoneId=void 0}get viewZoneId(){return this._viewZoneId}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(o=>{this._viewZoneId&&(o.removeZone(this._viewZoneId),this._viewZoneId=void 0);const a=Math.max(t.length,i);if(a>0){const l=document.createElement("div");tde(l,s,t,this.editor.getOptions()),this._viewZoneId=o.addZone({afterLineNumber:e,heightInLines:a,domNode:l})}})}}function tde(r,e,t,i){const n=i.get(29),s=i.get(104),o="none",a=i.get(82),l=i.get(44),c=i.get(43),h=i.get(58),u=Sh(1e4);u.appendASCIIString('<div class="suggest-preview-text">');for(let g=0,p=t.length;g<p;g++){const _=t[g],v=_.content;u.appendASCIIString('<div class="view-line'),u.appendASCIIString('" style="top:'),u.appendASCIIString(String(g*h)),u.appendASCIIString('px;width:1000000px;">');const b=YL(v),C=dv(v),y=Ki.createEmpty(v);Zv(new kh(c.isMonospace&&!n,c.canUseHalfwidthRightwardsArrow,v,!1,b,C,0,y,_.decorations,e,0,c.spaceWidth,c.middotWidth,c.wsmiddotWidth,s,o,a,l!==Dr.OFF,null),u),u.appendASCIIString("</div>")}u.appendASCIIString("</div>"),Dn.applyFontInfoSlow(r,c);const d=u.build(),f=QW?QW.createHTML(d):d;r.innerHTML=f}let ide=0;function nde(r,e,t,i){const n=t+ide++;return r.registerDecorationType(e,n,i),{dispose(){r.removeDecorationType(n)},resolve(){return r.resolveDecorationOptions(n,!0)}}}class rde extends Y{constructor(e,t,i,n){super();this.editor=e,this.position=t,this.domNode=i,this.allowEditorOverflow=!1,this.suppressMouseDown=!1,this._register(n),this._register(Xe(()=>{this.editor.removeContentWidget(this)})),this.editor.addContentWidget(this)}getId(){return"editor.widget.viewMoreLinesWidget"}getDomNode(){return this.domNode}getPosition(){return{position:this.position,preference:[0]}}}Lt((r,e)=>{const t=r.getColor(hF);if(t){const n=String(t.rgba.a),s=K.Format.CSS.format(JW(t));e.addRule(`.monaco-editor .ghost-text-decoration { opacity: ${n} !important; color: ${s} !important; }`),e.addRule(`.monaco-editor .ghost-text-decoration-preview { color: ${t.toString()} !important; }`),e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { opacity: ${n} !important; color: ${s} !important; }`)}const i=r.getColor(cF);i&&e.addRule(`.monaco-editor .suggest-preview-text .ghost-text { border: 2px dashed ${i}; }`)});var e8=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},RT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},xy=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let an=class t8 extends Y{constructor(e,t){super();this.editor=e,this.instantiationService=t,this.triggeredExplicitly=!1,this.activeController=this._register(new An),this._register(this.editor.onDidChangeModel(()=>{this.updateModelController()})),this._register(this.editor.onDidChangeConfiguration(i=>{i.hasChanged(105)&&this.updateModelController(),i.hasChanged(54)&&this.updateModelController()})),this.updateModelController()}static get(e){return e.getContribution(t8.ID)}get activeModel(){var e;return(e=this.activeController.value)===null||e===void 0?void 0:e.model}updateModelController(){const e=this.editor.getOption(105),t=this.editor.getOption(54);this.activeController.value=void 0,this.activeController.value=this.editor.hasModel()&&(e.preview||t.enabled||this.triggeredExplicitly)?this.instantiationService.createInstance(MT,this.editor):void 0}shouldShowHoverAt(e){var t;return((t=this.activeModel)===null||t===void 0?void 0:t.shouldShowHoverAt(e))||!1}shouldShowHoverAtViewZone(e){var t,i;return((i=(t=this.activeController.value)===null||t===void 0?void 0:t.widget)===null||i===void 0?void 0:i.shouldShowHoverAtViewZone(e))||!1}trigger(){var e;this.triggeredExplicitly=!0,this.activeController.value||this.updateModelController(),(e=this.activeModel)===null||e===void 0||e.triggerInlineCompletion()}commit(){var e;(e=this.activeModel)===null||e===void 0||e.commitInlineCompletion()}hide(){var e;(e=this.activeModel)===null||e===void 0||e.hideInlineCompletion()}showNextInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showNextInlineCompletion()}showPreviousInlineCompletion(){var e;(e=this.activeModel)===null||e===void 0||e.showPreviousInlineCompletion()}hasMultipleInlineCompletions(){var e;return xy(this,void 0,void 0,function*(){const t=yield(e=this.activeModel)===null||e===void 0?void 0:e.hasMultipleInlineCompletions();return t!==void 0?t:!1})}};an.inlineSuggestionVisible=new Le("inlineSuggestionVisible",!1,m("inlineSuggestionVisible","Whether an inline suggestion is visible"));an.inlineSuggestionHasIndentation=new Le("inlineSuggestionHasIndentation",!1,m("inlineSuggestionHasIndentation","Whether the inline suggestion starts with whitespace"));an.ID="editor.contrib.ghostTextController";an=e8([RT(1,ut)],an);class sde{constructor(e){this.contextKeyService=e,this.inlineCompletionVisible=an.inlineSuggestionVisible.bindTo(this.contextKeyService),this.inlineCompletionSuggestsIndentation=an.inlineSuggestionHasIndentation.bindTo(this.contextKeyService)}}let MT=class extends Y{constructor(e,t,i){super();this.editor=e,this.instantiationService=t,this.contextKeyService=i,this.contextKeys=new sde(this.contextKeyService),this.model=this._register(this.instantiationService.createInstance(IT,this.editor)),this.widget=this._register(this.instantiationService.createInstance(TT,this.editor,this.model)),this._register(Xe(()=>{this.contextKeys.inlineCompletionVisible.set(!1),this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)})),this._register(this.model.onDidChange(()=>{this.updateContextKeys()})),this.updateContextKeys()}updateContextKeys(){var e;this.contextKeys.inlineCompletionVisible.set(((e=this.model.activeInlineCompletionsModel)===null||e===void 0?void 0:e.ghostText)!==void 0);const t=this.model.inlineCompletionsModel.ghostText;if(t&&t.parts.length>0){const{column:i,lines:n}=t.parts[0],s=n[0].startsWith(" ")||n[0].startsWith(" "),o=this.editor.getModel().getLineIndentColumn(t.lineNumber),a=i<=o;this.contextKeys.inlineCompletionSuggestsIndentation.set(!!this.model.activeInlineCompletionsModel&&s&&a)}else this.contextKeys.inlineCompletionSuggestsIndentation.set(!1)}};MT=e8([RT(1,ut),RT(2,Fe)],MT);const i8=en.bindToContribution(an.get),A_=new i8({id:xW,precondition:an.inlineSuggestionVisible,handler(r){r.commit(),r.editor.focus()}});fe(A_);Bn.registerKeybindingRule({primary:2,weight:200,id:A_.id,when:_e.and(A_.precondition,R.tabMovesFocus.toNegated(),an.inlineSuggestionHasIndentation.toNegated())});fe(new i8({id:"editor.action.inlineSuggest.hide",precondition:an.inlineSuggestionVisible,kbOpts:{weight:100,primary:9},handler(r){r.hide()}}));class ig extends Se{constructor(){super({id:ig.ID,label:m("action.inlineSuggest.showNext","Show Next Inline Suggestion"),alias:"Show Next Inline Suggestion",precondition:_e.and(R.writable,an.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|89}})}run(e,t){return xy(this,void 0,void 0,function*(){const i=an.get(t);i&&(i.showNextInlineCompletion(),t.focus())})}}ig.ID="editor.action.inlineSuggest.showNext";class ng extends Se{constructor(){super({id:ng.ID,label:m("action.inlineSuggest.showPrevious","Show Previous Inline Suggestion"),alias:"Show Previous Inline Suggestion",precondition:_e.and(R.writable,an.inlineSuggestionVisible),kbOpts:{weight:100,primary:512|87}})}run(e,t){return xy(this,void 0,void 0,function*(){const i=an.get(t);i&&(i.showPreviousInlineCompletion(),t.focus())})}}ng.ID="editor.action.inlineSuggest.showPrevious";class ode extends Se{constructor(){super({id:"editor.action.inlineSuggest.trigger",label:m("action.inlineSuggest.trigger","Trigger Inline Suggestion"),alias:"Trigger Inline Suggestion",precondition:R.writable})}run(e,t){return xy(this,void 0,void 0,function*(){const i=an.get(t);i&&i.trigger()})}}wt(an.ID,an);me(ode);me(ig);me(ng);var ade=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},rg=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};class lde{constructor(e,t,i){this.owner=e,this.range=t,this.controller=i}isValidForHoverAnchor(e){return e.type===1&&this.range.startColumn<=e.range.startColumn&&this.range.endColumn>=e.range.endColumn}hasMultipleSuggestions(){return this.controller.hasMultipleInlineCompletions()}}let PT=class{constructor(e,t,i,n,s,o,a,l){this._editor=e,this._hover=t,this._commandService=i,this._menuService=n,this._contextKeyService=s,this._modeService=o,this._openerService=a,this.accessibilityService=l}suggestHoverAnchor(e){const t=an.get(this._editor);if(!t)return null;if(e.target.type===8){const i=e.target.detail;if(t.shouldShowHoverAtViewZone(i.viewZoneId))return new YN(1e3,this,k.fromPositions(i.positionBefore||i.position,i.positionBefore||i.position))}return e.target.type===7&&e.target.range&&t.shouldShowHoverAt(e.target.range)?new YN(1e3,this,e.target.range):e.target.type===6&&e.target.range&&e.target.detail&&e.target.detail.mightBeForeignElement&&t.shouldShowHoverAt(e.target.range)?new YN(1e3,this,e.target.range):null}computeSync(e,t){const i=an.get(this._editor);return i&&i.shouldShowHoverAt(e.range)?[new lde(this,e.range,i)]:[]}renderHoverParts(e,t,i){const n=new le,s=e[0];this.accessibilityService.isScreenReaderOptimized()&&this.renderScreenReaderText(s,t,n);const o=n.add(this._menuService.createMenu(xe.InlineCompletionsActions,this._contextKeyService)),a=i.addAction({label:m("showNextInlineSuggestion","Next"),commandId:ig.ID,run:()=>this._commandService.executeCommand(ig.ID)}),l=i.addAction({label:m("showPreviousInlineSuggestion","Previous"),commandId:ng.ID,run:()=>this._commandService.executeCommand(ng.ID)});i.addAction({label:m("acceptInlineSuggestion","Accept"),commandId:A_.id,run:()=>this._commandService.executeCommand(A_.id)});const c=[a,l];for(const h of c)h.setEnabled(!1);s.hasMultipleSuggestions().then(h=>{for(const u of c)u.setEnabled(h)});for(const[h,u]of o.getActions())for(const d of u)d instanceof Jl&&i.addAction({label:d.label,commandId:d.item.id,run:()=>this._commandService.executeCommand(d.item.id)});return n}renderScreenReaderText(e,t,i){var n,s;const o=oe,a=o("div.hover-row.markdown-hover"),l=X(a,o("div.hover-contents")),c=i.add(new Ac({editor:this._editor},this._modeService,this._openerService)),h=d=>{i.add(c.onDidRenderAsync(()=>{l.className="hover-contents code-hover-contents",this._hover.onContentsChanged()}));const f=m("inlineSuggestionFollows","Suggestion:"),g=i.add(c.render(new ul().appendText(f).appendCodeblock("text",d)));l.replaceChildren(g.element)},u=(s=(n=e.controller.activeModel)===null||n===void 0?void 0:n.inlineCompletionsModel)===null||s===void 0?void 0:s.ghostText;if(u){const d=this._editor.getModel().getLineContent(u.lineNumber);h(u.renderForScreenReader(d))}t.appendChild(a)}};PT=ade([rg(2,fi),rg(3,Th),rg(4,Fe),rg(5,Ds),rg(6,Js),rg(7,_r)],PT);var n8=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},OT=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},r8=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const s8=oe;let FT=class extends Y{constructor(e){super();this._keybindingService=e,this._hasContent=!1,this.hoverElement=s8("div.hover-row.status-bar"),this.actionsElement=X(this.hoverElement,s8("div.actions"))}get hasContent(){return this._hasContent}addAction(e){const t=this._keybindingService.lookupKeybinding(e.commandId),i=t?t.getLabel():null;return this._hasContent=!0,this._register(GN.render(this.actionsElement,e,i))}append(e){const t=X(this.actionsElement,e);return this._hasContent=!0,t}};FT=n8([OT(0,Qt)],FT);class ky{constructor(e,t){this._participants=t,this._editor=e,this._result=[],this._anchor=null}setAnchor(e){this._anchor=e,this._result=[]}clearResult(){this._result=[]}static _getLineDecorations(e,t){if(t.type!==1)return[];const i=e.getModel(),n=t.range.startLineNumber,s=i.getLineMaxColumn(n);return e.getLineDecorations(n).filter(o=>{if(o.options.isWholeLine)return!0;const a=o.range.startLineNumber===n?o.range.startColumn:1,l=o.range.endLineNumber===n?o.range.endColumn:s;return!(a>t.range.startColumn||t.range.endColumn>l)})}computeAsync(e){return r8(this,void 0,void 0,function*(){const t=this._anchor;if(!this._editor.hasModel()||!t)return Promise.resolve([]);const i=ky._getLineDecorations(this._editor,t),n=yield Promise.all(this._participants.map(s=>this._computeAsync(s,i,t,e)));return Hx(n)})}_computeAsync(e,t,i,n){return r8(this,void 0,void 0,function*(){return e.computeAsync?e.computeAsync(i,t,n):[]})}computeSync(){if(!this._editor.hasModel()||!this._anchor)return[];const e=ky._getLineDecorations(this._editor,this._anchor);let t=[];for(const i of this._participants)t=t.concat(i.computeSync(this._anchor,e));return xh(t)}onResult(e,t){t?this._result=e.concat(this._result):this._result=this._result.concat(e)}getResult(){return this._result.slice(0)}getResultWithLoadingMessage(){if(this._anchor){for(const e of this._participants)if(e.createLoadingMessage){const t=e.createLoadingMessage(this._anchor);if(t)return this._result.slice(0).concat([t])}}return this._result.slice(0)}}let Pc=class BT extends Vr{constructor(e,t,i,n){super();this._hoverVisibleKey=t,this._keybindingService=n,this.allowEditorOverflow=!0,this._participants=[i.createInstance(ZN,e,this),i.createInstance(rT,e,this),i.createInstance(PT,e,this),i.createInstance(uT,e,this)],this._hover=this._register(new jB),this._editor=e,this._isVisible=!1,this._stoleFocus=!1,this._renderDisposable=null,this.onkeydown(this._hover.containerDomNode,s=>{s.equals(9)&&this.hide()}),this._register(this._editor.onDidChangeConfiguration(s=>{s.hasChanged(43)&&this._updateFont()})),this._editor.onDidLayoutChange(()=>this.layout()),this.layout(),this._editor.addContentWidget(this),this._showAtPosition=null,this._showAtRange=null,this._stoleFocus=!1,this._messages=[],this._lastAnchor=null,this._computer=new ky(this._editor,this._participants),this._highlightDecorations=[],this._isChangingDecorations=!1,this._shouldFocus=!1,this._colorPicker=null,this._hoverOperation=new GB(this._computer,s=>this._withResult(s,!0),null,s=>this._withResult(s,!1),this._editor.getOption(52).delay),this._register(ki(this.getDomNode(),Ee.FOCUS,()=>{this._colorPicker&&this.getDomNode().classList.add("colorpicker-hover")})),this._register(ki(this.getDomNode(),Ee.BLUR,()=>{this.getDomNode().classList.remove("colorpicker-hover")})),this._register(e.onDidChangeConfiguration(()=>{this._hoverOperation.setHoverTime(this._editor.getOption(52).delay)})),this._register(ti.onDidChange(()=>{this._isVisible&&this._lastAnchor&&this._messages.length>0&&(this._hover.contentsDomNode.textContent="",this._renderMessages(this._lastAnchor,this._messages))}))}dispose(){this._hoverOperation.cancel(),this._editor.removeContentWidget(this),super.dispose()}getId(){return BT.ID}getDomNode(){return this._hover.containerDomNode}_shouldShowAt(e){const t=e.target.type;if(t===6)return!0;if(t===7){const i=this._editor.getOption(43).typicalHalfwidthCharacterWidth/2,n=e.target.detail;if(n&&!n.isAfterLines&&typeof n.horizontalDistanceToText=="number"&&n.horizontalDistanceToText<i)return!0}return!1}maybeShowAt(e){var t;const i=[];for(const n of this._participants)if(typeof n.suggestHoverAnchor=="function"){const s=n.suggestHoverAnchor(e);s&&i.push(s)}if(this._shouldShowAt(e)&&e.target.range){const s=[...((t=e.target.element)===null||t===void 0?void 0:t.classList.values())||[]].find(o=>o.startsWith("ced-colorBox"))&&e.target.range.endColumn-e.target.range.startColumn==1?new k(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1):e.target.range;i.push(new ZB(0,s))}return i.length===0?!1:(i.sort((n,s)=>s.priority-n.priority),this._startShowingAt(i[0],0,!1),!0)}_showAt(e,t,i){this._showAtPosition=e,this._showAtRange=t,this._hoverVisibleKey.set(!0),this._isVisible=!0,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._editor.render(),this._stoleFocus=i,i&&this._hover.containerDomNode.focus()}getPosition(){return this._isVisible?{position:this._showAtPosition,range:this._showAtRange,preference:[1,2]}:null}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont(),this._editor.layoutContentWidget(this),this._hover.onContentsChanged()}layout(){const e=Math.max(this._editor.getLayoutInfo().height/4,250),{fontSize:t,lineHeight:i}=this._editor.getOption(43);this._hover.contentsDomNode.style.fontSize=`${t}px`,this._hover.contentsDomNode.style.lineHeight=`${i}px`,this._hover.contentsDomNode.style.maxHeight=`${e}px`,this._hover.contentsDomNode.style.maxWidth=`${Math.max(this._editor.getLayoutInfo().width*.66,500)}px`}onModelDecorationsChanged(){this._isChangingDecorations||this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._colorPicker||this._hoverOperation.start(0))}startShowingAtRange(e,t,i){this._startShowingAt(new ZB(0,e),t,i)}_startShowingAt(e,t,i){if(!(this._lastAnchor&&this._lastAnchor.equals(e))){if(this._hoverOperation.cancel(),this._isVisible)if(!this._showAtPosition||!this._lastAnchor||!e.canAdoptVisibleHover(this._lastAnchor,this._showAtPosition))this.hide();else{const n=this._messages.filter(s=>s.isValidForHoverAnchor(e));if(n.length===0)this.hide();else{if(n.length===this._messages.length)return;this._renderMessages(e,n)}}this._lastAnchor=e,this._computer.setAnchor(e),this._shouldFocus=i,this._hoverOperation.start(t)}}hide(){this._lastAnchor=null,this._hoverOperation.cancel(),this._isVisible&&(setTimeout(()=>{this._isVisible||this._hoverVisibleKey.set(!1)},0),this._isVisible=!1,this._hover.containerDomNode.classList.toggle("hidden",!this._isVisible),this._editor.layoutContentWidget(this),this._stoleFocus&&this._editor.focus()),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,[]),this._isChangingDecorations=!1,this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null}isColorPickerVisible(){return!!this._colorPicker}setColorPicker(e){this._colorPicker=e}onContentsChanged(){this._hover.onContentsChanged()}_withResult(e,t){this._messages=e,this._lastAnchor&&this._messages.length>0?this._renderMessages(this._lastAnchor,this._messages):t&&this.hide()}_renderMessages(e,t){this._renderDisposable&&(this._renderDisposable.dispose(),this._renderDisposable=null),this._colorPicker=null;let i=1073741824,n=t[0].range,s=null,o=document.createDocumentFragment();const a=new le,l=new Map;for(const h of t)i=Math.min(i,h.range.startColumn),n=k.plusRange(n,h.range),h.forceShowAtRange&&(s=h.range),l.has(h.owner)||l.set(h.owner,[]),l.get(h.owner).push(h);const c=a.add(new FT(this._keybindingService));for(const[h,u]of l)a.add(h.renderHoverParts(u,o,c));c.hasContent&&o.appendChild(c.hoverElement),this._renderDisposable=a,o.hasChildNodes()&&(s?this._showAt(s.getStartPosition(),s,this._shouldFocus):this._showAt(new $(e.range.startLineNumber,i),n,this._shouldFocus),this._updateContents(o)),this._colorPicker&&this._colorPicker.layout(),this._isChangingDecorations=!0,this._highlightDecorations=this._editor.deltaDecorations(this._highlightDecorations,n?[{range:n,options:BT._DECORATION_OPTIONS}]:[]),this._isChangingDecorations=!1}};Pc.ID="editor.contrib.modesContentHoverWidget";Pc._DECORATION_OPTIONS=Ke.register({description:"content-hover-highlight",className:"hoverHighlight"});Pc=n8([OT(2,ut),OT(3,Qt)],Pc);const o8=oe;class cde{constructor(e){this._editor=e,this._lineNumber=-1,this._result=[]}setLineNumber(e){this._lineNumber=e,this._result=[]}clearResult(){this._result=[]}computeSync(){const e=n=>({value:n}),t=this._editor.getLineDecorations(this._lineNumber),i=[];if(!t)return i;for(const n of t){if(!n.options.glyphMarginClassName)continue;const s=n.options.glyphMarginHoverMessage;!s||t_(s)||i.push(...$x(s).map(e))}return i}onResult(e,t){this._result=this._result.concat(e)}getResult(){return this._result}getResultWithLoadingMessage(){return this.getResult()}}class Vu extends Vr{constructor(e,t,i=CK){super();this._renderDisposeables=this._register(new le),this._editor=e,this._hover=this._register(new jB),this._isVisible=!1,this._messages=[],this._lastLineNumber=-1,this._markdownRenderer=this._register(new Ac({editor:this._editor},t,i)),this._computer=new cde(this._editor),this._hoverOperation=new GB(this._computer,n=>this._withResult(n),void 0,n=>this._withResult(n),300),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(43)&&this._updateFont()})),this._editor.addOverlayWidget(this)}dispose(){this._hoverOperation.cancel(),this._editor.removeOverlayWidget(this),super.dispose()}getId(){return Vu.ID}getDomNode(){return this._hover.containerDomNode}getPosition(){return null}_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(58),o=this._hover.containerDomNode.clientHeight,a=i-n-(o-s)/2;this._hover.containerDomNode.style.left=`${t.glyphMarginLeft+t.glyphMarginWidth}px`,this._hover.containerDomNode.style.top=`${Math.max(Math.round(a),0)}px`}_updateFont(){Array.prototype.slice.call(this._hover.contentsDomNode.getElementsByClassName("code")).forEach(t=>this._editor.applyFontInfo(t))}_updateContents(e){this._hover.contentsDomNode.textContent="",this._hover.contentsDomNode.appendChild(e),this._updateFont()}onModelDecorationsChanged(){this._isVisible&&(this._hoverOperation.cancel(),this._computer.clearResult(),this._hoverOperation.start(0))}startShowingAt(e){this._lastLineNumber!==e&&(this._hoverOperation.cancel(),this.hide(),this._lastLineNumber=e,this._computer.setLineNumber(e),this._hoverOperation.start(0))}hide(){this._lastLineNumber=-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._lastLineNumber,this._messages):this.hide()}_renderMessages(e,t){this._renderDisposeables.clear();const i=document.createDocumentFragment();for(const n of t){const s=o8("div.hover-row.markdown-hover"),o=X(s,o8("div.hover-contents")),a=this._renderDisposeables.add(this._markdownRenderer.render(n.value));o.appendChild(a.element),i.appendChild(s)}this._updateContents(i),this._showAt(e)}}Vu.ID="editor.contrib.modesGlyphHoverWidget";var hde=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Dy=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Oc=class a8{constructor(e,t,i,n,s){this._editor=e,this._instantiationService=t,this._openerService=i,this._modeService=n,this._toUnhook=new le,this._isMouseDown=!1,this._hoverClicked=!1,this._contentWidget=null,this._glyphWidget=null,this._hookEvents(),this._didChangeConfigurationHandler=this._editor.onDidChangeConfiguration(o=>{o.hasChanged(52)&&(this._unhookEvents(),this._hookEvents())}),this._hoverVisibleKey=R.hoverVisible.bindTo(s)}static get(e){return e.getContribution(a8.ID)}_hookEvents(){const e=()=>this._hideWidgets(),t=this._editor.getOption(52);this._isHoverEnabled=t.enabled,this._isHoverSticky=t.sticky,this._isHoverEnabled?(this._toUnhook.add(this._editor.onMouseDown(i=>this._onEditorMouseDown(i))),this._toUnhook.add(this._editor.onMouseUp(i=>this._onEditorMouseUp(i))),this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i))),this._toUnhook.add(this._editor.onDidChangeModelDecorations(()=>this._onModelDecorationsChanged()))):(this._toUnhook.add(this._editor.onMouseMove(i=>this._onEditorMouseMove(i))),this._toUnhook.add(this._editor.onKeyDown(i=>this._onKeyDown(i)))),this._toUnhook.add(this._editor.onMouseLeave(e)),this._toUnhook.add(this._editor.onDidChangeModel(e)),this._toUnhook.add(this._editor.onDidScrollChange(i=>this._onEditorScrollChanged(i)))}_unhookEvents(){this._toUnhook.clear()}_onModelDecorationsChanged(){var e,t;(e=this._contentWidget)===null||e===void 0||e.onModelDecorationsChanged(),(t=this._glyphWidget)===null||t===void 0||t.onModelDecorationsChanged()}_onEditorScrollChanged(e){(e.scrollTopChanged||e.scrollLeftChanged)&&this._hideWidgets()}_onEditorMouseDown(e){this._isMouseDown=!0;const t=e.target.type;if(t===9&&e.target.detail===Pc.ID){this._hoverClicked=!0;return}t===12&&e.target.detail===Vu.ID||(t!==12&&e.target.detail!==Vu.ID&&(this._hoverClicked=!1),this._hideWidgets())}_onEditorMouseUp(e){this._isMouseDown=!1}_onEditorMouseMove(e){var t,i,n,s,o;let a=e.target.type;if(this._isMouseDown&&this._hoverClicked||this._isHoverSticky&&a===9&&e.target.detail===Pc.ID||this._isHoverSticky&&!((i=(t=e.event.browserEvent.view)===null||t===void 0?void 0:t.getSelection())===null||i===void 0?void 0:i.isCollapsed)||!this._isHoverSticky&&a===9&&e.target.detail===Pc.ID&&((n=this._contentWidget)===null||n===void 0?void 0:n.isColorPickerVisible())||this._isHoverSticky&&a===12&&e.target.detail===Vu.ID)return;if(!this._isHoverEnabled){this._hideWidgets();return}if(this._getOrCreateContentWidget().maybeShowAt(e)){(s=this._glyphWidget)===null||s===void 0||s.hide();return}if(a===2&&e.target.position){(o=this._contentWidget)===null||o===void 0||o.hide(),this._glyphWidget||(this._glyphWidget=new Vu(this._editor,this._modeService,this._openerService)),this._glyphWidget.startShowingAt(e.target.position.lineNumber);return}this._hideWidgets()}_onKeyDown(e){e.keyCode!==5&&e.keyCode!==6&&e.keyCode!==57&&e.keyCode!==4&&this._hideWidgets()}_hideWidgets(){var e,t,i;this._isMouseDown&&this._hoverClicked&&((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||(this._hoverClicked=!1,(t=this._glyphWidget)===null||t===void 0||t.hide(),(i=this._contentWidget)===null||i===void 0||i.hide())}_getOrCreateContentWidget(){return this._contentWidget||(this._contentWidget=this._instantiationService.createInstance(Pc,this._editor,this._hoverVisibleKey)),this._contentWidget}isColorPickerVisible(){var e;return((e=this._contentWidget)===null||e===void 0?void 0:e.isColorPickerVisible())||!1}showContentHover(e,t,i){this._getOrCreateContentWidget().startShowingAtRange(e,t,i)}dispose(){var e,t;this._unhookEvents(),this._toUnhook.dispose(),this._didChangeConfigurationHandler.dispose(),(e=this._glyphWidget)===null||e===void 0||e.dispose(),(t=this._contentWidget)===null||t===void 0||t.dispose()}};Oc.ID="editor.contrib.hover";Oc=hde([Dy(1,ut),Dy(2,Js),Dy(3,Ds),Dy(4,Fe)],Oc);class ude extends Se{constructor(){super({id:"editor.action.showHover",label:m({key:"showHover",comment:["Label for action that will trigger the showing of a hover in the editor.","This allows for users to show the hover without using the mouse."]},"Show Hover"),alias:"Show Hover",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|39),weight:100}})}run(e,t){if(!t.hasModel())return;let i=Oc.get(t);if(!i)return;const n=t.getPosition(),s=new k(n.lineNumber,n.column,n.lineNumber,n.column),o=t.getOption(2)===2;i.showContentHover(s,1,o)}}class dde extends Se{constructor(){super({id:"editor.action.showDefinitionPreviewHover",label:m({key:"showDefinitionPreviewHover",comment:["Label for action that will trigger the showing of definition preview hover in the editor.","This allows for users to show the definition preview hover without using the mouse."]},"Show Definition Preview Hover"),alias:"Show Definition Preview Hover",precondition:void 0})}run(e,t){let i=Oc.get(t);if(!i)return;const n=t.getPosition();if(!n)return;const s=new k(n.lineNumber,n.column,n.lineNumber,n.column);Pu.get(t).startFindDefinitionFromCursor(n).then(()=>{i.showContentHover(s,1,!0)})}}wt(Oc.ID,Oc);me(ude);me(dde);Lt((r,e)=>{const t=r.getColor(nX);t&&e.addRule(`.monaco-editor .hoverHighlight { background-color: ${t}; }`);const i=r.getColor(Vh);i&&e.addRule(`.monaco-editor .monaco-hover { background-color: ${i}; }`);const n=r.getColor(sD);n&&(e.addRule(`.monaco-editor .monaco-hover { border: 1px solid ${n}; }`),e.addRule(`.monaco-editor .monaco-hover .hover-row:not(:first-child):not(:empty) { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-top: 1px solid ${n.transparent(.5)}; }`),e.addRule(`.monaco-editor .monaco-hover hr { border-bottom: 0px solid ${n.transparent(.5)}; }`));const s=r.getColor(Gp);s&&e.addRule(`.monaco-editor .monaco-hover a { color: ${s}; }`);const o=r.getColor(Zp);o&&e.addRule(`.monaco-editor .monaco-hover a:hover { color: ${o}; }`);const a=r.getColor(rD);a&&e.addRule(`.monaco-editor .monaco-hover { color: ${a}; }`);const l=r.getColor(rX);l&&e.addRule(`.monaco-editor .monaco-hover .hover-row .actions { background-color: ${l}; }`);const c=r.getColor(zk);c&&e.addRule(`.monaco-editor .monaco-hover code { background-color: ${c}; }`)});class WT extends Y{constructor(e){super();this._editor=e,this._register(e.onMouseDown(t=>this.onMouseDown(t)))}dispose(){super.dispose()}onMouseDown(e){var t;if(e.target.type!==6||![...((t=e.target.element)===null||t===void 0?void 0:t.classList.values())||[]].find(o=>o.startsWith("ced-colorBox"))||!e.target.range)return;const s=this._editor.getContribution(Oc.ID);if(!s.isColorPickerVisible()){const o=new k(e.target.range.startLineNumber,e.target.range.startColumn+1,e.target.range.endLineNumber,e.target.range.endColumn+1);s.showContentHover(o,0,!1)}}}WT.ID="editor.contrib.colorContribution";wt(WT.ID,WT);class Fc{constructor(e,t){this._selection=e,this._insertSpace=t,this._usedEndToken=null}static _haystackHasNeedleAtOffset(e,t,i){if(i<0)return!1;const n=t.length,s=e.length;if(i+n>s)return!1;for(let o=0;o<n;o++){const a=e.charCodeAt(i+o),l=t.charCodeAt(o);if(a!==l&&!(a>=65&&a<=90&&a+32===l)&&!(l>=65&&l<=90&&l+32===a))return!1}return!0}_createOperationsForBlockComment(e,t,i,n,s,o){const a=e.startLineNumber,l=e.startColumn,c=e.endLineNumber,h=e.endColumn,u=s.getLineContent(a),d=s.getLineContent(c);let f=u.lastIndexOf(t,l-1+t.length),g=d.indexOf(i,h-1-i.length);if(f!==-1&&g!==-1)if(a===c)u.substring(f+t.length,g).indexOf(i)>=0&&(f=-1,g=-1);else{const _=u.substring(f+t.length),v=d.substring(0,g);(_.indexOf(i)>=0||v.indexOf(i)>=0)&&(f=-1,g=-1)}let p;f!==-1&&g!==-1?(n&&f+t.length<u.length&&u.charCodeAt(f+t.length)===32&&(t=t+" "),n&&g>0&&d.charCodeAt(g-1)===32&&(i=" "+i,g-=1),p=Fc._createRemoveBlockCommentOperations(new k(a,f+t.length+1,c,g+1),t,i)):(p=Fc._createAddBlockCommentOperations(e,t,i,this._insertSpace),this._usedEndToken=p.length===1?i:null);for(const _ of p)o.addTrackedEditOperation(_.range,_.text)}static _createRemoveBlockCommentOperations(e,t,i){let n=[];return k.isEmpty(e)?n.push(ci.delete(new k(e.startLineNumber,e.startColumn-t.length,e.endLineNumber,e.endColumn+i.length))):(n.push(ci.delete(new k(e.startLineNumber,e.startColumn-t.length,e.startLineNumber,e.startColumn))),n.push(ci.delete(new k(e.endLineNumber,e.endColumn,e.endLineNumber,e.endColumn+i.length)))),n}static _createAddBlockCommentOperations(e,t,i,n){let s=[];return k.isEmpty(e)?s.push(ci.replace(new k(e.startLineNumber,e.startColumn,e.endLineNumber,e.endColumn),t+" "+i)):(s.push(ci.insert(new $(e.startLineNumber,e.startColumn),t+(n?" ":""))),s.push(ci.insert(new $(e.endLineNumber,e.endColumn),(n?" ":"")+i))),s}getEditOperations(e,t){const i=this._selection.startLineNumber,n=this._selection.startColumn;e.tokenizeIfCheap(i);const s=e.getLanguageIdAtPosition(i,n),o=ze.getComments(s);!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(i.length===2){const n=i[0],s=i[1];return new be(n.range.endLineNumber,n.range.endColumn,s.range.startLineNumber,s.range.startColumn)}else{const n=i[0].range,s=this._usedEndToken?-this._usedEndToken.length-1:0;return new be(n.endLineNumber,n.endColumn+s,n.endLineNumber,n.endColumn+s)}}}class vl{constructor(e,t,i,n,s,o){this._selection=e,this._tabSize=t,this._type=i,this._insertSpace=n,this._selectionId=null,this._deltaColumn=0,this._moveEndPositionDown=!1,this._ignoreEmptyLines=s,this._ignoreFirstLine=o||!1}static _gatherPreflightCommentStrings(e,t,i){e.tokenizeIfCheap(t);const n=e.getLanguageIdAtPosition(t,1),s=ze.getComments(n),o=s?s.lineCommentToken:null;if(!o)return null;let a=[];for(let l=0,c=i-t+1;l<c;l++)a[l]={ignore:!1,commentStr:o,commentStrOffset:0,commentStrLength:o.length};return a}static _analyzeLines(e,t,i,n,s,o,a){let l=!0,c;e===0?c=!0:e===1?c=!1:c=!0;for(let h=0,u=n.length;h<u;h++){const d=n[h],f=s+h;if(f===s&&a){d.ignore=!0;continue}const g=i.getLineContent(f),p=dr(g);if(p===-1){d.ignore=o,d.commentStrOffset=g.length;continue}if(l=!1,d.ignore=!1,d.commentStrOffset=p,c&&!Fc._haystackHasNeedleAtOffset(g,d.commentStr,p)&&(e===0?c=!1:e===1||(d.ignore=!0)),c&&t){const _=p+d.commentStrLength;_<g.length&&g.charCodeAt(_)===32&&(d.commentStrLength+=1)}}if(e===0&&l){c=!1;for(let h=0,u=n.length;h<u;h++)n[h].ignore=!1}return{supported:!0,shouldRemoveComments:c,lines:n}}static _gatherPreflightData(e,t,i,n,s,o,a){const l=vl._gatherPreflightCommentStrings(i,n,s);return l===null?{supported:!1}:vl._analyzeLines(e,t,i,l,n,o,a)}_executeLineComments(e,t,i,n){let s;i.shouldRemoveComments?s=vl._createRemoveLineCommentsOperations(i.lines,n.startLineNumber):(vl._normalizeInsertionPoint(e,i.lines,n.startLineNumber,this._tabSize),s=this._createAddLineCommentsOperations(i.lines,n.startLineNumber));const o=new $(n.positionLineNumber,n.positionColumn);for(let a=0,l=s.length;a<l;a++)t.addEditOperation(s[a].range,s[a].text),k.isEmpty(s[a].range)&&k.getStartPosition(s[a].range).equals(o)&&e.getLineContent(o.lineNumber).length+1===o.column&&(this._deltaColumn=(s[a].text||"").length);this._selectionId=t.trackSelection(n)}_attemptRemoveBlockComment(e,t,i,n){let s=t.startLineNumber,o=t.endLineNumber,a=n.length+Math.max(e.getLineFirstNonWhitespaceColumn(t.startLineNumber),t.startColumn),l=e.getLineContent(s).lastIndexOf(i,a-1),c=e.getLineContent(o).indexOf(n,t.endColumn-1-i.length);return l!==-1&&c===-1&&(c=e.getLineContent(s).indexOf(n,l+i.length),o=s),l===-1&&c!==-1&&(l=e.getLineContent(o).lastIndexOf(i,c),s=o),t.isEmpty()&&(l===-1||c===-1)&&(l=e.getLineContent(s).indexOf(i),l!==-1&&(c=e.getLineContent(s).indexOf(n,l+i.length))),l!==-1&&e.getLineContent(s).charCodeAt(l+i.length)===32&&(i+=" "),c!==-1&&e.getLineContent(o).charCodeAt(c-1)===32&&(n=" "+n,c-=1),l!==-1&&c!==-1?Fc._createRemoveBlockCommentOperations(new k(s,l+i.length+1,o,c+1),i,n):null}_executeBlockComment(e,t,i){e.tokenizeIfCheap(i.startLineNumber);let n=e.getLanguageIdAtPosition(i.startLineNumber,1),s=ze.getComments(n);if(!s||!s.blockCommentStartToken||!s.blockCommentEndToken)return;const o=s.blockCommentStartToken,a=s.blockCommentEndToken;let l=this._attemptRemoveBlockComment(e,i,o,a);if(!l){if(i.isEmpty()){const c=e.getLineContent(i.startLineNumber);let h=dr(c);h===-1&&(h=c.length),l=Fc._createAddBlockCommentOperations(new k(i.startLineNumber,h+1,i.startLineNumber,c.length+1),o,a,this._insertSpace)}else l=Fc._createAddBlockCommentOperations(new k(i.startLineNumber,e.getLineFirstNonWhitespaceColumn(i.startLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),o,a,this._insertSpace);l.length===1&&(this._deltaColumn=o.length+1)}this._selectionId=t.trackSelection(i);for(const c of l)t.addEditOperation(c.range,c.text)}getEditOperations(e,t){let i=this._selection;if(this._moveEndPositionDown=!1,i.startLineNumber===i.endLineNumber&&this._ignoreFirstLine){t.addEditOperation(new k(i.startLineNumber,e.getLineMaxColumn(i.startLineNumber),i.startLineNumber+1,1),i.startLineNumber===e.getLineCount()?"":` -`),this._selectionId=t.trackSelection(i);return}i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._moveEndPositionDown=!0,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));const n=vl._gatherPreflightData(this._type,this._insertSpace,e,i.startLineNumber,i.endLineNumber,this._ignoreEmptyLines,this._ignoreFirstLine);return n.supported?this._executeLineComments(e,t,n,i):this._executeBlockComment(e,t,i)}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);return this._moveEndPositionDown&&(i=i.setEndPosition(i.endLineNumber+1,1)),new be(i.selectionStartLineNumber,i.selectionStartColumn+this._deltaColumn,i.positionLineNumber,i.positionColumn+this._deltaColumn)}static _createRemoveLineCommentsOperations(e,t){let i=[];for(let n=0,s=e.length;n<s;n++){const o=e[n];o.ignore||i.push(ci.delete(new k(t+n,o.commentStrOffset+1,t+n,o.commentStrOffset+o.commentStrLength+1)))}return i}_createAddLineCommentsOperations(e,t){let i=[];const n=this._insertSpace?" ":"";for(let s=0,o=e.length;s<o;s++){const a=e[s];a.ignore||i.push(ci.insert(new $(t+s,a.commentStrOffset+1),a.commentStr+n))}return i}static nextVisibleColumn(e,t,i,n){return i?e+(t-e%t):e+n}static _normalizeInsertionPoint(e,t,i,n){let s=1073741824,o,a;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const h=e.getLineContent(i+l);let u=0;for(let d=0,f=t[l].commentStrOffset;u<s&&d<f;d++)u=vl.nextVisibleColumn(u,n,h.charCodeAt(d)===9,1);u<s&&(s=u)}s=Math.floor(s/n)*n;for(let l=0,c=t.length;l<c;l++){if(t[l].ignore)continue;const h=e.getLineContent(i+l);let u=0;for(o=0,a=t[l].commentStrOffset;u<s&&o<a;o++)u=vl.nextVisibleColumn(u,n,h.charCodeAt(o)===9,1);u>s?t[l].commentStrOffset=o-1:t[l].commentStrOffset=o}}}class VT extends Se{constructor(e,t){super(t);this._type=e}run(e,t){if(!t.hasModel())return;const i=t.getModel(),n=[],s=i.getOptions(),o=t.getOption(19),a=t.getSelections().map((c,h)=>({selection:c,index:h,ignoreFirstLine:!1}));a.sort((c,h)=>k.compareRangesUsingStarts(c.selection,h.selection));let l=a[0];for(let c=1;c<a.length;c++){const h=a[c];l.selection.endLineNumber===h.selection.startLineNumber&&(l.index<h.index?h.ignoreFirstLine=!0:(l.ignoreFirstLine=!0,l=h))}for(const c of a)n.push(new vl(c.selection,s.tabSize,this._type,o.insertSpace,o.ignoreEmptyLines,c.ignoreFirstLine));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class fde extends VT{constructor(){super(0,{id:"editor.action.commentLine",label:m("comment.line","Toggle Line Comment"),alias:"Toggle Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|85,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleLineComment",comment:["&& denotes a mnemonic"]},"&&Toggle Line Comment"),order:1}})}}class gde extends VT{constructor(){super(1,{id:"editor.action.addCommentLine",label:m("comment.line.add","Add Line Comment"),alias:"Add Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|33),weight:100}})}}class pde extends VT{constructor(){super(2,{id:"editor.action.removeCommentLine",label:m("comment.line.remove","Remove Line Comment"),alias:"Remove Line Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|51),weight:100}})}}class mde extends Se{constructor(){super({id:"editor.action.blockComment",label:m("comment.block","Toggle Block Comment"),alias:"Toggle Block Comment",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|31,linux:{primary:2048|1024|31},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"5_insert",title:m({key:"miToggleBlockComment",comment:["&& denotes a mnemonic"]},"Toggle &&Block Comment"),order:2}})}run(e,t){if(!t.hasModel())return;const i=t.getOption(19),n=[],s=t.getSelections();for(const o of s)n.push(new Fc(o,i.insertSpace));t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}me(fde);me(gde);me(pde);me(mde);var _de=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},R_=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let sg=class l8{constructor(e,t,i,n,s,o){this._contextMenuService=t,this._contextViewService=i,this._contextKeyService=n,this._keybindingService=s,this._menuService=o,this._toDispose=new le,this._contextMenuIsBeingShownCount=0,this._editor=e,this._toDispose.add(this._editor.onContextMenu(a=>this._onContextMenu(a))),this._toDispose.add(this._editor.onMouseWheel(a=>{if(this._contextMenuIsBeingShownCount>0){const l=this._contextViewService.getContextViewElement(),c=a.srcElement;c.shadowRoot&&_h(l)===c.shadowRoot||this._contextViewService.hideContextView()}})),this._toDispose.add(this._editor.onKeyDown(a=>{a.keyCode===58&&(a.preventDefault(),a.stopPropagation(),this.showContextMenu())}))}static get(e){return e.getContribution(l8.ID)}_onContextMenu(e){if(!this._editor.hasModel())return;if(!this._editor.getOption(20)){this._editor.focus(),e.target.position&&!this._editor.getSelection().containsPosition(e.target.position)&&this._editor.setPosition(e.target.position);return}if(e.target.type===12||(e.event.preventDefault(),e.event.stopPropagation(),e.target.type!==6&&e.target.type!==7&&e.target.type!==1))return;if(this._editor.focus(),e.target.position){let i=!1;for(const n of this._editor.getSelections())if(n.containsPosition(e.target.position)){i=!0;break}i||this._editor.setPosition(e.target.position)}let t=null;e.target.type!==1&&(t={x:e.event.posx-1,width:2,y:e.event.posy-1,height:2}),this.showContextMenu(t)}showContextMenu(e){if(!this._editor.getOption(20)||!this._editor.hasModel())return;if(!this._contextMenuService){this._editor.focus();return}const t=this._getMenuActions(this._editor.getModel(),this._editor.isSimpleWidget?xe.SimpleEditorContext:xe.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(let o of s){const[,a]=o;let l=0;for(const c of a)if(c instanceof yk){const h=this._getMenuActions(e,c.item.submenu);h.length>0&&(i.push(new IC(c.id,c.label,h)),l++)}else i.push(c),l++;l&&i.push(new Ts)}return i.length&&i.pop(),i}_doShowContextMenu(e,t=null){if(!this._editor.hasModel())return;const i=this._editor.getOption(52);if(this._editor.updateOptions({hover:{enabled:!1}}),!t){this._editor.revealPosition(this._editor.getPosition(),1),this._editor.render();const s=this._editor.getScrolledVisiblePosition(this._editor.getPosition()),o=Qi(this._editor.getDomNode()),a=o.left+s.left,l=o.top+s.top+s.height;t={x:a,y:l}}const n=this._editor.getOption(113)&&!No;this._contextMenuIsBeingShownCount++,this._contextMenuService.showContextMenu({domForShadowRoot:n?this._editor.getDomNode():void 0,getAnchor:()=>t,getActions:()=>e,getActionViewItem:s=>{const o=this._keybindingFor(s);if(o)return new Tm(s,s,{label:!0,keybinding:o.getLabel(),isMenu:!0});const a=s;return typeof a.getActionViewItem=="function"?a.getActionViewItem():new Tm(s,s,{icon:!0,label:!0,isMenu:!0})},getKeyBinding:s=>this._keybindingFor(s),onHide:s=>{this._contextMenuIsBeingShownCount--,this._editor.focus(),this._editor.updateOptions({hover:i})}})}_keybindingFor(e){return this._keybindingService.lookupKeybinding(e.id)}dispose(){this._contextMenuIsBeingShownCount>0&&this._contextViewService.hideContextView(),this._toDispose.dispose()}};sg.ID="editor.contrib.contextmenu";sg=_de([R_(1,_c),R_(2,mc),R_(3,Fe),R_(4,Qt),R_(5,Th)],sg);class bde extends Se{constructor(){super({id:"editor.action.showContextMenu",label:m("action.showContextMenu.label","Show Editor Context Menu"),alias:"Show Editor Context Menu",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:1024|68,weight:100}})}run(e,t){sg.get(t).showContextMenu()}}wt(sg.ID,sg);me(bde);class HT{constructor(e){this.selections=e}equals(e){const t=this.selections.length,i=e.selections.length;if(t!==i)return!1;for(let n=0;n<t;n++)if(!this.selections[n].equalsSelection(e.selections[n]))return!1;return!0}}class zT{constructor(e,t,i){this.cursorState=e,this.scrollTop=t,this.scrollLeft=i}}class Hu extends Y{constructor(e){super();this._editor=e,this._isCursorUndoRedo=!1,this._undoStack=[],this._redoStack=[],this._register(e.onDidChangeModel(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeModelContent(t=>{this._undoStack=[],this._redoStack=[]})),this._register(e.onDidChangeCursorSelection(t=>{if(this._isCursorUndoRedo||!t.oldSelections||t.oldModelVersionId!==t.modelVersionId)return;const i=new HT(t.oldSelections);this._undoStack.length>0&&this._undoStack[this._undoStack.length-1].cursorState.equals(i)||(this._undoStack.push(new zT(i,e.getScrollTop(),e.getScrollLeft())),this._redoStack=[],this._undoStack.length>50&&this._undoStack.shift())}))}static get(e){return e.getContribution(Hu.ID)}cursorUndo(){!this._editor.hasModel()||this._undoStack.length===0||(this._redoStack.push(new zT(new HT(this._editor.getSelections()),this._editor.getScrollTop(),this._editor.getScrollLeft())),this._applyState(this._undoStack.pop()))}cursorRedo(){!this._editor.hasModel()||this._redoStack.length===0||(this._undoStack.push(new zT(new HT(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}}Hu.ID="editor.contrib.cursorUndoRedoController";class vde extends Se{constructor(){super({id:"cursorUndo",label:m("cursor.undo","Cursor Undo"),alias:"Cursor Undo",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:2048|51,weight:100}})}run(e,t,i){Hu.get(t).cursorUndo()}}class Cde extends Se{constructor(){super({id:"cursorRedo",label:m("cursor.redo","Cursor Redo"),alias:"Cursor Redo",precondition:void 0})}run(e,t,i){Hu.get(t).cursorRedo()}}wt(Hu.ID,Hu);me(vde);me(Cde);class wde{constructor(e,t,i){this.selection=e,this.targetPosition=t,this.copy=i,this.targetSelection=null}getEditOperations(e,t){let i=e.getValueInRange(this.selection);if(this.copy||t.addEditOperation(this.selection,null),t.addEditOperation(new k(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column),i),this.selection.containsPosition(this.targetPosition)&&!(this.copy&&(this.selection.getEndPosition().equals(this.targetPosition)||this.selection.getStartPosition().equals(this.targetPosition)))){this.targetSelection=this.selection;return}if(this.copy){this.targetSelection=new be(this.targetPosition.lineNumber,this.targetPosition.column,this.selection.endLineNumber-this.selection.startLineNumber+this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}if(this.targetPosition.lineNumber>this.selection.endLineNumber){this.targetSelection=new be(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);return}if(this.targetPosition.lineNumber<this.selection.endLineNumber){this.targetSelection=new be(this.targetPosition.lineNumber,this.targetPosition.column,this.targetPosition.lineNumber+this.selection.endLineNumber-this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column+this.selection.endColumn-this.selection.startColumn:this.selection.endColumn);return}this.selection.endColumn<=this.targetPosition.column?this.targetSelection=new be(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column-this.selection.endColumn+this.selection.startColumn:this.targetPosition.column-this.selection.endColumn+this.selection.startColumn,this.targetPosition.lineNumber,this.selection.startLineNumber===this.selection.endLineNumber?this.targetPosition.column:this.selection.endColumn):this.targetSelection=new be(this.targetPosition.lineNumber-this.selection.endLineNumber+this.selection.startLineNumber,this.targetPosition.column,this.targetPosition.lineNumber,this.targetPosition.column+this.selection.endColumn-this.selection.startColumn)}computeCursorState(e,t){return this.targetSelection}}function og(r){return Je?r.altKey:r.ctrlKey}class Cl extends Y{constructor(e){super();this._editor=e,this._register(this._editor.onMouseDown(t=>this._onEditorMouseDown(t))),this._register(this._editor.onMouseUp(t=>this._onEditorMouseUp(t))),this._register(this._editor.onMouseDrag(t=>this._onEditorMouseDrag(t))),this._register(this._editor.onMouseDrop(t=>this._onEditorMouseDrop(t))),this._register(this._editor.onMouseDropCanceled(()=>this._onEditorMouseDropCanceled())),this._register(this._editor.onKeyDown(t=>this.onEditorKeyDown(t))),this._register(this._editor.onKeyUp(t=>this.onEditorKeyUp(t))),this._register(this._editor.onDidBlurEditorWidget(()=>this.onEditorBlur())),this._register(this._editor.onDidBlurEditorText(()=>this.onEditorBlur())),this._dndDecorationIds=[],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(31)||this._editor.getOption(18)||(og(e)&&(this._modifierPressed=!0),this._mouseDown&&og(e)&&this._editor.updateOptions({mouseStyle:"copy"}))}onEditorKeyUp(e){!this._editor.getOption(31)||this._editor.getOption(18)||(og(e)&&(this._modifierPressed=!1),this._mouseDown&&e.keyCode===Cl.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){let t=e.target;if(this._dragSelection===null){let n=(this._editor.getSelections()||[]).filter(s=>t.position&&s.containsPosition(t.position));if(n.length===1)this._dragSelection=n[0];else return}og(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){let t=new $(e.target.position.lineNumber,e.target.position.column);if(this._dragSelection===null){let i=null;if(e.event.shiftKey){let n=this._editor.getSelection();if(n){const{selectionStartLineNumber:s,selectionStartColumn:o}=n;i=[new be(s,o,t.lineNumber,t.column)]}}else i=(this._editor.getSelections()||[]).map(n=>n.containsPosition(t)?new be(t.lineNumber,t.column,t.lineNumber,t.column):n);this._editor.setSelections(i||[],"mouse",3)}else(!this._dragSelection.containsPosition(t)||(og(e.event)||this._modifierPressed)&&(this._dragSelection.getEndPosition().equals(t)||this._dragSelection.getStartPosition().equals(t)))&&(this._editor.pushUndoStop(),this._editor.executeCommand(Cl.ID,new wde(this._dragSelection,t,og(e.event)||this._modifierPressed)),this._editor.pushUndoStop())}this._editor.updateOptions({mouseStyle:"text"}),this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1}showAt(e){let t=[{range:new k(e.lineNumber,e.column,e.lineNumber,e.column),options:Cl._DECORATION_OPTIONS}];this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,t),this._editor.revealPosition(e,1)}_removeDecoration(){this._dndDecorationIds=this._editor.deltaDecorations(this._dndDecorationIds,[])}_hitContent(e){return e.type===6||e.type===7}_hitMargin(e){return e.type===2||e.type===3||e.type===4}dispose(){this._removeDecoration(),this._dragSelection=null,this._mouseDown=!1,this._modifierPressed=!1,super.dispose()}}Cl.ID="editor.contrib.dragAndDrop";Cl.TRIGGER_KEY_VALUE=Je?6:5;Cl._DECORATION_OPTIONS=Ke.register({description:"dnd-target",className:"dnd-target"});wt(Cl.ID,Cl);class In{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.deltaDecorations(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(t=>this._editor.getModel().getDecorationRange(t)).filter(t=>!!t);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}getCurrentMatchesPosition(e){let t=this._editor.getModel().getDecorationsInRange(e);for(const i of t){const n=i.options;if(n===In._FIND_MATCH_DECORATION||n===In._CURRENT_FIND_MATCH_DECORATION)return this._getDecorationIndex(i.id)}return 0}setCurrentFindMatch(e){let t=null,i=0;if(e)for(let n=0,s=this._decorations.length;n<s;n++){let o=this._editor.getModel().getDecorationRange(this._decorations[n]);if(e.equalsRange(o)){t=this._decorations[n],i=n+1;break}}return(this._highlightedDecorationId!==null||t!==null)&&this._editor.changeDecorations(n=>{if(this._highlightedDecorationId!==null&&(n.changeDecorationOptions(this._highlightedDecorationId,In._FIND_MATCH_DECORATION),this._highlightedDecorationId=null),t!==null&&(this._highlightedDecorationId=t,n.changeDecorationOptions(this._highlightedDecorationId,In._CURRENT_FIND_MATCH_DECORATION)),this._rangeHighlightDecorationId!==null&&(n.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),t!==null){let s=this._editor.getModel().getDecorationRange(t);if(s.startLineNumber!==s.endLineNumber&&s.endColumn===1){let o=s.endLineNumber-1,a=this._editor.getModel().getLineMaxColumn(o);s=new k(s.startLineNumber,s.startColumn,o,a)}this._rangeHighlightDecorationId=n.addDecoration(s,In._RANGE_HIGHLIGHT_DECORATION)}}),i}set(e,t){this._editor.changeDecorations(i=>{let n=In._FIND_MATCH_DECORATION,s=[];if(e.length>1e3){n=In._FIND_MATCH_NO_OVERVIEW_DECORATION;const a=this._editor.getModel().getLineCount(),c=this._editor.getLayoutInfo().height/a,h=Math.max(2,Math.ceil(3/c));let u=e[0].range.startLineNumber,d=e[0].range.endLineNumber;for(let f=1,g=e.length;f<g;f++){const p=e[f].range;d+h>=p.startLineNumber?p.endLineNumber>d&&(d=p.endLineNumber):(s.push({range:new k(u,1,d,1),options:In._FIND_MATCH_ONLY_OVERVIEW_DECORATION}),u=p.startLineNumber,d=p.endLineNumber)}s.push({range:new k(u,1,d,1),options:In._FIND_MATCH_ONLY_OVERVIEW_DECORATION})}let o=new Array(e.length);for(let a=0,l=e.length;a<l;a++)o[a]={range:e[a].range,options:n};this._decorations=i.deltaDecorations(this._decorations,o),this._overviewRulerApproximateDecorations=i.deltaDecorations(this._overviewRulerApproximateDecorations,s),this._rangeHighlightDecorationId&&(i.removeDecoration(this._rangeHighlightDecorationId),this._rangeHighlightDecorationId=null),this._findScopeDecorationIds.length&&(this._findScopeDecorationIds.forEach(a=>i.removeDecoration(a)),this._findScopeDecorationIds=[]),(t==null?void 0:t.length)&&(this._findScopeDecorationIds=t.map(a=>i.addDecoration(a,In._FIND_SCOPE_DECORATION)))})}matchBeforePosition(e){if(this._decorations.length===0)return null;for(let t=this._decorations.length-1;t>=0;t--){let i=this._decorations[t],n=this._editor.getModel().getDecorationRange(i);if(!(!n||n.endLineNumber>e.lineNumber)){if(n.endLineNumber<e.lineNumber)return n;if(!(n.endColumn>e.column))return n}}return this._editor.getModel().getDecorationRange(this._decorations[this._decorations.length-1])}matchAfterPosition(e){if(this._decorations.length===0)return null;for(let t=0,i=this._decorations.length;t<i;t++){let n=this._decorations[t],s=this._editor.getModel().getDecorationRange(n);if(!(!s||s.startLineNumber<e.lineNumber)){if(s.startLineNumber>e.lineNumber)return s;if(!(s.startColumn<e.column))return s}}return this._editor.getModel().getDecorationRange(this._decorations[0])}_allDecorations(){let e=[];return e=e.concat(this._decorations),e=e.concat(this._overviewRulerApproximateDecorations),this._findScopeDecorationIds.length&&e.push(...this._findScopeDecorationIds),this._rangeHighlightDecorationId&&e.push(this._rangeHighlightDecorationId),e}}In._CURRENT_FIND_MATCH_DECORATION=Ke.register({description:"current-find-match",stickiness:1,zIndex:13,className:"currentFindMatch",showIfCollapsed:!0,overviewRuler:{color:ui(hD),position:Mr.Center},minimap:{color:ui(XO),position:Yr.Inline}});In._FIND_MATCH_DECORATION=Ke.register({description:"find-match",stickiness:1,zIndex:10,className:"findMatch",showIfCollapsed:!0,overviewRuler:{color:ui(hD),position:Mr.Center},minimap:{color:ui(XO),position:Yr.Inline}});In._FIND_MATCH_NO_OVERVIEW_DECORATION=Ke.register({description:"find-match-no-overview",stickiness:1,className:"findMatch",showIfCollapsed:!0});In._FIND_MATCH_ONLY_OVERVIEW_DECORATION=Ke.register({description:"find-match-only-overview",stickiness:1,overviewRuler:{color:ui(hD),position:Mr.Center}});In._RANGE_HIGHLIGHT_DECORATION=Ke.register({description:"find-range-highlight",stickiness:1,className:"rangeHighlight",isWholeLine:!0});In._FIND_SCOPE_DECORATION=Ke.register({description:"find-scope",className:"findScope",isWholeLine:!0});class yde{constructor(e,t,i){this._editorSelection=e,this._ranges=t,this._replaceStrings=i,this._trackedEditorSelectionId=null}getEditOperations(e,t){if(this._ranges.length>0){let i=[];for(let o=0;o<this._ranges.length;o++)i.push({range:this._ranges[o],text:this._replaceStrings[o]});i.sort((o,a)=>k.compareRangesUsingStarts(o.range,a.range));let n=[],s=i[0];for(let o=1;o<i.length;o++)s.range.endLineNumber===i[o].range.startLineNumber&&s.range.endColumn===i[o].range.startColumn?(s.range=s.range.plusRange(i[o].range),s.text=s.text+i[o].text):(n.push(s),s=i[o]);n.push(s);for(const o of n)t.addEditOperation(o.range,o.text)}this._trackedEditorSelectionId=t.trackSelection(this._editorSelection)}computeCursorState(e,t){return t.getTrackedSelection(this._trackedEditorSelectionId)}}function c8(r,e){if(r&&r[0]!==""){const t=h8(r,e,"-"),i=h8(r,e,"_");return t&&!i?u8(r,e,"-"):!t&&i?u8(r,e,"_"):r[0].toUpperCase()===r[0]?e.toUpperCase():r[0].toLowerCase()===r[0]?e.toLowerCase():Yj(r[0][0])&&e.length>0?e[0].toUpperCase()+e.substr(1):r[0][0].toUpperCase()!==r[0][0]&&e.length>0?e[0].toLowerCase()+e.substr(1):e}else return e}function h8(r,e,t){return r[0].indexOf(t)!==-1&&e.indexOf(t)!==-1&&r[0].split(t).length===e.split(t).length}function u8(r,e,t){const i=e.split(t),n=r[0].split(t);let s="";return i.forEach((o,a)=>{s+=c8([n[a]],o)+t}),s.slice(0,-1)}class d8{constructor(e){this.staticValue=e,this.kind=0}}class Sde{constructor(e){this.pieces=e,this.kind=1}}class ag{constructor(e){!e||e.length===0?this._state=new d8(""):e.length===1&&e[0].staticValue!==null?this._state=new d8(e[0].staticValue):this._state=new Sde(e)}static fromStaticValue(e){return new ag([zu.staticValue(e)])}get hasReplacementPatterns(){return this._state.kind===1}buildReplaceString(e,t){if(this._state.kind===0)return t?c8(e,this._state.staticValue):this._state.staticValue;let i="";for(let n=0,s=this._state.pieces.length;n<s;n++){let o=this._state.pieces[n];if(o.staticValue!==null){i+=o.staticValue;continue}let a=ag._substitute(o.matchIndex,e);if(o.caseOps!==null&&o.caseOps.length>0){let l=[],c=o.caseOps.length,h=0;for(let u=0,d=a.length;u<d;u++){if(h>=c){l.push(a.slice(u));break}switch(o.caseOps[h]){case"U":l.push(a[u].toUpperCase());break;case"u":l.push(a[u].toUpperCase()),h++;break;case"L":l.push(a[u].toLowerCase());break;case"l":l.push(a[u].toLowerCase()),h++;break;default:l.push(a[u])}}a=l.join("")}i+=a}return i}static _substitute(e,t){if(t===null)return"";if(e===0)return t[0];let i="";for(;e>0;){if(e<t.length)return(t[e]||"")+i;i=String(e%10)+i,e=Math.floor(e/10)}return"$"+i}}class zu{constructor(e,t,i){this.staticValue=e,this.matchIndex=t,!i||i.length===0?this.caseOps=null:this.caseOps=i.slice(0)}static staticValue(e){return new zu(e,-1,null)}static caseOps(e,t){return new zu(null,e,t)}}class Lde{constructor(e){this._source=e,this._lastCharIndex=0,this._result=[],this._resultLen=0,this._currentStaticPiece=""}emitUnchanged(e){this._emitStatic(this._source.substring(this._lastCharIndex,e)),this._lastCharIndex=e}emitStatic(e,t){this._emitStatic(e),this._lastCharIndex=t}_emitStatic(e){e.length!==0&&(this._currentStaticPiece+=e)}emitMatchIndex(e,t,i){this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=zu.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),this._result[this._resultLen++]=zu.caseOps(e,i),this._lastCharIndex=t}finalize(){return this.emitUnchanged(this._source.length),this._currentStaticPiece.length!==0&&(this._result[this._resultLen++]=zu.staticValue(this._currentStaticPiece),this._currentStaticPiece=""),new ag(this._result)}}function xde(r){if(!r||r.length===0)return new ag(null);let e=[],t=new Lde(r);for(let i=0,n=r.length;i<n;i++){let s=r.charCodeAt(i);if(s===92){if(i++,i>=n)break;let o=r.charCodeAt(i);switch(o){case 92:t.emitUnchanged(i-1),t.emitStatic("\\",i+1);break;case 110:t.emitUnchanged(i-1),t.emitStatic(` -`,i+1);break;case 116:t.emitUnchanged(i-1),t.emitStatic(" ",i+1);break;case 117:case 85:case 108:case 76:t.emitUnchanged(i-1),t.emitStatic("",i+1),e.push(String.fromCharCode(o));break}continue}if(s===36){if(i++,i>=n)break;let o=r.charCodeAt(i);if(o===36){t.emitUnchanged(i-1),t.emitStatic("$",i+1);continue}if(o===48||o===38){t.emitUnchanged(i-1),t.emitMatchIndex(0,i+1,e),e.length=0;continue}if(49<=o&&o<=57){let a=o-48;if(i+1<n){let l=r.charCodeAt(i+1);if(48<=l&&l<=57){i++,a=a*10+(l-48),t.emitUnchanged(i-2),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}t.emitUnchanged(i-1),t.emitMatchIndex(a,i+1,e),e.length=0;continue}}}return t.finalize()}const $u=new Le("findWidgetVisible",!1),Ey=new Le("findInputFocussed",!1),$T=new Le("replaceInputFocussed",!1),Iy={primary:512|33,mac:{primary:2048|512|33}},Ny={primary:512|53,mac:{primary:2048|512|53}},Ty={primary:512|48,mac:{primary:2048|512|48}},Ay={primary:512|42,mac:{primary:2048|512|42}},Ry={primary:512|46,mac:{primary:2048|512|46}},zt={StartFindAction:"actions.find",StartFindWithSelection:"actions.findWithSelection",NextMatchFindAction:"editor.action.nextMatchFindAction",PreviousMatchFindAction:"editor.action.previousMatchFindAction",NextSelectionMatchFindAction:"editor.action.nextSelectionMatchFindAction",PreviousSelectionMatchFindAction:"editor.action.previousSelectionMatchFindAction",StartFindReplaceAction:"editor.action.startFindReplaceAction",CloseFindWidgetCommand:"closeFindWidget",ToggleCaseSensitiveCommand:"toggleFindCaseSensitive",ToggleWholeWordCommand:"toggleFindWholeWord",ToggleRegexCommand:"toggleFindRegex",ToggleSearchScopeCommand:"toggleFindInSelection",TogglePreserveCaseCommand:"togglePreserveCase",ReplaceOneAction:"editor.action.replaceOne",ReplaceAllAction:"editor.action.replaceAll",SelectAllMatchesAction:"editor.action.selectAllMatches"},Bc=19999,kde=240;class M_{constructor(e,t){this._toDispose=new le,this._editor=e,this._state=t,this._isDisposed=!1,this._startSearchingTimer=new Xn,this._decorations=new In(e),this._toDispose.add(this._decorations),this._updateDecorationsScheduler=new Bt(()=>this.research(!1),100),this._toDispose.add(this._updateDecorationsScheduler),this._toDispose.add(this._editor.onDidChangeCursorPosition(i=>{(i.reason===3||i.reason===5||i.reason===6)&&this._decorations.setStartPosition(this._editor.getPosition())})),this._ignoreModelContentChanged=!1,this._toDispose.add(this._editor.onDidChangeModelContent(i=>{this._ignoreModelContentChanged||(i.isFlush&&this._decorations.reset(),this._decorations.setStartPosition(this._editor.getPosition()),this._updateDecorationsScheduler.schedule())})),this._toDispose.add(this._state.onFindReplaceStateChange(i=>this._onStateChanged(i))),this.research(!1,this._state.searchScope)}dispose(){this._isDisposed=!0,ht(this._startSearchingTimer),this._toDispose.dispose()}_onStateChanged(e){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)},kde)):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;typeof t!="undefined"?t!==null&&(Array.isArray(t)?i=t:i=[t]):i=this._decorations.getFindScopes(),i!==null&&(i=i.map(a=>{if(a.startLineNumber!==a.endLineNumber){let l=a.endLineNumber;return a.endColumn===1&&(l=l-1),new k(a.startLineNumber,1,l,this._editor.getModel().getLineMaxColumn(l))}return a}));let n=this._findMatches(i,!1,Bc);this._decorations.set(n,i);const s=this._editor.getSelection();let o=this._decorations.getCurrentMatchesPosition(s);if(o===0&&n.length>0){const a=oP(n.map(l=>l.range),l=>k.compareRangesUsingStarts(l,s)>=0);o=a>0?a-1+1:o}this._state.changeMatchInfo(o,this._decorations.getCount(),void 0),e&&this._editor.getOption(35).cursorMoveOnType&&this._moveToNextMatch(this._decorations.getStartPosition())}_hasMatches(){return this._state.matchesCount>0}_cannotFind(){if(!this._hasMatches()){let e=this._decorations.getFindScope();return e&&this._editor.revealRangeInCenterIfOutsideViewport(e,0),!0}return!1}_setCurrentFindMatch(e){let t=this._decorations.setCurrentFindMatch(e);this._state.changeMatchInfo(t,this._decorations.getCount(),e),this._editor.setSelection(e),this._editor.revealRangeInCenterIfOutsideViewport(e,0)}_prevSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||n===1?(i===1?i=s.getLineCount():i--,n=s.getLineMaxColumn(i)):n--,new $(i,n)}_moveToPrevMatch(e,t=!1){if(!this._state.canNavigateBack()){const h=this._decorations.matchAfterPosition(e);h&&this._setCurrentFindMatch(h);return}if(this._decorations.getCount()<Bc){let h=this._decorations.matchBeforePosition(e);h&&h.isEmpty()&&h.getStartPosition().equals(e)&&(e=this._prevSearchPosition(e),h=this._decorations.matchBeforePosition(e)),h&&this._setCurrentFindMatch(h);return}if(this._cannotFind())return;let i=this._decorations.getFindScope(),n=M_._getSearchRange(this._editor.getModel(),i);n.getEndPosition().isBefore(e)&&(e=n.getEndPosition()),e.isBefore(n.getStartPosition())&&(e=n.getEndPosition());let{lineNumber:s,column:o}=e,a=this._editor.getModel(),l=new $(s,o),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1);if(c&&c.range.isEmpty()&&c.range.getStartPosition().equals(l)&&(l=this._prevSearchPosition(l),c=a.findPreviousMatch(this._state.searchString,l,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,!1)),!!c){if(!t&&!n.containsRange(c.range))return this._moveToPrevMatch(c.range.getStartPosition(),!0);this._setCurrentFindMatch(c.range)}}moveToPrevMatch(){this._moveToPrevMatch(this._editor.getSelection().getStartPosition())}_nextSearchPosition(e){let t=this._state.isRegex&&(this._state.searchString.indexOf("^")>=0||this._state.searchString.indexOf("$")>=0),{lineNumber:i,column:n}=e,s=this._editor.getModel();return t||n===s.getLineMaxColumn(i)?(i===s.getLineCount()?i=1:i++,n=1):n++,new $(i,n)}_moveToNextMatch(e){if(!this._state.canNavigateForward()){const i=this._decorations.matchBeforePosition(e);i&&this._setCurrentFindMatch(i);return}if(this._decorations.getCount()<Bc){let i=this._decorations.matchAfterPosition(e);i&&i.isEmpty()&&i.getStartPosition().equals(e)&&(e=this._nextSearchPosition(e),i=this._decorations.matchAfterPosition(e)),i&&this._setCurrentFindMatch(i);return}let t=this._getNextMatch(e,!1,!0);t&&this._setCurrentFindMatch(t.range)}_getNextMatch(e,t,i,n=!1){if(this._cannotFind())return null;let s=this._decorations.getFindScope(),o=M_._getSearchRange(this._editor.getModel(),s);o.getEndPosition().isBefore(e)&&(e=o.getStartPosition()),e.isBefore(o.getStartPosition())&&(e=o.getStartPosition());let{lineNumber:a,column:l}=e,c=this._editor.getModel(),h=new $(a,l),u=c.findNextMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t);return i&&u&&u.range.isEmpty()&&u.range.getStartPosition().equals(h)&&(h=this._nextSearchPosition(h),u=c.findNextMatch(this._state.searchString,h,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t)),u?!n&&!o.containsRange(u.range)?this._getNextMatch(u.range.getEndPosition(),t,i,!0):u:null}moveToNextMatch(){this._moveToNextMatch(this._editor.getSelection().getEndPosition())}_getReplacePattern(){return this._state.isRegex?xde(this._state.replaceString):ag.fromStaticValue(this._state.replaceString)}replace(){if(!this._hasMatches())return;let e=this._getReplacePattern(),t=this._editor.getSelection(),i=this._getNextMatch(t.getStartPosition(),!0,!1);if(i)if(t.equalsRange(i.range)){let n=e.buildReplaceString(i.matches,this._state.preserveCase),s=new rn(t,n);this._executeEditorCommand("replace",s),this._decorations.setStartPosition(new $(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(s=>M_._getSearchRange(this._editor.getModel(),s));return this._editor.getModel().findMatches(this._state.searchString,n,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null,t,i)}replaceAll(){if(!this._hasMatches())return;const e=this._decorations.getFindScopes();e===null&&this._state.matchesCount>=Bc?this._largeReplaceAll():this._regularReplaceAll(e),this.research(!1)}_largeReplaceAll(){const t=new Ph(this._state.searchString,this._state.isRegex,this._state.matchCase,this._state.wholeWord?this._editor.getOption(115):null).parseSearchRequest();if(!t)return;let i=t.regex;if(!i.multiline){let u="mu";i.ignoreCase&&(u+="i"),i.global&&(u+="g"),i=new RegExp(i.source,u)}const n=this._editor.getModel(),s=n.getValue(1),o=n.getFullModelRange(),a=this._getReplacePattern();let l;const c=this._state.preserveCase;a.hasReplacementPatterns||c?l=s.replace(i,function(){return a.buildReplaceString(arguments,c)}):l=s.replace(i,a.buildReplaceString(null,c));let h=new kD(o,l,this._editor.getSelection());this._executeEditorCommand("replaceAll",h)}_regularReplaceAll(e){const t=this._getReplacePattern();let i=this._findMatches(e,t.hasReplacementPatterns||this._state.preserveCase,1073741824),n=[];for(let o=0,a=i.length;o<a;o++)n[o]=t.buildReplaceString(i[o].matches,this._state.preserveCase);let s=new yde(this._editor.getSelection(),i.map(o=>o.range),n);this._executeEditorCommand("replaceAll",s)}selectAllMatches(){if(!this._hasMatches())return;let e=this._decorations.getFindScopes(),i=this._findMatches(e,!1,1073741824).map(s=>new be(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)),n=this._editor.getSelection();for(let s=0,o=i.length;s<o;s++)if(i[s].equalsRange(n)){i=[n].concat(i.slice(0,s)).concat(i.slice(s+1));break}this._editor.setSelections(i)}_executeEditorCommand(e,t){try{this._ignoreModelContentChanged=!0,this._editor.pushUndoStop(),this._editor.executeCommand(e,t),this._editor.pushUndoStop()}finally{this._ignoreModelContentChanged=!1}}}const Dde={inputActiveOptionBorder:K.fromHex("#007ACC00"),inputActiveOptionForeground:K.fromHex("#FFFFFF"),inputActiveOptionBackground:K.fromHex("#0E639C50")};class P_ extends Vr{constructor(e){super();this._onChange=this._register(new H),this.onChange=this._onChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._opts=Object.assign(Object.assign({},Dde),e),this._checked=this._opts.isChecked;const t=["monaco-custom-checkbox"];this._opts.icon&&t.push(...fr.asClassNameArray(this._opts.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,i=>{this.checked=!this._checked,this._onChange.fire(!1),i.preventDefault()}),this.ignoreGesture(this.domNode),this.onkeydown(this.domNode,i=>{if(i.keyCode===10||i.keyCode===3){this.checked=!this._checked,this._onChange.fire(!0),i.preventDefault();return}this._onKeyDown.fire(i)})}get enabled(){return this.domNode.getAttribute("aria-disabled")!=="true"}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 2+2+2+16}style(e){e.inputActiveOptionBorder&&(this._opts.inputActiveOptionBorder=e.inputActiveOptionBorder),e.inputActiveOptionForeground&&(this._opts.inputActiveOptionForeground=e.inputActiveOptionForeground),e.inputActiveOptionBackground&&(this._opts.inputActiveOptionBackground=e.inputActiveOptionBackground),this.applyStyles()}applyStyles(){this.domNode&&(this.domNode.style.borderColor=this._checked&&this._opts.inputActiveOptionBorder?this._opts.inputActiveOptionBorder.toString():"transparent",this.domNode.style.color=this._checked&&this._opts.inputActiveOptionForeground?this._opts.inputActiveOptionForeground.toString():"inherit",this.domNode.style.backgroundColor=this._checked&&this._opts.inputActiveOptionBackground?this._opts.inputActiveOptionBackground.toString():"transparent")}enable(){this.domNode.setAttribute("aria-disabled",String(!1))}disable(){this.domNode.setAttribute("aria-disabled",String(!0))}}const Ede=m("caseDescription","Match Case"),Ide=m("wordsDescription","Match Whole Word"),Nde=m("regexDescription","Use Regular Expression");class f8 extends P_{constructor(e){super({icon:ve.caseSensitive,title:Ede+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class g8 extends P_{constructor(e){super({icon:ve.wholeWord,title:Ide+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class p8 extends P_{constructor(e){super({icon:ve.regex,title:Nde+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class My extends Vr{constructor(e,t,i,n){super();this._hideSoon=this._register(new Bt(()=>this._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.setAttribute("role","presentation"),this._domNode.setAttribute("aria-hidden","true");const s=n.getColorTheme().getColor(Kk),o=n.getColorTheme().getColor(Gk),a=n.getColorTheme().getColor(qk);this.caseSensitive=this._register(new f8({appendTitle:this._keybindingLabelFor(zt.ToggleCaseSensitiveCommand),isChecked:this._state.matchCase,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.caseSensitive.domNode),this._register(this.caseSensitive.onChange(()=>{this._state.change({matchCase:this.caseSensitive.checked},!1)})),this.wholeWords=this._register(new g8({appendTitle:this._keybindingLabelFor(zt.ToggleWholeWordCommand),isChecked:this._state.wholeWord,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),this._domNode.appendChild(this.wholeWords.domNode),this._register(this.wholeWords.onChange(()=>{this._state.change({wholeWord:this.wholeWords.checked},!1)})),this.regex=this._register(new p8({appendTitle:this._keybindingLabelFor(zt.ToggleRegexCommand),isChecked:this._state.isRegex,inputActiveOptionBorder:s,inputActiveOptionForeground:o,inputActiveOptionBackground:a})),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(l=>{let c=!1;l.isRegex&&(this.regex.checked=this._state.isRegex,c=!0),l.wholeWord&&(this.wholeWords.checked=this._state.wholeWord,c=!0),l.matchCase&&(this.caseSensitive.checked=this._state.matchCase,c=!0),!this._state.isRevealed&&c&&this._revealTemporarily()})),this._register(RL(this._domNode,l=>this._onMouseOut())),this._register(J(this._domNode,"mouseover",l=>this._onMouseOver())),this._applyTheme(n.getColorTheme()),this._register(n.onDidColorThemeChange(this._applyTheme.bind(this)))}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return My.ID}getDomNode(){return this._domNode}getPosition(){return{preference:0}}highlightFindOptions(){this._revealTemporarily()}_revealTemporarily(){this._show(),this._hideSoon.schedule()}_onMouseOut(){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")}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(Kk),inputActiveOptionForeground:e.getColor(Gk),inputActiveOptionBackground:e.getColor(qk)};this.caseSensitive.style(t),this.wholeWords.style(t),this.regex.style(t)}}My.ID="editor.contrib.findOptionsWidget";Lt((r,e)=>{const t=r.getColor(Fr);t&&e.addRule(`.monaco-editor .findOptionsWidget { background-color: ${t}; }`);const i=r.getColor(Ya);i&&e.addRule(`.monaco-editor .findOptionsWidget { color: ${i}; }`);const n=r.getColor(sc);n&&e.addRule(`.monaco-editor .findOptionsWidget { box-shadow: 0 0 8px 2px ${n}; }`);const s=r.getColor(_i);s&&e.addRule(`.monaco-editor .findOptionsWidget { border: 2px solid ${s}; }`)});function Py(r,e){return r===1?!0:r===2?!1:e}class Tde extends Y{constructor(){super();this._onFindReplaceStateChange=this._register(new H),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}get searchString(){return this._searchString}get replaceString(){return this._replaceString}get isRevealed(){return this._isRevealed}get isReplaceRevealed(){return this._isReplaceRevealed}get isRegex(){return Py(this._isRegexOverride,this._isRegex)}get wholeWord(){return Py(this._wholeWordOverride,this._wholeWord)}get matchCase(){return Py(this._matchCaseOverride,this._matchCase)}get preserveCase(){return Py(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}changeMatchInfo(e,t,i){let 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},s=!1;t===0&&(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),typeof i!="undefined"&&(k.equalsRange(this._currentMatch,i)||(this._currentMatch=i,n.currentMatch=!0,s=!0)),s&&this._onFindReplaceStateChange.fire(n)}change(e,t,i=!0){var n;let 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},o=!1;const a=this.isRegex,l=this.wholeWord,c=this.matchCase,h=this.preserveCase;typeof e.searchString!="undefined"&&this._searchString!==e.searchString&&(this._searchString=e.searchString,s.searchString=!0,o=!0),typeof e.replaceString!="undefined"&&this._replaceString!==e.replaceString&&(this._replaceString=e.replaceString,s.replaceString=!0,o=!0),typeof e.isRevealed!="undefined"&&this._isRevealed!==e.isRevealed&&(this._isRevealed=e.isRevealed,s.isRevealed=!0,o=!0),typeof e.isReplaceRevealed!="undefined"&&this._isReplaceRevealed!==e.isReplaceRevealed&&(this._isReplaceRevealed=e.isReplaceRevealed,s.isReplaceRevealed=!0,o=!0),typeof e.isRegex!="undefined"&&(this._isRegex=e.isRegex),typeof e.wholeWord!="undefined"&&(this._wholeWord=e.wholeWord),typeof e.matchCase!="undefined"&&(this._matchCase=e.matchCase),typeof e.preserveCase!="undefined"&&(this._preserveCase=e.preserveCase),typeof e.searchScope!="undefined"&&(((n=e.searchScope)===null||n===void 0?void 0:n.every(u=>{var d;return(d=this._searchScope)===null||d===void 0?void 0:d.some(f=>!k.equalsRange(f,u))}))||(this._searchScope=e.searchScope,s.searchScope=!0,o=!0)),typeof e.loop!="undefined"&&this._loop!==e.loop&&(this._loop=e.loop,s.loop=!0,o=!0),this._isRegexOverride=typeof e.isRegexOverride!="undefined"?e.isRegexOverride:0,this._wholeWordOverride=typeof e.wholeWordOverride!="undefined"?e.wholeWordOverride:0,this._matchCaseOverride=typeof e.matchCaseOverride!="undefined"?e.matchCaseOverride:0,this._preserveCaseOverride=typeof e.preserveCaseOverride!="undefined"?e.preserveCaseOverride:0,a!==this.isRegex&&(o=!0,s.isRegex=!0),l!==this.wholeWord&&(o=!0,s.wholeWord=!0),c!==this.matchCase&&(o=!0,s.matchCase=!0),h!==this.preserveCase&&(o=!0,s.preserveCase=!0),o&&this._onFindReplaceStateChange.fire(s)}canNavigateBack(){return this.canNavigateInLoop()||this.matchesPosition!==1}canNavigateForward(){return this.canNavigateInLoop()||this.matchesPosition<this.matchesCount}canNavigateInLoop(){return this._loop||this.matchesCount>=Bc}}const Ade=m("defaultLabel","input");class Rde extends Vr{constructor(e,t,i,n){super();this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.imeSessionInProgress=!1,this._onDidOptionChange=this._register(new H),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new H),this.onMouseDown=this._onMouseDown.event,this._onInput=this._register(new H),this._onKeyUp=this._register(new H),this._onCaseSensitiveKeyDown=this._register(new H),this.onCaseSensitiveKeyDown=this._onCaseSensitiveKeyDown.event,this._onRegexKeyDown=this._register(new H),this.onRegexKeyDown=this._onRegexKeyDown.event,this._lastHighlightFindOptions=0,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||Ade,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendCaseSensitiveLabel||"",o=n.appendWholeWordsLabel||"",a=n.appendRegexLabel||"",l=n.history||[],c=!!n.flexibleHeight,h=!!n.flexibleWidth,u=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new m3(this.domNode,this.contextViewProvider,{placeholder:this.placeholder||"",ariaLabel:this.label||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:l,showHistoryHint:n.showHistoryHint,flexibleHeight:c,flexibleWidth:h,flexibleMaxHeight:u})),this.regex=this._register(new p8({appendTitle:a,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.regex.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.regex.onKeyDown(g=>{this._onRegexKeyDown.fire(g)})),this.wholeWords=this._register(new g8({appendTitle:o,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.wholeWords.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this.caseSensitive=this._register(new f8({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.caseSensitive.onChange(g=>{this._onDidOptionChange.fire(g),!g&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.caseSensitive.onKeyDown(g=>{this._onCaseSensitiveKeyDown.fire(g)})),this._showOptionButtons&&(this.inputBox.paddingRight=this.caseSensitive.width()+this.wholeWords.width()+this.regex.width());let d=[this.caseSensitive.domNode,this.wholeWords.domNode,this.regex.domNode];this.onkeydown(this.domNode,g=>{if(g.equals(15)||g.equals(17)||g.equals(9)){let p=d.indexOf(document.activeElement);if(p>=0){let _=-1;g.equals(17)?_=(p+1)%d.length:g.equals(15)&&(p===0?_=d.length-1:_=p-1),g.equals(9)?(d[p].blur(),this.inputBox.focus()):_>=0&&d[_].focus(),St.stop(g,!0)}}});let f=document.createElement("div");f.className="controls",f.style.display=this._showOptionButtons?"block":"none",f.appendChild(this.caseSensitive.domNode),f.appendChild(this.wholeWords.domNode),f.appendChild(this.regex.domNode),this.domNode.appendChild(f),e&&e.appendChild(this.domNode),this._register(J(this.inputBox.inputElement,"compositionstart",g=>{this.imeSessionInProgress=!0})),this._register(J(this.inputBox.inputElement,"compositionend",g=>{this.imeSessionInProgress=!1,this._onInput.fire()})),this.onkeydown(this.inputBox.inputElement,g=>this._onKeyDown.fire(g)),this.onkeyup(this.inputBox.inputElement,g=>this._onKeyUp.fire(g)),this.oninput(this.inputBox.inputElement,g=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,g=>this._onMouseDown.fire(g))}enable(){this.domNode.classList.remove("disabled"),this.inputBox.enable(),this.regex.enable(),this.wholeWords.enable(),this.caseSensitive.enable()}disable(){this.domNode.classList.add("disabled"),this.inputBox.disable(),this.regex.disable(),this.wholeWords.disable(),this.caseSensitive.disable()}setFocusInputOnOptionClick(e){this.fixFocusOnOptionClickEnabled=e}setEnabled(e){e?this.enable():this.disable()}getValue(){return this.inputBox.value}setValue(e){this.inputBox.value!==e&&(this.inputBox.value=e)}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.regex.style(e),this.wholeWords.style(e),this.caseSensitive.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getCaseSensitive(){return this.caseSensitive.checked}setCaseSensitive(e){this.caseSensitive.checked=e}getWholeWords(){return this.wholeWords.checked}setWholeWords(e){this.wholeWords.checked=e}getRegex(){return this.regex.checked}setRegex(e){this.regex.checked=e,this.validate()}focusOnCaseSensitive(){this.caseSensitive.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()}clearMessage(){this.inputBox.hideMessage()}}const Mde=m("defaultLabel","input"),Pde=m("label.preserveCaseCheckbox","Preserve Case");class Ode extends P_{constructor(e){super({icon:ve.preserveCase,title:Pde+e.appendTitle,isChecked:e.isChecked,inputActiveOptionBorder:e.inputActiveOptionBorder,inputActiveOptionForeground:e.inputActiveOptionForeground,inputActiveOptionBackground:e.inputActiveOptionBackground})}}class Fde extends Vr{constructor(e,t,i,n){super();this._showOptionButtons=i,this.fixFocusOnOptionClickEnabled=!0,this.cachedOptionsWidth=0,this._onDidOptionChange=this._register(new H),this.onDidOptionChange=this._onDidOptionChange.event,this._onKeyDown=this._register(new H),this.onKeyDown=this._onKeyDown.event,this._onMouseDown=this._register(new H),this._onInput=this._register(new H),this._onKeyUp=this._register(new H),this._onPreserveCaseKeyDown=this._register(new H),this.onPreserveCaseKeyDown=this._onPreserveCaseKeyDown.event,this.contextViewProvider=t,this.placeholder=n.placeholder||"",this.validation=n.validation,this.label=n.label||Mde,this.inputActiveOptionBorder=n.inputActiveOptionBorder,this.inputActiveOptionForeground=n.inputActiveOptionForeground,this.inputActiveOptionBackground=n.inputActiveOptionBackground,this.inputBackground=n.inputBackground,this.inputForeground=n.inputForeground,this.inputBorder=n.inputBorder,this.inputValidationInfoBorder=n.inputValidationInfoBorder,this.inputValidationInfoBackground=n.inputValidationInfoBackground,this.inputValidationInfoForeground=n.inputValidationInfoForeground,this.inputValidationWarningBorder=n.inputValidationWarningBorder,this.inputValidationWarningBackground=n.inputValidationWarningBackground,this.inputValidationWarningForeground=n.inputValidationWarningForeground,this.inputValidationErrorBorder=n.inputValidationErrorBorder,this.inputValidationErrorBackground=n.inputValidationErrorBackground,this.inputValidationErrorForeground=n.inputValidationErrorForeground;const s=n.appendPreserveCaseLabel||"",o=n.history||[],a=!!n.flexibleHeight,l=!!n.flexibleWidth,c=n.flexibleMaxHeight;this.domNode=document.createElement("div"),this.domNode.classList.add("monaco-findInput"),this.inputBox=this._register(new m3(this.domNode,this.contextViewProvider,{ariaLabel:this.label||"",placeholder:this.placeholder||"",validationOptions:{validation:this.validation},inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder,history:o,showHistoryHint:n.showHistoryHint,flexibleHeight:a,flexibleWidth:l,flexibleMaxHeight:c})),this.preserveCase=this._register(new Ode({appendTitle:s,isChecked:!1,inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground})),this._register(this.preserveCase.onChange(d=>{this._onDidOptionChange.fire(d),!d&&this.fixFocusOnOptionClickEnabled&&this.inputBox.focus(),this.validate()})),this._register(this.preserveCase.onKeyDown(d=>{this._onPreserveCaseKeyDown.fire(d)})),this._showOptionButtons?this.cachedOptionsWidth=this.preserveCase.width():this.cachedOptionsWidth=0;let h=[this.preserveCase.domNode];this.onkeydown(this.domNode,d=>{if(d.equals(15)||d.equals(17)||d.equals(9)){let f=h.indexOf(document.activeElement);if(f>=0){let g=-1;d.equals(17)?g=(f+1)%h.length:d.equals(15)&&(f===0?g=h.length-1:g=f-1),d.equals(9)?(h[f].blur(),this.inputBox.focus()):g>=0&&h[g].focus(),St.stop(d,!0)}}});let u=document.createElement("div");u.className="controls",u.style.display=this._showOptionButtons?"block":"none",u.appendChild(this.preserveCase.domNode),this.domNode.appendChild(u),e&&e.appendChild(this.domNode),this.onkeydown(this.inputBox.inputElement,d=>this._onKeyDown.fire(d)),this.onkeyup(this.inputBox.inputElement,d=>this._onKeyUp.fire(d)),this.oninput(this.inputBox.inputElement,d=>this._onInput.fire()),this.onmousedown(this.inputBox.inputElement,d=>this._onMouseDown.fire(d))}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()}style(e){this.inputActiveOptionBorder=e.inputActiveOptionBorder,this.inputActiveOptionForeground=e.inputActiveOptionForeground,this.inputActiveOptionBackground=e.inputActiveOptionBackground,this.inputBackground=e.inputBackground,this.inputForeground=e.inputForeground,this.inputBorder=e.inputBorder,this.inputValidationInfoBackground=e.inputValidationInfoBackground,this.inputValidationInfoForeground=e.inputValidationInfoForeground,this.inputValidationInfoBorder=e.inputValidationInfoBorder,this.inputValidationWarningBackground=e.inputValidationWarningBackground,this.inputValidationWarningForeground=e.inputValidationWarningForeground,this.inputValidationWarningBorder=e.inputValidationWarningBorder,this.inputValidationErrorBackground=e.inputValidationErrorBackground,this.inputValidationErrorForeground=e.inputValidationErrorForeground,this.inputValidationErrorBorder=e.inputValidationErrorBorder,this.applyStyles()}applyStyles(){if(this.domNode){const e={inputActiveOptionBorder:this.inputActiveOptionBorder,inputActiveOptionForeground:this.inputActiveOptionForeground,inputActiveOptionBackground:this.inputActiveOptionBackground};this.preserveCase.style(e);const t={inputBackground:this.inputBackground,inputForeground:this.inputForeground,inputBorder:this.inputBorder,inputValidationInfoBackground:this.inputValidationInfoBackground,inputValidationInfoForeground:this.inputValidationInfoForeground,inputValidationInfoBorder:this.inputValidationInfoBorder,inputValidationWarningBackground:this.inputValidationWarningBackground,inputValidationWarningForeground:this.inputValidationWarningForeground,inputValidationWarningBorder:this.inputValidationWarningBorder,inputValidationErrorBackground:this.inputValidationErrorBackground,inputValidationErrorForeground:this.inputValidationErrorForeground,inputValidationErrorBorder:this.inputValidationErrorBorder};this.inputBox.style(t)}}select(){this.inputBox.select()}focus(){this.inputBox.focus()}getPreserveCase(){return this.preserveCase.checked}setPreserveCase(e){this.preserveCase.checked=e}focusOnPreserve(){this.preserveCase.focus()}validate(){this.inputBox&&this.inputBox.validate()}set width(e){this.inputBox.paddingRight=this.cachedOptionsWidth,this.inputBox.width=e,this.domNode.style.width=e+"px"}dispose(){super.dispose()}}var m8=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_8=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const O_="historyNavigationWidget",b8="historyNavigationForwardsEnabled",v8="historyNavigationBackwardsEnabled";function Bde(r,e,t){new Le(t,e).bindTo(r)}function Wde(r,e){return r.createScoped(e.target)}function C8(r,e){return r.getContext(document.activeElement).getValue(e)}function w8(r,e){const t=Wde(r,e);Bde(t,e,O_);const i=new Le(b8,!0).bindTo(t),n=new Le(v8,!0).bindTo(t);return{scopedContextKeyService:t,historyNavigationForwardsEnablement:i,historyNavigationBackwardsEnablement:n}}let UT=class extends Rde{constructor(e,t,i,n,s=!1){super(e,t,s,i);this._register(w8(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};UT=m8([_8(3,Fe)],UT);let jT=class extends Fde{constructor(e,t,i,n,s=!1){super(e,t,s,i);this._register(w8(n,{target:this.inputBox.element,historyNavigator:this.inputBox}).scopedContextKeyService)}};jT=m8([_8(3,Fe)],jT);Bn.registerCommandAndKeybindingRule({id:"history.showPrevious",weight:200,when:_e.and(_e.has(O_),_e.equals(v8,!0),st.Visible.isEqualTo(!1)),primary:16,secondary:[512|16],handler:r=>{const e=C8(r.get(Fe),O_);e&&e.historyNavigator.showPreviousValue()}});Bn.registerCommandAndKeybindingRule({id:"history.showNext",weight:200,when:_e.and(_e.has(O_),_e.equals(b8,!0),st.Visible.isEqualTo(!1)),primary:18,secondary:[512|18],handler:r=>{const e=C8(r.get(Fe),O_);e&&e.historyNavigator.showNextValue()}});function y8(r){var e,t;return((e=r.lookupKeybinding("history.showPrevious"))===null||e===void 0?void 0:e.getElectronAccelerator())==="Up"&&((t=r.lookupKeybinding("history.showNext"))===null||t===void 0?void 0:t.getElectronAccelerator())==="Down"}var Vde=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const Hde=sn("find-selection",ve.selection,m("findSelectionIcon","Icon for 'Find in Selection' in the editor find widget.")),S8=sn("find-collapsed",ve.chevronRight,m("findCollapsedIcon","Icon to indicate that the editor find widget is collapsed.")),L8=sn("find-expanded",ve.chevronDown,m("findExpandedIcon","Icon to indicate that the editor find widget is expanded.")),zde=sn("find-replace",ve.replace,m("findReplaceIcon","Icon for 'Replace' in the editor find widget.")),$de=sn("find-replace-all",ve.replaceAll,m("findReplaceAllIcon","Icon for 'Replace All' in the editor find widget.")),Ude=sn("find-previous-match",ve.arrowUp,m("findPreviousMatchIcon","Icon for 'Find Previous' in the editor find widget.")),jde=sn("find-next-match",ve.arrowDown,m("findNextMatchIcon","Icon for 'Find Next' in the editor find widget.")),Kde=m("label.find","Find"),qde=m("placeholder.find","Find"),Gde=m("label.previousMatchButton","Previous Match"),Zde=m("label.nextMatchButton","Next Match"),Yde=m("label.toggleSelectionFind","Find in Selection"),Xde=m("label.closeButton","Close"),Qde=m("label.replace","Replace"),Jde=m("placeholder.replace","Replace"),efe=m("label.replaceButton","Replace"),tfe=m("label.replaceAllButton","Replace All"),ife=m("label.toggleReplaceButton","Toggle Replace"),nfe=m("title.matchesCountLimit","Only the first {0} results are highlighted, but all find operations work on the entire text.",Bc),rfe=m("label.matchesLocation","{0} of {1}"),x8=m("label.noResults","No results"),va=419,sfe=275,ofe=sfe-54;let F_=69;const afe=33,k8="ctrlEnterReplaceAll.windows.donotask",D8=Je?256:2048;class KT{constructor(e){this.afterLineNumber=e,this.heightInPx=afe,this.suppressMouseDown=!1,this.domNode=document.createElement("div"),this.domNode.className="dock-find-viewzone"}}function E8(r,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionStart>0){r.stopPropagation();return}}function I8(r,e,t){const i=!!e.match(/\n/);if(t&&i&&t.selectionEnd<t.value.length){r.stopPropagation();return}}class Oy extends Vr{constructor(e,t,i,n,s,o,a,l,c){super();this._cachedHeight=null,this._revealTimeouts=[],this._codeEditor=e,this._controller=t,this._state=i,this._contextViewProvider=n,this._keybindingService=s,this._contextKeyService=o,this._storageService=l,this._notificationService=c,this._ctrlEnterReplaceAllWarningPrompted=!!l.getBoolean(k8,0),this._isVisible=!1,this._isReplaceVisible=!1,this._ignoreChangeEvent=!1,this._updateHistoryDelayer=new Ta(500),this._register(Xe(()=>this._updateHistoryDelayer.cancel())),this._register(this._state.onFindReplaceStateChange(h=>this._onStateChanged(h))),this._buildDomNode(),this._updateButtons(),this._tryUpdateWidgetWidth(),this._findInput.inputBox.layout(),this._register(this._codeEditor.onDidChangeConfiguration(h=>{if(h.hasChanged(80)&&(this._codeEditor.getOption(80)&&this._state.change({isReplaceRevealed:!1},!1),this._updateButtons()),h.hasChanged(129)&&this._tryUpdateWidgetWidth(),h.hasChanged(2)&&this.updateAccessibilitySupport(),h.hasChanged(35)){const u=this._codeEditor.getOption(35).addExtraSpaceOnTop;u&&!this._viewZone&&(this._viewZone=new KT(0),this._showViewZone()),!u&&this._viewZone&&this._removeViewZone()}})),this.updateAccessibilitySupport(),this._register(this._codeEditor.onDidChangeCursorSelection(()=>{this._isVisible&&this._updateToggleSelectionFindButton()})),this._register(this._codeEditor.onDidFocusEditorWidget(()=>Vde(this,void 0,void 0,function*(){if(this._isVisible){let h=yield this._controller.getGlobalBufferTerm();h&&h!==this._state.searchString&&(this._state.change({searchString:h},!1),this._findInput.select())}}))),this._findInputFocused=Ey.bindTo(o),this._findFocusTracker=this._register(Md(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=$T.bindTo(o),this._replaceFocusTracker=this._register(Md(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(35).addExtraSpaceOnTop&&(this._viewZone=new KT(0)),this._applyTheme(a.getColorTheme()),this._register(a.onDidColorThemeChange(this._applyTheme.bind(this))),this._register(this._codeEditor.onDidChangeModel(()=>{!this._isVisible||(this._viewZoneId=void 0)})),this._register(this._codeEditor.onDidScrollChange(h=>{if(h.scrollTopChanged){this._layoutViewZone();return}setTimeout(()=>{this._layoutViewZone()},0)}))}getId(){return Oy.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(80)&&!this._isReplaceVisible&&(this._isReplaceVisible=!0,this._replaceInput.width=vs(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){let t=this._state.searchString.length>0&&this._state.matchesCount===0;this._domNode.classList.toggle("no-results",t),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,Oe)}_updateHistory(){this._state.searchString&&this._findInput.inputBox.addToHistory(),this._state.replaceString&&this._replaceInput.inputBox.addToHistory()}_updateMatchesCount(){this._matchesCount.style.minWidth=F_+"px",this._state.matchesCount>=Bc?this._matchesCount.title=nfe:this._matchesCount.title="",this._matchesCount.firstChild&&this._matchesCount.removeChild(this._matchesCount.firstChild);let e;if(this._state.matchesCount>0){let t=String(this._state.matchesCount);this._state.matchesCount>=Bc&&(t+="+");let i=String(this._state.matchesPosition);i==="0"&&(i="?"),e=gn(rfe,i,t)}else e=x8;this._matchesCount.appendChild(document.createTextNode(e)),Ji(this._getAriaLabel(e,this._state.currentMatch,this._state.searchString)),F_=Math.max(F_,this._matchesCount.clientWidth)}_getAriaLabel(e,t,i){if(e===x8)return i===""?m("ariaSearchNoResultEmpty","{0} found",e):m("ariaSearchNoResult","{0} found for '{1}'",e,i);if(t){const n=m("ariaSearchNoResultWithLineNum","{0} found for '{1}', at {2}",e,i,t.startLineNumber+":"+t.startColumn),s=this._codeEditor.getModel();return s&&t.startLineNumber<=s.getLineCount()&&t.startLineNumber>=1?`${s.getLineContent(t.startLineNumber)}, ${n}`:n}return m("ariaSearchNoResultWithLineNumNoCurrentMatch","{0} found for '{1}'",e,i)}_updateToggleSelectionFindButton(){let e=this._codeEditor.getSelection(),t=e?e.startLineNumber!==e.endLineNumber||e.startColumn!==e.endColumn:!1,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);let 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);let i=!this._codeEditor.getOption(80);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(35).autoFindInSelection){case"always":this._toggleSelectionFind.checked=!0;break;case"never":this._toggleSelectionFind.checked=!1;break;case"multiline":const i=!!e&&e.startLineNumber!==e.endLineNumber;this._toggleSelectionFind.checked=i;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(35).seedSearchStringFromSelection&&e){const i=this._codeEditor.getDomNode();if(i){const n=Qi(i),s=this._codeEditor.getScrolledVisiblePosition(e.getStartPosition()),o=n.left+(s?s.left:0),a=s?s.top:0;if(this._viewZone&&a<this._viewZone.heightInPx){e.endLineNumber>e.startLineNumber&&(t=!1);const l=qM(this._domNode).left;o>l&&(t=!1);const c=this._codeEditor.getScrolledVisiblePosition(e.getEndPosition());n.left+(c?c.left:0)>l&&(t=!1)}}}this._showViewZone(t)}}_hide(e){this._revealTimeouts.forEach(t=>{clearTimeout(t)}),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(35).addExtraSpaceOnTop){this._removeViewZone();return}if(!this._isVisible)return;const i=this._viewZone;this._viewZoneId!==void 0||!i||this._codeEditor.changeViewZones(n=>{i.heightInPx=this._getHeight(),this._viewZoneId=n.addZone(i),this._codeEditor.setScrollTop(e||this._codeEditor.getScrollTop()+i.heightInPx)})}_showViewZone(e=!0){if(!this._isVisible||!this._codeEditor.getOption(35).addExtraSpaceOnTop)return;this._viewZone===void 0&&(this._viewZone=new KT(0));const i=this._viewZone;this._codeEditor.changeViewZones(n=>{if(this._viewZoneId!==void 0){const s=this._getHeight();if(s===i.heightInPx)return;let o=s-i.heightInPx;i.heightInPx=s,n.layoutZone(this._viewZoneId),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+o);return}else{let s=this._getHeight();if(s-=this._codeEditor.getOption(74).top,s<=0)return;i.heightInPx=s,this._viewZoneId=n.addZone(i),e&&this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()+s)}})}_removeViewZone(){this._codeEditor.changeViewZones(e=>{this._viewZoneId!==void 0&&(e.removeZone(this._viewZoneId),this._viewZoneId=void 0,this._viewZone&&(this._codeEditor.setScrollTop(this._codeEditor.getScrollTop()-this._viewZone.heightInPx),this._viewZone=void 0))})}_applyTheme(e){let t={inputActiveOptionBorder:e.getColor(Kk),inputActiveOptionBackground:e.getColor(qk),inputActiveOptionForeground:e.getColor(Gk),inputBackground:e.getColor($k),inputForeground:e.getColor(Uk),inputBorder:e.getColor(jk),inputValidationInfoBackground:e.getColor(Zk),inputValidationInfoForeground:e.getColor(Yk),inputValidationInfoBorder:e.getColor(Xk),inputValidationWarningBackground:e.getColor(BO),inputValidationWarningForeground:e.getColor(WO),inputValidationWarningBorder:e.getColor(VO),inputValidationErrorBackground:e.getColor(HO),inputValidationErrorForeground:e.getColor(zO),inputValidationErrorBorder:e.getColor($O)};this._findInput.style(t),this._replaceInput.style(t),this._toggleSelectionFind.style(t)}_tryUpdateWidgetWidth(){if(!this._isVisible||!TL(this._domNode))return;const e=this._codeEditor.getLayoutInfo();if(e.contentWidth<=0){this._domNode.classList.add("hiddenEditor");return}else this._domNode.classList.contains("hiddenEditor")&&this._domNode.classList.remove("hiddenEditor");const i=e.width,n=e.minimap.minimapWidth;let s=!1,o=!1,a=!1;if(this._resized&&vs(this._domNode)>va){this._domNode.style.maxWidth=`${i-28-n-15}px`,this._replaceInput.width=vs(this._findInput.domNode);return}if(va+28+n>=i&&(o=!0),va+28+n-F_>=i&&(a=!0),va+28+n-F_>=i+50&&(s=!0),this._domNode.classList.toggle("collapsed-find-widget",s),this._domNode.classList.toggle("narrow-find-widget",a),this._domNode.classList.toggle("reduced-find-widget",o),!a&&!s&&(this._domNode.style.maxWidth=`${i-28-n-15}px`),this._resized){this._findInput.inputBox.layout();let l=this._findInput.inputBox.element.clientWidth;l>0&&(this._replaceInput.width=l)}else this._isReplaceVisible&&(this._replaceInput.width=vs(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 this._cachedHeight!==null&&this._cachedHeight===e?!1:(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){let e=this._codeEditor.getSelections();e.map(t=>{t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(t.endLineNumber-1)));const i=this._state.currentMatch;return t.startLineNumber!==t.endLineNumber&&!k.equalsRange(t,i)?t:null}).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}_onFindInputMouseDown(e){e.middleButton&&e.stopPropagation()}_onFindInputKeyDown(e){if(e.equals(D8|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{this._findInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._isReplaceVisible?this._replaceInput.focus():this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(2048|18)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return E8(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"));if(e.equals(18))return I8(e,this._findInput.getValue(),this._findInput.domNode.querySelector("textarea"))}_onReplaceInputKeyDown(e){if(e.equals(D8|3))if(this._keybindingService.dispatchEvent(e,e.target)){e.preventDefault();return}else{Xi&&js&&!this._ctrlEnterReplaceAllWarningPrompted&&(this._notificationService.info(m("ctrlEnter.keybindingChanged","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(k8,!0,0,0)),this._replaceInput.inputBox.insertAtCursor(` -`),e.preventDefault();return}if(e.equals(2)){this._findInput.focusOnCaseSensitive(),e.preventDefault();return}if(e.equals(1024|2)){this._findInput.focus(),e.preventDefault();return}if(e.equals(2048|18)){this._codeEditor.focus(),e.preventDefault();return}if(e.equals(16))return E8(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"));if(e.equals(18))return I8(e,this._replaceInput.inputBox.value,this._replaceInput.inputBox.element.querySelector("textarea"))}getVerticalSashLeft(e){return 0}_keybindingLabelFor(e){let t=this._keybindingService.lookupKeybinding(e);return t?` (${t.getLabel()})`:""}_buildDomNode(){const e=!0,t=!0;this._findInput=this._register(new UT(null,this._contextViewProvider,{width:ofe,label:Kde,placeholder:qde,appendCaseSensitiveLabel:this._keybindingLabelFor(zt.ToggleCaseSensitiveCommand),appendWholeWordsLabel:this._keybindingLabelFor(zt.ToggleWholeWordCommand),appendRegexLabel:this._keybindingLabelFor(zt.ToggleRegexCommand),validation:l=>{if(l.length===0||!this._findInput.getRegex())return null;try{return new RegExp(l,"gu"),null}catch(c){return{content:c.message}}},flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>y8(this._keybindingService)},this._contextKeyService,!0)),this._findInput.setRegex(!!this._state.isRegex),this._findInput.setCaseSensitive(!!this._state.matchCase),this._findInput.setWholeWords(!!this._state.wholeWord),this._register(this._findInput.onKeyDown(l=>this._onFindInputKeyDown(l))),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(l=>{l.equals(1024|2)&&this._isReplaceVisible&&(this._replaceInput.focus(),l.preventDefault())})),this._register(this._findInput.onRegexKeyDown(l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceInput.focusOnPreserve(),l.preventDefault())})),this._register(this._findInput.inputBox.onDidHeightChange(l=>{this._tryUpdateHeight()&&this._showViewZone()})),Zn&&this._register(this._findInput.onMouseDown(l=>this._onFindInputMouseDown(l))),this._matchesCount=document.createElement("div"),this._matchesCount.className="matchesCount",this._updateMatchesCount(),this._prevBtn=this._register(new lg({label:Gde+this._keybindingLabelFor(zt.PreviousMatchFindAction),icon:Ude,onTrigger:()=>{this._codeEditor.getAction(zt.PreviousMatchFindAction).run().then(void 0,Oe)}})),this._nextBtn=this._register(new lg({label:Zde+this._keybindingLabelFor(zt.NextMatchFindAction),icon:jde,onTrigger:()=>{this._codeEditor.getAction(zt.NextMatchFindAction).run().then(void 0,Oe)}}));let 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 P_({icon:Hde,title:Yde+this._keybindingLabelFor(zt.ToggleSearchScopeCommand),isChecked:!1})),this._register(this._toggleSelectionFind.onChange(()=>{if(this._toggleSelectionFind.checked){if(this._codeEditor.hasModel()){let l=this._codeEditor.getSelections();l.map(c=>(c.endColumn===1&&c.endLineNumber>c.startLineNumber&&(c=c.setEndPosition(c.endLineNumber-1,this._codeEditor.getModel().getLineMaxColumn(c.endLineNumber-1))),c.isEmpty()?null:c)).filter(c=>!!c),l.length&&this._state.change({searchScope:l},!0)}}else this._state.change({searchScope:null},!0)})),n.appendChild(this._toggleSelectionFind.domNode),this._closeBtn=this._register(new lg({label:Xde+this._keybindingLabelFor(zt.CloseFindWidgetCommand),icon:Mte,onTrigger:()=>{this._state.change({isRevealed:!1,searchScope:null},!1)},onKeyDown:l=>{l.equals(2)&&this._isReplaceVisible&&(this._replaceBtn.isEnabled()?this._replaceBtn.focus():this._codeEditor.focus(),l.preventDefault())}})),n.appendChild(this._closeBtn.domNode),this._replaceInput=this._register(new jT(null,void 0,{label:Qde,placeholder:Jde,appendPreserveCaseLabel:this._keybindingLabelFor(zt.TogglePreserveCaseCommand),history:[],flexibleHeight:e,flexibleWidth:t,flexibleMaxHeight:118,showHistoryHint:()=>y8(this._keybindingService)},this._contextKeyService,!0)),this._replaceInput.setPreserveCase(!!this._state.preserveCase),this._register(this._replaceInput.onKeyDown(l=>this._onReplaceInputKeyDown(l))),this._register(this._replaceInput.inputBox.onDidChange(()=>{this._state.change({replaceString:this._replaceInput.inputBox.value},!1)})),this._register(this._replaceInput.inputBox.onDidHeightChange(l=>{this._isReplaceVisible&&this._tryUpdateHeight()&&this._showViewZone()})),this._register(this._replaceInput.onDidOptionChange(()=>{this._state.change({preserveCase:this._replaceInput.getPreserveCase()},!0)})),this._register(this._replaceInput.onPreserveCaseKeyDown(l=>{l.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(),l.preventDefault())})),this._replaceBtn=this._register(new lg({label:efe+this._keybindingLabelFor(zt.ReplaceOneAction),icon:zde,onTrigger:()=>{this._controller.replace()},onKeyDown:l=>{l.equals(1024|2)&&(this._closeBtn.focus(),l.preventDefault())}})),this._replaceAllBtn=this._register(new lg({label:tfe+this._keybindingLabelFor(zt.ReplaceAllAction),icon:$de,onTrigger:()=>{this._controller.replaceAll()}}));let 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 lg({label:ife,className:"codicon toggle left",onTrigger:()=>{this._state.change({isReplaceRevealed:!this._isReplaceVisible},!1),this._isReplaceVisible&&(this._replaceInput.width=vs(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.style.width=`${va}px`,this._domNode.appendChild(this._toggleReplaceBtn.domNode),this._domNode.appendChild(i),this._domNode.appendChild(s),this._resizeSash=new _n(this._domNode,this,{orientation:0,size:2}),this._resized=!1;let a=va;this._register(this._resizeSash.onDidStart(()=>{a=vs(this._domNode)})),this._register(this._resizeSash.onDidChange(l=>{this._resized=!0;let c=a+l.startX-l.currentX;if(c<va)return;const h=parseFloat(FL(this._domNode).maxWidth)||0;c>h||(this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=vs(this._findInput.domNode)),this._findInput.inputBox.layout(),this._tryUpdateHeight())})),this._register(this._resizeSash.onDidReset(()=>{const l=vs(this._domNode);if(l<va)return;let c=va;if(!this._resized||l===va){const h=this._codeEditor.getLayoutInfo();c=h.width-28-h.minimap.minimapWidth-15,this._resized=!0}this._domNode.style.width=`${c}px`,this._isReplaceVisible&&(this._replaceInput.width=vs(this._findInput.domNode)),this._findInput.inputBox.layout()}))}updateAccessibilitySupport(){const e=this._codeEditor.getOption(2);this._findInput.setFocusInputOnOptionClick(e!==2)}}Oy.ID="editor.contrib.findWidget";class lg extends Vr{constructor(e){super();this._opts=e;let t="button";this._opts.className&&(t=t+" "+this._opts.className),this._opts.icon&&(t=t+" "+Gt.asClassName(this._opts.icon)),this._domNode=document.createElement("div"),this._domNode.title=this._opts.label,this._domNode.tabIndex=0,this._domNode.className=t,this._domNode.setAttribute("role","button"),this._domNode.setAttribute("aria-label",this._opts.label),this.onclick(this._domNode,i=>{this._opts.onTrigger(),i.preventDefault()}),this.onkeydown(this._domNode,i=>{if(i.equals(10)||i.equals(3)){this._opts.onTrigger(),i.preventDefault();return}this._opts.onKeyDown&&this._opts.onKeyDown(i)})}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(...Gt.asClassNameArray(S8)),this._domNode.classList.add(...Gt.asClassNameArray(L8))):(this._domNode.classList.remove(...Gt.asClassNameArray(L8)),this._domNode.classList.add(...Gt.asClassNameArray(S8)))}}Lt((r,e)=>{const t=(g,p)=>{p&&e.addRule(`.monaco-editor ${g} { background-color: ${p}; }`)};t(".findMatch",r.getColor(nD)),t(".currentFindMatch",r.getColor(QY)),t(".findScope",r.getColor(JY));const i=r.getColor(Fr);t(".find-widget",i);const n=r.getColor(sc);n&&e.addRule(`.monaco-editor .find-widget { box-shadow: 0 0 8px 2px ${n}; }`);const s=r.getColor(tX);s&&e.addRule(`.monaco-editor .findMatch { border: 1px ${r.type==="hc"?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const o=r.getColor(eX);o&&e.addRule(`.monaco-editor .currentFindMatch { border: 2px solid ${o}; padding: 1px; box-sizing: border-box; }`);const a=r.getColor(iX);a&&e.addRule(`.monaco-editor .findScope { border: 1px ${r.type==="hc"?"dashed":"solid"} ${a}; }`);const l=r.getColor(_i);l&&e.addRule(`.monaco-editor .find-widget { border: 1px solid ${l}; }`);const c=r.getColor(Ya);c&&e.addRule(`.monaco-editor .find-widget { color: ${c}; }`);const h=r.getColor(AY);h&&e.addRule(`.monaco-editor .find-widget.no-results .matchesCount { color: ${h}; }`);const u=r.getColor(HY);if(u)e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${u}; }`);else{const g=r.getColor(Wh);g&&e.addRule(`.monaco-editor .find-widget .monaco-sash { background-color: ${g}; }`)}const d=r.getColor(BX);d&&e.addRule(` - .monaco-editor .find-widget .button:not(.disabled):hover, - .monaco-editor .find-widget .codicon-find-selection:hover { - background-color: ${d} !important; - } - `);const f=r.getColor(rc);f&&e.addRule(`.monaco-editor .find-widget .monaco-inputbox.synthetic-focus { outline-color: ${f}; }`)});var N8=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ca=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},cg=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const lfe=524288;function qT(r,e="single",t=!1){if(!r.hasModel())return null;const i=r.getSelection();if(e==="single"&&i.startLineNumber===i.endLineNumber||e==="multiple"){if(i.isEmpty()){const n=r.getConfiguredWordAtPosition(i.getStartPosition());if(n&&t===!1)return n.word}else if(r.getModel().getValueLengthInRange(i)<lfe)return r.getModel().getValueInRange(i)}return null}let Ur=class T8 extends Y{constructor(e,t,i,n){super();this._editor=e,this._findWidgetVisible=$u.bindTo(t),this._contextKeyService=t,this._storageService=i,this._clipboardService=n,this._updateHistoryDelayer=new Ta(500),this._state=this._register(new Tde),this.loadQueryState(),this._register(this._state.onFindReplaceStateChange(s=>this._onStateChanged(s))),this._model=null,this._register(this._editor.onDidChangeModel(()=>{let s=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),s&&this._start({forceRevealReplace:!1,seedSearchStringFromSelection:"none",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!1,updateSearchScope:!1,loop:this._editor.getOption(35).loop})}))}get editor(){return this._editor}static get(e){return e.getContribution(T8.ID)}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,0),e.wholeWord&&this._storageService.store("editor.wholeWord",this._state.actualWholeWord,1,0),e.matchCase&&this._storageService.store("editor.matchCase",this._state.actualMatchCase,1,0),e.preserveCase&&this._storageService.store("editor.preserveCase",this._state.actualPreserveCase,1,0)}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!!Ey.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()){let e=this._editor.getSelections();e.map(t=>(t.endColumn===1&&t.endLineNumber>t.startLineNumber&&(t=t.setEndPosition(t.endLineNumber-1,this._editor.getModel().getLineMaxColumn(t.endLineNumber-1))),t.isEmpty()?null:t)).filter(t=>!!t),e.length&&this._state.change({searchScope:e},!0)}}setSearchString(e){this._state.isRegex&&(e=Cs(e)),this._state.change({searchString:e},!1)}highlightFindOptions(e=!1){}_start(e){return cg(this,void 0,void 0,function*(){if(this.disposeModel(),!this._editor.hasModel())return;let t={isRevealed:!0};if(e.seedSearchStringFromSelection==="single"){let i=qT(this._editor,e.seedSearchStringFromSelection,e.seedSearchStringFromNonEmptySelection);i&&(this._state.isRegex?t.searchString=Cs(i):t.searchString=i)}else if(e.seedSearchStringFromSelection==="multiple"&&!e.updateSearchScope){let i=qT(this._editor,e.seedSearchStringFromSelection);i&&(t.searchString=i)}if(!t.searchString&&e.seedSearchStringFromGlobalClipboard){let i=yield this.getGlobalBufferTerm();if(!this._editor.hasModel())return;i&&(t.searchString=i)}if(e.forceRevealReplace?t.isReplaceRevealed=!0:this._findWidgetVisible.get()||(t.isReplaceRevealed=!1),e.updateSearchScope){let i=this._editor.getSelections();i.some(n=>!n.isEmpty())&&(t.searchScope=i)}t.loop=e.loop,this._state.change(t,!1),this._model||(this._model=new M_(this._editor,this._state))})}start(e){return this._start(e)}moveToNextMatch(){return this._model?(this._model.moveToNextMatch(),!0):!1}moveToPrevMatch(){return this._model?(this._model.moveToPrevMatch(),!0):!1}replace(){return this._model?(this._model.replace(),!0):!1}replaceAll(){return this._model?(this._model.replaceAll(),!0):!1}selectAllMatches(){return this._model?(this._model.selectAllMatches(),this._editor.focus(),!0):!1}getGlobalBufferTerm(){return cg(this,void 0,void 0,function*(){return this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()?this._clipboardService.readFindText():""})}setGlobalBufferTerm(e){this._editor.getOption(35).globalFindClipboard&&this._editor.hasModel()&&!this._editor.getModel().isTooLargeForSyncing()&&this._clipboardService.writeFindText(e)}};Ur.ID="editor.contrib.findController";Ur=N8([Ca(1,Fe),Ca(2,aa),Ca(3,bc)],Ur);let GT=class extends Ur{constructor(e,t,i,n,s,o,a,l){super(e,i,a,l);this._contextViewService=t,this._keybindingService=n,this._themeService=s,this._notificationService=o,this._widget=null,this._findOptionsWidget=null}_start(e){const t=Object.create(null,{_start:{get:()=>super._start}});return cg(this,void 0,void 0,function*(){this._widget||this._createFindWidget();const i=this._editor.getSelection();let n=!1;switch(this._editor.getOption(35).autoFindInSelection){case"always":n=!0;break;case"never":n=!1;break;case"multiline":n=!!i&&i.startLineNumber!==i.endLineNumber;break}e.updateSearchScope=n,yield t._start.call(this,e),this._widget&&(e.shouldFocus===2?this._widget.focusReplaceInput():e.shouldFocus===1&&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 Oy(this._editor,this,this._state,this._contextViewService,this._keybindingService,this._contextKeyService,this._themeService,this._storageService,this._notificationService)),this._findOptionsWidget=this._register(new My(this._editor,this._state,this._keybindingService,this._themeService))}};GT=N8([Ca(1,mc),Ca(2,Fe),Ca(3,Qt),Ca(4,qt),Ca(5,Di),Ca(6,aa),Ca(7,bc)],GT);const cfe=aO(new oO({id:zt.StartFindAction,label:m("startFindAction","Find"),alias:"Find",precondition:_e.or(R.focus,_e.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|36,weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:m({key:"miFind",comment:["&& denotes a mnemonic"]},"&&Find"),order:1}}));cfe.addImplementation(0,(r,e,t)=>{const i=Ur.get(e);return i?i.start({forceRevealReplace:!1,seedSearchStringFromSelection:e.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).globalFindClipboard,shouldFocus:1,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop}):!1});class hfe extends Se{constructor(){super({id:zt.StartFindWithSelection,label:m("startFindWithSelectionAction","Find With Selection"),alias:"Find With Selection",precondition:void 0,kbOpts:{kbExpr:null,primary:0,mac:{primary:2048|35},weight:100}})}run(e,t){return cg(this,void 0,void 0,function*(){let i=Ur.get(t);i&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:"multiple",seedSearchStringFromNonEmptySelection:!1,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),i.setGlobalBufferTerm(i.getState().searchString))})}}class A8 extends Se{run(e,t){return cg(this,void 0,void 0,function*(){let i=Ur.get(t);i&&!this._run(i)&&(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:i.getState().searchString.length===0&&t.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:t.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:!0,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(i))})}}class ufe extends A8{constructor(){super({id:zt.NextMatchFindAction,label:m("findNextMatchAction","Find Next"),alias:"Find Next",precondition:void 0,kbOpts:[{kbExpr:R.focus,primary:61,mac:{primary:2048|37,secondary:[61]},weight:100},{kbExpr:_e.and(R.focus,Ey),primary:3,weight:100}]})}_run(e){return e.moveToNextMatch()?(e.editor.pushUndoStop(),!0):!1}}class dfe extends A8{constructor(){super({id:zt.PreviousMatchFindAction,label:m("findPreviousMatchAction","Find Previous"),alias:"Find Previous",precondition:void 0,kbOpts:[{kbExpr:R.focus,primary:1024|61,mac:{primary:2048|1024|37,secondary:[1024|61]},weight:100},{kbExpr:_e.and(R.focus,Ey),primary:1024|3,weight:100}]})}_run(e){return e.moveToPrevMatch()}}class R8 extends Se{run(e,t){return cg(this,void 0,void 0,function*(){let i=Ur.get(t);if(!i)return;const n=t.getOption(35).seedSearchStringFromSelection==="selection";let s=null;t.getOption(35).seedSearchStringFromSelection!=="never"&&(s=qT(t,"single",n)),s&&i.setSearchString(s),this._run(i)||(yield i.start({forceRevealReplace:!1,seedSearchStringFromSelection:t.getOption(35).seedSearchStringFromSelection!=="never"?"single":"none",seedSearchStringFromNonEmptySelection:n,seedSearchStringFromGlobalClipboard:!1,shouldFocus:0,shouldAnimate:!0,updateSearchScope:!1,loop:t.getOption(35).loop}),this._run(i))})}}class ffe extends R8{constructor(){super({id:zt.NextSelectionMatchFindAction,label:m("nextSelectionMatchFindAction","Find Next Selection"),alias:"Find Next Selection",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2048|61,weight:100}})}_run(e){return e.moveToNextMatch()}}class gfe extends R8{constructor(){super({id:zt.PreviousSelectionMatchFindAction,label:m("previousSelectionMatchFindAction","Find Previous Selection"),alias:"Find Previous Selection",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2048|1024|61,weight:100}})}_run(e){return e.moveToPrevMatch()}}const pfe=aO(new oO({id:zt.StartFindReplaceAction,label:m("startReplace","Replace"),alias:"Replace",precondition:_e.or(R.focus,_e.has("editorIsOpen")),kbOpts:{kbExpr:null,primary:2048|38,mac:{primary:2048|512|36},weight:100},menuOpts:{menuId:xe.MenubarEditMenu,group:"3_find",title:m({key:"miReplace",comment:["&& denotes a mnemonic"]},"&&Replace"),order:2}}));pfe.addImplementation(0,(r,e,t)=>{if(!e.hasModel()||e.getOption(80))return!1;const i=Ur.get(e);if(!i)return!1;const n=e.getSelection(),s=i.isFindInputFocused(),o=!n.isEmpty()&&n.startLineNumber===n.endLineNumber&&e.getOption(35).seedSearchStringFromSelection!=="never"&&!s,a=s||o?2:1;return i.start({forceRevealReplace:!0,seedSearchStringFromSelection:o?"single":"none",seedSearchStringFromNonEmptySelection:e.getOption(35).seedSearchStringFromSelection==="selection",seedSearchStringFromGlobalClipboard:e.getOption(35).seedSearchStringFromSelection!=="never",shouldFocus:a,shouldAnimate:!0,updateSearchScope:!1,loop:e.getOption(35).loop})});wt(Ur.ID,GT);me(hfe);me(ufe);me(dfe);me(ffe);me(gfe);const wo=en.bindToContribution(Ur.get);fe(new wo({id:zt.CloseFindWidgetCommand,precondition:$u,handler:r=>r.closeFindWidget(),kbOpts:{weight:100+5,kbExpr:_e.and(R.focus,_e.not("isComposing")),primary:9,secondary:[1024|9]}}));fe(new wo({id:zt.ToggleCaseSensitiveCommand,precondition:void 0,handler:r=>r.toggleCaseSensitive(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Iy.primary,mac:Iy.mac,win:Iy.win,linux:Iy.linux}}));fe(new wo({id:zt.ToggleWholeWordCommand,precondition:void 0,handler:r=>r.toggleWholeWords(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Ny.primary,mac:Ny.mac,win:Ny.win,linux:Ny.linux}}));fe(new wo({id:zt.ToggleRegexCommand,precondition:void 0,handler:r=>r.toggleRegex(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Ty.primary,mac:Ty.mac,win:Ty.win,linux:Ty.linux}}));fe(new wo({id:zt.ToggleSearchScopeCommand,precondition:void 0,handler:r=>r.toggleSearchScope(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Ay.primary,mac:Ay.mac,win:Ay.win,linux:Ay.linux}}));fe(new wo({id:zt.TogglePreserveCaseCommand,precondition:void 0,handler:r=>r.togglePreserveCase(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:Ry.primary,mac:Ry.mac,win:Ry.win,linux:Ry.linux}}));fe(new wo({id:zt.ReplaceOneAction,precondition:$u,handler:r=>r.replace(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:2048|1024|22}}));fe(new wo({id:zt.ReplaceOneAction,precondition:$u,handler:r=>r.replace(),kbOpts:{weight:100+5,kbExpr:_e.and(R.focus,$T),primary:3}}));fe(new wo({id:zt.ReplaceAllAction,precondition:$u,handler:r=>r.replaceAll(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:2048|512|3}}));fe(new wo({id:zt.ReplaceAllAction,precondition:$u,handler:r=>r.replaceAll(),kbOpts:{weight:100+5,kbExpr:_e.and(R.focus,$T),primary:void 0,mac:{primary:2048|3}}}));fe(new wo({id:zt.SelectAllMatchesAction,precondition:$u,handler:r=>r.selectAllMatches(),kbOpts:{weight:100+5,kbExpr:R.focus,primary:512|3}}));const M8=65535,wl=16777215,P8=4278190080;class B_{constructor(e,t,i){if(e.length!==t.length||e.length>M8)throw new Error("invalid startIndexes or endIndexes size");this._startIndexes=e,this._endIndexes=t,this._collapseStates=new Uint32Array(Math.ceil(e.length/32)),this._types=i,this._parentsComputed=!1}ensureParentIndices(){if(!this._parentsComputed){this._parentsComputed=!0;let e=[],t=(i,n)=>{let s=e[e.length-1];return this.getStartLineNumber(s)<=i&&this.getEndLineNumber(s)>=n};for(let i=0,n=this._startIndexes.length;i<n;i++){let s=this._startIndexes[i],o=this._endIndexes[i];if(s>wl||o>wl)throw new Error("startLineNumber or endLineNumber must not exceed "+wl);for(;e.length>0&&!t(s,o);)e.pop();let a=e.length>0?e[e.length-1]:-1;e.push(i),this._startIndexes[i]=s+((a&255)<<24),this._endIndexes[i]=o+((a&65280)<<16)}}}get length(){return this._startIndexes.length}getStartLineNumber(e){return this._startIndexes[e]&wl}getEndLineNumber(e){return this._endIndexes[e]&wl}getType(e){return this._types?this._types[e]:void 0}hasTypes(){return!!this._types}isCollapsed(e){let t=e/32|0,i=e%32;return(this._collapseStates[t]&1<<i)!=0}setCollapsed(e,t){let i=e/32|0,n=e%32,s=this._collapseStates[i];t?this._collapseStates[i]=s|1<<n:this._collapseStates[i]=s&~(1<<n)}setCollapsedAllOfType(e,t){let i=!1;if(this._types)for(let n=0;n<this._types.length;n++)this._types[n]===e&&(this.setCollapsed(n,t),i=!0);return i}toRegion(e){return new mfe(this,e)}getParentIndex(e){this.ensureParentIndices();let t=((this._startIndexes[e]&P8)>>>24)+((this._endIndexes[e]&P8)>>>16);return t===M8?-1:t}contains(e,t){return this.getStartLineNumber(e)<=t&&this.getEndLineNumber(e)>=t}findIndex(e){let t=0,i=this._startIndexes.length;if(i===0)return-1;for(;t<i;){let n=Math.floor((t+i)/2);e<this.getStartLineNumber(n)?i=n:t=n+1}return t-1}findRange(e){let t=this.findIndex(e);if(t>=0){if(this.getEndLineNumber(t)>=e)return t;for(t=this.getParentIndex(t);t!==-1;){if(this.contains(t,e))return t;t=this.getParentIndex(t)}}return-1}toString(){let e=[];for(let t=0;t<this.length;t++)e[t]=`[${this.isCollapsed(t)?"+":"-"}] ${this.getStartLineNumber(t)}/${this.getEndLineNumber(t)}`;return e.join(", ")}}class mfe{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 _fe{constructor(e,t){this._updateEventEmitter=new H,this.onDidChange=this._updateEventEmitter.event,this._textModel=e,this._decorationProvider=t,this._regions=new B_(new Uint32Array(0),new Uint32Array(0)),this._editorDecorationIds=[],this._isInitialized=!1}get regions(){return this._regions}get textModel(){return this._textModel}get isInitialized(){return this._isInitialized}toggleCollapseState(e){if(!e.length)return;e=e.sort((i,n)=>i.regionIndex-n.regionIndex);const t={};this._decorationProvider.changeDecorations(i=>{let n=0,s=-1,o=-1;const a=l=>{for(;n<l;){const c=this._regions.getEndLineNumber(n),h=this._regions.isCollapsed(n);c<=s&&i.changeDecorationOptions(this._editorDecorationIds[n],this._decorationProvider.getDecorationOption(h,c<=o)),h&&c>o&&(o=c),n++}};for(let l of e){let c=l.regionIndex,h=this._editorDecorationIds[c];if(h&&!t[h]){t[h]=!0,a(c);let u=!this._regions.isCollapsed(c);this._regions.setCollapsed(c,u),s=Math.max(s,this._regions.getEndLineNumber(c))}}a(this._regions.length)}),this._updateEventEmitter.fire({model:this,collapseStateChanged:e})}update(e,t=[]){let i=[],n=(u,d)=>{for(let f of t)if(u<f&&f<=d)return!0;return!1},s=-1,o=(u,d)=>{const f=e.getStartLineNumber(u),g=e.getEndLineNumber(u);d||(d=e.isCollapsed(u)),d&&n(f,g)&&(d=!1),e.setCollapsed(u,d);const p=this._textModel.getLineMaxColumn(f),_={startLineNumber:f,startColumn:Math.max(p-1,1),endLineNumber:f,endColumn:p};i.push({range:_,options:this._decorationProvider.getDecorationOption(d,g<=s)}),d&&g>s&&(s=g)},a=0,l=()=>{for(;a<this._regions.length;){let u=this._regions.isCollapsed(a);if(a++,u)return a-1}return-1},c=0,h=l();for(;h!==-1&&c<e.length;){let u=this._textModel.getDecorationRange(this._editorDecorationIds[h]);if(u){let d=u.startLineNumber;if(u.startColumn===Math.max(u.endColumn-1,1)&&this._textModel.getLineMaxColumn(d)===u.endColumn)for(;c<e.length;){let f=e.getStartLineNumber(c);if(d>=f)o(c,d===f),c++;else break}}h=l()}for(;c<e.length;)o(c,!1),c++;this._editorDecorationIds=this._decorationProvider.deltaDecorations(this._editorDecorationIds,i),this._regions=e,this._isInitialized=!0,this._updateEventEmitter.fire({model:this})}getMemento(){let e=[];for(let t=0;t<this._regions.length;t++)if(this._regions.isCollapsed(t)){let i=this._textModel.getDecorationRange(this._editorDecorationIds[t]);if(i){let n=i.startLineNumber,s=i.endLineNumber+this._regions.getEndLineNumber(t)-this._regions.getStartLineNumber(t);e.push({startLineNumber:n,endLineNumber:s})}}if(e.length>0)return e}applyMemento(e){if(!Array.isArray(e))return;let t=[];for(let i of e){let n=this.getRegionAtLine(i.startLineNumber);n&&!n.isCollapsed&&t.push(n)}this.toggleCollapseState(t)}dispose(){this._decorationProvider.deltaDecorations(this._editorDecorationIds,[])}getAllRegionsAtLine(e,t){let i=[];if(this._regions){let n=this._regions.findRange(e),s=1;for(;n>=0;){let o=this._regions.toRegion(n);(!t||t(o,s))&&i.push(o),s++,n=o.parentIndex}}return i}getRegionAtLine(e){if(this._regions){let t=this._regions.findRange(e);if(t>=0)return this._regions.toRegion(t)}return null}getRegionsInside(e,t){let i=[],n=e?e.regionIndex+1:0,s=e?e.endLineNumber:Number.MAX_VALUE;if(t&&t.length===2){const o=[];for(let a=n,l=this._regions.length;a<l;a++){let c=this._regions.toRegion(a);if(this._regions.getStartLineNumber(a)<s){for(;o.length>0&&!c.containedBy(o[o.length-1]);)o.pop();o.push(c),t(c,o.length)&&i.push(c)}else break}}else for(let o=n,a=this._regions.length;o<a;o++){let l=this._regions.toRegion(o);if(this._regions.getStartLineNumber(o)<s)(!t||t(l))&&i.push(l);else break}return i}}function bfe(r,e,t){let i=[];for(let n of t){let s=r.getRegionAtLine(n);if(s){const o=!s.isCollapsed;if(i.push(s),e>1){let a=r.getRegionsInside(s,(l,c)=>l.isCollapsed!==o&&c<e);i.push(...a)}}}r.toggleCollapseState(i)}function hg(r,e,t=Number.MAX_VALUE,i){let n=[];if(i&&i.length>0)for(let s of i){let o=r.getRegionAtLine(s);if(o&&(o.isCollapsed!==e&&n.push(o),t>1)){let a=r.getRegionsInside(o,(l,c)=>l.isCollapsed!==e&&c<t);n.push(...a)}}else{let s=r.getRegionsInside(null,(o,a)=>o.isCollapsed!==e&&a<t);n.push(...s)}r.toggleCollapseState(n)}function O8(r,e,t,i){let n=[];for(let s of i){let o=r.getAllRegionsAtLine(s,(a,l)=>a.isCollapsed!==e&&l<=t);n.push(...o)}r.toggleCollapseState(n)}function vfe(r,e,t){let i=[];for(let n of t){let s=r.getAllRegionsAtLine(n,o=>o.isCollapsed!==e);s.length>0&&i.push(s[0])}r.toggleCollapseState(i)}function Cfe(r,e,t,i){let n=(o,a)=>a===e&&o.isCollapsed!==t&&!i.some(l=>o.containsLine(l)),s=r.getRegionsInside(null,n);r.toggleCollapseState(s)}function F8(r,e,t){let i=[];for(let o of t)i.push(r.getAllRegionsAtLine(o,void 0)[0]);let n=o=>i.every(a=>!a.containedBy(o)&&!o.containedBy(a))&&o.isCollapsed!==e,s=r.getRegionsInside(null,n);r.toggleCollapseState(s)}function ZT(r,e,t){let i=r.textModel,n=r.regions,s=[];for(let o=n.length-1;o>=0;o--)if(t!==n.isCollapsed(o)){let a=n.getStartLineNumber(o);e.test(i.getLineContent(a))&&s.push(n.toRegion(o))}r.toggleCollapseState(s)}function YT(r,e,t){let i=r.regions,n=[];for(let s=i.length-1;s>=0;s--)t!==i.isCollapsed(s)&&e===i.getType(s)&&n.push(i.toRegion(s));r.toggleCollapseState(n)}function wfe(r,e){let t=null,i=e.getRegionAtLine(r);if(i!==null&&(t=i.startLineNumber,r===t)){let n=i.parentIndex;n!==-1?t=e.regions.getStartLineNumber(n):t=null}return t}function yfe(r,e){let t=e.getRegionAtLine(r);if(t!==null&&t.startLineNumber===r){if(r!==t.startLineNumber)return t.startLineNumber;{let i=t.parentIndex,n=0;for(i!==-1&&(n=e.regions.getStartLineNumber(t.parentIndex));t!==null;)if(t.regionIndex>0){if(t=e.regions.toRegion(t.regionIndex-1),t.startLineNumber<=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}}else if(e.regions.length>0)for(t=e.regions.toRegion(e.regions.length-1);t!==null;){if(t.startLineNumber<r)return t.startLineNumber;t.regionIndex>0?t=e.regions.toRegion(t.regionIndex-1):t=null}return null}function Sfe(r,e){let t=e.getRegionAtLine(r);if(t!==null&&t.startLineNumber===r){let i=t.parentIndex,n=0;if(i!==-1)n=e.regions.getEndLineNumber(t.parentIndex);else{if(e.regions.length===0)return null;n=e.regions.getEndLineNumber(e.regions.length-1)}for(;t!==null;)if(t.regionIndex<e.regions.length){if(t=e.regions.toRegion(t.regionIndex+1),t.startLineNumber>=n)return null;if(t.parentIndex===i)return t.startLineNumber}else return null}else if(e.regions.length>0)for(t=e.regions.toRegion(0);t!==null;){if(t.startLineNumber>r)return t.startLineNumber;t.regionIndex<e.regions.length?t=e.regions.toRegion(t.regionIndex+1):t=null}return null}class Lfe{constructor(e){this._updateEventEmitter=new H,this._foldingModel=e,this._foldingModelListener=e.onDidChange(t=>this.updateHiddenRanges()),this._hiddenRanges=[],e.regions.length&&this.updateHiddenRanges()}get onDidChange(){return this._updateEventEmitter.event}get hiddenRanges(){return this._hiddenRanges}updateHiddenRanges(){let e=!1,t=[],i=0,n=0,s=Number.MAX_VALUE,o=-1,a=this._foldingModel.regions;for(;i<a.length;i++){if(!a.isCollapsed(i))continue;let l=a.getStartLineNumber(i)+1,c=a.getEndLineNumber(i);s<=l&&c<=o||(!e&&n<this._hiddenRanges.length&&this._hiddenRanges[n].startLineNumber===l&&this._hiddenRanges[n].endLineNumber===c?(t.push(this._hiddenRanges[n]),n++):(e=!0,t.push(new k(l,1,c,1))),s=l,o=c)}(e||n<this._hiddenRanges.length)&&this.applyHiddenRanges(t)}applyMemento(e){if(!Array.isArray(e)||e.length===0)return!1;let t=[];for(let i of e){if(!i.startLineNumber||!i.endLineNumber)return!1;t.push(new k(i.startLineNumber+1,1,i.endLineNumber,1))}return this.applyHiddenRanges(t),!0}getMemento(){return this._hiddenRanges.map(e=>({startLineNumber:e.startLineNumber-1,endLineNumber:e.endLineNumber}))}applyHiddenRanges(e){this._hiddenRanges=e,this._updateEventEmitter.fire(e)}hasRanges(){return this._hiddenRanges.length>0}isHidden(e){return B8(this._hiddenRanges,e)!==null}adjustSelections(e){let t=!1,i=this._foldingModel.textModel,n=null,s=o=>((!n||!xfe(o,n))&&(n=B8(this._hiddenRanges,o)),n?n.startLineNumber-1:null);for(let o=0,a=e.length;o<a;o++){let l=e[o],c=s(l.startLineNumber);c&&(l=l.setStartPosition(c,i.getLineMaxColumn(c)),t=!0);let h=s(l.endLineNumber);h&&(l=l.setEndPosition(h,i.getLineMaxColumn(h)),t=!0),e[o]=l}return t}dispose(){this.hiddenRanges.length>0&&(this._hiddenRanges=[],this._updateEventEmitter.fire(this._hiddenRanges)),this._foldingModelListener&&(this._foldingModelListener.dispose(),this._foldingModelListener=null)}}function xfe(r,e){return r>=e.startLineNumber&&r<=e.endLineNumber}function B8(r,e){let t=oP(r,i=>e<i.startLineNumber)-1;return t>=0&&r[t].endLineNumber>=e?r[t]:null}const kfe=5e3,Dfe="indent";class Efe{constructor(e){this.editorModel=e,this.id=Dfe}dispose(){}compute(e){let t=ze.getFoldingRules(this.editorModel.getLanguageIdentifier().id),i=t&&!!t.offSide,n=t&&t.markers;return Promise.resolve(Nfe(this.editorModel,i,n))}}class Ife{constructor(e){this._startIndexes=[],this._endIndexes=[],this._indentOccurrences=[],this._length=0,this._foldingRangesLimit=e}insertFirst(e,t,i){if(e>wl||t>wl)return;let 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){if(this._length<=this._foldingRangesLimit){let t=new Uint32Array(this._length),i=new Uint32Array(this._length);for(let n=this._length-1,s=0;n>=0;n--,s++)t[s]=this._startIndexes[n],i[s]=this._endIndexes[n];return new B_(t,i)}else{let t=0,i=this._indentOccurrences.length;for(let a=0;a<this._indentOccurrences.length;a++){let l=this._indentOccurrences[a];if(l){if(l+t>this._foldingRangesLimit){i=a;break}t+=l}}const n=e.getOptions().tabSize;let s=new Uint32Array(this._foldingRangesLimit),o=new Uint32Array(this._foldingRangesLimit);for(let a=this._length-1,l=0;a>=0;a--){let c=this._startIndexes[a],h=e.getLineContent(c),u=Ti.computeIndentLevel(h,n);(u<i||u===i&&t++<this._foldingRangesLimit)&&(s[l]=c,o[l]=this._endIndexes[a],l++)}return new B_(s,o)}}}function Nfe(r,e,t,i=kfe){const n=r.getOptions().tabSize;let s=new Ife(i),o;t&&(o=new RegExp(`(${t.start.source})|(?:${t.end.source})`));let a=[],l=r.getLineCount()+1;a.push({indent:-1,endAbove:l,line:l});for(let c=r.getLineCount();c>0;c--){let h=r.getLineContent(c),u=Ti.computeIndentLevel(h,n),d=a[a.length-1];if(u===-1){e&&(d.endAbove=c);continue}let f;if(o&&(f=h.match(o)))if(f[1]){let g=a.length-1;for(;g>0&&a[g].indent!==-2;)g--;if(g>0){a.length=g+1,d=a[g],s.insertFirst(c,d.line,u),d.line=c,d.indent=u,d.endAbove=c;continue}}else{a.push({indent:-2,endAbove:c,line:c});continue}if(d.indent>u){do a.pop(),d=a[a.length-1];while(d.indent>u);let g=d.endAbove-1;g-c>=1&&s.insertFirst(c,g,u)}d.indent===u?d.endAbove=c:a.push({indent:u,endAbove:c,line:c})}return s.toIndentRanges(r)}const Tfe=5e3,Afe={},W8="syntax";class Rfe{constructor(e,t,i,n=Tfe){this.editorModel=e,this.providers=t,this.limit=n,this.id=W8;for(const s of t)typeof s.onDidChange=="function"&&(this.disposables||(this.disposables=new le),this.disposables.add(s.onDidChange(i)))}compute(e){return Mfe(this.providers,this.editorModel,e).then(t=>t?V8(t,this.limit):null)}dispose(){var e;(e=this.disposables)===null||e===void 0||e.dispose()}}function Mfe(r,e,t){let i=null,n=r.map((s,o)=>Promise.resolve(s.provideFoldingRanges(e,Afe,t)).then(a=>{if(!t.isCancellationRequested&&Array.isArray(a)){Array.isArray(i)||(i=[]);let l=e.getLineCount();for(let c of a)c.start>0&&c.end>c.start&&c.end<=l&&i.push({start:c.start,end:c.end,rank:o,kind:c.kind})}},$i));return Promise.all(n).then(s=>i)}class Pfe{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>wl||t>wl)return;let 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(){if(this._length<=this._foldingRangesLimit){let e=new Uint32Array(this._length),t=new Uint32Array(this._length);for(let i=0;i<this._length;i++)e[i]=this._startIndexes[i],t[i]=this._endIndexes[i];return new B_(e,t,this._types)}else{let e=0,t=this._nestingLevelCounts.length;for(let o=0;o<this._nestingLevelCounts.length;o++){let a=this._nestingLevelCounts[o];if(a){if(a+e>this._foldingRangesLimit){t=o;break}e+=a}}let i=new Uint32Array(this._foldingRangesLimit),n=new Uint32Array(this._foldingRangesLimit),s=[];for(let o=0,a=0;o<this._length;o++){let l=this._nestingLevels[o];(l<t||l===t&&e++<this._foldingRangesLimit)&&(i[a]=this._startIndexes[o],n[a]=this._endIndexes[o],s[a]=this._types[o],a++)}return new B_(i,n,s)}}}function V8(r,e){let t=r.sort((o,a)=>{let l=o.start-a.start;return l===0&&(l=o.rank-a.rank),l}),i=new Pfe(e),n,s=[];for(let o of t)if(!n)n=o,i.add(o.start,o.end,o.kind&&o.kind.value,s.length);else if(o.start>n.start)if(o.end<=n.end)s.push(n),n=o,i.add(o.start,o.end,o.kind&&o.kind.value,s.length);else{if(o.start>n.end){do n=s.pop();while(n&&o.start>n.end);n&&s.push(n),n=o}i.add(o.start,o.end,o.kind&&o.kind.value,s.length)}return i.toIndentRanges()}const H8="init";class Ofe{constructor(e,t,i,n){if(this.editorModel=e,this.id=H8,t.length){let s=o=>({range:{startLineNumber:o.startLineNumber,startColumn:0,endLineNumber:o.endLineNumber,endColumn:e.getLineLength(o.endLineNumber)},options:{description:"folding-initializing-range-provider",stickiness:1}});this.decorationIds=e.deltaDecorations([],t.map(s)),this.timeout=setTimeout(i,n)}}dispose(){this.decorationIds&&(this.editorModel.deltaDecorations(this.decorationIds,[]),this.decorationIds=void 0),typeof this.timeout=="number"&&(clearTimeout(this.timeout),this.timeout=void 0)}compute(e){let t=[];if(this.decorationIds)for(let i of this.decorationIds){let n=this.editorModel.getDecorationRange(i);n&&t.push({start:n.startLineNumber,end:n.endLineNumber,rank:1})}return Promise.resolve(V8(t,Number.MAX_VALUE))}}const XT=sn("folding-expanded",ve.chevronDown,m("foldingExpandedIcon","Icon for expanded ranges in the editor glyph margin.")),QT=sn("folding-collapsed",ve.chevronRight,m("foldingCollapsedIcon","Icon for collapsed ranges in the editor glyph margin."));class zs{constructor(e){this.editor=e,this.autoHideFoldingControls=!0,this.showFoldingHighlights=!0}getDecorationOption(e,t){return t?zs.HIDDEN_RANGE_DECORATION:e?this.showFoldingHighlights?zs.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION:zs.COLLAPSED_VISUAL_DECORATION:this.autoHideFoldingControls?zs.EXPANDED_AUTO_HIDE_VISUAL_DECORATION:zs.EXPANDED_VISUAL_DECORATION}deltaDecorations(e,t){return this.editor.deltaDecorations(e,t)}changeDecorations(e){return this.editor.changeDecorations(e)}}zs.COLLAPSED_VISUAL_DECORATION=Ke.register({description:"folding-collapsed-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",isWholeLine:!0,firstLineDecorationClassName:Gt.asClassName(QT)});zs.COLLAPSED_HIGHLIGHTED_VISUAL_DECORATION=Ke.register({description:"folding-collapsed-highlighted-visual-decoration",stickiness:1,afterContentClassName:"inline-folded",className:"folded-background",isWholeLine:!0,firstLineDecorationClassName:Gt.asClassName(QT)});zs.EXPANDED_AUTO_HIDE_VISUAL_DECORATION=Ke.register({description:"folding-expanded-auto-hide-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:Gt.asClassName(XT)});zs.EXPANDED_VISUAL_DECORATION=Ke.register({description:"folding-expanded-visual-decoration",stickiness:1,isWholeLine:!0,firstLineDecorationClassName:"alwaysShowFoldIcons "+Gt.asClassName(XT)});zs.HIDDEN_RANGE_DECORATION=Ke.register({description:"folding-hidden-range-decoration",stickiness:1});var Ffe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bfe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const zn=new Le("foldingEnabled",!1);let ug=class z8 extends Y{constructor(e,t){super();this.contextKeyService=t,this.localToDispose=this._register(new le),this.editor=e;const i=this.editor.getOptions();this._isEnabled=i.get(37),this._useFoldingProviders=i.get(38)!=="indentation",this._unfoldOnClickAfterEndOfLine=i.get(41),this._restoringViewState=!1,this._currentModelHasFoldedImports=!1,this._foldingImportsByDefault=i.get(40),this.foldingModel=null,this.hiddenRangeModel=null,this.rangeProvider=null,this.foldingRegionPromise=null,this.foldingStateMemento=null,this.foldingModelPromise=null,this.updateScheduler=null,this.cursorChangedScheduler=null,this.mouseDownInfo=null,this.foldingDecorationProvider=new zs(e),this.foldingDecorationProvider.autoHideFoldingControls=i.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=i.get(39),this.foldingEnabled=zn.bindTo(this.contextKeyService),this.foldingEnabled.set(this._isEnabled),this._register(this.editor.onDidChangeModel(()=>this.onModelChanged())),this._register(this.editor.onDidChangeConfiguration(n=>{if(n.hasChanged(37)&&(this._isEnabled=this.editor.getOptions().get(37),this.foldingEnabled.set(this._isEnabled),this.onModelChanged()),n.hasChanged(98)||n.hasChanged(39)){const s=this.editor.getOptions();this.foldingDecorationProvider.autoHideFoldingControls=s.get(98)==="mouseover",this.foldingDecorationProvider.showFoldingHighlights=s.get(39),this.onModelContentChanged()}n.hasChanged(38)&&(this._useFoldingProviders=this.editor.getOptions().get(38)!=="indentation",this.onFoldingStrategyChanged()),n.hasChanged(41)&&(this._unfoldOnClickAfterEndOfLine=this.editor.getOptions().get(41)),n.hasChanged(40)&&(this._foldingImportsByDefault=this.editor.getOptions().get(40))})),this.onModelChanged()}static get(e){return e.getContribution(z8.ID)}saveViewState(){let e=this.editor.getModel();if(!e||!this._isEnabled||e.isTooLargeForTokenization())return{};if(this.foldingModel){let t=this.foldingModel.isInitialized?this.foldingModel.getMemento():this.hiddenRangeModel.getMemento(),i=this.rangeProvider?this.rangeProvider.id:void 0;return{collapsedRegions:t,lineCount:e.getLineCount(),provider:i,foldedImports:this._currentModelHasFoldedImports}}}restoreViewState(e){let t=this.editor.getModel();if(!t||!this._isEnabled||t.isTooLargeForTokenization()||!this.hiddenRangeModel||!e||e.lineCount!==t.getLineCount()||(this._currentModelHasFoldedImports=!!e.foldedImports,!e.collapsedRegions))return;(e.provider===W8||e.provider===H8)&&(this.foldingStateMemento=e);const i=e.collapsedRegions;if(this.hiddenRangeModel.applyMemento(i)){const n=this.getFoldingModel();n&&n.then(s=>{if(s){this._restoringViewState=!0;try{s.applyMemento(i)}finally{this._restoringViewState=!1}}}).then(void 0,Oe)}}onModelChanged(){this.localToDispose.clear();let e=this.editor.getModel();!this._isEnabled||!e||e.isTooLargeForTokenization()||(this._currentModelHasFoldedImports=!1,this.foldingModel=new _fe(e,this.foldingDecorationProvider),this.localToDispose.add(this.foldingModel),this.hiddenRangeModel=new Lfe(this.foldingModel),this.localToDispose.add(this.hiddenRangeModel),this.localToDispose.add(this.hiddenRangeModel.onDidChange(t=>this.onHiddenRangesChanges(t))),this.updateScheduler=new Ta(200),this.cursorChangedScheduler=new Bt(()=>this.revealCursor(),200),this.localToDispose.add(this.cursorChangedScheduler),this.localToDispose.add(Cx.onDidChange(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelLanguageConfiguration(()=>this.onFoldingStrategyChanged())),this.localToDispose.add(this.editor.onDidChangeModelContent(()=>this.onModelContentChanged())),this.localToDispose.add(this.editor.onDidChangeCursorPosition(()=>this.onCursorPositionChanged())),this.localToDispose.add(this.editor.onMouseDown(t=>this.onEditorMouseDown(t))),this.localToDispose.add(this.editor.onMouseUp(t=>this.onEditorMouseUp(t))),this.localToDispose.add({dispose:()=>{this.foldingRegionPromise&&(this.foldingRegionPromise.cancel(),this.foldingRegionPromise=null),this.updateScheduler&&this.updateScheduler.cancel(),this.updateScheduler=null,this.foldingModel=null,this.foldingModelPromise=null,this.hiddenRangeModel=null,this.cursorChangedScheduler=null,this.foldingStateMemento=null,this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null}}),this.onModelContentChanged())}onFoldingStrategyChanged(){this.rangeProvider&&this.rangeProvider.dispose(),this.rangeProvider=null,this.onModelContentChanged()}getRangeProvider(e){if(this.rangeProvider)return this.rangeProvider;if(this.rangeProvider=new Efe(e),this._useFoldingProviders&&this.foldingModel){let t=Cx.ordered(this.foldingModel.textModel);if(t.length===0&&this.foldingStateMemento&&this.foldingStateMemento.collapsedRegions)return this.rangeProvider=new Ofe(e,this.foldingStateMemento.collapsedRegions,()=>{this.foldingStateMemento=null,this.onFoldingStrategyChanged()},3e4);t.length>0&&(this.rangeProvider=new Rfe(e,t,()=>this.onModelContentChanged()))}return this.foldingStateMemento=null,this.rangeProvider}getFoldingModel(){return this.foldingModelPromise}onModelContentChanged(){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=this.getRangeProvider(e.textModel);let i=this.foldingRegionPromise=Oi(n=>t.compute(n));return i.then(n=>{if(n&&i===this.foldingRegionPromise){let s;if(this._foldingImportsByDefault&&!this._currentModelHasFoldedImports){const l=n.setCollapsedAllOfType(io.Imports.value,!0);l&&(s=pc.capture(this.editor),this._currentModelHasFoldedImports=l)}let o=this.editor.getSelections(),a=o?o.map(l=>l.startLineNumber):[];e.update(n,a),s&&s.restore(this.editor)}return e})}).then(void 0,e=>(Oe(e),null)))}onHiddenRangesChanges(e){if(this.hiddenRangeModel&&e.length&&!this._restoringViewState){let t=this.editor.getSelections();t&&this.hiddenRangeModel.adjustSelections(t)&&this.editor.setSelections(t)}this.editor.setHiddenAreas(e)}onCursorPositionChanged(){this.hiddenRangeModel&&this.hiddenRangeModel.hasRanges()&&this.cursorChangedScheduler.schedule()}revealCursor(){const e=this.getFoldingModel();!e||e.then(t=>{if(t){let i=this.editor.getSelections();if(i&&i.length>0){let n=[];for(let s of i){let o=s.selectionStartLineNumber;this.hiddenRangeModel&&this.hiddenRangeModel.isHidden(o)&&n.push(...t.getAllRegionsAtLine(o,a=>a.isCollapsed&&o>a.startLineNumber))}n.length&&(t.toggleCollapseState(n),this.reveal(i[0].getPosition()))}}}).then(void 0,Oe)}onEditorMouseDown(e){if(this.mouseDownInfo=null,!this.hiddenRangeModel||!e.target||!e.target.range||!e.event.leftButton&&!e.event.middleButton)return;const t=e.target.range;let i=!1;switch(e.target.type){case 4:const n=e.target.detail,s=e.target.element.offsetLeft;if(n.offsetX-s<5)return;i=!0;break;case 7:{if(this._unfoldOnClickAfterEndOfLine&&this.hiddenRangeModel.hasRanges()&&!e.target.detail.isAfterLines)break;return}case 6:{if(this.hiddenRangeModel.hasRanges()){let a=this.editor.getModel();if(a&&t.startColumn===a.getLineMaxColumn(t.startLineNumber))break}return}default:return}this.mouseDownInfo={lineNumber:t.startLineNumber,iconClicked:i}}onEditorMouseUp(e){const t=this.getFoldingModel();if(!t||!this.mouseDownInfo||!e.target)return;let i=this.mouseDownInfo.lineNumber,n=this.mouseDownInfo.iconClicked,s=e.target.range;if(!(!s||s.startLineNumber!==i)){if(n){if(e.target.type!==4)return}else{let o=this.editor.getModel();if(!o||s.startColumn!==o.getLineMaxColumn(i))return}t.then(o=>{if(o){let a=o.getRegionAtLine(i);if(a&&a.startLineNumber===i){let l=a.isCollapsed;if(n||l){let c=e.event.altKey,h=[];if(c){let u=f=>!f.containedBy(a)&&!a.containedBy(f),d=o.getRegionsInside(null,u);for(const f of d)f.isCollapsed&&h.push(f);h.length===0&&(h=d)}else{let u=e.event.middleButton||e.event.shiftKey;if(u)for(const d of o.getRegionsInside(a))d.isCollapsed===l&&h.push(d);(l||!u||h.length===0)&&h.push(a)}o.toggleCollapseState(h),this.reveal({lineNumber:i,column:1})}}}}).then(void 0,Oe)}}reveal(e){this.editor.revealPositionInCenterIfOutsideViewport(e,0)}};ug.ID="editor.contrib.folding";ug=Ffe([Bfe(1,Fe)],ug);class rr extends Se{runEditorCommand(e,t,i){let n=ug.get(t);if(!n)return;let s=n.getFoldingModel();if(s)return this.reportTelemetry(e,t),s.then(o=>{if(o){this.invoke(n,o,t,i);const a=t.getSelection();a&&n.reveal(a.getStartPosition())}})}getSelectedLines(e){let t=e.getSelections();return t?t.map(i=>i.startLineNumber):[]}getLineNumbers(e,t){return e&&e.selectionLines?e.selectionLines.map(i=>i+1):this.getSelectedLines(t)}run(e,t){}}function $8(r){if(!On(r)){if(!er(r))return!1;const e=r;if(!On(e.levels)&&!vh(e.levels)||!On(e.direction)&&!ys(e.direction)||!On(e.selectionLines)&&(!C2(e.selectionLines)||!e.selectionLines.every(vh)))return!1}return!0}class Wfe extends rr{constructor(){super({id:"editor.unfold",label:m("unfoldAction.label","Unfold"),alias:"Unfold",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|89,mac:{primary:2048|512|89},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: - * 'levels': Number of levels to unfold. If not set, defaults to 1. - * 'direction': If 'up', unfold given number of levels up otherwise unfolds down. - * 'selectionLines': 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. - `,constraint:$8,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){let s=n&&n.levels||1,o=this.getLineNumbers(n,i);n&&n.direction==="up"?O8(t,!1,s,o):hg(t,!1,s,o)}}class Vfe extends rr{constructor(){super({id:"editor.unfoldRecursively",label:m("unFoldRecursivelyAction.label","Unfold Recursively"),alias:"Unfold Recursively",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|89),weight:100}})}invoke(e,t,i,n){hg(t,!1,Number.MAX_VALUE,this.getSelectedLines(i))}}class Hfe extends rr{constructor(){super({id:"editor.fold",label:m("foldAction.label","Fold"),alias:"Fold",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|87,mac:{primary:2048|512|87},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: - * 'levels': Number of levels to fold. - * 'direction': If 'up', folds given number of levels up otherwise folds down. - * 'selectionLines': 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. - If no levels or direction is set, folds the region at the locations or if already collapsed, the first uncollapsed parent instead. - `,constraint:$8,schema:{type:"object",properties:{levels:{type:"number"},direction:{type:"string",enum:["up","down"]},selectionLines:{type:"array",items:{type:"number"}}}}}]}})}invoke(e,t,i,n){let s=this.getLineNumbers(n,i);const o=n&&n.levels,a=n&&n.direction;typeof o!="number"&&typeof a!="string"?vfe(t,!0,s):a==="up"?O8(t,!0,o||1,s):hg(t,!0,o||1,s)}}class zfe extends rr{constructor(){super({id:"editor.toggleFold",label:m("toggleFoldAction.label","Toggle Fold"),alias:"Toggle Fold",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|42),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);bfe(t,1,n)}}class $fe extends rr{constructor(){super({id:"editor.foldRecursively",label:m("foldRecursivelyAction.label","Fold Recursively"),alias:"Fold Recursively",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|87),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);hg(t,!0,Number.MAX_VALUE,n)}}class Ufe extends rr{constructor(){super({id:"editor.foldAllBlockComments",label:m("foldAllBlockComments.label","Fold All Block Comments"),alias:"Fold All Block Comments",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|85),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())YT(t,io.Comment.value,!0);else{const n=i.getModel();if(!n)return;let s=ze.getComments(n.getLanguageIdentifier().id);if(s&&s.blockCommentStartToken){let o=new RegExp("^\\s*"+Cs(s.blockCommentStartToken));ZT(t,o,!0)}}}}class jfe extends rr{constructor(){super({id:"editor.foldAllMarkerRegions",label:m("foldAllMarkerRegions.label","Fold All Regions"),alias:"Fold All Regions",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|29),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())YT(t,io.Region.value,!0);else{const n=i.getModel();if(!n)return;let s=ze.getFoldingRules(n.getLanguageIdentifier().id);if(s&&s.markers&&s.markers.start){let o=new RegExp(s.markers.start);ZT(t,o,!0)}}}}class Kfe extends rr{constructor(){super({id:"editor.unfoldAllMarkerRegions",label:m("unfoldAllMarkerRegions.label","Unfold All Regions"),alias:"Unfold All Regions",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|30),weight:100}})}invoke(e,t,i){if(t.regions.hasTypes())YT(t,io.Region.value,!1);else{const n=i.getModel();if(!n)return;let s=ze.getFoldingRules(n.getLanguageIdentifier().id);if(s&&s.markers&&s.markers.start){let o=new RegExp(s.markers.start);ZT(t,o,!1)}}}}class qfe extends rr{constructor(){super({id:"editor.foldAllExcept",label:m("foldAllExcept.label","Fold All Regions Except Selected"),alias:"Fold All Regions Except Selected",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|83),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);F8(t,!0,n)}}class Gfe extends rr{constructor(){super({id:"editor.unfoldAllExcept",label:m("unfoldAllExcept.label","Unfold All Regions Except Selected"),alias:"Unfold All Regions Except Selected",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|81),weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);F8(t,!1,n)}}class Zfe extends rr{constructor(){super({id:"editor.foldAll",label:m("foldAllAction.label","Fold All"),alias:"Fold All",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|21),weight:100}})}invoke(e,t,i){hg(t,!0)}}class Yfe extends rr{constructor(){super({id:"editor.unfoldAll",label:m("unfoldAllAction.label","Unfold All"),alias:"Unfold All",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|40),weight:100}})}invoke(e,t,i){hg(t,!1)}}class Uu extends rr{getFoldingLevel(){return parseInt(this.id.substr(Uu.ID_PREFIX.length))}invoke(e,t,i){Cfe(t,this.getFoldingLevel(),!0,this.getSelectedLines(i))}}Uu.ID_PREFIX="editor.foldLevel";Uu.ID=r=>Uu.ID_PREFIX+r;class Xfe extends rr{constructor(){super({id:"editor.gotoParentFold",label:m("gotoParentFold.label","Go to Parent Fold"),alias:"Go to Parent Fold",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=wfe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Qfe extends rr{constructor(){super({id:"editor.gotoPreviousFold",label:m("gotoPreviousFold.label","Go to Previous Folding Range"),alias:"Go to Previous Folding Range",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=yfe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}class Jfe extends rr{constructor(){super({id:"editor.gotoNextFold",label:m("gotoNextFold.label","Go to Next Folding Range"),alias:"Go to Next Folding Range",precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,weight:100}})}invoke(e,t,i){let n=this.getSelectedLines(i);if(n.length>0){let s=Sfe(n[0],t);s!==null&&i.setSelection({startLineNumber:s,startColumn:1,endLineNumber:s,endColumn:1})}}}wt(ug.ID,ug);me(Wfe);me(Vfe);me(Hfe);me($fe);me(Zfe);me(Yfe);me(Ufe);me(jfe);me(Kfe);me(qfe);me(Gfe);me(zfe);me(Xfe);me(Qfe);me(Jfe);for(let r=1;r<=7;r++)lO(new Uu({id:Uu.ID(r),label:m("foldLevelAction.label","Fold Level {0}",r),alias:`Fold Level ${r}`,precondition:zn,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|21+r),weight:100}}));const ege=V("editor.foldBackground",{light:Ht(ac,.3),dark:Ht(ac,.3),hc:null},m("foldBackgroundBackground","Background color behind folded ranges. The color must not be opaque so as not to hide underlying decorations."),!0),tge=V("editorGutter.foldingControlForeground",{dark:Hk,light:Hk,hc:Hk},m("editorGutter.foldingControlForeground","Color of the folding control in the editor gutter."));Lt((r,e)=>{const t=r.getColor(ege);t&&e.addRule(`.monaco-editor .folded-background { background-color: ${t}; }`);const i=r.getColor(tge);i&&e.addRule(` - .monaco-editor .cldr${Gt.asCSSSelector(XT)}, - .monaco-editor .cldr${Gt.asCSSSelector(QT)} { - color: ${i} !important; - } - `)});class ige extends Se{constructor(){super({id:"editor.action.fontZoomIn",label:m("EditorFontZoomIn.label","Editor Font Zoom In"),alias:"Editor Font Zoom In",precondition:void 0})}run(e,t){Fa.setZoomLevel(Fa.getZoomLevel()+1)}}class nge extends Se{constructor(){super({id:"editor.action.fontZoomOut",label:m("EditorFontZoomOut.label","Editor Font Zoom Out"),alias:"Editor Font Zoom Out",precondition:void 0})}run(e,t){Fa.setZoomLevel(Fa.getZoomLevel()-1)}}class rge extends Se{constructor(){super({id:"editor.action.fontZoomReset",label:m("EditorFontZoomReset.label","Editor Font Zoom Reset"),alias:"Editor Font Zoom Reset",precondition:void 0})}run(e,t){Fa.setZoomLevel(0)}}me(ige);me(nge);me(rge);var U8=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},j8=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},JT=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let W_=class{constructor(e,t){this._workerService=t,this._callOnDispose=new le,this._callOnModel=new le,this._editor=e,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(Pv.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){if(this._callOnModel.clear(),!this._editor.getOption(48)||!this._editor.hasModel())return;const e=this._editor.getModel(),[t]=Pv.ordered(e);if(!t||!t.autoFormatTriggerCharacters)return;let i=new Zd;for(let n of t.autoFormatTriggerCharacters)i.add(n.charCodeAt(0));this._callOnModel.add(this._editor.onDidType(n=>{let s=n.charCodeAt(n.length-1);i.has(s)&&this._trigger(String.fromCharCode(s))}))}_trigger(e){if(!this._editor.hasModel()||this._editor.getSelections().length>1)return;const t=this._editor.getModel(),i=this._editor.getPosition();let n=!1;const s=this._editor.onDidChangeModelContent(o=>{if(o.isFlush){n=!0,s.dispose();return}for(let a=0,l=o.changes.length;a<l;a++)if(o.changes[a].range.endLineNumber<=i.lineNumber){n=!0,s.dispose();return}});I3(this._workerService,t,i,e,t.getFormattingOptions()).then(o=>{s.dispose(),!n&&gr(o)&&(zf.execute(this._editor,o,!0),qI(o))},o=>{throw s.dispose(),o})}};W_.ID="editor.contrib.autoFormat";W_=U8([j8(1,ks)],W_);let V_=class{constructor(e,t){this.editor=e,this._instantiationService=t,this._callOnDispose=new le,this._callOnModel=new le,this._callOnDispose.add(e.onDidChangeConfiguration(()=>this._update())),this._callOnDispose.add(e.onDidChangeModel(()=>this._update())),this._callOnDispose.add(e.onDidChangeModelLanguage(()=>this._update())),this._callOnDispose.add(ro.onDidChange(this._update,this))}dispose(){this._callOnDispose.dispose(),this._callOnModel.dispose()}_update(){this._callOnModel.clear(),!!this.editor.getOption(47)&&(!this.editor.hasModel()||!ro.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(E3,this.editor,e,2,su.None,et.None).catch(Oe)}};V_.ID="editor.contrib.formatOnPaste";V_=U8([j8(1,ut)],V_);class sge extends Se{constructor(){super({id:"editor.action.formatDocument",label:m("formatDocument.label","Format Document"),alias:"Format Document",precondition:_e.and(R.notInCompositeEditor,R.writable,R.hasDocumentFormattingProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|36,linux:{primary:2048|1024|39},weight:100},contextMenuOpts:{group:"1_modification",order:1.3}})}run(e,t){return JT(this,void 0,void 0,function*(){if(t.hasModel()){const i=e.get(ut);yield e.get(rl).showWhile(i.invokeFunction(Hoe,t,1,su.None,et.None),250)}})}}class oge extends Se{constructor(){super({id:"editor.action.formatSelection",label:m("formatSelection.label","Format Selection"),alias:"Format Selection",precondition:_e.and(R.writable,R.hasDocumentSelectionFormattingProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|36),weight:100},contextMenuOpts:{when:R.hasNonEmptySelection,group:"1_modification",order:1.31}})}run(e,t){return JT(this,void 0,void 0,function*(){if(!t.hasModel())return;const i=e.get(ut),n=t.getModel(),s=t.getSelections().map(a=>a.isEmpty()?new k(a.startLineNumber,1,a.startLineNumber,n.getLineMaxColumn(a.startLineNumber)):a);yield e.get(rl).showWhile(i.invokeFunction(E3,t,s,1,su.None,et.None),250)})}}wt(W_.ID,W_);wt(V_.ID,V_);me(sge);me(oge);lt.registerCommand("editor.action.format",r=>JT(void 0,void 0,void 0,function*(){const e=r.get(Ct).getFocusedCodeEditor();if(!e||!e.hasModel())return;const t=r.get(fi);e.getSelection().isEmpty()?yield t.executeCommand("editor.action.formatDocument"):yield t.executeCommand("editor.action.formatSelection")}));class dg{remove(){this.parent&&this.parent.children.delete(this.id)}static findId(e,t){let i;typeof e=="string"?i=`${t.id}/${e}`:(i=`${t.id}/${e.name}`,t.children.get(i)!==void 0&&(i=`${t.id}/${e.name}_${e.range.startLineNumber}_${e.range.startColumn}`));let n=i;for(let s=0;t.children.get(n)!==void 0;s++)n=`${i}_${s}`;return n}static empty(e){return e.children.size===0}}class K8 extends dg{constructor(e,t,i){super();this.id=e,this.parent=t,this.symbol=i,this.children=new Map}}class age extends dg{constructor(e,t,i,n){super();this.id=e,this.parent=t,this.label=i,this.order=n,this.children=new Map}}class $n extends dg{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}static create(e,t){let i=this._keys.for(e,!0),n=$n._requests.get(i);if(!n){let s=new Rn;n={promiseCnt:0,source:s,promise:$n._create(e,s.token),model:void 0},$n._requests.set(i,n);const o=Date.now();n.promise.then(()=>{this._requestDurations.update(e,Date.now()-o)})}return n.model?Promise.resolve(n.model):(n.promiseCnt+=1,t.onCancellationRequested(()=>{--n.promiseCnt==0&&(n.source.cancel(),$n._requests.delete(i))}),new Promise((s,o)=>{n.promise.then(a=>{n.model=a,s(a)},a=>{$n._requests.delete(i),o(a)})}))}static _create(e,t){const i=new Rn(t),n=new $n(e.uri),s=xs.ordered(e),o=s.map((l,c)=>{var h;let u=dg.findId(`provider_${c}`,n),d=new age(u,n,(h=l.displayName)!==null&&h!==void 0?h:"Unknown Outline Provider",c);return Promise.resolve(l.provideDocumentSymbols(e,i.token)).then(f=>{for(const g of f||[])$n._makeOutlineElement(g,d);return d},f=>($i(f),d)).then(f=>{dg.empty(f)?f.remove():n._groups.set(u,f)})}),a=xs.onDidChange(()=>{const l=xs.ordered(e);Is(l,s)||i.cancel()});return Promise.all(o).then(()=>i.token.isCancellationRequested&&!t.isCancellationRequested?$n._create(e,t):n._compact()).finally(()=>{a.dispose()})}static _makeOutlineElement(e,t){let i=dg.findId(e,t),n=new K8(i,t,e);if(e.children)for(const s of e.children)$n._makeOutlineElement(s,n);t.children.set(n.id,n)}_compact(){let e=0;for(const[t,i]of this._groups)i.children.size===0?this._groups.delete(t):e+=1;if(e!==1)this.children=this._groups;else{let t=at.first(this._groups.values());for(let[,i]of t.children)i.parent=this,this.children.set(i.id,i)}return this}getTopLevelSymbols(){const e=[];for(const t of this.children.values())t instanceof K8?e.push(t.symbol):e.push(...at.map(t.children.values(),i=>i.symbol));return e.sort((t,i)=>k.compareRangesUsingStarts(t.range,i.range))}asListOfDocumentSymbols(){const e=this.getTopLevelSymbols(),t=[];return $n._flattenDocumentSymbols(t,e,""),t.sort((i,n)=>k.compareRangesUsingStarts(i.range,n.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&&$n._flattenDocumentSymbols(e,n.children,n.name)}}$n._requestDurations=new kv(xs,350);$n._requests=new $l(9,.75);$n._keys=new class{constructor(){this._counter=1,this._data=new WeakMap}for(r,e){return`${r.id}/${e?r.getVersionId():""}/${this._hash(xs.all(r))}`}_hash(r){let e="";for(const t of r){let i=this._data.get(t);typeof i=="undefined"&&(i=this._counter++,this._data.set(t,i)),e+=i}return e}};var q8=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function G8(r,e,t){return q8(this,void 0,void 0,function*(){const i=yield $n.create(r,t);return e?i.asListOfDocumentSymbols():i.getTopLevelSymbols()})}lt.registerCommand("_executeDocumentSymbolProvider",function(r,...e){return q8(this,void 0,void 0,function*(){const[t]=e;Nt(Ie.isUri(t));const i=r.get(gi).getModel(t);if(i)return G8(i,!1,et.None);const n=yield r.get(so).createModelReference(t);try{return yield G8(n.object.textEditorModel,!1,et.None)}finally{n.dispose()}})});function Sr(r,e){let t=0;for(let i=0;i<r.length;i++)r.charAt(i)===" "?t+=e:t++;return t}function H_(r,e,t){r=r<0?0:r;let i="";if(!t){let n=Math.floor(r/e);r=r%e;for(let s=0;s<n;s++)i+=" "}for(let n=0;n<r;n++)i+=" ";return i}function Z8(r,e,t,i){if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return[];let n=ze.getIndentationRules(r.getLanguageIdentifier().id);if(!n)return[];for(t=Math.min(t,r.getLineCount());e<=t&&n.unIndentedLinePattern;){let p=r.getLineContent(e);if(!n.unIndentedLinePattern.test(p))break;e++}if(e>t-1)return[];const{tabSize:s,indentSize:o,insertSpaces:a}=r.getOptions(),l=(p,_)=>(_=_||1,Wr.shiftIndent(p,p.length+_,s,o,a)),c=(p,_)=>(_=_||1,Wr.unshiftIndent(p,p.length+_,s,o,a));let h=[],u,d=r.getLineContent(e),f=d;if(i!=null){u=i;let p=Dt(d);f=u+d.substring(p.length),n.decreaseIndentPattern&&n.decreaseIndentPattern.test(f)&&(u=c(u),f=u+d.substring(p.length)),d!==f&&h.push(ci.replaceMove(new be(e,1,e,p.length+1),Ti.normalizeIndentation(u,o,a)))}else u=Dt(d);let g=u;n.increaseIndentPattern&&n.increaseIndentPattern.test(f)?(g=l(g),u=l(u)):n.indentNextLinePattern&&n.indentNextLinePattern.test(f)&&(g=l(g)),e++;for(let p=e;p<=t;p++){let _=r.getLineContent(p),v=Dt(_),b=g+_.substring(v.length);n.decreaseIndentPattern&&n.decreaseIndentPattern.test(b)&&(g=c(g),u=c(u)),v!==g&&h.push(ci.replaceMove(new be(p,1,p,v.length+1),Ti.normalizeIndentation(g,o,a))),!(n.unIndentedLinePattern&&n.unIndentedLinePattern.test(_))&&(n.increaseIndentPattern&&n.increaseIndentPattern.test(b)?(u=l(u),g=u):n.indentNextLinePattern&&n.indentNextLinePattern.test(b)?g=l(g):g=u)}return h}class Fy extends Se{constructor(){super({id:Fy.ID,label:m("indentationToSpaces","Convert Indentation to Spaces"),alias:"Convert Indentation to Spaces",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new uge(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!0})}}Fy.ID="editor.action.indentationToSpaces";class By extends Se{constructor(){super({id:By.ID,label:m("indentationToTabs","Convert Indentation to Tabs"),alias:"Convert Indentation to Tabs",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=i.getOptions(),s=t.getSelection();if(!s)return;const o=new dge(s,n.tabSize);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop(),i.updateOptions({insertSpaces:!1})}}By.ID="editor.action.indentationToTabs";class Y8 extends Se{constructor(e,t){super(t);this.insertSpaces=e}run(e,t){const i=e.get(kc),n=e.get(gi);let s=t.getModel();if(!s)return;let o=n.getCreationOptions(s.getLanguageIdentifier().language,s.uri,s.isForSimpleWidget);const a=[1,2,3,4,5,6,7,8].map(c=>({id:c.toString(),label:c.toString(),description:c===o.tabSize?m("configuredTabSize","Configured Tab Size"):void 0})),l=Math.min(s.getOptions().tabSize-1,7);setTimeout(()=>{i.pick(a,{placeHolder:m({key:"selectTabWidth",comment:["Tab corresponds to the tab key"]},"Select Tab Size for Current File"),activeItem:a[l]}).then(c=>{c&&s&&!s.isDisposed()&&s.updateOptions({tabSize:parseInt(c.label,10),insertSpaces:this.insertSpaces})})},50)}}class Wy extends Y8{constructor(){super(!1,{id:Wy.ID,label:m("indentUsingTabs","Indent Using Tabs"),alias:"Indent Using Tabs",precondition:void 0})}}Wy.ID="editor.action.indentUsingTabs";class Vy extends Y8{constructor(){super(!0,{id:Vy.ID,label:m("indentUsingSpaces","Indent Using Spaces"),alias:"Indent Using Spaces",precondition:void 0})}}Vy.ID="editor.action.indentUsingSpaces";class Hy extends Se{constructor(){super({id:Hy.ID,label:m("detectIndentation","Detect Indentation from Content"),alias:"Detect Indentation from Content",precondition:void 0})}run(e,t){const i=e.get(gi);let n=t.getModel();if(!n)return;let s=i.getCreationOptions(n.getLanguageIdentifier().language,n.uri,n.isForSimpleWidget);n.detectIndentation(s.insertSpaces,s.tabSize)}}Hy.ID="editor.action.detectIndentation";class lge extends Se{constructor(){super({id:"editor.action.reindentlines",label:m("editor.reindentlines","Reindent Lines"),alias:"Reindent Lines",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=Z8(i,1,i.getLineCount());n.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,n),t.pushUndoStop())}}class cge extends Se{constructor(){super({id:"editor.action.reindentselectedlines",label:m("editor.reindentselectedlines","Reindent Selected Lines"),alias:"Reindent Selected Lines",precondition:R.writable})}run(e,t){let i=t.getModel();if(!i)return;let n=t.getSelections();if(n===null)return;let s=[];for(let o of n){let a=o.startLineNumber,l=o.endLineNumber;if(a!==l&&o.endColumn===1&&l--,a===1){if(a===l)continue}else a--;let c=Z8(i,a,l);s.push(...c)}s.length>0&&(t.pushUndoStop(),t.executeEdits(this.id,s),t.pushUndoStop())}}class hge{constructor(e,t){this._initialSelection=t,this._edits=[],this._selectionId=null;for(let i of e)i.range&&typeof i.text=="string"&&this._edits.push(i)}getEditOperations(e,t){for(let n of this._edits)t.addEditOperation(k.lift(n.range),n.text);let i=!1;Array.isArray(this._edits)&&this._edits.length===1&&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)}}class eA{constructor(e){this.callOnDispose=new le,this.callOnModel=new le,this.editor=e,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(9)<4||this.editor.getOption(47))&&(!this.editor.hasModel()||this.callOnModel.add(this.editor.onDidPaste(({range:e})=>{this.trigger(e)})))}trigger(e){let t=this.editor.getSelections();if(t===null||t.length>1)return;const i=this.editor.getModel();if(!i||!i.isCheapToTokenize(e.getStartPosition().lineNumber))return;const n=this.editor.getOption(9),{tabSize:s,indentSize:o,insertSpaces:a}=i.getOptions();let l=[],c={shiftIndent:f=>Wr.shiftIndent(f,f.length+1,s,o,a),unshiftIndent:f=>Wr.unshiftIndent(f,f.length+1,s,o,a)},h=e.startLineNumber;for(;h<=e.endLineNumber;){if(this.shouldIgnoreLine(i,h)){h++;continue}break}if(h>e.endLineNumber)return;let u=i.getLineContent(h);if(!/\S/.test(u.substring(0,e.startColumn-1))){let f=ze.getGoodIndentForLine(n,i,i.getLanguageIdentifier().id,h,c);if(f!==null){let g=Dt(u),p=Sr(f,s),_=Sr(g,s);if(p!==_){let v=H_(p,s,a);l.push({range:new k(h,1,h,g.length+1),text:v}),u=v+u.substr(g.length)}else{let v=ze.getIndentMetadata(i,h);if(v===0||v===8)return}}}const d=h;for(;h<e.endLineNumber;){if(!/\S/.test(i.getLineContent(h+1))){h++;continue}break}if(h!==e.endLineNumber){let f={getLineTokens:p=>i.getLineTokens(p),getLanguageIdentifier:()=>i.getLanguageIdentifier(),getLanguageIdAtPosition:(p,_)=>i.getLanguageIdAtPosition(p,_),getLineContent:p=>p===d?u:i.getLineContent(p)},g=ze.getGoodIndentForLine(n,f,i.getLanguageIdentifier().id,h+1,c);if(g!==null){let p=Sr(g,s),_=Sr(Dt(i.getLineContent(h+1)),s);if(p!==_){let v=p-_;for(let b=h+1;b<=e.endLineNumber;b++){let C=i.getLineContent(b),y=Dt(C),S=Sr(y,s)+v,w=H_(S,s,a);w!==y&&l.push({range:new k(b,1,b,y.length+1),text:w})}}}}if(l.length>0){this.editor.pushUndoStop();let f=new hge(l,this.editor.getSelection());this.editor.executeCommand("autoIndentOnPaste",f),this.editor.pushUndoStop()}}shouldIgnoreLine(e,t){e.forceTokenization(t);let i=e.getLineFirstNonWhitespaceColumn(t);if(i===0)return!0;let n=e.getLineTokens(t);if(n.getCount()>0){let s=n.findTokenIndexAtOffset(i);if(s>=0&&n.getStandardTokenType(s)===1)return!0}return!1}dispose(){this.callOnDispose.dispose(),this.callOnModel.dispose()}}eA.ID="editor.contrib.autoIndentOnPaste";function X8(r,e,t,i){if(r.getLineCount()===1&&r.getLineMaxColumn(1)===1)return;let n="";for(let o=0;o<t;o++)n+=" ";let s=new RegExp(n,"gi");for(let o=1,a=r.getLineCount();o<=a;o++){let l=r.getLineFirstNonWhitespaceColumn(o);if(l===0&&(l=r.getLineMaxColumn(o)),l===1)continue;const c=new k(o,1,o,l),h=r.getValueInRange(c),u=i?h.replace(/\t/ig,n):h.replace(s," ");e.addEditOperation(c,u)}}class uge{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),X8(e,t,this.tabSize,!0)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}class dge{constructor(e,t){this.selection=e,this.tabSize=t,this.selectionId=null}getEditOperations(e,t){this.selectionId=t.trackSelection(this.selection),X8(e,t,this.tabSize,!1)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}}wt(eA.ID,eA);me(Fy);me(By);me(Wy);me(Vy);me(Hy);me(lge);me(cge);var fge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gge=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},zy=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const pge=1500;function Q8(r,e,t){return zy(this,void 0,void 0,function*(){const i=[],s=Kl.ordered(r).reverse().map(o=>e.map(a=>zy(this,void 0,void 0,function*(){try{const l=yield o.provideInlayHints(r,a,t);(l==null?void 0:l.length)&&i.push(l.filter(c=>a.containsPosition(c.position)))}catch(l){$i(l)}})));return yield Promise.all(s.flat()),i.flat().sort((o,a)=>$.compare(o.position,a.position))})}class $y{constructor(){this._entries=new $l(50)}get(e){const t=$y._key(e);return this._entries.get(t)}set(e,t){const i=$y._key(e);this._entries.set(i,t)}static _key(e){return`${e.uri.toString()}/${e.getVersionId()}`}}let fg=class J8{constructor(e,t){this._editor=e,this._codeEditorService=t,this._decorationOwnerId=++J8._decorationOwnerIdPool,this._disposables=new le,this._sessionDisposables=new le,this._getInlayHintsDelays=new kv(Kl,25,500),this._cache=new $y,this._decorations=new Map,this._disposables.add(Kl.onDidChange(()=>this._update())),this._disposables.add(e.onDidChangeModel(()=>this._update())),this._disposables.add(e.onDidChangeModelLanguage(()=>this._update())),this._disposables.add(e.onDidChangeConfiguration(i=>{i.hasChanged(125)&&this._update()})),this._update()}dispose(){this._sessionDisposables.dispose(),this._removeAllDecorations(),this._disposables.dispose()}_update(){if(this._sessionDisposables.clear(),this._removeAllDecorations(),!this._editor.getOption(125).enabled)return;const e=this._editor.getModel();if(!e||!Kl.has(e))return;const t=this._cache.get(e);t&&this._updateHintsDecorators([e.getFullModelRange()],t);const i=new Bt(()=>zy(this,void 0,void 0,function*(){const s=Date.now(),o=new Rn;this._sessionDisposables.add(Xe(()=>o.dispose(!0)));const a=this._getHintsRanges(),l=yield Q8(e,a,o.token);i.delay=this._getInlayHintsDelays.update(e,Date.now()-s),!o.token.isCancellationRequested&&(this._updateHintsDecorators(a,l),this._cache.set(e,Array.from(this._decorations.values()).map(c=>c.hint)))}),this._getInlayHintsDelays.get(e));this._sessionDisposables.add(i),this._sessionDisposables.add(this._editor.onDidChangeModelContent(()=>i.schedule())),this._disposables.add(this._editor.onDidScrollChange(()=>i.schedule())),i.schedule();const n=new le;this._sessionDisposables.add(n);for(const s of Kl.all(e))typeof s.onDidChangeInlayHints=="function"&&n.add(s.onDidChangeInlayHints(()=>i.schedule()))}_getHintsRanges(){const e=30,t=this._editor.getModel(),i=this._editor.getVisibleRangesPlusViewportAboveBelow(),n=[];for(const s of i.sort(k.compareRangesUsingStarts)){const o=t.validateRange(new k(s.startLineNumber-e,s.startColumn,s.endLineNumber+e,s.endColumn));n.length===0||!k.areIntersectingOrTouching(n[n.length-1],o)?n.push(o):n[n.length-1]=k.plusRange(n[n.length-1],o)}return n}_updateHintsDecorators(e,t){const{fontSize:i,fontFamily:n}=this._getLayoutInfo(),s=this._editor.getModel(),o=[],a=[],l="--code-editorInlayHintsFontFamily";this._editor.getContainerDomNode().style.setProperty(l,n);for(const u of t){const{text:d,position:f,whitespaceBefore:g,whitespaceAfter:p}=u,_=g?i/3|0:0,v=p?i/3|0:0,b={contentText:mge(d),fontSize:`${i}px`,margin:`0px ${v}px 0px ${_}px`,fontFamily:`var(${l})`,padding:`1px ${Math.max(1,i/4)|0}px`,borderRadius:`${i/4|0}px`,verticalAlign:"middle",backgroundColor:ui(zh),color:ui(Hh)};u.kind===Ev.Parameter?(b.backgroundColor=ui(lX),b.color=ui(aX)):u.kind===Ev.Type&&(b.backgroundColor=ui(oX),b.color=ui(sX));let C={beforeInjectedText:Object.assign(Object.assign({},b),{affectsLetterSpacing:!0})},y=k.fromPositions(f),x=s.getWordAtPosition(f),S=!1;x&&(x.endColumn===f.column?(C.afterInjectedText=C.beforeInjectedText,C.beforeInjectedText=void 0,S=!0,y=e7(x,f.lineNumber)):x.startColumn===f.column&&(S=!0,y=e7(x,f.lineNumber)));const w="inlayHints-"+ux(C).toString(16);if(this._codeEditorService.registerDecorationType("inlay-hints-controller",w,C,void 0,this._editor),o.push(w),a.push({range:y,options:Object.assign(Object.assign({},this._codeEditorService.resolveDecorationOptions(w,!0)),{showIfCollapsed:!S,stickiness:0})})>pge)break}const c=[];for(const u of e)for(const{id:d}of s.getDecorationsInRange(u,this._decorationOwnerId,!0)){const f=this._decorations.get(d);f&&(c.push(d),this._codeEditorService.removeDecorationType(f.decorationTypeId),this._decorations.delete(d))}const h=s.deltaDecorations(c,a,this._decorationOwnerId);for(let u=0;u<h.length;u++)this._decorations.set(h[u],{hint:t[u],decorationTypeId:o[u]})}_getLayoutInfo(){const e=this._editor.getOption(125),t=this._editor.getOption(45);let i=e.fontSize;(!i||i<5||i>t)&&(i=t*.9|0);const n=e.fontFamily||this._editor.getOption(42);return{fontSize:i,fontFamily:n}}_removeAllDecorations(){this._editor.deltaDecorations(Array.from(this._decorations.keys()),[]);for(let e of this._decorations.values())this._codeEditorService.removeDecorationType(e.decorationTypeId);this._decorations.clear()}};fg.ID="editor.contrib.InlayHints";fg._decorationOwnerIdPool=0;fg=fge([gge(1,Ct)],fg);function e7(r,e){return new k(e,r.startColumn,e,r.endColumn)}function mge(r){const e="\xA0";return r.replace(/[ \t]/g,e)}wt(fg.ID,fg);lt.registerCommand("_executeInlayHintProvider",(r,...e)=>zy(void 0,void 0,void 0,function*(){const[t,i]=e;Nt(Ie.isUri(t)),Nt(k.isIRange(i));const n=yield r.get(so).createModelReference(t);try{return yield Q8(n.object.textEditorModel,[k.lift(i)],et.None)}finally{n.dispose()}}));class _ge{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 n=t.getInverseEditOperations()[0].range;return this._originalSelection.isEmpty()?new be(n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn),n.endLineNumber,Math.min(this._originalSelection.positionColumn,n.endColumn)):new be(n.endLineNumber,n.endColumn-this._text.length,n.endLineNumber,n.endColumn)}}var bge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},vge=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Wc=class tA{constructor(e,t){this.decorationIds=[],this.editor=e,this.editorWorkerService=t}static get(e){return e.getContribution(tA.ID)}dispose(){}run(e,t){this.currentRequest&&this.currentRequest.cancel();const i=this.editor.getSelection(),n=this.editor.getModel();if(!n||!i)return;let s=i;if(s.startLineNumber!==s.endLineNumber)return;const o=new Im(this.editor,1|4),a=n.uri;return this.editorWorkerService.canNavigateValueSet(a)?(this.currentRequest=Oi(l=>this.editorWorkerService.navigateValueSet(a,s,t)),this.currentRequest.then(l=>{if(!l||!l.range||!l.value||!o.validate(this.editor))return;let c=k.lift(l.range),h=l.range,u=l.value.length-(s.endColumn-s.startColumn);h={startLineNumber:h.startLineNumber,startColumn:h.startColumn,endLineNumber:h.endLineNumber,endColumn:h.startColumn+l.value.length},u>1&&(s=new be(s.startLineNumber,s.startColumn,s.endLineNumber,s.endColumn+u-1));const d=new _ge(c,s,l.value);this.editor.pushUndoStop(),this.editor.executeCommand(e,d),this.editor.pushUndoStop(),this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[{range:h,options:tA.DECORATION}]),this.decorationRemover&&this.decorationRemover.cancel(),this.decorationRemover=Hl(350),this.decorationRemover.then(()=>this.decorationIds=this.editor.deltaDecorations(this.decorationIds,[])).catch(Oe)}).catch(Oe)):Promise.resolve(void 0)}};Wc.ID="editor.contrib.inPlaceReplaceController";Wc.DECORATION=Ke.register({description:"in-place-replace",className:"valueSetReplacement"});Wc=bge([vge(1,ks)],Wc);class Cge extends Se{constructor(){super({id:"editor.action.inPlaceReplace.up",label:m("InPlaceReplaceAction.previous.label","Replace with Previous Value"),alias:"Replace with Previous Value",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|82,weight:100}})}run(e,t){const i=Wc.get(t);return i?i.run(this.id,!0):Promise.resolve(void 0)}}class wge extends Se{constructor(){super({id:"editor.action.inPlaceReplace.down",label:m("InPlaceReplaceAction.next.label","Replace with Next Value"),alias:"Replace with Next Value",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|84,weight:100}})}run(e,t){const i=Wc.get(t);return i?i.run(this.id,!1):Promise.resolve(void 0)}}wt(Wc.ID,Wc);me(Cge);me(wge);Lt((r,e)=>{const t=r.getColor(lF);t&&e.addRule(`.monaco-editor.vs .valueSetReplacement { outline: solid 2px ${t}; }`)});class yge{constructor(e,t){this._selection=e,this._cursors=t,this._selectionId=null}getEditOperations(e,t){let i=Sge(e,this._cursors);for(let n=0,s=i.length;n<s;n++){let o=i[n];t.addEditOperation(o.range,o.text)}this._selectionId=t.trackSelection(this._selection)}computeCursorState(e,t){return t.getTrackedSelection(this._selectionId)}}function Sge(r,e){e.sort((o,a)=>o.lineNumber===a.lineNumber?o.column-a.column:o.lineNumber-a.lineNumber);for(let o=e.length-2;o>=0;o--)e[o].lineNumber===e[o+1].lineNumber&&e.splice(o,1);let t=[],i=0,n=0,s=e.length;for(let o=1,a=r.getLineCount();o<=a;o++){let l=r.getLineContent(o),c=l.length+1,h=0;if(n<s&&e[n].lineNumber===o&&(h=e[n].column,n++,h===c)||l.length===0)continue;let u=Wo(l),d=0;if(u===-1)d=1;else if(u!==l.length-1)d=u+2;else continue;d=Math.max(h,d),t[i++]=ci.delete(new k(o,d,o,c))}return t}class t7{constructor(e,t,i){this._selection=e,this._isCopyingDown=t,this._noop=i||!1,this._selectionDirection=0,this._selectionId=null,this._startLineNumberDelta=0,this._endLineNumberDelta=0}getEditOperations(e,t){let i=this._selection;this._startLineNumberDelta=0,this._endLineNumberDelta=0,i.startLineNumber<i.endLineNumber&&i.endColumn===1&&(this._endLineNumberDelta=1,i=i.setEndPosition(i.endLineNumber-1,e.getLineMaxColumn(i.endLineNumber-1)));let n=[];for(let o=i.startLineNumber;o<=i.endLineNumber;o++)n.push(e.getLineContent(o));const s=n.join(` -`);s===""&&this._isCopyingDown&&(this._startLineNumberDelta++,this._endLineNumberDelta++),this._noop?t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber+1,1),i.endLineNumber===e.getLineCount()?"":` -`):this._isCopyingDown?t.addEditOperation(new k(i.startLineNumber,1,i.startLineNumber,1),s+` -`):t.addEditOperation(new k(i.endLineNumber,e.getLineMaxColumn(i.endLineNumber),i.endLineNumber,e.getLineMaxColumn(i.endLineNumber)),` -`+s),this._selectionId=t.trackSelection(i),this._selectionDirection=this._selection.getDirection()}computeCursorState(e,t){let i=t.getTrackedSelection(this._selectionId);if(this._startLineNumberDelta!==0||this._endLineNumberDelta!==0){let n=i.startLineNumber,s=i.startColumn,o=i.endLineNumber,a=i.endColumn;this._startLineNumberDelta!==0&&(n=n+this._startLineNumberDelta,s=1),this._endLineNumberDelta!==0&&(o=o+this._endLineNumberDelta,a=1),i=be.createWithDirection(n,s,o,a,this._selectionDirection)}return i}}class Lge{constructor(e,t,i){this._selection=e,this._isMovingDown=t,this._autoIndent=i,this._selectionId=null,this._moveEndLineSelectionShrink=!1}getEditOperations(e,t){let i=e.getLineCount();if(this._isMovingDown&&this._selection.endLineNumber===i){this._selectionId=t.trackSelection(this._selection);return}if(!this._isMovingDown&&this._selection.startLineNumber===1){this._selectionId=t.trackSelection(this._selection);return}this._moveEndPositionDown=!1;let n=this._selection;n.startLineNumber<n.endLineNumber&&n.endColumn===1&&(this._moveEndPositionDown=!0,n=n.setEndPosition(n.endLineNumber-1,e.getLineMaxColumn(n.endLineNumber-1)));const{tabSize:s,indentSize:o,insertSpaces:a}=e.getOptions();let l=this.buildIndentConverter(s,o,a),c={getLineTokens:h=>e.getLineTokens(h),getLanguageIdentifier:()=>e.getLanguageIdentifier(),getLanguageIdAtPosition:(h,u)=>e.getLanguageIdAtPosition(h,u),getLineContent:null};if(n.startLineNumber===n.endLineNumber&&e.getLineMaxColumn(n.startLineNumber)===1){let h=n.startLineNumber,u=this._isMovingDown?h+1:h-1;e.getLineMaxColumn(u)===1?t.addEditOperation(new k(1,1,1,1),null):(t.addEditOperation(new k(h,1,h,1),e.getLineContent(u)),t.addEditOperation(new k(u,1,u,e.getLineMaxColumn(u)),null)),n=new be(u,1,u,1)}else{let h,u;if(this._isMovingDown){h=n.endLineNumber+1,u=e.getLineContent(h),t.addEditOperation(new k(h-1,e.getLineMaxColumn(h-1),h,e.getLineMaxColumn(h)),null);let d=u;if(this.shouldAutoIndent(e,n)){let f=this.matchEnterRule(e,l,s,h,n.startLineNumber-1);if(f!==null){let p=Dt(e.getLineContent(h)),_=f+Sr(p,s);d=H_(_,s,a)+this.trimLeft(u)}else{c.getLineContent=_=>_===n.startLineNumber?e.getLineContent(h):e.getLineContent(_);let p=ze.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(h,1),n.startLineNumber,l);if(p!==null){let _=Dt(e.getLineContent(h)),v=Sr(p,s),b=Sr(_,s);v!==b&&(d=H_(v,s,a)+this.trimLeft(u))}}t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),d+` -`);let g=this.matchEnterRuleMovingDown(e,l,s,n.startLineNumber,h,d);if(g!==null)g!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,g);else{c.getLineContent=_=>_===n.startLineNumber?d:_>=n.startLineNumber+1&&_<=n.endLineNumber+1?e.getLineContent(_-1):e.getLineContent(_);let p=ze.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(h,1),n.startLineNumber+1,l);if(p!==null){const _=Dt(e.getLineContent(n.startLineNumber)),v=Sr(p,s),b=Sr(_,s);if(v!==b){const C=v-b;this.getIndentEditsOfMovingBlock(e,t,n,s,a,C)}}}}else t.addEditOperation(new k(n.startLineNumber,1,n.startLineNumber,1),d+` -`)}else if(h=n.startLineNumber-1,u=e.getLineContent(h),t.addEditOperation(new k(h,1,h+1,1),null),t.addEditOperation(new k(n.endLineNumber,e.getLineMaxColumn(n.endLineNumber),n.endLineNumber,e.getLineMaxColumn(n.endLineNumber)),` -`+u),this.shouldAutoIndent(e,n)){c.getLineContent=f=>f===h?e.getLineContent(n.startLineNumber):e.getLineContent(f);let d=this.matchEnterRule(e,l,s,n.startLineNumber,n.startLineNumber-2);if(d!==null)d!==0&&this.getIndentEditsOfMovingBlock(e,t,n,s,a,d);else{let f=ze.getGoodIndentForLine(this._autoIndent,c,e.getLanguageIdAtPosition(n.startLineNumber,1),h,l);if(f!==null){let g=Dt(e.getLineContent(n.startLineNumber)),p=Sr(f,s),_=Sr(g,s);if(p!==_){let v=p-_;this.getIndentEditsOfMovingBlock(e,t,n,s,a,v)}}}}}this._selectionId=t.trackSelection(n)}buildIndentConverter(e,t,i){return{shiftIndent:n=>Wr.shiftIndent(n,n.length+1,e,t,i),unshiftIndent:n=>Wr.unshiftIndent(n,n.length+1,e,t,i)}}parseEnterResult(e,t,i,n,s){if(s){let o=s.indentation;s.indentAction===pi.None||s.indentAction===pi.Indent?o=s.indentation+s.appendText:s.indentAction===pi.IndentOutdent?o=s.indentation:s.indentAction===pi.Outdent&&(o=t.unshiftIndent(s.indentation)+s.appendText);let a=e.getLineContent(n);if(this.trimLeft(a).indexOf(this.trimLeft(o))>=0){let l=Dt(e.getLineContent(n)),c=Dt(o),h=ze.getIndentMetadata(e,n);h!==null&&h&2&&(c=t.unshiftIndent(c));let u=Sr(c,i),d=Sr(l,i);return u-d}}return null}matchEnterRuleMovingDown(e,t,i,n,s,o){if(Wo(o)>=0){let a=e.getLineMaxColumn(s),l=ze.getEnterAction(this._autoIndent,e,new k(s,a,s,a));return this.parseEnterResult(e,t,i,n,l)}else{let a=n-1;for(;a>=1;){let h=e.getLineContent(a);if(Wo(h)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=ze.getEnterAction(this._autoIndent,e,new k(a,l,a,l));return this.parseEnterResult(e,t,i,n,c)}}matchEnterRule(e,t,i,n,s,o){let a=s;for(;a>=1;){let h;if(a===s&&o!==void 0?h=o:h=e.getLineContent(a),Wo(h)>=0)break;a--}if(a<1||n>e.getLineCount())return null;let l=e.getLineMaxColumn(a),c=ze.getEnterAction(this._autoIndent,e,new k(a,l,a,l));return this.parseEnterResult(e,t,i,n,c)}trimLeft(e){return e.replace(/^\s+/,"")}shouldAutoIndent(e,t){if(this._autoIndent<4||!e.isCheapToTokenize(t.startLineNumber))return!1;let i=e.getLanguageIdAtPosition(t.startLineNumber,1),n=e.getLanguageIdAtPosition(t.endLineNumber,1);return!(i!==n||ze.getIndentRulesSupport(i)===null)}getIndentEditsOfMovingBlock(e,t,i,n,s,o){for(let a=i.startLineNumber;a<=i.endLineNumber;a++){let l=e.getLineContent(a),c=Dt(l),u=Sr(c,n)+o,d=H_(u,n,s);d!==c&&(t.addEditOperation(new k(a,1,a,c.length+1),d),a===i.endLineNumber&&i.endColumn<=c.length+1&&d===""&&(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<i.endLineNumber&&(i=i.setEndPosition(i.endLineNumber,2)),i}}class Vc{constructor(e,t){this.selection=e,this.descending=t,this.selectionId=null}static getCollator(){return Vc._COLLATOR||(Vc._COLLATOR=new Intl.Collator),Vc._COLLATOR}getEditOperations(e,t){let i=xge(e,this.selection,this.descending);i&&t.addEditOperation(i.range,i.text),this.selectionId=t.trackSelection(this.selection)}computeCursorState(e,t){return t.getTrackedSelection(this.selectionId)}static canRun(e,t,i){if(e===null)return!1;let n=i7(e,t,i);if(!n)return!1;for(let s=0,o=n.before.length;s<o;s++)if(n.before[s]!==n.after[s])return!0;return!1}}Vc._COLLATOR=null;function i7(r,e,t){let i=e.startLineNumber,n=e.endLineNumber;if(e.endColumn===1&&n--,i>=n)return null;let s=[];for(let a=i;a<=n;a++)s.push(r.getLineContent(a));let o=s.slice(0);return o.sort(Vc.getCollator().compare),t===!0&&(o=o.reverse()),{startLineNumber:i,endLineNumber:n,before:s,after:o}}function xge(r,e,t){let i=i7(r,e,t);return i?ci.replace(new k(i.startLineNumber,1,i.endLineNumber,r.getLineMaxColumn(i.endLineNumber)),i.after.join(` -`)):null}class n7 extends Se{constructor(e,t){super(t);this.down=e}run(e,t){if(!t.hasModel())return;const i=t.getSelections().map((o,a)=>({selection:o,index:a,ignore:!1}));i.sort((o,a)=>k.compareRangesUsingStarts(o.selection,a.selection));let n=i[0];for(let o=1;o<i.length;o++){const a=i[o];n.selection.endLineNumber===a.selection.startLineNumber&&(n.index<a.index?a.ignore=!0:(n.ignore=!0,n=a))}const s=[];for(const o of i)s.push(new t7(o.selection,this.down,o.ignore));t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class kge extends n7{constructor(){super(!1,{id:"editor.action.copyLinesUpAction",label:m("lines.copyUp","Copy Line Up"),alias:"Copy Line Up",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:512|1024|16,linux:{primary:2048|512|1024|16},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:m({key:"miCopyLinesUp",comment:["&& denotes a mnemonic"]},"&&Copy Line Up"),order:1}})}}class Dge extends n7{constructor(){super(!0,{id:"editor.action.copyLinesDownAction",label:m("lines.copyDown","Copy Line Down"),alias:"Copy Line Down",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:512|1024|18,linux:{primary:2048|512|1024|18},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:m({key:"miCopyLinesDown",comment:["&& denotes a mnemonic"]},"Co&&py Line Down"),order:2}})}}class Ege extends Se{constructor(){super({id:"editor.action.duplicateSelection",label:m("duplicateSelection","Duplicate Selection"),alias:"Duplicate Selection",precondition:R.writable,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:m({key:"miDuplicateSelection",comment:["&& denotes a mnemonic"]},"&&Duplicate Selection"),order:5}})}run(e,t,i){if(!t.hasModel())return;const n=[],s=t.getSelections(),o=t.getModel();for(const a of s)if(a.isEmpty())n.push(new t7(a,!0));else{const l=new be(a.endLineNumber,a.endColumn,a.endLineNumber,a.endColumn);n.push(new CJ(l,o.getValueInRange(a)))}t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class r7 extends Se{constructor(e,t){super(t);this.down=e}run(e,t){let i=[],n=t.getSelections()||[];const s=t.getOption(9);for(const o of n)i.push(new Lge(o,this.down,s));t.pushUndoStop(),t.executeCommands(this.id,i),t.pushUndoStop()}}class Ige extends r7{constructor(){super(!1,{id:"editor.action.moveLinesUpAction",label:m("lines.moveUp","Move Line Up"),alias:"Move Line Up",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:512|16,linux:{primary:512|16},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:m({key:"miMoveLinesUp",comment:["&& denotes a mnemonic"]},"Mo&&ve Line Up"),order:3}})}}class Nge extends r7{constructor(){super(!0,{id:"editor.action.moveLinesDownAction",label:m("lines.moveDown","Move Line Down"),alias:"Move Line Down",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:512|18,linux:{primary:512|18},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"2_line",title:m({key:"miMoveLinesDown",comment:["&& denotes a mnemonic"]},"Move &&Line Down"),order:4}})}}class s7 extends Se{constructor(e,t){super(t);this.descending=e}run(e,t){const i=t.getSelections()||[];for(const s of i)if(!Vc.canRun(t.getModel(),s,this.descending))return;let n=[];for(let s=0,o=i.length;s<o;s++)n[s]=new Vc(i[s],this.descending);t.pushUndoStop(),t.executeCommands(this.id,n),t.pushUndoStop()}}class Tge extends s7{constructor(){super(!1,{id:"editor.action.sortLinesAscending",label:m("lines.sortAscending","Sort Lines Ascending"),alias:"Sort Lines Ascending",precondition:R.writable})}}class Age extends s7{constructor(){super(!0,{id:"editor.action.sortLinesDescending",label:m("lines.sortDescending","Sort Lines Descending"),alias:"Sort Lines Descending",precondition:R.writable})}}class Uy extends Se{constructor(){super({id:Uy.ID,label:m("lines.trimTrailingWhitespace","Trim Trailing Whitespace"),alias:"Trim Trailing Whitespace",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:Mi(2048|41,2048|54),weight:100}})}run(e,t,i){let n=[];i.reason==="auto-save"&&(n=(t.getSelections()||[]).map(a=>new $(a.positionLineNumber,a.positionColumn)));let s=t.getSelection();if(s===null)return;let o=new yge(s,n);t.pushUndoStop(),t.executeCommands(this.id,[o]),t.pushUndoStop()}}Uy.ID="editor.action.trimTrailingWhitespace";class Rge extends Se{constructor(){super({id:"editor.action.deleteLines",label:m("lines.delete","Delete Line"),alias:"Delete Line",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2048|1024|41,weight:100}})}run(e,t){if(!t.hasModel())return;let i=this._getLinesToRemove(t),n=t.getModel();if(n.getLineCount()===1&&n.getLineMaxColumn(1)===1)return;let s=0,o=[],a=[];for(let l=0,c=i.length;l<c;l++){const h=i[l];let u=h.startLineNumber,d=h.endLineNumber,f=1,g=n.getLineMaxColumn(d);d<n.getLineCount()?(d+=1,g=1):u>1&&(u-=1,f=n.getLineMaxColumn(u)),o.push(ci.replace(new be(u,f,d,g),"")),a.push(new be(u-s,h.positionColumn,u-s,h.positionColumn)),s+=h.endLineNumber-h.startLineNumber+1}t.pushUndoStop(),t.executeEdits(this.id,o,a),t.pushUndoStop()}_getLinesToRemove(e){let t=e.getSelections().map(s=>{let o=s.endLineNumber;return s.startLineNumber<s.endLineNumber&&s.endColumn===1&&(o-=1),{startLineNumber:s.startLineNumber,selectionStartColumn:s.selectionStartColumn,endLineNumber:o,positionColumn:s.positionColumn}});t.sort((s,o)=>s.startLineNumber===o.startLineNumber?s.endLineNumber-o.endLineNumber:s.startLineNumber-o.startLineNumber);let i=[],n=t[0];for(let s=1;s<t.length;s++)n.endLineNumber+1>=t[s].startLineNumber?n.endLineNumber=t[s].endLineNumber:(i.push(n),n=t[s]);return i.push(n),i}}class Mge extends Se{constructor(){super({id:"editor.action.indentLines",label:m("lines.indent","Indent Line"),alias:"Indent Line",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|89,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Xt.indent(i.cursorConfig,t.getModel(),t.getSelections())),t.pushUndoStop())}}class Pge extends Se{constructor(){super({id:"editor.action.outdentLines",label:m("lines.outdent","Outdent Line"),alias:"Outdent Line",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|87,weight:100}})}run(e,t){Lf.Outdent.runEditorCommand(e,t,null)}}class Oge extends Se{constructor(){super({id:"editor.action.insertLineBefore",label:m("lines.insertBefore","Insert Line Above"),alias:"Insert Line Above",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|3,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Xt.lineInsertBefore(i.cursorConfig,t.getModel(),t.getSelections())))}}class Fge extends Se{constructor(){super({id:"editor.action.insertLineAfter",label:m("lines.insertAfter","Insert Line Below"),alias:"Insert Line Below",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|3,weight:100}})}run(e,t){const i=t._getViewModel();!i||(t.pushUndoStop(),t.executeCommands(this.id,Xt.lineInsertAfter(i.cursorConfig,t.getModel(),t.getSelections())))}}class o7 extends Se{run(e,t){if(!t.hasModel())return;const i=t.getSelection();let n=this._getRangesToDelete(t),s=[];for(let l=0,c=n.length-1;l<c;l++){let h=n[l],u=n[l+1];k.intersectRanges(h,u)===null?s.push(h):n[l+1]=k.plusRange(h,u)}s.push(n[n.length-1]);let o=this._getEndCursorState(i,s),a=s.map(l=>ci.replace(l,""));t.pushUndoStop(),t.executeEdits(this.id,a,o),t.pushUndoStop()}}class Bge extends o7{constructor(){super({id:"deleteAllLeft",label:m("lines.deleteAllLeft","Delete All Left"),alias:"Delete All Left",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:2048|1},weight:100}})}_getEndCursorState(e,t){let i=null,n=[],s=0;return t.forEach(o=>{let a;if(o.endColumn===1&&s>0){let l=o.startLineNumber-s;a=new be(l,o.startColumn,l,o.startColumn)}else a=new be(o.startLineNumber,o.startColumn,o.startLineNumber,o.startColumn);s+=o.endLineNumber-o.startLineNumber,o.intersectRanges(e)?i=a:n.push(a)}),i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getSelections();if(t===null)return[];let i=t,n=e.getModel();return n===null?[]:(i.sort(k.compareRangesUsingStarts),i=i.map(s=>{if(s.isEmpty())if(s.startColumn===1){let o=Math.max(1,s.startLineNumber-1),a=s.startLineNumber===1?1:n.getLineContent(o).length+1;return new k(o,a,s.startLineNumber,1)}else return new k(s.startLineNumber,1,s.startLineNumber,s.startColumn);else return new k(s.startLineNumber,1,s.endLineNumber,s.endColumn)}),i)}}class Wge extends o7{constructor(){super({id:"deleteAllRight",label:m("lines.deleteAllRight","Delete All Right"),alias:"Delete All Right",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|41,secondary:[2048|20]},weight:100}})}_getEndCursorState(e,t){let i=null,n=[];for(let s=0,o=t.length,a=0;s<o;s++){let l=t[s],c=new be(l.startLineNumber-a,l.startColumn,l.startLineNumber-a,l.startColumn);l.intersectRanges(e)?i=c:n.push(c)}return i&&n.unshift(i),n}_getRangesToDelete(e){let t=e.getModel();if(t===null)return[];let i=e.getSelections();if(i===null)return[];let n=i.map(s=>{if(s.isEmpty()){const o=t.getLineMaxColumn(s.startLineNumber);return s.startColumn===o?new k(s.startLineNumber,s.startColumn,s.startLineNumber+1,1):new k(s.startLineNumber,s.startColumn,s.startLineNumber,o)}return s});return n.sort(k.compareRangesUsingStarts),n}}class Vge extends Se{constructor(){super({id:"editor.action.joinLines",label:m("lines.joinLines","Join Lines"),alias:"Join Lines",precondition:R.writable,kbOpts:{kbExpr:R.editorTextFocus,primary:0,mac:{primary:256|40},weight:100}})}run(e,t){let i=t.getSelections();if(i===null)return;let n=t.getSelection();if(n===null)return;i.sort(k.compareRangesUsingStarts);let s=[],o=i.reduce((d,f)=>d.isEmpty()?d.endLineNumber===f.startLineNumber?(n.equalsSelection(d)&&(n=f),f):f.startLineNumber>d.endLineNumber+1?(s.push(d),f):new be(d.startLineNumber,d.startColumn,f.endLineNumber,f.endColumn):f.startLineNumber>d.endLineNumber?(s.push(d),f):new be(d.startLineNumber,d.startColumn,f.endLineNumber,f.endColumn));s.push(o);let a=t.getModel();if(a===null)return;let l=[],c=[],h=n,u=0;for(let d=0,f=s.length;d<f;d++){let g=s[d],p=g.startLineNumber,_=1,v=0,b,C,y=a.getLineContent(g.endLineNumber).length-g.endColumn;if(g.isEmpty()||g.startLineNumber===g.endLineNumber){let w=g.getStartPosition();w.lineNumber<a.getLineCount()?(b=p+1,C=a.getLineMaxColumn(b)):(b=w.lineNumber,C=a.getLineMaxColumn(w.lineNumber))}else b=g.endLineNumber,C=a.getLineMaxColumn(b);let x=a.getLineContent(p);for(let w=p+1;w<=b;w++){let L=a.getLineContent(w),N=a.getLineFirstNonWhitespaceColumn(w);if(N>=1){let P=!0;x===""&&(P=!1),P&&(x.charAt(x.length-1)===" "||x.charAt(x.length-1)===" ")&&(P=!1,x=x.replace(/[\s\uFEFF\xA0]+$/g," "));let B=L.substr(N-1);x+=(P?" ":"")+B,P?v=B.length+1:v=B.length}else v=0}let S=new k(p,_,b,C);if(!S.isEmpty()){let w;g.isEmpty()?(l.push(ci.replace(S,x)),w=new be(S.startLineNumber-u,x.length-v+1,p-u,x.length-v+1)):g.startLineNumber===g.endLineNumber?(l.push(ci.replace(S,x)),w=new be(g.startLineNumber-u,g.startColumn,g.endLineNumber-u,g.endColumn)):(l.push(ci.replace(S,x)),w=new be(g.startLineNumber-u,g.startColumn,g.startLineNumber-u,x.length-y)),k.intersectRanges(S,n)!==null?h=w:c.push(w)}u+=S.endLineNumber-S.startLineNumber}c.unshift(h),t.pushUndoStop(),t.executeEdits(this.id,l,c),t.pushUndoStop()}}class Hge extends Se{constructor(){super({id:"editor.action.transpose",label:m("editor.transpose","Transpose characters around the cursor"),alias:"Transpose characters around the cursor",precondition:R.writable})}run(e,t){let i=t.getSelections();if(i===null)return;let n=t.getModel();if(n===null)return;let s=[];for(let o=0,a=i.length;o<a;o++){let l=i[o];if(!l.isEmpty())continue;let c=l.getStartPosition(),h=n.getLineMaxColumn(c.lineNumber);if(c.column>=h){if(c.lineNumber===n.getLineCount())continue;let u=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),d=n.getValueInRange(u).split("").reverse().join("");s.push(new rn(new be(c.lineNumber,Math.max(1,c.column-1),c.lineNumber+1,1),d))}else{let u=new k(c.lineNumber,Math.max(1,c.column-1),c.lineNumber,c.column+1),d=n.getValueInRange(u).split("").reverse().join("");s.push(new kD(u,d,new be(c.lineNumber,c.column+1,c.lineNumber,c.column+1)))}}t.pushUndoStop(),t.executeCommands(this.id,s),t.pushUndoStop()}}class jy extends Se{run(e,t){const i=t.getSelections();if(i===null)return;const n=t.getModel();if(n===null)return;const s=t.getOption(115),o=[];for(const a of i)if(a.isEmpty()){const l=a.getStartPosition(),c=t.getConfiguredWordAtPosition(l);if(!c)continue;const h=new k(l.lineNumber,c.startColumn,l.lineNumber,c.endColumn),u=n.getValueInRange(h);o.push(ci.replace(h,this._modifyText(u,s)))}else{const l=n.getValueInRange(a);o.push(ci.replace(a,this._modifyText(l,s)))}t.pushUndoStop(),t.executeEdits(this.id,o),t.pushUndoStop()}}class zge extends jy{constructor(){super({id:"editor.action.transformToUppercase",label:m("editor.transformToUppercase","Transform to Uppercase"),alias:"Transform to Uppercase",precondition:R.writable})}_modifyText(e,t){return e.toLocaleUpperCase()}}class $ge extends jy{constructor(){super({id:"editor.action.transformToLowercase",label:m("editor.transformToLowercase","Transform to Lowercase"),alias:"Transform to Lowercase",precondition:R.writable})}_modifyText(e,t){return e.toLocaleLowerCase()}}class Uge extends jy{constructor(){super({id:"editor.action.transformToTitlecase",label:m("editor.transformToTitlecase","Transform to Title Case"),alias:"Transform to Title Case",precondition:R.writable})}_modifyText(e,t){const n=(`\r - `+t).split("");let s="",o=!0;for(let a=0;a<e.length;a++){let l=e[a];n.indexOf(l)>=0?(o=!0,s+=l):o?(o=!1,s+=l.toLocaleUpperCase()):s+=l.toLocaleLowerCase()}return s}}class a7{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{}}return this._actual}isSupported(){return this.get()!==null}}class Hc extends jy{constructor(){super({id:"editor.action.transformToSnakecase",label:m("editor.transformToSnakecase","Transform to Snake Case"),alias:"Transform to Snake Case",precondition:R.writable})}_modifyText(e,t){const i=Hc.regExp1.get(),n=Hc.regExp2.get();return!i||!n?e:e.replace(i,"$1_$2").replace(n,"$1_$2$3").toLocaleLowerCase()}}Hc.regExp1=new a7("(\\p{Ll})(\\p{Lu})","gmu");Hc.regExp2=new a7("(\\p{Lu}|\\p{N})(\\p{Lu})(\\p{Ll})","gmu");me(kge);me(Dge);me(Ege);me(Ige);me(Nge);me(Tge);me(Age);me(Uy);me(Rge);me(Mge);me(Pge);me(Oge);me(Fge);me(Bge);me(Wge);me(Vge);me(Hge);me(zge);me($ge);me(Uge);Hc.regExp1.isSupported()&&Hc.regExp2.isSupported()&&me(Hc);var jge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Kge=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},iA=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const l7=new Le("LinkedEditingInputVisible",!1),c7="linked-editing-decoration";let zc=class nA extends Y{constructor(e,t){super();this._debounceDuration=200,this._localToDispose=this._register(new le),this._editor=e,this._enabled=!1,this._visibleContextKey=l7.bindTo(t),this._currentDecorations=[],this._languageWordPattern=null,this._currentWordPattern=null,this._ignoreChangeEvent=!1,this._localToDispose=this._register(new le),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(i=>{(i.hasChanged(61)||i.hasChanged(81))&&this.reinitialize(!1)})),this._register(Tv.onDidChange(()=>this.reinitialize(!1))),this._register(this._editor.onDidChangeModelLanguage(()=>this.reinitialize(!0))),this.reinitialize(!0)}static get(e){return e.getContribution(nA.ID)}reinitialize(e){const t=this._editor.getModel(),i=t!==null&&(this._editor.getOption(61)||this._editor.getOption(81))&&Tv.has(t);if(i===this._enabled&&!e||(this._enabled=i,this.clearRanges(),this._localToDispose.clear(),!i||t===null))return;this._languageWordPattern=ze.getWordDefinition(t.getLanguageIdentifier().id),this._localToDispose.add(t.onDidChangeLanguageConfiguration(()=>{this._languageWordPattern=ze.getWordDefinition(t.getLanguageIdentifier().id)}));const n=new Ta(this._debounceDuration),s=()=>{this._rangeUpdateTriggerPromise=n.trigger(()=>this.updateRanges(),this._debounceDuration)},o=new Ta(0),a=l=>{this._rangeSyncTriggerPromise=o.trigger(()=>this._syncRanges(l))};this._localToDispose.add(this._editor.onDidChangeCursorPosition(()=>{s()})),this._localToDispose.add(this._editor.onDidChangeModelContent(l=>{if(!this._ignoreChangeEvent&&this._currentDecorations.length>0){const c=t.getDecorationRange(this._currentDecorations[0]);if(c&&l.changes.every(h=>c.intersectRanges(h.range))){a(this._currentDecorations);return}}s()})),this._localToDispose.add({dispose:()=>{n.cancel(),o.cancel()}}),this.updateRanges()}_syncRanges(e){if(!this._editor.hasModel()||e!==this._currentDecorations||e.length===0)return;const t=this._editor.getModel(),i=t.getDecorationRange(e[0]);if(!i||i.startLineNumber!==i.endLineNumber)return this.clearRanges();const n=t.getValueInRange(i);if(this._currentWordPattern){const o=n.match(this._currentWordPattern);if((o?o[0].length:0)!==n.length)return this.clearRanges()}let s=[];for(let o=1,a=e.length;o<a;o++){const l=t.getDecorationRange(e[o]);if(!!l)if(l.startLineNumber!==l.endLineNumber)s.push({range:l,text:n});else{let c=t.getValueInRange(l),h=n,u=l.startColumn,d=l.endColumn;const f=Pd(c,h);u+=f,c=c.substr(f),h=h.substr(f);const g=hv(c,h);d-=g,c=c.substr(0,c.length-g),h=h.substr(0,h.length-g),(u!==d||h.length!==0)&&s.push({range:new k(l.startLineNumber,u,l.endLineNumber,d),text:h})}}if(s.length!==0)try{this._editor.popUndoStop(),this._ignoreChangeEvent=!0;const o=this._editor._getViewModel().getPrevEditOperationType();this._editor.executeEdits("linkedEditing",s),this._editor._getViewModel().setPrevEditOperationType(o)}finally{this._ignoreChangeEvent=!1}}dispose(){this.clearRanges(),super.dispose()}clearRanges(){this._visibleContextKey.set(!1),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,[]),this._currentRequest&&(this._currentRequest.cancel(),this._currentRequest=null,this._currentRequestPosition=null)}updateRanges(e=!1){return iA(this,void 0,void 0,function*(){if(!this._editor.hasModel()){this.clearRanges();return}const t=this._editor.getPosition();if(!this._enabled&&!e||this._editor.getSelections().length>1){this.clearRanges();return}const i=this._editor.getModel(),n=i.getVersionId();if(this._currentRequestPosition&&this._currentRequestModelVersion===n){if(t.equals(this._currentRequestPosition))return;if(this._currentDecorations&&this._currentDecorations.length>0){const o=i.getDecorationRange(this._currentDecorations[0]);if(o&&o.containsPosition(t))return}}this._currentRequestPosition=t,this._currentRequestModelVersion=n;const s=Oi(o=>iA(this,void 0,void 0,function*(){try{const a=yield h7(i,t,o);if(s!==this._currentRequest||(this._currentRequest=null,n!==i.getVersionId()))return;let l=[];(a==null?void 0:a.ranges)&&(l=a.ranges),this._currentWordPattern=(a==null?void 0:a.wordPattern)||this._languageWordPattern;let c=!1;for(let u=0,d=l.length;u<d;u++)if(k.containsPosition(l[u],t)){if(c=!0,u!==0){const f=l[u];l.splice(u,1),l.unshift(f)}break}if(!c){this.clearRanges();return}const h=l.map(u=>({range:u,options:nA.DECORATION}));this._visibleContextKey.set(!0),this._currentDecorations=this._editor.deltaDecorations(this._currentDecorations,h)}catch(a){Ro(a)||Oe(a),(this._currentRequest===s||!this._currentRequest)&&this.clearRanges()}}));return this._currentRequest=s,s})}};zc.ID="editor.contrib.linkedEditing";zc.DECORATION=Ke.register({description:"linked-editing",stickiness:0,className:c7});zc=jge([Kge(1,Fe)],zc);class qge extends Se{constructor(){super({id:"editor.action.linkedEditing",label:m("linkedEditing.label","Start Linked Editing"),alias:"Start Linked Editing",precondition:_e.and(R.writable,R.hasRenameProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|60,weight:100}})}runCommand(e,t){const i=e.get(Ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return Ie.isUri(n)&&$.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(o=>{!o||(o.setPosition(s),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},Oe):super.runCommand(e,t)}run(e,t){const i=zc.get(t);return i?Promise.resolve(i.updateRanges(!0)):Promise.resolve()}}const Gge=en.bindToContribution(zc.get);fe(new Gge({id:"cancelLinkedEditingInput",precondition:l7,handler:r=>r.clearRanges(),kbOpts:{kbExpr:R.editorTextFocus,weight:100+99,primary:9,secondary:[1024|9]}}));function h7(r,e,t){const i=Tv.ordered(r);return HM(i.map(n=>()=>iA(this,void 0,void 0,function*(){try{return yield n.provideLinkedEditingRanges(r,e,t)}catch(s){$i(s);return}})),n=>!!n&&gr(n==null?void 0:n.ranges))}const Zge=V("editor.linkedEditingBackground",{dark:K.fromHex("#f00").transparent(.3),light:K.fromHex("#f00").transparent(.3),hc:K.fromHex("#f00").transparent(.3)},m("editorLinkedEditingBackground","Background color when the editor auto renames on type."));Lt((r,e)=>{const t=r.getColor(Zge);t&&e.addRule(`.monaco-editor .${c7} { background: ${t}; border-left-color: ${t}; }`)});Go("_executeLinkedEditingProvider",(r,e)=>h7(r,e,et.None));wt(zc.ID,zc);me(qge);var u7=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class Yge{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 u7(this,void 0,void 0,function*(){return this._link.url?this._link.url:typeof this._provider.resolveLink=="function"?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 Ky{constructor(e){this._disposables=new le;let t=[];for(const[i,n]of e){const s=i.links.map(o=>new Yge(o,n));t=Ky._union(t,s),NS(i)&&this._disposables.add(i)}this.links=t}dispose(){this._disposables.dispose(),this.links.length=0}static _union(e,t){let i=[],n,s,o,a;for(n=0,o=0,s=e.length,a=t.length;n<s&&o<a;){const l=e[n],c=t[o];if(k.areIntersectingOrTouching(l.range,c.range)){n++;continue}k.compareRangesUsingStarts(l.range,c.range)<0?(i.push(l),n++):(i.push(c),o++)}for(;n<s;n++)i.push(e[n]);for(;o<a;o++)i.push(t[o]);return i}}function d7(r,e){const t=[],i=Sp.ordered(r).reverse().map((n,s)=>Promise.resolve(n.provideLinks(r,e)).then(o=>{o&&(t[s]=[o,n])},$i));return Promise.all(i).then(()=>{const n=new Ky(xh(t));return e.isCancellationRequested?(n.dispose(),new Ky([])):n})}lt.registerCommand("_executeLinkProvider",(r,...e)=>u7(void 0,void 0,void 0,function*(){let[t,i]=e;Nt(t instanceof Ie),typeof i!="number"&&(i=0);const n=r.get(gi).getModel(t);if(!n)return[];const s=yield d7(n,et.None);if(!s)return[];for(let a=0;a<Math.min(i,s.links.length);a++)yield s.links[a].resolve(et.None);const o=s.links.slice(0);return s.dispose(),o}));var Xge=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},f7=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Qge=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};function Jge(r,e){const t=r.url&&/^command:/i.test(r.url.toString()),i=r.tooltip?r.tooltip:t?m("links.navigate.executeCmd","Execute command"):m("links.navigate.follow","Follow link"),n=e?Je?m("links.navigate.kb.meta.mac","cmd + click"):m("links.navigate.kb.meta","ctrl + click"):Je?m("links.navigate.kb.alt.mac","option + click"):m("links.navigate.kb.alt","alt + click");if(r.url){let s="";if(/^command:/i.test(r.url.toString())){const a=r.url.toString().match(/^command:([^?#]+)/);if(a){const l=a[1];s=` "${m("tooltip.explanation","Execute command {0}",l)}"`}}return new ul("",!0).appendMarkdown(`[${i}](${r.url.toString(!0).replace(/ /g,"%20")}${s}) (${n})`)}else return new ul().appendText(`${i} (${n})`)}const g7={general:Ke.register({description:"detected-link",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link"}),active:Ke.register({description:"detected-link-active",stickiness:1,collapseOnReplaceEdit:!0,inlineClassName:"detected-link-active"})};class gg{constructor(e,t){this.link=e,this.decorationId=t}static decoration(e,t){return{range:e.range,options:gg._getOptions(e,t,!1)}}static _getOptions(e,t,i){const n=Object.assign({},i?g7.active:g7.general);return n.hoverMessage=Jge(e,t),n}activate(e,t){e.changeDecorationOptions(this.decorationId,gg._getOptions(this.link,t,!0))}deactivate(e,t){e.changeDecorationOptions(this.decorationId,gg._getOptions(this.link,t,!1))}}let ju=class rA{constructor(e,t,i){this.listenersToRemove=new le,this.editor=e,this.openerService=t,this.notificationService=i;let n=new gB(e);this.listenersToRemove.add(n),this.listenersToRemove.add(n.onMouseMoveOrRelevantKeyDown(([s,o])=>{this._onEditorMouseMove(s,o)})),this.listenersToRemove.add(n.onExecute(s=>{this.onEditorMouseUp(s)})),this.listenersToRemove.add(n.onCancel(s=>{this.cleanUpActiveLinkDecoration()})),this.enabled=e.getOption(62),this.listenersToRemove.add(e.onDidChangeConfiguration(s=>{const o=e.getOption(62);this.enabled!==o&&(this.enabled=o,this.updateDecorations([]),this.stop(),this.beginCompute())})),this.listenersToRemove.add(e.onDidChangeModelContent(s=>this.onChange())),this.listenersToRemove.add(e.onDidChangeModel(s=>this.onModelChanged())),this.listenersToRemove.add(e.onDidChangeModelLanguage(s=>this.onModelModeChanged())),this.listenersToRemove.add(Sp.onDidChange(s=>this.onModelModeChanged())),this.timeout=new Xn,this.computePromise=null,this.activeLinksList=null,this.currentOccurrences={},this.activeLinkDecorationId=null,this.beginCompute()}static get(e){return e.getContribution(rA.ID)}onModelChanged(){this.currentOccurrences={},this.activeLinkDecorationId=null,this.stop(),this.beginCompute()}onModelModeChanged(){this.stop(),this.beginCompute()}onChange(){this.timeout.setIfNotSet(()=>this.beginCompute(),rA.RECOMPUTE_TIME)}beginCompute(){return Qge(this,void 0,void 0,function*(){if(!this.editor.hasModel()||!this.enabled)return;const e=this.editor.getModel();if(!!Sp.has(e)){this.activeLinksList&&(this.activeLinksList.dispose(),this.activeLinksList=null),this.computePromise=Oi(t=>d7(e,t));try{this.activeLinksList=yield this.computePromise,this.updateDecorations(this.activeLinksList.links)}catch(t){Oe(t)}finally{this.computePromise=null}}})}updateDecorations(e){const t=this.editor.getOption(69)==="altKey";let i=[],n=Object.keys(this.currentOccurrences);for(let a=0,l=n.length;a<l;a++){let c=n[a],h=this.currentOccurrences[c];i.push(h.decorationId)}let s=[];if(e)for(const a of e)s.push(gg.decoration(a,t));let o=this.editor.deltaDecorations(i,s);this.currentOccurrences={},this.activeLinkDecorationId=null;for(let a=0,l=o.length;a<l;a++){let c=new gg(e[a],o[a]);this.currentOccurrences[c.decorationId]=c}}_onEditorMouseMove(e,t){const i=this.editor.getOption(69)==="altKey";if(this.isEnabled(e,t)){this.cleanUpActiveLinkDecoration();const n=this.getLinkOccurrence(e.target.position);n&&this.editor.changeDecorations(s=>{n.activate(s,i),this.activeLinkDecorationId=n.decorationId})}else this.cleanUpActiveLinkDecoration()}cleanUpActiveLinkDecoration(){const e=this.editor.getOption(69)==="altKey";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(et.None).then(s=>{if(typeof s=="string"&&this.editor.hasModel()){const o=this.editor.getModel().uri;if(o.scheme===Ze.file&&s.startsWith(`${Ze.file}:`)){const a=Ie.parse(s);if(a.scheme===Ze.file){const l=mv(a);let c=null;l.startsWith("/./")?c=`.${l.substr(1)}`:l.startsWith("//./")&&(c=`.${l.substr(2)}`),c&&(s=gK(o,c))}}}return this.openerService.open(s,{openToSide:t,fromUserGesture:i,allowContributedOpeners:!0,allowCommands:!0})},s=>{const o=s instanceof Error?s.message:s;o==="invalid"?this.notificationService.warn(m("invalid.url","Failed to open this link because it is not well-formed: {0}",n.url.toString())):o==="missing"?this.notificationService.warn(m("missing.url","Failed to open this link because its target is missing.")):Oe(s)})}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 n=this.currentOccurrences[i.id];if(n)return n}return null}isEnabled(e,t){return Boolean(e.target.type===6&&(e.hasTriggerModifier||t&&t.keyCodeIsTriggerKey))}stop(){var e;this.timeout.cancel(),this.activeLinksList&&((e=this.activeLinksList)===null||e===void 0||e.dispose(),this.activeLinksList=null),this.computePromise&&(this.computePromise.cancel(),this.computePromise=null)}dispose(){this.listenersToRemove.dispose(),this.stop(),this.timeout.dispose()}};ju.ID="editor.linkDetector";ju.RECOMPUTE_TIME=1e3;ju=Xge([f7(1,Js),f7(2,Di)],ju);class epe extends Se{constructor(){super({id:"editor.action.openLink",label:m("label","Open Link"),alias:"Open Link",precondition:void 0})}run(e,t){let i=ju.get(t);if(!i||!t.hasModel())return;let n=t.getSelections();for(let s of n){let o=i.getLinkOccurrence(s.getEndPosition());o&&i.openLinkOccurrence(o,!1)}}}wt(ju.ID,ju);me(epe);Lt((r,e)=>{const t=r.getColor(oD);t&&e.addRule(`.monaco-editor .detected-link-active { color: ${t} !important; }`)});function pg(r,e){const t=e.filter(i=>!r.find(n=>n.equals(i)));if(t.length>=1){const i=t.map(s=>`line ${s.viewState.position.lineNumber} column ${s.viewState.position.column}`).join(", "),n=t.length===1?m("cursorAdded","Cursor added: {0}",i):m("cursorsAdded","Cursors added: {0}",i);kC(n)}}class tpe extends Se{constructor(){super({id:"editor.action.insertCursorAbove",label:m("mutlicursor.insertAbove","Add Cursor Above"),alias:"Add Cursor Above",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|512|16,linux:{primary:1024|512|16,secondary:[2048|1024|16]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorAbove",comment:["&& denotes a mnemonic"]},"&&Add Cursor Above"),order:2}})}run(e,t,i){if(!t.hasModel())return;const n=i&&i.logicalLine===!0,s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,Gi.addCursorUp(s,o,n)),s.revealTopMostCursor(i.source),pg(o,s.getCursorStates())}}class ipe extends Se{constructor(){super({id:"editor.action.insertCursorBelow",label:m("mutlicursor.insertBelow","Add Cursor Below"),alias:"Add Cursor Below",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|512|18,linux:{primary:1024|512|18,secondary:[2048|1024|18]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorBelow",comment:["&& denotes a mnemonic"]},"A&&dd Cursor Below"),order:3}})}run(e,t,i){if(!t.hasModel())return;const n=i&&i.logicalLine===!0,s=t._getViewModel();if(s.cursorConfig.readOnly)return;s.pushStackElement();const o=s.getCursorStates();s.setCursorStates(i.source,3,Gi.addCursorDown(s,o,n)),s.revealBottomMostCursor(i.source),pg(o,s.getCursorStates())}}class npe extends Se{constructor(){super({id:"editor.action.insertCursorAtEndOfEachLineSelected",label:m("mutlicursor.insertAtEndOfEachLineSelected","Add Cursors to Line Ends"),alias:"Add Cursors to Line Ends",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|39,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miInsertCursorAtEndOfEachLineSelected",comment:["&& denotes a mnemonic"]},"Add C&&ursors to Line Ends"),order:4}})}getCursorsForSelection(e,t,i){if(!e.isEmpty()){for(let n=e.startLineNumber;n<e.endLineNumber;n++){let s=t.getLineMaxColumn(n);i.push(new be(n,s,n,s))}e.endColumn>1&&i.push(new be(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();let a=[];n.forEach(l=>this.getCursorsForSelection(l,i,a)),a.length>0&&t.setSelections(a),pg(o,s.getCursorStates())}}class rpe extends Se{constructor(){super({id:"editor.action.addCursorsToBottom",label:m("mutlicursor.addCursorsToBottom","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();let s=[];for(let l=i[0].startLineNumber;l<=n;l++)s.push(new be(l,i[0].startColumn,l,i[0].endColumn));const o=t._getViewModel(),a=o.getCursorStates();s.length>0&&t.setSelections(s),pg(a,o.getCursorStates())}}class spe extends Se{constructor(){super({id:"editor.action.addCursorsToTop",label:m("mutlicursor.addCursorsToTop","Add Cursors To Top"),alias:"Add Cursors To Top",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getSelections();let n=[];for(let a=i[0].startLineNumber;a>=1;a--)n.push(new be(a,i[0].startColumn,a,i[0].endColumn));const s=t._getViewModel(),o=s.getCursorStates();n.length>0&&t.setSelections(n),pg(o,s.getCursorStates())}}class qy{constructor(e,t,i){this.selections=e,this.revealRange=t,this.revealScrollType=i}}class z_{constructor(e,t,i,n,s,o,a){this._editor=e,this.findController=t,this.isDisconnectedFromFindController=i,this.searchText=n,this.wholeWord=s,this.matchCase=o,this.currentMatch=a}static create(e,t){if(!e.hasModel())return null;const i=t.getState();if(!e.hasTextFocus()&&i.isRevealed&&i.searchString.length>0)return new z_(e,t,!1,i.searchString,i.wholeWord,i.matchCase,null);let n=!1,s,o;const a=e.getSelections();a.length===1&&a[0].isEmpty()?(n=!0,s=!0,o=!0):(s=i.wholeWord,o=i.matchCase);const l=e.getSelection();let c,h=null;if(l.isEmpty()){const u=e.getConfiguredWordAtPosition(l.getStartPosition());if(!u)return null;c=u.word,h=new be(l.startLineNumber,u.startColumn,l.startLineNumber,u.endColumn)}else c=e.getModel().getValueInRange(l).replace(/\r\n/g,` -`);return new z_(e,t,n,c,s,o,h)}addSelectionToNextFindMatch(){if(!this._editor.hasModel())return null;const e=this._getNextMatch();if(!e)return null;const t=this._editor.getSelections();return new qy(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 qy(t.slice(0,t.length-1).concat(e),e,0)}_getNextMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}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(115):null,!1);return i?new be(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 qy(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 qy(t.slice(0,t.length-1).concat(e),e,0)}_getPreviousMatch(){if(!this._editor.hasModel())return null;if(this.currentMatch){const n=this.currentMatch;return this.currentMatch=null,n}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(115):null,!1);return i?new be(i.range.startLineNumber,i.range.startColumn,i.range.endLineNumber,i.range.endColumn):null}selectAll(){return this._editor.hasModel()?(this.findController.highlightFindOptions(),this._editor.getModel().findMatches(this.searchText,!0,!1,this.matchCase,this.wholeWord?this._editor.getOption(115):null,!1,1073741824)):[]}}class Ku extends Y{constructor(e){super();this._sessionDispose=this._register(new le),this._editor=e,this._ignoreSelectionChange=!1,this._session=null}static get(e){return e.getContribution(Ku.ID)}dispose(){this._endSession(),super.dispose()}_beginSessionIfNeeded(e){if(!this._session){const t=z_.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(n=>{this._ignoreSelectionChange||this._endSession()})),this._sessionDispose.add(this._editor.onDidBlurEditorText(()=>{this._endSession()})),this._sessionDispose.add(e.getState().onFindReplaceStateChange(n=>{(n.matchCase||n.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 be(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 n=e.getState().matchCase;if(!m7(this._editor.getModel(),t,n)){const o=this._editor.getModel();let a=[];for(let l=0,c=t.length;l<c;l++)a[l]=this._expandEmptyToWord(o,t[l]);this._editor.setSelections(a);return}}}this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToNextFindMatch())}}addSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.addSelectionToPreviousFindMatch())}moveSelectionToNextFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToNextFindMatch())}moveSelectionToPreviousFindMatch(e){this._beginSessionIfNeeded(e),this._session&&this._applySessionResult(this._session.moveSelectionToPreviousFindMatch())}selectAll(e){if(!this._editor.hasModel())return;let t=null;const i=e.getState();if(i.isRevealed&&i.searchString.length>0&&i.isRegex)t=this._editor.getModel().findMatches(i.searchString,!0,i.isRegex,i.matchCase,i.wholeWord?this._editor.getOption(115):null,!1,1073741824);else{if(this._beginSessionIfNeeded(e),!this._session)return;t=this._session.selectAll()}if(i.searchScope){const n=i.searchScope;let s=[];t.forEach(o=>{n.forEach(a=>{o.range.endLineNumber<=a.endLineNumber&&o.range.startLineNumber>=a.startLineNumber&&s.push(o)})}),t=s}if(t.length>0){const n=this._editor.getSelection();for(let s=0,o=t.length;s<o;s++){const a=t[s];if(a.range.intersectRanges(n)){t[s]=t[0],t[0]=a;break}}this._setSelections(t.map(s=>new be(s.range.startLineNumber,s.range.startColumn,s.range.endLineNumber,s.range.endColumn)))}}}Ku.ID="editor.contrib.multiCursorController";class mg extends Se{run(e,t){const i=Ku.get(t);if(!i)return;const n=Ur.get(t);if(!n)return;const s=t._getViewModel();if(s){const o=s.getCursorStates();this._run(i,n),pg(o,s.getCursorStates())}}}class ope extends mg{constructor(){super({id:"editor.action.addSelectionToNextFindMatch",label:m("addSelectionToNextFindMatch","Add Selection To Next Find Match"),alias:"Add Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2048|34,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miAddSelectionToNextFindMatch",comment:["&& denotes a mnemonic"]},"Add &&Next Occurrence"),order:5}})}_run(e,t){e.addSelectionToNextFindMatch(t)}}class ape extends mg{constructor(){super({id:"editor.action.addSelectionToPreviousFindMatch",label:m("addSelectionToPreviousFindMatch","Add Selection To Previous Find Match"),alias:"Add Selection To Previous Find Match",precondition:void 0,menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miAddSelectionToPreviousFindMatch",comment:["&& denotes a mnemonic"]},"Add P&&revious Occurrence"),order:6}})}_run(e,t){e.addSelectionToPreviousFindMatch(t)}}class lpe extends mg{constructor(){super({id:"editor.action.moveSelectionToNextFindMatch",label:m("moveSelectionToNextFindMatch","Move Last Selection To Next Find Match"),alias:"Move Last Selection To Next Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:Mi(2048|41,2048|34),weight:100}})}_run(e,t){e.moveSelectionToNextFindMatch(t)}}class cpe extends mg{constructor(){super({id:"editor.action.moveSelectionToPreviousFindMatch",label:m("moveSelectionToPreviousFindMatch","Move Last Selection To Previous Find Match"),alias:"Move Last Selection To Previous Find Match",precondition:void 0})}_run(e,t){e.moveSelectionToPreviousFindMatch(t)}}class hpe extends mg{constructor(){super({id:"editor.action.selectHighlights",label:m("selectAllOccurrencesOfFindMatch","Select All Occurrences of Find Match"),alias:"Select All Occurrences of Find Match",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2048|1024|42,weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"3_multi",title:m({key:"miSelectHighlights",comment:["&& denotes a mnemonic"]},"Select All &&Occurrences"),order:7}})}_run(e,t){e.selectAll(t)}}class upe extends mg{constructor(){super({id:"editor.action.changeAll",label:m("changeAll.label","Change All Occurrences"),alias:"Change All Occurrences",precondition:_e.and(R.writable,R.editorTextFocus),kbOpts:{kbExpr:R.editorTextFocus,primary:2048|60,weight:100},contextMenuOpts:{group:"1_modification",order:1.2}})}_run(e,t){e.selectAll(t)}}class p7{constructor(e,t,i,n){this.searchText=e,this.matchCase=t,this.wordSeparators=i,this.modelVersionId=n}static softEquals(e,t){return!e&&!t?!0:!e||!t?!1:e.searchText===t.searchText&&e.matchCase===t.matchCase&&e.wordSeparators===t.wordSeparators&&e.modelVersionId===t.modelVersionId}}class yl extends Y{constructor(e){super();this.editor=e,this._isEnabled=e.getOption(96),this.decorations=[],this.updateSoon=this._register(new Bt(()=>this._update(),300)),this.state=null,this._register(e.onDidChangeConfiguration(t=>{this._isEnabled=e.getOption(96)})),this._register(e.onDidChangeCursorSelection(t=>{!this._isEnabled||(t.selection.isEmpty()?t.reason===3?(this.state&&this._setState(null),this.updateSoon.schedule()):this._setState(null):this._update())})),this._register(e.onDidChangeModel(t=>{this._setState(null)})),this._register(e.onDidChangeModelContent(t=>{this._isEnabled&&this.updateSoon.schedule()})),this._register(Ur.get(e).getState().onFindReplaceStateChange(t=>{this._update()}))}_update(){this._setState(yl._createState(this._isEnabled,this.editor))}static _createState(e,t){if(!e||!t.hasModel())return null;const i=t.getSelection();if(i.startLineNumber!==i.endLineNumber)return null;const n=Ku.get(t);if(!n)return null;const s=Ur.get(t);if(!s)return null;let o=n.getSession(s);if(!o){const c=t.getSelections();if(c.length>1){const u=s.getState().matchCase;if(!m7(t.getModel(),c,u))return null}o=z_.create(t,s)}if(!o||o.currentMatch||/^[ \t]+$/.test(o.searchText)||o.searchText.length>200)return null;const a=s.getState(),l=a.matchCase;if(a.isRevealed){let c=a.searchString;l||(c=c.toLowerCase());let h=o.searchText;if(l||(h=h.toLowerCase()),c===h&&o.matchCase===a.matchCase&&o.wholeWord===a.wholeWord&&!a.isRegex)return null}return new p7(o.searchText,o.matchCase,o.wholeWord?t.getOption(115):null,t.getModel().getVersionId())}_setState(e){if(p7.softEquals(this.state,e)){this.state=e;return}if(this.state=e,!this.state){this.decorations=this.editor.deltaDecorations(this.decorations,[]);return}if(!this.editor.hasModel())return;const t=this.editor.getModel();if(t.isTooLargeForTokenization())return;const i=Hd.has(t)&&this.editor.getOption(71);let n=t.findMatches(this.state.searchText,!0,!1,this.state.matchCase,this.state.wordSeparators,!1).map(l=>l.range);n.sort(k.compareRangesUsingStarts);let s=this.editor.getSelections();s.sort(k.compareRangesUsingStarts);let o=[];for(let l=0,c=0,h=n.length,u=s.length;l<h;){const d=n[l];if(c>=u)o.push(d),l++;else{const f=k.compareRangesUsingStarts(d,s[c]);f<0?((s[c].isEmpty()||!k.areIntersecting(d,s[c]))&&o.push(d),l++):(f>0||l++,c++)}}const a=o.map(l=>({range:l,options:i?yl._SELECTION_HIGHLIGHT:yl._SELECTION_HIGHLIGHT_OVERVIEW}));this.decorations=this.editor.deltaDecorations(this.decorations,a)}dispose(){this._setState(null),super.dispose()}}yl.ID="editor.contrib.selectionHighlighter";yl._SELECTION_HIGHLIGHT_OVERVIEW=Ke.register({description:"selection-highlight-overview",stickiness:1,className:"selectionHighlight",minimap:{color:ui(QC),position:Yr.Inline},overviewRuler:{color:ui(YO),position:Mr.Center}});yl._SELECTION_HIGHLIGHT=Ke.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight"});function m7(r,e,t){const i=_7(r,e[0],!t);for(let n=1,s=e.length;n<s;n++){const o=e[n];if(o.isEmpty())return!1;const a=_7(r,o,!t);if(i!==a)return!1}return!0}function _7(r,e,t){const i=r.getValueInRange(e);return t?i.toLowerCase():i}wt(Ku.ID,Ku);wt(yl.ID,yl);me(tpe);me(ipe);me(npe);me(ope);me(ape);me(lpe);me(cpe);me(hpe);me(upe);me(rpe);me(spe);var b7=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const qu={Visible:new Le("parameterHintsVisible",!1),MultipleSignatures:new Le("parameterHintsMultipleSignatures",!1)};function v7(r,e,t,i){return b7(this,void 0,void 0,function*(){const n=yh.ordered(r);for(const s of n)try{const o=yield s.provideSignatureHelp(r,e,i,t);if(o)return o}catch(o){$i(o)}})}lt.registerCommand("_executeSignatureHelpProvider",(r,...e)=>b7(void 0,void 0,void 0,function*(){const[t,i,n]=e;Nt(Ie.isUri(t)),Nt($.isIPosition(i)),Nt(typeof n=="string"||!n);const s=yield r.get(so).createModelReference(t);try{const o=yield v7(s.object.textEditorModel,$.lift(i),{triggerKind:zo.Invoke,isRetrigger:!1,triggerCharacter:n},et.None);return o?(setTimeout(()=>o.dispose(),0),o.value):void 0}finally{s.dispose()}}));var dpe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},$c;(function(r){r.Default={type:0};class e{constructor(n,s){this.request=n,this.previouslyActiveHints=s,this.type=2}}r.Pending=e;class t{constructor(n){this.hints=n,this.type=1}}r.Active=t})($c||($c={}));class Gy extends Y{constructor(e,t=Gy.DEFAULT_DELAY){super();this._onChangedHints=this._register(new H),this.onChangedHints=this._onChangedHints.event,this.triggerOnType=!1,this._state=$c.Default,this._pendingTriggers=[],this._lastSignatureHelpResult=this._register(new An),this.triggerChars=new Zd,this.retriggerChars=new Zd,this.triggerId=0,this.editor=e,this.throttledDelayer=new Ta(t),this._register(this.editor.onDidBlurEditorWidget(()=>this.cancel())),this._register(this.editor.onDidChangeConfiguration(()=>this.onEditorConfigurationChange())),this._register(this.editor.onDidChangeModel(i=>this.onModelChanged())),this._register(this.editor.onDidChangeModelLanguage(i=>this.onModelChanged())),this._register(this.editor.onDidChangeCursorSelection(i=>this.onCursorChange(i))),this._register(this.editor.onDidChangeModelContent(i=>this.onModelContentChange())),this._register(yh.onDidChange(this.onModelChanged,this)),this._register(this.editor.onDidType(i=>this.onDidType(i))),this.onEditorConfigurationChange(),this.onModelChanged()}get state(){return this._state}set state(e){this._state.type===2&&this._state.request.cancel(),this._state=e}cancel(e=!1){this.state=$c.Default,this.throttledDelayer.cancel(),e||this._onChangedHints.fire(void 0)}trigger(e,t){const i=this.editor.getModel();if(!i||!yh.has(i))return;const n=++this.triggerId;this._pendingTriggers.push(e),this.throttledDelayer.trigger(()=>this.doTrigger(n),t).catch(Oe)}next(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t%e==e-1,n=this.editor.getOption(75).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?0:t+1)}previous(){if(this.state.type!==1)return;const e=this.state.hints.signatures.length,t=this.state.hints.activeSignature,i=t===0,n=this.editor.getOption(75).cycle;if((e<2||i)&&!n){this.cancel();return}this.updateActiveSignature(i&&n?e-1:t-1)}updateActiveSignature(e){this.state.type===1&&(this.state=new $c.Active(Object.assign(Object.assign({},this.state.hints),{activeSignature:e})),this._onChangedHints.fire(this.state.hints))}doTrigger(e){return dpe(this,void 0,void 0,function*(){const t=this.state.type===1||this.state.type===2,i=this.getLastActiveHints();if(this.cancel(!0),this._pendingTriggers.length===0)return!1;const n=this._pendingTriggers.reduce(fpe);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 $c.Pending(Oi(l=>v7(o,a,s,l)),i);try{const l=yield this.state.request;return e!==this.triggerId?(l==null||l.dispose(),!1):!l||!l.value.signatures||l.value.signatures.length===0?(l==null||l.dispose(),this._lastSignatureHelpResult.clear(),this.cancel(),!1):(this.state=new $c.Active(l.value),this._lastSignatureHelpResult.value=l,this._onChangedHints.fire(this.state.hints),!0)}catch(l){return e===this.triggerId&&(this.state=$c.Default),Oe(l),!1}})}getLastActiveHints(){switch(this.state.type){case 1:return this.state.hints;case 2:return this.state.previouslyActiveHints;default:return}}get isTriggered(){return this.state.type===1||this.state.type===2||this.throttledDelayer.isTriggered()}onModelChanged(){this.cancel(),this.triggerChars=new Zd,this.retriggerChars=new Zd;const e=this.editor.getModel();if(!!e)for(const t of yh.ordered(e)){for(const i of t.signatureHelpTriggerCharacters||[])this.triggerChars.add(i.charCodeAt(0)),this.retriggerChars.add(i.charCodeAt(0));for(const i of t.signatureHelpRetriggerCharacters||[])this.retriggerChars.add(i.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:zo.TriggerCharacter,triggerCharacter:e.charAt(t)})}onCursorChange(e){e.source==="mouse"?this.cancel():this.isTriggered&&this.trigger({triggerKind:zo.ContentChange})}onModelContentChange(){this.isTriggered&&this.trigger({triggerKind:zo.ContentChange})}onEditorConfigurationChange(){this.triggerOnType=this.editor.getOption(75).enabled,this.triggerOnType||this.cancel()}dispose(){this.cancel(!0),super.dispose()}}Gy.DEFAULT_DELAY=120;function fpe(r,e){switch(e.triggerKind){case zo.Invoke:return e;case zo.ContentChange:return r;case zo.TriggerCharacter:default:return e}}var gpe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},sA=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const jr=oe,ppe=sn("parameter-hints-next",ve.chevronDown,m("parameterHintsNextIcon","Icon for show next parameter hint.")),mpe=sn("parameter-hints-previous",ve.chevronUp,m("parameterHintsPreviousIcon","Icon for show previous parameter hint."));let Zy=class C7 extends Y{constructor(e,t,i,n){super();this.editor=e,this.renderDisposeables=this._register(new le),this.visible=!1,this.announcedLabel=null,this.allowEditorOverflow=!0,this.markdownRenderer=this._register(new Ac({editor:e},n,i)),this.model=this._register(new Gy(e)),this.keyVisible=qu.Visible.bindTo(t),this.keyMultipleSignatures=qu.MultipleSignatures.bindTo(t),this._register(this.model.onChangedHints(s=>{s?(this.show(),this.render(s)):this.hide()}))}createParameterHintDOMNodes(){const e=jr(".editor-widget.parameter-hints-widget"),t=X(e,jr(".phwrapper"));t.tabIndex=-1;const i=X(t,jr(".controls")),n=X(i,jr(".button"+Gt.asCSSSelector(mpe))),s=X(i,jr(".overloads")),o=X(i,jr(".button"+Gt.asCSSSelector(ppe)));this._register(J(n,"click",d=>{St.stop(d),this.previous()})),this._register(J(o,"click",d=>{St.stop(d),this.next()}));const a=jr(".body"),l=new gm(a,{});this._register(l),t.appendChild(l.getDomNode());const c=X(a,jr(".signature")),h=X(a,jr(".docs"));e.style.userSelect="text",this.domNodes={element:e,signature:c,overloads:s,docs:h,scrollbar:l},this.editor.addContentWidget(this),this.hide(),this._register(this.editor.onDidChangeCursorSelection(d=>{this.visible&&this.editor.layoutContentWidget(this)}));const u=()=>{if(!this.domNodes)return;const d=this.editor.getOption(43);this.domNodes.element.style.fontSize=`${d.fontSize}px`};u(),this._register(ke.chain(this.editor.onDidChangeConfiguration.bind(this.editor)).filter(d=>d.hasChanged(43)).on(u,null)),this._register(this.editor.onDidLayoutChange(d=>this.updateMaxHeight())),this.updateMaxHeight()}show(){this.visible||(this.domNodes||this.createParameterHintDOMNodes(),this.keyVisible.set(!0),this.visible=!0,setTimeout(()=>{this.domNodes&&this.domNodes.element.classList.add("visible")},100),this.editor.layoutContentWidget(this))}hide(){this.renderDisposeables.clear(),!!this.visible&&(this.keyVisible.reset(),this.visible=!1,this.announcedLabel=null,this.domNodes&&this.domNodes.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=X(this.domNodes.signature,jr(".code")),o=this.editor.getOption(43);s.style.fontSize=`${o.fontSize}px`,s.style.fontFamily=o.fontFamily;const a=n.parameters.length>0,l=(t=n.activeParameter)!==null&&t!==void 0?t:e.activeParameter;if(a)this.renderParameters(s,n,l);else{const u=X(s,jr("span"));u.textContent=n.label}const c=n.parameters[l];if(c==null?void 0:c.documentation){const u=jr("span.documentation");if(typeof c.documentation=="string")u.textContent=c.documentation;else{const d=this.renderMarkdownDocs(c.documentation);u.appendChild(d.element)}X(this.domNodes.docs,jr("p",{},u))}if(n.documentation!==void 0)if(typeof n.documentation=="string")X(this.domNodes.docs,jr("p",{},n.documentation));else{const u=this.renderMarkdownDocs(n.documentation);X(this.domNodes.docs,u.element)}const h=this.hasDocs(n,c);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,c){let u="";const d=n.parameters[l];Array.isArray(d.label)?u=n.label.substring(d.label[0],d.label[1]):u=d.label,d.documentation&&(u+=typeof d.documentation=="string"?`, ${d.documentation}`:`, ${d.documentation.value}`),n.documentation&&(u+=typeof n.documentation=="string"?`, ${n.documentation}`:`, ${n.documentation.value}`),this.announcedLabel!==u&&(Ji(m("hint","{0}, hint",u)),this.announcedLabel=u)}this.editor.layoutContentWidget(this),this.domNodes.scrollbar.scanDomNode()}renderMarkdownDocs(e){const t=this.renderDisposeables.add(this.markdownRenderer.render(e,{asyncRenderCallback:()=>{var i;(i=this.domNodes)===null||i===void 0||i.scrollbar.scanDomNode()}}));return t.element.classList.add("markdown-docs"),t}hasDocs(e,t){return!!(t&&typeof t.documentation=="string"&&_v(t.documentation).length>0||t&&typeof t.documentation=="object"&&_v(t.documentation).value.length>0||e.documentation&&typeof e.documentation=="string"&&_v(e.documentation).length>0||e.documentation&&typeof e.documentation=="object"&&_v(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 a=document.createElement("span");a.textContent=t.label.substring(n,s),a.className="parameter active";const l=document.createElement("span");l.textContent=t.label.substring(s),X(e,o,a,l)}getParameterLabelOffsets(e,t){const i=e.parameters[t];if(i){if(Array.isArray(i.label))return i.label;if(i.label.length){const n=new RegExp(`(\\W|^)${Cs(i.label)}(?=\\W|$)`,"g");n.test(e.label);const s=n.lastIndex-i.label.length;return s>=0?[s,n.lastIndex]:[0,0]}else return[0,0]}else return[0,0]}next(){this.editor.focus(),this.model.next()}previous(){this.editor.focus(),this.model.previous()}cancel(){this.model.cancel()}getDomNode(){return this.domNodes||this.createParameterHintDOMNodes(),this.domNodes.element}getId(){return C7.ID}trigger(e){this.model.trigger(e,0)}updateMaxHeight(){if(!this.domNodes)return;const t=`${Math.max(this.editor.getLayoutInfo().height/4,250)}px`;this.domNodes.element.style.maxHeight=t;const i=this.domNodes.element.getElementsByClassName("phwrapper");i.length&&(i[0].style.maxHeight=t)}};Zy.ID="editor.widget.parameterHintsWidget";Zy=gpe([sA(1,Fe),sA(2,Js),sA(3,Ds)],Zy);Lt((r,e)=>{const t=r.getColor(sD);if(t){const l=r.type===is.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .parameter-hints-widget { border: ${l}px solid ${t}; }`),e.addRule(`.monaco-editor .parameter-hints-widget.multiple .body { border-left: 1px solid ${t.transparent(.5)}; }`),e.addRule(`.monaco-editor .parameter-hints-widget .signature.has-docs { border-bottom: 1px solid ${t.transparent(.5)}; }`)}const i=r.getColor(Vh);i&&e.addRule(`.monaco-editor .parameter-hints-widget { background-color: ${i}; }`);const n=r.getColor(Gp);n&&e.addRule(`.monaco-editor .parameter-hints-widget a { color: ${n}; }`);const s=r.getColor(Zp);s&&e.addRule(`.monaco-editor .parameter-hints-widget a:hover { color: ${s}; }`);const o=r.getColor(rD);o&&e.addRule(`.monaco-editor .parameter-hints-widget { color: ${o}; }`);const a=r.getColor(zk);a&&e.addRule(`.monaco-editor .parameter-hints-widget code { background-color: ${a}; }`)});var _pe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},bpe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let Gu=class w7 extends Y{constructor(e,t){super();this.editor=e,this.widget=this._register(t.createInstance(Zy,this.editor))}static get(e){return e.getContribution(w7.ID)}cancel(){this.widget.cancel()}previous(){this.widget.previous()}next(){this.widget.next()}trigger(e){this.widget.trigger(e)}};Gu.ID="editor.controller.parameterHints";Gu=_pe([bpe(1,ut)],Gu);class vpe extends Se{constructor(){super({id:"editor.action.triggerParameterHints",label:m("parameterHints.trigger.label","Trigger Parameter Hints"),alias:"Trigger Parameter Hints",precondition:R.hasSignatureHelpProvider,kbOpts:{kbExpr:R.editorTextFocus,primary:2048|1024|10,weight:100}})}run(e,t){const i=Gu.get(t);i&&i.trigger({triggerKind:zo.Invoke})}}wt(Gu.ID,Gu);me(vpe);const oA=100+75,aA=en.bindToContribution(Gu.get);fe(new aA({id:"closeParameterHints",precondition:qu.Visible,handler:r=>r.cancel(),kbOpts:{weight:oA,kbExpr:R.focus,primary:9,secondary:[1024|9]}}));fe(new aA({id:"showPrevParameterHint",precondition:_e.and(qu.Visible,qu.MultipleSignatures),handler:r=>r.previous(),kbOpts:{weight:oA,kbExpr:R.focus,primary:16,secondary:[512|16],mac:{primary:16,secondary:[512|16,256|46]}}}));fe(new aA({id:"showNextParameterHint",precondition:_e.and(qu.Visible,qu.MultipleSignatures),handler:r=>r.next(),kbOpts:{weight:oA,kbExpr:R.focus,primary:18,secondary:[512|18],mac:{primary:18,secondary:[512|18,256|44]}}}));var Cpe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},lA=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Yy=new Le("renameInputVisible",!1,m("renameInputVisible","Whether the rename input widget is visible"));let cA=class{constructor(e,t,i,n,s){this._editor=e,this._acceptKeybindings=t,this._themeService=i,this._keybindingService=n,this._disposables=new le,this.allowEditorOverflow=!0,this._visibleContextKey=Yy.bindTo(s),this._editor.addContentWidget(this),this._disposables.add(this._editor.onDidChangeConfiguration(o=>{o.hasChanged(43)&&this._updateFont()})),this._disposables.add(i.onDidColorThemeChange(this._updateStyles,this))}dispose(){this._disposables.dispose(),this._editor.removeContentWidget(this)}getId(){return"__renameInputWidget"}getDomNode(){if(!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",m("renameAriaLabel","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);const e=()=>{var t,i;const[n,s]=this._acceptKeybindings;this._keybindingService.lookupKeybinding(n),this._label.innerText=m({key:"label",comment:['placeholders are keybindings, e.g "F2 to Rename, Shift+F2 to Preview"']},"{0} to Rename, {1} to Preview",(t=this._keybindingService.lookupKeybinding(n))===null||t===void 0?void 0:t.getLabel(),(i=this._keybindingService.lookupKeybinding(s))===null||i===void 0?void 0:i.getLabel())};e(),this._disposables.add(this._keybindingService.onDidUpdateKeybindings(e)),this._updateFont(),this._updateStyles(this._themeService.getColorTheme())}return this._domNode}_updateStyles(e){var t,i,n,s;if(!this._input||!this._domNode)return;const o=e.getColor(sc);this._domNode.style.backgroundColor=String((t=e.getColor(Fr))!==null&&t!==void 0?t:""),this._domNode.style.boxShadow=o?` 0 0 8px 2px ${o}`:"",this._domNode.style.color=String((i=e.getColor(Uk))!==null&&i!==void 0?i:""),this._input.style.backgroundColor=String((n=e.getColor($k))!==null&&n!==void 0?n:"");const a=e.getColor(jk);this._input.style.borderWidth=a?"1px":"0px",this._input.style.borderStyle=a?"solid":"none",this._input.style.borderColor=(s=a==null?void 0:a.toString())!==null&&s!==void 0?s:"none"}_updateFont(){if(!this._input||!this._label)return;const e=this._editor.getOption(43);this._input.style.fontFamily=e.fontFamily,this._input.style.fontWeight=e.fontWeight,this._input.style.fontSize=`${e.fontSize}px`,this._label.style.fontSize=`${e.fontSize*.8}px`}getPosition(){return this._visible?{position:this._position,preference:[2,1]}:null}afterRender(e){e||this.cancelInput(!0)}acceptInput(e){this._currentAcceptInput&&this._currentAcceptInput(e)}cancelInput(e){this._currentCancelInput&&this._currentCancelInput(e)}getInput(e,t,i,n,s,o){this._domNode.classList.toggle("preview",s),this._position=new $(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((e.endColumn-e.startColumn)*1.1,20);const a=new le;return new Promise(l=>{this._currentCancelInput=c=>(this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l(c),!0),this._currentAcceptInput=c=>{if(this._input.value.trim().length===0||this._input.value===t){this.cancelInput(!0);return}this._currentAcceptInput=void 0,this._currentCancelInput=void 0,l({newName:this._input.value,wantsPreview:s&&c})},o.onCancellationRequested(()=>this.cancelInput(!0)),a.add(this._editor.onDidBlurEditorWidget(()=>this.cancelInput(!1))),this._show()}).finally(()=>{a.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)}};cA=Cpe([lA(2,qt),lA(3,Qt),lA(4,Fe)],cA);var wpe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},_g=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Zu=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class hA{constructor(e,t){this.model=e,this.position=t,this._providerRenameIdx=0,this._providers=Nv.ordered(e)}hasProvider(){return this._providers.length>0}resolveRenameLocation(e){return Zu(this,void 0,void 0,function*(){const t=[];for(this._providerRenameIdx=0;this._providerRenameIdx<this._providers.length;this._providerRenameIdx++){const n=this._providers[this._providerRenameIdx];if(!n.resolveRenameLocation)break;let s=yield n.resolveRenameLocation(this.model,this.position,e);if(!!s){if(s.rejectReason){t.push(s.rejectReason);continue}return s}}const i=this.model.getWordAtPosition(this.position);return i?{range:new k(this.position.lineNumber,i.startColumn,this.position.lineNumber,i.endColumn),text:i.word,rejectReason:t.length>0?t.join(` -`):void 0}:{range:k.fromPositions(this.position),text:"",rejectReason:t.length>0?t.join(` -`):void 0}})}provideRenameEdits(e,t){return Zu(this,void 0,void 0,function*(){return this._provideRenameEdits(e,this._providerRenameIdx,[],t)})}_provideRenameEdits(e,t,i,n){return Zu(this,void 0,void 0,function*(){const s=this._providers[t];if(!s)return{edits:[],rejectReason:i.join(` -`)};const o=yield s.provideRenameEdits(this.model,this.position,e,n);if(o){if(o.rejectReason)return this._provideRenameEdits(e,t+1,i.concat(o.rejectReason),n)}else return this._provideRenameEdits(e,t+1,i.concat(m("no result","No result.")),n);return o})}}function ype(r,e,t){return Zu(this,void 0,void 0,function*(){const i=new hA(r,e),n=yield i.resolveRenameLocation(et.None);return(n==null?void 0:n.rejectReason)?{edits:[],rejectReason:n.rejectReason}:i.provideRenameEdits(t,et.None)})}let Yu=class y7{constructor(e,t,i,n,s,o,a){this.editor=e,this._instaService=t,this._notificationService=i,this._bulkEditService=n,this._progressService=s,this._logService=o,this._configService=a,this._dispoableStore=new le,this._cts=new Rn,this._renameInputField=this._dispoableStore.add(new Ad(()=>this._dispoableStore.add(this._instaService.createInstance(cA,this.editor,["acceptRenameInput","acceptRenameInputWithPreview"]))))}static get(e){return e.getContribution(y7.ID)}dispose(){this._dispoableStore.dispose(),this._cts.dispose(!0)}run(){return Zu(this,void 0,void 0,function*(){if(this._cts.dispose(!0),!this.editor.hasModel())return;const e=this.editor.getPosition(),t=new hA(this.editor.getModel(),e);if(!t.hasProvider())return;this._cts=new Nm(this.editor,4|1);let i;try{const h=t.resolveRenameLocation(this._cts.token);this._progressService.showWhile(h,250),i=yield h}catch(h){zr.get(this.editor).showMessage(h||m("resolveRenameLocationFailed","An unknown error occurred while resolving rename location"),e);return}if(!i)return;if(i.rejectReason){zr.get(this.editor).showMessage(i.rejectReason,e);return}if(this._cts.token.isCancellationRequested)return;this._cts.dispose(),this._cts=new Nm(this.editor,4|1,i.range);let n=this.editor.getSelection(),s=0,o=i.text.length;!k.isEmpty(n)&&!k.spansMultipleLines(n)&&k.containsRange(i.range,n)&&(s=Math.max(0,n.startColumn-i.range.startColumn),o=Math.min(i.range.endColumn,n.endColumn)-i.range.startColumn);const a=this._bulkEditService.hasPreviewHandler()&&this._configService.getValue(this.editor.getModel().uri,"editor.rename.enablePreview"),l=yield this._renameInputField.value.getInput(i.range,i.text,s,o,a,this._cts.token);if(typeof l=="boolean"){l&&this.editor.focus();return}this.editor.focus();const c=IL(t.provideRenameEdits(l.newName,this._cts.token),this._cts.token).then(h=>Zu(this,void 0,void 0,function*(){if(!(!h||!this.editor.hasModel())){if(h.rejectReason){this._notificationService.info(h.rejectReason);return}this._bulkEditService.apply(eC.convert(h),{editor:this.editor,showPreview:l.wantsPreview,label:m("label","Renaming '{0}'",i==null?void 0:i.text),quotableLabel:m("quotableLabel","Renaming {0}",i==null?void 0:i.text)}).then(u=>{u.ariaSummary&&Ji(m("aria","Successfully renamed '{0}' to '{1}'. Summary: {2}",i.text,l.newName,u.ariaSummary))}).catch(u=>{this._notificationService.error(m("rename.failedApply","Rename failed to apply edits")),this._logService.error(u)})}}),h=>{this._notificationService.error(m("rename.failed","Rename failed to compute edits")),this._logService.error(h)});return this._progressService.showWhile(c,250),c})}acceptRenameInput(e){this._renameInputField.value.acceptInput(e)}cancelRenameInput(){this._renameInputField.value.cancelInput(!0)}};Yu.ID="editor.contrib.renameController";Yu=wpe([_g(1,ut),_g(2,Di),_g(3,ik),_g(4,rl),_g(5,Va),_g(6,Fx)],Yu);class Spe extends Se{constructor(){super({id:"editor.action.rename",label:m("rename.label","Rename Symbol"),alias:"Rename Symbol",precondition:_e.and(R.writable,R.hasRenameProvider),kbOpts:{kbExpr:R.editorTextFocus,primary:60,weight:100},contextMenuOpts:{group:"1_modification",order:1.1}})}runCommand(e,t){const i=e.get(Ct),[n,s]=Array.isArray(t)&&t||[void 0,void 0];return Ie.isUri(n)&&$.isIPosition(s)?i.openCodeEditor({resource:n},i.getActiveCodeEditor()).then(o=>{!o||(o.setPosition(s),o.invokeWithinContext(a=>(this.reportTelemetry(a,o),this.run(a,o))))},Oe):super.runCommand(e,t)}run(e,t){const i=Yu.get(t);return i?i.run():Promise.resolve()}}wt(Yu.ID,Yu);me(Spe);const uA=en.bindToContribution(Yu.get);fe(new uA({id:"acceptRenameInput",precondition:Yy,handler:r=>r.acceptRenameInput(!1),kbOpts:{weight:100+99,kbExpr:R.focus,primary:3}}));fe(new uA({id:"acceptRenameInputWithPreview",precondition:_e.and(Yy,_e.has("config.editor.rename.enablePreview")),handler:r=>r.acceptRenameInput(!0),kbOpts:{weight:100+99,kbExpr:R.focus,primary:1024+3}}));fe(new uA({id:"cancelRenameInput",precondition:Yy,handler:r=>r.cancelRenameInput(),kbOpts:{weight:100+99,kbExpr:R.focus,primary:9,secondary:[1024|9]}}));Go("_executeDocumentRenameProvider",function(r,e,...t){const[i]=t;return Nt(typeof i=="string"),ype(r,e,i)});Go("_executePrepareRename",function(r,e){return Zu(this,void 0,void 0,function*(){const i=yield new hA(r,e).resolveRenameLocation(et.None);if(i==null?void 0:i.rejectReason)throw new Error(i.rejectReason);return i})});mi.as(Dh.Configuration).registerConfiguration({id:"editor",properties:{"editor.rename.enablePreview":{scope:5,description:m("enablePreview","Enable/disable the ability to preview changes before renaming"),default:!0,type:"boolean"}}});class Lpe{provideSelectionRanges(e,t){const i=[];for(const n of t){const s=[];i.push(s),this._addInWordRanges(s,e,n),this._addWordRanges(s,e,n),this._addWhitespaceLine(s,e,n),s.push({range:e.getFullModelRange()})}return i}_addInWordRanges(e,t,i){const n=t.getWordAtPosition(i);if(!n)return;let{word:s,startColumn:o}=n,a=i.column-o,l=a,c=a,h=0;for(;l>=0;l--){let u=s.charCodeAt(l);if(l!==a&&(u===95||u===45))break;if(Ma(u)&&Zs(h))break;h=u}for(l+=1;c<s.length;c++){let u=s.charCodeAt(c);if(Zs(u)&&Ma(h))break;if(u===95||u===45)break;h=u}l<c&&e.push({range:new k(i.lineNumber,o+l,i.lineNumber,o+c)})}_addWordRanges(e,t,i){const n=t.getWordAtPosition(i);n&&e.push({range:new k(i.lineNumber,n.startColumn,i.lineNumber,n.endColumn)})}_addWhitespaceLine(e,t,i){t.getLineLength(i.lineNumber)>0&&t.getLineFirstNonWhitespaceColumn(i.lineNumber)===0&&t.getLineLastNonWhitespaceColumn(i.lineNumber)===0&&e.push({range:new k(i.lineNumber,1,i.lineNumber,t.getLineMaxColumn(i.lineNumber))})}}var dA=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class fA{constructor(e,t){this.index=e,this.ranges=t}mov(e){let t=this.index+(e?1:-1);if(t<0||t>=this.ranges.length)return this;const i=new fA(t,this.ranges);return i.ranges[t].equalsRange(this.ranges[this.index])?i.mov(e):i}}class bg{constructor(e){this._editor=e,this._ignoreSelection=!1}static get(e){return e.getContribution(bg.ID)}dispose(){var e;(e=this._selectionListener)===null||e===void 0||e.dispose()}run(e){return dA(this,void 0,void 0,function*(){if(!this._editor.hasModel())return;const t=this._editor.getSelections(),i=this._editor.getModel();if(!Ov.has(i)||(this._state||(yield L7(i,t.map(s=>s.getPosition()),this._editor.getOption(101),et.None).then(s=>{var o;if(!(!gr(s)||s.length!==t.length)&&!(!this._editor.hasModel()||!Is(this._editor.getSelections(),t,(a,l)=>a.equalsSelection(l)))){for(let a=0;a<s.length;a++)s[a]=s[a].filter(l=>l.containsPosition(t[a].getStartPosition())&&l.containsPosition(t[a].getEndPosition())),s[a].unshift(t[a]);this._state=s.map(a=>new fA(0,a)),(o=this._selectionListener)===null||o===void 0||o.dispose(),this._selectionListener=this._editor.onDidChangeCursorPosition(()=>{var a;this._ignoreSelection||((a=this._selectionListener)===null||a===void 0||a.dispose(),this._state=void 0)})}})),!this._state))return;this._state=this._state.map(s=>s.mov(e));const n=this._state.map(s=>be.fromPositions(s.ranges[s.index].getStartPosition(),s.ranges[s.index].getEndPosition()));this._ignoreSelection=!0;try{this._editor.setSelections(n)}finally{this._ignoreSelection=!1}})}}bg.ID="editor.contrib.smartSelectController";class S7 extends Se{constructor(e,t){super(t);this._forward=e}run(e,t){return dA(this,void 0,void 0,function*(){let i=bg.get(t);i&&(yield i.run(this._forward))})}}class xpe extends S7{constructor(){super(!0,{id:"editor.action.smartSelect.expand",label:m("smartSelect.expand","Expand Selection"),alias:"Expand Selection",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|17,mac:{primary:2048|256|1024|17,secondary:[256|1024|17]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectGrow",comment:["&& denotes a mnemonic"]},"&&Expand Selection"),order:2}})}}lt.registerCommandAlias("editor.action.smartSelect.grow","editor.action.smartSelect.expand");class kpe extends S7{constructor(){super(!1,{id:"editor.action.smartSelect.shrink",label:m("smartSelect.shrink","Shrink Selection"),alias:"Shrink Selection",precondition:void 0,kbOpts:{kbExpr:R.editorTextFocus,primary:1024|512|15,mac:{primary:2048|256|1024|15,secondary:[256|1024|15]},weight:100},menuOpts:{menuId:xe.MenubarSelectionMenu,group:"1_basic",title:m({key:"miSmartSelectShrink",comment:["&& denotes a mnemonic"]},"&&Shrink Selection"),order:3}})}}wt(bg.ID,bg);me(xpe);me(kpe);Ov.register("*",new Lpe);function L7(r,e,t,i){return dA(this,void 0,void 0,function*(){const n=Ov.all(r);n.length===1&&n.unshift(new $r);let s=[],o=[];for(const a of n)s.push(Promise.resolve(a.provideSelectionRanges(r,e,i)).then(l=>{if(gr(l)&&l.length===e.length)for(let c=0;c<e.length;c++){o[c]||(o[c]=[]);for(const h of l[c])k.isIRange(h.range)&&k.containsPosition(h.range,e[c])&&o[c].push(k.lift(h.range))}},$i));return yield Promise.all(s),o.map(a=>{if(a.length===0)return[];a.sort((u,d)=>$.isBefore(u.getStartPosition(),d.getStartPosition())?1:$.isBefore(d.getStartPosition(),u.getStartPosition())||$.isBefore(u.getEndPosition(),d.getEndPosition())?-1:$.isBefore(d.getEndPosition(),u.getEndPosition())?1:0);let l=[],c;for(const u of a)(!c||k.containsRange(u,c)&&!k.equalsRange(u,c))&&(l.push(u),c=u);if(!t.selectLeadingAndTrailingWhitespace)return l;let h=[l[0]];for(let u=1;u<l.length;u++){const d=l[u-1],f=l[u];if(f.startLineNumber!==d.startLineNumber||f.endLineNumber!==d.endLineNumber){const g=new k(d.startLineNumber,r.getLineFirstNonWhitespaceColumn(d.startLineNumber),d.endLineNumber,r.getLineLastNonWhitespaceColumn(d.endLineNumber));g.containsRange(d)&&!g.equalsRange(d)&&f.containsRange(g)&&!f.equalsRange(g)&&h.push(g);const p=new k(d.startLineNumber,1,d.endLineNumber,r.getLineMaxColumn(d.endLineNumber));p.containsRange(d)&&!p.equalsRange(g)&&f.containsRange(p)&&!f.equalsRange(p)&&h.push(p)}h.push(f)}return h})})}SZ("_executeSelectionRangeProvider",function(r,...e){const[t]=e;return L7(r,t,{selectLeadingAndTrailingWhitespace:!0},et.None)});class Dpe extends Se{constructor(){super({id:"editor.action.forceRetokenize",label:m("forceRetokenize","Developer: Force Retokenize"),alias:"Developer: Force Retokenize",precondition:void 0})}run(e,t){if(!t.hasModel())return;const i=t.getModel();i.resetTokenization();const n=new Mo(!0);i.forceTokenization(i.getLineCount()),n.stop(),console.log(`tokenization took ${n.elapsed()}`)}}me(Dpe);class vg extends Se{constructor(){super({id:vg.ID,label:m({key:"toggle.tabMovesFocus",comment:["Turn on/off use of tab key for moving focus around VS Code"]},"Toggle Tab Key Moves Focus"),alias:"Toggle Tab Key Moves Focus",precondition:void 0,kbOpts:{kbExpr:null,primary:2048|43,mac:{primary:256|1024|43},weight:100}})}run(e,t){const n=!iC.getTabFocusMode();iC.setTabFocusMode(n),Ji(n?m("toggle.tabMovesFocus.on","Pressing Tab will now move focus to the next focusable element"):m("toggle.tabMovesFocus.off","Pressing Tab will now insert the tab character"))}}vg.ID="editor.action.toggleTabFocusMode";me(vg);var Epe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},x7=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Ipe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};const k7="ignoreUnusualLineTerminators";function Npe(r,e,t){r.setModelProperty(e.uri,k7,t)}function Tpe(r,e){return r.getModelProperty(e.uri,k7)}let $_=class extends Y{constructor(e,t,i){super();this._editor=e,this._dialogService=t,this._codeEditorService=i,this._config=this._editor.getOption(112),this._register(this._editor.onDidChangeConfiguration(n=>{n.hasChanged(112)&&(this._config=this._editor.getOption(112),this._checkForUnusualLineTerminators())})),this._register(this._editor.onDidChangeModel(()=>{this._checkForUnusualLineTerminators()})),this._register(this._editor.onDidChangeModelContent(n=>{n.isUndoing||this._checkForUnusualLineTerminators()}))}_checkForUnusualLineTerminators(){return Ipe(this,void 0,void 0,function*(){if(this._config==="off"||!this._editor.hasModel())return;const e=this._editor.getModel();if(!e.mightContainUnusualLineTerminators()||Tpe(this._codeEditorService,e)===!0||this._editor.getOption(80))return;if(this._config==="auto"){e.removeUnusualLineTerminators(this._editor.getSelections());return}if(!(yield this._dialogService.confirm({title:m("unusualLineTerminators.title","Unusual Line Terminators"),message:m("unusualLineTerminators.message","Detected unusual line terminators"),detail:m("unusualLineTerminators.detail","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`.",ws(e.uri)),primaryButton:m("unusualLineTerminators.fix","Remove Unusual Line Terminators"),secondaryButton:m("unusualLineTerminators.ignore","Ignore")})).confirmed){Npe(this._codeEditorService,e,!0);return}e.removeUnusualLineTerminators(this._editor.getSelections())})}};$_.ID="editor.contrib.unusualLineTerminatorsDetector";$_=Epe([x7(1,Hm),x7(2,Ct)],$_);wt($_.ID,$_);var Ape=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},gA=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let U_=class extends Y{constructor(e,t,i,n){super();this._modelService=t,this._themeService=i,this._configurationService=n,this._editor=e,this._tokenizeViewport=new Bt(()=>this._tokenizeViewportNow(),100),this._outstandingRequests=[],this._register(this._editor.onDidScrollChange(()=>{this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModel(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._editor.onDidChangeModelContent(s=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(wx.onDidChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()})),this._register(this._configurationService.onDidChangeConfiguration(s=>{s.affectsConfiguration(wE)&&(this._cancelAll(),this._tokenizeViewport.schedule())})),this._register(this._themeService.onDidColorThemeChange(()=>{this._cancelAll(),this._tokenizeViewport.schedule()}))}_cancelAll(){for(const e of this._outstandingRequests)e.cancel();this._outstandingRequests=[]}_removeOutstandingRequest(e){for(let t=0,i=this._outstandingRequests.length;t<i;t++)if(this._outstandingRequests[t]===e){this._outstandingRequests.splice(t,1);return}}_tokenizeViewportNow(){if(!this._editor.hasModel())return;const e=this._editor.getModel();if(e.hasCompleteSemanticTokens())return;if(!yE(e,this._themeService,this._configurationService)){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const t=CE(e);if(!t){e.hasSomeSemanticTokens()&&e.setSemanticTokens(null,!1);return}const i=this._modelService.getSemanticTokensProviderStyling(t),n=this._editor.getVisibleRangesPlusViewportAboveBelow();this._outstandingRequests=this._outstandingRequests.concat(n.map(s=>this._requestRange(e,s,t,i)))}_requestRange(e,t,i,n){const s=e.getVersionId(),o=Oi(a=>Promise.resolve(i.provideDocumentRangeSemanticTokens(e,t,a)));return o.then(a=>{!a||e.isDisposed()||e.getVersionId()!==s||e.setPartialSemanticTokens(t,H4(a,n,e.getLanguageIdentifier()))}).then(()=>this._removeOutstandingRequest(o),()=>this._removeOutstandingRequest(o)),o}};U_.ID="editor.contrib.viewportSemanticTokens";U_=Ape([gA(1,gi),gA(2,qt),gA(3,hi)],U_);wt(U_.ID,U_);var Rpe=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Mpe=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const Ppe=V("editor.wordHighlightBackground",{dark:"#575757B8",light:"#57575740",hc:null},m("wordHighlight","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),Ope=V("editor.wordHighlightStrongBackground",{dark:"#004972B8",light:"#0e639c40",hc:null},m("wordHighlightStrong","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),Fpe=V("editor.wordHighlightBorder",{light:null,dark:null,hc:En},m("wordHighlightBorder","Border color of a symbol during read-access, like reading a variable.")),Bpe=V("editor.wordHighlightStrongBorder",{light:null,dark:null,hc:En},m("wordHighlightStrongBorder","Border color of a symbol during write-access, like writing to a variable.")),Wpe=V("editorOverviewRuler.wordHighlightForeground",{dark:"#A0A0A0CC",light:"#A0A0A0CC",hc:"#A0A0A0CC"},m("overviewRulerWordHighlightForeground","Overview ruler marker color for symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Vpe=V("editorOverviewRuler.wordHighlightStrongForeground",{dark:"#C0A0C0CC",light:"#C0A0C0CC",hc:"#C0A0C0CC"},m("overviewRulerWordHighlightStrongForeground","Overview ruler marker color for write-access symbol highlights. The color must not be opaque so as not to hide underlying decorations."),!0),Xy=new Le("hasWordHighlights",!1);function D7(r,e,t){const i=Hd.ordered(r);return HM(i.map(n=>()=>Promise.resolve(n.provideDocumentHighlights(r,e,t)).then(void 0,$i)),gr)}class E7{constructor(e,t,i){this._wordRange=this._getCurrentWordRange(e,t),this.result=Oi(n=>this._compute(e,t,i,n))}_getCurrentWordRange(e,t){const i=e.getWordAtPosition(t.getPosition());return i?new k(t.startLineNumber,i.startColumn,t.startLineNumber,i.endColumn):null}isValid(e,t,i){const n=t.startLineNumber,s=t.startColumn,o=t.endColumn,a=this._getCurrentWordRange(e,t);let l=Boolean(this._wordRange&&this._wordRange.equalsRange(a));for(let c=0,h=i.length;!l&&c<h;c++){let u=e.getDecorationRange(i[c]);u&&u.startLineNumber===n&&u.startColumn<=s&&u.endColumn>=o&&(l=!0)}return l}cancel(){this.result.cancel()}}class Hpe extends E7{_compute(e,t,i,n){return D7(e,t.getPosition(),n).then(s=>s||[])}}class zpe extends E7{constructor(e,t,i){super(e,t,i);this._selectionIsEmpty=t.isEmpty()}_compute(e,t,i,n){return Hl(250,n).then(()=>{if(!t.isEmpty())return[];const s=e.getWordAtPosition(t.getPosition());return!s||s.word.length>1e3?[]:e.findMatches(s.word,!0,!1,!0,i,!1).map(a=>({range:a.range,kind:vp.Text}))})}isValid(e,t,i){const n=t.isEmpty();return this._selectionIsEmpty!==n?!1:super.isValid(e,t,i)}}function $pe(r,e,t){return Hd.has(r)?new Hpe(r,e,t):new zpe(r,e,t)}Go("_executeDocumentHighlights",(r,e)=>D7(r,e,et.None));class Cg{constructor(e,t){this.toUnhook=new le,this.workerRequestTokenId=0,this.workerRequestCompleted=!1,this.workerRequestValue=[],this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1,this.editor=e,this._hasWordHighlights=Xy.bindTo(t),this._ignorePositionChangeEvent=!1,this.occurrencesHighlight=this.editor.getOption(71),this.model=this.editor.getModel(),this.toUnhook.add(e.onDidChangeCursorPosition(i=>{this._ignorePositionChangeEvent||!this.occurrencesHighlight||this._onPositionChanged(i)})),this.toUnhook.add(e.onDidChangeModelContent(i=>{this._stopAll()})),this.toUnhook.add(e.onDidChangeConfiguration(i=>{let n=this.editor.getOption(71);this.occurrencesHighlight!==n&&(this.occurrencesHighlight=n,this._stopAll())})),this._decorationIds=[],this.workerRequestTokenId=0,this.workerRequest=null,this.workerRequestCompleted=!1,this.lastCursorPositionChangeTime=0,this.renderDecorationsTimer=-1}hasDecorations(){return this._decorationIds.length>0}restore(){!this.occurrencesHighlight||this._run()}_getSortedHighlights(){return xh(this._decorationIds.map(e=>this.model.getDecorationRange(e)).sort(k.compareRangesUsingStarts))}moveNext(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))+1)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(n.startLineNumber);Ji(`${o}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}moveBack(){let e=this._getSortedHighlights(),i=(e.findIndex(s=>s.containsPosition(this.editor.getPosition()))-1+e.length)%e.length,n=e[i];try{this._ignorePositionChangeEvent=!0,this.editor.setPosition(n.getStartPosition()),this.editor.revealRangeInCenterIfOutsideViewport(n);const s=this._getWord();if(s){const o=this.editor.getModel().getLineContent(n.startLineNumber);Ji(`${o}, ${i+1} of ${e.length} for '${s.word}'`)}}finally{this._ignorePositionChangeEvent=!1}}_removeDecorations(){this._decorationIds.length>0&&(this._decorationIds=this.editor.deltaDecorations(this._decorationIds,[]),this._hasWordHighlights.set(!1))}_stopAll(){this._removeDecorations(),this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1),this.workerRequest!==null&&(this.workerRequest.cancel(),this.workerRequest=null),this.workerRequestCompleted||(this.workerRequestTokenId++,this.workerRequestCompleted=!0)}_onPositionChanged(e){if(!this.occurrencesHighlight){this._stopAll();return}if(e.reason!==3){this._stopAll();return}this._run()}_getWord(){let e=this.editor.getSelection(),t=e.startLineNumber,i=e.startColumn;return this.model.getWordAtPosition({lineNumber:t,column:i})}_run(){let e=this.editor.getSelection();if(e.startLineNumber!==e.endLineNumber){this._stopAll();return}let t=e.startColumn,i=e.endColumn;const n=this._getWord();if(!n||n.startColumn>t||n.endColumn<i){this._stopAll();return}const s=this.workerRequest&&this.workerRequest.isValid(this.model,e,this._decorationIds);if(this.lastCursorPositionChangeTime=new Date().getTime(),s)this.workerRequestCompleted&&this.renderDecorationsTimer!==-1&&(clearTimeout(this.renderDecorationsTimer),this.renderDecorationsTimer=-1,this._beginRenderDecorations());else{this._stopAll();let o=++this.workerRequestTokenId;this.workerRequestCompleted=!1,this.workerRequest=$pe(this.model,this.editor.getSelection(),this.editor.getOption(115)),this.workerRequest.result.then(a=>{o===this.workerRequestTokenId&&(this.workerRequestCompleted=!0,this.workerRequestValue=a||[],this._beginRenderDecorations())},Oe)}}_beginRenderDecorations(){let 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;let e=[];for(const t of this.workerRequestValue)t.range&&e.push({range:t.range,options:Cg._getDecorationOptions(t.kind)});this._decorationIds=this.editor.deltaDecorations(this._decorationIds,e),this._hasWordHighlights.set(this.hasDecorations())}static _getDecorationOptions(e){return e===vp.Write?this._WRITE_OPTIONS:e===vp.Text?this._TEXT_OPTIONS:this._REGULAR_OPTIONS}dispose(){this._stopAll(),this.toUnhook.dispose()}}Cg._WRITE_OPTIONS=Ke.register({description:"word-highlight-strong",stickiness:1,className:"wordHighlightStrong",overviewRuler:{color:ui(Vpe),position:Mr.Center},minimap:{color:ui(QC),position:Yr.Inline}});Cg._TEXT_OPTIONS=Ke.register({description:"selection-highlight",stickiness:1,className:"selectionHighlight",overviewRuler:{color:ui(YO),position:Mr.Center},minimap:{color:ui(QC),position:Yr.Inline}});Cg._REGULAR_OPTIONS=Ke.register({description:"word-highlight",stickiness:1,className:"wordHighlight",overviewRuler:{color:ui(Wpe),position:Mr.Center},minimap:{color:ui(QC),position:Yr.Inline}});let Xu=class I7 extends Y{constructor(e,t){super();this.wordHighlighter=null;const i=()=>{e.hasModel()&&(this.wordHighlighter=new Cg(e,t))};this._register(e.onDidChangeModel(n=>{this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),i()})),i()}static get(e){return e.getContribution(I7.ID)}saveViewState(){return!!(this.wordHighlighter&&this.wordHighlighter.hasDecorations())}moveNext(){this.wordHighlighter&&this.wordHighlighter.moveNext()}moveBack(){this.wordHighlighter&&this.wordHighlighter.moveBack()}restoreViewState(e){this.wordHighlighter&&e&&this.wordHighlighter.restore()}dispose(){this.wordHighlighter&&(this.wordHighlighter.dispose(),this.wordHighlighter=null),super.dispose()}};Xu.ID="editor.contrib.wordHighlighter";Xu=Rpe([Mpe(1,Fe)],Xu);class N7 extends Se{constructor(e,t){super(t);this._isNext=e}run(e,t){const i=Xu.get(t);!i||(this._isNext?i.moveNext():i.moveBack())}}class Upe extends N7{constructor(){super(!0,{id:"editor.action.wordHighlight.next",label:m("wordHighlight.next.label","Go to Next Symbol Highlight"),alias:"Go to Next Symbol Highlight",precondition:Xy,kbOpts:{kbExpr:R.editorTextFocus,primary:65,weight:100}})}}class jpe extends N7{constructor(){super(!1,{id:"editor.action.wordHighlight.prev",label:m("wordHighlight.previous.label","Go to Previous Symbol Highlight"),alias:"Go to Previous Symbol Highlight",precondition:Xy,kbOpts:{kbExpr:R.editorTextFocus,primary:1024|65,weight:100}})}}class Kpe extends Se{constructor(){super({id:"editor.action.wordHighlight.trigger",label:m("wordHighlight.trigger.label","Trigger Symbol Highlight"),alias:"Trigger Symbol Highlight",precondition:Xy.toNegated(),kbOpts:{kbExpr:R.editorTextFocus,primary:0,weight:100}})}run(e,t,i){const n=Xu.get(t);!n||n.restoreViewState(!0)}}wt(Xu.ID,Xu);me(Upe);me(jpe);me(Kpe);Lt((r,e)=>{const t=r.getColor(iD);t&&(e.addRule(`.monaco-editor .focused .selectionHighlight { background-color: ${t}; }`),e.addRule(`.monaco-editor .selectionHighlight { background-color: ${t.transparent(.5)}; }`));const i=r.getColor(Ppe);i&&e.addRule(`.monaco-editor .wordHighlight { background-color: ${i}; }`);const n=r.getColor(Ope);n&&e.addRule(`.monaco-editor .wordHighlightStrong { background-color: ${n}; }`);const s=r.getColor(XY);s&&e.addRule(`.monaco-editor .selectionHighlight { border: 1px ${r.type==="hc"?"dotted":"solid"} ${s}; box-sizing: border-box; }`);const o=r.getColor(Fpe);o&&e.addRule(`.monaco-editor .wordHighlight { border: 1px ${r.type==="hc"?"dashed":"solid"} ${o}; box-sizing: border-box; }`);const a=r.getColor(Bpe);a&&e.addRule(`.monaco-editor .wordHighlightStrong { border: 1px ${r.type==="hc"?"dashed":"solid"} ${a}; box-sizing: border-box; }`)});class Qy extends en{constructor(e){super(e);this._inSelectionMode=e.inSelectionMode,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),a=t.getSelections().map(l=>{const c=new $(l.positionLineNumber,l.positionColumn),h=this._move(n,s,c,this._wordNavigationType);return this._moveTo(l,h,this._inSelectionMode)});if(s.pushStackElement(),t._getViewModel().setCursorStates("moveWordCommand",3,a.map(l=>qe.fromModelSelection(l))),a.length===1){const l=new $(a[0].positionLineNumber,a[0].positionColumn);t.revealPosition(l,0)}}_moveTo(e,t,i){return i?new be(e.selectionStartLineNumber,e.selectionStartColumn,t.lineNumber,t.column):new be(t.lineNumber,t.column,t.lineNumber,t.column)}}class Uc extends Qy{_move(e,t,i,n){return ft.moveWordLeft(e,t,i,n)}}class jc extends Qy{_move(e,t,i,n){return ft.moveWordRight(e,t,i,n)}}class qpe extends Uc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartLeft",precondition:void 0})}}class Gpe extends Uc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndLeft",precondition:void 0})}}class Zpe extends Uc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:1,id:"cursorWordLeft",precondition:void 0,kbOpts:{kbExpr:_e.and(R.textInputFocus,(e=_e.and(km,d0))===null||e===void 0?void 0:e.negate()),primary:2048|15,mac:{primary:512|15},weight:100}})}}class Ype extends Uc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartLeftSelect",precondition:void 0})}}class Xpe extends Uc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndLeftSelect",precondition:void 0})}}class Qpe extends Uc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:1,id:"cursorWordLeftSelect",precondition:void 0,kbOpts:{kbExpr:_e.and(R.textInputFocus,(e=_e.and(km,d0))===null||e===void 0?void 0:e.negate()),primary:2048|1024|15,mac:{primary:512|1024|15},weight:100}})}}class Jpe extends Uc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityLeft",precondition:void 0})}_move(e,t,i,n){return super._move(os(Ks.wordSeparators.defaultValue),t,i,n)}}class eme extends Uc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityLeftSelect",precondition:void 0})}_move(e,t,i,n){return super._move(os(Ks.wordSeparators.defaultValue),t,i,n)}}class tme extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordStartRight",precondition:void 0})}}class ime extends jc{constructor(){var e;super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordEndRight",precondition:void 0,kbOpts:{kbExpr:_e.and(R.textInputFocus,(e=_e.and(km,d0))===null||e===void 0?void 0:e.negate()),primary:2048|17,mac:{primary:512|17},weight:100}})}}class nme extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordRight",precondition:void 0})}}class rme extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordStartRightSelect",precondition:void 0})}}class sme extends jc{constructor(){var e;super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordEndRightSelect",precondition:void 0,kbOpts:{kbExpr:_e.and(R.textInputFocus,(e=_e.and(km,d0))===null||e===void 0?void 0:e.negate()),primary:2048|1024|17,mac:{primary:512|1024|17},weight:100}})}}class ome extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordRightSelect",precondition:void 0})}}class ame extends jc{constructor(){super({inSelectionMode:!1,wordNavigationType:3,id:"cursorWordAccessibilityRight",precondition:void 0})}_move(e,t,i,n){return super._move(os(Ks.wordSeparators.defaultValue),t,i,n)}}class lme extends jc{constructor(){super({inSelectionMode:!0,wordNavigationType:3,id:"cursorWordAccessibilityRightSelect",precondition:void 0})}_move(e,t,i,n){return super._move(os(Ks.wordSeparators.defaultValue),t,i,n)}}class Jy extends en{constructor(e){super(e);this._whitespaceHeuristics=e.whitespaceHeuristics,this._wordNavigationType=e.wordNavigationType}runEditorCommand(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),o=t.getSelections(),a=t.getOption(5),l=t.getOption(8),c=ze.getAutoClosingPairs(s.getLanguageIdentifier().id),h=t._getViewModel(),u=o.map(d=>{const f=this._delete({wordSeparators:n,model:s,selection:d,whitespaceHeuristics:this._whitespaceHeuristics,autoClosingDelete:t.getOption(6),autoClosingBrackets:a,autoClosingQuotes:l,autoClosingPairs:c,autoClosedCharacters:h.getCursorAutoClosedCharacters()},this._wordNavigationType);return new rn(f,"")});t.pushUndoStop(),t.executeCommands(this.id,u),t.pushUndoStop()}}class pA extends Jy{_delete(e,t){let i=ft.deleteWordLeft(e,t);return i||new k(1,1,1,1)}}class mA extends Jy{_delete(e,t){let i=ft.deleteWordRight(e,t);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class cme extends pA{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartLeft",precondition:R.writable})}}class hme extends pA{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndLeft",precondition:R.writable})}}class ume extends pA{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2048|1,mac:{primary:512|1},weight:100}})}}class dme extends mA{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:0,id:"deleteWordStartRight",precondition:R.writable})}}class fme extends mA{constructor(){super({whitespaceHeuristics:!1,wordNavigationType:2,id:"deleteWordEndRight",precondition:R.writable})}}class gme extends mA{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:2048|20,mac:{primary:512|20},weight:100}})}}class pme extends Se{constructor(){super({id:"deleteInsideWord",precondition:R.writable,label:m("deleteInsideWord","Delete Word"),alias:"Delete Word"})}run(e,t,i){if(!t.hasModel())return;const n=os(t.getOption(115)),s=t.getModel(),a=t.getSelections().map(l=>{const c=ft.deleteInsideWord(n,s,l);return new rn(c,"")});t.pushUndoStop(),t.executeCommands(this.id,a),t.pushUndoStop()}}fe(new qpe);fe(new Gpe);fe(new Zpe);fe(new Ype);fe(new Xpe);fe(new Qpe);fe(new tme);fe(new ime);fe(new nme);fe(new rme);fe(new sme);fe(new ome);fe(new Jpe);fe(new eme);fe(new ame);fe(new lme);fe(new cme);fe(new hme);fe(new ume);fe(new dme);fe(new fme);fe(new gme);me(pme);class mme extends Jy{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:0,id:"deleteWordPartLeft",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|1},weight:100}})}_delete(e,t){let i=gw.deleteWordPartLeft(e);return i||new k(1,1,1,1)}}class _me extends Jy{constructor(){super({whitespaceHeuristics:!0,wordNavigationType:2,id:"deleteWordPartRight",precondition:R.writable,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|20},weight:100}})}_delete(e,t){let i=gw.deleteWordPartRight(e);if(i)return i;const n=e.model.getLineCount(),s=e.model.getLineMaxColumn(n);return new k(n,s,n,s)}}class T7 extends Qy{_move(e,t,i,n){return gw.moveWordPartLeft(e,t,i)}}class bme extends T7{constructor(){super({inSelectionMode:!1,wordNavigationType:0,id:"cursorWordPartLeft",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|15},weight:100}})}}lt.registerCommandAlias("cursorWordPartStartLeft","cursorWordPartLeft");class vme extends T7{constructor(){super({inSelectionMode:!0,wordNavigationType:0,id:"cursorWordPartLeftSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|1024|15},weight:100}})}}lt.registerCommandAlias("cursorWordPartStartLeftSelect","cursorWordPartLeftSelect");class A7 extends Qy{_move(e,t,i,n){return gw.moveWordPartRight(e,t,i)}}class Cme extends A7{constructor(){super({inSelectionMode:!1,wordNavigationType:2,id:"cursorWordPartRight",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|17},weight:100}})}}class wme extends A7{constructor(){super({inSelectionMode:!0,wordNavigationType:2,id:"cursorWordPartRightSelect",precondition:void 0,kbOpts:{kbExpr:R.textInputFocus,primary:0,mac:{primary:256|512|1024|17},weight:100}})}}fe(new mme);fe(new _me);fe(new bme);fe(new vme);fe(new Cme);fe(new wme);var R7=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},e1=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};const M7=new Le("accessibilityHelpWidgetVisible",!1);let Qu=class P7 extends Y{constructor(e,t){super();this._editor=e,this._widget=this._register(t.createInstance(wg,this._editor))}static get(e){return e.getContribution(P7.ID)}show(){this._widget.show()}hide(){this._widget.hide()}};Qu.ID="editor.contrib.accessibilityHelpController";Qu=R7([e1(1,ut)],Qu);function yme(r,e){return!r||r.length===0?yi.noSelection:r.length===1?e?gn(yi.singleSelectionRange,r[0].positionLineNumber,r[0].positionColumn,e):gn(yi.singleSelection,r[0].positionLineNumber,r[0].positionColumn):e?gn(yi.multiSelectionRange,r.length,e):r.length>0?gn(yi.multiSelection,r.length):""}let wg=class t1 extends Vr{constructor(e,t,i,n){super();this._contextKeyService=t,this._keybindingService=i,this._openerService=n,this._editor=e,this._isVisibleKey=M7.bindTo(this._contextKeyService),this._domNode=dt(document.createElement("div")),this._domNode.setClassName("accessibilityHelpWidget"),this._domNode.setDisplay("none"),this._domNode.setAttribute("role","dialog"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode=dt(document.createElement("div")),this._contentDomNode.setAttribute("role","document"),this._domNode.appendChild(this._contentDomNode),this._isVisible=!1,this._register(this._editor.onDidLayoutChange(()=>{this._isVisible&&this._layout()})),this._register(ki(this._contentDomNode.domNode,"keydown",s=>{if(!!this._isVisible&&(s.equals(2048|35)&&(Ji(yi.emergencyConfOn),this._editor.updateOptions({accessibilitySupport:"on"}),Ui(this._contentDomNode.domNode),this._buildContent(),this._contentDomNode.domNode.focus(),s.preventDefault(),s.stopPropagation()),s.equals(2048|38))){Ji(yi.openingDocs);let o=this._editor.getRawOptions().accessibilityHelpUrl;typeof o=="undefined"&&(o="https://go.microsoft.com/fwlink/?linkid=852450"),this._openerService.open(Ie.parse(o)),s.preventDefault(),s.stopPropagation()}})),this.onblur(this._contentDomNode.domNode,()=>{this.hide()}),this._editor.addOverlayWidget(this)}dispose(){this._editor.removeOverlayWidget(this),super.dispose()}getId(){return t1.ID}getDomNode(){return this._domNode.domNode}getPosition(){return{preference:null}}show(){this._isVisible||(this._isVisible=!0,this._isVisibleKey.set(!0),this._layout(),this._domNode.setDisplay("block"),this._domNode.setAttribute("aria-hidden","false"),this._contentDomNode.domNode.tabIndex=0,this._buildContent(),this._contentDomNode.domNode.focus())}_descriptionForCommand(e,t,i){let n=this._keybindingService.lookupKeybinding(e);return n?gn(t,n.getAriaLabel()):gn(i,e)}_buildContent(){const e=this._editor.getOptions(),t=this._editor.getSelections();let i=0;if(t){const a=this._editor.getModel();a&&t.forEach(l=>{i+=a.getValueLengthInRange(l)})}let n=yme(t,i);e.get(53)?e.get(80)?n+=yi.readonlyDiffEditor:n+=yi.editableDiffEditor:e.get(80)?n+=yi.readonlyEditor:n+=yi.editableEditor;const s=Je?yi.changeConfigToOnMac:yi.changeConfigToOnWinLinux;switch(e.get(2)){case 0:n+=` - - - `+s;break;case 2:n+=` - - - `+yi.auto_on;break;case 1:n+=` - - - `+yi.auto_off,n+=" "+s;break}e.get(128)?n+=` - - - `+this._descriptionForCommand(vg.ID,yi.tabFocusModeOnMsg,yi.tabFocusModeOnMsgNoKb):n+=` - - - `+this._descriptionForCommand(vg.ID,yi.tabFocusModeOffMsg,yi.tabFocusModeOffMsgNoKb);const o=Je?yi.openDocMac:yi.openDocWinLinux;n+=` - - - `+o,n+=` - -`+yi.outroMsg,this._contentDomNode.domNode.appendChild(f3(n)),this._contentDomNode.domNode.setAttribute("aria-label",n)}hide(){!this._isVisible||(this._isVisible=!1,this._isVisibleKey.reset(),this._domNode.setDisplay("none"),this._domNode.setAttribute("aria-hidden","true"),this._contentDomNode.domNode.tabIndex=-1,Ui(this._contentDomNode.domNode),this._editor.focus())}_layout(){let e=this._editor.getLayoutInfo(),t=Math.max(5,Math.min(t1.WIDTH,e.width-40)),i=Math.max(5,Math.min(t1.HEIGHT,e.height-40));this._domNode.setWidth(t),this._domNode.setHeight(i);let n=Math.round((e.height-i)/2);this._domNode.setTop(n);let s=Math.round((e.width-t)/2);this._domNode.setLeft(s)}};wg.ID="editor.contrib.accessibilityHelpWidget";wg.WIDTH=500;wg.HEIGHT=300;wg=R7([e1(1,Fe),e1(2,Qt),e1(3,Js)],wg);class Sme extends Se{constructor(){super({id:"editor.action.showAccessibilityHelp",label:yi.showAccessibilityHelpAction,alias:"Show Accessibility Help",precondition:void 0,kbOpts:{primary:512|59,weight:100,linux:{primary:512|1024|59,secondary:[512|59]}}})}run(e,t){let i=Qu.get(t);i&&i.show()}}wt(Qu.ID,Qu);me(Sme);const Lme=en.bindToContribution(Qu.get);fe(new Lme({id:"closeAccessibilityHelp",precondition:M7,handler:r=>r.hide(),kbOpts:{weight:100+100,kbExpr:R.focus,primary:9,secondary:[1024|9]}}));Lt((r,e)=>{const t=r.getColor(Fr);t&&e.addRule(`.monaco-editor .accessibilityHelpWidget { background-color: ${t}; }`);const i=r.getColor(Ya);i&&e.addRule(`.monaco-editor .accessibilityHelpWidget { color: ${i}; }`);const n=r.getColor(sc);n&&e.addRule(`.monaco-editor .accessibilityHelpWidget { box-shadow: 0 2px 8px ${n}; }`);const s=r.getColor(_i);s&&e.addRule(`.monaco-editor .accessibilityHelpWidget { border: 2px solid ${s}; }`)});class _A extends Y{constructor(e){super();this.editor=e,this.widget=null,No&&(this._register(e.onDidChangeConfiguration(()=>this.update())),this.update())}update(){const e=!this.editor.getOption(80);!this.widget&&e?this.widget=new i1(this.editor):this.widget&&!e&&(this.widget.dispose(),this.widget=null)}dispose(){super.dispose(),this.widget&&(this.widget.dispose(),this.widget=null)}}_A.ID="editor.contrib.iPadShowKeyboard";class i1 extends Y{constructor(e){super();this.editor=e,this._domNode=document.createElement("textarea"),this._domNode.className="iPadShowKeyboard",this._register(J(this._domNode,"touchstart",t=>{this.editor.focus()})),this._register(J(this._domNode,"focus",t=>{this.editor.focus()})),this.editor.addOverlayWidget(this)}dispose(){this.editor.removeOverlayWidget(this),super.dispose()}getId(){return i1.ID}getDomNode(){return this._domNode}getPosition(){return{preference:1}}}i1.ID="editor.contrib.ShowKeyboardWidget";wt(_A.ID,_A);var xme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},O7=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let yg=class F7 extends Y{constructor(e,t,i){super();this._editor=e,this._modeService=i,this._widget=null,this._register(this._editor.onDidChangeModel(n=>this.stop())),this._register(this._editor.onDidChangeModelLanguage(n=>this.stop())),this._register(ti.onDidChange(n=>this.stop())),this._register(this._editor.onKeyUp(n=>n.keyCode===9&&this.stop()))}static get(e){return e.getContribution(F7.ID)}dispose(){this.stop(),super.dispose()}launch(){this._widget||!this._editor.hasModel()||(this._widget=new n1(this._editor,this._modeService))}stop(){this._widget&&(this._widget.dispose(),this._widget=null)}};yg.ID="editor.contrib.inspectTokens";yg=xme([O7(1,au),O7(2,Ds)],yg);class kme extends Se{constructor(){super({id:"editor.action.inspectTokens",label:dk.inspectTokensAction,alias:"Developer: Inspect Tokens",precondition:void 0})}run(e,t){let i=yg.get(t);i&&i.launch()}}function Dme(r){let e="";for(let t=0,i=r.length;t<i;t++){let n=r.charCodeAt(t);switch(n){case 9:e+="\u2192";break;case 32:e+="\xB7";break;default:e+=String.fromCharCode(n)}}return e}function Eme(r){let e=ti.get(r.language);return e||{getInitialState:()=>Lp,tokenize:(t,i,n,s)=>z2(r.language,t,n,s),tokenize2:(t,i,n,s)=>Sx(r.id,t,n,s)}}class n1 extends Y{constructor(e,t){super();this.allowEditorOverflow=!0,this._editor=e,this._modeService=t,this._model=this._editor.getModel(),this._domNode=document.createElement("div"),this._domNode.className="tokens-inspect-widget",this._tokenizationSupport=Eme(this._model.getLanguageIdentifier()),this._compute(this._editor.getPosition()),this._register(this._editor.onDidChangeCursorPosition(i=>this._compute(this._editor.getPosition()))),this._editor.addContentWidget(this)}dispose(){this._editor.removeContentWidget(this),super.dispose()}getId(){return n1._ID}_compute(e){let t=this._getTokensAtLine(e.lineNumber),i=0;for(let l=t.tokens1.length-1;l>=0;l--){let c=t.tokens1[l];if(e.column-1>=c.offset){i=l;break}}let n=0;for(let l=t.tokens2.length>>>1;l>=0;l--)if(e.column-1>=t.tokens2[l<<1]){n=l;break}let s=this._model.getLineContent(e.lineNumber),o="";if(i<t.tokens1.length){let l=t.tokens1[i].offset,c=i+1<t.tokens1.length?t.tokens1[i+1].offset:s.length;o=s.substring(l,c)}zl(this._domNode,oe("h2.tm-token",void 0,Dme(o),oe("span.tm-token-length",void 0,`${o.length} ${o.length===1?"char":"chars"}`))),X(this._domNode,oe("hr.tokens-inspect-separator",{style:"clear:both"}));const a=(n<<1)+1<t.tokens2.length?this._decodeMetadata(t.tokens2[(n<<1)+1]):null;X(this._domNode,oe("table.tm-metadata-table",void 0,oe("tbody",void 0,oe("tr",void 0,oe("td.tm-metadata-key",void 0,"language"),oe("td.tm-metadata-value",void 0,`${a?a.languageIdentifier.language:"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"token type"),oe("td.tm-metadata-value",void 0,`${a?this._tokenTypeToString(a.tokenType):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"font style"),oe("td.tm-metadata-value",void 0,`${a?this._fontStyleToString(a.fontStyle):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"foreground"),oe("td.tm-metadata-value",void 0,`${a?K.Format.CSS.formatHex(a.foreground):"-?-"}`)),oe("tr",void 0,oe("td.tm-metadata-key",void 0,"background"),oe("td.tm-metadata-value",void 0,`${a?K.Format.CSS.formatHex(a.background):"-?-"}`))))),X(this._domNode,oe("hr.tokens-inspect-separator")),i<t.tokens1.length&&X(this._domNode,oe("span.tm-token-type",void 0,t.tokens1[i].type)),this._editor.layoutContentWidget(this)}_decodeMetadata(e){let t=ti.getColorMap(),i=xn.getLanguageId(e),n=xn.getTokenType(e),s=xn.getFontStyle(e),o=xn.getForeground(e),a=xn.getBackground(e);return{languageIdentifier:this._modeService.getLanguageIdentifier(i),tokenType:n,fontStyle:s,foreground:t[o],background:t[a]}}_tokenTypeToString(e){switch(e){case 0:return"Other";case 1:return"Comment";case 2:return"String";case 4:return"RegEx";default:return"??"}}_fontStyleToString(e){let t="";return e&1&&(t+="italic "),e&2&&(t+="bold "),e&4&&(t+="underline "),t.length===0&&(t="---"),t}_getTokensAtLine(e){let t=this._getStateBeforeLine(e),i=this._tokenizationSupport.tokenize(this._model.getLineContent(e),!0,t,0),n=this._tokenizationSupport.tokenize2(this._model.getLineContent(e),!0,t,0);return{startState:t,tokens1:i.tokens,tokens2:n.tokens,endState:i.endState}}_getStateBeforeLine(e){let t=this._tokenizationSupport.getInitialState();for(let i=1;i<e;i++)t=this._tokenizationSupport.tokenize(this._model.getLineContent(i),!0,t,0).endState;return t}getDomNode(){return this._domNode}getPosition(){return{position:this._editor.getPosition(),preference:[2,1]}}}n1._ID="editor.contrib.inspectTokensWidget";wt(yg.ID,yg);me(kme);Lt((r,e)=>{const t=r.getColor(sD);if(t){let s=r.type===is.HIGH_CONTRAST?2:1;e.addRule(`.monaco-editor .tokens-inspect-widget { border: ${s}px solid ${t}; }`),e.addRule(`.monaco-editor .tokens-inspect-widget .tokens-inspect-separator { background-color: ${t}; }`)}const i=r.getColor(Vh);i&&e.addRule(`.monaco-editor .tokens-inspect-widget { background-color: ${i}; }`);const n=r.getColor(rD);n&&e.addRule(`.monaco-editor .tokens-inspect-widget { color: ${n}; }`)});var Ime=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Nme=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let r1=class s1{constructor(e){this.quickInputService=e,this.registry=mi.as(yu.Quickaccess)}provide(e){const t=new le;t.add(e.onDidAccept(()=>{const[s]=e.selectedItems;s&&this.quickInputService.quickAccess.show(s.prefix,{preserveValue:!0})})),t.add(e.onDidChangeValue(s=>{const o=this.registry.getQuickAccessProvider(s.substr(s1.PREFIX.length));o&&o.prefix&&o.prefix!==s1.PREFIX&&this.quickInputService.quickAccess.show(o.prefix,{preserveValue:!0})}));const{editorProviders:i,globalProviders:n}=this.getQuickAccessProviders();return e.items=i.length===0||n.length===0?[...i.length===0?n:i]:[{label:m("globalCommands","global commands"),type:"separator"},...n,{label:m("editorCommands","editor commands"),type:"separator"},...i],t}getQuickAccessProviders(){const e=[],t=[];for(const i of this.registry.getQuickAccessProviders().sort((n,s)=>n.prefix.localeCompare(s.prefix)))if(i.prefix!==s1.PREFIX)for(const n of i.helpEntries){const s=n.prefix||i.prefix,o=s||"\u2026";(n.needsEditor?t:e).push({prefix:s,label:o,ariaLabel:m("helpPickAriaLabel","{0}, {1}",o,n.description),description:n.description})}return{editorProviders:t,globalProviders:e}}};r1.PREFIX="?";r1=Ime([Nme(0,kc)],r1);mi.as(yu.Quickaccess).registerQuickAccessProvider({ctor:r1,prefix:"",helpEntries:[{description:fk.helpQuickAccessActionLabel,needsEditor:!0}]});class B7{constructor(e){this.options=e,this.rangeHighlightDecorationId=void 0}provide(e,t){var i;const n=new le;e.canAcceptInBackground=!!((i=this.options)===null||i===void 0?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;const s=n.add(new An);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){const i=new le,n=this.activeTextEditorControl;if(n&&this.canProvideWithTextEditor(n)){const s={editor:n},o=kP(n);if(o){let a=Rr(n.saveViewState());i.add(o.onDidChangeCursorPosition(()=>{a=Rr(n.saveViewState())})),s.restoreViewState=()=>{a&&n===this.activeTextEditorControl&&n.restoreViewState(a)},i.add(Na(t.onCancellationRequested)(()=>{var l;return(l=s.restoreViewState)===null||l===void 0?void 0:l.call(s)}))}i.add(Xe(()=>this.clearDecorations(n))),i.add(this.provideWithTextEditor(s,e,t))}else i.add(this.provideWithoutTextEditor(e,t));return i}canProvideWithTextEditor(e){return!0}gotoLocation({editor:e},t){e.setSelection(t.range),e.revealRangeInCenter(t.range,0),t.preserveFocus||e.focus()}getModel(e){var t;return xP(e)?(t=e.getModel())===null||t===void 0?void 0:t.modified:e.getModel()}addDecorations(e,t){e.changeDecorations(i=>{const n=[];this.rangeHighlightDecorationId&&(n.push(this.rangeHighlightDecorationId.overviewRulerDecorationId),n.push(this.rangeHighlightDecorationId.rangeHighlightId),this.rangeHighlightDecorationId=void 0);const s=[{range:t,options:{description:"quick-access-range-highlight",className:"rangeHighlight",isWholeLine:!0}},{range:t,options:{description:"quick-access-range-highlight-overview",overviewRuler:{color:ui(mQ),position:Mr.Full}}}],[o,a]=i.deltaDecorations(n,s);this.rangeHighlightDecorationId={rangeHighlightId:o,overviewRulerDecorationId:a}})}clearDecorations(e){const t=this.rangeHighlightDecorationId;t&&(e.changeDecorations(i=>{i.deltaDecorations([t.overviewRulerDecorationId,t.rangeHighlightId],[])}),this.rangeHighlightDecorationId=void 0)}}class o1 extends B7{constructor(){super({canAcceptInBackground:!0})}provideWithoutTextEditor(e){const t=m("cannotRunGotoLine","Open a text editor first to go to a line.");return e.items=[{label:t}],e.ariaLabel=t,Y.None}provideWithTextEditor(e,t,i){const n=e.editor,s=new le;s.add(t.onDidAccept(l=>{const[c]=t.selectedItems;if(c){if(!this.isValidLineNumber(n,c.lineNumber))return;this.gotoLocation(e,{range:this.toRange(c.lineNumber,c.column),keyMods:t.keyMods,preserveFocus:l.inBackground}),l.inBackground||t.hide()}}));const o=()=>{const l=this.parsePosition(n,t.value.trim().substr(o1.PREFIX.length)),c=this.getPickLabel(n,l.lineNumber,l.column);if(t.items=[{lineNumber:l.lineNumber,column:l.column,label:c}],t.ariaLabel=c,!this.isValidLineNumber(n,l.lineNumber)){this.clearDecorations(n);return}const h=this.toRange(l.lineNumber,l.column);n.revealRangeInCenter(h,0),this.addDecorations(n,h)};o(),s.add(t.onDidChangeValue(()=>o()));const a=kP(n);return a&&a.getOptions().get(59).renderType===2&&(a.updateOptions({lineNumbers:"on"}),s.add(Xe(()=>a.updateOptions({lineNumbers:"relative"})))),s}toRange(e=1,t=1){return{startLineNumber:e,startColumn:t,endLineNumber:e,endColumn:t}}parsePosition(e,t){const i=t.split(/,|:|#/).map(s=>parseInt(s,10)).filter(s=>!isNaN(s)),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)?m("gotoLineColumnLabel","Go to line {0} and character {1}.",t,i):m("gotoLineLabel","Go to line {0}.",t);const n=e.getPosition()||{lineNumber:1,column:1},s=this.lineCount(e);return s>1?m("gotoLineLabelEmptyWithLimit","Current Line: {0}, Character: {1}. Type a line number between 1 and {2} to navigate to.",n.lineNumber,n.column,s):m("gotoLineLabelEmpty","Current Line: {0}, Character: {1}. Type a line number to navigate to.",n.lineNumber,n.column)}isValidLineNumber(e,t){return!t||typeof t!="number"?!1:t>0&&t<=this.lineCount(e)}isValidColumn(e,t,i){if(!i||typeof i!="number")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(i=(t=this.getModel(e))===null||t===void 0?void 0:t.getLineCount())!==null&&i!==void 0?i:0}}o1.PREFIX=":";var Tme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ame=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let j_=class extends o1{constructor(e){super();this.editorService=e,this.onDidActiveTextEditorControlChange=ke.None}get activeTextEditorControl(){return Rr(this.editorService.getFocusedCodeEditor())}};j_=Tme([Ame(0,Ct)],j_);mi.as(yu.Quickaccess).registerQuickAccessProvider({ctor:j_,prefix:j_.PREFIX,helpEntries:[{description:_C.gotoLineActionLabel,needsEditor:!0}]});class Rme extends Se{constructor(){super({id:"editor.action.gotoLine",label:_C.gotoLineActionLabel,alias:"Go to Line/Column...",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:2048|37,mac:{primary:256|37},weight:100}})}run(e){e.get(kc).quickAccess.show(j_.PREFIX)}}me(Rme);const W7=[void 0,[]];function bA(r,e,t=0,i=0){const n=e;return n.values&&n.values.length>1?Mme(r,n.values,t,i):V7(r,e,t,i)}function Mme(r,e,t,i){let n=0;const s=[];for(const o of e){const[a,l]=V7(r,o,t,i);if(typeof a!="number")return W7;n+=a,s.push(...l)}return[n,Pme(s)]}function V7(r,e,t,i){const n=Of(e.original,e.originalLowercase,t,r,r.toLowerCase(),i,!0);return n?[n[0],Zw(n)]:W7}function Pme(r){const e=r.sort((n,s)=>n.start-s.start),t=[];let i;for(const n of e)!i||!Ome(i,n)?(i=n,t.push(n)):(i.start=Math.min(i.start,n.start),i.end=Math.max(i.end,n.end));return t}function Ome(r,e){return!(r.end<e.start||e.end<r.start)}function H7(r){return r.startsWith('"')&&r.endsWith('"')}const z7=" ";function vA(r){typeof r!="string"&&(r="");const e=r.toLowerCase(),{pathNormalized:t,normalized:i,normalizedLowercase:n}=$7(r),s=t.indexOf(fh)>=0,o=H7(r);let a;const l=r.split(z7);if(l.length>1)for(const c of l){const h=H7(c),{pathNormalized:u,normalized:d,normalizedLowercase:f}=$7(c);d&&(a||(a=[]),a.push({original:c,originalLowercase:c.toLowerCase(),pathNormalized:u,normalized:d,normalizedLowercase:f,expectContiguousMatch:h}))}return{original:r,originalLowercase:e,pathNormalized:t,normalized:i,normalizedLowercase:n,values:a,containsPathSeparator:s,expectContiguousMatch:o}}function $7(r){let e;Xi?e=r.replace(/\//g,fh):e=r.replace(/\\/g,fh);const t=Hj(e).replace(/\s|"/g,"");return{pathNormalized:e,normalized:t,normalizedLowercase:t.toLowerCase()}}function U7(r){return Array.isArray(r)?vA(r.map(e=>e.original).join(z7)):vA(r.original)}var K_=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};class gs extends B7{constructor(e=Object.create(null)){super(e);this.options=e,this.options.canAcceptInBackground=!0}provideWithoutTextEditor(e){return this.provideLabelPick(e,m("cannotRunGotoSymbolWithoutEditor","To go to a symbol, first open a text editor with symbol information.")),Y.None}provideWithTextEditor(e,t,i){const n=e.editor,s=this.getModel(n);return s?xs.has(s)?this.doProvideWithEditorSymbols(e,s,t,i):this.doProvideWithoutEditorSymbols(e,s,t,i):Y.None}doProvideWithoutEditorSymbols(e,t,i,n){const s=new le;return this.provideLabelPick(i,m("cannotRunGotoSymbolWithoutSymbolProvider","The active text editor does not provide symbol information.")),(()=>K_(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 K_(this,void 0,void 0,function*(){if(xs.has(e))return!0;let i;const n=new Promise(o=>i=o),s=t.add(xs.onDidChange(()=>{xs.has(e)&&(s.dispose(),i(!0))}));return t.add(Xe(()=>i(!1))),n})}doProvideWithEditorSymbols(e,t,i,n){const s=e.editor,o=new le;o.add(i.onDidAccept(u=>{const[d]=i.selectedItems;d&&d.range&&(this.gotoLocation(e,{range:d.range.selection,keyMods:i.keyMods,preserveFocus:u.inBackground}),u.inBackground||i.hide())})),o.add(i.onDidTriggerItemButton(({item:u})=>{u&&u.range&&(this.gotoLocation(e,{range:u.range.selection,keyMods:i.keyMods,forceSideBySide:!0}),i.hide())}));const a=this.getDocumentSymbols(t,n);let l;const c=()=>K_(this,void 0,void 0,function*(){l==null||l.dispose(!0),i.busy=!1,l=new Rn(n),i.busy=!0;try{const u=vA(i.value.substr(gs.PREFIX.length).trim()),d=yield this.doGetSymbolPicks(a,u,void 0,l.token);if(n.isCancellationRequested)return;d.length>0?i.items=d:u.original.length>0?this.provideLabelPick(i,m("noMatchingSymbolResults","No matching editor symbols")):this.provideLabelPick(i,m("noSymbolResults","No editor symbols"))}finally{n.isCancellationRequested||(i.busy=!1)}});o.add(i.onDidChangeValue(()=>c())),c();let h=!0;return o.add(i.onDidChangeActive(()=>{const[u]=i.activeItems;if(u&&u.range){if(h){h=!1;return}s.revealRangeInCenter(u.range.selection,0),this.addDecorations(s,u.range.decoration)}})),o}doGetSymbolPicks(e,t,i,n){return K_(this,void 0,void 0,function*(){const s=yield e;if(n.isCancellationRequested)return[];const o=t.original.indexOf(gs.SCOPE_PREFIX)===0,a=o?1:0;let l,c;t.values&&t.values.length>1?(l=U7(t.values[0]),c=U7(t.values.slice(1))):l=t;const h=[];for(let f=0;f<s.length;f++){const g=s[f],p=Wj(g.name),_=`$(symbol-${bx.toString(g.kind)||"property"}) ${p}`,v=_.length-p.length;let b=g.containerName;(i==null?void 0:i.extraContainerLabel)&&(b?b=`${i.extraContainerLabel} \u2022 ${b}`:b=i.extraContainerLabel);let C,y,x,S;if(t.original.length>a){let L=!1;if(l!==t&&([C,y]=bA(_,Object.assign(Object.assign({},t),{values:void 0}),a,v),typeof C=="number"&&(L=!0)),typeof C!="number"&&([C,y]=bA(_,l,a,v),typeof C!="number"))continue;if(!L&&c){if(b&&c.original.length>0&&([x,S]=bA(b,c)),typeof x!="number")continue;typeof C=="number"&&(C+=x)}}const w=g.tags&&g.tags.indexOf(1)>=0;h.push({index:f,kind:g.kind,score:C,label:_,ariaLabel:p,description:b,highlights:w?void 0:{label:y,description:S},range:{selection:k.collapseToStart(g.selectionRange),decoration:g.range},strikethrough:w,buttons:(()=>{var L,N;const P=((L=this.options)===null||L===void 0?void 0:L.openSideBySideDirection)?(N=this.options)===null||N===void 0?void 0:N.openSideBySideDirection():void 0;if(!!P)return[{iconClass:P==="right"?ve.splitHorizontal.classNames:ve.splitVertical.classNames,tooltip:P==="right"?m("openToSide","Open to the Side"):m("openToBottom","Open to the Bottom")}]})()})}const u=h.sort((f,g)=>o?this.compareByKindAndScore(f,g):this.compareByScore(f,g));let d=[];if(o){let _=function(){g&&typeof f=="number"&&p>0&&(g.label=gn(wA[f]||CA,p))},f,g,p=0;for(const v of u)f!==v.kind?(_(),f=v.kind,p=1,g={type:"separator"},d.push(g)):p++,d.push(v);_()}else u.length>0&&(d=[{label:m("symbols","symbols ({0})",h.length),type:"separator"},...u]);return d})}compareByScore(e,t){if(typeof e.score!="number"&&typeof t.score=="number")return 1;if(typeof e.score=="number"&&typeof t.score!="number")return-1;if(typeof e.score=="number"&&typeof t.score=="number"){if(e.score>t.score)return-1;if(e.score<t.score)return 1}return e.index<t.index?-1:e.index>t.index?1:0}compareByKindAndScore(e,t){const i=wA[e.kind]||CA,n=wA[t.kind]||CA,s=i.localeCompare(n);return s===0?this.compareByScore(e,t):s}getDocumentSymbols(e,t){return K_(this,void 0,void 0,function*(){const i=yield $n.create(e,t);return t.isCancellationRequested?[]:i.asListOfDocumentSymbols()})}}gs.PREFIX="@";gs.SCOPE_PREFIX=":";gs.PREFIX_BY_CATEGORY=`${gs.PREFIX}${gs.SCOPE_PREFIX}`;const CA=m("property","properties ({0})"),wA={[5]:m("method","methods ({0})"),[11]:m("function","functions ({0})"),[8]:m("_constructor","constructors ({0})"),[12]:m("variable","variables ({0})"),[4]:m("class","classes ({0})"),[22]:m("struct","structs ({0})"),[23]:m("event","events ({0})"),[24]:m("operator","operators ({0})"),[10]:m("interface","interfaces ({0})"),[2]:m("namespace","namespaces ({0})"),[3]:m("package","packages ({0})"),[25]:m("typeParameter","type parameters ({0})"),[1]:m("modules","modules ({0})"),[6]:m("property","properties ({0})"),[9]:m("enum","enumerations ({0})"),[21]:m("enumMember","enumeration members ({0})"),[14]:m("string","strings ({0})"),[0]:m("file","files ({0})"),[17]:m("array","arrays ({0})"),[15]:m("number","numbers ({0})"),[16]:m("boolean","booleans ({0})"),[18]:m("object","objects ({0})"),[19]:m("key","keys ({0})"),[7]:m("field","fields ({0})"),[13]:m("constant","constants ({0})")};var Fme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Bme=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let yA=class extends gs{constructor(e){super();this.editorService=e,this.onDidActiveTextEditorControlChange=ke.None}get activeTextEditorControl(){return Rr(this.editorService.getFocusedCodeEditor())}};yA=Fme([Bme(0,Ct)],yA);mi.as(yu.Quickaccess).registerQuickAccessProvider({ctor:yA,prefix:gs.PREFIX,helpEntries:[{description:Fp.quickOutlineActionLabel,prefix:gs.PREFIX,needsEditor:!0},{description:Fp.quickOutlineByCategoryActionLabel,prefix:gs.PREFIX_BY_CATEGORY,needsEditor:!0}]});class Wme extends Se{constructor(){super({id:"editor.action.quickOutline",label:Fp.quickOutlineActionLabel,alias:"Go to Symbol...",precondition:R.hasDocumentSymbolProvider,kbOpts:{kbExpr:R.focus,primary:2048|1024|45,weight:100},contextMenuOpts:{group:"navigation",order:3}})}run(e){e.get(kc).quickAccess.show(gs.PREFIX)}}me(Wme);function SA(r,e){return e&&(r.stack||r.stacktrace)?m("stackTrace.format","{0}: {1}",K7(r),j7(r.stack)||j7(r.stacktrace)):K7(r)}function j7(r){return Array.isArray(r)?r.join(` -`):r}function K7(r){return typeof r.code=="string"&&typeof r.errno=="number"&&typeof r.syscall=="string"?m("nodeExceptionMessage","A system error occurred ({0})",r.message):r.message||m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}function q7(r=null,e=!1){if(!r)return m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.");if(Array.isArray(r)){const t=xh(r),i=q7(t[0],e);return t.length>1?m("error.moreErrors","{0} ({1} errors in total)",i,t.length):i}if(ys(r))return r;if(r.detail){const t=r.detail;if(t.error)return SA(t.error,e);if(t.exception)return SA(t.exception,e)}return r.stack?SA(r,e):r.message?r.message:m("error.defaultMessage","An unknown error occurred. Please consult the log for more details.")}var a1=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Sg;(function(r){r[r.NO_ACTION=0]="NO_ACTION",r[r.CLOSE_PICKER=1]="CLOSE_PICKER",r[r.REFRESH_PICKER=2]="REFRESH_PICKER",r[r.REMOVE_ITEM=3]="REMOVE_ITEM"})(Sg||(Sg={}));function LA(r){const e=r;return Array.isArray(e.items)}function Vme(r){const e=r;return!!e.picks&&e.additionalPicks instanceof Promise}class l1 extends Y{constructor(e,t){super();this.prefix=e,this.options=t}provide(e,t){var i;const n=new le;e.canAcceptInBackground=!!((i=this.options)===null||i===void 0?void 0:i.canAcceptInBackground),e.matchOnLabel=e.matchOnDescription=e.matchOnDetail=e.sortByLabel=!1;let s;const o=n.add(new An),a=()=>a1(this,void 0,void 0,function*(){const l=o.value=new le;s==null||s.dispose(!0),e.busy=!1,s=new Rn(t);const c=s.token,h=e.value.substr(this.prefix.length).trim(),u=this._getPicks(h,l,c),d=(f,g)=>{var p;let _,v;if(LA(f)?(_=f.items,v=f.active):_=f,_.length===0){if(g)return!1;h.length>0&&((p=this.options)===null||p===void 0?void 0:p.noResultsPick)&&(_=[this.options.noResultsPick])}return e.items=_,v&&(e.activeItems=[v]),!0};if(u!==null)if(Vme(u)){let f=!1,g=!1;yield Promise.all([(()=>a1(this,void 0,void 0,function*(){yield Hl(l1.FAST_PICKS_RACE_DELAY),!c.isCancellationRequested&&(g||(f=d(u.picks,!0)))}))(),(()=>a1(this,void 0,void 0,function*(){e.busy=!0;try{const p=yield u.additionalPicks;if(c.isCancellationRequested)return;let _,v;LA(u.picks)?(_=u.picks.items,v=u.picks.active):_=u.picks;let b,C;if(LA(p)?(b=p.items,C=p.active):b=p,b.length>0||!f){let y;if(!v&&!C){const x=e.activeItems[0];x&&_.indexOf(x)!==-1&&(y=x)}d({items:[..._,...b],active:v||C||y})}}finally{c.isCancellationRequested||(e.busy=!1),g=!0}}))()])}else if(!(u instanceof Promise))d(u);else{e.busy=!0;try{const f=yield u;if(c.isCancellationRequested)return;d(f)}finally{c.isCancellationRequested||(e.busy=!1)}}});return n.add(e.onDidChangeValue(()=>a())),a(),n.add(e.onDidAccept(l=>{const[c]=e.selectedItems;typeof(c==null?void 0:c.accept)=="function"&&(l.inBackground||e.hide(),c.accept(e.keyMods,l))})),n.add(e.onDidTriggerItemButton(({button:l,item:c})=>a1(this,void 0,void 0,function*(){var h,u;if(typeof c.trigger=="function"){const d=(u=(h=c.buttons)===null||h===void 0?void 0:h.indexOf(l))!==null&&u!==void 0?u:-1;if(d>=0){const f=c.trigger(d,e.keyMods),g=typeof f=="number"?f:yield f;if(t.isCancellationRequested)return;switch(g){case Sg.NO_ACTION:break;case Sg.CLOSE_PICKER:e.hide();break;case Sg.REFRESH_PICKER:a();break;case Sg.REMOVE_ITEM:const p=e.items.indexOf(c);if(p!==-1){const _=e.items.slice(),v=_.splice(p,1),b=e.activeItems.filter(y=>y!==v[0]),C=e.keepScrollPosition;e.keepScrollPosition=!0,e.items=_,b&&(e.activeItems=b),e.keepScrollPosition=C}break}}}}))),n}}l1.FAST_PICKS_RACE_DELAY=200;var G7=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Ju=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},Z7=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let q_=class c1 extends l1{constructor(e,t,i,n,s,o){super(c1.PREFIX,e);this.instantiationService=t,this.keybindingService=i,this.commandService=n,this.telemetryService=s,this.dialogService=o,this.commandsHistory=this._register(this.instantiationService.createInstance(ed)),this.options=e}_getPicks(e,t,i){return Z7(this,void 0,void 0,function*(){const n=yield this.getCommandPicks(t,i);if(i.isCancellationRequested)return[];const s=[];for(const c of n){const h=Rr(c1.WORD_FILTER(e,c.label)),u=c.commandAlias?Rr(c1.WORD_FILTER(e,c.commandAlias)):void 0;h||u?(c.highlights={label:h,detail:this.options.showAlias?u:void 0},s.push(c)):e===c.commandId&&s.push(c)}const o=new Map;for(const c of s){const h=o.get(c.label);h?(c.description=c.commandId,h.description=h.commandId):o.set(c.label,c)}s.sort((c,h)=>{const u=this.commandsHistory.peek(c.commandId),d=this.commandsHistory.peek(h.commandId);return u&&d?u>d?-1:1:u?-1:d?1:c.label.localeCompare(h.label)});const a=[];let l=!1;for(let c=0;c<s.length;c++){const h=s[c],u=this.keybindingService.lookupKeybinding(h.commandId),d=u?m("commandPickAriaLabelWithKeybinding","{0}, {1}",h.label,u.getAriaLabel()):h.label;c===0&&this.commandsHistory.peek(h.commandId)&&(a.push({type:"separator",label:m("recentlyUsed","recently used")}),l=!0),c!==0&&l&&!this.commandsHistory.peek(h.commandId)&&(a.push({type:"separator",label:m("morecCommands","other commands")}),l=!1),a.push(Object.assign(Object.assign({},h),{ariaLabel:d,detail:this.options.showAlias&&h.commandAlias!==h.label?h.commandAlias:void 0,keybinding:u,accept:()=>Z7(this,void 0,void 0,function*(){this.commandsHistory.push(h.commandId),this.telemetryService.publicLog2("workbenchActionExecuted",{id:h.commandId,from:"quick open"});try{yield this.commandService.executeCommand(h.commandId)}catch(f){Ro(f)||this.dialogService.show(si.Error,m("canNotRun","Command '{0}' resulted in an error ({1})",h.label,q7(f)))}})}))}return a})}};q_.PREFIX=">";q_.WORD_FILTER=IE(Kw,Jie,Q4);q_=G7([Ju(1,ut),Ju(2,Qt),Ju(3,fi),Ju(4,ec),Ju(5,Hm)],q_);let ed=class Vi extends Y{constructor(e,t){super();this.storageService=e,this.configurationService=t,this.configuredCommandsHistoryLength=0,this.updateConfiguration(),this.load(),this.registerListeners()}registerListeners(){this._register(this.configurationService.onDidChangeConfiguration(()=>this.updateConfiguration()))}updateConfiguration(){this.configuredCommandsHistoryLength=Vi.getConfiguredCommandHistoryLength(this.configurationService),Vi.cache&&Vi.cache.limit!==this.configuredCommandsHistoryLength&&(Vi.cache.limit=this.configuredCommandsHistoryLength,Vi.saveState(this.storageService))}load(){const e=this.storageService.get(Vi.PREF_KEY_CACHE,0);let t;if(e)try{t=JSON.parse(e)}catch{}const i=Vi.cache=new $l(this.configuredCommandsHistoryLength,1);if(t){let n;t.usesLRU?n=t.entries:n=t.entries.sort((s,o)=>s.value-o.value),n.forEach(s=>i.set(s.key,s.value))}Vi.counter=this.storageService.getNumber(Vi.PREF_KEY_COUNTER,0,Vi.counter)}push(e){!Vi.cache||(Vi.cache.set(e,Vi.counter++),Vi.saveState(this.storageService))}peek(e){var t;return(t=Vi.cache)===null||t===void 0?void 0:t.peek(e)}static saveState(e){if(!Vi.cache)return;const t={usesLRU:!0,entries:[]};Vi.cache.forEach((i,n)=>t.entries.push({key:n,value:i})),e.store(Vi.PREF_KEY_CACHE,JSON.stringify(t),0,0),e.store(Vi.PREF_KEY_COUNTER,Vi.counter,0,0)}static getConfiguredCommandHistoryLength(e){var t,i;const s=(i=(t=e.getValue().workbench)===null||t===void 0?void 0:t.commandPalette)===null||i===void 0?void 0:i.history;return typeof s=="number"?s:Vi.DEFAULT_COMMANDS_HISTORY_LENGTH}};ed.DEFAULT_COMMANDS_HISTORY_LENGTH=50;ed.PREF_KEY_CACHE="commandPalette.mru.cache";ed.PREF_KEY_COUNTER="commandPalette.mru.counter";ed.counter=1;ed=G7([Ju(0,aa),Ju(1,hi)],ed);class Hme extends q_{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:h5(i.label)||i.id});return t}}var zme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},Lg=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}},$me=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})};let G_=class extends Hme{constructor(e,t,i,n,s,o){super({showAlias:!1},e,i,n,s,o);this.codeEditorService=t}get activeTextEditorControl(){return Rr(this.codeEditorService.getFocusedCodeEditor())}getCommandPicks(){return $me(this,void 0,void 0,function*(){return this.getCodeEditorCommandPicks()})}};G_=zme([Lg(0,ut),Lg(1,Ct),Lg(2,Qt),Lg(3,fi),Lg(4,ec),Lg(5,Hm)],G_);mi.as(yu.Quickaccess).registerQuickAccessProvider({ctor:G_,prefix:G_.PREFIX,helpEntries:[{description:bC.quickCommandHelp,needsEditor:!0}]});class Ume extends Se{constructor(){super({id:"editor.action.quickCommand",label:bC.quickCommandActionLabel,alias:"Command Palette",precondition:void 0,kbOpts:{kbExpr:R.focus,primary:59,weight:100},contextMenuOpts:{group:"z_commands",order:1}})}run(e){e.get(kc).quickAccess.show(G_.PREFIX)}}me(Ume);var jme=globalThis&&globalThis.__decorate||function(r,e,t,i){var n=arguments.length,s=n<3?e:i===null?i=Object.getOwnPropertyDescriptor(e,t):i,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(r,e,t,i);else for(var a=r.length-1;a>=0;a--)(o=r[a])&&(s=(n<3?o(s):n>3?o(e,t,s):o(e,t))||s);return n>3&&s&&Object.defineProperty(e,t,s),s},xg=globalThis&&globalThis.__param||function(r,e){return function(t,i){e(t,i,r)}};let xA=class extends Nc{constructor(e,t,i,n,s,o,a){super(!0,e,t,i,n,s,o,a)}};xA=jme([xg(1,Fe),xg(2,Ct),xg(3,Di),xg(4,ut),xg(5,aa),xg(6,hi)],xA);wt(Nc.ID,xA);class Kme extends Se{constructor(){super({id:"editor.action.toggleHighContrast",label:gk.toggleHighContrast,alias:"Toggle High Contrast Theme",precondition:void 0});this._originalThemeName=null}run(e,t){const i=e.get(au);this._originalThemeName?(i.setTheme(this._originalThemeName),this._originalThemeName=null):(this._originalThemeName=i.getColorTheme().themeName,i.setTheme("hc-black"))}}me(Kme);var $0e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",CancellationTokenSource:joe,Emitter:$f,KeyCode:Koe,KeyMod:qoe,Position:Goe,Range:dl,Selection:Zoe,SelectionDirection:Yoe,MarkerSeverity:nr,MarkerTag:ZI,Uri:Ec,Token:Xoe,editor:At,languages:pe});function U0e(){return new Worker("./assets/editor.worker.011634f6.js",{type:"module"})}function j0e(){return new Worker("./assets/json.worker.b78cae82.js",{type:"module"})}var qme=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Gme=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Zme=function(){function r(e,t){var i=this;this._modeId=e,this._defaults=t,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(function(){return i._stopWorker()}),this._updateExtraLibsToken=0,this._extraLibsChangeListener=this._defaults.onDidExtraLibsChange(function(){return i._updateExtraLibs()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){this._configChangeListener.dispose(),this._extraLibsChangeListener.dispose(),this._stopWorker()},r.prototype._updateExtraLibs=function(){return qme(this,void 0,void 0,function(){var e,t;return Gme(this,function(i){switch(i.label){case 0:return this._worker?(e=++this._updateExtraLibsToken,[4,this._worker.getProxy()]):[2];case 1:return t=i.sent(),this._updateExtraLibsToken!==e?[2]:(t.updateExtraLibs(this._defaults.getExtraLibs()),[2])}})})},r.prototype._getClient=function(){var e=this;if(!this._client){this._worker=At.createWebWorker({moduleId:"vs/language/typescript/tsWorker",label:this._modeId,keepIdleModels:!0,createData:{compilerOptions:this._defaults.getCompilerOptions(),extraLibs:this._defaults.getExtraLibs(),customWorkerPath:this._defaults.workerOptions.customWorkerPath,inlayHintsOptions:this._defaults.inlayHintsOptions}});var t=this._worker.getProxy();this._defaults.getEagerModelSync()&&(t=t.then(function(i){return e._worker?e._worker.withSyncedResources(At.getModels().filter(function(n){return n.getModeId()===e._modeId}).map(function(n){return n.uri})):i})),this._client=t}return this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){if(e._worker)return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}(),Ve={};Ve["lib.d.ts"]=!0;Ve["lib.dom.d.ts"]=!0;Ve["lib.dom.iterable.d.ts"]=!0;Ve["lib.es2015.collection.d.ts"]=!0;Ve["lib.es2015.core.d.ts"]=!0;Ve["lib.es2015.d.ts"]=!0;Ve["lib.es2015.generator.d.ts"]=!0;Ve["lib.es2015.iterable.d.ts"]=!0;Ve["lib.es2015.promise.d.ts"]=!0;Ve["lib.es2015.proxy.d.ts"]=!0;Ve["lib.es2015.reflect.d.ts"]=!0;Ve["lib.es2015.symbol.d.ts"]=!0;Ve["lib.es2015.symbol.wellknown.d.ts"]=!0;Ve["lib.es2016.array.include.d.ts"]=!0;Ve["lib.es2016.d.ts"]=!0;Ve["lib.es2016.full.d.ts"]=!0;Ve["lib.es2017.d.ts"]=!0;Ve["lib.es2017.full.d.ts"]=!0;Ve["lib.es2017.intl.d.ts"]=!0;Ve["lib.es2017.object.d.ts"]=!0;Ve["lib.es2017.sharedmemory.d.ts"]=!0;Ve["lib.es2017.string.d.ts"]=!0;Ve["lib.es2017.typedarrays.d.ts"]=!0;Ve["lib.es2018.asyncgenerator.d.ts"]=!0;Ve["lib.es2018.asynciterable.d.ts"]=!0;Ve["lib.es2018.d.ts"]=!0;Ve["lib.es2018.full.d.ts"]=!0;Ve["lib.es2018.intl.d.ts"]=!0;Ve["lib.es2018.promise.d.ts"]=!0;Ve["lib.es2018.regexp.d.ts"]=!0;Ve["lib.es2019.array.d.ts"]=!0;Ve["lib.es2019.d.ts"]=!0;Ve["lib.es2019.full.d.ts"]=!0;Ve["lib.es2019.object.d.ts"]=!0;Ve["lib.es2019.string.d.ts"]=!0;Ve["lib.es2019.symbol.d.ts"]=!0;Ve["lib.es2020.bigint.d.ts"]=!0;Ve["lib.es2020.d.ts"]=!0;Ve["lib.es2020.full.d.ts"]=!0;Ve["lib.es2020.intl.d.ts"]=!0;Ve["lib.es2020.promise.d.ts"]=!0;Ve["lib.es2020.sharedmemory.d.ts"]=!0;Ve["lib.es2020.string.d.ts"]=!0;Ve["lib.es2020.symbol.wellknown.d.ts"]=!0;Ve["lib.es2021.d.ts"]=!0;Ve["lib.es2021.full.d.ts"]=!0;Ve["lib.es2021.promise.d.ts"]=!0;Ve["lib.es2021.string.d.ts"]=!0;Ve["lib.es2021.weakref.d.ts"]=!0;Ve["lib.es5.d.ts"]=!0;Ve["lib.es6.d.ts"]=!0;Ve["lib.esnext.d.ts"]=!0;Ve["lib.esnext.full.d.ts"]=!0;Ve["lib.esnext.intl.d.ts"]=!0;Ve["lib.esnext.promise.d.ts"]=!0;Ve["lib.esnext.string.d.ts"]=!0;Ve["lib.esnext.weakref.d.ts"]=!0;Ve["lib.scripthost.d.ts"]=!0;Ve["lib.webworker.d.ts"]=!0;Ve["lib.webworker.importscripts.d.ts"]=!0;Ve["lib.webworker.iterable.d.ts"]=!0;var Kr=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),h1=globalThis&&globalThis.__assign||function(){return h1=Object.assign||function(r){for(var e,t=1,i=arguments.length;t<i;t++){e=arguments[t];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n])}return r},h1.apply(this,arguments)},Lr=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},xr=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},kA;(function(r){r[r.None=0]="None",r[r.Block=1]="Block",r[r.Smart=2]="Smart"})(kA||(kA={}));function DA(r,e,t){if(t===void 0&&(t=0),typeof r=="string")return r;if(r===void 0)return"";var i="";if(t){i+=e;for(var n=0;n<t;n++)i+=" "}if(i+=r.messageText,t++,r.next)for(var s=0,o=r.next;s<o.length;s++){var a=o[s];i+=DA(a,e,t)}return i}function wa(r){return r?r.map(function(e){return e.text}).join(""):""}var yo=function(){function r(e){this._worker=e}return r.prototype._textSpanToRange=function(e,t){var i=e.getPositionAt(t.start),n=e.getPositionAt(t.start+t.length),s=i.lineNumber,o=i.column,a=n.lineNumber,l=n.column;return{startLineNumber:s,startColumn:o,endLineNumber:a,endColumn:l}},r}(),Yme=function(){function r(e){this._worker=e,this._libFiles={},this._hasFetchedLibFiles=!1,this._fetchLibFilesPromise=null}return r.prototype.isLibFile=function(e){return e&&e.path.indexOf("/lib.")===0?!!Ve[e.path.slice(1)]:!1},r.prototype.getOrCreateModel=function(e){var t=Ec.parse(e),i=At.getModel(t);if(i)return i;if(this.isLibFile(t)&&this._hasFetchedLibFiles)return At.createModel(this._libFiles[t.path.slice(1)],"typescript",t);var n=eN.getExtraLibs()[e];return n?At.createModel(n.content,"typescript",t):null},r.prototype._containsLibFile=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t];if(this.isLibFile(n))return!0}return!1},r.prototype.fetchLibFilesIfNecessary=function(e){return Lr(this,void 0,void 0,function(){return xr(this,function(t){switch(t.label){case 0:return this._containsLibFile(e)?[4,this._fetchLibFiles()]:[2];case 1:return t.sent(),[2]}})})},r.prototype._fetchLibFiles=function(){var e=this;return this._fetchLibFilesPromise||(this._fetchLibFilesPromise=this._worker().then(function(t){return t.getLibFiles()}).then(function(t){e._hasFetchedLibFiles=!0,e._libFiles=t})),this._fetchLibFilesPromise},r}(),kg;(function(r){r[r.Warning=0]="Warning",r[r.Error=1]="Error",r[r.Suggestion=2]="Suggestion",r[r.Message=3]="Message"})(kg||(kg={}));var Xme=function(r){Kr(e,r);function e(t,i,n,s){var o=r.call(this,s)||this;o._libFiles=t,o._defaults=i,o._selector=n,o._disposables=[],o._listener=Object.create(null);var a=function(h){if(h.getModeId()===n){var u=function(){var p=o._defaults.getDiagnosticsOptions().onlyVisible;p?h.isAttachedToEditor()&&o._doValidate(h):o._doValidate(h)},d,f=h.onDidChangeContent(function(){clearTimeout(d),d=setTimeout(u,500)}),g=h.onDidChangeAttached(function(){var p=o._defaults.getDiagnosticsOptions().onlyVisible;p&&(h.isAttachedToEditor()?u():At.setModelMarkers(h,o._selector,[]))});o._listener[h.uri.toString()]={dispose:function(){f.dispose(),g.dispose(),clearTimeout(d)}},u()}},l=function(h){At.setModelMarkers(h,o._selector,[]);var u=h.uri.toString();o._listener[u]&&(o._listener[u].dispose(),delete o._listener[u])};o._disposables.push(At.onDidCreateModel(function(h){return a(h)})),o._disposables.push(At.onWillDisposeModel(l)),o._disposables.push(At.onDidChangeModelLanguage(function(h){l(h.model),a(h.model)})),o._disposables.push({dispose:function(){for(var h=0,u=At.getModels();h<u.length;h++){var d=u[h];l(d)}}});var c=function(){for(var h=0,u=At.getModels();h<u.length;h++){var d=u[h];l(d),a(d)}};return o._disposables.push(o._defaults.onDidChange(c)),o._disposables.push(o._defaults.onDidExtraLibsChange(c)),At.getModels().forEach(function(h){return a(h)}),o}return e.prototype.dispose=function(){this._disposables.forEach(function(t){return t&&t.dispose()}),this._disposables=[]},e.prototype._doValidate=function(t){return Lr(this,void 0,void 0,function(){var i,n,s,o,a,l,c,h,u,d=this;return xr(this,function(f){switch(f.label){case 0:return[4,this._worker(t.uri)];case 1:return i=f.sent(),t.isDisposed()?[2]:(n=[],s=this._defaults.getDiagnosticsOptions(),o=s.noSyntaxValidation,a=s.noSemanticValidation,l=s.noSuggestionDiagnostics,o||n.push(i.getSyntacticDiagnostics(t.uri.toString())),a||n.push(i.getSemanticDiagnostics(t.uri.toString())),l||n.push(i.getSuggestionDiagnostics(t.uri.toString())),[4,Promise.all(n)]);case 2:return c=f.sent(),!c||t.isDisposed()?[2]:(h=c.reduce(function(g,p){return p.concat(g)},[]).filter(function(g){return(d._defaults.getDiagnosticsOptions().diagnosticCodesToIgnore||[]).indexOf(g.code)===-1}),u=h.map(function(g){return g.relatedInformation||[]}).reduce(function(g,p){return p.concat(g)},[]).map(function(g){return g.file?Ec.parse(g.file.fileName):null}),[4,this._libFiles.fetchLibFilesIfNecessary(u)]);case 3:return f.sent(),t.isDisposed()?[2]:(At.setModelMarkers(t,this._selector,h.map(function(g){return d._convertDiagnostics(t,g)})),[2])}})})},e.prototype._convertDiagnostics=function(t,i){var n=i.start||0,s=i.length||1,o=t.getPositionAt(n),a=o.lineNumber,l=o.column,c=t.getPositionAt(n+s),h=c.lineNumber,u=c.column,d=[];return i.reportsUnnecessary&&d.push(ZI.Unnecessary),i.reportsDeprecated&&d.push(ZI.Deprecated),{severity:this._tsDiagnosticCategoryToMarkerSeverity(i.category),startLineNumber:a,startColumn:l,endLineNumber:h,endColumn:u,message:DA(i.messageText,` -`),code:i.code.toString(),tags:d,relatedInformation:this._convertRelatedInformation(t,i.relatedInformation)}},e.prototype._convertRelatedInformation=function(t,i){var n=this;if(!i)return[];var s=[];return i.forEach(function(o){var a=t;if(o.file&&(a=n._libFiles.getOrCreateModel(o.file.fileName)),!!a){var l=o.start||0,c=o.length||1,h=a.getPositionAt(l),u=h.lineNumber,d=h.column,f=a.getPositionAt(l+c),g=f.lineNumber,p=f.column;s.push({resource:a.uri,startLineNumber:u,startColumn:d,endLineNumber:g,endColumn:p,message:DA(o.messageText,` -`)})}}),s},e.prototype._tsDiagnosticCategoryToMarkerSeverity=function(t){switch(t){case kg.Error:return nr.Error;case kg.Message:return nr.Info;case kg.Warning:return nr.Warning;case kg.Suggestion:return nr.Hint}return nr.Info},e}(yo),Qme=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"triggerCharacters",{get:function(){return["."]},enumerable:!1,configurable:!0}),e.prototype.provideCompletionItems=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h,u,d;return xr(this,function(f){switch(f.label){case 0:return o=t.getWordUntilPosition(i),a=new dl(i.lineNumber,o.startColumn,i.lineNumber,o.endColumn),l=t.uri,c=t.getOffsetAt(i),[4,this._worker(l)];case 1:return h=f.sent(),t.isDisposed()?[2]:[4,h.getCompletionsAtPosition(l.toString(),c)];case 2:return u=f.sent(),!u||t.isDisposed()?[2]:(d=u.entries.map(function(g){var p,_=a;if(g.replacementSpan){var v=t.getPositionAt(g.replacementSpan.start),b=t.getPositionAt(g.replacementSpan.start+g.replacementSpan.length);_=new dl(v.lineNumber,v.column,b.lineNumber,b.column)}var C=[];return((p=g.kindModifiers)===null||p===void 0?void 0:p.indexOf("deprecated"))!==-1&&C.push(pe.CompletionItemTag.Deprecated),{uri:l,position:i,offset:c,range:_,label:g.name,insertText:g.name,sortText:g.sortText,kind:e.convertKind(g.kind),tags:C}}),[2,{suggestions:d}])}})})},e.prototype.resolveCompletionItem=function(t,i){return Lr(this,void 0,void 0,function(){var n,s,o,a,l,c;return xr(this,function(h){switch(h.label){case 0:return n=t,s=n.uri,o=n.position,a=n.offset,[4,this._worker(s)];case 1:return l=h.sent(),[4,l.getCompletionEntryDetails(s.toString(),a,n.label)];case 2:return c=h.sent(),c?[2,{uri:s,position:o,label:c.name,kind:e.convertKind(c.kind),detail:wa(c.displayParts),documentation:{value:e.createDocumentationString(c)}}]:[2,n]}})})},e.convertKind=function(t){switch(t){case Zt.primitiveType:case Zt.keyword:return pe.CompletionItemKind.Keyword;case Zt.variable:case Zt.localVariable:return pe.CompletionItemKind.Variable;case Zt.memberVariable:case Zt.memberGetAccessor:case Zt.memberSetAccessor:return pe.CompletionItemKind.Field;case Zt.function:case Zt.memberFunction:case Zt.constructSignature:case Zt.callSignature:case Zt.indexSignature:return pe.CompletionItemKind.Function;case Zt.enum:return pe.CompletionItemKind.Enum;case Zt.module:return pe.CompletionItemKind.Module;case Zt.class:return pe.CompletionItemKind.Class;case Zt.interface:return pe.CompletionItemKind.Interface;case Zt.warning:return pe.CompletionItemKind.File}return pe.CompletionItemKind.Property},e.createDocumentationString=function(t){var i=wa(t.documentation);if(t.tags)for(var n=0,s=t.tags;n<s.length;n++){var o=s[n];i+=` - -`+Y7(o)}return i},e}(yo);function Y7(r){var e="*@"+r.name+"*";if(r.name==="param"&&r.text){var t=r.text,i=t[0],n=t.slice(1);e+="`"+i.text+"`",n.length>0&&(e+=" \u2014 "+n.map(function(s){return s.text}).join(" "))}else Array.isArray(r.text)?e+=" \u2014 "+r.text.map(function(s){return s.text}).join(" "):r.text&&(e+=" \u2014 "+r.text);return e}var Jme=function(r){Kr(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.signatureHelpTriggerCharacters=["(",","],t}return e._toSignatureHelpTriggerReason=function(t){switch(t.triggerKind){case pe.SignatureHelpTriggerKind.TriggerCharacter:return t.triggerCharacter?t.isRetrigger?{kind:"retrigger",triggerCharacter:t.triggerCharacter}:{kind:"characterTyped",triggerCharacter:t.triggerCharacter}:{kind:"invoked"};case pe.SignatureHelpTriggerKind.ContentChange:return t.isRetrigger?{kind:"retrigger"}:{kind:"invoked"};case pe.SignatureHelpTriggerKind.Invoke:default:return{kind:"invoked"}}},e.prototype.provideSignatureHelp=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h;return xr(this,function(u){switch(u.label){case 0:return o=t.uri,a=t.getOffsetAt(i),[4,this._worker(o)];case 1:return l=u.sent(),t.isDisposed()?[2]:[4,l.getSignatureHelpItems(o.toString(),a,{triggerReason:e._toSignatureHelpTriggerReason(s)})];case 2:return c=u.sent(),!c||t.isDisposed()?[2]:(h={activeSignature:c.selectedItemIndex,activeParameter:c.argumentIndex,signatures:[]},c.items.forEach(function(d){var f={label:"",parameters:[]};f.documentation={value:wa(d.documentation)},f.label+=wa(d.prefixDisplayParts),d.parameters.forEach(function(g,p,_){var v=wa(g.displayParts),b={label:v,documentation:{value:wa(g.documentation)}};f.label+=v,f.parameters.push(b),p<_.length-1&&(f.label+=wa(d.separatorDisplayParts))}),f.label+=wa(d.suffixDisplayParts),h.signatures.push(f)}),[2,{value:h,dispose:function(){}}])}})})},e}(yo),e_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideHover=function(t,i,n){return Lr(this,void 0,void 0,function(){var s,o,a,l,c,h,u;return xr(this,function(d){switch(d.label){case 0:return s=t.uri,o=t.getOffsetAt(i),[4,this._worker(s)];case 1:return a=d.sent(),t.isDisposed()?[2]:[4,a.getQuickInfoAtPosition(s.toString(),o)];case 2:return l=d.sent(),!l||t.isDisposed()?[2]:(c=wa(l.documentation),h=l.tags?l.tags.map(function(f){return Y7(f)}).join(` - -`):"",u=wa(l.displayParts),[2,{range:this._textSpanToRange(t,l.textSpan),contents:[{value:"```typescript\n"+u+"\n```\n"},{value:c+(h?` - -`+h:"")}]}])}})})},e}(yo),t_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideDocumentHighlights=function(t,i,n){return Lr(this,void 0,void 0,function(){var s,o,a,l,c=this;return xr(this,function(h){switch(h.label){case 0:return s=t.uri,o=t.getOffsetAt(i),[4,this._worker(s)];case 1:return a=h.sent(),t.isDisposed()?[2]:[4,a.getOccurrencesAtPosition(s.toString(),o)];case 2:return l=h.sent(),!l||t.isDisposed()?[2]:[2,l.map(function(u){return{range:c._textSpanToRange(t,u.textSpan),kind:u.isWriteAccess?pe.DocumentHighlightKind.Write:pe.DocumentHighlightKind.Text}})]}})})},e}(yo),i_e=function(r){Kr(e,r);function e(t,i){var n=r.call(this,i)||this;return n._libFiles=t,n}return e.prototype.provideDefinition=function(t,i,n){return Lr(this,void 0,void 0,function(){var s,o,a,l,c,h,u,d,f;return xr(this,function(g){switch(g.label){case 0:return s=t.uri,o=t.getOffsetAt(i),[4,this._worker(s)];case 1:return a=g.sent(),t.isDisposed()?[2]:[4,a.getDefinitionAtPosition(s.toString(),o)];case 2:return l=g.sent(),!l||t.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(l.map(function(p){return Ec.parse(p.fileName)}))];case 3:if(g.sent(),t.isDisposed())return[2];for(c=[],h=0,u=l;h<u.length;h++)d=u[h],f=this._libFiles.getOrCreateModel(d.fileName),f&&c.push({uri:f.uri,range:this._textSpanToRange(f,d.textSpan)});return[2,c]}})})},e}(yo),n_e=function(r){Kr(e,r);function e(t,i){var n=r.call(this,i)||this;return n._libFiles=t,n}return e.prototype.provideReferences=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h,u,d,f,g;return xr(this,function(p){switch(p.label){case 0:return o=t.uri,a=t.getOffsetAt(i),[4,this._worker(o)];case 1:return l=p.sent(),t.isDisposed()?[2]:[4,l.getReferencesAtPosition(o.toString(),a)];case 2:return c=p.sent(),!c||t.isDisposed()?[2]:[4,this._libFiles.fetchLibFilesIfNecessary(c.map(function(_){return Ec.parse(_.fileName)}))];case 3:if(p.sent(),t.isDisposed())return[2];for(h=[],u=0,d=c;u<d.length;u++)f=d[u],g=this._libFiles.getOrCreateModel(f.fileName),g&&h.push({uri:g.uri,range:this._textSpanToRange(g,f.textSpan)});return[2,h]}})})},e}(yo),r_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideDocumentSymbols=function(t,i){return Lr(this,void 0,void 0,function(){var n,s,o,a,l,c=this;return xr(this,function(h){switch(h.label){case 0:return n=t.uri,[4,this._worker(n)];case 1:return s=h.sent(),t.isDisposed()?[2]:[4,s.getNavigationBarItems(n.toString())];case 2:return o=h.sent(),!o||t.isDisposed()?[2]:(a=function(u,d,f){var g={name:d.text,detail:"",kind:kr[d.kind]||pe.SymbolKind.Variable,range:c._textSpanToRange(t,d.spans[0]),selectionRange:c._textSpanToRange(t,d.spans[0]),tags:[]};if(f&&(g.containerName=f),d.childItems&&d.childItems.length>0)for(var p=0,_=d.childItems;p<_.length;p++){var v=_[p];a(u,v,g.name)}u.push(g)},l=[],o.forEach(function(u){return a(l,u)}),[2,l])}})})},e}(yo),Zt=function(){function r(){}return r.unknown="",r.keyword="keyword",r.script="script",r.module="module",r.class="class",r.interface="interface",r.type="type",r.enum="enum",r.variable="var",r.localVariable="local var",r.function="function",r.localFunction="local function",r.memberFunction="method",r.memberGetAccessor="getter",r.memberSetAccessor="setter",r.memberVariable="property",r.constructorImplementation="constructor",r.callSignature="call",r.indexSignature="index",r.constructSignature="construct",r.parameter="parameter",r.typeParameter="type parameter",r.primitiveType="primitive type",r.label="label",r.alias="alias",r.const="const",r.let="let",r.warning="warning",r}(),kr=Object.create(null);kr[Zt.module]=pe.SymbolKind.Module;kr[Zt.class]=pe.SymbolKind.Class;kr[Zt.enum]=pe.SymbolKind.Enum;kr[Zt.interface]=pe.SymbolKind.Interface;kr[Zt.memberFunction]=pe.SymbolKind.Method;kr[Zt.memberVariable]=pe.SymbolKind.Property;kr[Zt.memberGetAccessor]=pe.SymbolKind.Property;kr[Zt.memberSetAccessor]=pe.SymbolKind.Property;kr[Zt.variable]=pe.SymbolKind.Variable;kr[Zt.const]=pe.SymbolKind.Variable;kr[Zt.localVariable]=pe.SymbolKind.Variable;kr[Zt.variable]=pe.SymbolKind.Variable;kr[Zt.function]=pe.SymbolKind.Function;kr[Zt.localFunction]=pe.SymbolKind.Function;var Dg=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e._convertOptions=function(t){return{ConvertTabsToSpaces:t.insertSpaces,TabSize:t.tabSize,IndentSize:t.tabSize,IndentStyle:kA.Smart,NewLineCharacter:` -`,InsertSpaceAfterCommaDelimiter:!0,InsertSpaceAfterSemicolonInForStatements:!0,InsertSpaceBeforeAndAfterBinaryOperators:!0,InsertSpaceAfterKeywordsInControlFlowStatements:!0,InsertSpaceAfterFunctionKeywordForAnonymousFunctions:!0,InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis:!1,InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets:!1,InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces:!1,PlaceOpenBraceOnNewLineForControlBlocks:!1,PlaceOpenBraceOnNewLineForFunctions:!1}},e.prototype._convertTextChanges=function(t,i){return{text:i.newText,range:this._textSpanToRange(t,i.span)}},e}(yo),s_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideDocumentRangeFormattingEdits=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h,u=this;return xr(this,function(d){switch(d.label){case 0:return o=t.uri,a=t.getOffsetAt({lineNumber:i.startLineNumber,column:i.startColumn}),l=t.getOffsetAt({lineNumber:i.endLineNumber,column:i.endColumn}),[4,this._worker(o)];case 1:return c=d.sent(),t.isDisposed()?[2]:[4,c.getFormattingEditsForRange(o.toString(),a,l,Dg._convertOptions(n))];case 2:return h=d.sent(),!h||t.isDisposed()?[2]:[2,h.map(function(f){return u._convertTextChanges(t,f)})]}})})},e}(Dg),o_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"autoFormatTriggerCharacters",{get:function(){return[";","}",` -`]},enumerable:!1,configurable:!0}),e.prototype.provideOnTypeFormattingEdits=function(t,i,n,s,o){return Lr(this,void 0,void 0,function(){var a,l,c,h,u=this;return xr(this,function(d){switch(d.label){case 0:return a=t.uri,l=t.getOffsetAt(i),[4,this._worker(a)];case 1:return c=d.sent(),t.isDisposed()?[2]:[4,c.getFormattingEditsAfterKeystroke(a.toString(),l,n,Dg._convertOptions(s))];case 2:return h=d.sent(),!h||t.isDisposed()?[2]:[2,h.map(function(f){return u._convertTextChanges(t,f)})]}})})},e}(Dg),a_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideCodeActions=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h,u,d,f,g=this;return xr(this,function(p){switch(p.label){case 0:return o=t.uri,a=t.getOffsetAt({lineNumber:i.startLineNumber,column:i.startColumn}),l=t.getOffsetAt({lineNumber:i.endLineNumber,column:i.endColumn}),c=Dg._convertOptions(t.getOptions()),h=n.markers.filter(function(_){return _.code}).map(function(_){return _.code}).map(Number),[4,this._worker(o)];case 1:return u=p.sent(),t.isDisposed()?[2]:[4,u.getCodeFixesAtPosition(o.toString(),a,l,h,c)];case 2:return d=p.sent(),!d||t.isDisposed()?[2,{actions:[],dispose:function(){}}]:(f=d.filter(function(_){return _.changes.filter(function(v){return v.isNewFile}).length===0}).map(function(_){return g._tsCodeFixActionToMonacoCodeAction(t,n,_)}),[2,{actions:f,dispose:function(){}}])}})})},e.prototype._tsCodeFixActionToMonacoCodeAction=function(t,i,n){for(var s=[],o=0,a=n.changes;o<a.length;o++)for(var l=a[o],c=0,h=l.textChanges;c<h.length;c++){var u=h[c];s.push({resource:t.uri,edit:{range:this._textSpanToRange(t,u.span),text:u.newText}})}var d={title:n.description,edit:{edits:s},diagnostics:i.markers,kind:"quickfix"};return d},e}(Dg),l_e=function(r){Kr(e,r);function e(t,i){var n=r.call(this,i)||this;return n._libFiles=t,n}return e.prototype.provideRenameEdits=function(t,i,n,s){return Lr(this,void 0,void 0,function(){var o,a,l,c,h,u,d,f,g,p,_;return xr(this,function(v){switch(v.label){case 0:return o=t.uri,a=o.toString(),l=t.getOffsetAt(i),[4,this._worker(o)];case 1:return c=v.sent(),t.isDisposed()?[2]:[4,c.getRenameInfo(a,l,{allowRenameOfImportPath:!1})];case 2:if(h=v.sent(),h.canRename===!1)return[2,{edits:[],rejectReason:h.localizedErrorMessage}];if(h.fileToRename!==void 0)throw new Error("Renaming files is not supported.");return[4,c.findRenameLocations(a,l,!1,!1,!1)];case 3:if(u=v.sent(),!u||t.isDisposed())return[2];for(d=[],f=0,g=u;f<g.length;f++)if(p=g[f],_=this._libFiles.getOrCreateModel(p.fileName),_)d.push({resource:_.uri,edit:{range:this._textSpanToRange(_,p.textSpan),text:n}});else throw new Error("Unknown file "+p.fileName+".");return[2,{edits:d}]}})})},e}(yo),c_e=function(r){Kr(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.provideInlayHints=function(t,i,n){return Lr(this,void 0,void 0,function(){var s,o,a,l,c,h,u=this;return xr(this,function(d){switch(d.label){case 0:return s=t.uri,o=s.toString(),a=t.getOffsetAt({lineNumber:i.startLineNumber,column:i.startColumn}),l=t.getOffsetAt({lineNumber:i.endLineNumber,column:i.endColumn}),[4,this._worker(s)];case 1:return c=d.sent(),t.isDisposed()?[2,[]]:[4,c.provideInlayHints(o,a,l)];case 2:return h=d.sent(),[2,h.map(function(f){return h1(h1({},f),{position:t.getPositionAt(f.position),kind:u._convertHintKind(f.kind)})})]}})})},e.prototype._convertHintKind=function(t){switch(t){case"Parameter":return pe.InlayHintKind.Parameter;case"Type":return pe.InlayHintKind.Type;default:return pe.InlayHintKind.Other}},e}(yo),EA,IA;function h_e(r){IA=X7(r,"typescript")}function u_e(r){EA=X7(r,"javascript")}function d_e(){return new Promise(function(r,e){if(!EA)return e("JavaScript not registered!");r(EA)})}function f_e(){return new Promise(function(r,e){if(!IA)return e("TypeScript not registered!");r(IA)})}function X7(r,e){var t=new Zme(e,r),i=function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];return t.getLanguageServiceWorker.apply(t,s)},n=new Yme(i);return pe.registerCompletionItemProvider(e,new Qme(i)),pe.registerSignatureHelpProvider(e,new Jme(i)),pe.registerHoverProvider(e,new e_e(i)),pe.registerDocumentHighlightProvider(e,new t_e(i)),pe.registerDefinitionProvider(e,new i_e(n,i)),pe.registerReferenceProvider(e,new n_e(n,i)),pe.registerDocumentSymbolProvider(e,new r_e(i)),pe.registerDocumentRangeFormattingEditProvider(e,new s_e(i)),pe.registerOnTypeFormattingEditProvider(e,new o_e(i)),pe.registerCodeActionProvider(e,new a_e(i)),pe.registerRenameProvider(e,new l_e(n,i)),pe.registerInlayHintsProvider(e,new c_e(i)),new Xme(n,r,e,i),i}var g_e=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",setupTypeScript:h_e,setupJavaScript:u_e,getJavaScriptWorker:d_e,getTypeScriptWorker:f_e}),p_e=2*60*1e3,m_e=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=window.setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>p_e&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=At.createWebWorker({moduleId:"vs/language/css/cssWorker",label:this._defaults.languageId,createData:{options:this._defaults.options,languageId:this._defaults.languageId}}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}(),I;(function(r){r[r.Ident=0]="Ident",r[r.AtKeyword=1]="AtKeyword",r[r.String=2]="String",r[r.BadString=3]="BadString",r[r.UnquotedString=4]="UnquotedString",r[r.Hash=5]="Hash",r[r.Num=6]="Num",r[r.Percentage=7]="Percentage",r[r.Dimension=8]="Dimension",r[r.UnicodeRange=9]="UnicodeRange",r[r.CDO=10]="CDO",r[r.CDC=11]="CDC",r[r.Colon=12]="Colon",r[r.SemiColon=13]="SemiColon",r[r.CurlyL=14]="CurlyL",r[r.CurlyR=15]="CurlyR",r[r.ParenthesisL=16]="ParenthesisL",r[r.ParenthesisR=17]="ParenthesisR",r[r.BracketL=18]="BracketL",r[r.BracketR=19]="BracketR",r[r.Whitespace=20]="Whitespace",r[r.Includes=21]="Includes",r[r.Dashmatch=22]="Dashmatch",r[r.SubstringOperator=23]="SubstringOperator",r[r.PrefixOperator=24]="PrefixOperator",r[r.SuffixOperator=25]="SuffixOperator",r[r.Delim=26]="Delim",r[r.EMS=27]="EMS",r[r.EXS=28]="EXS",r[r.Length=29]="Length",r[r.Angle=30]="Angle",r[r.Time=31]="Time",r[r.Freq=32]="Freq",r[r.Exclamation=33]="Exclamation",r[r.Resolution=34]="Resolution",r[r.Comma=35]="Comma",r[r.Charset=36]="Charset",r[r.EscapedJavaScript=37]="EscapedJavaScript",r[r.BadEscapedJavaScript=38]="BadEscapedJavaScript",r[r.Comment=39]="Comment",r[r.SingleLineComment=40]="SingleLineComment",r[r.EOF=41]="EOF",r[r.CustomToken=42]="CustomToken"})(I||(I={}));var Q7=function(){function r(e){this.source=e,this.len=e.length,this.position=0}return r.prototype.substring=function(e,t){return t===void 0&&(t=this.position),this.source.substring(e,t)},r.prototype.eos=function(){return this.len<=this.position},r.prototype.pos=function(){return this.position},r.prototype.goBackTo=function(e){this.position=e},r.prototype.goBack=function(e){this.position-=e},r.prototype.advance=function(e){this.position+=e},r.prototype.nextChar=function(){return this.source.charCodeAt(this.position++)||0},r.prototype.peekChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position+e)||0},r.prototype.lookbackChar=function(e){return e===void 0&&(e=0),this.source.charCodeAt(this.position-e)||0},r.prototype.advanceIfChar=function(e){return e===this.source.charCodeAt(this.position)?(this.position++,!0):!1},r.prototype.advanceIfChars=function(e){if(this.position+e.length>this.source.length)return!1;for(var t=0;t<e.length;t++)if(this.source.charCodeAt(this.position+t)!==e[t])return!1;return this.advance(t),!0},r.prototype.advanceWhileChar=function(e){for(var t=this.position;this.position<this.len&&e(this.source.charCodeAt(this.position));)this.position++;return this.position-t},r}(),NA="a".charCodeAt(0),__e="f".charCodeAt(0),J7="z".charCodeAt(0),TA="A".charCodeAt(0),b_e="F".charCodeAt(0),eV="Z".charCodeAt(0),u1="0".charCodeAt(0),d1="9".charCodeAt(0),v_e="~".charCodeAt(0),C_e="^".charCodeAt(0),Z_="=".charCodeAt(0),w_e="|".charCodeAt(0),Eg="-".charCodeAt(0),tV="_".charCodeAt(0),y_e="%".charCodeAt(0),AA="*".charCodeAt(0),iV="(".charCodeAt(0),nV=")".charCodeAt(0),S_e="<".charCodeAt(0),L_e=">".charCodeAt(0),x_e="@".charCodeAt(0),k_e="#".charCodeAt(0),D_e="$".charCodeAt(0),RA="\\".charCodeAt(0),rV="/".charCodeAt(0),Ig=` -`.charCodeAt(0),Ng="\r".charCodeAt(0),Y_="\f".charCodeAt(0),sV='"'.charCodeAt(0),oV="'".charCodeAt(0),MA=" ".charCodeAt(0),PA=" ".charCodeAt(0),E_e=";".charCodeAt(0),I_e=":".charCodeAt(0),N_e="{".charCodeAt(0),T_e="}".charCodeAt(0),A_e="[".charCodeAt(0),R_e="]".charCodeAt(0),M_e=",".charCodeAt(0),aV=".".charCodeAt(0),lV="!".charCodeAt(0),ya={};ya[E_e]=I.SemiColon;ya[I_e]=I.Colon;ya[N_e]=I.CurlyL;ya[T_e]=I.CurlyR;ya[R_e]=I.BracketR;ya[A_e]=I.BracketL;ya[iV]=I.ParenthesisL;ya[nV]=I.ParenthesisR;ya[M_e]=I.Comma;var ln={};ln.em=I.EMS;ln.ex=I.EXS;ln.px=I.Length;ln.cm=I.Length;ln.mm=I.Length;ln.in=I.Length;ln.pt=I.Length;ln.pc=I.Length;ln.deg=I.Angle;ln.rad=I.Angle;ln.grad=I.Angle;ln.ms=I.Time;ln.s=I.Time;ln.hz=I.Freq;ln.khz=I.Freq;ln["%"]=I.Percentage;ln.fr=I.Percentage;ln.dpi=I.Resolution;ln.dpcm=I.Resolution;var OA=function(){function r(){this.stream=new Q7(""),this.ignoreComment=!0,this.ignoreWhitespace=!0,this.inURL=!1}return r.prototype.setSource=function(e){this.stream=new Q7(e)},r.prototype.finishToken=function(e,t,i){return{offset:e,len:this.stream.pos()-e,type:t,text:i||this.stream.substring(e)}},r.prototype.substring=function(e,t){return this.stream.substring(e,e+t)},r.prototype.pos=function(){return this.stream.pos()},r.prototype.goBackTo=function(e){this.stream.goBackTo(e)},r.prototype.scanUnquotedString=function(){var e=this.stream.pos(),t=[];return this._unquotedString(t)?this.finishToken(e,I.UnquotedString,t.join("")):null},r.prototype.scan=function(){var e=this.trivia();if(e!==null)return e;var t=this.stream.pos();return this.stream.eos()?this.finishToken(t,I.EOF):this.scanNext(t)},r.prototype.scanNext=function(e){if(this.stream.advanceIfChars([S_e,lV,Eg,Eg]))return this.finishToken(e,I.CDO);if(this.stream.advanceIfChars([Eg,Eg,L_e]))return this.finishToken(e,I.CDC);var t=[];if(this.ident(t))return this.finishToken(e,I.Ident,t.join(""));if(this.stream.advanceIfChar(x_e))if(t=["@"],this._name(t)){var i=t.join("");return i==="@charset"?this.finishToken(e,I.Charset,i):this.finishToken(e,I.AtKeyword,i)}else return this.finishToken(e,I.Delim);if(this.stream.advanceIfChar(k_e))return t=["#"],this._name(t)?this.finishToken(e,I.Hash,t.join("")):this.finishToken(e,I.Delim);if(this.stream.advanceIfChar(lV))return this.finishToken(e,I.Exclamation);if(this._number()){var n=this.stream.pos();if(t=[this.stream.substring(e,n)],this.stream.advanceIfChar(y_e))return this.finishToken(e,I.Percentage);if(this.ident(t)){var s=this.stream.substring(n).toLowerCase(),o=ln[s];return typeof o!="undefined"?this.finishToken(e,o,t.join("")):this.finishToken(e,I.Dimension,t.join(""))}return this.finishToken(e,I.Num)}t=[];var a=this._string(t);return a!==null?this.finishToken(e,a,t.join("")):(a=ya[this.stream.peekChar()],typeof a!="undefined"?(this.stream.advance(1),this.finishToken(e,a)):this.stream.peekChar(0)===v_e&&this.stream.peekChar(1)===Z_?(this.stream.advance(2),this.finishToken(e,I.Includes)):this.stream.peekChar(0)===w_e&&this.stream.peekChar(1)===Z_?(this.stream.advance(2),this.finishToken(e,I.Dashmatch)):this.stream.peekChar(0)===AA&&this.stream.peekChar(1)===Z_?(this.stream.advance(2),this.finishToken(e,I.SubstringOperator)):this.stream.peekChar(0)===C_e&&this.stream.peekChar(1)===Z_?(this.stream.advance(2),this.finishToken(e,I.PrefixOperator)):this.stream.peekChar(0)===D_e&&this.stream.peekChar(1)===Z_?(this.stream.advance(2),this.finishToken(e,I.SuffixOperator)):(this.stream.nextChar(),this.finishToken(e,I.Delim)))},r.prototype.trivia=function(){for(;;){var e=this.stream.pos();if(this._whitespace()){if(!this.ignoreWhitespace)return this.finishToken(e,I.Whitespace)}else if(this.comment()){if(!this.ignoreComment)return this.finishToken(e,I.Comment)}else return null}},r.prototype.comment=function(){if(this.stream.advanceIfChars([rV,AA])){var e=!1,t=!1;return this.stream.advanceWhileChar(function(i){return t&&i===rV?(e=!0,!1):(t=i===AA,!0)}),e&&this.stream.advance(1),!0}return!1},r.prototype._number=function(){var e=0,t;return this.stream.peekChar()===aV&&(e=1),t=this.stream.peekChar(e),t>=u1&&t<=d1?(this.stream.advance(e+1),this.stream.advanceWhileChar(function(i){return i>=u1&&i<=d1||e===0&&i===aV}),!0):!1},r.prototype._newline=function(e){var t=this.stream.peekChar();switch(t){case Ng:case Y_:case Ig:return this.stream.advance(1),e.push(String.fromCharCode(t)),t===Ng&&this.stream.advanceIfChar(Ig)&&e.push(` -`),!0}return!1},r.prototype._escape=function(e,t){var i=this.stream.peekChar();if(i===RA){this.stream.advance(1),i=this.stream.peekChar();for(var n=0;n<6&&(i>=u1&&i<=d1||i>=NA&&i<=__e||i>=TA&&i<=b_e);)this.stream.advance(1),i=this.stream.peekChar(),n++;if(n>0){try{var s=parseInt(this.stream.substring(this.stream.pos()-n),16);s&&e.push(String.fromCharCode(s))}catch{}return i===MA||i===PA?this.stream.advance(1):this._newline([]),!0}if(i!==Ng&&i!==Y_&&i!==Ig)return this.stream.advance(1),e.push(String.fromCharCode(i)),!0;if(t)return this._newline(e)}return!1},r.prototype._stringChar=function(e,t){var i=this.stream.peekChar();return i!==0&&i!==e&&i!==RA&&i!==Ng&&i!==Y_&&i!==Ig?(this.stream.advance(1),t.push(String.fromCharCode(i)),!0):!1},r.prototype._string=function(e){if(this.stream.peekChar()===oV||this.stream.peekChar()===sV){var t=this.stream.nextChar();for(e.push(String.fromCharCode(t));this._stringChar(t,e)||this._escape(e,!0););return this.stream.peekChar()===t?(this.stream.nextChar(),e.push(String.fromCharCode(t)),I.String):I.BadString}return null},r.prototype._unquotedChar=function(e){var t=this.stream.peekChar();return t!==0&&t!==RA&&t!==oV&&t!==sV&&t!==iV&&t!==nV&&t!==MA&&t!==PA&&t!==Ig&&t!==Y_&&t!==Ng?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._unquotedString=function(e){for(var t=!1;this._unquotedChar(e)||this._escape(e);)t=!0;return t},r.prototype._whitespace=function(){var e=this.stream.advanceWhileChar(function(t){return t===MA||t===PA||t===Ig||t===Y_||t===Ng});return e>0},r.prototype._name=function(e){for(var t=!1;this._identChar(e)||this._escape(e);)t=!0;return t},r.prototype.ident=function(e){var t=this.stream.pos(),i=this._minus(e);if(i&&this._minus(e)){if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}}else if(this._identFirstChar(e)||this._escape(e)){for(;this._identChar(e)||this._escape(e););return!0}return this.stream.goBackTo(t),!1},r.prototype._identFirstChar=function(e){var t=this.stream.peekChar();return t===tV||t>=NA&&t<=J7||t>=TA&&t<=eV||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._minus=function(e){var t=this.stream.peekChar();return t===Eg?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r.prototype._identChar=function(e){var t=this.stream.peekChar();return t===tV||t===Eg||t>=NA&&t<=J7||t>=TA&&t<=eV||t>=u1&&t<=d1||t>=128&&t<=65535?(this.stream.advance(1),e.push(String.fromCharCode(t)),!0):!1},r}();function Un(r,e){if(r.length<e.length)return!1;for(var t=0;t<e.length;t++)if(r[t]!==e[t])return!1;return!0}function cV(r,e){var t=r.length-e.length;return t>0?r.lastIndexOf(e)===t:t===0?r===e:!1}function hV(r,e){return e===void 0&&(e=!0),r?r.length<140?r:r.slice(0,140)+(e?"\u2026":""):""}function P_e(r,e){var t=e.exec(r);return t&&t[0].length?r.substr(0,r.length-t[0].length):r}var Be=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),G;(function(r){r[r.Undefined=0]="Undefined",r[r.Identifier=1]="Identifier",r[r.Stylesheet=2]="Stylesheet",r[r.Ruleset=3]="Ruleset",r[r.Selector=4]="Selector",r[r.SimpleSelector=5]="SimpleSelector",r[r.SelectorInterpolation=6]="SelectorInterpolation",r[r.SelectorCombinator=7]="SelectorCombinator",r[r.SelectorCombinatorParent=8]="SelectorCombinatorParent",r[r.SelectorCombinatorSibling=9]="SelectorCombinatorSibling",r[r.SelectorCombinatorAllSiblings=10]="SelectorCombinatorAllSiblings",r[r.SelectorCombinatorShadowPiercingDescendant=11]="SelectorCombinatorShadowPiercingDescendant",r[r.Page=12]="Page",r[r.PageBoxMarginBox=13]="PageBoxMarginBox",r[r.ClassSelector=14]="ClassSelector",r[r.IdentifierSelector=15]="IdentifierSelector",r[r.ElementNameSelector=16]="ElementNameSelector",r[r.PseudoSelector=17]="PseudoSelector",r[r.AttributeSelector=18]="AttributeSelector",r[r.Declaration=19]="Declaration",r[r.Declarations=20]="Declarations",r[r.Property=21]="Property",r[r.Expression=22]="Expression",r[r.BinaryExpression=23]="BinaryExpression",r[r.Term=24]="Term",r[r.Operator=25]="Operator",r[r.Value=26]="Value",r[r.StringLiteral=27]="StringLiteral",r[r.URILiteral=28]="URILiteral",r[r.EscapedValue=29]="EscapedValue",r[r.Function=30]="Function",r[r.NumericValue=31]="NumericValue",r[r.HexColorValue=32]="HexColorValue",r[r.MixinDeclaration=33]="MixinDeclaration",r[r.MixinReference=34]="MixinReference",r[r.VariableName=35]="VariableName",r[r.VariableDeclaration=36]="VariableDeclaration",r[r.Prio=37]="Prio",r[r.Interpolation=38]="Interpolation",r[r.NestedProperties=39]="NestedProperties",r[r.ExtendsReference=40]="ExtendsReference",r[r.SelectorPlaceholder=41]="SelectorPlaceholder",r[r.Debug=42]="Debug",r[r.If=43]="If",r[r.Else=44]="Else",r[r.For=45]="For",r[r.Each=46]="Each",r[r.While=47]="While",r[r.MixinContentReference=48]="MixinContentReference",r[r.MixinContentDeclaration=49]="MixinContentDeclaration",r[r.Media=50]="Media",r[r.Keyframe=51]="Keyframe",r[r.FontFace=52]="FontFace",r[r.Import=53]="Import",r[r.Namespace=54]="Namespace",r[r.Invocation=55]="Invocation",r[r.FunctionDeclaration=56]="FunctionDeclaration",r[r.ReturnStatement=57]="ReturnStatement",r[r.MediaQuery=58]="MediaQuery",r[r.FunctionParameter=59]="FunctionParameter",r[r.FunctionArgument=60]="FunctionArgument",r[r.KeyframeSelector=61]="KeyframeSelector",r[r.ViewPort=62]="ViewPort",r[r.Document=63]="Document",r[r.AtApplyRule=64]="AtApplyRule",r[r.CustomPropertyDeclaration=65]="CustomPropertyDeclaration",r[r.CustomPropertySet=66]="CustomPropertySet",r[r.ListEntry=67]="ListEntry",r[r.Supports=68]="Supports",r[r.SupportsCondition=69]="SupportsCondition",r[r.NamespacePrefix=70]="NamespacePrefix",r[r.GridLine=71]="GridLine",r[r.Plugin=72]="Plugin",r[r.UnknownAtRule=73]="UnknownAtRule",r[r.Use=74]="Use",r[r.ModuleConfiguration=75]="ModuleConfiguration",r[r.Forward=76]="Forward",r[r.ForwardVisibility=77]="ForwardVisibility",r[r.Module=78]="Module"})(G||(G={}));var It;(function(r){r[r.Mixin=0]="Mixin",r[r.Rule=1]="Rule",r[r.Variable=2]="Variable",r[r.Function=3]="Function",r[r.Keyframe=4]="Keyframe",r[r.Unknown=5]="Unknown",r[r.Module=6]="Module",r[r.Forward=7]="Forward",r[r.ForwardVisibility=8]="ForwardVisibility"})(It||(It={}));function FA(r,e){var t=null;return!r||e<r.offset||e>r.end?null:(r.accept(function(i){return i.offset===-1&&i.length===-1?!0:i.offset<=e&&i.end>=e?(t?i.length<=t.length&&(t=i):t=i,!0):!1}),t)}function O_e(r,e){for(var t=FA(r,e),i=[];t;)i.unshift(t),t=t.parent;return i}function F_e(r){var e=r.findParent(G.Declaration),t=e&&e.getValue();return t&&t.encloses(r)?e:null}var He=function(){function r(e,t,i){e===void 0&&(e=-1),t===void 0&&(t=-1),this.parent=null,this.offset=e,this.length=t,i&&(this.nodeType=i)}return Object.defineProperty(r.prototype,"end",{get:function(){return this.offset+this.length},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"type",{get:function(){return this.nodeType||G.Undefined},set:function(e){this.nodeType=e},enumerable:!1,configurable:!0}),r.prototype.getTextProvider=function(){for(var e=this;e&&!e.textProvider;)e=e.parent;return e?e.textProvider:function(){return"unknown"}},r.prototype.getText=function(){return this.getTextProvider()(this.offset,this.length)},r.prototype.matches=function(e){return this.length===e.length&&this.getTextProvider()(this.offset,this.length)===e},r.prototype.startsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.offset,e.length)===e},r.prototype.endsWith=function(e){return this.length>=e.length&&this.getTextProvider()(this.end-e.length,e.length)===e},r.prototype.accept=function(e){if(e(this)&&this.children)for(var t=0,i=this.children;t<i.length;t++){var n=i[t];n.accept(e)}},r.prototype.acceptVisitor=function(e){this.accept(e.visitNode.bind(e))},r.prototype.adoptChild=function(e,t){if(t===void 0&&(t=-1),e.parent&&e.parent.children){var i=e.parent.children.indexOf(e);i>=0&&e.parent.children.splice(i,1)}e.parent=this;var n=this.children;return n||(n=this.children=[]),t!==-1?n.splice(t,0,e):n.push(e),e},r.prototype.attachTo=function(e,t){return t===void 0&&(t=-1),e&&e.adoptChild(this,t),this},r.prototype.collectIssues=function(e){this.issues&&e.push.apply(e,this.issues)},r.prototype.addIssue=function(e){this.issues||(this.issues=[]),this.issues.push(e)},r.prototype.hasIssue=function(e){return Array.isArray(this.issues)&&this.issues.some(function(t){return t.getRule()===e})},r.prototype.isErroneous=function(e){return e===void 0&&(e=!1),this.issues&&this.issues.length>0?!0:e&&Array.isArray(this.children)&&this.children.some(function(t){return t.isErroneous(!0)})},r.prototype.setNode=function(e,t,i){return i===void 0&&(i=-1),t?(t.attachTo(this,i),this[e]=t,!0):!1},r.prototype.addChild=function(e){return e?(this.children||(this.children=[]),e.attachTo(this),this.updateOffsetAndLength(e),!0):!1},r.prototype.updateOffsetAndLength=function(e){(e.offset<this.offset||this.offset===-1)&&(this.offset=e.offset);var t=e.end;(t>this.end||this.length===-1)&&(this.length=t-this.offset)},r.prototype.hasChildren=function(){return!!this.children&&this.children.length>0},r.prototype.getChildren=function(){return this.children?this.children.slice(0):[]},r.prototype.getChild=function(e){return this.children&&e<this.children.length?this.children[e]:null},r.prototype.addChildren=function(e){for(var t=0,i=e;t<i.length;t++){var n=i[t];this.addChild(n)}},r.prototype.findFirstChildBeforeOffset=function(e){if(this.children){for(var t=null,i=this.children.length-1;i>=0;i--)if(t=this.children[i],t.offset<=e)return t}return null},r.prototype.findChildAtOffset=function(e,t){var i=this.findFirstChildBeforeOffset(e);return i&&i.end>=e?t&&i.findChildAtOffset(e,!0)||i:null},r.prototype.encloses=function(e){return this.offset<=e.offset&&this.offset+this.length>=e.offset+e.length},r.prototype.getParent=function(){for(var e=this.parent;e instanceof jn;)e=e.parent;return e},r.prototype.findParent=function(e){for(var t=this;t&&t.type!==e;)t=t.parent;return t},r.prototype.findAParent=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this;i&&!e.some(function(n){return i.type===n});)i=i.parent;return i},r.prototype.setData=function(e,t){this.options||(this.options={}),this.options[e]=t},r.prototype.getData=function(e){return!this.options||!this.options.hasOwnProperty(e)?null:this.options[e]},r}(),jn=function(r){Be(e,r);function e(t,i){i===void 0&&(i=-1);var n=r.call(this,-1,-1)||this;return n.attachTo(t,i),n.offset=-1,n.length=-1,n}return e}(He),So=function(r){Be(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.isCustomProperty=!1,n}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Identifier},enumerable:!1,configurable:!0}),e.prototype.containsInterpolation=function(){return this.hasChildren()},e}(He),B_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Stylesheet},enumerable:!1,configurable:!0}),e}(He),BA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Declarations},enumerable:!1,configurable:!0}),e}(He),Ai=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return e.prototype.getDeclarations=function(){return this.declarations},e.prototype.setDeclarations=function(t){return this.setNode("declarations",t)},e}(He),f1=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Ruleset},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new jn(this)),this.selectors},e.prototype.isNested=function(){return!!this.parent&&this.parent.findParent(G.Declarations)!==null},e}(Ai),g1=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Selector},enumerable:!1,configurable:!0}),e}(He),uV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.SimpleSelector},enumerable:!1,configurable:!0}),e}(He);(function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.AtApplyRule},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e})(He);var WA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return e}(He),W_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.CustomPropertySet},enumerable:!1,configurable:!0}),e}(Ai),Tg=function(r){Be(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.property=null,n}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Declaration},enumerable:!1,configurable:!0}),e.prototype.setProperty=function(t){return this.setNode("property",t)},e.prototype.getProperty=function(){return this.property},e.prototype.getFullPropertyName=function(){var t=this.property?this.property.getName():"unknown";if(this.parent instanceof BA&&this.parent.getParent()instanceof fV){var i=this.parent.getParent().getParent();if(i instanceof e)return i.getFullPropertyName()+t}return t},e.prototype.getNonPrefixedPropertyName=function(){var t=this.getFullPropertyName();if(t&&t.charAt(0)==="-"){var i=t.indexOf("-",1);if(i!==-1)return t.substring(i+1)}return t},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e.prototype.setNestedProperties=function(t){return this.setNode("nestedProperties",t)},e.prototype.getNestedProperties=function(){return this.nestedProperties},e}(WA),V_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.CustomPropertyDeclaration},enumerable:!1,configurable:!0}),e.prototype.setPropertySet=function(t){return this.setNode("propertySet",t)},e.prototype.getPropertySet=function(){return this.propertySet},e}(Tg),VA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Property},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return P_e(this.getText(),/[_\+]+$/)},e.prototype.isCustomProperty=function(){return!!this.identifier&&this.identifier.isCustomProperty},e}(He),H_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Invocation},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new jn(this)),this.arguments},e}(He),X_=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Function},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(H_e),p1=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.FunctionParameter},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setDefaultValue=function(t){return this.setNode("defaultValue",t,0)},e.prototype.getDefaultValue=function(){return this.defaultValue},e}(He),Ag=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.FunctionArgument},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(He),z_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.If},enumerable:!1,configurable:!0}),e.prototype.setExpression=function(t){return this.setNode("expression",t,0)},e.prototype.setElseClause=function(t){return this.setNode("elseClause",t)},e}(Ai),$_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.For},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return this.setNode("variable",t,0)},e}(Ai),U_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Each},enumerable:!1,configurable:!0}),e.prototype.getVariables=function(){return this.variables||(this.variables=new jn(this)),this.variables},e}(Ai),j_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.While},enumerable:!1,configurable:!0}),e}(Ai),K_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Else},enumerable:!1,configurable:!0}),e}(Ai),m1=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.FunctionDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new jn(this)),this.parameters},e}(Ai),q_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.ViewPort},enumerable:!1,configurable:!0}),e}(Ai),dV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.FontFace},enumerable:!1,configurable:!0}),e}(Ai),fV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.NestedProperties},enumerable:!1,configurable:!0}),e}(Ai),gV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Keyframe},enumerable:!1,configurable:!0}),e.prototype.setKeyword=function(t){return this.setNode("keyword",t,0)},e.prototype.getKeyword=function(){return this.keyword},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e}(Ai),pV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.KeyframeSelector},enumerable:!1,configurable:!0}),e}(Ai),HA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Import},enumerable:!1,configurable:!0}),e.prototype.setMedialist=function(t){return t?(t.attachTo(this),!0):!1},e}(He),G_e=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Use},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new jn(this)),this.parameters},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),Z_e=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.ModuleConfiguration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.setValue=function(t){return this.setNode("value",t,0)},e.prototype.getValue=function(){return this.value},e}(He),Y_e=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Forward},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getMembers=function(){return this.members||(this.members=new jn(this)),this.members},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new jn(this)),this.parameters},e}(He),X_e=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.ForwardVisibility},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),Q_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Namespace},enumerable:!1,configurable:!0}),e}(He),mV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Media},enumerable:!1,configurable:!0}),e}(Ai),zA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Supports},enumerable:!1,configurable:!0}),e}(Ai),J_e=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Document},enumerable:!1,configurable:!0}),e}(Ai),_V=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return e.prototype.getMediums=function(){return this.mediums||(this.mediums=new jn(this)),this.mediums},e}(He),bV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.MediaQuery},enumerable:!1,configurable:!0}),e}(He),Q_=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.SupportsCondition},enumerable:!1,configurable:!0}),e}(He),ebe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Page},enumerable:!1,configurable:!0}),e}(Ai),tbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.PageBoxMarginBox},enumerable:!1,configurable:!0}),e}(Ai),vV=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Expression},enumerable:!1,configurable:!0}),e}(He),ibe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.BinaryExpression},enumerable:!1,configurable:!0}),e.prototype.setLeft=function(t){return this.setNode("left",t)},e.prototype.getLeft=function(){return this.left},e.prototype.setRight=function(t){return this.setNode("right",t)},e.prototype.getRight=function(){return this.right},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e}(He),nbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Term},enumerable:!1,configurable:!0}),e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setExpression=function(t){return this.setNode("expression",t)},e.prototype.getExpression=function(){return this.expression},e}(He),rbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.AttributeSelector},enumerable:!1,configurable:!0}),e.prototype.setNamespacePrefix=function(t){return this.setNode("namespacePrefix",t)},e.prototype.getNamespacePrefix=function(){return this.namespacePrefix},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.setOperator=function(t){return this.setNode("operator",t)},e.prototype.getOperator=function(){return this.operator},e.prototype.setValue=function(t){return this.setNode("value",t)},e.prototype.getValue=function(){return this.value},e}(He);(function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Operator},enumerable:!1,configurable:!0}),e})(He);var $A=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.HexColorValue},enumerable:!1,configurable:!0}),e}(He),sbe=".".charCodeAt(0),obe="0".charCodeAt(0),abe="9".charCodeAt(0),UA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.NumericValue},enumerable:!1,configurable:!0}),e.prototype.getValue=function(){for(var t=this.getText(),i=0,n,s=0,o=t.length;s<o&&(n=t.charCodeAt(s),obe<=n&&n<=abe||n===sbe);s++)i+=1;return{value:t.substring(0,i),unit:i<t.length?t.substring(i):void 0}},e}(He),_1=function(r){Be(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.variable=null,n.value=null,n.needsSemicolon=!0,n}return Object.defineProperty(e.prototype,"type",{get:function(){return G.VariableDeclaration},enumerable:!1,configurable:!0}),e.prototype.setVariable=function(t){return t?(t.attachTo(this),this.variable=t,!0):!1},e.prototype.getVariable=function(){return this.variable},e.prototype.getName=function(){return this.variable?this.variable.getName():""},e.prototype.setValue=function(t){return t?(t.attachTo(this),this.value=t,!0):!1},e.prototype.getValue=function(){return this.value},e}(WA),jA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Interpolation},enumerable:!1,configurable:!0}),e}(He),KA=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.VariableName},enumerable:!1,configurable:!0}),e.prototype.getName=function(){return this.getText()},e}(He),J_=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.ExtendsReference},enumerable:!1,configurable:!0}),e.prototype.getSelectors=function(){return this.selectors||(this.selectors=new jn(this)),this.selectors},e}(He),lbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getArguments=function(){return this.arguments||(this.arguments=new jn(this)),this.arguments},e}(He),cbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.MixinContentReference},enumerable:!1,configurable:!0}),e.prototype.getParameters=function(){return this.parameters||(this.parameters=new jn(this)),this.parameters},e}(Ai),b1=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.MixinReference},enumerable:!1,configurable:!0}),e.prototype.getNamespaces=function(){return this.namespaces||(this.namespaces=new jn(this)),this.namespaces},e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getArguments=function(){return this.arguments||(this.arguments=new jn(this)),this.arguments},e.prototype.setContent=function(t){return this.setNode("content",t)},e.prototype.getContent=function(){return this.content},e}(He),eb=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.MixinDeclaration},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e.prototype.getName=function(){return this.identifier?this.identifier.getText():""},e.prototype.getParameters=function(){return this.parameters||(this.parameters=new jn(this)),this.parameters},e.prototype.setGuard=function(t){return t&&(t.attachTo(this),this.guard=t),!1},e}(Ai),hbe=function(r){Be(e,r);function e(t,i){return r.call(this,t,i)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.UnknownAtRule},enumerable:!1,configurable:!0}),e.prototype.setAtRuleName=function(t){this.atRuleName=t},e.prototype.getAtRuleName=function(){return this.atRuleName},e}(Ai),ube=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.ListEntry},enumerable:!1,configurable:!0}),e.prototype.setKey=function(t){return this.setNode("key",t,0)},e.prototype.setValue=function(t){return this.setNode("value",t,1)},e}(He),dbe=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getConditions=function(){return this.conditions||(this.conditions=new jn(this)),this.conditions},e}(He),fbe=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.setVariable=function(t){return this.setNode("variable",t)},e}(He),CV=function(r){Be(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"type",{get:function(){return G.Module},enumerable:!1,configurable:!0}),e.prototype.setIdentifier=function(t){return this.setNode("identifier",t,0)},e.prototype.getIdentifier=function(){return this.identifier},e}(He),Rg;(function(r){r[r.Ignore=1]="Ignore",r[r.Warning=2]="Warning",r[r.Error=4]="Error"})(Rg||(Rg={}));var gbe=function(){function r(e,t,i,n,s,o){s===void 0&&(s=e.offset),o===void 0&&(o=e.length),this.node=e,this.rule=t,this.level=i,this.message=n||t.message,this.offset=s,this.length=o}return r.prototype.getRule=function(){return this.rule},r.prototype.getLevel=function(){return this.level},r.prototype.getOffset=function(){return this.offset},r.prototype.getLength=function(){return this.length},r.prototype.getNode=function(){return this.node},r.prototype.getMessage=function(){return this.message},r}();function pbe(r,e){var t;return e.length===0?t=r:t=r.replace(/\{(\d+)\}/g,function(i,n){var s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function mbe(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return pbe(e,t)}function Kc(r){return mbe}var $t=Kc(),Ut=function(){function r(e,t){this.id=e,this.message=t}return r}(),ee={NumberExpected:new Ut("css-numberexpected",$t("expected.number","number expected")),ConditionExpected:new Ut("css-conditionexpected",$t("expected.condt","condition expected")),RuleOrSelectorExpected:new Ut("css-ruleorselectorexpected",$t("expected.ruleorselector","at-rule or selector expected")),DotExpected:new Ut("css-dotexpected",$t("expected.dot","dot expected")),ColonExpected:new Ut("css-colonexpected",$t("expected.colon","colon expected")),SemiColonExpected:new Ut("css-semicolonexpected",$t("expected.semicolon","semi-colon expected")),TermExpected:new Ut("css-termexpected",$t("expected.term","term expected")),ExpressionExpected:new Ut("css-expressionexpected",$t("expected.expression","expression expected")),OperatorExpected:new Ut("css-operatorexpected",$t("expected.operator","operator expected")),IdentifierExpected:new Ut("css-identifierexpected",$t("expected.ident","identifier expected")),PercentageExpected:new Ut("css-percentageexpected",$t("expected.percentage","percentage expected")),URIOrStringExpected:new Ut("css-uriorstringexpected",$t("expected.uriorstring","uri or string expected")),URIExpected:new Ut("css-uriexpected",$t("expected.uri","URI expected")),VariableNameExpected:new Ut("css-varnameexpected",$t("expected.varname","variable name expected")),VariableValueExpected:new Ut("css-varvalueexpected",$t("expected.varvalue","variable value expected")),PropertyValueExpected:new Ut("css-propertyvalueexpected",$t("expected.propvalue","property value expected")),LeftCurlyExpected:new Ut("css-lcurlyexpected",$t("expected.lcurly","{ expected")),RightCurlyExpected:new Ut("css-rcurlyexpected",$t("expected.rcurly","} expected")),LeftSquareBracketExpected:new Ut("css-rbracketexpected",$t("expected.lsquare","[ expected")),RightSquareBracketExpected:new Ut("css-lbracketexpected",$t("expected.rsquare","] expected")),LeftParenthesisExpected:new Ut("css-lparentexpected",$t("expected.lparen","( expected")),RightParenthesisExpected:new Ut("css-rparentexpected",$t("expected.rparent",") expected")),CommaExpected:new Ut("css-commaexpected",$t("expected.comma","comma expected")),PageDirectiveOrDeclarationExpected:new Ut("css-pagedirordeclexpected",$t("expected.pagedirordecl","page directive or declaraton expected")),UnknownAtRule:new Ut("css-unknownatrule",$t("unknown.atrule","at-rule unknown")),UnknownKeyword:new Ut("css-unknownkeyword",$t("unknown.keyword","unknown keyword")),SelectorExpected:new Ut("css-selectorexpected",$t("expected.selector","selector expected")),StringLiteralExpected:new Ut("css-stringliteralexpected",$t("expected.stringliteral","string literal expected")),WhitespaceExpected:new Ut("css-whitespaceexpected",$t("expected.whitespace","whitespace expected")),MediaQueryExpected:new Ut("css-mediaqueryexpected",$t("expected.mediaquery","media query expected")),IdentifierOrWildcardExpected:new Ut("css-idorwildcardexpected",$t("expected.idorwildcard","identifier or wildcard expected")),WildcardExpected:new Ut("css-wildcardexpected",$t("expected.wildcard","wildcard expected")),IdentifierOrVariableExpected:new Ut("css-idorvarexpected",$t("expected.idorvar","identifier or variable expected"))},wV={E:"Edge",FF:"Firefox",S:"Safari",C:"Chrome",IE:"IE",O:"Opera"};function yV(r){switch(r){case"experimental":return`\u26A0\uFE0F Property is experimental. Be cautious when using it.\uFE0F - -`;case"nonstandard":return`\u{1F6A8}\uFE0F Property is nonstandard. Avoid using it. - -`;case"obsolete":return`\u{1F6A8}\uFE0F\uFE0F\uFE0F Property is obsolete. Avoid using it. - -`;default:return""}}function tb(r,e,t){var i;if(e?i={kind:"markdown",value:bbe(r,t)}:i={kind:"plaintext",value:_be(r,t)},i.value!=="")return i}function qA(r){return r=r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&"),r.replace(/</g,"<").replace(/>/g,">")}function _be(r,e){if(!r.description||r.description==="")return"";if(typeof r.description!="string")return r.description.value;var t="";if((e==null?void 0:e.documentation)!==!1){r.status&&(t+=yV(r.status)),t+=r.description;var i=SV(r.browsers);i&&(t+=` -(`+i+")"),"syntax"in r&&(t+=` - -Syntax: `+r.syntax)}return r.references&&r.references.length>0&&(e==null?void 0:e.references)!==!1&&(t.length>0&&(t+=` - -`),t+=r.references.map(function(n){return n.name+": "+n.url}).join(" | ")),t}function bbe(r,e){if(!r.description||r.description==="")return"";var t="";if((e==null?void 0:e.documentation)!==!1){r.status&&(t+=yV(r.status));var i=typeof r.description=="string"?r.description:r.description.value;t+=qA(i);var n=SV(r.browsers);n&&(t+=` - -(`+qA(n)+")"),"syntax"in r&&r.syntax&&(t+=` - -Syntax: `+qA(r.syntax))}return r.references&&r.references.length>0&&(e==null?void 0:e.references)!==!1&&(t.length>0&&(t+=` - -`),t+=r.references.map(function(s){return"["+s.name+"]("+s.url+")"}).join(" | ")),t}function SV(r){return r===void 0&&(r=[]),r.length===0?null:r.map(function(e){var t="",i=e.match(/([A-Z]+)(\d+)?/),n=i[1],s=i[2];return n in wV&&(t+=wV[n]),s&&(t+=" "+s),t}).join(", ")}var v1=Kc(),vbe=[{func:"rgb($red, $green, $blue)",desc:v1("css.builtin.rgb","Creates a Color from red, green, and blue values.")},{func:"rgba($red, $green, $blue, $alpha)",desc:v1("css.builtin.rgba","Creates a Color from red, green, blue, and alpha values.")},{func:"hsl($hue, $saturation, $lightness)",desc:v1("css.builtin.hsl","Creates a Color from hue, saturation, and lightness values.")},{func:"hsla($hue, $saturation, $lightness, $alpha)",desc:v1("css.builtin.hsla","Creates a Color from hue, saturation, lightness, and alpha values.")}],C1={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rebeccapurple:"#663399",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},LV={currentColor:"The value of the 'color' property. The computed value of the 'currentColor' keyword is the computed value of the 'color' property. If the 'currentColor' keyword is set on the 'color' property itself, it is treated as 'color:inherit' at parse time.",transparent:"Fully transparent. This keyword can be considered a shorthand for rgba(0,0,0,0) which is its computed value."};function Mg(r,e){var t=r.getText(),i=t.match(/^([-+]?[0-9]*\.?[0-9]+)(%?)$/);if(i){i[2]&&(e=100);var n=parseFloat(i[1])/e;if(n>=0&&n<=1)return n}throw new Error}function Cbe(r){var e=r.getText(),t=e.match(/^([-+]?[0-9]*\.?[0-9]+)(deg)?$/);if(t)return parseFloat(e)%360;throw new Error}function wbe(r){var e=r.getName();return e?/^(rgb|rgba|hsl|hsla)$/gi.test(e):!1}var xV=48,ybe=57,Sbe=65,w1=97,Lbe=102;function Yi(r){return r<xV?0:r<=ybe?r-xV:(r<w1&&(r+=w1-Sbe),r>=w1&&r<=Lbe?r-w1+10:0)}function kV(r){if(r[0]!=="#")return null;switch(r.length){case 4:return{red:Yi(r.charCodeAt(1))*17/255,green:Yi(r.charCodeAt(2))*17/255,blue:Yi(r.charCodeAt(3))*17/255,alpha:1};case 5:return{red:Yi(r.charCodeAt(1))*17/255,green:Yi(r.charCodeAt(2))*17/255,blue:Yi(r.charCodeAt(3))*17/255,alpha:Yi(r.charCodeAt(4))*17/255};case 7:return{red:(Yi(r.charCodeAt(1))*16+Yi(r.charCodeAt(2)))/255,green:(Yi(r.charCodeAt(3))*16+Yi(r.charCodeAt(4)))/255,blue:(Yi(r.charCodeAt(5))*16+Yi(r.charCodeAt(6)))/255,alpha:1};case 9:return{red:(Yi(r.charCodeAt(1))*16+Yi(r.charCodeAt(2)))/255,green:(Yi(r.charCodeAt(3))*16+Yi(r.charCodeAt(4)))/255,blue:(Yi(r.charCodeAt(5))*16+Yi(r.charCodeAt(6)))/255,alpha:(Yi(r.charCodeAt(7))*16+Yi(r.charCodeAt(8)))/255}}return null}function xbe(r,e,t,i){if(i===void 0&&(i=1),r=r/60,e===0)return{red:t,green:t,blue:t,alpha:i};var n=function(a,l,c){for(;c<0;)c+=6;for(;c>=6;)c-=6;return c<1?(l-a)*c+a:c<3?l:c<4?(l-a)*(4-c)+a:a},s=t<=.5?t*(e+1):t+e-t*e,o=t*2-s;return{red:n(o,s,r+2),green:n(o,s,r),blue:n(o,s,r-2),alpha:i}}function kbe(r){var e=r.red,t=r.green,i=r.blue,n=r.alpha,s=Math.max(e,t,i),o=Math.min(e,t,i),a=0,l=0,c=(o+s)/2,h=s-o;if(h>0){switch(l=Math.min(c<=.5?h/(2*c):h/(2-2*c),1),s){case e:a=(t-i)/h+(t<i?6:0);break;case t:a=(i-e)/h+2;break;case i:a=(e-t)/h+4;break}a*=60,a=Math.round(a)}return{h:a,s:l,l:c,a:n}}function Dbe(r){if(r.type===G.HexColorValue){var e=r.getText();return kV(e)}else if(r.type===G.Function){var t=r,i=t.getName(),n=t.getArguments().getChildren();if(!i||n.length<3||n.length>4)return null;try{var s=n.length===4?Mg(n[3],1):1;if(i==="rgb"||i==="rgba")return{red:Mg(n[0],255),green:Mg(n[1],255),blue:Mg(n[2],255),alpha:s};if(i==="hsl"||i==="hsla"){var o=Cbe(n[0]),a=Mg(n[1],100),l=Mg(n[2],100);return xbe(o,a,l,s)}}catch{return null}}else if(r.type===G.Identifier){if(r.parent&&r.parent.type!==G.Term)return null;var c=r.parent;if(c&&c.parent&&c.parent.type===G.BinaryExpression){var h=c.parent;if(h.parent&&h.parent.type===G.ListEntry&&h.parent.key===h)return null}var u=r.getText().toLowerCase();if(u==="none")return null;var d=C1[u];if(d)return kV(d)}return null}var DV={bottom:"Computes to \u2018100%\u2019 for the vertical position if one or two values are given, otherwise specifies the bottom edge as the origin for the next offset.",center:"Computes to \u201850%\u2019 (\u2018left 50%\u2019) for the horizontal position if the horizontal position is not otherwise specified, or \u201850%\u2019 (\u2018top 50%\u2019) for the vertical position if it is.",left:"Computes to \u20180%\u2019 for the horizontal position if one or two values are given, otherwise specifies the left edge as the origin for the next offset.",right:"Computes to \u2018100%\u2019 for the horizontal position if one or two values are given, otherwise specifies the right edge as the origin for the next offset.",top:"Computes to \u20180%\u2019 for the vertical position if one or two values are given, otherwise specifies the top edge as the origin for the next offset."},EV={"no-repeat":"Placed once and not repeated in this direction.",repeat:"Repeated in this direction as often as needed to cover the background painting area.","repeat-x":"Computes to \u2018repeat no-repeat\u2019.","repeat-y":"Computes to \u2018no-repeat repeat\u2019.",round:"Repeated as often as will fit within the background positioning area. If it doesn\u2019t fit a whole number of times, it is rescaled so that it does.",space:"Repeated as often as will fit within the background positioning area without being clipped and then the images are spaced out to fill the area."},IV={dashed:"A series of square-ended dashes.",dotted:"A series of round dots.",double:"Two parallel solid lines with some space between them.",groove:"Looks as if it were carved in the canvas.",hidden:"Same as \u2018none\u2019, but has different behavior in the border conflict resolution rules for border-collapsed tables.",inset:"Looks as if the content on the inside of the border is sunken into the canvas.",none:"No border. Color and width are ignored.",outset:"Looks as if the content on the inside of the border is coming out of the canvas.",ridge:"Looks as if it were coming out of the canvas.",solid:"A single line segment."},Ebe=["medium","thick","thin"],NV={"border-box":"The background is painted within (clipped to) the border box.","content-box":"The background is painted within (clipped to) the content box.","padding-box":"The background is painted within (clipped to) the padding box."},TV={"margin-box":"Uses the margin box as reference box.","fill-box":"Uses the object bounding box as reference box.","stroke-box":"Uses the stroke bounding box as reference box.","view-box":"Uses the nearest SVG viewport as reference box."},AV={initial:"Represents the value specified as the property\u2019s initial value.",inherit:"Represents the computed value of the property on the element\u2019s parent.",unset:"Acts as either `inherit` or `initial`, depending on whether the property is inherited or not."},RV={"url()":"Reference an image file by URL","image()":"Provide image fallbacks and annotations.","-webkit-image-set()":"Provide multiple resolutions. Remember to use unprefixed image-set() in addition.","image-set()":"Provide multiple resolutions of an image and const the UA decide which is most appropriate in a given situation.","-moz-element()":"Use an element in the document as an image. Remember to use unprefixed element() in addition.","element()":"Use an element in the document as an image.","cross-fade()":"Indicates the two images to be combined and how far along in the transition the combination is.","-webkit-gradient()":"Deprecated. Use modern linear-gradient() or radial-gradient() instead.","-webkit-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-moz-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","-o-linear-gradient()":"Linear gradient. Remember to use unprefixed version in addition.","linear-gradient()":"A linear gradient is created by specifying a straight gradient line, and then several colors placed along that line.","-webkit-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-moz-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","-o-repeating-linear-gradient()":"Repeating Linear gradient. Remember to use unprefixed version in addition.","repeating-linear-gradient()":"Same as linear-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position.","-webkit-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","-moz-radial-gradient()":"Radial gradient. Remember to use unprefixed version in addition.","radial-gradient()":"Colors emerge from a single point and smoothly spread outward in a circular or elliptical shape.","-webkit-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","-moz-repeating-radial-gradient()":"Repeating radial gradient. Remember to use unprefixed version in addition.","repeating-radial-gradient()":"Same as radial-gradient, except the color-stops are repeated infinitely in both directions, with their positions shifted by multiples of the difference between the last specified color-stop\u2019s position and the first specified color-stop\u2019s position."},MV={ease:"Equivalent to cubic-bezier(0.25, 0.1, 0.25, 1.0).","ease-in":"Equivalent to cubic-bezier(0.42, 0, 1.0, 1.0).","ease-in-out":"Equivalent to cubic-bezier(0.42, 0, 0.58, 1.0).","ease-out":"Equivalent to cubic-bezier(0, 0, 0.58, 1.0).",linear:"Equivalent to cubic-bezier(0.0, 0.0, 1.0, 1.0).","step-end":"Equivalent to steps(1, end).","step-start":"Equivalent to steps(1, start).","steps()":"The first parameter specifies the number of intervals in the function. The second parameter, which is optional, is either the value \u201Cstart\u201D or \u201Cend\u201D.","cubic-bezier()":"Specifies a cubic-bezier curve. The four values specify points P1 and P2 of the curve as (x1, y1, x2, y2).","cubic-bezier(0.6, -0.28, 0.735, 0.045)":"Ease-in Back. Overshoots.","cubic-bezier(0.68, -0.55, 0.265, 1.55)":"Ease-in-out Back. Overshoots.","cubic-bezier(0.175, 0.885, 0.32, 1.275)":"Ease-out Back. Overshoots.","cubic-bezier(0.6, 0.04, 0.98, 0.335)":"Ease-in Circular. Based on half circle.","cubic-bezier(0.785, 0.135, 0.15, 0.86)":"Ease-in-out Circular. Based on half circle.","cubic-bezier(0.075, 0.82, 0.165, 1)":"Ease-out Circular. Based on half circle.","cubic-bezier(0.55, 0.055, 0.675, 0.19)":"Ease-in Cubic. Based on power of three.","cubic-bezier(0.645, 0.045, 0.355, 1)":"Ease-in-out Cubic. Based on power of three.","cubic-bezier(0.215, 0.610, 0.355, 1)":"Ease-out Cubic. Based on power of three.","cubic-bezier(0.95, 0.05, 0.795, 0.035)":"Ease-in Exponential. Based on two to the power ten.","cubic-bezier(1, 0, 0, 1)":"Ease-in-out Exponential. Based on two to the power ten.","cubic-bezier(0.19, 1, 0.22, 1)":"Ease-out Exponential. Based on two to the power ten.","cubic-bezier(0.47, 0, 0.745, 0.715)":"Ease-in Sine.","cubic-bezier(0.445, 0.05, 0.55, 0.95)":"Ease-in-out Sine.","cubic-bezier(0.39, 0.575, 0.565, 1)":"Ease-out Sine.","cubic-bezier(0.55, 0.085, 0.68, 0.53)":"Ease-in Quadratic. Based on power of two.","cubic-bezier(0.455, 0.03, 0.515, 0.955)":"Ease-in-out Quadratic. Based on power of two.","cubic-bezier(0.25, 0.46, 0.45, 0.94)":"Ease-out Quadratic. Based on power of two.","cubic-bezier(0.895, 0.03, 0.685, 0.22)":"Ease-in Quartic. Based on power of four.","cubic-bezier(0.77, 0, 0.175, 1)":"Ease-in-out Quartic. Based on power of four.","cubic-bezier(0.165, 0.84, 0.44, 1)":"Ease-out Quartic. Based on power of four.","cubic-bezier(0.755, 0.05, 0.855, 0.06)":"Ease-in Quintic. Based on power of five.","cubic-bezier(0.86, 0, 0.07, 1)":"Ease-in-out Quintic. Based on power of five.","cubic-bezier(0.23, 1, 0.320, 1)":"Ease-out Quintic. Based on power of five."},PV={"circle()":"Defines a circle.","ellipse()":"Defines an ellipse.","inset()":"Defines an inset rectangle.","polygon()":"Defines a polygon."},Ibe={length:["em","rem","ex","px","cm","mm","in","pt","pc","ch","vw","vh","vmin","vmax"],angle:["deg","rad","grad","turn"],time:["ms","s"],frequency:["Hz","kHz"],resolution:["dpi","dpcm","dppx"],percentage:["%","fr"]},Nbe=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","const","video","wbr"],Tbe=["circle","clipPath","cursor","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","hatch","hatchpath","image","line","linearGradient","marker","mask","mesh","meshpatch","meshrow","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidcolor","stop","svg","switch","symbol","text","textPath","tspan","use","view"],Abe=["@bottom-center","@bottom-left","@bottom-left-corner","@bottom-right","@bottom-right-corner","@left-bottom","@left-middle","@left-top","@right-bottom","@right-middle","@right-top","@top-center","@top-left","@top-left-corner","@top-right","@top-right-corner"];function Sa(r){return typeof r!="undefined"}var OV=function(){function r(e){e===void 0&&(e=new OA),this.keyframeRegex=/^@(\-(webkit|ms|moz|o)\-)?keyframes$/i,this.scanner=e,this.token={type:I.EOF,offset:-1,len:0,text:""},this.prevToken=void 0}return r.prototype.peekIdent=function(e){return I.Ident===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},r.prototype.peekKeyword=function(e){return I.AtKeyword===this.token.type&&e.length===this.token.text.length&&e===this.token.text.toLowerCase()},r.prototype.peekDelim=function(e){return I.Delim===this.token.type&&e===this.token.text},r.prototype.peek=function(e){return e===this.token.type},r.prototype.peekOne=function(e){return e.indexOf(this.token.type)!==-1},r.prototype.peekRegExp=function(e,t){return e!==this.token.type?!1:t.test(this.token.text)},r.prototype.hasWhitespace=function(){return!!this.prevToken&&this.prevToken.offset+this.prevToken.len!==this.token.offset},r.prototype.consumeToken=function(){this.prevToken=this.token,this.token=this.scanner.scan()},r.prototype.mark=function(){return{prev:this.prevToken,curr:this.token,pos:this.scanner.pos()}},r.prototype.restoreAtMark=function(e){this.prevToken=e.prev,this.token=e.curr,this.scanner.goBackTo(e.pos)},r.prototype.try=function(e){var t=this.mark(),i=e();return i||(this.restoreAtMark(t),null)},r.prototype.acceptOneKeyword=function(e){if(I.AtKeyword===this.token.type)for(var t=0,i=e;t<i.length;t++){var n=i[t];if(n.length===this.token.text.length&&n===this.token.text.toLowerCase())return this.consumeToken(),!0}return!1},r.prototype.accept=function(e){return e===this.token.type?(this.consumeToken(),!0):!1},r.prototype.acceptIdent=function(e){return this.peekIdent(e)?(this.consumeToken(),!0):!1},r.prototype.acceptKeyword=function(e){return this.peekKeyword(e)?(this.consumeToken(),!0):!1},r.prototype.acceptDelim=function(e){return this.peekDelim(e)?(this.consumeToken(),!0):!1},r.prototype.acceptRegexp=function(e){return e.test(this.token.text)?(this.consumeToken(),!0):!1},r.prototype._parseRegexp=function(e){var t=this.createNode(G.Identifier);do;while(this.acceptRegexp(e));return this.finish(t)},r.prototype.acceptUnquotedString=function(){var e=this.scanner.pos();this.scanner.goBackTo(this.token.offset);var t=this.scanner.scanUnquotedString();return t?(this.token=t,this.consumeToken(),!0):(this.scanner.goBackTo(e),!1)},r.prototype.resync=function(e,t){for(;;){if(e&&e.indexOf(this.token.type)!==-1)return this.consumeToken(),!0;if(t&&t.indexOf(this.token.type)!==-1)return!0;if(this.token.type===I.EOF)return!1;this.token=this.scanner.scan()}},r.prototype.createNode=function(e){return new He(this.token.offset,this.token.len,e)},r.prototype.create=function(e){return new e(this.token.offset,this.token.len)},r.prototype.finish=function(e,t,i,n){if(!(e instanceof jn)&&(t&&this.markError(e,t,i,n),this.prevToken)){var s=this.prevToken.offset+this.prevToken.len;e.length=s>e.offset?s-e.offset:0}return e},r.prototype.markError=function(e,t,i,n){this.token!==this.lastErrorToken&&(e.addIssue(new gbe(e,t,Rg.Error,void 0,this.token.offset,this.token.len)),this.lastErrorToken=this.token),(i||n)&&this.resync(i,n)},r.prototype.parseStylesheet=function(e){var t=e.version,i=e.getText(),n=function(s,o){if(e.version!==t)throw new Error("Underlying model has changed, AST is no longer valid");return i.substr(s,o)};return this.internalParse(i,this._parseStylesheet,n)},r.prototype.internalParse=function(e,t,i){this.scanner.setSource(e),this.token=this.scanner.scan();var n=t.bind(this)();return n&&(i?n.textProvider=i:n.textProvider=function(s,o){return e.substr(s,o)}),n},r.prototype._parseStylesheet=function(){for(var e=this.create(B_e);e.addChild(this._parseStylesheetStart()););var t=!1;do{var i=!1;do{i=!1;var n=this._parseStylesheetStatement();for(n&&(e.addChild(n),i=!0,t=!1,!this.peek(I.EOF)&&this._needsSemicolonAfter(n)&&!this.accept(I.SemiColon)&&this.markError(e,ee.SemiColonExpected));this.accept(I.SemiColon)||this.accept(I.CDO)||this.accept(I.CDC);)i=!0,t=!1}while(i);if(this.peek(I.EOF))break;t||(this.peek(I.AtKeyword)?this.markError(e,ee.UnknownAtRule):this.markError(e,ee.RuleOrSelectorExpected),t=!0),this.consumeToken()}while(!this.peek(I.EOF));return this.finish(e)},r.prototype._parseStylesheetStart=function(){return this._parseCharset()},r.prototype._parseStylesheetStatement=function(e){return e===void 0&&(e=!1),this.peek(I.AtKeyword)?this._parseStylesheetAtStatement(e):this._parseRuleset(e)},r.prototype._parseStylesheetAtStatement=function(e){return e===void 0&&(e=!1),this._parseImport()||this._parseMedia(e)||this._parsePage()||this._parseFontFace()||this._parseKeyframe()||this._parseSupports(e)||this._parseViewPort()||this._parseNamespace()||this._parseDocument()||this._parseUnknownAtRule()},r.prototype._tryParseRuleset=function(e){var t=this.mark();if(this._parseSelector(e)){for(;this.accept(I.Comma)&&this._parseSelector(e););if(this.accept(I.CurlyL))return this.restoreAtMark(t),this._parseRuleset(e)}return this.restoreAtMark(t),null},r.prototype._parseRuleset=function(e){e===void 0&&(e=!1);var t=this.create(f1),i=t.getSelectors();if(!i.addChild(this._parseSelector(e)))return null;for(;this.accept(I.Comma);)if(!i.addChild(this._parseSelector(e)))return this.finish(t,ee.SelectorExpected);return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseRuleSetDeclarationAtStatement=function(){return this._parseUnknownAtRule()},r.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseRuleSetDeclarationAtStatement():this._parseDeclaration()},r.prototype._needsSemicolonAfter=function(e){switch(e.type){case G.Keyframe:case G.ViewPort:case G.Media:case G.Ruleset:case G.Namespace:case G.If:case G.For:case G.Each:case G.While:case G.MixinDeclaration:case G.FunctionDeclaration:case G.MixinContentDeclaration:return!1;case G.ExtendsReference:case G.MixinContentReference:case G.ReturnStatement:case G.MediaQuery:case G.Debug:case G.Import:case G.AtApplyRule:case G.CustomPropertyDeclaration:return!0;case G.VariableDeclaration:return e.needsSemicolon;case G.MixinReference:return!e.getContent();case G.Declaration:return!e.getNestedProperties()}return!1},r.prototype._parseDeclarations=function(e){var t=this.create(BA);if(!this.accept(I.CurlyL))return null;for(var i=e();t.addChild(i)&&!this.peek(I.CurlyR);){if(this._needsSemicolonAfter(i)&&!this.accept(I.SemiColon))return this.finish(t,ee.SemiColonExpected,[I.SemiColon,I.CurlyR]);for(i&&this.prevToken&&this.prevToken.type===I.SemiColon&&(i.semicolonPosition=this.prevToken.offset);this.accept(I.SemiColon););i=e()}return this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.RightCurlyExpected,[I.CurlyR,I.SemiColon])},r.prototype._parseBody=function(e,t){return e.setDeclarations(this._parseDeclarations(t))?this.finish(e):this.finish(e,ee.LeftCurlyExpected,[I.CurlyR,I.SemiColon])},r.prototype._parseSelector=function(e){var t=this.create(g1),i=!1;for(e&&(i=t.addChild(this._parseCombinator()));t.addChild(this._parseSimpleSelector());)i=!0,t.addChild(this._parseCombinator());return i?this.finish(t):null},r.prototype._parseDeclaration=function(e){var t=this._tryParseCustomPropertyDeclaration(e);if(t)return t;var i=this.create(Tg);return i.setProperty(this._parseProperty())?this.accept(I.Colon)?(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseExpr())?(i.addChild(this._parsePrio()),this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)):this.finish(i,ee.PropertyValueExpected)):this.finish(i,ee.ColonExpected,[I.Colon],e||[I.SemiColon]):null},r.prototype._tryParseCustomPropertyDeclaration=function(e){if(!this.peekRegExp(I.Ident,/^--/))return null;var t=this.create(V_e);if(!t.setProperty(this._parseProperty()))return null;if(!this.accept(I.Colon))return this.finish(t,ee.ColonExpected,[I.Colon]);this.prevToken&&(t.colonPosition=this.prevToken.offset);var i=this.mark();if(this.peek(I.CurlyL)){var n=this.create(W_e),s=this._parseDeclarations(this._parseRuleSetDeclaration.bind(this));if(n.setDeclarations(s)&&!s.isErroneous(!0)&&(n.addChild(this._parsePrio()),this.peek(I.SemiColon)))return this.finish(n),t.setPropertySet(n),t.semicolonPosition=this.token.offset,this.finish(t);this.restoreAtMark(i)}var o=this._parseExpr();return o&&!o.isErroneous(!0)&&(this._parsePrio(),this.peekOne(e||[I.SemiColon]))?(t.setValue(o),t.semicolonPosition=this.token.offset,this.finish(t)):(this.restoreAtMark(i),t.addChild(this._parseCustomPropertyValue(e)),t.addChild(this._parsePrio()),Sa(t.colonPosition)&&this.token.offset===t.colonPosition+1?this.finish(t,ee.PropertyValueExpected):this.finish(t))},r.prototype._parseCustomPropertyValue=function(e){var t=this;e===void 0&&(e=[I.CurlyR]);var i=this.create(He),n=function(){return o===0&&a===0&&l===0},s=function(){return e.indexOf(t.token.type)!==-1},o=0,a=0,l=0;e:for(;;){switch(this.token.type){case I.SemiColon:if(n())break e;break;case I.Exclamation:if(n())break e;break;case I.CurlyL:o++;break;case I.CurlyR:if(o--,o<0){if(s()&&a===0&&l===0)break e;return this.finish(i,ee.LeftCurlyExpected)}break;case I.ParenthesisL:a++;break;case I.ParenthesisR:if(a--,a<0){if(s()&&l===0&&o===0)break e;return this.finish(i,ee.LeftParenthesisExpected)}break;case I.BracketL:l++;break;case I.BracketR:if(l--,l<0)return this.finish(i,ee.LeftSquareBracketExpected);break;case I.BadString:break e;case I.EOF:var c=ee.RightCurlyExpected;return l>0?c=ee.RightSquareBracketExpected:a>0&&(c=ee.RightParenthesisExpected),this.finish(i,c)}this.consumeToken()}return this.finish(i)},r.prototype._tryToParseDeclaration=function(e){var t=this.mark();return this._parseProperty()&&this.accept(I.Colon)?(this.restoreAtMark(t),this._parseDeclaration(e)):(this.restoreAtMark(t),null)},r.prototype._parseProperty=function(){var e=this.create(VA),t=this.mark();return(this.acceptDelim("*")||this.acceptDelim("_"))&&this.hasWhitespace()?(this.restoreAtMark(t),null):e.setIdentifier(this._parsePropertyIdentifier())?this.finish(e):null},r.prototype._parsePropertyIdentifier=function(){return this._parseIdent()},r.prototype._parseCharset=function(){if(!this.peek(I.Charset))return null;var e=this.create(He);return this.consumeToken(),this.accept(I.String)?this.accept(I.SemiColon)?this.finish(e):this.finish(e,ee.SemiColonExpected):this.finish(e,ee.IdentifierExpected)},r.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var e=this.create(HA);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral())?this.finish(e,ee.URIOrStringExpected):(!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&e.setMedialist(this._parseMediaQueryList()),this.finish(e))},r.prototype._parseNamespace=function(){if(!this.peekKeyword("@namespace"))return null;var e=this.create(Q_e);return this.consumeToken(),!e.addChild(this._parseURILiteral())&&(e.addChild(this._parseIdent()),!e.addChild(this._parseURILiteral())&&!e.addChild(this._parseStringLiteral()))?this.finish(e,ee.URIExpected,[I.SemiColon]):this.accept(I.SemiColon)?this.finish(e):this.finish(e,ee.SemiColonExpected)},r.prototype._parseFontFace=function(){if(!this.peekKeyword("@font-face"))return null;var e=this.create(dV);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseViewPort=function(){if(!this.peekKeyword("@-ms-viewport")&&!this.peekKeyword("@-o-viewport")&&!this.peekKeyword("@viewport"))return null;var e=this.create(q_e);return this.consumeToken(),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parseKeyframe=function(){if(!this.peekRegExp(I.AtKeyword,this.keyframeRegex))return null;var e=this.create(gV),t=this.create(He);return this.consumeToken(),e.setKeyword(this.finish(t)),t.matches("@-ms-keyframes")&&this.markError(t,ee.UnknownKeyword),e.setIdentifier(this._parseKeyframeIdent())?this._parseBody(e,this._parseKeyframeSelector.bind(this)):this.finish(e,ee.IdentifierExpected,[I.CurlyR])},r.prototype._parseKeyframeIdent=function(){return this._parseIdent([It.Keyframe])},r.prototype._parseKeyframeSelector=function(){var e=this.create(pV);if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return null;for(;this.accept(I.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return this.finish(e,ee.PercentageExpected);return this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._tryParseKeyframeSelector=function(){var e=this.create(pV),t=this.mark();if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return null;for(;this.accept(I.Comma);)if(!e.addChild(this._parseIdent())&&!this.accept(I.Percentage))return this.restoreAtMark(t),null;return this.peek(I.CurlyL)?this._parseBody(e,this._parseRuleSetDeclaration.bind(this)):(this.restoreAtMark(t),null)},r.prototype._parseSupports=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@supports"))return null;var t=this.create(zA);return this.consumeToken(),t.addChild(this._parseSupportsCondition()),this._parseBody(t,this._parseSupportsDeclaration.bind(this,e))},r.prototype._parseSupportsDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseSupportsCondition=function(){var e=this.create(Q_);if(this.acceptIdent("not"))e.addChild(this._parseSupportsConditionInParens());else if(e.addChild(this._parseSupportsConditionInParens()),this.peekRegExp(I.Ident,/^(and|or)$/i))for(var t=this.token.text.toLowerCase();this.acceptIdent(t);)e.addChild(this._parseSupportsConditionInParens());return this.finish(e)},r.prototype._parseSupportsConditionInParens=function(){var e=this.create(Q_);if(this.accept(I.ParenthesisL))return this.prevToken&&(e.lParent=this.prevToken.offset),!e.addChild(this._tryToParseDeclaration([I.ParenthesisR]))&&!this._parseSupportsCondition()?this.finish(e,ee.ConditionExpected):this.accept(I.ParenthesisR)?(this.prevToken&&(e.rParent=this.prevToken.offset),this.finish(e)):this.finish(e,ee.RightParenthesisExpected,[I.ParenthesisR],[]);if(this.peek(I.Ident)){var t=this.mark();if(this.consumeToken(),!this.hasWhitespace()&&this.accept(I.ParenthesisL)){for(var i=1;this.token.type!==I.EOF&&i!==0;)this.token.type===I.ParenthesisL?i++:this.token.type===I.ParenthesisR&&i--,this.consumeToken();return this.finish(e)}else this.restoreAtMark(t)}return this.finish(e,ee.LeftParenthesisExpected,[],[I.ParenthesisL])},r.prototype._parseMediaDeclaration=function(e){return e===void 0&&(e=!1),e?this._tryParseRuleset(!0)||this._tryToParseDeclaration()||this._parseStylesheetStatement(!0):this._parseStylesheetStatement(!1)},r.prototype._parseMedia=function(e){if(e===void 0&&(e=!1),!this.peekKeyword("@media"))return null;var t=this.create(mV);return this.consumeToken(),t.addChild(this._parseMediaQueryList())?this._parseBody(t,this._parseMediaDeclaration.bind(this,e)):this.finish(t,ee.MediaQueryExpected)},r.prototype._parseMediaQueryList=function(){var e=this.create(_V);if(!e.addChild(this._parseMediaQuery([I.CurlyL])))return this.finish(e,ee.MediaQueryExpected);for(;this.accept(I.Comma);)if(!e.addChild(this._parseMediaQuery([I.CurlyL])))return this.finish(e,ee.MediaQueryExpected);return this.finish(e)},r.prototype._parseMediaQuery=function(e){var t=this.create(bV),i=!0,n=!1;if(!this.peek(I.ParenthesisL)){if(this.acceptIdent("only")||this.acceptIdent("not"),!t.addChild(this._parseIdent()))return null;n=!0,i=this.acceptIdent("and")}for(;i;){if(t.addChild(this._parseMediaContentStart())){i=this.acceptIdent("and");continue}if(!this.accept(I.ParenthesisL))return n?this.finish(t,ee.LeftParenthesisExpected,[],e):null;if(!t.addChild(this._parseMediaFeatureName()))return this.finish(t,ee.IdentifierExpected,[],e);if(this.accept(I.Colon)&&!t.addChild(this._parseExpr()))return this.finish(t,ee.TermExpected,[],e);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[],e);i=this.acceptIdent("and")}return this.finish(t)},r.prototype._parseMediaContentStart=function(){return null},r.prototype._parseMediaFeatureName=function(){return this._parseIdent()},r.prototype._parseMedium=function(){var e=this.create(He);return e.addChild(this._parseIdent())?this.finish(e):null},r.prototype._parsePageDeclaration=function(){return this._parsePageMarginBox()||this._parseRuleSetDeclaration()},r.prototype._parsePage=function(){if(!this.peekKeyword("@page"))return null;var e=this.create(ebe);if(this.consumeToken(),e.addChild(this._parsePageSelector())){for(;this.accept(I.Comma);)if(!e.addChild(this._parsePageSelector()))return this.finish(e,ee.IdentifierExpected)}return this._parseBody(e,this._parsePageDeclaration.bind(this))},r.prototype._parsePageMarginBox=function(){if(!this.peek(I.AtKeyword))return null;var e=this.create(tbe);return this.acceptOneKeyword(Abe)||this.markError(e,ee.UnknownAtRule,[],[I.CurlyL]),this._parseBody(e,this._parseRuleSetDeclaration.bind(this))},r.prototype._parsePageSelector=function(){if(!this.peek(I.Ident)&&!this.peek(I.Colon))return null;var e=this.create(He);return e.addChild(this._parseIdent()),this.accept(I.Colon)&&!e.addChild(this._parseIdent())?this.finish(e,ee.IdentifierExpected):this.finish(e)},r.prototype._parseDocument=function(){if(!this.peekKeyword("@-moz-document"))return null;var e=this.create(J_e);return this.consumeToken(),this.resync([],[I.CurlyL]),this._parseBody(e,this._parseStylesheetStatement.bind(this))},r.prototype._parseUnknownAtRule=function(){if(!this.peek(I.AtKeyword))return null;var e=this.create(hbe);e.addChild(this._parseUnknownAtRuleName());var t=function(){return n===0&&s===0&&o===0},i=0,n=0,s=0,o=0;e:for(;;){switch(this.token.type){case I.SemiColon:if(t())break e;break;case I.EOF:return n>0?this.finish(e,ee.RightCurlyExpected):o>0?this.finish(e,ee.RightSquareBracketExpected):s>0?this.finish(e,ee.RightParenthesisExpected):this.finish(e);case I.CurlyL:i++,n++;break;case I.CurlyR:if(n--,i>0&&n===0){if(this.consumeToken(),o>0)return this.finish(e,ee.RightSquareBracketExpected);if(s>0)return this.finish(e,ee.RightParenthesisExpected);break e}if(n<0){if(s===0&&o===0)break e;return this.finish(e,ee.LeftCurlyExpected)}break;case I.ParenthesisL:s++;break;case I.ParenthesisR:if(s--,s<0)return this.finish(e,ee.LeftParenthesisExpected);break;case I.BracketL:o++;break;case I.BracketR:if(o--,o<0)return this.finish(e,ee.LeftSquareBracketExpected);break}this.consumeToken()}return e},r.prototype._parseUnknownAtRuleName=function(){var e=this.create(He);return this.accept(I.AtKeyword)?this.finish(e):e},r.prototype._parseOperator=function(){if(this.peekDelim("/")||this.peekDelim("*")||this.peekDelim("+")||this.peekDelim("-")||this.peek(I.Dashmatch)||this.peek(I.Includes)||this.peek(I.SubstringOperator)||this.peek(I.PrefixOperator)||this.peek(I.SuffixOperator)||this.peekDelim("=")){var e=this.createNode(G.Operator);return this.consumeToken(),this.finish(e)}else return null},r.prototype._parseUnaryOperator=function(){if(!this.peekDelim("+")&&!this.peekDelim("-"))return null;var e=this.create(He);return this.consumeToken(),this.finish(e)},r.prototype._parseCombinator=function(){if(this.peekDelim(">")){var e=this.create(He);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptDelim(">")){if(!this.hasWhitespace()&&this.acceptDelim(">"))return e.type=G.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return e.type=G.SelectorCombinatorParent,this.finish(e)}else if(this.peekDelim("+")){var e=this.create(He);return this.consumeToken(),e.type=G.SelectorCombinatorSibling,this.finish(e)}else if(this.peekDelim("~")){var e=this.create(He);return this.consumeToken(),e.type=G.SelectorCombinatorAllSiblings,this.finish(e)}else if(this.peekDelim("/")){var e=this.create(He);this.consumeToken();var t=this.mark();if(!this.hasWhitespace()&&this.acceptIdent("deep")&&!this.hasWhitespace()&&this.acceptDelim("/"))return e.type=G.SelectorCombinatorShadowPiercingDescendant,this.finish(e);this.restoreAtMark(t)}return null},r.prototype._parseSimpleSelector=function(){var e=this.create(uV),t=0;for(e.addChild(this._parseElementName())&&t++;(t===0||!this.hasWhitespace())&&e.addChild(this._parseSimpleSelectorBody());)t++;return t>0?this.finish(e):null},r.prototype._parseSimpleSelectorBody=function(){return this._parsePseudo()||this._parseHash()||this._parseClass()||this._parseAttrib()},r.prototype._parseSelectorIdent=function(){return this._parseIdent()},r.prototype._parseHash=function(){if(!this.peek(I.Hash)&&!this.peekDelim("#"))return null;var e=this.createNode(G.IdentifierSelector);if(this.acceptDelim("#")){if(this.hasWhitespace()||!e.addChild(this._parseSelectorIdent()))return this.finish(e,ee.IdentifierExpected)}else this.consumeToken();return this.finish(e)},r.prototype._parseClass=function(){if(!this.peekDelim("."))return null;var e=this.createNode(G.ClassSelector);return this.consumeToken(),this.hasWhitespace()||!e.addChild(this._parseSelectorIdent())?this.finish(e,ee.IdentifierExpected):this.finish(e)},r.prototype._parseElementName=function(){var e=this.mark(),t=this.createNode(G.ElementNameSelector);return t.addChild(this._parseNamespacePrefix()),!t.addChild(this._parseSelectorIdent())&&!this.acceptDelim("*")?(this.restoreAtMark(e),null):this.finish(t)},r.prototype._parseNamespacePrefix=function(){var e=this.mark(),t=this.createNode(G.NamespacePrefix);return!t.addChild(this._parseIdent())&&!this.acceptDelim("*"),this.acceptDelim("|")?this.finish(t):(this.restoreAtMark(e),null)},r.prototype._parseAttrib=function(){if(!this.peek(I.BracketL))return null;var e=this.create(rbe);return this.consumeToken(),e.setNamespacePrefix(this._parseNamespacePrefix()),e.setIdentifier(this._parseIdent())?(e.setOperator(this._parseOperator())&&(e.setValue(this._parseBinaryExpr()),this.acceptIdent("i")),this.accept(I.BracketR)?this.finish(e):this.finish(e,ee.RightSquareBracketExpected)):this.finish(e,ee.IdentifierExpected)},r.prototype._parsePseudo=function(){var e=this,t=this._tryParsePseudoIdentifier();if(t){if(!this.hasWhitespace()&&this.accept(I.ParenthesisL)){var i=function(){var n=e.create(He);if(!n.addChild(e._parseSelector(!1)))return null;for(;e.accept(I.Comma)&&n.addChild(e._parseSelector(!1)););return e.peek(I.ParenthesisR)?e.finish(n):null};if(t.addChild(this.try(i)||this._parseBinaryExpr()),!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return this.finish(t)}return null},r.prototype._tryParsePseudoIdentifier=function(){if(!this.peek(I.Colon))return null;var e=this.mark(),t=this.createNode(G.PseudoSelector);return this.consumeToken(),this.hasWhitespace()?(this.restoreAtMark(e),null):(this.accept(I.Colon),this.hasWhitespace()||!t.addChild(this._parseIdent())?this.finish(t,ee.IdentifierExpected):this.finish(t))},r.prototype._tryParsePrio=function(){var e=this.mark(),t=this._parsePrio();return t||(this.restoreAtMark(e),null)},r.prototype._parsePrio=function(){if(!this.peek(I.Exclamation))return null;var e=this.createNode(G.Prio);return this.accept(I.Exclamation)&&this.acceptIdent("important")?this.finish(e):null},r.prototype._parseExpr=function(e){e===void 0&&(e=!1);var t=this.create(vV);if(!t.addChild(this._parseBinaryExpr()))return null;for(;;){if(this.peek(I.Comma)){if(e)return this.finish(t);this.consumeToken()}if(!t.addChild(this._parseBinaryExpr()))break}return this.finish(t)},r.prototype._parseNamedLine=function(){if(!this.peek(I.BracketL))return null;var e=this.createNode(G.GridLine);for(this.consumeToken();e.addChild(this._parseIdent()););return this.accept(I.BracketR)?this.finish(e):this.finish(e,ee.RightSquareBracketExpected)},r.prototype._parseBinaryExpr=function(e,t){var i=this.create(ibe);if(!i.setLeft(e||this._parseTerm()))return null;if(!i.setOperator(t||this._parseOperator()))return this.finish(i);if(!i.setRight(this._parseTerm()))return this.finish(i,ee.TermExpected);i=this.finish(i);var n=this._parseOperator();return n&&(i=this._parseBinaryExpr(i,n)),this.finish(i)},r.prototype._parseTerm=function(){var e=this.create(nbe);return e.setOperator(this._parseUnaryOperator()),e.setExpression(this._parseTermExpression())?this.finish(e):null},r.prototype._parseTermExpression=function(){return this._parseURILiteral()||this._parseFunction()||this._parseIdent()||this._parseStringLiteral()||this._parseNumeric()||this._parseHexColor()||this._parseOperation()||this._parseNamedLine()},r.prototype._parseOperation=function(){if(!this.peek(I.ParenthesisL))return null;var e=this.create(He);return this.consumeToken(),e.addChild(this._parseExpr()),this.accept(I.ParenthesisR)?this.finish(e):this.finish(e,ee.RightParenthesisExpected)},r.prototype._parseNumeric=function(){if(this.peek(I.Num)||this.peek(I.Percentage)||this.peek(I.Resolution)||this.peek(I.Length)||this.peek(I.EMS)||this.peek(I.EXS)||this.peek(I.Angle)||this.peek(I.Time)||this.peek(I.Dimension)||this.peek(I.Freq)){var e=this.create(UA);return this.consumeToken(),this.finish(e)}return null},r.prototype._parseStringLiteral=function(){if(!this.peek(I.String)&&!this.peek(I.BadString))return null;var e=this.createNode(G.StringLiteral);return this.consumeToken(),this.finish(e)},r.prototype._parseURILiteral=function(){if(!this.peekRegExp(I.Ident,/^url(-prefix)?$/i))return null;var e=this.mark(),t=this.createNode(G.URILiteral);return this.accept(I.Ident),this.hasWhitespace()||!this.peek(I.ParenthesisL)?(this.restoreAtMark(e),null):(this.scanner.inURL=!0,this.consumeToken(),t.addChild(this._parseURLArgument()),this.scanner.inURL=!1,this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected))},r.prototype._parseURLArgument=function(){var e=this.create(He);return!this.accept(I.String)&&!this.accept(I.BadString)&&!this.acceptUnquotedString()?null:this.finish(e)},r.prototype._parseIdent=function(e){if(!this.peek(I.Ident))return null;var t=this.create(So);return e&&(t.referenceTypes=e),t.isCustomProperty=this.peekRegExp(I.Ident,/^--/),this.consumeToken(),this.finish(t)},r.prototype._parseFunction=function(){var e=this.mark(),t=this.create(X_);if(!t.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(I.ParenthesisL))return this.restoreAtMark(e),null;if(t.getArguments().addChild(this._parseFunctionArgument()))for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)t.getArguments().addChild(this._parseFunctionArgument())||this.markError(t,ee.ExpressionExpected);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},r.prototype._parseFunctionIdentifier=function(){if(!this.peek(I.Ident))return null;var e=this.create(So);if(e.referenceTypes=[It.Function],this.acceptIdent("progid")){if(this.accept(I.Colon))for(;this.accept(I.Ident)&&this.acceptDelim("."););return this.finish(e)}return this.consumeToken(),this.finish(e)},r.prototype._parseFunctionArgument=function(){var e=this.create(Ag);return e.setValue(this._parseExpr(!0))?this.finish(e):null},r.prototype._parseHexColor=function(){if(this.peekRegExp(I.Hash,/^#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/g)){var e=this.create($A);return this.consumeToken(),this.finish(e)}else return null},r}();function Rbe(r,e){var t=0,i=r.length;if(i===0)return 0;for(;t<i;){var n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}var Mbe=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),FV=function(){function r(e,t){this.offset=e,this.length=t,this.symbols=[],this.parent=null,this.children=[]}return r.prototype.addChild=function(e){this.children.push(e),e.setParent(this)},r.prototype.setParent=function(e){this.parent=e},r.prototype.findScope=function(e,t){return t===void 0&&(t=0),this.offset<=e&&this.offset+this.length>e+t||this.offset===e&&this.length===t?this.findInScope(e,t):null},r.prototype.findInScope=function(e,t){t===void 0&&(t=0);var i=e+t,n=Rbe(this.children,function(o){return o.offset>i});if(n===0)return this;var s=this.children[n-1];return s.offset<=e&&s.offset+s.length>=e+t?s.findInScope(e,t):this},r.prototype.addSymbol=function(e){this.symbols.push(e)},r.prototype.getSymbol=function(e,t){for(var i=0;i<this.symbols.length;i++){var n=this.symbols[i];if(n.name===e&&n.type===t)return n}return null},r.prototype.getSymbols=function(){return this.symbols},r}(),Pbe=function(r){Mbe(e,r);function e(){return r.call(this,0,Number.MAX_VALUE)||this}return e}(FV),y1=function(){function r(e,t,i,n){this.name=e,this.value=t,this.node=i,this.type=n}return r}(),Obe=function(){function r(e){this.scope=e}return r.prototype.addSymbol=function(e,t,i,n){if(e.offset!==-1){var s=this.scope.findScope(e.offset,e.length);s&&s.addSymbol(new y1(t,i,e,n))}},r.prototype.addScope=function(e){if(e.offset!==-1){var t=this.scope.findScope(e.offset,e.length);if(t&&(t.offset!==e.offset||t.length!==e.length)){var i=new FV(e.offset,e.length);return t.addChild(i),i}return t}return null},r.prototype.addSymbolToChildScope=function(e,t,i,n,s){if(e&&e.offset!==-1){var o=this.addScope(e);o&&o.addSymbol(new y1(i,n,t,s))}},r.prototype.visitNode=function(e){switch(e.type){case G.Keyframe:return this.addSymbol(e,e.getName(),void 0,It.Keyframe),!0;case G.CustomPropertyDeclaration:return this.visitCustomPropertyDeclarationNode(e);case G.VariableDeclaration:return this.visitVariableDeclarationNode(e);case G.Ruleset:return this.visitRuleSet(e);case G.MixinDeclaration:return this.addSymbol(e,e.getName(),void 0,It.Mixin),!0;case G.FunctionDeclaration:return this.addSymbol(e,e.getName(),void 0,It.Function),!0;case G.FunctionParameter:return this.visitFunctionParameterNode(e);case G.Declarations:return this.addScope(e),!0;case G.For:var t=e,i=t.getDeclarations();return i&&t.variable&&this.addSymbolToChildScope(i,t.variable,t.variable.getName(),void 0,It.Variable),!0;case G.Each:{var n=e,s=n.getDeclarations();if(s)for(var o=n.getVariables().getChildren(),a=0,l=o;a<l.length;a++){var c=l[a];this.addSymbolToChildScope(s,c,c.getName(),void 0,It.Variable)}return!0}}return!0},r.prototype.visitRuleSet=function(e){var t=this.scope.findScope(e.offset,e.length);if(t)for(var i=0,n=e.getSelectors().getChildren();i<n.length;i++){var s=n[i];s instanceof g1&&s.getChildren().length===1&&t.addSymbol(new y1(s.getChild(0).getText(),void 0,s,It.Rule))}return!0},r.prototype.visitVariableDeclarationNode=function(e){var t=e.getValue()?e.getValue().getText():void 0;return this.addSymbol(e,e.getName(),t,It.Variable),!0},r.prototype.visitFunctionParameterNode=function(e){var t=e.getParent().getDeclarations();if(t){var i=e.getDefaultValue(),n=i?i.getText():void 0;this.addSymbolToChildScope(t,e,e.getName(),n,It.Variable)}return!0},r.prototype.visitCustomPropertyDeclarationNode=function(e){var t=e.getValue()?e.getValue().getText():"";return this.addCSSVariable(e.getProperty(),e.getProperty().getName(),t,It.Variable),!0},r.prototype.addCSSVariable=function(e,t,i,n){e.offset!==-1&&this.scope.addSymbol(new y1(t,i,e,n))},r}(),GA=function(){function r(e){this.global=new Pbe,e.acceptVisitor(new Obe(this.global))}return r.prototype.findSymbolsAtOffset=function(e,t){for(var i=this.global.findScope(e,0),n=[],s={};i;){for(var o=i.getSymbols(),a=0;a<o.length;a++){var l=o[a];l.type===t&&!s[l.name]&&(n.push(l),s[l.name]=!0)}i=i.parent}return n},r.prototype.internalFindSymbol=function(e,t){var i=e;if(e.parent instanceof p1&&e.parent.getParent()instanceof Ai&&(i=e.parent.getParent().getDeclarations()),e.parent instanceof Ag&&e.parent.getParent()instanceof X_){var n=e.parent.getParent().getIdentifier();if(n){var s=this.internalFindSymbol(n,[It.Function]);s&&(i=s.node.getDeclarations())}}if(!i)return null;for(var o=e.getText(),a=this.global.findScope(i.offset,i.length);a;){for(var l=0;l<t.length;l++){var c=t[l],h=a.getSymbol(o,c);if(h)return h}a=a.parent}return null},r.prototype.evaluateReferenceTypes=function(e){if(e instanceof So){var t=e.referenceTypes;if(t)return t;if(e.isCustomProperty)return[It.Variable];var i=F_e(e);if(i){var n=i.getNonPrefixedPropertyName();if((n==="animation"||n==="animation-name")&&i.getValue()&&i.getValue().offset===e.offset)return[It.Keyframe]}}else if(e instanceof KA)return[It.Variable];var s=e.findAParent(G.Selector,G.ExtendsReference);return s?[It.Rule]:null},r.prototype.findSymbolFromNode=function(e){if(!e)return null;for(;e.type===G.Interpolation;)e=e.getParent();var t=this.evaluateReferenceTypes(e);return t?this.internalFindSymbol(e,t):null},r.prototype.matchesSymbol=function(e,t){if(!e)return!1;for(;e.type===G.Interpolation;)e=e.getParent();if(!e.matches(t.name))return!1;var i=this.evaluateReferenceTypes(e);if(!i||i.indexOf(t.type)===-1)return!1;var n=this.internalFindSymbol(e,i);return n===t},r.prototype.findSymbol=function(e,t,i){for(var n=this.global.findScope(i);n;){var s=n.getSymbol(e,t);if(s)return s;n=n.parent}return null},r}(),BV;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(BV||(BV={}));var S1;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(S1||(S1={}));var ps;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=S1.MAX_VALUE),n===Number.MAX_VALUE&&(n=S1.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return ce.objectLiteral(n)&&ce.uinteger(n.line)&&ce.uinteger(n.character)}r.is=t})(ps||(ps={}));var Ii;(function(r){function e(i,n,s,o){if(ce.uinteger(i)&&ce.uinteger(n)&&ce.uinteger(s)&&ce.uinteger(o))return{start:ps.create(i,n),end:ps.create(s,o)};if(ps.is(i)&&ps.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return ce.objectLiteral(n)&&ps.is(n.start)&&ps.is(n.end)}r.is=t})(Ii||(Ii={}));var ib;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Ii.is(n.range)&&(ce.string(n.uri)||ce.undefined(n.uri))}r.is=t})(ib||(ib={}));var WV;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Ii.is(n.targetRange)&&ce.string(n.targetUri)&&(Ii.is(n.targetSelectionRange)||ce.undefined(n.targetSelectionRange))&&(Ii.is(n.originSelectionRange)||ce.undefined(n.originSelectionRange))}r.is=t})(WV||(WV={}));var ZA;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return ce.numberRange(n.red,0,1)&&ce.numberRange(n.green,0,1)&&ce.numberRange(n.blue,0,1)&&ce.numberRange(n.alpha,0,1)}r.is=t})(ZA||(ZA={}));var VV;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return Ii.is(n.range)&&ZA.is(n.color)}r.is=t})(VV||(VV={}));var HV;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return ce.string(n.label)&&(ce.undefined(n.textEdit)||gt.is(n))&&(ce.undefined(n.additionalTextEdits)||ce.typedArray(n.additionalTextEdits,gt.is))}r.is=t})(HV||(HV={}));var nb;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(nb||(nb={}));var zV;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return ce.defined(s)&&(l.startCharacter=s),ce.defined(o)&&(l.endCharacter=o),ce.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return ce.uinteger(n.startLine)&&ce.uinteger(n.startLine)&&(ce.undefined(n.startCharacter)||ce.uinteger(n.startCharacter))&&(ce.undefined(n.endCharacter)||ce.uinteger(n.endCharacter))&&(ce.undefined(n.kind)||ce.string(n.kind))}r.is=t})(zV||(zV={}));var YA;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ib.is(n.location)&&ce.string(n.message)}r.is=t})(YA||(YA={}));var Pg;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(Pg||(Pg={}));var $V;(function(r){r.Unnecessary=1,r.Deprecated=2})($V||($V={}));var UV;(function(r){function e(t){var i=t;return i!=null&&ce.string(i.href)}r.is=e})(UV||(UV={}));var L1;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return ce.defined(s)&&(c.severity=s),ce.defined(o)&&(c.code=o),ce.defined(a)&&(c.source=a),ce.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return ce.defined(s)&&Ii.is(s.range)&&ce.string(s.message)&&(ce.number(s.severity)||ce.undefined(s.severity))&&(ce.integer(s.code)||ce.string(s.code)||ce.undefined(s.code))&&(ce.undefined(s.codeDescription)||ce.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(ce.string(s.source)||ce.undefined(s.source))&&(ce.undefined(s.relatedInformation)||ce.typedArray(s.relatedInformation,YA.is))}r.is=t})(L1||(L1={}));var rb;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return ce.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.title)&&ce.string(n.command)}r.is=t})(rb||(rb={}));var gt;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return ce.objectLiteral(o)&&ce.string(o.newText)&&Ii.is(o.range)}r.is=n})(gt||(gt={}));var Og;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&ce.objectLiteral(n)&&ce.string(n.label)&&(ce.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(ce.string(n.description)||n.description===void 0)}r.is=t})(Og||(Og={}));var sr;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(sr||(sr={}));var qc;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return gt.is(o)&&(Og.is(o.annotationId)||sr.is(o.annotationId))}r.is=n})(qc||(qc={}));var x1;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&D1.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(x1||(x1={}));var sb;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&ce.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||ce.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ce.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||sr.is(n.annotationId))}r.is=t})(sb||(sb={}));var ob;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&ce.string(n.oldUri)&&ce.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||ce.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ce.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||sr.is(n.annotationId))}r.is=t})(ob||(ob={}));var ab;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&ce.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||ce.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||ce.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||sr.is(n.annotationId))}r.is=t})(ab||(ab={}));var XA;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return ce.string(n.kind)?sb.is(n)||ob.is(n)||ab.is(n):x1.is(n)}))}r.is=e})(XA||(XA={}));var k1=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=gt.insert(e,t):sr.is(i)?(s=i,n=qc.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=qc.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=gt.replace(e,t):sr.is(i)?(s=i,n=qc.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=qc.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=gt.del(e):sr.is(t)?(n=t,i=qc.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=qc.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),jV=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(sr.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new jV(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(x1.is(i)){var n=new k1(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new k1(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(D1.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new k1(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new k1(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new jV,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Og.is(t)||sr.is(t)?n=t:i=t;var s,o;if(n===void 0?s=sb.create(e,i):(o=sr.is(n)?n:this._changeAnnotations.manage(n),s=sb.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Og.is(i)||sr.is(i)?s=i:n=i;var o,a;if(s===void 0?o=ob.create(e,t,n):(a=sr.is(s)?s:this._changeAnnotations.manage(s),o=ob.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Og.is(t)||sr.is(t)?n=t:i=t;var s,o;if(n===void 0?s=ab.create(e,i):(o=sr.is(n)?n:this._changeAnnotations.manage(n),s=ab.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var KV;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)}r.is=t})(KV||(KV={}));var qV;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&ce.integer(n.version)}r.is=t})(qV||(qV={}));var D1;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&(n.version===null||ce.integer(n.version))}r.is=t})(D1||(D1={}));var GV;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.string(n.uri)&&ce.string(n.languageId)&&ce.integer(n.version)&&ce.string(n.text)}r.is=t})(GV||(GV={}));var La;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(La||(La={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(La||(La={}));var QA;(function(r){function e(t){var i=t;return ce.objectLiteral(t)&&La.is(i.kind)&&ce.string(i.value)}r.is=e})(QA||(QA={}));var Ae;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(Ae||(Ae={}));var qr;(function(r){r.PlainText=1,r.Snippet=2})(qr||(qr={}));var td;(function(r){r.Deprecated=1})(td||(td={}));var ZV;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&ce.string(n.newText)&&Ii.is(n.insert)&&Ii.is(n.replace)}r.is=t})(ZV||(ZV={}));var YV;(function(r){r.asIs=1,r.adjustIndentation=2})(YV||(YV={}));var XV;(function(r){function e(t){return{label:t}}r.create=e})(XV||(XV={}));var QV;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(QV||(QV={}));var E1;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return ce.string(n)||ce.objectLiteral(n)&&ce.string(n.language)&&ce.string(n.value)}r.is=t})(E1||(E1={}));var JV;(function(r){function e(t){var i=t;return!!i&&ce.objectLiteral(i)&&(QA.is(i.contents)||E1.is(i.contents)||ce.typedArray(i.contents,E1.is))&&(t.range===void 0||Ii.is(t.range))}r.is=e})(JV||(JV={}));var e9;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(e9||(e9={}));var t9;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return ce.defined(i)&&(o.documentation=i),ce.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(t9||(t9={}));var Sl;(function(r){r.Text=1,r.Read=2,r.Write=3})(Sl||(Sl={}));var i9;(function(r){function e(t,i){var n={range:t};return ce.number(i)&&(n.kind=i),n}r.create=e})(i9||(i9={}));var Li;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(Li||(Li={}));var n9;(function(r){r.Deprecated=1})(n9||(n9={}));var r9;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(r9||(r9={}));var s9;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&ce.string(n.name)&&ce.number(n.kind)&&Ii.is(n.range)&&Ii.is(n.selectionRange)&&(n.detail===void 0||ce.string(n.detail))&&(n.deprecated===void 0||ce.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(s9||(s9={}));var o9;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(o9||(o9={}));var a9;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.typedArray(n.diagnostics,L1.is)&&(n.only===void 0||ce.typedArray(n.only,ce.string))}r.is=t})(a9||(a9={}));var l9;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):rb.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&ce.string(n.title)&&(n.diagnostics===void 0||ce.typedArray(n.diagnostics,L1.is))&&(n.kind===void 0||ce.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||rb.is(n.command))&&(n.isPreferred===void 0||ce.boolean(n.isPreferred))&&(n.edit===void 0||XA.is(n.edit))}r.is=t})(l9||(l9={}));var c9;(function(r){function e(i,n){var s={range:i};return ce.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return ce.defined(n)&&Ii.is(n.range)&&(ce.undefined(n.command)||rb.is(n.command))}r.is=t})(c9||(c9={}));var h9;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return ce.defined(n)&&ce.uinteger(n.tabSize)&&ce.boolean(n.insertSpaces)}r.is=t})(h9||(h9={}));var u9;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return ce.defined(n)&&Ii.is(n.range)&&(ce.undefined(n.target)||ce.string(n.target))}r.is=t})(u9||(u9={}));var d9;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&Ii.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(d9||(d9={}));var f9;(function(r){function e(s,o,a,l){return new Fbe(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(ce.defined(o)&&ce.string(o.uri)&&(ce.undefined(o.languageId)||ce.string(o.languageId))&&ce.uinteger(o.lineCount)&&ce.func(o.getText)&&ce.func(o.positionAt)&&ce.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,h=l.length-1;h>=0;h--){var u=l[h],d=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,d)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=d}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var h=0,u=0,d=0;h<l.length&&u<c.length;){var f=o(l[h],c[u]);f<=0?s[d++]=l[h++]:s[d++]=c[u++]}for(;h<l.length;)s[d++]=l[h++];for(;u<c.length;)s[d++]=c[u++];return s}})(f9||(f9={}));var Fbe=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` -`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` -`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return ps.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return ps.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),ce;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function h(f){return e.call(f)==="[object Function]"}r.func=h;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function d(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=d})(ce||(ce={}));var g9=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=_9(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),h=Math.max(o.end.line,0),u=this._lineOffsets,d=m9(s.text,!1,a);if(h-c===d.length)for(var f=0,g=d.length;f<g;f++)u[f+c+1]=d[f];else d.length<1e4?u.splice.apply(u,[c+1,h-c].concat(d)):this._lineOffsets=u=u.slice(0,c+1).concat(d,u.slice(h+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+d.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=m9(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),p9;(function(r){function e(n,s,o,a){return new g9(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof g9)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=JA(s.map(Bbe),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],h=0,u=a;h<u.length;h++){var d=u[h],f=n.offsetAt(d.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),d.newText.length&&c.push(d.newText),l=n.offsetAt(d.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(p9||(p9={}));function JA(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);JA(i,e),JA(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function m9(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function _9(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function Bbe(r){var e=_9(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var b9;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[La.Markdown,La.PlainText]}},hover:{contentFormat:[La.Markdown,La.PlainText]}}}})(b9||(b9={}));var lb;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(lb||(lb={}));var v9;v9=(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,h="",u=0,d=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(d===g-1||f===1))if(d!==g-1&&f===2){if(h.length<2||u!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var p=h.lastIndexOf("/");if(p!==h.length-1){p===-1?(h="",u=0):u=(h=h.slice(0,p)).length-1-h.lastIndexOf("/"),d=g,f=0;continue}}else if(h.length===2||h.length===1){h="",u=0,d=g,f=0;continue}}l&&(h.length>0?h+="/..":h="..",u=2)}else h.length>0?h+="/"+a.slice(d+1,g):h=a.slice(d+1,g),u=g-d-1;d=g,f=0}else c===46&&f!==-1?++f:f=-1}return h}var o={resolve:function(){for(var a,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var u;h>=0?u=arguments[h]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var h=a.length,u=h-c,d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var f=l.length-d,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(d+_)===47)return l.slice(d+_+1);if(_===0)return l.slice(d+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(d+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=h;++_)_!==h&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(d+p):(d+=p,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,u=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!u){h=d;break}}else u=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,h=0,u=-1,d=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!d){h=c+1;break}}else g===-1&&(d=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return h===u?u=g:u===-1&&(u=a.length),a.slice(h,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!d){h=c+1;break}}else u===-1&&(d=!1,u=c+1);return u===-1?"":a.slice(h,u)},extname:function(a){n(a);for(var l=-1,c=0,h=-1,u=!0,d=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)h===-1&&(u=!1,h=f+1),g===46?l===-1?l=f:d!==1&&(d=1):l!==-1&&(d=-1);else if(!u){c=f+1;break}}return l===-1||h===-1||d===0||d===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var h=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+u:h+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,h=a.charCodeAt(0),u=h===47;u?(l.root="/",c=1):c=0;for(var d=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((h=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),h===46?d===-1?d=_:v!==1&&(v=1):d!==-1&&(v=-1);else if(!p){f=_+1;break}return d===-1||g===-1||v===0||v===1&&d===g-1&&d===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,d),l.base=a.slice(1,g)):(l.name=a.slice(f,d),l.base=a.slice(f,g)),l.ext=a.slice(d,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>U}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,h=(l=function(A,D){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,W){M.__proto__=W}||function(M,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(M[ge]=W[ge])})(A,D)},function(A,D){function M(){this.constructor=A}l(A,D),A.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}),u=/^\w[\w\d+.-]*$/,d=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function A(D,M,W,ge,se,ae){ae===void 0&&(ae=!1),typeof D=="object"?(this.scheme=D.scheme||g,this.authority=D.authority||g,this.path=D.path||g,this.query=D.query||g,this.fragment=D.fragment||g):(this.scheme=function(we,De){return we||De?we:"file"}(D,ae),this.authority=M||g,this.path=function(we,De){switch(we){case"https":case"http":case"file":De?De[0]!==p&&(De=p+De):De=p}return De}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(we,De){if(!we.scheme&&De)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+we.authority+'", path: "'+we.path+'", query: "'+we.query+'", fragment: "'+we.fragment+'"}');if(we.scheme&&!u.test(we.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(we.path){if(we.authority){if(!d.test(we.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(f.test(we.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return A.isUri=function(D){return D instanceof A||!!D&&typeof D.authority=="string"&&typeof D.fragment=="string"&&typeof D.path=="string"&&typeof D.query=="string"&&typeof D.scheme=="string"&&typeof D.fsPath=="function"&&typeof D.with=="function"&&typeof D.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(D){if(!D)return this;var M=D.scheme,W=D.authority,ge=D.path,se=D.query,ae=D.fragment;return M===void 0?M=this.scheme:M===null&&(M=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),M===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(M,W,ge,se,ae)},A.parse=function(D,M){M===void 0&&(M=!1);var W=_.exec(D);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),M):new C(g,g,g,g,g)},A.file=function(D){var M=g;if(o&&(D=D.replace(/\\/g,p)),D[0]===p&&D[1]===p){var W=D.indexOf(p,2);W===-1?(M=D.substring(2),D=p):(M=D.substring(2,W),D=D.substring(W)||p)}return new C("file",M,D,g,g)},A.from=function(D){return new C(D.scheme,D.authority,D.path,D.query,D.fragment)},A.prototype.toString=function(D){return D===void 0&&(D=!1),L(this,D)},A.prototype.toJSON=function(){return this},A.revive=function(D){if(D){if(D instanceof A)return D;var M=new C(D);return M._formatted=D.external,M._fsPath=D._sep===b?D.fsPath:null,M}return D},A}(),b=o?1:void 0,C=function(A){function D(){var M=A!==null&&A.apply(this,arguments)||this;return M._formatted=null,M._fsPath=null,M}return h(D,A),Object.defineProperty(D.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),D.prototype.toString=function(M){return M===void 0&&(M=!1),M?L(this,!0):(this._formatted||(this._formatted=L(this,!1)),this._formatted)},D.prototype.toJSON=function(){var M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=b),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M},D}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function x(A,D){for(var M=void 0,W=-1,ge=0;ge<A.length;ge++){var se=A.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||D&&se===47)W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M!==void 0&&(M+=A.charAt(ge));else{M===void 0&&(M=A.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M+=ae):W===-1&&(W=ge)}}return W!==-1&&(M+=encodeURIComponent(A.substring(W))),M!==void 0?M:A}function S(A){for(var D=void 0,M=0;M<A.length;M++){var W=A.charCodeAt(M);W===35||W===63?(D===void 0&&(D=A.substr(0,M)),D+=y[W]):D!==void 0&&(D+=A[M])}return D!==void 0?D:A}function w(A,D){var M;return M=A.authority&&A.path.length>1&&A.scheme==="file"?"//"+A.authority+A.path:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?D?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,o&&(M=M.replace(/\//g,"\\")),M}function L(A,D){var M=D?S:x,W="",ge=A.scheme,se=A.authority,ae=A.path,we=A.query,De=A.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var Ci=se.substr(0,ct);se=se.substr(ct+1),(ct=Ci.indexOf(":"))===-1?W+=M(Ci,!1):(W+=M(Ci.substr(0,ct),!1),W+=":",W+=M(Ci.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=M(se,!1):(W+=M(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Yt=ae.charCodeAt(1))>=65&&Yt<=90&&(ae="/"+String.fromCharCode(Yt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Yt;(Yt=ae.charCodeAt(0))>=65&&Yt<=90&&(ae=String.fromCharCode(Yt+32)+":"+ae.substr(2))}W+=M(ae,!0)}return we&&(W+="?",W+=M(we,!1)),De&&(W+="#",W+=D?De:x(De,!1)),W}function N(A){try{return decodeURIComponent(A)}catch{return A.length>3?A.substr(0,3)+N(A.substr(3)):A}}var P=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(A){return A.match(P)?A.replace(P,function(D){return N(D)}):A}var U,j=s(470),re=function(){for(var A=0,D=0,M=arguments.length;D<M;D++)A+=arguments[D].length;var W=Array(A),ge=0;for(D=0;D<M;D++)for(var se=arguments[D],ae=0,we=se.length;ae<we;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(A){A.joinPath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];return D.with({path:te.join.apply(te,re([D.path],M))})},A.resolvePath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];var ge=D.path||"/";return D.with({path:te.resolve.apply(te,re([ge],M))})},A.dirname=function(D){var M=te.dirname(D.path);return M.length===1&&M.charCodeAt(0)===46?D:D.with({path:M})},A.basename=function(D){return te.basename(D.path)},A.extname=function(D){return te.extname(D.path)}})(U||(U={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();const{URI:eR,Utils:tR}=v9;var Wbe=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var i=0,n=e.length,s;i<n;i++)(s||!(i in e))&&(s||(s=Array.prototype.slice.call(e,0,i)),s[i]=e[i]);return r.concat(s||Array.prototype.slice.call(e))};function iR(r){return tR.dirname(eR.parse(r)).toString()}function nR(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return tR.joinPath.apply(tR,Wbe([eR.parse(r)],e,!1)).toString()}var C9=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},w9=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},Vbe=function(){function r(e){this.readDirectory=e,this.literalCompletions=[],this.importCompletions=[]}return r.prototype.onCssURILiteralValue=function(e){this.literalCompletions.push(e)},r.prototype.onCssImportPath=function(e){this.importCompletions.push(e)},r.prototype.computeCompletions=function(e,t){return C9(this,void 0,void 0,function(){var i,n,s,o,a,l,c,h,u,d,f,g,p,_,l,v,b,C,d;return w9(this,function(y){switch(y.label){case 0:i={items:[],isIncomplete:!1},n=0,s=this.literalCompletions,y.label=1;case 1:return n<s.length?(o=s[n],a=o.uriValue,l=rR(a),l==="."||l===".."?(i.isIncomplete=!0,[3,4]):[3,2]):[3,5];case 2:return[4,this.providePathSuggestions(a,o.position,o.range,e,t)];case 3:for(c=y.sent(),h=0,u=c;h<u.length;h++)d=u[h],i.items.push(d);y.label=4;case 4:return n++,[3,1];case 5:f=0,g=this.importCompletions,y.label=6;case 6:return f<g.length?(p=g[f],_=p.pathValue,l=rR(_),l==="."||l===".."?(i.isIncomplete=!0,[3,9]):[3,7]):[3,10];case 7:return[4,this.providePathSuggestions(_,p.position,p.range,e,t)];case 8:for(v=y.sent(),e.languageId==="scss"&&v.forEach(function(x){Un(x.label,"_")&&cV(x.label,".scss")&&(x.textEdit?x.textEdit.newText=x.label.slice(1,-5):x.label=x.label.slice(1,-5))}),b=0,C=v;b<C.length;b++)d=C[b],i.items.push(d);y.label=9;case 9:return f++,[3,6];case 10:return[2,i]}})})},r.prototype.providePathSuggestions=function(e,t,i,n,s){return C9(this,void 0,void 0,function(){var o,a,l,c,h,u,d,f,g,p,_,v,b,C,y;return w9(this,function(x){switch(x.label){case 0:if(o=rR(e),a=Un(e,"'")||Un(e,'"'),l=a?o.slice(0,t.character-(i.start.character+1)):o.slice(0,t.character-i.start.character),c=n.uri,h=a?Ube(i,1,-1):i,u=zbe(l,o,h),d=l.substring(0,l.lastIndexOf("/")+1),f=s.resolveReference(d||".",c),!f)return[3,4];x.label=1;case 1:return x.trys.push([1,3,,4]),g=[],[4,this.readDirectory(f)];case 2:for(p=x.sent(),_=0,v=p;_<v.length;_++)b=v[_],C=b[0],y=b[1],C.charCodeAt(0)!==Hbe&&(y===lb.Directory||nR(f,C)!==c)&&g.push($be(C,y===lb.Directory,u));return[2,g];case 3:return x.sent(),[3,4];case 4:return[2,[]]}})})},r}(),Hbe=".".charCodeAt(0);function rR(r){return Un(r,"'")||Un(r,'"')?r.slice(1,-1):r}function zbe(r,e,t){var i,n=r.lastIndexOf("/");if(n===-1)i=t;else{var s=e.slice(n+1),o=N1(t.end,-s.length),a=s.indexOf(" "),l=void 0;a!==-1?l=N1(o,a):l=t.end,i=Ii.create(o,l)}return i}function $be(r,e,t){return e?(r=r+"/",{label:I1(r),kind:Ae.Folder,textEdit:gt.replace(t,I1(r)),command:{title:"Suggest",command:"editor.action.triggerSuggest"}}):{label:I1(r),kind:Ae.File,textEdit:gt.replace(t,I1(r))}}function I1(r){return r.replace(/(\s|\(|\)|,|"|')/g,"\\$1")}function N1(r,e){return ps.create(r.line,r.character+e)}function Ube(r,e,t){var i=N1(r.start,e),n=N1(r.end,t);return Ii.create(i,n)}var jbe=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Kbe=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},qbe=Kc(),Gc=qr.Snippet,xa;(function(r){r.Enums=" ",r.Normal="d",r.VendorPrefixed="x",r.Term="y",r.Variable="z"})(xa||(xa={}));var y9=function(){function r(e,t,i){e===void 0&&(e=null),this.variablePrefix=e,this.lsOptions=t,this.cssDataManager=i,this.completionParticipants=[]}return r.prototype.configure=function(e){this.defaultSettings=e},r.prototype.getSymbolContext=function(){return this.symbolContext||(this.symbolContext=new GA(this.styleSheet)),this.symbolContext},r.prototype.setCompletionParticipants=function(e){this.completionParticipants=e||[]},r.prototype.doComplete2=function(e,t,i,n,s){return s===void 0&&(s=this.defaultSettings),jbe(this,void 0,void 0,function(){var o,a,l,c;return Kbe(this,function(h){switch(h.label){case 0:if(!this.lsOptions.fileSystemProvider||!this.lsOptions.fileSystemProvider.readDirectory)return[2,this.doComplete(e,t,i,s)];o=new Vbe(this.lsOptions.fileSystemProvider.readDirectory),a=this.completionParticipants,this.completionParticipants=[o].concat(a),l=this.doComplete(e,t,i,s),h.label=1;case 1:return h.trys.push([1,,3,4]),[4,o.computeCompletions(e,n)];case 2:return c=h.sent(),[2,{isIncomplete:l.isIncomplete||c.isIncomplete,items:c.items.concat(l.items)}];case 3:return this.completionParticipants=a,[7];case 4:return[2]}})})},r.prototype.doComplete=function(e,t,i,n){this.offset=e.offsetAt(t),this.position=t,this.currentWord=Ybe(e,this.offset),this.defaultReplaceRange=Ii.create(ps.create(this.position.line,this.position.character-this.currentWord.length),this.position),this.textDocument=e,this.styleSheet=i,this.documentSettings=n;try{var s={isIncomplete:!1,items:[]};this.nodePath=O_e(this.styleSheet,this.offset);for(var o=this.nodePath.length-1;o>=0;o--){var a=this.nodePath[o];if(a instanceof VA)this.getCompletionsForDeclarationProperty(a.getParent(),s);else if(a instanceof vV)a.parent instanceof jA?this.getVariableProposals(null,s):this.getCompletionsForExpression(a,s);else if(a instanceof uV){var l=a.findAParent(G.ExtendsReference,G.Ruleset);if(l)if(l.type===G.ExtendsReference)this.getCompletionsForExtendsReference(l,a,s);else{var c=l;this.getCompletionsForSelector(c,c&&c.isNested(),s)}}else if(a instanceof Ag)this.getCompletionsForFunctionArgument(a,a.getParent(),s);else if(a instanceof BA)this.getCompletionsForDeclarations(a,s);else if(a instanceof _1)this.getCompletionsForVariableDeclaration(a,s);else if(a instanceof f1)this.getCompletionsForRuleSet(a,s);else if(a instanceof jA)this.getCompletionsForInterpolation(a,s);else if(a instanceof m1)this.getCompletionsForFunctionDeclaration(a,s);else if(a instanceof b1)this.getCompletionsForMixinReference(a,s);else if(a instanceof X_)this.getCompletionsForFunctionArgument(null,a,s);else if(a instanceof zA)this.getCompletionsForSupports(a,s);else if(a instanceof Q_)this.getCompletionsForSupportsCondition(a,s);else if(a instanceof J_)this.getCompletionsForExtendsReference(a,null,s);else if(a.type===G.URILiteral)this.getCompletionForUriLiteralValue(a,s);else if(a.parent===null)this.getCompletionForTopLevel(s);else if(a.type===G.StringLiteral&&this.isImportPathParent(a.parent.type))this.getCompletionForImportPath(a,s);else continue;if(s.items.length>0||this.offset>a.offset)return this.finalize(s)}return this.getCompletionsForStylesheet(s),s.items.length===0&&this.variablePrefix&&this.currentWord.indexOf(this.variablePrefix)===0&&this.getVariableProposals(null,s),this.finalize(s)}finally{this.position=null,this.currentWord=null,this.textDocument=null,this.styleSheet=null,this.symbolContext=null,this.defaultReplaceRange=null,this.nodePath=null}},r.prototype.isImportPathParent=function(e){return e===G.Import},r.prototype.finalize=function(e){return e},r.prototype.findInNodePath=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var i=this.nodePath.length-1;i>=0;i--){var n=this.nodePath[i];if(e.indexOf(n.type)!==-1)return n}return null},r.prototype.getCompletionsForDeclarationProperty=function(e,t){return this.getPropertyProposals(e,t)},r.prototype.getPropertyProposals=function(e,t){var i=this,n=this.isTriggerPropertyValueCompletionEnabled,s=this.isCompletePropertyWithSemicolonEnabled,o=this.cssDataManager.getProperties();return o.forEach(function(a){var l,c,h=!1;e?(l=i.getCompletionRange(e.getProperty()),c=a.name,Sa(e.colonPosition)||(c+=": ",h=!0)):(l=i.getCompletionRange(null),c=a.name+": ",h=!0),!e&&s&&(c+="$0;"),e&&!e.semicolonPosition&&s&&i.offset>=i.textDocument.offsetAt(l.end)&&(c+="$0;");var u={label:a.name,documentation:tb(a,i.doesSupportMarkdown()),tags:cb(a)?[td.Deprecated]:[],textEdit:gt.replace(l,c),insertTextFormat:qr.Snippet,kind:Ae.Property};a.restrictions||(h=!1),n&&h&&(u.command={title:"Suggest",command:"editor.action.triggerSuggest"});var d=typeof a.relevance=="number"?Math.min(Math.max(a.relevance,0),99):50,f=(255-d).toString(16),g=Un(a.name,"-")?xa.VendorPrefixed:xa.Normal;u.sortText=g+"_"+f,t.items.push(u)}),this.completionParticipants.forEach(function(a){a.onCssProperty&&a.onCssProperty({propertyName:i.currentWord,range:i.defaultReplaceRange})}),t},Object.defineProperty(r.prototype,"isTriggerPropertyValueCompletionEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.triggerPropertyValueCompletion)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"isCompletePropertyWithSemicolonEnabled",{get:function(){var e,t;return(t=(e=this.documentSettings)===null||e===void 0?void 0:e.completePropertyWithSemicolon)!==null&&t!==void 0?t:!0},enumerable:!1,configurable:!0}),r.prototype.getCompletionsForDeclarationValue=function(e,t){for(var i=this,n=e.getFullPropertyName(),s=this.cssDataManager.getProperty(n),o=e.getValue()||null;o&&o.hasChildren();)o=o.findChildAtOffset(this.offset,!1);if(this.completionParticipants.forEach(function(g){g.onCssPropertyValue&&g.onCssPropertyValue({propertyName:n,propertyValue:i.currentWord,range:i.getCompletionRange(o)})}),s){if(s.restrictions)for(var a=0,l=s.restrictions;a<l.length;a++){var c=l[a];switch(c){case"color":this.getColorProposals(s,o,t);break;case"position":this.getPositionProposals(s,o,t);break;case"repeat":this.getRepeatStyleProposals(s,o,t);break;case"line-style":this.getLineStyleProposals(s,o,t);break;case"line-width":this.getLineWidthProposals(s,o,t);break;case"geometry-box":this.getGeometryBoxProposals(s,o,t);break;case"box":this.getBoxProposals(s,o,t);break;case"image":this.getImageProposals(s,o,t);break;case"timing-function":this.getTimingFunctionProposals(s,o,t);break;case"shape":this.getBasicShapeProposals(s,o,t);break}}this.getValueEnumProposals(s,o,t),this.getCSSWideKeywordProposals(s,o,t),this.getUnitProposals(s,o,t)}else for(var h=Gbe(this.styleSheet,e),u=0,d=h.getEntries();u<d.length;u++){var f=d[u];t.items.push({label:f,textEdit:gt.replace(this.getCompletionRange(o),f),kind:Ae.Value})}return this.getVariableProposals(o,t),this.getTermProposals(s,o,t),t},r.prototype.getValueEnumProposals=function(e,t,i){if(e.values)for(var n=0,s=e.values;n<s.length;n++){var o=s[n],a=o.name,l=void 0;if(cV(a,")")){var c=a.lastIndexOf("(");c!==-1&&(a=a.substr(0,c)+"($1)",l=Gc)}var h=xa.Enums;Un(o.name,"-")&&(h+=xa.VendorPrefixed);var u={label:o.name,documentation:tb(o,this.doesSupportMarkdown()),tags:cb(e)?[td.Deprecated]:[],textEdit:gt.replace(this.getCompletionRange(t),a),sortText:h,kind:Ae.Value,insertTextFormat:l};i.items.push(u)}return i},r.prototype.getCSSWideKeywordProposals=function(e,t,i){for(var n in AV)i.items.push({label:n,documentation:AV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getCompletionsForInterpolation=function(e,t){return this.offset>=e.offset+2&&this.getVariableProposals(null,t),t},r.prototype.getVariableProposals=function(e,t){for(var i=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Variable),n=0,s=i;n<s.length;n++){var o=s[n],a=Un(o.name,"--")?"var("+o.name+")":o.name,l={label:o.name,documentation:o.value?hV(o.value):o.value,textEdit:gt.replace(this.getCompletionRange(e),a),kind:Ae.Variable,sortText:xa.Variable};if(typeof l.documentation=="string"&&L9(l.documentation)&&(l.kind=Ae.Color),o.node.type===G.FunctionParameter){var c=o.node.getParent();c.type===G.MixinDeclaration&&(l.detail=qbe("completion.argument","argument from '{0}'",c.getName()))}t.items.push(l)}return t},r.prototype.getVariableProposalsForCSSVarFunction=function(e){var t=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Variable);t=t.filter(function(a){return Un(a.name,"--")});for(var i=0,n=t;i<n.length;i++){var s=n[i],o={label:s.name,documentation:s.value?hV(s.value):s.value,textEdit:gt.replace(this.getCompletionRange(null),s.name),kind:Ae.Variable};typeof o.documentation=="string"&&L9(o.documentation)&&(o.kind=Ae.Color),e.items.push(o)}return e},r.prototype.getUnitProposals=function(e,t,i){var n="0";if(this.currentWord.length>0){var s=this.currentWord.match(/^-?\d[\.\d+]*/);s&&(n=s[0],i.isIncomplete=n.length===this.currentWord.length)}else this.currentWord.length===0&&(i.isIncomplete=!0);if(t&&t.parent&&t.parent.type===G.Term&&(t=t.getParent()),e.restrictions)for(var o=0,a=e.restrictions;o<a.length;o++){var l=a[o],c=Ibe[l];if(c)for(var h=0,u=c;h<u.length;h++){var d=u[h],f=n+d;i.items.push({label:f,textEdit:gt.replace(this.getCompletionRange(t),f),kind:Ae.Unit})}}return i},r.prototype.getCompletionRange=function(e){if(e&&e.offset<=this.offset&&this.offset<=e.end){var t=e.end!==-1?this.textDocument.positionAt(e.end):this.position,i=this.textDocument.positionAt(e.offset);if(i.line===t.line)return Ii.create(i,t)}return this.defaultReplaceRange},r.prototype.getColorProposals=function(e,t,i){for(var n in C1)i.items.push({label:n,documentation:C1[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Color});for(var n in LV)i.items.push({label:n,documentation:LV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});var s=new S9;this.styleSheet.acceptVisitor(new Zbe(s,this.offset));for(var o=0,a=s.getEntries();o<a.length;o++){var n=a[o];i.items.push({label:n,textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Color})}for(var l=function(f){var g=1,p=function(v,b){return"${"+g+++":"+b+"}"},_=f.func.replace(/\[?\$(\w+)\]?/g,p);i.items.push({label:f.func.substr(0,f.func.indexOf("(")),detail:f.func,documentation:f.desc,textEdit:gt.replace(c.getCompletionRange(t),_),insertTextFormat:Gc,kind:Ae.Function})},c=this,h=0,u=vbe;h<u.length;h++){var d=u[h];l(d)}return i},r.prototype.getPositionProposals=function(e,t,i){for(var n in DV)i.items.push({label:n,documentation:DV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getRepeatStyleProposals=function(e,t,i){for(var n in EV)i.items.push({label:n,documentation:EV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getLineStyleProposals=function(e,t,i){for(var n in IV)i.items.push({label:n,documentation:IV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getLineWidthProposals=function(e,t,i){for(var n=0,s=Ebe;n<s.length;n++){var o=s[n];i.items.push({label:o,textEdit:gt.replace(this.getCompletionRange(t),o),kind:Ae.Value})}return i},r.prototype.getGeometryBoxProposals=function(e,t,i){for(var n in TV)i.items.push({label:n,documentation:TV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getBoxProposals=function(e,t,i){for(var n in NV)i.items.push({label:n,documentation:NV[n],textEdit:gt.replace(this.getCompletionRange(t),n),kind:Ae.Value});return i},r.prototype.getImageProposals=function(e,t,i){for(var n in RV){var s=hb(n);i.items.push({label:n,documentation:RV[n],textEdit:gt.replace(this.getCompletionRange(t),s),kind:Ae.Function,insertTextFormat:n!==s?Gc:void 0})}return i},r.prototype.getTimingFunctionProposals=function(e,t,i){for(var n in MV){var s=hb(n);i.items.push({label:n,documentation:MV[n],textEdit:gt.replace(this.getCompletionRange(t),s),kind:Ae.Function,insertTextFormat:n!==s?Gc:void 0})}return i},r.prototype.getBasicShapeProposals=function(e,t,i){for(var n in PV){var s=hb(n);i.items.push({label:n,documentation:PV[n],textEdit:gt.replace(this.getCompletionRange(t),s),kind:Ae.Function,insertTextFormat:n!==s?Gc:void 0})}return i},r.prototype.getCompletionsForStylesheet=function(e){var t=this.styleSheet.findFirstChildBeforeOffset(this.offset);return t?t instanceof f1?this.getCompletionsForRuleSet(t,e):t instanceof zA?this.getCompletionsForSupports(t,e):e:this.getCompletionForTopLevel(e)},r.prototype.getCompletionForTopLevel=function(e){var t=this;return this.cssDataManager.getAtDirectives().forEach(function(i){e.items.push({label:i.name,textEdit:gt.replace(t.getCompletionRange(null),i.name),documentation:tb(i,t.doesSupportMarkdown()),tags:cb(i)?[td.Deprecated]:[],kind:Ae.Keyword})}),this.getCompletionsForSelector(null,!1,e),e},r.prototype.getCompletionsForRuleSet=function(e,t){var i=e.getDeclarations(),n=i&&i.endsWith("}")&&this.offset>=i.end;if(n)return this.getCompletionForTopLevel(t);var s=!i||this.offset<=i.offset;return s?this.getCompletionsForSelector(e,e.isNested(),t):this.getCompletionsForDeclarations(e.getDeclarations(),t)},r.prototype.getCompletionsForSelector=function(e,t,i){var n=this,s=this.findInNodePath(G.PseudoSelector,G.IdentifierSelector,G.ClassSelector,G.ElementNameSelector);!s&&this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord,this.hasCharacterAtPosition(this.offset-this.currentWord.length-1,":")&&(this.currentWord=":"+this.currentWord),this.defaultReplaceRange=Ii.create(ps.create(this.position.line,this.position.character-this.currentWord.length),this.position));var o=this.cssDataManager.getPseudoClasses();o.forEach(function(_){var v=hb(_.name),b={label:_.name,textEdit:gt.replace(n.getCompletionRange(s),v),documentation:tb(_,n.doesSupportMarkdown()),tags:cb(_)?[td.Deprecated]:[],kind:Ae.Function,insertTextFormat:_.name!==v?Gc:void 0};Un(_.name,":-")&&(b.sortText=xa.VendorPrefixed),i.items.push(b)});var a=this.cssDataManager.getPseudoElements();if(a.forEach(function(_){var v=hb(_.name),b={label:_.name,textEdit:gt.replace(n.getCompletionRange(s),v),documentation:tb(_,n.doesSupportMarkdown()),tags:cb(_)?[td.Deprecated]:[],kind:Ae.Function,insertTextFormat:_.name!==v?Gc:void 0};Un(_.name,"::-")&&(b.sortText=xa.VendorPrefixed),i.items.push(b)}),!t){for(var l=0,c=Nbe;l<c.length;l++){var h=c[l];i.items.push({label:h,textEdit:gt.replace(this.getCompletionRange(s),h),kind:Ae.Keyword})}for(var u=0,d=Tbe;u<d.length;u++){var h=d[u];i.items.push({label:h,textEdit:gt.replace(this.getCompletionRange(s),h),kind:Ae.Keyword})}}var f={};f[this.currentWord]=!0;var g=this.textDocument.getText();if(this.styleSheet.accept(function(_){if(_.type===G.SimpleSelector&&_.length>0){var v=g.substr(_.offset,_.length);return v.charAt(0)==="."&&!f[v]&&(f[v]=!0,i.items.push({label:v,textEdit:gt.replace(n.getCompletionRange(s),v),kind:Ae.Keyword})),!1}return!0}),e&&e.isNested()){var p=e.getSelectors().findFirstChildBeforeOffset(this.offset);p&&e.getSelectors().getChildren().indexOf(p)===0&&this.getPropertyProposals(null,i)}return i},r.prototype.getCompletionsForDeclarations=function(e,t){if(!e||this.offset===e.offset)return t;var i=e.findFirstChildBeforeOffset(this.offset);if(!i)return this.getCompletionsForDeclarationProperty(null,t);if(i instanceof WA){var n=i;if(!Sa(n.colonPosition)||this.offset<=n.colonPosition)return this.getCompletionsForDeclarationProperty(n,t);if(Sa(n.semicolonPosition)&&n.semicolonPosition<this.offset)return this.offset===n.semicolonPosition+1?t:this.getCompletionsForDeclarationProperty(null,t);if(n instanceof Tg)return this.getCompletionsForDeclarationValue(n,t)}else i instanceof J_?this.getCompletionsForExtendsReference(i,null,t):this.currentWord&&this.currentWord[0]==="@"?this.getCompletionsForDeclarationProperty(null,t):i instanceof f1&&this.getCompletionsForDeclarationProperty(null,t);return t},r.prototype.getCompletionsForVariableDeclaration=function(e,t){return this.offset&&Sa(e.colonPosition)&&this.offset>e.colonPosition&&this.getVariableProposals(e.getValue(),t),t},r.prototype.getCompletionsForExpression=function(e,t){var i=e.getParent();if(i instanceof Ag)return this.getCompletionsForFunctionArgument(i,i.getParent(),t),t;var n=e.findParent(G.Declaration);if(!n)return this.getTermProposals(void 0,null,t),t;var s=e.findChildAtOffset(this.offset,!0);return s?s instanceof UA||s instanceof So?this.getCompletionsForDeclarationValue(n,t):t:this.getCompletionsForDeclarationValue(n,t)},r.prototype.getCompletionsForFunctionArgument=function(e,t,i){var n=t.getIdentifier();return n&&n.matches("var")&&(!t.getArguments().hasChildren()||t.getArguments().getChild(0)===e)&&this.getVariableProposalsForCSSVarFunction(i),i},r.prototype.getCompletionsForFunctionDeclaration=function(e,t){var i=e.getDeclarations();return i&&this.offset>i.offset&&this.offset<i.end&&this.getTermProposals(void 0,null,t),t},r.prototype.getCompletionsForMixinReference=function(e,t){for(var i=this,n=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Mixin),s=0,o=n;s<o.length;s++){var a=o[s];a.node instanceof eb&&t.items.push(this.makeTermProposal(a,a.node.getParameters(),null))}var l=e.getIdentifier()||null;return this.completionParticipants.forEach(function(c){c.onCssMixinReference&&c.onCssMixinReference({mixinName:i.currentWord,range:i.getCompletionRange(l)})}),t},r.prototype.getTermProposals=function(e,t,i){for(var n=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Function),s=0,o=n;s<o.length;s++){var a=o[s];a.node instanceof m1&&i.items.push(this.makeTermProposal(a,a.node.getParameters(),t))}return i},r.prototype.makeTermProposal=function(e,t,i){e.node;var n=t.getChildren().map(function(o){return o instanceof p1?o.getName():o.getText()}),s=e.name+"("+n.map(function(o,a){return"${"+(a+1)+":"+o+"}"}).join(", ")+")";return{label:e.name,detail:e.name+"("+n.join(", ")+")",textEdit:gt.replace(this.getCompletionRange(i),s),insertTextFormat:Gc,kind:Ae.Function,sortText:xa.Term}},r.prototype.getCompletionsForSupportsCondition=function(e,t){var i=e.findFirstChildBeforeOffset(this.offset);if(i){if(i instanceof Tg)return!Sa(i.colonPosition)||this.offset<=i.colonPosition?this.getCompletionsForDeclarationProperty(i,t):this.getCompletionsForDeclarationValue(i,t);if(i instanceof Q_)return this.getCompletionsForSupportsCondition(i,t)}return Sa(e.lParent)&&this.offset>e.lParent&&(!Sa(e.rParent)||this.offset<=e.rParent)?this.getCompletionsForDeclarationProperty(null,t):t},r.prototype.getCompletionsForSupports=function(e,t){var i=e.getDeclarations(),n=!i||this.offset<=i.offset;if(n){var s=e.findFirstChildBeforeOffset(this.offset);return s instanceof Q_?this.getCompletionsForSupportsCondition(s,t):t}return this.getCompletionForTopLevel(t)},r.prototype.getCompletionsForExtendsReference=function(e,t,i){return i},r.prototype.getCompletionForUriLiteralValue=function(e,t){var i,n,s;if(e.hasChildren()){var a=e.getChild(0);i=a.getText(),n=this.position,s=this.getCompletionRange(a)}else{i="",n=this.position;var o=this.textDocument.positionAt(e.offset+"url(".length);s=Ii.create(o,o)}return this.completionParticipants.forEach(function(l){l.onCssURILiteralValue&&l.onCssURILiteralValue({uriValue:i,position:n,range:s})}),t},r.prototype.getCompletionForImportPath=function(e,t){var i=this;return this.completionParticipants.forEach(function(n){n.onCssImportPath&&n.onCssImportPath({pathValue:e.getText(),position:i.position,range:i.getCompletionRange(e)})}),t},r.prototype.hasCharacterAtPosition=function(e,t){var i=this.textDocument.getText();return e>=0&&e<i.length&&i.charAt(e)===t},r.prototype.doesSupportMarkdown=function(){var e,t,i;if(!Sa(this.supportsMarkdown)){if(!Sa(this.lsOptions.clientCapabilities))return this.supportsMarkdown=!0,this.supportsMarkdown;var n=(i=(t=(e=this.lsOptions.clientCapabilities.textDocument)===null||e===void 0?void 0:e.completion)===null||t===void 0?void 0:t.completionItem)===null||i===void 0?void 0:i.documentationFormat;this.supportsMarkdown=Array.isArray(n)&&n.indexOf(La.Markdown)!==-1}return this.supportsMarkdown},r}();function cb(r){return!!(r.status&&(r.status==="nonstandard"||r.status==="obsolete"))}var S9=function(){function r(){this.entries={}}return r.prototype.add=function(e){this.entries[e]=!0},r.prototype.getEntries=function(){return Object.keys(this.entries)},r}();function hb(r){return r.replace(/\(\)$/,"($1)")}function Gbe(r,e){var t=e.getFullPropertyName(),i=new S9;function n(a){return(a instanceof So||a instanceof UA||a instanceof $A)&&i.add(a.getText()),!0}function s(a){var l=a.getFullPropertyName();return t===l}function o(a){if(a instanceof Tg&&a!==e&&s(a)){var l=a.getValue();l&&l.accept(n)}return!0}return r.accept(o),i}var Zbe=function(){function r(e,t){this.entries=e,this.currentOffset=t}return r.prototype.visitNode=function(e){return(e instanceof $A||e instanceof X_&&wbe(e))&&(this.currentOffset<e.offset||e.end<this.currentOffset)&&this.entries.add(e.getText()),!0},r}();function Ybe(r,e){for(var t=e-1,i=r.getText();t>=0&&` -\r":{[()]},*>+`.indexOf(i.charAt(t))===-1;)t--;return i.substring(t+1,e)}function L9(r){return r.toLowerCase()in C1||/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r)}var x9=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),k9=function(){function r(){this.parent=null,this.children=null,this.attributes=null}return r.prototype.findAttribute=function(e){if(this.attributes)for(var t=0,i=this.attributes;t<i.length;t++){var n=i[t];if(n.name===e)return n.value}return null},r.prototype.addChild=function(e){e instanceof r&&(e.parent=this),this.children||(this.children=[]),this.children.push(e)},r.prototype.append=function(e){if(this.attributes){var t=this.attributes[this.attributes.length-1];t.value=t.value+e}},r.prototype.prepend=function(e){if(this.attributes){var t=this.attributes[0];t.value=e+t.value}},r.prototype.findRoot=function(){for(var e=this;e.parent&&!(e.parent instanceof D9);)e=e.parent;return e},r.prototype.removeChild=function(e){if(this.children){var t=this.children.indexOf(e);if(t!==-1)return this.children.splice(t,1),!0}return!1},r.prototype.addAttr=function(e,t){this.attributes||(this.attributes=[]);for(var i=0,n=this.attributes;i<n.length;i++){var s=n[i];if(s.name===e){s.value+=" "+t;return}}this.attributes.push({name:e,value:t})},r.prototype.clone=function(e){e===void 0&&(e=!0);var t=new r;if(this.attributes){t.attributes=[];for(var i=0,n=this.attributes;i<n.length;i++){var s=n[i];t.addAttr(s.name,s.value)}}if(e&&this.children){t.children=[];for(var o=0;o<this.children.length;o++)t.addChild(this.children[o].clone())}return t},r.prototype.cloneWithParent=function(){var e=this.clone(!1);if(this.parent&&!(this.parent instanceof D9)){var t=this.parent.cloneWithParent();t.addChild(e)}return e},r}(),D9=function(r){x9(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(k9);(function(r){x9(e,r);function e(t){var i=r.call(this)||this;return i.addAttr("name",t),i}return e})(k9);var E9;(function(r){function e(i,n){return n+t(i)+n}r.ensure=e;function t(i){var n=i.match(/^['"](.*)["']$/);return n?n[1]:i}r.remove=t})(E9||(E9={}));var T1=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},A1=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}},I9=Kc(),N9=/^\w+:\/\//,T9=/^data:/,Xbe=function(){function r(e){this.fileSystemProvider=e}return r.prototype.findDefinition=function(e,t,i){var n=new GA(i),s=e.offsetAt(t),o=FA(i,s);if(!o)return null;var a=n.findSymbolFromNode(o);return a?{uri:e.uri,range:id(a.node,e)}:null},r.prototype.findReferences=function(e,t,i){var n=this.findDocumentHighlights(e,t,i);return n.map(function(s){return{uri:e.uri,range:s.range}})},r.prototype.findDocumentHighlights=function(e,t,i){var n=[],s=e.offsetAt(t),o=FA(i,s);if(!o||o.type===G.Stylesheet||o.type===G.Declarations)return n;o.type===G.Identifier&&o.parent&&o.parent.type===G.ClassSelector&&(o=o.parent);var a=new GA(i),l=a.findSymbolFromNode(o),c=o.getText();return i.accept(function(h){if(l){if(a.matchesSymbol(h,l))return n.push({kind:A9(h),range:id(h,e)}),!1}else o&&o.type===h.type&&h.matches(c)&&n.push({kind:A9(h),range:id(h,e)});return!0}),n},r.prototype.isRawStringDocumentLinkNode=function(e){return e.type===G.Import},r.prototype.findDocumentLinks=function(e,t,i){for(var n=this.findUnresolvedLinks(e,t),s=[],o=0,a=n;o<a.length;o++){var l=a[o],c=l.link,h=c.target;if(!(!h||T9.test(h)))if(N9.test(h))s.push(c);else{var u=i.resolveReference(h,e.uri);u&&(c.target=u),s.push(c)}}return s},r.prototype.findDocumentLinks2=function(e,t,i){return T1(this,void 0,void 0,function(){var n,s,o,a,l,c,h,u;return A1(this,function(d){switch(d.label){case 0:n=this.findUnresolvedLinks(e,t),s=[],o=0,a=n,d.label=1;case 1:return o<a.length?(l=a[o],c=l.link,h=c.target,!h||T9.test(h)?[3,5]:[3,2]):[3,6];case 2:return N9.test(h)?(s.push(c),[3,5]):[3,3];case 3:return[4,this.resolveRelativeReference(h,e.uri,i,l.isRawLink)];case 4:u=d.sent(),u!==void 0&&(c.target=u,s.push(c)),d.label=5;case 5:return o++,[3,1];case 6:return[2,s]}})})},r.prototype.findUnresolvedLinks=function(e,t){var i=this,n=[],s=function(o){var a=o.getText(),l=id(o,e);if(!(l.start.line===l.end.line&&l.start.character===l.end.character)){(Un(a,"'")||Un(a,'"'))&&(a=a.slice(1,-1));var c=o.parent?i.isRawStringDocumentLinkNode(o.parent):!1;n.push({link:{target:a,range:l},isRawLink:c})}};return t.accept(function(o){if(o.type===G.URILiteral){var a=o.getChild(0);return a&&s(a),!1}if(o.parent&&i.isRawStringDocumentLinkNode(o.parent)){var l=o.getText();return(Un(l,"'")||Un(l,'"'))&&s(o),!1}return!0}),n},r.prototype.findDocumentSymbols=function(e,t){var i=[];return t.accept(function(n){var s={name:null,kind:Li.Class,location:null},o=n;if(n instanceof g1)return s.name=n.getText(),o=n.findAParent(G.Ruleset,G.ExtendsReference),o&&(s.location=ib.create(e.uri,id(o,e)),i.push(s)),!1;if(n instanceof _1)s.name=n.getName(),s.kind=Li.Variable;else if(n instanceof eb)s.name=n.getName(),s.kind=Li.Method;else if(n instanceof m1)s.name=n.getName(),s.kind=Li.Function;else if(n instanceof gV)s.name=I9("literal.keyframes","@keyframes {0}",n.getName());else if(n instanceof dV)s.name=I9("literal.fontface","@font-face");else if(n instanceof mV){var a=n.getChild(0);a instanceof _V&&(s.name="@media "+a.getText(),s.kind=Li.Module)}return s.name&&(s.location=ib.create(e.uri,id(o,e)),i.push(s)),!0}),i},r.prototype.findDocumentColors=function(e,t){var i=[];return t.accept(function(n){var s=Qbe(n,e);return s&&i.push(s),!0}),i},r.prototype.getColorPresentations=function(e,t,i,n){var s=[],o=Math.round(i.red*255),a=Math.round(i.green*255),l=Math.round(i.blue*255),c;i.alpha===1?c="rgb("+o+", "+a+", "+l+")":c="rgba("+o+", "+a+", "+l+", "+i.alpha+")",s.push({label:c,textEdit:gt.replace(n,c)}),i.alpha===1?c="#"+nd(o)+nd(a)+nd(l):c="#"+nd(o)+nd(a)+nd(l)+nd(Math.round(i.alpha*255)),s.push({label:c,textEdit:gt.replace(n,c)});var h=kbe(i);return h.a===1?c="hsl("+h.h+", "+Math.round(h.s*100)+"%, "+Math.round(h.l*100)+"%)":c="hsla("+h.h+", "+Math.round(h.s*100)+"%, "+Math.round(h.l*100)+"%, "+h.a+")",s.push({label:c,textEdit:gt.replace(n,c)}),s},r.prototype.doRename=function(e,t,i,n){var s,o=this.findDocumentHighlights(e,t,n),a=o.map(function(l){return gt.replace(l.range,i)});return{changes:(s={},s[e.uri]=a,s)}},r.prototype.resolveRelativeReference=function(e,t,i,n){return T1(this,void 0,void 0,function(){var s,o,a,l,c;return A1(this,function(h){switch(h.label){case 0:return e[0]==="~"&&e[1]!=="/"&&this.fileSystemProvider?(e=e.substring(1),Un(t,"file://")?(s=Jbe(e),o=i.resolveReference("/",t),a=iR(t),[4,this.resolvePathToModule(s,a,o)]):[3,2]):[3,3];case 1:if(l=h.sent(),l)return c=e.substring(s.length+1),[2,nR(l,c)];h.label=2;case 2:return[2,i.resolveReference(e,t)];case 3:return[2,i.resolveReference(e,t)]}})})},r.prototype.resolvePathToModule=function(e,t,i){return T1(this,void 0,void 0,function(){var n;return A1(this,function(s){switch(s.label){case 0:return n=nR(t,"node_modules",e,"package.json"),[4,this.fileExists(n)];case 1:return s.sent()?[2,iR(n)]:i&&t.startsWith(i)&&t.length!==i.length?[2,this.resolvePathToModule(e,iR(t),i)]:[2,void 0]}})})},r.prototype.fileExists=function(e){return T1(this,void 0,void 0,function(){var t;return A1(this,function(i){switch(i.label){case 0:if(!this.fileSystemProvider)return[2,!1];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.fileSystemProvider.stat(e)];case 2:return t=i.sent(),t.type===lb.Unknown&&t.size===-1?[2,!1]:[2,!0];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},r}();function Qbe(r,e){var t=Dbe(r);if(t){var i=id(r,e);return{color:t,range:i}}return null}function id(r,e){return Ii.create(e.positionAt(r.offset),e.positionAt(r.end))}function A9(r){if(r.type===G.Selector||r instanceof So&&r.parent&&r.parent instanceof VA&&r.isCustomProperty)return Sl.Write;if(r.parent)switch(r.parent.type){case G.FunctionDeclaration:case G.MixinDeclaration:case G.Keyframe:case G.VariableDeclaration:case G.FunctionParameter:return Sl.Write}return Sl.Read}function nd(r){var e=r.toString(16);return e.length!==2?"0"+e:e}function Jbe(r){return r[0]==="@"?r.substring(0,r.indexOf("/",r.indexOf("/")+1)):r.substring(0,r.indexOf("/"))}var cn=Kc(),Fg=Rg.Warning,R9=Rg.Error,Lo=Rg.Ignore,Cn=function(){function r(e,t,i){this.id=e,this.message=t,this.defaultValue=i}return r}(),eve=function(){function r(e,t,i){this.id=e,this.message=t,this.defaultValue=i}return r}();new Cn("compatibleVendorPrefixes",cn("rule.vendorprefixes.all","When using a vendor-specific prefix make sure to also include all other vendor-specific properties"),Lo),new Cn("vendorPrefix",cn("rule.standardvendorprefix.all","When using a vendor-specific prefix also include the standard property"),Fg),new Cn("duplicateProperties",cn("rule.duplicateDeclarations","Do not use duplicate style definitions"),Lo),new Cn("emptyRules",cn("rule.emptyRuleSets","Do not use empty rulesets"),Fg),new Cn("importStatement",cn("rule.importDirective","Import statements do not load in parallel"),Lo),new Cn("boxModel",cn("rule.bewareOfBoxModelSize","Do not use width or height when using padding or border"),Lo),new Cn("universalSelector",cn("rule.universalSelector","The universal selector (*) is known to be slow"),Lo),new Cn("zeroUnits",cn("rule.zeroWidthUnit","No unit for zero needed"),Lo),new Cn("fontFaceProperties",cn("rule.fontFaceProperties","@font-face rule must define 'src' and 'font-family' properties"),Fg),new Cn("hexColorLength",cn("rule.hexColor","Hex colors must consist of three, four, six or eight hex numbers"),R9),new Cn("argumentsInColorFunction",cn("rule.colorFunction","Invalid number of parameters"),R9),new Cn("unknownProperties",cn("rule.unknownProperty","Unknown property."),Fg),new Cn("unknownAtRules",cn("rule.unknownAtRules","Unknown at-rule."),Fg),new Cn("ieHack",cn("rule.ieHack","IE hacks are only necessary when supporting IE7 and older"),Lo),new Cn("unknownVendorSpecificProperties",cn("rule.unknownVendorSpecificProperty","Unknown vendor specific property."),Lo),new Cn("propertyIgnoredDueToDisplay",cn("rule.propertyIgnoredDueToDisplay","Property is ignored due to the display."),Fg),new Cn("important",cn("rule.avoidImportant","Avoid using !important. It is an indication that the specificity of the entire CSS has gotten out of control and needs to be refactored."),Lo),new Cn("float",cn("rule.avoidFloat","Avoid using 'float'. Floats lead to fragile CSS that is easy to break if one aspect of the layout changes."),Lo),new Cn("idSelector",cn("rule.avoidIdSelector","Selectors should not contain IDs because these rules are too tightly coupled with the HTML."),Lo);new eve("validProperties",cn("rule.validProperties","A list of properties that are not validated against the `unknownProperties` rule."),[]);var tve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),M9="/".charCodeAt(0),ive=` -`.charCodeAt(0),nve="\r".charCodeAt(0),rve="\f".charCodeAt(0),sve="$".charCodeAt(0),ove="#".charCodeAt(0),ave="{".charCodeAt(0),ub="=".charCodeAt(0),lve="!".charCodeAt(0),cve="<".charCodeAt(0),hve=">".charCodeAt(0),sR=".".charCodeAt(0),Ll=I.CustomToken,oR=Ll++,aR=Ll++;Ll++;var P9=Ll++,O9=Ll++,F9=Ll++,B9=Ll++,R1=Ll++;Ll++;var uve=function(r){tve(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scanNext=function(t){if(this.stream.advanceIfChar(sve)){var i=["$"];if(this.ident(i))return this.finishToken(t,oR,i.join(""));this.stream.goBackTo(t)}return this.stream.advanceIfChars([ove,ave])?this.finishToken(t,aR):this.stream.advanceIfChars([ub,ub])?this.finishToken(t,P9):this.stream.advanceIfChars([lve,ub])?this.finishToken(t,O9):this.stream.advanceIfChar(cve)?this.stream.advanceIfChar(ub)?this.finishToken(t,B9):this.finishToken(t,I.Delim):this.stream.advanceIfChar(hve)?this.stream.advanceIfChar(ub)?this.finishToken(t,F9):this.finishToken(t,I.Delim):this.stream.advanceIfChars([sR,sR,sR])?this.finishToken(t,R1):r.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return r.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([M9,M9])?(this.stream.advanceWhileChar(function(t){switch(t){case ive:case nve:case rve:return!1;default:return!0}}),!0):!1},e}(OA),lR=Kc(),cR=function(){function r(e,t){this.id=e,this.message=t}return r}(),hR={FromExpected:new cR("scss-fromexpected",lR("expected.from","'from' expected")),ThroughOrToExpected:new cR("scss-throughexpected",lR("expected.through","'through' or 'to' expected")),InExpected:new cR("scss-fromexpected",lR("expected.in","'in' expected"))},dve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){dve(e,r);function e(){return r.call(this,new uve)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(I.AtKeyword)?this._parseWarnAndDebug()||this._parseControlStatement()||this._parseMixinDeclaration()||this._parseMixinContent()||this._parseMixinReference()||this._parseFunctionDeclaration()||this._parseForward()||this._parseUse()||this._parseRuleset(t)||r.prototype._parseStylesheetAtStatement.call(this,t):this._parseRuleset(!0)||this._parseVariableDeclaration()},e.prototype._parseImport=function(){if(!this.peekKeyword("@import"))return null;var t=this.create(HA);if(this.consumeToken(),!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.URIOrStringExpected);for(;this.accept(I.Comma);)if(!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.URIOrStringExpected);return!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t)},e.prototype._parseVariableDeclaration=function(t){if(t===void 0&&(t=[]),!this.peek(oR))return null;var i=this.create(_1);if(!i.setVariable(this._parseVariable()))return null;if(!this.accept(I.Colon))return this.finish(i,ee.ColonExpected);if(this.prevToken&&(i.colonPosition=this.prevToken.offset),!i.setValue(this._parseExpr()))return this.finish(i,ee.VariableValueExpected,[],t);for(;this.peek(I.Exclamation);)if(!i.addChild(this._tryParsePrio())){if(this.consumeToken(),!this.peekRegExp(I.Ident,/^(default|global)$/))return this.finish(i,ee.UnknownKeyword);this.consumeToken()}return this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseMediaContentStart=function(){return this._parseInterpolation()},e.prototype._parseMediaFeatureName=function(){return this._parseModuleMember()||this._parseFunction()||this._parseIdent()||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._tryParseKeyframeSelector()||this._parseControlStatement(this._parseKeyframeSelector.bind(this))||this._parseVariableDeclaration()||this._parseMixinContent()},e.prototype._parseVariable=function(){if(!this.peek(oR))return null;var t=this.create(KA);return this.consumeToken(),t},e.prototype._parseModuleMember=function(){var t=this.mark(),i=this.create(CV);return i.setIdentifier(this._parseIdent([It.Module]))?this.hasWhitespace()||!this.acceptDelim(".")||this.hasWhitespace()?(this.restoreAtMark(t),null):i.addChild(this._parseVariable()||this._parseFunction())?i:this.finish(i,ee.IdentifierOrVariableExpected):null},e.prototype._parseIdent=function(t){var i=this;if(!this.peek(I.Ident)&&!this.peek(aR)&&!this.peekDelim("-"))return null;var n=this.create(So);n.referenceTypes=t,n.isCustomProperty=this.peekRegExp(I.Ident,/^--/);for(var s=!1,o=function(){var a=i.mark();return i.acceptDelim("-")&&(i.hasWhitespace()||i.acceptDelim("-"),i.hasWhitespace())?(i.restoreAtMark(a),null):i._parseInterpolation()};(this.accept(I.Ident)||n.addChild(o())||s&&this.acceptRegexp(/^[\w-]/))&&(s=!0,!this.hasWhitespace()););return s?this.finish(n):null},e.prototype._parseTermExpression=function(){return this._parseModuleMember()||this._parseVariable()||this._parseSelectorCombinator()||r.prototype._parseTermExpression.call(this)},e.prototype._parseInterpolation=function(){if(this.peek(aR)){var t=this.create(jA);return this.consumeToken(),!t.addChild(this._parseExpr())&&!this._parseSelectorCombinator()?this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.ExpressionExpected):this.accept(I.CurlyR)?this.finish(t):this.finish(t,ee.RightCurlyExpected)}return null},e.prototype._parseOperator=function(){if(this.peek(P9)||this.peek(O9)||this.peek(F9)||this.peek(B9)||this.peekDelim(">")||this.peekDelim("<")||this.peekIdent("and")||this.peekIdent("or")||this.peekDelim("%")){var t=this.createNode(G.Operator);return this.consumeToken(),this.finish(t)}return r.prototype._parseOperator.call(this)},e.prototype._parseUnaryOperator=function(){if(this.peekIdent("not")){var t=this.create(He);return this.consumeToken(),this.finish(t)}return r.prototype._parseUnaryOperator.call(this)},e.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseKeyframe()||this._parseImport()||this._parseMedia(!0)||this._parseFontFace()||this._parseWarnAndDebug()||this._parseControlStatement()||this._parseFunctionDeclaration()||this._parseExtends()||this._parseMixinReference()||this._parseMixinContent()||this._parseMixinDeclaration()||this._parseRuleset(!0)||this._parseSupports(!0)||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._parseVariableDeclaration()||this._tryParseRuleset(!0)||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseDeclaration=function(t){var i=this._tryParseCustomPropertyDeclaration(t);if(i)return i;var n=this.create(Tg);if(!n.setProperty(this._parseProperty()))return null;if(!this.accept(I.Colon))return this.finish(n,ee.ColonExpected,[I.Colon],t||[I.SemiColon]);this.prevToken&&(n.colonPosition=this.prevToken.offset);var s=!1;if(n.setValue(this._parseExpr())&&(s=!0,n.addChild(this._parsePrio())),this.peek(I.CurlyL))n.setNestedProperties(this._parseNestedProperties());else if(!s)return this.finish(n,ee.PropertyValueExpected);return this.peek(I.SemiColon)&&(n.semicolonPosition=this.token.offset),this.finish(n)},e.prototype._parseNestedProperties=function(){var t=this.create(fV);return this._parseBody(t,this._parseDeclaration.bind(this))},e.prototype._parseExtends=function(){if(this.peekKeyword("@extend")){var t=this.create(J_);if(this.consumeToken(),!t.getSelectors().addChild(this._parseSimpleSelector()))return this.finish(t,ee.SelectorExpected);for(;this.accept(I.Comma);)t.getSelectors().addChild(this._parseSimpleSelector());return this.accept(I.Exclamation)&&!this.acceptIdent("optional")?this.finish(t,ee.UnknownKeyword):this.finish(t)}return null},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||this._parseSelectorPlaceholder()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(G.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(I.Num)||this.accept(I.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorPlaceholder=function(){if(this.peekDelim("%")){var t=this.createNode(G.SelectorPlaceholder);return this.consumeToken(),this._parseIdent(),this.finish(t)}else if(this.peekKeyword("@at-root")){var t=this.createNode(G.SelectorPlaceholder);return this.consumeToken(),this.finish(t)}return null},e.prototype._parseElementName=function(){var t=this.mark(),i=r.prototype._parseElementName.call(this);return i&&!this.hasWhitespace()&&this.peek(I.ParenthesisL)?(this.restoreAtMark(t),null):i},e.prototype._tryParsePseudoIdentifier=function(){return this._parseInterpolation()||r.prototype._tryParsePseudoIdentifier.call(this)},e.prototype._parseWarnAndDebug=function(){if(!this.peekKeyword("@debug")&&!this.peekKeyword("@warn")&&!this.peekKeyword("@error"))return null;var t=this.createNode(G.Debug);return this.consumeToken(),t.addChild(this._parseExpr()),this.finish(t)},e.prototype._parseControlStatement=function(t){return t===void 0&&(t=this._parseRuleSetDeclaration.bind(this)),this.peek(I.AtKeyword)?this._parseIfStatement(t)||this._parseForStatement(t)||this._parseEachStatement(t)||this._parseWhileStatement(t):null},e.prototype._parseIfStatement=function(t){return this.peekKeyword("@if")?this._internalParseIfStatement(t):null},e.prototype._internalParseIfStatement=function(t){var i=this.create(z_e);if(this.consumeToken(),!i.setExpression(this._parseExpr(!0)))return this.finish(i,ee.ExpressionExpected);if(this._parseBody(i,t),this.acceptKeyword("@else")){if(this.peekIdent("if"))i.setElseClause(this._internalParseIfStatement(t));else if(this.peek(I.CurlyL)){var n=this.create(K_e);this._parseBody(n,t),i.setElseClause(n)}}return this.finish(i)},e.prototype._parseForStatement=function(t){if(!this.peekKeyword("@for"))return null;var i=this.create($_e);return this.consumeToken(),i.setVariable(this._parseVariable())?this.acceptIdent("from")?i.addChild(this._parseBinaryExpr())?!this.acceptIdent("to")&&!this.acceptIdent("through")?this.finish(i,hR.ThroughOrToExpected,[I.CurlyR]):i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,hR.FromExpected,[I.CurlyR]):this.finish(i,ee.VariableNameExpected,[I.CurlyR])},e.prototype._parseEachStatement=function(t){if(!this.peekKeyword("@each"))return null;var i=this.create(U_e);this.consumeToken();var n=i.getVariables();if(!n.addChild(this._parseVariable()))return this.finish(i,ee.VariableNameExpected,[I.CurlyR]);for(;this.accept(I.Comma);)if(!n.addChild(this._parseVariable()))return this.finish(i,ee.VariableNameExpected,[I.CurlyR]);return this.finish(n),this.acceptIdent("in")?i.addChild(this._parseExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR]):this.finish(i,hR.InExpected,[I.CurlyR])},e.prototype._parseWhileStatement=function(t){if(!this.peekKeyword("@while"))return null;var i=this.create(j_e);return this.consumeToken(),i.addChild(this._parseBinaryExpr())?this._parseBody(i,t):this.finish(i,ee.ExpressionExpected,[I.CurlyR])},e.prototype._parseFunctionBodyDeclaration=function(){return this._parseVariableDeclaration()||this._parseReturnStatement()||this._parseWarnAndDebug()||this._parseControlStatement(this._parseFunctionBodyDeclaration.bind(this))},e.prototype._parseFunctionDeclaration=function(){if(!this.peekKeyword("@function"))return null;var t=this.create(m1);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([It.Function])))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.CurlyR]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}return this.accept(I.ParenthesisR)?this._parseBody(t,this._parseFunctionBodyDeclaration.bind(this)):this.finish(t,ee.RightParenthesisExpected,[I.CurlyR])},e.prototype._parseReturnStatement=function(){if(!this.peekKeyword("@return"))return null;var t=this.createNode(G.ReturnStatement);return this.consumeToken(),t.addChild(this._parseExpr())?this.finish(t):this.finish(t,ee.ExpressionExpected)},e.prototype._parseMixinDeclaration=function(){if(!this.peekKeyword("@mixin"))return null;var t=this.create(eb);if(this.consumeToken(),!t.setIdentifier(this._parseIdent([It.Mixin])))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(this.accept(I.ParenthesisL)){if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.CurlyR])}return this._parseBody(t,this._parseRuleSetDeclaration.bind(this))},e.prototype._parseParameterDeclaration=function(){var t=this.create(p1);return t.setIdentifier(this._parseVariable())?(this.accept(R1),this.accept(I.Colon)&&!t.setDefaultValue(this._parseExpr(!0))?this.finish(t,ee.VariableValueExpected,[],[I.Comma,I.ParenthesisR]):this.finish(t)):null},e.prototype._parseMixinContent=function(){if(!this.peekKeyword("@content"))return null;var t=this.create(lbe);if(this.consumeToken(),this.accept(I.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return this.finish(t)},e.prototype._parseMixinReference=function(){if(!this.peekKeyword("@include"))return null;var t=this.create(b1);this.consumeToken();var i=this._parseIdent([It.Mixin]);if(!t.setIdentifier(i))return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);if(!this.hasWhitespace()&&this.acceptDelim(".")&&!this.hasWhitespace()){var n=this._parseIdent([It.Mixin]);if(!n)return this.finish(t,ee.IdentifierExpected,[I.CurlyR]);var s=this.create(CV);i.referenceTypes=[It.Module],s.setIdentifier(i),t.setIdentifier(n),t.addChild(s)}if(this.accept(I.ParenthesisL)){if(t.getArguments().addChild(this._parseFunctionArgument())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getArguments().addChild(this._parseFunctionArgument()))return this.finish(t,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}return(this.peekIdent("using")||this.peek(I.CurlyL))&&t.setContent(this._parseMixinContentDeclaration()),this.finish(t)},e.prototype._parseMixinContentDeclaration=function(){var t=this.create(cbe);if(this.acceptIdent("using")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.CurlyL]);if(t.getParameters().addChild(this._parseParameterDeclaration())){for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseParameterDeclaration()))return this.finish(t,ee.VariableNameExpected)}if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.CurlyL])}return this.peek(I.CurlyL)&&this._parseBody(t,this._parseMixinReferenceBodyStatement.bind(this)),this.finish(t)},e.prototype._parseMixinReferenceBodyStatement=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._parseFunctionArgument=function(){var t=this.create(Ag),i=this.mark(),n=this._parseVariable();if(n)if(this.accept(I.Colon))t.setIdentifier(n);else{if(this.accept(R1))return t.setValue(n),this.finish(t);this.restoreAtMark(i)}return t.setValue(this._parseExpr(!0))?(this.accept(R1),t.addChild(this._parsePrio()),this.finish(t)):t.setValue(this._tryParsePrio())?this.finish(t):null},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(I.ParenthesisR)){this.restoreAtMark(t);var n=this.create(He);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e.prototype._parseOperation=function(){if(!this.peek(I.ParenthesisL))return null;var t=this.create(He);for(this.consumeToken();t.addChild(this._parseListElement());)this.accept(I.Comma);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseListElement=function(){var t=this.create(ube),i=this._parseBinaryExpr();if(!i)return null;if(this.accept(I.Colon)){if(t.setKey(i),!t.setValue(this._parseBinaryExpr()))return this.finish(t,ee.ExpressionExpected)}else t.setValue(i);return this.finish(t)},e.prototype._parseUse=function(){if(!this.peekKeyword("@use"))return null;var t=this.create(G_e);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.StringLiteralExpected);if(!this.peek(I.SemiColon)&&!this.peek(I.EOF)){if(!this.peekRegExp(I.Ident,/as|with/))return this.finish(t,ee.UnknownKeyword);if(this.acceptIdent("as")&&!t.setIdentifier(this._parseIdent([It.Module]))&&!this.acceptDelim("*"))return this.finish(t,ee.IdentifierOrWildcardExpected);if(this.acceptIdent("with")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}}return!this.accept(I.SemiColon)&&!this.accept(I.EOF)?this.finish(t,ee.SemiColonExpected):this.finish(t)},e.prototype._parseModuleConfigDeclaration=function(){var t=this.create(Z_e);return t.setIdentifier(this._parseVariable())?!this.accept(I.Colon)||!t.setValue(this._parseExpr(!0))?this.finish(t,ee.VariableValueExpected,[],[I.Comma,I.ParenthesisR]):this.accept(I.Exclamation)&&(this.hasWhitespace()||!this.acceptIdent("default"))?this.finish(t,ee.UnknownKeyword):this.finish(t):null},e.prototype._parseForward=function(){if(!this.peekKeyword("@forward"))return null;var t=this.create(Y_e);if(this.consumeToken(),!t.addChild(this._parseStringLiteral()))return this.finish(t,ee.StringLiteralExpected);if(this.acceptIdent("with")){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected,[I.ParenthesisR]);if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);for(;this.accept(I.Comma)&&!this.peek(I.ParenthesisR);)if(!t.getParameters().addChild(this._parseModuleConfigDeclaration()))return this.finish(t,ee.VariableNameExpected);if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected)}if(!this.peek(I.SemiColon)&&!this.peek(I.EOF)){if(!this.peekRegExp(I.Ident,/as|hide|show/))return this.finish(t,ee.UnknownKeyword);if(this.acceptIdent("as")){var i=this._parseIdent([It.Forward]);if(!t.setIdentifier(i))return this.finish(t,ee.IdentifierExpected);if(this.hasWhitespace()||!this.acceptDelim("*"))return this.finish(t,ee.WildcardExpected)}if((this.peekIdent("hide")||this.peekIdent("show"))&&!t.addChild(this._parseForwardVisibility()))return this.finish(t,ee.IdentifierOrVariableExpected)}return!this.accept(I.SemiColon)&&!this.accept(I.EOF)?this.finish(t,ee.SemiColonExpected):this.finish(t)},e.prototype._parseForwardVisibility=function(){var t=this.create(X_e);for(t.setIdentifier(this._parseIdent());t.addChild(this._parseVariable()||this._parseIdent());)this.accept(I.Comma);return t.getChildren().length>1?t:null},e.prototype._parseSupportsCondition=function(){return this._parseInterpolation()||r.prototype._parseSupportsCondition.call(this)},e})(OV);var fve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ce=Kc();(function(r){fve(e,r);function e(t,i){var n=r.call(this,"$",t,i)||this;return W9(e.scssModuleLoaders),W9(e.scssModuleBuiltIns),n}return e.prototype.isImportPathParent=function(t){return t===G.Forward||t===G.Use||r.prototype.isImportPathParent.call(this,t)},e.prototype.getCompletionForImportPath=function(t,i){var n=t.getParent().type;if(n===G.Forward||n===G.Use)for(var s=0,o=e.scssModuleBuiltIns;s<o.length;s++){var a=o[s],l={label:a.label,documentation:a.documentation,textEdit:gt.replace(this.getCompletionRange(t),"'"+a.label+"'"),kind:Ae.Module};i.items.push(l)}return r.prototype.getCompletionForImportPath.call(this,t,i)},e.prototype.createReplaceFunction=function(){var t=1;return function(i,n){return"\\"+n+": ${"+t+++":"+(e.variableDefaults[n]||"")+"}"}},e.prototype.createFunctionProposals=function(t,i,n,s){for(var o=0,a=t;o<a.length;o++){var l=a[o],c=l.func.replace(/\[?(\$\w+)\]?/g,this.createReplaceFunction()),h=l.func.substr(0,l.func.indexOf("(")),u={label:h,detail:l.func,documentation:l.desc,textEdit:gt.replace(this.getCompletionRange(i),c),insertTextFormat:qr.Snippet,kind:Ae.Function};n&&(u.sortText="z"),s.items.push(u)}return s},e.prototype.getCompletionsForSelector=function(t,i,n){return this.createFunctionProposals(e.selectorFuncs,null,!0,n),r.prototype.getCompletionsForSelector.call(this,t,i,n)},e.prototype.getTermProposals=function(t,i,n){var s=e.builtInFuncs;return t&&(s=s.filter(function(o){return!o.type||!t.restrictions||t.restrictions.indexOf(o.type)!==-1})),this.createFunctionProposals(s,i,!0,n),r.prototype.getTermProposals.call(this,t,i,n)},e.prototype.getColorProposals=function(t,i,n){return this.createFunctionProposals(e.colorProposals,i,!1,n),r.prototype.getColorProposals.call(this,t,i,n)},e.prototype.getCompletionsForDeclarationProperty=function(t,i){return this.getCompletionForAtDirectives(i),this.getCompletionsForSelector(null,!0,i),r.prototype.getCompletionsForDeclarationProperty.call(this,t,i)},e.prototype.getCompletionsForExtendsReference=function(t,i,n){for(var s=this.getSymbolContext().findSymbolsAtOffset(this.offset,It.Rule),o=0,a=s;o<a.length;o++){var l=a[o],c={label:l.name,textEdit:gt.replace(this.getCompletionRange(i),l.name),kind:Ae.Function};n.items.push(c)}return n},e.prototype.getCompletionForAtDirectives=function(t){var i;return(i=t.items).push.apply(i,e.scssAtDirectives),t},e.prototype.getCompletionForTopLevel=function(t){return this.getCompletionForAtDirectives(t),this.getCompletionForModuleLoaders(t),r.prototype.getCompletionForTopLevel.call(this,t),t},e.prototype.getCompletionForModuleLoaders=function(t){var i;return(i=t.items).push.apply(i,e.scssModuleLoaders),t},e.variableDefaults={$red:"1",$green:"2",$blue:"3",$alpha:"1.0",$color:"#000000",$weight:"0.5",$hue:"0",$saturation:"0%",$lightness:"0%",$degrees:"0",$amount:"0",$string:'""',$substring:'"s"',$number:"0",$limit:"1"},e.colorProposals=[{func:"red($color)",desc:Ce("scss.builtin.red","Gets the red component of a color.")},{func:"green($color)",desc:Ce("scss.builtin.green","Gets the green component of a color.")},{func:"blue($color)",desc:Ce("scss.builtin.blue","Gets the blue component of a color.")},{func:"mix($color, $color, [$weight])",desc:Ce("scss.builtin.mix","Mixes two colors together.")},{func:"hue($color)",desc:Ce("scss.builtin.hue","Gets the hue component of a color.")},{func:"saturation($color)",desc:Ce("scss.builtin.saturation","Gets the saturation component of a color.")},{func:"lightness($color)",desc:Ce("scss.builtin.lightness","Gets the lightness component of a color.")},{func:"adjust-hue($color, $degrees)",desc:Ce("scss.builtin.adjust-hue","Changes the hue of a color.")},{func:"lighten($color, $amount)",desc:Ce("scss.builtin.lighten","Makes a color lighter.")},{func:"darken($color, $amount)",desc:Ce("scss.builtin.darken","Makes a color darker.")},{func:"saturate($color, $amount)",desc:Ce("scss.builtin.saturate","Makes a color more saturated.")},{func:"desaturate($color, $amount)",desc:Ce("scss.builtin.desaturate","Makes a color less saturated.")},{func:"grayscale($color)",desc:Ce("scss.builtin.grayscale","Converts a color to grayscale.")},{func:"complement($color)",desc:Ce("scss.builtin.complement","Returns the complement of a color.")},{func:"invert($color)",desc:Ce("scss.builtin.invert","Returns the inverse of a color.")},{func:"alpha($color)",desc:Ce("scss.builtin.alpha","Gets the opacity component of a color.")},{func:"opacity($color)",desc:"Gets the alpha component (opacity) of a color."},{func:"rgba($color, $alpha)",desc:Ce("scss.builtin.rgba","Changes the alpha component for a color.")},{func:"opacify($color, $amount)",desc:Ce("scss.builtin.opacify","Makes a color more opaque.")},{func:"fade-in($color, $amount)",desc:Ce("scss.builtin.fade-in","Makes a color more opaque.")},{func:"transparentize($color, $amount)",desc:Ce("scss.builtin.transparentize","Makes a color more transparent.")},{func:"fade-out($color, $amount)",desc:Ce("scss.builtin.fade-out","Makes a color more transparent.")},{func:"adjust-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Ce("scss.builtin.adjust-color","Increases or decreases one or more components of a color.")},{func:"scale-color($color, [$red], [$green], [$blue], [$saturation], [$lightness], [$alpha])",desc:Ce("scss.builtin.scale-color","Fluidly scales one or more properties of a color.")},{func:"change-color($color, [$red], [$green], [$blue], [$hue], [$saturation], [$lightness], [$alpha])",desc:Ce("scss.builtin.change-color","Changes one or more properties of a color.")},{func:"ie-hex-str($color)",desc:Ce("scss.builtin.ie-hex-str","Converts a color into the format understood by IE filters.")}],e.selectorFuncs=[{func:"selector-nest($selectors\u2026)",desc:Ce("scss.builtin.selector-nest","Nests selector beneath one another like they would be nested in the stylesheet.")},{func:"selector-append($selectors\u2026)",desc:Ce("scss.builtin.selector-append","Appends selectors to one another without spaces in between.")},{func:"selector-extend($selector, $extendee, $extender)",desc:Ce("scss.builtin.selector-extend","Extends $extendee with $extender within $selector.")},{func:"selector-replace($selector, $original, $replacement)",desc:Ce("scss.builtin.selector-replace","Replaces $original with $replacement within $selector.")},{func:"selector-unify($selector1, $selector2)",desc:Ce("scss.builtin.selector-unify","Unifies two selectors to produce a selector that matches elements matched by both.")},{func:"is-superselector($super, $sub)",desc:Ce("scss.builtin.is-superselector","Returns whether $super matches all the elements $sub does, and possibly more.")},{func:"simple-selectors($selector)",desc:Ce("scss.builtin.simple-selectors","Returns the simple selectors that comprise a compound selector.")},{func:"selector-parse($selector)",desc:Ce("scss.builtin.selector-parse","Parses a selector into the format returned by &.")}],e.builtInFuncs=[{func:"unquote($string)",desc:Ce("scss.builtin.unquote","Removes quotes from a string.")},{func:"quote($string)",desc:Ce("scss.builtin.quote","Adds quotes to a string.")},{func:"str-length($string)",desc:Ce("scss.builtin.str-length","Returns the number of characters in a string.")},{func:"str-insert($string, $insert, $index)",desc:Ce("scss.builtin.str-insert","Inserts $insert into $string at $index.")},{func:"str-index($string, $substring)",desc:Ce("scss.builtin.str-index","Returns the index of the first occurance of $substring in $string.")},{func:"str-slice($string, $start-at, [$end-at])",desc:Ce("scss.builtin.str-slice","Extracts a substring from $string.")},{func:"to-upper-case($string)",desc:Ce("scss.builtin.to-upper-case","Converts a string to upper case.")},{func:"to-lower-case($string)",desc:Ce("scss.builtin.to-lower-case","Converts a string to lower case.")},{func:"percentage($number)",desc:Ce("scss.builtin.percentage","Converts a unitless number to a percentage."),type:"percentage"},{func:"round($number)",desc:Ce("scss.builtin.round","Rounds a number to the nearest whole number.")},{func:"ceil($number)",desc:Ce("scss.builtin.ceil","Rounds a number up to the next whole number.")},{func:"floor($number)",desc:Ce("scss.builtin.floor","Rounds a number down to the previous whole number.")},{func:"abs($number)",desc:Ce("scss.builtin.abs","Returns the absolute value of a number.")},{func:"min($numbers)",desc:Ce("scss.builtin.min","Finds the minimum of several numbers.")},{func:"max($numbers)",desc:Ce("scss.builtin.max","Finds the maximum of several numbers.")},{func:"random([$limit])",desc:Ce("scss.builtin.random","Returns a random number.")},{func:"length($list)",desc:Ce("scss.builtin.length","Returns the length of a list.")},{func:"nth($list, $n)",desc:Ce("scss.builtin.nth","Returns a specific item in a list.")},{func:"set-nth($list, $n, $value)",desc:Ce("scss.builtin.set-nth","Replaces the nth item in a list.")},{func:"join($list1, $list2, [$separator])",desc:Ce("scss.builtin.join","Joins together two lists into one.")},{func:"append($list1, $val, [$separator])",desc:Ce("scss.builtin.append","Appends a single value onto the end of a list.")},{func:"zip($lists)",desc:Ce("scss.builtin.zip","Combines several lists into a single multidimensional list.")},{func:"index($list, $value)",desc:Ce("scss.builtin.index","Returns the position of a value within a list.")},{func:"list-separator(#list)",desc:Ce("scss.builtin.list-separator","Returns the separator of a list.")},{func:"map-get($map, $key)",desc:Ce("scss.builtin.map-get","Returns the value in a map associated with a given key.")},{func:"map-merge($map1, $map2)",desc:Ce("scss.builtin.map-merge","Merges two maps together into a new map.")},{func:"map-remove($map, $keys)",desc:Ce("scss.builtin.map-remove","Returns a new map with keys removed.")},{func:"map-keys($map)",desc:Ce("scss.builtin.map-keys","Returns a list of all keys in a map.")},{func:"map-values($map)",desc:Ce("scss.builtin.map-values","Returns a list of all values in a map.")},{func:"map-has-key($map, $key)",desc:Ce("scss.builtin.map-has-key","Returns whether a map has a value associated with a given key.")},{func:"keywords($args)",desc:Ce("scss.builtin.keywords","Returns the keywords passed to a function that takes variable arguments.")},{func:"feature-exists($feature)",desc:Ce("scss.builtin.feature-exists","Returns whether a feature exists in the current Sass runtime.")},{func:"variable-exists($name)",desc:Ce("scss.builtin.variable-exists","Returns whether a variable with the given name exists in the current scope.")},{func:"global-variable-exists($name)",desc:Ce("scss.builtin.global-variable-exists","Returns whether a variable with the given name exists in the global scope.")},{func:"function-exists($name)",desc:Ce("scss.builtin.function-exists","Returns whether a function with the given name exists.")},{func:"mixin-exists($name)",desc:Ce("scss.builtin.mixin-exists","Returns whether a mixin with the given name exists.")},{func:"inspect($value)",desc:Ce("scss.builtin.inspect","Returns the string representation of a value as it would be represented in Sass.")},{func:"type-of($value)",desc:Ce("scss.builtin.type-of","Returns the type of a value.")},{func:"unit($number)",desc:Ce("scss.builtin.unit","Returns the unit(s) associated with a number.")},{func:"unitless($number)",desc:Ce("scss.builtin.unitless","Returns whether a number has units.")},{func:"comparable($number1, $number2)",desc:Ce("scss.builtin.comparable","Returns whether two numbers can be added, subtracted, or compared.")},{func:"call($name, $args\u2026)",desc:Ce("scss.builtin.call","Dynamically calls a Sass function.")}],e.scssAtDirectives=[{label:"@extend",documentation:Ce("scss.builtin.@extend","Inherits the styles of another selector."),kind:Ae.Keyword},{label:"@at-root",documentation:Ce("scss.builtin.@at-root","Causes one or more rules to be emitted at the root of the document."),kind:Ae.Keyword},{label:"@debug",documentation:Ce("scss.builtin.@debug","Prints the value of an expression to the standard error output stream. Useful for debugging complicated Sass files."),kind:Ae.Keyword},{label:"@warn",documentation:Ce("scss.builtin.@warn","Prints the value of an expression to the standard error output stream. Useful for libraries that need to warn users of deprecations or recovering from minor mixin usage mistakes. Warnings can be turned off with the `--quiet` command-line option or the `:quiet` Sass option."),kind:Ae.Keyword},{label:"@error",documentation:Ce("scss.builtin.@error","Throws the value of an expression as a fatal error with stack trace. Useful for validating arguments to mixins and functions."),kind:Ae.Keyword},{label:"@if",documentation:Ce("scss.builtin.@if","Includes the body if the expression does not evaluate to `false` or `null`."),insertText:`@if \${1:expr} { - $0 -}`,insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@for",documentation:Ce("scss.builtin.@for","For loop that repeatedly outputs a set of styles for each `$var` in the `from/through` or `from/to` clause."),insertText:"@for \\$${1:var} from ${2:start} ${3|to,through|} ${4:end} {\n $0\n}",insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@each",documentation:Ce("scss.builtin.@each","Each loop that sets `$var` to each item in the list or map, then outputs the styles it contains using that value of `$var`."),insertText:"@each \\$${1:var} in ${2:list} {\n $0\n}",insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@while",documentation:Ce("scss.builtin.@while","While loop that takes an expression and repeatedly outputs the nested styles until the statement evaluates to `false`."),insertText:`@while \${1:condition} { - $0 -}`,insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@mixin",documentation:Ce("scss.builtin.@mixin","Defines styles that can be re-used throughout the stylesheet with `@include`."),insertText:`@mixin \${1:name} { - $0 -}`,insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@include",documentation:Ce("scss.builtin.@include","Includes the styles defined by another mixin into the current rule."),kind:Ae.Keyword},{label:"@function",documentation:Ce("scss.builtin.@function","Defines complex operations that can be re-used throughout stylesheets."),kind:Ae.Keyword}],e.scssModuleLoaders=[{label:"@use",documentation:Ce("scss.builtin.@use","Loads mixins, functions, and variables from other Sass stylesheets as 'modules', and combines CSS from multiple stylesheets together."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/use"}],insertText:"@use $0;",insertTextFormat:qr.Snippet,kind:Ae.Keyword},{label:"@forward",documentation:Ce("scss.builtin.@forward","Loads a Sass stylesheet and makes its mixins, functions, and variables available when this stylesheet is loaded with the @use rule."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/at-rules/forward"}],insertText:"@forward $0;",insertTextFormat:qr.Snippet,kind:Ae.Keyword}],e.scssModuleBuiltIns=[{label:"sass:math",documentation:Ce("scss.builtin.sass:math","Provides functions that operate on numbers."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/math"}]},{label:"sass:string",documentation:Ce("scss.builtin.sass:string","Makes it easy to combine, search, or split apart strings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/string"}]},{label:"sass:color",documentation:Ce("scss.builtin.sass:color","Generates new colors based on existing ones, making it easy to build color themes."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/color"}]},{label:"sass:list",documentation:Ce("scss.builtin.sass:list","Lets you access and modify values in lists."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/list"}]},{label:"sass:map",documentation:Ce("scss.builtin.sass:map","Makes it possible to look up the value associated with a key in a map, and much more."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/map"}]},{label:"sass:selector",documentation:Ce("scss.builtin.sass:selector","Provides access to Sass\u2019s powerful selector engine."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/selector"}]},{label:"sass:meta",documentation:Ce("scss.builtin.sass:meta","Exposes the details of Sass\u2019s inner workings."),references:[{name:"Sass documentation",url:"https://sass-lang.com/documentation/modules/meta"}]}],e})(y9);function W9(r){r.forEach(function(e){if(e.documentation&&e.references&&e.references.length>0){var t=typeof e.documentation=="string"?{kind:"markdown",value:e.documentation}:{kind:"markdown",value:e.documentation.value};t.value+=` - -`,t.value+=e.references.map(function(i){return"["+i.name+"]("+i.url+")"}).join(" | "),e.documentation=t}})}var gve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),V9="/".charCodeAt(0),pve=` -`.charCodeAt(0),mve="\r".charCodeAt(0),_ve="\f".charCodeAt(0),uR="`".charCodeAt(0),dR=".".charCodeAt(0),bve=I.CustomToken,fR=bve++,vve=function(r){gve(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.scanNext=function(t){var i=this.escapedJavaScript();return i!==null?this.finishToken(t,i):this.stream.advanceIfChars([dR,dR,dR])?this.finishToken(t,fR):r.prototype.scanNext.call(this,t)},e.prototype.comment=function(){return r.prototype.comment.call(this)?!0:!this.inURL&&this.stream.advanceIfChars([V9,V9])?(this.stream.advanceWhileChar(function(t){switch(t){case pve:case mve:case _ve:return!1;default:return!0}}),!0):!1},e.prototype.escapedJavaScript=function(){var t=this.stream.peekChar();return t===uR?(this.stream.advance(1),this.stream.advanceWhileChar(function(i){return i!==uR}),this.stream.advanceIfChar(uR)?I.EscapedJavaScript:I.BadEscapedJavaScript):null},e}(OA),Cve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}();(function(r){Cve(e,r);function e(){return r.call(this,new vve)||this}return e.prototype._parseStylesheetStatement=function(t){return t===void 0&&(t=!1),this.peek(I.AtKeyword)?this._parseVariableDeclaration()||this._parsePlugin()||r.prototype._parseStylesheetAtStatement.call(this,t):this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseFunction()||this._parseRuleset(!0)},e.prototype._parseImport=function(){if(!this.peekKeyword("@import")&&!this.peekKeyword("@import-once"))return null;var t=this.create(HA);if(this.consumeToken(),this.accept(I.ParenthesisL)){if(!this.accept(I.Ident))return this.finish(t,ee.IdentifierExpected,[I.SemiColon]);do if(!this.accept(I.Comma))break;while(this.accept(I.Ident));if(!this.accept(I.ParenthesisR))return this.finish(t,ee.RightParenthesisExpected,[I.SemiColon])}return!t.addChild(this._parseURILiteral())&&!t.addChild(this._parseStringLiteral())?this.finish(t,ee.URIOrStringExpected,[I.SemiColon]):(!this.peek(I.SemiColon)&&!this.peek(I.EOF)&&t.setMedialist(this._parseMediaQueryList()),this.finish(t))},e.prototype._parsePlugin=function(){if(!this.peekKeyword("@plugin"))return null;var t=this.createNode(G.Plugin);return this.consumeToken(),t.addChild(this._parseStringLiteral())?this.accept(I.SemiColon)?this.finish(t):this.finish(t,ee.SemiColonExpected):this.finish(t,ee.StringLiteralExpected)},e.prototype._parseMediaQuery=function(t){var i=r.prototype._parseMediaQuery.call(this,t);if(!i){var n=this.create(bV);return n.addChild(this._parseVariable())?this.finish(n):null}return i},e.prototype._parseMediaDeclaration=function(t){return t===void 0&&(t=!1),this._tryParseRuleset(t)||this._tryToParseDeclaration()||this._tryParseMixinDeclaration()||this._tryParseMixinReference()||this._parseDetachedRuleSetMixin()||this._parseStylesheetStatement(t)},e.prototype._parseMediaFeatureName=function(){return this._parseIdent()||this._parseVariable()},e.prototype._parseVariableDeclaration=function(t){t===void 0&&(t=[]);var i=this.create(_1),n=this.mark();if(!i.setVariable(this._parseVariable(!0)))return null;if(this.accept(I.Colon)){if(this.prevToken&&(i.colonPosition=this.prevToken.offset),i.setValue(this._parseDetachedRuleSet()))i.needsSemicolon=!1;else if(!i.setValue(this._parseExpr()))return this.finish(i,ee.VariableValueExpected,[],t);i.addChild(this._parsePrio())}else return this.restoreAtMark(n),null;return this.peek(I.SemiColon)&&(i.semicolonPosition=this.token.offset),this.finish(i)},e.prototype._parseDetachedRuleSet=function(){var t=this.mark();if(this.peekDelim("#")||this.peekDelim("."))if(this.consumeToken(),!this.hasWhitespace()&&this.accept(I.ParenthesisL)){var i=this.create(eb);if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,ee.IdentifierExpected,[],[I.ParenthesisR]);if(!this.accept(I.ParenthesisR))return this.restoreAtMark(t),null}else return this.restoreAtMark(t),null;if(!this.peek(I.CurlyL))return null;var n=this.create(Ai);return this._parseBody(n,this._parseDetachedRuleSetBody.bind(this)),this.finish(n)},e.prototype._parseDetachedRuleSetBody=function(){return this._tryParseKeyframeSelector()||this._parseRuleSetDeclaration()},e.prototype._addLookupChildren=function(t){if(!t.addChild(this._parseLookupValue()))return!1;for(var i=!1;this.peek(I.BracketL)&&(i=!0),!!t.addChild(this._parseLookupValue());)i=!1;return!i},e.prototype._parseLookupValue=function(){var t=this.create(He),i=this.mark();return this.accept(I.BracketL)?(t.addChild(this._parseVariable(!1,!0))||t.addChild(this._parsePropertyIdentifier()))&&this.accept(I.BracketR)||this.accept(I.BracketR)?t:(this.restoreAtMark(i),null):(this.restoreAtMark(i),null)},e.prototype._parseVariable=function(t,i){t===void 0&&(t=!1),i===void 0&&(i=!1);var n=!t&&this.peekDelim("$");if(!this.peekDelim("@")&&!n&&!this.peek(I.AtKeyword))return null;for(var s=this.create(KA),o=this.mark();this.acceptDelim("@")||!t&&this.acceptDelim("$");)if(this.hasWhitespace())return this.restoreAtMark(o),null;return!this.accept(I.AtKeyword)&&!this.accept(I.Ident)?(this.restoreAtMark(o),null):!i&&this.peek(I.BracketL)&&!this._addLookupChildren(s)?(this.restoreAtMark(o),null):s},e.prototype._parseTermExpression=function(){return this._parseVariable()||this._parseEscaped()||r.prototype._parseTermExpression.call(this)||this._tryParseMixinReference(!1)},e.prototype._parseEscaped=function(){if(this.peek(I.EscapedJavaScript)||this.peek(I.BadEscapedJavaScript)){var t=this.createNode(G.EscapedValue);return this.consumeToken(),this.finish(t)}if(this.peekDelim("~")){var t=this.createNode(G.EscapedValue);return this.consumeToken(),this.accept(I.String)||this.accept(I.EscapedJavaScript)?this.finish(t):this.finish(t,ee.TermExpected)}return null},e.prototype._parseOperator=function(){var t=this._parseGuardOperator();return t||r.prototype._parseOperator.call(this)},e.prototype._parseGuardOperator=function(){if(this.peekDelim(">")){var t=this.createNode(G.Operator);return this.consumeToken(),this.acceptDelim("="),t}else if(this.peekDelim("=")){var t=this.createNode(G.Operator);return this.consumeToken(),this.acceptDelim("<"),t}else if(this.peekDelim("<")){var t=this.createNode(G.Operator);return this.consumeToken(),this.acceptDelim("="),t}return null},e.prototype._parseRuleSetDeclaration=function(){return this.peek(I.AtKeyword)?this._parseKeyframe()||this._parseMedia(!0)||this._parseImport()||this._parseSupports(!0)||this._parseDetachedRuleSetMixin()||this._parseVariableDeclaration()||r.prototype._parseRuleSetDeclarationAtStatement.call(this):this._tryParseMixinDeclaration()||this._tryParseRuleset(!0)||this._tryParseMixinReference()||this._parseFunction()||this._parseExtend()||r.prototype._parseRuleSetDeclaration.call(this)},e.prototype._parseKeyframeIdent=function(){return this._parseIdent([It.Keyframe])||this._parseVariable()},e.prototype._parseKeyframeSelector=function(){return this._parseDetachedRuleSetMixin()||r.prototype._parseKeyframeSelector.call(this)},e.prototype._parseSimpleSelectorBody=function(){return this._parseSelectorCombinator()||r.prototype._parseSimpleSelectorBody.call(this)},e.prototype._parseSelector=function(t){var i=this.create(g1),n=!1;for(t&&(n=i.addChild(this._parseCombinator()));i.addChild(this._parseSimpleSelector());){n=!0;var s=this.mark();if(i.addChild(this._parseGuard())&&this.peek(I.CurlyL))break;this.restoreAtMark(s),i.addChild(this._parseCombinator())}return n?this.finish(i):null},e.prototype._parseSelectorCombinator=function(){if(this.peekDelim("&")){var t=this.createNode(G.SelectorCombinator);for(this.consumeToken();!this.hasWhitespace()&&(this.acceptDelim("-")||this.accept(I.Num)||this.accept(I.Dimension)||t.addChild(this._parseIdent())||this.acceptDelim("&")););return this.finish(t)}return null},e.prototype._parseSelectorIdent=function(){if(!this.peekInterpolatedIdent())return null;var t=this.createNode(G.SelectorInterpolation),i=this._acceptInterpolatedIdent(t);return i?this.finish(t):null},e.prototype._parsePropertyIdentifier=function(t){t===void 0&&(t=!1);var i=/^[\w-]+/;if(!this.peekInterpolatedIdent()&&!this.peekRegExp(this.token.type,i))return null;var n=this.mark(),s=this.create(So);s.isCustomProperty=this.acceptDelim("-")&&this.acceptDelim("-");var o=!1;return t?s.isCustomProperty?o=s.addChild(this._parseIdent()):o=s.addChild(this._parseRegexp(i)):s.isCustomProperty?o=this._acceptInterpolatedIdent(s):o=this._acceptInterpolatedIdent(s,i),o?(!t&&!this.hasWhitespace()&&(this.acceptDelim("+"),this.hasWhitespace()||this.acceptIdent("_")),this.finish(s)):(this.restoreAtMark(n),null)},e.prototype.peekInterpolatedIdent=function(){return this.peek(I.Ident)||this.peekDelim("@")||this.peekDelim("$")||this.peekDelim("-")},e.prototype._acceptInterpolatedIdent=function(t,i){for(var n=this,s=!1,o=function(){var l=n.mark();return n.acceptDelim("-")&&(n.hasWhitespace()||n.acceptDelim("-"),n.hasWhitespace())?(n.restoreAtMark(l),null):n._parseInterpolation()},a=i?function(){return n.acceptRegexp(i)}:function(){return n.accept(I.Ident)};(a()||t.addChild(this._parseInterpolation()||this.try(o)))&&(s=!0,!this.hasWhitespace()););return s},e.prototype._parseInterpolation=function(){var t=this.mark();if(this.peekDelim("@")||this.peekDelim("$")){var i=this.createNode(G.Interpolation);return this.consumeToken(),this.hasWhitespace()||!this.accept(I.CurlyL)?(this.restoreAtMark(t),null):i.addChild(this._parseIdent())?this.accept(I.CurlyR)?this.finish(i):this.finish(i,ee.RightCurlyExpected):this.finish(i,ee.IdentifierExpected)}return null},e.prototype._tryParseMixinDeclaration=function(){var t=this.mark(),i=this.create(eb);if(!i.setIdentifier(this._parseMixinDeclarationIdentifier())||!this.accept(I.ParenthesisL))return this.restoreAtMark(t),null;if(i.getParameters().addChild(this._parseMixinParameter()))for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)i.getParameters().addChild(this._parseMixinParameter())||this.markError(i,ee.IdentifierExpected,[],[I.ParenthesisR]);return this.accept(I.ParenthesisR)?(i.setGuard(this._parseGuard()),this.peek(I.CurlyL)?this._parseBody(i,this._parseMixInBodyDeclaration.bind(this)):(this.restoreAtMark(t),null)):(this.restoreAtMark(t),null)},e.prototype._parseMixInBodyDeclaration=function(){return this._parseFontFace()||this._parseRuleSetDeclaration()},e.prototype._parseMixinDeclarationIdentifier=function(){var t;if(this.peekDelim("#")||this.peekDelim(".")){if(t=this.create(So),this.consumeToken(),this.hasWhitespace()||!t.addChild(this._parseIdent()))return null}else if(this.peek(I.Hash))t=this.create(So),this.consumeToken();else return null;return t.referenceTypes=[It.Mixin],this.finish(t)},e.prototype._parsePseudo=function(){if(!this.peek(I.Colon))return null;var t=this.mark(),i=this.create(J_);return this.consumeToken(),this.acceptIdent("extend")?this._completeExtends(i):(this.restoreAtMark(t),r.prototype._parsePseudo.call(this))},e.prototype._parseExtend=function(){if(!this.peekDelim("&"))return null;var t=this.mark(),i=this.create(J_);return this.consumeToken(),this.hasWhitespace()||!this.accept(I.Colon)||!this.acceptIdent("extend")?(this.restoreAtMark(t),null):this._completeExtends(i)},e.prototype._completeExtends=function(t){if(!this.accept(I.ParenthesisL))return this.finish(t,ee.LeftParenthesisExpected);var i=t.getSelectors();if(!i.addChild(this._parseSelector(!0)))return this.finish(t,ee.SelectorExpected);for(;this.accept(I.Comma);)if(!i.addChild(this._parseSelector(!0)))return this.finish(t,ee.SelectorExpected);return this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseDetachedRuleSetMixin=function(){if(!this.peek(I.AtKeyword))return null;var t=this.mark(),i=this.create(b1);return i.addChild(this._parseVariable(!0))&&(this.hasWhitespace()||!this.accept(I.ParenthesisL))?(this.restoreAtMark(t),null):this.accept(I.ParenthesisR)?this.finish(i):this.finish(i,ee.RightParenthesisExpected)},e.prototype._tryParseMixinReference=function(t){t===void 0&&(t=!0);for(var i=this.mark(),n=this.create(b1),s=this._parseMixinDeclarationIdentifier();s;){this.acceptDelim(">");var o=this._parseMixinDeclarationIdentifier();if(o)n.getNamespaces().addChild(s),s=o;else break}if(!n.setIdentifier(s))return this.restoreAtMark(i),null;var a=!1;if(this.accept(I.ParenthesisL)){if(a=!0,n.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)if(!n.getArguments().addChild(this._parseMixinArgument()))return this.finish(n,ee.ExpressionExpected)}if(!this.accept(I.ParenthesisR))return this.finish(n,ee.RightParenthesisExpected);s.referenceTypes=[It.Mixin]}else s.referenceTypes=[It.Mixin,It.Rule];return this.peek(I.BracketL)?t||this._addLookupChildren(n):n.addChild(this._parsePrio()),!a&&!this.peek(I.SemiColon)&&!this.peek(I.CurlyR)&&!this.peek(I.EOF)?(this.restoreAtMark(i),null):this.finish(n)},e.prototype._parseMixinArgument=function(){var t=this.create(Ag),i=this.mark(),n=this._parseVariable();return n&&(this.accept(I.Colon)?t.setIdentifier(n):this.restoreAtMark(i)),t.setValue(this._parseDetachedRuleSet()||this._parseExpr(!0))?this.finish(t):(this.restoreAtMark(i),null)},e.prototype._parseMixinParameter=function(){var t=this.create(p1);if(this.peekKeyword("@rest")){var i=this.create(He);return this.consumeToken(),this.accept(fR)?(t.setIdentifier(this.finish(i)),this.finish(t)):this.finish(t,ee.DotExpected,[],[I.Comma,I.ParenthesisR])}if(this.peek(fR)){var n=this.create(He);return this.consumeToken(),t.setIdentifier(this.finish(n)),this.finish(t)}var s=!1;return t.setIdentifier(this._parseVariable())&&(this.accept(I.Colon),s=!0),!t.setDefaultValue(this._parseDetachedRuleSet()||this._parseExpr(!0))&&!s?null:this.finish(t)},e.prototype._parseGuard=function(){if(!this.peekIdent("when"))return null;var t=this.create(dbe);if(this.consumeToken(),t.isNegated=this.acceptIdent("not"),!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,ee.ConditionExpected);for(;this.acceptIdent("and")||this.accept(I.Comma);)if(!t.getConditions().addChild(this._parseGuardCondition()))return this.finish(t,ee.ConditionExpected);return this.finish(t)},e.prototype._parseGuardCondition=function(){if(!this.peek(I.ParenthesisL))return null;var t=this.create(fbe);return this.consumeToken(),!t.addChild(this._parseExpr()),this.accept(I.ParenthesisR)?this.finish(t):this.finish(t,ee.RightParenthesisExpected)},e.prototype._parseFunction=function(){var t=this.mark(),i=this.create(X_);if(!i.setIdentifier(this._parseFunctionIdentifier()))return null;if(this.hasWhitespace()||!this.accept(I.ParenthesisL))return this.restoreAtMark(t),null;if(i.getArguments().addChild(this._parseMixinArgument())){for(;(this.accept(I.Comma)||this.accept(I.SemiColon))&&!this.peek(I.ParenthesisR);)if(!i.getArguments().addChild(this._parseMixinArgument()))return this.finish(i,ee.ExpressionExpected)}return this.accept(I.ParenthesisR)?this.finish(i):this.finish(i,ee.RightParenthesisExpected)},e.prototype._parseFunctionIdentifier=function(){if(this.peekDelim("%")){var t=this.create(So);return t.referenceTypes=[It.Function],this.consumeToken(),this.finish(t)}return r.prototype._parseFunctionIdentifier.call(this)},e.prototype._parseURLArgument=function(){var t=this.mark(),i=r.prototype._parseURLArgument.call(this);if(!i||!this.peek(I.ParenthesisR)){this.restoreAtMark(t);var n=this.create(He);return n.addChild(this._parseBinaryExpr()),this.finish(n)}return i},e})(OV);var wve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Ue=Kc();(function(r){wve(e,r);function e(t,i){return r.call(this,"@",t,i)||this}return e.prototype.createFunctionProposals=function(t,i,n,s){for(var o=0,a=t;o<a.length;o++){var l=a[o],c={label:l.name,detail:l.example,documentation:l.description,textEdit:gt.replace(this.getCompletionRange(i),l.name+"($0)"),insertTextFormat:qr.Snippet,kind:Ae.Function};n&&(c.sortText="z"),s.items.push(c)}return s},e.prototype.getTermProposals=function(t,i,n){var s=e.builtInProposals;return t&&(s=s.filter(function(o){return!o.type||!t.restrictions||t.restrictions.indexOf(o.type)!==-1})),this.createFunctionProposals(s,i,!0,n),r.prototype.getTermProposals.call(this,t,i,n)},e.prototype.getColorProposals=function(t,i,n){return this.createFunctionProposals(e.colorProposals,i,!1,n),r.prototype.getColorProposals.call(this,t,i,n)},e.prototype.getCompletionsForDeclarationProperty=function(t,i){return this.getCompletionsForSelector(null,!0,i),r.prototype.getCompletionsForDeclarationProperty.call(this,t,i)},e.builtInProposals=[{name:"if",example:"if(condition, trueValue [, falseValue]);",description:Ue("less.builtin.if","returns one of two values depending on a condition.")},{name:"boolean",example:"boolean(condition);",description:Ue("less.builtin.boolean",'"store" a boolean test for later evaluation in a guard or if().')},{name:"length",example:"length(@list);",description:Ue("less.builtin.length","returns the number of elements in a value list")},{name:"extract",example:"extract(@list, index);",description:Ue("less.builtin.extract","returns a value at the specified position in the list")},{name:"range",example:"range([start, ] end [, step]);",description:Ue("less.builtin.range","generate a list spanning a range of values")},{name:"each",example:"each(@list, ruleset);",description:Ue("less.builtin.each","bind the evaluation of a ruleset to each member of a list.")},{name:"escape",example:"escape(@string);",description:Ue("less.builtin.escape","URL encodes a string")},{name:"e",example:"e(@string);",description:Ue("less.builtin.e","escape string content")},{name:"replace",example:"replace(@string, @pattern, @replacement[, @flags]);",description:Ue("less.builtin.replace","string replace")},{name:"unit",example:"unit(@dimension, [@unit: '']);",description:Ue("less.builtin.unit","remove or change the unit of a dimension")},{name:"color",example:"color(@string);",description:Ue("less.builtin.color","parses a string to a color"),type:"color"},{name:"convert",example:"convert(@value, unit);",description:Ue("less.builtin.convert","converts numbers from one type into another")},{name:"data-uri",example:"data-uri([mimetype,] url);",description:Ue("less.builtin.data-uri","inlines a resource and falls back to `url()`"),type:"url"},{name:"abs",description:Ue("less.builtin.abs","absolute value of a number"),example:"abs(number);"},{name:"acos",description:Ue("less.builtin.acos","arccosine - inverse of cosine function"),example:"acos(number);"},{name:"asin",description:Ue("less.builtin.asin","arcsine - inverse of sine function"),example:"asin(number);"},{name:"ceil",example:"ceil(@number);",description:Ue("less.builtin.ceil","rounds up to an integer")},{name:"cos",description:Ue("less.builtin.cos","cosine function"),example:"cos(number);"},{name:"floor",description:Ue("less.builtin.floor","rounds down to an integer"),example:"floor(@number);"},{name:"percentage",description:Ue("less.builtin.percentage","converts to a %, e.g. 0.5 > 50%"),example:"percentage(@number);",type:"percentage"},{name:"round",description:Ue("less.builtin.round","rounds a number to a number of places"),example:"round(number, [places: 0]);"},{name:"sqrt",description:Ue("less.builtin.sqrt","calculates square root of a number"),example:"sqrt(number);"},{name:"sin",description:Ue("less.builtin.sin","sine function"),example:"sin(number);"},{name:"tan",description:Ue("less.builtin.tan","tangent function"),example:"tan(number);"},{name:"atan",description:Ue("less.builtin.atan","arctangent - inverse of tangent function"),example:"atan(number);"},{name:"pi",description:Ue("less.builtin.pi","returns pi"),example:"pi();"},{name:"pow",description:Ue("less.builtin.pow","first argument raised to the power of the second argument"),example:"pow(@base, @exponent);"},{name:"mod",description:Ue("less.builtin.mod","first argument modulus second argument"),example:"mod(number, number);"},{name:"min",description:Ue("less.builtin.min","returns the lowest of one or more values"),example:"min(@x, @y);"},{name:"max",description:Ue("less.builtin.max","returns the lowest of one or more values"),example:"max(@x, @y);"}],e.colorProposals=[{name:"argb",example:"argb(@color);",description:Ue("less.builtin.argb","creates a #AARRGGBB")},{name:"hsl",example:"hsl(@hue, @saturation, @lightness);",description:Ue("less.builtin.hsl","creates a color")},{name:"hsla",example:"hsla(@hue, @saturation, @lightness, @alpha);",description:Ue("less.builtin.hsla","creates a color")},{name:"hsv",example:"hsv(@hue, @saturation, @value);",description:Ue("less.builtin.hsv","creates a color")},{name:"hsva",example:"hsva(@hue, @saturation, @value, @alpha);",description:Ue("less.builtin.hsva","creates a color")},{name:"hue",example:"hue(@color);",description:Ue("less.builtin.hue","returns the `hue` channel of `@color` in the HSL space")},{name:"saturation",example:"saturation(@color);",description:Ue("less.builtin.saturation","returns the `saturation` channel of `@color` in the HSL space")},{name:"lightness",example:"lightness(@color);",description:Ue("less.builtin.lightness","returns the `lightness` channel of `@color` in the HSL space")},{name:"hsvhue",example:"hsvhue(@color);",description:Ue("less.builtin.hsvhue","returns the `hue` channel of `@color` in the HSV space")},{name:"hsvsaturation",example:"hsvsaturation(@color);",description:Ue("less.builtin.hsvsaturation","returns the `saturation` channel of `@color` in the HSV space")},{name:"hsvvalue",example:"hsvvalue(@color);",description:Ue("less.builtin.hsvvalue","returns the `value` channel of `@color` in the HSV space")},{name:"red",example:"red(@color);",description:Ue("less.builtin.red","returns the `red` channel of `@color`")},{name:"green",example:"green(@color);",description:Ue("less.builtin.green","returns the `green` channel of `@color`")},{name:"blue",example:"blue(@color);",description:Ue("less.builtin.blue","returns the `blue` channel of `@color`")},{name:"alpha",example:"alpha(@color);",description:Ue("less.builtin.alpha","returns the `alpha` channel of `@color`")},{name:"luma",example:"luma(@color);",description:Ue("less.builtin.luma","returns the `luma` value (perceptual brightness) of `@color`")},{name:"saturate",example:"saturate(@color, 10%);",description:Ue("less.builtin.saturate","return `@color` 10% points more saturated")},{name:"desaturate",example:"desaturate(@color, 10%);",description:Ue("less.builtin.desaturate","return `@color` 10% points less saturated")},{name:"lighten",example:"lighten(@color, 10%);",description:Ue("less.builtin.lighten","return `@color` 10% points lighter")},{name:"darken",example:"darken(@color, 10%);",description:Ue("less.builtin.darken","return `@color` 10% points darker")},{name:"fadein",example:"fadein(@color, 10%);",description:Ue("less.builtin.fadein","return `@color` 10% points less transparent")},{name:"fadeout",example:"fadeout(@color, 10%);",description:Ue("less.builtin.fadeout","return `@color` 10% points more transparent")},{name:"fade",example:"fade(@color, 50%);",description:Ue("less.builtin.fade","return `@color` with 50% transparency")},{name:"spin",example:"spin(@color, 10);",description:Ue("less.builtin.spin","return `@color` with a 10 degree larger in hue")},{name:"mix",example:"mix(@color1, @color2, [@weight: 50%]);",description:Ue("less.builtin.mix","return a mix of `@color1` and `@color2`")},{name:"greyscale",example:"greyscale(@color);",description:Ue("less.builtin.greyscale","returns a grey, 100% desaturated color")},{name:"contrast",example:"contrast(@color1, [@darkcolor: black], [@lightcolor: white], [@threshold: 43%]);",description:Ue("less.builtin.contrast","return `@darkcolor` if `@color1 is> 43% luma` otherwise return `@lightcolor`, see notes")},{name:"multiply",example:"multiply(@color1, @color2);"},{name:"screen",example:"screen(@color1, @color2);"},{name:"overlay",example:"overlay(@color1, @color2);"},{name:"softlight",example:"softlight(@color1, @color2);"},{name:"hardlight",example:"hardlight(@color1, @color2);"},{name:"difference",example:"difference(@color1, @color2);"},{name:"exclusion",example:"exclusion(@color1, @color2);"},{name:"average",example:"average(@color1, @color2);"},{name:"negation",example:"negation(@color1, @color2);"}],e})(y9);var yve=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),Sve=globalThis&&globalThis.__awaiter||function(r,e,t,i){function n(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(h){try{c(i.next(h))}catch(u){o(u)}}function l(h){try{c(i.throw(h))}catch(u){o(u)}}function c(h){h.done?s(h.value):n(h.value).then(a,l)}c((i=i.apply(r,e||[])).next())})},Lve=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},i,n,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(c){return function(h){return l([c,h])}}function l(c){if(i)throw new TypeError("Generator is already executing.");for(;t;)try{if(i=1,n&&(s=c[0]&2?n.return:c[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,c[1])).done)return s;switch(n=0,s&&(c=[c[0]&2,s.value]),c[0]){case 0:case 1:s=c;break;case 4:return t.label++,{value:c[1],done:!1};case 5:t.label++,n=c[1],c=[0];continue;case 7:c=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(c[0]===6||c[0]===2)){t=0;continue}if(c[0]===3&&(!s||c[1]>s[0]&&c[1]<s[3])){t.label=c[1];break}if(c[0]===6&&t.label<s[1]){t.label=s[1],s=c;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(c);break}s[2]&&t.ops.pop(),t.trys.pop();continue}c=e.call(r,t)}catch(h){c=[6,h],n=0}finally{i=s=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}};(function(r){yve(e,r);function e(t){return r.call(this,t)||this}return e.prototype.isRawStringDocumentLinkNode=function(t){return r.prototype.isRawStringDocumentLinkNode.call(this,t)||t.type===G.Use||t.type===G.Forward},e.prototype.resolveRelativeReference=function(t,i,n,s){return Sve(this,void 0,void 0,function(){function o(u){if(u.path!==""&&!(u.path.endsWith(".scss")||u.path.endsWith(".css"))){if(u.path.endsWith("/"))return[u.with({path:u.path+"index.scss"}).toString(),u.with({path:u.path+"_index.scss"}).toString()];var d=u.path.split("/"),f=d[d.length-1],g=u.path.slice(0,-f.length);if(f.startsWith("_"))return u.path.endsWith(".scss")?void 0:[u.with({path:u.path+".scss"}).toString()];var p=f+".scss",_=function(S){return u.with({path:g+S}).toString()},v=_(p),b=_("_"+p),C=_(p.slice(0,-5)+"/index.scss"),y=_(p.slice(0,-5)+"/_index.scss"),x=_(p.slice(0,-5)+".css");return[v,b,C,y,x]}}var a,l,c,h;return Lve(this,function(u){switch(u.label){case 0:return Un(t,"sass:")?[2,void 0]:[4,r.prototype.resolveRelativeReference.call(this,t,i,n,s)];case 1:if(a=u.sent(),!(this.fileSystemProvider&&a&&s))return[3,8];l=eR.parse(a),u.label=2;case 2:if(u.trys.push([2,7,,8]),c=o(l),!c)return[3,6];h=0,u.label=3;case 3:return h<c.length?[4,this.fileExists(c[h])]:[3,6];case 4:if(u.sent())return[2,c[h]];u.label=5;case 5:return h++,[3,3];case 6:return[3,8];case 7:return u.sent(),[3,8];case 8:return[2,a]}})})},e})(Xbe);var xve=function(){function r(e,t,i){var n=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var s=function(a){var l=a.getModeId();if(l===n._languageId){var c;n._listener[a.uri.toString()]=a.onDidChangeContent(function(){window.clearTimeout(c),c=window.setTimeout(function(){return n._doValidate(a.uri,l)},500)}),n._doValidate(a.uri,l)}},o=function(a){At.setModelMarkers(a,n._languageId,[]);var l=a.uri.toString(),c=n._listener[l];c&&(c.dispose(),delete n._listener[l])};this._disposables.push(At.onDidCreateModel(s)),this._disposables.push(At.onWillDisposeModel(o)),this._disposables.push(At.onDidChangeModelLanguage(function(a){o(a.model),s(a.model)})),i.onDidChange(function(a){At.getModels().forEach(function(l){l.getModeId()===n._languageId&&(o(l),s(l))})}),this._disposables.push({dispose:function(){for(var a in n._listener)n._listener[a].dispose()}}),At.getModels().forEach(s)}return r.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},r.prototype._doValidate=function(e,t){this._worker(e).then(function(i){return i.doValidation(e.toString())}).then(function(i){var n=i.map(function(o){return Dve(e,o)}),s=At.getModel(e);s&&s.getModeId()===t&&At.setModelMarkers(s,t,n)}).then(void 0,function(i){console.error(i)})},r}();function kve(r){switch(r){case Pg.Error:return nr.Error;case Pg.Warning:return nr.Warning;case Pg.Information:return nr.Info;case Pg.Hint:return nr.Hint;default:return nr.Info}}function Dve(r,e){var t=typeof e.code=="number"?String(e.code):e.code;return{severity:kve(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function rd(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function Eve(r){if(!!r)return{start:{line:r.startLineNumber-1,character:r.startColumn-1},end:{line:r.endLineNumber-1,character:r.endColumn-1}}}function $s(r){if(!!r)return new dl(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function Ive(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function Nve(r){var e=pe.CompletionItemKind;switch(r){case Ae.Text:return e.Text;case Ae.Method:return e.Method;case Ae.Function:return e.Function;case Ae.Constructor:return e.Constructor;case Ae.Field:return e.Field;case Ae.Variable:return e.Variable;case Ae.Class:return e.Class;case Ae.Interface:return e.Interface;case Ae.Module:return e.Module;case Ae.Property:return e.Property;case Ae.Unit:return e.Unit;case Ae.Value:return e.Value;case Ae.Enum:return e.Enum;case Ae.Keyword:return e.Keyword;case Ae.Snippet:return e.Snippet;case Ae.Color:return e.Color;case Ae.File:return e.File;case Ae.Reference:return e.Reference}return e.Property}function gR(r){if(!!r)return{range:$s(r.range),text:r.newText}}function Tve(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var Ave=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return["/","-",":"]},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),rd(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new dl(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(h){var u={label:h.label,insertText:h.insertText||h.label,sortText:h.sortText,filterText:h.filterText,documentation:h.documentation,detail:h.detail,command:Tve(h.command),range:l,kind:Nve(h.kind)};return h.textEdit&&(Ive(h.textEdit)?u.range={insert:$s(h.textEdit.insert),replace:$s(h.textEdit.replace)}:u.range=$s(h.textEdit.range),u.insertText=h.textEdit.newText),h.additionalTextEdits&&(u.additionalTextEdits=h.additionalTextEdits.map(gR)),h.insertTextFormat===qr.Snippet&&(u.insertTextRules=pe.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function Rve(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function H9(r){return typeof r=="string"?{value:r}:Rve(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` -`+r.value+"\n```\n"}}function Mve(r){if(!!r)return Array.isArray(r)?r.map(H9):[H9(r)]}var Pve=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),rd(t))}).then(function(s){if(!!s)return{range:$s(s.range),contents:Mve(s.contents)}})},r}();function Ove(r){switch(r){case Sl.Read:return pe.DocumentHighlightKind.Read;case Sl.Write:return pe.DocumentHighlightKind.Write;case Sl.Text:return pe.DocumentHighlightKind.Text}return pe.DocumentHighlightKind.Text}var Fve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentHighlights=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDocumentHighlights(n.toString(),rd(t))}).then(function(s){if(!!s)return s.map(function(o){return{range:$s(o.range),kind:Ove(o.kind)}})})},r}();function z9(r){return{uri:Ec.parse(r.uri),range:$s(r.range)}}var Bve=function(){function r(e){this._worker=e}return r.prototype.provideDefinition=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDefinition(n.toString(),rd(t))}).then(function(s){if(!!s)return[z9(s)]})},r}(),Wve=function(){function r(e){this._worker=e}return r.prototype.provideReferences=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.findReferences(s.toString(),rd(t))}).then(function(o){if(!!o)return o.map(z9)})},r}();function Vve(r){if(!(!r||!r.changes)){var e=[];for(var t in r.changes)for(var i=Ec.parse(t),n=0,s=r.changes[t];n<s.length;n++){var o=s[n];e.push({resource:i,edit:{range:$s(o.range),text:o.newText}})}return{edits:e}}}var Hve=function(){function r(e){this._worker=e}return r.prototype.provideRenameEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doRename(s.toString(),rd(t),i)}).then(function(o){return Vve(o)})},r}();function zve(r){var e=pe.SymbolKind;switch(r){case Li.File:return e.Array;case Li.Module:return e.Module;case Li.Namespace:return e.Namespace;case Li.Package:return e.Package;case Li.Class:return e.Class;case Li.Method:return e.Method;case Li.Property:return e.Property;case Li.Field:return e.Field;case Li.Constructor:return e.Constructor;case Li.Enum:return e.Enum;case Li.Interface:return e.Interface;case Li.Function:return e.Function;case Li.Variable:return e.Variable;case Li.Constant:return e.Constant;case Li.String:return e.String;case Li.Number:return e.Number;case Li.Boolean:return e.Boolean;case Li.Array:return e.Array}return e.Function}var $ve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:zve(s.kind),tags:[],range:$s(s.location.range),selectionRange:$s(s.location.range)}})})},r}(),Uve=function(){function r(e){this._worker=e}return r.prototype.provideDocumentColors=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentColors(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{color:s.color,range:$s(s.range)}})})},r.prototype.provideColorPresentations=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getColorPresentations(n.toString(),t.color,Eve(t.range))}).then(function(s){if(!!s)return s.map(function(o){var a={label:o.label};return o.textEdit&&(a.textEdit=gR(o.textEdit)),o.additionalTextEdits&&(a.additionalTextEdits=o.additionalTextEdits.map(gR)),a})})},r}(),jve=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=Kve(o.kind)),a})})},r}();function Kve(r){switch(r){case nb.Comment:return pe.FoldingRangeKind.Comment;case nb.Imports:return pe.FoldingRangeKind.Imports;case nb.Region:return pe.FoldingRangeKind.Region}}var qve=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(rd))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:$s(o.range)}),o=o.parent;return a})})},r}();function Gve(r){var e=[],t=[],i=new m_e(r);e.push(i);var n=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.getLanguageServiceWorker.apply(i,o)};function s(){var o=r.languageId,a=r.modeConfiguration;U9(t),a.completionItems&&t.push(pe.registerCompletionItemProvider(o,new Ave(n))),a.hovers&&t.push(pe.registerHoverProvider(o,new Pve(n))),a.documentHighlights&&t.push(pe.registerDocumentHighlightProvider(o,new Fve(n))),a.definitions&&t.push(pe.registerDefinitionProvider(o,new Bve(n))),a.references&&t.push(pe.registerReferenceProvider(o,new Wve(n))),a.documentSymbols&&t.push(pe.registerDocumentSymbolProvider(o,new $ve(n))),a.rename&&t.push(pe.registerRenameProvider(o,new Hve(n))),a.colors&&t.push(pe.registerColorProvider(o,new Uve(n))),a.foldingRanges&&t.push(pe.registerFoldingRangeProvider(o,new jve(n))),a.diagnostics&&t.push(new xve(o,n,r)),a.selectionRanges&&t.push(pe.registerSelectionRangeProvider(o,new qve(n)))}return s(),e.push($9(t)),$9(e)}function $9(r){return{dispose:function(){return U9(r)}}}function U9(r){for(;r.length;)r.pop().dispose()}var Zve=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",setupMode:Gve}),Yve=2*60*1e3,Xve=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>Yve&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=At.createWebWorker({moduleId:"vs/language/json/jsonWorker",label:this._defaults.languageId,createData:{languageSettings:this._defaults.diagnosticsOptions,languageId:this._defaults.languageId,enableSchemaRequest:this._defaults.diagnosticsOptions.enableSchemaRequest}}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}();function j9(r,e){e===void 0&&(e=!1);var t=r.length,i=0,n="",s=0,o=16,a=0,l=0,c=0,h=0,u=0;function d(C,y){for(var x=0,S=0;x<C||!y;){var w=r.charCodeAt(i);if(w>=48&&w<=57)S=S*16+w-48;else if(w>=65&&w<=70)S=S*16+w-65+10;else if(w>=97&&w<=102)S=S*16+w-97+10;else break;i++,x++}return x<C&&(S=-1),S}function f(C){i=C,n="",s=0,o=16,u=0}function g(){var C=i;if(r.charCodeAt(i)===48)i++;else for(i++;i<r.length&&Bg(r.charCodeAt(i));)i++;if(i<r.length&&r.charCodeAt(i)===46)if(i++,i<r.length&&Bg(r.charCodeAt(i)))for(i++;i<r.length&&Bg(r.charCodeAt(i));)i++;else return u=3,r.substring(C,i);var y=i;if(i<r.length&&(r.charCodeAt(i)===69||r.charCodeAt(i)===101))if(i++,(i<r.length&&r.charCodeAt(i)===43||r.charCodeAt(i)===45)&&i++,i<r.length&&Bg(r.charCodeAt(i))){for(i++;i<r.length&&Bg(r.charCodeAt(i));)i++;y=i}else u=3;return r.substring(C,y)}function p(){for(var C="",y=i;;){if(i>=t){C+=r.substring(y,i),u=2;break}var x=r.charCodeAt(i);if(x===34){C+=r.substring(y,i),i++;break}if(x===92){if(C+=r.substring(y,i),i++,i>=t){u=2;break}var S=r.charCodeAt(i++);switch(S){case 34:C+='"';break;case 92:C+="\\";break;case 47:C+="/";break;case 98:C+="\b";break;case 102:C+="\f";break;case 110:C+=` -`;break;case 114:C+="\r";break;case 116:C+=" ";break;case 117:var w=d(4,!0);w>=0?C+=String.fromCharCode(w):u=4;break;default:u=5}y=i;continue}if(x>=0&&x<=31)if(db(x)){C+=r.substring(y,i),u=2;break}else u=6;i++}return C}function _(){if(n="",u=0,s=i,l=a,h=c,i>=t)return s=t,o=17;var C=r.charCodeAt(i);if(pR(C)){do i++,n+=String.fromCharCode(C),C=r.charCodeAt(i);while(pR(C));return o=15}if(db(C))return i++,n+=String.fromCharCode(C),C===13&&r.charCodeAt(i)===10&&(i++,n+=` -`),a++,c=i,o=14;switch(C){case 123:return i++,o=1;case 125:return i++,o=2;case 91:return i++,o=3;case 93:return i++,o=4;case 58:return i++,o=6;case 44:return i++,o=5;case 34:return i++,n=p(),o=10;case 47:var y=i-1;if(r.charCodeAt(i+1)===47){for(i+=2;i<t&&!db(r.charCodeAt(i));)i++;return n=r.substring(y,i),o=12}if(r.charCodeAt(i+1)===42){i+=2;for(var x=t-1,S=!1;i<x;){var w=r.charCodeAt(i);if(w===42&&r.charCodeAt(i+1)===47){i+=2,S=!0;break}i++,db(w)&&(w===13&&r.charCodeAt(i)===10&&i++,a++,c=i)}return S||(i++,u=1),n=r.substring(y,i),o=13}return n+=String.fromCharCode(C),i++,o=16;case 45:if(n+=String.fromCharCode(C),i++,i===t||!Bg(r.charCodeAt(i)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=g(),o=11;default:for(;i<t&&v(C);)i++,C=r.charCodeAt(i);if(s!==i){switch(n=r.substring(s,i),n){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return n+=String.fromCharCode(C),i++,o=16}}function v(C){if(pR(C)||db(C))return!1;switch(C){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function b(){var C;do C=_();while(C>=12&&C<=15);return C}return{setPosition:f,getPosition:function(){return i},scan:e?b:_,getToken:function(){return o},getTokenValue:function(){return n},getTokenOffset:function(){return s},getTokenLength:function(){return i-s},getTokenStartLine:function(){return l},getTokenStartCharacter:function(){return s-h},getTokenError:function(){return u}}}function pR(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function db(r){return r===10||r===13||r===8232||r===8233}function Bg(r){return r>=48&&r<=57}var M1;(function(r){r.DEFAULT={allowTrailingComma:!1}})(M1||(M1={}));function Qve(r,e,t){e===void 0&&(e=[]),t===void 0&&(t=M1.DEFAULT);var i=null,n=[],s=[];function o(l){Array.isArray(n)?n.push(l):i!==null&&(n[i]=l)}var a={onObjectBegin:function(){var l={};o(l),s.push(n),n=l,i=null},onObjectProperty:function(l){i=l},onObjectEnd:function(){n=s.pop()},onArrayBegin:function(){var l=[];o(l),s.push(n),n=l,i=null},onArrayEnd:function(){n=s.pop()},onLiteralValue:o,onError:function(l,c,h){e.push({error:l,offset:c,length:h})}};return Jve(r,a,t),n[0]}function mR(r){switch(r.type){case"array":return r.children.map(mR);case"object":for(var e=Object.create(null),t=0,i=r.children;t<i.length;t++){var n=i[t],s=n.children[1];s&&(e[n.children[0].value]=mR(s))}return e;case"null":case"string":case"number":case"boolean":return r.value;default:return}}function Jve(r,e,t){t===void 0&&(t=M1.DEFAULT);var i=j9(r,!1);function n(N){return N?function(){return N(i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}function s(N){return N?function(P){return N(P,i.getTokenOffset(),i.getTokenLength(),i.getTokenStartLine(),i.getTokenStartCharacter())}:function(){return!0}}var o=n(e.onObjectBegin),a=s(e.onObjectProperty),l=n(e.onObjectEnd),c=n(e.onArrayBegin),h=n(e.onArrayEnd),u=s(e.onLiteralValue),d=s(e.onSeparator),f=n(e.onComment),g=s(e.onError),p=t&&t.disallowComments,_=t&&t.allowTrailingComma;function v(){for(;;){var N=i.scan();switch(i.getTokenError()){case 4:b(14);break;case 5:b(15);break;case 3:b(13);break;case 1:p||b(11);break;case 2:b(12);break;case 6:b(16);break}switch(N){case 12:case 13:p?b(10):f();break;case 16:b(1);break;case 15:case 14:break;default:return N}}}function b(N,P,B){if(P===void 0&&(P=[]),B===void 0&&(B=[]),g(N),P.length+B.length>0)for(var U=i.getToken();U!==17;){if(P.indexOf(U)!==-1){v();break}else if(B.indexOf(U)!==-1)break;U=v()}}function C(N){var P=i.getTokenValue();return N?u(P):a(P),v(),!0}function y(){switch(i.getToken()){case 11:var N=i.getTokenValue(),P=Number(N);isNaN(P)&&(b(2),P=0),u(P);break;case 7:u(null);break;case 8:u(!0);break;case 9:u(!1);break;default:return!1}return v(),!0}function x(){return i.getToken()!==10?(b(3,[],[2,5]),!1):(C(!1),i.getToken()===6?(d(":"),v(),L()||b(4,[],[2,5])):b(5,[],[2,5]),!0)}function S(){o(),v();for(var N=!1;i.getToken()!==2&&i.getToken()!==17;){if(i.getToken()===5){if(N||b(4,[],[]),d(","),v(),i.getToken()===2&&_)break}else N&&b(6,[],[]);x()||b(4,[],[2,5]),N=!0}return l(),i.getToken()!==2?b(7,[2],[]):v(),!0}function w(){c(),v();for(var N=!1;i.getToken()!==4&&i.getToken()!==17;){if(i.getToken()===5){if(N||b(4,[],[]),d(","),v(),i.getToken()===4&&_)break}else N&&b(6,[],[]);L()||b(4,[],[4,5]),N=!0}return h(),i.getToken()!==4?b(8,[4],[]):v(),!0}function L(){switch(i.getToken()){case 3:return w();case 1:return S();case 10:return C(!0);default:return y()}}return v(),i.getToken()===17?t.allowEmptyContent?!0:(b(4,[],[]),!1):L()?(i.getToken()!==17&&b(9,[],[]),!0):(b(4,[],[]),!1)}var eCe=j9,tCe=Qve,iCe=mR;function nCe(r){return typeof r=="boolean"}function K9(r,e){if(r.length<e.length)return!1;for(var t=0;t<e.length;t++)if(r[t]!==e[t])return!1;return!0}function rCe(r,e){var t=r.length-e.length;return t>0?r.lastIndexOf(e)===t:t===0?r===e:!1}function sCe(r){return K9(r,"(?i)")?new RegExp(r.substring(4),"i"):new RegExp(r)}var q9;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(q9||(q9={}));var P1;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})(P1||(P1={}));var ka;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=P1.MAX_VALUE),n===Number.MAX_VALUE&&(n=P1.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return he.objectLiteral(n)&&he.uinteger(n.line)&&he.uinteger(n.character)}r.is=t})(ka||(ka={}));var Kn;(function(r){function e(i,n,s,o){if(he.uinteger(i)&&he.uinteger(n)&&he.uinteger(s)&&he.uinteger(o))return{start:ka.create(i,n),end:ka.create(s,o)};if(ka.is(i)&&ka.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return he.objectLiteral(n)&&ka.is(n.start)&&ka.is(n.end)}r.is=t})(Kn||(Kn={}));var _R;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&Kn.is(n.range)&&(he.string(n.uri)||he.undefined(n.uri))}r.is=t})(_R||(_R={}));var G9;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return he.defined(n)&&Kn.is(n.targetRange)&&he.string(n.targetUri)&&(Kn.is(n.targetSelectionRange)||he.undefined(n.targetSelectionRange))&&(Kn.is(n.originSelectionRange)||he.undefined(n.originSelectionRange))}r.is=t})(G9||(G9={}));var bR;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return he.numberRange(n.red,0,1)&&he.numberRange(n.green,0,1)&&he.numberRange(n.blue,0,1)&&he.numberRange(n.alpha,0,1)}r.is=t})(bR||(bR={}));var Z9;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return Kn.is(n.range)&&bR.is(n.color)}r.is=t})(Z9||(Z9={}));var Y9;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return he.string(n.label)&&(he.undefined(n.textEdit)||Zc.is(n))&&(he.undefined(n.additionalTextEdits)||he.typedArray(n.additionalTextEdits,Zc.is))}r.is=t})(Y9||(Y9={}));var fb;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(fb||(fb={}));var X9;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return he.defined(s)&&(l.startCharacter=s),he.defined(o)&&(l.endCharacter=o),he.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return he.uinteger(n.startLine)&&he.uinteger(n.startLine)&&(he.undefined(n.startCharacter)||he.uinteger(n.startCharacter))&&(he.undefined(n.endCharacter)||he.uinteger(n.endCharacter))&&(he.undefined(n.kind)||he.string(n.kind))}r.is=t})(X9||(X9={}));var vR;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&_R.is(n.location)&&he.string(n.message)}r.is=t})(vR||(vR={}));var Wg;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(Wg||(Wg={}));var Q9;(function(r){r.Unnecessary=1,r.Deprecated=2})(Q9||(Q9={}));var J9;(function(r){function e(t){var i=t;return i!=null&&he.string(i.href)}r.is=e})(J9||(J9={}));var O1;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return he.defined(s)&&(c.severity=s),he.defined(o)&&(c.code=o),he.defined(a)&&(c.source=a),he.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return he.defined(s)&&Kn.is(s.range)&&he.string(s.message)&&(he.number(s.severity)||he.undefined(s.severity))&&(he.integer(s.code)||he.string(s.code)||he.undefined(s.code))&&(he.undefined(s.codeDescription)||he.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(he.string(s.source)||he.undefined(s.source))&&(he.undefined(s.relatedInformation)||he.typedArray(s.relatedInformation,vR.is))}r.is=t})(O1||(O1={}));var gb;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return he.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return he.defined(n)&&he.string(n.title)&&he.string(n.command)}r.is=t})(gb||(gb={}));var Zc;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return he.objectLiteral(o)&&he.string(o.newText)&&Kn.is(o.range)}r.is=n})(Zc||(Zc={}));var Vg;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&he.objectLiteral(n)&&he.string(n.label)&&(he.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(he.string(n.description)||n.description===void 0)}r.is=t})(Vg||(Vg={}));var or;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(or||(or={}));var Yc;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return Zc.is(o)&&(Vg.is(o.annotationId)||or.is(o.annotationId))}r.is=n})(Yc||(Yc={}));var F1;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&W1.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(F1||(F1={}));var pb;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&he.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||he.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||he.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||or.is(n.annotationId))}r.is=t})(pb||(pb={}));var mb;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&he.string(n.oldUri)&&he.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||he.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||he.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||or.is(n.annotationId))}r.is=t})(mb||(mb={}));var _b;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&he.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||he.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||he.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||or.is(n.annotationId))}r.is=t})(_b||(_b={}));var CR;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return he.string(n.kind)?pb.is(n)||mb.is(n)||_b.is(n):F1.is(n)}))}r.is=e})(CR||(CR={}));var B1=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=Zc.insert(e,t):or.is(i)?(s=i,n=Yc.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=Yc.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=Zc.replace(e,t):or.is(i)?(s=i,n=Yc.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=Yc.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=Zc.del(e):or.is(t)?(n=t,i=Yc.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=Yc.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),e6=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(or.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new e6(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(F1.is(i)){var n=new B1(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new B1(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(W1.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new B1(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new B1(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new e6,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Vg.is(t)||or.is(t)?n=t:i=t;var s,o;if(n===void 0?s=pb.create(e,i):(o=or.is(n)?n:this._changeAnnotations.manage(n),s=pb.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;Vg.is(i)||or.is(i)?s=i:n=i;var o,a;if(s===void 0?o=mb.create(e,t,n):(a=or.is(s)?s:this._changeAnnotations.manage(s),o=mb.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;Vg.is(t)||or.is(t)?n=t:i=t;var s,o;if(n===void 0?s=_b.create(e,i):(o=or.is(n)?n:this._changeAnnotations.manage(n),s=_b.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var t6;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return he.defined(n)&&he.string(n.uri)}r.is=t})(t6||(t6={}));var i6;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&he.string(n.uri)&&he.integer(n.version)}r.is=t})(i6||(i6={}));var W1;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&he.string(n.uri)&&(n.version===null||he.integer(n.version))}r.is=t})(W1||(W1={}));var n6;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return he.defined(n)&&he.string(n.uri)&&he.string(n.languageId)&&he.integer(n.version)&&he.string(n.text)}r.is=t})(n6||(n6={}));var sd;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(sd||(sd={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(sd||(sd={}));var wR;(function(r){function e(t){var i=t;return he.objectLiteral(t)&&sd.is(i.kind)&&he.string(i.value)}r.is=e})(wR||(wR={}));var hn;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(hn||(hn={}));var yR;(function(r){r.PlainText=1,r.Snippet=2})(yR||(yR={}));var r6;(function(r){r.Deprecated=1})(r6||(r6={}));var s6;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&he.string(n.newText)&&Kn.is(n.insert)&&Kn.is(n.replace)}r.is=t})(s6||(s6={}));var o6;(function(r){r.asIs=1,r.adjustIndentation=2})(o6||(o6={}));var a6;(function(r){function e(t){return{label:t}}r.create=e})(a6||(a6={}));var l6;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(l6||(l6={}));var V1;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return he.string(n)||he.objectLiteral(n)&&he.string(n.language)&&he.string(n.value)}r.is=t})(V1||(V1={}));var c6;(function(r){function e(t){var i=t;return!!i&&he.objectLiteral(i)&&(wR.is(i.contents)||V1.is(i.contents)||he.typedArray(i.contents,V1.is))&&(t.range===void 0||Kn.is(t.range))}r.is=e})(c6||(c6={}));var h6;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(h6||(h6={}));var u6;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return he.defined(i)&&(o.documentation=i),he.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(u6||(u6={}));var d6;(function(r){r.Text=1,r.Read=2,r.Write=3})(d6||(d6={}));var f6;(function(r){function e(t,i){var n={range:t};return he.number(i)&&(n.kind=i),n}r.create=e})(f6||(f6={}));var un;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(un||(un={}));var g6;(function(r){r.Deprecated=1})(g6||(g6={}));var p6;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(p6||(p6={}));var m6;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&he.string(n.name)&&he.number(n.kind)&&Kn.is(n.range)&&Kn.is(n.selectionRange)&&(n.detail===void 0||he.string(n.detail))&&(n.deprecated===void 0||he.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(m6||(m6={}));var _6;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(_6||(_6={}));var b6;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return he.defined(n)&&he.typedArray(n.diagnostics,O1.is)&&(n.only===void 0||he.typedArray(n.only,he.string))}r.is=t})(b6||(b6={}));var v6;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):gb.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&he.string(n.title)&&(n.diagnostics===void 0||he.typedArray(n.diagnostics,O1.is))&&(n.kind===void 0||he.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||gb.is(n.command))&&(n.isPreferred===void 0||he.boolean(n.isPreferred))&&(n.edit===void 0||CR.is(n.edit))}r.is=t})(v6||(v6={}));var C6;(function(r){function e(i,n){var s={range:i};return he.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return he.defined(n)&&Kn.is(n.range)&&(he.undefined(n.command)||gb.is(n.command))}r.is=t})(C6||(C6={}));var w6;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return he.defined(n)&&he.uinteger(n.tabSize)&&he.boolean(n.insertSpaces)}r.is=t})(w6||(w6={}));var y6;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return he.defined(n)&&Kn.is(n.range)&&(he.undefined(n.target)||he.string(n.target))}r.is=t})(y6||(y6={}));var S6;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&Kn.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(S6||(S6={}));var L6;(function(r){function e(s,o,a,l){return new oCe(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(he.defined(o)&&he.string(o.uri)&&(he.undefined(o.languageId)||he.string(o.languageId))&&he.uinteger(o.lineCount)&&he.func(o.getText)&&he.func(o.positionAt)&&he.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,h=l.length-1;h>=0;h--){var u=l[h],d=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,d)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=d}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var h=0,u=0,d=0;h<l.length&&u<c.length;){var f=o(l[h],c[u]);f<=0?s[d++]=l[h++]:s[d++]=c[u++]}for(;h<l.length;)s[d++]=l[h++];for(;u<c.length;)s[d++]=c[u++];return s}})(L6||(L6={}));var oCe=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` -`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` -`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return ka.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return ka.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),he;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function h(f){return e.call(f)==="[object Function]"}r.func=h;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function d(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=d})(he||(he={}));var x6=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=E6(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),h=Math.max(o.end.line,0),u=this._lineOffsets,d=D6(s.text,!1,a);if(h-c===d.length)for(var f=0,g=d.length;f<g;f++)u[f+c+1]=d[f];else d.length<1e4?u.splice.apply(u,[c+1,h-c].concat(d)):this._lineOffsets=u=u.slice(0,c+1).concat(d,u.slice(h+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+d.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=D6(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),k6;(function(r){function e(n,s,o,a){return new x6(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof x6)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=SR(s.map(aCe),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],h=0,u=a;h<u.length;h++){var d=u[h],f=n.offsetAt(d.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),d.newText.length&&c.push(d.newText),l=n.offsetAt(d.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(k6||(k6={}));function SR(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);SR(i,e),SR(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function D6(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function E6(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function aCe(r){var e=E6(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var I6;(function(r){r[r.Undefined=0]="Undefined",r[r.EnumValueMismatch=1]="EnumValueMismatch",r[r.Deprecated=2]="Deprecated",r[r.UnexpectedEndOfComment=257]="UnexpectedEndOfComment",r[r.UnexpectedEndOfString=258]="UnexpectedEndOfString",r[r.UnexpectedEndOfNumber=259]="UnexpectedEndOfNumber",r[r.InvalidUnicode=260]="InvalidUnicode",r[r.InvalidEscapeCharacter=261]="InvalidEscapeCharacter",r[r.InvalidCharacter=262]="InvalidCharacter",r[r.PropertyExpected=513]="PropertyExpected",r[r.CommaExpected=514]="CommaExpected",r[r.ColonExpected=515]="ColonExpected",r[r.ValueExpected=516]="ValueExpected",r[r.CommaOrCloseBacketExpected=517]="CommaOrCloseBacketExpected",r[r.CommaOrCloseBraceExpected=518]="CommaOrCloseBraceExpected",r[r.TrailingComma=519]="TrailingComma",r[r.DuplicateKey=520]="DuplicateKey",r[r.CommentNotPermitted=521]="CommentNotPermitted",r[r.SchemaResolveError=768]="SchemaResolveError"})(I6||(I6={}));var N6;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[sd.Markdown,sd.PlainText],commitCharactersSupport:!0}}}}})(N6||(N6={}));function lCe(r,e){var t;return e.length===0?t=r:t=r.replace(/\{(\d+)\}/g,function(i,n){var s=n[0];return typeof e[s]!="undefined"?e[s]:i}),t}function cCe(r,e){for(var t=[],i=2;i<arguments.length;i++)t[i-2]=arguments[i];return lCe(e,t)}function LR(r){return cCe}var od=globalThis&&globalThis.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(i,n){i.__proto__=n}||function(i,n){for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(i[s]=n[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function i(){this.constructor=e}e.prototype=t===null?Object.create(t):(i.prototype=t.prototype,new i)}}(),bb=LR();bb("colorHexFormatWarning","Invalid color format. Use #RGB, #RGBA, #RRGGBB or #RRGGBBAA."),bb("dateTimeFormatWarning","String is not a RFC3339 date-time."),bb("dateFormatWarning","String is not a RFC3339 date."),bb("timeFormatWarning","String is not a RFC3339 time."),bb("emailFormatWarning","String is not an e-mail address.");var ad=function(){function r(e,t,i){i===void 0&&(i=0),this.offset=t,this.length=i,this.parent=e}return Object.defineProperty(r.prototype,"children",{get:function(){return[]},enumerable:!1,configurable:!0}),r.prototype.toString=function(){return"type: "+this.type+" ("+this.offset+"/"+this.length+")"+(this.parent?" parent: {"+this.parent.toString()+"}":"")},r}();(function(r){od(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="null",n.value=null,n}return e})(ad);(function(r){od(e,r);function e(t,i,n){var s=r.call(this,t,n)||this;return s.type="boolean",s.value=i,s}return e})(ad);(function(r){od(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="array",n.items=[],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.items},enumerable:!1,configurable:!0}),e})(ad);(function(r){od(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="number",n.isInteger=!0,n.value=Number.NaN,n}return e})(ad);(function(r){od(e,r);function e(t,i,n){var s=r.call(this,t,i,n)||this;return s.type="string",s.value="",s}return e})(ad);(function(r){od(e,r);function e(t,i,n){var s=r.call(this,t,i)||this;return s.type="property",s.colonOffset=-1,s.keyNode=n,s}return Object.defineProperty(e.prototype,"children",{get:function(){return this.valueNode?[this.keyNode,this.valueNode]:[this.keyNode]},enumerable:!1,configurable:!0}),e})(ad);(function(r){od(e,r);function e(t,i){var n=r.call(this,t,i)||this;return n.type="object",n.properties=[],n}return Object.defineProperty(e.prototype,"children",{get:function(){return this.properties},enumerable:!1,configurable:!0}),e})(ad);function hCe(r){return nCe(r)?r?{}:{not:{}}:r}var T6;(function(r){r[r.Key=0]="Key",r[r.Enum=1]="Enum"})(T6||(T6={}));(function(){function r(){}return Object.defineProperty(r.prototype,"schemas",{get:function(){return[]},enumerable:!1,configurable:!0}),r.prototype.add=function(e){},r.prototype.merge=function(e){},r.prototype.include=function(e){return!0},r.prototype.newSub=function(){return this},r.instance=new r,r})();function uCe(r){return iCe(r)}var A6;A6=(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,h="",u=0,d=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(d===g-1||f===1))if(d!==g-1&&f===2){if(h.length<2||u!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var p=h.lastIndexOf("/");if(p!==h.length-1){p===-1?(h="",u=0):u=(h=h.slice(0,p)).length-1-h.lastIndexOf("/"),d=g,f=0;continue}}else if(h.length===2||h.length===1){h="",u=0,d=g,f=0;continue}}l&&(h.length>0?h+="/..":h="..",u=2)}else h.length>0?h+="/"+a.slice(d+1,g):h=a.slice(d+1,g),u=g-d-1;d=g,f=0}else c===46&&f!==-1?++f:f=-1}return h}var o={resolve:function(){for(var a,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var u;h>=0?u=arguments[h]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var h=a.length,u=h-c,d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var f=l.length-d,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(d+_)===47)return l.slice(d+_+1);if(_===0)return l.slice(d+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(d+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=h;++_)_!==h&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(d+p):(d+=p,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,u=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!u){h=d;break}}else u=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,h=0,u=-1,d=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!d){h=c+1;break}}else g===-1&&(d=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return h===u?u=g:u===-1&&(u=a.length),a.slice(h,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!d){h=c+1;break}}else u===-1&&(d=!1,u=c+1);return u===-1?"":a.slice(h,u)},extname:function(a){n(a);for(var l=-1,c=0,h=-1,u=!0,d=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)h===-1&&(u=!1,h=f+1),g===46?l===-1?l=f:d!==1&&(d=1):l!==-1&&(d=-1);else if(!u){c=f+1;break}}return l===-1||h===-1||d===0||d===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var h=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+u:h+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,h=a.charCodeAt(0),u=h===47;u?(l.root="/",c=1):c=0;for(var d=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((h=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),h===46?d===-1?d=_:v!==1&&(v=1):d!==-1&&(v=-1);else if(!p){f=_+1;break}return d===-1||g===-1||v===0||v===1&&d===g-1&&d===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,d),l.base=a.slice(1,g)):(l.name=a.slice(f,d),l.base=a.slice(f,g)),l.ext=a.slice(d,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>U}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,h=(l=function(A,D){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,W){M.__proto__=W}||function(M,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(M[ge]=W[ge])})(A,D)},function(A,D){function M(){this.constructor=A}l(A,D),A.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}),u=/^\w[\w\d+.-]*$/,d=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function A(D,M,W,ge,se,ae){ae===void 0&&(ae=!1),typeof D=="object"?(this.scheme=D.scheme||g,this.authority=D.authority||g,this.path=D.path||g,this.query=D.query||g,this.fragment=D.fragment||g):(this.scheme=function(we,De){return we||De?we:"file"}(D,ae),this.authority=M||g,this.path=function(we,De){switch(we){case"https":case"http":case"file":De?De[0]!==p&&(De=p+De):De=p}return De}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(we,De){if(!we.scheme&&De)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+we.authority+'", path: "'+we.path+'", query: "'+we.query+'", fragment: "'+we.fragment+'"}');if(we.scheme&&!u.test(we.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(we.path){if(we.authority){if(!d.test(we.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(f.test(we.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return A.isUri=function(D){return D instanceof A||!!D&&typeof D.authority=="string"&&typeof D.fragment=="string"&&typeof D.path=="string"&&typeof D.query=="string"&&typeof D.scheme=="string"&&typeof D.fsPath=="function"&&typeof D.with=="function"&&typeof D.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(D){if(!D)return this;var M=D.scheme,W=D.authority,ge=D.path,se=D.query,ae=D.fragment;return M===void 0?M=this.scheme:M===null&&(M=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),M===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(M,W,ge,se,ae)},A.parse=function(D,M){M===void 0&&(M=!1);var W=_.exec(D);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),M):new C(g,g,g,g,g)},A.file=function(D){var M=g;if(o&&(D=D.replace(/\\/g,p)),D[0]===p&&D[1]===p){var W=D.indexOf(p,2);W===-1?(M=D.substring(2),D=p):(M=D.substring(2,W),D=D.substring(W)||p)}return new C("file",M,D,g,g)},A.from=function(D){return new C(D.scheme,D.authority,D.path,D.query,D.fragment)},A.prototype.toString=function(D){return D===void 0&&(D=!1),L(this,D)},A.prototype.toJSON=function(){return this},A.revive=function(D){if(D){if(D instanceof A)return D;var M=new C(D);return M._formatted=D.external,M._fsPath=D._sep===b?D.fsPath:null,M}return D},A}(),b=o?1:void 0,C=function(A){function D(){var M=A!==null&&A.apply(this,arguments)||this;return M._formatted=null,M._fsPath=null,M}return h(D,A),Object.defineProperty(D.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),D.prototype.toString=function(M){return M===void 0&&(M=!1),M?L(this,!0):(this._formatted||(this._formatted=L(this,!1)),this._formatted)},D.prototype.toJSON=function(){var M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=b),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M},D}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function x(A,D){for(var M=void 0,W=-1,ge=0;ge<A.length;ge++){var se=A.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||D&&se===47)W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M!==void 0&&(M+=A.charAt(ge));else{M===void 0&&(M=A.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M+=ae):W===-1&&(W=ge)}}return W!==-1&&(M+=encodeURIComponent(A.substring(W))),M!==void 0?M:A}function S(A){for(var D=void 0,M=0;M<A.length;M++){var W=A.charCodeAt(M);W===35||W===63?(D===void 0&&(D=A.substr(0,M)),D+=y[W]):D!==void 0&&(D+=A[M])}return D!==void 0?D:A}function w(A,D){var M;return M=A.authority&&A.path.length>1&&A.scheme==="file"?"//"+A.authority+A.path:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?D?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,o&&(M=M.replace(/\//g,"\\")),M}function L(A,D){var M=D?S:x,W="",ge=A.scheme,se=A.authority,ae=A.path,we=A.query,De=A.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var Ci=se.substr(0,ct);se=se.substr(ct+1),(ct=Ci.indexOf(":"))===-1?W+=M(Ci,!1):(W+=M(Ci.substr(0,ct),!1),W+=":",W+=M(Ci.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=M(se,!1):(W+=M(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Yt=ae.charCodeAt(1))>=65&&Yt<=90&&(ae="/"+String.fromCharCode(Yt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Yt;(Yt=ae.charCodeAt(0))>=65&&Yt<=90&&(ae=String.fromCharCode(Yt+32)+":"+ae.substr(2))}W+=M(ae,!0)}return we&&(W+="?",W+=M(we,!1)),De&&(W+="#",W+=D?De:x(De,!1)),W}function N(A){try{return decodeURIComponent(A)}catch{return A.length>3?A.substr(0,3)+N(A.substr(3)):A}}var P=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(A){return A.match(P)?A.replace(P,function(D){return N(D)}):A}var U,j=s(470),re=function(){for(var A=0,D=0,M=arguments.length;D<M;D++)A+=arguments[D].length;var W=Array(A),ge=0;for(D=0;D<M;D++)for(var se=arguments[D],ae=0,we=se.length;ae<we;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(A){A.joinPath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];return D.with({path:te.join.apply(te,re([D.path],M))})},A.resolvePath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];var ge=D.path||"/";return D.with({path:te.resolve.apply(te,re([ge],M))})},A.dirname=function(D){var M=te.dirname(D.path);return M.length===1&&M.charCodeAt(0)===46?D:D.with({path:M})},A.basename=function(D){return te.basename(D.path)},A.extname=function(D){return te.extname(D.path)}})(U||(U={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();const{URI:H1,Utils:K0e}=A6;function dCe(r,e){if(typeof r!="string")throw new TypeError("Expected a string");for(var t=String(r),i="",n=e?!!e.extended:!1,s=e?!!e.globstar:!1,o=!1,a=e&&typeof e.flags=="string"?e.flags:"",l,c=0,h=t.length;c<h;c++)switch(l=t[c],l){case"/":case"$":case"^":case"+":case".":case"(":case")":case"=":case"!":case"|":i+="\\"+l;break;case"?":if(n){i+=".";break}case"[":case"]":if(n){i+=l;break}case"{":if(n){o=!0,i+="(";break}case"}":if(n){o=!1,i+=")";break}case",":if(o){i+="|";break}i+="\\"+l;break;case"*":for(var u=t[c-1],d=1;t[c+1]==="*";)d++,c++;var f=t[c+1];if(!s)i+=".*";else{var g=d>1&&(u==="/"||u===void 0||u==="{"||u===",")&&(f==="/"||f===void 0||f===","||f==="}");g?(f==="/"?c++:u==="/"&&i.endsWith("\\/")&&(i=i.substr(0,i.length-2)),i+="((?:[^/]*(?:/|$))*)"):i+="([^/]*)"}break;default:i+=l}return(!a||!~a.indexOf("g"))&&(i="^"+i+"$"),new RegExp(i,a)}var Xc=LR(),fCe="!",gCe="/",pCe=function(){function r(e,t){this.globWrappers=[];try{for(var i=0,n=e;i<n.length;i++){var s=n[i],o=s[0]!==fCe;o||(s=s.substring(1)),s.length>0&&(s[0]===gCe&&(s=s.substring(1)),this.globWrappers.push({regexp:dCe("**/"+s,{extended:!0,globstar:!0}),include:o}))}this.uris=t}catch{this.globWrappers.length=0,this.uris=[]}}return r.prototype.matchesPattern=function(e){for(var t=!1,i=0,n=this.globWrappers;i<n.length;i++){var s=n[i],o=s.regexp,a=s.include;o.test(e)&&(t=a)}return t},r.prototype.getURIs=function(){return this.uris},r}(),mCe=function(){function r(e,t,i){this.service=e,this.url=t,this.dependencies={},i&&(this.unresolvedSchema=this.service.promise.resolve(new Hg(i)))}return r.prototype.getUnresolvedSchema=function(){return this.unresolvedSchema||(this.unresolvedSchema=this.service.loadSchema(this.url)),this.unresolvedSchema},r.prototype.getResolvedSchema=function(){var e=this;return this.resolvedSchema||(this.resolvedSchema=this.getUnresolvedSchema().then(function(t){return e.service.resolveSchemaContent(t,e.url,e.dependencies)})),this.resolvedSchema},r.prototype.clearSchema=function(){this.resolvedSchema=void 0,this.unresolvedSchema=void 0,this.dependencies={}},r}(),Hg=function(){function r(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return r}(),R6=function(){function r(e,t){t===void 0&&(t=[]),this.schema=e,this.errors=t}return r.prototype.getSection=function(e){var t=this.getSectionRecursive(e,this.schema);if(t)return hCe(t)},r.prototype.getSectionRecursive=function(e,t){if(!t||typeof t=="boolean"||e.length===0)return t;var i=e.shift();if(t.properties&&typeof t.properties[i])return this.getSectionRecursive(e,t.properties[i]);if(t.patternProperties)for(var n=0,s=Object.keys(t.patternProperties);n<s.length;n++){var o=s[n],a=sCe(o);if(a.test(i))return this.getSectionRecursive(e,t.patternProperties[o])}else{if(typeof t.additionalProperties=="object")return this.getSectionRecursive(e,t.additionalProperties);if(i.match("[0-9]+")){if(Array.isArray(t.items)){var l=parseInt(i,10);if(!isNaN(l)&&t.items[l])return this.getSectionRecursive(e,t.items[l])}else if(t.items)return this.getSectionRecursive(e,t.items)}}},r}();(function(){function r(e,t,i){this.contextService=t,this.requestService=e,this.promiseConstructor=i||Promise,this.callOnDispose=[],this.contributionSchemas={},this.contributionAssociations=[],this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={}}return r.prototype.getRegisteredSchemaIds=function(e){return Object.keys(this.registeredSchemasIds).filter(function(t){var i=H1.parse(t).scheme;return i!=="schemaservice"&&(!e||e(i))})},Object.defineProperty(r.prototype,"promise",{get:function(){return this.promiseConstructor},enumerable:!1,configurable:!0}),r.prototype.dispose=function(){for(;this.callOnDispose.length>0;)this.callOnDispose.pop()()},r.prototype.onResourceChange=function(e){var t=this,i=!1;e=Qc(e);for(var n=[e],s=Object.keys(this.schemasById).map(function(c){return t.schemasById[c]});n.length;)for(var o=n.pop(),a=0;a<s.length;a++){var l=s[a];l&&(l.url===o||l.dependencies[o])&&(l.url!==o&&n.push(l.url),l.clearSchema(),s[a]=void 0,i=!0)}return i},r.prototype.setSchemaContributions=function(e){if(e.schemas){var t=e.schemas;for(var i in t){var n=Qc(i);this.contributionSchemas[n]=this.addSchemaHandle(n,t[i])}}if(Array.isArray(e.schemaAssociations))for(var s=e.schemaAssociations,o=0,a=s;o<a.length;o++){var l=a[o],c=l.uris.map(Qc),h=this.addFilePatternAssociation(l.pattern,c);this.contributionAssociations.push(h)}},r.prototype.addSchemaHandle=function(e,t){var i=new mCe(this,e,t);return this.schemasById[e]=i,i},r.prototype.getOrAddSchemaHandle=function(e,t){return this.schemasById[e]||this.addSchemaHandle(e,t)},r.prototype.addFilePatternAssociation=function(e,t){var i=new pCe(e,t);return this.filePatternAssociations.push(i),i},r.prototype.registerExternalSchema=function(e,t,i){var n=Qc(e);return this.registeredSchemasIds[n]=!0,this.cachedSchemaForResource=void 0,t&&this.addFilePatternAssociation(t,[e]),i?this.addSchemaHandle(n,i):this.getOrAddSchemaHandle(n)},r.prototype.clearExternalSchemas=function(){this.schemasById={},this.filePatternAssociations=[],this.registeredSchemasIds={},this.cachedSchemaForResource=void 0;for(var e in this.contributionSchemas)this.schemasById[e]=this.contributionSchemas[e],this.registeredSchemasIds[e]=!0;for(var t=0,i=this.contributionAssociations;t<i.length;t++){var n=i[t];this.filePatternAssociations.push(n)}},r.prototype.getResolvedSchema=function(e){var t=Qc(e),i=this.schemasById[t];return i?i.getResolvedSchema():this.promise.resolve(void 0)},r.prototype.loadSchema=function(e){if(!this.requestService){var t=Xc("json.schema.norequestservice","Unable to load schema from '{0}'. No schema request service available",z1(e));return this.promise.resolve(new Hg({},[t]))}return this.requestService(e).then(function(i){if(!i){var n=Xc("json.schema.nocontent","Unable to load schema from '{0}': No content.",z1(e));return new Hg({},[n])}var s={},o=[];s=tCe(i,o);var a=o.length?[Xc("json.schema.invalidFormat","Unable to parse content from '{0}': Parse error at offset {1}.",z1(e),o[0].offset)]:[];return new Hg(s,a)},function(i){var n=i.toString(),s=i.toString().split("Error: ");return s.length>1&&(n=s[1]),rCe(n,".")&&(n=n.substr(0,n.length-1)),new Hg({},[Xc("json.schema.nocontent","Unable to load schema from '{0}': {1}.",z1(e),n)])})},r.prototype.resolveSchemaContent=function(e,t,i){var n=this,s=e.errors.slice(0),o=e.schema;if(o.$schema){var a=Qc(o.$schema);if(a==="http://json-schema.org/draft-03/schema")return this.promise.resolve(new R6({},[Xc("json.schema.draft03.notsupported","Draft-03 schemas are not supported.")]));a==="https://json-schema.org/draft/2019-09/schema"&&s.push(Xc("json.schema.draft201909.notsupported","Draft 2019-09 schemas are not yet fully supported."))}var l=this.contextService,c=function(f,g){if(!g)return f;var p=f;return g[0]==="/"&&(g=g.substr(1)),g.split("/").some(function(_){return _=_.replace(/~1/g,"/").replace(/~0/g,"~"),p=p[_],!p}),p},h=function(f,g,p,_){var v=_?decodeURIComponent(_):void 0,b=c(g,v);if(b)for(var C in b)b.hasOwnProperty(C)&&!f.hasOwnProperty(C)&&(f[C]=b[C]);else s.push(Xc("json.schema.invalidref","$ref '{0}' in '{1}' can not be resolved.",v,p))},u=function(f,g,p,_,v){l&&!/^[A-Za-z][A-Za-z0-9+\-.+]*:\/\/.*/.test(g)&&(g=l.resolveRelativePath(g,_)),g=Qc(g);var b=n.getOrAddSchemaHandle(g);return b.getUnresolvedSchema().then(function(C){if(v[g]=!0,C.errors.length){var y=p?g+"#"+p:g;s.push(Xc("json.schema.problemloadingref","Problems loading reference '{0}': {1}",y,C.errors[0]))}return h(f,C.schema,g,p),d(f,C.schema,g,b.dependencies)})},d=function(f,g,p,_){if(!f||typeof f!="object")return Promise.resolve(null);for(var v=[f],b=[],C=[],y=function(){for(var N=[],P=0;P<arguments.length;P++)N[P]=arguments[P];for(var B=0,U=N;B<U.length;B++){var j=U[B];typeof j=="object"&&v.push(j)}},x=function(){for(var N=[],P=0;P<arguments.length;P++)N[P]=arguments[P];for(var B=0,U=N;B<U.length;B++){var j=U[B];if(typeof j=="object")for(var re in j){var te=re,A=j[te];typeof A=="object"&&v.push(A)}}},S=function(){for(var N=[],P=0;P<arguments.length;P++)N[P]=arguments[P];for(var B=0,U=N;B<U.length;B++){var j=U[B];if(Array.isArray(j))for(var re=0,te=j;re<te.length;re++){var A=te[re];typeof A=="object"&&v.push(A)}}},w=function(N){for(var P=[];N.$ref;){var B=N.$ref,U=B.split("#",2);if(delete N.$ref,U[0].length>0){C.push(u(N,U[0],U[1],p,_));return}else P.indexOf(B)===-1&&(h(N,g,p,U[1]),P.push(B))}y(N.items,N.additionalItems,N.additionalProperties,N.not,N.contains,N.propertyNames,N.if,N.then,N.else),x(N.definitions,N.properties,N.patternProperties,N.dependencies),S(N.anyOf,N.allOf,N.oneOf,N.items)};v.length;){var L=v.pop();b.indexOf(L)>=0||(b.push(L),w(L))}return n.promise.all(C)};return d(o,o,t,i).then(function(f){return new R6(o,s)})},r.prototype.getSchemaForResource=function(e,t){if(t&&t.root&&t.root.type==="object"){var i=t.root.properties.filter(function(v){return v.keyNode.value==="$schema"&&v.valueNode&&v.valueNode.type==="string"});if(i.length>0){var n=i[0].valueNode;if(n&&n.type==="string"){var s=uCe(n);if(s&&K9(s,".")&&this.contextService&&(s=this.contextService.resolveRelativePath(s,e)),s){var o=Qc(s);return this.getOrAddSchemaHandle(o).getResolvedSchema()}}}}if(this.cachedSchemaForResource&&this.cachedSchemaForResource.resource===e)return this.cachedSchemaForResource.resolvedSchema;for(var a=Object.create(null),l=[],c=bCe(e),h=0,u=this.filePatternAssociations;h<u.length;h++){var d=u[h];if(d.matchesPattern(c))for(var f=0,g=d.getURIs();f<g.length;f++){var p=g[f];a[p]||(l.push(p),a[p]=!0)}}var _=l.length>0?this.createCombinedSchema(e,l).getResolvedSchema():this.promise.resolve(void 0);return this.cachedSchemaForResource={resource:e,resolvedSchema:_},_},r.prototype.createCombinedSchema=function(e,t){if(t.length===1)return this.getOrAddSchemaHandle(t[0]);var i="schemaservice://combinedSchema/"+encodeURIComponent(e),n={allOf:t.map(function(s){return{$ref:s}})};return this.addSchemaHandle(i,n)},r.prototype.getMatchingSchemas=function(e,t,i){if(i){var n=i.id||"schemaservice://untitled/matchingSchemas/"+_Ce++;return this.resolveSchemaContent(new Hg(i),n,{}).then(function(s){return t.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted})})}return this.getSchemaForResource(e.uri,t).then(function(s){return s?t.getMatchingSchemas(s.schema).filter(function(o){return!o.inverted}):[]})},r})();var _Ce=0;function Qc(r){try{return H1.parse(r).toString()}catch{return r}}function bCe(r){try{return H1.parse(r).with({fragment:null,query:null}).toString()}catch{return r}}function z1(r){try{var e=H1.parse(r);if(e.scheme==="file")return e.fsPath}catch{}return r}var ot=LR(),M6={schemaAssociations:[],schemas:{"http://json-schema.org/schema#":{$ref:"http://json-schema.org/draft-07/schema#"},"http://json-schema.org/draft-04/schema#":{title:ot("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),$schema:"http://json-schema.org/draft-04/schema#",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},positiveInteger:{type:"integer",minimum:0},positiveIntegerDefault0:{allOf:[{$ref:"#/definitions/positiveInteger"},{default:0}]},simpleTypes:{type:"string",enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},minItems:1,uniqueItems:!0}},type:"object",properties:{id:{type:"string",format:"uri"},$schema:{type:"string",format:"uri"},title:{type:"string"},description:{type:"string"},default:{},multipleOf:{type:"number",minimum:0,exclusiveMinimum:!0},maximum:{type:"number"},exclusiveMaximum:{type:"boolean",default:!1},minimum:{type:"number"},exclusiveMinimum:{type:"boolean",default:!1},maxLength:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minLength:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},pattern:{type:"string",format:"regex"},additionalItems:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:{}},maxItems:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minItems:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},uniqueItems:{type:"boolean",default:!1},maxProperties:{allOf:[{$ref:"#/definitions/positiveInteger"}]},minProperties:{allOf:[{$ref:"#/definitions/positiveIntegerDefault0"}]},required:{allOf:[{$ref:"#/definitions/stringArray"}]},additionalProperties:{anyOf:[{type:"boolean"},{$ref:"#"}],default:{}},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},enum:{type:"array",minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{anyOf:[{type:"string",enum:["date-time","uri","email","hostname","ipv4","ipv6","regex"]},{type:"string"}]},allOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},anyOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},oneOf:{allOf:[{$ref:"#/definitions/schemaArray"}]},not:{allOf:[{$ref:"#"}]}},dependencies:{exclusiveMaximum:["maximum"],exclusiveMinimum:["minimum"]},default:{}},"http://json-schema.org/draft-07/schema#":{title:ot("schema.json","Describes a JSON file using a schema. See json-schema.org for more info."),definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0}}},vCe={id:ot("schema.json.id","A unique identifier for the schema."),$schema:ot("schema.json.$schema","The schema to verify this document against."),title:ot("schema.json.title","A descriptive title of the element."),description:ot("schema.json.description","A long description of the element. Used in hover menus and suggestions."),default:ot("schema.json.default","A default value. Used by suggestions."),multipleOf:ot("schema.json.multipleOf","A number that should cleanly divide the current value (i.e. have no remainder)."),maximum:ot("schema.json.maximum","The maximum numerical value, inclusive by default."),exclusiveMaximum:ot("schema.json.exclusiveMaximum","Makes the maximum property exclusive."),minimum:ot("schema.json.minimum","The minimum numerical value, inclusive by default."),exclusiveMinimum:ot("schema.json.exclusiveMininum","Makes the minimum property exclusive."),maxLength:ot("schema.json.maxLength","The maximum length of a string."),minLength:ot("schema.json.minLength","The minimum length of a string."),pattern:ot("schema.json.pattern","A regular expression to match the string against. It is not implicitly anchored."),additionalItems:ot("schema.json.additionalItems","For arrays, only when items is set as an array. If it is a schema, then this schema validates items after the ones specified by the items array. If it is false, then additional items will cause validation to fail."),items:ot("schema.json.items","For arrays. Can either be a schema to validate every element against or an array of schemas to validate each item against in order (the first schema will validate the first element, the second schema will validate the second element, and so on."),maxItems:ot("schema.json.maxItems","The maximum number of items that can be inside an array. Inclusive."),minItems:ot("schema.json.minItems","The minimum number of items that can be inside an array. Inclusive."),uniqueItems:ot("schema.json.uniqueItems","If all of the items in the array must be unique. Defaults to false."),maxProperties:ot("schema.json.maxProperties","The maximum number of properties an object can have. Inclusive."),minProperties:ot("schema.json.minProperties","The minimum number of properties an object can have. Inclusive."),required:ot("schema.json.required","An array of strings that lists the names of all properties required on this object."),additionalProperties:ot("schema.json.additionalProperties","Either a schema or a boolean. If a schema, then used to validate all properties not matched by 'properties' or 'patternProperties'. If false, then any properties not matched by either will cause this schema to fail."),definitions:ot("schema.json.definitions","Not used for validation. Place subschemas here that you wish to reference inline with $ref."),properties:ot("schema.json.properties","A map of property names to schemas for each property."),patternProperties:ot("schema.json.patternProperties","A map of regular expressions on property names to schemas for matching properties."),dependencies:ot("schema.json.dependencies","A map of property names to either an array of property names or a schema. An array of property names means the property named in the key depends on the properties in the array being present in the object in order to be valid. If the value is a schema, then the schema is only applied to the object if the property in the key exists on the object."),enum:ot("schema.json.enum","The set of literal values that are valid."),type:ot("schema.json.type","Either a string of one of the basic schema types (number, integer, null, array, object, boolean, string) or an array of strings specifying a subset of those types."),format:ot("schema.json.format","Describes the format expected for the value."),allOf:ot("schema.json.allOf","An array of schemas, all of which must match."),anyOf:ot("schema.json.anyOf","An array of schemas, where at least one must match."),oneOf:ot("schema.json.oneOf","An array of schemas, exactly one of which must match."),not:ot("schema.json.not","A schema which must not match."),$id:ot("schema.json.$id","A unique identifier for the schema."),$ref:ot("schema.json.$ref","Reference a definition hosted on any location."),$comment:ot("schema.json.$comment","Comments from schema authors to readers or maintainers of the schema."),readOnly:ot("schema.json.readOnly","Indicates that the value of the instance is managed exclusively by the owning authority."),examples:ot("schema.json.examples","Sample JSON values associated with a particular schema, for the purpose of illustrating usage."),contains:ot("schema.json.contains",'An array instance is valid against "contains" if at least one of its elements is valid against the given schema.'),propertyNames:ot("schema.json.propertyNames","If the instance is an object, this keyword validates if every property name in the instance validates against the provided schema."),const:ot("schema.json.const","An instance validates successfully against this keyword if its value is equal to the value of the keyword."),contentMediaType:ot("schema.json.contentMediaType","Describes the media type of a string property."),contentEncoding:ot("schema.json.contentEncoding","Describes the content encoding of a string property."),if:ot("schema.json.if",'The validation outcome of the "if" subschema controls which of the "then" or "else" keywords are evaluated.'),then:ot("schema.json.then",'The "if" subschema is used for validation when the "if" subschema succeeds.'),else:ot("schema.json.else",'The "else" subschema is used for validation when the "if" subschema fails.')};for(var CCe in M6.schemas){var xR=M6.schemas[CCe];for(var vb in xR.properties){var kR=xR.properties[vb];typeof kR=="boolean"&&(kR=xR.properties[vb]={});var P6=vCe[vb];P6?kR.description=P6:console.log(vb+": localize('schema.json."+vb+`', "")`)}}var wCe=function(){function r(e,t,i){var n=this;this._languageId=e,this._worker=t,this._disposables=[],this._listener=Object.create(null);var s=function(a){var l=a.getModeId();if(l===n._languageId){var c;n._listener[a.uri.toString()]=a.onDidChangeContent(function(){clearTimeout(c),c=setTimeout(function(){return n._doValidate(a.uri,l)},500)}),n._doValidate(a.uri,l)}},o=function(a){At.setModelMarkers(a,n._languageId,[]);var l=a.uri.toString(),c=n._listener[l];c&&(c.dispose(),delete n._listener[l])};this._disposables.push(At.onDidCreateModel(s)),this._disposables.push(At.onWillDisposeModel(function(a){o(a),n._resetSchema(a.uri)})),this._disposables.push(At.onDidChangeModelLanguage(function(a){o(a.model),s(a.model),n._resetSchema(a.model.uri)})),this._disposables.push(i.onDidChange(function(a){At.getModels().forEach(function(l){l.getModeId()===n._languageId&&(o(l),s(l))})})),this._disposables.push({dispose:function(){At.getModels().forEach(o);for(var a in n._listener)n._listener[a].dispose()}}),At.getModels().forEach(s)}return r.prototype.dispose=function(){this._disposables.forEach(function(e){return e&&e.dispose()}),this._disposables=[]},r.prototype._resetSchema=function(e){this._worker().then(function(t){t.resetSchema(e.toString())})},r.prototype._doValidate=function(e,t){this._worker(e).then(function(i){return i.doValidation(e.toString()).then(function(n){var s=n.map(function(a){return SCe(e,a)}),o=At.getModel(e);o&&o.getModeId()===t&&At.setModelMarkers(o,t,s)})}).then(void 0,function(i){console.error(i)})},r}();function yCe(r){switch(r){case Wg.Error:return nr.Error;case Wg.Warning:return nr.Warning;case Wg.Information:return nr.Info;case Wg.Hint:return nr.Hint;default:return nr.Info}}function SCe(r,e){var t=typeof e.code=="number"?String(e.code):e.code;return{severity:yCe(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message,code:t,source:e.source}}function DR(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function O6(r){if(!!r)return{start:{line:r.startLineNumber-1,character:r.startColumn-1},end:{line:r.endLineNumber-1,character:r.endColumn-1}}}function xl(r){if(!!r)return new dl(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function LCe(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function xCe(r){var e=pe.CompletionItemKind;switch(r){case hn.Text:return e.Text;case hn.Method:return e.Method;case hn.Function:return e.Function;case hn.Constructor:return e.Constructor;case hn.Field:return e.Field;case hn.Variable:return e.Variable;case hn.Class:return e.Class;case hn.Interface:return e.Interface;case hn.Module:return e.Module;case hn.Property:return e.Property;case hn.Unit:return e.Unit;case hn.Value:return e.Value;case hn.Enum:return e.Enum;case hn.Keyword:return e.Keyword;case hn.Snippet:return e.Snippet;case hn.Color:return e.Color;case hn.File:return e.File;case hn.Reference:return e.Reference}return e.Property}function Cb(r){if(!!r)return{range:xl(r.range),text:r.newText}}function kCe(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var DCe=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return[" ",":",'"']},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),DR(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new dl(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(h){var u={label:h.label,insertText:h.insertText||h.label,sortText:h.sortText,filterText:h.filterText,documentation:h.documentation,detail:h.detail,command:kCe(h.command),range:l,kind:xCe(h.kind)};return h.textEdit&&(LCe(h.textEdit)?u.range={insert:xl(h.textEdit.insert),replace:xl(h.textEdit.replace)}:u.range=xl(h.textEdit.range),u.insertText=h.textEdit.newText),h.additionalTextEdits&&(u.additionalTextEdits=h.additionalTextEdits.map(Cb)),h.insertTextFormat===yR.Snippet&&(u.insertTextRules=pe.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function ECe(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function F6(r){return typeof r=="string"?{value:r}:ECe(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` -`+r.value+"\n```\n"}}function ICe(r){if(!!r)return Array.isArray(r)?r.map(F6):[F6(r)]}var NCe=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),DR(t))}).then(function(s){if(!!s)return{range:xl(s.range),contents:ICe(s.contents)}})},r}();function TCe(r){var e=pe.SymbolKind;switch(r){case un.File:return e.Array;case un.Module:return e.Module;case un.Namespace:return e.Namespace;case un.Package:return e.Package;case un.Class:return e.Class;case un.Method:return e.Method;case un.Property:return e.Property;case un.Field:return e.Field;case un.Constructor:return e.Constructor;case un.Enum:return e.Enum;case un.Interface:return e.Interface;case un.Function:return e.Function;case un.Variable:return e.Variable;case un.Constant:return e.Constant;case un.String:return e.String;case un.Number:return e.Number;case un.Boolean:return e.Boolean;case un.Array:return e.Array}return e.Function}var ACe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:TCe(s.kind),range:xl(s.location.range),selectionRange:xl(s.location.range),tags:[]}})})},r}();function B6(r){return{tabSize:r.tabSize,insertSpaces:r.insertSpaces}}var RCe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentFormattingEdits=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.format(n.toString(),null,B6(t)).then(function(o){if(!(!o||o.length===0))return o.map(Cb)})})},r}(),MCe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentRangeFormattingEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.format(s.toString(),O6(t),B6(i)).then(function(a){if(!(!a||a.length===0))return a.map(Cb)})})},r}(),PCe=function(){function r(e){this._worker=e}return r.prototype.provideDocumentColors=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentColors(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{color:s.color,range:xl(s.range)}})})},r.prototype.provideColorPresentations=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getColorPresentations(n.toString(),t.color,O6(t.range))}).then(function(s){if(!!s)return s.map(function(o){var a={label:o.label};return o.textEdit&&(a.textEdit=Cb(o.textEdit)),o.additionalTextEdits&&(a.additionalTextEdits=o.additionalTextEdits.map(Cb)),a})})},r}(),OCe=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=FCe(o.kind)),a})})},r}();function FCe(r){switch(r){case fb.Comment:return pe.FoldingRangeKind.Comment;case fb.Imports:return pe.FoldingRangeKind.Imports;case fb.Region:return pe.FoldingRangeKind.Region}}var BCe=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(DR))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:xl(o.range)}),o=o.parent;return a})})},r}();function WCe(r){return{getInitialState:function(){return new H6(null,null,!1,null)},tokenize:function(e,t,i,n){return ZCe(r,e,t,i)}}}var W6="delimiter.bracket.json",V6="delimiter.array.json",VCe="delimiter.colon.json",HCe="delimiter.comma.json",zCe="keyword.json",$Ce="keyword.json",UCe="string.value.json",jCe="number.json",KCe="string.key.json",qCe="comment.block.json",GCe="comment.line.json",wb=function(){function r(e,t){this.parent=e,this.type=t}return r.pop=function(e){return e?e.parent:null},r.push=function(e,t){return new r(e,t)},r.equals=function(e,t){if(!e&&!t)return!0;if(!e||!t)return!1;for(;e&&t;){if(e===t)return!0;if(e.type!==t.type)return!1;e=e.parent,t=t.parent}return!0},r}(),H6=function(){function r(e,t,i,n){this._state=e,this.scanError=t,this.lastWasColon=i,this.parents=n}return r.prototype.clone=function(){return new r(this._state,this.scanError,this.lastWasColon,this.parents)},r.prototype.equals=function(e){return e===this?!0:!e||!(e instanceof r)?!1:this.scanError===e.scanError&&this.lastWasColon===e.lastWasColon&&wb.equals(this.parents,e.parents)},r.prototype.getStateData=function(){return this._state},r.prototype.setStateData=function(e){this._state=e},r}();function ZCe(r,e,t,i,n){i===void 0&&(i=0);var s=0,o=!1;switch(t.scanError){case 2:e='"'+e,s=1;break;case 1:e="/*"+e,s=2;break}for(var a=eCe(e),l=t.lastWasColon,c=t.parents,h={tokens:[],endState:t.clone()};;){var u=i+a.getPosition(),d="",f=a.scan();if(f===17)break;if(u===i+a.getPosition())throw new Error("Scanner did not advance, next 3 characters are: "+e.substr(a.getPosition(),3));switch(o&&(u-=s),o=s>0,f){case 1:c=wb.push(c,0),d=W6,l=!1;break;case 2:c=wb.pop(c),d=W6,l=!1;break;case 3:c=wb.push(c,1),d=V6,l=!1;break;case 4:c=wb.pop(c),d=V6,l=!1;break;case 6:d=VCe,l=!0;break;case 5:d=HCe,l=!1;break;case 8:case 9:d=zCe,l=!1;break;case 7:d=$Ce,l=!1;break;case 10:var g=c?c.type:0,p=g===1;d=l||p?UCe:KCe,l=!1;break;case 11:d=jCe,l=!1;break}if(r)switch(f){case 12:d=GCe;break;case 13:d=qCe;break}h.endState=new H6(t.getStateData(),a.getTokenError(),l,c),h.tokens.push({startIndex:u,scopes:d})}return h}function YCe(r){var e=[],t=[],i=new Xve(r);e.push(i);var n=function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return i.getLanguageServiceWorker.apply(i,a)};function s(){var a=r.languageId,l=r.modeConfiguration;$6(t),l.documentFormattingEdits&&t.push(pe.registerDocumentFormattingEditProvider(a,new RCe(n))),l.documentRangeFormattingEdits&&t.push(pe.registerDocumentRangeFormattingEditProvider(a,new MCe(n))),l.completionItems&&t.push(pe.registerCompletionItemProvider(a,new DCe(n))),l.hovers&&t.push(pe.registerHoverProvider(a,new NCe(n))),l.documentSymbols&&t.push(pe.registerDocumentSymbolProvider(a,new ACe(n))),l.tokens&&t.push(pe.setTokensProvider(a,WCe(!0))),l.colors&&t.push(pe.registerColorProvider(a,new PCe(n))),l.foldingRanges&&t.push(pe.registerFoldingRangeProvider(a,new OCe(n))),l.diagnostics&&t.push(new wCe(a,n,r)),l.selectionRanges&&t.push(pe.registerSelectionRangeProvider(a,new BCe(n)))}s(),e.push(pe.setLanguageConfiguration(r.languageId,XCe));var o=r.modeConfiguration;return r.onDidChange(function(a){a.modeConfiguration!==o&&(o=a.modeConfiguration,s())}),e.push(z6(t)),z6(e)}function z6(r){return{dispose:function(){return $6(r)}}}function $6(r){for(;r.length;)r.pop().dispose()}var XCe={wordPattern:/(-?\d*\.\d\w*)|([^\[\{\]\}\:\"\,\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string"]},{open:"[",close:"]",notIn:["string"]},{open:'"',close:'"',notIn:["string"]}]},QCe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",setupMode:YCe}),JCe=2*60*1e3,U6=function(){function r(e){var t=this;this._defaults=e,this._worker=null,this._idleCheckInterval=setInterval(function(){return t._checkIfIdle()},30*1e3),this._lastUsedTime=0,this._configChangeListener=this._defaults.onDidChange(function(){return t._stopWorker()})}return r.prototype._stopWorker=function(){this._worker&&(this._worker.dispose(),this._worker=null),this._client=null},r.prototype.dispose=function(){clearInterval(this._idleCheckInterval),this._configChangeListener.dispose(),this._stopWorker()},r.prototype._checkIfIdle=function(){if(!!this._worker){var e=Date.now()-this._lastUsedTime;e>JCe&&this._stopWorker()}},r.prototype._getClient=function(){return this._lastUsedTime=Date.now(),this._client||(this._worker=At.createWebWorker({moduleId:"vs/language/html/htmlWorker",createData:{languageSettings:this._defaults.options,languageId:this._defaults.languageId},label:this._defaults.languageId}),this._client=this._worker.getProxy()),this._client},r.prototype.getLanguageServiceWorker=function(){for(var e=this,t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var n;return this._getClient().then(function(s){n=s}).then(function(s){if(e._worker)return e._worker.withSyncedResources(t)}).then(function(s){return n})},r}(),j6;(function(r){r.MIN_VALUE=-2147483648,r.MAX_VALUE=2147483647})(j6||(j6={}));var $1;(function(r){r.MIN_VALUE=0,r.MAX_VALUE=2147483647})($1||($1={}));var Da;(function(r){function e(i,n){return i===Number.MAX_VALUE&&(i=$1.MAX_VALUE),n===Number.MAX_VALUE&&(n=$1.MAX_VALUE),{line:i,character:n}}r.create=e;function t(i){var n=i;return ue.objectLiteral(n)&&ue.uinteger(n.line)&&ue.uinteger(n.character)}r.is=t})(Da||(Da={}));var qn;(function(r){function e(i,n,s,o){if(ue.uinteger(i)&&ue.uinteger(n)&&ue.uinteger(s)&&ue.uinteger(o))return{start:Da.create(i,n),end:Da.create(s,o)};if(Da.is(i)&&Da.is(n))return{start:i,end:n};throw new Error("Range#create called with invalid arguments["+i+", "+n+", "+s+", "+o+"]")}r.create=e;function t(i){var n=i;return ue.objectLiteral(n)&&Da.is(n.start)&&Da.is(n.end)}r.is=t})(qn||(qn={}));var ER;(function(r){function e(i,n){return{uri:i,range:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&qn.is(n.range)&&(ue.string(n.uri)||ue.undefined(n.uri))}r.is=t})(ER||(ER={}));var K6;(function(r){function e(i,n,s,o){return{targetUri:i,targetRange:n,targetSelectionRange:s,originSelectionRange:o}}r.create=e;function t(i){var n=i;return ue.defined(n)&&qn.is(n.targetRange)&&ue.string(n.targetUri)&&(qn.is(n.targetSelectionRange)||ue.undefined(n.targetSelectionRange))&&(qn.is(n.originSelectionRange)||ue.undefined(n.originSelectionRange))}r.is=t})(K6||(K6={}));var IR;(function(r){function e(i,n,s,o){return{red:i,green:n,blue:s,alpha:o}}r.create=e;function t(i){var n=i;return ue.numberRange(n.red,0,1)&&ue.numberRange(n.green,0,1)&&ue.numberRange(n.blue,0,1)&&ue.numberRange(n.alpha,0,1)}r.is=t})(IR||(IR={}));var q6;(function(r){function e(i,n){return{range:i,color:n}}r.create=e;function t(i){var n=i;return qn.is(n.range)&&IR.is(n.color)}r.is=t})(q6||(q6={}));var G6;(function(r){function e(i,n,s){return{label:i,textEdit:n,additionalTextEdits:s}}r.create=e;function t(i){var n=i;return ue.string(n.label)&&(ue.undefined(n.textEdit)||Jc.is(n))&&(ue.undefined(n.additionalTextEdits)||ue.typedArray(n.additionalTextEdits,Jc.is))}r.is=t})(G6||(G6={}));var yb;(function(r){r.Comment="comment",r.Imports="imports",r.Region="region"})(yb||(yb={}));var Z6;(function(r){function e(i,n,s,o,a){var l={startLine:i,endLine:n};return ue.defined(s)&&(l.startCharacter=s),ue.defined(o)&&(l.endCharacter=o),ue.defined(a)&&(l.kind=a),l}r.create=e;function t(i){var n=i;return ue.uinteger(n.startLine)&&ue.uinteger(n.startLine)&&(ue.undefined(n.startCharacter)||ue.uinteger(n.startCharacter))&&(ue.undefined(n.endCharacter)||ue.uinteger(n.endCharacter))&&(ue.undefined(n.kind)||ue.string(n.kind))}r.is=t})(Z6||(Z6={}));var NR;(function(r){function e(i,n){return{location:i,message:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ER.is(n.location)&&ue.string(n.message)}r.is=t})(NR||(NR={}));var Y6;(function(r){r.Error=1,r.Warning=2,r.Information=3,r.Hint=4})(Y6||(Y6={}));var X6;(function(r){r.Unnecessary=1,r.Deprecated=2})(X6||(X6={}));var Q6;(function(r){function e(t){var i=t;return i!=null&&ue.string(i.href)}r.is=e})(Q6||(Q6={}));var U1;(function(r){function e(i,n,s,o,a,l){var c={range:i,message:n};return ue.defined(s)&&(c.severity=s),ue.defined(o)&&(c.code=o),ue.defined(a)&&(c.source=a),ue.defined(l)&&(c.relatedInformation=l),c}r.create=e;function t(i){var n,s=i;return ue.defined(s)&&qn.is(s.range)&&ue.string(s.message)&&(ue.number(s.severity)||ue.undefined(s.severity))&&(ue.integer(s.code)||ue.string(s.code)||ue.undefined(s.code))&&(ue.undefined(s.codeDescription)||ue.string((n=s.codeDescription)===null||n===void 0?void 0:n.href))&&(ue.string(s.source)||ue.undefined(s.source))&&(ue.undefined(s.relatedInformation)||ue.typedArray(s.relatedInformation,NR.is))}r.is=t})(U1||(U1={}));var Sb;(function(r){function e(i,n){for(var s=[],o=2;o<arguments.length;o++)s[o-2]=arguments[o];var a={title:i,command:n};return ue.defined(s)&&s.length>0&&(a.arguments=s),a}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.string(n.title)&&ue.string(n.command)}r.is=t})(Sb||(Sb={}));var Jc;(function(r){function e(s,o){return{range:s,newText:o}}r.replace=e;function t(s,o){return{range:{start:s,end:s},newText:o}}r.insert=t;function i(s){return{range:s,newText:""}}r.del=i;function n(s){var o=s;return ue.objectLiteral(o)&&ue.string(o.newText)&&qn.is(o.range)}r.is=n})(Jc||(Jc={}));var zg;(function(r){function e(i,n,s){var o={label:i};return n!==void 0&&(o.needsConfirmation=n),s!==void 0&&(o.description=s),o}r.create=e;function t(i){var n=i;return n!==void 0&&ue.objectLiteral(n)&&ue.string(n.label)&&(ue.boolean(n.needsConfirmation)||n.needsConfirmation===void 0)&&(ue.string(n.description)||n.description===void 0)}r.is=t})(zg||(zg={}));var ar;(function(r){function e(t){var i=t;return typeof i=="string"}r.is=e})(ar||(ar={}));var eh;(function(r){function e(s,o,a){return{range:s,newText:o,annotationId:a}}r.replace=e;function t(s,o,a){return{range:{start:s,end:s},newText:o,annotationId:a}}r.insert=t;function i(s,o){return{range:s,newText:"",annotationId:o}}r.del=i;function n(s){var o=s;return Jc.is(o)&&(zg.is(o.annotationId)||ar.is(o.annotationId))}r.is=n})(eh||(eh={}));var j1;(function(r){function e(i,n){return{textDocument:i,edits:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&q1.is(n.textDocument)&&Array.isArray(n.edits)}r.is=t})(j1||(j1={}));var Lb;(function(r){function e(i,n,s){var o={kind:"create",uri:i};return n!==void 0&&(n.overwrite!==void 0||n.ignoreIfExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="create"&&ue.string(n.uri)&&(n.options===void 0||(n.options.overwrite===void 0||ue.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ue.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||ar.is(n.annotationId))}r.is=t})(Lb||(Lb={}));var xb;(function(r){function e(i,n,s,o){var a={kind:"rename",oldUri:i,newUri:n};return s!==void 0&&(s.overwrite!==void 0||s.ignoreIfExists!==void 0)&&(a.options=s),o!==void 0&&(a.annotationId=o),a}r.create=e;function t(i){var n=i;return n&&n.kind==="rename"&&ue.string(n.oldUri)&&ue.string(n.newUri)&&(n.options===void 0||(n.options.overwrite===void 0||ue.boolean(n.options.overwrite))&&(n.options.ignoreIfExists===void 0||ue.boolean(n.options.ignoreIfExists)))&&(n.annotationId===void 0||ar.is(n.annotationId))}r.is=t})(xb||(xb={}));var kb;(function(r){function e(i,n,s){var o={kind:"delete",uri:i};return n!==void 0&&(n.recursive!==void 0||n.ignoreIfNotExists!==void 0)&&(o.options=n),s!==void 0&&(o.annotationId=s),o}r.create=e;function t(i){var n=i;return n&&n.kind==="delete"&&ue.string(n.uri)&&(n.options===void 0||(n.options.recursive===void 0||ue.boolean(n.options.recursive))&&(n.options.ignoreIfNotExists===void 0||ue.boolean(n.options.ignoreIfNotExists)))&&(n.annotationId===void 0||ar.is(n.annotationId))}r.is=t})(kb||(kb={}));var TR;(function(r){function e(t){var i=t;return i&&(i.changes!==void 0||i.documentChanges!==void 0)&&(i.documentChanges===void 0||i.documentChanges.every(function(n){return ue.string(n.kind)?Lb.is(n)||xb.is(n)||kb.is(n):j1.is(n)}))}r.is=e})(TR||(TR={}));var K1=function(){function r(e,t){this.edits=e,this.changeAnnotations=t}return r.prototype.insert=function(e,t,i){var n,s;if(i===void 0?n=Jc.insert(e,t):ar.is(i)?(s=i,n=eh.insert(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=eh.insert(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.replace=function(e,t,i){var n,s;if(i===void 0?n=Jc.replace(e,t):ar.is(i)?(s=i,n=eh.replace(e,t,i)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(i),n=eh.replace(e,t,s)),this.edits.push(n),s!==void 0)return s},r.prototype.delete=function(e,t){var i,n;if(t===void 0?i=Jc.del(e):ar.is(t)?(n=t,i=eh.del(e,t)):(this.assertChangeAnnotations(this.changeAnnotations),n=this.changeAnnotations.manage(t),i=eh.del(e,n)),this.edits.push(i),n!==void 0)return n},r.prototype.add=function(e){this.edits.push(e)},r.prototype.all=function(){return this.edits},r.prototype.clear=function(){this.edits.splice(0,this.edits.length)},r.prototype.assertChangeAnnotations=function(e){if(e===void 0)throw new Error("Text edit change is not configured to manage change annotations.")},r}(),J6=function(){function r(e){this._annotations=e===void 0?Object.create(null):e,this._counter=0,this._size=0}return r.prototype.all=function(){return this._annotations},Object.defineProperty(r.prototype,"size",{get:function(){return this._size},enumerable:!1,configurable:!0}),r.prototype.manage=function(e,t){var i;if(ar.is(e)?i=e:(i=this.nextId(),t=e),this._annotations[i]!==void 0)throw new Error("Id "+i+" is already in use.");if(t===void 0)throw new Error("No annotation provided for id "+i);return this._annotations[i]=t,this._size++,i},r.prototype.nextId=function(){return this._counter++,this._counter.toString()},r}();(function(){function r(e){var t=this;this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new J6(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(function(i){if(j1.is(i)){var n=new K1(i.edits,t._changeAnnotations);t._textEditChanges[i.textDocument.uri]=n}})):e.changes&&Object.keys(e.changes).forEach(function(i){var n=new K1(e.changes[i]);t._textEditChanges[i]=n})):this._workspaceEdit={}}return Object.defineProperty(r.prototype,"edit",{get:function(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit},enumerable:!1,configurable:!0}),r.prototype.getTextEditChange=function(e){if(q1.is(e)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var t={uri:e.uri,version:e.version},i=this._textEditChanges[t.uri];if(!i){var n=[],s={textDocument:t,edits:n};this._workspaceEdit.documentChanges.push(s),i=new K1(n,this._changeAnnotations),this._textEditChanges[t.uri]=i}return i}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");var i=this._textEditChanges[e];if(!i){var n=[];this._workspaceEdit.changes[e]=n,i=new K1(n),this._textEditChanges[e]=i}return i}},r.prototype.initDocumentChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new J6,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())},r.prototype.initChanges=function(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))},r.prototype.createFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;zg.is(t)||ar.is(t)?n=t:i=t;var s,o;if(n===void 0?s=Lb.create(e,i):(o=ar.is(n)?n:this._changeAnnotations.manage(n),s=Lb.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r.prototype.renameFile=function(e,t,i,n){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var s;zg.is(i)||ar.is(i)?s=i:n=i;var o,a;if(s===void 0?o=xb.create(e,t,n):(a=ar.is(s)?s:this._changeAnnotations.manage(s),o=xb.create(e,t,n,a)),this._workspaceEdit.documentChanges.push(o),a!==void 0)return a},r.prototype.deleteFile=function(e,t,i){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");var n;zg.is(t)||ar.is(t)?n=t:i=t;var s,o;if(n===void 0?s=kb.create(e,i):(o=ar.is(n)?n:this._changeAnnotations.manage(n),s=kb.create(e,i,o)),this._workspaceEdit.documentChanges.push(s),o!==void 0)return o},r})();var eH;(function(r){function e(i){return{uri:i}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.string(n.uri)}r.is=t})(eH||(eH={}));var tH;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.string(n.uri)&&ue.integer(n.version)}r.is=t})(tH||(tH={}));var q1;(function(r){function e(i,n){return{uri:i,version:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.string(n.uri)&&(n.version===null||ue.integer(n.version))}r.is=t})(q1||(q1={}));var iH;(function(r){function e(i,n,s,o){return{uri:i,languageId:n,version:s,text:o}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.string(n.uri)&&ue.string(n.languageId)&&ue.integer(n.version)&&ue.string(n.text)}r.is=t})(iH||(iH={}));var kl;(function(r){r.PlainText="plaintext",r.Markdown="markdown"})(kl||(kl={}));(function(r){function e(t){var i=t;return i===r.PlainText||i===r.Markdown}r.is=e})(kl||(kl={}));var AR;(function(r){function e(t){var i=t;return ue.objectLiteral(t)&&kl.is(i.kind)&&ue.string(i.value)}r.is=e})(AR||(AR={}));var dn;(function(r){r.Text=1,r.Method=2,r.Function=3,r.Constructor=4,r.Field=5,r.Variable=6,r.Class=7,r.Interface=8,r.Module=9,r.Property=10,r.Unit=11,r.Value=12,r.Enum=13,r.Keyword=14,r.Snippet=15,r.Color=16,r.File=17,r.Reference=18,r.Folder=19,r.EnumMember=20,r.Constant=21,r.Struct=22,r.Event=23,r.Operator=24,r.TypeParameter=25})(dn||(dn={}));var RR;(function(r){r.PlainText=1,r.Snippet=2})(RR||(RR={}));var nH;(function(r){r.Deprecated=1})(nH||(nH={}));var rH;(function(r){function e(i,n,s){return{newText:i,insert:n,replace:s}}r.create=e;function t(i){var n=i;return n&&ue.string(n.newText)&&qn.is(n.insert)&&qn.is(n.replace)}r.is=t})(rH||(rH={}));var sH;(function(r){r.asIs=1,r.adjustIndentation=2})(sH||(sH={}));var oH;(function(r){function e(t){return{label:t}}r.create=e})(oH||(oH={}));var aH;(function(r){function e(t,i){return{items:t||[],isIncomplete:!!i}}r.create=e})(aH||(aH={}));var G1;(function(r){function e(i){return i.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}r.fromPlainText=e;function t(i){var n=i;return ue.string(n)||ue.objectLiteral(n)&&ue.string(n.language)&&ue.string(n.value)}r.is=t})(G1||(G1={}));var lH;(function(r){function e(t){var i=t;return!!i&&ue.objectLiteral(i)&&(AR.is(i.contents)||G1.is(i.contents)||ue.typedArray(i.contents,G1.is))&&(t.range===void 0||qn.is(t.range))}r.is=e})(lH||(lH={}));var cH;(function(r){function e(t,i){return i?{label:t,documentation:i}:{label:t}}r.create=e})(cH||(cH={}));var hH;(function(r){function e(t,i){for(var n=[],s=2;s<arguments.length;s++)n[s-2]=arguments[s];var o={label:t};return ue.defined(i)&&(o.documentation=i),ue.defined(n)?o.parameters=n:o.parameters=[],o}r.create=e})(hH||(hH={}));var Db;(function(r){r.Text=1,r.Read=2,r.Write=3})(Db||(Db={}));var uH;(function(r){function e(t,i){var n={range:t};return ue.number(i)&&(n.kind=i),n}r.create=e})(uH||(uH={}));var fn;(function(r){r.File=1,r.Module=2,r.Namespace=3,r.Package=4,r.Class=5,r.Method=6,r.Property=7,r.Field=8,r.Constructor=9,r.Enum=10,r.Interface=11,r.Function=12,r.Variable=13,r.Constant=14,r.String=15,r.Number=16,r.Boolean=17,r.Array=18,r.Object=19,r.Key=20,r.Null=21,r.EnumMember=22,r.Struct=23,r.Event=24,r.Operator=25,r.TypeParameter=26})(fn||(fn={}));var dH;(function(r){r.Deprecated=1})(dH||(dH={}));var fH;(function(r){function e(t,i,n,s,o){var a={name:t,kind:i,location:{uri:s,range:n}};return o&&(a.containerName=o),a}r.create=e})(fH||(fH={}));var gH;(function(r){function e(i,n,s,o,a,l){var c={name:i,detail:n,kind:s,range:o,selectionRange:a};return l!==void 0&&(c.children=l),c}r.create=e;function t(i){var n=i;return n&&ue.string(n.name)&&ue.number(n.kind)&&qn.is(n.range)&&qn.is(n.selectionRange)&&(n.detail===void 0||ue.string(n.detail))&&(n.deprecated===void 0||ue.boolean(n.deprecated))&&(n.children===void 0||Array.isArray(n.children))&&(n.tags===void 0||Array.isArray(n.tags))}r.is=t})(gH||(gH={}));var pH;(function(r){r.Empty="",r.QuickFix="quickfix",r.Refactor="refactor",r.RefactorExtract="refactor.extract",r.RefactorInline="refactor.inline",r.RefactorRewrite="refactor.rewrite",r.Source="source",r.SourceOrganizeImports="source.organizeImports",r.SourceFixAll="source.fixAll"})(pH||(pH={}));var mH;(function(r){function e(i,n){var s={diagnostics:i};return n!=null&&(s.only=n),s}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.typedArray(n.diagnostics,U1.is)&&(n.only===void 0||ue.typedArray(n.only,ue.string))}r.is=t})(mH||(mH={}));var _H;(function(r){function e(i,n,s){var o={title:i},a=!0;return typeof n=="string"?(a=!1,o.kind=n):Sb.is(n)?o.command=n:o.edit=n,a&&s!==void 0&&(o.kind=s),o}r.create=e;function t(i){var n=i;return n&&ue.string(n.title)&&(n.diagnostics===void 0||ue.typedArray(n.diagnostics,U1.is))&&(n.kind===void 0||ue.string(n.kind))&&(n.edit!==void 0||n.command!==void 0)&&(n.command===void 0||Sb.is(n.command))&&(n.isPreferred===void 0||ue.boolean(n.isPreferred))&&(n.edit===void 0||TR.is(n.edit))}r.is=t})(_H||(_H={}));var bH;(function(r){function e(i,n){var s={range:i};return ue.defined(n)&&(s.data=n),s}r.create=e;function t(i){var n=i;return ue.defined(n)&&qn.is(n.range)&&(ue.undefined(n.command)||Sb.is(n.command))}r.is=t})(bH||(bH={}));var vH;(function(r){function e(i,n){return{tabSize:i,insertSpaces:n}}r.create=e;function t(i){var n=i;return ue.defined(n)&&ue.uinteger(n.tabSize)&&ue.boolean(n.insertSpaces)}r.is=t})(vH||(vH={}));var CH;(function(r){function e(i,n,s){return{range:i,target:n,data:s}}r.create=e;function t(i){var n=i;return ue.defined(n)&&qn.is(n.range)&&(ue.undefined(n.target)||ue.string(n.target))}r.is=t})(CH||(CH={}));var wH;(function(r){function e(i,n){return{range:i,parent:n}}r.create=e;function t(i){var n=i;return n!==void 0&&qn.is(n.range)&&(n.parent===void 0||r.is(n.parent))}r.is=t})(wH||(wH={}));var yH;(function(r){function e(s,o,a,l){return new ewe(s,o,a,l)}r.create=e;function t(s){var o=s;return!!(ue.defined(o)&&ue.string(o.uri)&&(ue.undefined(o.languageId)||ue.string(o.languageId))&&ue.uinteger(o.lineCount)&&ue.func(o.getText)&&ue.func(o.positionAt)&&ue.func(o.offsetAt))}r.is=t;function i(s,o){for(var a=s.getText(),l=n(o,function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),c=a.length,h=l.length-1;h>=0;h--){var u=l[h],d=s.offsetAt(u.range.start),f=s.offsetAt(u.range.end);if(f<=c)a=a.substring(0,d)+u.newText+a.substring(f,a.length);else throw new Error("Overlapping edit");c=d}return a}r.applyEdits=i;function n(s,o){if(s.length<=1)return s;var a=s.length/2|0,l=s.slice(0,a),c=s.slice(a);n(l,o),n(c,o);for(var h=0,u=0,d=0;h<l.length&&u<c.length;){var f=o(l[h],c[u]);f<=0?s[d++]=l[h++]:s[d++]=c[u++]}for(;h<l.length;)s[d++]=l[h++];for(;u<c.length;)s[d++]=c[u++];return s}})(yH||(yH={}));var ewe=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!1,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){this._content=e.text,this._version=t,this._lineOffsets=void 0},r.prototype.getLineOffsets=function(){if(this._lineOffsets===void 0){for(var e=[],t=this._content,i=!0,n=0;n<t.length;n++){i&&(e.push(n),i=!1);var s=t.charAt(n);i=s==="\r"||s===` -`,s==="\r"&&n+1<t.length&&t.charAt(n+1)===` -`&&n++}i&&t.length>0&&e.push(t.length),this._lineOffsets=e}return this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return Da.create(0,e);for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return Da.create(o,e-t[o])},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!1,configurable:!0}),r}(),ue;(function(r){var e=Object.prototype.toString;function t(f){return typeof f!="undefined"}r.defined=t;function i(f){return typeof f=="undefined"}r.undefined=i;function n(f){return f===!0||f===!1}r.boolean=n;function s(f){return e.call(f)==="[object String]"}r.string=s;function o(f){return e.call(f)==="[object Number]"}r.number=o;function a(f,g,p){return e.call(f)==="[object Number]"&&g<=f&&f<=p}r.numberRange=a;function l(f){return e.call(f)==="[object Number]"&&-2147483648<=f&&f<=2147483647}r.integer=l;function c(f){return e.call(f)==="[object Number]"&&0<=f&&f<=2147483647}r.uinteger=c;function h(f){return e.call(f)==="[object Function]"}r.func=h;function u(f){return f!==null&&typeof f=="object"}r.objectLiteral=u;function d(f,g){return Array.isArray(f)&&f.every(g)}r.typedArray=d})(ue||(ue={}));var SH=function(){function r(e,t,i,n){this._uri=e,this._languageId=t,this._version=i,this._content=n,this._lineOffsets=void 0}return Object.defineProperty(r.prototype,"uri",{get:function(){return this._uri},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"languageId",{get:function(){return this._languageId},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"version",{get:function(){return this._version},enumerable:!0,configurable:!0}),r.prototype.getText=function(e){if(e){var t=this.offsetAt(e.start),i=this.offsetAt(e.end);return this._content.substring(t,i)}return this._content},r.prototype.update=function(e,t){for(var i=0,n=e;i<n.length;i++){var s=n[i];if(r.isIncremental(s)){var o=kH(s.range),a=this.offsetAt(o.start),l=this.offsetAt(o.end);this._content=this._content.substring(0,a)+s.text+this._content.substring(l,this._content.length);var c=Math.max(o.start.line,0),h=Math.max(o.end.line,0),u=this._lineOffsets,d=xH(s.text,!1,a);if(h-c===d.length)for(var f=0,g=d.length;f<g;f++)u[f+c+1]=d[f];else d.length<1e4?u.splice.apply(u,[c+1,h-c].concat(d)):this._lineOffsets=u=u.slice(0,c+1).concat(d,u.slice(h+1));var p=s.text.length-(l-a);if(p!==0)for(var f=c+1+d.length,g=u.length;f<g;f++)u[f]=u[f]+p}else if(r.isFull(s))this._content=s.text,this._lineOffsets=void 0;else throw new Error("Unknown change event received")}this._version=t},r.prototype.getLineOffsets=function(){return this._lineOffsets===void 0&&(this._lineOffsets=xH(this._content,!0)),this._lineOffsets},r.prototype.positionAt=function(e){e=Math.max(Math.min(e,this._content.length),0);var t=this.getLineOffsets(),i=0,n=t.length;if(n===0)return{line:0,character:e};for(;i<n;){var s=Math.floor((i+n)/2);t[s]>e?n=s:i=s+1}var o=i-1;return{line:o,character:e-t[o]}},r.prototype.offsetAt=function(e){var t=this.getLineOffsets();if(e.line>=t.length)return this._content.length;if(e.line<0)return 0;var i=t[e.line],n=e.line+1<t.length?t[e.line+1]:this._content.length;return Math.max(Math.min(i+e.character,n),i)},Object.defineProperty(r.prototype,"lineCount",{get:function(){return this.getLineOffsets().length},enumerable:!0,configurable:!0}),r.isIncremental=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range!==void 0&&(t.rangeLength===void 0||typeof t.rangeLength=="number")},r.isFull=function(e){var t=e;return t!=null&&typeof t.text=="string"&&t.range===void 0&&t.rangeLength===void 0},r}(),LH;(function(r){function e(n,s,o,a){return new SH(n,s,o,a)}r.create=e;function t(n,s,o){if(n instanceof SH)return n.update(s,o),n;throw new Error("TextDocument.update: document must be created by TextDocument.create")}r.update=t;function i(n,s){for(var o=n.getText(),a=MR(s.map(twe),function(g,p){var _=g.range.start.line-p.range.start.line;return _===0?g.range.start.character-p.range.start.character:_}),l=0,c=[],h=0,u=a;h<u.length;h++){var d=u[h],f=n.offsetAt(d.range.start);if(f<l)throw new Error("Overlapping edit");f>l&&c.push(o.substring(l,f)),d.newText.length&&c.push(d.newText),l=n.offsetAt(d.range.end)}return c.push(o.substr(l)),c.join("")}r.applyEdits=i})(LH||(LH={}));function MR(r,e){if(r.length<=1)return r;var t=r.length/2|0,i=r.slice(0,t),n=r.slice(t);MR(i,e),MR(n,e);for(var s=0,o=0,a=0;s<i.length&&o<n.length;){var l=e(i[s],n[o]);l<=0?r[a++]=i[s++]:r[a++]=n[o++]}for(;s<i.length;)r[a++]=i[s++];for(;o<n.length;)r[a++]=n[o++];return r}function xH(r,e,t){t===void 0&&(t=0);for(var i=e?[t]:[],n=0;n<r.length;n++){var s=r.charCodeAt(n);(s===13||s===10)&&(s===13&&n+1<r.length&&r.charCodeAt(n+1)===10&&n++,i.push(t+n+1))}return i}function kH(r){var e=r.start,t=r.end;return e.line>t.line||e.line===t.line&&e.character>t.character?{start:t,end:e}:r}function twe(r){var e=kH(r.range);return e!==r.range?{newText:r.newText,range:e}:r}var DH;(function(r){r[r.StartCommentTag=0]="StartCommentTag",r[r.Comment=1]="Comment",r[r.EndCommentTag=2]="EndCommentTag",r[r.StartTagOpen=3]="StartTagOpen",r[r.StartTagClose=4]="StartTagClose",r[r.StartTagSelfClose=5]="StartTagSelfClose",r[r.StartTag=6]="StartTag",r[r.EndTagOpen=7]="EndTagOpen",r[r.EndTagClose=8]="EndTagClose",r[r.EndTag=9]="EndTag",r[r.DelimiterAssign=10]="DelimiterAssign",r[r.AttributeName=11]="AttributeName",r[r.AttributeValue=12]="AttributeValue",r[r.StartDoctypeTag=13]="StartDoctypeTag",r[r.Doctype=14]="Doctype",r[r.EndDoctypeTag=15]="EndDoctypeTag",r[r.Content=16]="Content",r[r.Whitespace=17]="Whitespace",r[r.Unknown=18]="Unknown",r[r.Script=19]="Script",r[r.Styles=20]="Styles",r[r.EOS=21]="EOS"})(DH||(DH={}));var EH;(function(r){r[r.WithinContent=0]="WithinContent",r[r.AfterOpeningStartTag=1]="AfterOpeningStartTag",r[r.AfterOpeningEndTag=2]="AfterOpeningEndTag",r[r.WithinDoctype=3]="WithinDoctype",r[r.WithinTag=4]="WithinTag",r[r.WithinEndTag=5]="WithinEndTag",r[r.WithinComment=6]="WithinComment",r[r.WithinScriptContent=7]="WithinScriptContent",r[r.WithinStyleContent=8]="WithinStyleContent",r[r.AfterAttributeName=9]="AfterAttributeName",r[r.BeforeAttributeValue=10]="BeforeAttributeValue"})(EH||(EH={}));var IH;(function(r){r.LATEST={textDocument:{completion:{completionItem:{documentationFormat:[kl.Markdown,kl.PlainText]}},hover:{contentFormat:[kl.Markdown,kl.PlainText]}}}})(IH||(IH={}));var NH;(function(r){r[r.Unknown=0]="Unknown",r[r.File=1]="File",r[r.Directory=2]="Directory",r[r.SymbolicLink=64]="SymbolicLink"})(NH||(NH={}));function TH(r,e){var t=0,i=r.length;if(i===0)return 0;for(;t<i;){var n=Math.floor((t+i)/2);e(r[n])?i=n:t=n+1}return t}(function(){function r(e,t,i,n){this.start=e,this.end=t,this.children=i,this.parent=n,this.closed=!1}return Object.defineProperty(r.prototype,"attributeNames",{get:function(){return this.attributes?Object.keys(this.attributes):[]},enumerable:!1,configurable:!0}),r.prototype.isSameTag=function(e){return this.tag===void 0?e===void 0:e!==void 0&&this.tag.length===e.length&&this.tag.toLowerCase()===e},Object.defineProperty(r.prototype,"firstChild",{get:function(){return this.children[0]},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"lastChild",{get:function(){return this.children.length?this.children[this.children.length-1]:void 0},enumerable:!1,configurable:!0}),r.prototype.findNodeBefore=function(e){var t=TH(this.children,function(s){return e<=s.start})-1;if(t>=0){var i=this.children[t];if(e>i.start){if(e<i.end)return i.findNodeBefore(e);var n=i.lastChild;return n&&n.end===i.end?i.findNodeBefore(e):i}}return this},r.prototype.findNodeAt=function(e){var t=TH(this.children,function(n){return e<=n.start})-1;if(t>=0){var i=this.children[t];if(e>i.start&&e<=i.end)return i.findNodeAt(e)}return this},r})();globalThis&&globalThis.__awaiter;globalThis&&globalThis.__generator;globalThis&&globalThis.__awaiter;globalThis&&globalThis.__generator;(function(){var r=[,,function(i){function n(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var a=new n(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},n.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},n.prototype.has_match=function(a){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(a))return!0;return!1},n.prototype.set_indent=function(a,l){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(a){this.__items.push(a);var l=a.lastIndexOf(` -`);l!==-1?this.__character_count=a.length-l:this.__character_count+=a.length},n.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},n.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},n.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},n.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},n.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function s(a,l){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),l=l||"",a.indent_level>0&&(l=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}s.prototype.get_indent_size=function(a,l){var c=this.__base_string_length;return l=l||0,a<0&&(c=0),c+=a*this.__indent_size,c+=l,c},s.prototype.get_indent_string=function(a,l){var c=this.__base_string;return l=l||0,a<0&&(a=0,c=""),l+=a*this.__indent_size,this.__ensure_cache(l),c+=this.__cache[l],c},s.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},s.prototype.__add_column=function(){var a=this.__cache.length,l=0,c="";this.__indent_size&&a>=this.__indent_size&&(l=Math.floor(a/this.__indent_size),a-=l*this.__indent_size,c=new Array(l+1).join(this.__indent_string)),a&&(c+=new Array(a+1).join(" ")),this.__cache.push(c)};function o(a,l){this.__indent_cache=new s(a,l),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new n(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(a,l){return this.__indent_cache.get_indent_string(a,l)},o.prototype.get_indent_size=function(a,l){return this.__indent_cache.get_indent_size(a,l)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(a){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` -`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` -`);return a!==` -`&&(c=c.replace(/[\n]/g,a)),c},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(a,l){return a=a||0,l=l||0,this.next_line.set_indent(a,l),this.__lines.length>1?(this.current_line.set_indent(a,l),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(a){for(var l=0;l<a.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(a){for(var l=this.__lines.length;a<l;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,l){for(var c=this.__lines.length-2;c>=0;){var h=this.__lines[c];if(h.is_empty())break;if(h.item(0).indexOf(a)!==0&&h.item(-1)!==l){this.__lines.splice(c+1,0,new n(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},i.exports.Output=o},,,,function(i){function n(a,l){this.raw_options=s(a,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}n.prototype._get_array=function(a,l){var c=this.raw_options[a],h=l||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(h=c.concat()):typeof c=="string"&&(h=c.split(/[^a-zA-Z0-9_\/\-]+/)),h},n.prototype._get_boolean=function(a,l){var c=this.raw_options[a],h=c===void 0?!!l:!!c;return h},n.prototype._get_characters=function(a,l){var c=this.raw_options[a],h=l||"";return typeof c=="string"&&(h=c.replace(/\\r/,"\r").replace(/\\n/,` -`).replace(/\\t/," ")),h},n.prototype._get_number=function(a,l){var c=this.raw_options[a];l=parseInt(l,10),isNaN(l)&&(l=0);var h=parseInt(c,10);return isNaN(h)&&(h=l),h},n.prototype._get_selection=function(a,l,c){var h=this._get_selection_list(a,l,c);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: -`+l+` -You passed in: '`+this.raw_options[a]+"'");return h[0]},n.prototype._get_selection_list=function(a,l,c){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[l[0]],!this._is_valid_selection(c,l))throw new Error("Invalid Default Value!");var h=this._get_array(a,c);if(!this._is_valid_selection(h,l))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: -`+l+` -You passed in: '`+this.raw_options[a]+"'");return h},n.prototype._is_valid_selection=function(a,l){return a.length&&l.length&&!a.some(function(c){return l.indexOf(c)===-1})};function s(a,l){var c={};a=o(a);var h;for(h in a)h!==l&&(c[h]=a[h]);if(l&&a[l])for(h in a[l])c[h]=a[l][h];return c}function o(a){var l={},c;for(c in a){var h=c.replace(/-/g,"_");l[h]=a[c]}return l}i.exports.Options=n,i.exports.normalizeOpts=o,i.exports.mergeOpts=s},,function(i){var n=RegExp.prototype.hasOwnProperty("sticky");function s(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}s.prototype.restart=function(){this.__position=0},s.prototype.back=function(){this.__position>0&&(this.__position-=1)},s.prototype.hasNext=function(){return this.__position<this.__input_length},s.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},s.prototype.peek=function(o){var a=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(a=this.__input.charAt(o)),a},s.prototype.__match=function(o,a){o.lastIndex=a;var l=o.exec(this.__input);return l&&!(n&&o.sticky)&&l.index!==a&&(l=null),l},s.prototype.test=function(o,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(o,a):!1},s.prototype.testChar=function(o,a){var l=this.peek(a);return o.lastIndex=0,l!==null&&o.test(l)},s.prototype.match=function(o){var a=this.__match(o,this.__position);return a?this.__position+=a[0].length:a=null,a},s.prototype.read=function(o,a,l){var c="",h;return o&&(h=this.match(o),h&&(c+=h[0])),a&&(h||!o)&&(c+=this.readUntil(a,l)),c},s.prototype.readUntil=function(o,a){var l="",c=this.__position;o.lastIndex=this.__position;var h=o.exec(this.__input);return h?(c=h.index,a&&(c+=h[0].length)):c=this.__input_length,l=this.__input.substring(this.__position,c),this.__position=c,l},s.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},s.prototype.get_regexp=function(o,a){var l=null,c="g";return a&&n&&(c="y"),typeof o=="string"&&o!==""?l=new RegExp(o,c):o&&(l=new RegExp(o.source,c)),l},s.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},s.prototype.peekUntilAfter=function(o){var a=this.__position,l=this.readUntilAfter(o);return this.__position=a,l},s.prototype.lookBack=function(o){var a=this.__position-1;return a>=o.length&&this.__input.substring(a-o.length,a).toLowerCase()===o},i.exports.InputScanner=s},,,,,function(i){function n(s,o){s=typeof s=="string"?s:s.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(s+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(s+/\sbeautify\signore:end\s/.source+o,"g")}n.prototype.get_directives=function(s){if(!s.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(s);a;)o[a[1]]=a[2],a=this.__directive_pattern.exec(s);return o},n.prototype.readIgnored=function(s){return s.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=n},,function(i,n,s){var o=s(16).Beautifier,a=s(17).Options;function l(c,h){var u=new o(c,h);return u.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new a}},function(i,n,s){var o=s(17).Options,a=s(2).Output,l=s(8).InputScanner,c=s(13).Directives,h=new c(/\/\*/,/\*\//),u=/\r\n|[\r\n]/,d=/\r\n|[\r\n]/g,f=/\s/,g=/(?:\s|\n)+/g,p=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,_=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function v(b,C){this._source_text=b||"",this._options=new o(C),this._ch=null,this._input=null,this.NESTED_AT_RULE={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},this.CONDITIONAL_GROUP_RULE={"@media":!0,"@supports":!0,"@document":!0}}v.prototype.eatString=function(b){var C="";for(this._ch=this._input.next();this._ch;){if(C+=this._ch,this._ch==="\\")C+=this._input.next();else if(b.indexOf(this._ch)!==-1||this._ch===` -`)break;this._ch=this._input.next()}return C},v.prototype.eatWhitespace=function(b){for(var C=f.test(this._input.peek()),y=0;f.test(this._input.peek());)this._ch=this._input.next(),b&&this._ch===` -`&&(y===0||y<this._options.max_preserve_newlines)&&(y++,this._output.add_new_line(!0));return C},v.prototype.foundNestedPseudoClass=function(){for(var b=0,C=1,y=this._input.peek(C);y;){if(y==="{")return!0;if(y==="(")b+=1;else if(y===")"){if(b===0)return!1;b-=1}else if(y===";"||y==="}")return!1;C++,y=this._input.peek(C)}return!1},v.prototype.print_string=function(b){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(b)},v.prototype.preserveSingleSpace=function(b){b&&(this._output.space_before_token=!0)},v.prototype.indent=function(){this._indentLevel++},v.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},v.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var b=this._source_text,C=this._options.eol;C==="auto"&&(C=` -`,b&&u.test(b||"")&&(C=b.match(u)[0])),b=b.replace(d,` -`);var y=b.match(/^[\t ]*/)[0];this._output=new a(this._options,y),this._input=new l(b),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var x=0,S=!1,w=!1,L=!1,N=!1,P=!1,B=this._ch,U,j,re;U=this._input.read(g),j=U!=="",re=B,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),B=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var te=this._input.read(p),A=h.get_directives(te);A&&A.ignore==="start"&&(te+=h.readIgnored(this._input)),this.print_string(te),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(_)),this.eatWhitespace(!0);else if(this._ch==="@")if(this.preserveSingleSpace(j),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var D=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);D.match(/[ :]$/)&&(D=this.eatString(": ").replace(/\s$/,""),this.print_string(D),this._output.space_before_token=!0),D=D.replace(/\s$/,""),D==="extend"?N=!0:D==="import"&&(P=!0),D in this.NESTED_AT_RULE?(this._nestedLevel+=1,D in this.CONDITIONAL_GROUP_RULE&&(L=!0)):!S&&x===0&&D.indexOf(":")!==-1&&(w=!0,this.indent())}else this._ch==="#"&&this._input.peek()==="{"?(this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString("}"))):this._ch==="{"?(w&&(w=!1,this.outdent()),L?(L=!1,S=this._indentLevel>=this._nestedLevel):S=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&S&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line()):this._ch==="}"?(this.outdent(),this._output.add_new_line(),re==="{"&&this._output.trim(!0),P=!1,N=!1,w&&(this.outdent(),w=!1),this.print_string(this._ch),S=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0)):this._ch===":"?(S||L)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!N&&x===0?(this.print_string(":"),w||(w=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":")):this._ch==='"'||this._ch==="'"?(this.preserveSingleSpace(j),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)):this._ch===";"?x===0?(w&&(this.outdent(),w=!1),N=!1,P=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0):this._ch==="("?this._input.lookBack("url")?(this.print_string(this._ch),this.eatWhitespace(),x++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),x&&(x--,this.outdent()))):(this.preserveSingleSpace(j),this.print_string(this._ch),this.eatWhitespace(),x++,this.indent()):this._ch===")"?(x&&(x--,this.outdent()),this.print_string(this._ch)):this._ch===","?(this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&!w&&x===0&&!P&&!N?this._output.add_new_line():this._output.space_before_token=!0):(this._ch===">"||this._ch==="+"||this._ch==="~")&&!w&&x===0?this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&f.test(this._ch)&&(this._ch="")):this._ch==="]"?this.print_string(this._ch):this._ch==="["?(this.preserveSingleSpace(j),this.print_string(this._ch)):this._ch==="="?(this.eatWhitespace(),this.print_string("="),f.test(this._ch)&&(this._ch="")):this._ch==="!"&&!this._input.lookBack("\\")?(this.print_string(" "),this.print_string(this._ch)):(this.preserveSingleSpace(j),this.print_string(this._ch));var M=this._output.get_code(C);return M},i.exports.Beautifier=v},function(i,n,s){var o=s(6).Options;function a(l){o.call(this,l,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var c=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||c;var h=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var u=0;u<h.length;u++)h[u]!=="expand"?this.brace_style="collapse":this.brace_style=h[u]}a.prototype=new o,i.exports.Options=a}],e={};function t(i){var n=e[i];if(n!==void 0)return n.exports;var s=e[i]={exports:{}};return r[i](s,s.exports,t),s.exports}t(15)})();(function(){var r=[,,function(i){function n(a){this.__parent=a,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}n.prototype.clone_empty=function(){var a=new n(this.__parent);return a.set_indent(this.__indent_count,this.__alignment_count),a},n.prototype.item=function(a){return a<0?this.__items[this.__items.length+a]:this.__items[a]},n.prototype.has_match=function(a){for(var l=this.__items.length-1;l>=0;l--)if(this.__items[l].match(a))return!0;return!1},n.prototype.set_indent=function(a,l){this.is_empty()&&(this.__indent_count=a||0,this.__alignment_count=l||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},n.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},n.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},n.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var a=this.__parent.current_line;return a.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),a.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),a.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,a.__items[0]===" "&&(a.__items.splice(0,1),a.__character_count-=1),!0}return!1},n.prototype.is_empty=function(){return this.__items.length===0},n.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},n.prototype.push=function(a){this.__items.push(a);var l=a.lastIndexOf(` -`);l!==-1?this.__character_count=a.length-l:this.__character_count+=a.length},n.prototype.pop=function(){var a=null;return this.is_empty()||(a=this.__items.pop(),this.__character_count-=a.length),a},n.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},n.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},n.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},n.prototype.toString=function(){var a="";return this.is_empty()?this.__parent.indent_empty_lines&&(a=this.__parent.get_indent_string(this.__indent_count)):(a=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),a+=this.__items.join("")),a};function s(a,l){this.__cache=[""],this.__indent_size=a.indent_size,this.__indent_string=a.indent_char,a.indent_with_tabs||(this.__indent_string=new Array(a.indent_size+1).join(a.indent_char)),l=l||"",a.indent_level>0&&(l=new Array(a.indent_level+1).join(this.__indent_string)),this.__base_string=l,this.__base_string_length=l.length}s.prototype.get_indent_size=function(a,l){var c=this.__base_string_length;return l=l||0,a<0&&(c=0),c+=a*this.__indent_size,c+=l,c},s.prototype.get_indent_string=function(a,l){var c=this.__base_string;return l=l||0,a<0&&(a=0,c=""),l+=a*this.__indent_size,this.__ensure_cache(l),c+=this.__cache[l],c},s.prototype.__ensure_cache=function(a){for(;a>=this.__cache.length;)this.__add_column()},s.prototype.__add_column=function(){var a=this.__cache.length,l=0,c="";this.__indent_size&&a>=this.__indent_size&&(l=Math.floor(a/this.__indent_size),a-=l*this.__indent_size,c=new Array(l+1).join(this.__indent_string)),a&&(c+=new Array(a+1).join(" ")),this.__cache.push(c)};function o(a,l){this.__indent_cache=new s(a,l),this.raw=!1,this._end_with_newline=a.end_with_newline,this.indent_size=a.indent_size,this.wrap_line_length=a.wrap_line_length,this.indent_empty_lines=a.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new n(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}o.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},o.prototype.get_line_number=function(){return this.__lines.length},o.prototype.get_indent_string=function(a,l){return this.__indent_cache.get_indent_string(a,l)},o.prototype.get_indent_size=function(a,l){return this.__indent_cache.get_indent_size(a,l)},o.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},o.prototype.add_new_line=function(a){return this.is_empty()||!a&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},o.prototype.get_code=function(a){this.trim(!0);var l=this.current_line.pop();l&&(l[l.length-1]===` -`&&(l=l.replace(/\n+$/g,"")),this.current_line.push(l)),this._end_with_newline&&this.__add_outputline();var c=this.__lines.join(` -`);return a!==` -`&&(c=c.replace(/[\n]/g,a)),c},o.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},o.prototype.set_indent=function(a,l){return a=a||0,l=l||0,this.next_line.set_indent(a,l),this.__lines.length>1?(this.current_line.set_indent(a,l),!0):(this.current_line.set_indent(),!1)},o.prototype.add_raw_token=function(a){for(var l=0;l<a.newlines;l++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(a.whitespace_before),this.current_line.push(a.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},o.prototype.add_token=function(a){this.__add_space_before_token(),this.current_line.push(a),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},o.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},o.prototype.remove_indent=function(a){for(var l=this.__lines.length;a<l;)this.__lines[a]._remove_indent(),a++;this.current_line._remove_wrap_indent()},o.prototype.trim=function(a){for(a=a===void 0?!1:a,this.current_line.trim();a&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},o.prototype.just_added_newline=function(){return this.current_line.is_empty()},o.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},o.prototype.ensure_empty_line_above=function(a,l){for(var c=this.__lines.length-2;c>=0;){var h=this.__lines[c];if(h.is_empty())break;if(h.item(0).indexOf(a)!==0&&h.item(-1)!==l){this.__lines.splice(c+1,0,new n(this)),this.previous_line=this.__lines[this.__lines.length-2];break}c--}},i.exports.Output=o},function(i){function n(s,o,a,l){this.type=s,this.text=o,this.comments_before=null,this.newlines=a||0,this.whitespace_before=l||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}i.exports.Token=n},,,function(i){function n(a,l){this.raw_options=s(a,l),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","django","erb","handlebars","php","smarty"],["auto"])}n.prototype._get_array=function(a,l){var c=this.raw_options[a],h=l||[];return typeof c=="object"?c!==null&&typeof c.concat=="function"&&(h=c.concat()):typeof c=="string"&&(h=c.split(/[^a-zA-Z0-9_\/\-]+/)),h},n.prototype._get_boolean=function(a,l){var c=this.raw_options[a],h=c===void 0?!!l:!!c;return h},n.prototype._get_characters=function(a,l){var c=this.raw_options[a],h=l||"";return typeof c=="string"&&(h=c.replace(/\\r/,"\r").replace(/\\n/,` -`).replace(/\\t/," ")),h},n.prototype._get_number=function(a,l){var c=this.raw_options[a];l=parseInt(l,10),isNaN(l)&&(l=0);var h=parseInt(c,10);return isNaN(h)&&(h=l),h},n.prototype._get_selection=function(a,l,c){var h=this._get_selection_list(a,l,c);if(h.length!==1)throw new Error("Invalid Option Value: The option '"+a+`' can only be one of the following values: -`+l+` -You passed in: '`+this.raw_options[a]+"'");return h[0]},n.prototype._get_selection_list=function(a,l,c){if(!l||l.length===0)throw new Error("Selection list cannot be empty.");if(c=c||[l[0]],!this._is_valid_selection(c,l))throw new Error("Invalid Default Value!");var h=this._get_array(a,c);if(!this._is_valid_selection(h,l))throw new Error("Invalid Option Value: The option '"+a+`' can contain only the following values: -`+l+` -You passed in: '`+this.raw_options[a]+"'");return h},n.prototype._is_valid_selection=function(a,l){return a.length&&l.length&&!a.some(function(c){return l.indexOf(c)===-1})};function s(a,l){var c={};a=o(a);var h;for(h in a)h!==l&&(c[h]=a[h]);if(l&&a[l])for(h in a[l])c[h]=a[l][h];return c}function o(a){var l={},c;for(c in a){var h=c.replace(/-/g,"_");l[h]=a[c]}return l}i.exports.Options=n,i.exports.normalizeOpts=o,i.exports.mergeOpts=s},,function(i){var n=RegExp.prototype.hasOwnProperty("sticky");function s(o){this.__input=o||"",this.__input_length=this.__input.length,this.__position=0}s.prototype.restart=function(){this.__position=0},s.prototype.back=function(){this.__position>0&&(this.__position-=1)},s.prototype.hasNext=function(){return this.__position<this.__input_length},s.prototype.next=function(){var o=null;return this.hasNext()&&(o=this.__input.charAt(this.__position),this.__position+=1),o},s.prototype.peek=function(o){var a=null;return o=o||0,o+=this.__position,o>=0&&o<this.__input_length&&(a=this.__input.charAt(o)),a},s.prototype.__match=function(o,a){o.lastIndex=a;var l=o.exec(this.__input);return l&&!(n&&o.sticky)&&l.index!==a&&(l=null),l},s.prototype.test=function(o,a){return a=a||0,a+=this.__position,a>=0&&a<this.__input_length?!!this.__match(o,a):!1},s.prototype.testChar=function(o,a){var l=this.peek(a);return o.lastIndex=0,l!==null&&o.test(l)},s.prototype.match=function(o){var a=this.__match(o,this.__position);return a?this.__position+=a[0].length:a=null,a},s.prototype.read=function(o,a,l){var c="",h;return o&&(h=this.match(o),h&&(c+=h[0])),a&&(h||!o)&&(c+=this.readUntil(a,l)),c},s.prototype.readUntil=function(o,a){var l="",c=this.__position;o.lastIndex=this.__position;var h=o.exec(this.__input);return h?(c=h.index,a&&(c+=h[0].length)):c=this.__input_length,l=this.__input.substring(this.__position,c),this.__position=c,l},s.prototype.readUntilAfter=function(o){return this.readUntil(o,!0)},s.prototype.get_regexp=function(o,a){var l=null,c="g";return a&&n&&(c="y"),typeof o=="string"&&o!==""?l=new RegExp(o,c):o&&(l=new RegExp(o.source,c)),l},s.prototype.get_literal_regexp=function(o){return RegExp(o.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},s.prototype.peekUntilAfter=function(o){var a=this.__position,l=this.readUntilAfter(o);return this.__position=a,l},s.prototype.lookBack=function(o){var a=this.__position-1;return a>=o.length&&this.__input.substring(a-o.length,a).toLowerCase()===o},i.exports.InputScanner=s},function(i,n,s){var o=s(8).InputScanner,a=s(3).Token,l=s(10).TokenStream,c=s(11).WhitespacePattern,h={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},u=function(d,f){this._input=new o(d),this._options=f||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new c(this._input)};u.prototype.tokenize=function(){this._input.restart(),this.__tokens=new l,this._reset();for(var d,f=new a(h.START,""),g=null,p=[],_=new l;f.type!==h.EOF;){for(d=this._get_next_token(f,g);this._is_comment(d);)_.add(d),d=this._get_next_token(f,g);_.isEmpty()||(d.comments_before=_,_=new l),d.parent=g,this._is_opening(d)?(p.push(g),g=d):g&&this._is_closing(d,g)&&(d.opened=g,g.closed=d,g=p.pop(),d.parent=g),d.previous=f,f.next=d,this.__tokens.add(d),f=d}return this.__tokens},u.prototype._is_first_token=function(){return this.__tokens.isEmpty()},u.prototype._reset=function(){},u.prototype._get_next_token=function(d,f){this._readWhitespace();var g=this._input.read(/.+/g);return g?this._create_token(h.RAW,g):this._create_token(h.EOF,"")},u.prototype._is_comment=function(d){return!1},u.prototype._is_opening=function(d){return!1},u.prototype._is_closing=function(d,f){return!1},u.prototype._create_token=function(d,f){var g=new a(d,f,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return g},u.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},i.exports.Tokenizer=u,i.exports.TOKEN=h},function(i){function n(s){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=s}n.prototype.restart=function(){this.__position=0},n.prototype.isEmpty=function(){return this.__tokens_length===0},n.prototype.hasNext=function(){return this.__position<this.__tokens_length},n.prototype.next=function(){var s=null;return this.hasNext()&&(s=this.__tokens[this.__position],this.__position+=1),s},n.prototype.peek=function(s){var o=null;return s=s||0,s+=this.__position,s>=0&&s<this.__tokens_length&&(o=this.__tokens[s]),o},n.prototype.add=function(s){this.__parent_token&&(s.parent=this.__parent_token),this.__tokens.push(s),this.__tokens_length+=1},i.exports.TokenStream=n},function(i,n,s){var o=s(12).Pattern;function a(l,c){o.call(this,l,c),c?this._line_regexp=this._input.get_regexp(c._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}a.prototype=new o,a.prototype.__set_whitespace_patterns=function(l,c){l+="\\t ",c+="\\n\\r",this._match_pattern=this._input.get_regexp("["+l+c+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+c+"]")},a.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var l=this._input.read(this._match_pattern);if(l===" ")this.whitespace_before_token=" ";else if(l){var c=this.__split(this._newline_regexp,l);this.newline_count=c.length-1,this.whitespace_before_token=c[this.newline_count]}return l},a.prototype.matching=function(l,c){var h=this._create();return h.__set_whitespace_patterns(l,c),h._update(),h},a.prototype._create=function(){return new a(this._input,this)},a.prototype.__split=function(l,c){l.lastIndex=0;for(var h=0,u=[],d=l.exec(c);d;)u.push(c.substring(h,d.index)),h=d.index+d[0].length,d=l.exec(c);return h<c.length?u.push(c.substring(h,c.length)):u.push(""),u},i.exports.WhitespacePattern=a},function(i){function n(s,o){this._input=s,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,o&&(this._starting_pattern=this._input.get_regexp(o._starting_pattern,!0),this._match_pattern=this._input.get_regexp(o._match_pattern,!0),this._until_pattern=this._input.get_regexp(o._until_pattern),this._until_after=o._until_after)}n.prototype.read=function(){var s=this._input.read(this._starting_pattern);return(!this._starting_pattern||s)&&(s+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),s},n.prototype.read_match=function(){return this._input.match(this._match_pattern)},n.prototype.until_after=function(s){var o=this._create();return o._until_after=!0,o._until_pattern=this._input.get_regexp(s),o._update(),o},n.prototype.until=function(s){var o=this._create();return o._until_after=!1,o._until_pattern=this._input.get_regexp(s),o._update(),o},n.prototype.starting_with=function(s){var o=this._create();return o._starting_pattern=this._input.get_regexp(s,!0),o._update(),o},n.prototype.matching=function(s){var o=this._create();return o._match_pattern=this._input.get_regexp(s,!0),o._update(),o},n.prototype._create=function(){return new n(this._input,this)},n.prototype._update=function(){},i.exports.Pattern=n},function(i){function n(s,o){s=typeof s=="string"?s:s.source,o=typeof o=="string"?o:o.source,this.__directives_block_pattern=new RegExp(s+/ beautify( \w+[:]\w+)+ /.source+o,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(s+/\sbeautify\signore:end\s/.source+o,"g")}n.prototype.get_directives=function(s){if(!s.match(this.__directives_block_pattern))return null;var o={};this.__directive_pattern.lastIndex=0;for(var a=this.__directive_pattern.exec(s);a;)o[a[1]]=a[2],a=this.__directive_pattern.exec(s);return o},n.prototype.readIgnored=function(s){return s.readUntilAfter(this.__directives_end_ignore_pattern)},i.exports.Directives=n},function(i,n,s){var o=s(12).Pattern,a={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1};function l(c,h){o.call(this,c,h),this.__template_pattern=null,this._disabled=Object.assign({},a),this._excluded=Object.assign({},a),h&&(this.__template_pattern=this._input.get_regexp(h.__template_pattern),this._excluded=Object.assign(this._excluded,h._excluded),this._disabled=Object.assign(this._disabled,h._disabled));var u=new o(c);this.__patterns={handlebars_comment:u.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:u.starting_with(/{{{/).until_after(/}}}/),handlebars:u.starting_with(/{{/).until_after(/}}/),php:u.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:u.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:u.starting_with(/{%/).until_after(/%}/),django_value:u.starting_with(/{{/).until_after(/}}/),django_comment:u.starting_with(/{#/).until_after(/#}/),smarty:u.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:u.starting_with(/{\*/).until_after(/\*}/),smarty_literal:u.starting_with(/{literal}/).until_after(/{\/literal}/)}}l.prototype=new o,l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){this.__set_templated_pattern()},l.prototype.disable=function(c){var h=this._create();return h._disabled[c]=!0,h._update(),h},l.prototype.read_options=function(c){var h=this._create();for(var u in a)h._disabled[u]=c.templating.indexOf(u)===-1;return h._update(),h},l.prototype.exclude=function(c){var h=this._create();return h._excluded[c]=!0,h._update(),h},l.prototype.read=function(){var c="";this._match_pattern?c=this._input.read(this._starting_pattern):c=this._input.read(this._starting_pattern,this.__template_pattern);for(var h=this._read_template();h;)this._match_pattern?h+=this._input.read(this._match_pattern):h+=this._input.readUntil(this.__template_pattern),c+=h,h=this._read_template();return this._until_after&&(c+=this._input.readUntilAfter(this._until_pattern)),c},l.prototype.__set_templated_pattern=function(){var c=[];this._disabled.php||c.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||c.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||c.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(c.push(this.__patterns.django._starting_pattern.source),c.push(this.__patterns.django_value._starting_pattern.source),c.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||c.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&c.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+c.join("|")+")")},l.prototype._read_template=function(){var c="",h=this._input.peek();if(h==="<"){var u=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&u==="?"&&(c=c||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&u==="%"&&(c=c||this.__patterns.erb.read())}else h==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(c=c||this.__patterns.handlebars_comment.read(),c=c||this.__patterns.handlebars_unescaped.read(),c=c||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(c=c||this.__patterns.django_value.read()),this._excluded.django||(c=c||this.__patterns.django_comment.read(),c=c||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(c=c||this.__patterns.smarty_comment.read(),c=c||this.__patterns.smarty_literal.read(),c=c||this.__patterns.smarty.read()));return c},i.exports.TemplatablePattern=l},,,,function(i,n,s){var o=s(19).Beautifier,a=s(20).Options;function l(c,h,u,d){var f=new o(c,h,u,d);return f.beautify()}i.exports=l,i.exports.defaultOptions=function(){return new a}},function(i,n,s){var o=s(20).Options,a=s(2).Output,l=s(21).Tokenizer,c=s(21).TOKEN,h=/\r\n|[\r\n]/,u=/\r\n|[\r\n]/g,d=function(S,w){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=S.max_preserve_newlines,this.preserve_newlines=S.preserve_newlines,this._output=new a(S,w)};d.prototype.current_line_has_match=function(S){return this._output.current_line.has_match(S)},d.prototype.set_space_before_token=function(S,w){this._output.space_before_token=S,this._output.non_breaking_space=w},d.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},d.prototype.add_raw_token=function(S){this._output.add_raw_token(S)},d.prototype.print_preserved_newlines=function(S){var w=0;S.type!==c.TEXT&&S.previous.type!==c.TEXT&&(w=S.newlines?1:0),this.preserve_newlines&&(w=S.newlines<this.max_preserve_newlines+1?S.newlines:this.max_preserve_newlines+1);for(var L=0;L<w;L++)this.print_newline(L>0);return w!==0},d.prototype.traverse_whitespace=function(S){return S.whitespace_before||S.newlines?(this.print_preserved_newlines(S)||(this._output.space_before_token=!0),!0):!1},d.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},d.prototype.print_newline=function(S){this._output.add_new_line(S)},d.prototype.print_token=function(S){S.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(S.text))},d.prototype.indent=function(){this.indent_level++},d.prototype.get_full_indent=function(S){return S=this.indent_level+(S||0),S<1?"":this._output.get_indent_string(S)};var f=function(S){for(var w=null,L=S.next;L.type!==c.EOF&&S.closed!==L;){if(L.type===c.ATTRIBUTE&&L.text==="type"){L.next&&L.next.type===c.EQUALS&&L.next.next&&L.next.next.type===c.VALUE&&(w=L.next.next.text);break}L=L.next}return w},g=function(S,w){var L=null,N=null;return w.closed?(S==="script"?L="text/javascript":S==="style"&&(L="text/css"),L=f(w)||L,L.search("text/css")>-1?N="css":L.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?N="javascript":L.search(/(text|application|dojo)\/(x-)?(html)/)>-1?N="html":L.search(/test\/null/)>-1&&(N="null"),N):null};function p(S,w){return w.indexOf(S)!==-1}function _(S,w,L){this.parent=S||null,this.tag=w?w.tag_name:"",this.indent_level=L||0,this.parser_token=w||null}function v(S){this._printer=S,this._current_frame=null}v.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},v.prototype.record_tag=function(S){var w=new _(this._current_frame,S,this._printer.indent_level);this._current_frame=w},v.prototype._try_pop_frame=function(S){var w=null;return S&&(w=S.parser_token,this._printer.indent_level=S.indent_level,this._current_frame=S.parent),w},v.prototype._get_frame=function(S,w){for(var L=this._current_frame;L&&S.indexOf(L.tag)===-1;){if(w&&w.indexOf(L.tag)!==-1){L=null;break}L=L.parent}return L},v.prototype.try_pop=function(S,w){var L=this._get_frame([S],w);return this._try_pop_frame(L)},v.prototype.indent_to_tag=function(S){var w=this._get_frame(S);w&&(this._printer.indent_level=w.indent_level)};function b(S,w,L,N){this._source_text=S||"",w=w||{},this._js_beautify=L,this._css_beautify=N,this._tag_stack=null;var P=new o(w,"html");this._options=P,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,"force".length)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,"preserve".length)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}b.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var S=this._source_text,w=this._options.eol;this._options.eol==="auto"&&(w=` -`,S&&h.test(S)&&(w=S.match(h)[0])),S=S.replace(u,` -`);var L=S.match(/^[\t ]*/)[0],N={text:"",type:""},P=new C,B=new d(this._options,L),U=new l(S,this._options).tokenize();this._tag_stack=new v(B);for(var j=null,re=U.next();re.type!==c.EOF;)re.type===c.TAG_OPEN||re.type===c.COMMENT?(j=this._handle_tag_open(B,re,P,N),P=j):re.type===c.ATTRIBUTE||re.type===c.EQUALS||re.type===c.VALUE||re.type===c.TEXT&&!P.tag_complete?j=this._handle_inside_tag(B,re,P,U):re.type===c.TAG_CLOSE?j=this._handle_tag_close(B,re,P):re.type===c.TEXT?j=this._handle_text(B,re,P):B.add_raw_token(re),N=j,re=U.next();var te=B._output.get_code(w);return te},b.prototype._handle_tag_close=function(S,w,L){var N={text:w.text,type:w.type};return S.alignment_size=0,L.tag_complete=!0,S.set_space_before_token(w.newlines||w.whitespace_before!=="",!0),L.is_unformatted?S.add_raw_token(w):(L.tag_start_char==="<"&&(S.set_space_before_token(w.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&L.has_wrapped_attrs&&S.print_newline(!1)),S.print_token(w)),L.indent_content&&!(L.is_unformatted||L.is_content_unformatted)&&(S.indent(),L.indent_content=!1),!L.is_inline_element&&!(L.is_unformatted||L.is_content_unformatted)&&S.set_wrap_point(),N},b.prototype._handle_inside_tag=function(S,w,L,N){var P=L.has_wrapped_attrs,B={text:w.text,type:w.type};if(S.set_space_before_token(w.newlines||w.whitespace_before!=="",!0),L.is_unformatted)S.add_raw_token(w);else if(L.tag_start_char==="{"&&w.type===c.TEXT)S.print_preserved_newlines(w)?(w.newlines=0,S.add_raw_token(w)):S.print_token(w);else{if(w.type===c.ATTRIBUTE?(S.set_space_before_token(!0),L.attr_count+=1):(w.type===c.EQUALS||w.type===c.VALUE&&w.previous.type===c.EQUALS)&&S.set_space_before_token(!1),w.type===c.ATTRIBUTE&&L.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(S.traverse_whitespace(w),P=P||w.newlines!==0),this._is_wrap_attributes_force)){var U=L.attr_count>1;if(this._is_wrap_attributes_force_expand_multiline&&L.attr_count===1){var j=!0,re=0,te;do{if(te=N.peek(re),te.type===c.ATTRIBUTE){j=!1;break}re+=1}while(re<4&&te.type!==c.EOF&&te.type!==c.TAG_CLOSE);U=!j}U&&(S.print_newline(!1),P=!0)}S.print_token(w),P=P||S.previous_token_wrapped(),L.has_wrapped_attrs=P}return B},b.prototype._handle_text=function(S,w,L){var N={text:w.text,type:"TK_CONTENT"};return L.custom_beautifier_name?this._print_custom_beatifier_text(S,w,L):L.is_unformatted||L.is_content_unformatted?S.add_raw_token(w):(S.traverse_whitespace(w),S.print_token(w)),N},b.prototype._print_custom_beatifier_text=function(S,w,L){var N=this;if(w.text!==""){var P=w.text,B,U=1,j="",re="";L.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?B=this._js_beautify:L.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?B=this._css_beautify:L.custom_beautifier_name==="html"&&(B=function(ge,se){var ae=new b(ge,se,N._js_beautify,N._css_beautify);return ae.beautify()}),this._options.indent_scripts==="keep"?U=0:this._options.indent_scripts==="separate"&&(U=-S.indent_level);var te=S.get_full_indent(U);if(P=P.replace(/\n[ \t]*$/,""),L.custom_beautifier_name!=="html"&&P[0]==="<"&&P.match(/^(<!--|<!\[CDATA\[)/)){var A=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(P);if(!A){S.add_raw_token(w);return}j=te+A[1]+` -`,P=A[4],A[5]&&(re=te+A[5]),P=P.replace(/\n[ \t]*$/,""),(A[2]||A[3].indexOf(` -`)!==-1)&&(A=A[3].match(/[ \t]+$/),A&&(w.whitespace_before=A[0]))}if(P)if(B){var D=function(){this.eol=` -`};D.prototype=this._options.raw_options;var M=new D;P=B(te+P,M)}else{var W=w.whitespace_before;W&&(P=P.replace(new RegExp(` -(`+W+")?","g"),` -`)),P=te+P.replace(/\n/g,` -`+te)}j&&(P?P=j+P+` -`+re:P=j+re),S.print_newline(!1),P&&(w.text=P,w.whitespace_before="",w.newlines=0,S.add_raw_token(w),S.print_newline(!0))}},b.prototype._handle_tag_open=function(S,w,L,N){var P=this._get_tag_open_token(w);return(L.is_unformatted||L.is_content_unformatted)&&!L.is_empty_element&&w.type===c.TAG_OPEN&&w.text.indexOf("</")===0?(S.add_raw_token(w),P.start_tag_token=this._tag_stack.try_pop(P.tag_name)):(S.traverse_whitespace(w),this._set_tag_position(S,w,P,L,N),P.is_inline_element||S.set_wrap_point(),S.print_token(w)),(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(P.alignment_size=w.text.length+1),!P.tag_complete&&!P.is_unformatted&&(S.alignment_size=P.alignment_size),P};var C=function(S,w){if(this.parent=S||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!w)this.tag_complete=!0;else{var L;this.tag_start_char=w.text[0],this.text=w.text,this.tag_start_char==="<"?(L=w.text.match(/^<([^\s>]*)/),this.tag_check=L?L[1]:""):(L=w.text.match(/^{{(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=L?L[1]:"",w.text==="{{#>"&&this.tag_check===">"&&w.next!==null&&(this.tag_check=w.next.text)),this.tag_check=this.tag_check.toLowerCase(),w.type===c.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||w.closed&&w.closed.text==="/>",this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(this.text.length<3||/[^#\^]/.test(this.text.charAt(2)))}};b.prototype._get_tag_open_token=function(S){var w=new C(this._tag_stack.get_parser_token(),S);return w.alignment_size=this._options.wrap_attributes_indent_size,w.is_end_tag=w.is_end_tag||p(w.tag_check,this._options.void_elements),w.is_empty_element=w.tag_complete||w.is_start_tag&&w.is_end_tag,w.is_unformatted=!w.tag_complete&&p(w.tag_check,this._options.unformatted),w.is_content_unformatted=!w.is_empty_element&&p(w.tag_check,this._options.content_unformatted),w.is_inline_element=p(w.tag_name,this._options.inline)||w.tag_start_char==="{",w},b.prototype._set_tag_position=function(S,w,L,N,P){if(L.is_empty_element||(L.is_end_tag?L.start_tag_token=this._tag_stack.try_pop(L.tag_name):(this._do_optional_end_element(L)&&(L.is_inline_element||S.print_newline(!1)),this._tag_stack.record_tag(L),(L.tag_name==="script"||L.tag_name==="style")&&!(L.is_unformatted||L.is_content_unformatted)&&(L.custom_beautifier_name=g(L.tag_check,w)))),p(L.tag_check,this._options.extra_liners)&&(S.print_newline(!1),S._output.just_added_blankline()||S.print_newline(!0)),L.is_empty_element){if(L.tag_start_char==="{"&&L.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),L.indent_content=!0;var B=S.current_line_has_match(/{{#if/);B||S.print_newline(!1)}L.tag_name==="!--"&&P.type===c.TAG_CLOSE&&N.is_end_tag&&L.text.indexOf(` -`)===-1||(L.is_inline_element||L.is_unformatted||S.print_newline(!1),this._calcluate_parent_multiline(S,L))}else if(L.is_end_tag){var U=!1;U=L.start_tag_token&&L.start_tag_token.multiline_content,U=U||!L.is_inline_element&&!(N.is_inline_element||N.is_unformatted)&&!(P.type===c.TAG_CLOSE&&L.start_tag_token===N)&&P.type!=="TK_CONTENT",(L.is_content_unformatted||L.is_unformatted)&&(U=!1),U&&S.print_newline(!1)}else L.indent_content=!L.custom_beautifier_name,L.tag_start_char==="<"&&(L.tag_name==="html"?L.indent_content=this._options.indent_inner_html:L.tag_name==="head"?L.indent_content=this._options.indent_head_inner_html:L.tag_name==="body"&&(L.indent_content=this._options.indent_body_inner_html)),!(L.is_inline_element||L.is_unformatted)&&(P.type!=="TK_CONTENT"||L.is_content_unformatted)&&S.print_newline(!1),this._calcluate_parent_multiline(S,L)},b.prototype._calcluate_parent_multiline=function(S,w){w.parent&&S._output.just_added_newline()&&!((w.is_inline_element||w.is_unformatted)&&w.parent.is_inline_element)&&(w.parent.multiline_content=!0)};var y=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","nav","ol","p","pre","section","table","ul"],x=["a","audio","del","ins","map","noscript","video"];b.prototype._do_optional_end_element=function(S){var w=null;if(!(S.is_empty_element||!S.is_start_tag||!S.parent)){if(S.tag_name==="body")w=w||this._tag_stack.try_pop("head");else if(S.tag_name==="li")w=w||this._tag_stack.try_pop("li",["ol","ul"]);else if(S.tag_name==="dd"||S.tag_name==="dt")w=w||this._tag_stack.try_pop("dt",["dl"]),w=w||this._tag_stack.try_pop("dd",["dl"]);else if(S.parent.tag_name==="p"&&y.indexOf(S.tag_name)!==-1){var L=S.parent.parent;(!L||x.indexOf(L.tag_name)===-1)&&(w=w||this._tag_stack.try_pop("p"))}else S.tag_name==="rp"||S.tag_name==="rt"?(w=w||this._tag_stack.try_pop("rt",["ruby","rtc"]),w=w||this._tag_stack.try_pop("rp",["ruby","rtc"])):S.tag_name==="optgroup"?w=w||this._tag_stack.try_pop("optgroup",["select"]):S.tag_name==="option"?w=w||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):S.tag_name==="colgroup"?w=w||this._tag_stack.try_pop("caption",["table"]):S.tag_name==="thead"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"])):S.tag_name==="tbody"||S.tag_name==="tfoot"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"]),w=w||this._tag_stack.try_pop("thead",["table"]),w=w||this._tag_stack.try_pop("tbody",["table"])):S.tag_name==="tr"?(w=w||this._tag_stack.try_pop("caption",["table"]),w=w||this._tag_stack.try_pop("colgroup",["table"]),w=w||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(S.tag_name==="th"||S.tag_name==="td")&&(w=w||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),w=w||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return S.parent=this._tag_stack.get_parser_token(),w}},i.exports.Beautifier=b},function(i,n,s){var o=s(6).Options;function a(l){o.call(this,l,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}a.prototype=new o,i.exports.Options=a},function(i,n,s){var o=s(9).Tokenizer,a=s(9).TOKEN,l=s(13).Directives,c=s(14).TemplatablePattern,h=s(12).Pattern,u={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:a.START,RAW:a.RAW,EOF:a.EOF},d=new l(/<\!--/,/-->/),f=function(g,p){o.call(this,g,p),this._current_tag_name="";var _=new c(this._input).read_options(this._options),v=new h(this._input);if(this.__patterns={word:_.until(/[\n\r\t <]/),single_quote:_.until_after(/'/),double_quote:_.until_after(/"/),attribute:_.until(/[\n\r\t =>]|\/>/),element_name:_.until(/[\n\r\t >\/]/),handlebars_comment:v.starting_with(/{{!--/).until_after(/--}}/),handlebars:v.starting_with(/{{/).until_after(/}}/),handlebars_open:v.until(/[\n\r\t }]/),handlebars_raw_close:v.until(/}}/),comment:v.starting_with(/<!--/).until_after(/-->/),cdata:v.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:v.starting_with(/<!\[/).until_after(/]>/),processing:v.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var b=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=v.matching(b).until_after(b)}};f.prototype=new o,f.prototype._is_comment=function(g){return!1},f.prototype._is_opening=function(g){return g.type===u.TAG_OPEN},f.prototype._is_closing=function(g,p){return g.type===u.TAG_CLOSE&&p&&((g.text===">"||g.text==="/>")&&p.text[0]==="<"||g.text==="}}"&&p.text[0]==="{"&&p.text[1]==="{")},f.prototype._reset=function(){this._current_tag_name=""},f.prototype._get_next_token=function(g,p){var _=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(u.EOF,""):(_=_||this._read_open_handlebars(v,p),_=_||this._read_attribute(v,g,p),_=_||this._read_close(v,p),_=_||this._read_raw_content(v,g,p),_=_||this._read_content_word(v),_=_||this._read_comment_or_cdata(v),_=_||this._read_processing(v),_=_||this._read_open(v,p),_=_||this._create_token(u.UNKNOWN,this._input.next()),_)},f.prototype._read_comment_or_cdata=function(g){var p=null,_=null,v=null;if(g==="<"){var b=this._input.peek(1);b==="!"&&(_=this.__patterns.comment.read(),_?(v=d.get_directives(_),v&&v.ignore==="start"&&(_+=d.readIgnored(this._input))):_=this.__patterns.cdata.read()),_&&(p=this._create_token(u.COMMENT,_),p.directives=v)}return p},f.prototype._read_processing=function(g){var p=null,_=null,v=null;if(g==="<"){var b=this._input.peek(1);(b==="!"||b==="?")&&(_=this.__patterns.conditional_comment.read(),_=_||this.__patterns.processing.read()),_&&(p=this._create_token(u.COMMENT,_),p.directives=v)}return p},f.prototype._read_open=function(g,p){var _=null,v=null;return p||g==="<"&&(_=this._input.next(),this._input.peek()==="/"&&(_+=this._input.next()),_+=this.__patterns.element_name.read(),v=this._create_token(u.TAG_OPEN,_)),v},f.prototype._read_open_handlebars=function(g,p){var _=null,v=null;return p||this._options.indent_handlebars&&g==="{"&&this._input.peek(1)==="{"&&(this._input.peek(2)==="!"?(_=this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars.read(),v=this._create_token(u.COMMENT,_)):(_=this.__patterns.handlebars_open.read(),v=this._create_token(u.TAG_OPEN,_))),v},f.prototype._read_close=function(g,p){var _=null,v=null;return p&&(p.text[0]==="<"&&(g===">"||g==="/"&&this._input.peek(1)===">")?(_=this._input.next(),g==="/"&&(_+=this._input.next()),v=this._create_token(u.TAG_CLOSE,_)):p.text[0]==="{"&&g==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),v=this._create_token(u.TAG_CLOSE,"}}"))),v},f.prototype._read_attribute=function(g,p,_){var v=null,b="";if(_&&_.text[0]==="<")if(g==="=")v=this._create_token(u.EQUALS,this._input.next());else if(g==='"'||g==="'"){var C=this._input.next();g==='"'?C+=this.__patterns.double_quote.read():C+=this.__patterns.single_quote.read(),v=this._create_token(u.VALUE,C)}else b=this.__patterns.attribute.read(),b&&(p.type===u.EQUALS?v=this._create_token(u.VALUE,b):v=this._create_token(u.ATTRIBUTE,b));return v},f.prototype._is_content_unformatted=function(g){return this._options.void_elements.indexOf(g)===-1&&(this._options.content_unformatted.indexOf(g)!==-1||this._options.unformatted.indexOf(g)!==-1)},f.prototype._read_raw_content=function(g,p,_){var v="";if(_&&_.text[0]==="{")v=this.__patterns.handlebars_raw_close.read();else if(p.type===u.TAG_CLOSE&&p.opened.text[0]==="<"&&p.text[0]!=="/"){var b=p.opened.text.substr(1).toLowerCase();if(b==="script"||b==="style"){var C=this._read_comment_or_cdata(g);if(C)return C.type=u.TEXT,C;v=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig"))}else this._is_content_unformatted(b)&&(v=this._input.readUntil(new RegExp("</"+b+"[\\n\\r\\t ]*?>","ig")))}return v?this._create_token(u.TEXT,v):null},f.prototype._read_content_word=function(g){var p="";if(this._options.unformatted_content_delimiter&&g===this._options.unformatted_content_delimiter[0]&&(p=this.__patterns.unformatted_content_delimiter.read()),p||(p=this.__patterns.word.read()),p)return this._create_token(u.TEXT,p)},i.exports.Tokenizer=f,i.exports.TOKEN=u}],e={};function t(i){var n=e[i];if(n!==void 0)return n.exports;var s=e[i]={exports:{}};return r[i](s,s.exports,t),s.exports}t(18)})();(()=>{var r={470:i=>{function n(a){if(typeof a!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(a))}function s(a,l){for(var c,h="",u=0,d=-1,f=0,g=0;g<=a.length;++g){if(g<a.length)c=a.charCodeAt(g);else{if(c===47)break;c=47}if(c===47){if(!(d===g-1||f===1))if(d!==g-1&&f===2){if(h.length<2||u!==2||h.charCodeAt(h.length-1)!==46||h.charCodeAt(h.length-2)!==46){if(h.length>2){var p=h.lastIndexOf("/");if(p!==h.length-1){p===-1?(h="",u=0):u=(h=h.slice(0,p)).length-1-h.lastIndexOf("/"),d=g,f=0;continue}}else if(h.length===2||h.length===1){h="",u=0,d=g,f=0;continue}}l&&(h.length>0?h+="/..":h="..",u=2)}else h.length>0?h+="/"+a.slice(d+1,g):h=a.slice(d+1,g),u=g-d-1;d=g,f=0}else c===46&&f!==-1?++f:f=-1}return h}var o={resolve:function(){for(var a,l="",c=!1,h=arguments.length-1;h>=-1&&!c;h--){var u;h>=0?u=arguments[h]:(a===void 0&&(a=process.cwd()),u=a),n(u),u.length!==0&&(l=u+"/"+l,c=u.charCodeAt(0)===47)}return l=s(l,!c),c?l.length>0?"/"+l:"/":l.length>0?l:"."},normalize:function(a){if(n(a),a.length===0)return".";var l=a.charCodeAt(0)===47,c=a.charCodeAt(a.length-1)===47;return(a=s(a,!l)).length!==0||l||(a="."),a.length>0&&c&&(a+="/"),l?"/"+a:a},isAbsolute:function(a){return n(a),a.length>0&&a.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var a,l=0;l<arguments.length;++l){var c=arguments[l];n(c),c.length>0&&(a===void 0?a=c:a+="/"+c)}return a===void 0?".":o.normalize(a)},relative:function(a,l){if(n(a),n(l),a===l||(a=o.resolve(a))===(l=o.resolve(l)))return"";for(var c=1;c<a.length&&a.charCodeAt(c)===47;++c);for(var h=a.length,u=h-c,d=1;d<l.length&&l.charCodeAt(d)===47;++d);for(var f=l.length-d,g=u<f?u:f,p=-1,_=0;_<=g;++_){if(_===g){if(f>g){if(l.charCodeAt(d+_)===47)return l.slice(d+_+1);if(_===0)return l.slice(d+_)}else u>g&&(a.charCodeAt(c+_)===47?p=_:_===0&&(p=0));break}var v=a.charCodeAt(c+_);if(v!==l.charCodeAt(d+_))break;v===47&&(p=_)}var b="";for(_=c+p+1;_<=h;++_)_!==h&&a.charCodeAt(_)!==47||(b.length===0?b+="..":b+="/..");return b.length>0?b+l.slice(d+p):(d+=p,l.charCodeAt(d)===47&&++d,l.slice(d))},_makeLong:function(a){return a},dirname:function(a){if(n(a),a.length===0)return".";for(var l=a.charCodeAt(0),c=l===47,h=-1,u=!0,d=a.length-1;d>=1;--d)if((l=a.charCodeAt(d))===47){if(!u){h=d;break}}else u=!1;return h===-1?c?"/":".":c&&h===1?"//":a.slice(0,h)},basename:function(a,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');n(a);var c,h=0,u=-1,d=!0;if(l!==void 0&&l.length>0&&l.length<=a.length){if(l.length===a.length&&l===a)return"";var f=l.length-1,g=-1;for(c=a.length-1;c>=0;--c){var p=a.charCodeAt(c);if(p===47){if(!d){h=c+1;break}}else g===-1&&(d=!1,g=c+1),f>=0&&(p===l.charCodeAt(f)?--f==-1&&(u=c):(f=-1,u=g))}return h===u?u=g:u===-1&&(u=a.length),a.slice(h,u)}for(c=a.length-1;c>=0;--c)if(a.charCodeAt(c)===47){if(!d){h=c+1;break}}else u===-1&&(d=!1,u=c+1);return u===-1?"":a.slice(h,u)},extname:function(a){n(a);for(var l=-1,c=0,h=-1,u=!0,d=0,f=a.length-1;f>=0;--f){var g=a.charCodeAt(f);if(g!==47)h===-1&&(u=!1,h=f+1),g===46?l===-1?l=f:d!==1&&(d=1):l!==-1&&(d=-1);else if(!u){c=f+1;break}}return l===-1||h===-1||d===0||d===1&&l===h-1&&l===c+1?"":a.slice(l,h)},format:function(a){if(a===null||typeof a!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof a);return function(l,c){var h=c.dir||c.root,u=c.base||(c.name||"")+(c.ext||"");return h?h===c.root?h+u:h+"/"+u:u}(0,a)},parse:function(a){n(a);var l={root:"",dir:"",base:"",ext:"",name:""};if(a.length===0)return l;var c,h=a.charCodeAt(0),u=h===47;u?(l.root="/",c=1):c=0;for(var d=-1,f=0,g=-1,p=!0,_=a.length-1,v=0;_>=c;--_)if((h=a.charCodeAt(_))!==47)g===-1&&(p=!1,g=_+1),h===46?d===-1?d=_:v!==1&&(v=1):d!==-1&&(v=-1);else if(!p){f=_+1;break}return d===-1||g===-1||v===0||v===1&&d===g-1&&d===f+1?g!==-1&&(l.base=l.name=f===0&&u?a.slice(1,g):a.slice(f,g)):(f===0&&u?(l.name=a.slice(1,d),l.base=a.slice(1,g)):(l.name=a.slice(f,d),l.base=a.slice(f,g)),l.ext=a.slice(d,g)),f>0?l.dir=a.slice(0,f-1):u&&(l.dir="/"),l},sep:"/",delimiter:":",win32:null,posix:null};o.posix=o,i.exports=o},447:(i,n,s)=>{var o;if(s.r(n),s.d(n,{URI:()=>v,Utils:()=>U}),typeof process=="object")o=process.platform==="win32";else if(typeof navigator=="object"){var a=navigator.userAgent;o=a.indexOf("Windows")>=0}var l,c,h=(l=function(A,D){return(l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(M,W){M.__proto__=W}||function(M,W){for(var ge in W)Object.prototype.hasOwnProperty.call(W,ge)&&(M[ge]=W[ge])})(A,D)},function(A,D){function M(){this.constructor=A}l(A,D),A.prototype=D===null?Object.create(D):(M.prototype=D.prototype,new M)}),u=/^\w[\w\d+.-]*$/,d=/^\//,f=/^\/\//,g="",p="/",_=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/,v=function(){function A(D,M,W,ge,se,ae){ae===void 0&&(ae=!1),typeof D=="object"?(this.scheme=D.scheme||g,this.authority=D.authority||g,this.path=D.path||g,this.query=D.query||g,this.fragment=D.fragment||g):(this.scheme=function(we,De){return we||De?we:"file"}(D,ae),this.authority=M||g,this.path=function(we,De){switch(we){case"https":case"http":case"file":De?De[0]!==p&&(De=p+De):De=p}return De}(this.scheme,W||g),this.query=ge||g,this.fragment=se||g,function(we,De){if(!we.scheme&&De)throw new Error('[UriError]: Scheme is missing: {scheme: "", authority: "'+we.authority+'", path: "'+we.path+'", query: "'+we.query+'", fragment: "'+we.fragment+'"}');if(we.scheme&&!u.test(we.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(we.path){if(we.authority){if(!d.test(we.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(f.test(we.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}(this,ae))}return A.isUri=function(D){return D instanceof A||!!D&&typeof D.authority=="string"&&typeof D.fragment=="string"&&typeof D.path=="string"&&typeof D.query=="string"&&typeof D.scheme=="string"&&typeof D.fsPath=="function"&&typeof D.with=="function"&&typeof D.toString=="function"},Object.defineProperty(A.prototype,"fsPath",{get:function(){return w(this,!1)},enumerable:!1,configurable:!0}),A.prototype.with=function(D){if(!D)return this;var M=D.scheme,W=D.authority,ge=D.path,se=D.query,ae=D.fragment;return M===void 0?M=this.scheme:M===null&&(M=g),W===void 0?W=this.authority:W===null&&(W=g),ge===void 0?ge=this.path:ge===null&&(ge=g),se===void 0?se=this.query:se===null&&(se=g),ae===void 0?ae=this.fragment:ae===null&&(ae=g),M===this.scheme&&W===this.authority&&ge===this.path&&se===this.query&&ae===this.fragment?this:new C(M,W,ge,se,ae)},A.parse=function(D,M){M===void 0&&(M=!1);var W=_.exec(D);return W?new C(W[2]||g,B(W[4]||g),B(W[5]||g),B(W[7]||g),B(W[9]||g),M):new C(g,g,g,g,g)},A.file=function(D){var M=g;if(o&&(D=D.replace(/\\/g,p)),D[0]===p&&D[1]===p){var W=D.indexOf(p,2);W===-1?(M=D.substring(2),D=p):(M=D.substring(2,W),D=D.substring(W)||p)}return new C("file",M,D,g,g)},A.from=function(D){return new C(D.scheme,D.authority,D.path,D.query,D.fragment)},A.prototype.toString=function(D){return D===void 0&&(D=!1),L(this,D)},A.prototype.toJSON=function(){return this},A.revive=function(D){if(D){if(D instanceof A)return D;var M=new C(D);return M._formatted=D.external,M._fsPath=D._sep===b?D.fsPath:null,M}return D},A}(),b=o?1:void 0,C=function(A){function D(){var M=A!==null&&A.apply(this,arguments)||this;return M._formatted=null,M._fsPath=null,M}return h(D,A),Object.defineProperty(D.prototype,"fsPath",{get:function(){return this._fsPath||(this._fsPath=w(this,!1)),this._fsPath},enumerable:!1,configurable:!0}),D.prototype.toString=function(M){return M===void 0&&(M=!1),M?L(this,!0):(this._formatted||(this._formatted=L(this,!1)),this._formatted)},D.prototype.toJSON=function(){var M={$mid:1};return this._fsPath&&(M.fsPath=this._fsPath,M._sep=b),this._formatted&&(M.external=this._formatted),this.path&&(M.path=this.path),this.scheme&&(M.scheme=this.scheme),this.authority&&(M.authority=this.authority),this.query&&(M.query=this.query),this.fragment&&(M.fragment=this.fragment),M},D}(v),y=((c={})[58]="%3A",c[47]="%2F",c[63]="%3F",c[35]="%23",c[91]="%5B",c[93]="%5D",c[64]="%40",c[33]="%21",c[36]="%24",c[38]="%26",c[39]="%27",c[40]="%28",c[41]="%29",c[42]="%2A",c[43]="%2B",c[44]="%2C",c[59]="%3B",c[61]="%3D",c[32]="%20",c);function x(A,D){for(var M=void 0,W=-1,ge=0;ge<A.length;ge++){var se=A.charCodeAt(ge);if(se>=97&&se<=122||se>=65&&se<=90||se>=48&&se<=57||se===45||se===46||se===95||se===126||D&&se===47)W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M!==void 0&&(M+=A.charAt(ge));else{M===void 0&&(M=A.substr(0,ge));var ae=y[se];ae!==void 0?(W!==-1&&(M+=encodeURIComponent(A.substring(W,ge)),W=-1),M+=ae):W===-1&&(W=ge)}}return W!==-1&&(M+=encodeURIComponent(A.substring(W))),M!==void 0?M:A}function S(A){for(var D=void 0,M=0;M<A.length;M++){var W=A.charCodeAt(M);W===35||W===63?(D===void 0&&(D=A.substr(0,M)),D+=y[W]):D!==void 0&&(D+=A[M])}return D!==void 0?D:A}function w(A,D){var M;return M=A.authority&&A.path.length>1&&A.scheme==="file"?"//"+A.authority+A.path:A.path.charCodeAt(0)===47&&(A.path.charCodeAt(1)>=65&&A.path.charCodeAt(1)<=90||A.path.charCodeAt(1)>=97&&A.path.charCodeAt(1)<=122)&&A.path.charCodeAt(2)===58?D?A.path.substr(1):A.path[1].toLowerCase()+A.path.substr(2):A.path,o&&(M=M.replace(/\//g,"\\")),M}function L(A,D){var M=D?S:x,W="",ge=A.scheme,se=A.authority,ae=A.path,we=A.query,De=A.fragment;if(ge&&(W+=ge,W+=":"),(se||ge==="file")&&(W+=p,W+=p),se){var ct=se.indexOf("@");if(ct!==-1){var Ci=se.substr(0,ct);se=se.substr(ct+1),(ct=Ci.indexOf(":"))===-1?W+=M(Ci,!1):(W+=M(Ci.substr(0,ct),!1),W+=":",W+=M(Ci.substr(ct+1),!1)),W+="@"}(ct=(se=se.toLowerCase()).indexOf(":"))===-1?W+=M(se,!1):(W+=M(se.substr(0,ct),!1),W+=se.substr(ct))}if(ae){if(ae.length>=3&&ae.charCodeAt(0)===47&&ae.charCodeAt(2)===58)(Yt=ae.charCodeAt(1))>=65&&Yt<=90&&(ae="/"+String.fromCharCode(Yt+32)+":"+ae.substr(3));else if(ae.length>=2&&ae.charCodeAt(1)===58){var Yt;(Yt=ae.charCodeAt(0))>=65&&Yt<=90&&(ae=String.fromCharCode(Yt+32)+":"+ae.substr(2))}W+=M(ae,!0)}return we&&(W+="?",W+=M(we,!1)),De&&(W+="#",W+=D?De:x(De,!1)),W}function N(A){try{return decodeURIComponent(A)}catch{return A.length>3?A.substr(0,3)+N(A.substr(3)):A}}var P=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function B(A){return A.match(P)?A.replace(P,function(D){return N(D)}):A}var U,j=s(470),re=function(){for(var A=0,D=0,M=arguments.length;D<M;D++)A+=arguments[D].length;var W=Array(A),ge=0;for(D=0;D<M;D++)for(var se=arguments[D],ae=0,we=se.length;ae<we;ae++,ge++)W[ge]=se[ae];return W},te=j.posix||j;(function(A){A.joinPath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];return D.with({path:te.join.apply(te,re([D.path],M))})},A.resolvePath=function(D){for(var M=[],W=1;W<arguments.length;W++)M[W-1]=arguments[W];var ge=D.path||"/";return D.with({path:te.resolve.apply(te,re([ge],M))})},A.dirname=function(D){var M=te.dirname(D.path);return M.length===1&&M.charCodeAt(0)===46?D:D.with({path:M})},A.basename=function(D){return te.basename(D.path)},A.extname=function(D){return te.extname(D.path)}})(U||(U={}))}},e={};function t(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return r[i](n,n.exports,t),n.exports}return t.d=(i,n)=>{for(var s in n)t.o(n,s)&&!t.o(i,s)&&Object.defineProperty(i,s,{enumerable:!0,get:n[s]})},t.o=(i,n)=>Object.prototype.hasOwnProperty.call(i,n),t.r=i=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(i,"__esModule",{value:!0})},t(447)})();function ld(r){if(!!r)return{character:r.column-1,line:r.lineNumber-1}}function iwe(r){if(!!r)return{start:ld(r.getStartPosition()),end:ld(r.getEndPosition())}}function xo(r){if(!!r)return new dl(r.start.line+1,r.start.character+1,r.end.line+1,r.end.character+1)}function nwe(r){return typeof r.insert!="undefined"&&typeof r.replace!="undefined"}function rwe(r){var e=pe.CompletionItemKind;switch(r){case dn.Text:return e.Text;case dn.Method:return e.Method;case dn.Function:return e.Function;case dn.Constructor:return e.Constructor;case dn.Field:return e.Field;case dn.Variable:return e.Variable;case dn.Class:return e.Class;case dn.Interface:return e.Interface;case dn.Module:return e.Module;case dn.Property:return e.Property;case dn.Unit:return e.Unit;case dn.Value:return e.Value;case dn.Enum:return e.Enum;case dn.Keyword:return e.Keyword;case dn.Snippet:return e.Snippet;case dn.Color:return e.Color;case dn.File:return e.File;case dn.Reference:return e.Reference}return e.Property}function PR(r){if(!!r)return{range:xo(r.range),text:r.newText}}function swe(r){return r&&r.command==="editor.action.triggerSuggest"?{id:r.command,title:r.title,arguments:r.arguments}:void 0}var AH=function(){function r(e){this._worker=e}return Object.defineProperty(r.prototype,"triggerCharacters",{get:function(){return[".",":","<",'"',"=","/"]},enumerable:!1,configurable:!0}),r.prototype.provideCompletionItems=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doComplete(s.toString(),ld(t))}).then(function(o){if(!!o){var a=e.getWordUntilPosition(t),l=new dl(t.lineNumber,a.startColumn,t.lineNumber,a.endColumn),c=o.items.map(function(h){var u={label:h.label,insertText:h.insertText||h.label,sortText:h.sortText,filterText:h.filterText,documentation:h.documentation,command:swe(h.command),detail:h.detail,range:l,kind:rwe(h.kind)};return h.textEdit&&(nwe(h.textEdit)?u.range={insert:xo(h.textEdit.insert),replace:xo(h.textEdit.replace)}:u.range=xo(h.textEdit.range),u.insertText=h.textEdit.newText),h.additionalTextEdits&&(u.additionalTextEdits=h.additionalTextEdits.map(PR)),h.insertTextFormat===RR.Snippet&&(u.insertTextRules=pe.CompletionItemInsertTextRule.InsertAsSnippet),u});return{isIncomplete:o.isIncomplete,suggestions:c}}})},r}();function owe(r){return r&&typeof r=="object"&&typeof r.kind=="string"}function RH(r){return typeof r=="string"?{value:r}:owe(r)?r.kind==="plaintext"?{value:r.value.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}:{value:r.value}:{value:"```"+r.language+` -`+r.value+"\n```\n"}}function awe(r){if(!!r)return Array.isArray(r)?r.map(RH):[RH(r)]}var MH=function(){function r(e){this._worker=e}return r.prototype.provideHover=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.doHover(n.toString(),ld(t))}).then(function(s){if(!!s)return{range:xo(s.range),contents:awe(s.contents)}})},r}();function lwe(r){var e=pe.DocumentHighlightKind;switch(r){case Db.Read:return e.Read;case Db.Write:return e.Write;case Db.Text:return e.Text}return e.Text}var PH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentHighlights=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.findDocumentHighlights(n.toString(),ld(t))}).then(function(s){if(!!s)return s.map(function(o){return{range:xo(o.range),kind:lwe(o.kind)}})})},r}();function cwe(r){var e=pe.SymbolKind;switch(r){case fn.File:return e.Array;case fn.Module:return e.Module;case fn.Namespace:return e.Namespace;case fn.Package:return e.Package;case fn.Class:return e.Class;case fn.Method:return e.Method;case fn.Property:return e.Property;case fn.Field:return e.Field;case fn.Constructor:return e.Constructor;case fn.Enum:return e.Enum;case fn.Interface:return e.Interface;case fn.Function:return e.Function;case fn.Variable:return e.Variable;case fn.Constant:return e.Constant;case fn.String:return e.String;case fn.Number:return e.Number;case fn.Boolean:return e.Boolean;case fn.Array:return e.Array}return e.Function}var OH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentSymbols=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentSymbols(i.toString())}).then(function(n){if(!!n)return n.map(function(s){return{name:s.name,detail:"",containerName:s.containerName,kind:cwe(s.kind),tags:[],range:xo(s.location.range),selectionRange:xo(s.location.range)}})})},r}(),FH=function(){function r(e){this._worker=e}return r.prototype.provideLinks=function(e,t){var i=e.uri;return this._worker(i).then(function(n){return n.findDocumentLinks(i.toString())}).then(function(n){if(!!n)return{links:n.map(function(s){return{range:xo(s.range),url:s.target}})}})},r}();function BH(r){return{tabSize:r.tabSize,insertSpaces:r.insertSpaces}}var WH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentFormattingEdits=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.format(n.toString(),null,BH(t)).then(function(o){if(!(!o||o.length===0))return o.map(PR)})})},r}(),VH=function(){function r(e){this._worker=e}return r.prototype.provideDocumentRangeFormattingEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.format(s.toString(),iwe(t),BH(i)).then(function(a){if(!(!a||a.length===0))return a.map(PR)})})},r}(),HH=function(){function r(e){this._worker=e}return r.prototype.provideRenameEdits=function(e,t,i,n){var s=e.uri;return this._worker(s).then(function(o){return o.doRename(s.toString(),ld(t),i)}).then(function(o){return hwe(o)})},r}();function hwe(r){if(!(!r||!r.changes)){var e=[];for(var t in r.changes)for(var i=Ec.parse(t),n=0,s=r.changes[t];n<s.length;n++){var o=s[n];e.push({resource:i,edit:{range:xo(o.range),text:o.newText}})}return{edits:e}}}var zH=function(){function r(e){this._worker=e}return r.prototype.provideFoldingRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getFoldingRanges(n.toString(),t)}).then(function(s){if(!!s)return s.map(function(o){var a={start:o.startLine+1,end:o.endLine+1};return typeof o.kind!="undefined"&&(a.kind=uwe(o.kind)),a})})},r}();function uwe(r){switch(r){case yb.Comment:return pe.FoldingRangeKind.Comment;case yb.Imports:return pe.FoldingRangeKind.Imports;case yb.Region:return pe.FoldingRangeKind.Region}}var $H=function(){function r(e){this._worker=e}return r.prototype.provideSelectionRanges=function(e,t,i){var n=e.uri;return this._worker(n).then(function(s){return s.getSelectionRanges(n.toString(),t.map(ld))}).then(function(s){if(!!s)return s.map(function(o){for(var a=[];o;)a.push({range:xo(o.range)}),o=o.parent;return a})})},r}();function dwe(r){var e=new U6(r),t=function(){for(var n=[],s=0;s<arguments.length;s++)n[s]=arguments[s];return e.getLanguageServiceWorker.apply(e,n)},i=r.languageId;pe.registerCompletionItemProvider(i,new AH(t)),pe.registerHoverProvider(i,new MH(t)),pe.registerDocumentHighlightProvider(i,new PH(t)),pe.registerLinkProvider(i,new FH(t)),pe.registerFoldingRangeProvider(i,new zH(t)),pe.registerDocumentSymbolProvider(i,new OH(t)),pe.registerSelectionRangeProvider(i,new $H(t)),pe.registerRenameProvider(i,new HH(t)),i==="html"&&(pe.registerDocumentFormattingEditProvider(i,new WH(t)),pe.registerDocumentRangeFormattingEditProvider(i,new VH(t)))}function fwe(r){var e=[],t=[],i=new U6(r);e.push(i);var n=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return i.getLanguageServiceWorker.apply(i,o)};function s(){var o=r.languageId,a=r.modeConfiguration;jH(t),a.completionItems&&t.push(pe.registerCompletionItemProvider(o,new AH(n))),a.hovers&&t.push(pe.registerHoverProvider(o,new MH(n))),a.documentHighlights&&t.push(pe.registerDocumentHighlightProvider(o,new PH(n))),a.links&&t.push(pe.registerLinkProvider(o,new FH(n))),a.documentSymbols&&t.push(pe.registerDocumentSymbolProvider(o,new OH(n))),a.rename&&t.push(pe.registerRenameProvider(o,new HH(n))),a.foldingRanges&&t.push(pe.registerFoldingRangeProvider(o,new zH(n))),a.selectionRanges&&t.push(pe.registerSelectionRangeProvider(o,new $H(n))),a.documentFormattingEdits&&t.push(pe.registerDocumentFormattingEditProvider(o,new WH(n))),a.documentRangeFormattingEdits&&t.push(pe.registerDocumentRangeFormattingEditProvider(o,new VH(n)))}return s(),e.push(UH(t)),UH(e)}function UH(r){return{dispose:function(){return jH(r)}}}function jH(r){for(;r.length;)r.pop().dispose()}var gwe=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",setupMode1:dwe,setupMode:fwe});export{lt as C,qoe as K,dl as R,ti as T,j0e as W,pe as a,U0e as b,Koe as c,_e as d,At as e,Bn as f,mwe as l,$0e as m,h4 as t}; diff --git a/magic-editor/src/main/resources/magic-editor/assets/vue.d1ea1415.js b/magic-editor/src/main/resources/magic-editor/assets/vue.d1ea1415.js new file mode 100644 index 00000000..d0565e9f --- /dev/null +++ b/magic-editor/src/main/resources/magic-editor/assets/vue.d1ea1415.js @@ -0,0 +1,4 @@ +function In(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const Lo="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",Do=In(Lo),Uo="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",$o=In(Uo);function ei(e){return!!e||e===""}function tn(e){if(B(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=ne(s)?Vo(s):tn(s);if(r)for(const i in r)t[i]=r[i]}return t}else{if(ne(e))return e;if(ie(e))return e}}const jo=/;(?![^(]*\))/g,Ko=/:(.+)/;function Vo(e){const t={};return e.split(jo).forEach(n=>{if(n){const s=n.split(Ko);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function nn(e){let t="";if(ne(e))t=e;else if(B(e))for(let n=0;n<e.length;n++){const s=nn(e[n]);s&&(t+=s+" ")}else if(ie(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function Wo(e){if(!e)return null;let{class:t,style:n}=e;return t&&!ne(t)&&(e.class=nn(t)),n&&(e.style=tn(n)),e}function qo(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=ze(e[s],t[s]);return n}function ze(e,t){if(e===t)return!0;let n=_r(e),s=_r(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=B(e),s=B(t),n||s)return n&&s?qo(e,t):!1;if(n=ie(e),s=ie(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,i=Object.keys(t).length;if(r!==i)return!1;for(const o in e){const l=e.hasOwnProperty(o),c=t.hasOwnProperty(o);if(l&&!c||!l&&c||!ze(e[o],t[o]))return!1}}return String(e)===String(t)}function Nn(e,t){return e.findIndex(n=>ze(n,t))}const zo=e=>ne(e)?e:e==null?"":B(e)||ie(e)&&(e.toString===ni||!j(e.toString))?JSON.stringify(e,ti,2):String(e),ti=(e,t)=>t&&t.__v_isRef?ti(e,t.value):wt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:at(t)?{[`Set(${t.size})`]:[...t.values()]}:ie(t)&&!B(t)&&!si(t)?String(t):t,Y={},Et=[],Te=()=>{},Jo=()=>!1,Yo=/^on[^a-z]/,sn=e=>Yo.test(e),Rs=e=>e.startsWith("onUpdate:"),re=Object.assign,Ps=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Xo=Object.prototype.hasOwnProperty,J=(e,t)=>Xo.call(e,t),B=Array.isArray,wt=e=>Bn(e)==="[object Map]",at=e=>Bn(e)==="[object Set]",_r=e=>e instanceof Date,j=e=>typeof e=="function",ne=e=>typeof e=="string",Fs=e=>typeof e=="symbol",ie=e=>e!==null&&typeof e=="object",Ms=e=>ie(e)&&j(e.then)&&j(e.catch),ni=Object.prototype.toString,Bn=e=>ni.call(e),Zo=e=>Bn(e).slice(8,-1),si=e=>Bn(e)==="[object Object]",Ss=e=>ne(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Dt=In(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),kn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},Qo=/-(\w)/g,ye=kn(e=>e.replace(Qo,(t,n)=>n?n.toUpperCase():"")),Go=/\B([A-Z])/g,Fe=kn(e=>e.replace(Go,"-$1").toLowerCase()),rn=kn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ut=kn(e=>e?`on${rn(e)}`:""),Yt=(e,t)=>!Object.is(e,t),Tt=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},wn=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Je=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let br;const el=()=>br||(br=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ee;class Os{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Ee&&(this.parent=Ee,this.index=(Ee.scopes||(Ee.scopes=[])).push(this)-1)}run(t){if(this.active)try{return Ee=this,t()}finally{Ee=this.parent}}on(){Ee=this}off(){Ee=this.parent}stop(t){if(this.active){let n,s;for(n=0,s=this.effects.length;n<s;n++)this.effects[n].stop();for(n=0,s=this.cleanups.length;n<s;n++)this.cleanups[n]();if(this.scopes)for(n=0,s=this.scopes.length;n<s;n++)this.scopes[n].stop(!0);if(this.parent&&!t){const r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.active=!1}}}function tl(e){return new Os(e)}function ri(e,t=Ee){t&&t.active&&t.effects.push(e)}function nl(){return Ee}function sl(e){Ee&&Ee.cleanups.push(e)}const Is=e=>{const t=new Set(e);return t.w=0,t.n=0,t},ii=e=>(e.w&Ye)>0,oi=e=>(e.n&Ye)>0,rl=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=Ye},il=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const r=t[s];ii(r)&&!oi(r)?r.delete(e):t[n++]=r,r.w&=~Ye,r.n&=~Ye}t.length=n}},cs=new WeakMap;let kt=0,Ye=1;const fs=30;let Pe;const lt=Symbol(""),us=Symbol("");class on{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],this.parent=void 0,ri(this,s)}run(){if(!this.active)return this.fn();let t=Pe,n=We;for(;t;){if(t===this)return;t=t.parent}try{return this.parent=Pe,Pe=this,We=!0,Ye=1<<++kt,kt<=fs?rl(this):yr(this),this.fn()}finally{kt<=fs&&il(this),Ye=1<<--kt,Pe=this.parent,We=n,this.parent=void 0}}stop(){this.active&&(yr(this),this.onStop&&this.onStop(),this.active=!1)}}function yr(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function ol(e,t){e.effect&&(e=e.effect.fn);const n=new on(e);t&&(re(n,t),t.scope&&ri(n,t.scope)),(!t||!t.lazy)&&n.run();const s=n.run.bind(n);return s.effect=n,s}function ll(e){e.effect.stop()}let We=!0;const li=[];function dt(){li.push(We),We=!1}function ht(){const e=li.pop();We=e===void 0?!0:e}function Ce(e,t,n){if(We&&Pe){let s=cs.get(e);s||cs.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=Is()),ci(r)}}function ci(e,t){let n=!1;kt<=fs?oi(e)||(e.n|=Ye,n=!ii(e)):n=!e.has(Pe),n&&(e.add(Pe),Pe.deps.push(e))}function He(e,t,n,s,r,i){const o=cs.get(e);if(!o)return;let l=[];if(t==="clear")l=[...o.values()];else if(n==="length"&&B(e))o.forEach((c,u)=>{(u==="length"||u>=s)&&l.push(c)});else switch(n!==void 0&&l.push(o.get(n)),t){case"add":B(e)?Ss(n)&&l.push(o.get("length")):(l.push(o.get(lt)),wt(e)&&l.push(o.get(us)));break;case"delete":B(e)||(l.push(o.get(lt)),wt(e)&&l.push(o.get(us)));break;case"set":wt(e)&&l.push(o.get(lt));break}if(l.length===1)l[0]&&as(l[0]);else{const c=[];for(const u of l)u&&c.push(...u);as(Is(c))}}function as(e,t){for(const n of B(e)?e:[...e])(n!==Pe||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const cl=In("__proto__,__v_isRef,__isVue"),fi=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(Fs)),fl=Hn(),ul=Hn(!1,!0),al=Hn(!0),dl=Hn(!0,!0),Cr=hl();function hl(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=q(this);for(let i=0,o=this.length;i<o;i++)Ce(s,"get",i+"");const r=s[t](...n);return r===-1||r===!1?s[t](...n.map(q)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){dt();const s=q(this)[t].apply(this,n);return ht(),s}}),e}function Hn(e=!1,t=!1){return function(s,r,i){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_isShallow")return t;if(r==="__v_raw"&&i===(e?t?mi:gi:t?pi:hi).get(s))return s;const o=B(s);if(!e&&o&&J(Cr,r))return Reflect.get(Cr,r,i);const l=Reflect.get(s,r,i);return(Fs(r)?fi.has(r):cl(r))||(e||Ce(s,"get",r),t)?l:oe(l)?!o||!Ss(r)?l.value:l:ie(l)?e?Bs(l):Un(l):l}}const pl=ui(),gl=ui(!0);function ui(e=!1){return function(n,s,r,i){let o=n[s];if(At(o)&&oe(o)&&!oe(r))return!1;if(!e&&!At(r)&&(ks(r)||(r=q(r),o=q(o)),!B(n)&&oe(o)&&!oe(r)))return o.value=r,!0;const l=B(n)&&Ss(s)?Number(s)<n.length:J(n,s),c=Reflect.set(n,s,r,i);return n===q(i)&&(l?Yt(r,o)&&He(n,"set",s,r):He(n,"add",s,r)),c}}function ml(e,t){const n=J(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&He(e,"delete",t,void 0),s}function _l(e,t){const n=Reflect.has(e,t);return(!Fs(t)||!fi.has(t))&&Ce(e,"has",t),n}function bl(e){return Ce(e,"iterate",B(e)?"length":lt),Reflect.ownKeys(e)}const ai={get:fl,set:pl,deleteProperty:ml,has:_l,ownKeys:bl},di={get:al,set(e,t){return!0},deleteProperty(e,t){return!0}},yl=re({},ai,{get:ul,set:gl}),Cl=re({},di,{get:dl}),Ns=e=>e,Ln=e=>Reflect.getPrototypeOf(e);function an(e,t,n=!1,s=!1){e=e.__v_raw;const r=q(e),i=q(t);t!==i&&!n&&Ce(r,"get",t),!n&&Ce(r,"get",i);const{has:o}=Ln(r),l=s?Ns:n?Ds:Xt;if(o.call(r,t))return l(e.get(t));if(o.call(r,i))return l(e.get(i));e!==r&&e.get(t)}function dn(e,t=!1){const n=this.__v_raw,s=q(n),r=q(e);return e!==r&&!t&&Ce(s,"has",e),!t&&Ce(s,"has",r),e===r?n.has(e):n.has(e)||n.has(r)}function hn(e,t=!1){return e=e.__v_raw,!t&&Ce(q(e),"iterate",lt),Reflect.get(e,"size",e)}function xr(e){e=q(e);const t=q(this);return Ln(t).has.call(t,e)||(t.add(e),He(t,"add",e,e)),this}function Er(e,t){t=q(t);const n=q(this),{has:s,get:r}=Ln(n);let i=s.call(n,e);i||(e=q(e),i=s.call(n,e));const o=r.call(n,e);return n.set(e,t),i?Yt(t,o)&&He(n,"set",e,t):He(n,"add",e,t),this}function wr(e){const t=q(this),{has:n,get:s}=Ln(t);let r=n.call(t,e);r||(e=q(e),r=n.call(t,e)),s&&s.call(t,e);const i=t.delete(e);return r&&He(t,"delete",e,void 0),i}function Tr(){const e=q(this),t=e.size!==0,n=e.clear();return t&&He(e,"clear",void 0,void 0),n}function pn(e,t){return function(s,r){const i=this,o=i.__v_raw,l=q(o),c=t?Ns:e?Ds:Xt;return!e&&Ce(l,"iterate",lt),o.forEach((u,d)=>s.call(r,c(u),c(d),i))}}function gn(e,t,n){return function(...s){const r=this.__v_raw,i=q(r),o=wt(i),l=e==="entries"||e===Symbol.iterator&&o,c=e==="keys"&&o,u=r[e](...s),d=n?Ns:t?Ds:Xt;return!t&&Ce(i,"iterate",c?us:lt),{next(){const{value:h,done:g}=u.next();return g?{value:h,done:g}:{value:l?[d(h[0]),d(h[1])]:d(h),done:g}},[Symbol.iterator](){return this}}}}function Ue(e){return function(...t){return e==="delete"?!1:this}}function xl(){const e={get(i){return an(this,i)},get size(){return hn(this)},has:dn,add:xr,set:Er,delete:wr,clear:Tr,forEach:pn(!1,!1)},t={get(i){return an(this,i,!1,!0)},get size(){return hn(this)},has:dn,add:xr,set:Er,delete:wr,clear:Tr,forEach:pn(!1,!0)},n={get(i){return an(this,i,!0)},get size(){return hn(this,!0)},has(i){return dn.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:pn(!0,!1)},s={get(i){return an(this,i,!0,!0)},get size(){return hn(this,!0)},has(i){return dn.call(this,i,!0)},add:Ue("add"),set:Ue("set"),delete:Ue("delete"),clear:Ue("clear"),forEach:pn(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(i=>{e[i]=gn(i,!1,!1),n[i]=gn(i,!0,!1),t[i]=gn(i,!1,!0),s[i]=gn(i,!0,!0)}),[e,n,t,s]}const[El,wl,Tl,vl]=xl();function Dn(e,t){const n=t?e?vl:Tl:e?wl:El;return(s,r,i)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(J(n,r)&&r in s?n:s,r,i)}const Al={get:Dn(!1,!1)},Rl={get:Dn(!1,!0)},Pl={get:Dn(!0,!1)},Fl={get:Dn(!0,!0)},hi=new WeakMap,pi=new WeakMap,gi=new WeakMap,mi=new WeakMap;function Ml(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Sl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ml(Zo(e))}function Un(e){return At(e)?e:$n(e,!1,ai,Al,hi)}function _i(e){return $n(e,!1,yl,Rl,pi)}function Bs(e){return $n(e,!0,di,Pl,gi)}function Ol(e){return $n(e,!0,Cl,Fl,mi)}function $n(e,t,n,s,r){if(!ie(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const i=r.get(e);if(i)return i;const o=Sl(e);if(o===0)return e;const l=new Proxy(e,o===2?s:n);return r.set(e,l),l}function ct(e){return At(e)?ct(e.__v_raw):!!(e&&e.__v_isReactive)}function At(e){return!!(e&&e.__v_isReadonly)}function ks(e){return!!(e&&e.__v_isShallow)}function Hs(e){return ct(e)||At(e)}function q(e){const t=e&&e.__v_raw;return t?q(t):e}function Ls(e){return wn(e,"__v_skip",!0),e}const Xt=e=>ie(e)?Un(e):e,Ds=e=>ie(e)?Bs(e):e;function Us(e){We&&Pe&&(e=q(e),ci(e.dep||(e.dep=Is())))}function jn(e,t){e=q(e),e.dep&&as(e.dep)}function oe(e){return!!(e&&e.__v_isRef===!0)}function Cn(e){return bi(e,!1)}function Il(e){return bi(e,!0)}function bi(e,t){return oe(e)?e:new Nl(e,t)}class Nl{constructor(t,n){this.__v_isShallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:q(t),this._value=n?t:Xt(t)}get value(){return Us(this),this._value}set value(t){t=this.__v_isShallow?t:q(t),Yt(t,this._rawValue)&&(this._rawValue=t,this._value=this.__v_isShallow?t:Xt(t),jn(this))}}function Bl(e){jn(e)}function yi(e){return oe(e)?e.value:e}const kl={get:(e,t,n)=>yi(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return oe(r)&&!oe(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function $s(e){return ct(e)?e:new Proxy(e,kl)}class Hl{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>Us(this),()=>jn(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function Ll(e){return new Hl(e)}function Dl(e){const t=B(e)?new Array(e.length):{};for(const n in e)t[n]=Ci(e,n);return t}class Ul{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function Ci(e,t,n){const s=e[t];return oe(s)?s:new Ul(e,t,n)}class $l{constructor(t,n,s,r){this._setter=n,this.dep=void 0,this.__v_isRef=!0,this._dirty=!0,this.effect=new on(t,()=>{this._dirty||(this._dirty=!0,jn(this))}),this.effect.computed=this,this.effect.active=this._cacheable=!r,this.__v_isReadonly=s}get value(){const t=q(this);return Us(t),(t._dirty||!t._cacheable)&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function jl(e,t,n=!1){let s,r;const i=j(e);return i?(s=e,r=Te):(s=e.get,r=e.set),new $l(s,r,i||!r,n)}Promise.resolve();const $t=[];function xi(e,...t){dt();const n=$t.length?$t[$t.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Kl();if(s)Me(s,n,11,[e+t.join(""),n&&n.proxy,r.map(({vnode:i})=>`at <${ho(n,i.type)}>`).join(` +`),r]);else{const i=[`[Vue warn]: ${e}`,...t];r.length&&i.push(` +`,...Vl(r)),console.warn(...i)}ht()}function Kl(){let e=$t[$t.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function Vl(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` +`],...Wl(n))}),t}function Wl({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${ho(e.component,e.type,s)}`,i=">"+n;return e.props?[r,...ql(e.props),i]:[r+i]}function ql(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...Ei(s,e[s]))}),n.length>3&&t.push(" ..."),t}function Ei(e,t,n){return ne(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:oe(t)?(t=Ei(e,q(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):j(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=q(t),n?t:[`${e}=`,t])}function Me(e,t,n,s){let r;try{r=s?e(...s):e()}catch(i){pt(i,t,n)}return r}function be(e,t,n,s){if(j(e)){const i=Me(e,t,n,s);return i&&Ms(i)&&i.catch(o=>{pt(o,t,n)}),i}const r=[];for(let i=0;i<e.length;i++)r.push(be(e[i],t,n,s));return r}function pt(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let i=t.parent;const o=t.proxy,l=n;for(;i;){const u=i.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,o,l)===!1)return}i=i.parent}const c=t.appContext.config.errorHandler;if(c){Me(c,null,10,[e,o,l]);return}}zl(e,n,r,s)}function zl(e,t,n,s=!0){console.error(e)}let Tn=!1,ds=!1;const me=[];let Be=0;const jt=[];let Ht=null,yt=0;const Kt=[];let Ke=null,Ct=0;const wi=Promise.resolve();let js=null,hs=null;function Ks(e){const t=js||wi;return e?t.then(this?e.bind(this):e):t}function Jl(e){let t=Be+1,n=me.length;for(;t<n;){const s=t+n>>>1;Zt(me[s])<e?t=s+1:n=s}return t}function Vs(e){(!me.length||!me.includes(e,Tn&&e.allowRecurse?Be+1:Be))&&e!==hs&&(e.id==null?me.push(e):me.splice(Jl(e.id),0,e),Ti())}function Ti(){!Tn&&!ds&&(ds=!0,js=wi.then(Ai))}function Yl(e){const t=me.indexOf(e);t>Be&&me.splice(t,1)}function vi(e,t,n,s){B(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?s+1:s))&&n.push(e),Ti()}function Xl(e){vi(e,Ht,jt,yt)}function Ws(e){vi(e,Ke,Kt,Ct)}function qs(e,t=null){if(jt.length){for(hs=t,Ht=[...new Set(jt)],jt.length=0,yt=0;yt<Ht.length;yt++)Ht[yt]();Ht=null,yt=0,hs=null,qs(e,t)}}function vn(e){if(Kt.length){const t=[...new Set(Kt)];if(Kt.length=0,Ke){Ke.push(...t);return}for(Ke=t,Ke.sort((n,s)=>Zt(n)-Zt(s)),Ct=0;Ct<Ke.length;Ct++)Ke[Ct]();Ke=null,Ct=0}}const Zt=e=>e.id==null?1/0:e.id;function Ai(e){ds=!1,Tn=!0,qs(e),me.sort((n,s)=>Zt(n)-Zt(s));const t=Te;try{for(Be=0;Be<me.length;Be++){const n=me[Be];n&&n.active!==!1&&Me(n,null,14)}}finally{Be=0,me.length=0,vn(),Tn=!1,js=null,(me.length||jt.length||Kt.length)&&Ai(e)}}let xt,mn=[];function Ri(e,t){var n,s;xt=e,xt?(xt.enabled=!0,mn.forEach(({event:r,args:i})=>xt.emit(r,...i)),mn=[]):typeof window!="undefined"&&window.HTMLElement&&!(!((s=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||s===void 0)&&s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(i=>{Ri(i,t)}),setTimeout(()=>{xt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,mn=[])},3e3)):mn=[]}function Zl(e,t,...n){const s=e.vnode.props||Y;let r=n;const i=t.startsWith("update:"),o=i&&t.slice(7);if(o&&o in s){const d=`${o==="modelValue"?"model":o}Modifiers`,{number:h,trim:g}=s[d]||Y;g?r=n.map(T=>T.trim()):h&&(r=n.map(Je))}let l,c=s[l=Ut(t)]||s[l=Ut(ye(t))];!c&&i&&(c=s[l=Ut(Fe(t))]),c&&be(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,be(u,e,6,r)}}function Pi(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const i=e.emits;let o={},l=!1;if(!j(e)){const c=u=>{const d=Pi(u,t,!0);d&&(l=!0,re(o,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!i&&!l?(s.set(e,null),null):(B(i)?i.forEach(c=>o[c]=null):re(o,i),s.set(e,o),o)}function zs(e,t){return!e||!sn(t)?!1:(t=t.slice(2).replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,Fe(t))||J(e,t))}let _e=null,Kn=null;function Qt(e){const t=_e;return _e=e,Kn=e&&e.type.__scopeId||null,t}function Ql(e){Kn=e}function Gl(){Kn=null}const ec=e=>Js;function Js(e,t=_e,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&bs(-1);const i=Qt(t),o=e(...r);return Qt(i),s._d&&bs(1),o};return s._n=!0,s._c=!0,s._d=!0,s}function xn(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:i,propsOptions:[o],slots:l,attrs:c,emit:u,render:d,renderCache:h,data:g,setupState:T,ctx:F,inheritAttrs:H}=e;let _,b;const p=Qt(e);try{if(n.shapeFlag&4){const w=r||s;_=ge(d.call(w,w,h,i,T,g,F)),b=c}else{const w=t;_=ge(w.length>1?w(i,{attrs:c,slots:l,emit:u}):w(i,null)),b=t.props?c:nc(c)}}catch(w){zt.length=0,pt(w,e,1),_=ee(de)}let x=_;if(b&&H!==!1){const w=Object.keys(b),{shapeFlag:O}=x;w.length&&O&7&&(o&&w.some(Rs)&&(b=sc(b,o)),x=Ze(x,b))}return n.dirs&&(x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&(x.transition=n.transition),_=x,Qt(p),_}function tc(e){let t;for(let n=0;n<e.length;n++){const s=e[n];if(Xe(s)){if(s.type!==de||s.children==="v-if"){if(t)return;t=s}}else return}return t}const nc=e=>{let t;for(const n in e)(n==="class"||n==="style"||sn(n))&&((t||(t={}))[n]=e[n]);return t},sc=(e,t)=>{const n={};for(const s in e)(!Rs(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function rc(e,t,n){const{props:s,children:r,component:i}=e,{props:o,children:l,patchFlag:c}=t,u=i.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?vr(s,o,u):!!o;if(c&8){const d=t.dynamicProps;for(let h=0;h<d.length;h++){const g=d[h];if(o[g]!==s[g]&&!zs(u,g))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===o?!1:s?o?vr(s,o,u):!0:!!o;return!1}function vr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const i=s[r];if(t[i]!==e[i]&&!zs(n,i))return!0}return!1}function Ys({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const ic=e=>e.__isSuspense,oc={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,i,o,l,c,u){e==null?cc(t,n,s,r,i,o,l,c,u):fc(e,t,n,s,r,o,l,c,u)},hydrate:uc,create:Xs,normalize:ac},lc=oc;function Gt(e,t){const n=e.props&&e.props[t];j(n)&&n()}function cc(e,t,n,s,r,i,o,l,c){const{p:u,o:{createElement:d}}=c,h=d("div"),g=e.suspense=Xs(e,r,s,t,h,n,i,o,l,c);u(null,g.pendingBranch=e.ssContent,h,null,s,g,i,o),g.deps>0?(Gt(e,"onPending"),Gt(e,"onFallback"),u(null,e.ssFallback,t,n,s,null,i,o),vt(g,e.ssFallback)):g.resolve()}function fc(e,t,n,s,r,i,o,l,{p:c,um:u,o:{createElement:d}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const g=t.ssContent,T=t.ssFallback,{activeBranch:F,pendingBranch:H,isInFallback:_,isHydrating:b}=h;if(H)h.pendingBranch=g,Re(g,H)?(c(H,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0?h.resolve():_&&(c(F,T,n,s,r,null,i,o,l),vt(h,T))):(h.pendingId++,b?(h.isHydrating=!1,h.activeBranch=H):u(H,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=d("div"),_?(c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0?h.resolve():(c(F,T,n,s,r,null,i,o,l),vt(h,T))):F&&Re(g,F)?(c(F,g,n,s,r,h,i,o,l),h.resolve(!0)):(c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0&&h.resolve()));else if(F&&Re(g,F))c(F,g,n,s,r,h,i,o,l),vt(h,g);else if(Gt(t,"onPending"),h.pendingBranch=g,h.pendingId++,c(null,g,h.hiddenContainer,null,r,h,i,o,l),h.deps<=0)h.resolve();else{const{timeout:p,pendingId:x}=h;p>0?setTimeout(()=>{h.pendingId===x&&h.fallback(T)},p):p===0&&h.fallback(T)}}function Xs(e,t,n,s,r,i,o,l,c,u,d=!1){const{p:h,m:g,um:T,n:F,o:{parentNode:H,remove:_}}=u,b=Je(e.props&&e.props.timeout),p={vnode:e,parent:t,parentComponent:n,isSVG:o,container:s,hiddenContainer:r,anchor:i,deps:0,pendingId:0,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:d,isUnmounted:!1,effects:[],resolve(x=!1){const{vnode:w,activeBranch:O,pendingBranch:I,pendingId:v,effects:k,parentComponent:L,container:$}=p;if(p.isHydrating)p.isHydrating=!1;else if(!x){const W=O&&I.transition&&I.transition.mode==="out-in";W&&(O.transition.afterLeave=()=>{v===p.pendingId&&g(I,$,Z,0)});let{anchor:Z}=p;O&&(Z=F(O),T(O,L,p,!0)),W||g(I,$,Z,0)}vt(p,I),p.pendingBranch=null,p.isInFallback=!1;let K=p.parent,R=!1;for(;K;){if(K.pendingBranch){K.effects.push(...k),R=!0;break}K=K.parent}R||Ws(k),p.effects=[],Gt(w,"onResolve")},fallback(x){if(!p.pendingBranch)return;const{vnode:w,activeBranch:O,parentComponent:I,container:v,isSVG:k}=p;Gt(w,"onFallback");const L=F(O),$=()=>{!p.isInFallback||(h(null,x,v,L,I,null,k,l,c),vt(p,x))},K=x.transition&&x.transition.mode==="out-in";K&&(O.transition.afterLeave=$),p.isInFallback=!0,T(O,I,null,!0),K||$()},move(x,w,O){p.activeBranch&&g(p.activeBranch,x,w,O),p.container=x},next(){return p.activeBranch&&F(p.activeBranch)},registerDep(x,w){const O=!!p.pendingBranch;O&&p.deps++;const I=x.vnode.el;x.asyncDep.catch(v=>{pt(v,x,0)}).then(v=>{if(x.isUnmounted||p.isUnmounted||p.pendingId!==x.suspenseId)return;x.asyncResolved=!0;const{vnode:k}=x;xs(x,v,!1),I&&(k.el=I);const L=!I&&x.subTree.el;w(x,k,H(I||x.subTree.el),I?null:F(x.subTree),p,o,c),L&&_(L),Ys(x,k.el),O&&--p.deps===0&&p.resolve()})},unmount(x,w){p.isUnmounted=!0,p.activeBranch&&T(p.activeBranch,n,x,w),p.pendingBranch&&T(p.pendingBranch,n,x,w)}};return p}function uc(e,t,n,s,r,i,o,l,c){const u=t.suspense=Xs(t,s,n,e.parentNode,document.createElement("div"),null,r,i,o,l,!0),d=c(e,u.pendingBranch=t.ssContent,n,u,i,o);return u.deps===0&&u.resolve(),d}function ac(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Ar(s?n.default:n),e.ssFallback=s?Ar(n.fallback):ee(de)}function Ar(e){let t;if(j(e)){const n=Ft&&e._c;n&&(e._d=!1,Yn()),e=e(),n&&(e._d=!0,t=Se,to())}return B(e)&&(e=tc(e)),e=ge(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Fi(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):Ws(e)}function vt(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e,r=n.el=t.el;s&&s.subTree===n&&(s.vnode.el=r,Ys(s,r))}function Mi(e,t){if(le){let n=le.provides;const s=le.parent&&le.parent.provides;s===n&&(n=le.provides=Object.create(s)),n[e]=t}}function Vt(e,t,n=!1){const s=le||_e;if(s){const r=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&j(t)?t.call(s.proxy):t}}function dc(e,t){return ln(e,null,t)}function Si(e,t){return ln(e,null,{flush:"post"})}function hc(e,t){return ln(e,null,{flush:"sync"})}const Rr={};function Wt(e,t,n){return ln(e,t,n)}function ln(e,t,{immediate:n,deep:s,flush:r,onTrack:i,onTrigger:o}=Y){const l=le;let c,u=!1,d=!1;if(oe(e)?(c=()=>e.value,u=ks(e)):ct(e)?(c=()=>e,s=!0):B(e)?(d=!0,u=e.some(ct),c=()=>e.map(b=>{if(oe(b))return b.value;if(ct(b))return ot(b);if(j(b))return Me(b,l,2)})):j(e)?t?c=()=>Me(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return h&&h(),be(e,l,3,[g])}:c=Te,t&&s){const b=c;c=()=>ot(b())}let h,g=b=>{h=_.onStop=()=>{Me(b,l,4)}};if(Mt)return g=Te,t?n&&be(t,l,3,[c(),d?[]:void 0,g]):c(),Te;let T=d?[]:Rr;const F=()=>{if(!!_.active)if(t){const b=_.run();(s||u||(d?b.some((p,x)=>Yt(p,T[x])):Yt(b,T)))&&(h&&h(),be(t,l,3,[b,T===Rr?void 0:T,g]),T=b)}else _.run()};F.allowRecurse=!!t;let H;r==="sync"?H=F:r==="post"?H=()=>fe(F,l&&l.suspense):H=()=>{!l||l.isMounted?Xl(F):F()};const _=new on(c,H);return t?n?F():T=_.run():r==="post"?fe(_.run.bind(_),l&&l.suspense):_.run(),()=>{_.stop(),l&&l.scope&&Ps(l.scope.effects,_)}}function pc(e,t,n){const s=this.proxy,r=ne(e)?e.includes(".")?Oi(s,e):()=>s[e]:e.bind(s,s);let i;j(t)?i=t:(i=t.handler,n=t);const o=le;Qe(this);const l=ln(r,i.bind(s),n);return o?Qe(o):qe(),l}function Oi(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function ot(e,t){if(!ie(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),oe(e))ot(e.value,t);else if(B(e))for(let n=0;n<e.length;n++)ot(e[n],t);else if(at(e)||wt(e))e.forEach(n=>{ot(n,t)});else if(si(e))for(const n in e)ot(e[n],t);return e}function Zs(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return fn(()=>{e.isMounted=!0}),zn(()=>{e.isUnmounting=!0}),e}const xe=[Function,Array],gc={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xe,onEnter:xe,onAfterEnter:xe,onEnterCancelled:xe,onBeforeLeave:xe,onLeave:xe,onAfterLeave:xe,onLeaveCancelled:xe,onBeforeAppear:xe,onAppear:xe,onAfterAppear:xe,onAppearCancelled:xe},setup(e,{slots:t}){const n=et(),s=Zs();let r;return()=>{const i=t.default&&Vn(t.default(),!0);if(!i||!i.length)return;const o=q(e),{mode:l}=o,c=i[0];if(s.isLeaving)return ts(c);const u=Pr(c);if(!u)return ts(c);const d=Rt(u,o,s,n);ut(u,d);const h=n.subTree,g=h&&Pr(h);let T=!1;const{getTransitionKey:F}=u.type;if(F){const H=F();r===void 0?r=H:H!==r&&(r=H,T=!0)}if(g&&g.type!==de&&(!Re(u,g)||T)){const H=Rt(g,o,s,n);if(ut(g,H),l==="out-in")return s.isLeaving=!0,H.afterLeave=()=>{s.isLeaving=!1,n.update()},ts(c);l==="in-out"&&u.type!==de&&(H.delayLeave=(_,b,p)=>{const x=Ii(s,g);x[String(g.key)]=g,_._leaveCb=()=>{b(),_._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=p})}return c}}},Qs=gc;function Ii(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function Rt(e,t,n,s){const{appear:r,mode:i,persisted:o=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:g,onAfterLeave:T,onLeaveCancelled:F,onBeforeAppear:H,onAppear:_,onAfterAppear:b,onAppearCancelled:p}=t,x=String(e.key),w=Ii(n,e),O=(v,k)=>{v&&be(v,s,9,k)},I={mode:i,persisted:o,beforeEnter(v){let k=l;if(!n.isMounted)if(r)k=H||l;else return;v._leaveCb&&v._leaveCb(!0);const L=w[x];L&&Re(e,L)&&L.el._leaveCb&&L.el._leaveCb(),O(k,[v])},enter(v){let k=c,L=u,$=d;if(!n.isMounted)if(r)k=_||c,L=b||u,$=p||d;else return;let K=!1;const R=v._enterCb=W=>{K||(K=!0,W?O($,[v]):O(L,[v]),I.delayedLeave&&I.delayedLeave(),v._enterCb=void 0)};k?(k(v,R),k.length<=1&&R()):R()},leave(v,k){const L=String(e.key);if(v._enterCb&&v._enterCb(!0),n.isUnmounting)return k();O(h,[v]);let $=!1;const K=v._leaveCb=R=>{$||($=!0,k(),R?O(F,[v]):O(T,[v]),v._leaveCb=void 0,w[L]===e&&delete w[L])};w[L]=e,g?(g(v,K),g.length<=1&&K()):K()},clone(v){return Rt(v,t,n,s)}};return I}function ts(e){if(cn(e))return e=Ze(e),e.children=null,e}function Pr(e){return cn(e)?e.children?e.children[0]:void 0:e}function ut(e,t){e.shapeFlag&6&&e.component?ut(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function Vn(e,t=!1){let n=[],s=0;for(let r=0;r<e.length;r++){const i=e[r];i.type===ue?(i.patchFlag&128&&s++,n=n.concat(Vn(i.children,t))):(t||i.type!==de)&&n.push(i)}if(s>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Gs(e){return j(e)?{setup:e,name:e.name}:e}const en=e=>!!e.type.__asyncLoader;function mc(e){j(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:i,suspensible:o=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,g()),g=()=>{let T;return c||(T=c=t().catch(F=>{if(F=F instanceof Error?F:new Error(String(F)),l)return new Promise((H,_)=>{l(F,()=>H(h()),()=>_(F),d+1)});throw F}).then(F=>T!==c&&c?c:(F&&(F.__esModule||F[Symbol.toStringTag]==="Module")&&(F=F.default),u=F,F)))};return Gs({name:"AsyncComponentWrapper",__asyncLoader:g,get __asyncResolved(){return u},setup(){const T=le;if(u)return()=>ns(u,T);const F=p=>{c=null,pt(p,T,13,!s)};if(o&&T.suspense||Mt)return g().then(p=>()=>ns(p,T)).catch(p=>(F(p),()=>s?ee(s,{error:p}):null));const H=Cn(!1),_=Cn(),b=Cn(!!r);return r&&setTimeout(()=>{b.value=!1},r),i!=null&&setTimeout(()=>{if(!H.value&&!_.value){const p=new Error(`Async component timed out after ${i}ms.`);F(p),_.value=p}},i),g().then(()=>{H.value=!0,T.parent&&cn(T.parent.vnode)&&Vs(T.parent.update)}).catch(p=>{F(p),_.value=p}),()=>{if(H.value&&u)return ns(u,T);if(_.value&&s)return ee(s,{error:_.value});if(n&&!b.value)return ee(n)}}})}function ns(e,{vnode:{ref:t,props:n,children:s}}){const r=ee(e,n,s);return r.ref=t,r}const cn=e=>e.type.__isKeepAlive,_c={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=et(),s=n.ctx;if(!s.renderer)return t.default;const r=new Map,i=new Set;let o=null;const l=n.suspense,{renderer:{p:c,m:u,um:d,o:{createElement:h}}}=s,g=h("div");s.activate=(p,x,w,O,I)=>{const v=p.component;u(p,x,w,0,l),c(v.vnode,p,x,w,v,l,O,p.slotScopeIds,I),fe(()=>{v.isDeactivated=!1,v.a&&Tt(v.a);const k=p.props&&p.props.onVnodeMounted;k&&he(k,v.parent,p)},l)},s.deactivate=p=>{const x=p.component;u(p,g,null,1,l),fe(()=>{x.da&&Tt(x.da);const w=p.props&&p.props.onVnodeUnmounted;w&&he(w,x.parent,p),x.isDeactivated=!0},l)};function T(p){ss(p),d(p,n,l,!0)}function F(p){r.forEach((x,w)=>{const O=Mn(x.type);O&&(!p||!p(O))&&H(w)})}function H(p){const x=r.get(p);!o||x.type!==o.type?T(x):o&&ss(o),r.delete(p),i.delete(p)}Wt(()=>[e.include,e.exclude],([p,x])=>{p&&F(w=>Lt(p,w)),x&&F(w=>!Lt(x,w))},{flush:"post",deep:!0});let _=null;const b=()=>{_!=null&&r.set(_,rs(n.subTree))};return fn(b),qn(b),zn(()=>{r.forEach(p=>{const{subTree:x,suspense:w}=n,O=rs(x);if(p.type===O.type){ss(O);const I=O.component.da;I&&fe(I,w);return}T(p)})}),()=>{if(_=null,!t.default)return null;const p=t.default(),x=p[0];if(p.length>1)return o=null,p;if(!Xe(x)||!(x.shapeFlag&4)&&!(x.shapeFlag&128))return o=null,x;let w=rs(x);const O=w.type,I=Mn(en(w)?w.type.__asyncResolved||{}:O),{include:v,exclude:k,max:L}=e;if(v&&(!I||!Lt(v,I))||k&&I&&Lt(k,I))return o=w,x;const $=w.key==null?O:w.key,K=r.get($);return w.el&&(w=Ze(w),x.shapeFlag&128&&(x.ssContent=w)),_=$,K?(w.el=K.el,w.component=K.component,w.transition&&ut(w,w.transition),w.shapeFlag|=512,i.delete($),i.add($)):(i.add($),L&&i.size>parseInt(L,10)&&H(i.values().next().value)),w.shapeFlag|=256,o=w,x}}},bc=_c;function Lt(e,t){return B(e)?e.some(n=>Lt(n,t)):ne(e)?e.split(",").includes(t):e.test?e.test(t):!1}function Ni(e,t){ki(e,"a",t)}function Bi(e,t){ki(e,"da",t)}function ki(e,t,n=le){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Wn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)cn(r.parent.vnode)&&yc(s,t,n,r),r=r.parent}}function yc(e,t,n,s){const r=Wn(t,e,s,!0);Jn(()=>{Ps(s[t],r)},n)}function ss(e){let t=e.shapeFlag;t&256&&(t-=256),t&512&&(t-=512),e.shapeFlag=t}function rs(e){return e.shapeFlag&128?e.ssContent:e}function Wn(e,t,n=le,s=!1){if(n){const r=n[e]||(n[e]=[]),i=t.__weh||(t.__weh=(...o)=>{if(n.isUnmounted)return;dt(),Qe(n);const l=be(t,n,e,o);return qe(),ht(),l});return s?r.unshift(i):r.push(i),i}}const Le=e=>(t,n=le)=>(!Mt||e==="sp")&&Wn(e,t,n),Hi=Le("bm"),fn=Le("m"),Li=Le("bu"),qn=Le("u"),zn=Le("bum"),Jn=Le("um"),Di=Le("sp"),Ui=Le("rtg"),$i=Le("rtc");function ji(e,t=le){Wn("ec",e,t)}let ps=!0;function Cc(e){const t=Vi(e),n=e.proxy,s=e.ctx;ps=!1,t.beforeCreate&&Fr(t.beforeCreate,e,"bc");const{data:r,computed:i,methods:o,watch:l,provide:c,inject:u,created:d,beforeMount:h,mounted:g,beforeUpdate:T,updated:F,activated:H,deactivated:_,beforeDestroy:b,beforeUnmount:p,destroyed:x,unmounted:w,render:O,renderTracked:I,renderTriggered:v,errorCaptured:k,serverPrefetch:L,expose:$,inheritAttrs:K,components:R,directives:W,filters:Z}=t;if(u&&xc(u,s,null,e.appContext.config.unwrapInjectedRef),o)for(const se in o){const Q=o[se];j(Q)&&(s[se]=Q.bind(n))}if(r){const se=r.call(n,n);ie(se)&&(e.data=Un(se))}if(ps=!0,i)for(const se in i){const Q=i[se],Oe=j(Q)?Q.bind(n,n):j(Q.get)?Q.get.bind(n,n):Te,Qn=!j(Q)&&j(Q.set)?Q.set.bind(n):Te,Ot=po({get:Oe,set:Qn});Object.defineProperty(s,se,{enumerable:!0,configurable:!0,get:()=>Ot.value,set:mt=>Ot.value=mt})}if(l)for(const se in l)Ki(l[se],s,n,se);if(c){const se=j(c)?c.call(n):c;Reflect.ownKeys(se).forEach(Q=>{Mi(Q,se[Q])})}d&&Fr(d,e,"c");function ce(se,Q){B(Q)?Q.forEach(Oe=>se(Oe.bind(n))):Q&&se(Q.bind(n))}if(ce(Hi,h),ce(fn,g),ce(Li,T),ce(qn,F),ce(Ni,H),ce(Bi,_),ce(ji,k),ce($i,I),ce(Ui,v),ce(zn,p),ce(Jn,w),ce(Di,L),B($))if($.length){const se=e.exposed||(e.exposed={});$.forEach(Q=>{Object.defineProperty(se,Q,{get:()=>n[Q],set:Oe=>n[Q]=Oe})})}else e.exposed||(e.exposed={});O&&e.render===Te&&(e.render=O),K!=null&&(e.inheritAttrs=K),R&&(e.components=R),W&&(e.directives=W)}function xc(e,t,n=Te,s=!1){B(e)&&(e=gs(e));for(const r in e){const i=e[r];let o;ie(i)?"default"in i?o=Vt(i.from||r,i.default,!0):o=Vt(i.from||r):o=Vt(i),oe(o)&&s?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>o.value,set:l=>o.value=l}):t[r]=o}}function Fr(e,t,n){be(B(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function Ki(e,t,n,s){const r=s.includes(".")?Oi(n,s):()=>n[s];if(ne(e)){const i=t[e];j(i)&&Wt(r,i)}else if(j(e))Wt(r,e.bind(n));else if(ie(e))if(B(e))e.forEach(i=>Ki(i,t,n,s));else{const i=j(e.handler)?e.handler.bind(n):t[e.handler];j(i)&&Wt(r,i,e)}}function Vi(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=e.appContext,l=i.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>An(c,u,o,!0)),An(c,t,o)),i.set(t,c),c}function An(e,t,n,s=!1){const{mixins:r,extends:i}=t;i&&An(e,i,n,!0),r&&r.forEach(o=>An(e,o,n,!0));for(const o in t)if(!(s&&o==="expose")){const l=Ec[o]||n&&n[o];e[o]=l?l(e[o],t[o]):t[o]}return e}const Ec={data:Mr,props:st,emits:st,methods:st,computed:st,beforeCreate:ae,created:ae,beforeMount:ae,mounted:ae,beforeUpdate:ae,updated:ae,beforeDestroy:ae,beforeUnmount:ae,destroyed:ae,unmounted:ae,activated:ae,deactivated:ae,errorCaptured:ae,serverPrefetch:ae,components:st,directives:st,watch:Tc,provide:Mr,inject:wc};function Mr(e,t){return t?e?function(){return re(j(e)?e.call(this,this):e,j(t)?t.call(this,this):t)}:t:e}function wc(e,t){return st(gs(e),gs(t))}function gs(e){if(B(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ae(e,t){return e?[...new Set([].concat(e,t))]:t}function st(e,t){return e?re(re(Object.create(null),e),t):t}function Tc(e,t){if(!e)return t;if(!t)return e;const n=re(Object.create(null),e);for(const s in t)n[s]=ae(e[s],t[s]);return n}function vc(e,t,n,s=!1){const r={},i={};wn(i,Xn,1),e.propsDefaults=Object.create(null),Wi(e,t,r,i);for(const o in e.propsOptions[0])o in r||(r[o]=void 0);n?e.props=s?r:_i(r):e.type.props?e.props=r:e.props=i,e.attrs=i}function Ac(e,t,n,s){const{props:r,attrs:i,vnode:{patchFlag:o}}=e,l=q(r),[c]=e.propsOptions;let u=!1;if((s||o>0)&&!(o&16)){if(o&8){const d=e.vnode.dynamicProps;for(let h=0;h<d.length;h++){let g=d[h];const T=t[g];if(c)if(J(i,g))T!==i[g]&&(i[g]=T,u=!0);else{const F=ye(g);r[F]=ms(c,l,F,T,e,!1)}else T!==i[g]&&(i[g]=T,u=!0)}}}else{Wi(e,t,r,i)&&(u=!0);let d;for(const h in l)(!t||!J(t,h)&&((d=Fe(h))===h||!J(t,d)))&&(c?n&&(n[h]!==void 0||n[d]!==void 0)&&(r[h]=ms(c,l,h,void 0,e,!0)):delete r[h]);if(i!==l)for(const h in i)(!t||!J(t,h)&&!0)&&(delete i[h],u=!0)}u&&He(e,"set","$attrs")}function Wi(e,t,n,s){const[r,i]=e.propsOptions;let o=!1,l;if(t)for(let c in t){if(Dt(c))continue;const u=t[c];let d;r&&J(r,d=ye(c))?!i||!i.includes(d)?n[d]=u:(l||(l={}))[d]=u:zs(e.emitsOptions,c)||(!(c in s)||u!==s[c])&&(s[c]=u,o=!0)}if(i){const c=q(n),u=l||Y;for(let d=0;d<i.length;d++){const h=i[d];n[h]=ms(r,c,h,u[h],e,!J(u,h))}}return o}function ms(e,t,n,s,r,i){const o=e[n];if(o!=null){const l=J(o,"default");if(l&&s===void 0){const c=o.default;if(o.type!==Function&&j(c)){const{propsDefaults:u}=r;n in u?s=u[n]:(Qe(r),s=u[n]=c.call(null,t),qe())}else s=c}o[0]&&(i&&!l?s=!1:o[1]&&(s===""||s===Fe(n))&&(s=!0))}return s}function qi(e,t,n=!1){const s=t.propsCache,r=s.get(e);if(r)return r;const i=e.props,o={},l=[];let c=!1;if(!j(e)){const d=h=>{c=!0;const[g,T]=qi(h,t,!0);re(o,g),T&&l.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!i&&!c)return s.set(e,Et),Et;if(B(i))for(let d=0;d<i.length;d++){const h=ye(i[d]);Sr(h)&&(o[h]=Y)}else if(i)for(const d in i){const h=ye(d);if(Sr(h)){const g=i[d],T=o[h]=B(g)||j(g)?{type:g}:g;if(T){const F=Nr(Boolean,T.type),H=Nr(String,T.type);T[0]=F>-1,T[1]=H<0||F<H,(F>-1||J(T,"default"))&&l.push(h)}}}const u=[o,l];return s.set(e,u),u}function Sr(e){return e[0]!=="$"}function Or(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function Ir(e,t){return Or(e)===Or(t)}function Nr(e,t){return B(t)?t.findIndex(n=>Ir(n,e)):j(t)&&Ir(t,e)?0:-1}const zi=e=>e[0]==="_"||e==="$stable",er=e=>B(e)?e.map(ge):[ge(e)],Rc=(e,t,n)=>{const s=Js((...r)=>er(t(...r)),n);return s._c=!1,s},Ji=(e,t,n)=>{const s=e._ctx;for(const r in e){if(zi(r))continue;const i=e[r];if(j(i))t[r]=Rc(r,i,s);else if(i!=null){const o=er(i);t[r]=()=>o}}},Yi=(e,t)=>{const n=er(t);e.slots.default=()=>n},Pc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=q(t),wn(t,"_",n)):Ji(t,e.slots={})}else e.slots={},t&&Yi(e,t);wn(e.slots,Xn,1)},Fc=(e,t,n)=>{const{vnode:s,slots:r}=e;let i=!0,o=Y;if(s.shapeFlag&32){const l=t._;l?n&&l===1?i=!1:(re(r,t),!n&&l===1&&delete r._):(i=!t.$stable,Ji(t,r)),o=t}else t&&(Yi(e,t),o={default:1});if(i)for(const l in r)!zi(l)&&!(l in o)&&delete r[l]};function Mc(e,t){const n=_e;if(n===null)return e;const s=n.proxy,r=e.dirs||(e.dirs=[]);for(let i=0;i<t.length;i++){let[o,l,c,u=Y]=t[i];j(o)&&(o={mounted:o,updated:o}),o.deep&&ot(l),r.push({dir:o,instance:s,value:l,oldValue:void 0,arg:c,modifiers:u})}return e}function Ae(e,t,n,s){const r=e.dirs,i=t&&t.dirs;for(let o=0;o<r.length;o++){const l=r[o];i&&(l.oldValue=i[o].value);let c=l.dir[s];c&&(dt(),be(c,n,8,[e.el,l,e,t]),ht())}}function Xi(){return{app:null,config:{isNativeTag:Jo,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Sc=0;function Oc(e,t){return function(s,r=null){r!=null&&!ie(r)&&(r=null);const i=Xi(),o=new Set;let l=!1;const c=i.app={_uid:Sc++,_component:s,_props:r,_container:null,_context:i,_instance:null,version:yo,get config(){return i.config},set config(u){},use(u,...d){return o.has(u)||(u&&j(u.install)?(o.add(u),u.install(c,...d)):j(u)&&(o.add(u),u(c,...d))),c},mixin(u){return i.mixins.includes(u)||i.mixins.push(u),c},component(u,d){return d?(i.components[u]=d,c):i.components[u]},directive(u,d){return d?(i.directives[u]=d,c):i.directives[u]},mount(u,d,h){if(!l){const g=ee(s,r);return g.appContext=i,d&&t?t(g,u):e(g,u,h),l=!0,c._container=u,u.__vue_app__=c,cr(g.component)||g.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return i.provides[u]=d,c}};return c}}function Rn(e,t,n,s,r=!1){if(B(e)){e.forEach((g,T)=>Rn(g,t&&(B(t)?t[T]:t),n,s,r));return}if(en(s)&&!r)return;const i=s.shapeFlag&4?cr(s.component)||s.component.proxy:s.el,o=r?null:i,{i:l,r:c}=e,u=t&&t.r,d=l.refs===Y?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(ne(u)?(d[u]=null,J(h,u)&&(h[u]=null)):oe(u)&&(u.value=null)),j(c))Me(c,l,12,[o,d]);else{const g=ne(c),T=oe(c);if(g||T){const F=()=>{if(e.f){const H=g?d[c]:c.value;r?B(H)&&Ps(H,i):B(H)?H.includes(i)||H.push(i):g?d[c]=[i]:(c.value=[i],e.k&&(d[e.k]=c.value))}else g?(d[c]=o,J(h,c)&&(h[c]=o)):oe(c)&&(c.value=o,e.k&&(d[e.k]=o))};o?(F.id=-1,fe(F,n)):F()}}}let $e=!1;const _n=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",is=e=>e.nodeType===8;function Ic(e){const{mt:t,p:n,o:{patchProp:s,nextSibling:r,parentNode:i,remove:o,insert:l,createComment:c}}=e,u=(_,b)=>{if(!b.hasChildNodes()){n(null,_,b),vn();return}$e=!1,d(b.firstChild,_,null,null,null),vn(),$e&&console.error("Hydration completed but contains mismatches.")},d=(_,b,p,x,w,O=!1)=>{const I=is(_)&&_.data==="[",v=()=>F(_,b,p,x,w,I),{type:k,ref:L,shapeFlag:$}=b,K=_.nodeType;b.el=_;let R=null;switch(k){case Pt:K!==3?R=v():(_.data!==b.children&&($e=!0,_.data=b.children),R=r(_));break;case de:K!==8||I?R=v():R=r(_);break;case ft:if(K!==1)R=v();else{R=_;const W=!b.children.length;for(let Z=0;Z<b.staticCount;Z++)W&&(b.children+=R.outerHTML),Z===b.staticCount-1&&(b.anchor=R),R=r(R);return R}break;case ue:I?R=T(_,b,p,x,w,O):R=v();break;default:if($&1)K!==1||b.type.toLowerCase()!==_.tagName.toLowerCase()?R=v():R=h(_,b,p,x,w,O);else if($&6){b.slotScopeIds=w;const W=i(_);if(t(b,W,null,p,x,_n(W),O),R=I?H(_):r(_),en(b)){let Z;I?(Z=ee(ue),Z.anchor=R?R.previousSibling:W.lastChild):Z=_.nodeType===3?or(""):ee("div"),Z.el=_,b.component.subTree=Z}}else $&64?K!==8?R=v():R=b.type.hydrate(_,b,p,x,w,O,e,g):$&128&&(R=b.type.hydrate(_,b,p,x,_n(i(_)),w,O,e,d))}return L!=null&&Rn(L,null,x,b),R},h=(_,b,p,x,w,O)=>{O=O||!!b.dynamicChildren;const{type:I,props:v,patchFlag:k,shapeFlag:L,dirs:$}=b,K=I==="input"&&$||I==="option";if(K||k!==-1){if($&&Ae(b,null,p,"created"),v)if(K||!O||k&48)for(const W in v)(K&&W.endsWith("value")||sn(W)&&!Dt(W))&&s(_,W,null,v[W],!1,void 0,p);else v.onClick&&s(_,"onClick",null,v.onClick,!1,void 0,p);let R;if((R=v&&v.onVnodeBeforeMount)&&he(R,p,b),$&&Ae(b,null,p,"beforeMount"),((R=v&&v.onVnodeMounted)||$)&&Fi(()=>{R&&he(R,p,b),$&&Ae(b,null,p,"mounted")},x),L&16&&!(v&&(v.innerHTML||v.textContent))){let W=g(_.firstChild,b,_,p,x,w,O);for(;W;){$e=!0;const Z=W;W=W.nextSibling,o(Z)}}else L&8&&_.textContent!==b.children&&($e=!0,_.textContent=b.children)}return _.nextSibling},g=(_,b,p,x,w,O,I)=>{I=I||!!b.dynamicChildren;const v=b.children,k=v.length;for(let L=0;L<k;L++){const $=I?v[L]:v[L]=ge(v[L]);if(_)_=d(_,$,x,w,O,I);else{if($.type===Pt&&!$.children)continue;$e=!0,n(null,$,p,null,x,w,_n(p),O)}}return _},T=(_,b,p,x,w,O)=>{const{slotScopeIds:I}=b;I&&(w=w?w.concat(I):I);const v=i(_),k=g(r(_),b,v,p,x,w,O);return k&&is(k)&&k.data==="]"?r(b.anchor=k):($e=!0,l(b.anchor=c("]"),v,k),k)},F=(_,b,p,x,w,O)=>{if($e=!0,b.el=null,O){const k=H(_);for(;;){const L=r(_);if(L&&L!==k)o(L);else break}}const I=r(_),v=i(_);return o(_),n(null,b,v,I,p,x,_n(v),w),I},H=_=>{let b=0;for(;_;)if(_=r(_),_&&is(_)&&(_.data==="["&&b++,_.data==="]")){if(b===0)return r(_);b--}return _};return[u,d]}const fe=Fi;function Zi(e){return Gi(e)}function Qi(e){return Gi(e,Ic)}function Gi(e,t){const n=el();n.__VUE__=!0;const{insert:s,remove:r,patchProp:i,createElement:o,createText:l,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:g,setScopeId:T=Te,cloneNode:F,insertStaticContent:H}=e,_=(f,a,m,C=null,y=null,P=null,S=!1,A=null,M=!!a.dynamicChildren)=>{if(f===a)return;f&&!Re(f,a)&&(C=un(f),De(f,y,P,!0),f=null),a.patchFlag===-2&&(M=!1,a.dynamicChildren=null);const{type:E,ref:D,shapeFlag:N}=a;switch(E){case Pt:b(f,a,m,C);break;case de:p(f,a,m,C);break;case ft:f==null&&x(a,m,C,S);break;case ue:W(f,a,m,C,y,P,S,A,M);break;default:N&1?I(f,a,m,C,y,P,S,A,M):N&6?Z(f,a,m,C,y,P,S,A,M):(N&64||N&128)&&E.process(f,a,m,C,y,P,S,A,M,_t)}D!=null&&y&&Rn(D,f&&f.ref,P,a||f,!a)},b=(f,a,m,C)=>{if(f==null)s(a.el=l(a.children),m,C);else{const y=a.el=f.el;a.children!==f.children&&u(y,a.children)}},p=(f,a,m,C)=>{f==null?s(a.el=c(a.children||""),m,C):a.el=f.el},x=(f,a,m,C)=>{[f.el,f.anchor]=H(f.children,a,m,C,f.el,f.anchor)},w=({el:f,anchor:a},m,C)=>{let y;for(;f&&f!==a;)y=g(f),s(f,m,C),f=y;s(a,m,C)},O=({el:f,anchor:a})=>{let m;for(;f&&f!==a;)m=g(f),r(f),f=m;r(a)},I=(f,a,m,C,y,P,S,A,M)=>{S=S||a.type==="svg",f==null?v(a,m,C,y,P,S,A,M):$(f,a,y,P,S,A,M)},v=(f,a,m,C,y,P,S,A)=>{let M,E;const{type:D,props:N,shapeFlag:U,transition:V,patchFlag:z,dirs:te}=f;if(f.el&&F!==void 0&&z===-1)M=f.el=F(f.el);else{if(M=f.el=o(f.type,P,N&&N.is,N),U&8?d(M,f.children):U&16&&L(f.children,M,null,C,y,P&&D!=="foreignObject",S,A),te&&Ae(f,null,C,"created"),N){for(const G in N)G!=="value"&&!Dt(G)&&i(M,G,null,N[G],P,f.children,C,y,Ie);"value"in N&&i(M,"value",null,N.value),(E=N.onVnodeBeforeMount)&&he(E,C,f)}k(M,f,f.scopeId,S,C)}te&&Ae(f,null,C,"beforeMount");const X=(!y||y&&!y.pendingBranch)&&V&&!V.persisted;X&&V.beforeEnter(M),s(M,a,m),((E=N&&N.onVnodeMounted)||X||te)&&fe(()=>{E&&he(E,C,f),X&&V.enter(M),te&&Ae(f,null,C,"mounted")},y)},k=(f,a,m,C,y)=>{if(m&&T(f,m),C)for(let P=0;P<C.length;P++)T(f,C[P]);if(y){let P=y.subTree;if(a===P){const S=y.vnode;k(f,S,S.scopeId,S.slotScopeIds,y.parent)}}},L=(f,a,m,C,y,P,S,A,M=0)=>{for(let E=M;E<f.length;E++){const D=f[E]=A?Ve(f[E]):ge(f[E]);_(null,D,a,m,C,y,P,S,A)}},$=(f,a,m,C,y,P,S)=>{const A=a.el=f.el;let{patchFlag:M,dynamicChildren:E,dirs:D}=a;M|=f.patchFlag&16;const N=f.props||Y,U=a.props||Y;let V;m&&tt(m,!1),(V=U.onVnodeBeforeUpdate)&&he(V,m,a,f),D&&Ae(a,f,m,"beforeUpdate"),m&&tt(m,!0);const z=y&&a.type!=="foreignObject";if(E?K(f.dynamicChildren,E,A,m,C,z,P):S||Oe(f,a,A,null,m,C,z,P,!1),M>0){if(M&16)R(A,a,N,U,m,C,y);else if(M&2&&N.class!==U.class&&i(A,"class",null,U.class,y),M&4&&i(A,"style",N.style,U.style,y),M&8){const te=a.dynamicProps;for(let X=0;X<te.length;X++){const G=te[X],we=N[G],bt=U[G];(bt!==we||G==="value")&&i(A,G,we,bt,y,f.children,m,C,Ie)}}M&1&&f.children!==a.children&&d(A,a.children)}else!S&&E==null&&R(A,a,N,U,m,C,y);((V=U.onVnodeUpdated)||D)&&fe(()=>{V&&he(V,m,a,f),D&&Ae(a,f,m,"updated")},C)},K=(f,a,m,C,y,P,S)=>{for(let A=0;A<a.length;A++){const M=f[A],E=a[A],D=M.el&&(M.type===ue||!Re(M,E)||M.shapeFlag&70)?h(M.el):m;_(M,E,D,null,C,y,P,S,!0)}},R=(f,a,m,C,y,P,S)=>{if(m!==C){for(const A in C){if(Dt(A))continue;const M=C[A],E=m[A];M!==E&&A!=="value"&&i(f,A,E,M,S,a.children,y,P,Ie)}if(m!==Y)for(const A in m)!Dt(A)&&!(A in C)&&i(f,A,m[A],null,S,a.children,y,P,Ie);"value"in C&&i(f,"value",m.value,C.value)}},W=(f,a,m,C,y,P,S,A,M)=>{const E=a.el=f?f.el:l(""),D=a.anchor=f?f.anchor:l("");let{patchFlag:N,dynamicChildren:U,slotScopeIds:V}=a;V&&(A=A?A.concat(V):V),f==null?(s(E,m,C),s(D,m,C),L(a.children,m,D,y,P,S,A,M)):N>0&&N&64&&U&&f.dynamicChildren?(K(f.dynamicChildren,U,m,y,P,S,A),(a.key!=null||y&&a===y.subTree)&&tr(f,a,!0)):Oe(f,a,m,D,y,P,S,A,M)},Z=(f,a,m,C,y,P,S,A,M)=>{a.slotScopeIds=A,f==null?a.shapeFlag&512?y.ctx.activate(a,m,C,S,M):gt(a,m,C,y,P,S,M):ce(f,a,M)},gt=(f,a,m,C,y,P,S)=>{const A=f.component=lo(f,C,y);if(cn(f)&&(A.ctx.renderer=_t),fo(A),A.asyncDep){if(y&&y.registerDep(A,se),!f.el){const M=A.subTree=ee(de);p(null,M,a,m)}return}se(A,f,a,m,y,P,S)},ce=(f,a,m)=>{const C=a.component=f.component;if(rc(f,a,m))if(C.asyncDep&&!C.asyncResolved){Q(C,a,m);return}else C.next=a,Yl(C.update),C.update();else a.component=f.component,a.el=f.el,C.vnode=a},se=(f,a,m,C,y,P,S)=>{const A=()=>{if(f.isMounted){let{next:D,bu:N,u:U,parent:V,vnode:z}=f,te=D,X;tt(f,!1),D?(D.el=z.el,Q(f,D,S)):D=z,N&&Tt(N),(X=D.props&&D.props.onVnodeBeforeUpdate)&&he(X,V,D,z),tt(f,!0);const G=xn(f),we=f.subTree;f.subTree=G,_(we,G,h(we.el),un(we),f,y,P),D.el=G.el,te===null&&Ys(f,G.el),U&&fe(U,y),(X=D.props&&D.props.onVnodeUpdated)&&fe(()=>he(X,V,D,z),y)}else{let D;const{el:N,props:U}=a,{bm:V,m:z,parent:te}=f,X=en(a);if(tt(f,!1),V&&Tt(V),!X&&(D=U&&U.onVnodeBeforeMount)&&he(D,te,a),tt(f,!0),N&&es){const G=()=>{f.subTree=xn(f),es(N,f.subTree,f,y,null)};X?a.type.__asyncLoader().then(()=>!f.isUnmounted&&G()):G()}else{const G=f.subTree=xn(f);_(null,G,m,C,f,y,P),a.el=G.el}if(z&&fe(z,y),!X&&(D=U&&U.onVnodeMounted)){const G=a;fe(()=>he(D,te,G),y)}a.shapeFlag&256&&f.a&&fe(f.a,y),f.isMounted=!0,a=m=C=null}},M=f.effect=new on(A,()=>Vs(f.update),f.scope),E=f.update=M.run.bind(M);E.id=f.uid,tt(f,!0),E()},Q=(f,a,m)=>{a.component=f;const C=f.vnode.props;f.vnode=a,f.next=null,Ac(f,a.props,C,m),Fc(f,a.children,m),dt(),qs(void 0,f.update),ht()},Oe=(f,a,m,C,y,P,S,A,M=!1)=>{const E=f&&f.children,D=f?f.shapeFlag:0,N=a.children,{patchFlag:U,shapeFlag:V}=a;if(U>0){if(U&128){Ot(E,N,m,C,y,P,S,A,M);return}else if(U&256){Qn(E,N,m,C,y,P,S,A,M);return}}V&8?(D&16&&Ie(E,y,P),N!==E&&d(m,N)):D&16?V&16?Ot(E,N,m,C,y,P,S,A,M):Ie(E,y,P,!0):(D&8&&d(m,""),V&16&&L(N,m,C,y,P,S,A,M))},Qn=(f,a,m,C,y,P,S,A,M)=>{f=f||Et,a=a||Et;const E=f.length,D=a.length,N=Math.min(E,D);let U;for(U=0;U<N;U++){const V=a[U]=M?Ve(a[U]):ge(a[U]);_(f[U],V,m,null,y,P,S,A,M)}E>D?Ie(f,y,P,!0,!1,N):L(a,m,C,y,P,S,A,M,N)},Ot=(f,a,m,C,y,P,S,A,M)=>{let E=0;const D=a.length;let N=f.length-1,U=D-1;for(;E<=N&&E<=U;){const V=f[E],z=a[E]=M?Ve(a[E]):ge(a[E]);if(Re(V,z))_(V,z,m,null,y,P,S,A,M);else break;E++}for(;E<=N&&E<=U;){const V=f[N],z=a[U]=M?Ve(a[U]):ge(a[U]);if(Re(V,z))_(V,z,m,null,y,P,S,A,M);else break;N--,U--}if(E>N){if(E<=U){const V=U+1,z=V<D?a[V].el:C;for(;E<=U;)_(null,a[E]=M?Ve(a[E]):ge(a[E]),m,z,y,P,S,A,M),E++}}else if(E>U)for(;E<=N;)De(f[E],y,P,!0),E++;else{const V=E,z=E,te=new Map;for(E=z;E<=U;E++){const pe=a[E]=M?Ve(a[E]):ge(a[E]);pe.key!=null&&te.set(pe.key,E)}let X,G=0;const we=U-z+1;let bt=!1,pr=0;const It=new Array(we);for(E=0;E<we;E++)It[E]=0;for(E=V;E<=N;E++){const pe=f[E];if(G>=we){De(pe,y,P,!0);continue}let ve;if(pe.key!=null)ve=te.get(pe.key);else for(X=z;X<=U;X++)if(It[X-z]===0&&Re(pe,a[X])){ve=X;break}ve===void 0?De(pe,y,P,!0):(It[ve-z]=E+1,ve>=pr?pr=ve:bt=!0,_(pe,a[ve],m,null,y,P,S,A,M),G++)}const gr=bt?Nc(It):Et;for(X=gr.length-1,E=we-1;E>=0;E--){const pe=z+E,ve=a[pe],mr=pe+1<D?a[pe+1].el:C;It[E]===0?_(null,ve,m,mr,y,P,S,A,M):bt&&(X<0||E!==gr[X]?mt(ve,m,mr,2):X--)}}},mt=(f,a,m,C,y=null)=>{const{el:P,type:S,transition:A,children:M,shapeFlag:E}=f;if(E&6){mt(f.component.subTree,a,m,C);return}if(E&128){f.suspense.move(a,m,C);return}if(E&64){S.move(f,a,m,_t);return}if(S===ue){s(P,a,m);for(let N=0;N<M.length;N++)mt(M[N],a,m,C);s(f.anchor,a,m);return}if(S===ft){w(f,a,m);return}if(C!==2&&E&1&&A)if(C===0)A.beforeEnter(P),s(P,a,m),fe(()=>A.enter(P),y);else{const{leave:N,delayLeave:U,afterLeave:V}=A,z=()=>s(P,a,m),te=()=>{N(P,()=>{z(),V&&V()})};U?U(P,z,te):te()}else s(P,a,m)},De=(f,a,m,C=!1,y=!1)=>{const{type:P,props:S,ref:A,children:M,dynamicChildren:E,shapeFlag:D,patchFlag:N,dirs:U}=f;if(A!=null&&Rn(A,null,m,f,!0),D&256){a.ctx.deactivate(f);return}const V=D&1&&U,z=!en(f);let te;if(z&&(te=S&&S.onVnodeBeforeUnmount)&&he(te,a,f),D&6)Ho(f.component,m,C);else{if(D&128){f.suspense.unmount(m,C);return}V&&Ae(f,null,a,"beforeUnmount"),D&64?f.type.remove(f,a,m,y,_t,C):E&&(P!==ue||N>0&&N&64)?Ie(E,a,m,!1,!0):(P===ue&&N&384||!y&&D&16)&&Ie(M,a,m),C&&dr(f)}(z&&(te=S&&S.onVnodeUnmounted)||V)&&fe(()=>{te&&he(te,a,f),V&&Ae(f,null,a,"unmounted")},m)},dr=f=>{const{type:a,el:m,anchor:C,transition:y}=f;if(a===ue){ko(m,C);return}if(a===ft){O(f);return}const P=()=>{r(m),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(f.shapeFlag&1&&y&&!y.persisted){const{leave:S,delayLeave:A}=y,M=()=>S(m,P);A?A(f.el,P,M):M()}else P()},ko=(f,a)=>{let m;for(;f!==a;)m=g(f),r(f),f=m;r(a)},Ho=(f,a,m)=>{const{bum:C,scope:y,update:P,subTree:S,um:A}=f;C&&Tt(C),y.stop(),P&&(P.active=!1,De(S,f,a,m)),A&&fe(A,a),fe(()=>{f.isUnmounted=!0},a),a&&a.pendingBranch&&!a.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===a.pendingId&&(a.deps--,a.deps===0&&a.resolve())},Ie=(f,a,m,C=!1,y=!1,P=0)=>{for(let S=P;S<f.length;S++)De(f[S],a,m,C,y)},un=f=>f.shapeFlag&6?un(f.component.subTree):f.shapeFlag&128?f.suspense.next():g(f.anchor||f.el),hr=(f,a,m)=>{f==null?a._vnode&&De(a._vnode,null,null,!0):_(a._vnode||null,f,a,null,null,null,m),vn(),a._vnode=f},_t={p:_,um:De,m:mt,r:dr,mt:gt,mc:L,pc:Oe,pbc:K,n:un,o:e};let Gn,es;return t&&([Gn,es]=t(_t)),{render:hr,hydrate:Gn,createApp:Oc(hr,Gn)}}function tt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function tr(e,t,n=!1){const s=e.children,r=t.children;if(B(s)&&B(r))for(let i=0;i<s.length;i++){const o=s[i];let l=r[i];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[i]=Ve(r[i]),l.el=o.el),n||tr(o,l))}}function Nc(e){const t=e.slice(),n=[0];let s,r,i,o,l;const c=e.length;for(s=0;s<c;s++){const u=e[s];if(u!==0){if(r=n[n.length-1],e[r]<u){t[s]=r,n.push(s);continue}for(i=0,o=n.length-1;i<o;)l=i+o>>1,e[n[l]]<u?i=l+1:o=l;u<e[n[i]]&&(i>0&&(t[s]=n[i-1]),n[i]=s)}}for(i=n.length,o=n[i-1];i-- >0;)n[i]=o,o=t[o];return n}const Bc=e=>e.__isTeleport,qt=e=>e&&(e.disabled||e.disabled===""),Br=e=>typeof SVGElement!="undefined"&&e instanceof SVGElement,_s=(e,t)=>{const n=e&&e.to;return ne(n)?t?t(n):null:n},kc={__isTeleport:!0,process(e,t,n,s,r,i,o,l,c,u){const{mc:d,pc:h,pbc:g,o:{insert:T,querySelector:F,createText:H,createComment:_}}=u,b=qt(t.props);let{shapeFlag:p,children:x,dynamicChildren:w}=t;if(e==null){const O=t.el=H(""),I=t.anchor=H("");T(O,n,s),T(I,n,s);const v=t.target=_s(t.props,F),k=t.targetAnchor=H("");v&&(T(k,v),o=o||Br(v));const L=($,K)=>{p&16&&d(x,$,K,r,i,o,l,c)};b?L(n,I):v&&L(v,k)}else{t.el=e.el;const O=t.anchor=e.anchor,I=t.target=e.target,v=t.targetAnchor=e.targetAnchor,k=qt(e.props),L=k?n:I,$=k?O:v;if(o=o||Br(I),w?(g(e.dynamicChildren,w,L,r,i,o,l),tr(e,t,!0)):c||h(e,t,L,$,r,i,o,l,!1),b)k||bn(t,n,O,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const K=t.target=_s(t.props,F);K&&bn(t,K,null,u,0)}else k&&bn(t,I,v,u,1)}},remove(e,t,n,s,{um:r,o:{remove:i}},o){const{shapeFlag:l,children:c,anchor:u,targetAnchor:d,target:h,props:g}=e;if(h&&i(d),(o||!qt(g))&&(i(u),l&16))for(let T=0;T<c.length;T++){const F=c[T];r(F,t,n,!0,!!F.dynamicChildren)}},move:bn,hydrate:Hc};function bn(e,t,n,{o:{insert:s},m:r},i=2){i===0&&s(e.targetAnchor,t,n);const{el:o,anchor:l,shapeFlag:c,children:u,props:d}=e,h=i===2;if(h&&s(o,t,n),(!h||qt(d))&&c&16)for(let g=0;g<u.length;g++)r(u[g],t,n,2);h&&s(l,t,n)}function Hc(e,t,n,s,r,i,{o:{nextSibling:o,parentNode:l,querySelector:c}},u){const d=t.target=_s(t.props,c);if(d){const h=d._lpa||d.firstChild;t.shapeFlag&16&&(qt(t.props)?(t.anchor=u(o(e),t,l(e),n,s,r,i),t.targetAnchor=h):(t.anchor=o(e),t.targetAnchor=u(h,t,d,n,s,r,i)),d._lpa=t.targetAnchor&&o(t.targetAnchor))}return t.anchor&&o(t.anchor)}const Lc=kc,nr="components",Dc="directives";function Uc(e,t){return sr(nr,e,!0,t)||e}const eo=Symbol();function $c(e){return ne(e)?sr(nr,e,!1)||e:e||eo}function jc(e){return sr(Dc,e)}function sr(e,t,n=!0,s=!1){const r=_e||le;if(r){const i=r.type;if(e===nr){const l=Mn(i);if(l&&(l===t||l===ye(t)||l===rn(ye(t))))return i}const o=kr(r[e]||i[e],t)||kr(r.appContext[e],t);return!o&&s?i:o}}function kr(e,t){return e&&(e[t]||e[ye(t)]||e[rn(ye(t))])}const ue=Symbol(void 0),Pt=Symbol(void 0),de=Symbol(void 0),ft=Symbol(void 0),zt=[];let Se=null;function Yn(e=!1){zt.push(Se=e?null:[])}function to(){zt.pop(),Se=zt[zt.length-1]||null}let Ft=1;function bs(e){Ft+=e}function no(e){return e.dynamicChildren=Ft>0?Se||Et:null,to(),Ft>0&&Se&&Se.push(e),e}function Kc(e,t,n,s,r,i){return no(ir(e,t,n,s,r,i,!0))}function rr(e,t,n,s,r){return no(ee(e,t,n,s,r,!0))}function Xe(e){return e?e.__v_isVNode===!0:!1}function Re(e,t){return e.type===t.type&&e.key===t.key}function Vc(e){}const Xn="__vInternal",so=({key:e})=>e!=null?e:null,En=({ref:e,ref_key:t,ref_for:n})=>e!=null?ne(e)||oe(e)||j(e)?{i:_e,r:e,k:t,f:!!n}:e:null;function ir(e,t=null,n=null,s=0,r=null,i=e===ue?0:1,o=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&so(t),ref:t&&En(t),scopeId:Kn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(lr(c,n),i&128&&e.normalize(c)):n&&(c.shapeFlag|=ne(n)?8:16),Ft>0&&!o&&Se&&(c.patchFlag>0||i&6)&&c.patchFlag!==32&&Se.push(c),c}const ee=Wc;function Wc(e,t=null,n=null,s=0,r=null,i=!1){if((!e||e===eo)&&(e=de),Xe(e)){const l=Ze(e,t,!0);return n&&lr(l,n),l}if(cf(e)&&(e=e.__vccOpts),t){t=ro(t);let{class:l,style:c}=t;l&&!ne(l)&&(t.class=nn(l)),ie(c)&&(Hs(c)&&!B(c)&&(c=re({},c)),t.style=tn(c))}const o=ne(e)?1:ic(e)?128:Bc(e)?64:ie(e)?4:j(e)?2:0;return ir(e,t,n,s,r,o,i,!0)}function ro(e){return e?Hs(e)||Xn in e?re({},e):e:null}function Ze(e,t,n=!1){const{props:s,ref:r,patchFlag:i,children:o}=e,l=t?io(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&so(l),ref:t&&t.ref?n&&r?B(r)?r.concat(En(t)):[r,En(t)]:En(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:o,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ue?i===-1?16:i|16:i,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ze(e.ssContent),ssFallback:e.ssFallback&&Ze(e.ssFallback),el:e.el,anchor:e.anchor}}function or(e=" ",t=0){return ee(Pt,null,e,t)}function qc(e,t){const n=ee(ft,null,e);return n.staticCount=t,n}function zc(e="",t=!1){return t?(Yn(),rr(de,null,e)):ee(de,null,e)}function ge(e){return e==null||typeof e=="boolean"?ee(de):B(e)?ee(ue,null,e.slice()):typeof e=="object"?Ve(e):ee(Pt,null,String(e))}function Ve(e){return e.el===null||e.memo?e:Ze(e)}function lr(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(s&65){const r=t.default;r&&(r._c&&(r._d=!1),lr(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(Xn in t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else j(t)?(t={default:t,_ctx:_e},n=32):(t=String(t),s&64?(n=16,t=[or(t)]):n=8);e.children=t,e.shapeFlag|=n}function io(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=nn([t.class,s.class]));else if(r==="style")t.style=tn([t.style,s.style]);else if(sn(r)){const i=t[r],o=s[r];o&&i!==o&&!(B(i)&&i.includes(o))&&(t[r]=i?[].concat(i,o):o)}else r!==""&&(t[r]=s[r])}return t}function he(e,t,n,s=null){be(e,t,7,[n,s])}function Jc(e,t,n,s){let r;const i=n&&n[s];if(B(e)||ne(e)){r=new Array(e.length);for(let o=0,l=e.length;o<l;o++)r[o]=t(e[o],o,void 0,i&&i[o])}else if(typeof e=="number"){r=new Array(e);for(let o=0;o<e;o++)r[o]=t(o+1,o,void 0,i&&i[o])}else if(ie(e))if(e[Symbol.iterator])r=Array.from(e,(o,l)=>t(o,l,void 0,i&&i[l]));else{const o=Object.keys(e);r=new Array(o.length);for(let l=0,c=o.length;l<c;l++){const u=o[l];r[l]=t(e[u],u,l,i&&i[l])}}else r=[];return n&&(n[s]=r),r}function Yc(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(B(s))for(let r=0;r<s.length;r++)e[s[r].name]=s[r].fn;else s&&(e[s.name]=s.fn)}return e}function Xc(e,t,n={},s,r){if(_e.isCE)return ee("slot",t==="default"?null:{name:t},s&&s());let i=e[t];i&&i._c&&(i._d=!1),Yn();const o=i&&oo(i(n)),l=rr(ue,{key:n.key||`_${t}`},o||(s?s():[]),o&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),i&&i._c&&(i._d=!0),l}function oo(e){return e.some(t=>Xe(t)?!(t.type===de||t.type===ue&&!oo(t.children)):!0)?e:null}function Zc(e){const t={};for(const n in e)t[Ut(n)]=e[n];return t}const ys=e=>e?co(e)?cr(e)||e.proxy:ys(e.parent):null,Pn=re(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>ys(e.parent),$root:e=>ys(e.root),$emit:e=>e.emit,$options:e=>Vi(e),$forceUpdate:e=>()=>Vs(e.update),$nextTick:e=>Ks.bind(e.proxy),$watch:e=>pc.bind(e)}),Cs={get({_:e},t){const{ctx:n,setupState:s,data:r,props:i,accessCache:o,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const T=o[t];if(T!==void 0)switch(T){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return i[t]}else{if(s!==Y&&J(s,t))return o[t]=1,s[t];if(r!==Y&&J(r,t))return o[t]=2,r[t];if((u=e.propsOptions[0])&&J(u,t))return o[t]=3,i[t];if(n!==Y&&J(n,t))return o[t]=4,n[t];ps&&(o[t]=0)}}const d=Pn[t];let h,g;if(d)return t==="$attrs"&&Ce(e,"get",t),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Y&&J(n,t))return o[t]=4,n[t];if(g=c.config.globalProperties,J(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:i}=e;return r!==Y&&J(r,t)?(r[t]=n,!0):s!==Y&&J(s,t)?(s[t]=n,!0):J(e.props,t)||t[0]==="$"&&t.slice(1)in e?!1:(i[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:i}},o){let l;return!!n[o]||e!==Y&&J(e,o)||t!==Y&&J(t,o)||(l=i[0])&&J(l,o)||J(s,o)||J(Pn,o)||J(r.config.globalProperties,o)},defineProperty(e,t,n){return n.get!=null?this.set(e,t,n.get(),null):n.value!=null&&this.set(e,t,n.value,null),Reflect.defineProperty(e,t,n)}},Qc=re({},Cs,{get(e,t){if(t!==Symbol.unscopables)return Cs.get(e,t,e)},has(e,t){return t[0]!=="_"&&!Do(t)}}),Gc=Xi();let ef=0;function lo(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Gc,i={uid:ef++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new Os(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:qi(s,r),emitsOptions:Pi(s,r),emit:null,emitted:null,propsDefaults:Y,inheritAttrs:s.inheritAttrs,ctx:Y,data:Y,props:Y,attrs:Y,slots:Y,refs:Y,setupState:Y,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return i.ctx={_:i},i.root=t?t.root:i,i.emit=Zl.bind(null,i),e.ce&&e.ce(i),i}let le=null;const et=()=>le||_e,Qe=e=>{le=e,e.scope.on()},qe=()=>{le&&le.scope.off(),le=null};function co(e){return e.vnode.shapeFlag&4}let Mt=!1;function fo(e,t=!1){Mt=t;const{props:n,children:s}=e.vnode,r=co(e);vc(e,n,r,t),Pc(e,s);const i=r?tf(e,t):void 0;return Mt=!1,i}function tf(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=Ls(new Proxy(e.ctx,Cs));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?ao(e):null;Qe(e),dt();const i=Me(s,e,0,[e.props,r]);if(ht(),qe(),Ms(i)){if(i.then(qe,qe),t)return i.then(o=>{xs(e,o,t)}).catch(o=>{pt(o,e,0)});e.asyncDep=i}else xs(e,i,t)}else uo(e,t)}function xs(e,t,n){j(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:ie(t)&&(e.setupState=$s(t)),uo(e,n)}let Fn,Es;function nf(e){Fn=e,Es=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,Qc))}}const sf=()=>!Fn;function uo(e,t,n){const s=e.type;if(!e.render){if(!t&&Fn&&!s.render){const r=s.template;if(r){const{isCustomElement:i,compilerOptions:o}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,u=re(re({isCustomElement:i,delimiters:l},o),c);s.render=Fn(r,u)}}e.render=s.render||Te,Es&&Es(e)}Qe(e),dt(),Cc(e),ht(),qe()}function rf(e){return new Proxy(e.attrs,{get(t,n){return Ce(e,"get","$attrs"),t[n]}})}function ao(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=rf(e))},slots:e.slots,emit:e.emit,expose:t}}function cr(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy($s(Ls(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Pn)return Pn[n](e)}}))}const of=/(?:^|[-_])(\w)/g,lf=e=>e.replace(of,t=>t.toUpperCase()).replace(/[-_]/g,"");function Mn(e){return j(e)&&e.displayName||e.name}function ho(e,t,n=!1){let s=Mn(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=i=>{for(const o in i)if(i[o]===t)return o};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?lf(s):n?"App":"Anonymous"}function cf(e){return j(e)&&"__vccOpts"in e}const po=(e,t)=>jl(e,t,Mt);function ff(){return null}function uf(){return null}function af(e){}function df(e,t){return null}function hf(){return go().slots}function pf(){return go().attrs}function go(){const e=et();return e.setupContext||(e.setupContext=ao(e))}function gf(e,t){const n=B(e)?e.reduce((s,r)=>(s[r]={},s),{}):e;for(const s in t){const r=n[s];r?B(r)||j(r)?n[s]={type:r,default:t[s]}:r.default=t[s]:r===null&&(n[s]={default:t[s]})}return n}function mf(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n}function _f(e){const t=et();let n=e();return qe(),Ms(n)&&(n=n.catch(s=>{throw Qe(t),s})),[n,()=>Qe(t)]}function mo(e,t,n){const s=arguments.length;return s===2?ie(t)&&!B(t)?Xe(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&Xe(n)&&(n=[n]),ee(e,t,n))}const _o=Symbol(""),bf=()=>{{const e=Vt(_o);return e||xi("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function yf(){}function Cf(e,t,n,s){const r=n[s];if(r&&bo(r,e))return r;const i=t();return i.memo=e.slice(),n[s]=i}function bo(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!==t[s])return!1;return Ft>0&&Se&&Se.push(e),!0}const yo="3.2.31",xf={createComponentInstance:lo,setupComponent:fo,renderComponentRoot:xn,setCurrentRenderingInstance:Qt,isVNode:Xe,normalizeVNode:ge},Ef=xf,wf=null,Tf=null,vf="http://www.w3.org/2000/svg",it=typeof document!="undefined"?document:null,Hr=it&&it.createElement("template"),Af={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?it.createElementNS(vf,e):it.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>it.createTextNode(e),createComment:e=>it.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>it.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,s,r,i){const o=n?n.previousSibling:t.lastChild;if(r&&(r===i||r.nextSibling))for(;t.insertBefore(r.cloneNode(!0),n),!(r===i||!(r=r.nextSibling)););else{Hr.innerHTML=s?`<svg>${e}</svg>`:e;const l=Hr.content;if(s){const c=l.firstChild;for(;c.firstChild;)l.appendChild(c.firstChild);l.removeChild(c)}t.insertBefore(l,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Rf(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Pf(e,t,n){const s=e.style,r=ne(n);if(n&&!r){for(const i in n)ws(s,i,n[i]);if(t&&!ne(t))for(const i in t)n[i]==null&&ws(s,i,"")}else{const i=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=i)}}const Lr=/\s*!important$/;function ws(e,t,n){if(B(n))n.forEach(s=>ws(e,t,s));else if(t.startsWith("--"))e.setProperty(t,n);else{const s=Ff(e,t);Lr.test(n)?e.setProperty(Fe(s),n.replace(Lr,""),"important"):e[s]=n}}const Dr=["Webkit","Moz","ms"],os={};function Ff(e,t){const n=os[t];if(n)return n;let s=ye(t);if(s!=="filter"&&s in e)return os[t]=s;s=rn(s);for(let r=0;r<Dr.length;r++){const i=Dr[r]+s;if(i in e)return os[t]=i}return t}const Ur="http://www.w3.org/1999/xlink";function Mf(e,t,n,s,r){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(Ur,t.slice(6,t.length)):e.setAttributeNS(Ur,t,n);else{const i=$o(t);n==null||i&&!ei(n)?e.removeAttribute(t):e.setAttribute(t,i?"":n)}}function Sf(e,t,n,s,r,i,o){if(t==="innerHTML"||t==="textContent"){s&&o(s,r,i),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n==null?"":n;(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}if(n===""||n==null){const l=typeof e[t];if(l==="boolean"){e[t]=ei(n);return}else if(n==null&&l==="string"){e[t]="",e.removeAttribute(t);return}else if(l==="number"){try{e[t]=0}catch{}e.removeAttribute(t);return}}try{e[t]=n}catch{}}let Sn=Date.now,Co=!1;if(typeof window!="undefined"){Sn()>document.createEvent("Event").timeStamp&&(Sn=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);Co=!!(e&&Number(e[1])<=53)}let Ts=0;const Of=Promise.resolve(),If=()=>{Ts=0},Nf=()=>Ts||(Of.then(If),Ts=Sn());function ke(e,t,n,s){e.addEventListener(t,n,s)}function Bf(e,t,n,s){e.removeEventListener(t,n,s)}function kf(e,t,n,s,r=null){const i=e._vei||(e._vei={}),o=i[t];if(s&&o)o.value=s;else{const[l,c]=Hf(t);if(s){const u=i[t]=Lf(s,r);ke(e,l,u,c)}else o&&(Bf(e,l,o,c),i[t]=void 0)}}const $r=/(?:Once|Passive|Capture)$/;function Hf(e){let t;if($r.test(e)){t={};let n;for(;n=e.match($r);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[Fe(e.slice(2)),t]}function Lf(e,t){const n=s=>{const r=s.timeStamp||Sn();(Co||r>=n.attached-1)&&be(Df(s,n.value),t,5,[s])};return n.value=e,n.attached=Nf(),n}function Df(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s&&s(r))}else return t}const jr=/^on[a-z]/,Uf=(e,t,n,s,r=!1,i,o,l,c)=>{t==="class"?Rf(e,s,r):t==="style"?Pf(e,n,s):sn(t)?Rs(t)||kf(e,t,n,s,o):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):$f(e,t,s,r))?Sf(e,t,s,i,o,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),Mf(e,t,s,r))};function $f(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&jr.test(t)&&j(n)):t==="spellcheck"||t==="draggable"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||jr.test(t)&&ne(n)?!1:t in e}function xo(e,t){const n=Gs(e);class s extends Zn{constructor(i){super(n,i,t)}}return s.def=n,s}const jf=e=>xo(e,No),Kf=typeof HTMLElement!="undefined"?HTMLElement:class{};class Zn extends Kf{constructor(t,n={},s){super();this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&s?s(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,Ks(()=>{this._connected||(As(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);new MutationObserver(s=>{for(const r of s)this._setAttr(r.attributeName)}).observe(this,{attributes:!0});const t=s=>{const{props:r,styles:i}=s,o=!B(r),l=r?o?Object.keys(r):r:[];let c;if(o)for(const u in this._props){const d=r[u];(d===Number||d&&d.type===Number)&&(this._props[u]=Je(this._props[u]),(c||(c=Object.create(null)))[u]=!0)}this._numberProps=c;for(const u of Object.keys(this))u[0]!=="_"&&this._setProp(u,this[u],!0,!1);for(const u of l.map(ye))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(d){this._setProp(u,d)}});this._applyStyles(i),this._update()},n=this._def.__asyncLoader;n?n().then(t):t(this._def)}_setAttr(t){let n=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(n=Je(n)),this._setProp(ye(t),n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),s&&(n===!0?this.setAttribute(Fe(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(Fe(t),n+""):n||this.removeAttribute(Fe(t))))}_update(){As(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ee(this._def,re({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0,n.emit=(r,...i)=>{this.dispatchEvent(new CustomEvent(r,{detail:i}))};let s=this;for(;s=s&&(s.parentNode||s.host);)if(s instanceof Zn){n.parent=s._instance;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const s=document.createElement("style");s.textContent=n,this.shadowRoot.appendChild(s)})}}function Vf(e="$style"){{const t=et();if(!t)return Y;const n=t.type.__cssModules;if(!n)return Y;const s=n[e];return s||Y}}function Wf(e){const t=et();if(!t)return;const n=()=>vs(t.subTree,e(t.proxy));Si(n),fn(()=>{const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Jn(()=>s.disconnect())})}function vs(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{vs(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)Kr(e.el,t);else if(e.type===ue)e.children.forEach(n=>vs(n,t));else if(e.type===ft){let{el:n,anchor:s}=e;for(;n&&(Kr(n,t),n!==s);)n=n.nextSibling}}function Kr(e,t){if(e.nodeType===1){const n=e.style;for(const s in t)n.setProperty(`--${s}`,t[s])}}const je="transition",Nt="animation",fr=(e,{slots:t})=>mo(Qs,wo(e),t);fr.displayName="Transition";const Eo={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},qf=fr.props=re({},Qs.props,Eo),nt=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},Vr=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function wo(e){const t={};for(const R in e)R in Eo||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:i=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=i,appearActiveClass:u=o,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,F=zf(r),H=F&&F[0],_=F&&F[1],{onBeforeEnter:b,onEnter:p,onEnterCancelled:x,onLeave:w,onLeaveCancelled:O,onBeforeAppear:I=b,onAppear:v=p,onAppearCancelled:k=x}=t,L=(R,W,Z)=>{rt(R,W?d:l),rt(R,W?u:o),Z&&Z()},$=(R,W)=>{rt(R,T),rt(R,g),W&&W()},K=R=>(W,Z)=>{const gt=R?v:p,ce=()=>L(W,R,Z);nt(gt,[W,ce]),Wr(()=>{rt(W,R?c:i),Ne(W,R?d:l),Vr(gt)||qr(W,s,H,ce)})};return re(t,{onBeforeEnter(R){nt(b,[R]),Ne(R,i),Ne(R,o)},onBeforeAppear(R){nt(I,[R]),Ne(R,c),Ne(R,u)},onEnter:K(!1),onAppear:K(!0),onLeave(R,W){const Z=()=>$(R,W);Ne(R,h),vo(),Ne(R,g),Wr(()=>{rt(R,h),Ne(R,T),Vr(w)||qr(R,s,_,Z)}),nt(w,[R,Z])},onEnterCancelled(R){L(R,!1),nt(x,[R])},onAppearCancelled(R){L(R,!0),nt(k,[R])},onLeaveCancelled(R){$(R),nt(O,[R])}})}function zf(e){if(e==null)return null;if(ie(e))return[ls(e.enter),ls(e.leave)];{const t=ls(e);return[t,t]}}function ls(e){return Je(e)}function Ne(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function rt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function Wr(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Jf=0;function qr(e,t,n,s){const r=e._endId=++Jf,i=()=>{r===e._endId&&s()};if(n)return setTimeout(i,n);const{type:o,timeout:l,propCount:c}=To(e,t);if(!o)return s();const u=o+"end";let d=0;const h=()=>{e.removeEventListener(u,g),i()},g=T=>{T.target===e&&++d>=c&&h()};setTimeout(()=>{d<c&&h()},l+1),e.addEventListener(u,g)}function To(e,t){const n=window.getComputedStyle(e),s=F=>(n[F]||"").split(", "),r=s(je+"Delay"),i=s(je+"Duration"),o=zr(r,i),l=s(Nt+"Delay"),c=s(Nt+"Duration"),u=zr(l,c);let d=null,h=0,g=0;t===je?o>0&&(d=je,h=o,g=i.length):t===Nt?u>0&&(d=Nt,h=u,g=c.length):(h=Math.max(o,u),d=h>0?o>u?je:Nt:null,g=d?d===je?i.length:c.length:0);const T=d===je&&/\b(transform|all)(,|$)/.test(n[je+"Property"]);return{type:d,timeout:h,propCount:g,hasTransform:T}}function zr(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>Jr(n)+Jr(e[s])))}function Jr(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function vo(){return document.body.offsetHeight}const Ao=new WeakMap,Ro=new WeakMap,Yf={name:"TransitionGroup",props:re({},qf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=et(),s=Zs();let r,i;return qn(()=>{if(!r.length)return;const o=e.moveClass||`${e.name||"v"}-move`;if(!eu(r[0].el,n.vnode.el,o))return;r.forEach(Zf),r.forEach(Qf);const l=r.filter(Gf);vo(),l.forEach(c=>{const u=c.el,d=u.style;Ne(u,o),d.transform=d.webkitTransform=d.transitionDuration="";const h=u._moveCb=g=>{g&&g.target!==u||(!g||/transform$/.test(g.propertyName))&&(u.removeEventListener("transitionend",h),u._moveCb=null,rt(u,o))};u.addEventListener("transitionend",h)})}),()=>{const o=q(e),l=wo(o);let c=o.tag||ue;r=i,i=t.default?Vn(t.default()):[];for(let u=0;u<i.length;u++){const d=i[u];d.key!=null&&ut(d,Rt(d,l,s,n))}if(r)for(let u=0;u<r.length;u++){const d=r[u];ut(d,Rt(d,l,s,n)),Ao.set(d,d.el.getBoundingClientRect())}return ee(c,null,i)}}},Xf=Yf;function Zf(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function Qf(e){Ro.set(e,e.el.getBoundingClientRect())}function Gf(e){const t=Ao.get(e),n=Ro.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const i=e.el.style;return i.transform=i.webkitTransform=`translate(${s}px,${r}px)`,i.transitionDuration="0s",e}}function eu(e,t,n){const s=e.cloneNode();e._vtc&&e._vtc.forEach(o=>{o.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(o=>o&&s.classList.add(o)),s.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(s);const{hasTransform:i}=To(s);return r.removeChild(s),i}const Ge=e=>{const t=e.props["onUpdate:modelValue"];return B(t)?n=>Tt(t,n):t};function tu(e){e.target.composing=!0}function Yr(e){const t=e.target;t.composing&&(t.composing=!1,nu(t,"input"))}function nu(e,t){const n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}const On={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e._assign=Ge(r);const i=s||r.props&&r.props.type==="number";ke(e,t?"change":"input",o=>{if(o.target.composing)return;let l=e.value;n?l=l.trim():i&&(l=Je(l)),e._assign(l)}),n&&ke(e,"change",()=>{e.value=e.value.trim()}),t||(ke(e,"compositionstart",tu),ke(e,"compositionend",Yr),ke(e,"change",Yr))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},i){if(e._assign=Ge(i),e.composing||document.activeElement===e&&(n||s&&e.value.trim()===t||(r||e.type==="number")&&Je(e.value)===t))return;const o=t==null?"":t;e.value!==o&&(e.value=o)}},ur={deep:!0,created(e,t,n){e._assign=Ge(n),ke(e,"change",()=>{const s=e._modelValue,r=St(e),i=e.checked,o=e._assign;if(B(s)){const l=Nn(s,r),c=l!==-1;if(i&&!c)o(s.concat(r));else if(!i&&c){const u=[...s];u.splice(l,1),o(u)}}else if(at(s)){const l=new Set(s);i?l.add(r):l.delete(r),o(l)}else o(Fo(e,i))})},mounted:Xr,beforeUpdate(e,t,n){e._assign=Ge(n),Xr(e,t,n)}};function Xr(e,{value:t,oldValue:n},s){e._modelValue=t,B(t)?e.checked=Nn(t,s.props.value)>-1:at(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=ze(t,Fo(e,!0)))}const ar={created(e,{value:t},n){e.checked=ze(t,n.props.value),e._assign=Ge(n),ke(e,"change",()=>{e._assign(St(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e._assign=Ge(s),t!==n&&(e.checked=ze(t,s.props.value))}},Po={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=at(t);ke(e,"change",()=>{const i=Array.prototype.filter.call(e.options,o=>o.selected).map(o=>n?Je(St(o)):St(o));e._assign(e.multiple?r?new Set(i):i:i[0])}),e._assign=Ge(s)},mounted(e,{value:t}){Zr(e,t)},beforeUpdate(e,t,n){e._assign=Ge(n)},updated(e,{value:t}){Zr(e,t)}};function Zr(e,t){const n=e.multiple;if(!(n&&!B(t)&&!at(t))){for(let s=0,r=e.options.length;s<r;s++){const i=e.options[s],o=St(i);if(n)B(t)?i.selected=Nn(t,o)>-1:i.selected=t.has(o);else if(ze(St(i),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function St(e){return"_value"in e?e._value:e.value}function Fo(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const su={created(e,t,n){yn(e,t,n,null,"created")},mounted(e,t,n){yn(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){yn(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){yn(e,t,n,s,"updated")}};function yn(e,t,n,s,r){let i;switch(e.tagName){case"SELECT":i=Po;break;case"TEXTAREA":i=On;break;default:switch(n.props&&n.props.type){case"checkbox":i=ur;break;case"radio":i=ar;break;default:i=On}}const o=i[r];o&&o(e,t,n,s)}function ru(){On.getSSRProps=({value:e})=>({value:e}),ar.getSSRProps=({value:e},t)=>{if(t.props&&ze(t.props.value,e))return{checked:!0}},ur.getSSRProps=({value:e},t)=>{if(B(e)){if(t.props&&Nn(e,t.props.value)>-1)return{checked:!0}}else if(at(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}}}const iu=["ctrl","shift","alt","meta"],ou={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>iu.some(n=>e[`${n}Key`]&&!t.includes(n))},lu=(e,t)=>(n,...s)=>{for(let r=0;r<t.length;r++){const i=ou[t[r]];if(i&&i(n,t))return}return e(n,...s)},cu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},fu=(e,t)=>n=>{if(!("key"in n))return;const s=Fe(n.key);if(t.some(r=>r===s||cu[r]===s))return e(n)},Mo={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):Bt(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),Bt(e,!0),s.enter(e)):s.leave(e,()=>{Bt(e,!1)}):Bt(e,t))},beforeUnmount(e,{value:t}){Bt(e,t)}};function Bt(e,t){e.style.display=t?e._vod:"none"}function uu(){Mo.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const So=re({patchProp:Uf},Af);let Jt,Qr=!1;function Oo(){return Jt||(Jt=Zi(So))}function Io(){return Jt=Qr?Jt:Qi(So),Qr=!0,Jt}const As=(...e)=>{Oo().render(...e)},No=(...e)=>{Io().hydrate(...e)},au=(...e)=>{const t=Oo().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Bo(s);if(!r)return;const i=t._component;!j(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.innerHTML="";const o=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},t},du=(...e)=>{const t=Io().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=Bo(s);if(r)return n(r,!0,r instanceof SVGElement)},t};function Bo(e){return ne(e)?document.querySelector(e):e}let Gr=!1;const hu=()=>{Gr||(Gr=!0,ru(),uu())},pu=()=>{};var gu=Object.freeze(Object.defineProperty({__proto__:null,compile:pu,EffectScope:Os,ReactiveEffect:on,customRef:Ll,effect:ol,effectScope:tl,getCurrentScope:nl,isProxy:Hs,isReactive:ct,isReadonly:At,isRef:oe,isShallow:ks,markRaw:Ls,onScopeDispose:sl,proxyRefs:$s,reactive:Un,readonly:Bs,ref:Cn,shallowReactive:_i,shallowReadonly:Ol,shallowRef:Il,stop:ll,toRaw:q,toRef:Ci,toRefs:Dl,triggerRef:Bl,unref:yi,camelize:ye,capitalize:rn,normalizeClass:nn,normalizeProps:Wo,normalizeStyle:tn,toDisplayString:zo,toHandlerKey:Ut,BaseTransition:Qs,Comment:de,Fragment:ue,KeepAlive:bc,Static:ft,Suspense:lc,Teleport:Lc,Text:Pt,callWithAsyncErrorHandling:be,callWithErrorHandling:Me,cloneVNode:Ze,compatUtils:Tf,computed:po,createBlock:rr,createCommentVNode:zc,createElementBlock:Kc,createElementVNode:ir,createHydrationRenderer:Qi,createPropsRestProxy:mf,createRenderer:Zi,createSlots:Yc,createStaticVNode:qc,createTextVNode:or,createVNode:ee,defineAsyncComponent:mc,defineComponent:Gs,defineEmits:uf,defineExpose:af,defineProps:ff,get devtools(){return xt},getCurrentInstance:et,getTransitionRawChildren:Vn,guardReactiveProps:ro,h:mo,handleError:pt,initCustomFormatter:yf,inject:Vt,isMemoSame:bo,isRuntimeOnly:sf,isVNode:Xe,mergeDefaults:gf,mergeProps:io,nextTick:Ks,onActivated:Ni,onBeforeMount:Hi,onBeforeUnmount:zn,onBeforeUpdate:Li,onDeactivated:Bi,onErrorCaptured:ji,onMounted:fn,onRenderTracked:$i,onRenderTriggered:Ui,onServerPrefetch:Di,onUnmounted:Jn,onUpdated:qn,openBlock:Yn,popScopeId:Gl,provide:Mi,pushScopeId:Ql,queuePostFlushCb:Ws,registerRuntimeCompiler:nf,renderList:Jc,renderSlot:Xc,resolveComponent:Uc,resolveDirective:jc,resolveDynamicComponent:$c,resolveFilter:wf,resolveTransitionHooks:Rt,setBlockTracking:bs,setDevtoolsHook:Ri,setTransitionHooks:ut,ssrContextKey:_o,ssrUtils:Ef,toHandlers:Zc,transformVNodeArgs:Vc,useAttrs:pf,useSSRContext:bf,useSlots:hf,useTransitionState:Zs,version:yo,warn:xi,watch:Wt,watchEffect:dc,watchPostEffect:Si,watchSyncEffect:hc,withAsyncContext:_f,withCtx:Js,withDefaults:df,withDirectives:Mc,withMemo:Cf,withScopeId:ec,Transition:fr,TransitionGroup:Xf,VueElement:Zn,createApp:au,createSSRApp:du,defineCustomElement:xo,defineSSRCustomElement:jf,hydrate:No,initDirectivesForSSR:hu,render:As,useCssModule:Vf,useCssVars:Wf,vModelCheckbox:ur,vModelDynamic:su,vModelRadio:ar,vModelSelect:Po,vModelText:On,vShow:Mo,withKeys:fu,withModifiers:lu},Symbol.toStringTag,{value:"Module"}));export{Wt as A,po as B,mo as C,q as D,qn as E,ue as F,jl as G,fu as H,Vt as I,On as J,oe as K,$c as L,io as M,bc as N,Il as O,Ql as P,Gl as Q,Wo as R,ro as S,Lc as T,gu as V,Cn as a,ir as b,rr as c,ee as d,au as e,fn as f,et as g,Jn as h,Un as i,Kc as j,Mc as k,zc as l,tn as m,Ks as n,Yn as o,Mi as p,lu as q,Uc as r,Jc as s,zo as t,yi as u,Mo as v,Js as w,nn as x,or as y,Xc as z}; diff --git a/magic-editor/src/main/resources/magic-editor/assets/vue.e2ed9d9e.js b/magic-editor/src/main/resources/magic-editor/assets/vue.e2ed9d9e.js deleted file mode 100644 index 56629b56..00000000 --- a/magic-editor/src/main/resources/magic-editor/assets/vue.e2ed9d9e.js +++ /dev/null @@ -1,4 +0,0 @@ -function an(e,t){const n=Object.create(null),s=e.split(",");for(let r=0;r<s.length;r++)n[s[r]]=!0;return t?r=>!!n[r.toLowerCase()]:r=>!!n[r]}const Ui="Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt",$i=an(Ui),Ki="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly",ji=an(Ki);function yr(e){return!!e||e===""}function It(e){if(B(e)){const t={};for(let n=0;n<e.length;n++){const s=e[n],r=re(s)?qi(s):It(s);if(r)for(const o in r)t[o]=r[o]}return t}else{if(re(e))return e;if(oe(e))return e}}const Vi=/;(?![^(]*\))/g,Wi=/:(.+)/;function qi(e){const t={};return e.split(Vi).forEach(n=>{if(n){const s=n.split(Wi);s.length>1&&(t[s[0].trim()]=s[1].trim())}}),t}function Ot(e){let t="";if(re(e))t=e;else if(B(e))for(let n=0;n<e.length;n++){const s=Ot(e[n]);s&&(t+=s+" ")}else if(oe(e))for(const n in e)e[n]&&(t+=n+" ");return t.trim()}function zi(e){if(!e)return null;let{class:t,style:n}=e;return t&&!re(t)&&(e.class=Ot(t)),n&&(e.style=It(n)),e}function Ji(e,t){if(e.length!==t.length)return!1;let n=!0;for(let s=0;n&&s<e.length;s++)n=De(e[s],t[s]);return n}function De(e,t){if(e===t)return!0;let n=xr(e),s=xr(t);if(n||s)return n&&s?e.getTime()===t.getTime():!1;if(n=B(e),s=B(t),n||s)return n&&s?Ji(e,t):!1;if(n=oe(e),s=oe(t),n||s){if(!n||!s)return!1;const r=Object.keys(e).length,o=Object.keys(t).length;if(r!==o)return!1;for(const i in e){const l=e.hasOwnProperty(i),c=t.hasOwnProperty(i);if(l&&!c||!l&&c||!De(e[i],t[i]))return!1}}return String(e)===String(t)}function dn(e,t){return e.findIndex(n=>De(n,t))}const Yi=e=>e==null?"":B(e)||oe(e)&&(e.toString===Er||!K(e.toString))?JSON.stringify(e,Cr,2):String(e),Cr=(e,t)=>t&&t.__v_isRef?Cr(e,t.value):bt(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((n,[s,r])=>(n[`${s} =>`]=r,n),{})}:et(t)?{[`Set(${t.size})`]:[...t.values()]}:oe(t)&&!B(t)&&!wr(t)?String(t):t,Y={},_t=[],we=()=>{},Xi=()=>!1,Zi=/^on[^a-z]/,Nt=e=>Zi.test(e),ss=e=>e.startsWith("onUpdate:"),se=Object.assign,rs=(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)},Qi=Object.prototype.hasOwnProperty,J=(e,t)=>Qi.call(e,t),B=Array.isArray,bt=e=>hn(e)==="[object Map]",et=e=>hn(e)==="[object Set]",xr=e=>e instanceof Date,K=e=>typeof e=="function",re=e=>typeof e=="string",os=e=>typeof e=="symbol",oe=e=>e!==null&&typeof e=="object",is=e=>oe(e)&&K(e.then)&&K(e.catch),Er=Object.prototype.toString,hn=e=>Er.call(e),Gi=e=>hn(e).slice(8,-1),wr=e=>hn(e)==="[object Object]",ls=e=>re(e)&&e!=="NaN"&&e[0]!=="-"&&""+parseInt(e,10)===e,Bt=an(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),pn=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},el=/-(\w)/g,ge=pn(e=>e.replace(el,(t,n)=>n?n.toUpperCase():"")),tl=/\B([A-Z])/g,ve=pn(e=>e.replace(tl,"-$1").toLowerCase()),kt=pn(e=>e.charAt(0).toUpperCase()+e.slice(1)),Ht=pn(e=>e?`on${kt(e)}`:""),Lt=(e,t)=>!Object.is(e,t),yt=(e,t)=>{for(let n=0;n<e.length;n++)e[n](t)},gn=(e,t,n)=>{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,value:n})},Ue=e=>{const t=parseFloat(e);return isNaN(t)?e:t};let Tr;const nl=()=>Tr||(Tr=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{});let Ae;const mn=[];class cs{constructor(t=!1){this.active=!0,this.effects=[],this.cleanups=[],!t&&Ae&&(this.parent=Ae,this.index=(Ae.scopes||(Ae.scopes=[])).push(this)-1)}run(t){if(this.active)try{return this.on(),t()}finally{this.off()}}on(){this.active&&(mn.push(this),Ae=this)}off(){this.active&&(mn.pop(),Ae=mn[mn.length-1])}stop(t){if(this.active){if(this.effects.forEach(n=>n.stop()),this.cleanups.forEach(n=>n()),this.scopes&&this.scopes.forEach(n=>n.stop(!0)),this.parent&&!t){const n=this.parent.scopes.pop();n&&n!==this&&(this.parent.scopes[this.index]=n,n.index=this.index)}this.active=!1}}}function sl(e){return new cs(e)}function vr(e,t){t=t||Ae,t&&t.active&&t.effects.push(e)}function rl(){return Ae}function ol(e){Ae&&Ae.cleanups.push(e)}const fs=e=>{const t=new Set(e);return t.w=0,t.n=0,t},Ar=e=>(e.w&$e)>0,Rr=e=>(e.n&$e)>0,il=({deps:e})=>{if(e.length)for(let t=0;t<e.length;t++)e[t].w|=$e},ll=e=>{const{deps:t}=e;if(t.length){let n=0;for(let s=0;s<t.length;s++){const r=t[s];Ar(r)&&!Rr(r)?r.delete(e):t[n++]=r,r.w&=~$e,r.n&=~$e}t.length=n}},us=new WeakMap;let Dt=0,$e=1;const as=30,Ut=[];let tt;const nt=Symbol(""),ds=Symbol("");class $t{constructor(t,n=null,s){this.fn=t,this.scheduler=n,this.active=!0,this.deps=[],vr(this,s)}run(){if(!this.active)return this.fn();if(!Ut.includes(this))try{return Ut.push(tt=this),ul(),$e=1<<++Dt,Dt<=as?il(this):Pr(this),this.fn()}finally{Dt<=as&&ll(this),$e=1<<--Dt,Ke(),Ut.pop();const t=Ut.length;tt=t>0?Ut[t-1]:void 0}}stop(){this.active&&(Pr(this),this.onStop&&this.onStop(),this.active=!1)}}function Pr(e){const{deps:t}=e;if(t.length){for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}}function cl(e,t){e.effect&&(e=e.effect.fn);const n=new $t(e);t&&(se(n,t),t.scope&&vr(n,t.scope)),(!t||!t.lazy)&&n.run();const s=n.run.bind(n);return s.effect=n,s}function fl(e){e.effect.stop()}let Ct=!0;const hs=[];function st(){hs.push(Ct),Ct=!1}function ul(){hs.push(Ct),Ct=!0}function Ke(){const e=hs.pop();Ct=e===void 0?!0:e}function me(e,t,n){if(!Fr())return;let s=us.get(e);s||us.set(e,s=new Map);let r=s.get(n);r||s.set(n,r=fs()),Mr(r)}function Fr(){return Ct&&tt!==void 0}function Mr(e,t){let n=!1;Dt<=as?Rr(e)||(e.n|=$e,n=!Ar(e)):n=!e.has(tt),n&&(e.add(tt),tt.deps.push(e))}function Oe(e,t,n,s,r,o){const i=us.get(e);if(!i)return;let l=[];if(t==="clear")l=[...i.values()];else if(n==="length"&&B(e))i.forEach((c,u)=>{(u==="length"||u>=s)&&l.push(c)});else switch(n!==void 0&&l.push(i.get(n)),t){case"add":B(e)?ls(n)&&l.push(i.get("length")):(l.push(i.get(nt)),bt(e)&&l.push(i.get(ds)));break;case"delete":B(e)||(l.push(i.get(nt)),bt(e)&&l.push(i.get(ds)));break;case"set":bt(e)&&l.push(i.get(nt));break}if(l.length===1)l[0]&&ps(l[0]);else{const c=[];for(const u of l)u&&c.push(...u);ps(fs(c))}}function ps(e,t){for(const n of B(e)?e:[...e])(n!==tt||n.allowRecurse)&&(n.scheduler?n.scheduler():n.run())}const al=an("__proto__,__v_isRef,__isVue"),Sr=new Set(Object.getOwnPropertyNames(Symbol).map(e=>Symbol[e]).filter(os)),dl=_n(),hl=_n(!1,!0),pl=_n(!0),gl=_n(!0,!0),Ir=ml();function ml(){const e={};return["includes","indexOf","lastIndexOf"].forEach(t=>{e[t]=function(...n){const s=q(this);for(let o=0,i=this.length;o<i;o++)me(s,"get",o+"");const r=s[t](...n);return r===-1||r===!1?s[t](...n.map(q)):r}}),["push","pop","shift","unshift","splice"].forEach(t=>{e[t]=function(...n){st();const s=q(this)[t].apply(this,n);return Ke(),s}}),e}function _n(e=!1,t=!1){return function(s,r,o){if(r==="__v_isReactive")return!e;if(r==="__v_isReadonly")return e;if(r==="__v_raw"&&o===(e?t?jr:Kr:t?$r:Ur).get(s))return s;const i=B(s);if(!e&&i&&J(Ir,r))return Reflect.get(Ir,r,o);const l=Reflect.get(s,r,o);return(os(r)?Sr.has(r):al(r))||(e||me(s,"get",r),t)?l:le(l)?!i||!ls(r)?l.value:l:oe(l)?e?ms(l):vn(l):l}}const _l=Or(),bl=Or(!0);function Or(e=!1){return function(n,s,r,o){let i=n[s];if(!e&&!Rn(r)&&(r=q(r),i=q(i),!B(n)&&le(i)&&!le(r)))return i.value=r,!0;const l=B(n)&&ls(s)?Number(s)<n.length:J(n,s),c=Reflect.set(n,s,r,o);return n===q(o)&&(l?Lt(r,i)&&Oe(n,"set",s,r):Oe(n,"add",s,r)),c}}function yl(e,t){const n=J(e,t);e[t];const s=Reflect.deleteProperty(e,t);return s&&n&&Oe(e,"delete",t,void 0),s}function Cl(e,t){const n=Reflect.has(e,t);return(!os(t)||!Sr.has(t))&&me(e,"has",t),n}function xl(e){return me(e,"iterate",B(e)?"length":nt),Reflect.ownKeys(e)}const Nr={get:dl,set:_l,deleteProperty:yl,has:Cl,ownKeys:xl},Br={get:pl,set(e,t){return!0},deleteProperty(e,t){return!0}},El=se({},Nr,{get:hl,set:bl}),wl=se({},Br,{get:gl}),gs=e=>e,bn=e=>Reflect.getPrototypeOf(e);function yn(e,t,n=!1,s=!1){e=e.__v_raw;const r=q(e),o=q(t);t!==o&&!n&&me(r,"get",t),!n&&me(r,"get",o);const{has:i}=bn(r),l=s?gs:n?ys:Kt;if(i.call(r,t))return l(e.get(t));if(i.call(r,o))return l(e.get(o));e!==r&&e.get(t)}function Cn(e,t=!1){const n=this.__v_raw,s=q(n),r=q(e);return e!==r&&!t&&me(s,"has",e),!t&&me(s,"has",r),e===r?n.has(e):n.has(e)||n.has(r)}function xn(e,t=!1){return e=e.__v_raw,!t&&me(q(e),"iterate",nt),Reflect.get(e,"size",e)}function kr(e){e=q(e);const t=q(this);return bn(t).has.call(t,e)||(t.add(e),Oe(t,"add",e,e)),this}function Hr(e,t){t=q(t);const n=q(this),{has:s,get:r}=bn(n);let o=s.call(n,e);o||(e=q(e),o=s.call(n,e));const i=r.call(n,e);return n.set(e,t),o?Lt(t,i)&&Oe(n,"set",e,t):Oe(n,"add",e,t),this}function Lr(e){const t=q(this),{has:n,get:s}=bn(t);let r=n.call(t,e);r||(e=q(e),r=n.call(t,e)),s&&s.call(t,e);const o=t.delete(e);return r&&Oe(t,"delete",e,void 0),o}function Dr(){const e=q(this),t=e.size!==0,n=e.clear();return t&&Oe(e,"clear",void 0,void 0),n}function En(e,t){return function(s,r){const o=this,i=o.__v_raw,l=q(i),c=t?gs:e?ys:Kt;return!e&&me(l,"iterate",nt),i.forEach((u,d)=>s.call(r,c(u),c(d),o))}}function wn(e,t,n){return function(...s){const r=this.__v_raw,o=q(r),i=bt(o),l=e==="entries"||e===Symbol.iterator&&i,c=e==="keys"&&i,u=r[e](...s),d=n?gs:t?ys:Kt;return!t&&me(o,"iterate",c?ds:nt),{next(){const{value:h,done:g}=u.next();return g?{value:h,done:g}:{value:l?[d(h[0]),d(h[1])]:d(h),done:g}},[Symbol.iterator](){return this}}}}function je(e){return function(...t){return e==="delete"?!1:this}}function Tl(){const e={get(o){return yn(this,o)},get size(){return xn(this)},has:Cn,add:kr,set:Hr,delete:Lr,clear:Dr,forEach:En(!1,!1)},t={get(o){return yn(this,o,!1,!0)},get size(){return xn(this)},has:Cn,add:kr,set:Hr,delete:Lr,clear:Dr,forEach:En(!1,!0)},n={get(o){return yn(this,o,!0)},get size(){return xn(this,!0)},has(o){return Cn.call(this,o,!0)},add:je("add"),set:je("set"),delete:je("delete"),clear:je("clear"),forEach:En(!0,!1)},s={get(o){return yn(this,o,!0,!0)},get size(){return xn(this,!0)},has(o){return Cn.call(this,o,!0)},add:je("add"),set:je("set"),delete:je("delete"),clear:je("clear"),forEach:En(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{e[o]=wn(o,!1,!1),n[o]=wn(o,!0,!1),t[o]=wn(o,!1,!0),s[o]=wn(o,!0,!0)}),[e,n,t,s]}const[vl,Al,Rl,Pl]=Tl();function Tn(e,t){const n=t?e?Pl:Rl:e?Al:vl;return(s,r,o)=>r==="__v_isReactive"?!e:r==="__v_isReadonly"?e:r==="__v_raw"?s:Reflect.get(J(n,r)&&r in s?n:s,r,o)}const Fl={get:Tn(!1,!1)},Ml={get:Tn(!1,!0)},Sl={get:Tn(!0,!1)},Il={get:Tn(!0,!0)},Ur=new WeakMap,$r=new WeakMap,Kr=new WeakMap,jr=new WeakMap;function Ol(e){switch(e){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function Nl(e){return e.__v_skip||!Object.isExtensible(e)?0:Ol(Gi(e))}function vn(e){return e&&e.__v_isReadonly?e:An(e,!1,Nr,Fl,Ur)}function Vr(e){return An(e,!1,El,Ml,$r)}function ms(e){return An(e,!0,Br,Sl,Kr)}function Bl(e){return An(e,!0,wl,Il,jr)}function An(e,t,n,s,r){if(!oe(e)||e.__v_raw&&!(t&&e.__v_isReactive))return e;const o=r.get(e);if(o)return o;const i=Nl(e);if(i===0)return e;const l=new Proxy(e,i===2?s:n);return r.set(e,l),l}function rt(e){return Rn(e)?rt(e.__v_raw):!!(e&&e.__v_isReactive)}function Rn(e){return!!(e&&e.__v_isReadonly)}function _s(e){return rt(e)||Rn(e)}function q(e){const t=e&&e.__v_raw;return t?q(t):e}function bs(e){return gn(e,"__v_skip",!0),e}const Kt=e=>oe(e)?vn(e):e,ys=e=>oe(e)?ms(e):e;function Cs(e){Fr()&&(e=q(e),e.dep||(e.dep=fs()),Mr(e.dep))}function Pn(e,t){e=q(e),e.dep&&ps(e.dep)}function le(e){return Boolean(e&&e.__v_isRef===!0)}function Fn(e){return Wr(e,!1)}function kl(e){return Wr(e,!0)}function Wr(e,t){return le(e)?e:new Hl(e,t)}class Hl{constructor(t,n){this._shallow=n,this.dep=void 0,this.__v_isRef=!0,this._rawValue=n?t:q(t),this._value=n?t:Kt(t)}get value(){return Cs(this),this._value}set value(t){t=this._shallow?t:q(t),Lt(t,this._rawValue)&&(this._rawValue=t,this._value=this._shallow?t:Kt(t),Pn(this))}}function Ll(e){Pn(e)}function qr(e){return le(e)?e.value:e}const Dl={get:(e,t,n)=>qr(Reflect.get(e,t,n)),set:(e,t,n,s)=>{const r=e[t];return le(r)&&!le(n)?(r.value=n,!0):Reflect.set(e,t,n,s)}};function xs(e){return rt(e)?e:new Proxy(e,Dl)}class Ul{constructor(t){this.dep=void 0,this.__v_isRef=!0;const{get:n,set:s}=t(()=>Cs(this),()=>Pn(this));this._get=n,this._set=s}get value(){return this._get()}set value(t){this._set(t)}}function $l(e){return new Ul(e)}function Kl(e){const t=B(e)?new Array(e.length):{};for(const n in e)t[n]=zr(e,n);return t}class jl{constructor(t,n,s){this._object=t,this._key=n,this._defaultValue=s,this.__v_isRef=!0}get value(){const t=this._object[this._key];return t===void 0?this._defaultValue:t}set value(t){this._object[this._key]=t}}function zr(e,t,n){const s=e[t];return le(s)?s:new jl(e,t,n)}class Vl{constructor(t,n,s){this._setter=n,this.dep=void 0,this._dirty=!0,this.__v_isRef=!0,this.effect=new $t(t,()=>{this._dirty||(this._dirty=!0,Pn(this))}),this.__v_isReadonly=s}get value(){const t=q(this);return Cs(t),t._dirty&&(t._dirty=!1,t._value=t.effect.run()),t._value}set value(t){this._setter(t)}}function Jr(e,t){let n,s;const r=K(e);return r?(n=e,s=we):(n=e.get,s=e.set),new Vl(n,s,r||!s)}Promise.resolve();let xt,Mn=[];function Yr(e,t){var n,s;xt=e,xt?(xt.enabled=!0,Mn.forEach(({event:r,args:o})=>xt.emit(r,...o)),Mn=[]):typeof window!="undefined"&&window.HTMLElement&&!((s=(n=window.navigator)===null||n===void 0?void 0:n.userAgent)===null||s===void 0?void 0:s.includes("jsdom"))?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(o=>{Yr(o,t)}),setTimeout(()=>{xt||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,Mn=[])},3e3)):Mn=[]}function Wl(e,t,...n){const s=e.vnode.props||Y;let r=n;const o=t.startsWith("update:"),i=o&&t.slice(7);if(i&&i in s){const d=`${i==="modelValue"?"model":i}Modifiers`,{number:h,trim:g}=s[d]||Y;g?r=n.map(T=>T.trim()):h&&(r=n.map(Ue))}let l,c=s[l=Ht(t)]||s[l=Ht(ge(t))];!c&&o&&(c=s[l=Ht(ve(t))]),c&&ye(c,e,6,r);const u=s[l+"Once"];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[l])return;e.emitted[l]=!0,ye(u,e,6,r)}}function Xr(e,t,n=!1){const s=t.emitsCache,r=s.get(e);if(r!==void 0)return r;const o=e.emits;let i={},l=!1;if(!K(e)){const c=u=>{const d=Xr(u,t,!0);d&&(l=!0,se(i,d))};!n&&t.mixins.length&&t.mixins.forEach(c),e.extends&&c(e.extends),e.mixins&&e.mixins.forEach(c)}return!o&&!l?(s.set(e,null),null):(B(o)?o.forEach(c=>i[c]=null):se(i,o),s.set(e,i),i)}function Es(e,t){return!e||!Nt(t)?!1:(t=t.slice(2).replace(/Once$/,""),J(e,t[0].toLowerCase()+t.slice(1))||J(e,ve(t))||J(e,t))}let _e=null,Sn=null;function jt(e){const t=_e;return _e=e,Sn=e&&e.type.__scopeId||null,t}function ql(e){Sn=e}function zl(){Sn=null}const Jl=e=>ws;function ws(e,t=_e,n){if(!t||e._n)return e;const s=(...r)=>{s._d&&Ks(-1);const o=jt(t),i=e(...r);return jt(o),s._d&&Ks(1),i};return s._n=!0,s._c=!0,s._d=!0,s}function In(e){const{type:t,vnode:n,proxy:s,withProxy:r,props:o,propsOptions:[i],slots:l,attrs:c,emit:u,render:d,renderCache:h,data:g,setupState:T,ctx:F,inheritAttrs:H}=e;let _,b;const p=jt(e);try{if(n.shapeFlag&4){const w=r||s;_=be(d.call(w,w,h,o,T,g,F)),b=c}else{const w=t;_=be(w.length>1?w(o,{attrs:c,slots:l,emit:u}):w(o,null)),b=t.props?c:Xl(c)}}catch(w){Zt.length=0,ft(w,e,1),_=ee(de)}let x=_;if(b&&H!==!1){const w=Object.keys(b),{shapeFlag:I}=x;w.length&&I&(1|6)&&(i&&w.some(ss)&&(b=Zl(b,i)),x=qe(x,b))}return n.dirs&&(x.dirs=x.dirs?x.dirs.concat(n.dirs):n.dirs),n.transition&&(x.transition=n.transition),_=x,jt(p),_}function Yl(e){let t;for(let n=0;n<e.length;n++){const s=e[n];if(We(s)){if(s.type!==de||s.children==="v-if"){if(t)return;t=s}}else return}return t}const Xl=e=>{let t;for(const n in e)(n==="class"||n==="style"||Nt(n))&&((t||(t={}))[n]=e[n]);return t},Zl=(e,t)=>{const n={};for(const s in e)(!ss(s)||!(s.slice(9)in t))&&(n[s]=e[s]);return n};function Ql(e,t,n){const{props:s,children:r,component:o}=e,{props:i,children:l,patchFlag:c}=t,u=o.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return s?Zr(s,i,u):!!i;if(c&8){const d=t.dynamicProps;for(let h=0;h<d.length;h++){const g=d[h];if(i[g]!==s[g]&&!Es(u,g))return!0}}}else return(r||l)&&(!l||!l.$stable)?!0:s===i?!1:s?i?Zr(s,i,u):!0:!!i;return!1}function Zr(e,t,n){const s=Object.keys(t);if(s.length!==Object.keys(e).length)return!0;for(let r=0;r<s.length;r++){const o=s[r];if(t[o]!==e[o]&&!Es(n,o))return!0}return!1}function Ts({vnode:e,parent:t},n){for(;t&&t.subTree===e;)(e=t.vnode).el=n,t=t.parent}const Gl=e=>e.__isSuspense,ec={name:"Suspense",__isSuspense:!0,process(e,t,n,s,r,o,i,l,c,u){e==null?nc(t,n,s,r,o,i,l,c,u):sc(e,t,n,s,r,i,l,c,u)},hydrate:rc,create:vs,normalize:oc},tc=ec;function Vt(e,t){const n=e.props&&e.props[t];K(n)&&n()}function nc(e,t,n,s,r,o,i,l,c){const{p:u,o:{createElement:d}}=c,h=d("div"),g=e.suspense=vs(e,r,s,t,h,n,o,i,l,c);u(null,g.pendingBranch=e.ssContent,h,null,s,g,o,i),g.deps>0?(Vt(e,"onPending"),Vt(e,"onFallback"),u(null,e.ssFallback,t,n,s,null,o,i),Et(g,e.ssFallback)):g.resolve()}function sc(e,t,n,s,r,o,i,l,{p:c,um:u,o:{createElement:d}}){const h=t.suspense=e.suspense;h.vnode=t,t.el=e.el;const g=t.ssContent,T=t.ssFallback,{activeBranch:F,pendingBranch:H,isInFallback:_,isHydrating:b}=h;if(H)h.pendingBranch=g,Fe(g,H)?(c(H,g,h.hiddenContainer,null,r,h,o,i,l),h.deps<=0?h.resolve():_&&(c(F,T,n,s,r,null,o,i,l),Et(h,T))):(h.pendingId++,b?(h.isHydrating=!1,h.activeBranch=H):u(H,r,h),h.deps=0,h.effects.length=0,h.hiddenContainer=d("div"),_?(c(null,g,h.hiddenContainer,null,r,h,o,i,l),h.deps<=0?h.resolve():(c(F,T,n,s,r,null,o,i,l),Et(h,T))):F&&Fe(g,F)?(c(F,g,n,s,r,h,o,i,l),h.resolve(!0)):(c(null,g,h.hiddenContainer,null,r,h,o,i,l),h.deps<=0&&h.resolve()));else if(F&&Fe(g,F))c(F,g,n,s,r,h,o,i,l),Et(h,g);else if(Vt(t,"onPending"),h.pendingBranch=g,h.pendingId++,c(null,g,h.hiddenContainer,null,r,h,o,i,l),h.deps<=0)h.resolve();else{const{timeout:p,pendingId:x}=h;p>0?setTimeout(()=>{h.pendingId===x&&h.fallback(T)},p):p===0&&h.fallback(T)}}function vs(e,t,n,s,r,o,i,l,c,u,d=!1){const{p:h,m:g,um:T,n:F,o:{parentNode:H,remove:_}}=u,b=Ue(e.props&&e.props.timeout),p={vnode:e,parent:t,parentComponent:n,isSVG:i,container:s,hiddenContainer:r,anchor:o,deps:0,pendingId:0,timeout:typeof b=="number"?b:-1,activeBranch:null,pendingBranch:null,isInFallback:!0,isHydrating:d,isUnmounted:!1,effects:[],resolve(x=!1){const{vnode:w,activeBranch:I,pendingBranch:O,pendingId:v,effects:k,parentComponent:L,container:$}=p;if(p.isHydrating)p.isHydrating=!1;else if(!x){const W=I&&O.transition&&O.transition.mode==="out-in";W&&(I.transition.afterLeave=()=>{v===p.pendingId&&g(O,$,Z,0)});let{anchor:Z}=p;I&&(Z=F(I),T(I,L,p,!0)),W||g(O,$,Z,0)}Et(p,O),p.pendingBranch=null,p.isInFallback=!1;let j=p.parent,R=!1;for(;j;){if(j.pendingBranch){j.effects.push(...k),R=!0;break}j=j.parent}R||sr(k),p.effects=[],Vt(w,"onResolve")},fallback(x){if(!p.pendingBranch)return;const{vnode:w,activeBranch:I,parentComponent:O,container:v,isSVG:k}=p;Vt(w,"onFallback");const L=F(I),$=()=>{!p.isInFallback||(h(null,x,v,L,O,null,k,l,c),Et(p,x))},j=x.transition&&x.transition.mode==="out-in";j&&(I.transition.afterLeave=$),p.isInFallback=!0,T(I,O,null,!0),j||$()},move(x,w,I){p.activeBranch&&g(p.activeBranch,x,w,I),p.container=x},next(){return p.activeBranch&&F(p.activeBranch)},registerDep(x,w){const I=!!p.pendingBranch;I&&p.deps++;const O=x.vnode.el;x.asyncDep.catch(v=>{ft(v,x,0)}).then(v=>{if(x.isUnmounted||p.isUnmounted||p.pendingId!==x.suspenseId)return;x.asyncResolved=!0;const{vnode:k}=x;Ys(x,v,!1),O&&(k.el=O);const L=!O&&x.subTree.el;w(x,k,H(O||x.subTree.el),O?null:F(x.subTree),p,i,c),L&&_(L),Ts(x,k.el),I&&--p.deps==0&&p.resolve()})},unmount(x,w){p.isUnmounted=!0,p.activeBranch&&T(p.activeBranch,n,x,w),p.pendingBranch&&T(p.pendingBranch,n,x,w)}};return p}function rc(e,t,n,s,r,o,i,l,c){const u=t.suspense=vs(t,s,n,e.parentNode,document.createElement("div"),null,r,o,i,l,!0),d=c(e,u.pendingBranch=t.ssContent,n,u,o,i);return u.deps===0&&u.resolve(),d}function oc(e){const{shapeFlag:t,children:n}=e,s=t&32;e.ssContent=Qr(s?n.default:n),e.ssFallback=s?Qr(n.fallback):ee(de)}function Qr(e){let t;if(K(e)){const n=vt&&e._c;n&&(e._d=!1,Kn()),e=e(),n&&(e._d=!0,t=Pe,Oo())}return B(e)&&(e=Yl(e)),e=be(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(n=>n!==e)),e}function Gr(e,t){t&&t.pendingBranch?B(e)?t.effects.push(...e):t.effects.push(e):sr(e)}function Et(e,t){e.activeBranch=t;const{vnode:n,parentComponent:s}=e,r=n.el=t.el;s&&s.subTree===n&&(s.vnode.el=r,Ts(s,r))}function eo(e,t){if(ie){let n=ie.provides;const s=ie.parent&&ie.parent.provides;s===n&&(n=ie.provides=Object.create(s)),n[e]=t}}function Wt(e,t,n=!1){const s=ie||_e;if(s){const r=s.parent==null?s.vnode.appContext&&s.vnode.appContext.provides:s.parent.provides;if(r&&e in r)return r[e];if(arguments.length>1)return n&&K(t)?t.call(s.proxy):t}}function As(){const e={isMounted:!1,isLeaving:!1,isUnmounting:!1,leavingVNodes:new Map};return Yt(()=>{e.isMounted=!0}),kn(()=>{e.isUnmounting=!0}),e}const xe=[Function,Array],ic={name:"BaseTransition",props:{mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:xe,onEnter:xe,onAfterEnter:xe,onEnterCancelled:xe,onBeforeLeave:xe,onLeave:xe,onAfterLeave:xe,onLeaveCancelled:xe,onBeforeAppear:xe,onAppear:xe,onAfterAppear:xe,onAppearCancelled:xe},setup(e,{slots:t}){const n=Je(),s=As();let r;return()=>{const o=t.default&&On(t.default(),!0);if(!o||!o.length)return;const i=q(e),{mode:l}=i,c=o[0];if(s.isLeaving)return Ps(c);const u=no(c);if(!u)return Ps(c);const d=wt(u,i,s,n);ot(u,d);const h=n.subTree,g=h&&no(h);let T=!1;const{getTransitionKey:F}=u.type;if(F){const H=F();r===void 0?r=H:H!==r&&(r=H,T=!0)}if(g&&g.type!==de&&(!Fe(u,g)||T)){const H=wt(g,i,s,n);if(ot(g,H),l==="out-in")return s.isLeaving=!0,H.afterLeave=()=>{s.isLeaving=!1,n.update()},Ps(c);l==="in-out"&&u.type!==de&&(H.delayLeave=(_,b,p)=>{const x=to(s,g);x[String(g.key)]=g,_._leaveCb=()=>{b(),_._leaveCb=void 0,delete d.delayedLeave},d.delayedLeave=p})}return c}}},Rs=ic;function to(e,t){const{leavingVNodes:n}=e;let s=n.get(t.type);return s||(s=Object.create(null),n.set(t.type,s)),s}function wt(e,t,n,s){const{appear:r,mode:o,persisted:i=!1,onBeforeEnter:l,onEnter:c,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:h,onLeave:g,onAfterLeave:T,onLeaveCancelled:F,onBeforeAppear:H,onAppear:_,onAfterAppear:b,onAppearCancelled:p}=t,x=String(e.key),w=to(n,e),I=(v,k)=>{v&&ye(v,s,9,k)},O={mode:o,persisted:i,beforeEnter(v){let k=l;if(!n.isMounted)if(r)k=H||l;else return;v._leaveCb&&v._leaveCb(!0);const L=w[x];L&&Fe(e,L)&&L.el._leaveCb&&L.el._leaveCb(),I(k,[v])},enter(v){let k=c,L=u,$=d;if(!n.isMounted)if(r)k=_||c,L=b||u,$=p||d;else return;let j=!1;const R=v._enterCb=W=>{j||(j=!0,W?I($,[v]):I(L,[v]),O.delayedLeave&&O.delayedLeave(),v._enterCb=void 0)};k?(k(v,R),k.length<=1&&R()):R()},leave(v,k){const L=String(e.key);if(v._enterCb&&v._enterCb(!0),n.isUnmounting)return k();I(h,[v]);let $=!1;const j=v._leaveCb=R=>{$||($=!0,k(),R?I(F,[v]):I(T,[v]),v._leaveCb=void 0,w[L]===e&&delete w[L])};w[L]=e,g?(g(v,j),g.length<=1&&j()):j()},clone(v){return wt(v,t,n,s)}};return O}function Ps(e){if(zt(e))return e=qe(e),e.children=null,e}function no(e){return zt(e)?e.children?e.children[0]:void 0:e}function ot(e,t){e.shapeFlag&6&&e.component?ot(e.component.subTree,t):e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function On(e,t=!1){let n=[],s=0;for(let r=0;r<e.length;r++){const o=e[r];o.type===ue?(o.patchFlag&128&&s++,n=n.concat(On(o.children,t))):(t||o.type!==de)&&n.push(o)}if(s>1)for(let r=0;r<n.length;r++)n[r].patchFlag=-2;return n}function Fs(e){return K(e)?{setup:e,name:e.name}:e}const qt=e=>!!e.type.__asyncLoader;function lc(e){K(e)&&(e={loader:e});const{loader:t,loadingComponent:n,errorComponent:s,delay:r=200,timeout:o,suspensible:i=!0,onError:l}=e;let c=null,u,d=0;const h=()=>(d++,c=null,g()),g=()=>{let T;return c||(T=c=t().catch(F=>{if(F=F instanceof Error?F:new Error(String(F)),l)return new Promise((H,_)=>{l(F,()=>H(h()),()=>_(F),d+1)});throw F}).then(F=>T!==c&&c?c:(F&&(F.__esModule||F[Symbol.toStringTag]==="Module")&&(F=F.default),u=F,F)))};return Fs({name:"AsyncComponentWrapper",__asyncLoader:g,get __asyncResolved(){return u},setup(){const T=ie;if(u)return()=>Ms(u,T);const F=p=>{c=null,ft(p,T,13,!s)};if(i&&T.suspense||Qt)return g().then(p=>()=>Ms(p,T)).catch(p=>(F(p),()=>s?ee(s,{error:p}):null));const H=Fn(!1),_=Fn(),b=Fn(!!r);return r&&setTimeout(()=>{b.value=!1},r),o!=null&&setTimeout(()=>{if(!H.value&&!_.value){const p=new Error(`Async component timed out after ${o}ms.`);F(p),_.value=p}},o),g().then(()=>{H.value=!0,T.parent&&zt(T.parent.vnode)&&nr(T.parent.update)}).catch(p=>{F(p),_.value=p}),()=>{if(H.value&&u)return Ms(u,T);if(_.value&&s)return ee(s,{error:_.value});if(n&&!b.value)return ee(n)}}})}function Ms(e,{vnode:{ref:t,props:n,children:s}}){const r=ee(e,n,s);return r.ref=t,r}const zt=e=>e.type.__isKeepAlive,cc={name:"KeepAlive",__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){const n=Je(),s=n.ctx;if(!s.renderer)return t.default;const r=new Map,o=new Set;let i=null;const l=n.suspense,{renderer:{p:c,m:u,um:d,o:{createElement:h}}}=s,g=h("div");s.activate=(p,x,w,I,O)=>{const v=p.component;u(p,x,w,0,l),c(v.vnode,p,x,w,v,l,I,p.slotScopeIds,O),fe(()=>{v.isDeactivated=!1,v.a&&yt(v.a);const k=p.props&&p.props.onVnodeMounted;k&&he(k,v.parent,p)},l)},s.deactivate=p=>{const x=p.component;u(p,g,null,1,l),fe(()=>{x.da&&yt(x.da);const w=p.props&&p.props.onVnodeUnmounted;w&&he(w,x.parent,p),x.isDeactivated=!0},l)};function T(p){Ss(p),d(p,n,l)}function F(p){r.forEach((x,w)=>{const I=zn(x.type);I&&(!p||!p(I))&&H(w)})}function H(p){const x=r.get(p);!i||x.type!==i.type?T(x):i&&Ss(i),r.delete(p),o.delete(p)}rn(()=>[e.include,e.exclude],([p,x])=>{p&&F(w=>Jt(p,w)),x&&F(w=>!Jt(x,w))},{flush:"post",deep:!0});let _=null;const b=()=>{_!=null&&r.set(_,Is(n.subTree))};return Yt(b),Bn(b),kn(()=>{r.forEach(p=>{const{subTree:x,suspense:w}=n,I=Is(x);if(p.type===I.type){Ss(I);const O=I.component.da;O&&fe(O,w);return}T(p)})}),()=>{if(_=null,!t.default)return null;const p=t.default(),x=p[0];if(p.length>1)return i=null,p;if(!We(x)||!(x.shapeFlag&4)&&!(x.shapeFlag&128))return i=null,x;let w=Is(x);const I=w.type,O=zn(qt(w)?w.type.__asyncResolved||{}:I),{include:v,exclude:k,max:L}=e;if(v&&(!O||!Jt(v,O))||k&&O&&Jt(k,O))return i=w,x;const $=w.key==null?I:w.key,j=r.get($);return w.el&&(w=qe(w),x.shapeFlag&128&&(x.ssContent=w)),_=$,j?(w.el=j.el,w.component=j.component,w.transition&&ot(w,w.transition),w.shapeFlag|=512,o.delete($),o.add($)):(o.add($),L&&o.size>parseInt(L,10)&&H(o.values().next().value)),w.shapeFlag|=256,i=w,x}}},fc=cc;function Jt(e,t){return B(e)?e.some(n=>Jt(n,t)):re(e)?e.split(",").indexOf(t)>-1:e.test?e.test(t):!1}function so(e,t){oo(e,"a",t)}function ro(e,t){oo(e,"da",t)}function oo(e,t,n=ie){const s=e.__wdc||(e.__wdc=()=>{let r=n;for(;r;){if(r.isDeactivated)return;r=r.parent}return e()});if(Nn(t,s,n),n){let r=n.parent;for(;r&&r.parent;)zt(r.parent.vnode)&&uc(s,t,n,r),r=r.parent}}function uc(e,t,n,s){const r=Nn(t,e,s,!0);Hn(()=>{rs(s[t],r)},n)}function Ss(e){let t=e.shapeFlag;t&256&&(t-=256),t&512&&(t-=512),e.shapeFlag=t}function Is(e){return e.shapeFlag&128?e.ssContent:e}function Nn(e,t,n=ie,s=!1){if(n){const r=n[e]||(n[e]=[]),o=t.__weh||(t.__weh=(...i)=>{if(n.isUnmounted)return;st(),Ye(n);const l=ye(t,n,e,i);return Xe(),Ke(),l});return s?r.unshift(o):r.push(o),o}}const Ne=e=>(t,n=ie)=>(!Qt||e==="sp")&&Nn(e,t,n),io=Ne("bm"),Yt=Ne("m"),lo=Ne("bu"),Bn=Ne("u"),kn=Ne("bum"),Hn=Ne("um"),co=Ne("sp"),fo=Ne("rtg"),uo=Ne("rtc");function ao(e,t=ie){Nn("ec",e,t)}let Os=!0;function ac(e){const t=go(e),n=e.proxy,s=e.ctx;Os=!1,t.beforeCreate&&ho(t.beforeCreate,e,"bc");const{data:r,computed:o,methods:i,watch:l,provide:c,inject:u,created:d,beforeMount:h,mounted:g,beforeUpdate:T,updated:F,activated:H,deactivated:_,beforeDestroy:b,beforeUnmount:p,destroyed:x,unmounted:w,render:I,renderTracked:O,renderTriggered:v,errorCaptured:k,serverPrefetch:L,expose:$,inheritAttrs:j,components:R,directives:W,filters:Z}=t;if(u&&dc(u,s,null,e.appContext.config.unwrapInjectedRef),i)for(const ne in i){const Q=i[ne];K(Q)&&(s[ne]=Q.bind(n))}if(r){const ne=r.call(n,n);oe(ne)&&(e.data=vn(ne))}if(Os=!0,o)for(const ne in o){const Q=o[ne],Se=K(Q)?Q.bind(n,n):K(Q.get)?Q.get.bind(n,n):we,es=!K(Q)&&K(Q.set)?Q.set.bind(n):we,Mt=Jr({get:Se,set:es});Object.defineProperty(s,ne,{enumerable:!0,configurable:!0,get:()=>Mt.value,set:pt=>Mt.value=pt})}if(l)for(const ne in l)po(l[ne],s,n,ne);if(c){const ne=K(c)?c.call(n):c;Reflect.ownKeys(ne).forEach(Q=>{eo(Q,ne[Q])})}d&&ho(d,e,"c");function ce(ne,Q){B(Q)?Q.forEach(Se=>ne(Se.bind(n))):Q&&ne(Q.bind(n))}if(ce(io,h),ce(Yt,g),ce(lo,T),ce(Bn,F),ce(so,H),ce(ro,_),ce(ao,k),ce(uo,O),ce(fo,v),ce(kn,p),ce(Hn,w),ce(co,L),B($))if($.length){const ne=e.exposed||(e.exposed={});$.forEach(Q=>{Object.defineProperty(ne,Q,{get:()=>n[Q],set:Se=>n[Q]=Se})})}else e.exposed||(e.exposed={});I&&e.render===we&&(e.render=I),j!=null&&(e.inheritAttrs=j),R&&(e.components=R),W&&(e.directives=W)}function dc(e,t,n=we,s=!1){B(e)&&(e=Ns(e));for(const r in e){const o=e[r];let i;oe(o)?"default"in o?i=Wt(o.from||r,o.default,!0):i=Wt(o.from||r):i=Wt(o),le(i)&&s?Object.defineProperty(t,r,{enumerable:!0,configurable:!0,get:()=>i.value,set:l=>i.value=l}):t[r]=i}}function ho(e,t,n){ye(B(e)?e.map(s=>s.bind(t.proxy)):e.bind(t.proxy),t,n)}function po(e,t,n,s){const r=s.includes(".")?Go(n,s):()=>n[s];if(re(e)){const o=t[e];K(o)&&rn(r,o)}else if(K(e))rn(r,e.bind(n));else if(oe(e))if(B(e))e.forEach(o=>po(o,t,n,s));else{const o=K(e.handler)?e.handler.bind(n):t[e.handler];K(o)&&rn(r,o,e)}}function go(e){const t=e.type,{mixins:n,extends:s}=t,{mixins:r,optionsCache:o,config:{optionMergeStrategies:i}}=e.appContext,l=o.get(t);let c;return l?c=l:!r.length&&!n&&!s?c=t:(c={},r.length&&r.forEach(u=>Ln(c,u,i,!0)),Ln(c,t,i)),o.set(t,c),c}function Ln(e,t,n,s=!1){const{mixins:r,extends:o}=t;o&&Ln(e,o,n,!0),r&&r.forEach(i=>Ln(e,i,n,!0));for(const i in t)if(!(s&&i==="expose")){const l=hc[i]||n&&n[i];e[i]=l?l(e[i],t[i]):t[i]}return e}const hc={data:mo,props:it,emits:it,methods:it,computed:it,beforeCreate:ae,created:ae,beforeMount:ae,mounted:ae,beforeUpdate:ae,updated:ae,beforeDestroy:ae,beforeUnmount:ae,destroyed:ae,unmounted:ae,activated:ae,deactivated:ae,errorCaptured:ae,serverPrefetch:ae,components:it,directives:it,watch:gc,provide:mo,inject:pc};function mo(e,t){return t?e?function(){return se(K(e)?e.call(this,this):e,K(t)?t.call(this,this):t)}:t:e}function pc(e,t){return it(Ns(e),Ns(t))}function Ns(e){if(B(e)){const t={};for(let n=0;n<e.length;n++)t[e[n]]=e[n];return t}return e}function ae(e,t){return e?[...new Set([].concat(e,t))]:t}function it(e,t){return e?se(se(Object.create(null),e),t):t}function gc(e,t){if(!e)return t;if(!t)return e;const n=se(Object.create(null),e);for(const s in t)n[s]=ae(e[s],t[s]);return n}function mc(e,t,n,s=!1){const r={},o={};gn(o,jn,1),e.propsDefaults=Object.create(null),_o(e,t,r,o);for(const i in e.propsOptions[0])i in r||(r[i]=void 0);n?e.props=s?r:Vr(r):e.type.props?e.props=r:e.props=o,e.attrs=o}function _c(e,t,n,s){const{props:r,attrs:o,vnode:{patchFlag:i}}=e,l=q(r),[c]=e.propsOptions;let u=!1;if((s||i>0)&&!(i&16)){if(i&8){const d=e.vnode.dynamicProps;for(let h=0;h<d.length;h++){let g=d[h];const T=t[g];if(c)if(J(o,g))T!==o[g]&&(o[g]=T,u=!0);else{const F=ge(g);r[F]=Bs(c,l,F,T,e,!1)}else T!==o[g]&&(o[g]=T,u=!0)}}}else{_o(e,t,r,o)&&(u=!0);let d;for(const h in l)(!t||!J(t,h)&&((d=ve(h))===h||!J(t,d)))&&(c?n&&(n[h]!==void 0||n[d]!==void 0)&&(r[h]=Bs(c,l,h,void 0,e,!0)):delete r[h]);if(o!==l)for(const h in o)(!t||!J(t,h))&&(delete o[h],u=!0)}u&&Oe(e,"set","$attrs")}function _o(e,t,n,s){const[r,o]=e.propsOptions;let i=!1,l;if(t)for(let c in t){if(Bt(c))continue;const u=t[c];let d;r&&J(r,d=ge(c))?!o||!o.includes(d)?n[d]=u:(l||(l={}))[d]=u:Es(e.emitsOptions,c)||(!(c in s)||u!==s[c])&&(s[c]=u,i=!0)}if(o){const c=q(n),u=l||Y;for(let d=0;d<o.length;d++){const h=o[d];n[h]=Bs(r,c,h,u[h],e,!J(u,h))}}return i}function Bs(e,t,n,s,r,o){const i=e[n];if(i!=null){const l=J(i,"default");if(l&&s===void 0){const c=i.default;if(i.type!==Function&&K(c)){const{propsDefaults:u}=r;n in u?s=u[n]:(Ye(r),s=u[n]=c.call(null,t),Xe())}else s=c}i[0]&&(o&&!l?s=!1:i[1]&&(s===""||s===ve(n))&&(s=!0))}return s}function bo(e,t,n=!1){const s=t.propsCache,r=s.get(e);if(r)return r;const o=e.props,i={},l=[];let c=!1;if(!K(e)){const d=h=>{c=!0;const[g,T]=bo(h,t,!0);se(i,g),T&&l.push(...T)};!n&&t.mixins.length&&t.mixins.forEach(d),e.extends&&d(e.extends),e.mixins&&e.mixins.forEach(d)}if(!o&&!c)return s.set(e,_t),_t;if(B(o))for(let d=0;d<o.length;d++){const h=ge(o[d]);yo(h)&&(i[h]=Y)}else if(o)for(const d in o){const h=ge(d);if(yo(h)){const g=o[d],T=i[h]=B(g)||K(g)?{type:g}:g;if(T){const F=Eo(Boolean,T.type),H=Eo(String,T.type);T[0]=F>-1,T[1]=H<0||F<H,(F>-1||J(T,"default"))&&l.push(h)}}}const u=[i,l];return s.set(e,u),u}function yo(e){return e[0]!=="$"}function Co(e){const t=e&&e.toString().match(/^\s*function (\w+)/);return t?t[1]:e===null?"null":""}function xo(e,t){return Co(e)===Co(t)}function Eo(e,t){return B(t)?t.findIndex(n=>xo(n,e)):K(t)&&xo(t,e)?0:-1}const wo=e=>e[0]==="_"||e==="$stable",ks=e=>B(e)?e.map(be):[be(e)],bc=(e,t,n)=>{const s=ws((...r)=>ks(t(...r)),n);return s._c=!1,s},To=(e,t,n)=>{const s=e._ctx;for(const r in e){if(wo(r))continue;const o=e[r];if(K(o))t[r]=bc(r,o,s);else if(o!=null){const i=ks(o);t[r]=()=>i}}},vo=(e,t)=>{const n=ks(t);e.slots.default=()=>n},yc=(e,t)=>{if(e.vnode.shapeFlag&32){const n=t._;n?(e.slots=q(t),gn(t,"_",n)):To(t,e.slots={})}else e.slots={},t&&vo(e,t);gn(e.slots,jn,1)},Cc=(e,t,n)=>{const{vnode:s,slots:r}=e;let o=!0,i=Y;if(s.shapeFlag&32){const l=t._;l?n&&l===1?o=!1:(se(r,t),!n&&l===1&&delete r._):(o=!t.$stable,To(t,r)),i=t}else t&&(vo(e,t),i={default:1});if(o)for(const l in r)!wo(l)&&!(l in i)&&delete r[l]};function xc(e,t){const n=_e;if(n===null)return e;const s=n.proxy,r=e.dirs||(e.dirs=[]);for(let o=0;o<t.length;o++){let[i,l,c,u=Y]=t[o];K(i)&&(i={mounted:i,updated:i}),i.deep&&ut(l),r.push({dir:i,instance:s,value:l,oldValue:void 0,arg:c,modifiers:u})}return e}function Re(e,t,n,s){const r=e.dirs,o=t&&t.dirs;for(let i=0;i<r.length;i++){const l=r[i];o&&(l.oldValue=o[i].value);let c=l.dir[s];c&&(st(),ye(c,n,8,[e.el,l,e,t]),Ke())}}function Ao(){return{app:null,config:{isNativeTag:Xi,performance:!1,globalProperties:{},optionMergeStrategies:{},errorHandler:void 0,warnHandler:void 0,compilerOptions:{}},mixins:[],components:{},directives:{},provides:Object.create(null),optionsCache:new WeakMap,propsCache:new WeakMap,emitsCache:new WeakMap}}let Ec=0;function wc(e,t){return function(s,r=null){r!=null&&!oe(r)&&(r=null);const o=Ao(),i=new Set;let l=!1;const c=o.app={_uid:Ec++,_component:s,_props:r,_container:null,_context:o,_instance:null,version:ri,get config(){return o.config},set config(u){},use(u,...d){return i.has(u)||(u&&K(u.install)?(i.add(u),u.install(c,...d)):K(u)&&(i.add(u),u(c,...d))),c},mixin(u){return o.mixins.includes(u)||o.mixins.push(u),c},component(u,d){return d?(o.components[u]=d,c):o.components[u]},directive(u,d){return d?(o.directives[u]=d,c):o.directives[u]},mount(u,d,h){if(!l){const g=ee(s,r);return g.appContext=o,d&&t?t(g,u):e(g,u,h),l=!0,c._container=u,u.__vue_app__=c,Zs(g.component)||g.component.proxy}},unmount(){l&&(e(null,c._container),delete c._container.__vue_app__)},provide(u,d){return o.provides[u]=d,c}};return c}}function Dn(e,t,n,s,r=!1){if(B(e)){e.forEach((g,T)=>Dn(g,t&&(B(t)?t[T]:t),n,s,r));return}if(qt(s)&&!r)return;const o=s.shapeFlag&4?Zs(s.component)||s.component.proxy:s.el,i=r?null:o,{i:l,r:c}=e,u=t&&t.r,d=l.refs===Y?l.refs={}:l.refs,h=l.setupState;if(u!=null&&u!==c&&(re(u)?(d[u]=null,J(h,u)&&(h[u]=null)):le(u)&&(u.value=null)),K(c))Me(c,l,12,[i,d]);else{const g=re(c),T=le(c);if(g||T){const F=()=>{if(e.f){const H=g?d[c]:c.value;r?B(H)&&rs(H,o):B(H)?H.includes(o)||H.push(o):g?d[c]=[o]:(c.value=[o],e.k&&(d[e.k]=c.value))}else g?(d[c]=i,J(h,c)&&(h[c]=i)):le(c)&&(c.value=i,e.k&&(d[e.k]=i))};i?(F.id=-1,fe(F,n)):F()}}}let Ve=!1;const Un=e=>/svg/.test(e.namespaceURI)&&e.tagName!=="foreignObject",Hs=e=>e.nodeType===8;function Tc(e){const{mt:t,p:n,o:{patchProp:s,nextSibling:r,parentNode:o,remove:i,insert:l,createComment:c}}=e,u=(_,b)=>{if(!b.hasChildNodes()){n(null,_,b),Yn();return}Ve=!1,d(b.firstChild,_,null,null,null),Yn(),Ve&&console.error("Hydration completed but contains mismatches.")},d=(_,b,p,x,w,I=!1)=>{const O=Hs(_)&&_.data==="[",v=()=>F(_,b,p,x,w,O),{type:k,ref:L,shapeFlag:$}=b,j=_.nodeType;b.el=_;let R=null;switch(k){case Tt:j!==3?R=v():(_.data!==b.children&&(Ve=!0,_.data=b.children),R=r(_));break;case de:j!==8||O?R=v():R=r(_);break;case ct:if(j!==1)R=v();else{R=_;const W=!b.children.length;for(let Z=0;Z<b.staticCount;Z++)W&&(b.children+=R.outerHTML),Z===b.staticCount-1&&(b.anchor=R),R=r(R);return R}break;case ue:O?R=T(_,b,p,x,w,I):R=v();break;default:if($&1)j!==1||b.type.toLowerCase()!==_.tagName.toLowerCase()?R=v():R=h(_,b,p,x,w,I);else if($&6){b.slotScopeIds=w;const W=o(_);if(t(b,W,null,p,x,Un(W),I),R=O?H(_):r(_),qt(b)){let Z;O?(Z=ee(ue),Z.anchor=R?R.previousSibling:W.lastChild):Z=_.nodeType===3?Ws(""):ee("div"),Z.el=_,b.component.subTree=Z}}else $&64?j!==8?R=v():R=b.type.hydrate(_,b,p,x,w,I,e,g):$&128&&(R=b.type.hydrate(_,b,p,x,Un(o(_)),w,I,e,d))}return L!=null&&Dn(L,null,x,b),R},h=(_,b,p,x,w,I)=>{I=I||!!b.dynamicChildren;const{type:O,props:v,patchFlag:k,shapeFlag:L,dirs:$}=b,j=O==="input"&&$||O==="option";if(j||k!==-1){if($&&Re(b,null,p,"created"),v)if(j||!I||k&(16|32))for(const W in v)(j&&W.endsWith("value")||Nt(W)&&!Bt(W))&&s(_,W,null,v[W],!1,void 0,p);else v.onClick&&s(_,"onClick",null,v.onClick,!1,void 0,p);let R;if((R=v&&v.onVnodeBeforeMount)&&he(R,p,b),$&&Re(b,null,p,"beforeMount"),((R=v&&v.onVnodeMounted)||$)&&Gr(()=>{R&&he(R,p,b),$&&Re(b,null,p,"mounted")},x),L&16&&!(v&&(v.innerHTML||v.textContent))){let W=g(_.firstChild,b,_,p,x,w,I);for(;W;){Ve=!0;const Z=W;W=W.nextSibling,i(Z)}}else L&8&&_.textContent!==b.children&&(Ve=!0,_.textContent=b.children)}return _.nextSibling},g=(_,b,p,x,w,I,O)=>{O=O||!!b.dynamicChildren;const v=b.children,k=v.length;for(let L=0;L<k;L++){const $=O?v[L]:v[L]=be(v[L]);if(_)_=d(_,$,x,w,I,O);else{if($.type===Tt&&!$.children)continue;Ve=!0,n(null,$,p,null,x,w,Un(p),I)}}return _},T=(_,b,p,x,w,I)=>{const{slotScopeIds:O}=b;O&&(w=w?w.concat(O):O);const v=o(_),k=g(r(_),b,v,p,x,w,I);return k&&Hs(k)&&k.data==="]"?r(b.anchor=k):(Ve=!0,l(b.anchor=c("]"),v,k),k)},F=(_,b,p,x,w,I)=>{if(Ve=!0,b.el=null,I){const k=H(_);for(;;){const L=r(_);if(L&&L!==k)i(L);else break}}const O=r(_),v=o(_);return i(_),n(null,b,v,O,p,x,Un(v),w),O},H=_=>{let b=0;for(;_;)if(_=r(_),_&&Hs(_)&&(_.data==="["&&b++,_.data==="]")){if(b===0)return r(_);b--}return _};return[u,d]}const fe=Gr;function Ro(e){return Fo(e)}function Po(e){return Fo(e,Tc)}function Fo(e,t){const n=nl();n.__VUE__=!0;const{insert:s,remove:r,patchProp:o,createElement:i,createText:l,createComment:c,setText:u,setElementText:d,parentNode:h,nextSibling:g,setScopeId:T=we,cloneNode:F,insertStaticContent:H}=e,_=(f,a,m,C=null,y=null,P=null,S=!1,A=null,M=!!a.dynamicChildren)=>{if(f===a)return;f&&!Fe(f,a)&&(C=un(f),Le(f,y,P,!0),f=null),a.patchFlag===-2&&(M=!1,a.dynamicChildren=null);const{type:E,ref:D,shapeFlag:N}=a;switch(E){case Tt:b(f,a,m,C);break;case de:p(f,a,m,C);break;case ct:f==null&&x(a,m,C,S);break;case ue:W(f,a,m,C,y,P,S,A,M);break;default:N&1?O(f,a,m,C,y,P,S,A,M):N&6?Z(f,a,m,C,y,P,S,A,M):(N&64||N&128)&&E.process(f,a,m,C,y,P,S,A,M,gt)}D!=null&&y&&Dn(D,f&&f.ref,P,a||f,!a)},b=(f,a,m,C)=>{if(f==null)s(a.el=l(a.children),m,C);else{const y=a.el=f.el;a.children!==f.children&&u(y,a.children)}},p=(f,a,m,C)=>{f==null?s(a.el=c(a.children||""),m,C):a.el=f.el},x=(f,a,m,C)=>{[f.el,f.anchor]=H(f.children,a,m,C)},w=({el:f,anchor:a},m,C)=>{let y;for(;f&&f!==a;)y=g(f),s(f,m,C),f=y;s(a,m,C)},I=({el:f,anchor:a})=>{let m;for(;f&&f!==a;)m=g(f),r(f),f=m;r(a)},O=(f,a,m,C,y,P,S,A,M)=>{S=S||a.type==="svg",f==null?v(a,m,C,y,P,S,A,M):$(f,a,y,P,S,A,M)},v=(f,a,m,C,y,P,S,A)=>{let M,E;const{type:D,props:N,shapeFlag:U,transition:V,patchFlag:z,dirs:te}=f;if(f.el&&F!==void 0&&z===-1)M=f.el=F(f.el);else{if(M=f.el=i(f.type,P,N&&N.is,N),U&8?d(M,f.children):U&16&&L(f.children,M,null,C,y,P&&D!=="foreignObject",S,A),te&&Re(f,null,C,"created"),N){for(const G in N)G!=="value"&&!Bt(G)&&o(M,G,null,N[G],P,f.children,C,y,Ie);"value"in N&&o(M,"value",null,N.value),(E=N.onVnodeBeforeMount)&&he(E,C,f)}k(M,f,f.scopeId,S,C)}te&&Re(f,null,C,"beforeMount");const X=(!y||y&&!y.pendingBranch)&&V&&!V.persisted;X&&V.beforeEnter(M),s(M,a,m),((E=N&&N.onVnodeMounted)||X||te)&&fe(()=>{E&&he(E,C,f),X&&V.enter(M),te&&Re(f,null,C,"mounted")},y)},k=(f,a,m,C,y)=>{if(m&&T(f,m),C)for(let P=0;P<C.length;P++)T(f,C[P]);if(y){let P=y.subTree;if(a===P){const S=y.vnode;k(f,S,S.scopeId,S.slotScopeIds,y.parent)}}},L=(f,a,m,C,y,P,S,A,M=0)=>{for(let E=M;E<f.length;E++){const D=f[E]=A?ze(f[E]):be(f[E]);_(null,D,a,m,C,y,P,S,A)}},$=(f,a,m,C,y,P,S)=>{const A=a.el=f.el;let{patchFlag:M,dynamicChildren:E,dirs:D}=a;M|=f.patchFlag&16;const N=f.props||Y,U=a.props||Y;let V;m&<(m,!1),(V=U.onVnodeBeforeUpdate)&&he(V,m,a,f),D&&Re(a,f,m,"beforeUpdate"),m&<(m,!0);const z=y&&a.type!=="foreignObject";if(E?j(f.dynamicChildren,E,A,m,C,z,P):S||Se(f,a,A,null,m,C,z,P,!1),M>0){if(M&16)R(A,a,N,U,m,C,y);else if(M&2&&N.class!==U.class&&o(A,"class",null,U.class,y),M&4&&o(A,"style",N.style,U.style,y),M&8){const te=a.dynamicProps;for(let X=0;X<te.length;X++){const G=te[X],Ee=N[G],mt=U[G];(mt!==Ee||G==="value")&&o(A,G,Ee,mt,y,f.children,m,C,Ie)}}M&1&&f.children!==a.children&&d(A,a.children)}else!S&&E==null&&R(A,a,N,U,m,C,y);((V=U.onVnodeUpdated)||D)&&fe(()=>{V&&he(V,m,a,f),D&&Re(a,f,m,"updated")},C)},j=(f,a,m,C,y,P,S)=>{for(let A=0;A<a.length;A++){const M=f[A],E=a[A],D=M.el&&(M.type===ue||!Fe(M,E)||M.shapeFlag&(6|64))?h(M.el):m;_(M,E,D,null,C,y,P,S,!0)}},R=(f,a,m,C,y,P,S)=>{if(m!==C){for(const A in C){if(Bt(A))continue;const M=C[A],E=m[A];M!==E&&A!=="value"&&o(f,A,E,M,S,a.children,y,P,Ie)}if(m!==Y)for(const A in m)!Bt(A)&&!(A in C)&&o(f,A,m[A],null,S,a.children,y,P,Ie);"value"in C&&o(f,"value",m.value,C.value)}},W=(f,a,m,C,y,P,S,A,M)=>{const E=a.el=f?f.el:l(""),D=a.anchor=f?f.anchor:l("");let{patchFlag:N,dynamicChildren:U,slotScopeIds:V}=a;V&&(A=A?A.concat(V):V),f==null?(s(E,m,C),s(D,m,C),L(a.children,m,D,y,P,S,A,M)):N>0&&N&64&&U&&f.dynamicChildren?(j(f.dynamicChildren,U,m,y,P,S,A),(a.key!=null||y&&a===y.subTree)&&Ls(f,a,!0)):Se(f,a,m,D,y,P,S,A,M)},Z=(f,a,m,C,y,P,S,A,M)=>{a.slotScopeIds=A,f==null?a.shapeFlag&512?y.ctx.activate(a,m,C,S,M):ht(a,m,C,y,P,S,M):ce(f,a,M)},ht=(f,a,m,C,y,P,S)=>{const A=f.component=Do(f,C,y);if(zt(f)&&(A.ctx.renderer=gt),$o(A),A.asyncDep){if(y&&y.registerDep(A,ne),!f.el){const M=A.subTree=ee(de);p(null,M,a,m)}return}ne(A,f,a,m,y,P,S)},ce=(f,a,m)=>{const C=a.component=f.component;if(Ql(f,a,m))if(C.asyncDep&&!C.asyncResolved){Q(C,a,m);return}else C.next=a,of(C.update),C.update();else a.component=f.component,a.el=f.el,C.vnode=a},ne=(f,a,m,C,y,P,S)=>{const A=()=>{if(f.isMounted){let{next:D,bu:N,u:U,parent:V,vnode:z}=f,te=D,X;lt(f,!1),D?(D.el=z.el,Q(f,D,S)):D=z,N&&yt(N),(X=D.props&&D.props.onVnodeBeforeUpdate)&&he(X,V,D,z),lt(f,!0);const G=In(f),Ee=f.subTree;f.subTree=G,_(Ee,G,h(Ee.el),un(Ee),f,y,P),D.el=G.el,te===null&&Ts(f,G.el),U&&fe(U,y),(X=D.props&&D.props.onVnodeUpdated)&&fe(()=>he(X,V,D,z),y)}else{let D;const{el:N,props:U}=a,{bm:V,m:z,parent:te}=f,X=qt(a);if(lt(f,!1),V&&yt(V),!X&&(D=U&&U.onVnodeBeforeMount)&&he(D,te,a),lt(f,!0),N&&ns){const G=()=>{f.subTree=In(f),ns(N,f.subTree,f,y,null)};X?a.type.__asyncLoader().then(()=>!f.isUnmounted&&G()):G()}else{const G=f.subTree=In(f);_(null,G,m,C,f,y,P),a.el=G.el}if(z&&fe(z,y),!X&&(D=U&&U.onVnodeMounted)){const G=a;fe(()=>he(D,te,G),y)}a.shapeFlag&256&&f.a&&fe(f.a,y),f.isMounted=!0,a=m=C=null}},M=f.effect=new $t(A,()=>nr(f.update),f.scope),E=f.update=M.run.bind(M);E.id=f.uid,lt(f,!0),E()},Q=(f,a,m)=>{a.component=f;const C=f.vnode.props;f.vnode=a,f.next=null,_c(f,a.props,C,m),Cc(f,a.children,m),st(),rr(void 0,f.update),Ke()},Se=(f,a,m,C,y,P,S,A,M=!1)=>{const E=f&&f.children,D=f?f.shapeFlag:0,N=a.children,{patchFlag:U,shapeFlag:V}=a;if(U>0){if(U&128){Mt(E,N,m,C,y,P,S,A,M);return}else if(U&256){es(E,N,m,C,y,P,S,A,M);return}}V&8?(D&16&&Ie(E,y,P),N!==E&&d(m,N)):D&16?V&16?Mt(E,N,m,C,y,P,S,A,M):Ie(E,y,P,!0):(D&8&&d(m,""),V&16&&L(N,m,C,y,P,S,A,M))},es=(f,a,m,C,y,P,S,A,M)=>{f=f||_t,a=a||_t;const E=f.length,D=a.length,N=Math.min(E,D);let U;for(U=0;U<N;U++){const V=a[U]=M?ze(a[U]):be(a[U]);_(f[U],V,m,null,y,P,S,A,M)}E>D?Ie(f,y,P,!0,!1,N):L(a,m,C,y,P,S,A,M,N)},Mt=(f,a,m,C,y,P,S,A,M)=>{let E=0;const D=a.length;let N=f.length-1,U=D-1;for(;E<=N&&E<=U;){const V=f[E],z=a[E]=M?ze(a[E]):be(a[E]);if(Fe(V,z))_(V,z,m,null,y,P,S,A,M);else break;E++}for(;E<=N&&E<=U;){const V=f[N],z=a[U]=M?ze(a[U]):be(a[U]);if(Fe(V,z))_(V,z,m,null,y,P,S,A,M);else break;N--,U--}if(E>N){if(E<=U){const V=U+1,z=V<D?a[V].el:C;for(;E<=U;)_(null,a[E]=M?ze(a[E]):be(a[E]),m,z,y,P,S,A,M),E++}}else if(E>U)for(;E<=N;)Le(f[E],y,P,!0),E++;else{const V=E,z=E,te=new Map;for(E=z;E<=U;E++){const pe=a[E]=M?ze(a[E]):be(a[E]);pe.key!=null&&te.set(pe.key,E)}let X,G=0;const Ee=U-z+1;let mt=!1,mr=0;const St=new Array(Ee);for(E=0;E<Ee;E++)St[E]=0;for(E=V;E<=N;E++){const pe=f[E];if(G>=Ee){Le(pe,y,P,!0);continue}let Te;if(pe.key!=null)Te=te.get(pe.key);else for(X=z;X<=U;X++)if(St[X-z]===0&&Fe(pe,a[X])){Te=X;break}Te===void 0?Le(pe,y,P,!0):(St[Te-z]=E+1,Te>=mr?mr=Te:mt=!0,_(pe,a[Te],m,null,y,P,S,A,M),G++)}const _r=mt?vc(St):_t;for(X=_r.length-1,E=Ee-1;E>=0;E--){const pe=z+E,Te=a[pe],br=pe+1<D?a[pe+1].el:C;St[E]===0?_(null,Te,m,br,y,P,S,A,M):mt&&(X<0||E!==_r[X]?pt(Te,m,br,2):X--)}}},pt=(f,a,m,C,y=null)=>{const{el:P,type:S,transition:A,children:M,shapeFlag:E}=f;if(E&6){pt(f.component.subTree,a,m,C);return}if(E&128){f.suspense.move(a,m,C);return}if(E&64){S.move(f,a,m,gt);return}if(S===ue){s(P,a,m);for(let N=0;N<M.length;N++)pt(M[N],a,m,C);s(f.anchor,a,m);return}if(S===ct){w(f,a,m);return}if(C!==2&&E&1&&A)if(C===0)A.beforeEnter(P),s(P,a,m),fe(()=>A.enter(P),y);else{const{leave:N,delayLeave:U,afterLeave:V}=A,z=()=>s(P,a,m),te=()=>{N(P,()=>{z(),V&&V()})};U?U(P,z,te):te()}else s(P,a,m)},Le=(f,a,m,C=!1,y=!1)=>{const{type:P,props:S,ref:A,children:M,dynamicChildren:E,shapeFlag:D,patchFlag:N,dirs:U}=f;if(A!=null&&Dn(A,null,m,f,!0),D&256){a.ctx.deactivate(f);return}const V=D&1&&U,z=!qt(f);let te;if(z&&(te=S&&S.onVnodeBeforeUnmount)&&he(te,a,f),D&6)Di(f.component,m,C);else{if(D&128){f.suspense.unmount(m,C);return}V&&Re(f,null,a,"beforeUnmount"),D&64?f.type.remove(f,a,m,y,gt,C):E&&(P!==ue||N>0&&N&64)?Ie(E,a,m,!1,!0):(P===ue&&N&(128|256)||!y&&D&16)&&Ie(M,a,m),C&&pr(f)}(z&&(te=S&&S.onVnodeUnmounted)||V)&&fe(()=>{te&&he(te,a,f),V&&Re(f,null,a,"unmounted")},m)},pr=f=>{const{type:a,el:m,anchor:C,transition:y}=f;if(a===ue){Li(m,C);return}if(a===ct){I(f);return}const P=()=>{r(m),y&&!y.persisted&&y.afterLeave&&y.afterLeave()};if(f.shapeFlag&1&&y&&!y.persisted){const{leave:S,delayLeave:A}=y,M=()=>S(m,P);A?A(f.el,P,M):M()}else P()},Li=(f,a)=>{let m;for(;f!==a;)m=g(f),r(f),f=m;r(a)},Di=(f,a,m)=>{const{bum:C,scope:y,update:P,subTree:S,um:A}=f;C&&yt(C),y.stop(),P&&(P.active=!1,Le(S,f,a,m)),A&&fe(A,a),fe(()=>{f.isUnmounted=!0},a),a&&a.pendingBranch&&!a.isUnmounted&&f.asyncDep&&!f.asyncResolved&&f.suspenseId===a.pendingId&&(a.deps--,a.deps===0&&a.resolve())},Ie=(f,a,m,C=!1,y=!1,P=0)=>{for(let S=P;S<f.length;S++)Le(f[S],a,m,C,y)},un=f=>f.shapeFlag&6?un(f.component.subTree):f.shapeFlag&128?f.suspense.next():g(f.anchor||f.el),gr=(f,a,m)=>{f==null?a._vnode&&Le(a._vnode,null,null,!0):_(a._vnode||null,f,a,null,null,null,m),Yn(),a._vnode=f},gt={p:_,um:Le,m:pt,r:pr,mt:ht,mc:L,pc:Se,pbc:j,n:un,o:e};let ts,ns;return t&&([ts,ns]=t(gt)),{render:gr,hydrate:ts,createApp:wc(gr,ts)}}function lt({effect:e,update:t},n){e.allowRecurse=t.allowRecurse=n}function Ls(e,t,n=!1){const s=e.children,r=t.children;if(B(s)&&B(r))for(let o=0;o<s.length;o++){const i=s[o];let l=r[o];l.shapeFlag&1&&!l.dynamicChildren&&((l.patchFlag<=0||l.patchFlag===32)&&(l=r[o]=ze(r[o]),l.el=i.el),n||Ls(i,l))}}function vc(e){const t=e.slice(),n=[0];let s,r,o,i,l;const c=e.length;for(s=0;s<c;s++){const u=e[s];if(u!==0){if(r=n[n.length-1],e[r]<u){t[s]=r,n.push(s);continue}for(o=0,i=n.length-1;o<i;)l=o+i>>1,e[n[l]]<u?o=l+1:i=l;u<e[n[o]]&&(o>0&&(t[s]=n[o-1]),n[o]=s)}}for(o=n.length,i=n[o-1];o-- >0;)n[o]=i,i=t[i];return n}const Ac=e=>e.__isTeleport,Xt=e=>e&&(e.disabled||e.disabled===""),Mo=e=>typeof SVGElement!="undefined"&&e instanceof SVGElement,Ds=(e,t)=>{const n=e&&e.to;return re(n)?t?t(n):null:n},Rc={__isTeleport:!0,process(e,t,n,s,r,o,i,l,c,u){const{mc:d,pc:h,pbc:g,o:{insert:T,querySelector:F,createText:H,createComment:_}}=u,b=Xt(t.props);let{shapeFlag:p,children:x,dynamicChildren:w}=t;if(e==null){const I=t.el=H(""),O=t.anchor=H("");T(I,n,s),T(O,n,s);const v=t.target=Ds(t.props,F),k=t.targetAnchor=H("");v&&(T(k,v),i=i||Mo(v));const L=($,j)=>{p&16&&d(x,$,j,r,o,i,l,c)};b?L(n,O):v&&L(v,k)}else{t.el=e.el;const I=t.anchor=e.anchor,O=t.target=e.target,v=t.targetAnchor=e.targetAnchor,k=Xt(e.props),L=k?n:O,$=k?I:v;if(i=i||Mo(O),w?(g(e.dynamicChildren,w,L,r,o,i,l),Ls(e,t,!0)):c||h(e,t,L,$,r,o,i,l,!1),b)k||$n(t,n,I,u,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){const j=t.target=Ds(t.props,F);j&&$n(t,j,null,u,0)}else k&&$n(t,O,v,u,1)}},remove(e,t,n,s,{um:r,o:{remove:o}},i){const{shapeFlag:l,children:c,anchor:u,targetAnchor:d,target:h,props:g}=e;if(h&&o(d),(i||!Xt(g))&&(o(u),l&16))for(let T=0;T<c.length;T++){const F=c[T];r(F,t,n,!0,!!F.dynamicChildren)}},move:$n,hydrate:Pc};function $n(e,t,n,{o:{insert:s},m:r},o=2){o===0&&s(e.targetAnchor,t,n);const{el:i,anchor:l,shapeFlag:c,children:u,props:d}=e,h=o===2;if(h&&s(i,t,n),(!h||Xt(d))&&c&16)for(let g=0;g<u.length;g++)r(u[g],t,n,2);h&&s(l,t,n)}function Pc(e,t,n,s,r,o,{o:{nextSibling:i,parentNode:l,querySelector:c}},u){const d=t.target=Ds(t.props,c);if(d){const h=d._lpa||d.firstChild;t.shapeFlag&16&&(Xt(t.props)?(t.anchor=u(i(e),t,l(e),n,s,r,o),t.targetAnchor=h):(t.anchor=i(e),t.targetAnchor=u(h,t,d,n,s,r,o)),d._lpa=t.targetAnchor&&i(t.targetAnchor))}return t.anchor&&i(t.anchor)}const Fc=Rc,Us="components",Mc="directives";function Sc(e,t){return $s(Us,e,!0,t)||e}const So=Symbol();function Ic(e){return re(e)?$s(Us,e,!1)||e:e||So}function Oc(e){return $s(Mc,e)}function $s(e,t,n=!0,s=!1){const r=_e||ie;if(r){const o=r.type;if(e===Us){const l=zn(o);if(l&&(l===t||l===ge(t)||l===kt(ge(t))))return o}const i=Io(r[e]||o[e],t)||Io(r.appContext[e],t);return!i&&s?o:i}}function Io(e,t){return e&&(e[t]||e[ge(t)]||e[kt(ge(t))])}const ue=Symbol(void 0),Tt=Symbol(void 0),de=Symbol(void 0),ct=Symbol(void 0),Zt=[];let Pe=null;function Kn(e=!1){Zt.push(Pe=e?null:[])}function Oo(){Zt.pop(),Pe=Zt[Zt.length-1]||null}let vt=1;function Ks(e){vt+=e}function No(e){return e.dynamicChildren=vt>0?Pe||_t:null,Oo(),vt>0&&Pe&&Pe.push(e),e}function Nc(e,t,n,s,r,o){return No(Vs(e,t,n,s,r,o,!0))}function js(e,t,n,s,r){return No(ee(e,t,n,s,r,!0))}function We(e){return e?e.__v_isVNode===!0:!1}function Fe(e,t){return e.type===t.type&&e.key===t.key}function Bc(e){}const jn="__vInternal",Bo=({key:e})=>e!=null?e:null,Vn=({ref:e,ref_key:t,ref_for:n})=>e!=null?re(e)||le(e)||K(e)?{i:_e,r:e,k:t,f:!!n}:e:null;function Vs(e,t=null,n=null,s=0,r=null,o=e===ue?0:1,i=!1,l=!1){const c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Bo(t),ref:t&&Vn(t),scopeId:Sn,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetAnchor:null,staticCount:0,shapeFlag:o,patchFlag:s,dynamicProps:r,dynamicChildren:null,appContext:null};return l?(qs(c,n),o&128&&e.normalize(c)):n&&(c.shapeFlag|=re(n)?8:16),vt>0&&!i&&Pe&&(c.patchFlag>0||o&6)&&c.patchFlag!==32&&Pe.push(c),c}const ee=kc;function kc(e,t=null,n=null,s=0,r=null,o=!1){if((!e||e===So)&&(e=de),We(e)){const l=qe(e,t,!0);return n&&qs(l,n),l}if(Qc(e)&&(e=e.__vccOpts),t){t=ko(t);let{class:l,style:c}=t;l&&!re(l)&&(t.class=Ot(l)),oe(c)&&(_s(c)&&!B(c)&&(c=se({},c)),t.style=It(c))}const i=re(e)?1:Gl(e)?128:Ac(e)?64:oe(e)?4:K(e)?2:0;return Vs(e,t,n,s,r,i,o,!0)}function ko(e){return e?_s(e)||jn in e?se({},e):e:null}function qe(e,t,n=!1){const{props:s,ref:r,patchFlag:o,children:i}=e,l=t?Ho(s||{},t):s;return{__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Bo(l),ref:t&&t.ref?n&&r?B(r)?r.concat(Vn(t)):[r,Vn(t)]:Vn(t):r,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:i,target:e.target,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==ue?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:e.transition,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&qe(e.ssContent),ssFallback:e.ssFallback&&qe(e.ssFallback),el:e.el,anchor:e.anchor}}function Ws(e=" ",t=0){return ee(Tt,null,e,t)}function Hc(e,t){const n=ee(ct,null,e);return n.staticCount=t,n}function Lc(e="",t=!1){return t?(Kn(),js(de,null,e)):ee(de,null,e)}function be(e){return e==null||typeof e=="boolean"?ee(de):B(e)?ee(ue,null,e.slice()):typeof e=="object"?ze(e):ee(Tt,null,String(e))}function ze(e){return e.el===null||e.memo?e:qe(e)}function qs(e,t){let n=0;const{shapeFlag:s}=e;if(t==null)t=null;else if(B(t))n=16;else if(typeof t=="object")if(s&(1|64)){const r=t.default;r&&(r._c&&(r._d=!1),qs(e,r()),r._c&&(r._d=!0));return}else{n=32;const r=t._;!r&&!(jn in t)?t._ctx=_e:r===3&&_e&&(_e.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}else K(t)?(t={default:t,_ctx:_e},n=32):(t=String(t),s&64?(n=16,t=[Ws(t)]):n=8);e.children=t,e.shapeFlag|=n}function Ho(...e){const t={};for(let n=0;n<e.length;n++){const s=e[n];for(const r in s)if(r==="class")t.class!==s.class&&(t.class=Ot([t.class,s.class]));else if(r==="style")t.style=It([t.style,s.style]);else if(Nt(r)){const o=t[r],i=s[r];o!==i&&!(B(o)&&o.includes(i))&&(t[r]=o?[].concat(o,i):i)}else r!==""&&(t[r]=s[r])}return t}function he(e,t,n,s=null){ye(e,t,7,[n,s])}function Dc(e,t,n,s){let r;const o=n&&n[s];if(B(e)||re(e)){r=new Array(e.length);for(let i=0,l=e.length;i<l;i++)r[i]=t(e[i],i,void 0,o&&o[i])}else if(typeof e=="number"){r=new Array(e);for(let i=0;i<e;i++)r[i]=t(i+1,i,void 0,o&&o[i])}else if(oe(e))if(e[Symbol.iterator])r=Array.from(e,(i,l)=>t(i,l,void 0,o&&o[l]));else{const i=Object.keys(e);r=new Array(i.length);for(let l=0,c=i.length;l<c;l++){const u=i[l];r[l]=t(e[u],u,l,o&&o[l])}}else r=[];return n&&(n[s]=r),r}function Uc(e,t){for(let n=0;n<t.length;n++){const s=t[n];if(B(s))for(let r=0;r<s.length;r++)e[s[r].name]=s[r].fn;else s&&(e[s.name]=s.fn)}return e}function $c(e,t,n={},s,r){if(_e.isCE)return ee("slot",t==="default"?null:{name:t},s&&s());let o=e[t];o&&o._c&&(o._d=!1),Kn();const i=o&&Lo(o(n)),l=js(ue,{key:n.key||`_${t}`},i||(s?s():[]),i&&e._===1?64:-2);return!r&&l.scopeId&&(l.slotScopeIds=[l.scopeId+"-s"]),o&&o._c&&(o._d=!0),l}function Lo(e){return e.some(t=>We(t)?!(t.type===de||t.type===ue&&!Lo(t.children)):!0)?e:null}function Kc(e){const t={};for(const n in e)t[Ht(n)]=e[n];return t}const zs=e=>e?Uo(e)?Zs(e)||e.proxy:zs(e.parent):null,Wn=se(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>zs(e.parent),$root:e=>zs(e.root),$emit:e=>e.emit,$options:e=>go(e),$forceUpdate:e=>()=>nr(e.update),$nextTick:e=>tr.bind(e.proxy),$watch:e=>uf.bind(e)}),Js={get({_:e},t){const{ctx:n,setupState:s,data:r,props:o,accessCache:i,type:l,appContext:c}=e;let u;if(t[0]!=="$"){const T=i[t];if(T!==void 0)switch(T){case 1:return s[t];case 2:return r[t];case 4:return n[t];case 3:return o[t]}else{if(s!==Y&&J(s,t))return i[t]=1,s[t];if(r!==Y&&J(r,t))return i[t]=2,r[t];if((u=e.propsOptions[0])&&J(u,t))return i[t]=3,o[t];if(n!==Y&&J(n,t))return i[t]=4,n[t];Os&&(i[t]=0)}}const d=Wn[t];let h,g;if(d)return t==="$attrs"&&me(e,"get",t),d(e);if((h=l.__cssModules)&&(h=h[t]))return h;if(n!==Y&&J(n,t))return i[t]=4,n[t];if(g=c.config.globalProperties,J(g,t))return g[t]},set({_:e},t,n){const{data:s,setupState:r,ctx:o}=e;if(r!==Y&&J(r,t))r[t]=n;else if(s!==Y&&J(s,t))s[t]=n;else if(J(e.props,t))return!1;return t[0]==="$"&&t.slice(1)in e?!1:(o[t]=n,!0)},has({_:{data:e,setupState:t,accessCache:n,ctx:s,appContext:r,propsOptions:o}},i){let l;return!!n[i]||e!==Y&&J(e,i)||t!==Y&&J(t,i)||(l=o[0])&&J(l,i)||J(s,i)||J(Wn,i)||J(r.config.globalProperties,i)}},jc=se({},Js,{get(e,t){if(t!==Symbol.unscopables)return Js.get(e,t,e)},has(e,t){return t[0]!=="_"&&!$i(t)}}),Vc=Ao();let Wc=0;function Do(e,t,n){const s=e.type,r=(t?t.appContext:e.appContext)||Vc,o={uid:Wc++,vnode:e,type:s,parent:t,appContext:r,root:null,next:null,subTree:null,effect:null,update:null,scope:new cs(!0),render:null,proxy:null,exposed:null,exposeProxy:null,withProxy:null,provides:t?t.provides:Object.create(r.provides),accessCache:null,renderCache:[],components:null,directives:null,propsOptions:bo(s,r),emitsOptions:Xr(s,r),emit:null,emitted:null,propsDefaults:Y,inheritAttrs:s.inheritAttrs,ctx:Y,data:Y,props:Y,attrs:Y,slots:Y,refs:Y,setupState:Y,setupContext:null,suspense:n,suspenseId:n?n.pendingId:0,asyncDep:null,asyncResolved:!1,isMounted:!1,isUnmounted:!1,isDeactivated:!1,bc:null,c:null,bm:null,m:null,bu:null,u:null,um:null,bum:null,da:null,a:null,rtg:null,rtc:null,ec:null,sp:null};return o.ctx={_:o},o.root=t?t.root:o,o.emit=Wl.bind(null,o),e.ce&&e.ce(o),o}let ie=null;const Je=()=>ie||_e,Ye=e=>{ie=e,e.scope.on()},Xe=()=>{ie&&ie.scope.off(),ie=null};function Uo(e){return e.vnode.shapeFlag&4}let Qt=!1;function $o(e,t=!1){Qt=t;const{props:n,children:s}=e.vnode,r=Uo(e);mc(e,n,r,t),yc(e,s);const o=r?qc(e,t):void 0;return Qt=!1,o}function qc(e,t){const n=e.type;e.accessCache=Object.create(null),e.proxy=bs(new Proxy(e.ctx,Js));const{setup:s}=n;if(s){const r=e.setupContext=s.length>1?jo(e):null;Ye(e),st();const o=Me(s,e,0,[e.props,r]);if(Ke(),Xe(),is(o)){if(o.then(Xe,Xe),t)return o.then(i=>{Ys(e,i,t)}).catch(i=>{ft(i,e,0)});e.asyncDep=o}else Ys(e,o,t)}else Ko(e,t)}function Ys(e,t,n){K(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:oe(t)&&(e.setupState=xs(t)),Ko(e,n)}let qn,Xs;function zc(e){qn=e,Xs=t=>{t.render._rc&&(t.withProxy=new Proxy(t.ctx,jc))}}const Jc=()=>!qn;function Ko(e,t,n){const s=e.type;if(!e.render){if(!t&&qn&&!s.render){const r=s.template;if(r){const{isCustomElement:o,compilerOptions:i}=e.appContext.config,{delimiters:l,compilerOptions:c}=s,u=se(se({isCustomElement:o,delimiters:l},i),c);s.render=qn(r,u)}}e.render=s.render||we,Xs&&Xs(e)}Ye(e),st(),ac(e),Ke(),Xe()}function Yc(e){return new Proxy(e.attrs,{get(t,n){return me(e,"get","$attrs"),t[n]}})}function jo(e){const t=s=>{e.exposed=s||{}};let n;return{get attrs(){return n||(n=Yc(e))},slots:e.slots,emit:e.emit,expose:t}}function Zs(e){if(e.exposed)return e.exposeProxy||(e.exposeProxy=new Proxy(xs(bs(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Wn)return Wn[n](e)}}))}const Xc=/(?:^|[-_])(\w)/g,Zc=e=>e.replace(Xc,t=>t.toUpperCase()).replace(/[-_]/g,"");function zn(e){return K(e)&&e.displayName||e.name}function Vo(e,t,n=!1){let s=zn(t);if(!s&&t.__file){const r=t.__file.match(/([^/\\]+)\.\w+$/);r&&(s=r[1])}if(!s&&e&&e.parent){const r=o=>{for(const i in o)if(o[i]===t)return i};s=r(e.components||e.parent.type.components)||r(e.appContext.components)}return s?Zc(s):n?"App":"Anonymous"}function Qc(e){return K(e)&&"__vccOpts"in e}const Gt=[];function Wo(e,...t){st();const n=Gt.length?Gt[Gt.length-1].component:null,s=n&&n.appContext.config.warnHandler,r=Gc();if(s)Me(s,n,11,[e+t.join(""),n&&n.proxy,r.map(({vnode:o})=>`at <${Vo(n,o.type)}>`).join(` -`),r]);else{const o=[`[Vue warn]: ${e}`,...t];r.length&&o.push(` -`,...ef(r)),console.warn(...o)}Ke()}function Gc(){let e=Gt[Gt.length-1];if(!e)return[];const t=[];for(;e;){const n=t[0];n&&n.vnode===e?n.recurseCount++:t.push({vnode:e,recurseCount:0});const s=e.component&&e.component.parent;e=s&&s.vnode}return t}function ef(e){const t=[];return e.forEach((n,s)=>{t.push(...s===0?[]:[` -`],...tf(n))}),t}function tf({vnode:e,recurseCount:t}){const n=t>0?`... (${t} recursive calls)`:"",s=e.component?e.component.parent==null:!1,r=` at <${Vo(e.component,e.type,s)}`,o=">"+n;return e.props?[r,...nf(e.props),o]:[r+o]}function nf(e){const t=[],n=Object.keys(e);return n.slice(0,3).forEach(s=>{t.push(...qo(s,e[s]))}),n.length>3&&t.push(" ..."),t}function qo(e,t,n){return re(t)?(t=JSON.stringify(t),n?t:[`${e}=${t}`]):typeof t=="number"||typeof t=="boolean"||t==null?n?t:[`${e}=${t}`]:le(t)?(t=qo(e,q(t.value),!0),n?t:[`${e}=Ref<`,t,">"]):K(t)?[`${e}=fn${t.name?`<${t.name}>`:""}`]:(t=q(t),n?t:[`${e}=`,t])}function Me(e,t,n,s){let r;try{r=s?e(...s):e()}catch(o){ft(o,t,n)}return r}function ye(e,t,n,s){if(K(e)){const o=Me(e,t,n,s);return o&&is(o)&&o.catch(i=>{ft(i,t,n)}),o}const r=[];for(let o=0;o<e.length;o++)r.push(ye(e[o],t,n,s));return r}function ft(e,t,n,s=!0){const r=t?t.vnode:null;if(t){let o=t.parent;const i=t.proxy,l=n;for(;o;){const u=o.ec;if(u){for(let d=0;d<u.length;d++)if(u[d](e,i,l)===!1)return}o=o.parent}const c=t.appContext.config.errorHandler;if(c){Me(c,null,10,[e,i,l]);return}}sf(e,n,r,s)}function sf(e,t,n,s=!0){console.error(e)}let Jn=!1,Qs=!1;const Ce=[];let Be=0;const en=[];let tn=null,At=0;const nn=[];let Ze=null,Rt=0;const zo=Promise.resolve();let Gs=null,er=null;function tr(e){const t=Gs||zo;return e?t.then(this?e.bind(this):e):t}function rf(e){let t=Be+1,n=Ce.length;for(;t<n;){const s=t+n>>>1;sn(Ce[s])<e?t=s+1:n=s}return t}function nr(e){(!Ce.length||!Ce.includes(e,Jn&&e.allowRecurse?Be+1:Be))&&e!==er&&(e.id==null?Ce.push(e):Ce.splice(rf(e.id),0,e),Jo())}function Jo(){!Jn&&!Qs&&(Qs=!0,Gs=zo.then(Xo))}function of(e){const t=Ce.indexOf(e);t>Be&&Ce.splice(t,1)}function Yo(e,t,n,s){B(e)?n.push(...e):(!t||!t.includes(e,e.allowRecurse?s+1:s))&&n.push(e),Jo()}function lf(e){Yo(e,tn,en,At)}function sr(e){Yo(e,Ze,nn,Rt)}function rr(e,t=null){if(en.length){for(er=t,tn=[...new Set(en)],en.length=0,At=0;At<tn.length;At++)tn[At]();tn=null,At=0,er=null,rr(e,t)}}function Yn(e){if(nn.length){const t=[...new Set(nn)];if(nn.length=0,Ze){Ze.push(...t);return}for(Ze=t,Ze.sort((n,s)=>sn(n)-sn(s)),Rt=0;Rt<Ze.length;Rt++)Ze[Rt]();Ze=null,Rt=0}}const sn=e=>e.id==null?1/0:e.id;function Xo(e){Qs=!1,Jn=!0,rr(e),Ce.sort((n,s)=>sn(n)-sn(s));const t=we;try{for(Be=0;Be<Ce.length;Be++){const n=Ce[Be];n&&n.active!==!1&&Me(n,null,14)}}finally{Be=0,Ce.length=0,Yn(),Jn=!1,Gs=null,(Ce.length||en.length||nn.length)&&Xo(e)}}function cf(e,t){return on(e,null,t)}function Zo(e,t){return on(e,null,{flush:"post"})}function ff(e,t){return on(e,null,{flush:"sync"})}const Qo={};function rn(e,t,n){return on(e,t,n)}function on(e,t,{immediate:n,deep:s,flush:r,onTrack:o,onTrigger:i}=Y){const l=ie;let c,u=!1,d=!1;if(le(e)?(c=()=>e.value,u=!!e._shallow):rt(e)?(c=()=>e,s=!0):B(e)?(d=!0,u=e.some(rt),c=()=>e.map(b=>{if(le(b))return b.value;if(rt(b))return ut(b);if(K(b))return Me(b,l,2)})):K(e)?t?c=()=>Me(e,l,2):c=()=>{if(!(l&&l.isUnmounted))return h&&h(),ye(e,l,3,[g])}:c=we,t&&s){const b=c;c=()=>ut(b())}let h,g=b=>{h=_.onStop=()=>{Me(b,l,4)}};if(Qt)return g=we,t?n&&ye(t,l,3,[c(),d?[]:void 0,g]):c(),we;let T=d?[]:Qo;const F=()=>{if(!!_.active)if(t){const b=_.run();(s||u||(d?b.some((p,x)=>Lt(p,T[x])):Lt(b,T)))&&(h&&h(),ye(t,l,3,[b,T===Qo?void 0:T,g]),T=b)}else _.run()};F.allowRecurse=!!t;let H;r==="sync"?H=F:r==="post"?H=()=>fe(F,l&&l.suspense):H=()=>{!l||l.isMounted?lf(F):F()};const _=new $t(c,H);return t?n?F():T=_.run():r==="post"?fe(_.run.bind(_),l&&l.suspense):_.run(),()=>{_.stop(),l&&l.scope&&rs(l.scope.effects,_)}}function uf(e,t,n){const s=this.proxy,r=re(e)?e.includes(".")?Go(s,e):()=>s[e]:e.bind(s,s);let o;K(t)?o=t:(o=t.handler,n=t);const i=ie;Ye(this);const l=on(r,o.bind(s),n);return i?Ye(i):Xe(),l}function Go(e,t){const n=t.split(".");return()=>{let s=e;for(let r=0;r<n.length&&s;r++)s=s[n[r]];return s}}function ut(e,t){if(!oe(e)||e.__v_skip||(t=t||new Set,t.has(e)))return e;if(t.add(e),le(e))ut(e.value,t);else if(B(e))for(let n=0;n<e.length;n++)ut(e[n],t);else if(et(e)||bt(e))e.forEach(n=>{ut(n,t)});else if(wr(e))for(const n in e)ut(e[n],t);return e}function af(){return null}function df(){return null}function hf(e){}function pf(e,t){return null}function gf(){return ei().slots}function mf(){return ei().attrs}function ei(){const e=Je();return e.setupContext||(e.setupContext=jo(e))}function _f(e,t){const n=B(e)?e.reduce((s,r)=>(s[r]={},s),{}):e;for(const s in t){const r=n[s];r?B(r)||K(r)?n[s]={type:r,default:t[s]}:r.default=t[s]:r===null&&(n[s]={default:t[s]})}return n}function bf(e,t){const n={};for(const s in e)t.includes(s)||Object.defineProperty(n,s,{enumerable:!0,get:()=>e[s]});return n}function yf(e){const t=Je();let n=e();return Xe(),is(n)&&(n=n.catch(s=>{throw Ye(t),s})),[n,()=>Ye(t)]}function ti(e,t,n){const s=arguments.length;return s===2?oe(t)&&!B(t)?We(t)?ee(e,null,[t]):ee(e,t):ee(e,null,t):(s>3?n=Array.prototype.slice.call(arguments,2):s===3&&We(n)&&(n=[n]),ee(e,t,n))}const ni=Symbol(""),Cf=()=>{{const e=Wt(ni);return e||Wo("Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build."),e}};function xf(){}function Ef(e,t,n,s){const r=n[s];if(r&&si(r,e))return r;const o=t();return o.memo=e.slice(),n[s]=o}function si(e,t){const n=e.memo;if(n.length!=t.length)return!1;for(let s=0;s<n.length;s++)if(n[s]!==t[s])return!1;return vt>0&&Pe&&Pe.push(e),!0}const ri="3.2.26",wf={createComponentInstance:Do,setupComponent:$o,renderComponentRoot:In,setCurrentRenderingInstance:jt,isVNode:We,normalizeVNode:be},Tf=wf,vf=null,Af=null,Rf="http://www.w3.org/2000/svg",Pt=typeof document!="undefined"?document:null,oi=new Map,Pf={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{const t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,s)=>{const r=t?Pt.createElementNS(Rf,e):Pt.createElement(e,n?{is:n}:void 0);return e==="select"&&s&&s.multiple!=null&&r.setAttribute("multiple",s.multiple),r},createText:e=>Pt.createTextNode(e),createComment:e=>Pt.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Pt.querySelector(e),setScopeId(e,t){e.setAttribute(t,"")},cloneNode(e){const t=e.cloneNode(!0);return"_value"in e&&(t._value=e._value),t},insertStaticContent(e,t,n,s){const r=n?n.previousSibling:t.lastChild;let o=oi.get(e);if(!o){const i=Pt.createElement("template");if(i.innerHTML=s?`<svg>${e}</svg>`:e,o=i.content,s){const l=o.firstChild;for(;l.firstChild;)o.appendChild(l.firstChild);o.removeChild(l)}oi.set(e,o)}return t.insertBefore(o.cloneNode(!0),n),[r?r.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}};function Ff(e,t,n){const s=e._vtc;s&&(t=(t?[t,...s]:[...s]).join(" ")),t==null?e.removeAttribute("class"):n?e.setAttribute("class",t):e.className=t}function Mf(e,t,n){const s=e.style,r=re(n);if(n&&!r){for(const o in n)or(s,o,n[o]);if(t&&!re(t))for(const o in t)n[o]==null&&or(s,o,"")}else{const o=s.display;r?t!==n&&(s.cssText=n):t&&e.removeAttribute("style"),"_vod"in e&&(s.display=o)}}const ii=/\s*!important$/;function or(e,t,n){if(B(n))n.forEach(s=>or(e,t,s));else if(t.startsWith("--"))e.setProperty(t,n);else{const s=Sf(e,t);ii.test(n)?e.setProperty(ve(s),n.replace(ii,""),"important"):e[s]=n}}const li=["Webkit","Moz","ms"],ir={};function Sf(e,t){const n=ir[t];if(n)return n;let s=ge(t);if(s!=="filter"&&s in e)return ir[t]=s;s=kt(s);for(let r=0;r<li.length;r++){const o=li[r]+s;if(o in e)return ir[t]=o}return t}const ci="http://www.w3.org/1999/xlink";function If(e,t,n,s,r){if(s&&t.startsWith("xlink:"))n==null?e.removeAttributeNS(ci,t.slice(6,t.length)):e.setAttributeNS(ci,t,n);else{const o=ji(t);n==null||o&&!yr(n)?e.removeAttribute(t):e.setAttribute(t,o?"":n)}}function Of(e,t,n,s,r,o,i){if(t==="innerHTML"||t==="textContent"){s&&i(s,r,o),e[t]=n==null?"":n;return}if(t==="value"&&e.tagName!=="PROGRESS"&&!e.tagName.includes("-")){e._value=n;const l=n==null?"":n;(e.value!==l||e.tagName==="OPTION")&&(e.value=l),n==null&&e.removeAttribute(t);return}if(n===""||n==null){const l=typeof e[t];if(l==="boolean"){e[t]=yr(n);return}else if(n==null&&l==="string"){e[t]="",e.removeAttribute(t);return}else if(l==="number"){try{e[t]=0}catch{}e.removeAttribute(t);return}}try{e[t]=n}catch{}}let Xn=Date.now,fi=!1;if(typeof window!="undefined"){Xn()>document.createEvent("Event").timeStamp&&(Xn=()=>performance.now());const e=navigator.userAgent.match(/firefox\/(\d+)/i);fi=!!(e&&Number(e[1])<=53)}let lr=0;const Nf=Promise.resolve(),Bf=()=>{lr=0},kf=()=>lr||(Nf.then(Bf),lr=Xn());function ke(e,t,n,s){e.addEventListener(t,n,s)}function Hf(e,t,n,s){e.removeEventListener(t,n,s)}function Lf(e,t,n,s,r=null){const o=e._vei||(e._vei={}),i=o[t];if(s&&i)i.value=s;else{const[l,c]=Df(t);if(s){const u=o[t]=Uf(s,r);ke(e,l,u,c)}else i&&(Hf(e,l,i,c),o[t]=void 0)}}const ui=/(?:Once|Passive|Capture)$/;function Df(e){let t;if(ui.test(e)){t={};let n;for(;n=e.match(ui);)e=e.slice(0,e.length-n[0].length),t[n[0].toLowerCase()]=!0}return[ve(e.slice(2)),t]}function Uf(e,t){const n=s=>{const r=s.timeStamp||Xn();(fi||r>=n.attached-1)&&ye($f(s,n.value),t,5,[s])};return n.value=e,n.attached=kf(),n}function $f(e,t){if(B(t)){const n=e.stopImmediatePropagation;return e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0},t.map(s=>r=>!r._stopped&&s(r))}else return t}const ai=/^on[a-z]/,Kf=(e,t,n,s,r=!1,o,i,l,c)=>{t==="class"?Ff(e,s,r):t==="style"?Mf(e,n,s):Nt(t)?ss(t)||Lf(e,t,n,s,i):(t[0]==="."?(t=t.slice(1),!0):t[0]==="^"?(t=t.slice(1),!1):jf(e,t,s,r))?Of(e,t,s,o,i,l,c):(t==="true-value"?e._trueValue=s:t==="false-value"&&(e._falseValue=s),If(e,t,s,r))};function jf(e,t,n,s){return s?!!(t==="innerHTML"||t==="textContent"||t in e&&ai.test(t)&&K(n)):t==="spellcheck"||t==="draggable"||t==="form"||t==="list"&&e.tagName==="INPUT"||t==="type"&&e.tagName==="TEXTAREA"||ai.test(t)&&re(n)?!1:t in e}function di(e,t){const n=Fs(e);class s extends Zn{constructor(o){super(n,o,t)}}return s.def=n,s}const Vf=e=>di(e,Bi),Wf=typeof HTMLElement!="undefined"?HTMLElement:class{};class Zn extends Wf{constructor(t,n={},s){super();this._def=t,this._props=n,this._instance=null,this._connected=!1,this._resolved=!1,this._numberProps=null,this.shadowRoot&&s?s(this._createVNode(),this.shadowRoot):this.attachShadow({mode:"open"})}connectedCallback(){this._connected=!0,this._instance||this._resolveDef()}disconnectedCallback(){this._connected=!1,tr(()=>{this._connected||(hr(null,this.shadowRoot),this._instance=null)})}_resolveDef(){if(this._resolved)return;this._resolved=!0;for(let s=0;s<this.attributes.length;s++)this._setAttr(this.attributes[s].name);new MutationObserver(s=>{for(const r of s)this._setAttr(r.attributeName)}).observe(this,{attributes:!0});const t=s=>{const{props:r,styles:o}=s,i=!B(r),l=r?i?Object.keys(r):r:[];let c;if(i)for(const u in this._props){const d=r[u];(d===Number||d&&d.type===Number)&&(this._props[u]=Ue(this._props[u]),(c||(c=Object.create(null)))[u]=!0)}this._numberProps=c;for(const u of Object.keys(this))u[0]!=="_"&&this._setProp(u,this[u],!0,!1);for(const u of l.map(ge))Object.defineProperty(this,u,{get(){return this._getProp(u)},set(d){this._setProp(u,d)}});this._applyStyles(o),this._update()},n=this._def.__asyncLoader;n?n().then(t):t(this._def)}_setAttr(t){let n=this.getAttribute(t);this._numberProps&&this._numberProps[t]&&(n=Ue(n)),this._setProp(ge(t),n,!1)}_getProp(t){return this._props[t]}_setProp(t,n,s=!0,r=!0){n!==this._props[t]&&(this._props[t]=n,r&&this._instance&&this._update(),s&&(n===!0?this.setAttribute(ve(t),""):typeof n=="string"||typeof n=="number"?this.setAttribute(ve(t),n+""):n||this.removeAttribute(ve(t))))}_update(){hr(this._createVNode(),this.shadowRoot)}_createVNode(){const t=ee(this._def,se({},this._props));return this._instance||(t.ce=n=>{this._instance=n,n.isCE=!0,n.emit=(r,...o)=>{this.dispatchEvent(new CustomEvent(r,{detail:o}))};let s=this;for(;s=s&&(s.parentNode||s.host);)if(s instanceof Zn){n.parent=s._instance;break}}),t}_applyStyles(t){t&&t.forEach(n=>{const s=document.createElement("style");s.textContent=n,this.shadowRoot.appendChild(s)})}}function qf(e="$style"){{const t=Je();if(!t)return Y;const n=t.type.__cssModules;if(!n)return Y;const s=n[e];return s||Y}}function zf(e){const t=Je();if(!t)return;const n=()=>cr(t.subTree,e(t.proxy));Zo(n),Yt(()=>{const s=new MutationObserver(n);s.observe(t.subTree.el.parentNode,{childList:!0}),Hn(()=>s.disconnect())})}function cr(e,t){if(e.shapeFlag&128){const n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{cr(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)hi(e.el,t);else if(e.type===ue)e.children.forEach(n=>cr(n,t));else if(e.type===ct){let{el:n,anchor:s}=e;for(;n&&(hi(n,t),n!==s);)n=n.nextSibling}}function hi(e,t){if(e.nodeType===1){const n=e.style;for(const s in t)n.setProperty(`--${s}`,t[s])}}const Qe="transition",ln="animation",fr=(e,{slots:t})=>ti(Rs,mi(e),t);fr.displayName="Transition";const pi={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Jf=fr.props=se({},Rs.props,pi),at=(e,t=[])=>{B(e)?e.forEach(n=>n(...t)):e&&e(...t)},gi=e=>e?B(e)?e.some(t=>t.length>1):e.length>1:!1;function mi(e){const t={};for(const R in e)R in pi||(t[R]=e[R]);if(e.css===!1)return t;const{name:n="v",type:s,duration:r,enterFromClass:o=`${n}-enter-from`,enterActiveClass:i=`${n}-enter-active`,enterToClass:l=`${n}-enter-to`,appearFromClass:c=o,appearActiveClass:u=i,appearToClass:d=l,leaveFromClass:h=`${n}-leave-from`,leaveActiveClass:g=`${n}-leave-active`,leaveToClass:T=`${n}-leave-to`}=e,F=Yf(r),H=F&&F[0],_=F&&F[1],{onBeforeEnter:b,onEnter:p,onEnterCancelled:x,onLeave:w,onLeaveCancelled:I,onBeforeAppear:O=b,onAppear:v=p,onAppearCancelled:k=x}=t,L=(R,W,Z)=>{dt(R,W?d:l),dt(R,W?u:i),Z&&Z()},$=(R,W)=>{dt(R,T),dt(R,g),W&&W()},j=R=>(W,Z)=>{const ht=R?v:p,ce=()=>L(W,R,Z);at(ht,[W,ce]),_i(()=>{dt(W,R?c:o),He(W,R?d:l),gi(ht)||bi(W,s,H,ce)})};return se(t,{onBeforeEnter(R){at(b,[R]),He(R,o),He(R,i)},onBeforeAppear(R){at(O,[R]),He(R,c),He(R,u)},onEnter:j(!1),onAppear:j(!0),onLeave(R,W){const Z=()=>$(R,W);He(R,h),Ei(),He(R,g),_i(()=>{dt(R,h),He(R,T),gi(w)||bi(R,s,_,Z)}),at(w,[R,Z])},onEnterCancelled(R){L(R,!1),at(x,[R])},onAppearCancelled(R){L(R,!0),at(k,[R])},onLeaveCancelled(R){$(R),at(I,[R])}})}function Yf(e){if(e==null)return null;if(oe(e))return[ur(e.enter),ur(e.leave)];{const t=ur(e);return[t,t]}}function ur(e){return Ue(e)}function He(e,t){t.split(/\s+/).forEach(n=>n&&e.classList.add(n)),(e._vtc||(e._vtc=new Set)).add(t)}function dt(e,t){t.split(/\s+/).forEach(s=>s&&e.classList.remove(s));const{_vtc:n}=e;n&&(n.delete(t),n.size||(e._vtc=void 0))}function _i(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}let Xf=0;function bi(e,t,n,s){const r=e._endId=++Xf,o=()=>{r===e._endId&&s()};if(n)return setTimeout(o,n);const{type:i,timeout:l,propCount:c}=yi(e,t);if(!i)return s();const u=i+"end";let d=0;const h=()=>{e.removeEventListener(u,g),o()},g=T=>{T.target===e&&++d>=c&&h()};setTimeout(()=>{d<c&&h()},l+1),e.addEventListener(u,g)}function yi(e,t){const n=window.getComputedStyle(e),s=F=>(n[F]||"").split(", "),r=s(Qe+"Delay"),o=s(Qe+"Duration"),i=Ci(r,o),l=s(ln+"Delay"),c=s(ln+"Duration"),u=Ci(l,c);let d=null,h=0,g=0;t===Qe?i>0&&(d=Qe,h=i,g=o.length):t===ln?u>0&&(d=ln,h=u,g=c.length):(h=Math.max(i,u),d=h>0?i>u?Qe:ln:null,g=d?d===Qe?o.length:c.length:0);const T=d===Qe&&/\b(transform|all)(,|$)/.test(n[Qe+"Property"]);return{type:d,timeout:h,propCount:g,hasTransform:T}}function Ci(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max(...t.map((n,s)=>xi(n)+xi(e[s])))}function xi(e){return Number(e.slice(0,-1).replace(",","."))*1e3}function Ei(){return document.body.offsetHeight}const wi=new WeakMap,Ti=new WeakMap,Zf={name:"TransitionGroup",props:se({},Jf,{tag:String,moveClass:String}),setup(e,{slots:t}){const n=Je(),s=As();let r,o;return Bn(()=>{if(!r.length)return;const i=e.moveClass||`${e.name||"v"}-move`;if(!nu(r[0].el,n.vnode.el,i))return;r.forEach(Gf),r.forEach(eu);const l=r.filter(tu);Ei(),l.forEach(c=>{const u=c.el,d=u.style;He(u,i),d.transform=d.webkitTransform=d.transitionDuration="";const h=u._moveCb=g=>{g&&g.target!==u||(!g||/transform$/.test(g.propertyName))&&(u.removeEventListener("transitionend",h),u._moveCb=null,dt(u,i))};u.addEventListener("transitionend",h)})}),()=>{const i=q(e),l=mi(i);let c=i.tag||ue;r=o,o=t.default?On(t.default()):[];for(let u=0;u<o.length;u++){const d=o[u];d.key!=null&&ot(d,wt(d,l,s,n))}if(r)for(let u=0;u<r.length;u++){const d=r[u];ot(d,wt(d,l,s,n)),wi.set(d,d.el.getBoundingClientRect())}return ee(c,null,o)}}},Qf=Zf;function Gf(e){const t=e.el;t._moveCb&&t._moveCb(),t._enterCb&&t._enterCb()}function eu(e){Ti.set(e,e.el.getBoundingClientRect())}function tu(e){const t=wi.get(e),n=Ti.get(e),s=t.left-n.left,r=t.top-n.top;if(s||r){const o=e.el.style;return o.transform=o.webkitTransform=`translate(${s}px,${r}px)`,o.transitionDuration="0s",e}}function nu(e,t,n){const s=e.cloneNode();e._vtc&&e._vtc.forEach(i=>{i.split(/\s+/).forEach(l=>l&&s.classList.remove(l))}),n.split(/\s+/).forEach(i=>i&&s.classList.add(i)),s.style.display="none";const r=t.nodeType===1?t:t.parentNode;r.appendChild(s);const{hasTransform:o}=yi(s);return r.removeChild(s),o}const Ge=e=>{const t=e.props["onUpdate:modelValue"];return B(t)?n=>yt(t,n):t};function su(e){e.target.composing=!0}function vi(e){const t=e.target;t.composing&&(t.composing=!1,ru(t,"input"))}function ru(e,t){const n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}const Qn={created(e,{modifiers:{lazy:t,trim:n,number:s}},r){e._assign=Ge(r);const o=s||r.props&&r.props.type==="number";ke(e,t?"change":"input",i=>{if(i.target.composing)return;let l=e.value;n?l=l.trim():o&&(l=Ue(l)),e._assign(l)}),n&&ke(e,"change",()=>{e.value=e.value.trim()}),t||(ke(e,"compositionstart",su),ke(e,"compositionend",vi),ke(e,"change",vi))},mounted(e,{value:t}){e.value=t==null?"":t},beforeUpdate(e,{value:t,modifiers:{lazy:n,trim:s,number:r}},o){if(e._assign=Ge(o),e.composing||document.activeElement===e&&(n||s&&e.value.trim()===t||(r||e.type==="number")&&Ue(e.value)===t))return;const i=t==null?"":t;e.value!==i&&(e.value=i)}},ar={deep:!0,created(e,t,n){e._assign=Ge(n),ke(e,"change",()=>{const s=e._modelValue,r=Ft(e),o=e.checked,i=e._assign;if(B(s)){const l=dn(s,r),c=l!==-1;if(o&&!c)i(s.concat(r));else if(!o&&c){const u=[...s];u.splice(l,1),i(u)}}else if(et(s)){const l=new Set(s);o?l.add(r):l.delete(r),i(l)}else i(Fi(e,o))})},mounted:Ai,beforeUpdate(e,t,n){e._assign=Ge(n),Ai(e,t,n)}};function Ai(e,{value:t,oldValue:n},s){e._modelValue=t,B(t)?e.checked=dn(t,s.props.value)>-1:et(t)?e.checked=t.has(s.props.value):t!==n&&(e.checked=De(t,Fi(e,!0)))}const dr={created(e,{value:t},n){e.checked=De(t,n.props.value),e._assign=Ge(n),ke(e,"change",()=>{e._assign(Ft(e))})},beforeUpdate(e,{value:t,oldValue:n},s){e._assign=Ge(s),t!==n&&(e.checked=De(t,s.props.value))}},Ri={deep:!0,created(e,{value:t,modifiers:{number:n}},s){const r=et(t);ke(e,"change",()=>{const o=Array.prototype.filter.call(e.options,i=>i.selected).map(i=>n?Ue(Ft(i)):Ft(i));e._assign(e.multiple?r?new Set(o):o:o[0])}),e._assign=Ge(s)},mounted(e,{value:t}){Pi(e,t)},beforeUpdate(e,t,n){e._assign=Ge(n)},updated(e,{value:t}){Pi(e,t)}};function Pi(e,t){const n=e.multiple;if(!(n&&!B(t)&&!et(t))){for(let s=0,r=e.options.length;s<r;s++){const o=e.options[s],i=Ft(o);if(n)B(t)?o.selected=dn(t,i)>-1:o.selected=t.has(i);else if(De(Ft(o),t)){e.selectedIndex!==s&&(e.selectedIndex=s);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function Ft(e){return"_value"in e?e._value:e.value}function Fi(e,t){const n=t?"_trueValue":"_falseValue";return n in e?e[n]:t}const ou={created(e,t,n){Gn(e,t,n,null,"created")},mounted(e,t,n){Gn(e,t,n,null,"mounted")},beforeUpdate(e,t,n,s){Gn(e,t,n,s,"beforeUpdate")},updated(e,t,n,s){Gn(e,t,n,s,"updated")}};function Gn(e,t,n,s,r){let o;switch(e.tagName){case"SELECT":o=Ri;break;case"TEXTAREA":o=Qn;break;default:switch(n.props&&n.props.type){case"checkbox":o=ar;break;case"radio":o=dr;break;default:o=Qn}}const i=o[r];i&&i(e,t,n,s)}function iu(){Qn.getSSRProps=({value:e})=>({value:e}),dr.getSSRProps=({value:e},t)=>{if(t.props&&De(t.props.value,e))return{checked:!0}},ar.getSSRProps=({value:e},t)=>{if(B(e)){if(t.props&&dn(e,t.props.value)>-1)return{checked:!0}}else if(et(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}}}const lu=["ctrl","shift","alt","meta"],cu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>"button"in e&&e.button!==0,middle:e=>"button"in e&&e.button!==1,right:e=>"button"in e&&e.button!==2,exact:(e,t)=>lu.some(n=>e[`${n}Key`]&&!t.includes(n))},fu=(e,t)=>(n,...s)=>{for(let r=0;r<t.length;r++){const o=cu[t[r]];if(o&&o(n,t))return}return e(n,...s)},uu={esc:"escape",space:" ",up:"arrow-up",left:"arrow-left",right:"arrow-right",down:"arrow-down",delete:"backspace"},au=(e,t)=>n=>{if(!("key"in n))return;const s=ve(n.key);if(t.some(r=>r===s||uu[r]===s))return e(n)},Mi={beforeMount(e,{value:t},{transition:n}){e._vod=e.style.display==="none"?"":e.style.display,n&&t?n.beforeEnter(e):cn(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:s}){!t!=!n&&(s?t?(s.beforeEnter(e),cn(e,!0),s.enter(e)):s.leave(e,()=>{cn(e,!1)}):cn(e,t))},beforeUnmount(e,{value:t}){cn(e,t)}};function cn(e,t){e.style.display=t?e._vod:"none"}function du(){Mi.getSSRProps=({value:e})=>{if(!e)return{style:{display:"none"}}}}const Si=se({patchProp:Kf},Pf);let fn,Ii=!1;function Oi(){return fn||(fn=Ro(Si))}function Ni(){return fn=Ii?fn:Po(Si),Ii=!0,fn}const hr=(...e)=>{Oi().render(...e)},Bi=(...e)=>{Ni().hydrate(...e)},hu=(...e)=>{const t=Oi().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ki(s);if(!r)return;const o=t._component;!K(o)&&!o.render&&!o.template&&(o.template=r.innerHTML),r.innerHTML="";const i=n(r,!1,r instanceof SVGElement);return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),i},t},pu=(...e)=>{const t=Ni().createApp(...e),{mount:n}=t;return t.mount=s=>{const r=ki(s);if(r)return n(r,!0,r instanceof SVGElement)},t};function ki(e){return re(e)?document.querySelector(e):e}let Hi=!1;const gu=()=>{Hi||(Hi=!0,iu(),du())},mu=()=>{};var _u=Object.freeze({__proto__:null,[Symbol.toStringTag]:"Module",compile:mu,EffectScope:cs,ReactiveEffect:$t,computed:Jr,customRef:$l,effect:cl,effectScope:sl,getCurrentScope:rl,isProxy:_s,isReactive:rt,isReadonly:Rn,isRef:le,markRaw:bs,onScopeDispose:ol,proxyRefs:xs,reactive:vn,readonly:ms,ref:Fn,shallowReactive:Vr,shallowReadonly:Bl,shallowRef:kl,stop:fl,toRaw:q,toRef:zr,toRefs:Kl,triggerRef:Ll,unref:qr,camelize:ge,capitalize:kt,normalizeClass:Ot,normalizeProps:zi,normalizeStyle:It,toDisplayString:Yi,toHandlerKey:Ht,BaseTransition:Rs,Comment:de,Fragment:ue,KeepAlive:fc,Static:ct,Suspense:tc,Teleport:Fc,Text:Tt,callWithAsyncErrorHandling:ye,callWithErrorHandling:Me,cloneVNode:qe,compatUtils:Af,createBlock:js,createCommentVNode:Lc,createElementBlock:Nc,createElementVNode:Vs,createHydrationRenderer:Po,createPropsRestProxy:bf,createRenderer:Ro,createSlots:Uc,createStaticVNode:Hc,createTextVNode:Ws,createVNode:ee,defineAsyncComponent:lc,defineComponent:Fs,defineEmits:df,defineExpose:hf,defineProps:af,get devtools(){return xt},getCurrentInstance:Je,getTransitionRawChildren:On,guardReactiveProps:ko,h:ti,handleError:ft,initCustomFormatter:xf,inject:Wt,isMemoSame:si,isRuntimeOnly:Jc,isVNode:We,mergeDefaults:_f,mergeProps:Ho,nextTick:tr,onActivated:so,onBeforeMount:io,onBeforeUnmount:kn,onBeforeUpdate:lo,onDeactivated:ro,onErrorCaptured:ao,onMounted:Yt,onRenderTracked:uo,onRenderTriggered:fo,onServerPrefetch:co,onUnmounted:Hn,onUpdated:Bn,openBlock:Kn,popScopeId:zl,provide:eo,pushScopeId:ql,queuePostFlushCb:sr,registerRuntimeCompiler:zc,renderList:Dc,renderSlot:$c,resolveComponent:Sc,resolveDirective:Oc,resolveDynamicComponent:Ic,resolveFilter:vf,resolveTransitionHooks:wt,setBlockTracking:Ks,setDevtoolsHook:Yr,setTransitionHooks:ot,ssrContextKey:ni,ssrUtils:Tf,toHandlers:Kc,transformVNodeArgs:Bc,useAttrs:mf,useSSRContext:Cf,useSlots:gf,useTransitionState:As,version:ri,warn:Wo,watch:rn,watchEffect:cf,watchPostEffect:Zo,watchSyncEffect:ff,withAsyncContext:yf,withCtx:ws,withDefaults:pf,withDirectives:xc,withMemo:Ef,withScopeId:Jl,Transition:fr,TransitionGroup:Qf,VueElement:Zn,createApp:hu,createSSRApp:pu,defineCustomElement:di,defineSSRCustomElement:Vf,hydrate:Bi,initDirectivesForSSR:gu,render:hr,useCssModule:qf,useCssVars:zf,vModelCheckbox:ar,vModelDynamic:ou,vModelRadio:dr,vModelSelect:Ri,vModelText:Qn,vShow:Mi,withKeys:au,withModifiers:fu});export{rn as A,Jr as B,ti as C,q as D,Bn as E,ue as F,au as G,Wt as H,Qn as I,le as J,Ic as K,Ho as L,fc as M,kl as N,ql as O,zl as P,zi as Q,ko as R,Fc as T,_u as V,Fn as a,Vs as b,js as c,ee as d,hu as e,Yt as f,Je as g,Hn as h,vn as i,Nc as j,xc as k,Lc as l,It as m,tr as n,Kn as o,eo as p,fu as q,Sc as r,Dc as s,Yi as t,qr as u,Mi as v,ws as w,Ot as x,Ws as y,$c as z}; diff --git a/magic-editor/src/main/resources/magic-editor/index.html b/magic-editor/src/main/resources/magic-editor/index.html index 199d8490..a50c67bc 100644 --- a/magic-editor/src/main/resources/magic-editor/index.html +++ b/magic-editor/src/main/resources/magic-editor/index.html @@ -5,30 +5,13 @@ <link rel="icon" href="favicon.png"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>magic-api - - - + + + - - - + + +
@@ -49,7 +32,7 @@ function showMaLoadingText(){ let defaultConfig = { title: 'magic-api', - version: '2.0.0' + version: '2.0.1' } defaultConfig = { ...defaultConfig, ...window.MAGIC_EDITOR_CONFIG } let $dom = document.getElementById('magic-loading-text')